tmpfiles: add the C+ entry, copy to a directory that is not empty

A C entry leaves a directory alone when there is something in it.  In
tmpfiles.d(5) a C+ entry copies to it anyway: what the directory lacks
is added, and what it has is not overwritten.

    C+ /etc/skel - - - - /usr/share/factory/etc/skel

tmpfiles reads C+ as C.  Let the + through to copy_tree().

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-21 17:14:04 +01:00
1 parent 7b3b217e60
commit 37cbc12946
4 files changed
+13 -3

No files matched your search

+2
View File
@@ -43,6 +43,8 @@ All relevant changes are documented in this file.
- tmpfiles: an `x` or `X` entry with an age now has what it keeps cleaned
by that age, as in `x /tmp/build 30d` below a `/tmp` cleaned after ten
days. Before the age was not read
- tmpfiles: add the `C+` entry, which also copies to a directory that has
something in it. What is missing is added, nothing is overwritten
- tmpfiles: add `--prefix=PATH`, to only run the entries for paths below
it. `--prefix` and `--exclude-prefix` match whole path components,
`--exclude-prefix=/dev` no longer skips `/devices`
-1
View File
@@ -11,7 +11,6 @@ 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
* Modifier `=` (remove what is of another type). `-` (do not fail) has
nothing to do, tmpfiles never exits with an error for an entry, and