From 5d2dc14b977035b6ce8b9ea6b9f8454d9c85d393c440c94e68aacf6498799793 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 22 Jul 2011 13:05:39 +0000 Subject: [PATCH] Accepting request 76568 from home:vuntz:branches:GNOME:Factory Update gdm-sysconfig-settings.patch for small bug OBS-URL: https://build.opensuse.org/request/show/76568 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=168 --- gdm-sysconfig-settings.patch | 71 +++++++++++++++++++----------------- gdm.changes | 10 +++++ gdm.spec | 3 +- 3 files changed, 49 insertions(+), 35 deletions(-) diff --git a/gdm-sysconfig-settings.patch b/gdm-sysconfig-settings.patch index 21c75a3..3001581 100644 --- a/gdm-sysconfig-settings.patch +++ b/gdm-sysconfig-settings.patch @@ -1,8 +1,8 @@ -Index: gdm-2.32.0/common/Makefile.am +Index: gdm-3.1.2/common/Makefile.am =================================================================== ---- gdm-2.32.0.orig/common/Makefile.am -+++ gdm-2.32.0/common/Makefile.am -@@ -82,6 +82,8 @@ libgdmcommon_la_SOURCES = \ +--- gdm-3.1.2.orig/common/Makefile.am ++++ gdm-3.1.2/common/Makefile.am +@@ -73,6 +73,8 @@ libgdmcommon_la_SOURCES = \ gdm-settings-backend.h \ gdm-settings-desktop-backend.c \ gdm-settings-desktop-backend.h \ @@ -11,7 +11,7 @@ Index: gdm-2.32.0/common/Makefile.am gdm-settings-keys.h \ gdm-settings-utils.h \ gdm-settings-utils.c \ -@@ -89,6 +91,8 @@ libgdmcommon_la_SOURCES = \ +@@ -80,6 +82,8 @@ libgdmcommon_la_SOURCES = \ gdm-settings-direct.h \ gdm-settings-client.h \ gdm-settings-client.c \ @@ -20,10 +20,10 @@ Index: gdm-2.32.0/common/Makefile.am gdm-log.h \ gdm-log.c \ gdm-md5.h \ -Index: gdm-2.32.0/common/gdm-settings-system-backend.c +Index: gdm-3.1.2/common/gdm-settings-system-backend.c =================================================================== --- /dev/null -+++ gdm-2.32.0/common/gdm-settings-system-backend.c ++++ gdm-3.1.2/common/gdm-settings-system-backend.c @@ -0,0 +1,348 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * @@ -373,10 +373,10 @@ Index: gdm-2.32.0/common/gdm-settings-system-backend.c + + return GDM_SETTINGS_BACKEND (object); +} -Index: gdm-2.32.0/common/gdm-settings-system-backend.h +Index: gdm-3.1.2/common/gdm-settings-system-backend.h =================================================================== --- /dev/null -+++ gdm-2.32.0/common/gdm-settings-system-backend.h ++++ gdm-3.1.2/common/gdm-settings-system-backend.h @@ -0,0 +1,56 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * @@ -434,10 +434,10 @@ Index: gdm-2.32.0/common/gdm-settings-system-backend.h +G_END_DECLS + +#endif /* __GDM_SETTINGS_SYSTEM_BACKEND_H */ -Index: gdm-2.32.0/common/gdm-settings.c +Index: gdm-3.1.2/common/gdm-settings.c =================================================================== ---- gdm-2.32.0.orig/common/gdm-settings.c -+++ gdm-2.32.0/common/gdm-settings.c +--- gdm-3.1.2.orig/common/gdm-settings.c ++++ gdm-3.1.2/common/gdm-settings.c @@ -41,6 +41,7 @@ #include "gdm-settings-glue.h" @@ -446,7 +446,7 @@ Index: gdm-2.32.0/common/gdm-settings.c #define GDM_DBUS_PATH "/org/gnome/DisplayManager" #define GDM_SETTINGS_DBUS_PATH GDM_DBUS_PATH "/Settings" -@@ -53,7 +54,7 @@ +@@ -51,7 +52,7 @@ struct GdmSettingsPrivate { DBusGConnection *connection; @@ -455,7 +455,7 @@ Index: gdm-2.32.0/common/gdm-settings.c }; enum { -@@ -94,15 +95,29 @@ gdm_settings_get_value (GdmSettings *set +@@ -92,15 +93,29 @@ gdm_settings_get_value (GdmSettings *set { GError *local_error; gboolean res; @@ -489,7 +489,7 @@ Index: gdm-2.32.0/common/gdm-settings.c if (! res) { g_propagate_error (error, local_error); } -@@ -122,6 +137,7 @@ gdm_settings_set_value (GdmSettings *set +@@ -120,6 +135,7 @@ gdm_settings_set_value (GdmSettings *set { GError *local_error; gboolean res; @@ -497,7 +497,7 @@ Index: gdm-2.32.0/common/gdm-settings.c g_return_val_if_fail (GDM_IS_SETTINGS (settings), FALSE); g_return_val_if_fail (key != NULL, FALSE); -@@ -129,10 +145,23 @@ gdm_settings_set_value (GdmSettings *set +@@ -127,10 +143,23 @@ gdm_settings_set_value (GdmSettings *set g_debug ("Setting value %s", key); local_error = NULL; @@ -525,7 +525,7 @@ Index: gdm-2.32.0/common/gdm-settings.c if (! res) { g_propagate_error (error, local_error); } -@@ -210,13 +239,21 @@ backend_value_changed (GdmSettingsBacken +@@ -208,13 +237,21 @@ backend_value_changed (GdmSettingsBacken static void gdm_settings_init (GdmSettings *settings) { @@ -552,7 +552,7 @@ Index: gdm-2.32.0/common/gdm-settings.c } static void -@@ -231,9 +268,9 @@ gdm_settings_finalize (GObject *object) +@@ -229,9 +266,9 @@ gdm_settings_finalize (GObject *object) g_return_if_fail (settings->priv != NULL); @@ -565,11 +565,11 @@ Index: gdm-2.32.0/common/gdm-settings.c G_OBJECT_CLASS (gdm_settings_parent_class)->finalize (object); } -Index: gdm-2.32.0/common/gdm-sysconfig.c +Index: gdm-3.1.2/common/gdm-sysconfig.c =================================================================== --- /dev/null -+++ gdm-2.32.0/common/gdm-sysconfig.c -@@ -0,0 +1,481 @@ ++++ gdm-3.1.2/common/gdm-sysconfig.c +@@ -0,0 +1,484 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * Copyright (C) 2008 Hans Petter Jansson @@ -876,7 +876,8 @@ Index: gdm-2.32.0/common/gdm-sysconfig.c + const gchar *p0, *p1, *p2; + gchar quotes; + gchar *escaped_value; -+ gint escaped_value_len; ++ gchar *quoted_escaped_value; ++ gint quoted_escaped_value_len; + gchar *new_line; + gint len; + @@ -885,20 +886,22 @@ Index: gdm-2.32.0/common/gdm-sysconfig.c + return NULL; + + escaped_value = g_strescape (value, ""); -+ escaped_value_len = strlen (escaped_value); ++ quoted_escaped_value = g_strdup_printf ("\"%s\"", escaped_value); ++ g_free (escaped_value); ++ quoted_escaped_value_len = strlen (quoted_escaped_value); + + p1 = skip_over_value (p0, "es); + p2 = p1 + strlen (p1); -+ len = (p0 - line) + escaped_value_len + (p2 - p1); ++ len = (p0 - line) + quoted_escaped_value_len + (p2 - p1); + + new_line = g_malloc (len + 1); -+ memcpy (new_line, line, p0 - line); -+ memcpy (new_line + (p0 - line), escaped_value, escaped_value_len); -+ memcpy (new_line + (p0 - line) + escaped_value_len, p1, p2 - p1); ++ memcpy (new_line, line, p0 - line); ++ memcpy (new_line + (p0 - line), quoted_escaped_value, quoted_escaped_value_len); ++ memcpy (new_line + (p0 - line) + quoted_escaped_value_len, p1, p2 - p1); + -+ *(new_line + len - 1) = '\0'; ++ *(new_line + len) = '\0'; + -+ g_free (escaped_value); ++ g_free (quoted_escaped_value); + + return new_line; +} @@ -1051,10 +1054,10 @@ Index: gdm-2.32.0/common/gdm-sysconfig.c + g_strfreev (lines); + return result; +} -Index: gdm-2.32.0/common/gdm-sysconfig.h +Index: gdm-3.1.2/common/gdm-sysconfig.h =================================================================== --- /dev/null -+++ gdm-2.32.0/common/gdm-sysconfig.h ++++ gdm-3.1.2/common/gdm-sysconfig.h @@ -0,0 +1,43 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * @@ -1099,10 +1102,10 @@ Index: gdm-2.32.0/common/gdm-sysconfig.h +G_END_DECLS + +#endif /* __GDM_SYSCONFIG_H */ -Index: gdm-2.32.0/data/gdm.conf-custom.in +Index: gdm-3.1.2/data/gdm.conf-custom.in =================================================================== ---- gdm-2.32.0.orig/data/gdm.conf-custom.in -+++ gdm-2.32.0/data/gdm.conf-custom.in +--- gdm-3.1.2.orig/data/gdm.conf-custom.in ++++ gdm-3.1.2/data/gdm.conf-custom.in @@ -1,4 +1,7 @@ # GDM configuration storage +# diff --git a/gdm.changes b/gdm.changes index 3596a86..d707a84 100644 --- a/gdm.changes +++ b/gdm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Jul 20 18:41:12 CEST 2011 - vuntz@opensuse.org + +- Update gdm-sysconfig-settings.patch to fix changing a value in + sysconfig files. Values were not quoted, and were losing the last + character. +- Also add a comment that we have a similar patch that needs to be + kepts in sync with gdm-sysconfig-settings.patch in + accountsservice. + ------------------------------------------------------------------- Wed Jul 6 16:34:12 CEST 2011 - vuntz@opensuse.org diff --git a/gdm.spec b/gdm.spec index a801168..9b429fc 100644 --- a/gdm.spec +++ b/gdm.spec @@ -42,7 +42,8 @@ Patch4: gdm-vt-allocation-hack.patch Patch6: gdm-desktop-session-env-pam.patch # PATCH-FIX-OPENSUSE gdm-suse-xsession.patch vuntz@novell.com -- Use the /etc/X11/xdm/* scripts Patch7: gdm-suse-xsession.patch -# PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 hpj@novell.com -- Read autologin options from /etc/sysconfig/displaymanager +# WARNING: do not remove/significantly change patch8 without updating the relevant patch in accountsservice too +# PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 hpj@novell.com -- Read autologin options from /etc/sysconfig/displaymanager; note that accountsservice has a similar patch (accountsservice-sysconfig.patch) Patch8: gdm-sysconfig-settings.patch # PATCH-FEATURE-OPENSUSE gdm-passwordless-login.patch vuntz@opensuse.org -- Support DISPLAYMANAGER_PASSWORD_LESS_LOGIN sysconfig option Patch9: gdm-passwordless-login.patch