commit: 1996eeb8f05fc7ebc0994952aff9d8ee3ccb8292 Author: Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com> AuthorDate: Sat Apr 23 09:38:06 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Jun 30 21:40:16 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1996eeb8
sys-apps/busybox: Fix warning with USE -selinux Closes: https://bugs.gentoo.org/620918 Signed-off-by: Viorel Munteanu <ceamac.paragon <AT> gmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> sys-apps/busybox/busybox-1.34.1-r1.ebuild | 7 +++++-- .../files/busybox-1.34.1-skip-selinux-search.patch | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/sys-apps/busybox/busybox-1.34.1-r1.ebuild b/sys-apps/busybox/busybox-1.34.1-r1.ebuild index 80086ac713ca..3e57307d25b6 100644 --- a/sys-apps/busybox/busybox-1.34.1-r1.ebuild +++ b/sys-apps/busybox/busybox-1.34.1-r1.ebuild @@ -72,6 +72,7 @@ busybox_config_enabled() { # patches go here! PATCHES=( "${FILESDIR}"/${PN}-1.26.2-bb.patch + "${FILESDIR}"/${PN}-1.34.1-skip-selinux-search.patch # "${FILESDIR}"/${P}-*.patch ) @@ -114,12 +115,14 @@ src_configure() { ewarn "Could not locate user configfile, so we will save a default one" fi + # setting SKIP_SELINUX skips searching for selinux at this stage. We don't + # need to search now in case we end up not needing it after all. # setup the config file - emake -j1 -s allyesconfig >/dev/null + emake -j1 -s allyesconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 # nommu forces a bunch of things off which we want on #387555 busybox_config_option n NOMMU sed -i '/^#/d' .config - yes "" | emake -j1 -s oldconfig >/dev/null + yes "" | emake -j1 -s oldconfig SKIP_SELINUX=$(usex selinux n y) >/dev/null #620918 # now turn off stuff we really don't want busybox_config_option n DMALLOC 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 new file mode 100644 index 000000000000..6fe043bf39e4 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.34.1-skip-selinux-search.patch @@ -0,0 +1,21 @@ +Setting SKIP_SELINUX skips searching for selinux. The current ebuild calls +make 3 times. The first 2 times we don't need to search for selinux packages +because we might end up not needing them and we get useless warnings. + +--- a/Makefile.flags ++++ b/Makefile.flags +@@ -176,12 +176,14 @@ + LDLIBS += pam pam_misc + endif + ++ifneq ($(SKIP_SELINUX),y) + ifeq ($(CONFIG_SELINUX),y) + SELINUX_PC_MODULES = libselinux libsepol + $(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES))) + CPPFLAGS += $(SELINUX_CFLAGS) + LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%)) + endif ++endif + + ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y) + ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine)))