2009-02-17 Stephen Browne <
[email protected]>
* base-specs/GConf.spec: Bump to 2.25.2 and reorder patches
* patches/GConf-01-apoc-path-update.diff: remove NOP patch
* patches/GConf-01-g11n-locale-alias.diff: renamed
* patches/GConf-02-GCONF_BACKEND_DIR.diff: renamed
* patches/GConf-03-user-specific-dbus.diff: renamed
--- a/ChangeLog Tue Feb 17 11:23:35 2009 +0000
+++ b/ChangeLog Tue Feb 17 12:15:39 2009 +0000
@@ -1,3 +1,11 @@
+2009-02-17 Stephen Browne <[email protected]>
+
+ * base-specs/GConf.spec: Bump to 2.25.2 and reorder patches
+ * patches/GConf-01-apoc-path-update.diff: remove NOP patch
+ * patches/GConf-01-g11n-locale-alias.diff: renamed
+ * patches/GConf-02-GCONF_BACKEND_DIR.diff: renamed
+ * patches/GConf-03-user-specific-dbus.diff: renamed
+
2009-02-17 Calum Benson <[email protected]>
* base-specs/gnome-themes.spec: Bump to 2.25.90.
--- a/base-specs/GConf.spec Tue Feb 17 11:23:35 2009 +0000
+++ b/base-specs/GConf.spec Tue Feb 17 12:15:39 2009 +0000
@@ -11,7 +11,7 @@
License: LGPL
Group: System/Libraries/GNOME
Provides: GConf
-Version: 2.25.0
+Version: 2.25.2
Release: 1
Distribution: Java Desktop System
Vendor: Sun Microsystems, Inc.
@@ -20,14 +20,12 @@
%if %build_l10n
Source1: l10n-configure.sh
%endif
-#owner:stephen date:2004-05-19 type:branding
-Patch1: GConf-01-apoc-path-update.diff
#owner:stephen date:2004-08-02 type:bug bugster:5042863 bugzilla:100378
-Patch2: GConf-02-g11n-locale-alias.diff
+Patch1: GConf-01-g11n-locale-alias.diff
#owner:laca date:2006-06-29 type:feature
-Patch3: GConf-03-GCONF_BACKEND_DIR.diff
+Patch2: GConf-02-GCONF_BACKEND_DIR.diff
#owner:yippi date:2008-10-09 type:bug bugzilla:555745
-Patch4: GConf-04-user-specific-dbus.diff
+Patch3: GConf-03-user-specific-dbus.diff
URL: http://www.gnome.org
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Docdir: %{_defaultdocdir}/doc
@@ -74,7 +72,6 @@
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
%build
%ifos linux
--- a/patches/GConf-01-apoc-path-update.diff Tue Feb 17 11:23:35 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-diff -urN GConf-2.16.0/gconf/default.path.in GConf-2.16.0-hacked/gconf/default.path.in
---- GConf-2.16.0/gconf/default.path.in 2006-10-06 01:37:28.000000000 +1300
-+++ GConf-2.16.0-hacked/gconf/default.path.in 2006-10-23 21:01:55.978753000 +1300
-@@ -13,6 +13,8 @@
- # wide sources in this file.
- include @sysgconfdir@/2/local-mandatory.path
-
-+#apoc:readonly:mandatory@
-+
- # Now see where users want us to look - basically the user can stick arbitrary
- # sources in a ~/.gconf.path file and they're inserted here
- include "$(HOME)/.gconf.path"
-@@ -20,6 +22,8 @@
- # Give users a default storage location, ~/.gconf
- xml:readwrite:$(HOME)/.gconf
-
-+#apoc:readonly:
-+
- # To read in any defaults settings that the Sys Admin may have created
- # prior to a desktop system upgrade. The SysAdmin can stick default values
- # system-wide in this file.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/GConf-01-g11n-locale-alias.diff Tue Feb 17 12:15:39 2009 +0000
@@ -0,0 +1,88 @@
+diff -ur GConf-2.6.1/gconf/gconf-locale.c GConf-2.6.1.hacked/gconf/gconf-locale.c
+--- GConf-2.6.1/gconf/gconf-locale.c.orig 2004-08-02 13:19:41.166861000 -0700
++++ GConf-2.6.1/gconf/gconf-locale.c 2004-08-02 13:20:49.947469000 -0700
+@@ -22,6 +22,7 @@
+ #include <sys/time.h>
+ #include <time.h>
+ #include <string.h>
++#include <stdio.h>
+
+ static void
+ gconf_locale_cache_add (GConfLocaleCache* cache,
+@@ -189,7 +190,66 @@
+ * Big mess o' cut-and-pasted code
+ */
+
+-/* --------------------------------------------------------------- */
++static GHashTable *alias_table = NULL;
++
++/*read an alias file for the locales*/
++static void
++read_aliases (char *file)
++{
++ FILE *fp;
++ char buf[256];
++ if (!alias_table)
++ alias_table = g_hash_table_new (g_str_hash, g_str_equal);
++ fp = fopen (file,"r");
++ if (!fp)
++ return;
++ while (fgets (buf,256,fp))
++ {
++ char *p;
++ g_strstrip(buf);
++ if (buf[0]=='#' || buf[0]=='\0')
++ continue;
++ p = strtok (buf,"\t ");
++ if (!p)
++ continue;
++ p = strtok (NULL,"\t ");
++ if(!p)
++ continue;
++ if (!g_hash_table_lookup (alias_table, buf))
++ g_hash_table_insert (alias_table, g_strdup(buf), g_strdup(p));
++ }
++ fclose (fp);
++}
++
++/*return the un-aliased language as a newly allocated string*/
++static char *
++unalias_lang (char *lang)
++{
++ char *p;
++ int i;
++ if (!alias_table)
++ {
++ read_aliases ("/usr/share/locale/locale.alias");
++ read_aliases ("/usr/local/share/locale/locale.alias");
++ read_aliases ("/usr/lib/X11/locale/locale.alias");
++ read_aliases ("/usr/openwin/lib/locale/locale.alias");
++ }
++ i = 0;
++ while ((p=g_hash_table_lookup(alias_table,lang)) && strcmp(p, lang))
++ {
++ lang = p;
++ if (i++ == 30)
++ {
++ static gboolean said_before = FALSE;
++ if (!said_before)
++ g_warning (_("Too many alias levels for a locale, "
++ "may indicate a loop"));
++ said_before = TRUE;
++ return lang;
++ }
++ }
++ return lang;
++}
+
+ /* Mask for components of locale spec. The ordering here is from
+ * least significant to most significant
+@@ -360,6 +420,8 @@
+ category_memory[0]= '\0';
+ category_memory++;
+
++ cp = unalias_lang (cp); /* add locale alias support */
++
+ if (strcmp (cp, "C") == 0)
+ c_locale_defined= TRUE;
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/GConf-02-GCONF_BACKEND_DIR.diff Tue Feb 17 12:15:39 2009 +0000
@@ -0,0 +1,24 @@
+--- GConf-2.14.0/gconf/gconf-backend.c.orig 2006-06-29 09:58:43.388598000 -0400
++++ GConf-2.14.0/gconf/gconf-backend.c 2006-06-29 10:06:43.973291000 -0400
+@@ -171,6 +171,7 @@
+ gchar* back;
+ gchar* file;
+ gchar* retval;
++ gchar* gconf_backend_dir;
+
+ g_return_val_if_fail(address != NULL, NULL);
+
+@@ -181,7 +182,12 @@
+
+ file = g_strconcat("gconfbackend-", back, NULL);
+
+- retval = g_module_build_path(GCONF_BACKEND_DIR, file);
++ gconf_backend_dir = g_getenv ("GCONF_BACKEND_DIR");
++ if (gconf_backend_dir == NULL)
++ {
++ gconf_backend_dir = GCONF_BACKEND_DIR;
++ }
++ retval = g_module_build_path(gconf_backend_dir, file);
+
+ g_free(back);
+
--- a/patches/GConf-02-g11n-locale-alias.diff Tue Feb 17 11:23:35 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-diff -ur GConf-2.6.1/gconf/gconf-locale.c GConf-2.6.1.hacked/gconf/gconf-locale.c
---- GConf-2.6.1/gconf/gconf-locale.c.orig 2004-08-02 13:19:41.166861000 -0700
-+++ GConf-2.6.1/gconf/gconf-locale.c 2004-08-02 13:20:49.947469000 -0700
-@@ -22,6 +22,7 @@
- #include <sys/time.h>
- #include <time.h>
- #include <string.h>
-+#include <stdio.h>
-
- static void
- gconf_locale_cache_add (GConfLocaleCache* cache,
-@@ -189,7 +190,66 @@
- * Big mess o' cut-and-pasted code
- */
-
--/* --------------------------------------------------------------- */
-+static GHashTable *alias_table = NULL;
-+
-+/*read an alias file for the locales*/
-+static void
-+read_aliases (char *file)
-+{
-+ FILE *fp;
-+ char buf[256];
-+ if (!alias_table)
-+ alias_table = g_hash_table_new (g_str_hash, g_str_equal);
-+ fp = fopen (file,"r");
-+ if (!fp)
-+ return;
-+ while (fgets (buf,256,fp))
-+ {
-+ char *p;
-+ g_strstrip(buf);
-+ if (buf[0]=='#' || buf[0]=='\0')
-+ continue;
-+ p = strtok (buf,"\t ");
-+ if (!p)
-+ continue;
-+ p = strtok (NULL,"\t ");
-+ if(!p)
-+ continue;
-+ if (!g_hash_table_lookup (alias_table, buf))
-+ g_hash_table_insert (alias_table, g_strdup(buf), g_strdup(p));
-+ }
-+ fclose (fp);
-+}
-+
-+/*return the un-aliased language as a newly allocated string*/
-+static char *
-+unalias_lang (char *lang)
-+{
-+ char *p;
-+ int i;
-+ if (!alias_table)
-+ {
-+ read_aliases ("/usr/share/locale/locale.alias");
-+ read_aliases ("/usr/local/share/locale/locale.alias");
-+ read_aliases ("/usr/lib/X11/locale/locale.alias");
-+ read_aliases ("/usr/openwin/lib/locale/locale.alias");
-+ }
-+ i = 0;
-+ while ((p=g_hash_table_lookup(alias_table,lang)) && strcmp(p, lang))
-+ {
-+ lang = p;
-+ if (i++ == 30)
-+ {
-+ static gboolean said_before = FALSE;
-+ if (!said_before)
-+ g_warning (_("Too many alias levels for a locale, "
-+ "may indicate a loop"));
-+ said_before = TRUE;
-+ return lang;
-+ }
-+ }
-+ return lang;
-+}
-
- /* Mask for components of locale spec. The ordering here is from
- * least significant to most significant
-@@ -360,6 +420,8 @@
- category_memory[0]= '\0';
- category_memory++;
-
-+ cp = unalias_lang (cp); /* add locale alias support */
-+
- if (strcmp (cp, "C") == 0)
- c_locale_defined= TRUE;
-
--- a/patches/GConf-03-GCONF_BACKEND_DIR.diff Tue Feb 17 11:23:35 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
---- GConf-2.14.0/gconf/gconf-backend.c.orig 2006-06-29 09:58:43.388598000 -0400
-+++ GConf-2.14.0/gconf/gconf-backend.c 2006-06-29 10:06:43.973291000 -0400
-@@ -171,6 +171,7 @@
- gchar* back;
- gchar* file;
- gchar* retval;
-+ gchar* gconf_backend_dir;
-
- g_return_val_if_fail(address != NULL, NULL);
-
-@@ -181,7 +182,12 @@
-
- file = g_strconcat("gconfbackend-", back, NULL);
-
-- retval = g_module_build_path(GCONF_BACKEND_DIR, file);
-+ gconf_backend_dir = g_getenv ("GCONF_BACKEND_DIR");
-+ if (gconf_backend_dir == NULL)
-+ {
-+ gconf_backend_dir = GCONF_BACKEND_DIR;
-+ }
-+ retval = g_module_build_path(gconf_backend_dir, file);
-
- g_free(back);
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/GConf-03-user-specific-dbus.diff Tue Feb 17 12:15:39 2009 +0000
@@ -0,0 +1,51 @@
+diff -up GConf-2.24.0/gconf/gconf-internals.c.orig GConf-2.24.0/gconf/gconf-internals.c
+--- GConf-2.24.0/gconf/gconf-internals.c.orig 2008-06-28 10:58:36.000000000 +0100
++++ GConf-2.24.0/gconf/gconf-internals.c 2008-10-10 15:33:56.494241754 +0100
+@@ -2428,11 +2428,12 @@ get_ior (gboolean start_if_not_found,
+ DBusConnection *connection;
+ DBusError bus_error;
+ char *ior;
++ const char *dbus_address = NULL;
+
+ /* if the bus isn't running and we don't want to start gconfd then
+ * we don't want to autolaunch the bus either, so bail early.
+ */
+- if (g_getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL &&
++ if ( (dbus_address = g_getenv ("DBUS_SESSION_BUS_ADDRESS")) == NULL &&
+ (!start_if_not_found || g_getenv ("DISPLAY") == NULL)) {
+ if (failure_log)
+ g_string_append_printf (failure_log,
+@@ -2440,6 +2441,32 @@ get_ior (gboolean start_if_not_found,
+ return NULL;
+ }
+
++ if ( dbus_address != NULL ) {
++ DBusAddressEntry **address_entries;
++ int address_entries_len = 0;
++ const char *method = NULL;
++
++ if ( dbus_parse_address( dbus_address, &address_entries, &address_entries_len, NULL ) ) {
++ for ( int i = 0; i < address_entries_len; i++ ) {
++ method = dbus_address_entry_get_method( address_entries[i] );
++
++ if ( method != NULL && strcmp( method, "unix" ) == 0 ) {
++ struct stat s;
++
++ const char *path = dbus_address_entry_get_value(address_entries[i], "path");
++ if ( path != NULL && stat( path, &s ) == 0 &&
++ s.st_uid != geteuid() ) {
++ /* The session bus isn't the same as the effective uid so
++ * it's highly likely to fail to connect to the server so
++ * don't use it, unset the environment variable.
++ */
++ g_unsetenv("DBUS_SESSION_BUS_ADDRESS");
++ }
++ }
++ }
++ }
++ }
++
+ dbus_error_init (&bus_error);
+ connection = dbus_bus_get (DBUS_BUS_SESSION, &bus_error);
+
+
--- a/patches/GConf-04-user-specific-dbus.diff Tue Feb 17 11:23:35 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-diff -up GConf-2.24.0/gconf/gconf-internals.c.orig GConf-2.24.0/gconf/gconf-internals.c
---- GConf-2.24.0/gconf/gconf-internals.c.orig 2008-06-28 10:58:36.000000000 +0100
-+++ GConf-2.24.0/gconf/gconf-internals.c 2008-10-10 15:33:56.494241754 +0100
-@@ -2428,11 +2428,12 @@ get_ior (gboolean start_if_not_found,
- DBusConnection *connection;
- DBusError bus_error;
- char *ior;
-+ const char *dbus_address = NULL;
-
- /* if the bus isn't running and we don't want to start gconfd then
- * we don't want to autolaunch the bus either, so bail early.
- */
-- if (g_getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL &&
-+ if ( (dbus_address = g_getenv ("DBUS_SESSION_BUS_ADDRESS")) == NULL &&
- (!start_if_not_found || g_getenv ("DISPLAY") == NULL)) {
- if (failure_log)
- g_string_append_printf (failure_log,
-@@ -2440,6 +2441,32 @@ get_ior (gboolean start_if_not_found,
- return NULL;
- }
-
-+ if ( dbus_address != NULL ) {
-+ DBusAddressEntry **address_entries;
-+ int address_entries_len = 0;
-+ const char *method = NULL;
-+
-+ if ( dbus_parse_address( dbus_address, &address_entries, &address_entries_len, NULL ) ) {
-+ for ( int i = 0; i < address_entries_len; i++ ) {
-+ method = dbus_address_entry_get_method( address_entries[i] );
-+
-+ if ( method != NULL && strcmp( method, "unix" ) == 0 ) {
-+ struct stat s;
-+
-+ const char *path = dbus_address_entry_get_value(address_entries[i], "path");
-+ if ( path != NULL && stat( path, &s ) == 0 &&
-+ s.st_uid != geteuid() ) {
-+ /* The session bus isn't the same as the effective uid so
-+ * it's highly likely to fail to connect to the server so
-+ * don't use it, unset the environment variable.
-+ */
-+ g_unsetenv("DBUS_SESSION_BUS_ADDRESS");
-+ }
-+ }
-+ }
-+ }
-+ }
-+
- dbus_error_init (&bus_error);
- connection = dbus_bus_get (DBUS_BUS_SESSION, &bus_error);
-
-