From adf76ee07cb7099ad1e3069e0b78d3681ed5c1f7 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 15 Aug 2025 16:30:08 -0400 Subject: [PATCH 1/2] testiso: stop checking the ostree commit in the aleph file This doesn't work in the container-native path because the ostree-commit in the aleph is from the encapsulation done as part of `build-chunked-oci`, but the `ostree-commit` we embed in `meta.json` is from the imported "merge commit". I _think_ what we need is to tweak our osbuild manifests to use the import path rather than unencapsulate path, and that should result in the merge commit getting inserted in the aleph (but also that would be one less dependency on even having `ostree-commit` in `meta.json` in the first place). Anyway, I think just checking the version string is good enough for our purposes here. --- mantle/cmd/kola/testiso.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mantle/cmd/kola/testiso.go b/mantle/cmd/kola/testiso.go index aee80ceeac..1bdd088d44 100644 --- a/mantle/cmd/kola/testiso.go +++ b/mantle/cmd/kola/testiso.go @@ -189,7 +189,6 @@ ExecStart=/bin/sh -c "journalctl -t coreos-installer-service | /usr/bin/awk '/[D ExecStart=/bin/sh -c "/usr/bin/udevadm settle" ExecStart=/bin/sh -c "/usr/bin/mount /dev/disk/by-label/root /mnt" ExecStart=/bin/sh -c "/usr/bin/jq -er '.[\"build\"]? + .[\"version\"]? == \"%s\"' /mnt/.coreos-aleph-version.json" -ExecStart=/bin/sh -c "/usr/bin/jq -er '.[\"ostree-commit\"] == \"%s\"' /mnt/.coreos-aleph-version.json" [Install] RequiredBy=coreos-installer.target ` @@ -833,7 +832,7 @@ func testPXE(ctx context.Context, inst platform.Install, outdir string) (time.Du liveConfig.AddSystemdUnit("coreos-test-entered-emergency-target.service", signalFailureUnit, conf.Enable) if isOffline { - contents := fmt.Sprintf(downloadCheck, kola.CosaBuild.Meta.OstreeVersion, kola.CosaBuild.Meta.OstreeCommit) + contents := fmt.Sprintf(downloadCheck, kola.CosaBuild.Meta.OstreeVersion) liveConfig.AddSystemdUnit("coreos-installer-offline-check.service", contents, conf.Enable) } From ca01c31f7f586b962a56200298703d2276ef16f7 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 15 Aug 2025 16:36:52 -0400 Subject: [PATCH 2/2] cmd-import: don't use `--preserve-digests` when importing from containers-storage There's no digest to preserve in that case since it's all uncompressed. Relevant only in the `--direct` path. --- src/cmd-import | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cmd-import b/src/cmd-import index e942ccd3eb..0327fdf1b6 100755 --- a/src/cmd-import +++ b/src/cmd-import @@ -78,8 +78,11 @@ def generate_oci_archive(args, tmpd): print(f"Copying {args.srcimg.partition(':')[2]} to {tmpf}") shutil.copy(args.srcimg.partition(':')[2], tmpf) else: - subprocess.check_call(['skopeo', 'copy', '--preserve-digests', args.srcimg, - f"oci-archive:{tmpf}"]) + extra_args = [] + # in the containers-storage case, there's no digest to preserve + if not args.srcimg.startswith('containers-storage'): + extra_args += ['--preserve-digests'] + subprocess.check_call(['skopeo', 'copy', args.srcimg, f"oci-archive:{tmpf}"] + extra_args) return tmpf