Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 888781

Summary: app-alternatives/sh: please add sys-apps/busybox
Product: Gentoo Linux Reporter: Hadrien Lacour <hadrien.lacour>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: embedded, mgorny, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.archlinux.org/task/73998
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: app-alternatives-sh-busybox.patch

Description Hadrien Lacour 2022-12-28 19:29:05 UTC
Just added busybox:sys-apps/busybox to the ALTERNATIVES array, working as it should; might want it for other alternatives too where POSIX conformance is possible (not awk).

For completeness, we might want to check busybox's config to see that's it's configured "properly" (e.g. no CONFIG_FEATURE_SH_STANDALONE=y), but I don't think we can dump busybox's current config.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-28 19:51:55 UTC
Looks like we may be able to do:

$ busybox bbconfig | grep -i CONFIG_FEATURE_SH_STANDALONE
CONFIG_FEATURE_SH_STANDALONE=y
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-28 19:56:46 UTC
Created attachment 845497 [details, diff]
app-alternatives-sh-busybox.patch

How does this look?
Comment 3 Larry the Git Cow gentoo-dev 2022-12-28 20:25:32 UTC
The bug has been closed via the following commit(s):

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

commit 689f36370d85a43fba6d7329290b5d2086b61fb4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-28 20:04:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-28 20:07:06 +0000

    app-alternatives/sh: support sys-apps/busybox
    
    Note that we have to check for CONFIG_FEATURE_SH_STANDALONE=y to avoid
    busybox preferring internal applets over commands in PATH.
    
    See https://web.archive.org/web/20221206223848/https://busybox.net/FAQ.html#standalone_shell.
    
    Closes: https://bugs.gentoo.org/888781
    Signed-off-by: Sam James <sam@gentoo.org>

 app-alternatives/sh/sh-0.ebuild | 14 ++++++++++++++
 1 file changed, 14 insertions(+)