Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 729070 - sys-apps/baselayout-2.7[-split-usr] should not remove sbin from PATH
Summary: sys-apps/baselayout-2.7[-split-usr] should not remove sbin from PATH
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: David Seifert
URL: https://www.freedesktop.org/wiki/Soft...
Whiteboard:
Keywords:
: 793761 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-21 23:42 UTC by David Michael
Modified: 2021-06-01 20:50 UTC (History)
3 users (show)

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 David Michael 2020-06-21 23:42:14 UTC
When using the unstable baselayout version without split-usr, it remove all sbin directories from PATH.  The comment says they are redundant symlinks with UsrMerge, but UsrMerge refers to bin and sbin as separate directories (see link), and they are not symlinks on other UsrMerge distros.  I did not symlink sbin to bin to be consistent with this, so the PATH changes result in many commands not being found.  I think these lines should be dropped:

https://github.com/gentoo/gentoo/blob/master/sys-apps/baselayout/baselayout-2.7.ebuild#L194-L195

Reproducible: Always

Steps to Reproduce:
1. ACCEPT_KEYWORDS=~* emerge -v baselayout
2. grep ^PATH /etc/env.d/50baselayout
Comment 2 David Seifert gentoo-dev 2020-06-22 12:08:40 UTC
Notice that
https://gitweb.gentoo.org/proj/baselayout.git/tree/Makefile#n97

does that already.
Comment 3 David Michael 2020-06-22 12:43:43 UTC
Those links do not get packaged unless USE=build is set, which I don't use.

# emerge --{,sys}root=/tmp/newroot =sys-apps/baselayout-2.7
# find /tmp/newroot -type d
/tmp/newroot
/tmp/newroot/run
/tmp/newroot/etc
/tmp/newroot/etc/modprobe.d
/tmp/newroot/etc/sysctl.d
/tmp/newroot/etc/env.d
/tmp/newroot/usr
/tmp/newroot/usr/share
/tmp/newroot/usr/share/baselayout
/tmp/newroot/usr/share/doc
/tmp/newroot/usr/share/doc/baselayout-2.7
/tmp/newroot/var
/tmp/newroot/var/db
/tmp/newroot/var/db/pkg
/tmp/newroot/var/db/pkg/sys-apps
/tmp/newroot/var/db/pkg/sys-apps/baselayout-2.7
/tmp/newroot/var/cache
/tmp/newroot/var/cache/edb
/tmp/newroot/var/lib
/tmp/newroot/var/lib/portage
/tmp/newroot/var/tmp
/tmp/newroot/tmp
Comment 4 David Seifert gentoo-dev 2020-06-22 13:28:59 UTC
William should pitch in, but the rationale for merging bin and sbin dirs was given in

https://lists.fedoraproject.org/pipermail/devel/2011-October/158845.html

I don't see a point in adding another USE=split-bin that allows for merged-/usr-but-split-bin/-and-sbin/. The separation between bin/ and sbin/ is mostly pointless.
Comment 5 David Michael 2020-06-22 13:53:52 UTC
Interesting that it was proposed on the Fedora list, and they still have separate bin and sbin a decade later.  It seems everything based on Fedora/RHEL and Ubuntu keeps them separate, but I see Arch links sbin to bin.

But okay, if the split bin/sbin layout is intended to be unsupported in Gentoo, then I'll rewrite my layout to copy Arch.
Comment 6 David Seifert gentoo-dev 2020-06-22 14:05:50 UTC
(In reply to David Michael from comment #5)
> Interesting that it was proposed on the Fedora list, and they still have
> separate bin and sbin a decade later.  It seems everything based on
> Fedora/RHEL and Ubuntu keeps them separate, but I see Arch links sbin to bin.
> 
> But okay, if the split bin/sbin layout is intended to be unsupported in
> Gentoo, then I'll rewrite my layout to copy Arch.

One of the main reasons of USE=-split-usr being package.use.force'd: How would you even change this? Move /usr/sbin/* stuff to /usr/bin/ in pkg_postinst, and then tell the user to re-emerge his world? USE=-split-usr is extremely hairy (and I've shot myself in the foot multiple times with it). That said, we should clearly document this better for those willing to go to a fully-merged system.
Comment 7 David Michael 2020-06-22 14:11:53 UTC
Yeah, I'm not suggesting unmasking the flag; that's clearly a problem.  My systems cross-build the entire file system image from scratch in one shot, so the setting is not an issue for me.
Comment 8 William Hubbs gentoo-dev 2020-06-30 15:22:50 UTC
Here is more information about the issues involved in this bug [1].

Given the link above and this one, I do not understand the value of
having sbin split from bin. If someone can convince me that doing so has
value, I am willing to re-consider this position.

Let me know what you think.

[1] https://www.osnews.com/story/25556/understanding-the-bin-sbin-usrbin-usrsbin-split/
Comment 9 David Michael 2020-07-02 13:03:47 UTC
This can just be closed if there is nothing to be done (docs), since combining bin and sbin was intentional.

I opened the bug because the PATH is broken when upgrading baselayout, which references UsrMerge as the reason, which is unrelated to combining bin and sbin so it looked unintentional.  I've already changed my systems' layout over a week ago to use this Arch-like layout instead, so they're working again.
Comment 10 Georgy Yakovlev archtester gentoo-dev 2021-06-01 20:50:18 UTC
*** Bug 793761 has been marked as a duplicate of this bug. ***