1 |
commit: fe0e83cd49d113e7c82f6c94433bb9a924072dde |
2 |
Author: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 7 13:15:15 2021 +0000 |
4 |
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 7 13:15:15 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=fe0e83cd |
7 |
|
8 |
app-emulation/qemu: sync with ::gentoo stable |
9 |
|
10 |
Package-Manager: Portage-3.0.19, Repoman-3.0.2 |
11 |
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org> |
12 |
|
13 |
app-emulation/qemu/Manifest | 2 +- |
14 |
app-emulation/qemu/files/65-kvm.rules-r1 | 2 - |
15 |
.../files/musl-patches/guest-agent-shutdown.patch | 34 -------- |
16 |
.../qemu/files/qemu-4.0.0-mkdir_systemtap.patch | 12 --- |
17 |
app-emulation/qemu/files/qemu-4.2.0-cflags.patch | 16 ---- |
18 |
.../qemu-5.1.0-pixman-for-vhost-user-gpu.patch | 62 --------------- |
19 |
...qemu-5.1.0-usb-host-workaround-libusb-bug.patch | 82 -------------------- |
20 |
.../files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch | 90 ---------------------- |
21 |
.../qemu/files/qemu-5.2.0-fix-firmware-path.patch | 16 ---- |
22 |
.../qemu/files/qemu-5.2.0-no-pie-ld.patch | 73 ------------------ |
23 |
.../qemu/files/qemu-9999-fix-firmware-path.patch | 17 ---- |
24 |
.../{qemu-5.2.0-r50.ebuild => qemu-6.0.0.ebuild} | 74 +++++++++++++----- |
25 |
12 files changed, 55 insertions(+), 425 deletions(-) |
26 |
|
27 |
diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest |
28 |
index 2157b27..4e6705f 100644 |
29 |
--- a/app-emulation/qemu/Manifest |
30 |
+++ b/app-emulation/qemu/Manifest |
31 |
@@ -1 +1 @@ |
32 |
-DIST qemu-5.2.0.tar.xz 106902800 BLAKE2B 4413d5591cbabf80faba5b0b7347ee7749ff0a71af44bdf7f64b1995e17ecf1f3df539fa8e63959e0d50cd0502a41a2921e60cc6d078ed8ab5b09ab4b86d4ed7 SHA512 bddd633ce111471ebc651e03080251515178808556b49a308a724909e55dac0be0cc0c79c536ac12d239678ae94c60100dc124be9b9d9538340c03a2f27177f3 |
33 |
+DIST qemu-6.0.0.tar.xz 107333232 BLAKE2B 7746329d3e13782b7c346ce4052cc517cfc65cd9b2d514d199e4d5b8570ca79566ec04b0c114db2e97c84e68eb551e0d4cdce1b14b91a88fe08d2a5f682c1418 SHA512 ee3ff00aebec4d8891d2ff6dabe4e667e510b2a4fe3f6190aa34673a91ea32dcd2db2e9bf94c2f1bf05aa79788f17cfbbedc6027c0988ea08a92587b79ee05e4 |
34 |
|
35 |
diff --git a/app-emulation/qemu/files/65-kvm.rules-r1 b/app-emulation/qemu/files/65-kvm.rules-r1 |
36 |
deleted file mode 100644 |
37 |
index ab3776a..0000000 |
38 |
--- a/app-emulation/qemu/files/65-kvm.rules-r1 |
39 |
+++ /dev/null |
40 |
@@ -1,2 +0,0 @@ |
41 |
-KERNEL=="kvm", GROUP="kvm", MODE="0660" |
42 |
-KERNEL=="vhost-net", GROUP="kvm", MODE="0660", OPTIONS+="static_node=vhost-net" |
43 |
|
44 |
diff --git a/app-emulation/qemu/files/musl-patches/guest-agent-shutdown.patch b/app-emulation/qemu/files/musl-patches/guest-agent-shutdown.patch |
45 |
deleted file mode 100644 |
46 |
index 742f281..0000000 |
47 |
--- a/app-emulation/qemu/files/musl-patches/guest-agent-shutdown.patch |
48 |
+++ /dev/null |
49 |
@@ -1,34 +0,0 @@ |
50 |
-diff --git a/qga/commands-posix.c b/qga/commands-posix.c |
51 |
-index 1877976..7915aab 100644 |
52 |
---- a/qga/commands-posix.c |
53 |
-+++ b/qga/commands-posix.c |
54 |
-@@ -82,6 +82,7 @@ static void ga_wait_child(pid_t pid, int *status, Error **errp) |
55 |
- void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp) |
56 |
- { |
57 |
- const char *shutdown_flag; |
58 |
-+ const char *fallback_cmd = NULL; |
59 |
- Error *local_err = NULL; |
60 |
- pid_t pid; |
61 |
- int status; |
62 |
-@@ -89,10 +90,13 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp) |
63 |
- slog("guest-shutdown called, mode: %s", mode); |
64 |
- if (!has_mode || strcmp(mode, "powerdown") == 0) { |
65 |
- shutdown_flag = "-P"; |
66 |
-+ fallback_cmd = "/sbin/poweroff"; |
67 |
- } else if (strcmp(mode, "halt") == 0) { |
68 |
- shutdown_flag = "-H"; |
69 |
-+ fallback_cmd = "/sbin/halt"; |
70 |
- } else if (strcmp(mode, "reboot") == 0) { |
71 |
- shutdown_flag = "-r"; |
72 |
-+ fallback_cmd = "/sbin/reboot"; |
73 |
- } else { |
74 |
- error_setg(errp, |
75 |
- "mode is invalid (valid values are: halt|powerdown|reboot"); |
76 |
-@@ -109,6 +113,7 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp) |
77 |
- |
78 |
- execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0", |
79 |
- "hypervisor initiated shutdown", (char*)NULL, environ); |
80 |
-+ execle(fallback_cmd, fallback_cmd, (char*)NULL, environ); |
81 |
- _exit(EXIT_FAILURE); |
82 |
- } else if (pid < 0) { |
83 |
- error_setg_errno(errp, errno, "failed to create child process"); |
84 |
|
85 |
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 |
86 |
deleted file mode 100644 |
87 |
index 95ccdd7..0000000 |
88 |
--- a/app-emulation/qemu/files/qemu-4.0.0-mkdir_systemtap.patch |
89 |
+++ /dev/null |
90 |
@@ -1,12 +0,0 @@ |
91 |
-diff --git a/Makefile b/Makefile |
92 |
-index 04a0d450..e0013a59 100644 |
93 |
---- a/Makefile |
94 |
-+++ b/Makefile |
95 |
-@@ -803,6 +802,7 @@ |
96 |
- $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir)) |
97 |
- endif |
98 |
- ifdef CONFIG_TRACE_SYSTEMTAP |
99 |
-+ mkdir -p $(DESTDIR)$(bindir) |
100 |
- $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) |
101 |
- endif |
102 |
- ifneq ($(BLOBS),) |
103 |
|
104 |
diff --git a/app-emulation/qemu/files/qemu-4.2.0-cflags.patch b/app-emulation/qemu/files/qemu-4.2.0-cflags.patch |
105 |
deleted file mode 100644 |
106 |
index 1019265..0000000 |
107 |
--- a/app-emulation/qemu/files/qemu-4.2.0-cflags.patch |
108 |
+++ /dev/null |
109 |
@@ -1,16 +0,0 @@ |
110 |
-diff --git i/configure w/configure |
111 |
-index a72a5def57..546d757603 100755 |
112 |
---- i/configure |
113 |
-+++ w/configure |
114 |
-@@ -6093,10 +6093,6 @@ write_c_skeleton |
115 |
- if test "$gcov" = "yes" ; then |
116 |
- QEMU_CFLAGS="-fprofile-arcs -ftest-coverage -g $QEMU_CFLAGS" |
117 |
- QEMU_LDFLAGS="-fprofile-arcs -ftest-coverage $QEMU_LDFLAGS" |
118 |
--elif test "$fortify_source" = "yes" ; then |
119 |
-- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" |
120 |
--elif test "$debug" = "no"; then |
121 |
-- CFLAGS="-O2 $CFLAGS" |
122 |
- fi |
123 |
- |
124 |
- if test "$have_asan" = "yes"; then |
125 |
- |
126 |
|
127 |
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 |
128 |
deleted file mode 100644 |
129 |
index 4eb644f..0000000 |
130 |
--- a/app-emulation/qemu/files/qemu-5.1.0-pixman-for-vhost-user-gpu.patch |
131 |
+++ /dev/null |
132 |
@@ -1,62 +0,0 @@ |
133 |
-https://bugs.gentoo.org/735146 |
134 |
- |
135 |
-From 4fd46e6cdd976f4aecdc3fbbad728e00a7bc4ee0 Mon Sep 17 00:00:00 2001 |
136 |
-From: Rafael Kitover <rkitover@×××××.com> |
137 |
-Date: Thu, 13 Aug 2020 20:19:24 +0000 |
138 |
-Subject: [PATCH] configure: Require pixman for vhost-user-gpu. |
139 |
- |
140 |
-Use the test from Makefile to check if vhost-user-gpu is being built, |
141 |
-and if so require pixman. |
142 |
- |
143 |
-Signed-off-by: Rafael Kitover <rkitover@×××××.com> |
144 |
---- |
145 |
- configure | 28 ++++++++++++++-------------- |
146 |
- 1 file changed, 14 insertions(+), 14 deletions(-) |
147 |
- |
148 |
---- a/configure |
149 |
-+++ b/configure |
150 |
-@@ -4062,20 +4062,6 @@ if test "$modules" = yes; then |
151 |
- fi |
152 |
- fi |
153 |
- |
154 |
--########################################## |
155 |
--# pixman support probe |
156 |
-- |
157 |
--if test "$softmmu" = "no"; then |
158 |
-- pixman_cflags= |
159 |
-- pixman_libs= |
160 |
--elif $pkg_config --atleast-version=0.21.8 pixman-1 > /dev/null 2>&1; then |
161 |
-- pixman_cflags=$($pkg_config --cflags pixman-1) |
162 |
-- pixman_libs=$($pkg_config --libs pixman-1) |
163 |
--else |
164 |
-- error_exit "pixman >= 0.21.8 not present." \ |
165 |
-- "Please install the pixman devel package." |
166 |
--fi |
167 |
-- |
168 |
- ########################################## |
169 |
- # libmpathpersist probe |
170 |
- |
171 |
-@@ -4491,6 +4477,20 @@ if test "$opengl" = "yes" && test "$have_x11" = "yes"; then |
172 |
- done |
173 |
- fi |
174 |
- |
175 |
-+########################################## |
176 |
-+# pixman support probe |
177 |
-+ |
178 |
-+if test "$softmmu" = "no" && ! test "${linux} ${virglrenderer} ${gbm} ${want_tools}" = "yes yes yes yes"; then |
179 |
-+ pixman_cflags= |
180 |
-+ pixman_libs= |
181 |
-+elif $pkg_config --atleast-version=0.21.8 pixman-1 > /dev/null 2>&1; then |
182 |
-+ pixman_cflags=$($pkg_config --cflags pixman-1) |
183 |
-+ pixman_libs=$($pkg_config --libs pixman-1) |
184 |
-+else |
185 |
-+ error_exit "pixman >= 0.21.8 not present." \ |
186 |
-+ "Please install the pixman devel package." |
187 |
-+fi |
188 |
-+ |
189 |
- ########################################## |
190 |
- # libxml2 probe |
191 |
- if test "$libxml2" != "no" ; then |
192 |
--- |
193 |
-2.28.0 |
194 |
- |
195 |
|
196 |
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 |
197 |
deleted file mode 100644 |
198 |
index 34a50a9..0000000 |
199 |
--- a/app-emulation/qemu/files/qemu-5.1.0-usb-host-workaround-libusb-bug.patch |
200 |
+++ /dev/null |
201 |
@@ -1,82 +0,0 @@ |
202 |
-From 202d69a715a4b1824dcd7ec1683d027ed2bae6d3 Mon Sep 17 00:00:00 2001 |
203 |
-Message-Id: <202d69a715a4b1824dcd7ec1683d027ed2bae6d3.1606202550.git.mprivozn@××××××.com> |
204 |
-From: Gerd Hoffmann <kraxel@××××××.com> |
205 |
-Date: Mon, 24 Aug 2020 13:00:57 +0200 |
206 |
-Subject: [PATCH] usb-host: workaround libusb bug |
207 |
- |
208 |
-libusb_get_device_speed() does not work for |
209 |
-libusb_wrap_sys_device() devices in v1.0.23. |
210 |
- |
211 |
-Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1871090 |
212 |
-Signed-off-by: Gerd Hoffmann <kraxel@××××××.com> |
213 |
-Message-id: 20200824110057.32089-1-kraxel@××××××.com |
214 |
-Signed-off-by: Michal Privoznik <mprivozn@××××××.com> |
215 |
---- |
216 |
- hw/usb/host-libusb.c | 37 ++++++++++++++++++++++++++++++++++++- |
217 |
- 1 file changed, 36 insertions(+), 1 deletion(-) |
218 |
- |
219 |
-diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c |
220 |
-index c474551d84..08604f787f 100644 |
221 |
---- a/hw/usb/host-libusb.c |
222 |
-+++ b/hw/usb/host-libusb.c |
223 |
-@@ -39,6 +39,11 @@ |
224 |
- #endif |
225 |
- #include <libusb.h> |
226 |
- |
227 |
-+#ifdef CONFIG_LINUX |
228 |
-+#include <sys/ioctl.h> |
229 |
-+#include <linux/usbdevice_fs.h> |
230 |
-+#endif |
231 |
-+ |
232 |
- #include "qapi/error.h" |
233 |
- #include "migration/vmstate.h" |
234 |
- #include "monitor/monitor.h" |
235 |
-@@ -885,6 +890,7 @@ static void usb_host_ep_update(USBHostDevice *s) |
236 |
- static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd) |
237 |
- { |
238 |
- USBDevice *udev = USB_DEVICE(s); |
239 |
-+ int libusb_speed; |
240 |
- int bus_num = 0; |
241 |
- int addr = 0; |
242 |
- int rc; |
243 |
-@@ -935,7 +941,36 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd) |
244 |
- usb_ep_init(udev); |
245 |
- usb_host_ep_update(s); |
246 |
- |
247 |
-- udev->speed = speed_map[libusb_get_device_speed(dev)]; |
248 |
-+ libusb_speed = libusb_get_device_speed(dev); |
249 |
-+#ifdef CONFIG_LINUX |
250 |
-+ if (hostfd && libusb_speed == 0) { |
251 |
-+ /* |
252 |
-+ * Workaround libusb bug: libusb_get_device_speed() does not |
253 |
-+ * work for libusb_wrap_sys_device() devices in v1.0.23. |
254 |
-+ * |
255 |
-+ * Speeds are defined in linux/usb/ch9.h, file not included |
256 |
-+ * due to name conflicts. |
257 |
-+ */ |
258 |
-+ int rc = ioctl(hostfd, USBDEVFS_GET_SPEED, NULL); |
259 |
-+ switch (rc) { |
260 |
-+ case 1: /* low */ |
261 |
-+ libusb_speed = LIBUSB_SPEED_LOW; |
262 |
-+ break; |
263 |
-+ case 2: /* full */ |
264 |
-+ libusb_speed = LIBUSB_SPEED_FULL; |
265 |
-+ break; |
266 |
-+ case 3: /* high */ |
267 |
-+ case 4: /* wireless */ |
268 |
-+ libusb_speed = LIBUSB_SPEED_HIGH; |
269 |
-+ break; |
270 |
-+ case 5: /* super */ |
271 |
-+ case 6: /* super plus */ |
272 |
-+ libusb_speed = LIBUSB_SPEED_SUPER; |
273 |
-+ break; |
274 |
-+ } |
275 |
-+ } |
276 |
-+#endif |
277 |
-+ udev->speed = speed_map[libusb_speed]; |
278 |
- usb_host_speed_compat(s); |
279 |
- |
280 |
- if (s->ddesc.iProduct) { |
281 |
--- |
282 |
-2.26.2 |
283 |
- |
284 |
|
285 |
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 |
286 |
deleted file mode 100644 |
287 |
index d1d23ec..0000000 |
288 |
--- a/app-emulation/qemu/files/qemu-5.1.0-usb-oob-CVE-2020-14364.patch |
289 |
+++ /dev/null |
290 |
@@ -1,90 +0,0 @@ |
291 |
-https://bugs.gentoo.org/743649 |
292 |
- |
293 |
-From b946434f2659a182afc17e155be6791ebfb302eb Mon Sep 17 00:00:00 2001 |
294 |
-From: Gerd Hoffmann <kraxel@××××××.com> |
295 |
-Date: Tue, 25 Aug 2020 07:36:36 +0200 |
296 |
-Subject: [PATCH] usb: fix setup_len init (CVE-2020-14364) |
297 |
- |
298 |
-Store calculated setup_len in a local variable, verify it, and only |
299 |
-write it to the struct (USBDevice->setup_len) in case it passed the |
300 |
-sanity checks. |
301 |
- |
302 |
-This prevents other code (do_token_{in,out} functions specifically) |
303 |
-from working with invalid USBDevice->setup_len values and overrunning |
304 |
-the USBDevice->setup_buf[] buffer. |
305 |
- |
306 |
-Fixes: CVE-2020-14364 |
307 |
-Signed-off-by: Gerd Hoffmann <kraxel@××××××.com> |
308 |
-Tested-by: Gonglei <arei.gonglei@××××××.com> |
309 |
-Reviewed-by: Li Qiang <liq3ea@×××××.com> |
310 |
-Message-id: 20200825053636.29648-1-kraxel@××××××.com |
311 |
---- |
312 |
- hw/usb/core.c | 16 ++++++++++------ |
313 |
- 1 file changed, 10 insertions(+), 6 deletions(-) |
314 |
- |
315 |
-diff --git a/hw/usb/core.c b/hw/usb/core.c |
316 |
-index 5abd128b6b..5234dcc73f 100644 |
317 |
---- a/hw/usb/core.c |
318 |
-+++ b/hw/usb/core.c |
319 |
-@@ -129,6 +129,7 @@ void usb_wakeup(USBEndpoint *ep, unsigned int stream) |
320 |
- static void do_token_setup(USBDevice *s, USBPacket *p) |
321 |
- { |
322 |
- int request, value, index; |
323 |
-+ unsigned int setup_len; |
324 |
- |
325 |
- if (p->iov.size != 8) { |
326 |
- p->status = USB_RET_STALL; |
327 |
-@@ -138,14 +139,15 @@ static void do_token_setup(USBDevice *s, USBPacket *p) |
328 |
- usb_packet_copy(p, s->setup_buf, p->iov.size); |
329 |
- s->setup_index = 0; |
330 |
- p->actual_length = 0; |
331 |
-- s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; |
332 |
-- if (s->setup_len > sizeof(s->data_buf)) { |
333 |
-+ setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; |
334 |
-+ if (setup_len > sizeof(s->data_buf)) { |
335 |
- fprintf(stderr, |
336 |
- "usb_generic_handle_packet: ctrl buffer too small (%d > %zu)\n", |
337 |
-- s->setup_len, sizeof(s->data_buf)); |
338 |
-+ setup_len, sizeof(s->data_buf)); |
339 |
- p->status = USB_RET_STALL; |
340 |
- return; |
341 |
- } |
342 |
-+ s->setup_len = setup_len; |
343 |
- |
344 |
- request = (s->setup_buf[0] << 8) | s->setup_buf[1]; |
345 |
- value = (s->setup_buf[3] << 8) | s->setup_buf[2]; |
346 |
-@@ -259,26 +261,28 @@ static void do_token_out(USBDevice *s, USBPacket *p) |
347 |
- static void do_parameter(USBDevice *s, USBPacket *p) |
348 |
- { |
349 |
- int i, request, value, index; |
350 |
-+ unsigned int setup_len; |
351 |
- |
352 |
- for (i = 0; i < 8; i++) { |
353 |
- s->setup_buf[i] = p->parameter >> (i*8); |
354 |
- } |
355 |
- |
356 |
- s->setup_state = SETUP_STATE_PARAM; |
357 |
-- s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; |
358 |
- s->setup_index = 0; |
359 |
- |
360 |
- request = (s->setup_buf[0] << 8) | s->setup_buf[1]; |
361 |
- value = (s->setup_buf[3] << 8) | s->setup_buf[2]; |
362 |
- index = (s->setup_buf[5] << 8) | s->setup_buf[4]; |
363 |
- |
364 |
-- if (s->setup_len > sizeof(s->data_buf)) { |
365 |
-+ setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; |
366 |
-+ if (setup_len > sizeof(s->data_buf)) { |
367 |
- fprintf(stderr, |
368 |
- "usb_generic_handle_packet: ctrl buffer too small (%d > %zu)\n", |
369 |
-- s->setup_len, sizeof(s->data_buf)); |
370 |
-+ setup_len, sizeof(s->data_buf)); |
371 |
- p->status = USB_RET_STALL; |
372 |
- return; |
373 |
- } |
374 |
-+ s->setup_len = setup_len; |
375 |
- |
376 |
- if (p->pid == USB_TOKEN_OUT) { |
377 |
- usb_packet_copy(p, s->data_buf, s->setup_len); |
378 |
--- |
379 |
-2.28.0 |
380 |
- |
381 |
|
382 |
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 |
383 |
deleted file mode 100644 |
384 |
index 5396983..0000000 |
385 |
--- a/app-emulation/qemu/files/qemu-5.2.0-fix-firmware-path.patch |
386 |
+++ /dev/null |
387 |
@@ -1,16 +0,0 @@ |
388 |
-Se absolute filename in files like |
389 |
- /usr/share/qemu/firmware/50-edk2-x86_64-secure.json |
390 |
- |
391 |
-Bug: https://bugs.gentoo.org/766743 |
392 |
-Patch-by: Jannik Glückert |
393 |
---- a/pc-bios/descriptors/meson.build |
394 |
-+++ b/pc-bios/descriptors/meson.build |
395 |
-@@ -8,7 +8,7 @@ foreach f: [ |
396 |
- ] |
397 |
- configure_file(input: files(f), |
398 |
- output: f, |
399 |
-- configuration: {'DATADIR': qemu_datadir}, |
400 |
-+ configuration: {'DATADIR': get_option('prefix') / qemu_datadir}, |
401 |
- install: get_option('install_blobs'), |
402 |
- install_dir: qemu_datadir / 'firmware') |
403 |
- endforeach |
404 |
|
405 |
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 |
406 |
deleted file mode 100644 |
407 |
index f47a587..0000000 |
408 |
--- a/app-emulation/qemu/files/qemu-5.2.0-no-pie-ld.patch |
409 |
+++ /dev/null |
410 |
@@ -1,73 +0,0 @@ |
411 |
-From bbd2d5a8120771ec59b86a80a1f51884e0a26e53 Mon Sep 17 00:00:00 2001 |
412 |
-From: Christian Ehrhardt <christian.ehrhardt@×××××××××.com> |
413 |
-Date: Mon, 14 Dec 2020 16:09:38 +0100 |
414 |
-Subject: [PATCH] build: -no-pie is no functional linker flag |
415 |
- |
416 |
-Recent binutils changes dropping unsupported options [1] caused a build |
417 |
-issue in regard to the optionroms. |
418 |
- |
419 |
- ld -m elf_i386 -T /<<PKGBUILDDIR>>/pc-bios/optionrom//flat.lds -no-pie \ |
420 |
- -s -o multiboot.img multiboot.o |
421 |
- ld.bfd: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?) |
422 |
- |
423 |
-This isn't really a regression in ld.bfd, filing the bug upstream |
424 |
-revealed that this never worked as a ld flag [2] - in fact it seems we |
425 |
-were by accident setting --nmagic). |
426 |
- |
427 |
-Since it never had the wanted effect this usage of LDFLAGS_NOPIE, should be |
428 |
-droppable without any effect. This also is the only use-case of LDFLAGS_NOPIE |
429 |
-in .mak, therefore we can also remove it from being added there. |
430 |
- |
431 |
-[1]: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=983d925d |
432 |
-[2]: https://sourceware.org/bugzilla/show_bug.cgi?id=27050#c5 |
433 |
- |
434 |
-Signed-off-by: Christian Ehrhardt <christian.ehrhardt@×××××××××.com> |
435 |
-Message-Id: <20201214150938.1297512-1-christian.ehrhardt@×××××××××.com> |
436 |
-Cc: qemu-stable@××××××.org |
437 |
-Signed-off-by: Paolo Bonzini <pbonzini@××××××.com> |
438 |
---- |
439 |
- configure | 3 --- |
440 |
- pc-bios/optionrom/Makefile | 1 - |
441 |
- 2 files changed, 4 deletions(-) |
442 |
- |
443 |
---- a/configure |
444 |
-+++ b/configure |
445 |
-@@ -2137,7 +2137,6 @@ EOF |
446 |
- # Check we support --no-pie first; we will need this for building ROMs. |
447 |
- if compile_prog "-Werror -fno-pie" "-no-pie"; then |
448 |
- CFLAGS_NOPIE="-fno-pie" |
449 |
-- LDFLAGS_NOPIE="-no-pie" |
450 |
- fi |
451 |
- |
452 |
- if test "$static" = "yes"; then |
453 |
-@@ -2153,7 +2152,6 @@ if test "$static" = "yes"; then |
454 |
- fi |
455 |
- elif test "$pie" = "no"; then |
456 |
- CONFIGURE_CFLAGS="$CFLAGS_NOPIE $CONFIGURE_CFLAGS" |
457 |
-- CONFIGURE_LDFLAGS="$LDFLAGS_NOPIE $CONFIGURE_LDFLAGS" |
458 |
- elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then |
459 |
- CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS" |
460 |
- CONFIGURE_LDFLAGS="-pie $CONFIGURE_LDFLAGS" |
461 |
-@@ -6714,7 +6712,6 @@ echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak |
462 |
- echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak |
463 |
- echo "GLIB_LIBS=$glib_libs" >> $config_host_mak |
464 |
- echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak |
465 |
--echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak |
466 |
- echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak |
467 |
- echo "EXESUF=$EXESUF" >> $config_host_mak |
468 |
- echo "HOST_DSOSUF=$HOST_DSOSUF" >> $config_host_mak |
469 |
-diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile |
470 |
-index 084fc10f05..30771f8d17 100644 |
471 |
---- a/pc-bios/optionrom/Makefile |
472 |
-+++ b/pc-bios/optionrom/Makefile |
473 |
-@@ -41,7 +41,6 @@ override CFLAGS += $(call cc-option, $(Wa)-32) |
474 |
- |
475 |
- LD_I386_EMULATION ?= elf_i386 |
476 |
- override LDFLAGS = -m $(LD_I386_EMULATION) -T $(SRC_DIR)/flat.lds |
477 |
--override LDFLAGS += $(LDFLAGS_NOPIE) |
478 |
- |
479 |
- all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin |
480 |
- |
481 |
--- |
482 |
-2.30.0 |
483 |
- |
484 |
|
485 |
diff --git a/app-emulation/qemu/files/qemu-9999-fix-firmware-path.patch b/app-emulation/qemu/files/qemu-9999-fix-firmware-path.patch |
486 |
deleted file mode 100644 |
487 |
index ffff314..0000000 |
488 |
--- a/app-emulation/qemu/files/qemu-9999-fix-firmware-path.patch |
489 |
+++ /dev/null |
490 |
@@ -1,17 +0,0 @@ |
491 |
-Set absolute filename in files like |
492 |
- /usr/share/qemu/firmware/50-edk2-x86_64-secure.json |
493 |
- |
494 |
-Bug: https://bugs.gentoo.org/766743 |
495 |
-Bug: https://bugs.launchpad.net/qemu/+bug/1913012 |
496 |
-Patch-by: Jannik Glückert |
497 |
---- a/pc-bios/descriptors/meson.build |
498 |
-+++ b/pc-bios/descriptors/meson.build |
499 |
-@@ -9,7 +9,7 @@ if install_edk2_blobs |
500 |
- ] |
501 |
- configure_file(input: files(f), |
502 |
- output: f, |
503 |
-- configuration: {'DATADIR': qemu_datadir}, |
504 |
-+ configuration: {'DATADIR': get_option('prefix') / qemu_datadir}, |
505 |
- install: get_option('install_blobs'), |
506 |
- install_dir: qemu_datadir / 'firmware') |
507 |
- endforeach |
508 |
|
509 |
diff --git a/app-emulation/qemu/qemu-5.2.0-r50.ebuild b/app-emulation/qemu/qemu-6.0.0.ebuild |
510 |
similarity index 97% |
511 |
rename from app-emulation/qemu/qemu-5.2.0-r50.ebuild |
512 |
rename to app-emulation/qemu/qemu-6.0.0.ebuild |
513 |
index 8984faa..5c2c7c2 100644 |
514 |
--- a/app-emulation/qemu/qemu-5.2.0-r50.ebuild |
515 |
+++ b/app-emulation/qemu/qemu-6.0.0.ebuild |
516 |
@@ -3,14 +3,13 @@ |
517 |
|
518 |
EAPI="7" |
519 |
|
520 |
-PYTHON_COMPAT=( python3_{7,8,9} ) |
521 |
+PYTHON_COMPAT=( python3_{7,8,9,10} ) |
522 |
PYTHON_REQ_USE="ncurses,readline" |
523 |
|
524 |
FIRMWARE_ABI_VERSION="5.2.0-r50" |
525 |
|
526 |
inherit eutils linux-info toolchain-funcs multilib python-r1 |
527 |
inherit udev fcaps readme.gentoo-r1 pax-utils l10n xdg-utils |
528 |
-inherit flag-o-matic |
529 |
|
530 |
if [[ ${PV} = *9999* ]]; then |
531 |
EGIT_REPO_URI="https://git.qemu.org/git/qemu.git" |
532 |
@@ -24,7 +23,7 @@ if [[ ${PV} = *9999* ]]; then |
533 |
SRC_URI="" |
534 |
else |
535 |
SRC_URI="https://download.qemu.org/${P}.tar.xz" |
536 |
- KEYWORDS="amd64 arm64 ~ppc ppc64 x86" |
537 |
+ KEYWORDS="amd64 arm64 ~ppc ppc64 ~x86" |
538 |
fi |
539 |
|
540 |
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" |
541 |
@@ -44,14 +43,55 @@ IUSE="accessibility +aio alsa bzip2 capstone +caps +curl debug +doc |
542 |
usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen |
543 |
xfs zstd" |
544 |
|
545 |
-COMMON_TARGETS="aarch64 alpha arm cris hppa i386 m68k microblaze microblazeel |
546 |
- mips mips64 mips64el mipsel nios2 or1k ppc ppc64 riscv32 riscv64 s390x |
547 |
- sh4 sh4eb sparc sparc64 x86_64 xtensa xtensaeb" |
548 |
-IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} |
549 |
- avr lm32 moxie rx tricore unicore32" |
550 |
-IUSE_USER_TARGETS="${COMMON_TARGETS} |
551 |
- aarch64_be armeb mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus |
552 |
- tilegx" |
553 |
+COMMON_TARGETS=" |
554 |
+ aarch64 |
555 |
+ alpha |
556 |
+ arm |
557 |
+ cris |
558 |
+ hppa |
559 |
+ i386 |
560 |
+ m68k |
561 |
+ microblaze |
562 |
+ microblazeel |
563 |
+ mips |
564 |
+ mips64 |
565 |
+ mips64el |
566 |
+ mipsel |
567 |
+ nios2 |
568 |
+ or1k |
569 |
+ ppc |
570 |
+ ppc64 |
571 |
+ riscv32 |
572 |
+ riscv64 |
573 |
+ s390x |
574 |
+ sh4 |
575 |
+ sh4eb |
576 |
+ sparc |
577 |
+ sparc64 |
578 |
+ x86_64 |
579 |
+ xtensa |
580 |
+ xtensaeb |
581 |
+" |
582 |
+IUSE_SOFTMMU_TARGETS=" |
583 |
+ ${COMMON_TARGETS} |
584 |
+ avr |
585 |
+ lm32 |
586 |
+ moxie |
587 |
+ rx |
588 |
+ tricore |
589 |
+ unicore32 |
590 |
+" |
591 |
+IUSE_USER_TARGETS=" |
592 |
+ ${COMMON_TARGETS} |
593 |
+ aarch64_be |
594 |
+ armeb |
595 |
+ hexagon |
596 |
+ mipsn32 |
597 |
+ mipsn32el |
598 |
+ ppc64abi32 |
599 |
+ ppc64le |
600 |
+ sparc32plus |
601 |
+" |
602 |
|
603 |
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS}) |
604 |
use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS}) |
605 |
@@ -71,6 +111,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE} |
606 |
static? ( static-user !alsa !gtk !jack !opengl !pulseaudio !plugins !rbd !snappy ) |
607 |
static-user? ( !plugins ) |
608 |
vhost-user-fs? ( caps seccomp ) |
609 |
+ virgl? ( opengl ) |
610 |
virtfs? ( caps xattr ) |
611 |
vte? ( gtk ) |
612 |
multipath? ( udev ) |
613 |
@@ -229,11 +270,9 @@ RDEPEND="${CDEPEND} |
614 |
|
615 |
PATCHES=( |
616 |
"${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch |
617 |
+ "${FILESDIR}"/${PN}-5.2.0-strings.patch |
618 |
"${FILESDIR}"/${PN}-5.2.0-cleaner-werror.patch |
619 |
"${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch |
620 |
- "${FILESDIR}"/${PN}-5.2.0-strings.patch |
621 |
- "${FILESDIR}"/${PN}-5.2.0-fix-firmware-path.patch |
622 |
- "${FILESDIR}"/${PN}-5.2.0-no-pie-ld.patch |
623 |
"${FILESDIR}"/${PN}-5.2.0-dce-locks.patch |
624 |
) |
625 |
|
626 |
@@ -363,10 +402,6 @@ check_targets() { |
627 |
} |
628 |
|
629 |
src_prepare() { |
630 |
- # workaround -fcommon breakage: bug #726560 |
631 |
- [[ ${PV} == 5.2.0 ]] || die "Check if -fcommon hack is needed" |
632 |
- filter-flags -fcommon |
633 |
- |
634 |
check_targets IUSE_SOFTMMU_TARGETS softmmu |
635 |
check_targets IUSE_USER_TARGETS linux-user |
636 |
|
637 |
@@ -393,7 +428,6 @@ src_prepare() { |
638 |
eapply "${FILESDIR}"/musl-patches/fix-segevent-and-sigval_t.patch |
639 |
eapply "${FILESDIR}"/musl-patches/fix-sendmsg.patch |
640 |
eapply "${FILESDIR}"/musl-patches/fix-sockios-header.patch |
641 |
- eapply "${FILESDIR}"/musl-patches/guest-agent-shutdown.patch |
642 |
eapply "${FILESDIR}"/musl-patches/ignore-signals-33-and-64-to-allow-golang-emulation.patch |
643 |
eapply "${FILESDIR}"/musl-patches/mips-softfloat.patch |
644 |
eapply "${FILESDIR}"/musl-patches/musl-F_SHLCK-and-F_EXLCK.patch |
645 |
@@ -522,7 +556,7 @@ qemu_src_configure() { |
646 |
$(conf_notuser vhost-user-fs) |
647 |
$(conf_tools vhost-user-fs virtiofsd) |
648 |
$(conf_notuser virgl virglrenderer) |
649 |
- $(conf_notuser virtfs) |
650 |
+ $(conf_softmmu virtfs) |
651 |
$(conf_notuser vnc) |
652 |
$(conf_notuser vte) |
653 |
$(conf_notuser xen) |