Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [RFC] util-linux: exclude bin from default PATH
@ 2019-09-06 18:19 voidlinux-github
  2019-09-06 18:56 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (33 more replies)
  0 siblings, 34 replies; 35+ messages in thread
From: voidlinux-github @ 2019-09-06 18:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 464 bytes --]

There is a new 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: 1102 bytes --]

From 7bfdddbc905227c733d1c9c92771bd3796e4301b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Fri, 6 Sep 2019 20:12:16 +0200
Subject: [PATCH] util-linux: exclude /bin from default PATH

/bin is still added to PATH by /etc/profile, but after /usr/bin
---
 srcpkgs/util-linux/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template
index 8a06c8f1e3c..ede6d5e5847 100644
--- a/srcpkgs/util-linux/template
+++ b/srcpkgs/util-linux/template
@@ -1,7 +1,7 @@
 # Template file for 'util-linux'
 pkgname=util-linux
 version=2.34
-revision=1
+revision=2
 hostmakedepends="automake bison gettext-devel libtool pkg-config"
 makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
 checkdepends="ncurses" # Some tests require terminfo-entries
@@ -41,7 +41,7 @@ do_configure() {
 		--enable-vipw --enable-newgrp --enable-chfn-chsh \
 		--with-systemdsystemunitdir=no \
 		--without-udev --without-python \
-		--enable-write
+		--enable-write --enable-usrdir-path
 }
 
 do_build() {

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH 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
                   ` (31 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: voidlinux-github @ 2019-09-06 18:56 UTC (permalink / raw)
  To: ml

[-- 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: 1192 bytes --]

From 7bf2249f76da32d917dedcda83a8343338eeea12 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] util-linux: exclude /bin from default PATH

/bin is still added to PATH by /etc/profile, but after /usr/bin
---
 srcpkgs/util-linux/template | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template
index 8a06c8f1e3c..56bfd590c43 100644
--- a/srcpkgs/util-linux/template
+++ b/srcpkgs/util-linux/template
@@ -1,7 +1,7 @@
 # Template file for 'util-linux'
 pkgname=util-linux
 version=2.34
-revision=1
+revision=2
 hostmakedepends="automake bison gettext-devel libtool pkg-config"
 makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
 checkdepends="ncurses" # Some tests require terminfo-entries
@@ -41,7 +41,7 @@ do_configure() {
 		--enable-vipw --enable-newgrp --enable-chfn-chsh \
 		--with-systemdsystemunitdir=no \
 		--without-udev --without-python \
-		--enable-write
+		--enable-write --enable-usrdir-path
 }
 
 do_build() {
@@ -152,4 +152,3 @@ libsmartcols_package() {
 		vmove usr/lib/libsmartcols.so.*
 	}
 }
-

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
@ 2019-09-06 18:56 ` voidlinux-github
  2019-09-06 18:56 ` voidlinux-github
                   ` (32 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: voidlinux-github @ 2019-09-06 18:56 UTC (permalink / raw)
  To: ml

[-- 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: 1192 bytes --]

From 7bf2249f76da32d917dedcda83a8343338eeea12 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] util-linux: exclude /bin from default PATH

/bin is still added to PATH by /etc/profile, but after /usr/bin
---
 srcpkgs/util-linux/template | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template
index 8a06c8f1e3c..56bfd590c43 100644
--- a/srcpkgs/util-linux/template
+++ b/srcpkgs/util-linux/template
@@ -1,7 +1,7 @@
 # Template file for 'util-linux'
 pkgname=util-linux
 version=2.34
-revision=1
+revision=2
 hostmakedepends="automake bison gettext-devel libtool pkg-config"
 makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
 checkdepends="ncurses" # Some tests require terminfo-entries
@@ -41,7 +41,7 @@ do_configure() {
 		--enable-vipw --enable-newgrp --enable-chfn-chsh \
 		--with-systemdsystemunitdir=no \
 		--without-udev --without-python \
-		--enable-write
+		--enable-write --enable-usrdir-path
 }
 
 do_build() {
@@ -152,4 +152,3 @@ libsmartcols_package() {
 		vmove usr/lib/libsmartcols.so.*
 	}
 }
-

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH 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
                   ` (30 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: voidlinux-github @ 2019-09-09 11:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

New comment by Piraty on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-529436476

Comment:
It's the other way around you mean? `which ls` gives `/bin/ls` (which is the symlink) but should be `/usr/bin/ls` (which is the real file).
I stumbled on this before, as `xbps-query -o $(which ls)` fails because of this.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (2 preceding siblings ...)
  2019-09-09 11:54 ` voidlinux-github
@ 2019-09-09 12:02 ` voidlinux-github
  2019-09-09 17:04 ` voidlinux-github
                   ` (29 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: voidlinux-github @ 2019-09-09 12:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

New comment by Piraty on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-529436476

Comment:
It's the other way around you mean? `which ls` gives `/bin/ls` (which is the symlink) but should be `/usr/bin/ls` (which is the real file).
I stumbled on this before, as `xbps-query -o $(which ls)` fails because of this.

changing the order of `/bin/` and `/usr/bin/` might work as well? https://github.com/void-linux/void-packages/blob/20c06e3b0a7763716dd55a848b7c47aaac5a48f5/srcpkgs/base-files/files/profile#L17-L20

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (3 preceding siblings ...)
  2019-09-09 12:02 ` voidlinux-github
@ 2019-09-09 17:04 ` voidlinux-github
  2021-01-29  2:50 ` ericonr
                   ` (28 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: voidlinux-github @ 2019-09-09 17:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-529574502

Comment:
> It's the other way around you mean? |which ls| gives |/bin/ls| (which is the symlink) but should be |/usr/bin/ls| (which is the real file).

Yes, the effect of that change is that /usr/bin/ls is returned.

On tty at least, because lxdm sets PATH independently. Would we need to patch each display manager?


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (4 preceding siblings ...)
  2019-09-09 17:04 ` voidlinux-github
@ 2021-01-29  2:50 ` ericonr
  2021-01-29  2:50 ` ericonr
                   ` (27 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: ericonr @ 2021-01-29  2:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 465 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-769538339

Comment:
From `./configure --help`:

```
 --enable-usrdir-path    use only /usr paths in PATH env. variable
                          (recommended on systems with /bin -> /usr/bin
                          symlinks)
```

I think we should add this change, but also fix `/etc/profile` to put `/usr/bin` in front of everything.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (5 preceding siblings ...)
  2021-01-29  2:50 ` ericonr
@ 2021-01-29  2:50 ` ericonr
  2021-01-29  8:23 ` Chocimier
                   ` (26 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: ericonr @ 2021-01-29  2:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-769538339

Comment:
From `./configure --help`:

```
 --enable-usrdir-path    use only /usr paths in PATH env. variable
                          (recommended on systems with /bin -> /usr/bin
                          symlinks)
```

I think we should add this change, but also fix `/etc/profile` to put `/usr/bin` in front of `/bin`.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (6 preceding siblings ...)
  2021-01-29  2:50 ` ericonr
@ 2021-01-29  8:23 ` Chocimier
  2021-01-29 18:52 ` Chocimier
                   ` (25 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2021-01-29  8:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-769655408

Comment:
/etc/profile already have /usr/bin in front of /bin. Problem here is that /etc/profile appends to PATH passed to shell from it's parent, and every parent (atty, ssh, different graphical login managers) passes something different, usually not fitting usrmerge.

Unless there is vaild usecase for preserving parent's path, it could be reset by /etc/profile instead of patching all possible parents.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (7 preceding siblings ...)
  2021-01-29  8:23 ` Chocimier
@ 2021-01-29 18:52 ` Chocimier
  2021-02-16  5:38 ` ericonr
                   ` (24 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2021-01-29 18:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-769984878

Comment:
#6233 states it is for WSL, optimizing for that doesn't convince me.
Is it still relevant with WSL2?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (8 preceding siblings ...)
  2021-01-29 18:52 ` Chocimier
@ 2021-02-16  5:38 ` ericonr
  2021-02-16  5:54 ` am11
                   ` (23 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: ericonr @ 2021-02-16  5:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-779594800

Comment:
It seems @am11's https://github.com/am11/VoidWSL project is still active, at least...

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (9 preceding siblings ...)
  2021-02-16  5:38 ` ericonr
@ 2021-02-16  5:54 ` am11
  2021-02-17 11:47 ` Piraty
                   ` (22 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: am11 @ 2021-02-16  5:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

New comment by am11 on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-779600493

Comment:
Yup, we are actively providing https://git.io/voidwsl and https://git.io/voidmuslwsl from GitHub releases. It is mainly the Void Linux official rootf image with a [slim WSL C binding](https://github.com/yuk7/wsldl/blob/main/main.c).

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (10 preceding siblings ...)
  2021-02-16  5:54 ` am11
@ 2021-02-17 11:47 ` Piraty
  2021-03-05  4:47 ` ericonr
                   ` (21 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Piraty @ 2021-02-17 11:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

New comment by am11 on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-779600493

Comment:
Yup, we are actively providing https://git.io/voidwsl and https://git.io/voidmuslwsl from GitHub releases. It is mainly the Void Linux official rootfs image with a [slim WSL C binding](https://github.com/yuk7/wsldl/blob/main/main.c).

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (11 preceding siblings ...)
  2021-02-17 11:47 ` Piraty
@ 2021-03-05  4:47 ` ericonr
  2021-03-30 21:03 ` [PR PATCH] [Updated] " Chocimier
                   ` (20 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: ericonr @ 2021-03-05  4:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 259 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-791150560

Comment:
I'm a bit confused now, isn't `which` provided by the `which` package, which is completely separate from `util-linux`?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (12 preceding siblings ...)
  2021-03-05  4:47 ` ericonr
@ 2021-03-30 21:03 ` Chocimier
  2021-03-30 21:14 ` Chocimier
                   ` (19 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2021-03-30 21:03 UTC (permalink / raw)
  To: ml

[-- 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: 6555 bytes --]

From c33d72d6521d341728182303da468f1b8b231098 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/3] 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..564cc00ccc38
--- /dev/null
+++ b/srcpkgs/lxdm/patches/default-PATH.patch
@@ -0,0 +1,22 @@
+From e46c33735f81ca5607247fd0690ebbe9f1565708 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
+Date: Tue, 8 Oct 2019 19:32:15 +0200
+Subject: [PATCH] tweak default PATH
+
+
+diff --git src/lxdm.c src/lxdm.c
+index a37f051..8a0e6c6 100644
+--- src/lxdm.c
++++ 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 bb84d194d0b4398fa8f3c427f174bf94d30b0155 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/3] openssh: sync default PATH

---
 srcpkgs/openssh/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/openssh/template b/srcpkgs/openssh/template
index 49b949304096..2507ca37a99f 100644
--- a/srcpkgs/openssh/template
+++ b/srcpkgs/openssh/template
@@ -1,12 +1,14 @@
 # Template file for 'openssh'
 pkgname=openssh
 version=8.5p1
-revision=1
+revision=2
 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/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 40830b363192b75b58f89897d1aa1cf54dd156dd 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/3] util-linux: sync default PATH

---
 srcpkgs/util-linux-libs/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-libs/template b/srcpkgs/util-linux-libs/template
index ad8c4512a35c..47065a3fed1d 100644
--- a/srcpkgs/util-linux-libs/template
+++ b/srcpkgs/util-linux-libs/template
@@ -2,7 +2,7 @@
 # Keep this package sync with util-linux
 pkgname=util-linux-libs
 version=2.36.2
-revision=1
+revision=2
 wrksrc="util-linux-$version"
 build_style=meta
 hostmakedepends="automake bison gettext gettext-devel libtool pkg-config xz"
diff --git a/srcpkgs/util-linux/patches/default-PATH.patch b/srcpkgs/util-linux/patches/default-PATH.patch
new file mode 100644
index 000000000000..cf535e183135
--- /dev/null
+++ b/srcpkgs/util-linux/patches/default-PATH.patch
@@ -0,0 +1,37 @@
+From 52f81526dbbea59e5c8f6aee64db1a9c29509d58 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
+Date: Tue, 30 Mar 2021 22:58:45 +0200
+Subject: [PATCH] default-PATH
+
+
+diff --git include/pathnames.h include/pathnames.h
+index 3845d4c..984b4d8 100644
+--- include/pathnames.h
++++ 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 4fb8292531ba..1f36daa329bd 100644
--- a/srcpkgs/util-linux/template
+++ b/srcpkgs/util-linux/template
@@ -2,7 +2,7 @@
 # Keep this package sync with util-linux-libs
 pkgname=util-linux
 version=2.36.2
-revision=1
+revision=2
 hostmakedepends="automake bison gettext gettext-devel libtool pkg-config xz"
 makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel
  eudev-libudev-devel"

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (13 preceding siblings ...)
  2021-03-30 21:03 ` [PR PATCH] [Updated] " Chocimier
@ 2021-03-30 21:14 ` Chocimier
  2022-04-15  2:12 ` github-actions
                   ` (18 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2021-03-30 21:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 752 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-810582152

Comment:
`which` looks for executable in directories of `$PATH`, in order, as passed to it by shell.
Shell build `$PATH` as specified in /etc/profile, that is by appending to `$PATH` passed from parent process.
Parent process may be agetty from `util-linux`, ssh, graphical login manager like lxdm.
Order of /etc/profile is right, but all directories there are read by `which` after directories from parent, that for some parents are symlinks, leading to reporting symlink directories rather than real ones.

Given there is some usage of not reset PATH in profile, I would like to sync defaults of login managers.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (14 preceding siblings ...)
  2021-03-30 21:14 ` Chocimier
@ 2022-04-15  2:12 ` github-actions
  2022-04-22  0:26 ` Piraty
                   ` (17 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: github-actions @ 2022-04-15  2:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-1099786758

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (15 preceding siblings ...)
  2022-04-15  2:12 ` github-actions
@ 2022-04-22  0:26 ` Piraty
  2022-05-04 19:32 ` [PR PATCH] [Updated] " Chocimier
                   ` (16 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Piraty @ 2022-04-22  0:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

New comment by Piraty on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-1105881156

Comment:
Let's resurrect this

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (16 preceding siblings ...)
  2022-04-22  0:26 ` Piraty
@ 2022-05-04 19:32 ` Chocimier
  2022-05-04 19:33 ` Chocimier
                   ` (15 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2022-05-04 19:32 UTC (permalink / raw)
  To: ml

[-- 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: 6625 bytes --]

From ef1a2cb7273b9f5dccdcaef17a5a7238e8988cdd 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/3] 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..564cc00ccc38
--- /dev/null
+++ b/srcpkgs/lxdm/patches/default-PATH.patch
@@ -0,0 +1,22 @@
+From e46c33735f81ca5607247fd0690ebbe9f1565708 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
+Date: Tue, 8 Oct 2019 19:32:15 +0200
+Subject: [PATCH] tweak default PATH
+
+
+diff --git src/lxdm.c src/lxdm.c
+index a37f051..8a0e6c6 100644
+--- src/lxdm.c
++++ 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 3bd21a00e02def4a5dddd28fdb984a7741794055 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/3] openssh: sync default PATH

---
 srcpkgs/openssh/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/openssh/template b/srcpkgs/openssh/template
index 02a2dec35f42..da60f471e3aa 100644
--- a/srcpkgs/openssh/template
+++ b/srcpkgs/openssh/template
@@ -1,12 +1,14 @@
 # Template file for 'openssh'
 pkgname=openssh
 version=9.0p1
-revision=1
+revision=2
 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/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 9ebba1f206c9c06c89fbce62e64b224d6d31e138 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/3] 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 0d94f16d34e8..6c48c3bfc10e 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.37.2
-revision=1
+revision=3
 wrksrc="util-linux-$version"
 build_style=gnu-configure
 configure_args="--exec-prefix=\${prefix} --enable-libuuid --disable-makeinstall-chown
diff --git a/srcpkgs/util-linux/patches/default-PATH.patch b/srcpkgs/util-linux/patches/default-PATH.patch
new file mode 100644
index 000000000000..cf535e183135
--- /dev/null
+++ b/srcpkgs/util-linux/patches/default-PATH.patch
@@ -0,0 +1,37 @@
+From 52f81526dbbea59e5c8f6aee64db1a9c29509d58 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
+Date: Tue, 30 Mar 2021 22:58:45 +0200
+Subject: [PATCH] default-PATH
+
+
+diff --git include/pathnames.h include/pathnames.h
+index 3845d4c..984b4d8 100644
+--- include/pathnames.h
++++ 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 ae39761e102d..cf1378587f39 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.37.2
-revision=2
+revision=3
 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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (17 preceding siblings ...)
  2022-05-04 19:32 ` [PR PATCH] [Updated] " Chocimier
@ 2022-05-04 19:33 ` Chocimier
  2022-05-05 19:23 ` [PR PATCH] [Updated] " Chocimier
                   ` (14 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2022-05-04 19:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-1117749120

Comment:
@Piraty, rebased. Would you like to patch services you use?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (18 preceding siblings ...)
  2022-05-04 19:33 ` Chocimier
@ 2022-05-05 19:23 ` Chocimier
  2022-08-24 19:15 ` 0x5c
                   ` (13 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2022-05-05 19:23 UTC (permalink / raw)
  To: ml

[-- 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: 6605 bytes --]

From 88efdd1d9aa810098389c47efb3d9fec038905b9 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/3] 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 426b0bffc1fb8929b38d5f63c52d5d37527ccdd1 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/3] openssh: sync default PATH

---
 srcpkgs/openssh/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/openssh/template b/srcpkgs/openssh/template
index 02a2dec35f42..da60f471e3aa 100644
--- a/srcpkgs/openssh/template
+++ b/srcpkgs/openssh/template
@@ -1,12 +1,14 @@
 # Template file for 'openssh'
 pkgname=openssh
 version=9.0p1
-revision=1
+revision=2
 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/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 4a3429925db508a2acba8a60b8e5544b9ba4e8ed 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/3] 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 0d94f16d34e8..6c48c3bfc10e 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.37.2
-revision=1
+revision=3
 wrksrc="util-linux-$version"
 build_style=gnu-configure
 configure_args="--exec-prefix=\${prefix} --enable-libuuid --disable-makeinstall-chown
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 ae39761e102d..cf1378587f39 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.37.2
-revision=2
+revision=3
 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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (19 preceding siblings ...)
  2022-05-05 19:23 ` [PR PATCH] [Updated] " Chocimier
@ 2022-08-24 19:15 ` 0x5c
  2023-06-26 22:09 ` [PR PATCH] [Updated] " Chocimier
                   ` (12 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: 0x5c @ 2022-08-24 19:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

New comment by 0x5c on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-1226136080

Comment:
I use KDE from SDDM, and the default path is `/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin`.
It seems correct already but different than the path specified in this PR.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (20 preceding siblings ...)
  2022-08-24 19:15 ` 0x5c
@ 2023-06-26 22:09 ` Chocimier
  2023-06-26 22:12 ` Chocimier
                   ` (11 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2023-06-26 22:09 UTC (permalink / raw)
  To: ml

[-- 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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (21 preceding siblings ...)
  2023-06-26 22:09 ` [PR PATCH] [Updated] " Chocimier
@ 2023-06-26 22:12 ` Chocimier
  2023-06-27 11:21 ` leahneukirchen
                   ` (10 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2023-06-26 22:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-1608390349

Comment:
As @leahneukirchen already started doing this in 3b9cc95ac4157290d16dc46fe087b6072367a991, I will patch few more *dm and merge.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (22 preceding siblings ...)
  2023-06-26 22:12 ` Chocimier
@ 2023-06-27 11:21 ` leahneukirchen
  2023-06-27 11:23 ` [PR REVIEW] " leahneukirchen
                   ` (9 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: leahneukirchen @ 2023-06-27 11:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-1609305209

Comment:
The PR title should be adjusted.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR REVIEW] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (25 preceding siblings ...)
  2023-06-27 11:23 ` leahneukirchen
@ 2023-06-27 11:23 ` leahneukirchen
  2023-06-27 11:23 ` leahneukirchen
                   ` (6 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: leahneukirchen @ 2023-06-27 11:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

New review comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#discussion_r1243576193

Comment:
Same here.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR REVIEW] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (23 preceding siblings ...)
  2023-06-27 11:21 ` leahneukirchen
@ 2023-06-27 11:23 ` leahneukirchen
  2023-06-27 11:23 ` leahneukirchen
                   ` (8 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: leahneukirchen @ 2023-06-27 11:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

New review comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#discussion_r1243576382

Comment:
And here.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR REVIEW] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (26 preceding siblings ...)
  2023-06-27 11:23 ` leahneukirchen
@ 2023-06-27 11:23 ` leahneukirchen
  2023-07-01 19:44 ` [PR PATCH] [Updated] " Chocimier
                   ` (5 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: leahneukirchen @ 2023-06-27 11:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

New review comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#discussion_r1243575890

Comment:
Why put /usr/bin before /usr/sbin, yet /sbin before /bin? IMO sbin always should go first, as on classic Unix.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR REVIEW] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (24 preceding siblings ...)
  2023-06-27 11:23 ` [PR REVIEW] " leahneukirchen
@ 2023-06-27 11:23 ` leahneukirchen
  2023-06-27 11:23 ` leahneukirchen
                   ` (7 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: leahneukirchen @ 2023-06-27 11:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

New review comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#discussion_r1243576668

Comment:
And here.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Updated] [RFC] util-linux: exclude bin from default PATH
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (27 preceding siblings ...)
  2023-06-27 11:23 ` leahneukirchen
@ 2023-07-01 19:44 ` Chocimier
  2023-07-01 20:27 ` *dm, util-linux, openssh: adjust PATH for usrmerge Chocimier
                   ` (4 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2023-07-01 19:44 UTC (permalink / raw)
  To: ml

[-- 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: 16488 bytes --]

From 30edb8c07720b653aea8f544e520b32a654c7244 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 1/8] 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 <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 a8686515321a9dac9629f24d9f08043c26dc3ff1 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/8] 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 d8a31f812534f359ff4ddd0734170ba12c6ea9a1 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 3/8] 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 <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 bd69960509dd578f1a88b5fd194a37926b3a581a 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/8] 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 <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

From a80eea78a5ed628c131fcc8661ae11ec5f083fab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 1 Jul 2023 14:40:51 +0200
Subject: [PATCH 5/8] 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 871cfe6c7e71f5b595b9159c69e2df4a3dddbec3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 1 Jul 2023 17:28:41 +0200
Subject: [PATCH 6/8] slim: adjust PATH for usrmerge

---
 .../1.3.6--adjust-PATH-for-usrmerge.patch     | 61 +++++++++++++++++++
 srcpkgs/slim/template                         |  2 +-
 2 files changed, 62 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..a4d5d433ed06
--- /dev/null
+++ b/srcpkgs/slim/patches/1.3.6--adjust-PATH-for-usrmerge.patch
@@ -0,0 +1,61 @@
+From 0a96bb015d9dc30ff98cfc21256851cb2005cea1 Mon Sep 17 00:00:00 2001
+From: Piotr Wójcik <chocimier@tlen.pl>
+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
+ 
+@@ -11,7 +11,7 @@ console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login"
+ #suspend_cmd        /usr/sbin/suspend
+ 
+ # Full path to the xauth binary
+-xauth_path         /usr/bin/xauth 
++xauth_path         /usr/bin/xauth
+ 
+ # Xauth file for server
+ authfile           /var/run/slim.auth
+@@ -60,7 +60,7 @@ screenshot_cmd      import -window root /slim.png
+ welcome_msg         Welcome to %host
+ 
+ # Session message. Prepended to the session name when pressing F1
+-# session_msg         Session: 
++# session_msg         Session:
+ 
+ # shutdown / reboot messages
+ shutdown_msg       The system is halting...
+@@ -79,7 +79,7 @@ reboot_msg         The system is rebooting...
+ #auto_login          no
+ 
+ 
+-# current theme, use comma separated list to specify a set to 
++# current theme, use comma separated list to specify a set to
+ # randomly choose from
+ current_theme       default
+ 
+-- 
+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 189a73c5df6448649700fc29055122216fe21abf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 1 Jul 2023 17:31:24 +0200
Subject: [PATCH 7/8] 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 <chocimier@tlen.pl>
+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 df5918cfaa749912b09924001cefb1452b2fe37d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 1 Jul 2023 17:53:46 +0200
Subject: [PATCH 8/8] 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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: *dm, util-linux, openssh: adjust PATH for usrmerge
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (28 preceding siblings ...)
  2023-07-01 19:44 ` [PR PATCH] [Updated] " Chocimier
@ 2023-07-01 20:27 ` Chocimier
  2023-07-01 20:37 ` [PR PATCH] [Updated] " Chocimier
                   ` (3 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2023-07-01 20:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-1616089997

Comment:
/usr/bin goes before /usr/sbin to make `command -v`, zsh `=` expansion and so on return real path of command, so it is more useful, e.g. can be passed to `xbps-query -o`. It is the order given in /etc/profile as well. Using real path is main reason to introduce changes here, as it worked until #6233..



^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Updated] *dm, util-linux, openssh: adjust PATH for usrmerge
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (29 preceding siblings ...)
  2023-07-01 20:27 ` *dm, util-linux, openssh: adjust PATH for usrmerge Chocimier
@ 2023-07-01 20:37 ` Chocimier
  2023-07-01 21:26 ` leahneukirchen
                   ` (2 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2023-07-01 20:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 472 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

*dm, util-linux, openssh: adjust PATH for usrmerge
/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: 17716 bytes --]

From 30edb8c07720b653aea8f544e520b32a654c7244 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 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 <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 a8686515321a9dac9629f24d9f08043c26dc3ff1 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/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 d8a31f812534f359ff4ddd0734170ba12c6ea9a1 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 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 <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 bd69960509dd578f1a88b5fd194a37926b3a581a 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/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 <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

From a80eea78a5ed628c131fcc8661ae11ec5f083fab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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 871cfe6c7e71f5b595b9159c69e2df4a3dddbec3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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     | 61 +++++++++++++++++++
 srcpkgs/slim/template                         |  2 +-
 2 files changed, 62 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..a4d5d433ed06
--- /dev/null
+++ b/srcpkgs/slim/patches/1.3.6--adjust-PATH-for-usrmerge.patch
@@ -0,0 +1,61 @@
+From 0a96bb015d9dc30ff98cfc21256851cb2005cea1 Mon Sep 17 00:00:00 2001
+From: Piotr Wójcik <chocimier@tlen.pl>
+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
+ 
+@@ -11,7 +11,7 @@ console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login"
+ #suspend_cmd        /usr/sbin/suspend
+ 
+ # Full path to the xauth binary
+-xauth_path         /usr/bin/xauth 
++xauth_path         /usr/bin/xauth
+ 
+ # Xauth file for server
+ authfile           /var/run/slim.auth
+@@ -60,7 +60,7 @@ screenshot_cmd      import -window root /slim.png
+ welcome_msg         Welcome to %host
+ 
+ # Session message. Prepended to the session name when pressing F1
+-# session_msg         Session: 
++# session_msg         Session:
+ 
+ # shutdown / reboot messages
+ shutdown_msg       The system is halting...
+@@ -79,7 +79,7 @@ reboot_msg         The system is rebooting...
+ #auto_login          no
+ 
+ 
+-# current theme, use comma separated list to specify a set to 
++# current theme, use comma separated list to specify a set to
+ # randomly choose from
+ current_theme       default
+ 
+-- 
+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 189a73c5df6448649700fc29055122216fe21abf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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 <chocimier@tlen.pl>
+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 df5918cfaa749912b09924001cefb1452b2fe37d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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 1a7f620061519bbaebea0fab29bff55c623a15dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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"

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: *dm, util-linux, openssh: adjust PATH for usrmerge
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (30 preceding siblings ...)
  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
  33 siblings, 0 replies; 35+ messages in thread
From: leahneukirchen @ 2023-07-01 21:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/14267#issuecomment-1616140541

Comment:
This makes sense, thanks for pointing it out.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Updated] *dm, util-linux, openssh: adjust PATH for usrmerge
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (31 preceding siblings ...)
  2023-07-01 21:26 ` leahneukirchen
@ 2023-07-03 16:21 ` Chocimier
  2023-07-03 16:48 ` [PR PATCH] [Merged]: " Chocimier
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2023-07-03 16:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 472 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

*dm, util-linux, openssh: adjust PATH for usrmerge
/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: 16787 bytes --]

From 57e19bc42d7da5b8a0f42fc3b15806a4e24e167e 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 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 <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 90a10e6097863aa646aa4211f9de6966400c443d 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/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?= <chocimier@tlen.pl>
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 <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 f06e8a8abefa43f2c8c79214cb32c67a36cb62dc 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/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 <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

From 35ce4182fa349d76a0f71b198512c4723235971b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
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?= <chocimier@tlen.pl>
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 <chocimier@tlen.pl>
+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?= <chocimier@tlen.pl>
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 <chocimier@tlen.pl>
+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?= <chocimier@tlen.pl>
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?= <chocimier@tlen.pl>
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"

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PR PATCH] [Merged]: *dm, util-linux, openssh: adjust PATH for usrmerge
  2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH voidlinux-github
                   ` (32 preceding siblings ...)
  2023-07-03 16:21 ` [PR PATCH] [Updated] " Chocimier
@ 2023-07-03 16:48 ` Chocimier
  33 siblings, 0 replies; 35+ messages in thread
From: Chocimier @ 2023-07-03 16:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

There's a merged pull request on the void-packages repository

*dm, util-linux, openssh: adjust PATH for usrmerge
https://github.com/void-linux/void-packages/pull/14267

Description:
/bin is still added to PATH by /etc/profile, but after /usr/bin.
This makes `which` return real file instead of symlink.

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2023-07-03 16:48 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 18:19 [PR PATCH] [RFC] util-linux: exclude bin from default PATH 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 ` [PR PATCH] [Updated] " Chocimier
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

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).