From 1c08bd1f940f374288ff78d940beaeb86e76d602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 31 Jul 2026 00:19:20 +0200 Subject: [PATCH] kata-deploy: add a qemu-no-shared-fs build target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the flavour buildable and shippable: a wrapper that hands build-base-qemu.sh the "no-shared-fs" suffix, from which the base script derives HYPERVISOR_NAME=kata-qemu-no-shared-fs and the binary and share directory suffixes, an install_qemu_no_shared_fs that tracks the same versions.yaml entry as the full build, and the tarball listed in the base, NVIDIA GPU and release inputs. `make qemu-no-shared-fs-tarball` now produces kata-static-qemu-no-shared-fs.tar.zst, which installs alongside the full one rather than replacing it: nothing consumes it yet. Signed-off-by: Fabiano FidĂȘncio Assisted-by: Cursor --- .../kata-deploy/local-build/Makefile | 8 +++++++ .../local-build/kata-deploy-binaries.sh | 24 ++++++++++++++++--- .../kata-release-tarball-inputs.sh | 2 ++ tools/packaging/static-build/qemu/Makefile | 4 ++-- ...mental.sh => build-static-qemu-flavour.sh} | 4 ++++ 5 files changed, 37 insertions(+), 5 deletions(-) rename tools/packaging/static-build/qemu/{build-static-qemu-experimental.sh => build-static-qemu-flavour.sh} (76%) diff --git a/tools/packaging/kata-deploy/local-build/Makefile b/tools/packaging/kata-deploy/local-build/Makefile index 058ca4bedc..22504d1214 100644 --- a/tools/packaging/kata-deploy/local-build/Makefile +++ b/tools/packaging/kata-deploy/local-build/Makefile @@ -22,6 +22,7 @@ BASE_TARBALLS = serial-targets \ ovmf-sev-tarball \ ovmf-tdx-tarball \ ovmf-tarball \ + qemu-no-shared-fs-tarball \ qemu-snp-experimental-tarball \ qemu-tdx-experimental-tarball \ qemu-tarball \ @@ -64,6 +65,7 @@ BASE_TARBALLS = serial-targets \ kernel-tarball \ nydus-tarball \ ovmf-tarball \ + qemu-no-shared-fs-tarball \ qemu-tarball \ shim-v2-go-tarball \ shim-v2-rust-tarball \ @@ -109,6 +111,7 @@ NVGPU_BASE_TARBALLS = \ ovmf-tdx-tarball \ ovmf-tarball \ pause-image-tarball \ + qemu-no-shared-fs-tarball \ qemu-snp-experimental-tarball \ qemu-tdx-experimental-tarball \ qemu-tarball \ @@ -123,6 +126,7 @@ NVGPU_BASE_TARBALLS = \ kernel-nvidia-gpu-tarball \ ovmf-tarball \ pause-image-tarball \ + qemu-no-shared-fs-tarball \ qemu-tarball \ virtiofsd-tarball \ serial-targets @@ -138,6 +142,7 @@ NVGPU_FINAL_TARBALL_INPUTS = \ kata-static-ovmf-tdx.tar.zst \ kata-static-ovmf.tar.zst \ kata-static-pause-image.tar.zst \ + kata-static-qemu-no-shared-fs.tar.zst \ kata-static-qemu-snp-experimental.tar.zst \ kata-static-qemu-tdx-experimental.tar.zst \ kata-static-qemu.tar.zst \ @@ -296,6 +301,9 @@ ovmf-tdx-tarball: ovmf-tarball: ${MAKE} $@-build +qemu-no-shared-fs-tarball: + ${MAKE} $@-build + qemu-snp-experimental-tarball: ${MAKE} $@-build diff --git a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh index 1acd60c8bd..667f31eceb 100755 --- a/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh +++ b/tools/packaging/kata-deploy/local-build/kata-deploy-binaries.sh @@ -36,7 +36,7 @@ readonly kernel_builder="${static_build_dir}/kernel/build.sh" readonly ovmf_builder="${static_build_dir}/ovmf/build.sh" readonly pause_image_builder="${static_build_dir}/pause-image/build.sh" readonly qemu_builder="${static_build_dir}/qemu/build-static-qemu.sh" -readonly qemu_experimental_builder="${static_build_dir}/qemu/build-static-qemu-experimental.sh" +readonly qemu_flavour_builder="${static_build_dir}/qemu/build-static-qemu-flavour.sh" readonly stratovirt_builder="${static_build_dir}/stratovirt/build-static-stratovirt.sh" readonly shimv2_builder="${static_build_dir}/shim-v2/build.sh" readonly virtiofsd_builder="${static_build_dir}/virtiofsd/build.sh" @@ -147,6 +147,7 @@ options: ovmf-sev ovmf-tdx qemu + qemu-no-shared-fs qemu-snp-experimental qemu-tdx-experimental stratovirt @@ -1325,6 +1326,20 @@ install_qemu() { "${qemu_builder}" } +# Install the static qemu asset trimmed down to the runtime classes that run +# without a shared filesystem. It is the same qemu as install_qemu, so it +# tracks the same versions.yaml entry. +install_qemu_no_shared_fs() { + export qemu_suffix="no-shared-fs" + export qemu_tarball_name="kata-static-qemu-${qemu_suffix}.tar.gz" + + install_qemu_helper \ + "assets.hypervisor.qemu.url" \ + "assets.hypervisor.qemu.version" \ + "qemu-${qemu_suffix}" \ + "${qemu_flavour_builder}" +} + install_qemu_snp_experimental() { export qemu_suffix="snp-experimental" export qemu_tarball_name="kata-static-qemu-${qemu_suffix}.tar.gz" @@ -1333,7 +1348,7 @@ install_qemu_snp_experimental() { "assets.hypervisor.qemu-${qemu_suffix}.url" \ "assets.hypervisor.qemu-${qemu_suffix}.tag" \ "qemu-${qemu_suffix}" \ - "${qemu_experimental_builder}" + "${qemu_flavour_builder}" } install_qemu_tdx_experimental() { @@ -1344,7 +1359,7 @@ install_qemu_tdx_experimental() { "assets.hypervisor.qemu-${qemu_suffix}.url" \ "assets.hypervisor.qemu-${qemu_suffix}.tag" \ "qemu-${qemu_suffix}" \ - "${qemu_experimental_builder}" + "${qemu_flavour_builder}" } # Install static firecracker asset @@ -1877,6 +1892,7 @@ handle_build() { install_ovmf_sev install_ovmf_tdx install_qemu + install_qemu_no_shared_fs install_qemu_snp_experimental install_qemu_tdx_experimental install_stratovirt @@ -1930,6 +1946,8 @@ handle_build() { qemu) install_qemu ;; + qemu-no-shared-fs) install_qemu_no_shared_fs ;; + qemu-snp-experimental) install_qemu_snp_experimental ;; qemu-tdx-experimental) install_qemu_tdx_experimental ;; diff --git a/tools/packaging/kata-deploy/local-build/kata-release-tarball-inputs.sh b/tools/packaging/kata-deploy/local-build/kata-release-tarball-inputs.sh index 6084db30b4..6ce47049c7 100755 --- a/tools/packaging/kata-deploy/local-build/kata-release-tarball-inputs.sh +++ b/tools/packaging/kata-deploy/local-build/kata-release-tarball-inputs.sh @@ -38,6 +38,7 @@ kata-static-openvmm.tar.zst kata-static-ovmf-sev.tar.zst kata-static-ovmf-tdx.tar.zst kata-static-ovmf.tar.zst +kata-static-qemu-no-shared-fs.tar.zst kata-static-qemu-snp-experimental.tar.zst kata-static-qemu-tdx-experimental.tar.zst kata-static-qemu.tar.zst @@ -62,6 +63,7 @@ kata-static-kernel-nvidia-gpu.tar.zst kata-static-kernel.tar.zst kata-static-nydus.tar.zst kata-static-ovmf.tar.zst +kata-static-qemu-no-shared-fs.tar.zst kata-static-qemu.tar.zst kata-static-rootfs-image-coco-extension.tar.zst kata-static-rootfs-image-devkit-extension.tar.zst diff --git a/tools/packaging/static-build/qemu/Makefile b/tools/packaging/static-build/qemu/Makefile index 356454646f..f53210f757 100644 --- a/tools/packaging/static-build/qemu/Makefile +++ b/tools/packaging/static-build/qemu/Makefile @@ -9,8 +9,8 @@ CONFIG_DIR := $(MK_DIR)/../../scripts/ build: "$(MK_DIR)/build-static-qemu.sh" -build-experimental: - "$(MK_DIR)/build-static-qemu-experimental.sh" +build-flavour: + "$(MK_DIR)/build-static-qemu-flavour.sh" clean: rm -f kata-qemu-static.tar.gz diff --git a/tools/packaging/static-build/qemu/build-static-qemu-experimental.sh b/tools/packaging/static-build/qemu/build-static-qemu-flavour.sh similarity index 76% rename from tools/packaging/static-build/qemu/build-static-qemu-experimental.sh rename to tools/packaging/static-build/qemu/build-static-qemu-flavour.sh index 678b7eea36..da8d6690a4 100755 --- a/tools/packaging/static-build/qemu/build-static-qemu-experimental.sh +++ b/tools/packaging/static-build/qemu/build-static-qemu-flavour.sh @@ -3,6 +3,10 @@ # Copyright (c) 2018 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 +# +# Builds a suffixed QEMU flavour: the binaries and the share directory carry +# ${qemu_suffix}, so the tarball installs alongside the full build rather than +# replacing it. The caller picks the sources, the suffix and the tarball name. set -o errexit set -o nounset