]> git.ipfire.org Git - thirdparty/systemd.git/commit
repart: Allow target directory excludes
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 22 May 2023 21:17:49 +0000 (23:17 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 30 May 2023 11:45:49 +0000 (13:45 +0200)
commit600bf76c178a2960d6470af2c6a8c598fabd5fd9
tree662d380b92f409abfb6b8f438848ab8d56d21428
parentafbe20b7d4ed4c3aebbd1b3de00b9b7385dd0ae8
repart: Allow target directory excludes

Currently, ExcludeFiles= supports excluding directories on the host
from being copied. Let's extend this to also support preventing files
from being copied into specific directories in the partition by adding
a new option ExcludeFilesTarget=. An example where this is useful is
when setting up btrfs subvolumes in the top level that are intended to
be mounted into specific locations, so /usr would be stored in @usr,
/home in @home, .... To accomplish this, we need to copy /usr to @usr
and prevent any files from being copied into /usr in the partition,
which with this commit, we'd be able to do as follows:

```
[Partition]
CopyFiles=/usr:@usr
ExcludeFilesTarget=/usr
```
man/repart.d.xml
src/partition/repart.c
test/units/testsuite-58.sh