From ed75eaa6ee8f05ef9bdd77b0628e282f4c8b1615 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Thu, 19 Jun 2025 09:39:47 +0200 Subject: [PATCH] package/skopeo: use containers-image-config files ... and extend the skopeo runtime test to make use of those. Signed-off-by: Yann E. MORIN Signed-off-by: Julien Olivain --- package/skopeo/Config.in | 1 + support/testing/tests/package/test_skopeo.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/package/skopeo/Config.in b/package/skopeo/Config.in index f1acc3a50f..0de9b16047 100644 --- a/package/skopeo/Config.in +++ b/package/skopeo/Config.in @@ -8,6 +8,7 @@ config BR2_PACKAGE_SKOPEO depends on !BR2_STATIC_LIBS # lvm2 select BR2_PACKAGE_HOST_GO select BR2_PACKAGE_BTRFS_PROGS + select BR2_PACKAGE_CONTAINERS_IMAGE_CONFIG # runtime select BR2_PACKAGE_LIBGPGME select BR2_PACKAGE_LVM2 help diff --git a/support/testing/tests/package/test_skopeo.py b/support/testing/tests/package/test_skopeo.py index 79c3da8b3d..99ba978de2 100644 --- a/support/testing/tests/package/test_skopeo.py +++ b/support/testing/tests/package/test_skopeo.py @@ -32,6 +32,20 @@ class TestSkopeo(infra.basetest.BRTest): bb_info = json.loads("".join(output)) self.assertEqual(bb_info["Name"], "docker.io/library/busybox") + # Then check we can retrieve the image from the default registry + # Copy all archs in the image to check we can enumerate those (inspect + # does not enumerate all archs) + self.assertRunOk( + "skopeo copy -a docker://busybox:latest oci-archive:busybox-latest.oci", + timeout=120, + ) + + # Check we can inspect a local OCI archive + self.assertRunOk( + "skopeo inspect oci-archive:busybox-latest.oci", + timeout=30, + ) + # Now, check we can reach an arbitrary registry: quay.io output, _ = self.emulator.run( "skopeo inspect docker://quay.io/quay/busybox:latest", @@ -39,3 +53,9 @@ class TestSkopeo(infra.basetest.BRTest): ) skopeo_info = json.loads("".join(output)) self.assertEqual(skopeo_info["Name"], "quay.io/quay/busybox") + + # Finally check we can retrieve the image from an arbitrary registry + self.assertRunOk( + "skopeo copy docker://quay.io/quay/busybox:latest oci-archive:busybox-quay.io-latest.oci", + timeout=120, + )