summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-05-10 13:58:10 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-05-10 13:58:10 +0000
commit3d431848b32caae67b9dcbf7fe04f08ddcd448b5 (patch)
treeab48eaceb7931a73159348e0bf67d93beda3256d /recipes-extended
parent84e81eea1a581e10528b2ba95f9c34ee67c8ad3c (diff)
downloadmeta-virtualization-3d431848b32caae67b9dcbf7fe04f08ddcd448b5.tar.gz
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 <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/images/container-base-multiarch.bb9
1 files changed, 9 insertions, 0 deletions
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 @@
1SUMMARY = "Multi-architecture OCI container base image"
2DESCRIPTION = "Builds container-base for multiple architectures and \
3combines them into a single OCI Image Index (manifest list)."
4LICENSE = "MIT"
5
6inherit oci-multiarch
7
8OCI_MULTIARCH_RECIPE = "container-base"
9OCI_MULTIARCH_PLATFORMS = "aarch64 x86_64"