Update to latest git snapshot
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
		
							parent
							
								
									e9c7bde766
								
							
						
					
					
						commit
						517fec3f1e
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1 +1,2 @@ | |||||||
| /virt-manager-*.tar.gz | /virt-manager-*.tar.gz | ||||||
|  | /virt-manager-20220220-git363fca41.tar.xz | ||||||
|  | |||||||
| @ -1,44 +0,0 @@ | |||||||
| From 4d0e323227f18e58283c45be4d240b506faacb22 Mon Sep 17 00:00:00 2001 |  | ||||||
| Message-Id: <4d0e323227f18e58283c45be4d240b506faacb22.1610390294.git.crobinso@redhat.com> |  | ||||||
| From: Martin Pitt <martin@piware.de> |  | ||||||
| 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 <crobinso@redhat.com> |  | ||||||
| ---
 |  | ||||||
|  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 |  | ||||||
| 
 |  | ||||||
							
								
								
									
										2
									
								
								sources
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								sources
									
									
									
									
									
								
							| @ -1 +1 @@ | |||||||
| SHA512 (virt-manager-3.2.0.tar.gz) = 90cd98fe6b269007cd30f628490c65df440abe39b4925c65dc80667e7d80d059752695353ccf6ac3e2436206da311bc402eda50df31874d82ef8fe115966e1ec | SHA512 (virt-manager-20220220-git363fca41.tar.xz) = 76ff1aa8217dd36cf2284ef62905fbe8d85090afcc60fc45ead98535ad6d97adb07aacae20b8ff32a39c1d7136b7d215c1c17b6d6e678fc00152b901e21ea719 | ||||||
|  | |||||||
| @ -8,22 +8,20 @@ | |||||||
| 
 | 
 | ||||||
| Name: virt-manager | Name: virt-manager | ||||||
| Version: 3.2.0 | Version: 3.2.0 | ||||||
| Release: 5%{?dist} | Release: 6%{?dist} | ||||||
| %global verrel %{version}-%{release} | %global verrel %{version}-%{release} | ||||||
| 
 | 
 | ||||||
| Summary: Desktop tool for managing virtual machines via libvirt | Summary: Desktop tool for managing virtual machines via libvirt | ||||||
| License: GPLv2+ | License: GPLv2+ | ||||||
| BuildArch: noarch | BuildArch: noarch | ||||||
| URL: https://virt-manager.org/ | URL: https://virt-manager.org/ | ||||||
| Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz | Source0: virt-manager-20220220-git363fca41.tar.xz | ||||||
| 
 | %dnl 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 |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| Requires: virt-manager-common = %{verrel} | Requires: virt-manager-common = %{verrel} | ||||||
| Requires: python3-gobject | Requires: python3-gobject >= 3.31.3 | ||||||
| Requires: gtk3 | Requires: gtk3 >= 3.22.0 | ||||||
| Requires: libvirt-glib >= 0.0.9 | Requires: libvirt-glib >= 0.0.9 | ||||||
| Requires: gtk-vnc2 | Requires: gtk-vnc2 | ||||||
| Requires: spice-gtk3 | Requires: spice-gtk3 | ||||||
| @ -55,6 +53,7 @@ Suggests: python3-libguestfs | |||||||
| BuildRequires: gettext | BuildRequires: gettext | ||||||
| BuildRequires: python3-devel | BuildRequires: python3-devel | ||||||
| BuildRequires: python3-docutils | BuildRequires: python3-docutils | ||||||
|  | BuildRequires: python3-setuptools | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %description | %description | ||||||
| @ -75,8 +74,8 @@ Requires: python3-requests | |||||||
| Requires: libosinfo >= 0.2.10 | Requires: libosinfo >= 0.2.10 | ||||||
| # Required for gobject-introspection infrastructure | # Required for gobject-introspection infrastructure | ||||||
| Requires: python3-gobject-base | Requires: python3-gobject-base | ||||||
| # Required for pulling files from iso media with isoinfo | # Required for pulling files from iso media | ||||||
| Requires: genisoimage | Requires: xorriso | ||||||
| 
 | 
 | ||||||
| %description common | %description common | ||||||
| Common files used by the different virt-manager interfaces, as well as | Common files used by the different virt-manager interfaces, as well as | ||||||
| @ -101,7 +100,7 @@ machine). | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %prep | %prep | ||||||
| %setup -q | %autosetup -p1 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
| @ -121,19 +120,12 @@ machine). | |||||||
| 
 | 
 | ||||||
| %if 0%{?py_byte_compile:1} | %if 0%{?py_byte_compile:1} | ||||||
| # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#manual-bytecompilation | # 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 | %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 | %files | ||||||
| %doc README.md COPYING NEWS.md |  | ||||||
| %{_bindir}/%{name} | %{_bindir}/%{name} | ||||||
| 
 | 
 | ||||||
| %{_mandir}/man1/%{name}.1* | %{_mandir}/man1/%{name}.1* | ||||||
| @ -150,8 +142,10 @@ done | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %files common -f %{name}.lang | %files common -f %{name}.lang | ||||||
| %dir %{_datadir}/%{name} | %license COPYING | ||||||
|  | %doc README.md NEWS.md | ||||||
| 
 | 
 | ||||||
|  | %dir %{_datadir}/%{name} | ||||||
| %{_datadir}/%{name}/virtinst | %{_datadir}/%{name}/virtinst | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -170,6 +164,9 @@ done | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Sun Feb 20 2022 Cole Robinson <crobinso@redhat.com> - 3.2.0-6 | ||||||
|  | - Update to latest git snapshot | ||||||
|  | 
 | ||||||
| * Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-5 | * Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-5 | ||||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild | - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user