summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-11-03 22:58:27 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-11-03 22:58:27 +0000
commit35646d3ead8e0b59eb2cf6c5bd46895efcbc581d (patch)
tree9a4f7faa28c2124d0f585850b5ccaf61f2960302 /xfce-base/xfce4-session/files
parentFixed issues with zend_extension as well as removed dep on depend.php (diff)
downloadhistorical-35646d3ead8e0b59eb2cf6c5bd46895efcbc581d.tar.gz
historical-35646d3ead8e0b59eb2cf6c5bd46895efcbc581d.tar.bz2
historical-35646d3ead8e0b59eb2cf6c5bd46895efcbc581d.zip
old
Package-Manager: portage-2.2.0_alpha3/cvs/Linux x86_64
Diffstat (limited to 'xfce-base/xfce4-session/files')
-rw-r--r--xfce-base/xfce4-session/files/xfce4-session-4.7.0-ck-launch-session.patch209
-rw-r--r--xfce-base/xfce4-session/files/xfce4-session-4.7.0-gnome-keyring.patch94
2 files changed, 0 insertions, 303 deletions
diff --git a/xfce-base/xfce4-session/files/xfce4-session-4.7.0-ck-launch-session.patch b/xfce-base/xfce4-session/files/xfce4-session-4.7.0-ck-launch-session.patch
deleted file mode 100644
index 4f65e410793a..000000000000
--- a/xfce-base/xfce4-session/files/xfce4-session-4.7.0-ck-launch-session.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-From 35c620aa3749581580e0917ff7c2db1c223564a8 Mon Sep 17 00:00:00 2001
-From: Jannis Pohlmann <jannis@xfce.org>
-Date: Wed, 08 Sep 2010 10:02:46 +0000
-Subject: Reuse existing ConsoleKit sessions (bug #6685).
-
-According to the ConsoleKit documentation, only one session leader may
-exist for a session. An application becomes the leader of a session by
-calling org.freedesktop.ConsoleKit.Manager.OpenSession() which returns a
-session identifier. This identifier is then made available to other
-session clients by setting the XDG_SESSION_COOKIE environment variable.
-
-GDM and upstart open ConsoleKit sessions on their own and desktop
-environments are supposed to reuse these sessions instead of opening new
-ones. So with this commit, xfce4-session checks for XDG_SESSION_COOKIE
-and, if it exists, does not try to call OpenSession in order to
-overwrite this environment variable.
-
-I tested this with xfce4-session-logout which finally allows me to
-reboot and shutdown again.
-
-Also fix the indentation, use spaces instead of tabs etc.
----
-diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c
-index 3eb7696..892b6c6 100644
---- a/xfce4-session/xfsm-manager.c
-+++ b/xfce4-session/xfsm-manager.c
-@@ -257,11 +255,11 @@ xfsm_manager_init (XfsmManager *manager)
- #ifdef ENABLE_CONSOLE_KIT
- manager->system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
-
-- if ( G_LIKELY (manager->system_bus != NULL) )
-+ if (G_LIKELY (manager->system_bus != NULL))
- {
- xfsm_manager_consolekit_init (manager);
- }
-- else if ( error )
-+ else if (error)
- {
- g_warning ("Failed to connect to the system bus : %s", error->message);
- g_error_free (error);
-@@ -279,7 +277,7 @@ xfsm_manager_finalize (GObject *obj)
- #ifdef ENABLE_CONSOLE_KIT
- xfsm_manager_consolekit_cleanup (manager);
-
-- if ( manager->system_bus )
-+ if (manager->system_bus)
- dbus_g_connection_unref (manager->system_bus);
- #endif /*ENABLE_CONSOLE_KIT*/
-
-@@ -342,6 +340,7 @@ xfsm_manager_new (void)
- return manager;
- }
-
-+
- #ifdef ENABLE_CONSOLE_KIT
- static void xfsm_manager_consolekit_init (XfsmManager *manager)
- {
-@@ -349,61 +348,83 @@ static void xfsm_manager_consolekit_init (XfsmManager *manager)
- gboolean ret;
-
- manager->consolekit_proxy = dbus_g_proxy_new_for_name_owner (manager->system_bus,
-- "org.freedesktop.ConsoleKit",
-- "/org/freedesktop/ConsoleKit/Manager",
-- "org.freedesktop.ConsoleKit.Manager",
-- NULL);
-+ "org.freedesktop.ConsoleKit",
-+ "/org/freedesktop/ConsoleKit/Manager",
-+ "org.freedesktop.ConsoleKit.Manager",
-+ NULL);
-
-
-- if ( G_UNLIKELY (!manager->consolekit_proxy) )
-+ if (G_UNLIKELY (!manager->consolekit_proxy))
- {
- g_warning ("Failed to create proxy for 'org.freedesktop.ConsoleKit'");
- return;
- }
-
-- ret = dbus_g_proxy_call (manager->consolekit_proxy, "OpenSession", &error,
-- G_TYPE_INVALID,
-- G_TYPE_STRING, &manager->consolekit_cookie,
-- G_TYPE_INVALID);
--
-- if ( G_LIKELY (ret) )
-+ /* check if there is a session to reuse */
-+ if (g_getenv ("XDG_SESSION_COOKIE") != NULL)
- {
-- /*
-- * ConsoleKit doc says that the leader session should set the cookie
-- * on XDG_SESSION_COOKIE env variable.
-- */
-- g_warn_if_fail (g_setenv ("XDG_SESSION_COOKIE",
-- manager->consolekit_cookie,
-- TRUE));
-+#ifdef DEBUG
-+ g_debug ("Reusing existing ConsoleKit session: XDG_SESSION_ID=%s",
-+ g_getenv ("XDG_SESSION_COOKIE"));
-+#endif
- }
-- else if ( error )
-+ else
- {
-- g_warning ("OpenSession on 'org.freedesktop.ConsoleKit' failed with %s", error->message);
-- g_error_free (error);
-+ /* try to open a new session. as its leader we are then responsible for
-+ * setting XDG_SESSION_COOKIE as well as closing the session before we exit */
-+ ret = dbus_g_proxy_call (manager->consolekit_proxy, "OpenSession", &error,
-+ G_TYPE_INVALID,
-+ G_TYPE_STRING, &manager->consolekit_cookie,
-+ G_TYPE_INVALID);
-+
-+ if (G_LIKELY (ret))
-+ {
-+ /*
-+ * ConsoleKit doc says that the leader session should set the cookie
-+ * on XDG_SESSION_COOKIE env variable.
-+ */
-+ if (g_setenv ("XDG_SESSION_COOKIE", manager->consolekit_cookie, TRUE))
-+ {
-+#ifdef DEBUG
-+ g_debug ("Opening a new ConsoleKit session: XDG_SESSION_COOKIE=%s",
-+ manager->consolekit_cookie);
-+#endif
-+ }
-+ else
-+ {
-+ g_warning ("Failed to set XDG_SESSION_COOKIE");
-+ }
-+ }
-+ else if (error)
-+ {
-+ g_warning ("OpenSession on 'org.freedesktop.ConsoleKit' failed with %s", error->message);
-+ g_error_free (error);
-+ }
- }
- }
-
-+
- static void xfsm_manager_consolekit_cleanup (XfsmManager *manager)
- {
-- if ( manager->consolekit_proxy )
-+ GError *error = NULL;
-+ gboolean ret, result;
-+
-+ if (manager->consolekit_proxy)
- {
- if (manager->consolekit_cookie)
-- {
-- GError *error = NULL;
-- gboolean ret, result;
--
-- ret = dbus_g_proxy_call (manager->consolekit_proxy, "CloseSession", &error,
-- G_TYPE_STRING, manager->consolekit_cookie,
-- G_TYPE_INVALID,
-- G_TYPE_BOOLEAN, &result,
-- G_TYPE_INVALID);
-- if ( !ret )
-- {
-- g_warning ("CloseSession on 'org.freedesktop.ConsoleKit' failed with %s", error->message);
-- g_error_free (error);
-- }
-- g_free (manager->consolekit_cookie);
-- }
-+ {
-+ ret = dbus_g_proxy_call (manager->consolekit_proxy, "CloseSession", &error,
-+ G_TYPE_STRING, manager->consolekit_cookie,
-+ G_TYPE_INVALID,
-+ G_TYPE_BOOLEAN, &result,
-+ G_TYPE_INVALID);
-+ if (!ret)
-+ {
-+ g_warning ("CloseSession on 'org.freedesktop.ConsoleKit' failed with %s", error->message);
-+ g_error_free (error);
-+ }
-+ g_free (manager->consolekit_cookie);
-+ }
- g_object_unref (manager->consolekit_proxy);
- }
- }
-@@ -1181,6 +1202,7 @@ xfsm_manager_interact_done (XfsmManager *manager,
- xfsm_manager_start_client_save_timeout (manager, client);
- }
-
-+
- static void
- xfsm_manager_save_yourself_global (XfsmManager *manager,
- gint save_type,
-@@ -1222,8 +1244,8 @@ xfsm_manager_save_yourself_global (XfsmManager *manager,
- shutdown_helper = xfsm_shutdown_helper_new ();
-
- if (!xfsm_shutdown_helper_send_command (shutdown_helper,
-- manager->shutdown_type,
-- &error))
-+ manager->shutdown_type,
-+ &error))
- {
- xfce_message_dialog (NULL, _("Shutdown Failed"),
- GTK_STOCK_DIALOG_ERROR,
-@@ -1237,7 +1259,7 @@ xfsm_manager_save_yourself_global (XfsmManager *manager,
- }
-
- /* clean up and return */
-- g_object_unref (shutdown_helper);
-+ g_object_unref (shutdown_helper);
-
-
- /* at this point, either we failed to suspend/hibernate, or we
---
-cgit v0.8.2.1
diff --git a/xfce-base/xfce4-session/files/xfce4-session-4.7.0-gnome-keyring.patch b/xfce-base/xfce4-session/files/xfce4-session-4.7.0-gnome-keyring.patch
deleted file mode 100644
index 72bd990d162e..000000000000
--- a/xfce-base/xfce4-session/files/xfce4-session-4.7.0-gnome-keyring.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From f32cd3e21c9d557cc8fab23b7c59baff36b16a9a Mon Sep 17 00:00:00 2001
-From: Jérôme Guelfucci <jeromeg@xfce.org>
-Date: Sun, 24 Oct 2010 20:01:47 +0000
-Subject: Add support for new gnome-keyring (Luca Niccoli).
-
-This fixes bugs #5912, #5137 and #6073. Support for old gnome-keyring
-versions is dropped with this commit.
----
-diff --git a/xfce4-session/xfsm-compat-gnome.c b/xfce4-session/xfsm-compat-gnome.c
-index 62f1452..3ed79b3 100644
---- a/xfce4-session/xfsm-compat-gnome.c
-+++ b/xfce4-session/xfsm-compat-gnome.c
-@@ -104,27 +104,15 @@ child_setup (gpointer user_data)
- static void
- gnome_keyring_daemon_startup (void)
- {
-- const char *old_keyring;
--
- GError *error = NULL;
- gchar *sout;
- gchar **lines;
-+ gsize lineno;
- gint status;
- long pid;
- gchar *pid_str;
- gchar *end;
-- char *argv[2];
--
-- /* If there is already a working keyring, don't start a new daemon */
-- old_keyring = g_getenv ("GNOME_KEYRING_SOCKET");
-- if (old_keyring != NULL && access (old_keyring, R_OK | W_OK) == 0)
-- {
--#ifdef HAVE_GNOME_KEYRING
-- gnome_keyring_daemon_prepare_environment_sync ();
--#endif
-- return;
-- }
--
-+ char *argv[3];
-
- /* Pipe to slave keyring lifetime to */
- if (pipe (keyring_lifetime_pipe))
-@@ -135,8 +123,10 @@ gnome_keyring_daemon_startup (void)
-
- error = NULL;
- argv[0] = GNOME_KEYRING_DAEMON;
-- argv[1] = NULL;
-- g_spawn_sync (NULL, argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN,
-+ argv[1] = "--start";
-+ argv[2] = NULL;
-+ g_spawn_sync (NULL, argv, NULL,
-+ G_SPAWN_SEARCH_PATH | G_SPAWN_LEAVE_DESCRIPTORS_OPEN,
- child_setup, NULL,
- &sout, NULL, &status, &error);
-
-@@ -154,20 +144,22 @@ gnome_keyring_daemon_startup (void)
- {
- if (WIFEXITED (status) && WEXITSTATUS (status) == 0 && sout != NULL)
- {
-- lines = g_strsplit (sout, "\n", 3);
--
-- if (lines[0] != NULL && lines[1] != NULL
-- && g_str_has_prefix (lines[1], "GNOME_KEYRING_PID="))
-- {
-- pid_str = lines[1] + strlen ("GNOME_KEYRING_PID=");
-- pid = strtol (pid_str, &end, 10);
--
-- if (end != pid_str)
-- {
-- gnome_keyring_daemon_pid = pid;
-- xfce_putenv (lines[0]);
-- }
-- }
-+ lines = g_strsplit (sout, "\n", 0);
-+
-+ for (lineno = 0; lines[lineno] != NULL; lineno++)
-+ {
-+ xfce_putenv (lines[lineno]);
-+
-+ if (g_str_has_prefix (lines[lineno], "GNOME_KEYRING_PID="))
-+ {
-+ pid_str = lines[lineno] + strlen ("GNOME_KEYRING_PID=");
-+ pid = strtol (pid_str, &end, 10);
-+ if (end != pid_str)
-+ {
-+ gnome_keyring_daemon_pid = pid;
-+ }
-+ }
-+ }
-
- g_strfreev (lines);
-
---
-cgit v0.8.3.4