summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2024-12-30 15:33:23 +0800
committerSteve Sakoman <steve@sakoman.com>2025-01-18 06:26:45 -0800
commit2240b92d62618d6125bd825647392d3bb5a2d038 (patch)
treea9d59d305d41d1f62e4f482087c714167c0084d6
parent9794a5ad9ef39672cc059e18dabc7469aa93760c (diff)
downloadpoky-2240b92d62618d6125bd825647392d3bb5a2d038.tar.gz
systemd: enable create-log-dirs
By default, create-log-dirs is enabled in systemd, and a link /var/log/README will be created, point to {{DOC_DIR}}/README.logs, but, for oe, there are two problems here, firstly, DOC_DIR is packaged in another package systemd-doc, so /var/log/README is a dead link when systemd-doc is not installed, secondly, even systemd-doc is installed, when volatile log is used, DOC_DIR is a wrong relateive path, Refer [1]. So in commit [2], we disable create-log-dirs for above issue. with this change, /var/log/journal is not created, and /run/log is used, this makes systemd log always non persistent, refer [3][4]. if user need persistent log, they need to disable volatile log, and also change journald.conf, make "Storage" to "persistent". This is a behavoir change. Previously, to make systemd log persistent, user only need to disable volatile log. This commit reenable create-log-dirs to revert the behavior change, and since README is not very userful, just remove it. [ YOCTO #15678 ] [1] https://github.com/systemd/systemd/blob/main/tmpfiles.d/legacy.conf.in#L16 [2] https://git.openembedded.org/openembedded-core/commit/?id=18d46e11d85da1f6feaba5a135931e43060024d6 [3] https://github.com/systemd/systemd/blob/main/src/journal/meson.build#L189 [4] https://www.freedesktop.org/software/systemd/man/journald.conf.html [5] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15678 (From OE-Core rev: 92eea72a25e553c698bee9e3f551a5880bd4631c) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f82d9c997ba8cc23b472d44a43489c597bf452af) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-core/systemd/systemd_255.13.bb5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd_255.13.bb b/meta/recipes-core/systemd/systemd_255.13.bb
index fa3ad1d2cd..8f5170929f 100644
--- a/meta/recipes-core/systemd/systemd_255.13.bb
+++ b/meta/recipes-core/systemd/systemd_255.13.bb
@@ -248,7 +248,6 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
248 -Dsystem-uid-max=999 \ 248 -Dsystem-uid-max=999 \
249 -Dsystem-alloc-gid-min=101 \ 249 -Dsystem-alloc-gid-min=101 \
250 -Dsystem-gid-max=999 \ 250 -Dsystem-gid-max=999 \
251 -Dcreate-log-dirs=false \
252 ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \ 251 ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \
253 " 252 "
254 253
@@ -401,6 +400,10 @@ do_install() {
401 sed -i '/AlternativeNamesPolicy=/s/$/ mac/' ${D}${rootlibexecdir}/systemd/network/99-default.link 400 sed -i '/AlternativeNamesPolicy=/s/$/ mac/' ${D}${rootlibexecdir}/systemd/network/99-default.link
402 fi 401 fi
403 fi 402 fi
403
404 if [ -e ${D}${nonarch_libdir}/tmpfiles.d/legacy.conf ];then
405 sed -i -e '/^L \/var\/log\/README/d' ${D}${nonarch_libdir}/tmpfiles.d/legacy.conf
406 fi
404} 407}
405 408
406python populate_packages:prepend (){ 409python populate_packages:prepend (){