Commit Graph
5 Commits
Author SHA1 Message Date
Joachim Wiberg dd186287d7 tmpfiles: read the files by name, the first entry for a path counts
The files were read one directory at a time, Finit's own first and
/etc/tmpfiles.d last, and every entry for a path was run.  With two
entries for a path the last one read won, so an entry in /etc won over
one in /usr/lib whatever the files were called.

tmpfiles.d(5) reads the files in the order of their names, whatever
directory they are in, and goes by the first entry that makes a path.
A package relies on that when it names its file to sort before or
after another.  Do the same.  As before, a file in a later directory
is read in place of one of the same name in an earlier one.

A later entry is skipped when it makes a path an earlier one makes, or
when both take a glob and remove, write to, or keep the path.  Several
w+ entries may add to one file.  The skip is only told about with
--dry-run or --debug, since Finit's files and those of other packages
overlap on most systems.

Finit's own files had two entries for some paths, and relied on the
last one.  Drop the ones that lost: /run/lock, /run/lock/subsys, and
/var/lock in legacy.conf, and /var/run and a second /var/spool in
var.conf.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-11-21 19:23:49 +01:00
Aaron Andersen ad76e15949 tmpfiles.d: update /var/tmp mode
`/var/tmp` mode should match `/tmp`
2026-04-18 09:17:10 +09:00
Joachim Wiberg 293b0ffa79 tmpfiles.d/var.conf: fix ordering and add legacy /run/lock/subsys
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-01-07 13:59:49 +01:00
Joachim Wiberg cc979f27f1 tmpfiles.d: add missing /var/tmp and /var/lock -> /run/lock
- /var/tmp  https://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html
 - /run/lock std Debian

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-11-22 08:08:24 +01:00
Joachim Wiberg a4af9ba248 Add limited tmpfiles.d(5) support
This change adds very basic tmpfiles.d/ support to Finit.  Much of the
basic types are supported, but not all, so for now, please check the
code for details on what is working.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-28 00:48:25 +01:00