diff --git a/tools/packaging/static-build/qemu/Dockerfile b/tools/packaging/static-build/qemu/Dockerfile index d5dece8e2a..253b8b33f9 100644 --- a/tools/packaging/static-build/qemu/Dockerfile +++ b/tools/packaging/static-build/qemu/Dockerfile @@ -71,8 +71,10 @@ RUN stable_branch=$(cat VERSION | awk 'BEGIN{FS=OFS="."}{print $1 "." $2 ".x"}') RUN echo "Apply patches for specific qemu version" RUN /root/apply_patches.sh "/root/kata_qemu/patches/tag_patches/${QEMU_VERSION}" -RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | xargs ./configure \ - --with-pkgversion=kata-static + +ARG BUILD_SUFFIX +RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s "kata-qemu${BUILD_SUFFIX}" | xargs ./configure \ + --with-pkgversion="kata-static${BUILD_SUFFIX}" RUN make -j$(nproc) RUN make install DESTDIR="${QEMU_DESTDIR}" diff --git a/tools/packaging/static-build/scripts/qemu-build-post.sh b/tools/packaging/static-build/scripts/qemu-build-post.sh index fbb8f931c4..54e4f8d764 100755 --- a/tools/packaging/static-build/scripts/qemu-build-post.sh +++ b/tools/packaging/static-build/scripts/qemu-build-post.sh @@ -23,6 +23,12 @@ for pattern in ${qemu_black_list[@]}; do find . -path "$pattern" | xargs rm -rfv done +if [[ -n "${BUILD_SUFFIX}" ]]; then + echo "Rename binaries using $BUILD_SUFFIX" + find -name 'qemu-system-*' -exec mv {} {}-experimental \; + find -name 'virtiofsd' -exec mv {} {}-experimental \; +fi + echo "INFO: create the tarball" tar -czvf "${QEMU_TARBALL}" * popd