* [PATCH] busybox: Enable SELinux support if DISTRO_FEATURES contains 'selinux'
@ 2026-02-16 16:45 "Uwe Kleine-König
2026-02-17 9:13 ` [OE-core] " Yoann Congal
0 siblings, 1 reply; 3+ messages in thread
From: "Uwe Kleine-König @ 2026-02-16 16:45 UTC (permalink / raw)
To: openembedded-core; +Cc: Joe MacDonald, Yi Zhao
If selinux is contained in DISTRO_FEATURES, enable CONFIG_SELINUX which
needs a dependency on libselinux.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
Hello,
this targets oe-core master, but it would be great if it could be
backported to scarthgap which is what I'm currently using.
Best regards
Uwe
meta/recipes-core/busybox/busybox.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index c85117efc80f..355c01973848 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)}
base-commit: 2c20c05b324e5d6564c8554381019170839509bb
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [OE-core] [PATCH] busybox: Enable SELinux support if DISTRO_FEATURES contains 'selinux'
2026-02-16 16:45 [PATCH] busybox: Enable SELinux support if DISTRO_FEATURES contains 'selinux' "Uwe Kleine-König
@ 2026-02-17 9:13 ` Yoann Congal
2026-02-17 16:25 ` "Uwe Kleine-König
0 siblings, 1 reply; 3+ messages in thread
From: Yoann Congal @ 2026-02-17 9:13 UTC (permalink / raw)
To: ukleinek, openembedded-core; +Cc: Joe MacDonald, Yi Zhao
On Mon Feb 16, 2026 at 5:45 PM CET, "Uwe Kleine-König via lists.openembedded.org wrote:
> If selinux is contained in DISTRO_FEATURES, enable CONFIG_SELINUX which
> needs a dependency on libselinux.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
> Hello,
>
> this targets oe-core master, but it would be great if it could be
> backported to scarthgap which is what I'm currently using.
Hello,
Thank you for the patch. However, this is a new feature and would change
behavior for users of BusyBox and SELinux. Therefore, I cannot take this
patch for Scarthgap.
Regards,
>
> Best regards
> Uwe
>
> meta/recipes-core/busybox/busybox.inc | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
> index c85117efc80f..355c01973848 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)}
>
> base-commit: 2c20c05b324e5d6564c8554381019170839509bb
--
Yoann Congal
Smile ECS
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [OE-core] [PATCH] busybox: Enable SELinux support if DISTRO_FEATURES contains 'selinux'
2026-02-17 9:13 ` [OE-core] " Yoann Congal
@ 2026-02-17 16:25 ` "Uwe Kleine-König
0 siblings, 0 replies; 3+ messages in thread
From: "Uwe Kleine-König @ 2026-02-17 16:25 UTC (permalink / raw)
To: Yoann Congal; +Cc: openembedded-core, Joe MacDonald, Yi Zhao
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
Hello Yoann,
On Tue, Feb 17, 2026 at 10:13:24AM +0100, Yoann Congal wrote:
> On Mon Feb 16, 2026 at 5:45 PM CET, "Uwe Kleine-König via lists.openembedded.org wrote:
> > this targets oe-core master, but it would be great if it could be
> > backported to scarthgap which is what I'm currently using.
>
> Thank you for the patch. However, this is a new feature and would change
> behavior for users of BusyBox and SELinux. Therefore, I cannot take this
> patch for Scarthgap.
That's what I expected, thanks for the confirmation.
In my current usecase this mostly for debugging, so I can cope and I'm
happy if this change makes it into the development branch.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-17 17:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 16:45 [PATCH] busybox: Enable SELinux support if DISTRO_FEATURES contains 'selinux' "Uwe Kleine-König
2026-02-17 9:13 ` [OE-core] " Yoann Congal
2026-02-17 16:25 ` "Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox