diff --git a/.gitignore b/.gitignore index a490e7c..1951f27 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /virt-manager-*.tar.gz +/virt-manager-20220220-git363fca41.tar.xz diff --git a/0001-virtinst-Fix-TOCTOU-in-domain-enumeration.patch b/0001-virtinst-Fix-TOCTOU-in-domain-enumeration.patch deleted file mode 100644 index f747754..0000000 --- a/0001-virtinst-Fix-TOCTOU-in-domain-enumeration.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 4d0e323227f18e58283c45be4d240b506faacb22 Mon Sep 17 00:00:00 2001 -Message-Id: <4d0e323227f18e58283c45be4d240b506faacb22.1610390294.git.crobinso@redhat.com> -From: Martin Pitt -Date: Tue, 24 Nov 2020 14:24:06 +0100 -Subject: [PATCH virt-manager] virtinst: Fix TOCTOU in domain enumeration - -Similar to commit 49a01b5482, _fetch_all_domains_raw() has a race -condition where a domain may disappear (from parallel libvirt -operations) in between enumerating and inspecting the objects. - -Ignore these missing domains instead of crashing. - -https://bugzilla.redhat.com/show_bug.cgi?id=1901081 -Signed-off-by: Cole Robinson ---- - virtinst/connection.py | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/virtinst/connection.py b/virtinst/connection.py -index fec273b7..06bc60ad 100644 ---- a/virtinst/connection.py -+++ b/virtinst/connection.py -@@ -182,8 +182,16 @@ class VirtinstConnection(object): - def _fetch_all_domains_raw(self): - dummy1, dummy2, ret = pollhelpers.fetch_vms( - self, {}, lambda obj, ignore: obj) -- return [Guest(weakref.proxy(self), parsexml=obj.XMLDesc(0)) -- for obj in ret] -+ domains = [] -+ for obj in ret: -+ # TOCTOU race: a domain may go away in between enumeration and inspection -+ try: -+ xml = obj.XMLDesc(0) -+ except libvirt.libvirtError as e: # pragma: no cover -+ log.debug("Fetching domain XML failed: %s", e) -+ continue -+ domains.append(Guest(weakref.proxy(self), parsexml=xml)) -+ return domains - - def _build_pool_raw(self, poolobj): - return StoragePool(weakref.proxy(self), --- -2.29.2 - diff --git a/sources b/sources index 8121dcb..e8afc8c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (virt-manager-3.2.0.tar.gz) = 90cd98fe6b269007cd30f628490c65df440abe39b4925c65dc80667e7d80d059752695353ccf6ac3e2436206da311bc402eda50df31874d82ef8fe115966e1ec +SHA512 (virt-manager-20220220-git363fca41.tar.xz) = 76ff1aa8217dd36cf2284ef62905fbe8d85090afcc60fc45ead98535ad6d97adb07aacae20b8ff32a39c1d7136b7d215c1c17b6d6e678fc00152b901e21ea719 diff --git a/virt-manager.spec b/virt-manager.spec index 495f0e2..fddc3df 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -8,22 +8,20 @@ Name: virt-manager Version: 3.2.0 -Release: 5%{?dist} +Release: 6%{?dist} %global verrel %{version}-%{release} Summary: Desktop tool for managing virtual machines via libvirt License: GPLv2+ BuildArch: noarch URL: https://virt-manager.org/ -Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz - -# Fix 'domain not found' race (bz #1901081) -Patch0001: 0001-virtinst-Fix-TOCTOU-in-domain-enumeration.patch +Source0: virt-manager-20220220-git363fca41.tar.xz +%dnl Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz Requires: virt-manager-common = %{verrel} -Requires: python3-gobject -Requires: gtk3 +Requires: python3-gobject >= 3.31.3 +Requires: gtk3 >= 3.22.0 Requires: libvirt-glib >= 0.0.9 Requires: gtk-vnc2 Requires: spice-gtk3 @@ -55,6 +53,7 @@ Suggests: python3-libguestfs BuildRequires: gettext BuildRequires: python3-devel BuildRequires: python3-docutils +BuildRequires: python3-setuptools %description @@ -75,8 +74,8 @@ Requires: python3-requests Requires: libosinfo >= 0.2.10 # Required for gobject-introspection infrastructure Requires: python3-gobject-base -# Required for pulling files from iso media with isoinfo -Requires: genisoimage +# Required for pulling files from iso media +Requires: xorriso %description common Common files used by the different virt-manager interfaces, as well as @@ -101,7 +100,7 @@ machine). %prep -%setup -q +%autosetup -p1 %build @@ -121,19 +120,12 @@ machine). %if 0%{?py_byte_compile:1} # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#manual-bytecompilation -%py_byte_compile %{python3} %{buildroot}%{_datadir}/virt-manager/ +%py_byte_compile %{__python3} %{buildroot}%{_datadir}/virt-manager/ %endif -# Replace '#!/usr/bin/env python3' with '#!/usr/bin/python3' -# The format is ideal for upstream, but not a distro. See: -# https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython -for f in $(find %{buildroot} -type f -executable -print); do - sed -i "1 s|^#!/usr/bin/env python3|#!%{__python3}|" $f || : -done %files -%doc README.md COPYING NEWS.md %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* @@ -150,8 +142,10 @@ done %files common -f %{name}.lang -%dir %{_datadir}/%{name} +%license COPYING +%doc README.md NEWS.md +%dir %{_datadir}/%{name} %{_datadir}/%{name}/virtinst @@ -170,6 +164,9 @@ done %changelog +* Sun Feb 20 2022 Cole Robinson - 3.2.0-6 +- Update to latest git snapshot + * Sat Jan 22 2022 Fedora Release Engineering - 3.2.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild