Skip to content

chore(os): remove the Yocto build backend - #1700

Open
kvinwang wants to merge 3 commits into
nextfrom
chore/remove-yocto
Open

kvinwang wants to merge 3 commits into
nextfrom
chore/remove-yocto

Conversation

@kvinwang

@kvinwang kvinwang commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Removes os/yocto, its eight submodules, the guest-os.yml workflow, and the os-yocto/os-deps/os-image-yocto/os-repro-check-yocto make targets. Guest-OS releases have been built only by mkosi for some time.

mkosi still read 41 files from the Yocto layers: kernel, OVMF and ZFS patches, Sysbox, containerd, NVIDIA Container Toolkit and nvattest files, the initramfs init, chrony.conf, the TEE simulator units, and the AWS hardening audit script. They move to os/common/ unchanged (all renames are 100%) and keep their REUSE attribution. See os/common/README.md for the layout.

Other changes:

  • Component cache keys hash the new paths. The nvidia component now also hashes os/common/nvidia, which it installs but did not hash before.
  • Removed the acceptance checks that compared mkosi against Yocto recipes: kernel series, OVMF SRCREV, and the nvidia staging list. versions.env now records why OVMF is pinned to edk2-stable202502.
  • tools/dev-stack.sh now builds guests with the mkosi container.
  • Added a CHANGELOG entry, including the cleanup a checkout that ran make os-deps needs: after pulling, the leftover submodule directories are untracked files and the mkosi build refuses to run.
  • Updated docs and comments that described two backends. mkosi.skeleton/ was not touched because those files are copied into the rootfs.

Release tag: os-v<version>

dstackup, dstack-cloud, tools/dev-stack.sh and the docs download guest images from guest-os-v<version> releases, but the mkosi workflow publishes them as mkosi-os-v<version>, so dstackup install never found a 0.6+ image. The separate prefix only kept this workflow's trigger apart from the Yocto one. Guest-OS releases are now tagged os-v<version>, like kms-v and gateway-v.

The 0.6.0–0.6.7 releases keep their mkosi-os-v tags because external docs and evidence files link to them (NEAR MPC, 0g, Antseed, Phala Cloud). The consumers choose mkosi-os-v for those versions and os-v after. dstackup also skipped nothing but UKI and dev assets, and GitHub lists dstack-<v>-kernel-devel.tar.gz first, so it would have downloaded the kernel build tree; it now skips that too (tested).

Phala Cloud links Guest OS releases as mkosi-os-v${version} (teehouse-ui dstack-utils, os_image_registry.py for RCs) and needs the same version split before 0.6.8.

Verification

  • os/mkosi/build.sh lint, os/tests/*.sh, reuse lint, prek on the changed files, and gh actions-lock --no-fix all pass.
  • Built prod with make os-image (mkosi container, JOBS=30) from next (edff019) and from this branch, with SOURCE_DATE_EPOCH and DSTACK_BUILD_GIT_REVISION pinned to the same values. Every file in the image directory (bzImage, initramfs, OVMF, verity rootfs, disk.raw, all measurement CBORs) is byte-identical. The only difference is git_revision in metadata.json.

mkosi has built every guest-OS release since the Yocto backend was
deprecated. Remove os/yocto, its eight submodules, the guest-os.yml
workflow and the os-yocto/os-deps/os-image-yocto/os-repro-check-yocto
make targets.

The mkosi build still read 41 files from the Yocto layers. Move them,
byte for byte, into os/common:

  kernel/patches/          guest kernel patches
  ovmf/patches/            EDK2 patches
  zfs/patches/             OpenZFS patch
  sysbox/                  patches, generated protobufs, units, config
  containerd/              containerd and stargz-snapshotter config
  nvidia-container-toolkit/config.toml
  nvattest/                pinned regorus Cargo.lock, prepare drop-in
  initramfs/init
  rootfs/chrony.conf, rootfs/tee-simulator/
  scripts/audit-aws-ec2-image-hardening.sh

Their content is unchanged and they keep their REUSE attribution.
Component cache keys now hash these directories, plus os/common/nvidia,
which the nvidia component installs but did not hash before.

The acceptance checks that compared mkosi with the Yocto recipes (kernel
series, OVMF SRCREV, the nvidia staging list) go away. versions.env now
records why the OVMF revision is pinned. tools/dev-stack.sh builds
guests with the mkosi container. Docs and comments no longer refer to a
second backend. Files under mkosi.skeleton are left alone because they
end up in the rootfs.

Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang kvinwang changed the title chore(os): remove the deprecated Yocto backend chore(os): remove the Yocto backend and tag guest-OS releases guest-os-v Dec 2, 2026
@kvinwang kvinwang changed the title chore(os): remove the Yocto backend and tag guest-OS releases guest-os-v chore(os): remove the Yocto backend and tag guest-OS releases os-v Dec 2, 2026
@kvinwang kvinwang changed the title chore(os): remove the Yocto backend and tag guest-OS releases os-v chore(os): remove the Yocto build backend Dec 2, 2026
dstackup, dstack-cloud, tools/dev-stack.sh and the docs download guest
images from guest-os-v<version> releases, but the mkosi workflow
published them as mkosi-os-v<version>, so dstackup never found a 0.6+
image. The separate prefix only kept the mkosi trigger apart from the
Yocto workflow, which is gone.

Tag guest-OS releases os-v<version>, matching kms-v, gateway-v and the
other components. The 0.6.0 to 0.6.7 releases stay where they are and
are referenced by others, so the consumers pick mkosi-os-v<version> for
those versions and os-v<version> after.

dstackup also took the first .tar.gz asset that was not a UKI or dev
image. GitHub lists dstack-<v>-kernel-devel.tar.gz first, so it would
have downloaded the kernel build tree instead of the image; skip it.

Signed-off-by: Kevin Wang <wy721@qq.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant