Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 777333 - app-shells/zsh: Reconsider usage of ROOTPATH
Summary: app-shells/zsh: Reconsider usage of ROOTPATH
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-19 23:32 UTC by konsolebox
Modified: 2022-02-12 23:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description konsolebox 2021-03-19 23:32:43 UTC
/etc/profile no longer have a line that's something like this:

if [ "${EUID}" = 0 ] || [ "${USER}" = "root" ] ; then
	PATH=${ROOTPATH}
fi

export PATH

This makes the ROOTPATH variable seemingly useless.

/etc/zsh/zprofile however still assigns PATH to ROOTPATH with the following lines:

if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
	# Check to make sure ROOTPATH is sane before we use it.
	# https://bugs.gentoo.org/656400
	if [[ :${ROOTPATH}: == *:/usr/sbin:* ]]; then
		PATH="${ROOTPATH}"
	fi
fi
export PATH
unset ROOTPATH


Reproducible: Always
Comment 1 Arfrever Frehtes Taifersar Arahesis 2021-03-20 01:07:09 UTC
It is intentional:


https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd

commit 9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2017-10-04 22:17:40 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2017-10-04 22:17:40 +0000

    Drop support for ROOTPATH
    
    ...


https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=277e5b9e55717873b87eb541a95f4f2ae0c60a4d

commit 277e5b9e55717873b87eb541a95f4f2ae0c60a4d
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2018-05-26 18:36:31 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2018-05-26 19:35:11 +0000

    Add sbin directories to path
    
    This is a partial revert of 9cac4dd130637fa2c1f1a64bf3c9d2509284e6dd.
    We need to have path and rootpath be the same, to allow transitioning
    packages before we drop rootpath.


https://gitweb.gentoo.org/proj/baselayout.git/commit/?id=8974c87e2d0e243c0fc2503fac5b40f447fac65f

commit 8974c87e2d0e243c0fc2503fac5b40f447fac65f
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2018-05-28 18:54:32 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2018-05-28 19:21:23 +0000

    profile: don't use ROOTPATH
    
    Since PATH is supposed to be the same for everyone, we can now drop the
    code that handles ROOTPATH.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2021-03-20 01:09:55 UTC
ROOTPATH handling should be dropped from /etc/zsh/zprofile installed by app-shells/zsh:

https://gitweb.gentoo.org/repo/gentoo.git/tree/app-shells/zsh/files/zprofile-4?id=57668f2a996a42dae2455fd56acfd8ae75dc1fae
Comment 3 Larry the Git Cow gentoo-dev 2022-02-12 18:50:49 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a26c773f643fcfe35288ddfc0321a7a7d51fda0c

commit a26c773f643fcfe35288ddfc0321a7a7d51fda0c
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2022-02-12 18:49:23 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2022-02-12 18:50:42 +0000

    app-shells/zsh: Bump to version 5.8.1
    
    Closes: https://bugs.gentoo.org/777333
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 app-shells/zsh/Manifest         |   2 +
 app-shells/zsh/files/zprofile-4 |   4 +-
 app-shells/zsh/zsh-5.8.1.ebuild | 217 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 221 insertions(+), 2 deletions(-)
Comment 4 Esteve Varela Colominas 2022-02-12 23:50:51 UTC
This closing commit still causes different behaviors between bash and zsh; bash (/etc/profile) simply unsets ROOTPATH, while zsh sets PATH to it if present.

This is currently causing issues for me in gentoo prefix, where 99host only sets PATH and not ROOTPATH, so some path components are missing within the environment.