]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd: fix dead link /var/log/README
authorChangqing Li <changqing.li@windriver.com>
Thu, 7 Mar 2024 06:56:38 +0000 (22:56 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 Mar 2024 12:12:58 +0000 (12:12 +0000)
There are 2 issues here:
First, in package systemd, there is a file /usr/lib/tmpfile.d/legacy.conf,
which will create a symlink to /usr/share/doc/systemd/README.logs during
boot time. But for oe, /usr/share/doc/systemd/README.logs is packaged in
systemd-doc, which will make /var/log/README is dead link.

Second, the symlink /var/log/README in legacy.conf use relative path:
"L /var/log/README - - - - ../../usr/share/doc/systemd/README.logs"
But for oe, when VOLATILE_LOG_DIR is true, /var/log is a link to
/var/volatile/log, so /var/log/README need link to
../../../usr/share/doc/systemd/README.logs, while VOLATILE_LOG_DIR is
false, /var/log is a dir, so /var/log/README need link to
../../usr/share/doc/systemd/README.logs. So current symlink in
legacy.conf will also make it a dead link when VOLATILE_LOG_DIR is true.

Turn off CREATE_LOG_DIRS to avoid these issues.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd_255.4.bb

index a907d60e84ed6a8667f060f781c3bf796ccff69e..9fd7eccb385c15e2c1c3b568636da04243198427 100644 (file)
@@ -247,6 +247,7 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
                   -Dsystem-uid-max=999 \
                   -Dsystem-alloc-gid-min=101 \
                   -Dsystem-gid-max=999 \
+                  -Dcreate-log-dirs=false \
                   "
 
 # Hardcode target binary paths to avoid using paths from sysroot or worse