1 |
commit: 1996eeb8f05fc7ebc0994952aff9d8ee3ccb8292 |
2 |
Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Apr 23 09:38:06 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 30 21:40:16 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1996eeb8 |
7 |
|
8 |
sys-apps/busybox: Fix warning with USE -selinux |
9 |
|
10 |
Closes: https://bugs.gentoo.org/620918 |
11 |
Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com> |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
sys-apps/busybox/busybox-1.34.1-r1.ebuild | 7 +++++-- |
15 |
.../files/busybox-1.34.1-skip-selinux-search.patch | 21 +++++++++++++++++++++ |
16 |
2 files changed, 26 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/sys-apps/busybox/busybox-1.34.1-r1.ebuild b/sys-apps/busybox/busybox-1.34.1-r1.ebuild |
19 |
index 80086ac713ca..3e57307d25b6 100644 |
20 |
--- a/sys-apps/busybox/busybox-1.34.1-r1.ebuild |
21 |
+++ b/sys-apps/busybox/busybox-1.34.1-r1.ebuild |
22 |
@@ -72,6 +72,7 @@ busybox_config_enabled() { |
23 |
# patches go here! |
24 |
PATCHES=( |
25 |
"${FILESDIR}"/${PN}-1.26.2-bb.patch |
26 |
+ "${FILESDIR}"/${PN}-1.34.1-skip-selinux-search.patch |
27 |
# "${FILESDIR}"/${P}-*.patch |
28 |
) |
29 |
|
30 |
@@ -114,12 +115,14 @@ src_configure() { |
31 |
ewarn "Could not locate user configfile, so we will save a default one" |
32 |
fi |
33 |
|
34 |
+ # setting SKIP_SELINUX skips searching for selinux at this stage. We don't |
35 |
+ # need to search now in case we end up not needing it after all. |
36 |
# setup the config file |
37 |
- emake -j1 -s allyesconfig >/dev/null |
38 |
+ emake -j1 -s allyesconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 |
39 |
# nommu forces a bunch of things off which we want on #387555 |
40 |
busybox_config_option n NOMMU |
41 |
sed -i '/^#/d' .config |
42 |
- yes "" | emake -j1 -s oldconfig >/dev/null |
43 |
+ yes "" | emake -j1 -s oldconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 |
44 |
|
45 |
# now turn off stuff we really don't want |
46 |
busybox_config_option n DMALLOC |
47 |
|
48 |
diff --git a/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch b/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch |
49 |
new file mode 100644 |
50 |
index 000000000000..6fe043bf39e4 |
51 |
--- /dev/null |
52 |
+++ b/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch |
53 |
@@ -0,0 +1,21 @@ |
54 |
+Setting SKIP_SELINUX skips searching for selinux. The current ebuild calls |
55 |
+make 3 times. The first 2 times we don't need to search for selinux packages |
56 |
+because we might end up not needing them and we get useless warnings. |
57 |
+ |
58 |
+--- a/Makefile.flags |
59 |
++++ b/Makefile.flags |
60 |
+@@ -176,12 +176,14 @@ |
61 |
+ LDLIBS += pam pam_misc |
62 |
+ endif |
63 |
+ |
64 |
++ifneq ($(SKIP_SELINUX),y) |
65 |
+ ifeq ($(CONFIG_SELINUX),y) |
66 |
+ SELINUX_PC_MODULES = libselinux libsepol |
67 |
+ $(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES))) |
68 |
+ CPPFLAGS += $(SELINUX_CFLAGS) |
69 |
+ LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%)) |
70 |
+ endif |
71 |
++endif |
72 |
+ |
73 |
+ ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y) |
74 |
+ ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine))) |