From 8806a92dd01bca57fd4748aded9c4c9da1c84f9e Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 2 Apr 2024 20:54:33 +0200 Subject: [PATCH] - updated to 7.2.10 --- qemu-user-execve.patch | 31 +++++++++++++------------------ qemu-xattr.patch | 10 +++++----- qemu.spec | 16 +++++++++------- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/qemu-user-execve.patch b/qemu-user-execve.patch index 1834887..4ed89e2 100644 --- a/qemu-user-execve.patch +++ b/qemu-user-execve.patch @@ -49,15 +49,15 @@ diff --git a/linux-user/main.c b/linux-user/main.c index ee12035..5951279 100644 --- a/linux-user/main.c +++ b/linux-user/main.c -@@ -79,6 +79,7 @@ static void usage(int exitcode); +@@ -123,6 +123,7 @@ static void usage(int exitcode); static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX; const char *qemu_uname_release; +const char *qemu_execve_path; + #if !defined(TARGET_DEFAULT_STACK_SIZE) /* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so - we allocate a bigger stack. Need a better solution, for example -@@ -3828,6 +3829,11 @@ static void handle_arg_guest_base(const char *arg) +@@ -362,6 +363,11 @@ static void handle_arg_guest_base(const have_guest_base = true; } @@ -69,7 +69,7 @@ index ee12035..5951279 100644 static void handle_arg_reserved_va(const char *arg) { char *p; -@@ -3913,6 +3919,8 @@ static const struct qemu_argument arg_table[] = { +@@ -464,6 +470,8 @@ static const struct qemu_argument arg_ta "uname", "set qemu uname release string to 'uname'"}, {"B", "QEMU_GUEST_BASE", true, handle_arg_guest_base, "address", "set guest_base address to 'address'"}, @@ -90,7 +90,7 @@ index ee12035..5951279 100644 typedef struct IOCTLEntry IOCTLEntry; --- qemu-2.12.0/linux-user/syscall.c~ 2018-04-30 21:43:39.000000000 +0300 +++ qemu-2.12.0/linux-user/syscall.c 2018-04-30 21:46:36.362935706 +0300 -@@ -5854,6 +5854,109 @@ static target_timer_t get_timer_id(abi_long arg) +@@ -8340,6 +8340,109 @@ static target_timer_t get_timer_id(abi_l return timerid; } @@ -200,17 +200,12 @@ index ee12035..5951279 100644 static int target_to_host_cpu_mask(unsigned long *host_mask, size_t host_size, abi_ulong target_addr, -@@ -8257,7 +8257,12 @@ - * before the execve completes and makes it the other - * program's problem. +@@ -8896,6 +8999,8 @@ static abi_long do_syscall1(CPUArchState */ -- ret = get_errno(safe_execve(p, argp, envp)); -+ if (qemu_execve_path && *qemu_execve_path) { -+ ret = get_errno(qemu_execve(p, argp, envp)); -+ } else { -+ ret = get_errno(safe_execve(p, argp, envp)); -+ } -+ - unlock_user(p, arg1, 0); - - goto execve_end; + if (is_proc_myself(p, "exe")) { + ret = get_errno(safe_execve(exec_path, argp, envp)); ++ } else if (qemu_execve_path && *qemu_execve_path) { ++ ret = get_errno(qemu_execve(p, argp, envp)); + } else { + ret = get_errno(safe_execve(p, argp, envp)); + } diff --git a/qemu-xattr.patch b/qemu-xattr.patch index 6f824d0..a031ad6 100644 --- a/qemu-xattr.patch +++ b/qemu-xattr.patch @@ -3,21 +3,21 @@ When including both, the latter must be included first. Move "qemu-xattr.h" (which includes to the front, before (which includes . ---- qemu-7.1.0/fsdev/virtfs-proxy-helper.c.orig 2022-08-30 18:41:57.000000000 +0200 -+++ qemu-7.1.0/fsdev/virtfs-proxy-helper.c 2022-10-05 16:48:32.493170549 +0200 +--- qemu-7.2.10/fsdev/virtfs-proxy-helper.c.orig 2024-03-25 22:16:49.552502269 +0100 ++++ qemu-7.2.10/fsdev/virtfs-proxy-helper.c 2024-03-25 22:36:50.349330328 +0100 @@ -10,6 +10,7 @@ */ #include "qemu/osdep.h" +#include "qemu/xattr.h" + #include #include #include - #include -@@ -22,7 +23,6 @@ +@@ -23,7 +24,6 @@ #endif #include #include "qemu/sockets.h" -#include "qemu/xattr.h" #include "9p-iov-marshal.h" #include "hw/9pfs/9p-proxy.h" - #include "fsdev/9p-iov-marshal.h" + #include "hw/9pfs/9p-util.h" diff --git a/qemu.spec b/qemu.spec index 9820e12..0f9fc72 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,5 +1,6 @@ # TODO: # canokey (BR: canokey-qemu.pc, https://github.com/canokeys/canokey-qemu) +# vfio_user_server? # plugins? (probes) # # Conditional build: @@ -43,12 +44,12 @@ Summary: QEMU CPU Emulator Summary(pl.UTF-8): QEMU - emulator procesora Name: qemu -Version: 7.1.0 -Release: 3 +Version: 7.2.10 +Release: 1 License: GPL v2, BSD (edk2 firmware files) Group: Applications/Emulators Source0: https://download.qemu.org/%{name}-%{version}.tar.xz -# Source0-md5: 3be5458a9171b4ec5220c65d5d52bdcf +# Source0-md5: a99d896cf773964422e0294015d3b98a # Loads kvm kernel modules at boot Source3: kvm-modules-load.conf # Creates /dev/kvm @@ -125,12 +126,12 @@ BuildRequires: libxml2-devel >= 2.0 %{?with_lttng:BuildRequires: lttng-ust-devel >= 2.1} BuildRequires: lzfse-devel BuildRequires: lzo-devel >= 2 -BuildRequires: meson >= 0.59.3 +BuildRequires: meson >= 0.61.5 %{?with_multipath:BuildRequires: multipath-tools-devel} BuildRequires: ncurses-devel # also libgcrypt-devel >= 1.8 possible, but gnutls already pulls nettle BuildRequires: nettle-devel >= 3.4 -BuildRequires: ninja +BuildRequires: ninja >= 1.5 %{?with_smartcard:BuildRequires: nss-devel >= 1:3.12.8} BuildRequires: numactl-devel BuildRequires: pam-devel @@ -140,7 +141,7 @@ BuildRequires: pixman-devel >= 0.21.8 BuildRequires: pkgconfig %{?with_pmem:BuildRequires: pmdk-devel} %{?with_pulseaudio:BuildRequires: pulseaudio-devel} -BuildRequires: python3 >= 1:3.6 +BuildRequires: python3 >= 1:3.7 BuildRequires: python3-sphinx_rtd_theme BuildRequires: rpm-build >= 4.6 BuildRequires: rpmbuild(macros) >= 1.644 @@ -1044,7 +1045,7 @@ build dynamic \ %{__enable_disable rdma} \ %{__enable_disable sdl} \ %{__enable_disable seccomp} \ - --enable-slirp=system \ + --enable-slirp \ %{__enable_disable spice} \ %{__enable_disable smartcard} \ %{__enable_disable snappy} \ @@ -1333,6 +1334,7 @@ fi %attr(755,root,root) %{_libexecdir}/virtiofsd %dir %{_libdir}/%{name} # modules without too many external dependencies +%attr(755,root,root) %{_libdir}/%{name}/block-blkio.so %attr(755,root,root) %{_libdir}/%{name}/block-dmg-bz2.so %attr(755,root,root) %{_libdir}/%{name}/block-dmg-lzfse.so %attr(755,root,root) %{_libdir}/%{name}/accel-tcg-i386.so -- 2.44.0