From 57e19bc42d7da5b8a0f42fc3b15806a4e24e167e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Fri, 6 Sep 2019 20:55:47 +0200 Subject: [PATCH 1/9] util-linux: adjust PATH for usrmerge --- srcpkgs/util-linux-common/template | 2 +- srcpkgs/util-linux/patches/default-PATH.patch | 37 +++++++++++++++++++ srcpkgs/util-linux/template | 2 +- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/util-linux/patches/default-PATH.patch diff --git a/srcpkgs/util-linux-common/template b/srcpkgs/util-linux-common/template index 90b768803f05..d17a31a482f5 100644 --- a/srcpkgs/util-linux-common/template +++ b/srcpkgs/util-linux-common/template @@ -2,7 +2,7 @@ # Keep this package sync with util-linux pkgname=util-linux-common version=2.38.1 -revision=3 +revision=4 build_style=gnu-configure configure_args="--exec-prefix=\${prefix} --enable-libuuid --disable-makeinstall-chown --enable-libblkid --enable-fsck --disable-rpath --enable-fs-paths-extra=/usr/sbin:/usr/bin diff --git a/srcpkgs/util-linux/patches/default-PATH.patch b/srcpkgs/util-linux/patches/default-PATH.patch new file mode 100644 index 000000000000..d811470b16a1 --- /dev/null +++ b/srcpkgs/util-linux/patches/default-PATH.patch @@ -0,0 +1,37 @@ +From 52f81526dbbea59e5c8f6aee64db1a9c29509d58 Mon Sep 17 00:00:00 2001 +From: Piotr Wójcik +Date: Tue, 30 Mar 2021 22:58:45 +0200 +Subject: [PATCH] default-PATH + + +diff --git a/include/pathnames.h b/include/pathnames.h +index 3845d4c..984b4d8 100644 +--- a/include/pathnames.h ++++ b/include/pathnames.h +@@ -19,20 +19,12 @@ + /* DEFPATHs from don't include /usr/local */ + #undef _PATH_DEFPATH + +-#ifdef USE_USRDIR_PATHS_ONLY +-# define _PATH_DEFPATH "/usr/local/bin:/usr/bin" +-#else +-# define _PATH_DEFPATH "/usr/local/bin:/bin:/usr/bin" +-#endif ++# define _PATH_DEFPATH "/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin" + + #undef _PATH_DEFPATH_ROOT + +-#ifdef USE_USRDIR_PATHS_ONLY +-# define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin" +-#else +-# define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" +-#endif +- ++# define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin" ++ + #define _PATH_HUSHLOGIN ".hushlogin" + #define _PATH_HUSHLOGINS "/etc/hushlogins" + +-- +2.31.0 + diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template index 29477fc6ea89..99819d02068b 100644 --- a/srcpkgs/util-linux/template +++ b/srcpkgs/util-linux/template @@ -2,7 +2,7 @@ # Keep this package sync with util-linux-common pkgname=util-linux version=2.38.1 -revision=3 +revision=4 build_style=gnu-configure configure_args="--exec-prefix=\${prefix} --enable-libuuid --disable-makeinstall-chown --enable-libblkid --enable-fsck --disable-rpath --enable-fs-paths-extra=/usr/sbin:/usr/bin From 90a10e6097863aa646aa4211f9de6966400c443d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 30 Mar 2021 22:03:49 +0200 Subject: [PATCH 2/9] openssh: adjust PATH for usrmerge --- srcpkgs/openssh/template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcpkgs/openssh/template b/srcpkgs/openssh/template index c74b56e08ac3..5beea5260428 100644 --- a/srcpkgs/openssh/template +++ b/srcpkgs/openssh/template @@ -1,13 +1,14 @@ # Template file for 'openssh' pkgname=openssh version=9.3p1 -revision=2 +revision=3 build_style=gnu-configure configure_args="--datadir=/usr/share/openssh --sysconfdir=/etc/ssh --without-selinux --with-privsep-user=nobody --with-mantype=doc --without-rpath --with-xauth=/usr/bin/xauth --disable-strip --with-privsep-path=/var/chroot/ssh - --with-default-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + --with-default-path=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin + --with-superuser-path=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin --with-pid-dir=/run --with-pam --with-libedit --with-Werror $(vopt_if ldns --with-ldns=$XBPS_CROSS_BASE/usr) From 1804f1efd358626966bc961cdb8a2596a8391f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 8 Oct 2019 19:42:38 +0200 Subject: [PATCH 3/9] lxdm: adjust PATH for usrmerge --- srcpkgs/lxdm/patches/default-PATH.patch | 22 ++++++++++++++++++++++ srcpkgs/lxdm/template | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/lxdm/patches/default-PATH.patch diff --git a/srcpkgs/lxdm/patches/default-PATH.patch b/srcpkgs/lxdm/patches/default-PATH.patch new file mode 100644 index 000000000000..160fcbb73453 --- /dev/null +++ b/srcpkgs/lxdm/patches/default-PATH.patch @@ -0,0 +1,22 @@ +From e46c33735f81ca5607247fd0690ebbe9f1565708 Mon Sep 17 00:00:00 2001 +From: Piotr Wójcik +Date: Tue, 8 Oct 2019 19:32:15 +0200 +Subject: [PATCH] tweak default PATH + + +diff --git a/src/lxdm.c b/src/lxdm.c +index a37f051..8a0e6c6 100644 +--- a/src/lxdm.c ++++ b/src/lxdm.c +@@ -1399,7 +1399,7 @@ void lxdm_do_login(struct passwd *pw, char *session, char *lang, char *option) + 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 */ +- env=g_environ_setenv(env, "PATH", "/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin", TRUE); /* set proper default */ ++ env=g_environ_setenv(env, "PATH", "/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin", TRUE); /* set proper default */ + g_free(path); + /* optionally override $LANG, $LC_MESSAGES, and $LANGUAGE */ + if( lang && lang[0] ) +-- +2.23.0 + diff --git a/srcpkgs/lxdm/template b/srcpkgs/lxdm/template index 55ae9b5356eb..d9e532be58ac 100644 --- a/srcpkgs/lxdm/template +++ b/srcpkgs/lxdm/template @@ -1,7 +1,7 @@ # Template file for 'lxdm' pkgname=lxdm version=0.5.3 -revision=4 +revision=5 build_style=gnu-configure configure_args="--disable-consolekit --with-pam --enable-gtk3" hostmakedepends="automake gettext-devel libtool pkg-config intltool" @@ -16,13 +16,13 @@ conf_files=" /etc/lxdm/Xsession /etc/lxdm/lxdm.conf /etc/pam.d/lxdm" -system_groups="lxdm" short_desc="GUI login manager for LXDE" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://lxde.org" distfiles="${SOURCEFORGE_SITE}/lxdm/lxdm-${version}.tar.xz" checksum=4891efee81c72a400cc6703e40aa76f3f3853833d048b72ec805da0f93567f2f +system_groups="lxdm" pre_configure() { autoreconf -fi From f06e8a8abefa43f2c8c79214cb32c67a36cb62dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 27 Jun 2023 00:11:02 +0200 Subject: [PATCH 4/9] sddm: adjust PATH for usrmerge --- .../sddm/patches/0.19.0--default-path.patch | 22 +++++++++++++++++++ srcpkgs/sddm/template | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/sddm/patches/0.19.0--default-path.patch diff --git a/srcpkgs/sddm/patches/0.19.0--default-path.patch b/srcpkgs/sddm/patches/0.19.0--default-path.patch new file mode 100644 index 000000000000..bc3f8bd348cd --- /dev/null +++ b/srcpkgs/sddm/patches/0.19.0--default-path.patch @@ -0,0 +1,22 @@ +From 57d716be7cb0588538d89bb72113bec82adf9e52 Mon Sep 17 00:00:00 2001 +From: Piotr Wójcik +Date: Mon, 26 Jun 2023 23:15:05 +0200 +Subject: default-path + + +diff --git a/src/common/Configuration.h b/src/common/Configuration.h +index cf44a62..4c01c4a 100644 +--- a/src/common/Configuration.h ++++ b/src/common/Configuration.h +@@ -82,7 +82,7 @@ namespace SDDM { + ); + + Section(Users, +- Entry(DefaultPath, QString, _S("/usr/local/bin:/usr/bin:/bin"), _S("Default $PATH for logged in users")); ++ Entry(DefaultPath, QString, _S("/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin"), _S("Default $PATH for logged in users")); + Entry(MinimumUid, int, UID_MIN, _S("Minimum user id for displayed users")); + Entry(MaximumUid, int, UID_MAX, _S("Maximum user id for displayed users")); + Entry(HideUsers, QStringList, QStringList(), _S("Comma-separated list of users that should not be listed")); +-- +2.41.0 + diff --git a/srcpkgs/sddm/template b/srcpkgs/sddm/template index 2a87381c8e8a..63fa93f160cf 100644 --- a/srcpkgs/sddm/template +++ b/srcpkgs/sddm/template @@ -1,7 +1,7 @@ # Template file for 'sddm' pkgname=sddm version=0.19.0 -revision=3 +revision=4 build_style=cmake configure_args="-DBUILD_MAN_PAGES=ON -DNO_SYSTEMD=ON -DUSE_ELOGIND=ON -DLOGIN_DEFS_PATH=${XBPS_SRCPKGDIR}/shadow/files/login.defs From 35ce4182fa349d76a0f71b198512c4723235971b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 1 Jul 2023 14:40:51 +0200 Subject: [PATCH 5/9] gdm: adjust PATH for usrmerge --- srcpkgs/gdm/template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srcpkgs/gdm/template b/srcpkgs/gdm/template index 5cdcf618cb83..f8990839198a 100644 --- a/srcpkgs/gdm/template +++ b/srcpkgs/gdm/template @@ -1,7 +1,7 @@ # Template file for 'gdm' pkgname=gdm version=44.1 -revision=1 +revision=2 build_helper="gir" build_style=meson configure_args=" @@ -10,6 +10,7 @@ configure_args=" -Dplymouth=enabled -Dxauth-dir=/run/gdm -Dpid-file=/run/gdm/gdm.pid -Dsystemd-journal=false -Dinitial-vt=7 -Dwayland-support=true -Dselinux=disabled -Dlibaudit=disabled -Dgdm-xsession=true + -Ddefault-path=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin -Dsystemdsystemunitdir=/usr/lib/systemd/system -Dsystemduserunitdir=/usr/lib/systemd/user" hostmakedepends="dconf gettext itstool pkg-config" From 7e68db0a4e93efbcbbfbc51166e13be631358008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 1 Jul 2023 17:28:41 +0200 Subject: [PATCH 6/9] slim: adjust PATH for usrmerge --- .../1.3.6--adjust-PATH-for-usrmerge.patch | 34 +++++++++++++++++++ srcpkgs/slim/template | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/slim/patches/1.3.6--adjust-PATH-for-usrmerge.patch diff --git a/srcpkgs/slim/patches/1.3.6--adjust-PATH-for-usrmerge.patch b/srcpkgs/slim/patches/1.3.6--adjust-PATH-for-usrmerge.patch new file mode 100644 index 000000000000..76bf4fa6c6e9 --- /dev/null +++ b/srcpkgs/slim/patches/1.3.6--adjust-PATH-for-usrmerge.patch @@ -0,0 +1,34 @@ +From 0a96bb015d9dc30ff98cfc21256851cb2005cea1 Mon Sep 17 00:00:00 2001 +From: Piotr Wójcik +Date: Sat, 1 Jul 2023 17:28:17 +0200 +Subject: adjust-PATH-for-usrmerge + + +diff --git a/cfg.cpp b/cfg.cpp +index 02379f2..56a584b 100644 +--- a/cfg.cpp ++++ b/cfg.cpp +@@ -29,7 +29,7 @@ Cfg::Cfg() + : currentSession(-1) + { + /* Configuration options */ +- options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin")); ++ options.insert(option("default_path","/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin")); + options.insert(option("default_xserver","/usr/bin/X")); + options.insert(option("xserver_arguments","")); + options.insert(option("numlock","")); +diff --git a/slim.conf b/slim.conf +index a8e2e1c..1c14ade 100644 +--- a/slim.conf ++++ b/slim.conf +@@ -1,6 +1,6 @@ + # Path, X server and arguments (if needed) + # Note: -xauth $authfile is automatically appended +-default_path /bin:/usr/bin:/usr/local/bin ++default_path /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin + default_xserver /usr/bin/X + #xserver_arguments -dpi 75 + +-- +2.41.0 + diff --git a/srcpkgs/slim/template b/srcpkgs/slim/template index b7382cac3085..1ca2ff320bfc 100644 --- a/srcpkgs/slim/template +++ b/srcpkgs/slim/template @@ -1,7 +1,7 @@ # Template file for 'slim' pkgname=slim version=1.3.6 -revision=13 +revision=14 build_style=cmake configure_args="-DUSE_CONSOLEKIT=no -DUSE_PAM=yes" conf_files="/etc/slim.conf /etc/pam.d/slim" From 9029fb1f8b513e46c7d112557079ff79d7b5ec6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 1 Jul 2023 17:31:24 +0200 Subject: [PATCH 7/9] lightdm: adjust PATH for usrmerge --- .../1.32.0--adjust-PATH-for-usrmerge.patch | 22 +++++++++++++++++++ srcpkgs/lightdm/template | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/lightdm/patches/1.32.0--adjust-PATH-for-usrmerge.patch diff --git a/srcpkgs/lightdm/patches/1.32.0--adjust-PATH-for-usrmerge.patch b/srcpkgs/lightdm/patches/1.32.0--adjust-PATH-for-usrmerge.patch new file mode 100644 index 000000000000..0e079369ec04 --- /dev/null +++ b/srcpkgs/lightdm/patches/1.32.0--adjust-PATH-for-usrmerge.patch @@ -0,0 +1,22 @@ +From 389d9e09217ee598674ff7d6df69563be51cbfe6 Mon Sep 17 00:00:00 2001 +From: Piotr Wójcik +Date: Sat, 1 Jul 2023 17:30:54 +0200 +Subject: adjust-PATH-for-usrmerge + + +diff --git a/src/session-child.c b/src/session-child.c +index 112daab..af28c48 100644 +--- a/src/session-child.c ++++ b/src/session-child.c +@@ -394,7 +394,7 @@ session_child_run (int argc, char **argv) + else + { + /* Set POSIX variables */ +- pam_putenv (pam_handle, "PATH=/usr/local/bin:/usr/bin:/bin"); ++ pam_putenv (pam_handle, "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin"); + pam_putenv (pam_handle, g_strdup_printf ("USER=%s", username)); + pam_putenv (pam_handle, g_strdup_printf ("LOGNAME=%s", username)); + pam_putenv (pam_handle, g_strdup_printf ("HOME=%s", user_get_home_directory (user))); +-- +2.41.0 + diff --git a/srcpkgs/lightdm/template b/srcpkgs/lightdm/template index f527616261ba..5a0db355bf73 100644 --- a/srcpkgs/lightdm/template +++ b/srcpkgs/lightdm/template @@ -1,7 +1,7 @@ # Template file for 'lightdm' pkgname=lightdm version=1.32.0 -revision=2 +revision=3 build_style=gnu-configure build_helper="gir" configure_args="--sbindir=/usr/bin --with-greeter-session=lightdm-gtk-greeter From ce9799cff3041becf91df7298c344e6c68dc4159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 1 Jul 2023 17:53:46 +0200 Subject: [PATCH 8/9] xdm: adjust PATH for usrmerge --- srcpkgs/xdm/template | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/srcpkgs/xdm/template b/srcpkgs/xdm/template index 2fdc56ad7f23..282b8fe7a540 100644 --- a/srcpkgs/xdm/template +++ b/srcpkgs/xdm/template @@ -1,7 +1,7 @@ # Template file for 'xdm' pkgname=xdm version=1.1.14 -revision=1 +revision=2 build_style=gnu-configure configure_args="--with-random-device=/dev/urandom --with-utmp-file=/var/run/utmp @@ -24,6 +24,10 @@ homepage="http://xorg.freedesktop.org" distfiles="${XORG_SITE}/app/${pkgname}-${version}.tar.xz" checksum=3e9bf25636797ec9e595286dd6820ecc33901439f07705eaf608ecda012c3d5f +pre_configure() { + export DEF_USER_PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin +} + post_install() { vsv xdm vinstall ${FILESDIR}/xdm.pam 644 etc/pam.d xdm From 73a80876369262404a0c6ce05fe51fefff52eeb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Sat, 1 Jul 2023 22:39:03 +0200 Subject: [PATCH 9/9] linux-driver-management: move sddm setup to examples do not overwrite sddm file --- srcpkgs/linux-driver-management/template | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/srcpkgs/linux-driver-management/template b/srcpkgs/linux-driver-management/template index 0a8859cb73b4..33396a0b9be3 100644 --- a/srcpkgs/linux-driver-management/template +++ b/srcpkgs/linux-driver-management/template @@ -1,7 +1,7 @@ # Template file for 'linux-driver-management' pkgname=linux-driver-management version=1.0.3 -revision=2 +revision=3 # Tests require unpackaged umockdev # https://github.com/martinpitt/umockdev build_style=meson @@ -23,6 +23,11 @@ if [ "$CROSS_BUILD" ]; then hostmakedepends+=" glib-devel" fi +post_install() { + mkdir -p ${DESTDIR}/usr/share/examples/sddm/scripts + mv ${DESTDIR}/usr/share/sddm/scripts/Xsetup ${DESTDIR}/usr/share/examples/sddm/scripts/Xsetup +} + linux-driver-management-devel_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - Development files"