tmpfiles: add the % specifiers for path and argument

An entry with a % in the path was skipped, and files from
distributions have them:

    d /run/log/journal/%m 2755 root systemd-journal - -

Expand the specifiers that do not need the OS release or the
architecture: %b, %m, %H, %l, %v, the directories %t, %T, %V, %S, %C,
%L, %h, and the user ones %u, %U, %g, %G.  tmpfiles runs as root, so
the last ones are fixed.  An entry with any other specifier is still
skipped.

The argument of C, f, F, L, and w entries is expanded too, as in
tmpfiles.d(5).  A literal % in such an argument must from now on be
written %%.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 18:03:33 +01:00
1 parent 83f4dceb1b
commit b87d235cf7
9 files changed
+176 -15

No files matched your search

+4 -3
View File
@@ -23,9 +23,10 @@ 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, subvolumes, or
specifiers. 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, 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.
By default, `/lib/finit/tmpfiles.d` carries all the default .conf
files distributed with Finit. It is read first but can be overridden