tmpfiles: keep what x and X entries name from being cleaned

The x and X entries were read and ignored, so a path that a package
had marked to be left alone was cleaned like the rest:

    d /var/tmp      - - - 30d
    x /var/tmp/keep

    tmpfiles --clean t.conf

This removed what was old in /var/tmp/keep.

Gather the x and X entries of all files in a pass before the cleaning,
they may come after the entry they apply to, or in another file.  x
keeps the path and what is in it, X the path alone.  A directory that
is not empty afterwards is no longer warned about.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 18:02:36 +01:00
1 parent 9392f2082e
commit 60cd11ab23
3 files changed
+77 -7

No files matched your search

+2
View File
@@ -15,6 +15,8 @@ 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: the `x` and `X` entries now keep paths from being cleaned by
`tmpfiles --clean`, before they were read and ignored
- tmpfiles: add the `a`, `a+`, `A`, and `A+` entries for POSIX ACLs, used
by for example the tpm2-tss package. Finit sets them itself, no need
for libacl or `setfacl`