tmpfiles: add the specifiers for the OS release and architecture

An entry with %a, or one of the specifiers that come from os-release,
was skipped as unsupported:

    d /var/lib/app/%o-%w 0755 - - -

Add %o, %w, %W, %B, %M, and %A, read from /etc/os-release with
/usr/lib/os-release as fallback, and %a with the names tmpfiles.d(5)
has for the architectures.  A field that os-release lacks gives an
empty string, as in tmpfiles.d(5).  An entry is still skipped when
the architecture is not one of those known.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 18:35:36 +01:00
1 parent bccd04d81d
commit fb3b13a245
6 files changed
+113 -22

No files matched your search

+3 -4
View File
@@ -23,10 +23,9 @@ For your convenience a set of *optional* plugins are available:
file systems must be writable for this plugin to work.
This plugin is a wrapper for the [tmpfiles.d(5)][] implementation that
Finit has. Capable but limited: no attributes or subvolumes, and
of the `%` specifiers not those for the OS release and architecture.
It runs `tmpfiles --create --remove --boot`, so entries marked
boot-only with a `!` are run here and at no other time.
Finit has. Capable but limited: no attributes or subvolumes. It
runs `tmpfiles --create --remove --boot`, so entries marked boot-only
with a `!` are run here and at no other time.
By default, `/lib/finit/tmpfiles.d` carries all the default .conf
files distributed with Finit. It is read first but can be overridden