From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: meta-virtualization@lists.yoctoproject.org
Cc: tanguy.raufflet@savoirfairelinux.com
Subject: Re: [meta-virtualization][PATCH 1/2] image-oci: add OCI runtime bundle output
Date: Thu, 22 Oct 2026 11:51:46 -0700 (PDT) [thread overview]
Message-ID: <6ada5b42.4bcc4235.70a25.8048@mx.google.com> (raw)
In-Reply-To: <1760387508.1766093.1791807841997.JavaMail.zimbra@savoirfairelinux.com>
Hi Tanguy,
Sorry for the slow reply, I've been busy since getting back from
OSSEU.
Dropping the postprocess-hook half clears the architectural concern,
and the real gap you've identified (runtime-spec fields with no
OCI_IMAGE_* equivalent) is worth addressing properly.
Context first, because it probably isn't in anyone else's memory
but mine (as it deals with the historcal path I took to the
current support and bundling):
Some is obvious, some isn't, but I'm stating it for the mailing
list archive.
image-oci already produces a runnable OCI runtime bundle during the
build. The umoci backend creates ${IMAGE_NAME}-oci-bundle/ with a
flat rootfs/ and config.json as a working intermediate (see
classes/image-oci-umoci.inc, the image_bundle_name variable). The
final rm at the end is the only thing that stops it being a
first-class output. The top-of-file docstring in
classes/image-oci.bbclass has walked through this flow since 2021,
including "runc run -b container-base-oci-bundle ctr-build" as the
canonical runnable form -- the capability has been there, it just
hasn't been exposed as a shippable artifact when using umoci.
So what I'm going to do:
1. Reinstate the historical dual-form tar convention described in the
umoci backend's comment block at classes/image-oci-umoci.inc. The
.tar form (not -dir.tar) carries blobs/, oci-layout, index.json AND
top-level rootfs/, config.json together, so extracting it gives
both the OCI layout and a runnable bundle side by side. The current
code only tars the layout contents; the comment is accurate for the
intent, the code drifted. Fix: preserve $image_bundle_name through
the tar step and include its contents in $image_name.tar.
Both backends (umoci and sloci) will honor the same convention.
Multi-layer squashing is a free consequence of umoci's own
unpack-after-each-layer-repack flow -- the final bundle rootfs
already reflects the full stacked tree flat.
Rather than making this opt-in, this becomes the default output
going forward for new builds, with the layout-only -dir.tar form
preserved so existing users don't break.
2. Make bundles cross-installable, parallel to how
container-cross-install.bbclass already treats docker and podman
images. New BUNDLED_CONTAINERS flavor along the lines of
"name:crun[:autostart]" (and/or ":runc" / ":bundle" -- naming
TBD). The install step extracts rootfs/ + config.json from the
.tar on-host at build time, lands them in the target rootfs at a
stable path (/usr/share/oci-bundles/<name>/ or similar), and the
first-boot generator writes a systemd unit that calls
"crun run -b <path> <name>" ... similar to the existing
generate_docker_service_from_bundle / generate_podman_service_
from_bundle paths. Runtime (crun or runc) gets added to RDEPENDS
when any BUNDLED_CONTAINERS entry uses the new flavor, same
mechanism docker/podman use today.
3. First-class runtime-spec recipe variables for the fields you
actually need to configure: mounts, capabilities, namespaces,
readonly rootfs, no-new-privileges, resource limits as they
surface, etc. These live in image-oci as regular recipe
variables that control what gets emitted into config.json during
the umoci / sloci build, so the recipe fully describes the
container's identity end-to-end. We already have OCI_IMAGE_* for
the image-spec fields (env, cmd, entrypoint, workingdir, user,
labels, ports); the runtime-spec additions are the natural
extension. Naming (keep OCI_IMAGE_* for coherence vs. introduce
OCI_BUNDLE_* for strict spec-family hygiene) is still something
I need to decide.
If this plan matches what you need, can you send a list of the
variables that you've identified as needed ? Along with expected
runtime results (if any) .. and with that, I can test what I've
pulled together in my WIP branches.
Cheers,
Bruce
prev parent reply other threads:[~2026-10-22 18:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 14:47 [meta-virtualization][PATCH 1/2] image-oci: add OCI runtime bundle output Tanguy Raufflet
2026-09-30 14:47 ` [meta-virtualization][PATCH 2/2] app-container-oci-bundle.bb: add a new demo recipe using an OCI bundle Tanguy Raufflet
2026-09-30 15:56 ` [meta-virtualization][PATCH 1/2] image-oci: add OCI runtime bundle output Bruce Ashfield
2026-10-12 12:24 ` Tanguy Raufflet
2026-10-22 18:51 ` Bruce Ashfield [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ada5b42.4bcc4235.70a25.8048@mx.google.com \
--to=bruce.ashfield@gmail.com \
--cc=meta-virtualization@lists.yoctoproject.org \
--cc=tanguy.raufflet@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.