diff mbox series

[meta-selinux,PATCH/V2] systemd: remove creation of backlight directory during build

Message ID 20260112053258.3630191-1-quic_jaihindy@quicinc.com
State New
Headers show
Series [meta-selinux,PATCH/V2] systemd: remove creation of backlight directory during build | expand

Commit Message

quic_jaihindy@quicinc.com Jan. 12, 2026, 5:32 a.m. UTC
From: Jaihind Yadav <quic_jaihindy@quicinc.com>

The recipe previously created ${localstatedir}/lib/systemd/backlight at
build time when PACKAGECONFIG included 'backlight'.I Tested it on myboard
and can see directory is correctly labeled by SELinux at runtime and the backlight
service starts successfully without this step. Removing it simplifies
the install process.

Example SELinux labeling:
ls -laZ /var/lib/systemd/
drwxr-xr-x.  2 root root system_u:object_r:systemd_backlight_var_lib_t:s0 backlight

Reference:
Previous discussion and initial change:
https://docs.yoctoproject.org/pipermail/yocto/2018-April/040854.html

Signed-off-by: Jaihind Yadav <quic_jaihindy@quicinc.com>
---
 recipes-core/systemd/systemd_%.bbappend  | 2 +-
 recipes-core/systemd/systemd_selinux.inc | 7 -------
 2 files changed, 1 insertion(+), 8 deletions(-)
 delete mode 100644 recipes-core/systemd/systemd_selinux.inc
diff mbox series

Patch

diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend
index 7719d3b..7c3a686 100644
--- a/recipes-core/systemd/systemd_%.bbappend
+++ b/recipes-core/systemd/systemd_%.bbappend
@@ -1 +1 @@ 
-require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)}
+inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux enable-audit', '', d)}
diff --git a/recipes-core/systemd/systemd_selinux.inc b/recipes-core/systemd/systemd_selinux.inc
deleted file mode 100644
index 7d466ee..0000000
--- a/recipes-core/systemd/systemd_selinux.inc
+++ /dev/null
@@ -1,7 +0,0 @@ 
-inherit enable-selinux enable-audit
-
-do_install:append() {
-	if ${@bb.utils.contains('PACKAGECONFIG', 'backlight', 'true', 'false', d)}; then
-		install -d ${D}${localstatedir}/lib/systemd/backlight
-	fi
-}