From 7ceeeba9a2ca0b0200f5921b1faba0a35d411224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 30 Jun 2022 12:48:20 +0200 Subject: [PATCH] static-build: Allow removing shipped shim-v2 configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's add a new "REMOVE_VMM_CONFIGS" environment variable that can be passsed to the script responsible for building Kata Containers. Right now this is not useful for the `main` or `stable` branch, but for the CC release we only have been working and testing with QEMU and Cloud Hypervisor. Signed-off-by: Fabiano FidĂȘncio --- tools/packaging/static-build/shim-v2/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/packaging/static-build/shim-v2/build.sh b/tools/packaging/static-build/shim-v2/build.sh index 905006db21..7228287ac8 100755 --- a/tools/packaging/static-build/shim-v2/build.sh +++ b/tools/packaging/static-build/shim-v2/build.sh @@ -20,6 +20,7 @@ PREFIX=${PREFIX:-/opt/kata} container_image="shim-v2-builder" EXTRA_OPTS="${EXTRA_OPTS:-""}" +REMOVE_VMM_CONFIGS="${REMOVE_VMM_CONFIGS:-""}" sudo docker build --build-arg GO_VERSION="${GO_VERSION}" -t "${container_image}" "${script_dir}" @@ -41,6 +42,10 @@ sudo docker run --rm -i -v "${repo_root_dir}:${repo_root_dir}" \ sudo sed -i -e '/^initrd =/d' "${DESTDIR}/${PREFIX}/share/defaults/kata-containers/configuration-qemu.toml" sudo sed -i -e '/^initrd =/d' "${DESTDIR}/${PREFIX}/share/defaults/kata-containers/configuration-fc.toml" +for vmm in ${REMOVE_VMM_CONFIGS}; do + sudo rm "${DESTDIR}/${PREFIX}/share/defaults/kata-containers/configuration-$vmm.toml" +done + pushd "${DESTDIR}/${PREFIX}/share/defaults/kata-containers" sudo ln -sf "configuration-qemu.toml" configuration.toml popd