From 0862e2b778011ac14477641f94020a2203e4603e Mon Sep 17 00:00:00 2001 From: Daniel P. Berrangé Date: Jul 04 2024 09:31:26 +0000 Subject: [PATCH 1/13] Rebase to 10.5.0 release Signed-off-by: Daniel P. Berrangé --- diff --git a/0001-interface-fix-udev-reference-leak-with-invalid-flags.patch b/0001-interface-fix-udev-reference-leak-with-invalid-flags.patch deleted file mode 100644 index cdc4a2b..0000000 --- a/0001-interface-fix-udev-reference-leak-with-invalid-flags.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 3499354e12a1c1832bf4030693a64e03ceb79d05 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Wed, 5 Jun 2024 11:16:21 +0100 -Subject: [PATCH] interface: fix udev reference leak with invalid flags -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The udevInterfaceGetXMLDesc method takes a reference on the udev -driver as its first action. If the virCheckFlags() condition -fails, however, this reference is never released. - -Reviewed-by: Peter Krempa -Signed-off-by: Daniel P. Berrangé ---- - src/interface/interface_backend_udev.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c -index fdf11a8318..e1a50389c9 100644 ---- a/src/interface/interface_backend_udev.c -+++ b/src/interface/interface_backend_udev.c -@@ -1027,12 +1027,14 @@ static char * - udevInterfaceGetXMLDesc(virInterfacePtr ifinfo, - unsigned int flags) - { -- struct udev *udev = udev_ref(driver->udev); -+ struct udev *udev = NULL; - g_autoptr(virInterfaceDef) ifacedef = NULL; - char *xmlstr = NULL; - - virCheckFlags(VIR_INTERFACE_XML_INACTIVE, NULL); - -+ udev = udev_ref(driver->udev); -+ - /* Recursively build up the interface XML based on the requested - * interface name - */ --- -2.45.1 - diff --git a/0001-rpc-avoid-leak-of-GSource-in-use-for-interrupting-ma.patch b/0001-rpc-avoid-leak-of-GSource-in-use-for-interrupting-ma.patch deleted file mode 100644 index afa729d..0000000 --- a/0001-rpc-avoid-leak-of-GSource-in-use-for-interrupting-ma.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 98f1cf88fa7e0f992d93f376418fbfb3996a9690 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Fri, 17 May 2024 14:55:24 +0100 -Subject: [PATCH] rpc: avoid leak of GSource in use for interrupting main loop -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We never release the reference on the GSource created for -interrupting the main loop, nor do we remove it from the -main context if our thread is woken up prior to the wakeup -callback firing. - -This can result in a leak of GSource objects, along with an -ever growing list of GSources attached to the main context, -which will gradually slow down execution of the loop, as -several operations are O(N) for the number of attached GSource -objects. - -Reviewed-by: Michal Privoznik -Signed-off-by: Daniel P. Berrangé ---- - src/rpc/virnetclient.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c -index 147b0d661a..6d424eb599 100644 ---- a/src/rpc/virnetclient.c -+++ b/src/rpc/virnetclient.c -@@ -1946,7 +1946,7 @@ static int virNetClientIO(virNetClient *client, - /* Check to see if another thread is dispatching */ - if (client->haveTheBuck) { - /* Force other thread to wakeup from poll */ -- GSource *wakeup = g_idle_source_new(); -+ g_autoptr(GSource) wakeup = g_idle_source_new(); - g_source_set_callback(wakeup, virNetClientIOWakeup, client->eventLoop, NULL); - g_source_attach(wakeup, client->eventCtx); - -@@ -1968,6 +1968,7 @@ static int virNetClientIO(virNetClient *client, - return -1; - } - -+ g_source_destroy(wakeup); - VIR_DEBUG("Woken up from sleep head=%p call=%p", - client->waitDispatch, thiscall); - /* Three reasons we can be woken up --- -2.45.1 - diff --git a/libvirt.spec b/libvirt.spec index 2fe3ad7..751fed8 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -288,8 +288,8 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 10.4.0 -Release: 2%{?dist} +Version: 10.5.0 +Release: 1%{?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/ @@ -297,8 +297,6 @@ URL: https://libvirt.org/ %define mainturl stable_updates/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz -Patch2: 0001-rpc-avoid-leak-of-GSource-in-use-for-interrupting-ma.patch -Patch3: 0001-interface-fix-udev-reference-leak-with-invalid-flags.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -1034,8 +1032,6 @@ capabilities of VirtualBox %package client Summary: Client side utilities of the libvirt library Requires: libvirt-libs = %{version}-%{release} -# Needed by virt-pki-validate script. -Requires: gnutls-utils # Ensure smooth upgrades Obsoletes: libvirt-bash-completion < 7.3.0 @@ -1057,8 +1053,6 @@ with some QEMU specific features of libvirt. %package libs Summary: Client side libraries -# So remote clients can access libvirt over SSH tunnel -Requires: cyrus-sasl # Needed by default sasl.conf - no onerous extra deps, since # 100's of other things on a system already pull in krb5-libs Requires: cyrus-sasl-gssapi @@ -1331,6 +1325,8 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) %meson \ -Drunstatedir=%{_rundir} \ -Dinitconfdir=%{_sysconfdir}/sysconfig \ + -Dunitdir=%{_unitdir} \ + -Dsysusersdir=%{_sysusersdir} \ %{?arg_qemu} \ %{?arg_openvz} \ %{?arg_lxc} \ @@ -1487,8 +1483,9 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dtests=disabled \ -Dudev=disabled \ -Dwireshark_dissector=disabled \ - -Dyajl=disabled - %mingw_ninja + -Dyajl=disabled \ + %{?enable_werror} +%mingw_ninja %endif %install @@ -1594,7 +1591,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh %if %{with_native} # Building on slow archs, like emulated s390x in Fedora copr, requires # raising the test timeout -VIR_TEST_DEBUG=1 +export VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10 %endif @@ -2515,7 +2512,7 @@ exit 0 %{mingw32_bindir}/virt-admin.exe %{mingw32_bindir}/virt-xml-validate %{mingw32_bindir}/virt-pki-query-dn.exe -%{mingw32_bindir}/virt-pki-validate +%{mingw32_bindir}/virt-pki-validate.exe %{mingw32_bindir}/libvirt-lxc-0.dll %{mingw32_bindir}/libvirt-qemu-0.dll %{mingw32_bindir}/libvirt-admin-0.dll @@ -2574,7 +2571,7 @@ exit 0 %{mingw64_bindir}/virt-admin.exe %{mingw64_bindir}/virt-xml-validate %{mingw64_bindir}/virt-pki-query-dn.exe -%{mingw64_bindir}/virt-pki-validate +%{mingw64_bindir}/virt-pki-validate.exe %{mingw64_bindir}/libvirt-lxc-0.dll %{mingw64_bindir}/libvirt-qemu-0.dll %{mingw64_bindir}/libvirt-admin-0.dll @@ -2624,6 +2621,9 @@ exit 0 %endif %changelog +* Thu Jul 4 2024 Daniel P. Berrangé - 10.5.0-1 +- Rebase to 10.5.0 release + * Wed Jun 5 2024 Daniel P. Berrangé - 10.4.0-2 - Fix leak of GSource handle - Fix leak of udev reference (rhbz #2266017) diff --git a/sources b/sources index f84031b..37d1b88 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvirt-10.4.0.tar.xz) = 711be39f3fb831a5073b25a5b02410676147114f3dcf85b24c8505b611a81bf64cf3b95f66908e0dc3a2f3e66e5fc31b2d95db610ea3f1b747a9fd1f52b1ffa7 +SHA512 (libvirt-10.5.0.tar.xz) = e4976849cff7bdae0b7fda0644490f0ca743efc11c35a2fae45bb0f6f467b85644c1d04d1f3d1b10affdc6d9b8dcc0a3c255e527e0bdd73cdd4d1c81d5c418e7 From 7bf08eb7cb7f2ca0d9cee59f12bde0a025206d2a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Jul 18 2024 15:26:05 +0000 Subject: [PATCH 2/13] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- diff --git a/libvirt.spec b/libvirt.spec index 751fed8..bd8c2ab 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -289,7 +289,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 10.5.0 -Release: 1%{?dist} +Release: 2%{?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/ @@ -2621,6 +2621,9 @@ exit 0 %endif %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 10.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jul 4 2024 Daniel P. Berrangé - 10.5.0-1 - Rebase to 10.5.0 release From e3e721c5297dfcc63c05744e83d9bc852633d3b7 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Aug 05 2024 10:11:49 +0000 Subject: [PATCH 3/13] Rebuild for Xen 4.19.0 --- diff --git a/libvirt.spec b/libvirt.spec index bd8c2ab..917de58 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -289,7 +289,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 10.5.0 -Release: 2%{?dist} +Release: 3%{?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/ @@ -2621,6 +2621,9 @@ exit 0 %endif %changelog +* Mon Aug 05 2024 Richard W.M. Jones - 10.5.0-3 +- Rebuild for Xen 4.19.0 + * Thu Jul 18 2024 Fedora Release Engineering - 10.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From c61c2c83eff4adb74e1a874190d99c6d92803ce9 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Aug 06 2024 12:57:52 +0000 Subject: [PATCH 4/13] libvirt-10.6.0-1 Update to version 10.6.0 --- diff --git a/libvirt.spec b/libvirt.spec index 917de58..f631243 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -288,8 +288,8 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 10.5.0 -Release: 3%{?dist} +Version: 10.6.0 +Release: 1%{?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/ @@ -2620,7 +2620,11 @@ exit 0 %{mingw64_mandir}/man7/virkey*.7* %endif + %changelog +* Tue Aug 06 2024 Cole Robinson - 10.6.0-1 +- Update to version 10.6.0 + * Mon Aug 05 2024 Richard W.M. Jones - 10.5.0-3 - Rebuild for Xen 4.19.0 diff --git a/sources b/sources index 37d1b88..fb44198 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvirt-10.5.0.tar.xz) = e4976849cff7bdae0b7fda0644490f0ca743efc11c35a2fae45bb0f6f467b85644c1d04d1f3d1b10affdc6d9b8dcc0a3c255e527e0bdd73cdd4d1c81d5c418e7 +SHA512 (libvirt-10.6.0.tar.xz) = edec79e89669d5e9a46be35e0d6334a6ed3bbf32426679549bd998bde24cba52b0378843f41a3abb5d781ad53e2a6a54619a0bad3f168c11fb41736cc6af6568 From 50057212b3db63126d1e19b504028c0f157792af Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Aug 27 2024 12:54:25 +0000 Subject: [PATCH 5/13] libvirt-10.6.0-2 Fix on kernel 6.10 (bz #2302245) --- diff --git a/0001-virarptable-Properly-calculate-rtattr-length.patch b/0001-virarptable-Properly-calculate-rtattr-length.patch new file mode 100644 index 0000000..1293b36 --- /dev/null +++ b/0001-virarptable-Properly-calculate-rtattr-length.patch @@ -0,0 +1,29 @@ +From: Martin Kletzander +Date: Fri, 16 Aug 2024 13:56:51 +0200 +Subject: [PATCH] virarptable: Properly calculate rtattr length +Content-type: text/plain + +Use convenience macro which does almost the same thing we were doing, +but also pads out the payload length to a multiple of NLMSG_ALIGNTO (4) +bytes. + +Signed-off-by: Martin Kletzander +Reviewed-by: Laine Stump +--- + src/util/virarptable.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/util/virarptable.c b/src/util/virarptable.c +index 299dddd664..d8e41c5a86 100644 +--- a/src/util/virarptable.c ++++ b/src/util/virarptable.c +@@ -102,8 +102,7 @@ virArpTableGet(void) + return table; + + VIR_WARNINGS_NO_CAST_ALIGN +- parse_rtattr(tb, NDA_MAX, NDA_RTA(r), +- nh->nlmsg_len - NLMSG_LENGTH(sizeof(*r))); ++ parse_rtattr(tb, NDA_MAX, NDA_RTA(r), NLMSG_PAYLOAD(nh, sizeof(*r))); + VIR_WARNINGS_RESET + + if (tb[NDA_DST] == NULL || tb[NDA_LLADDR] == NULL) diff --git a/0002-virarptable-Fix-check-for-message-length.patch b/0002-virarptable-Fix-check-for-message-length.patch new file mode 100644 index 0000000..8976ef5 --- /dev/null +++ b/0002-virarptable-Fix-check-for-message-length.patch @@ -0,0 +1,34 @@ +From: Martin Kletzander +Date: Fri, 16 Aug 2024 13:59:15 +0200 +Subject: [PATCH] virarptable: Fix check for message length +Content-type: text/plain + +The previous check was all wrong since it calculated the how long would +the netlink message be if the netlink header was the payload and then +subtracted that from the whole message length, a variable that was not +used later in the code. This check can fail if there are no additional +payloads, struct rtattr in particular, which we are parsing later, +however the RTA_OK macro would've caught that anyway. + +Signed-off-by: Martin Kletzander +Reviewed-by: Laine Stump +--- + src/util/virarptable.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/util/virarptable.c b/src/util/virarptable.c +index d8e41c5a86..45ee76766f 100644 +--- a/src/util/virarptable.c ++++ b/src/util/virarptable.c +@@ -81,10 +81,9 @@ virArpTableGet(void) + for (; NLMSG_OK(nh, msglen); nh = NLMSG_NEXT(nh, msglen)) { + VIR_WARNINGS_RESET + struct ndmsg *r = NLMSG_DATA(nh); +- int len = nh->nlmsg_len; + void *addr; + +- if ((len -= NLMSG_LENGTH(sizeof(*nh))) < 0) { ++ if (nh->nlmsg_len < NLMSG_SPACE(sizeof(*r))) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("wrong nlmsg len")); + goto cleanup; diff --git a/0003-virarptable-End-parsing-earlier-in-case-of-NLMSG_DON.patch b/0003-virarptable-End-parsing-earlier-in-case-of-NLMSG_DON.patch new file mode 100644 index 0000000..bd43677 --- /dev/null +++ b/0003-virarptable-End-parsing-earlier-in-case-of-NLMSG_DON.patch @@ -0,0 +1,46 @@ +From: Martin Kletzander +Date: Fri, 16 Aug 2024 14:02:48 +0200 +Subject: [PATCH] virarptable: End parsing earlier in case of NLMSG_DONE +Content-type: text/plain + +Check for the last multipart message right as the first thing. The +presumption probably was that the last message might still contain a +payload we want to parse. However that cannot be true since that would +have to be a type RTM_NEWNEIGH. This was not caught because older +kernels were note sending NLMSG_DONE and probably relied on the fact +that the parsing just stops after all the messages are walked through, +which the NLMSG_OK macro successfully did. + +Resolves: https://issues.redhat.com/browse/RHEL-52449 +Resolves: https://bugzilla.redhat.com/2302245 +Fixes: a176d67cdfaf5b8237a7e3a80d8be0e6bdf2d8fd +Signed-off-by: Martin Kletzander +Reviewed-by: Laine Stump +--- + src/util/virarptable.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/util/virarptable.c b/src/util/virarptable.c +index 45ee76766f..20d11f97b0 100644 +--- a/src/util/virarptable.c ++++ b/src/util/virarptable.c +@@ -83,6 +83,9 @@ virArpTableGet(void) + struct ndmsg *r = NLMSG_DATA(nh); + void *addr; + ++ if (nh->nlmsg_type == NLMSG_DONE) ++ break; ++ + if (nh->nlmsg_len < NLMSG_SPACE(sizeof(*r))) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("wrong nlmsg len")); +@@ -97,9 +100,6 @@ virArpTableGet(void) + (!(r->ndm_state == NUD_STALE || r->ndm_state == NUD_REACHABLE))) + continue; + +- if (nh->nlmsg_type == NLMSG_DONE) +- return table; +- + VIR_WARNINGS_NO_CAST_ALIGN + parse_rtattr(tb, NDA_MAX, NDA_RTA(r), NLMSG_PAYLOAD(nh, sizeof(*r))); + VIR_WARNINGS_RESET diff --git a/libvirt.spec b/libvirt.spec index f631243..47b3ade 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -289,7 +289,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 10.6.0 -Release: 1%{?dist} +Release: 2%{?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/ @@ -298,6 +298,11 @@ URL: https://libvirt.org/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz +# Fix `virsh domifaddr --source=arp` on kernel 6.10 (bz #2302245) +Patch0001: 0001-virarptable-Properly-calculate-rtattr-length.patch +Patch0002: 0002-virarptable-Fix-check-for-message-length.patch +Patch0003: 0003-virarptable-End-parsing-earlier-in-case-of-NLMSG_DON.patch + Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} @@ -2622,6 +2627,9 @@ exit 0 %changelog +* Tue Aug 27 2024 Cole Robinson - 10.6.0-2 +- Fix `virsh domifaddr --source=arp` on kernel 6.10 (bz #2302245) + * Tue Aug 06 2024 Cole Robinson - 10.6.0-1 - Update to version 10.6.0 From 77b02695ab945be890ca445f0fb2b7daecdee644 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Aug 27 2024 13:09:52 +0000 Subject: [PATCH 6/13] Add new systemtap-sdt-dtrace to build deps This is a part of approved Fedora change: https://fedoraproject.org/wiki/Changes/Separate_dtrace_package systemtap-sdt-devel will stop requiring systemtap-sdt-dtrace and that would break the build of this package. --- diff --git a/libvirt.spec b/libvirt.spec index 47b3ade..f9293c2 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -430,8 +430,8 @@ BuildRequires: libcurl-devel BuildRequires: libwsman-devel >= 2.6.3 %endif BuildRequires: audit-libs-devel -# we need /usr/sbin/dtrace BuildRequires: systemtap-sdt-devel +BuildRequires: /usr/bin/dtrace # For mount/umount in FS driver BuildRequires: util-linux # For showmount in FS driver (netfs discovery) @@ -2629,6 +2629,7 @@ exit 0 %changelog * Tue Aug 27 2024 Cole Robinson - 10.6.0-2 - Fix `virsh domifaddr --source=arp` on kernel 6.10 (bz #2302245) +- Add new systemtap-sdt-dtrace to build deps * Tue Aug 06 2024 Cole Robinson - 10.6.0-1 - Update to version 10.6.0 From 156ce5b5c7702b26f47b2059ca9e6751f9f1593b Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sep 02 2024 17:55:47 +0000 Subject: [PATCH 7/13] libvirt-10.7.0-1 Update to version 10.7.0 Signed-off-by: Cole Robinson --- diff --git a/0001-virarptable-Properly-calculate-rtattr-length.patch b/0001-virarptable-Properly-calculate-rtattr-length.patch deleted file mode 100644 index 1293b36..0000000 --- a/0001-virarptable-Properly-calculate-rtattr-length.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Martin Kletzander -Date: Fri, 16 Aug 2024 13:56:51 +0200 -Subject: [PATCH] virarptable: Properly calculate rtattr length -Content-type: text/plain - -Use convenience macro which does almost the same thing we were doing, -but also pads out the payload length to a multiple of NLMSG_ALIGNTO (4) -bytes. - -Signed-off-by: Martin Kletzander -Reviewed-by: Laine Stump ---- - src/util/virarptable.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/util/virarptable.c b/src/util/virarptable.c -index 299dddd664..d8e41c5a86 100644 ---- a/src/util/virarptable.c -+++ b/src/util/virarptable.c -@@ -102,8 +102,7 @@ virArpTableGet(void) - return table; - - VIR_WARNINGS_NO_CAST_ALIGN -- parse_rtattr(tb, NDA_MAX, NDA_RTA(r), -- nh->nlmsg_len - NLMSG_LENGTH(sizeof(*r))); -+ parse_rtattr(tb, NDA_MAX, NDA_RTA(r), NLMSG_PAYLOAD(nh, sizeof(*r))); - VIR_WARNINGS_RESET - - if (tb[NDA_DST] == NULL || tb[NDA_LLADDR] == NULL) diff --git a/0002-virarptable-Fix-check-for-message-length.patch b/0002-virarptable-Fix-check-for-message-length.patch deleted file mode 100644 index 8976ef5..0000000 --- a/0002-virarptable-Fix-check-for-message-length.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Martin Kletzander -Date: Fri, 16 Aug 2024 13:59:15 +0200 -Subject: [PATCH] virarptable: Fix check for message length -Content-type: text/plain - -The previous check was all wrong since it calculated the how long would -the netlink message be if the netlink header was the payload and then -subtracted that from the whole message length, a variable that was not -used later in the code. This check can fail if there are no additional -payloads, struct rtattr in particular, which we are parsing later, -however the RTA_OK macro would've caught that anyway. - -Signed-off-by: Martin Kletzander -Reviewed-by: Laine Stump ---- - src/util/virarptable.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/util/virarptable.c b/src/util/virarptable.c -index d8e41c5a86..45ee76766f 100644 ---- a/src/util/virarptable.c -+++ b/src/util/virarptable.c -@@ -81,10 +81,9 @@ virArpTableGet(void) - for (; NLMSG_OK(nh, msglen); nh = NLMSG_NEXT(nh, msglen)) { - VIR_WARNINGS_RESET - struct ndmsg *r = NLMSG_DATA(nh); -- int len = nh->nlmsg_len; - void *addr; - -- if ((len -= NLMSG_LENGTH(sizeof(*nh))) < 0) { -+ if (nh->nlmsg_len < NLMSG_SPACE(sizeof(*r))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("wrong nlmsg len")); - goto cleanup; diff --git a/0003-virarptable-End-parsing-earlier-in-case-of-NLMSG_DON.patch b/0003-virarptable-End-parsing-earlier-in-case-of-NLMSG_DON.patch deleted file mode 100644 index bd43677..0000000 --- a/0003-virarptable-End-parsing-earlier-in-case-of-NLMSG_DON.patch +++ /dev/null @@ -1,46 +0,0 @@ -From: Martin Kletzander -Date: Fri, 16 Aug 2024 14:02:48 +0200 -Subject: [PATCH] virarptable: End parsing earlier in case of NLMSG_DONE -Content-type: text/plain - -Check for the last multipart message right as the first thing. The -presumption probably was that the last message might still contain a -payload we want to parse. However that cannot be true since that would -have to be a type RTM_NEWNEIGH. This was not caught because older -kernels were note sending NLMSG_DONE and probably relied on the fact -that the parsing just stops after all the messages are walked through, -which the NLMSG_OK macro successfully did. - -Resolves: https://issues.redhat.com/browse/RHEL-52449 -Resolves: https://bugzilla.redhat.com/2302245 -Fixes: a176d67cdfaf5b8237a7e3a80d8be0e6bdf2d8fd -Signed-off-by: Martin Kletzander -Reviewed-by: Laine Stump ---- - src/util/virarptable.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/util/virarptable.c b/src/util/virarptable.c -index 45ee76766f..20d11f97b0 100644 ---- a/src/util/virarptable.c -+++ b/src/util/virarptable.c -@@ -83,6 +83,9 @@ virArpTableGet(void) - struct ndmsg *r = NLMSG_DATA(nh); - void *addr; - -+ if (nh->nlmsg_type == NLMSG_DONE) -+ break; -+ - if (nh->nlmsg_len < NLMSG_SPACE(sizeof(*r))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("wrong nlmsg len")); -@@ -97,9 +100,6 @@ virArpTableGet(void) - (!(r->ndm_state == NUD_STALE || r->ndm_state == NUD_REACHABLE))) - continue; - -- if (nh->nlmsg_type == NLMSG_DONE) -- return table; -- - VIR_WARNINGS_NO_CAST_ALIGN - parse_rtattr(tb, NDA_MAX, NDA_RTA(r), NLMSG_PAYLOAD(nh, sizeof(*r))); - VIR_WARNINGS_RESET diff --git a/libvirt.spec b/libvirt.spec index f9293c2..d1eaddc 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -288,8 +288,8 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 10.6.0 -Release: 2%{?dist} +Version: 10.7.0 +Release: 1%{?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/ @@ -298,11 +298,6 @@ URL: https://libvirt.org/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz -# Fix `virsh domifaddr --source=arp` on kernel 6.10 (bz #2302245) -Patch0001: 0001-virarptable-Properly-calculate-rtattr-length.patch -Patch0002: 0002-virarptable-Fix-check-for-message-length.patch -Patch0003: 0003-virarptable-End-parsing-earlier-in-case-of-NLMSG_DON.patch - Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} @@ -2627,6 +2622,9 @@ exit 0 %changelog +* Mon Sep 02 2024 Cole Robinson - 10.7.0-1 +- Update to version 10.7.0 + * Tue Aug 27 2024 Cole Robinson - 10.6.0-2 - Fix `virsh domifaddr --source=arp` on kernel 6.10 (bz #2302245) - Add new systemtap-sdt-dtrace to build deps diff --git a/sources b/sources index fb44198..0681943 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvirt-10.6.0.tar.xz) = edec79e89669d5e9a46be35e0d6334a6ed3bbf32426679549bd998bde24cba52b0378843f41a3abb5d781ad53e2a6a54619a0bad3f168c11fb41736cc6af6568 +SHA512 (libvirt-10.7.0.tar.xz) = 726046635c5c867d4fa1eb10df9907935c8fec6b6a9475cb6dd9af1285e66dfa5cbb7fc4190123bed22922597fa3ffabb04ce58394e1d81dcab9cf19ecfe491e From 985ee7390dca44994eb25840452270fcd101971a Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sep 24 2024 22:57:21 +0000 Subject: [PATCH 8/13] Fix build with latest libselinux https://gitlab.com/libvirt/libvirt/-/merge_requests/407 --- diff --git a/0001-tests-avoid-security_disable-deprecation-warning.patch b/0001-tests-avoid-security_disable-deprecation-warning.patch new file mode 100644 index 0000000..28db7d6 --- /dev/null +++ b/0001-tests-avoid-security_disable-deprecation-warning.patch @@ -0,0 +1,59 @@ +From f7539495bbfcc36bb25657c519eb0e27805d74e3 Mon Sep 17 00:00:00 2001 +From: Yaakov Selkowitz +Date: Mon, 16 Sep 2024 18:24:52 -0400 +Subject: [PATCH] tests: avoid security_disable() deprecation warning + +The ability to disable selinux at runtime has been removed from Linux 6.4, +and therefore the corresponding libselinux function is now deprecated: + +https://github.com/SELinuxProject/selinux/commit/463584cb0592018240db4385e07ee09254ab0a48 + +Signed-off-by: Yaakov Selkowitz +--- + tests/securityselinuxhelper.c | 10 ---------- + tests/viridentitytest.c | 8 +++++++- + 2 files changed, 7 insertions(+), 11 deletions(-) + +diff --git a/tests/securityselinuxhelper.c b/tests/securityselinuxhelper.c +index c32c90c17e..be6e3f0ed8 100644 +--- a/tests/securityselinuxhelper.c ++++ b/tests/securityselinuxhelper.c +@@ -209,16 +209,6 @@ int is_selinux_enabled(void) + return getenv("FAKE_SELINUX_DISABLED") == NULL; + } + +-int security_disable(void) +-{ +- if (!is_selinux_enabled()) { +- errno = ENOENT; +- return -1; +- } +- +- return g_setenv("FAKE_SELINUX_DISABLED", "1", TRUE) == TRUE ? 0 : -1; +-} +- + int security_getenforce(void) + { + if (!is_selinux_enabled()) { +diff --git a/tests/viridentitytest.c b/tests/viridentitytest.c +index 74e3a03619..bb9ace72c5 100644 +--- a/tests/viridentitytest.c ++++ b/tests/viridentitytest.c +@@ -134,7 +134,13 @@ static int testSetFakeSELinuxContext(const void *data G_GNUC_UNUSED) + static int testDisableFakeSELinux(const void *data G_GNUC_UNUSED) + { + #if WITH_SELINUX +- return security_disable(); ++ /* security_disable is deprecated */ ++ if (!is_selinux_enabled()) { ++ errno = ENOENT; ++ return -1; ++ } ++ ++ return g_setenv("FAKE_SELINUX_DISABLED", "1", TRUE) == TRUE ? 0 : -1; + #else + VIR_DEBUG("libvirt not compiled with SELinux, skipping this test"); + return EXIT_AM_SKIP; +-- +2.46.1 + diff --git a/libvirt.spec b/libvirt.spec index d1eaddc..7a62e7e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -298,6 +298,8 @@ URL: https://libvirt.org/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz +Patch: 0001-tests-avoid-security_disable-deprecation-warning.patch + Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} From e184d967ac3dceebd393582624df70fb65743d72 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Oct 01 2024 15:05:14 +0000 Subject: [PATCH 9/13] libvirt-10.8.0-1 Update to version 10.8.0 --- diff --git a/libvirt.spec b/libvirt.spec index 7a62e7e..11798b5 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -6,7 +6,7 @@ %define min_rhel 8 %define min_fedora 37 -%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x +%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x riscv64 %if 0%{?rhel} %if 0%{?rhel} > 8 %define arches_qemu_kvm x86_64 aarch64 s390x @@ -288,7 +288,7 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 10.7.0 +Version: 10.8.0 Release: 1%{?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/ @@ -298,7 +298,7 @@ URL: https://libvirt.org/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz -Patch: 0001-tests-avoid-security_disable-deprecation-warning.patch +Patch0001: 0001-tests-avoid-security_disable-deprecation-warning.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -363,7 +363,7 @@ BuildRequires: libblkid-devel >= 2.17 BuildRequires: augeas BuildRequires: systemd-devel >= 185 BuildRequires: libpciaccess-devel >= 0.10.9 -BuildRequires: yajl-devel +BuildRequires: json-c-devel %if %{with_sanlock} BuildRequires: sanlock-devel >= 2.4 %endif @@ -431,8 +431,6 @@ BuildRequires: systemtap-sdt-devel BuildRequires: /usr/bin/dtrace # For mount/umount in FS driver BuildRequires: util-linux -# For showmount in FS driver (netfs discovery) -BuildRequires: nfs-utils %if %{with_numad} BuildRequires: numad %endif @@ -671,7 +669,7 @@ an implementation of the secret key APIs. Summary: Storage driver plugin including base backends for the libvirtd daemon Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} -Requires: nfs-utils +Recommends: nfs-utils # For mkfs Requires: util-linux # For storage wiping with different algorithms @@ -1371,7 +1369,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dapparmor_profiles=disabled \ -Dsecdriver_apparmor=disabled \ -Dudev=enabled \ - -Dyajl=enabled \ + -Djson_c=enabled \ %{?arg_sanlock} \ -Dlibpcap=enabled \ %{?arg_nbdkit} \ @@ -1443,6 +1441,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dfuse=disabled \ -Dglusterfs=disabled \ -Dhost_validate=disabled \ + -Djson_c=disabled \ -Dlibiscsi=disabled \ -Dnbdkit=disabled \ -Dnbdkit_config_default=disabled \ @@ -1485,7 +1484,6 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dtests=disabled \ -Dudev=disabled \ -Dwireshark_dissector=disabled \ - -Dyajl=disabled \ %{?enable_werror} %mingw_ninja %endif @@ -2624,6 +2622,9 @@ exit 0 %changelog +* Tue Oct 01 2024 Cole Robinson - 10.8.0-1 +- Update to version 10.8.0 + * Mon Sep 02 2024 Cole Robinson - 10.7.0-1 - Update to version 10.7.0 diff --git a/sources b/sources index 0681943..77a3599 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvirt-10.7.0.tar.xz) = 726046635c5c867d4fa1eb10df9907935c8fec6b6a9475cb6dd9af1285e66dfa5cbb7fc4190123bed22922597fa3ffabb04ce58394e1d81dcab9cf19ecfe491e +SHA512 (libvirt-10.8.0.tar.xz) = 4979565015d69d078e532944d1d1cdfbb28e2d5625168a80f7b56a323949cf6072c4b8cfb96b92dbae263ee166d1c514651455389f33c90d04cc615865009eee From 60a70c925ab650c87c56cdd507e52eb6f4b435a8 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrangé Date: Nov 01 2024 11:14:26 +0000 Subject: [PATCH 10/13] Update to 10.9.0 release Signed-off-by: Daniel P. Berrangé --- diff --git a/libvirt.spec b/libvirt.spec index 11798b5..05403e3 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -19,7 +19,7 @@ %define arches_x86 %{ix86} x86_64 %define arches_systemtap_64bit %{arches_64bit} -%define arches_dmidecode %{arches_x86} +%define arches_dmidecode %{arches_x86} aarch64 riscv64 %define arches_xen %{arches_x86} aarch64 %if 0%{?fedora} %define arches_xen x86_64 aarch64 @@ -288,7 +288,7 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 10.8.0 +Version: 10.9.0 Release: 1%{?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/ @@ -298,8 +298,6 @@ URL: https://libvirt.org/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz -Patch0001: 0001-tests-avoid-security_disable-deprecation-warning.patch - Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} Requires: libvirt-daemon-config-nwfilter = %{version}-%{release} @@ -995,7 +993,6 @@ Requires: libvirt-daemon-driver-libxl = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} Requires: xen @@ -2620,8 +2617,10 @@ exit 0 %{mingw64_mandir}/man7/virkey*.7* %endif - %changelog +* Fri Nov 1 2024 Daniel P. Berrangé - 10.9.0-1 +- Update to version 10.9.0 + * Tue Oct 01 2024 Cole Robinson - 10.8.0-1 - Update to version 10.8.0 diff --git a/sources b/sources index 77a3599..3d8cbfa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvirt-10.8.0.tar.xz) = 4979565015d69d078e532944d1d1cdfbb28e2d5625168a80f7b56a323949cf6072c4b8cfb96b92dbae263ee166d1c514651455389f33c90d04cc615865009eee +SHA512 (libvirt-10.9.0.tar.xz) = e650ffaaa2a3cda9151a347759d6f248c4573ca4f04fc7faa3caf6a616f84b95b7da9fc62ac48b97b54a128eacf54debc44189e7387f161b8ed676d30c5de37d From b94faf01a5603dbafe574f92b94fa7cce0fc85a7 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Dec 02 2024 17:54:15 +0000 Subject: [PATCH 11/13] libvirt-10.10.0-1 Update to version 10.10.0 --- diff --git a/0001-tests-avoid-security_disable-deprecation-warning.patch b/0001-tests-avoid-security_disable-deprecation-warning.patch deleted file mode 100644 index 28db7d6..0000000 --- a/0001-tests-avoid-security_disable-deprecation-warning.patch +++ /dev/null @@ -1,59 +0,0 @@ -From f7539495bbfcc36bb25657c519eb0e27805d74e3 Mon Sep 17 00:00:00 2001 -From: Yaakov Selkowitz -Date: Mon, 16 Sep 2024 18:24:52 -0400 -Subject: [PATCH] tests: avoid security_disable() deprecation warning - -The ability to disable selinux at runtime has been removed from Linux 6.4, -and therefore the corresponding libselinux function is now deprecated: - -https://github.com/SELinuxProject/selinux/commit/463584cb0592018240db4385e07ee09254ab0a48 - -Signed-off-by: Yaakov Selkowitz ---- - tests/securityselinuxhelper.c | 10 ---------- - tests/viridentitytest.c | 8 +++++++- - 2 files changed, 7 insertions(+), 11 deletions(-) - -diff --git a/tests/securityselinuxhelper.c b/tests/securityselinuxhelper.c -index c32c90c17e..be6e3f0ed8 100644 ---- a/tests/securityselinuxhelper.c -+++ b/tests/securityselinuxhelper.c -@@ -209,16 +209,6 @@ int is_selinux_enabled(void) - return getenv("FAKE_SELINUX_DISABLED") == NULL; - } - --int security_disable(void) --{ -- if (!is_selinux_enabled()) { -- errno = ENOENT; -- return -1; -- } -- -- return g_setenv("FAKE_SELINUX_DISABLED", "1", TRUE) == TRUE ? 0 : -1; --} -- - int security_getenforce(void) - { - if (!is_selinux_enabled()) { -diff --git a/tests/viridentitytest.c b/tests/viridentitytest.c -index 74e3a03619..bb9ace72c5 100644 ---- a/tests/viridentitytest.c -+++ b/tests/viridentitytest.c -@@ -134,7 +134,13 @@ static int testSetFakeSELinuxContext(const void *data G_GNUC_UNUSED) - static int testDisableFakeSELinux(const void *data G_GNUC_UNUSED) - { - #if WITH_SELINUX -- return security_disable(); -+ /* security_disable is deprecated */ -+ if (!is_selinux_enabled()) { -+ errno = ENOENT; -+ return -1; -+ } -+ -+ return g_setenv("FAKE_SELINUX_DISABLED", "1", TRUE) == TRUE ? 0 : -1; - #else - VIR_DEBUG("libvirt not compiled with SELinux, skipping this test"); - return EXIT_AM_SKIP; --- -2.46.1 - diff --git a/libvirt.spec b/libvirt.spec index 05403e3..f108bdd 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -288,7 +288,7 @@ Summary: Library providing a simple virtualization API Name: libvirt -Version: 10.9.0 +Version: 10.10.0 Release: 1%{?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/ @@ -2038,7 +2038,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %dir %{_datadir}/libvirt/ %ghost %dir %{_rundir}/libvirt/ -%ghost %dir %{_rundir}/libvirt/common/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/common/ %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/ @@ -2124,7 +2124,7 @@ exit 0 %{_unitdir}/virtinterfaced-ro.socket %{_unitdir}/virtinterfaced-admin.socket %attr(0755, root, root) %{_sbindir}/virtinterfaced -%ghost %dir %{_rundir}/libvirt/interface/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/interface/ %{_libdir}/libvirt/connection-driver/libvirt_driver_interface.so %{_mandir}/man8/virtinterfaced.8* @@ -2166,7 +2166,7 @@ exit 0 %{_unitdir}/virtnodedevd-ro.socket %{_unitdir}/virtnodedevd-admin.socket %attr(0755, root, root) %{_sbindir}/virtnodedevd -%ghost %dir %{_rundir}/libvirt/nodedev/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/nodedev/ %{_libdir}/libvirt/connection-driver/libvirt_driver_nodedev.so %{_mandir}/man8/virtnodedevd.8* @@ -2181,8 +2181,8 @@ exit 0 %attr(0755, root, root) %{_sbindir}/virtnwfilterd %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ %ghost %dir %{_rundir}/libvirt/network/ -%ghost %dir %{_rundir}/libvirt/nwfilter-binding/ -%ghost %dir %{_rundir}/libvirt/nwfilter/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/nwfilter-binding/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/nwfilter/ %{_libdir}/libvirt/connection-driver/libvirt_driver_nwfilter.so %{_mandir}/man8/virtnwfilterd.8* @@ -2196,7 +2196,7 @@ exit 0 %{_unitdir}/virtsecretd-admin.socket %attr(0755, root, root) %{_sbindir}/virtsecretd %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/secrets/ -%ghost %dir %{_rundir}/libvirt/secrets/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/secrets/ %{_libdir}/libvirt/connection-driver/libvirt_driver_secret.so %{_mandir}/man8/virtsecretd.8* @@ -2275,11 +2275,11 @@ exit 0 %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf %config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu -%ghost %dir %{_rundir}/libvirt/qemu/ -%ghost %dir %{_rundir}/libvirt/qemu/dbus/ -%ghost %dir %{_rundir}/libvirt/qemu/passt/ -%ghost %dir %{_rundir}/libvirt/qemu/slirp/ -%ghost %dir %{_rundir}/libvirt/qemu/swtpm/ +%ghost %dir %attr(0755, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/ +%ghost %dir %attr(0770, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/dbus/ +%ghost %dir %attr(0755, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/passt/ +%ghost %dir %attr(0755, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/slirp/ +%ghost %dir %attr(0770, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/swtpm/ %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/ %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/checkpoint/ %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/dump/ @@ -2617,7 +2617,11 @@ exit 0 %{mingw64_mandir}/man7/virkey*.7* %endif + %changelog +* Mon Dec 02 2024 Cole Robinson - 10.10.0-1 +- Update to version 10.10.0 + * Fri Nov 1 2024 Daniel P. Berrangé - 10.9.0-1 - Update to version 10.9.0 diff --git a/sources b/sources index 3d8cbfa..e4a3342 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvirt-10.9.0.tar.xz) = e650ffaaa2a3cda9151a347759d6f248c4573ca4f04fc7faa3caf6a616f84b95b7da9fc62ac48b97b54a128eacf54debc44189e7387f161b8ed676d30c5de37d +SHA512 (libvirt-10.10.0.tar.xz) = b4e8a5f7d5c15387e5f3e82ac9661feb6e89c6b3b13d869bca63d9686e1e1e8d193a1fc84a19a09b3da1c868837ee76d1b3964a6e5f7ad5d669449b0a6aa4b53 From a27f4784518d476b4ae8f49e155df96287895f80 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrangé Date: Dec 17 2024 11:17:43 +0000 Subject: [PATCH 12/13] Various dir ownership fixes Signed-off-by: Daniel P. Berrangé --- diff --git a/libvirt.spec b/libvirt.spec index f108bdd..429a69e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -2027,7 +2027,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd +%dir %{_datadir}/augeas/lenses %{_datadir}/augeas/lenses/libvirtd.aug +%dir %{_datadir}/augeas/lenses/tests %{_datadir}/augeas/lenses/tests/test_libvirtd.aug %attr(0755, root, root) %{_sbindir}/libvirtd %{_mandir}/man8/libvirtd.8* @@ -2433,15 +2435,17 @@ exit 0 %{_libdir}/libvirt-lxc.so.* %{_libdir}/libvirt-admin.so.* %dir %{_datadir}/libvirt/ +%{_datadir}/libvirt/test-screenshot.png %dir %{_datadir}/libvirt/schemas/ +%{_datadir}/libvirt/schemas/*.rng +%dir %{_datadir}/systemtap/tapset/ %{_datadir}/systemtap/tapset/libvirt_probes*.stp %{_datadir}/systemtap/tapset/libvirt_functions.stp %if %{with_qemu} %{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp %endif -%{_datadir}/libvirt/schemas/*.rng +%dir %{_datadir}/libvirt/cpu_map %{_datadir}/libvirt/cpu_map/*.xml -%{_datadir}/libvirt/test-screenshot.png %if %{with_wireshark} %files wireshark From cfa8e205c93942b79957afbb99a8cd8ab17724ff Mon Sep 17 00:00:00 2001 From: Roberto Campesato Date: Dec 20 2024 10:02:04 +0000 Subject: [PATCH 13/13] Merge remote-tracking branch 'upstream/rawhide' into libvirt-hyperscale-10.10.0 --- diff --git a/0001-interface-fix-udev-reference-leak-with-invalid-flags.patch b/0001-interface-fix-udev-reference-leak-with-invalid-flags.patch deleted file mode 100644 index cdc4a2b..0000000 --- a/0001-interface-fix-udev-reference-leak-with-invalid-flags.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 3499354e12a1c1832bf4030693a64e03ceb79d05 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Wed, 5 Jun 2024 11:16:21 +0100 -Subject: [PATCH] interface: fix udev reference leak with invalid flags -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The udevInterfaceGetXMLDesc method takes a reference on the udev -driver as its first action. If the virCheckFlags() condition -fails, however, this reference is never released. - -Reviewed-by: Peter Krempa -Signed-off-by: Daniel P. Berrangé ---- - src/interface/interface_backend_udev.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c -index fdf11a8318..e1a50389c9 100644 ---- a/src/interface/interface_backend_udev.c -+++ b/src/interface/interface_backend_udev.c -@@ -1027,12 +1027,14 @@ static char * - udevInterfaceGetXMLDesc(virInterfacePtr ifinfo, - unsigned int flags) - { -- struct udev *udev = udev_ref(driver->udev); -+ struct udev *udev = NULL; - g_autoptr(virInterfaceDef) ifacedef = NULL; - char *xmlstr = NULL; - - virCheckFlags(VIR_INTERFACE_XML_INACTIVE, NULL); - -+ udev = udev_ref(driver->udev); -+ - /* Recursively build up the interface XML based on the requested - * interface name - */ --- -2.45.1 - diff --git a/0001-rpc-avoid-leak-of-GSource-in-use-for-interrupting-ma.patch b/0001-rpc-avoid-leak-of-GSource-in-use-for-interrupting-ma.patch deleted file mode 100644 index afa729d..0000000 --- a/0001-rpc-avoid-leak-of-GSource-in-use-for-interrupting-ma.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 98f1cf88fa7e0f992d93f376418fbfb3996a9690 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Fri, 17 May 2024 14:55:24 +0100 -Subject: [PATCH] rpc: avoid leak of GSource in use for interrupting main loop -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We never release the reference on the GSource created for -interrupting the main loop, nor do we remove it from the -main context if our thread is woken up prior to the wakeup -callback firing. - -This can result in a leak of GSource objects, along with an -ever growing list of GSources attached to the main context, -which will gradually slow down execution of the loop, as -several operations are O(N) for the number of attached GSource -objects. - -Reviewed-by: Michal Privoznik -Signed-off-by: Daniel P. Berrangé ---- - src/rpc/virnetclient.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c -index 147b0d661a..6d424eb599 100644 ---- a/src/rpc/virnetclient.c -+++ b/src/rpc/virnetclient.c -@@ -1946,7 +1946,7 @@ static int virNetClientIO(virNetClient *client, - /* Check to see if another thread is dispatching */ - if (client->haveTheBuck) { - /* Force other thread to wakeup from poll */ -- GSource *wakeup = g_idle_source_new(); -+ g_autoptr(GSource) wakeup = g_idle_source_new(); - g_source_set_callback(wakeup, virNetClientIOWakeup, client->eventLoop, NULL); - g_source_attach(wakeup, client->eventCtx); - -@@ -1968,6 +1968,7 @@ static int virNetClientIO(virNetClient *client, - return -1; - } - -+ g_source_destroy(wakeup); - VIR_DEBUG("Woken up from sleep head=%p call=%p", - client->waitDispatch, thiscall); - /* Three reasons we can be woken up --- -2.45.1 - diff --git a/libvirt.spec b/libvirt.spec index 07c1ddf..d7b8824 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -6,7 +6,7 @@ %define min_rhel 8 %define min_fedora 37 -%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x +%define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s390x riscv64 %if 0%{?rhel} %if 0%{?rhel} > 8 %define arches_qemu_kvm x86_64 aarch64 s390x @@ -19,7 +19,7 @@ %define arches_x86 %{ix86} x86_64 %define arches_systemtap_64bit %{arches_64bit} -%define arches_dmidecode %{arches_x86} +%define arches_dmidecode %{arches_x86} aarch64 riscv64 %define arches_xen %{arches_x86} aarch64 %if 0%{?fedora} %define arches_xen x86_64 aarch64 @@ -285,14 +285,14 @@ %{nil} # To prevent rpmdev-bumpspec breakage -%global baserelease 2 +%global baserelease 1 # Hyperscale release %global hsrel .1 Summary: Library providing a simple virtualization API Name: libvirt -Version: 10.4.0 +Version: 10.10.0 Release: %{baserelease}%{?hsrel}%{?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/ @@ -301,8 +301,6 @@ URL: https://libvirt.org/ %define mainturl stable_updates/ %endif Source: https://download.libvirt.org/%{?mainturl}libvirt-%{version}.tar.xz -Patch2: 0001-rpc-avoid-leak-of-GSource-in-use-for-interrupting-ma.patch -Patch3: 0001-interface-fix-udev-reference-leak-with-invalid-flags.patch Requires: libvirt-daemon = %{version}-%{release} Requires: libvirt-daemon-config-network = %{version}-%{release} @@ -367,7 +365,7 @@ BuildRequires: libblkid-devel >= 2.17 BuildRequires: augeas BuildRequires: systemd-devel >= 185 BuildRequires: libpciaccess-devel >= 0.10.9 -BuildRequires: yajl-devel +BuildRequires: json-c-devel %if %{with_sanlock} BuildRequires: sanlock-devel >= 2.4 %endif @@ -431,12 +429,10 @@ BuildRequires: libcurl-devel BuildRequires: libwsman-devel >= 2.6.3 %endif BuildRequires: audit-libs-devel -# we need /usr/sbin/dtrace BuildRequires: systemtap-sdt-devel +BuildRequires: /usr/bin/dtrace # For mount/umount in FS driver BuildRequires: util-linux -# For showmount in FS driver (netfs discovery) -BuildRequires: nfs-utils %if %{with_numad} BuildRequires: numad %endif @@ -675,7 +671,7 @@ an implementation of the secret key APIs. Summary: Storage driver plugin including base backends for the libvirtd daemon Requires: libvirt-daemon-common = %{version}-%{release} Requires: libvirt-libs = %{version}-%{release} -Requires: nfs-utils +Recommends: nfs-utils # For mkfs Requires: util-linux # For storage wiping with different algorithms @@ -1011,7 +1007,6 @@ Requires: libvirt-daemon-driver-libxl = %{version}-%{release} Requires: libvirt-daemon-driver-interface = %{version}-%{release} Requires: libvirt-daemon-driver-network = %{version}-%{release} Requires: libvirt-daemon-driver-nodedev = %{version}-%{release} -Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release} Requires: libvirt-daemon-driver-secret = %{version}-%{release} Requires: libvirt-daemon-driver-storage = %{version}-%{release} Requires: xen @@ -1048,8 +1043,6 @@ capabilities of VirtualBox %package client Summary: Client side utilities of the libvirt library Requires: libvirt-libs = %{version}-%{release} -# Needed by virt-pki-validate script. -Requires: gnutls-utils # Ensure smooth upgrades Obsoletes: libvirt-bash-completion < 7.3.0 @@ -1071,8 +1064,6 @@ with some QEMU specific features of libvirt. %package libs Summary: Client side libraries -# So remote clients can access libvirt over SSH tunnel -Requires: cyrus-sasl # Needed by default sasl.conf - no onerous extra deps, since # 100's of other things on a system already pull in krb5-libs Requires: cyrus-sasl-gssapi @@ -1345,6 +1336,8 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) %meson \ -Drunstatedir=%{_rundir} \ -Dinitconfdir=%{_sysconfdir}/sysconfig \ + -Dunitdir=%{_unitdir} \ + -Dsysusersdir=%{_sysusersdir} \ %{?arg_qemu} \ %{?arg_openvz} \ %{?arg_lxc} \ @@ -1387,7 +1380,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dapparmor_profiles=disabled \ -Dsecdriver_apparmor=disabled \ -Dudev=enabled \ - -Dyajl=enabled \ + -Djson_c=enabled \ %{?arg_sanlock} \ -Dlibpcap=enabled \ %{?arg_nbdkit} \ @@ -1459,6 +1452,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dfuse=disabled \ -Dglusterfs=disabled \ -Dhost_validate=disabled \ + -Djson_c=disabled \ -Dlibiscsi=disabled \ -Dnbdkit=disabled \ -Dnbdkit_config_default=disabled \ @@ -1501,8 +1495,8 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dtests=disabled \ -Dudev=disabled \ -Dwireshark_dissector=disabled \ - -Dyajl=disabled - %mingw_ninja + %{?enable_werror} +%mingw_ninja %endif %install @@ -1608,7 +1602,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh %if %{with_native} # Building on slow archs, like emulated s390x in Fedora copr, requires # raising the test timeout -VIR_TEST_DEBUG=1 +export VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10 %endif @@ -2047,7 +2041,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf %config(noreplace) %{_prefix}/lib/sysctl.d/60-libvirtd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd +%dir %{_datadir}/augeas/lenses %{_datadir}/augeas/lenses/libvirtd.aug +%dir %{_datadir}/augeas/lenses/tests %{_datadir}/augeas/lenses/tests/test_libvirtd.aug %attr(0755, root, root) %{_sbindir}/libvirtd %{_mandir}/man8/libvirtd.8* @@ -2058,7 +2054,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf %dir %{_datadir}/libvirt/ %ghost %dir %{_rundir}/libvirt/ -%ghost %dir %{_rundir}/libvirt/common/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/common/ %dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/ %dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/filesystems/ @@ -2144,7 +2140,7 @@ exit 0 %{_unitdir}/virtinterfaced-ro.socket %{_unitdir}/virtinterfaced-admin.socket %attr(0755, root, root) %{_sbindir}/virtinterfaced -%ghost %dir %{_rundir}/libvirt/interface/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/interface/ %{_libdir}/libvirt/connection-driver/libvirt_driver_interface.so %{_mandir}/man8/virtinterfaced.8* @@ -2186,7 +2182,7 @@ exit 0 %{_unitdir}/virtnodedevd-ro.socket %{_unitdir}/virtnodedevd-admin.socket %attr(0755, root, root) %{_sbindir}/virtnodedevd -%ghost %dir %{_rundir}/libvirt/nodedev/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/nodedev/ %{_libdir}/libvirt/connection-driver/libvirt_driver_nodedev.so %{_mandir}/man8/virtnodedevd.8* @@ -2201,8 +2197,8 @@ exit 0 %attr(0755, root, root) %{_sbindir}/virtnwfilterd %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/ %ghost %dir %{_rundir}/libvirt/network/ -%ghost %dir %{_rundir}/libvirt/nwfilter-binding/ -%ghost %dir %{_rundir}/libvirt/nwfilter/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/nwfilter-binding/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/nwfilter/ %{_libdir}/libvirt/connection-driver/libvirt_driver_nwfilter.so %{_mandir}/man8/virtnwfilterd.8* @@ -2216,7 +2212,7 @@ exit 0 %{_unitdir}/virtsecretd-admin.socket %attr(0755, root, root) %{_sbindir}/virtsecretd %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/secrets/ -%ghost %dir %{_rundir}/libvirt/secrets/ +%ghost %dir %attr(0700, root, root) %{_rundir}/libvirt/secrets/ %{_libdir}/libvirt/connection-driver/libvirt_driver_secret.so %{_mandir}/man8/virtsecretd.8* @@ -2295,11 +2291,11 @@ exit 0 %config(noreplace) %{_sysconfdir}/libvirt/qemu.conf %config(noreplace) %{_sysconfdir}/libvirt/qemu-lockd.conf %config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu -%ghost %dir %{_rundir}/libvirt/qemu/ -%ghost %dir %{_rundir}/libvirt/qemu/dbus/ -%ghost %dir %{_rundir}/libvirt/qemu/passt/ -%ghost %dir %{_rundir}/libvirt/qemu/slirp/ -%ghost %dir %{_rundir}/libvirt/qemu/swtpm/ +%ghost %dir %attr(0755, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/ +%ghost %dir %attr(0770, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/dbus/ +%ghost %dir %attr(0755, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/passt/ +%ghost %dir %attr(0755, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/slirp/ +%ghost %dir %attr(0770, %{qemu_user}, %{qemu_group}) %{_rundir}/libvirt/qemu/swtpm/ %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/ %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/checkpoint/ %dir %attr(0751, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/dump/ @@ -2453,15 +2449,17 @@ exit 0 %{_libdir}/libvirt-lxc.so.* %{_libdir}/libvirt-admin.so.* %dir %{_datadir}/libvirt/ +%{_datadir}/libvirt/test-screenshot.png %dir %{_datadir}/libvirt/schemas/ +%{_datadir}/libvirt/schemas/*.rng +%dir %{_datadir}/systemtap/tapset/ %{_datadir}/systemtap/tapset/libvirt_probes*.stp %{_datadir}/systemtap/tapset/libvirt_functions.stp %if %{with_qemu} %{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp %endif -%{_datadir}/libvirt/schemas/*.rng +%dir %{_datadir}/libvirt/cpu_map %{_datadir}/libvirt/cpu_map/*.xml -%{_datadir}/libvirt/test-screenshot.png %if %{with_wireshark} %files wireshark @@ -2529,7 +2527,7 @@ exit 0 %{mingw32_bindir}/virt-admin.exe %{mingw32_bindir}/virt-xml-validate %{mingw32_bindir}/virt-pki-query-dn.exe -%{mingw32_bindir}/virt-pki-validate +%{mingw32_bindir}/virt-pki-validate.exe %{mingw32_bindir}/libvirt-lxc-0.dll %{mingw32_bindir}/libvirt-qemu-0.dll %{mingw32_bindir}/libvirt-admin-0.dll @@ -2588,7 +2586,7 @@ exit 0 %{mingw64_bindir}/virt-admin.exe %{mingw64_bindir}/virt-xml-validate %{mingw64_bindir}/virt-pki-query-dn.exe -%{mingw64_bindir}/virt-pki-validate +%{mingw64_bindir}/virt-pki-validate.exe %{mingw64_bindir}/libvirt-lxc-0.dll %{mingw64_bindir}/libvirt-qemu-0.dll %{mingw64_bindir}/libvirt-admin-0.dll @@ -2639,6 +2637,37 @@ exit 0 %changelog +* Fri Dec 20 2024 Roberto Campesato - 10.10.0-1.1 +- Merge latest changes from Fedora + +* Mon Dec 02 2024 Cole Robinson - 10.10.0-1 +- Update to version 10.10.0 + +* Fri Nov 1 2024 Daniel P. Berrangé - 10.9.0-1 +- Update to version 10.9.0 + +* Tue Oct 01 2024 Cole Robinson - 10.8.0-1 +- Update to version 10.8.0 + +* Mon Sep 02 2024 Cole Robinson - 10.7.0-1 +- Update to version 10.7.0 + +* Tue Aug 27 2024 Cole Robinson - 10.6.0-2 +- Fix `virsh domifaddr --source=arp` on kernel 6.10 (bz #2302245) +- Add new systemtap-sdt-dtrace to build deps + +* Tue Aug 06 2024 Cole Robinson - 10.6.0-1 +- Update to version 10.6.0 + +* Mon Aug 05 2024 Richard W.M. Jones - 10.5.0-3 +- Rebuild for Xen 4.19.0 + +* Thu Jul 18 2024 Fedora Release Engineering - 10.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jul 4 2024 Daniel P. Berrangé - 10.5.0-1 +- Rebase to 10.5.0 release + * Wed Jun 14 2024 Roberto Campesato - 10.4.0-2.1 - Update to version 10.4.0 - Relax dependency on swtpm-tools for facebook builds diff --git a/sources b/sources index f84031b..e4a3342 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvirt-10.4.0.tar.xz) = 711be39f3fb831a5073b25a5b02410676147114f3dcf85b24c8505b611a81bf64cf3b95f66908e0dc3a2f3e66e5fc31b2d95db610ea3f1b747a9fd1f52b1ffa7 +SHA512 (libvirt-10.10.0.tar.xz) = b4e8a5f7d5c15387e5f3e82ac9661feb6e89c6b3b13d869bca63d9686e1e1e8d193a1fc84a19a09b3da1c868837ee76d1b3964a6e5f7ad5d669449b0a6aa4b53