From: Peter Kjellerstedt <pkj@axis.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCHv2 1/2] systemd: Do not install anything in /var/volatile
Date: Wed, 27 Oct 2021 20:05:21 +0200 [thread overview]
Message-ID: <20211027180522.19680-1-pkj@axis.com> (raw)
/var/log is typically a symbolic link to inside /var/volatile, which
is expected to be empty. Check ${VOLATILE_LOG_DIR} to see if it is ok
to install /var/log.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
PATCHv2: Added check for ${VOLATILE_LOG_DIR} before removing /var/log.
meta/recipes-core/systemd/systemd_249.5.bb | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_249.5.bb b/meta/recipes-core/systemd/systemd_249.5.bb
index d87f54bf16..c0c1f9bcfc 100644
--- a/meta/recipes-core/systemd/systemd_249.5.bb
+++ b/meta/recipes-core/systemd/systemd_249.5.bb
@@ -270,13 +270,16 @@ do_install() {
install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_system_unitdir}d-sysv-install
fi
- chown root:systemd-journal ${D}/${localstatedir}/log/journal
-
- # Delete journal README, as log can be symlinked inside volatile.
- rm -f ${D}/${localstatedir}/log/README
+ if "${@'true' if oe.types.boolean(d.getVar('VOLATILE_LOG_DIR')) else 'false'}"; then
+ # /var/log is typically a symbolic link to inside /var/volatile,
+ # which is expected to be empty.
+ rm -rf ${D}${localstatedir}/log
+ else
+ chown root:systemd-journal ${D}${localstatedir}/log/journal
- # journal-remote creates this at start
- rm -rf ${D}/${localstatedir}/log/journal/remote
+ # journal-remote creates this at start
+ rm -rf ${D}${localstatedir}/log/journal/remote
+ fi
install -d ${D}${systemd_system_unitdir}/graphical.target.wants
install -d ${D}${systemd_system_unitdir}/multi-user.target.wants
next reply other threads:[~2021-10-27 18:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 18:05 Peter Kjellerstedt [this message]
2021-10-27 18:05 ` [PATCHv2 2/2] insane.bbclass: Add a check for directories that are expected to be empty Peter Kjellerstedt
2021-10-28 8:22 ` [OE-core] " Martyn Welch
[not found] ` <16B224206AAEB8D4.30289@lists.openembedded.org>
2021-10-28 11:53 ` Martyn Welch
2021-10-28 14:24 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211027180522.19680-1-pkj@axis.com \
--to=pkj@axis.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox