diff options
| author | Changqing Li <changqing.li@windriver.com> | 2024-12-30 15:33:23 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-01-03 11:05:03 +0000 |
| commit | f1f926c70a194cfc90533ab93fe6f05fa2b38e68 (patch) | |
| tree | 38b5c3167fe60b5677df6b0447ed10762e1f6a00 /meta | |
| parent | 577d978f9ca7a46db1cac6b7a66d6d0c413c8f83 (diff) | |
| download | poky-f1f926c70a194cfc90533ab93fe6f05fa2b38e68.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: f82d9c997ba8cc23b472d44a43489c597bf452af)
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>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-core/systemd/systemd_257.1.bb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/recipes-core/systemd/systemd_257.1.bb b/meta/recipes-core/systemd/systemd_257.1.bb index 170c54f6c9..9f9c83a7c3 100644 --- a/meta/recipes-core/systemd/systemd_257.1.bb +++ b/meta/recipes-core/systemd/systemd_257.1.bb | |||
| @@ -245,7 +245,6 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \ | |||
| 245 | -Dsystem-uid-max=999 \ | 245 | -Dsystem-uid-max=999 \ |
| 246 | -Dsystem-alloc-gid-min=101 \ | 246 | -Dsystem-alloc-gid-min=101 \ |
| 247 | -Dsystem-gid-max=999 \ | 247 | -Dsystem-gid-max=999 \ |
| 248 | -Dcreate-log-dirs=false \ | ||
| 249 | ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \ | 248 | ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \ |
| 250 | " | 249 | " |
| 251 | 250 | ||
| @@ -394,6 +393,10 @@ do_install() { | |||
| 394 | # Actively disable Predictable Network Interface Names | 393 | # Actively disable Predictable Network Interface Names |
| 395 | sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link | 394 | sed -i 's/^NamePolicy=.*/NamePolicy=/;s/^AlternativeNamesPolicy=.*/AlternativeNamesPolicy=/' ${D}${nonarch_libdir}/systemd/network/99-default.link |
| 396 | fi | 395 | fi |
| 396 | |||
| 397 | if [ -e ${D}${nonarch_libdir}/tmpfiles.d/legacy.conf ];then | ||
| 398 | sed -i -e '/^L \/var\/log\/README/d' ${D}${nonarch_libdir}/tmpfiles.d/legacy.conf | ||
| 399 | fi | ||
| 397 | } | 400 | } |
| 398 | 401 | ||
| 399 | python populate_packages:prepend (){ | 402 | python populate_packages:prepend (){ |
