repart: Add --skip-partitions=
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 22 Nov 2022 13:27:30 +0000 (14:27 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 25 Nov 2022 11:07:38 +0000 (12:07 +0100)
commit7d505753f1d75bb7ea806a4f7b0bd0fd906e7aed
treed193ef7a88b3a5c316d7f0aef21b4c5c881f4033
parent220780db86c0dabf1baef7781f9ad2921e93806b
repart: Add --skip-partitions=

--include-partitions and --exclude-partitions now fully exclude
partitions from repart. Whenever a partition type is excluded, we
don't take any partitions of that type into account at all when
running systemd-repart.

--skip-partitions= is introduced to do what --exclude-partitions did
previously. Any skipped partitions are taken into acount when doing
size calculations, but are not yet populated.

Why do we need both concepts? Exclusion is needed so that we can
use shared repart definitions to generate bootable and non-bootable
images. When generating a non-bootable image, we use --exclude-partitions
to exclude the ESP partition. Skipping is needed so that we can
populate the root partition while skipping the ESP partition, get
the roothash of the root partition, use that to generate a UKI, and
finally populate the ESP partition with the UKI included.
man/systemd-repart.xml
src/partition/repart.c
test/units/testsuite-58.sh