Merge pull request #4639 from fidencio/topic/packaging-rework-qemu-build-suffix

packaging: Rework how ${BUILD_SUFFIX} is used with the QEMU builder scripts
This commit is contained in:
Fabiano Fidêncio
2022-07-13 15:03:19 +02:00
committed by GitHub
3 changed files with 7 additions and 5 deletions

View File

@@ -72,8 +72,10 @@ RUN git clone --depth=1 "${QEMU_REPO}" qemu && \
git fetch --depth=1 origin "${QEMU_VERSION}" && git checkout FETCH_HEAD && \ git fetch --depth=1 origin "${QEMU_VERSION}" && git checkout FETCH_HEAD && \
scripts/git-submodule.sh update meson capstone && \ scripts/git-submodule.sh update meson capstone && \
/root/patch_qemu.sh "${QEMU_VERSION}" "/root/kata_qemu/patches" && \ /root/patch_qemu.sh "${QEMU_VERSION}" "/root/kata_qemu/patches" && \
(PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s "kata-qemu${BUILD_SUFFIX}" | xargs ./configure \ [ -n "${BUILD_SUFFIX}" ] && HYPERVISOR_NAME="kata-qemu-${BUILD_SUFFIX}" || HYPERVISOR_NAME="kata-qemu" && \
--with-pkgversion="kata-static${BUILD_SUFFIX}") && \ [ -n "${BUILD_SUFFIX}" ] && PKGVERSION="kata-static-${BUILD_SUFFIX}" || PKGVERSION="kata-static" && \
(PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s "${HYPERVISOR_NAME}" | xargs ./configure \
--with-pkgversion="${PKGVERSION}") && \
make -j"$(nproc ${CI:+--ignore 1})" && \ make -j"$(nproc ${CI:+--ignore 1})" && \
make install DESTDIR="${QEMU_DESTDIR}" && \ make install DESTDIR="${QEMU_DESTDIR}" && \
/root/static-build/scripts/qemu-build-post.sh /root/static-build/scripts/qemu-build-post.sh

View File

@@ -26,4 +26,4 @@ fi
[ -n "$qemu_version" ] || qemu_version=$(get_from_kata_deps "assets.hypervisor.qemu-experimental.version") [ -n "$qemu_version" ] || qemu_version=$(get_from_kata_deps "assets.hypervisor.qemu-experimental.version")
[ -n "$qemu_version" ] || die "failed to get qemu version" [ -n "$qemu_version" ] || die "failed to get qemu version"
"${script_dir}/build-base-qemu.sh" "${qemu_repo}" "${qemu_version}" "-experimental" "kata-static-qemu-experimental.tar.gz" "${script_dir}/build-base-qemu.sh" "${qemu_repo}" "${qemu_version}" "experimental" "kata-static-qemu-experimental.tar.gz"

View File

@@ -25,9 +25,9 @@ done
if [[ -n "${BUILD_SUFFIX}" ]]; then if [[ -n "${BUILD_SUFFIX}" ]]; then
echo "Rename binaries using $BUILD_SUFFIX" echo "Rename binaries using $BUILD_SUFFIX"
find -name 'qemu-system-*' -exec mv {} {}-experimental \; find -name 'qemu-system-*' -exec mv {} {}-$BUILD_SUFFIX \;
if [[ ${ARCH} != "x86_64" ]]; then if [[ ${ARCH} != "x86_64" ]]; then
find -name 'virtiofsd' -exec mv {} {}-experimental \; find -name 'virtiofsd' -exec mv {} {}-$BUILD_SUFFIX \;
fi fi
fi fi