commit:     fe0e83cd49d113e7c82f6c94433bb9a924072dde
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  7 13:15:15 2021 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Mon Jun  7 13:15:15 2021 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=fe0e83cd

app-emulation/qemu: sync with ::gentoo stable

Package-Manager: Portage-3.0.19, Repoman-3.0.2
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 app-emulation/qemu/Manifest                        |  2 +-
 app-emulation/qemu/files/65-kvm.rules-r1           |  2 -
 .../files/musl-patches/guest-agent-shutdown.patch  | 34 --------
 .../qemu/files/qemu-4.0.0-mkdir_systemtap.patch    | 12 ---
 app-emulation/qemu/files/qemu-4.2.0-cflags.patch   | 16 ----
 .../qemu-5.1.0-pixman-for-vhost-user-gpu.patch     | 62 ---------------
 ...qemu-5.1.0-usb-host-workaround-libusb-bug.patch | 82 --------------------
 .../files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch  | 90 ----------------------
 .../qemu/files/qemu-5.2.0-fix-firmware-path.patch  | 16 ----
 .../qemu/files/qemu-5.2.0-no-pie-ld.patch          | 73 ------------------
 .../qemu/files/qemu-9999-fix-firmware-path.patch   | 17 ----
 .../{qemu-5.2.0-r50.ebuild => qemu-6.0.0.ebuild}   | 74 +++++++++++++-----
 12 files changed, 55 insertions(+), 425 deletions(-)

diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest
index 2157b27..4e6705f 100644
--- a/app-emulation/qemu/Manifest
+++ b/app-emulation/qemu/Manifest
@@ -1 +1 @@
-DIST qemu-5.2.0.tar.xz 106902800 BLAKE2B 
4413d5591cbabf80faba5b0b7347ee7749ff0a71af44bdf7f64b1995e17ecf1f3df539fa8e63959e0d50cd0502a41a2921e60cc6d078ed8ab5b09ab4b86d4ed7
 SHA512 
bddd633ce111471ebc651e03080251515178808556b49a308a724909e55dac0be0cc0c79c536ac12d239678ae94c60100dc124be9b9d9538340c03a2f27177f3
+DIST qemu-6.0.0.tar.xz 107333232 BLAKE2B 
7746329d3e13782b7c346ce4052cc517cfc65cd9b2d514d199e4d5b8570ca79566ec04b0c114db2e97c84e68eb551e0d4cdce1b14b91a88fe08d2a5f682c1418
 SHA512 
ee3ff00aebec4d8891d2ff6dabe4e667e510b2a4fe3f6190aa34673a91ea32dcd2db2e9bf94c2f1bf05aa79788f17cfbbedc6027c0988ea08a92587b79ee05e4

diff --git a/app-emulation/qemu/files/65-kvm.rules-r1 
b/app-emulation/qemu/files/65-kvm.rules-r1
deleted file mode 100644
index ab3776a..0000000
--- a/app-emulation/qemu/files/65-kvm.rules-r1
+++ /dev/null
@@ -1,2 +0,0 @@
-KERNEL=="kvm", GROUP="kvm", MODE="0660"
-KERNEL=="vhost-net", GROUP="kvm", MODE="0660", OPTIONS+="static_node=vhost-net"

diff --git a/app-emulation/qemu/files/musl-patches/guest-agent-shutdown.patch 
b/app-emulation/qemu/files/musl-patches/guest-agent-shutdown.patch
deleted file mode 100644
index 742f281..0000000
--- a/app-emulation/qemu/files/musl-patches/guest-agent-shutdown.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff --git a/qga/commands-posix.c b/qga/commands-posix.c
-index 1877976..7915aab 100644
---- a/qga/commands-posix.c
-+++ b/qga/commands-posix.c
-@@ -82,6 +82,7 @@ static void ga_wait_child(pid_t pid, int *status, Error 
**errp)
- void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
- {
-     const char *shutdown_flag;
-+    const char *fallback_cmd = NULL;
-     Error *local_err = NULL;
-     pid_t pid;
-     int status;
-@@ -89,10 +90,13 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, 
Error **errp)
-     slog("guest-shutdown called, mode: %s", mode);
-     if (!has_mode || strcmp(mode, "powerdown") == 0) {
-         shutdown_flag = "-P";
-+        fallback_cmd = "/sbin/poweroff";
-     } else if (strcmp(mode, "halt") == 0) {
-         shutdown_flag = "-H";
-+        fallback_cmd = "/sbin/halt";
-     } else if (strcmp(mode, "reboot") == 0) {
-         shutdown_flag = "-r";
-+        fallback_cmd = "/sbin/reboot";
-     } else {
-         error_setg(errp,
-                    "mode is invalid (valid values are: 
halt|powerdown|reboot");
-@@ -109,6 +113,7 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, 
Error **errp)
- 
-         execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
-                "hypervisor initiated shutdown", (char*)NULL, environ);
-+        execle(fallback_cmd, fallback_cmd, (char*)NULL, environ);
-         _exit(EXIT_FAILURE);
-     } else if (pid < 0) {
-         error_setg_errno(errp, errno, "failed to create child process");

diff --git a/app-emulation/qemu/files/qemu-4.0.0-mkdir_systemtap.patch 
b/app-emulation/qemu/files/qemu-4.0.0-mkdir_systemtap.patch
deleted file mode 100644
index 95ccdd7..0000000
--- a/app-emulation/qemu/files/qemu-4.0.0-mkdir_systemtap.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 04a0d450..e0013a59 100644
---- a/Makefile
-+++ b/Makefile
-@@ -803,6 +802,7 @@
-       $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
- endif
- ifdef CONFIG_TRACE_SYSTEMTAP
-+      mkdir -p $(DESTDIR)$(bindir)
-       $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir)
- endif
- ifneq ($(BLOBS),)

diff --git a/app-emulation/qemu/files/qemu-4.2.0-cflags.patch 
b/app-emulation/qemu/files/qemu-4.2.0-cflags.patch
deleted file mode 100644
index 1019265..0000000
--- a/app-emulation/qemu/files/qemu-4.2.0-cflags.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git i/configure w/configure
-index a72a5def57..546d757603 100755
---- i/configure
-+++ w/configure
-@@ -6093,10 +6093,6 @@ write_c_skeleton
- if test "$gcov" = "yes" ; then
-   QEMU_CFLAGS="-fprofile-arcs -ftest-coverage -g $QEMU_CFLAGS"
-   QEMU_LDFLAGS="-fprofile-arcs -ftest-coverage $QEMU_LDFLAGS"
--elif test "$fortify_source" = "yes" ; then
--  CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
--elif test "$debug" = "no"; then
--  CFLAGS="-O2 $CFLAGS"
- fi
- 
- if test "$have_asan" = "yes"; then
-

diff --git 
a/app-emulation/qemu/files/qemu-5.1.0-pixman-for-vhost-user-gpu.patch 
b/app-emulation/qemu/files/qemu-5.1.0-pixman-for-vhost-user-gpu.patch
deleted file mode 100644
index 4eb644f..0000000
--- a/app-emulation/qemu/files/qemu-5.1.0-pixman-for-vhost-user-gpu.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-https://bugs.gentoo.org/735146
-
-From 4fd46e6cdd976f4aecdc3fbbad728e00a7bc4ee0 Mon Sep 17 00:00:00 2001
-From: Rafael Kitover <rkito...@gmail.com>
-Date: Thu, 13 Aug 2020 20:19:24 +0000
-Subject: [PATCH] configure: Require pixman for vhost-user-gpu.
-
-Use the test from Makefile to check if vhost-user-gpu is being built,
-and if so require pixman.
-
-Signed-off-by: Rafael Kitover <rkito...@gmail.com>
----
- configure | 28 ++++++++++++++--------------
- 1 file changed, 14 insertions(+), 14 deletions(-)
-
---- a/configure
-+++ b/configure
-@@ -4062,20 +4062,6 @@ if test "$modules" = yes; then
-     fi
- fi
- 
--##########################################
--# pixman support probe
--
--if test "$softmmu" = "no"; then
--  pixman_cflags=
--  pixman_libs=
--elif $pkg_config --atleast-version=0.21.8 pixman-1 > /dev/null 2>&1; then
--  pixman_cflags=$($pkg_config --cflags pixman-1)
--  pixman_libs=$($pkg_config --libs pixman-1)
--else
--  error_exit "pixman >= 0.21.8 not present." \
--      "Please install the pixman devel package."
--fi
--
- ##########################################
- # libmpathpersist probe
- 
-@@ -4491,6 +4477,20 @@ if test "$opengl" = "yes" && test "$have_x11" = "yes"; 
then
-   done
- fi
- 
-+##########################################
-+# pixman support probe
-+
-+if test "$softmmu" = "no" && ! test "${linux} ${virglrenderer} ${gbm} 
${want_tools}" = "yes yes yes yes";  then
-+  pixman_cflags=
-+  pixman_libs=
-+elif $pkg_config --atleast-version=0.21.8 pixman-1 > /dev/null 2>&1; then
-+  pixman_cflags=$($pkg_config --cflags pixman-1)
-+  pixman_libs=$($pkg_config --libs pixman-1)
-+else
-+  error_exit "pixman >= 0.21.8 not present." \
-+      "Please install the pixman devel package."
-+fi
-+
- ##########################################
- # libxml2 probe
- if test "$libxml2" != "no" ; then
--- 
-2.28.0
-

diff --git 
a/app-emulation/qemu/files/qemu-5.1.0-usb-host-workaround-libusb-bug.patch 
b/app-emulation/qemu/files/qemu-5.1.0-usb-host-workaround-libusb-bug.patch
deleted file mode 100644
index 34a50a9..0000000
--- a/app-emulation/qemu/files/qemu-5.1.0-usb-host-workaround-libusb-bug.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 202d69a715a4b1824dcd7ec1683d027ed2bae6d3 Mon Sep 17 00:00:00 2001
-Message-Id: 
<202d69a715a4b1824dcd7ec1683d027ed2bae6d3.1606202550.git.mpriv...@redhat.com>
-From: Gerd Hoffmann <kra...@redhat.com>
-Date: Mon, 24 Aug 2020 13:00:57 +0200
-Subject: [PATCH] usb-host: workaround libusb bug
-
-libusb_get_device_speed() does not work for
-libusb_wrap_sys_device() devices in v1.0.23.
-
-Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1871090
-Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
-Message-id: 20200824110057.32089-1-kra...@redhat.com
-Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
----
- hw/usb/host-libusb.c | 37 ++++++++++++++++++++++++++++++++++++-
- 1 file changed, 36 insertions(+), 1 deletion(-)
-
-diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
-index c474551d84..08604f787f 100644
---- a/hw/usb/host-libusb.c
-+++ b/hw/usb/host-libusb.c
-@@ -39,6 +39,11 @@
- #endif
- #include <libusb.h>
- 
-+#ifdef CONFIG_LINUX
-+#include <sys/ioctl.h>
-+#include <linux/usbdevice_fs.h>
-+#endif
-+
- #include "qapi/error.h"
- #include "migration/vmstate.h"
- #include "monitor/monitor.h"
-@@ -885,6 +890,7 @@ static void usb_host_ep_update(USBHostDevice *s)
- static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd)
- {
-     USBDevice *udev = USB_DEVICE(s);
-+    int libusb_speed;
-     int bus_num = 0;
-     int addr = 0;
-     int rc;
-@@ -935,7 +941,36 @@ static int usb_host_open(USBHostDevice *s, libusb_device 
*dev, int hostfd)
-     usb_ep_init(udev);
-     usb_host_ep_update(s);
- 
--    udev->speed     = speed_map[libusb_get_device_speed(dev)];
-+    libusb_speed = libusb_get_device_speed(dev);
-+#ifdef CONFIG_LINUX
-+    if (hostfd && libusb_speed == 0) {
-+        /*
-+         * Workaround libusb bug: libusb_get_device_speed() does not
-+         * work for libusb_wrap_sys_device() devices in v1.0.23.
-+         *
-+         * Speeds are defined in linux/usb/ch9.h, file not included
-+         * due to name conflicts.
-+         */
-+        int rc = ioctl(hostfd, USBDEVFS_GET_SPEED, NULL);
-+        switch (rc) {
-+        case 1: /* low */
-+            libusb_speed = LIBUSB_SPEED_LOW;
-+            break;
-+        case 2: /* full */
-+            libusb_speed = LIBUSB_SPEED_FULL;
-+            break;
-+        case 3: /* high */
-+        case 4: /* wireless */
-+            libusb_speed = LIBUSB_SPEED_HIGH;
-+            break;
-+        case 5: /* super */
-+        case 6: /* super plus */
-+            libusb_speed = LIBUSB_SPEED_SUPER;
-+            break;
-+        }
-+    }
-+#endif
-+    udev->speed = speed_map[libusb_speed];
-     usb_host_speed_compat(s);
- 
-     if (s->ddesc.iProduct) {
--- 
-2.26.2
-

diff --git a/app-emulation/qemu/files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch 
b/app-emulation/qemu/files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch
deleted file mode 100644
index d1d23ec..0000000
--- a/app-emulation/qemu/files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-https://bugs.gentoo.org/743649
-
-From b946434f2659a182afc17e155be6791ebfb302eb Mon Sep 17 00:00:00 2001
-From: Gerd Hoffmann <kra...@redhat.com>
-Date: Tue, 25 Aug 2020 07:36:36 +0200
-Subject: [PATCH] usb: fix setup_len init (CVE-2020-14364)
-
-Store calculated setup_len in a local variable, verify it, and only
-write it to the struct (USBDevice->setup_len) in case it passed the
-sanity checks.
-
-This prevents other code (do_token_{in,out} functions specifically)
-from working with invalid USBDevice->setup_len values and overrunning
-the USBDevice->setup_buf[] buffer.
-
-Fixes: CVE-2020-14364
-Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
-Tested-by: Gonglei <arei.gong...@huawei.com>
-Reviewed-by: Li Qiang <liq...@gmail.com>
-Message-id: 20200825053636.29648-1-kra...@redhat.com
----
- hw/usb/core.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/hw/usb/core.c b/hw/usb/core.c
-index 5abd128b6b..5234dcc73f 100644
---- a/hw/usb/core.c
-+++ b/hw/usb/core.c
-@@ -129,6 +129,7 @@ void usb_wakeup(USBEndpoint *ep, unsigned int stream)
- static void do_token_setup(USBDevice *s, USBPacket *p)
- {
-     int request, value, index;
-+    unsigned int setup_len;
- 
-     if (p->iov.size != 8) {
-         p->status = USB_RET_STALL;
-@@ -138,14 +139,15 @@ static void do_token_setup(USBDevice *s, USBPacket *p)
-     usb_packet_copy(p, s->setup_buf, p->iov.size);
-     s->setup_index = 0;
-     p->actual_length = 0;
--    s->setup_len   = (s->setup_buf[7] << 8) | s->setup_buf[6];
--    if (s->setup_len > sizeof(s->data_buf)) {
-+    setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6];
-+    if (setup_len > sizeof(s->data_buf)) {
-         fprintf(stderr,
-                 "usb_generic_handle_packet: ctrl buffer too small (%d > 
%zu)\n",
--                s->setup_len, sizeof(s->data_buf));
-+                setup_len, sizeof(s->data_buf));
-         p->status = USB_RET_STALL;
-         return;
-     }
-+    s->setup_len = setup_len;
- 
-     request = (s->setup_buf[0] << 8) | s->setup_buf[1];
-     value   = (s->setup_buf[3] << 8) | s->setup_buf[2];
-@@ -259,26 +261,28 @@ static void do_token_out(USBDevice *s, USBPacket *p)
- static void do_parameter(USBDevice *s, USBPacket *p)
- {
-     int i, request, value, index;
-+    unsigned int setup_len;
- 
-     for (i = 0; i < 8; i++) {
-         s->setup_buf[i] = p->parameter >> (i*8);
-     }
- 
-     s->setup_state = SETUP_STATE_PARAM;
--    s->setup_len   = (s->setup_buf[7] << 8) | s->setup_buf[6];
-     s->setup_index = 0;
- 
-     request = (s->setup_buf[0] << 8) | s->setup_buf[1];
-     value   = (s->setup_buf[3] << 8) | s->setup_buf[2];
-     index   = (s->setup_buf[5] << 8) | s->setup_buf[4];
- 
--    if (s->setup_len > sizeof(s->data_buf)) {
-+    setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6];
-+    if (setup_len > sizeof(s->data_buf)) {
-         fprintf(stderr,
-                 "usb_generic_handle_packet: ctrl buffer too small (%d > 
%zu)\n",
--                s->setup_len, sizeof(s->data_buf));
-+                setup_len, sizeof(s->data_buf));
-         p->status = USB_RET_STALL;
-         return;
-     }
-+    s->setup_len = setup_len;
- 
-     if (p->pid == USB_TOKEN_OUT) {
-         usb_packet_copy(p, s->data_buf, s->setup_len);
--- 
-2.28.0
-

diff --git a/app-emulation/qemu/files/qemu-5.2.0-fix-firmware-path.patch 
b/app-emulation/qemu/files/qemu-5.2.0-fix-firmware-path.patch
deleted file mode 100644
index 5396983..0000000
--- a/app-emulation/qemu/files/qemu-5.2.0-fix-firmware-path.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Se absolute filename in files like
-    /usr/share/qemu/firmware/50-edk2-x86_64-secure.json
-
-Bug: https://bugs.gentoo.org/766743
-Patch-by: Jannik Glückert
---- a/pc-bios/descriptors/meson.build
-+++ b/pc-bios/descriptors/meson.build
-@@ -8,7 +8,7 @@ foreach f: [
- ]
-   configure_file(input: files(f),
-                  output: f,
--                 configuration: {'DATADIR': qemu_datadir},
-+                 configuration: {'DATADIR': get_option('prefix') / 
qemu_datadir},
-                  install: get_option('install_blobs'),
-                  install_dir: qemu_datadir / 'firmware')
- endforeach

diff --git a/app-emulation/qemu/files/qemu-5.2.0-no-pie-ld.patch 
b/app-emulation/qemu/files/qemu-5.2.0-no-pie-ld.patch
deleted file mode 100644
index f47a587..0000000
--- a/app-emulation/qemu/files/qemu-5.2.0-no-pie-ld.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From bbd2d5a8120771ec59b86a80a1f51884e0a26e53 Mon Sep 17 00:00:00 2001
-From: Christian Ehrhardt <christian.ehrha...@canonical.com>
-Date: Mon, 14 Dec 2020 16:09:38 +0100
-Subject: [PATCH] build: -no-pie is no functional linker flag
-
-Recent binutils changes dropping unsupported options [1] caused a build
-issue in regard to the optionroms.
-
-  ld -m elf_i386 -T /<<PKGBUILDDIR>>/pc-bios/optionrom//flat.lds -no-pie \
-    -s -o multiboot.img multiboot.o
-  ld.bfd: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)
-
-This isn't really a regression in ld.bfd, filing the bug upstream
-revealed that this never worked as a ld flag [2] - in fact it seems we
-were by accident setting --nmagic).
-
-Since it never had the wanted effect this usage of LDFLAGS_NOPIE, should be
-droppable without any effect. This also is the only use-case of LDFLAGS_NOPIE
-in .mak, therefore we can also remove it from being added there.
-
-[1]: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=983d925d
-[2]: https://sourceware.org/bugzilla/show_bug.cgi?id=27050#c5
-
-Signed-off-by: Christian Ehrhardt <christian.ehrha...@canonical.com>
-Message-Id: <20201214150938.1297512-1-christian.ehrha...@canonical.com>
-Cc: qemu-sta...@nongnu.org
-Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
----
- configure                  | 3 ---
- pc-bios/optionrom/Makefile | 1 -
- 2 files changed, 4 deletions(-)
-
---- a/configure
-+++ b/configure
-@@ -2137,7 +2137,6 @@ EOF
- # Check we support --no-pie first; we will need this for building ROMs.
- if compile_prog "-Werror -fno-pie" "-no-pie"; then
-   CFLAGS_NOPIE="-fno-pie"
--  LDFLAGS_NOPIE="-no-pie"
- fi
- 
- if test "$static" = "yes"; then
-@@ -2153,7 +2152,6 @@ if test "$static" = "yes"; then
-   fi
- elif test "$pie" = "no"; then
-   CONFIGURE_CFLAGS="$CFLAGS_NOPIE $CONFIGURE_CFLAGS"
--  CONFIGURE_LDFLAGS="$LDFLAGS_NOPIE $CONFIGURE_LDFLAGS"
- elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
-   CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
-   CONFIGURE_LDFLAGS="-pie $CONFIGURE_LDFLAGS"
-@@ -6714,7 +6712,6 @@ echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
- echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
- echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
- echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak
--echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak
- echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak
- echo "EXESUF=$EXESUF" >> $config_host_mak
- echo "HOST_DSOSUF=$HOST_DSOSUF" >> $config_host_mak
-diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
-index 084fc10f05..30771f8d17 100644
---- a/pc-bios/optionrom/Makefile
-+++ b/pc-bios/optionrom/Makefile
-@@ -41,7 +41,6 @@ override CFLAGS += $(call cc-option, $(Wa)-32)
- 
- LD_I386_EMULATION ?= elf_i386
- override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds
--override LDFLAGS += $(LDFLAGS_NOPIE)
- 
- all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
- 
--- 
-2.30.0
-

diff --git a/app-emulation/qemu/files/qemu-9999-fix-firmware-path.patch 
b/app-emulation/qemu/files/qemu-9999-fix-firmware-path.patch
deleted file mode 100644
index ffff314..0000000
--- a/app-emulation/qemu/files/qemu-9999-fix-firmware-path.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Set absolute filename in files like
-    /usr/share/qemu/firmware/50-edk2-x86_64-secure.json
-
-Bug: https://bugs.gentoo.org/766743
-Bug: https://bugs.launchpad.net/qemu/+bug/1913012
-Patch-by: Jannik Glückert
---- a/pc-bios/descriptors/meson.build
-+++ b/pc-bios/descriptors/meson.build
-@@ -9,7 +9,7 @@ if install_edk2_blobs
-   ]
-     configure_file(input: files(f),
-                    output: f,
--                   configuration: {'DATADIR': qemu_datadir},
-+                   configuration: {'DATADIR': get_option('prefix') / 
qemu_datadir},
-                    install: get_option('install_blobs'),
-                    install_dir: qemu_datadir / 'firmware')
-   endforeach

diff --git a/app-emulation/qemu/qemu-5.2.0-r50.ebuild 
b/app-emulation/qemu/qemu-6.0.0.ebuild
similarity index 97%
rename from app-emulation/qemu/qemu-5.2.0-r50.ebuild
rename to app-emulation/qemu/qemu-6.0.0.ebuild
index 8984faa..5c2c7c2 100644
--- a/app-emulation/qemu/qemu-5.2.0-r50.ebuild
+++ b/app-emulation/qemu/qemu-6.0.0.ebuild
@@ -3,14 +3,13 @@
 
 EAPI="7"
 
-PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_COMPAT=( python3_{7,8,9,10} )
 PYTHON_REQ_USE="ncurses,readline"
 
 FIRMWARE_ABI_VERSION="5.2.0-r50"
 
 inherit eutils linux-info toolchain-funcs multilib python-r1
 inherit udev fcaps readme.gentoo-r1 pax-utils l10n xdg-utils
-inherit flag-o-matic
 
 if [[ ${PV} = *9999* ]]; then
        EGIT_REPO_URI="https://git.qemu.org/git/qemu.git";
@@ -24,7 +23,7 @@ if [[ ${PV} = *9999* ]]; then
        SRC_URI=""
 else
        SRC_URI="https://download.qemu.org/${P}.tar.xz";
-       KEYWORDS="amd64 arm64 ~ppc ppc64 x86"
+       KEYWORDS="amd64 arm64 ~ppc ppc64 ~x86"
 fi
 
 DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
@@ -44,14 +43,55 @@ IUSE="accessibility +aio alsa bzip2 capstone +caps +curl 
debug +doc
        usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen
        xfs zstd"
 
-COMMON_TARGETS="aarch64 alpha arm cris hppa i386 m68k microblaze microblazeel
-       mips mips64 mips64el mipsel nios2 or1k ppc ppc64 riscv32 riscv64 s390x
-       sh4 sh4eb sparc sparc64 x86_64 xtensa xtensaeb"
-IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS}
-       avr lm32 moxie rx tricore unicore32"
-IUSE_USER_TARGETS="${COMMON_TARGETS}
-       aarch64_be armeb mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus
-       tilegx"
+COMMON_TARGETS="
+       aarch64
+       alpha
+       arm
+       cris
+       hppa
+       i386
+       m68k
+       microblaze
+       microblazeel
+       mips
+       mips64
+       mips64el
+       mipsel
+       nios2
+       or1k
+       ppc
+       ppc64
+       riscv32
+       riscv64
+       s390x
+       sh4
+       sh4eb
+       sparc
+       sparc64
+       x86_64
+       xtensa
+       xtensaeb
+"
+IUSE_SOFTMMU_TARGETS="
+       ${COMMON_TARGETS}
+       avr
+       lm32
+       moxie
+       rx
+       tricore
+       unicore32
+"
+IUSE_USER_TARGETS="
+       ${COMMON_TARGETS}
+       aarch64_be
+       armeb
+       hexagon
+       mipsn32
+       mipsn32el
+       ppc64abi32
+       ppc64le
+       sparc32plus
+"
 
 use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' 
${IUSE_SOFTMMU_TARGETS})
 use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
@@ -71,6 +111,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
        static? ( static-user !alsa !gtk !jack !opengl !pulseaudio !plugins 
!rbd !snappy )
        static-user? ( !plugins )
        vhost-user-fs? ( caps seccomp )
+       virgl? ( opengl )
        virtfs? ( caps xattr )
        vte? ( gtk )
        multipath? ( udev )
@@ -229,11 +270,9 @@ RDEPEND="${CDEPEND}
 
 PATCHES=(
        "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
+       "${FILESDIR}"/${PN}-5.2.0-strings.patch
        "${FILESDIR}"/${PN}-5.2.0-cleaner-werror.patch
        "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch
-       "${FILESDIR}"/${PN}-5.2.0-strings.patch
-       "${FILESDIR}"/${PN}-5.2.0-fix-firmware-path.patch
-       "${FILESDIR}"/${PN}-5.2.0-no-pie-ld.patch
        "${FILESDIR}"/${PN}-5.2.0-dce-locks.patch
 )
 
@@ -363,10 +402,6 @@ check_targets() {
 }
 
 src_prepare() {
-       # workaround -fcommon breakage: bug #726560
-       [[ ${PV} == 5.2.0 ]] || die "Check if -fcommon hack is needed"
-       filter-flags -fcommon
-
        check_targets IUSE_SOFTMMU_TARGETS softmmu
        check_targets IUSE_USER_TARGETS linux-user
 
@@ -393,7 +428,6 @@ src_prepare() {
                eapply 
"${FILESDIR}"/musl-patches/fix-segevent-and-sigval_t.patch
                eapply "${FILESDIR}"/musl-patches/fix-sendmsg.patch
                eapply "${FILESDIR}"/musl-patches/fix-sockios-header.patch
-               eapply "${FILESDIR}"/musl-patches/guest-agent-shutdown.patch
                eapply 
"${FILESDIR}"/musl-patches/ignore-signals-33-and-64-to-allow-golang-emulation.patch
                eapply "${FILESDIR}"/musl-patches/mips-softfloat.patch
                eapply "${FILESDIR}"/musl-patches/musl-F_SHLCK-and-F_EXLCK.patch
@@ -522,7 +556,7 @@ qemu_src_configure() {
                $(conf_notuser vhost-user-fs)
                $(conf_tools vhost-user-fs virtiofsd)
                $(conf_notuser virgl virglrenderer)
-               $(conf_notuser virtfs)
+               $(conf_softmmu virtfs)
                $(conf_notuser vnc)
                $(conf_notuser vte)
                $(conf_notuser xen)

Reply via email to