[Pkg-xfce-commits] r4240 - in desktop/trunk/xfce4-session/debian: . patches

Yves-Alexis Perez corsac at alioth.debian.org
Sat Sep 4 11:41:12 UTC 2010


Author: corsac
Date: 2010-09-04 11:41:12 +0000 (Sat, 04 Sep 2010)
New Revision: 4240

Added:
   desktop/trunk/xfce4-session/debian/patches/03_gk-start-with-path.patch
   desktop/trunk/xfce4-session/debian/patches/04_gk-dont-check-running-use-start.patch
Modified:
   desktop/trunk/xfce4-session/debian/changelog
   desktop/trunk/xfce4-session/debian/patches/series
Log:
* debian/patches:
  - 03_gk-start-with-path and 04_gk-dont-check-running-use-start added,
   change the way it starts gnome-keyring so it correctly runs in the
   session and exports environment variables.                 closes: #523322

Modified: desktop/trunk/xfce4-session/debian/changelog
===================================================================
--- desktop/trunk/xfce4-session/debian/changelog	2010-08-31 17:46:52 UTC (rev 4239)
+++ desktop/trunk/xfce4-session/debian/changelog	2010-09-04 11:41:12 UTC (rev 4240)
@@ -1,3 +1,12 @@
+xfce4-session (4.6.2-2) UNRELEASED; urgency=low
+
+  * debian/patches:
+    - 03_gk-start-with-path and 04_gk-dont-check-running-use-start added,
+     change the way it starts gnome-keyring so it correctly runs in the
+     session and exports environment variables.                 closes: #523322
+
+ -- Yves-Alexis Perez <corsac at debian.org>  Sat, 04 Sep 2010 13:14:24 +0200
+
 xfce4-session (4.6.2-1) unstable; urgency=low
 
   [Stefan Ott]

Added: desktop/trunk/xfce4-session/debian/patches/03_gk-start-with-path.patch
===================================================================
--- desktop/trunk/xfce4-session/debian/patches/03_gk-start-with-path.patch	                        (rev 0)
+++ desktop/trunk/xfce4-session/debian/patches/03_gk-start-with-path.patch	2010-09-04 11:41:12 UTC (rev 4240)
@@ -0,0 +1,12 @@
+--- a/xfce4-session/xfsm-compat-gnome.c
++++ b/xfce4-session/xfsm-compat-gnome.c
+@@ -128,7 +128,8 @@
+   error = NULL;
+   argv[0] = GNOME_KEYRING_DAEMON;
+   argv[1] = NULL;
+-  g_spawn_sync (NULL, argv, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN,
++  g_spawn_sync (NULL, argv, NULL,
++                G_SPAWN_SEARCH_PATH | G_SPAWN_LEAVE_DESCRIPTORS_OPEN,
+                 child_setup, NULL,
+                 &sout, NULL, &status, &error);
+ 

Added: desktop/trunk/xfce4-session/debian/patches/04_gk-dont-check-running-use-start.patch
===================================================================
--- desktop/trunk/xfce4-session/debian/patches/04_gk-dont-check-running-use-start.patch	                        (rev 0)
+++ desktop/trunk/xfce4-session/debian/patches/04_gk-dont-check-running-use-start.patch	2010-09-04 11:41:12 UTC (rev 4240)
@@ -0,0 +1,79 @@
+Index: xfce4-session-4.6.2/xfce4-session/xfsm-compat-gnome.c
+===================================================================
+--- xfce4-session-4.6.2.orig/xfce4-session/xfsm-compat-gnome.c	2010-05-31 14:36:01.988123134 +0200
++++ xfce4-session-4.6.2/xfce4-session/xfsm-compat-gnome.c	2010-05-31 14:37:08.787058601 +0200
+@@ -100,34 +100,23 @@
+ 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 */
+   pipe (keyring_lifetime_pipe);
+ 
+   error = NULL;
+   argv[0] = GNOME_KEYRING_DAEMON;
+-  argv[1] = NULL;
++  argv[1] = "--start";
++  argv[2] = NULL;
+   g_spawn_sync (NULL, argv, NULL,
+                 G_SPAWN_SEARCH_PATH | G_SPAWN_LEAVE_DESCRIPTORS_OPEN,
+                 child_setup, NULL,
+@@ -147,20 +136,22 @@
+     {
+       if (WIFEXITED (status) && WEXITSTATUS (status) == 0 && sout != NULL)
+         {
+-          lines = g_strsplit (sout, "\n", 3);
++          lines = g_strsplit (sout, "\n", 0);
+ 
+-          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]);
+-              }
+-          }
++          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);
+ 

Modified: desktop/trunk/xfce4-session/debian/patches/series
===================================================================
--- desktop/trunk/xfce4-session/debian/patches/series	2010-08-31 17:46:52 UTC (rev 4239)
+++ desktop/trunk/xfce4-session/debian/patches/series	2010-09-04 11:41:12 UTC (rev 4240)
@@ -1,2 +1,4 @@
 01_correct_shadows.patch
 02_fix-fortune-path.patch
+03_gk-start-with-path.patch
+04_gk-dont-check-running-use-start.patch




More information about the Pkg-xfce-commits mailing list