From 8f885fd404a5ce4a6c098b5e40db8e391015af0f Mon Sep 17 00:00:00 2001 From: Travis Cline Date: Mon, 20 Apr 2026 12:33:42 -0700 Subject: [PATCH 1/3] .github/workflows: resolve QEMU 10.x packages dynamically --- .github/workflows/test.yml | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f7396d03..32241238 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Test on: [push, pull_request] env: - QEMU_VERSION: "10.2.1+ds-1" + QEMU_MAJOR: "10" jobs: test: @@ -136,12 +136,22 @@ jobs: sudo apt-get update sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-armhf-cross - # Install QEMU 10.x from Debian trixie. Ubuntu 24.04 ships QEMU 8.2 + # Install the latest QEMU 10.x package from Debian. Ubuntu 24.04 ships QEMU 8.2 # which has a bug where inter-thread signal delivery (tgkill) hangs, # causing TestSetuidEtc to deadlock. - wget -q https://ftp.debian.org/debian/pool/main/q/qemu/qemu-user_${QEMU_VERSION}_arm64.deb -O /tmp/qemu-user.deb - wget -q https://ftp.debian.org/debian/pool/main/q/qemu/qemu-user-binfmt_${QEMU_VERSION}_arm64.deb -O /tmp/qemu-user-binfmt.deb - sudo dpkg --force-depends -i /tmp/qemu-user.deb /tmp/qemu-user-binfmt.deb + arch=$(dpkg --print-architecture) + qemu_user_deb=$( + curl -fsSL https://ftp.debian.org/debian/pool/main/q/qemu/ | + grep -Eo "qemu-user_${QEMU_MAJOR}\.[0-9.]+\+ds-[0-9]+_${arch}\.deb" | + sort -V | + tail -n 1 + ) + if [ -z "${qemu_user_deb}" ]; then + echo "missing qemu-user ${QEMU_MAJOR}.x package for ${arch}" >&2 + exit 1 + fi + wget -q "https://ftp.debian.org/debian/pool/main/q/qemu/${qemu_user_deb}" -O /tmp/qemu-user.deb + sudo dpkg --force-depends -i /tmp/qemu-user.deb sudo apt-get -f install -y # Create symlink for the dynamic linker that QEMU expects @@ -195,12 +205,22 @@ jobs: gcc-riscv64-linux-gnu g++-riscv64-linux-gnu \ gcc-s390x-linux-gnu g++-s390x-linux-gnu - # Install QEMU 10.x from Debian trixie. Ubuntu 24.04 ships QEMU 8.2 + # Install the latest QEMU 10.x package from Debian. Ubuntu 24.04 ships QEMU 8.2 # which has a bug where inter-thread signal delivery (tgkill) hangs, # causing TestSetuidEtc to deadlock. - wget -q https://ftp.debian.org/debian/pool/main/q/qemu/qemu-user_${QEMU_VERSION}_amd64.deb -O /tmp/qemu-user.deb - wget -q https://ftp.debian.org/debian/pool/main/q/qemu/qemu-user-binfmt_${QEMU_VERSION}_amd64.deb -O /tmp/qemu-user-binfmt.deb - sudo dpkg --force-depends -i /tmp/qemu-user.deb /tmp/qemu-user-binfmt.deb + arch=$(dpkg --print-architecture) + qemu_user_deb=$( + curl -fsSL https://ftp.debian.org/debian/pool/main/q/qemu/ | + grep -Eo "qemu-user_${QEMU_MAJOR}\.[0-9.]+\+ds-[0-9]+_${arch}\.deb" | + sort -V | + tail -n 1 + ) + if [ -z "${qemu_user_deb}" ]; then + echo "missing qemu-user ${QEMU_MAJOR}.x package for ${arch}" >&2 + exit 1 + fi + wget -q "https://ftp.debian.org/debian/pool/main/q/qemu/${qemu_user_deb}" -O /tmp/qemu-user.deb + sudo dpkg --force-depends -i /tmp/qemu-user.deb sudo apt-get -f install -y # Verify that the expected QEMU binaries are installed and usable. From 2dec9752ac72d9344d595c1cc75365e98cd3b9c3 Mon Sep 17 00:00:00 2001 From: Travis Cline Date: Mon, 20 Apr 2026 17:20:57 -0700 Subject: [PATCH 2/3] github: fixup var name --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32241238..1bc1ac2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Test on: [push, pull_request] env: - QEMU_MAJOR: "10" + QEMU_MAJOR_VERSION: "10" jobs: test: @@ -142,12 +142,12 @@ jobs: arch=$(dpkg --print-architecture) qemu_user_deb=$( curl -fsSL https://ftp.debian.org/debian/pool/main/q/qemu/ | - grep -Eo "qemu-user_${QEMU_MAJOR}\.[0-9.]+\+ds-[0-9]+_${arch}\.deb" | + grep -Eo "qemu-user_${QEMU_MAJOR_VERSION}\.[0-9.]+\+ds-[0-9]+_${arch}\.deb" | sort -V | tail -n 1 ) if [ -z "${qemu_user_deb}" ]; then - echo "missing qemu-user ${QEMU_MAJOR}.x package for ${arch}" >&2 + echo "missing qemu-user ${QEMU_MAJOR_VERSION}.x package for ${arch}" >&2 exit 1 fi wget -q "https://ftp.debian.org/debian/pool/main/q/qemu/${qemu_user_deb}" -O /tmp/qemu-user.deb @@ -211,12 +211,12 @@ jobs: arch=$(dpkg --print-architecture) qemu_user_deb=$( curl -fsSL https://ftp.debian.org/debian/pool/main/q/qemu/ | - grep -Eo "qemu-user_${QEMU_MAJOR}\.[0-9.]+\+ds-[0-9]+_${arch}\.deb" | + grep -Eo "qemu-user_${QEMU_MAJOR_VERSION}\.[0-9.]+\+ds-[0-9]+_${arch}\.deb" | sort -V | tail -n 1 ) if [ -z "${qemu_user_deb}" ]; then - echo "missing qemu-user ${QEMU_MAJOR}.x package for ${arch}" >&2 + echo "missing qemu-user ${QEMU_MAJOR_VERSION}.x package for ${arch}" >&2 exit 1 fi wget -q "https://ftp.debian.org/debian/pool/main/q/qemu/${qemu_user_deb}" -O /tmp/qemu-user.deb From d913317a66121f593b40b8fbfd817ababfab0c91 Mon Sep 17 00:00:00 2001 From: Travis Cline Date: Mon, 20 Apr 2026 17:23:48 -0700 Subject: [PATCH 3/3] github: accept suffixed QEMU package versions --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1bc1ac2f..e3bc373e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -142,7 +142,7 @@ jobs: arch=$(dpkg --print-architecture) qemu_user_deb=$( curl -fsSL https://ftp.debian.org/debian/pool/main/q/qemu/ | - grep -Eo "qemu-user_${QEMU_MAJOR_VERSION}\.[0-9.]+\+ds-[0-9]+_${arch}\.deb" | + grep -Eo "qemu-user_${QEMU_MAJOR_VERSION}\.[0-9.]+\+ds-[0-9]+([+~][A-Za-z0-9.+:~-]+)*_${arch}\.deb" | sort -V | tail -n 1 ) @@ -211,7 +211,7 @@ jobs: arch=$(dpkg --print-architecture) qemu_user_deb=$( curl -fsSL https://ftp.debian.org/debian/pool/main/q/qemu/ | - grep -Eo "qemu-user_${QEMU_MAJOR_VERSION}\.[0-9.]+\+ds-[0-9]+_${arch}\.deb" | + grep -Eo "qemu-user_${QEMU_MAJOR_VERSION}\.[0-9.]+\+ds-[0-9]+([+~][A-Za-z0-9.+:~-]+)*_${arch}\.deb" | sort -V | tail -n 1 )