Hiya, I just installed baselayout-2.5-r1 and then attempting to su resulting in a number of errors from inside the zshrc trying to run env/grep etc. After a little debugging it appeared this is because whilst normal login worked fine, using su would not properly set the path. It was setting from other files within env.d, and I eventually tracked it down to the ROOTPATH value missing from /etc/env.d/50baselayout. This occurred when SSHing in, even after running env-update, logging off and re-logging in. The commit that caused the issue ( https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd ) suggests that ROOTPATH is no longer necessary, but /etc/zsh/zprofile (part of app-shells/zsh) does still use it, and therefore sets it incorrectly for any zsh users logging in as root after updating to this package. It's not clear how best to deal with multiple different shells using customary values likes ROOTPATH. In the short term, an explicit message to inform people using other shells that things have changed might help. Please let me know if you need any other information...
I have a similar issue. If I login as root and echo PATH in the beginning of /etc/profile /bin is included. But then PATH is replaced by ${ROOTPATH}, which is /etc/profile: ROOTPATH=|/usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0:/usr/lib/llvm/6/bin:/opt/nvidia-cg-toolkit/bin:/usr/lib64/subversion/bin:/opt/eagle/bin| Which was with baselayout-2.4.1-r2: /etc/profile: ROOTPATH=|/usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0:/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:
similar problem with bash using su. /bin and /usr/bin are no longer part of PATH. And then other tools like /bin/egrep which are obviously shell-scripts no longer work (e.g. /bin/egrep calls grep directly without path)
Another issue: the app-admin/sudo ebuild uses ROOTPATH at build time to set a "secure path" in the resulting binary.
(In reply to Juergen Rose from comment #1) It sounds like you need to run etc-update to update /etc/profile. The version shipped with baselayout-2.5 does not refer to ROOTPATH in any way.
(In reply to Jochen Schlick from comment #2) I'm not able to reproduce that issue. /bin and /usr/bin should appear in PATH with bash and baselayout-2.5.
I'm having this issue too.
Looks like /etc/zsh/zprofile needs to be updated if removal of ROOTPATH is staying.
(In reply to Mike Gilbert from comment #4) > (In reply to Juergen Rose from comment #1) > > It sounds like you need to run etc-update to update /etc/profile. The > version shipped with baselayout-2.5 does not refer to ROOTPATH in any way. Neither dispatch-conf nor etc-update want to update anysthing: root@lynxold:/root(11)# dispatch-conf root@lynxold:/root(12)# etc-update Scanning Configuration files... Exiting: Nothing left to do; exiting. :) root@lynxold:/root(13)#
(In reply to Juergen Rose from comment #8) > (In reply to Mike Gilbert from comment #4) > > (In reply to Juergen Rose from comment #1) > > > > It sounds like you need to run etc-update to update /etc/profile. The > > version shipped with baselayout-2.5 does not refer to ROOTPATH in any way. > > Neither dispatch-conf nor etc-update want to update anysthing: > > root@lynxold:/root(11)# dispatch-conf > root@lynxold:/root(12)# etc-update > Scanning Configuration files... > Exiting: Nothing left to do; exiting. :) > root@lynxold:/root(13)# I have to correct, at the system, where etc-update did not find anything to update /etc/profile was anyhow magically replace by a new version.
Running dispatch-conf/etc-update fixes /etc/profile, but not /etc/zsh/zprofile, which still honours ${ROOTPATH}. Even if it is not set. And that's the problem. Not even rebuilding zsh after the upgrades fixes it. In order for this to work with both older and newer versions of baselayout we either need to remove /etc/zsh/profile and use /etc/profile instead, but I'm not sure if /etc/zsh/profile serves any purpose, so in case it does, that might not be possible. In that case ${ROOTPATH} should be honoured only if it is set.
(In reply to Martin Kletzander from comment #10) > Running dispatch-conf/etc-update fixes /etc/profile, but not > /etc/zsh/zprofile, which still honours ${ROOTPATH}. Even if it is not set. > And that's the problem. Not even rebuilding zsh after the upgrades fixes > it. In order for this to work with both older and newer versions of > baselayout we either need to remove /etc/zsh/profile and use /etc/profile > instead, but I'm not sure if /etc/zsh/profile serves any purpose, so in case > it does, that might not be possible. In that case ${ROOTPATH} should be > honoured only if it is set. Sorry, my bad, disregard that, it won't help, $ROOTPATH is stil used in so many places. For example: xdm appends it to pathin /etc/init.d/xdm, but if it doesn't exist it still appends the colon separator. subversion, llvm and gcc still append their bin folders into $ROOTPATH And there will possibly be more.
Can we revert baselayout update until other things like sudo and zsh are aligned?
All, in baselayout 2.6, we leave ROOTPATH in /etc/env.d, which means it will be available, we just unset it in /etc/profile. Does that fix the issues?
Baselayout 2.6 fixes it (for me). Thanks.
Yep, baselayout-2.6 doesn't seem to exhibit the same problems, thanks. 5:) Happy for this to be closed if you're happy...
Closing per above comments. Baselayout-2.6 fixes the issue.
This does fix the immediate issue. However, .zprofile should be modified once the new baselayout goes stable to not refer to ROOTPATH.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d09566dc69f7806142d67955f8d05383d60d0622 commit d09566dc69f7806142d67955f8d05383d60d0622 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2018-05-24 19:27:50 +0000 Commit: William Hubbs <williamh@gentoo.org> CommitDate: 2018-06-05 20:35:33 +0000 app-shells/zsh: check for /usr/sbin in ROOTPATH before using it The maintainer, radhermit@gentoo.org, authorized me to fix this bug (williamh). Closes: https://bugs.gentoo.org/656400 Closes: https://github.com/gentoo/gentoo/pull/8550 Closes: https://github.com/gentoo/gentoo/pull/8566 app-shells/zsh/files/zprofile-4 | 42 ++++++++++++++++++++++ .../zsh/{zsh-5.5.1.ebuild => zsh-5.5.1-r1.ebuild} | 2 +- app-shells/zsh/zsh-9999.ebuild | 11 ++---- 3 files changed, 45 insertions(+), 10 deletions(-)