From: Uwe Kleine-König Date: Mon, 16 Feb 2026 16:45:27 +0000 (+0100) Subject: busybox: Enable SELinux support if DISTRO_FEATURES contains 'selinux' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c544f12073ea712c3d3ce08105d52640a7a322b9;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git busybox: Enable SELinux support if DISTRO_FEATURES contains 'selinux' If selinux is contained in DISTRO_FEATURES, enable CONFIG_SELINUX which needs a dependency on libselinux. Signed-off-by: Uwe Kleine-König Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index c85117efc8..355c019738 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -4,6 +4,7 @@ HOMEPAGE = "https://www.busybox.net" BUGTRACKER = "https://bugs.busybox.net/" DEPENDS += "kern-tools-native virtual/crypt" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'libselinux', '', d)}" # bzip2 applet in busybox is based on lightly-modified bzip2-1.0.4 source # the GPL is version 2 only @@ -86,6 +87,7 @@ def features_to_busybox_settings(d): busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv4', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem) busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d), 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem) busybox_cfg(bb.utils.contains_any('DISTRO_FEATURES', 'bluetooth wifi', True, False, d), 'CONFIG_RFKILL', cnf, rem) + busybox_cfg(bb.utils.contains('DISTRO_FEATURES', 'selinux', True, False, d), 'CONFIG_SELINUX', cnf, rem) return "\n".join(cnf), "\n".join(rem) # X, Y = ${@features_to_busybox_settings(d)}