[GConf2] Work around crasher bug

Kalev Lember kalev at fedoraproject.org
Sun Oct 21 08:59:53 UTC 2012


commit a0eb7e4da89c7888be48fc7c97604ff8ea541e56
Author: Ray Strode <rstrode at redhat.com>
Date:   Thu Sep 13 18:21:31 2012 -0400

    Work around crasher bug
    
    Resolves: #755992

 GConf2.spec            |    8 ++++
 workaround-crash.patch |  100 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+), 0 deletions(-)
---
diff --git a/GConf2.spec b/GConf2.spec
index fb5d2b2..8db5c4c 100644
--- a/GConf2.spec
+++ b/GConf2.spec
@@ -16,6 +16,9 @@ URL: http://projects.gnome.org/gconf/
 
 Patch0: GConf-gettext.patch
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=755992
+Patch1: workaround-crash.patch
+
 BuildRequires: libxml2-devel >= %{libxml2_version}
 BuildRequires: libxslt-devel
 BuildRequires: glib2-devel >= %{glib2_version}
@@ -66,6 +69,7 @@ which require GTK+.
 %prep
 %setup -q -n GConf-%{version}
 %patch0 -p1 -b .gettext
+%patch1 -p1 -b .workaround-crash
 
 autoreconf -i -f
 
@@ -157,6 +161,10 @@ fi
 %doc %{_mandir}/man1/gsettings-schema-convert.1*
 
 %changelog
+* Thu Sep 13 2012 Ray Strode <rstrode at redhat.com> 3.2.5-2
+- Work around crasher bug
+  Resolves: #755992
+
 * Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.2.5-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/workaround-crash.patch b/workaround-crash.patch
new file mode 100644
index 0000000..2d1c6ba
--- /dev/null
+++ b/workaround-crash.patch
@@ -0,0 +1,100 @@
+From d9e9fe3d550693c530658583b73212ce94bf3f21 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode at redhat.com>
+Date: Thu, 13 Sep 2012 18:18:48 -0400
+Subject: [PATCH] daemon: don't exit on timeout
+
+The client library isn't robust enough to handle the daemon going away,
+so don't make it go away automatically.
+---
+ gconf/gconfd.c | 68 ----------------------------------------------------------
+ 1 file changed, 68 deletions(-)
+
+diff --git a/gconf/gconfd.c b/gconf/gconfd.c
+index d42ce1e..557e906 100644
+--- a/gconf/gconfd.c
++++ b/gconf/gconfd.c
+@@ -1053,63 +1053,6 @@ static GSList* main_loops = NULL;
+ static guint timeout_id = 0;
+ static gboolean need_log_cleanup = FALSE;
+ 
+-static gboolean
+-periodic_cleanup_timeout(gpointer data)
+-{  
+-  if (need_db_reload)
+-    {
+-      gconf_log (GCL_INFO, _("SIGHUP received, reloading all databases"));
+-
+-      need_db_reload = FALSE;
+-#ifdef HAVE_CORBA
+-      logfile_save ();
+-      shutdown_databases ();
+-      init_databases ();
+-      gconf_server_load_sources ();
+-      logfile_read ();
+-#endif
+-#ifdef HAVE_DBUS
+-      reload_databases ();
+-#endif
+-    }
+-  
+-  gconf_log (GCL_DEBUG, "Performing periodic cleanup, expiring cache cruft");
+-  
+-#ifdef HAVE_CORBA
+-  drop_old_clients ();
+-#endif
+-  drop_old_databases ();
+-
+-#ifdef HAVE_DBUS
+-  if (no_databases_in_use () && gconfd_dbus_client_count () == 0)
+-#else
+-  if (no_databases_in_use () && client_count () == 0)
+-#endif
+-    {
+-      gconf_log (GCL_INFO, _("GConf server is not in use, shutting down."));
+-      gconfd_main_quit ();
+-      return FALSE;
+-    }
+-  
+-  /* expire old locale cache entries */
+-  gconfd_locale_cache_expire ();
+-
+-#ifdef HAVE_CORBA
+-  if (!need_log_cleanup)
+-    {
+-      gconf_log (GCL_DEBUG, "No log file saving needed in periodic cleanup handler");
+-      return TRUE;
+-    }
+-  
+-  /* Compress the running state file */
+-  logfile_save ();
+-#endif
+-
+-  need_log_cleanup = FALSE;
+-  
+-  return TRUE;
+-}
+-
+ void
+ gconfd_need_log_cleanup (void)
+ {
+@@ -1123,17 +1066,6 @@ gconf_main(void)
+ 
+   loop = g_main_loop_new (NULL, TRUE);
+ 
+-  if (main_loops == NULL)
+-    {
+-      gulong timeout_len = 60*0.5; /* 60 s/min * .5 min */
+-      
+-      g_assert(timeout_id == 0);
+-      timeout_id = g_timeout_add_seconds (timeout_len,
+-                                          periodic_cleanup_timeout,
+-                                          NULL);
+-
+-    }
+-  
+   main_loops = g_slist_prepend(main_loops, loop);
+ 
+   g_main_loop_run (loop);
+-- 
+1.7.12
+


More information about the scm-commits mailing list