From: Chocimier <Chocimier@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [RFC] util-linux: exclude bin from default PATH
Date: Tue, 27 Jun 2023 00:09:45 +0200 [thread overview]
Message-ID: <20230626220945.RBQotDMsTjXmGX-vnb6OUdhiUTq1evJ7kB7ZqgoiLWI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-14267@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 469 bytes --]
There is an updated pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org util-linux
https://github.com/void-linux/void-packages/pull/14267
[RFC] util-linux: exclude bin from default PATH
/bin is still added to PATH by /etc/profile, but after /usr/bin.
This makes `which` return real file instead of symlink.
A patch file from https://github.com/void-linux/void-packages/pull/14267.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-util-linux-14267.patch --]
[-- Type: text/x-diff, Size: 9062 bytes --]
From ba7caeb0cb80f1fb385dfddd69473d69276cb191 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Tue, 8 Oct 2019 19:42:38 +0200
Subject: [PATCH 1/4] lxdm: sync default PATH
---
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 <chocimier@tlen.pl>
+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 <orphan@voidlinux.org>"
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 537077a493829ca129e624dc95b53548118df3a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Tue, 30 Mar 2021 22:03:49 +0200
Subject: [PATCH 2/4] openssh: sync default PATH
---
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 6a58227eff85ca604a1ded86d599d362d3ed1652 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Fri, 6 Sep 2019 20:55:47 +0200
Subject: [PATCH 3/4] util-linux: sync default PATH
---
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 <chocimier@tlen.pl>
+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 <paths.h> 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 09ad7c3e027800bd6c2a946d4872aac33090e584 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Tue, 27 Jun 2023 00:11:02 +0200
Subject: [PATCH 4/4] sddm: sync default PATH
---
.../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 <chocimier@tlen.pl>
+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
next prev parent reply other threads:[~2023-06-26 22:09 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-06 18:19 [PR PATCH] " voidlinux-github
2019-09-06 18:56 ` [PR PATCH] [Updated] " voidlinux-github
2019-09-06 18:56 ` voidlinux-github
2019-09-09 11:54 ` voidlinux-github
2019-09-09 12:02 ` voidlinux-github
2019-09-09 17:04 ` voidlinux-github
2021-01-29 2:50 ` ericonr
2021-01-29 2:50 ` ericonr
2021-01-29 8:23 ` Chocimier
2021-01-29 18:52 ` Chocimier
2021-02-16 5:38 ` ericonr
2021-02-16 5:54 ` am11
2021-02-17 11:47 ` Piraty
2021-03-05 4:47 ` ericonr
2021-03-30 21:03 ` [PR PATCH] [Updated] " Chocimier
2021-03-30 21:14 ` Chocimier
2022-04-15 2:12 ` github-actions
2022-04-22 0:26 ` Piraty
2022-05-04 19:32 ` [PR PATCH] [Updated] " Chocimier
2022-05-04 19:33 ` Chocimier
2022-05-05 19:23 ` [PR PATCH] [Updated] " Chocimier
2022-08-24 19:15 ` 0x5c
2023-06-26 22:09 ` Chocimier [this message]
2023-06-26 22:12 ` Chocimier
2023-06-27 11:21 ` leahneukirchen
2023-06-27 11:23 ` [PR REVIEW] " leahneukirchen
2023-06-27 11:23 ` leahneukirchen
2023-06-27 11:23 ` leahneukirchen
2023-06-27 11:23 ` leahneukirchen
2023-07-01 19:44 ` [PR PATCH] [Updated] " Chocimier
2023-07-01 20:27 ` *dm, util-linux, openssh: adjust PATH for usrmerge Chocimier
2023-07-01 20:37 ` [PR PATCH] [Updated] " Chocimier
2023-07-01 21:26 ` leahneukirchen
2023-07-03 16:21 ` [PR PATCH] [Updated] " Chocimier
2023-07-03 16:48 ` [PR PATCH] [Merged]: " Chocimier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230626220945.RBQotDMsTjXmGX-vnb6OUdhiUTq1evJ7kB7ZqgoiLWI@z \
--to=chocimier@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).