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

+6
View File
@@ -15,6 +15,12 @@ All relevant changes are documented in this file.
skipped unless the new `--boot` option is given. Finit gives it at
boot, and now also `--remove`, so `r`, `R`, and `D` entries take effect
at boot and no longer need a separate call
- tmpfiles: add the `%` specifiers of tmpfiles.d(5) for the path, and for
the argument of `C`, `f`, `F`, `L`, and `w` entries: `%b`, `%m`, `%H`,
`%l`, `%v`, the directories `%t`, `%T`, `%V`, `%S`, `%C`, `%L`, `%h`,
and the user ones `%u`, `%U`, `%g`, `%G`. Before, an entry with a `%`
in the path was skipped. **Note:** a literal `%` in such an argument,
e.g. in a `w` entry for `core_pattern`, must now be written `%%`
- tmpfiles: the `v`, `q`, and `Q` entries now make a plain directory, like
`d`. Finit has no support for btrfs subvolumes, and before the entries
were skipped as unsupported