diff --git a/0001-qemu_process-fix-crash-in-qemuSaveImageDecompression.patch b/0001-qemu_process-fix-crash-in-qemuSaveImageDecompression.patch new file mode 100644 index 0000000..dcd3fa0 --- /dev/null +++ b/0001-qemu_process-fix-crash-in-qemuSaveImageDecompression.patch @@ -0,0 +1,34 @@ +From: Pavel Hrdina +Date: Fri, 3 Nov 2023 14:03:55 +0100 +Subject: [PATCH] qemu_process: fix crash in qemuSaveImageDecompressionStart +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Content-type: text/plain + +Commit changing the code to allow passing NULL as @data into +qemuSaveImageDecompressionStart() was not correct as it left the +original call into the function as well. + +Introduced-by: 2f3e582a1ac1008eba8d43c751cdba8712dd1614 +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2247754 +Signed-off-by: Pavel Hrdina +Reviewed-by: Ján Tomko +--- + src/qemu/qemu_process.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c +index 1ef032dbd2..b9267d8699 100644 +--- a/src/qemu/qemu_process.c ++++ b/src/qemu/qemu_process.c +@@ -8208,9 +8208,6 @@ qemuProcessStartWithMemoryState(virConnectPtr conn, + } + } + +- if (qemuSaveImageDecompressionStart(data, fd, &intermediatefd, &errbuf, &cmd) < 0) +- return -1; +- + /* No cookie means libvirt which saved the domain was too old to mess up + * the CPU definitions. + */ diff --git a/libvirt.spec b/libvirt.spec index c28169b..ed2b6a0 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -95,6 +95,7 @@ %define with_fuse 0 %define with_sanlock 0 %define with_numad 0 +%define with_nbdkit 0 %define with_firewalld_zone 0 %define with_netcf 0 %define with_libssh2 0 @@ -128,7 +129,6 @@ %define with_vmware 0 %define with_libxl 0 %define with_hyperv 0 - %define with_vz 0 %define with_lxc 0 %endif @@ -174,6 +174,18 @@ %endif %endif +# We should only enable nbdkit support if the OS ships a SELinux policy that +# allows libvirt to launch it. Right now that's not the case anywhere, but +# things should be fine by the time Fedora 40 is released. +# +# TODO: add RHEL 9 once a minor release that contains the necessary SELinux +# bits exists (we only support the most recent minor release) +%if %{with_qemu} + %if 0%{?fedora} >= 40 + %define with_nbdkit 0%{!?_without_nbdkit:1} + %endif +%endif + %ifarch %{arches_dmidecode} %define with_dmidecode 0%{!?_without_dmidecode:1} %endif @@ -228,8 +240,8 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 9.7.0 -Release: 1.0.riscv64%{?dist} +Version: 9.9.0 +Release: 2.0.riscv64%{?dist} License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1 URL: https://libvirt.org/ @@ -238,6 +250,9 @@ URL: https://libvirt.org/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz +# Fix crash with snapshot restore (bz #2247754) +Patch0001: 0001-qemu_process-fix-crash-in-qemuSaveImageDecompression.patch + Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} @@ -249,6 +264,7 @@ Requires: libvirt-daemon-driver-lxc = %{version}-%{release} %endif %if %{with_qemu} Requires: libvirt-daemon-driver-qemu = %{version}-%{release} +Requires: libvirt-client-qemu = %{version}-%{release} %endif # We had UML driver, but we've removed it. Obsoletes: libvirt-daemon-driver-uml <= 5.0.0 @@ -313,6 +329,10 @@ BuildRequires: libacl-devel # From QEMU RPMs, used by virstoragetest BuildRequires: /usr/bin/qemu-img %endif +# nbdkit support requires libnbd +%if %{with_nbdkit} +BuildRequires: libnbd-devel +%endif # For LVM drivers BuildRequires: lvm2 # For pool type=iscsi @@ -768,6 +788,11 @@ Requires: numad Recommends: passt Recommends: passt-selinux %endif + %if %{with_nbdkit} +Recommends: nbdkit +Recommends: nbdkit-curl-plugin +Recommends: nbdkit-ssh-plugin + %endif %description daemon-driver-qemu The qemu driver plugin for the libvirtd daemon, providing @@ -1152,6 +1177,12 @@ exit 1 %define arg_numad -Dnumad=disabled %endif +%if %{with_nbdkit} + %define arg_nbdkit -Dnbdkit=enabled +%else + %define arg_nbdkit -Dnbdkit=disabled +%endif + %if %{with_fuse} %define arg_fuse -Dfuse=enabled %else @@ -1264,6 +1295,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dyajl=enabled \ %{?arg_sanlock} \ -Dlibpcap=enabled \ + %{?arg_nbdkit} \ -Dlibnl=enabled \ -Daudit=enabled \ -Ddtrace=enabled \ @@ -1320,13 +1352,14 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Ddriver_vmware=disabled \ -Ddriver_vz=disabled \ -Ddtrace=disabled \ - -Dexpensive_tests=enabled \ + -Dexpensive_tests=disabled \ -Dfirewalld=disabled \ -Dfirewalld_zone=disabled \ -Dfuse=disabled \ -Dglusterfs=disabled \ -Dhost_validate=disabled \ -Dlibiscsi=disabled \ + -Dnbdkit=disabled \ -Dlibnl=disabled \ -Dlibpcap=disabled \ -Dlibssh2=disabled \ @@ -2470,9 +2503,18 @@ exit 0 %changelog -* Fri Sep 8 2023 David Abdurachmanov - 9.7.0-1.0.riscv64 +* Mon Nov 13 2023 David Abdurachmanov - 9.9.0-2.0.riscv64 - Add riscv64 to arches_qemu_kvm +* Mon Nov 06 2023 Cole Robinson - 9.9.0-2 +- Fix crash with snapshot restore (bz #2247754) + +* Wed Nov 01 2023 Cole Robinson - 9.9.0-1 +- Update to version 9.9.0 + +* Thu Oct 05 2023 Cole Robinson - 9.8.0-1 +- Update to version 9.8.0 + * Fri Sep 1 2023 Daniel P. Berrangé - 9.7.0-1 - Update to version 9.7.0 diff --git a/sources b/sources index 502c1a1..8d03d10 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvirt-9.7.0.tar.xz) = dd771822c0fa0861a32cab9d7f82235b101867fa0a4e8cf9a857ddfb2347e41b625b1e6f8791c4b3543fec836a1a23cae1fac4ce4b40debd51f2097bae46c949 +SHA512 (libvirt-9.9.0.tar.xz) = 77cea28acf4f3e8c92fbd5bd72ad084be183c07f14e3a9ce35d6d9d62d36ee97a30cef55fb204b3e43f282890ecd7d5827a784a517e7f4ed8b22ee502c3f09d7