FS#55482 - [filesystem] Default PATH orders sbin before bin
Attached to Project:
Arch Linux
Opened by Pierre Schmitz (Pierre) - Sunday, 03 September 2017, 03:26 GMT
Last edited by Sébastien Luttringer (seblu) - Sunday, 10 December 2017, 16:04 GMT
Opened by Pierre Schmitz (Pierre) - Sunday, 03 September 2017, 03:26 GMT
Last edited by Sébastien Luttringer (seblu) - Sunday, 10 December 2017, 16:04 GMT
|
Details
The filesystem package in [testing] sets the following PATH
by default:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl The version in [core] used to set: /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl As /usr/sbin is now set before /usr/bin some programms pick up sbin by default even though this one is just a symlink to bin and should be considered deprecated. An example would be PHP which now compiles to /usr/sbin/sendmail instead of /usr/bin/sendmail by default. |
This task depends upon
Closed by Sébastien Luttringer (seblu)
Sunday, 10 December 2017, 16:04 GMT
Reason for closing: Fixed
Additional comments about closing: filesystem 2017.10-2
Sunday, 10 December 2017, 16:04 GMT
Reason for closing: Fixed
Additional comments about closing: filesystem 2017.10-2
Also why do you have the /etc/profile.d/perlbin.sh paths appearing three times?
Though I do note that before /etc/profile is loaded, my PATH=/usr/bin which produces unexpected results of a different nature.
My new PATH is "/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl".
And apparently for my logged in system this is derived from /etc/login.defs:
ENV_PATH PATH=/usr/bin
Our bash PKGBUILD has the following CFLAGS: -DDEFAULT_PATH_VALUE='"/usr/local/sbin:/usr/local/bin:/usr/bin"'
Does systemd-nspawn *also* try to set this somehow?
The PATH is not the same between a «booted» system (.service units) and a «spawned» system.
Side discovery, all our daemons PATH environment are also defined by a value in this file, which make our default PATH to be /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin.
I added an environment generator to define our arch default path in systemd in 2017.09-1.
With the previous version of filesystem, the PATH variable was reset when the shell loads /etc/profile. See
FS#47884.Our build system is several bash scripts, and the PATH in the chrooted environment was defined by /etc/profile.
We have a several options:
- We restore the previous behaviour in filesystem;
- We fix systemd-nspawn to use DEFAULT_PATH instead of DEFAULT_PATH_SPLIT_USR;
- We fix arch-nspawn to set the arch default path