[arch-commits] Commit in lxdm/trunk (PKGBUILD set-path.patch)

Balló György bgyorgy at archlinux.org
Mon Apr 9 22:43:37 UTC 2018


    Date: Monday, April 9, 2018 @ 22:43:36
  Author: bgyorgy
Revision: 315499

upgpkg: lxdm 0.5.3-6

Don't overwrite PATH if already defined (FS#57804)

Added:
  lxdm/trunk/set-path.patch
Modified:
  lxdm/trunk/PKGBUILD

----------------+
 PKGBUILD       |    8 +++++++-
 set-path.patch |   12 ++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-04-09 22:15:03 UTC (rev 315498)
+++ PKGBUILD	2018-04-09 22:43:36 UTC (rev 315499)
@@ -7,7 +7,7 @@
 pkgbase=lxdm
 pkgname=(lxdm lxdm-gtk3)
 pkgver=0.5.3
-pkgrel=5
+pkgrel=6
 pkgdesc='Lightweight X11 Display Manager'
 arch=('x86_64')
 url="https://lxde.org/"
@@ -19,11 +19,13 @@
         'etc/lxdm/PreLogin' 'etc/lxdm/LoginReady' 'etc/lxdm/PostLogin'
         'etc/lxdm/PostLogout' 'etc/lxdm/PreReboot' 'etc/lxdm/PreShutdown')
 source=(https://downloads.sourceforge.net/lxde/$pkgbase-$pkgver.tar.xz
+        set-path.patch
         git-fixes.patch
         default-config.patch
         lxdm.pam
         Xsession)
 sha256sums=('4891efee81c72a400cc6703e40aa76f3f3853833d048b72ec805da0f93567f2f'
+            '328f766c4d2ee899fc37a26f6e8666d40ebeaa3bd4c7d5a474ebb5415351a440'
             'ca3b225fb85a4e87ebb48e2b1a20f4bab86bf619a9ad927f08fdc819bc435bb4'
             'ea5fbe021b98ec58de8f2ba9a3575f748024bad2a9b911179a44bf94577f869b'
             'e8c4c5fd3b801a390d201166fd1fb9730e78a5c62928768103b870b6bd980ea0'
@@ -32,6 +34,10 @@
 prepare(){
   cd $pkgbase-$pkgver
 
+  # Don't overwrite PATH if already defined
+  # https://sourceforge.net/p/lxde/bugs/907/
+  patch -Np0 -i ../set-path.patch
+
   # Apply fixes from git
   patch -Np1 -i ../git-fixes.patch
 

Added: set-path.patch
===================================================================
--- set-path.patch	                        (rev 0)
+++ set-path.patch	2018-04-09 22:43:36 UTC (rev 315499)
@@ -0,0 +1,12 @@
+--- src/lxdm.c
++++ src/lxdm.c
+@@ -897,7 +897,7 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang)
+ 	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 */
+



More information about the arch-commits mailing list