]> git.ipfire.org Git - thirdparty/mkosi.git/commit
mkosi: when using cached images, randomize fs and partition uuids explicitly 740/head
authorLennart Poettering <lennart@poettering.net>
Wed, 16 Jun 2021 15:16:14 +0000 (17:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 21 Jun 2021 08:16:48 +0000 (10:16 +0200)
commite4e26a86985272efaafee2674b3f7e0d765603b6
tree9dfa63bfefac86ec60614bf1a47e55bf78823bf0
parentda05174f2fb5770d57bd5b6fec7e73ce880c3604
mkosi: when using cached images, randomize fs and partition uuids explicitly

This addresses an annoying issue when building cached images containing
btrfs file systems: the kernel btrfs driver refuses mounting or handling
multiple different file systems with the same uuid. This means using an
image and building the next at the same time fails — as long as the
UUIDs of the newly build image aren't refreshed.

This patches makes sure when using a cached image we'll refresh disk,
partition and file system uuids. We generate them randomly, exactly like
we would have them when using non-cached builds.

This also ensures that the partition labels are rewritten when images
versions are bumped.

(Eventually we should probably start hashing the uuids from the
configuration state in some form, to provide a certain level of
reproducibility, but for now let's just randomize them.)
mkosi/__init__.py