diff options
author | Nirbheek Chauhan <nirbheek@gentoo.org> | 2011-08-18 05:11:39 +0000 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@gentoo.org> | 2011-08-18 05:11:39 +0000 |
commit | 76f239ae4b95d438db53e3f726d49901e40720c2 (patch) | |
tree | 54ae3dcb7e5aaec94c61eb0631f2abacbc6c6a19 /sys-apps/accountsservice | |
parent | Move from gnome overlay for GNOME 3 (diff) | |
download | historical-76f239ae4b95d438db53e3f726d49901e40720c2.tar.gz historical-76f239ae4b95d438db53e3f726d49901e40720c2.tar.bz2 historical-76f239ae4b95d438db53e3f726d49901e40720c2.zip |
Move from gnome overlay for GNOME 3
Package-Manager: portage-2.2.0_alpha51/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/accountsservice')
8 files changed, 384 insertions, 0 deletions
diff --git a/sys-apps/accountsservice/ChangeLog b/sys-apps/accountsservice/ChangeLog new file mode 100644 index 000000000000..6332faa0c0f0 --- /dev/null +++ b/sys-apps/accountsservice/ChangeLog @@ -0,0 +1,15 @@ +# ChangeLog for sys-apps/accountsservice +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/accountsservice/ChangeLog,v 1.1 2011/08/18 05:11:39 nirbheek Exp $ + +*accountsservice-0.6.13 (18 Aug 2011) + + 18 Aug 2011; Nirbheek Chauhan <nirbheek@gentoo.org> + +accountsservice-0.6.13.ebuild, + +files/accountsservice-0.6.13-PATH_GDM_CUSTOM.patch, + +files/accountsservice-0.6.13-SetAutomaticLogin-false.patch, + +files/accountsservice-0.6.13-etc-passwd-timeout.patch, + +files/accountsservice-0.6.13-monitor-etc-gdm-custom.conf.patch, + +metadata.xml: + Move from gnome overlay for GNOME 3 + diff --git a/sys-apps/accountsservice/Manifest b/sys-apps/accountsservice/Manifest new file mode 100644 index 000000000000..d84e7dc1a9ed --- /dev/null +++ b/sys-apps/accountsservice/Manifest @@ -0,0 +1,28 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX accountsservice-0.6.13-PATH_GDM_CUSTOM.patch 2385 RMD160 1a8b37b51a28de8e2f04570af0c6f8e5778f9182 SHA1 d0e0f789f9ef65ee76146c0ce520f46cef77f798 SHA256 dcd2462989fc672f3602d437bf3fc20d69c885a0385114f3af29de93c6c2f60f +AUX accountsservice-0.6.13-SetAutomaticLogin-false.patch 1249 RMD160 c8094b4db46a44fca3f3b4fa1647cdefc8deb061 SHA1 3b2d528ef6a390697eb5bf4e9439c6afd45778a6 SHA256 4d904285e9cff0062eed42f64d6627c605c2ca3d2cafba1f07d6f379c0dfc817 +AUX accountsservice-0.6.13-etc-passwd-timeout.patch 1399 RMD160 9d8be32abb3f54528712da3e692ba83ab0be2779 SHA1 58129b392dde28fd307d9d4e24154b3d477d5603 SHA256 d2bdd872daa052c3e31fb3a2b38345a58232234b2ee434c96dcd78251a17535e +AUX accountsservice-0.6.13-monitor-etc-gdm-custom.conf.patch 4374 RMD160 7ad2af2b868d8ff46ef011eb32710a703d2c2a3c SHA1 44f0f6853a08911fc8d1936e50f69205d85c92d0 SHA256 1387689ed3d303f52902bd6362b5d3062ea6628df5bce725787efecc2ec2f265 +DIST accountsservice-0.6.13.tar.xz 285196 RMD160 b5f11ea5afce6eecb4daa2d3b628562cc9b27bc6 SHA1 87c8c4e5b79c97ef47a92f07d825dfc823d07ff9 SHA256 c385ae9c0af9fae16348408563845cf7a0d5d4bfb6279ba02fbb9d915f71a943 +EBUILD accountsservice-0.6.13.ebuild 1497 RMD160 7d8ae7d227b26062ab2f5cb91ab66581f5749ad8 SHA1 aff2f5f9e61badbd0bb5a48ec608e39d00877011 SHA256 7d95794505bef03b43b8b0b354105e035c93cfce29764328055e12820d023b9d +MISC ChangeLog 649 RMD160 2ad3765a018cef92db211573d5be34f863c9dfcc SHA1 323e730cd2e9229db9a8c3358fc8e7affb8b740b SHA256 b418e601d7226a7b044ff470c66bed11dc0c111724047768fe5b03afee25874e +MISC metadata.xml 277 RMD160 2ffb105a089a3b759ddef20bf72b06362a1d1c63 SHA1 82aa8cfe90fb0c9f7c02f295d2802d41ad2af380 SHA256 3d52f90556a9db4ad09f2fbe34e2d25b21f345e474e829ac84669d49cb64c8bb +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iQIcBAEBAgAGBQJOTJ8RAAoJEO/kOhxWD91kTJAQAIQvuETCU7mn/6GtqsXWbIFB +0nUsNbQoAJnpyvpThekttxldtS7YOXXYssYkDM+RNJtpyqWIEBsf1mO7GYV29vlp +/ts7uhA5f31gD5/Q6IKXrnmzIbvQs1a1lcC6DAv+XepPMwfk5FA4BxIc7FHG8/dA +5YCOu2p0v8yCjJJXENHKV8IRbAKrVPSNc2m0tv3GeMLOIDTuHYHSei4dgu6VBn8T +/33dTiJRmoS2M7cj0OjWhJoROCADT5qSKHzHdBRBBKgerE2VgWVWhFu844uVX6Ur +R66PEIavj8f2M8Qeshi7D82g9OzDcDRcLKF0Gdlo0/QQg8KPf6pwHtYENZqFmhbP +OsCZHjs64v6AEJzBH4rrzuwWTs8W79845yGceWSqxMtch5lI63hjPfKPcwcZrdVk +UZJ0lP/fDLFTzDtMUVLcOAZlgxqy1e2X1qzBQ2Pfqk80cGMuetnQBR+q6PRiTKto +kMXF8TBxcqumUD/Nz879vY0C+zzplCk531kq5PSRjwX9eJInc6eo9/xPYHSdjUN5 +yqfiIma6OOfHMtALE9m3m7ihOfG7+xsllWKQBQySTSsAFlYlmS4imDWjPv031XmV +qlswwvfV3EukIJG0GrRW0NIoBK+6+/F+Jxvc5QSu5oGf8jAwDwY4y1rHP+W5Honk +iiEEJr6pTSDNeqKR+TVk +=B49s +-----END PGP SIGNATURE----- diff --git a/sys-apps/accountsservice/accountsservice-0.6.13.ebuild b/sys-apps/accountsservice/accountsservice-0.6.13.ebuild new file mode 100644 index 000000000000..34f35ce92363 --- /dev/null +++ b/sys-apps/accountsservice/accountsservice-0.6.13.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/accountsservice/accountsservice-0.6.13.ebuild,v 1.1 2011/08/18 05:11:39 nirbheek Exp $ + +EAPI="3" +GCONF_DEBUG="no" +GNOME2_LA_PUNT="yes" + +inherit eutils gnome2 systemd + +DESCRIPTION="D-Bus interfaces for querying and manipulating user account information" +HOMEPAGE="http://www.fedoraproject.org/wiki/Features/UserAccountDialog" +SRC_URI="http://www.freedesktop.org/software/${PN}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+introspection" + +RDEPEND=" + dev-libs/glib:2 + dev-libs/dbus-glib + sys-auth/polkit + + introspection? ( >=dev-libs/gobject-introspection-0.9.12 )" +DEPEND="${RDEPEND} + dev-libs/libxslt + dev-util/pkgconfig + sys-devel/gettext + >=dev-util/intltool-0.40" + +# Documentaton doesn't validate +RESTRICT="test" + +pkg_setup() { + # docbook docs don't validate, disable doc rebuild + G2CONF="${G2CONF} + --disable-static + --localstatedir=/var + --disable-docbook-docs + --disable-maintainer-mode + --disable-more-warnings + $(systemd_with_unitdir) + $(use_enable introspection)" + DOCS="AUTHORS NEWS README TODO" +} + +src_prepare() { + # Useful patches from upstream git, will be in next release + epatch "${FILESDIR}/${P}-SetAutomaticLogin-false.patch" \ + "${FILESDIR}/${P}-PATH_GDM_CUSTOM.patch" \ + "${FILESDIR}/${P}-monitor-etc-gdm-custom.conf.patch" \ + "${FILESDIR}/${P}-etc-passwd-timeout.patch" + + gnome2_src_prepare +} diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.13-PATH_GDM_CUSTOM.patch b/sys-apps/accountsservice/files/accountsservice-0.6.13-PATH_GDM_CUSTOM.patch new file mode 100644 index 000000000000..8f57cf15b82b --- /dev/null +++ b/sys-apps/accountsservice/files/accountsservice-0.6.13-PATH_GDM_CUSTOM.patch @@ -0,0 +1,69 @@ +From 0c32736980a4f02d4eacf90d145bf937bf29dea6 Mon Sep 17 00:00:00 2001 +From: Vincent Untz <vuntz@gnome.org> +Date: Thu, 21 Jul 2011 16:04:13 -0400 +Subject: [PATCH 2/4] daemon: use PATH_GDM_CUSTOM instead of string literal + +It's better to consolidate references to file path in one +place up top. +--- + src/daemon.c | 13 ++++--------- + 1 files changed, 4 insertions(+), 9 deletions(-) + +diff --git a/src/daemon.c b/src/daemon.c +index f8753d6..eb9aa61 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -50,6 +50,7 @@ + #define PATH_PASSWD "/etc/passwd" + #define PATH_SHADOW "/etc/shadow" + #define PATH_LOGIN_DEFS "/etc/login.defs" ++#define PATH_GDM_CUSTOM "/etc/gdm/custom.conf" + + #ifndef FALLBACK_MINIMAL_UID + #define FALLBACK_MINIMAL_UID 500 +@@ -1207,15 +1208,12 @@ load_autologin (Daemon *daemon, + GError **error) + { + GKeyFile *keyfile; +- const gchar *filename; + GError *local_error; + gchar *string; + +- filename = "/etc/gdm/custom.conf"; +- + keyfile = g_key_file_new (); + if (!g_key_file_load_from_file (keyfile, +- filename, ++ PATH_GDM_CUSTOM, + G_KEY_FILE_KEEP_COMMENTS, + error)) { + g_key_file_free (keyfile); +@@ -1257,15 +1255,12 @@ save_autologin (Daemon *daemon, + GError **error) + { + GKeyFile *keyfile; +- const gchar *filename; + gchar *data; + gboolean result; + +- filename = "/etc/gdm/custom.conf"; +- + keyfile = g_key_file_new (); + if (!g_key_file_load_from_file (keyfile, +- filename, ++ PATH_GDM_CUSTOM, + G_KEY_FILE_KEEP_COMMENTS, + error)) { + g_key_file_free (keyfile); +@@ -1276,7 +1271,7 @@ save_autologin (Daemon *daemon, + g_key_file_set_string (keyfile, "daemon", "AutomaticLogin", name); + + data = g_key_file_to_data (keyfile, NULL, NULL); +- result = g_file_set_contents (filename, data, -1, error); ++ result = g_file_set_contents (PATH_GDM_CUSTOM, data, -1, error); + + g_key_file_free (keyfile); + g_free (data); +-- +1.7.6 + diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.13-SetAutomaticLogin-false.patch b/sys-apps/accountsservice/files/accountsservice-0.6.13-SetAutomaticLogin-false.patch new file mode 100644 index 000000000000..9afafc27410f --- /dev/null +++ b/sys-apps/accountsservice/files/accountsservice-0.6.13-SetAutomaticLogin-false.patch @@ -0,0 +1,40 @@ +From df8e8831131663efc7ca42c4016e445362bee843 Mon Sep 17 00:00:00 2001 +From: Ray Strode <rstrode@redhat.com> +Date: Wed, 20 Jul 2011 10:54:35 -0400 +Subject: [PATCH 1/4] daemon: ignore extraneous SetAutomaticLogin(false) calls + for a user + +Right now, if a user is not configured for automatic login, and +SetAutomaticLogin(false) is called for that user then we disable +automatic login system wide even if someone else is configured +for automatic login. + +This commit changes the semantics of the call such that +SetAutomaticLogin(false) is a no op for users where automatic login +isn't already enabled. + +Spotted by Vincent Untz <vuntz@gnome.org> + +https://bugs.freedesktop.org/show_bug.cgi?id=39402 +--- + src/daemon.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/daemon.c b/src/daemon.c +index ec319a9..f8753d6 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -1294,6 +1294,10 @@ daemon_local_set_automatic_login (Daemon *daemon, + return TRUE; + } + ++ if (daemon->priv->autologin != user && !enabled) { ++ return TRUE; ++ } ++ + if (!save_autologin (daemon, user_local_get_user_name (user), enabled, error)) { + return FALSE; + } +-- +1.7.6 + diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.13-etc-passwd-timeout.patch b/sys-apps/accountsservice/files/accountsservice-0.6.13-etc-passwd-timeout.patch new file mode 100644 index 000000000000..36e3f5afbadd --- /dev/null +++ b/sys-apps/accountsservice/files/accountsservice-0.6.13-etc-passwd-timeout.patch @@ -0,0 +1,52 @@ +From 4e3fad33442dfd908561960921aad335fad6b5a8 Mon Sep 17 00:00:00 2001 +From: Ray Strode <rstrode@redhat.com> +Date: Thu, 21 Jul 2011 16:09:13 -0400 +Subject: [PATCH 4/4] daemon: call reload_users after timeout on passwd/shadow + changes + +Often the two files are changed in concert, so it makes sense to +wait a bit before doing a heavy reload operation. + +Suggested by Vincent. + +https://bugs.freedesktop.org/show_bug.cgi?id=39413 +--- + src/daemon.c | 15 ++++++++++++++- + 1 files changed, 14 insertions(+), 1 deletions(-) + +diff --git a/src/daemon.c b/src/daemon.c +index 882fb2f..79915a7 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -492,6 +492,19 @@ reload_autologin_timeout (Daemon *daemon) + } + + static void ++queue_reload_users_soon (Daemon *daemon) ++{ ++ if (daemon->priv->reload_id > 0) { ++ return; ++ } ++ ++ /* we wait half a second or so in case /etc/passwd and ++ * /etc/shadow are changed at the same time, or repeatedly. ++ */ ++ daemon->priv->reload_id = g_timeout_add (500, (GSourceFunc)reload_users_timeout, daemon); ++} ++ ++static void + queue_reload_users (Daemon *daemon) + { + if (daemon->priv->reload_id > 0) { +@@ -523,7 +536,7 @@ on_passwd_monitor_changed (GFileMonitor *monitor, + return; + } + +- reload_users (daemon); ++ queue_reload_users_soon (daemon); + } + + static void +-- +1.7.6 + diff --git a/sys-apps/accountsservice/files/accountsservice-0.6.13-monitor-etc-gdm-custom.conf.patch b/sys-apps/accountsservice/files/accountsservice-0.6.13-monitor-etc-gdm-custom.conf.patch new file mode 100644 index 000000000000..0389c7e2c5d5 --- /dev/null +++ b/sys-apps/accountsservice/files/accountsservice-0.6.13-monitor-etc-gdm-custom.conf.patch @@ -0,0 +1,115 @@ +From 07ea415a5ea0fc5039c947f967c5683ef0e31201 Mon Sep 17 00:00:00 2001 +From: Vincent Untz <vuntz@gnome.org> +Date: Thu, 21 Jul 2011 08:20:08 +0200 +Subject: [PATCH 3/4] daemon: Monitor /etc/gdm/custom.conf for changes in + autologin config + +We also emit relevant signals when loading the file. + +https://bugs.freedesktop.org/show_bug.cgi?id=39413 +--- + src/daemon.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- + 1 files changed, 47 insertions(+), 4 deletions(-) + +diff --git a/src/daemon.c b/src/daemon.c +index eb9aa61..882fb2f 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -107,6 +107,7 @@ struct DaemonPrivate { + + GFileMonitor *passwd_monitor; + GFileMonitor *shadow_monitor; ++ GFileMonitor *gdm_monitor; + + guint reload_id; + guint autologin_id; +@@ -451,7 +452,7 @@ reload_autologin_timeout (Daemon *daemon) + gboolean enabled; + gchar *name = NULL; + GError *error = NULL; +- User *user; ++ User *user = NULL; + + daemon->priv->autologin_id = 0; + +@@ -463,11 +464,23 @@ reload_autologin_timeout (Daemon *daemon) + return FALSE; + } + ++ if (enabled && name) ++ user = daemon_local_find_user_by_name (daemon, name); ++ ++ if (daemon->priv->autologin != NULL && daemon->priv->autologin != user) { ++ g_object_set (daemon->priv->autologin, "automatic-login", FALSE, NULL); ++ g_signal_emit_by_name (daemon->priv->autologin, "changed", 0); ++ g_object_unref (daemon->priv->autologin); ++ daemon->priv->autologin = NULL; ++ } ++ + if (enabled) { + g_debug ("automatic login is enabled for '%s'\n", name); +- user = daemon_local_find_user_by_name (daemon, name); +- g_object_set (user, "automatic-login", TRUE, NULL); +- daemon->priv->autologin = g_object_ref (user); ++ if (daemon->priv->autologin != user) { ++ g_object_set (user, "automatic-login", TRUE, NULL); ++ daemon->priv->autologin = g_object_ref (user); ++ g_signal_emit_by_name (daemon->priv->autologin, "changed", 0); ++ } + } + else { + g_debug ("automatic login is disabled\n"); +@@ -513,6 +526,21 @@ on_passwd_monitor_changed (GFileMonitor *monitor, + reload_users (daemon); + } + ++static void ++on_gdm_monitor_changed (GFileMonitor *monitor, ++ GFile *file, ++ GFile *other_file, ++ GFileMonitorEvent event_type, ++ Daemon *daemon) ++{ ++ if (event_type != G_FILE_MONITOR_EVENT_CHANGED && ++ event_type != G_FILE_MONITOR_EVENT_CREATED) { ++ return; ++ } ++ ++ queue_reload_autologin (daemon); ++} ++ + static uid_t + get_minimal_uid (void) + { +@@ -603,6 +631,12 @@ daemon_init (Daemon *daemon) + NULL, + &error); + g_object_unref (file); ++ file = g_file_new_for_path (PATH_GDM_CUSTOM); ++ daemon->priv->gdm_monitor = g_file_monitor_file (file, ++ G_FILE_MONITOR_NONE, ++ NULL, ++ &error); ++ g_object_unref (file); + + if (daemon->priv->passwd_monitor != NULL) { + g_signal_connect (daemon->priv->passwd_monitor, +@@ -622,6 +656,15 @@ daemon_init (Daemon *daemon) + g_warning ("Unable to monitor %s: %s", PATH_SHADOW, error->message); + g_error_free (error); + } ++ if (daemon->priv->gdm_monitor != NULL) { ++ g_signal_connect (daemon->priv->gdm_monitor, ++ "changed", ++ G_CALLBACK (on_gdm_monitor_changed), ++ daemon); ++ } else { ++ g_warning ("Unable to monitor %s: %s", PATH_GDM_CUSTOM, error->message); ++ g_error_free (error); ++ } + + queue_reload_users (daemon); + queue_reload_autologin (daemon); +-- +1.7.6 + diff --git a/sys-apps/accountsservice/metadata.xml b/sys-apps/accountsservice/metadata.xml new file mode 100644 index 000000000000..44825d13c084 --- /dev/null +++ b/sys-apps/accountsservice/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>gnome</herd> + <use> + <flag name="introspection">Use <pkg>dev-libs/gobject-introspection</pkg> + for introspection</flag> + </use> +</pkgmetadata> |