diff mbox series

[meta-oe,53/55] rasdaemon: Fix installed-vs-shipped on sysvinit without usrmerge

Message ID 20261125080732.2419614-59-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-multimedia] clightd: Port ALS sensor to libiio 1.0 | expand

Commit Message

Khem Raj Nov. 25, 2026, 8:07 a.m. UTC
Since 1.0.0 rasdaemon builds with meson, which installs its systemd
units into ${libdir}/systemd/system unless systemd.pc is found in the
sysroot, and systemd is not in DEPENDS. When ${systemd_system_unitdir}
is /lib/systemd/system (no usrmerge), systemd.bbclass removes that
directory on non-systemd distros but not /usr/lib/systemd, and
do_package fails:

  ERROR: rasdaemon-1.0.0-r0 do_package: QA Issue: rasdaemon: Files/directories were installed but not shipped in any package:
    /usr/lib/systemd
    /usr/lib/systemd/system
    /usr/lib/systemd/system/rasdaemon.service
    /usr/lib/systemd/system/ras-mc-ctl.service

Move the units to ${systemd_system_unitdir} when the paths differ, so
systemd.bbclass packages or removes them as usual. This also covers
multilib, where ${libdir} is /usr/lib64.

Tested with sysvinit with and without usrmerge, and with systemd.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../meta-python/recipes-support/rasdaemon/rasdaemon_1.0.0.bb | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-support/rasdaemon/rasdaemon_1.0.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-support/rasdaemon/rasdaemon_1.0.0.bb
index 86eced84a1..ae8e2bc5c9 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-support/rasdaemon/rasdaemon_1.0.0.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-support/rasdaemon/rasdaemon_1.0.0.bb
@@ -49,6 +49,11 @@  PACKAGECONFIG[nvidia-ns-decode] = "-Dnvidia-ns-decode=enabled,-Dnvidia-ns-decode
 PACKAGECONFIG[yitian-ns-decode] = "-Dyitian-ns-decode=enabled,-Dyitian-ns-decode=disabled"
 
 do_install:append() {
+	if [ "${libdir}/systemd/system" != "${systemd_system_unitdir}" ]; then
+		install -d ${D}${systemd_system_unitdir}
+		mv ${D}${libdir}/systemd/system/* ${D}${systemd_system_unitdir}/
+		rm -rf ${D}${libdir}/systemd
+	fi
 	install -d ${D}${sysconfdir}/init.d
 	install -m 755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/rasdaemon
 }