* [meta-selinux][PATCH 1/2] layer.conf: add selinux to DISTRO_FEATURES_FILTER_NATIVE
@ 2026-09-15 2:40 chenqi_hycx
2026-09-15 2:41 ` [meta-selinux][PATCH 2/2] coreutils: enable selinux support for native variant chenqi_hycx
0 siblings, 1 reply; 3+ messages in thread
From: chenqi_hycx @ 2026-09-15 2:40 UTC (permalink / raw)
To: yocto-patches; +Cc: joe.macdonald
From: Chen Qi <chenqi_hycx@cetc.com.cn>
Previously, no matter how you set DISTRO_FEATURES, it does not affect
native recipes regarding the selinux ditro feature. Add 'selinux' to
DISTRO_FEATURES_FILTER_NATIVE so that 'selinux' can be filtered into
native recipes' DISTRO_FEATURES.
This enables us to build selinux support for some native utilities,
notably coreutils-native.
This will also bring possible 'regressions' in case some recipes are
enabling selinux for native variable without testing it, e.g., ostree.
But these 'regressions' are really findings of errors of those recipes.
Signed-off-by: Chen Qi <chenqi_hycx@cetc.com.cn>
---
conf/layer.conf | 2 ++
1 file changed, 2 insertions(+)
diff --git a/conf/layer.conf b/conf/layer.conf
index 245b4ef..172a1db 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -25,3 +25,5 @@ LAYERDEPENDS_selinux = " \
"
PREFERRED_PROVIDER_virtual/refpolicy ??= "refpolicy-targeted"
+
+DISTRO_FEATURES_FILTER_NATIVE:append = " selinux"
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [meta-selinux][PATCH 2/2] coreutils: enable selinux support for native variant
2026-09-15 2:40 [meta-selinux][PATCH 1/2] layer.conf: add selinux to DISTRO_FEATURES_FILTER_NATIVE chenqi_hycx
@ 2026-09-15 2:41 ` chenqi_hycx
2026-09-15 6:56 ` [yocto-patches] " Jörg Sommer
0 siblings, 1 reply; 3+ messages in thread
From: chenqi_hycx @ 2026-09-15 2:41 UTC (permalink / raw)
To: yocto-patches; +Cc: joe.macdonald
From: Chen Qi <chenqi_hycx@cetc.com.cn>
It's really a common task to check selinux labels for rootfs to ensure
that files are labelled correctly. To do this, coreutils-native
needs to have libselinux linked to make commands such as 'ls -Z' work
as expected.
Signed-off-by: Chen Qi <chenqi_hycx@cetc.com.cn>
---
recipes-core/coreutils/coreutils_%.bbappend | 2 ++
1 file changed, 2 insertions(+)
diff --git a/recipes-core/coreutils/coreutils_%.bbappend b/recipes-core/coreutils/coreutils_%.bbappend
index 74e22b3..21de5a7 100644
--- a/recipes-core/coreutils/coreutils_%.bbappend
+++ b/recipes-core/coreutils/coreutils_%.bbappend
@@ -1 +1,3 @@
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)}
+
+PACKAGECONFIG:class-native:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [yocto-patches] [meta-selinux][PATCH 2/2] coreutils: enable selinux support for native variant
2026-09-15 2:41 ` [meta-selinux][PATCH 2/2] coreutils: enable selinux support for native variant chenqi_hycx
@ 2026-09-15 6:56 ` Jörg Sommer
0 siblings, 0 replies; 3+ messages in thread
From: Jörg Sommer @ 2026-09-15 6:56 UTC (permalink / raw)
To: yocto-patches, Chen Qi; +Cc: joe.macdonald
[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]
Chen Qi via lists.yoctoproject.org schrieb am Di 15. Sep, 10:41 (+0800):
> From: Chen Qi <chenqi_hycx@cetc.com.cn>
>
> It's really a common task to check selinux labels for rootfs to ensure
> that files are labelled correctly. To do this, coreutils-native
> needs to have libselinux linked to make commands such as 'ls -Z' work
> as expected.
>
> Signed-off-by: Chen Qi <chenqi_hycx@cetc.com.cn>
> ---
> recipes-core/coreutils/coreutils_%.bbappend | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/recipes-core/coreutils/coreutils_%.bbappend b/recipes-core/coreutils/coreutils_%.bbappend
> index 74e22b3..21de5a7 100644
> --- a/recipes-core/coreutils/coreutils_%.bbappend
> +++ b/recipes-core/coreutils/coreutils_%.bbappend
> @@ -1 +1,3 @@
> inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)}
> +
> +PACKAGECONFIG:class-native:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
Would `bb.utils.filter('DISTRO_FEATURES', 'selinux', d)` be better?
--
Navimatix GmbH T: 03641 - 327 99 0
Tatzendpromenade 2 F: 03641 - 526 306
07745 Jena www.navimatix.de
Geschäftsführer: Steffen Späthe, Jan Rommeley
Registergericht: Amtsgericht Jena, HRB 501480
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6684 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-15 6:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 2:40 [meta-selinux][PATCH 1/2] layer.conf: add selinux to DISTRO_FEATURES_FILTER_NATIVE chenqi_hycx
2026-09-15 2:41 ` [meta-selinux][PATCH 2/2] coreutils: enable selinux support for native variant chenqi_hycx
2026-09-15 6:56 ` [yocto-patches] " Jörg Sommer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.