Greetings @jarndraugr,
Thank you for bringing this to our attention. Something is definitely off here. On 7.2.0 I can confirm the following.
There is a symlink from /var/log
to /var/volatile/log
:
$ ls -l /var/log
lrwxrwxrwx 1 root root 17 May 10 00:11 /var/log -> /var/volatile/log
But, /var/volatile/log
doesn’t actually exist in any form:
$ ls -l /var/volatile/
total 0
Furthermore, checking the logs for systemd-tmpfiles-setup.service
I see the following:
Jan 08 18:22:59 verdin-imx8mp-06849059 systemd-tmpfiles[451]: Failed to open path '/var/log': No such file or directory
Jan 08 18:22:59 verdin-imx8mp-06849059 systemd-tmpfiles[451]: Failed to open path '/var/log': No such file or directory
Jan 08 18:22:59 verdin-imx8mp-06849059 systemd-tmpfiles[451]: Failed to open path '/var/log': No such file or directory
Jan 08 18:22:59 verdin-imx8mp-06849059 systemd-tmpfiles[451]: Failed to open path '/var/log': No such file or directory
Comparing with our version 6.8.2. OS based on Kirkstone I see the following. I see the following:
The symlink start and endpoints actually exist. There’s no errors in the service and the file has it’s usual contents plus the line we append in our bbappend:
cat /etc/tmpfiles.d/00-create-volatile.conf
#This goes hand-in-hand with the base-files of OE-Core. The file must
# be sorted before 'systemd.conf' becuase this attempts to create a file
# inside /var/log.
d /run/lock 1777 - - -
d /var/volatile/log - - - -
d /var/volatile/tmp 1777 - -
L+ /var/log - - - - /var/volatile/log
This file gets installed by the base systemd recipe in openembedded-core, and we just add that last line to it in our bbappend. Therefore something must have changed in the base systemd recipe in Scarthgap. Looking at the recipes between the two versions I see the issue now.
In Kirkstone the recipe had this line to install the file:
install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
This led to it being installed in /etc/tmpfiles.d
which we append to.
Now in Scarthgap it was changed to:
install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${nonarch_libdir}/tmpfiles.d/
Which leads to it being installed in /usr/lib/tmpfiles.d
instead. Which is okay, but we need to update our bbappend to append the additional line to the new install location. Right now it’s appending to the old location which creates a new file instead since nothing is there anymore by default.
Well that was an interesting issue to investigate, I’ll create a ticket for our team to review and update our bbappend. Thank you again for bringing this to our attention.
Best Regards,
Jeremias