diff mbox series

[meta-selinux] packagegroup/selinux: require selinux-init only for sysvinit

Message ID 20260910024155.2152398-1-chenqi_hycx@cetc.com.cn
State New
Headers show
Series [meta-selinux] packagegroup/selinux: require selinux-init only for sysvinit | expand

Commit Message

Chen Qi Sept. 10, 2026, 2:41 a.m. UTC
From: Chen Qi <chenqi_hycx@cetc.com.cn>

The selinux-init for systemd is quite misleading. systemd itself
can load selinux policies. Extra userspace tools are not needed
for systemd.

In fact, the init script does nothing but only checks some tools.
And the result can be misleading as these tool are not necessary
for systemd.

Signed-off-by: Chen Qi <chenqi_hycx@cetc.com.cn>
---
 recipes-security/packagegroups/packagegroup-core-selinux.bb    | 2 +-
 recipes-security/packagegroups/packagegroup-selinux-minimal.bb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/recipes-security/packagegroups/packagegroup-core-selinux.bb b/recipes-security/packagegroups/packagegroup-core-selinux.bb
index 148c8a2..b5dc1e4 100644
--- a/recipes-security/packagegroups/packagegroup-core-selinux.bb
+++ b/recipes-security/packagegroups/packagegroup-core-selinux.bb
@@ -20,7 +20,7 @@  RDEPENDS:${PN} = " \
 	setools \
 	setools-console \
 	selinux-autorelabel \
-	selinux-init \
+	${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'selinux-init', '', d)} \
 	selinux-labeldev \
 	refpolicy \
 	coreutils \
diff --git a/recipes-security/packagegroups/packagegroup-selinux-minimal.bb b/recipes-security/packagegroups/packagegroup-selinux-minimal.bb
index f06b183..b8e2825 100644
--- a/recipes-security/packagegroups/packagegroup-selinux-minimal.bb
+++ b/recipes-security/packagegroups/packagegroup-selinux-minimal.bb
@@ -20,7 +20,7 @@  RDEPENDS:${PN} = "\
 	policycoreutils-sestatus \
 	policycoreutils-setfiles \
 	selinux-autorelabel \
-	selinux-init \
+	${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'selinux-init', '', d)} \
 	selinux-labeldev \
 	refpolicy \
 "