Bug#1037084: bookworm: When using gdm3 to start non-GNOME wayland sessions, PATH may be set differently

2024-05-08 Thread Sam Hartman
> "Santiago" == Santiago Vila  writes:

Santiago> Hello.  My plan for base-files is to stop overriding the
Santiago> PATH in /etc/profile.

Santiago> Ubuntu did that a long time ago and it's probably the
Santiago> right thing to do.

I'd be happy to pick up the Ubuntu patch to include PATH in
/etc/environment for libpam-modules.


signature.asc
Description: PGP signature


Bug#1037084: bookworm: When using gdm3 to start non-GNOME wayland sessions, PATH may be set differently

2024-05-08 Thread Yves-Alexis Perez
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Tue, 2024-05-07 at 01:28 +0200, Santiago Vila wrote:
> My plan for base-files is to stop overriding the PATH in /etc/profile.

Note that /etc/profile is a configuration file for bourne shells. While it's a
common path, it's not especially for other shells (I think zsh still uses it
but not all I think) and not graphical sessions.

Regards,
- -- 
Yves-Alexis
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAmY7YGgACgkQ3rYcyPpX
RFvbsAf/dKuiRbySXE4iYEONIt3Exw4ZqeECQGovA/cCq7fSVpPN/qAtAM4oBFLD
oKXhS+UjePwkpST2JusYsWWwlaHgNOLixC+GbNEj8eNkylQve5SM+I+VMeWly63+
Zki3Lvfvr/JasaCzWBKLcsGcb/XdRfAOvco0D7YKZuHotTOI2/XaLgyjvCcnxXqT
Sp6z6/QzzbVSQYO1SL7MaghUGGpCqUuP5oHXqHjsR9bIOytg7rZoZfz/3dOmt/JI
gmktQjMppVED10He/h5TtsVpOOoatHmLkD9F0DqmfssEW2HPlPgK3OLcQnoWcPH1
G5m8rjNDZtt3+87L5wewE1Cc9bLz3A==
=Ravt
-END PGP SIGNATURE-



Bug#1037084: bookworm: When using gdm3 to start non-GNOME wayland sessions, PATH may be set differently

2024-05-06 Thread Santiago Vila

Hello.

My plan for base-files is to stop overriding the PATH in /etc/profile.

Ubuntu did that a long time ago and it's probably the right thing to do.

I'd like to do this for trixie, but only after the t64 transition is finished
and the usr-merge patch from Helmut Grohne is implemented.

Also, I want to be sure that nothing breaks, and if it does, I want to be
sure that I'm not forced to set the PATH again. See what happened the last
time I tried :-)

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=571086

Thanks.



Bug#1037084: bookworm: When using gdm3 to start non-GNOME wayland sessions, PATH may be set differently

2024-05-06 Thread Jay
On Wed, May 1, 2024 at 6:13 PM Alban Browaeys  wrote:
> So you were right that reverting commit ccecd9c9 would fix your issue,
> but not because gdm added a bug but because it stopped hiding an
> underlying "bug" (well wrong default PATH value in systemd for Debian).
> It could be that systemd maintainers thing this is gdm job to overwrite
> their value, though it looks more correct to me to bug them first as
> they are the one setting the wrong default for Debian (or so I believe,
> I have not checked extensively if the wrong PATH default value could be
> fine at the systemd level and be changed afterwards).
Thanks again! I finally found some time to further investigate this.
I have reassigned this bug report to the systemd package,
but it looks like base-files and libpam-modules are the packages
involved.

My Debian system was installed in 2022-10. To be sure this wasn't
just a misconfigured system in 2022, I checked again with a fresh
Debian 12.5 install and found that the same defaults are present.

> The Debian specific defaults are shown in /etc/profile
Reading that made me check Ubuntu's defaults:
/etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
/etc/profile
(no mention of PATH)

It looks like Ubuntu sets PATH in /etc/environment through libpam-modules
and /usr/lib/environment.d/99-environment.conf is symlinked to it.
Debian sets PATH in /etc/profile through base-files and its
/usr/lib/environment.d/99-environment.conf
is symlinked to an empty /etc/environment also created by libpam-modules.

Ubuntu's libpam-modules runs a postinst script:
# Add PATH to /etc/environment if it's not present there or in
# /etc/security/pam_env.conf
if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt
1.3.1-5ubuntu5; then
if ! grep -qs ^PATH "$DPKG_ROOT"/etc/security/pam_env.conf; then
if ! grep -qs ^PATH= "$DPKG_ROOT"/etc/environment; then
echo
'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"'
>> "$DPKG_ROOT"/etc/environment
fi
fi
fi

Debian's libpam-modules postinst:
if dpkg --compare-versions "$2" lt 0.99.9.0-1 && ! [ -f
"$DPKG_ROOT"/etc/environment ]
then
 touch "$DPKG_ROOT"/etc/environment
fi

I think we can narrow this down to base-files and/or libpam-modules.
I'm not sure if doing the same thing as the Ubuntu package would be
the right thing
so I'm CC'ing the maintainers for both packages and the debian-desktop
mailing list
for advice instead of reassigning the bug report again.