Hello community,
here is the log from the commit of package lightdm for openSUSE:Factory checked in at 2012-11-05 06:30:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lightdm (Old)
and /work/SRC/openSUSE:Factory/.lightdm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lightdm", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/lightdm/lightdm.changes 2012-10-18 21:55:00.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.lightdm.new/lightdm.changes 2012-11-05 06:30:54.000000000 +0100
@@ -1,0 +2,17 @@
+Sat Nov 3 20:29:47 UTC 2012 - gber(a)opensuse.org
+
+- added lightdm-make-sessions-inherit-system-default-locale.patch
+ in order to make greeter and user sessions inherit the system
+ default locale (lp#1073135, bnc#786926)
+- added lightdm-fix-language-setting.patch in order to fix saving/
+ retrieving of the language setting (lp#1068853, lp#1019314)
+- added lightdm-do-not-strip-codeset-from-language.patch in order
+ to prevent stripping the codeset consistent with how the
+ Language setting is retrieved from AccountsService (lp#1074946)
+
+-------------------------------------------------------------------
+Sat Nov 3 15:34:05 UTC 2012 - coolo(a)suse.com
+
+- gdm 3.6.1 brought back gdmflexiserver so remove the conflict again
+
+-------------------------------------------------------------------
New:
----
lightdm-do-not-strip-codeset-from-language.patch
lightdm-fix-language-setting.patch
lightdm-make-sessions-inherit-system-default-locale.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lightdm.spec ++++++
--- /var/tmp/diff_new_pack.iERf8A/_old 2012-11-05 06:30:57.000000000 +0100
+++ /var/tmp/diff_new_pack.iERf8A/_new 2012-11-05 06:30:57.000000000 +0100
@@ -45,6 +45,12 @@
Patch4: lightdm-lock-screen-before-switch.patch
# PATCH-FIX-OPENSUSE lightdm-disable-utmp-handling.patch gber(a)opensuse.org -- Disable utmp handling since this is handled in the Xstartup/Xreset scripts
Patch5: lightdm-disable-utmp-handling.patch
+# PATCH-FIX-UPSTREAM lightdm-make-sessions-inherit-system-default-locale.patch lp#1073135 bnc#786926 gber(a)opensuse.org -- Make greeter and user sessions inherit the system default locale
+Patch6: lightdm-make-sessions-inherit-system-default-locale.patch
+# PATCH-FIX-OPENSUSE lightdm-fix-language-setting.patch lp#1068853 lp#1019314 gber(a)opensuse.org -- Fix saving/retrieving of the language setting
+Patch7: lightdm-fix-language-setting.patch
+# PATCH-FIX-OPENSUSE lightdm-do-not-strip-codeset-from-language.patch lp#1074946 gber(a)opensuse.org -- Do not strip the codeset and be consistent with how the Language setting is retrived from AccountsService
+Patch8: lightdm-do-not-strip-codeset-from-language.patch
BuildRequires: gcc-c++
BuildRequires: gnome-common
BuildRequires: gtk-doc
@@ -79,12 +85,7 @@
Requires: xdm
%endif
Requires: ConsoleKit-x11
-%if 0%{?suse_version} <= 1220
Requires: gdmflexiserver
-%else
-# temporarily conflict to avoid issues with gdm < 3.6
-Conflicts: gdmflexiserver
-%endif
Recommends: upower
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -140,6 +141,9 @@
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
%build
./autogen.sh
@@ -163,11 +167,6 @@
# these are useless stubs for now
rm -rf %{buildroot}%{_datadir}/help/
-%if 0%{?suse_version} > 1220
-ln -s %{_libexecdir}/%{name}/gdmflexiserver \
- %{buildroot}%{_bindir}/gdmflexiserver
-%endif
-
ln -sf %{_sysconfdir}/pam.d/xdm %{buildroot}%{_sysconfdir}/pam.d/lightdm
ln -sf %{_sysconfdir}/pam.d/xdm-np %{buildroot}%{_sysconfdir}/pam.d/lightdm-autologin
install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/lightdm-greeter
@@ -176,6 +175,7 @@
install -d %{buildroot}%{_localstatedir}/log/lightdm
install -d %{buildroot}%{_localstatedir}/run/lightdm
install -d %{buildroot}%{_localstatedir}/lib/lightdm
+install -d %{buildroot}%{_localstatedir}/cache/lightdm
install -d %{buildroot}%{_datadir}/xgreeters
%find_lang %{name} %{?no_lang_C}
@@ -201,9 +201,6 @@
%defattr(-,root,root,-)
%doc COPYING ChangeLog NEWS README
%{_bindir}/dm-tool
-%if 0%{?suse_version} > 1220
-%{_bindir}/gdmflexiserver
-%endif
%{_sbindir}/lightdm
%dir %{_libexecdir}/lightdm/
%{_libexecdir}/%{name}/lightdm-set-defaults
@@ -223,6 +220,7 @@
%ghost %attr(751,lightdm,lightdm) %dir %{_localstatedir}/run/lightdm
%attr(750,lightdm,lightdm) %dir %{_localstatedir}/log/lightdm
%attr(750,lightdm,lightdm) %dir %{_localstatedir}/lib/lightdm
+%ghost %attr(711,root,root) %dir %{_localstatedir}/cache/lightdm
%doc %{_mandir}/man1/lightdm.1*
%files lang -f %{name}.lang
++++++ lightdm-do-not-strip-codeset-from-language.patch ++++++
# HG changeset patch
# Parent 9b36e1706032e4fb3e29b72d0e69bc3ba9c4e973
Do not strip the codeset when loading the Language filed from dmrc
Do not strip the codeset and be consistent with how the Language setting is
retrived from AccountsService.
diff --git a/liblightdm-gobject/user.c b/liblightdm-gobject/user.c
--- a/liblightdm-gobject/user.c
+++ b/liblightdm-gobject/user.c
@@ -1133,16 +1133,10 @@ load_dmrc (LightDMUser *user)
// FIXME: Watch for changes
- /* The Language field is actually a locale, strip the codeset off it to get the language */
+ /* The Language field contains the locale */
if (priv->language)
g_free (priv->language);
priv->language = g_key_file_get_string (priv->dmrc_file, "Desktop", "Language", NULL);
- if (priv->language)
- {
- gchar *codeset = strchr (priv->language, '.');
- if (codeset)
- *codeset = '\0';
- }
if (priv->layouts)
{
++++++ lightdm-fix-language-setting.patch ++++++
# HG changeset patch
# Parent 7753b3891c3640151c7ef4af7e35c6c2efb2e8fd
Fix saving/retrieving of the language setting
Add user_get_language() for retrieving the language setting.
Remove unused user_get_locale().
Always save the language to both accountsservice and dmrc.
Actually retrieve the language setting and export the locale via LANG and
GDM_LANG environment variables.
diff --git a/src/accounts.c b/src/accounts.c
--- a/src/accounts.c
+++ b/src/accounts.c
@@ -44,9 +44,6 @@ struct UserPrivate
/* Language */
gchar *language;
- /* Locale */
- gchar *locale;
-
/* X session */
gchar *xsession;
};
@@ -332,36 +329,59 @@ user_get_shell (User *user)
return user->priv->shell;
}
-const gchar *
-user_get_locale (User *user)
-{
- g_return_val_if_fail (user != NULL, NULL);
-
- g_free (user->priv->locale);
- if (user->priv->proxy)
- user->priv->locale = NULL;
- else
- user->priv->locale = get_string_from_dmrc (user->priv->name, "Desktop", "Language");
-
- /* Treat a blank locale as unset */
- if (g_strcmp0 (user->priv->locale, "") == 0)
- {
- g_free (user->priv->locale);
- user->priv->locale = NULL;
- }
-
- return user->priv->locale;
-}
-
void
user_set_language (User *user, const gchar *language)
{
g_return_if_fail (user != NULL);
+ call_method (user->priv->proxy, "SetLanguage", g_variant_new ("(s)", language), "()", NULL);
+ save_string_to_dmrc (user->priv->name, "Desktop", "Language", language);
+}
+
+const gchar *
+user_get_language (User *user)
+{
+ GVariant *variant, *inner;
+ gboolean success;
+
+ g_return_val_if_fail (user != NULL, NULL);
+
+ g_free (user->priv->language);
if (user->priv->proxy)
- call_method (user->priv->proxy, "SetLanguage", g_variant_new ("(s)", language), "()", NULL);
+ {
+ /* get_property () uses g_dbus_proxy_get_cached_property () which would
+ * return the previous (cached) value of the "Language" property */
+#if 0
+ if (get_property (user->priv->proxy, "Language", "s", &variant))
+ {
+ g_variant_get (variant, "s", &user->priv->language);
+ g_variant_unref (variant);
+ }
+ else
+ user->priv->language = NULL;
+#endif
+ success = call_method (user->priv->proxy, "org.freedesktop.DBus.Properties.Get", g_variant_new ("(ss)", g_dbus_proxy_get_interface_name(user->priv->proxy), "Language"), "(v)", &variant);
+ if (success)
+ {
+ g_variant_get (variant, "(v)", &inner);
+ user->priv->language = g_variant_dup_string (inner, NULL);
+ g_variant_unref (inner);
+ g_variant_unref (variant);
+ }
+ else
+ user->priv->language = NULL;
+ }
else
- save_string_to_dmrc (user->priv->name, "Desktop", "Language", language);
+ user->priv->language = get_string_from_dmrc (user->priv->name, "Desktop", "Language");
+
+ /* Treat a blank language as unset */
+ if (g_strcmp0 (user->priv->language, "") == 0)
+ {
+ g_free (user->priv->language);
+ user->priv->language = NULL;
+ }
+
+ return user->priv->language;
}
void
@@ -436,6 +456,7 @@ user_finalize (GObject *object)
g_free (self->priv->gecos);
g_free (self->priv->home_directory);
g_free (self->priv->shell);
+ g_free (self->priv->language);
G_OBJECT_CLASS (user_parent_class)->finalize (object);
}
diff --git a/src/accounts.h b/src/accounts.h
--- a/src/accounts.h
+++ b/src/accounts.h
@@ -58,7 +58,7 @@ const gchar *user_get_xsession (User *us
void user_set_xsession (User *user, const gchar *session);
-const gchar *user_get_locale (User *user);
+const gchar *user_get_language (User *user);
void user_set_language (User *user, const gchar *language);
diff --git a/src/display.c b/src/display.c
--- a/src/display.c
+++ b/src/display.c
@@ -704,6 +704,7 @@ display_start_session (Display *display)
{
User *user;
gchar *filename, *sessions_dir, *path;
+ const gchar *language;
gchar **argv;
user = session_get_user (display->priv->session);
@@ -727,6 +728,14 @@ display_start_session (Display *display)
if (!argv)
return TRUE;
+ /* Retrieve language setting */
+ language = user_get_language (user);
+ if (g_strcmp0 (language, "") != 0)
+ {
+ session_set_env (display->priv->session, "LANG", language);
+ session_set_env (display->priv->session, "GDM_LANG", language);
+ }
+
session_set_env (display->priv->session, "DESKTOP_SESSION", display->priv->user_session); // FIXME: Apparently deprecated?
session_set_env (display->priv->session, "GDMSESSION", display->priv->user_session); // FIXME: Not cross-desktop
++++++ lightdm-make-sessions-inherit-system-default-locale.patch ++++++
# HG changeset patch
# Parent 5c75825170f86b5485f5d543e87bfb7acf7418f1
Make greeter and user sessions inherit the system default locale
diff --git a/src/session-child.c b/src/session-child.c
--- a/src/session-child.c
+++ b/src/session-child.c
@@ -185,6 +185,19 @@ session_child_run (int argc, char **argv
gchar *console_kit_cookie;
const gchar *path;
GError *error = NULL;
+ const gchar *locale_value;
+ gchar *locale_var;
+ static const gchar * const locale_var_names[] = {
+ "LC_COLLATE",
+ "LC_CTYPE",
+ "LC_MONETARY",
+ "LC_NUMERIC",
+ "LC_TIME",
+ "LC_MESSAGES",
+ "LC_ALL",
+ "LANG",
+ NULL
+ };
g_type_init ();
@@ -319,6 +332,17 @@ session_child_run (int argc, char **argv
pam_putenv (pam_handle, g_strdup_printf ("LOGNAME=%s", username));
pam_putenv (pam_handle, g_strdup_printf ("HOME=%s", user_get_home_directory (user)));
pam_putenv (pam_handle, g_strdup_printf ("SHELL=%s", user_get_shell (user)));
+
+ /* Let the greeter and user session inherit the system default locale */
+ for (i = 0; locale_var_names[i] != NULL; i++)
+ {
+ if ((locale_value = g_getenv (locale_var_names[i])) != NULL)
+ {
+ locale_var = g_strdup_printf ("%s=%s", locale_var_names[i], locale_value);
+ pam_putenv (pam_handle, locale_var);
+ g_free (locale_var);
+ }
+ }
}
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org