Restore patches 15-path-replace.patch and 22_ubuntu_i18n_oneiric.patch.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 2 Oct 2014 17:22:00 +0000 (20:22 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Thu, 2 Oct 2014 17:22:00 +0000 (20:22 +0300)
Relevant places in upstream are intact so deletion isn't right.

debian/patches/15-path-replace.patch [new file with mode: 0644]
debian/patches/22_ubuntu_i18n_oneiric.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/15-path-replace.patch b/debian/patches/15-path-replace.patch
new file mode 100644 (file)
index 0000000..3ba5cc6
--- /dev/null
@@ -0,0 +1,12 @@
+#launchpad bug : #524761
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -1319,7 +1319,7 @@
+       path = g_key_file_get_string(config, "base", "path", 0);
+       if( G_UNLIKELY(path) && path[0] ) /* if PATH is specified in config file */
+               env=g_environ_setenv(env, "PATH", path, TRUE); /* override current $PATH with config value */
+-      else /* don't use the global env, they are bad for user */
++      else if(!getenv("PATH")) /* if PATH is not set */
+               env=g_environ_setenv(env, "PATH", "/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin", TRUE); /* set proper default */
+       g_free(path);
+       /* optionally override $LANG, $LC_MESSAGES, and $LANGUAGE */
diff --git a/debian/patches/22_ubuntu_i18n_oneiric.patch b/debian/patches/22_ubuntu_i18n_oneiric.patch
new file mode 100644 (file)
index 0000000..e37c8b9
--- /dev/null
@@ -0,0 +1,54 @@
+Description: Adapt to the Oneiric model for setting languages/locales.
+Forwarded: not-needed
+Author: Gunnar Hjalmarsson <ubuntu@gunnar.cc>
+
+--- a/data/Xsession
++++ b/data/Xsession
+@@ -9,9 +9,20 @@
+       LXSESSION=/usr/bin/startlxde
+ fi
++[ -f /etc/profile ] && . /etc/profile
++[ -f ~/.profile ] && . ~/.profile
+ [ -f /etc/xprofile ] && . /etc/xprofile
+ [ -f ~/.xprofile ] && . ~/.xprofile
++# override ~/.profile if language was set on the greeter
++if [ -n "$GREETER_LANGUAGE" ]; then
++      language_list=${GREETER_LANGUAGE%.*}${GREETER_LANGUAGE#*.UTF-8}:en
++      export LANGUAGE="$language_list"
++      export LC_MESSAGES="$GREETER_LANGUAGE"
++      export LC_CTYPE="$GREETER_LANGUAGE"
++      export LC_COLLATE="$GREETER_LANGUAGE"
++fi
++
+ if [ -f /etc/X11/xinit/xinitrc-common ]; then
+ # fedora
+       . /etc/X11/xinit/xinitrc-common
+--- a/src/lxdm.c
++++ b/src/lxdm.c
+@@ -1214,11 +1214,6 @@
+                       session=g_key_file_get_string(dmrc,"Desktop","Session",NULL);
+                       alloc_session=TRUE;
+               }
+-              if(!lang || !lang[0])
+-              {
+-                      lang=g_key_file_get_string(dmrc,"Desktop","Language",NULL);
+-                      alloc_lang=TRUE;
+-              }
+               g_key_file_free(dmrc);
+       }
+@@ -1325,9 +1320,9 @@
+       /* optionally override $LANG, $LC_MESSAGES, and $LANGUAGE */
+       if( lang && lang[0] )
+       {
+-              env=g_environ_setenv(env, "LANG", lang, TRUE);
+-              env=g_environ_setenv(env, "LC_MESSAGES", lang, TRUE);
+-              env=g_environ_setenv(env, "LANGUAGE", lang, TRUE);
++              /* use this special environment variable to set the language related
++                 env. variables from Xsession after ~/.profile has been sourced */
++              env=g_environ_setenv(env, "GREETER_LANGUAGE", lang, TRUE);
+       }
+       
+ #ifndef DISABLE_XAUTH
index b03d0df..5b6927c 100644 (file)
@@ -1,2 +1,4 @@
+15-path-replace.patch
+22_ubuntu_i18n_oneiric.patch
 23_debian-config.patch
 26_systemd_lxdm_tty.patch