From a9295881a73b304e70569f7504c20ef307278bb6 Mon Sep 17 00:00:00 2001 From: Alex Huszagh Date: Thu, 16 Jun 2022 02:28:13 -0500 Subject: [PATCH] Update Qemu version to v6.1.0 if possible. The latest Qemu release contains numerous bug fixes, and other improvements, and the existing patches various issues reported in older Qemu versions. The only changes required are incrementing the Qemu version and adding ninja-build as a temporary dependency, since Qemu now uses it for the build system. However, Ubuntu 16.04, the base image for numerous dependencies we use, still ships with Python3.5, and Qemu 6.1.0 requires Python3.6+, as well as the ninja-build system. We therefore add a check to see if we have a compatible Python version, and if we do, build the last Qemu version, so our code can be fully backwards-compatible. Fixes #557. Closes #587. --- docker/qemu.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/qemu.sh b/docker/qemu.sh index 9025dacb5..75626c55c 100755 --- a/docker/qemu.sh +++ b/docker/qemu.sh @@ -170,6 +170,15 @@ main() { libpixman-1-dev \ libselinux1-dev \ zlib1g-dev + + # if we have python3.6+, we can install qemu 6.1.0, which needs ninja-build + # ubuntu 16.04 only provides python3.5, so remove when we have a newer qemu. + is_ge_python36=$(python3 -c "import sys; print(int(sys.version_info >= (3, 6)))") + if [[ "${is_ge_python36}" == "1" ]]; then + if_ubuntu version=6.1.0 + if_ubuntu install_packages ninja-build + fi + local td td="$(mktemp -d)"