From d2df19d2f4692ebdd07e867360e4116a1a408d10 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Mon, 2 Dec 2024 21:34:38 +0100 Subject: [PATCH] virt-manager-5.0.0-1 Update to version 5.0.0 Signed-off-by: Pavel Hrdina --- .gitignore | 2 +- ...estyle-warnings-with-latest-versions.patch | 265 ------------------ ...tinst-add-properties-for-AMD-SEV-SNP.patch | 69 ----- sources | 2 +- virt-manager.spec | 47 ++-- 5 files changed, 21 insertions(+), 364 deletions(-) delete mode 100644 0001-Fix-pylint-pycodestyle-warnings-with-latest-versions.patch delete mode 100644 0001-virtinst-add-properties-for-AMD-SEV-SNP.patch diff --git a/.gitignore b/.gitignore index 1951f27..6893444 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /virt-manager-*.tar.gz -/virt-manager-20220220-git363fca41.tar.xz +/virt-manager-*.tar.xz diff --git a/0001-Fix-pylint-pycodestyle-warnings-with-latest-versions.patch b/0001-Fix-pylint-pycodestyle-warnings-with-latest-versions.patch deleted file mode 100644 index f153626..0000000 --- a/0001-Fix-pylint-pycodestyle-warnings-with-latest-versions.patch +++ /dev/null @@ -1,265 +0,0 @@ -From bb1afaba29019605a240a57d6b3ca8eb36341d9b Mon Sep 17 00:00:00 2001 -From: Cole Robinson -Date: Tue, 13 Dec 2022 10:51:14 -0500 -Subject: [PATCH] Fix pylint/pycodestyle warnings with latest versions - -Signed-off-by: Cole Robinson ---- - setup.py | 2 +- - tests/test_disk.py | 1 + - virtManager/addhardware.py | 6 +++--- - virtManager/details/sshtunnels.py | 2 +- - virtManager/lib/statsmanager.py | 2 +- - virtManager/object/domain.py | 4 ++-- - virtinst/cli.py | 8 ++++---- - virtinst/domcapabilities.py | 2 +- - virtinst/pollhelpers.py | 2 +- - virtinst/virtinstall.py | 20 ++++++++++---------- - virtinst/xmlbuilder.py | 6 +++--- - 11 files changed, 28 insertions(+), 27 deletions(-) - -diff --git a/setup.py b/setup.py -index b45d315a..4bf29f25 100755 ---- a/setup.py -+++ b/setup.py -@@ -29,7 +29,7 @@ import setuptools.command.install_egg_info - # - # Newer setuptools will transparently support 'import distutils' though. - # That can be overridden with SETUPTOOLS_USE_DISTUTILS env variable --import distutils.command.build # pylint: disable=wrong-import-order -+import distutils.command.build # pylint: disable=wrong-import-order,deprecated-module - - - SYSPREFIX = sysconfig.get_config_var("prefix") -diff --git a/tests/test_disk.py b/tests/test_disk.py -index ef065157..9127371b 100644 ---- a/tests/test_disk.py -+++ b/tests/test_disk.py -@@ -82,6 +82,7 @@ def test_disk_dir_searchable(monkeypatch): - searchdata = virtinst.DeviceDisk.check_path_search(conn, - tmpdir + "/footest") - assert searchdata.uid == os.getuid() -+ # pylint: disable=use-implicit-booleaness-not-comparison - assert searchdata.fixlist == [] - - # Remove perms on the tmpdir, now it should report failures -diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py -index 0a8e33d3..aec48dd2 100644 ---- a/virtManager/addhardware.py -+++ b/virtManager/addhardware.py -@@ -371,8 +371,8 @@ class vmmAddHardware(vmmGObjectUI): - - msg = _("These changes will take effect after " - "the next guest shutdown.") -- dtype = (hotplug_err and -- Gtk.MessageType.WARNING or Gtk.MessageType.INFO) -+ dtype = (Gtk.MessageType.WARNING if hotplug_err else -+ Gtk.MessageType.INFO) - hotplug_msg = "" - if hotplug_err: - hotplug_msg += (hotplug_err[0] + "\n\n" + -@@ -1560,7 +1560,7 @@ class vmmAddHardware(vmmGObjectUI): - controller_num = [x for x in controllers if - (x.type == controller_type)] - if len(controller_num) > 0: -- index_new = max([x.index for x in controller_num]) + 1 -+ index_new = max(x.index for x in controller_num) + 1 - dev.index = index_new - - dev.type = controller_type -diff --git a/virtManager/details/sshtunnels.py b/virtManager/details/sshtunnels.py -index 9afc1e13..cb7ca7c0 100644 ---- a/virtManager/details/sshtunnels.py -+++ b/virtManager/details/sshtunnels.py -@@ -22,7 +22,7 @@ class ConnectionInfo(object): - """ - def __init__(self, conn, gdev): - self.gtype = gdev.type -- self.gport = gdev.port and str(gdev.port) or None -+ self.gport = str(gdev.port) if gdev.port else None - self.gsocket = (gdev.listens and gdev.listens[0].socket) or gdev.socket - self.gaddr = gdev.listen or "127.0.0.1" - self.gtlsport = gdev.tlsPort or None -diff --git a/virtManager/lib/statsmanager.py b/virtManager/lib/statsmanager.py -index 28495495..ece130ab 100644 ---- a/virtManager/lib/statsmanager.py -+++ b/virtManager/lib/statsmanager.py -@@ -66,7 +66,7 @@ class _VMStatsList(vmmGObject): - expected = self.config.get_stats_history_length() - current = len(self._stats) - if current > expected: # pragma: no cover -- del(self._stats[expected:current]) -+ del self._stats[expected:current] - - def _calculate_rate(record_name): - ret = 0.0 -diff --git a/virtManager/object/domain.py b/virtManager/object/domain.py -index 2d6f5bca..1570b952 100644 ---- a/virtManager/object/domain.py -+++ b/virtManager/object/domain.py -@@ -1306,10 +1306,10 @@ class vmmDomain(vmmLibvirtObject): - def get_arch(self): - return self.get_xmlobj().os.arch - def get_init(self): -- import pipes -+ import shlex - init = self.get_xmlobj().os.init - initargs = " ".join( -- [pipes.quote(i.val) for i in self.get_xmlobj().os.initargs]) -+ [shlex.quote(i.val) for i in self.get_xmlobj().os.initargs]) - return init, initargs - - def get_emulator(self): -diff --git a/virtinst/cli.py b/virtinst/cli.py -index 8dbffeb6..7615f743 100644 ---- a/virtinst/cli.py -+++ b/virtinst/cli.py -@@ -85,7 +85,7 @@ class VirtHelpFormatter(argparse.RawDescriptionHelpFormatter): - ''' - oldwrap = None - -- # pylint: disable=arguments-differ -+ # pylint: disable=arguments-differ,protected-access - def _split_lines(self, *args, **kwargs): - def return_default(): - return argparse.RawDescriptionHelpFormatter._split_lines( -@@ -1690,7 +1690,7 @@ def convert_old_force(options): - if options.force: - if not options.check: - options.check = "all=off" -- del(options.force) -+ del options.force - - - class ParserCheck(VirtCLIParser): -@@ -2281,7 +2281,7 @@ class ParserCPU(VirtCLIParser): - policy = "disable" - - if policy: -- del(self.optdict[key]) -+ del self.optdict[key] - converted[policy].append(key[1:]) - - self.optdict.update(converted) -@@ -2753,7 +2753,7 @@ class ParserBoot(VirtCLIParser): - if cliname not in inst.BOOT_DEVICES: - continue - -- del(self.optdict[cliname]) -+ del self.optdict[cliname] - if cliname not in boot_order: - boot_order.append(cliname) - -diff --git a/virtinst/domcapabilities.py b/virtinst/domcapabilities.py -index d22ce6a2..1b5b6bf6 100644 ---- a/virtinst/domcapabilities.py -+++ b/virtinst/domcapabilities.py -@@ -334,7 +334,7 @@ class DomainCapabilities(XMLBuilder): - """ - Return True if we know how to setup UEFI for the passed arch - """ -- return self.arch in list(self._uefi_arch_patterns.keys()) -+ return self.arch in self._uefi_arch_patterns - - def supports_uefi_loader(self): - """ -diff --git a/virtinst/pollhelpers.py b/virtinst/pollhelpers.py -index ef695914..f9fcc3fa 100644 ---- a/virtinst/pollhelpers.py -+++ b/virtinst/pollhelpers.py -@@ -32,7 +32,7 @@ def _new_poll_helper(origmap, typename, list_cb, build_cb, support_cb): - else: - # Previously known object - current[name] = origmap[name] -- del(origmap[name]) -+ del origmap[name] - - return (list(origmap.values()), list(new.values()), list(current.values())) - -diff --git a/virtinst/virtinstall.py b/virtinst/virtinstall.py -index 8fcc8ce1..130c8e28 100644 ---- a/virtinst/virtinstall.py -+++ b/virtinst/virtinstall.py -@@ -67,7 +67,7 @@ def check_cdrom_option_error(options): - def convert_old_printxml(options): - if options.xmlstep: - options.xmlonly = options.xmlstep -- del(options.xmlstep) -+ del options.xmlstep - - - def convert_old_sound(options): -@@ -135,10 +135,10 @@ def convert_old_disks(options): - else: - _do_convert_old_disks(options) - -- del(options.file_paths) -- del(options.disksize) -- del(options.sparse) -- del(options.nodisks) -+ del options.file_paths -+ del options.disksize -+ del options.sparse -+ del options.nodisks - log.debug("Distilled --disk options: %s", options.disk) - - -@@ -147,7 +147,7 @@ def convert_old_os_options(options): - return - log.warning( - _("--os-type is deprecated and does nothing. Please stop using it.")) -- del(options.old_os_type) -+ del options.old_os_type - - - def convert_old_memory(options): -@@ -204,9 +204,9 @@ def convert_old_networks(options): - networks[idx] = networks[idx].replace(prefix + ":", - prefix + "=") - -- del(options.mac) -- del(options.bridge) -- del(options.nonetworks) -+ del options.mac -+ del options.bridge -+ del options.nonetworks - - options.network = networks - log.debug("Distilled --network options: %s", options.network) -@@ -224,7 +224,7 @@ def convert_old_graphics(options): - if graphics and (vnc or sdl or keymap or vncport or vnclisten): - fail(_("Cannot mix --graphics and old style graphical options")) - -- optnum = sum([bool(g) for g in [vnc, nographics, sdl, graphics]]) -+ optnum = sum(bool(g) for g in [vnc, nographics, sdl, graphics]) - if optnum > 1: - raise ValueError(_("Can't specify more than one of VNC, SDL, " - "--graphics or --nographics")) -diff --git a/virtinst/xmlbuilder.py b/virtinst/xmlbuilder.py -index 07a9e319..dd78038e 100644 ---- a/virtinst/xmlbuilder.py -+++ b/virtinst/xmlbuilder.py -@@ -262,9 +262,9 @@ class XMLProperty(_XMLPropertyBase): - self._is_onoff = is_onoff - self._do_abspath = do_abspath - -- conflicts = sum([int(bool(i)) for i in -+ conflicts = sum(int(bool(i)) for i in - [self._is_bool, self._is_int, -- self._is_yesno, self._is_onoff]]) -+ self._is_yesno, self._is_onoff]) - if conflicts > 1: - raise xmlutil.DevError("Conflict property converter options.") - -@@ -343,7 +343,7 @@ class XMLProperty(_XMLPropertyBase): - propstore = xmlbuilder._propstore - - if self.propname in propstore: -- del(propstore[self.propname]) -+ del propstore[self.propname] - propstore[self.propname] = val - - def _nonxml_fget(self, xmlbuilder): --- -2.45.2 - diff --git a/0001-virtinst-add-properties-for-AMD-SEV-SNP.patch b/0001-virtinst-add-properties-for-AMD-SEV-SNP.patch deleted file mode 100644 index d3995af..0000000 --- a/0001-virtinst-add-properties-for-AMD-SEV-SNP.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 848635bd8fc915bb2b7b9128e660cea9f20c42a5 Mon Sep 17 00:00:00 2001 -Message-ID: <848635bd8fc915bb2b7b9128e660cea9f20c42a5.1725987015.git.crobinso@redhat.com> -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Tue, 20 Aug 2024 10:03:56 +0100 -Subject: [PATCH virt-manager] virtinst: add properties for AMD SEV-SNP -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -Content-type: text/plain - -Signed-off-by: Daniel P. Berrangé ---- - virtinst/cli.py | 7 ++++++- - virtinst/domain/launch_security.py | 12 ++++++++++++ - 2 files changed, 18 insertions(+), 1 deletion(-) - -diff --git a/virtinst/cli.py b/virtinst/cli.py -index c4dffd34..43b5fb52 100644 ---- a/virtinst/cli.py -+++ b/virtinst/cli.py -@@ -4805,8 +4805,13 @@ class ParserLaunchSecurity(VirtCLIParser): - cls.add_arg("policy", "policy") - cls.add_arg("session", "session") - cls.add_arg("dhCert", "dhCert") -+ cls.add_arg("guestVisibleWorkarounds", "guestVisibleWorkarounds") -+ cls.add_arg("idBlock", "idBlock") -+ cls.add_arg("idAuth", "idAuth") -+ cls.add_arg("hostData", "hostData") - cls.add_arg("kernelHashes", "kernelHashes", is_onoff=True) -- -+ cls.add_arg("authorKey", "authorKey", is_onoff=True) -+ cls.add_arg("vcek", "vcek", is_onoff=True) - - ########################### - # Public virt parser APIs # -diff --git a/virtinst/domain/launch_security.py b/virtinst/domain/launch_security.py -index 9d2998d9..f56527cb 100644 ---- a/virtinst/domain/launch_security.py -+++ b/virtinst/domain/launch_security.py -@@ -16,7 +16,13 @@ class DomainLaunchSecurity(XMLBuilder): - policy = XMLProperty("./policy") - session = XMLProperty("./session") - dhCert = XMLProperty("./dhCert") -+ guestVisibleWorkarounds = XMLProperty("./guestVisibleWorkarounds") -+ idBlock = XMLProperty("./idBlock") -+ idAuth = XMLProperty("./idAuth") -+ hostData = XMLProperty("./hostData") - kernelHashes = XMLProperty("./@kernelHashes", is_yesno=True) -+ authorKey = XMLProperty("./@authorKey", is_yesno=True) -+ vcek = XMLProperty("./@vcek", is_yesno=True) - - def _set_defaults_sev(self, guest): - if not guest.os.is_q35() or not guest.is_uefi(): -@@ -32,6 +38,12 @@ class DomainLaunchSecurity(XMLBuilder): - if domcaps.supports_sev_launch_security(check_es=True): - self.policy = "0x07" - -+ def _set_defaults_sev_snp(self, guest): -+ if not guest.os.is_q35() or not guest.is_uefi(): -+ raise RuntimeError(_("SEV-SNP launch security requires a Q35 UEFI machine")) -+ - def set_defaults(self, guest): - if self.type == "sev": - return self._set_defaults_sev(guest) -+ elif self.type == "sev-snp": -+ return self._set_defaults_sev_snp(guest) --- -2.46.0 - diff --git a/sources b/sources index 3d35e40..c58d7d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (virt-manager-4.1.0.tar.gz) = 725cb5bcbaebaafae417f95deffb4243ccdad769668cba6e1235f4607e2b29dbd099d2a9a3885981158f53ea854dd71cc29ed9d7557b2791161c13d34f2ef883 +SHA512 (virt-manager-5.0.0.tar.xz) = d0cb7eb844fc98ad29413717e5fa5834bc6f9f6cb6b9339b59c2721bb37a58f71280e3d2a04a64a6021614626329d76c92474f826bb1d9b7a9040b479f20d4e8 diff --git a/virt-manager.spec b/virt-manager.spec index d25ec9c..2b42465 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -7,21 +7,16 @@ # End local config Name: virt-manager -Version: 4.1.0 -Release: 9%{?dist} +Version: 5.0.0 +Release: 1%{?dist} %global verrel %{version}-%{release} Summary: Desktop tool for managing virtual machines via libvirt License: GPL-2.0-or-later BuildArch: noarch URL: https://virt-manager.org/ -Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz +Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.xz -# https://bugzilla.redhat.com/show_bug.cgi?id=2294201 -Patch1: 0001-Fix-pylint-pycodestyle-warnings-with-latest-versions.patch - -# https://fedoraproject.org/wiki/Changes/ConfidentialVirtHostAMDSEVSNP -Patch2: 0001-virtinst-add-properties-for-AMD-SEV-SNP.patch Requires: virt-manager-common = %{verrel} Requires: python3-gobject >= 3.31.3 @@ -32,9 +27,6 @@ Requires: gtk-vnc2 Requires: spice-gtk3 %endif -# We can work with gtksourceview 3 or gtksourceview4, pick the latest one -Requires: gtksourceview4 - # virt-manager is one of those apps that people will often install onto # a headless machine for use over SSH. This means the virt-manager dep # chain needs to provide everything we need to get a usable app experience. @@ -54,6 +46,10 @@ Requires: dconf # no ambiguity. Requires: vte291 +# We can use GtkTextView, gtksourceview 3 or gtksourceview4, recommend +# the latest one but don't make it a hard requirement +Recommends: gtksourceview4 + # Weak dependencies for the common virt-manager usecase Recommends: (libvirt-daemon-kvm or libvirt-daemon-qemu) Recommends: libvirt-daemon-config-network @@ -64,7 +60,7 @@ Suggests: python3-libguestfs BuildRequires: gettext BuildRequires: python3-devel BuildRequires: python3-docutils -BuildRequires: python3-setuptools +BuildRequires: meson %description @@ -115,24 +111,16 @@ machine). %build -%if %{default_hvs} -%global _default_hvs --default-hvs %{default_hvs} -%endif - -%if 0%{?rhel} -%global _default_graphics --default-graphics=vnc -%endif - -./setup.py configure \ - --prefix=%{_prefix} \ - %{?_default_hvs} \ - %{?_default_graphics} - +%meson \ + -Ddefault-hvs=%{default_hvs} \ + -Dupdate-icon-cache=false \ + -Dcompile-schemas=false \ + -Dtests=disabled +%meson_build %install -./setup.py \ - --no-update-icon-cache --no-compile-schemas \ - install -O1 --root=%{buildroot} --prefix=%{_prefix} +%meson_install + %find_lang %{name} %if 0%{?py_byte_compile:1} @@ -181,6 +169,9 @@ machine). %changelog +* Mon Dec 02 2024 Pavel Hrdina - 5.0.0-1 +- Update to version 5.0.0 + * Tue Sep 10 2024 Cole Robinson - 4.1.0-9 - Add sev-snp changes for feature ConfidentialVirtHostAMDSEVSNP