diff mbox series

[v2] systemd: Ship /srv with the package

Message ID 76dba8591b62c041134533386e80d1ed8c04a9fe.1783430496.git.joerg.sommer@navimatix.de
State New
Headers show
Series [v2] systemd: Ship /srv with the package | expand

Commit Message

Jörg Sommer July 7, 2026, 1:21 p.m. UTC
From: Jörg Sommer <joerg.sommer@navimatix.de>

If *volatile-binds* gets removed from RDEPENDS, the /srv directory is not
part of the image, and tmpfiles tries to create it on boot, but fails on a
read-only rootfs:

systemd-tmpfiles: /srv does not exist and cannot be created as the file system is read-only.

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
---
 meta/recipes-core/systemd/systemd_259.5.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/systemd/systemd_259.5.bb b/meta/recipes-core/systemd/systemd_259.5.bb
index 0fbfcaba42..27722f97bb 100644
--- a/meta/recipes-core/systemd/systemd_259.5.bb
+++ b/meta/recipes-core/systemd/systemd_259.5.bb
@@ -266,7 +266,7 @@  do_install() {
 			sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf
 		fi
 	fi
-	install -d ${D}/${base_sbindir}
+	install -d ${D}${base_sbindir} ${D}${servicedir}
 
 	if ! ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'true', 'false', d)}; then
 		# Remove the serial-getty generator and instead use explicit services
@@ -719,6 +719,7 @@  FILES:${PN} = " ${base_bindir}/* \
                 ${exec_prefix}/lib/environment.d \
                 ${exec_prefix}/lib/nvpcr \
                 ${exec_prefix}/lib/pcrlock.d \
+                ${servicedir} \
                 ${localstatedir} \
                 ${nonarch_libdir}/modprobe.d/systemd.conf \
                 ${nonarch_libdir}/modprobe.d/README \