summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniko.mauno@vaisala.com <niko.mauno@vaisala.com>2022-09-05 12:26:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-08 14:59:39 +0100
commit685de2f859312015aa6bc3c8ca822609d816a1f0 (patch)
tree8b5edf955367b65435eb102bb99db644d2763b9e
parentb3b3137754161f5ff59a3cb42d051362637794f3 (diff)
downloadpoky-685de2f859312015aa6bc3c8ca822609d816a1f0.tar.gz
systemd: Fix unwritable /var/lock when no sysvinit handling
Commit 8089cefed8e83c0348037768c292058f1bcbbbe5 ("systemd: Add PACKAGECONFIG for sysvinit") decoupled enabling of systemd's sysvinit handling behavior behind a distinct PACKAGECONFIG feature. This new option affects among other things the installing of tmpfiles.d/legacy.conf, which is responsible for creating /run/lock directory, which is pointed to by /var/lock symlink provided by base-files package. In case the option is not enabled, then base-files provided /var/lock is a dangling symlink on resulting rootfs, causing problems with certain Linux userspace components that rely on existence of writable /var/lock directory. As an example: # fw_printenv Error opening lock file /var/lock/fw_printenv.lock Since Filesystem Hierarchy Standard Version 3.0 states in https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s09.html that Lock files should be stored within the /var/lock directory structure. Ensure the /run/lock directory is always created, so that lock files can be stored under /var/lock also when 'sysvinit' handling is disabled. (From OE-Core rev: 85e5ee2c35cf5778c3aefda45f526e8f6a511131) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/systemd/systemd/00-create-volatile.conf1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
index 87cbe1e7d3..c4277221a2 100644
--- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf
+++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
@@ -3,5 +3,6 @@
3# inside /var/log. 3# inside /var/log.
4 4
5 5
6d /run/lock 1777 - - -
6d /var/volatile/log - - - - 7d /var/volatile/log - - - -
7d /var/volatile/tmp 1777 - - 8d /var/volatile/tmp 1777 - -