A ! after the type marks an entry that is only safe to run at boot.
Finit's own files have them, like this one in x11.conf:
D! /tmp/.X11-unix 1777 root root
tmpfiles ignored the ! and ran these entries on every call, so this
emptied the directory under a running X server:
tmpfiles --remove
Only the character right after the type was looked at, and only for
a +.
Read all the modifiers after the type, in any order, and skip an
entry with ! unless the new --boot option is given. Finit gives it
at boot, together with --remove. Before this the r, R, and D entries
were never run at boot, so "r! /forcefsck" in legacy.conf left the
file in place.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
3.6 KiB
tmpfiles TODO
What tmpfiles lacks compared to tmpfiles.d(5), from a read of
src/tmpfiles.c in November 2026. Ranked: first what Finit's own
files or common packages already rely on, last what few will miss.
- Nothing runs the clean pass
Finit calls tmpfiles --create --remove --boot at boot and nothing
else. The age field has no effect until the user adds a task for
tmpfiles --clean.
- Ship a task for it, systemd runs its timer 15 min after boot and then daily
xandXare accepted but exclude nothing from cleaning- Age
0should clean everything, it is read as no age - Cleaning crosses mount points, it should stay on one file system
- Only one number with
s,m,h,d, orwis read. Missing are1d12h,ms,us, the~prefix, and thea,b,c,mselectors for which timestamps to compare - The age is only used for
d,D, ande
- Prefixes that are silently dropped
- Mode
~0755, mask with the mode the path has, and:0755, only when creating: neither is parsed, the entry is read as having no mode - User and group
:name, only when creating: looked up as the name:name, which fails. Fordthe directory is then not created - An unknown group becomes root, an unknown user makes
dskip the entry whileeandfgo on. Warn and leave the owner alone in all of them
- Mode and owner not applied
fon a file that exists: the entry is skipped, tmpfiles.d(5) still adjusts mode and ownerp,b,c: ownerC: mode and ownerz,Z: mode and owner, and they do nothing withoutrestorecon
- Device nodes with major or minor 0
parse_mm() rejects a 0 in either number, so an entry like this one
is skipped:
c /dev/tty 0666 root tty - 5:0
- Subvolumes
v, q, and Q are skipped as unsupported. systemd makes a plain
directory when the file system is not btrfs, doing the same gets
distribution files with these entries to work.
- Specifiers
A path with % in it is skipped, also the escaped %%. The ones that
show up in files from distributions are %b (boot ID), %m (machine
ID), %H (hostname), %v (kernel release), and for the argument %T
and %V. This is the largest gap for using such files unchanged, and
the most work.
- Remaining types and modifiers
L?, andC+, which is read asCt,Tfor extended attributes andh,Hfor file attributes- Modifiers
-(do not fail),=(remove what is of another type),~(base64 argument), and^(credential as argument) - Quoted paths, a path with a space in it cannot be written
- Command line
Missing options: --prefix, --root, --replace, --dry-run,
--purge, --graceful, and --cat-config. Of these --prefix
is the useful one, for packages that run tmpfiles --create on only
their own paths.
- Smaller things
- Files are processed one directory at a time. tmpfiles.d(5) sorts
all of them by name, whatever directory they are in, so
00-x.confin/etcshould run before50-y.confin/usr/lib doc/README.md,doc/index.md, anddoc/plugins.mdsay there is no aging. There is, see 1 aboveaandAhandle an ACL of at most 32 entries, a path with more is left as it is, with a warningmksubsys()insrc/util.cis unused