[packages/qemu] - updated to 8.0.5; virtiofsd is no longer included, external project can be used

qboosh qboosh at pld-linux.org
Mon Apr 29 07:51:20 CEST 2024


commit cc59f32bc16588aaa466ca7d02fb71165277c9f8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Apr 29 06:26:33 2024 +0200

    - updated to 8.0.5; virtiofsd is no longer included, external project can be used

 qemu-capstone.patch    | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
 qemu-user-execve.patch | 39 +++++++++++++++++++++----------------
 qemu.spec              | 24 +++++++++++------------
 3 files changed, 87 insertions(+), 28 deletions(-)
---
diff --git a/qemu.spec b/qemu.spec
index ba50b16..0cebb18 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -44,12 +44,12 @@
 Summary:	QEMU CPU Emulator
 Summary(pl.UTF-8):	QEMU - emulator procesora
 Name:		qemu
-Version:	7.2.10
+Version:	8.0.5
 Release:	1
 License:	GPL v2, BSD (edk2 firmware files)
 Group:		Applications/Emulators
 Source0:	https://download.qemu.org/%{name}-%{version}.tar.xz
-# Source0-md5:	a99d896cf773964422e0294015d3b98a
+# Source0-md5:	c803c9a643131013bef6c3b9b541c5a4
 # Loads kvm kernel modules at boot
 Source3:	kvm-modules-load.conf
 # Creates /dev/kvm
@@ -75,6 +75,7 @@ Patch5:		%{name}-u2f-emu.patch
 Patch6:		%{name}-linux-mount.patch
 Patch7:		libvfio-user-types.patch
 Patch8:		libvfio-user-alloca.patch
+Patch9:		%{name}-capstone.patch
 URL:		https://www.qemu.org/
 %{?with_opengl:BuildRequires:	Mesa-libgbm-devel}
 %{?with_opengl:BuildRequires:	OpenGL-GLX-devel}
@@ -119,7 +120,8 @@ BuildRequires:	libpng-devel >= 2:1.6.34
 %{?with_seccomp:BuildRequires:	libseccomp-devel >= 2.3.0}
 BuildRequires:	libselinux-devel
 BuildRequires:	libssh-devel >= 0.8.7
-BuildRequires:	libslirp-devel >= 4.1.0
+BuildRequires:	libslirp-devel >= 4.7
+BuildRequires:	libstdc++-devel >= 6:4.7
 # for tests only
 #BuildRequires:	libtasn1-devel
 BuildRequires:	libu2f-emu-devel
@@ -154,8 +156,8 @@ BuildRequires:	sed >= 4.0
 %{?with_snappy:BuildRequires:	snappy-devel}
 BuildRequires:	sphinx-pdg
 %if %{with spice}
-BuildRequires:	spice-protocol >= 0.12.3
-BuildRequires:	spice-server-devel >= 0.12.5
+BuildRequires:	spice-protocol >= 0.14.0
+BuildRequires:	spice-server-devel >= 0.14.0
 %endif
 %{?with_systemtap:BuildRequires:	systemtap-sdt-devel}
 BuildRequires:	tar >= 1:1.22
@@ -224,12 +226,12 @@ Requires:	libpng >= 2:1.6.34 \
 %if %{with seccomp} \
 Requires:	libseccomp >= 2.3.0 \
 %endif \
-Requires:	libslirp >= 4.1.0 \
+Requires:	libslirp >= 4.7 \
 Requires:	liburing >= 0.3 \
 Requires:	libusb >= 1.0.22 \
 Requires:	pixman >= 0.21.8 \
 %if %{with spice} \
-Requires:	spice-server-libs >= 0.12.5 \
+Requires:	spice-server-libs >= 0.14.0 \
 %endif \
 %if %{with usbredir} \
 Requires:	usbredir >= 0.6 \
@@ -300,6 +302,7 @@ Requires:	nettle >= 3.4
 Requires:	systemd-units >= 38
 %{?with_vte:Requires:	vte >= 0.32.0}
 Requires:	zstd >= 1.4.0
+Suggests:	virtiofsd
 Provides:	group(qemu)
 Provides:	user(qemu)
 Obsoletes:	qemu-kvm-common < 2
@@ -762,7 +765,7 @@ Summary(pl.UTF-8):	QEMU - emulator systemu z procesorem x86
 Group:		Applications/Emulators
 Requires:	%{name}-common = %{version}-%{release}
 %{?with_vfio_user:Requires:	libvfio-user = %{version}-%{release}}
-%{?with_system_seabios:Requires:	seabios}
+%{?with_system_seabios:Requires:	seabios >= 1.11.0}
 %systempkg_req
 Obsoletes:	kvm < 89
 Obsoletes:	qemu-kvm-system-x86 < 2
@@ -1016,6 +1019,7 @@ Pliki nagłówkowe biblioteki vfio-user.
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 %{__sed} -i '1s,/usr/bin/env python3,%{__python3},' scripts/qemu-trace-stap
 
@@ -1373,7 +1377,6 @@ fi
 %attr(755,root,root) %{_libexecdir}/vhost-user-gpu
 %endif
 %attr(755,root,root) %{_libexecdir}/virtfs-proxy-helper
-%attr(755,root,root) %{_libexecdir}/virtiofsd
 %dir %{_libdir}/%{name}
 # modules without too many external dependencies
 %attr(755,root,root) %{_libdir}/%{name}/block-blkio.so
@@ -1425,7 +1428,6 @@ fi
 %if %{with virgl}
 %{_datadir}/%{name}/vhost-user/50-qemu-gpu.json
 %endif
-%{_datadir}/%{name}/vhost-user/50-qemu-virtiofsd.json
 %{_desktopdir}/qemu.desktop
 %{_iconsdir}/hicolor/*x*/apps/qemu.png
 %{_iconsdir}/hicolor/32x32/apps/qemu.bmp
@@ -1433,7 +1435,6 @@ fi
 %{_mandir}/man1/qemu.1*
 %{_mandir}/man1/qemu-storage-daemon.1*
 %{_mandir}/man1/virtfs-proxy-helper.1*
-%{_mandir}/man1/virtiofsd.1*
 %{_mandir}/man7/qemu-block-drivers.7*
 %{_mandir}/man7/qemu-cpu-models.7*
 %{_mandir}/man7/qemu-qmp-ref.7*
@@ -1678,7 +1679,6 @@ fi
 %{_datadir}/%{name}/pxe-rtl8139.rom
 %{_datadir}/%{name}/pxe-virtio.rom
 %{_datadir}/%{name}/qboot.rom
-%{_datadir}/%{name}/sgabios.bin
 %{_datadir}/%{name}/vgabios.bin
 %{_datadir}/%{name}/vgabios-ati.bin
 %{_datadir}/%{name}/vgabios-bochs-display.bin
diff --git a/qemu-capstone.patch b/qemu-capstone.patch
new file mode 100644
index 0000000..c6a73d6
--- /dev/null
+++ b/qemu-capstone.patch
@@ -0,0 +1,52 @@
+Workaround symbol conflict with capstone/tricore.h
+--- qemu-8.0.5/target/tricore/cpu.h.orig	2023-09-21 22:19:34.000000000 +0200
++++ qemu-8.0.5/target/tricore/cpu.h	2024-04-27 21:25:15.112539225 +0200
+@@ -258,7 +258,7 @@ enum tricore_features {
+     TRICORE_FEATURE_161,
+ };
+ 
+-static inline int tricore_feature(CPUTriCoreState *env, int feature)
++static inline int qemu_tricore_feature(CPUTriCoreState *env, int feature)
+ {
+     return (env->features & (1ULL << feature)) != 0;
+ }
+--- qemu-8.0.5/target/tricore/op_helper.c.orig	2023-09-21 22:19:34.000000000 +0200
++++ qemu-8.0.5/target/tricore/op_helper.c	2024-04-27 21:25:37.975748698 +0200
+@@ -2528,7 +2528,7 @@ void helper_ret(CPUTriCoreState *env)
+     /* PCXI = new_PCXI; */
+     env->PCXI = new_PCXI;
+ 
+-    if (tricore_feature(env, TRICORE_FEATURE_13)) {
++    if (qemu_tricore_feature(env, TRICORE_FEATURE_13)) {
+         /* PSW = new_PSW */
+         psw_write(env, new_PSW);
+     } else {
+@@ -2639,7 +2639,7 @@ void helper_rfm(CPUTriCoreState *env)
+     env->gpr_a[10] = cpu_ldl_data(env, env->DCX+8);
+     env->gpr_a[11] = cpu_ldl_data(env, env->DCX+12);
+ 
+-    if (tricore_feature(env, TRICORE_FEATURE_131)) {
++    if (qemu_tricore_feature(env, TRICORE_FEATURE_131)) {
+         env->DBGTCR = 0;
+     }
+ }
+--- qemu-8.0.5/target/tricore/cpu.c.orig	2023-09-21 22:19:34.000000000 +0200
++++ qemu-8.0.5/target/tricore/cpu.c	2024-04-27 21:25:52.302337751 +0200
+@@ -103,14 +103,14 @@ static void tricore_cpu_realizefn(Device
+     }
+ 
+     /* Some features automatically imply others */
+-    if (tricore_feature(env, TRICORE_FEATURE_161)) {
++    if (qemu_tricore_feature(env, TRICORE_FEATURE_161)) {
+         set_feature(env, TRICORE_FEATURE_16);
+     }
+ 
+-    if (tricore_feature(env, TRICORE_FEATURE_16)) {
++    if (qemu_tricore_feature(env, TRICORE_FEATURE_16)) {
+         set_feature(env, TRICORE_FEATURE_131);
+     }
+-    if (tricore_feature(env, TRICORE_FEATURE_131)) {
++    if (qemu_tricore_feature(env, TRICORE_FEATURE_131)) {
+         set_feature(env, TRICORE_FEATURE_13);
+     }
+     cpu_reset(cs);
diff --git a/qemu-user-execve.patch b/qemu-user-execve.patch
index 4ed89e2..bec6a48 100644
--- a/qemu-user-execve.patch
+++ b/qemu-user-execve.patch
@@ -88,10 +88,10 @@ index ee12035..5951279 100644
  extern unsigned long mmap_min_addr;
  
  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
-@@ -8340,6 +8340,109 @@ static target_timer_t get_timer_id(abi_l
-     return timerid;
+--- qemu-8.0.5/linux-user/syscall.c.orig	2023-09-21 22:19:33.000000000 +0200
++++ qemu-8.0.5/linux-user/syscall.c	2024-04-28 08:04:44.168009553 +0200
+@@ -8408,6 +8408,109 @@ static int do_openat(CPUArchState *cpu_e
+     return safe_openat(dirfd, path(pathname), flags, mode);
  }
  
 +#define BINPRM_BUF_SIZE 128
@@ -197,15 +197,22 @@ index ee12035..5951279 100644
 +    return get_errno(safe_execve(qemu_execve_path, new_argp, envp));
 +}
 +
- static int target_to_host_cpu_mask(unsigned long *host_mask,
-                                    size_t host_size,
-                                    abi_ulong target_addr,
-@@ -8896,6 +8999,8 @@ static abi_long do_syscall1(CPUArchState
-              */
-             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));
-             }
+ static int do_execv(CPUArchState *cpu_env, int dirfd,
+                     abi_long pathname, abi_long guest_argp,
+                     abi_long guest_envp, int flags, bool is_execveat)
+@@ -8493,9 +8596,12 @@ static int do_execv(CPUArchState *cpu_en
+     if (is_proc_myself(p, "exe")) {
+         exe = exec_path;
+     }
+-    ret = is_execveat
+-        ? safe_execveat(dirfd, exe, argp, envp, flags)
+-        : safe_execve(exe, argp, envp);
++    if (is_execveat)
++        ret = safe_execveat(dirfd, exe, argp, envp, flags);
++    else if (qemu_execve_path && *qemu_execve_path)
++        ret = qemu_execve(exe, argp, envp);
++    else
++        ret = safe_execve(exe, argp, envp);
+     ret = get_errno(ret);
+ 
+     unlock_user(p, pathname, 0);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qemu.git/commitdiff/cc59f32bc16588aaa466ca7d02fb71165277c9f8



More information about the pld-cvs-commit mailing list