shared: add generic helper tools for installing files/dir trees
authorLennart Poettering <lennart@poettering.net>
Fri, 26 Feb 2021 16:41:30 +0000 (17:41 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 17 Aug 2021 08:08:48 +0000 (10:08 +0200)
commit235be6bcea86304e7538d1ff720b14beca2914e8
tree0945ef80029fcbbd871113a35aac7074603d53c6
parent78c23b065f11e524c6730d5afcdba0c3c8129b76
shared: add generic helper tools for installing files/dir trees

This adds a bit of generic helper tools for installing files/dir trees.
"installing" is supposed to mean the final step when preparing a disk
image or directory tree, where the result is renamed to its final name.
It has some bells and whistles, as it is able to replace existing files
sanely, can fsync() things carefully and can mark things read-only in a
nice way.

This is supposed to be generic, unified code that can be used eventually
for any of our tools that prepare disk images/directory trees, including
importd, nspawn's --template= mechanism, the discover-image.c logic,
and more.
src/shared/install-file.c [new file with mode: 0644]
src/shared/install-file.h [new file with mode: 0644]
src/shared/meson.build
src/test/meson.build
src/test/test-install-file.c [new file with mode: 0644]