FS#79001 - [filesystem] Consider adding tmpfiles.d entries for the /var directories
Attached to Project:
Arch Linux
Opened by Emil (xexaxo) - Thursday, 06 July 2023, 10:49 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:23 GMT
Opened by Emil (xexaxo) - Thursday, 06 July 2023, 10:49 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:23 GMT
|
Details
Description:
One of my machines has a ro rootfs and designated var/home partitions. Every now and then I would wipe the latter two and effectively "reset" the system. On a follow-up boot after the wiping, I would notice that only some /var directories are restored/recreated. It appears that not all Arch packages have tmpfiles.d snippets for their /var directories. The filesystem being one of them. Can we have the entries added? The attached patch has the complete list - it also includes entries that are a) created/owned by the filesystem package itself but are handled by other pre-existing tmpfiles.d snippets. The latter will result in a couple of warnings such as `/usr/lib/tmpfiles.d/arch.conf:XX: Duplicate line for path "YY", ignoring.` - those are absolutely harmless, although if preferred the entries can dropped. Thanks in advance Additional info: * package version(s) 2023.01.31 |
This task depends upon
Closed by Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:23 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/filesystem/issues/5
Saturday, 25 November 2023, 20:23 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/p ackaging/packages/filesystem/issues/5
The key premise is that if a package owns some tmpfiles (or having the tool that using them) should also own a tmpfiles.d snippet. Obviously some programs/libraries can recreate their tmpfiles on as-needed basis at runtime, which is perfectly understandable.
That would result in robust systems that just work - systemd itself has been capable of doing that for years [1].
If we look at Arch as a whole - `pacman -F /usr/lib/tmpfiles.d | wc -l` - there are over 200 packages doing so already.
[1] https://systemd.io/BUILDING_IMAGES/
Edit:
Answering my own question I think it is 29 of the 214:
dhcpcd
openssh
systemd
amavisd-new
freeipmi
freeradius
gerbera
kafka
libvirt
lighttpd
mailman3
mattermost
moosefs
munge
munin
munin-node
nethack
opensearch
opensearch-dashboards
plocate
prosody
slurm-llnl
swtpm
tang
tomcat10
tomcat8
tomcat9
unrealircd
ziproxy
Not sure I follow - tmpfiles.d supports user/group handling, (re)creating as well as copying from factory.
Looking at this there are few things to consider:
- Which packages do not own a tmpfiles.d snippet? Seemingly 63 packages fall short here.
`comm -12 <(pacman -Fq /var/ | cut -f2 -d'/' | pacman -Fl - | grep tmpfiles.d | cut -f1 -d' ' | sort -u) <(pacman -Fq /var/ | cut -f2 -d'/' | sort -u)` will help here
- Of the ones that do, is it complete?
For that package would need to be fetched and checked via `grep -wr $(pacman -Qql foo | grep ^/var/.) /usr/lib/tmpfiles.d`
- Of the ones that don't, is one provided by another (base/depends) package?
Like "is complete" step, modulo s/fetched/installed/
One could even go further and make this a namcap/lint check ... assuming the idea does not get short down ;-)
[1] https://systemd.io/BUILDING_IMAGES/
[2] https://0pointer.net/blog/projects/stateless.html
Do we have a wiki page which outlines how TODO lists are proposed/executed? Should there be a link to https://archlinux.org/todo/?