From 3d431848b32caae67b9dcbf7fe04f08ddcd448b5 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Sun, 10 May 2026 13:58:10 +0000 Subject: oci-multiarch: fix MC defaults, deploy dependency, and OCI layout Three issues prevented oci-multiarch.bbclass from producing usable multi-architecture container images: 1. MC defaults pointed to vruntime-* multiconfigs, whose BBMASK blocks OCI tooling. Changed to container-* multiconfigs which use the new vcontainer distro without BBMASK. 2. mcdepends targeted do_image_oci, but the OCI output is only deployed to deploy/images/ by the later do_image_complete task. The bbclass then failed to find the OCI directory at the expected deploy path. The original implementation assumed do_image_oci was the final step, but OE-core's image pipeline has a separate deploy phase. 3. The OCI Image Index was written directly into index.json with multiple manifest entries. This is valid per the OCI spec but skopeo requires index.json to reference a single entry when there are multiple images. The fix writes the multi-platform image index as a blob in blobs/sha256/ and has index.json reference it with a single entry of mediaType application/vnd.oci.image.index.v1+json. This nested layout is what tools like buildah and crane produce for multi-arch images, and is required for 'skopeo copy --all' to work. Also adds container-base-multiarch.bb recipe that wires up container-base for aarch64 + x86_64 builds via the oci-multiarch class. Signed-off-by: Bruce Ashfield --- recipes-extended/images/container-base-multiarch.bb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 recipes-extended/images/container-base-multiarch.bb (limited to 'recipes-extended') diff --git a/recipes-extended/images/container-base-multiarch.bb b/recipes-extended/images/container-base-multiarch.bb new file mode 100644 index 00000000..220e3555 --- /dev/null +++ b/recipes-extended/images/container-base-multiarch.bb @@ -0,0 +1,9 @@ +SUMMARY = "Multi-architecture OCI container base image" +DESCRIPTION = "Builds container-base for multiple architectures and \ +combines them into a single OCI Image Index (manifest list)." +LICENSE = "MIT" + +inherit oci-multiarch + +OCI_MULTIARCH_RECIPE = "container-base" +OCI_MULTIARCH_PLATFORMS = "aarch64 x86_64" -- cgit v1.2.3-54-g00ecf