2008-05-29 Niall Power <[email protected]> gnome-2-22
authorniall
Thu, 29 May 2008 15:07:50 +0000
branchgnome-2-22
changeset 12386 a85764468bd6
parent 12385 134271d6a7c1
child 12387 55f479d9e516
2008-05-29 Niall Power <[email protected]> * base-specs/gnome-session.spec: Apply new patch (dbus-cleanup) * patches/gnome-session-14-dbus-cleanup.diff: Added. bugster: 6706624. Ensures dbus-daemon get's cleaned up after ctrl-alt-backspace on Xorg or sunray. Code rewritten upstream. * patches/SUNWtgnome-xagent-01-trusted-extensions.diff: bugster: 6706624. Ensures dbus-daemon get's cleaned up after ctrl-alt-backspace on Xorg or sunray. Fixed in upstream gnome-session base code.
ChangeLog
base-specs/gnome-session.spec
patches/SUNWtgnome-xagent-01-trusted-extensions.diff
patches/gnome-session-14-dbus-cleanup.diff
--- a/ChangeLog	Thu May 29 15:00:01 2008 +0000
+++ b/ChangeLog	Thu May 29 15:07:50 2008 +0000
@@ -1,3 +1,14 @@
+2008-05-29  Niall Power <[email protected]>
+
+	* base-specs/gnome-session.spec: Apply new patch (dbus-cleanup)
+	* patches/gnome-session-14-dbus-cleanup.diff: Added.
+	  bugster: 6706624. Ensures dbus-daemon get's cleaned up after
+	  ctrl-alt-backspace on Xorg or sunray. Code rewritten upstream.
+	* patches/SUNWtgnome-xagent-01-trusted-extensions.diff:
+	  bugster: 6706624. Ensures dbus-daemon get's cleaned up after
+	  ctrl-alt-backspace on Xorg or sunray. Fixed in upstream gnome-session
+	  base code.
+	
 2008-05-29  Dave Lin  <[email protected]>
 
 	* SUNWgnome-help-viewer: Remove the unnecessary dependency
--- a/base-specs/gnome-session.spec	Thu May 29 15:00:01 2008 +0000
+++ b/base-specs/gnome-session.spec	Thu May 29 15:07:50 2008 +0000
@@ -12,7 +12,7 @@
 License:      GPL
 Group:        System/GUI/GNOME
 Version:      2.22.2
-Release:      1
+Release:      2
 Distribution: Java Desktop System
 Vendor:	      Sun Microsystems, Inc.
 Summary:      Session Manager for the GNOME Desktop
@@ -55,6 +55,8 @@
 Patch12:      gnome-session-12-compiz-integration.diff
 #owner:xz159989 date:2008-05-07 type:branding
 Patch13:      gnome-session-13-logout-shutdown-dialog.diff
+#owner:niall date 2008-05-29 type:bug bugster:6706624
+Patch14:      gnome-session-14-dbus-cleanup.diff
 
 URL:          http://www.gnome.org
 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
@@ -103,6 +105,7 @@
 %endif
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
 
 %build
 %ifos linux
@@ -172,6 +175,9 @@
 %{_sysconfdir}/gconf/schemas/*
 
 %changelog
+* Thu May 29 2008 - [email protected]
+- Add patch -14-dbus-cleanup.diff for bugster #6706624
+  Affected code was rewritten in 2.23 so no need to upstream.
 * Tue May 27 2008 - [email protected]
 - Bump to 2.22.2.
 * Wed May 07 2008 - [email protected]
--- a/patches/SUNWtgnome-xagent-01-trusted-extensions.diff	Thu May 29 15:00:01 2008 +0000
+++ b/patches/SUNWtgnome-xagent-01-trusted-extensions.diff	Thu May 29 15:07:50 2008 +0000
@@ -85,7 +85,7 @@
 diff -urN -x '*.orig' gnome-session-2.20.3/gnome-session/tsoljds-xagent.c ../SUNWtgnome-xagent-2.21.4.hacked/gnome-session-2.20.3/gnome-session/tsoljds-xagent.c
 --- gnome-session-2.20.3/gnome-session/tsoljds-xagent.c	1970-01-01 00:00:00.000000000 +0000
 +++ ../SUNWtgnome-xagent-2.21.4.hacked/gnome-session-2.20.3/gnome-session/tsoljds-xagent.c	2008-01-11 17:56:14.079640000 +0000
-@@ -0,0 +1,522 @@
+@@ -0,0 +1,520 @@
 +#include <config.h>
 +#ifdef HAVE_XTSOL
 +
@@ -140,6 +140,7 @@
 +gboolean managesession = TRUE;
 +gboolean trusted_session = FALSE;
 +gboolean default_session = FALSE;
++gboolean dbus_daemon_owner = FALSE;
 +
 +typedef struct tcb_component {
 +  char *name;
@@ -337,6 +338,8 @@
 +AtExit (void) 
 +{
 +	gsm_keyring_daemon_stop ();
++	if (dbus_daemon_owner)
++		gsm_dbus_daemon_stop ();
 +}
 +
 +int main (int argc, char *argv[])
@@ -354,7 +357,6 @@
 +  GIOChannel *channel;
 +  guint result;
 +  Session *session;
-+  gboolean dbus_daemon_owner;
 +  static gboolean first_startup= TRUE;
 +
 +    /* redirect stdout and stderr to /dev/null */
@@ -480,10 +482,6 @@
 +                                  (GIOFunc)handle_pipe_input, NULL, so_long_pipe);
 +    gtk_main ();
 +
-+    if (dbus_daemon_owner) {
-+        gsm_dbus_daemon_stop ();
-+    }
-+
 +    return 0;
 +}
 +
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-session-14-dbus-cleanup.diff	Thu May 29 15:07:50 2008 +0000
@@ -0,0 +1,59 @@
+--- gnome-session-2.22.2/gnome-session/main.c	2008-05-29 15:07:46.795547000 +0100
++++ gnome-session-2.22.2/gnome-session/main.c-new	2008-05-29 15:08:57.033580000 +0100
+@@ -79,6 +79,12 @@
+ /* Flag indicating that the normal CONFIG_PREFIX should not be used */
+ gboolean failsafe = FALSE;
+ 
++/* Flag indicating that dbus-daemon process was spawned by this
++ * process when TRUE  */
++gboolean dbus_daemon_owner = FALSE;
++
++GsmDBusServer *dbus_server = NULL;
++
+ /* Wait period for clients to register. */
+ gint purge_delay = 120000;
+ 
+@@ -106,6 +112,16 @@
+   {NULL}
+ };
+ 
++static void
++exit_cleanup(void)
++{
++  if (dbus_daemon_owner)
++    {
++      g_object_unref (dbus_server);
++      gsm_dbus_daemon_stop();
++    }
++}
++
+ static gint
+ show_gnome_about (gpointer data)
+ {
+@@ -730,8 +746,6 @@
+   char **versions;
+   GConfClient *gconf_client;
+   GOptionContext *goption_context;
+-  gboolean dbus_daemon_owner;
+-  GsmDBusServer *dbus_server;
+   GnomeProgram *program;
+ #ifdef HAVE_XTSOL
+   gboolean saved_a11y = FALSE;
+@@ -891,6 +905,9 @@
+ 
+   ignore (SIGPIPE);
+ 
++  /* Register cleanup function for abnormal exit */
++  atexit(exit_cleanup);
++
+   /* Need DISPLAY set */
+   gsm_keyring_daemon_start ();
+   dbus_daemon_owner = gsm_dbus_daemon_start ();
+@@ -997,6 +1014,7 @@
+   if (dbus_daemon_owner) {
+     g_object_unref (dbus_server);
+     gsm_dbus_daemon_stop ();
++    dbus_daemon_owner = FALSE;
+   }
+ 
+   g_object_unref (gconf_client);