From: Marcin Krol <hawk@tld-linux.org>
Date: Fri, 13 Mar 2020 20:12:18 +0000 (+0100)
Subject: - merged 4.2.0 from PLD
X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=396c5acf7980f51815dcac219573c9fffc824c1d;p=packages%2Fqemu.git

- merged 4.2.0 from PLD
---

diff --git a/qemu.spec b/qemu.spec
index f146d06..92c5ac9 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -39,12 +39,12 @@
 Summary:	QEMU CPU Emulator
 Summary(pl.UTF-8):	QEMU - emulator procesora
 Name:		qemu
-Version:	4.1.1
+Version:	4.2.0
 Release:	1
 License:	GPL v2
 Group:		Applications/Emulators
 Source0:	http://wiki.qemu-project.org/download/%{name}-%{version}.tar.xz
-# Source0-md5:	53879f792ef2675c6c5e6cbf5cc1ac6c
+# Source0-md5:	278eeb294e4b497e79af7a57e660cb9a
 # Loads kvm kernel modules at boot
 Source3:	kvm-modules-load.conf
 # Creates /dev/kvm
@@ -54,6 +54,9 @@ Source6:	ksm.sysconfig
 Source7:	ksmctl.c
 Source9:	ksmtuned
 Source10:	ksmtuned.conf
+Source12:       99-%{name}-guest-agent.rules
+Source13:       %{name}-guest-agent.init
+Source14:       %{name}-guest-agent.logrotate
 Patch0:		%{name}-cflags.patch
 Patch1:		%{name}-whitelist.patch
 Patch2:		%{name}-user-execve.patch
@@ -90,7 +93,7 @@ BuildRequires:	libpng-devel
 %{?with_rdma:BuildRequires:	librdmacm-devel}
 %{?with_seccomp:BuildRequires:	libseccomp-devel >= 2.3.0}
 BuildRequires:	libssh2-devel >= 1.2.8
-BuildRequires:	libusb-devel >= 1.0.13
+BuildRequires:	libusb-devel >= 1.0.22
 BuildRequires:	libuuid-devel
 %{?with_lttng:BuildRequires:	lttng-ust-devel}
 BuildRequires:	lzo-devel >= 2
@@ -108,7 +111,7 @@ BuildRequires:	sed >= 4.0
 %{?with_snappy:BuildRequires:	snappy-devel}
 %if %{with spice}
 BuildRequires:	spice-protocol >= 0.12.3
-BuildRequires:	spice-server-devel >= 0.12.0
+BuildRequires:	spice-server-devel >= 0.12.5
 %endif
 %{?with_systemtap:BuildRequires:	systemtap-sdt-devel}
 BuildRequires:	texi2html
@@ -125,8 +128,7 @@ BuildRequires:	xorg-lib-libX11-devel
 BuildRequires:	zlib-devel
 %if %{with gtk3}
 BuildRequires:	gtk+3-devel >= 3.14.0
-BuildRequires:	Mesa-libEGL-devel
-%{?with_vte:BuildRequires:	vte2.90-devel >= 0.32.0}
+%{?with_vte:BuildRequires:	vte-devel >= 0.32.0}
 %endif
 %if %{with user_static}
 BuildRequires:	glib2-static
@@ -170,14 +172,14 @@ Requires:	libfdt >= 1.4.2 \
 %if %{with seccomp} \
 Requires:	libseccomp >= 2.3.0 \
 %endif \
-Requires:	libusb >= 1.0.13 \
+Requires:	libusb >= 1.0.22 \
 Requires:	pixman >= 0.21.8 \
 %if %{with usbredir} \
 Requires:	usbredir >= 0.6 \
 %endif \
 %if %{with gtk3} \
 Requires:	gtk+3 >= 3.14.0 \
-%{?with_vte:Requires:	vte2.90 >= 0.32.0} \
+%{?with_vte:Requires:	vte >= 0.32.0} \
 %endif
 
 # don't strip/chrpath anything in there; these are boot images, roms etc
@@ -743,6 +745,7 @@ Summary(pl.UTF-8):	Agent gościa QEMU
 Group:		Daemons
 Requires:	glib2 >= 1:2.22
 Obsoletes:	qemu-kvm-guest-agent
+Conflicts:	SysVinit < 2.96-2
 
 %description guest-agent
 QEMU is a generic and open source processor emulator which achieves a
@@ -935,7 +938,7 @@ build static \
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d \
-	$RPM_BUILD_ROOT/etc/{qemu,sysconfig,udev/rules.d,modules-load.d} \
+	$RPM_BUILD_ROOT/etc/{qemu,sysconfig,udev/rules.d,modules-load.d,rc.d/init.d,logrotate.d} \
 	$RPM_BUILD_ROOT{%{_sysconfdir}/sasl,%{_sbindir}}
 
 %if %{with user_static}
@@ -975,6 +978,12 @@ install -p ksmctl $RPM_BUILD_ROOT%{_sbindir}
 install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/ksmtuned
 install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf
 
+# service and udev rules.
+install -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
+
+install -p %{SOURCE13} $RPM_BUILD_ROOT/etc/rc.d/init.d/qemu-ga
+install -p %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/qemu-ga
+
 # packaged as %doc
 %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html
 
@@ -1014,12 +1023,22 @@ if [ "$1" = "0" ]; then
 	%groupremove kvm
 fi
 
+%post guest-agent
+/sbin/chkconfig --add qemu-ga
+%service qemu-ga restart "qemu-ga"
+
+%preun guest-agent
+if [ "$1" = "0" ]; then
+	%service qemu-ga stop
+	/sbin/chkconfig --del qemu-ga
+fi
+
 %files
 %defattr(644,root,root,755)
 
 %files common -f %{name}.lang
 %defattr(644,root,root,755)
-%doc LICENSE README
+%doc LICENSE README.rst
 %doc build-dynamic/qemu-doc.html
 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/qemu-ifup
 %config(noreplace) %verify(not md5 mtime size) /etc/ksmtuned.conf
@@ -1082,7 +1101,7 @@ fi
 %{_datadir}/%{name}/sgabios.bin
 %{_datadir}/%{name}/skiboot.lid
 %{_datadir}/%{name}/slof.bin
-%{_datadir}/%{name}/spapr-rtas.bin
+#%{_datadir}/%{name}/spapr-rtas.bin
 %{_datadir}/%{name}/vgabios.bin
 %{_datadir}/%{name}/vgabios-ati.bin
 %{_datadir}/%{name}/vgabios-bochs-display.bin
@@ -1107,6 +1126,7 @@ fi
 %attr(755,root,root) %{_libdir}/%{name}/ui-gtk.so
 %endif
 %{?with_sdl:%attr(755,root,root) %{_libdir}/%{name}/ui-sdl.so}
+%{?with_spice:%attr(755,root,root) %{_libdir}/%{name}/ui-spice-app.so}
 
 %files img
 %defattr(644,root,root,755)
@@ -1307,6 +1327,7 @@ fi
 %endif
 %{_datadir}/%{name}/bios.bin
 %{_datadir}/%{name}/bios-256k.bin
+%{_datadir}/%{name}/bios-microvm.bin
 %{_datadir}/%{name}/edk2-i386-code.fd
 %{_datadir}/%{name}/edk2-i386-secure-code.fd
 %{_datadir}/%{name}/edk2-i386-vars.fd
@@ -1324,6 +1345,9 @@ fi
 
 %files guest-agent
 %defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/99-qemu-guest-agent.rules
+%attr(754,root,root) /etc/rc.d/init.d/qemu-ga
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/qemu-ga
 %attr(755,root,root) %{_bindir}/qemu-ga
 %{_mandir}/man7/qemu-ga-ref.7*
 %{_mandir}/man8/qemu-ga.8*