From 0a878e80d3b4ccbb5b16cc6542dc2e3bcec42a9f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 9 Apr 2022 10:19:13 -0400 Subject: [PATCH] Insert generated image.json into the ostree commit [retry] Retry landing this since a followup commit should fix AWS replication. This is part of https://github.com/coreos/fedora-coreos-tracker/issues/1151 Our generated disk images are largely just a "shell" around the egg of an ostree commit. There is almost nothing that lives in the disk image that isn't in the commit. (This is especially true now that a preparatory commit previous to this moved the *content* of our static `grub.cfg` into `image.json`) In the original coreos-assembler design I'd tried to cleanly separate builds of the ostree from disk image builds, but also support linking them together (with matching version numbers, etc.) The separate `image.yaml` was part of this. This...mostly worked. This change furthers that separation by having image builds input from *just the ostree commit*. Crucially we would no longer need the config git repository to perform an image build. And this in turn unlocks truly better separating ostree builds from disk image builds in the pipeline *and* supporting downstream tooling generating disk images from custom containers. One neat thing here is we will finally fix a longstanding issue where coreos-assembler fails when just the `image.yaml` changes: Closes: #972 --- src/cosalib/qemuvariants.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cosalib/qemuvariants.py b/src/cosalib/qemuvariants.py index 8d57803b12..b546c8bdd5 100644 --- a/src/cosalib/qemuvariants.py +++ b/src/cosalib/qemuvariants.py @@ -183,6 +183,9 @@ def __init__(self, **kwargs): _Build.__init__(self, **kwargs) + repo = os.path.join(self._workdir, 'tmp/repo') + import_ostree_commit(repo, self._tmpdir, self.meta) + @property def image_qemu(self): """