Closed cgwalters closed 9 months ago
LGTM @vrothberg PTAL
Will this also solve the problem of rpms installing under /opt? ...he asked while making doe eyes at @cgwalters
On the surface it seems like it would.
Will this also solve the problem of rpms installing under /opt?
The core issue remains that:
/var
But yes, some will probably start working modulo those caveats.
@cgwalters are the caveats recorded/documented somewhere?
From https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html (see https://github.com/ostreedev/ostree/pull/3103):
C, C+
Recursively copy a file or directory, if the destination files or directories do not exist yet
or the destination directory is empty. Note that this command will not descend into
subdirectories if the destination directory already exists and is not empty, unless the action
is suffixed with +. Instead, the entire copy operation is skipped. If the argument is omitted,
files from the source directory /usr/share/factory/ with the same name are copied. Does not
follow symlinks. Contents of the directories are subject to time-based cleanup if the age
argument is specified.
If I understand correctly, I've found the following caveats to document:
On updates (N -> N+1), the following will happen:
On rollbacks (N+1 -> N):
In general, I think we should recommend users include another unit that calls to rsync (for example) with a list of files to update in sync between updates on boot. If they want files to be removed, they will have to make another unit.
I still need to verify that C+
does not overwrite existing files on update. This is unclear from the man page.
Instead of dropping
/var
content on the floor, move it into/usr/share/factory/var
.With this change, a systemd-tmpfiles fragment like this:
C+ /var - - - - -
is sufficient to get "populate /var" automatically on initial installation and across upgrades.