summaryrefslogtreecommitdiff
path: root/extra/gconf
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-11-01 01:47:44 -0700
committerroot <root@rshg054.dnsready.net>2012-11-01 01:47:44 -0700
commit83a318800db22408628e60c9e1730578efcfee37 (patch)
tree9f1c330c5019dd940e41c44a7c1db13d337058a6 /extra/gconf
parent5827948456201df72a1bd73e87977c569129fb27 (diff)
Thu Nov 1 01:47:04 PDT 2012
Diffstat (limited to 'extra/gconf')
-rw-r--r--extra/gconf/PKGBUILD15
-rw-r--r--extra/gconf/gconf-dbus-fix-shutdown.patch34
-rw-r--r--extra/gconf/gconf-dbus-fix-use-after-free.patch99
-rw-r--r--extra/gconf/gsettings-schema-convert-dont-fail.patch28
4 files changed, 174 insertions, 2 deletions
diff --git a/extra/gconf/PKGBUILD b/extra/gconf/PKGBUILD
index 9a4d1f6b5..31e7a370f 100644
--- a/extra/gconf/PKGBUILD
+++ b/extra/gconf/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 156770 2012-04-23 09:05:12Z ibiru $
+# $Id: PKGBUILD 170051 2012-10-31 09:24:25Z jgc $
# Maintainer: Jan de Groot <jan@archlinux.org>
pkgname=gconf
pkgver=3.2.5
-pkgrel=2
+pkgrel=3
pkgdesc="A configuration database system"
arch=(i686 x86_64)
license=('LGPL')
@@ -13,11 +13,17 @@ options=('!libtool')
install=gconf.install
url="http://www.gnome.org"
source=(http://ftp.gnome.org/pub/gnome/sources/GConf/3.2/GConf-$pkgver.tar.xz
+ gconf-dbus-fix-use-after-free.patch
+ gconf-dbus-fix-shutdown.patch
+ gsettings-schema-convert-dont-fail.patch
gconf-merge-schema
gconfpkg
gconf-reload.patch
01_xml-gettext-domain.patch)
sha256sums=('4ddea9503a212ee126c5b46a0a958fd5484574c3cb6ef2baf38db02e819e58c6'
+ '76c078218e7c3e93691ddd4d7fd9f5c83d4862d0a0406d17b805f3106b50375d'
+ 'ddf55a40a260dd00364b32b3200bd8a76e890070ea6267fbfb322907c0946ab2'
+ 'be6f084a31229e8edfd6936005c6bb4f2d1548b777df5937923b4702f7a9ac19'
'ee6b6e6f4975dad13a8c45f1c1f0547a99373bdecdcd6604bfc12965c328a028'
'bf1928718caa5df2b9e54a13cfd0f15a8fe0e09e86b84385ce023616a114e898'
'567b78d8b4b4bbcb77c5f134d57bc503c34867fcc6341c0b01716bcaa4a21694'
@@ -25,6 +31,11 @@ sha256sums=('4ddea9503a212ee126c5b46a0a958fd5484574c3cb6ef2baf38db02e819e58c6'
build() {
cd "GConf-$pkgver"
+ # Upstream fixes from git
+ patch -Np1 -i "$srcdir/gconf-dbus-fix-shutdown.patch"
+ patch -Np1 -i "$srcdir/gsettings-schema-convert-dont-fail.patch"
+ patch -Np1 -i "$srcdir/gconf-dbus-fix-use-after-free.patch"
+
# Patch from fedora - reloads gconf after installing schemas
patch -Np1 -i "$srcdir/gconf-reload.patch"
# http://bugzilla.gnome.org/show_bug.cgi?id=568845
diff --git a/extra/gconf/gconf-dbus-fix-shutdown.patch b/extra/gconf/gconf-dbus-fix-shutdown.patch
new file mode 100644
index 000000000..b294284b2
--- /dev/null
+++ b/extra/gconf/gconf-dbus-fix-shutdown.patch
@@ -0,0 +1,34 @@
+From 39299610083e0e7f9b44e62b7f4e51e89693cf89 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode@redhat.com>
+Date: Tue, 06 Mar 2012 19:39:06 +0000
+Subject: dbus: fix shutdown
+
+gconftool-2 wasn't properly shutting down gconfd, because
+it was trying to do it before connecting to the daemon.
+
+This commit makes sure that we always first try to connect to
+the daemon before asking it to shutdown.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=671490
+---
+diff --git a/gconf/gconf-dbus.c b/gconf/gconf-dbus.c
+index 442a94b..f167fc5 100644
+--- a/gconf/gconf-dbus.c
++++ b/gconf/gconf-dbus.c
+@@ -2483,7 +2483,13 @@ gconf_shutdown_daemon (GError** err)
+ {
+ DBusMessage *message;
+
+- /* Don't want to spawn it if it's already down */
++ /* If we haven't reached out to it yet,
++ * reach out now.
++ */
++ if (global_conn == NULL)
++ gconf_ping_daemon();
++
++ /* But we don't want to spawn it if it's already down */
+ if (global_conn == NULL || !service_running)
+ return;
+
+--
+cgit v0.9.0.2
diff --git a/extra/gconf/gconf-dbus-fix-use-after-free.patch b/extra/gconf/gconf-dbus-fix-use-after-free.patch
new file mode 100644
index 000000000..d99b222cc
--- /dev/null
+++ b/extra/gconf/gconf-dbus-fix-use-after-free.patch
@@ -0,0 +1,99 @@
+From 84884e9df7ce8c081a1c223c66a799b82545ff1e Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha@redhat.com>
+Date: Thu, 18 Oct 2012 20:08:02 +0000
+Subject: gconf-dbus: fix use after free
+
+gconf_engine_get_fuller is accessing freed memory.
+The problem is that it's referencing strings that are owned
+by a D-Bus message, and they go away when the D-Bus message is freed.
+
+This commit addresses the problem by duplicating the strings and
+freeing them later.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=667167
+---
+diff --git a/gconf/gconf-dbus-utils.c b/gconf/gconf-dbus-utils.c
+index 6fd5bfa..92f5980 100644
+--- a/gconf/gconf-dbus-utils.c
++++ b/gconf/gconf-dbus-utils.c
+@@ -569,11 +569,11 @@ gconf_dbus_utils_get_entry_values (DBusMessageIter *main_iter,
+ gchar **schema_name_p)
+ {
+ DBusMessageIter struct_iter;
+- gchar *key;
++ const gchar *key;
+ GConfValue *value;
+ gboolean is_default;
+ gboolean is_writable;
+- gchar *schema_name;
++ const gchar *schema_name;
+
+ g_return_val_if_fail (dbus_message_iter_get_arg_type (main_iter) == DBUS_TYPE_STRUCT,
+ FALSE);
+@@ -587,7 +587,7 @@ gconf_dbus_utils_get_entry_values (DBusMessageIter *main_iter,
+ value = utils_get_value (&struct_iter);
+
+ dbus_message_iter_next (&struct_iter);
+- schema_name = (gchar *) utils_get_optional_string (&struct_iter);
++ schema_name = utils_get_optional_string (&struct_iter);
+
+ dbus_message_iter_next (&struct_iter);
+ dbus_message_iter_get_basic (&struct_iter, &is_default);
+@@ -596,7 +596,7 @@ gconf_dbus_utils_get_entry_values (DBusMessageIter *main_iter,
+ dbus_message_iter_get_basic (&struct_iter, &is_writable);
+
+ if (key_p)
+- *key_p = key;
++ *key_p = g_strdup (key);
+
+ if (value_p)
+ *value_p = value;
+@@ -604,7 +604,7 @@ gconf_dbus_utils_get_entry_values (DBusMessageIter *main_iter,
+ gconf_value_free (value);
+
+ if (schema_name_p)
+- *schema_name_p = schema_name;
++ *schema_name_p = g_strdup (schema_name);
+
+ if (is_default_p)
+ *is_default_p = is_default;
+diff --git a/gconf/gconf-dbus.c b/gconf/gconf-dbus.c
+index f167fc5..5610fcf 100644
+--- a/gconf/gconf-dbus.c
++++ b/gconf/gconf-dbus.c
+@@ -1252,12 +1252,13 @@ gconf_engine_get_fuller (GConfEngine *conf,
+
+ if (schema_name && schema_name[0] != '/')
+ {
++ g_free (schema_name);
+ schema_name = NULL;
+ }
+
+ if (schema_name_p)
+- *schema_name_p = g_strdup (schema_name);
+-
++ *schema_name_p = schema_name;
++
+ return val;
+ }
+
+@@ -2402,7 +2403,7 @@ handle_notify (DBusConnection *connection,
+ GConfEngine *conf2)
+ {
+ GConfEngine *conf;
+- gchar *key, *schema_name;
++ gchar *key = NULL, *schema_name = NULL;
+ gboolean is_default, is_writable;
+ DBusMessageIter iter;
+ GConfValue *value;
+@@ -2466,6 +2467,8 @@ handle_notify (DBusConnection *connection,
+
+ if (value)
+ gconf_value_free (value);
++ g_free (key);
++ g_free (schema_name);
+
+ if (!match)
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+--
+cgit v0.9.0.2
diff --git a/extra/gconf/gsettings-schema-convert-dont-fail.patch b/extra/gconf/gsettings-schema-convert-dont-fail.patch
new file mode 100644
index 000000000..92040b343
--- /dev/null
+++ b/extra/gconf/gsettings-schema-convert-dont-fail.patch
@@ -0,0 +1,28 @@
+From 02f12f41b031a1c2672e7cf1cb8ebde58288c547 Mon Sep 17 00:00:00 2001
+From: Guido Günther <agx@sigxcpu.org>
+Date: Thu, 23 Feb 2012 20:14:18 +0000
+Subject: gsettings-schema-convert: Don't fail to convert lists without default element
+
+---
+diff --git a/gsettings/gsettings-schema-convert b/gsettings/gsettings-schema-convert
+index a60dc35..913cc83 100755
+--- a/gsettings/gsettings-schema-convert
++++ b/gsettings/gsettings-schema-convert
+@@ -854,11 +854,10 @@ class GConfSchema:
+ # Fix the default value to be parsable by GVariant
+ if self.type == 'list':
+ l = self.default.strip()
+- if not (l[0] == '[' and l[-1] == ']'):
+- if not l:
+- l = '[]'
+- else:
+- raise GSettingsSchemaConvertException('Cannot parse default list value \'%s\' for key \'%s\'.' % (self.default, self.applyto or self.key))
++ if not l:
++ l = '[]'
++ elif not (l[0] == '[' and l[-1] == ']'):
++ raise GSettingsSchemaConvertException('Cannot parse default list value \'%s\' for key \'%s\'.' % (self.default, self.applyto or self.key))
+ values = l[1:-1].strip()
+ if not values:
+ self.default = '[]'
+--
+cgit v0.9.0.2