Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 888781 - app-alternatives/sh: please add sys-apps/busybox
Summary: app-alternatives/sh: please add sys-apps/busybox
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-28 19:29 UTC by Hadrien Lacour
Modified: 2022-12-28 20:25 UTC (History)
3 users (show)

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


Attachments
app-alternatives-sh-busybox.patch (file_888781.txt,1.11 KB, patch)
2022-12-28 19:56 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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(+)