Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/busybox/
Date: Thu, 26 Aug 2021 22:52:19
Message-Id: 1630018213.5c8d34c127412c5d8b4fd3dc13e970f265be211c.sam@gentoo
1 commit: 5c8d34c127412c5d8b4fd3dc13e970f265be211c
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Thu Aug 19 17:21:00 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 26 22:50:13 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c8d34c1
7
8 sys-apps/busybox: Disable standalone shell mode with USE=make-symlinks
9
10 * Busybox has by default enabled CONFIG_FEATURE_PREFER_APPLETS
11 and CONFIG_FEATURE_SH_STANDALONE which means it will
12 bypass all PATH lookups and use its builtin applets.
13 This is problematic as we sometimes might want to use the
14 original program instead of Busybox applets, so let's
15 disable those two options when building with USE=make-symlinks.
16 This also enables users to disable a builtin by deleting the
17 corresponding symlink.
18
19 Closes: https://bugs.gentoo.org/729184
20 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
21 Closes: https://github.com/gentoo/gentoo/pull/22038
22 Signed-off-by: Sam James <sam <AT> gentoo.org>
23
24 .../{busybox-1.33.1-r1.ebuild => busybox-1.33.1-r2.ebuild} | 8 ++++++++
25 sys-apps/busybox/busybox-9999.ebuild | 8 ++++++++
26 2 files changed, 16 insertions(+)
27
28 diff --git a/sys-apps/busybox/busybox-1.33.1-r1.ebuild b/sys-apps/busybox/busybox-1.33.1-r2.ebuild
29 similarity index 96%
30 rename from sys-apps/busybox/busybox-1.33.1-r1.ebuild
31 rename to sys-apps/busybox/busybox-1.33.1-r2.ebuild
32 index 19eb891b560..8297592e530 100644
33 --- a/sys-apps/busybox/busybox-1.33.1-r1.ebuild
34 +++ b/sys-apps/busybox/busybox-1.33.1-r2.ebuild
35 @@ -141,6 +141,14 @@ src_configure() {
36 busybox_config_option n FEATURE_VI_REGEX_SEARCH
37 fi
38
39 + # Disable standalone shell mode when using make-symlinks, else Busybox calls its
40 + # applets by default without looking up in PATH.
41 + # This also enables users to disable a builtin by deleting the corresponding symlink.
42 + if use make-symlinks; then
43 + busybox_config_option n FEATURE_PREFER_APPLETS
44 + busybox_config_option n FEATURE_SH_STANDALONE
45 + fi
46 +
47 # If these are not set and we are using a uclibc/busybox setup
48 # all calls to system() will fail.
49 busybox_config_option y ASH
50
51 diff --git a/sys-apps/busybox/busybox-9999.ebuild b/sys-apps/busybox/busybox-9999.ebuild
52 index 19eb891b560..8297592e530 100644
53 --- a/sys-apps/busybox/busybox-9999.ebuild
54 +++ b/sys-apps/busybox/busybox-9999.ebuild
55 @@ -141,6 +141,14 @@ src_configure() {
56 busybox_config_option n FEATURE_VI_REGEX_SEARCH
57 fi
58
59 + # Disable standalone shell mode when using make-symlinks, else Busybox calls its
60 + # applets by default without looking up in PATH.
61 + # This also enables users to disable a builtin by deleting the corresponding symlink.
62 + if use make-symlinks; then
63 + busybox_config_option n FEATURE_PREFER_APPLETS
64 + busybox_config_option n FEATURE_SH_STANDALONE
65 + fi
66 +
67 # If these are not set and we are using a uclibc/busybox setup
68 # all calls to system() will fail.
69 busybox_config_option y ASH