busybox: add conditional dependency on libselinux (v2)
PATCH 1/1 busybox: add conditional dependency on libselinux (v2)
If you select the selinux applets when configuring
busybox then the busybox build fails due to a missing selinux.h file. This is because there is no dependency on libselinux in the busybox make. The lack of dependency is completely understandable, since there is no such dependency when a user does not configure in the selinux applets. The attached patch adds a conditional libselinux dependency to the busybox make when the libselinux package has been selected for the target. It is not unreasonable to assume that if a user selects libselinux, then he may also select the busybox selinux applets. Additionally, if the user has already selected libselinux for the target, then adding a dependency to libselinx to busybox does no harm, even if the user does not configure in the selinux applet.
--- package/busybox/busybox.mk | 6 ++++++ 1 file changed, 6 insertions(+)
package/busybox/busybox.mk +6 -0
@@ -25,6 +25,12 @@ BUSYBOX_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/ # the non-final link of modules as well. BUSYBOX_CFLAGS_busybox += -ltirpc endif +# The user may select the selinux support applets. +# We'll assume he's smart enough to select libselinux in that case. +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +BUSYBOX_DEPENDENCIES += libselinux +BUSYBOX_LDFLAGS += -lselinux +endif BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config # Allows the build system to tweak CFLAGS
Signature · 1 line
1.9.1
PATCH 1/1 busybox: add conditional dependency on libselinux (v2)
Dear Chris Stone,
Quoted 12 lines · Chris Stone
If you select the selinux applets when configuring
busybox then the busybox build fails due to a missingselinux.hfile. This is because there is no dependency on libselinux in the busybox make. The lack of dependency is completely understandable, since there is no such dependency when a user does not configure in the selinux applets. The attached patch adds a conditional libselinux dependency to the busybox make when the libselinux package has been selected for the target. It is not unreasonable to assume that if a user selects libselinux, then he may also select the busybox selinux applets. Additionally, if the user has already selected libselinux for the target, then adding a dependency to libselinx to busybox does no harm, even if the user does not configure in the selinux applet.
Quoted 1 line
Signed-off-by Chris Stone <[email protected]>
I think this patch is a duplicate of
https://patchwork.ozlabs.org/patch/427118/, which amongst other patches in the series, add SELinux support to Busybox
.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com