Files
finit/doc/tmpfiles-todo.md
T
Joachim Wiberg 1ef0da9c50 tmpfiles: add the t and T entries, extended attributes
tmpfiles.d(5) has t to set extended attributes on a path, and T for
the path and everything below it:

    t /srv/www - - - - user.mime_type=text/html

tmpfiles skipped them as unsupported.

Add both.  The argument is one or more NAME=VALUE with space between,
a value with space in it goes in quotes.  They are set with
lsetxattr(), a link is never followed.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-11-20 19:10:02 +01:00

1.7 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.

  1. Remaining types and modifiers

  • C+, which is read as C
  • z and Z only set the SELinux label when restorecon is installed
  • h, H for 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
  1. Command line

Missing options: --root, --replace, --dry-run, --purge, --graceful, and --cat-config.

  1. 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.conf in /etc should run before 50-y.conf in /usr/lib
  • a and A handle an ACL of at most 32 entries, a path with more is left as it is, with a warning
  • A new f file without a mode gets what the umask leaves of 0666, it should be 0644
  • A d or e entry for a path that is a link to a directory warns that mode and owner could not be set
  • An x or X entry with an age should have what it names cleaned by that age, the age is not read
  • A w entry with a glob that matches several paths writes its argument only up to the first backslash for all but the first, write_arg() cuts the argument up as it goes
  • The %T and %V specifiers are always /tmp and /var/tmp, they do not look at $TMPDIR
  • mksubsys() in src/util.c is unused