[evolution-data-server/f16] Add patch for Red Hat bug #755791 (crash in GConf code)

Milan Crha mcrha at fedoraproject.org
Thu Mar 22 10:58:09 UTC 2012


commit 0eacc8877e96a64f7f234216f1c482b1e0e71351
Author: Milan Crha <mcrha at redhat.com>
Date:   Thu Mar 22 11:57:59 2012 +0100

    Add patch for Red Hat bug #755791 (crash in GConf code)

 evolution-data-server-3.2.3-gconf-crash.patch |  106 +++++++++++++++++++++++++
 evolution-data-server.spec                    |   12 +++-
 2 files changed, 116 insertions(+), 2 deletions(-)
---
diff --git a/evolution-data-server-3.2.3-gconf-crash.patch b/evolution-data-server-3.2.3-gconf-crash.patch
new file mode 100644
index 0000000..7db33d8
--- /dev/null
+++ b/evolution-data-server-3.2.3-gconf-crash.patch
@@ -0,0 +1,106 @@
+diff --git a/addressbook/libedata-book/Makefile.am b/addressbook/libedata-book/Makefile.am
+index 2fff48a..7d1f327 100644
+--- a/addressbook/libedata-book/Makefile.am
++++ b/addressbook/libedata-book/Makefile.am
+@@ -20,6 +20,7 @@ libedata_book_1_2_la_CPPFLAGS = \
+ 	$(DB_CFLAGS) \
+ 	$(SQLITE3_CFLAGS) \
+ 	$(GOA_CFLAGS) \
++	$(DBUS_GLIB_CFLAGS) \
+ 	$(EVOLUTION_ADDRESSBOOK_CFLAGS)
+ 
+ libedata_book_1_2_la_SOURCES = \
+@@ -44,6 +45,7 @@ libedata_book_1_2_la_LIBADD = \
+ 	$(DB_LIBS) \
+ 	$(SQLITE3_LIBS) \
+ 	$(GOA_LIBS) \
++	$(DBUS_GLIB_LIBS) \
+ 	$(EVOLUTION_ADDRESSBOOK_LIBS)
+ 
+ libedata_book_1_2_la_LDFLAGS = \
+diff --git a/addressbook/libedata-book/e-data-book-factory.c b/addressbook/libedata-book/e-data-book-factory.c
+index dca4255..53ee1e7 100644
+--- a/addressbook/libedata-book/e-data-book-factory.c
++++ b/addressbook/libedata-book/e-data-book-factory.c
+@@ -26,6 +26,8 @@
+ #include <unistd.h>
+ #include <glib/gi18n.h>
+ 
++#include <dbus/dbus-glib.h>
++
+ #ifdef ENABLE_MAINTAINER_MODE
+ #include <gtk/gtk.h>
+ #endif
+@@ -837,6 +839,9 @@ main (gint argc,
+ 	g_set_prgname (E_PRGNAME);
+ 	if (!g_thread_supported ()) g_thread_init (NULL);
+ 
++	/* this is to initialize threading for dbus-glib used by GConf */
++	dbus_g_thread_init ();
++
+ 	#ifdef ENABLE_MAINTAINER_MODE
+ 	/* only to load gtk-modules, like bug-buddy's gnomesegvhandler, if possible */
+ 	gtk_init_check (&argc, &argv);
+diff --git a/calendar/libedata-cal/Makefile.am b/calendar/libedata-cal/Makefile.am
+index 8ca641d..bf9d2c6 100644
+--- a/calendar/libedata-cal/Makefile.am
++++ b/calendar/libedata-cal/Makefile.am
+@@ -18,6 +18,7 @@ libedata_cal_1_2_la_CPPFLAGS = 			\
+ 	-I$(top_builddir)			\
+ 	-I$(top_builddir)/calendar		\
+ 	$(LIBICAL_CFLAGS)			\
++	$(DBUS_GLIB_CFLAGS) \
+ 	$(EVOLUTION_CALENDAR_CFLAGS)
+ 
+ libedata_cal_1_2_la_SOURCES =		\
+@@ -40,6 +41,7 @@ libedata_cal_1_2_la_LIBADD =					\
+ 	$(top_builddir)/libedataserver/libedataserver-1.2.la 	\
+ 	$(top_builddir)/libebackend/libebackend-1.2.la 		\
+ 	$(LIBICAL_LIBS)						\
++	$(DBUS_GLIB_LIBS) \
+ 	$(EVOLUTION_CALENDAR_LIBS)
+ 
+ libedata_cal_1_2_la_LDFLAGS =								\
+diff --git a/calendar/libedata-cal/e-data-cal-factory.c b/calendar/libedata-cal/e-data-cal-factory.c
+index df3e136..2ec4a7d 100644
+--- a/calendar/libedata-cal/e-data-cal-factory.c
++++ b/calendar/libedata-cal/e-data-cal-factory.c
+@@ -30,6 +30,8 @@
+ #include <unistd.h>
+ #include <glib/gi18n.h>
+ 
++#include <dbus/dbus-glib.h>
++
+ #ifdef ENABLE_MAINTAINER_MODE
+ #include <gtk/gtk.h>
+ #endif
+@@ -1038,6 +1040,9 @@ main (gint argc,
+ 	g_set_prgname (E_PRGNAME);
+ 	if (!g_thread_supported ()) g_thread_init (NULL);
+ 
++	/* this is to initialize threading for dbus-glib used by GConf */
++	dbus_g_thread_init ();
++
+ 	#ifdef ENABLE_MAINTAINER_MODE
+ 	/* only to load gtk-modules, like bug-buddy's gnomesegvhandler, if possible */
+ 	gtk_init_check (&argc, &argv);
+diff --git a/configure.ac b/configure.ac
+index 7c163e7..33394bd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -347,6 +347,15 @@ if `$PKG_CONFIG --atleast-version=0.9.1 libgdata`; then
+ 	AC_DEFINE(HAVE_LIBGDATA_0_9, 1, [libgdata is 0.9.1 or higher])
+ fi
+ 
++dnl ******************************
++dnl DBus-glib stuff, to initialize thread for GConf, which is using it
++dnl this is returned back only temporarily and wil lbe removed as soon
++dnl as eds will stop using GConf completely
++dnl ******************************
++PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.6)
++AC_SUBST(DBUS_GLIB_CFLAGS)
++AC_SUBST(DBUS_GLIB_LIBS)
++
+ dnl *******************************
+ dnl Check for GNOME Online Accounts
+ dnl *******************************
diff --git a/evolution-data-server.spec b/evolution-data-server.spec
index 82c71f6..e9c82f1 100644
--- a/evolution-data-server.spec
+++ b/evolution-data-server.spec
@@ -25,7 +25,7 @@
 
 Name: evolution-data-server
 Version: 3.2.3
-Release: 2%{?dist}
+Release: 3%{?dist}
 Group: System Environment/Libraries
 Summary: Backend data server for Evolution
 License: LGPLv2+
@@ -44,11 +44,15 @@ Patch11: evolution-data-server-1.11.5-fix-64bit-acinclude.patch
 # RH bug #785183
 Patch12: evolution-data-server-3.2.3-libical-quote-escape.patch
 
+# RH bug #755791 - crash in GConf
+Patch13: evolution-data-server-3.2.3-gconf-crash.patch
+
 ### Build Dependencies ###
 
 BuildRequires: GConf2-devel
 BuildRequires: bison
 BuildRequires: db4-devel
+BuildRequires: dbus-glib-devel
 BuildRequires: gettext
 BuildRequires: glib2-devel >= %{glib2_version}
 BuildRequires: gnome-common
@@ -73,7 +77,7 @@ BuildRequires: vala-tools
 
 %if %{ldap_support}
 %if %{static_ldap}
-BuildRequires: openldap-evolution-devel
+BuildRequires: openldap-evolution-devel%{?_isa}
 BuildRequires: openssl-devel
 %else
 BuildRequires: openldap-devel >= 2.0.11 
@@ -124,6 +128,7 @@ This package contains developer documentation for %{name}.
 
 %patch11 -p1 -b .fix-64bit-acinclude
 %patch12 -p1 -b .libical-quote-escape
+%patch13 -p1 -b .gconf-crash
 
 mkdir -p krb5-fakeprefix/include
 mkdir -p krb5-fakeprefix/lib
@@ -347,6 +352,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/gtk-doc/html/libedataserverui
 
 %changelog
+* Thu Mar 22 2012 Milan Crha <mcrha at redhat.com> - 3.2.3-3
+- Add patch for Red Hat bug #755791 (crash in GConf code)
+
 * Tue Jan 31 2012 Milan Crha <mcrha at redhat.com> - 3.2.3-2
 - Add patch for Red Hat bug #785183 (Google Calendar: Cannot
   modify calendar object)


More information about the scm-commits mailing list