Skip to content

Commit

Permalink
Update Qemu version to v6.1.0 if possible.
Browse files Browse the repository at this point in the history
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 cross-rs#557.
Closes cross-rs#587.
  • Loading branch information
Alexhuszagh committed Jun 16, 2022
1 parent 3ded782 commit a929588
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docker/qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"

Expand Down

0 comments on commit a929588

Please sign in to comment.