From 30905453114f40ef1d98699c9112cd80073423f4 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Thu, 8 May 2025 11:06:00 -0400 Subject: [PATCH] qemu{,-user}: update to 10.0.0. qemu no longer supports 64bit guests on 32bit hosts, so several subpackages have been removed --- srcpkgs/qemu-user/template | 48 ++++++++++++++++++------------ srcpkgs/qemu/template | 49 +++++++++++++++++++------------ srcpkgs/removed-packages/template | 36 ++++++++++++++++++++++- 3 files changed, 95 insertions(+), 38 deletions(-) diff --git a/srcpkgs/qemu-user/template b/srcpkgs/qemu-user/template index b4ad8433d11..f882d87a2b5 100644 --- a/srcpkgs/qemu-user/template +++ b/srcpkgs/qemu-user/template @@ -1,7 +1,7 @@ # Template file for 'qemu-user' # This package should be updated together with qemu pkgname=qemu-user -version=9.2.3 +version=10.0.0 revision=1 build_style=meta configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec @@ -15,7 +15,7 @@ maintainer="classabbyamp " license="GPL-2.0-only, LGPL-2.1-only" homepage="https://www.qemu.org" distfiles="https://wiki.qemu.org/download/qemu-${version}.tar.bz2" -checksum=8035d5857d8605154d8cfc4c5d52f79cb8994a0f1a79114a29c075d7d04aaf19 +checksum=84e32fa04cdac1da2f571a296ab16554230617992ab2b077555516e371ff1ffd subpackages="qemu-user-static" if [ "$CROSS_BUILD" ]; then @@ -23,41 +23,48 @@ if [ "$CROSS_BUILD" ]; then fi _archs=( - aarch64 - aarch64_be - alpha arm armeb hexagon - hppa i386 - loongarch64 m68k microblaze microblazeel mips - mips64 - mips64el mipsel - mipsn32 - mipsn32el or1k ppc - ppc64 - ppc64le riscv32 - riscv64 - s390x sh4 sh4eb sparc - sparc32plus - sparc64 - x86_64 xtensa xtensaeb ) +_archs64=( + aarch64 + aarch64_be + alpha + hppa + loongarch64 + mips64 + mips64el + mipsn32 + mipsn32el + ppc64 + ppc64le + riscv64 + s390x + sparc32plus + sparc64 + x86_64 +) + +if [ "$XBPS_TARGET_WORDSIZE" -eq 64 ]; then + _archs+=("${_archs64[@]}") +fi + for _arch in "${_archs[@]}"; do # bug in xbps: it hates package names ending in _N _pkgname="qemu-user-${_arch//x86_64/amd64}" @@ -115,6 +122,11 @@ post_install() { HOST_ARCH="${XBPS_TARGET_MACHINE%-musl}" scripts/qemu-binfmt-conf.sh --debian \ --exportdir "${DESTDIR}"/usr/share/binfmts --qemu-path /usr/bin \ --preserve-argv0 yes --persistent yes --credential yes + if [ "$XBPS_TARGET_WORDSIZE" -eq 32 ]; then + for a in "${_archs64[@]}"; do + rm -f "${DESTDIR}/usr/share/binfmts/qemu-${a}" + done + fi } qemu-user-static_package() { diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template index fb44487bef4..a85c98b9395 100644 --- a/srcpkgs/qemu/template +++ b/srcpkgs/qemu/template @@ -1,7 +1,7 @@ # Template file for 'qemu' # This package should be updated together with qemu-user pkgname=qemu -version=9.2.3 +version=10.0.0 revision=1 build_style=meta configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec @@ -26,7 +26,7 @@ maintainer="classabbyamp " license="GPL-2.0-only, LGPL-2.1-only" homepage="https://www.qemu.org" distfiles="https://wiki.qemu.org/download/qemu-${version}.tar.bz2" -checksum=8035d5857d8605154d8cfc4c5d52f79cb8994a0f1a79114a29c075d7d04aaf19 +checksum=84e32fa04cdac1da2f571a296ab16554230617992ab2b077555516e371ff1ffd ignore_elf_dirs="/usr/share/qemu" build_options="gtk3 iscsi jack numa opengl pulseaudio sdl2 smartcard spice virgl" @@ -48,37 +48,44 @@ if [ "$CROSS_BUILD" ]; then fi _archs=( - aarch64 - alpha arm avr - hppa i386 - loongarch64 m68k - microblaze - microblazeel mips - mips64 - mips64el mipsel or1k ppc - ppc64 riscv32 - riscv64 rx - s390x sh4 sh4eb sparc - sparc64 tricore - x86_64 xtensa xtensaeb ) +_archs64=( + aarch64 + alpha + hppa + loongarch64 + microblaze + microblazeel + mips64 + mips64el + ppc64 + riscv64 + s390x + sparc64 + x86_64 +) + +if [ "$XBPS_TARGET_WORDSIZE" -eq 64 ]; then + _archs+=("${_archs64[@]}") +fi + for _arch in "${_archs[@]}"; do # bug in xbps: it hates package names ending in _N _pkgname="qemu-system-${_arch//x86_64/amd64}" @@ -177,16 +184,20 @@ post_install() { # qemu-bridge-helper must be setuid for non privileged users. chmod u+s ${DESTDIR}/usr/libexec/qemu-bridge-helper vsv qemu-ga + if [ "$XBPS_TARGET_WORDSIZE" -eq 32 ]; then + for f in palcode-clipper hppa-firmware.img hppa-firmware64.img \ + opensbi-riscv64-generic-fw_dynamic.bin s390-ccw.img \ + openbios-sparc64; do + rm "${DESTDIR}/usr/share/qemu/${f}" + done + fi } qemu-common_package() { short_desc+=" - common files" pkg_install() { vmove usr/share - # TCG plugins are deprecated on 32bit, so there are no headers to move - if [ "$XBPS_TARGET_WORDSIZE" -eq 64 ]; then - vmove usr/include - fi + vmove usr/include vmove usr/libexec } } diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template index 83e1a512c29..52766c33eac 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -1,6 +1,6 @@ # Template file for 'removed-packages' pkgname=removed-packages -version=0.1.20250322 +version=0.1.20250508 revision=1 build_style=meta short_desc="Uninstalls packages removed from repository" @@ -940,3 +940,37 @@ esac if [ "$XBPS_TARGET_MACHINE" = "armv7l" ]; then replaces+=" xf86-video-fbturbo-sunxi<=0.4.0" fi + +if [ "$XBPS_TARGET_WORDSIZE" -eq 32 ]; then + replaces+=" + qemu-system-aarch64 + qemu-system-alpha + qemu-system-amd64 + qemu-system-hppa + qemu-system-loongarch64 + qemu-system-microblaze + qemu-system-microblazeel + qemu-system-mips64 + qemu-system-mips64el + qemu-system-ppc64 + qemu-system-riscv64 + qemu-system-s390x + qemu-system-sparc64 + qemu-user-aarch64 + qemu-user-aarch64_be + qemu-user-alpha + qemu-user-amd64 + qemu-user-hppa + qemu-user-loongarch64 + qemu-user-mips64 + qemu-user-mips64el + qemu-user-mipsn32 + qemu-user-mipsn32el + qemu-user-ppc64 + qemu-user-ppc64le + qemu-user-riscv64 + qemu-user-s390x + qemu-user-sparc32plus + qemu-user-sparc64 + " +fi