From patchwork Fri Nov 6 04:54:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Qi X-Patchwork-Id: 103208 Received: from cetc.com.cn (cetc.com.cn [220.181.39.39]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.13858.1793940891869011586 for ; Thu, 05 Nov 2026 20:54:52 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: cetc.com.cn, ip: 220.181.39.39, mailfrom: chenqi_hycx@cetc.com.cn) Received: from mail.cetc.com.cn (unknown [123.125.172.206]) by mtasvr (Coremail) with SMTP id _____wC3K9wmXe1qrJoDAA--.17855S3; Fri, 06 Nov 2026 12:52:54 +0800 (CST) Received: from chenqi-Redmi.. (unknown [123.125.172.206]) by front01 (Coremail) with SMTP id C6CowADnd2jIXO1qmt8tAA--.32741S6; Fri, 06 Nov 2026 12:51:33 +0800 (CST) From: chenqi_hycx@cetc.com.cn To: yocto-patches@lists.yoctoproject.org Cc: chen_q07@163.com Subject: [meta-selinux][wrynose][PATCH 5/5] packagegroup/selinux: require selinux-init only for sysvinit Date: Fri, 6 Nov 2026 12:54:25 +0800 Message-ID: <20261106045426.2536283-5-chenqi_hycx@cetc.com.cn> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261106045426.2536283-1-chenqi_hycx@cetc.com.cn> References: <20261106045426.2536283-1-chenqi_hycx@cetc.com.cn> MIME-Version: 1.0 X-CM-TRANSID: C6CowADnd2jIXO1qmt8tAA--.32741S6 X-CM-SenderInfo: xfkh015lbk5un06fv33fof0zgofq/1tbiAQYDCmrsh9MP1gAAsF X-CM-DELIVERINFO: =?B?f8jxRKc9tbm9bwt5VqgwP2Pu2dSP9LtrOQxHOAXUJl/eWtrOBydmTZkAAV6p44o2Ir PoOAN5QhYBP/Hfs96vmoQs/I/RZF56e3gwBw0xvh1O7Js5QTXW7if5QssHGo8EUxkXDz1x X++nEIhAyYYkmh3FyN5eZhTX8ruI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jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI 43ZEXa7IU86bytUUUUU== List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 06 Nov 2026 04:55:01 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/5250 From: Chen Qi 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 --- recipes-security/packagegroups/packagegroup-core-selinux.bb | 2 +- recipes-security/packagegroups/packagegroup-selinux-minimal.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 \ "