tmpfiles: make a directory for v, q, and Q entries

Files from distributions use v, q, and Q for directories that should
be btrfs subvolumes when that is possible:

    v /var/lib/machines 0700 - - -

tmpfiles skipped them as unsupported, so the directory was missing.

On a file system without subvolumes tmpfiles.d(5) has them make a
plain directory.  Do that everywhere, read them as d.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 18:03:33 +01:00
1 parent 7422a6fac7
commit 83f4dceb1b
4 files changed
+23 -12

No files matched your search

+12
View File
@@ -103,3 +103,15 @@ run "touch $DIR/keep; chmod 2755 $DIR/keep; /libexec/finit/tmpfiles --create $CO
assert "Mode given" "$(texec stat -c '%a %U:%G' $DIR/suid)" = "4755 bin:sys"
assert "Mode not given" "$(texec stat -c '%a %U:%G' $DIR/keep)" = "2755 sys:bin"
assert "Masked to 0" "$(texec stat -c '%a' $DIR/none)" = "0"
sep
say 'v, q, and Q entries make a plain directory, like d'
run "cat > $CONF" <<CONF
v $DIR/v 0750 bin sys
q $DIR/q 0700 sys bin
Q $DIR/Q
CONF
run "/libexec/finit/tmpfiles --create $CONF"
assert "v" "$(texec stat -c '%F %a %U:%G' $DIR/v)" = "directory 750 bin:sys"
assert "q" "$(texec stat -c '%F %a %U:%G' $DIR/q)" = "directory 700 sys:bin"
assert "Q" "$(texec stat -c '%F %a %U:%G' $DIR/Q)" = "directory 755 root:root"