From b393370212519d8bbba57b50293380124a06bbbb Mon Sep 17 00:00:00 2001 From: Helmut Pozimski Date: Sun, 2 May 2021 12:24:08 +0200 Subject: [PATCH] qemu: update to 6.0.0. --- ...l.c-define-__SIGRTMIN-MAX-for-non-GN.patch | 27 ++++++++++-- .../qemu/patches/ignore-sys-signal_h.patch | 17 -------- srcpkgs/qemu/patches/mmap-mremap-efault.patch | 41 ------------------- srcpkgs/qemu/template | 6 +-- 4 files changed, 26 insertions(+), 65 deletions(-) delete mode 100644 srcpkgs/qemu/patches/ignore-sys-signal_h.patch delete mode 100644 srcpkgs/qemu/patches/mmap-mremap-efault.patch diff --git a/srcpkgs/qemu/patches/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch b/srcpkgs/qemu/patches/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch index 4acb8e070ce..9da918e4345 100644 --- a/srcpkgs/qemu/patches/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch +++ b/srcpkgs/qemu/patches/0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch @@ -1,7 +1,23 @@ -Updated version of 0006-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch for qemu-3.0.0 -from alpine, original author Natanael Copa. ---- linux-user/signal.c 2019-08-22 19:46:40.369463327 +0200 -+++ linux-user/signal.c 2019-08-22 19:47:25.176898649 +0200 +From 8fbb4e6797ed67310b74cbaaa061269db45a5b71 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Tue, 29 Apr 2014 15:51:31 +0200 +Subject: [PATCH] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU + platforms + +The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available +on all platforms, so we define those if they are missing. + +This is needed for musl libc. + +Signed-off-by: Natanael Copa +--- + linux-user/signal.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/linux-user/signal.c b/linux-user/signal.c +index 5ca6d62b15..e917c16d91 100644 +--- linux-user/signal.c ++++ linux-user/signal.c @@ -25,6 +25,13 @@ #include "trace.h" #include "signal-common.h" @@ -16,3 +32,6 @@ from alpine, original author Natanael Copa. static struct target_sigaction sigact_table[TARGET_NSIG]; static void host_signal_handler(int host_signum, siginfo_t *info, +-- +2.23.0 + diff --git a/srcpkgs/qemu/patches/ignore-sys-signal_h.patch b/srcpkgs/qemu/patches/ignore-sys-signal_h.patch deleted file mode 100644 index 088a0e654c0..00000000000 --- a/srcpkgs/qemu/patches/ignore-sys-signal_h.patch +++ /dev/null @@ -1,17 +0,0 @@ -Source: @pullmoll -Upstream: no -Reason: Not needed. For glibc this has just #include and for musl it prints a warning. - ---- include/qemu/osdep.h 2020-12-08 17:59:44.000000000 +0100 -+++ include/qemu/osdep.h 2020-12-12 18:41:47.709685865 +0100 -@@ -104,10 +104,6 @@ - #include - #include - --#ifdef HAVE_SYS_SIGNAL_H --#include --#endif -- - #ifndef _WIN32 - #include - #else diff --git a/srcpkgs/qemu/patches/mmap-mremap-efault.patch b/srcpkgs/qemu/patches/mmap-mremap-efault.patch deleted file mode 100644 index a5eaa7906c8..00000000000 --- a/srcpkgs/qemu/patches/mmap-mremap-efault.patch +++ /dev/null @@ -1,41 +0,0 @@ -Source: @pullmoll -Upstream: no -Reason: errno=EFAULT when the address passed to mremap(2) is not valid - -See Rich Felker's comment at https://www.openwall.com/lists/musl/2017/06/21/2 for -why we need to return errno as described in man mremap(2) from qemu-user-static. -Also speed up the loop when checking for increasing the mappings size to go -in steps of TARGET_PAGE_SIZE and OR-in a check for the very last byte of the range. - ---- linux-user/mmap.c 2019-04-23 20:14:46.000000000 +0200 -+++ linux-user/mmap.c 2019-06-30 16:31:26.545637450 +0200 -@@ -692,7 +692,7 @@ - if (!guest_range_valid(old_addr, old_size) || - ((flags & MREMAP_FIXED) && - !guest_range_valid(new_addr, new_size))) { -- errno = ENOMEM; -+ errno = EFAULT; - return -1; - } - -@@ -728,9 +728,10 @@ - abi_ulong addr; - for (addr = old_addr + old_size; - addr < old_addr + new_size; -- addr++) { -+ addr += TARGET_PAGE_SIZE) { - prot |= page_get_flags(addr); - } -+ prot |= page_get_flags(old_addr + new_size - 1); - } - if (prot == 0) { - host_addr = mremap(g2h(old_addr), old_size, new_size, flags); -@@ -738,7 +739,7 @@ - mmap_reserve(old_addr + old_size, new_size - old_size); - } - } else { -- errno = ENOMEM; -+ errno = EFAULT; - host_addr = MAP_FAILED; - } - /* Check if address fits target address space */ diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template index 83e43ff5cba..75f57bac755 100644 --- a/srcpkgs/qemu/template +++ b/srcpkgs/qemu/template @@ -1,8 +1,8 @@ # Template file for 'qemu' # This package should be updated together with qemu-user-static pkgname=qemu -version=5.2.0 -revision=2 +version=6.0.0 +revision=1 build_style=configure hostmakedepends="gettext pkg-config perl python3 automake libtool flex python3-Sphinx texinfo ninja" @@ -23,7 +23,7 @@ maintainer="Helmut Pozimski " license="GPL-2.0-or-later, LGPL-2.1-or-later" homepage="https://www.qemu.org" distfiles="https://wiki.qemu.org/download/qemu-${version}.tar.bz2" -checksum=7bd9334c02edaf02f5b0b52beb19fe7f72556c3ca0180e20f0095f0ef2f25f14 +checksum=7d306a03c67c0b667d21b55e1b172f5e55a9af5ee09cbd739fb2395aeca7860c ignore_elf_dirs="/usr/share/qemu" nostrip_files="hppa-firmware.img openbios-ppc openbios-sparc32 openbios-sparc64 palcode-clipper s390-ccw.img s390-netboot.img u-boot.e500 opensbi-riscv32-generic-fw_dynamic.elf