All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] systemd: fix journald persistency when VOLATILE_LOG_DIR is false
@ 2024-10-24 11:41 Esben Haabendal
  2024-10-24 12:58 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Esben Haabendal @ 2024-10-24 11:41 UTC (permalink / raw)
  To: Changqing Li; +Cc: openembedded-core, Esben Haabendal

Commit 18d46e11d85d ("systemd: fix dead link /var/log/README") broke the
default systemd behavior when VOLATILE_LOG_DIR is set to false.

By not creating the /var/log/journal directory, the default configured
systemd (Storage=auto) will silently revert to just doing volatile
logging (/run/journal).

The problem fixed with the above mentioned commit was specifically related
to configurations where VOLATILE_LOG_DIR is true, in which case it should
be perfectly fine to not create the /var/log/journal directory, so we
should be able to keep the fix in place, while not breaking behavior for
non VOLATILE_LOG_DIR configurations.

Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 meta/recipes-core/systemd/systemd_256.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_256.6.bb b/meta/recipes-core/systemd/systemd_256.6.bb
index 68f15ab065dd5985e4e5cefc2cd005dba5ac9c7f..88ee0c8a7f89726fc9be489f3fc419f9feb37251 100644
--- a/meta/recipes-core/systemd/systemd_256.6.bb
+++ b/meta/recipes-core/systemd/systemd_256.6.bb
@@ -254,7 +254,7 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
                   -Dsystem-uid-max=999 \
                   -Dsystem-alloc-gid-min=101 \
                   -Dsystem-gid-max=999 \
-                  -Dcreate-log-dirs=false \
+                  ${@ '-Dcreate-log-dirs=false' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else '' } \
                   ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', '-Ddefault-mdns=no -Ddefault-llmnr=no', '', d)} \
                   "
 

---
base-commit: 8278d82d8203212bb159eb3805d4a5617c5370df
change-id: 20241024-systemd-create-log-dirs-6f74021fc529

Best regards,
-- 
Esben Haabendal <esben@geanix.com>



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-10-25  6:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-24 11:41 [PATCH] systemd: fix journald persistency when VOLATILE_LOG_DIR is false Esben Haabendal
2024-10-24 12:58 ` [OE-core] " Richard Purdie
2024-10-24 14:29   ` Esben Haabendal
2024-10-24 22:02     ` Richard Purdie
2024-10-25  6:05       ` Esben Haabendal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.