tmpfiles: add --prefix, to only run entries below a path

A package that ships a tmpfiles.d file wants its own paths created
when it is installed, without running every other entry on the
system:

    tmpfiles --create --prefix=/var/lib/app

Add the option, it can be given more than once.  It and
--exclude-prefix compare whole path components now, before
--exclude-prefix=/dev also left out /devices.

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 fb3b13a245
commit 0a2beb9b6d
4 files changed
+54 -6

No files matched your search

+2 -4
View File
@@ -22,10 +22,8 @@ files or common packages already rely on, last what few will miss.
2. 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.
Missing options: `--root`, `--replace`, `--dry-run`, `--purge`,
`--graceful`, and `--cat-config`.
3. Smaller things