Skip to content

Commit ee5ee90

Browse files
committed
tests: Pin ubi9/podman by tag rather than digest
The digest pinned in the previous commit is the manifest list's, but the install path copies bound images out of host containers-storage with `podman image push`, and the host only holds the per-arch manifest. containers-storage then refuses the copy with "Digest of source image's manifest would not match destination reference". The 9.8-1793032728 tag carries a registry.access.redhat.com signature for that exact identity, so pulling it by tag satisfies the default sigstoreSigned policy and needs no digest. That also lets the logically bound install test go back to matching repository:tag. Assisted-by: https://github.com/cgwalters/cgwalters#llms
1 parent 7892258 commit ee5ee90

5 files changed

Lines changed: 9 additions & 12 deletions

File tree

‎Justfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ testimage_label := "bootc.testimage=1"
6767
# replaced it has no sigstore signature for the registry.access.redhat.com
6868
# :latest tag, so the default sigstoreSigned policy rejects pulling it by tag.
6969
# Keep in sync with hack/lbi.
70-
lbi_images := "quay.io/curl/curl:latest quay.io/curl/curl-base:latest registry.access.redhat.com/ubi9/podman@sha256:2cfaa8360cb9416af369f0dc0474875cf476b6b846e5ce5027d58db9f0054a2a"
70+
lbi_images := "quay.io/curl/curl:latest quay.io/curl/curl-base:latest registry.access.redhat.com/ubi9/podman:9.8-1793032728"
7171
fedora-coreos := "quay.io/fedora/fedora-coreos:testing-devel"
7272
generic_buildargs := ""
7373
_extra_src_args := if extra_src != "" { "-v " + extra_src + ":/run/extra-src:ro --security-opt=label=disable" } else { "" }

‎hack/lbi/podman.image‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Pinned to ubi9/podman 9.8-1793032728: the 9.8-1793203936 build that
33
# replaced it has no sigstore signature for the registry.access.redhat.com
44
# :latest tag, so the default sigstoreSigned policy rejects pulling it by tag.
5-
Image=registry.access.redhat.com/ubi9/podman@sha256:2cfaa8360cb9416af369f0dc0474875cf476b6b846e5ce5027d58db9f0054a2a
5+
Image=registry.access.redhat.com/ubi9/podman:9.8-1793032728

‎hack/provision-packit.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ if [[ -n "${BOOTC_source_image_archive:-}" ]]; then
9393
fi
9494

9595
# Keep these in sync with what's used in hack/lbi; ubi9/podman is pinned, see hack/lbi/podman.image
96-
podman pull -q --retry 5 --retry-delay 5s quay.io/curl/curl:latest quay.io/curl/curl-base:latest registry.access.redhat.com/ubi9/podman@sha256:2cfaa8360cb9416af369f0dc0474875cf476b6b846e5ce5027d58db9f0054a2a
96+
podman pull -q --retry 5 --retry-delay 5s quay.io/curl/curl:latest quay.io/curl/curl-base:latest registry.access.redhat.com/ubi9/podman:9.8-1793032728
9797

9898
# Run system-reinstall-bootc
9999
# TODO make it more scriptable instead of expect + send

‎tmt/tests/booted/test-logically-bound-install.nu‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use tap.nu
1212
let expected_images = [
1313
"quay.io/curl/curl:latest",
1414
"quay.io/curl/curl-base:latest",
15-
"registry.access.redhat.com/ubi9/podman@sha256:2cfaa8360cb9416af369f0dc0474875cf476b6b846e5ce5027d58db9f0054a2a" # this image is signed; 9.8-1793032728, see hack/lbi/podman.image
15+
"registry.access.redhat.com/ubi9/podman:9.8-1793032728" # this image is signed; pinned, see hack/lbi/podman.image
1616
]
1717

1818
def validate_images [images: list<string>] {
@@ -24,17 +24,14 @@ def validate_images [images: list<string>] {
2424

2525
# This test checks that bootc actually populated the bootc storage with the LBI images
2626
def test_logically_bound_images_in_storage [] {
27+
# Use podman to list the images in the bootc storage
28+
let images = podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage images --format {{.Repository}}:{{.Tag}} | split row "\n"
29+
2730
# Debug print
2831
print "IMAGES:"
2932
podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage images
3033

31-
# Look up each reference rather than listing repository:tag, since
32-
# some are pinned by digest.
33-
for expected in $expected_images {
34-
print $"Checking ($expected)"
35-
let r = podman --storage-opt=additionalimagestore=/usr/lib/bootc/storage image exists $expected | complete
36-
assert equal $r.exit_code 0 $"($expected) not found in bootc storage"
37-
}
34+
validate_images $images
3835
}
3936

4037
# This test makes sure that bootc itself knows how to list the LBI images in the bootc storage

‎tmt/tests/lbi/usr/share/containers/systemd/podman.image‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Pinned to ubi9/podman 9.8-1793032728: the 9.8-1793203936 build that
33
# replaced it has no sigstore signature for the registry.access.redhat.com
44
# :latest tag, so the default sigstoreSigned policy rejects pulling it by tag.
5-
Image=registry.access.redhat.com/ubi9/podman@sha256:2cfaa8360cb9416af369f0dc0474875cf476b6b846e5ce5027d58db9f0054a2a
5+
Image=registry.access.redhat.com/ubi9/podman:9.8-1793032728

0 commit comments

Comments
 (0)