From e81d7dadc5bfaa3b5bc6c3f09309b7db9e41cd5b Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Thu, 15 Jun 2023 23:42:34 +0200 Subject: [PATCH] qemu(-user-static): update to 7.2.3 --- srcpkgs/qemu-user-static/template | 6 +- srcpkgs/qemu/patches/gcc12.patch | 72 ------------------- .../test-vmstate-fix-use-after-free.patch | 22 ++++++ srcpkgs/qemu/template | 6 +- 4 files changed, 28 insertions(+), 78 deletions(-) delete mode 100644 srcpkgs/qemu/patches/gcc12.patch create mode 100644 srcpkgs/qemu/patches/test-vmstate-fix-use-after-free.patch diff --git a/srcpkgs/qemu-user-static/template b/srcpkgs/qemu-user-static/template index 2a8da9b53f2d..b54ceccde6ed 100644 --- a/srcpkgs/qemu-user-static/template +++ b/srcpkgs/qemu-user-static/template @@ -1,8 +1,8 @@ # Template file for 'qemu-user-static' # This package should be updated together with qemu pkgname=qemu-user-static -version=7.1.0 -revision=3 +version=7.2.3 +revision=1 build_style=configure configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --disable-kvm --disable-png --disable-virtfs --disable-fdt --disable-seccomp @@ -14,7 +14,7 @@ maintainer="Orphaned " 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=f7ac2b85b3f1831e6810b140306e30af91556e15784864b209f3942858947fd0 +checksum=fa373d8a6572abbeac670cc78beb9630027feb5bed561bb04ae894797f92cb01 _fmts="aarch64 aarch64_be alpha arm armeb cris hppa i386 m68k microblaze microblazeel mips mipsel mips64 mips64el mipsn32 mipsn32el or1k diff --git a/srcpkgs/qemu/patches/gcc12.patch b/srcpkgs/qemu/patches/gcc12.patch deleted file mode 100644 index 2a4b2bd03609..000000000000 --- a/srcpkgs/qemu/patches/gcc12.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 5cb993ff131fca2abef3ce074a20258fd6fce557 Mon Sep 17 00:00:00 2001 -From: Bernhard Beschow -Date: Sat, 18 Mar 2023 19:59:31 +0100 -Subject: [PATCH] qemu/osdep: Switch position of "extern" and "G_NORETURN" - -Fixes the Windows build under msys2 using GCC 12 which fails with the following -error: - - [184/579] Compiling C++ object qga/vss-win32/qga-vss.dll.p/install.cpp.obj - FAILED: qga/vss-win32/qga-vss.dll.p/install.cpp.obj - "c++" "-m64" "-mcx16" "-Iqga/vss-win32/qga-vss.dll.p" "-Iqga/vss-win32" "-I../src/qga/vss-win32" "-I." "-Iqapi" "-Itrace" "-Iui" "-Iui/shader" "-IC:/msys64/mingw64/include/glib-2.0" "-IC:/msys64/mingw64/lib/glib-2.0/include" "-fdiagnostics-color=auto" "-Wall" "-Winvalid-pch" "-Wnon-virtual-dtor" "-Werror" "-std=gnu++11" "-g" "-iquote" "." "-iquote" "C:/msys64/home/shentey/Projects/qemu/src" "-iquote" "C:/msys64/home/shentey/Projects/qemu/src/include" "-iquote" "C:/msys64/home/shentey/Projects/qemu/src/tcg/i386" "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-fno-pie" "-no-pie" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" "-D_LARGEFILE_SOURCE" "-fno-strict-aliasing" "-fno-common" "-fwrapv" "-Wundef" "-Wwrite-strings" "-Wtype-limits" "-Wformat-security" "-Wformat-y2k" "-Winit-self" "-Wignored-qualifiers" "-Wempty-body" "-Wendif-labels" "-Wexpansion-to-defined" "-Wimplicit-fallthrough=2" "-Wmissing-format-attribute" "-Wno-missing-include-dirs" "-Wno-shift-negative-value" "-Wno-psabi" "-fstack-protector-strong" "-Wno-unknown-pragmas" "-Wno-delete-non-virtual-dtor" "-Wno-non-virtual-dtor" -MD -MQ qga/vss-win32/qga-vss.dll.p/install.cpp.obj -MF "qga/vss-win32/qga-vss.dll.p/install.cpp.obj.d" -o qga/vss-win32/qga-vss.dll.p/install.cpp.obj "-c" ../src/qga/vss-win32/install.cpp - In file included from C:/msys64/mingw64/lib/glib-2.0/include/glibconfig.h:9, - from C:/msys64/mingw64/include/glib-2.0/glib/gtypes.h:34, - from C:/msys64/mingw64/include/glib-2.0/glib/galloca.h:34, - from C:/msys64/mingw64/include/glib-2.0/glib.h:32, - from C:/msys64/home/shentey/Projects/qemu/src/include/glib-compat.h:32, - from C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:144, - from ../src/qga/vss-win32/install.cpp:13: - C:/msys64/mingw64/include/glib-2.0/glib/gmacros.h:1075:21: error: standard attributes in middle of decl-specifiers - 1075 | # define G_NORETURN [[noreturn]] - | ^ - C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:240:8: note: in expansion of macro 'G_NORETURN' - 240 | extern G_NORETURN - | ^~~~~~~~~~ - C:/msys64/mingw64/include/glib-2.0/glib/gmacros.h:1075:21: note: standard attributes must precede the decl-specifiers to apply to the declaration, or follow them to apply to the type - 1075 | # define G_NORETURN [[noreturn]] - | ^ - C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:240:8: note: in expansion of macro 'G_NORETURN' - 240 | extern G_NORETURN - | ^~~~~~~~~~ - C:/msys64/mingw64/include/glib-2.0/glib/gmacros.h:1075:21: error: attribute ignored [-Werror=attributes] - 1075 | # define G_NORETURN [[noreturn]] - | ^ - C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:240:8: note: in expansion of macro 'G_NORETURN' - 240 | extern G_NORETURN - | ^~~~~~~~~~ - C:/msys64/mingw64/include/glib-2.0/glib/gmacros.h:1075:21: note: an attribute that appertains to a type-specifier is ignored - 1075 | # define G_NORETURN [[noreturn]] - | ^ - C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:240:8: note: in expansion of macro 'G_NORETURN' - 240 | extern G_NORETURN - | ^~~~~~~~~~ - cc1plus.exe: all warnings being treated as errors - -Apparently it also fixes the compilation with Clang 15 (see -https://gitlab.com/qemu-project/qemu/-/issues/1541 ). - -Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1541 -Signed-off-by: Bernhard Beschow -Message-Id: <20230318185931.181659-1-shentey@gmail.com> -Reviewed-by: Peter Maydell -Signed-off-by: Thomas Huth ---- - include/qemu/osdep.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h -index f68b5d8708c..9eff0be95bd 100644 ---- a/include/qemu/osdep.h -+++ b/include/qemu/osdep.h -@@ -237,7 +237,7 @@ extern "C" { - * supports QEMU_ERROR, this will be reported at compile time; otherwise - * this will be reported at link time due to the missing symbol. - */ --extern G_NORETURN -+G_NORETURN extern - void QEMU_ERROR("code path is reachable") - qemu_build_not_reached_always(void); - #if defined(__OPTIMIZE__) && !defined(__NO_INLINE__) --- -GitLab - diff --git a/srcpkgs/qemu/patches/test-vmstate-fix-use-after-free.patch b/srcpkgs/qemu/patches/test-vmstate-fix-use-after-free.patch new file mode 100644 index 000000000000..49d639672906 --- /dev/null +++ b/srcpkgs/qemu/patches/test-vmstate-fix-use-after-free.patch @@ -0,0 +1,22 @@ +--- a/tests/unit/test-vmstate.c ++++ b/tests/unit/test-vmstate.c +@@ -1074,7 +1074,6 @@ + struct match_node_data d = {tp->tree2, key, value}; + + g_tree_foreach(tp->tree2, tp->match_node, &d); +- g_tree_remove(tp->tree1, key); + return false; + } + +@@ -1083,9 +1082,9 @@ + { + struct tree_cmp_data tp = {tree1, tree2, function}; + ++ assert(g_tree_nnodes(tree1) == g_tree_nnodes(tree2)); + g_tree_foreach(tree1, diff_tree, &tp); +- assert(g_tree_nnodes(tree1) == 0); +- assert(g_tree_nnodes(tree2) == 0); ++ g_tree_destroy(g_tree_ref(tree1)); + } + + static void diff_domain(TestGTreeDomain *d1, TestGTreeDomain *d2) diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template index 48ab199e5686..2fe2eb9a7370 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=7.1.0 -revision=2 +version=7.2.3 +revision=1 build_style=configure configure_args="--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/libexec --localstatedir=/var --disable-glusterfs --disable-xen --enable-docs --enable-kvm --enable-libusb --enable-pie @@ -28,7 +28,7 @@ maintainer="Orphaned " 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=f7ac2b85b3f1831e6810b140306e30af91556e15784864b209f3942858947fd0 +checksum=fa373d8a6572abbeac670cc78beb9630027feb5bed561bb04ae894797f92cb01 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