- Upstream bug fixes (bsc#1027942)

d3c627f1-volumeupload-Use-1MiB-read-size.patch
  cf93e2db-console-fix-error-with-old-pygobject.patch
  143c6bef-virtinst-fix-error-message-format-string.patch
  fe8722e7-createnet-Remove-some-unnecessary-max_length-annotations.patch
  d9b5090e-Fix-forgetting-password-from-keyring.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=545
This commit is contained in:
Charles Arnold 2021-06-21 21:15:28 +00:00 committed by Git OBS Bridge
parent e510392410
commit 3b5af8692f
7 changed files with 168 additions and 0 deletions

View File

@ -0,0 +1,24 @@
Subject: virtinst: fix error message format string
From: Roman Bogorodskiy bogorodskiy@gmail.com Wed Feb 10 17:54:10 2021 +0400
Date: Wed Feb 10 10:26:23 2021 -0500:
Git: 143c6befc33ee507379fd7eca8cf5e5bd1685799
Fix a regression introduced by commit 71f034d6b where
format string expects kwarg "domain", but "vm" is passed instead.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
diff --git a/virtinst/virtxml.py b/virtinst/virtxml.py
index bd2b4282..0c8da37e 100644
--- a/virtinst/virtxml.py
+++ b/virtinst/virtxml.py
@@ -251,7 +251,7 @@ def start_domain_transient(conn, xmlobj, devs, action, confirm):
dom = conn.createXML(xmlobj.get_xml())
except libvirt.libvirtError as e:
fail(_("Failed starting domain '%(domain)s': %(error)s") % {
- "vm": xmlobj.name,
+ "domain": xmlobj.name,
"error": e,
})
else:

View File

@ -0,0 +1,39 @@
Subject: console: fix error with old pygobject
From: Pavel Hrdina phrdina@redhat.com Fri Feb 5 12:15:46 2021 +0100
Date: Fri Feb 5 12:15:46 2021 +0100:
Git: cf93e2dbff28fe05d6d45364c579f923b157beb1
The code doesn't work as expected. From python documentation:
x and y
is the same as
x if not x or y
so in the code if for some reasone `dev` is None the value stored in
`sensitive` will be None as well.
No the code itself works with pygobject >= 3.31.3 where they allowed
None as a valid boolean value, but with older versions it will fail
with this error message:
TypeError: Argument 1 does not allow None as a value
Resolves: https://github.com/virt-manager/virt-manager/issues/226
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
diff --git a/virtManager/details/console.py b/virtManager/details/console.py
index c4ed478e..18f9ddd9 100644
--- a/virtManager/details/console.py
+++ b/virtManager/details/console.py
@@ -258,7 +258,7 @@ class _ConsoleMenu:
cb = toggled_cb
cbdata = dev
- sensitive = dev and not tooltip
+ sensitive = bool(dev and not tooltip)
active = False
if oldlabel is None and sensitive:

View File

@ -0,0 +1,27 @@
Subject: volumeupload: Use 1MiB read size
From: Cole Robinson crobinso@redhat.com Wed Feb 3 14:02:32 2021 -0500
Date: Wed Feb 3 14:15:57 2021 -0500:
Git: d3c627f189dc107f22d0b614537fd0a8937c65a9
Rather than 1K. This drastically speeds up the volumeupload case
for a local URI for the cost of some higher runtime memory but
I think that's worth it
Fixes: #221
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtinst/install/volumeupload.py b/virtinst/install/volumeupload.py
index 02634f95..431e848c 100644
--- a/virtinst/install/volumeupload.py
+++ b/virtinst/install/volumeupload.py
@@ -108,8 +108,7 @@ def _upload_file(conn, meter, destpool, src):
meter.start(size=size,
text=_("Transferring %s") % os.path.basename(src))
while True:
- # blocksize = (1024 ** 2)
- blocksize = 1024
+ blocksize = 1024 * 1024 # 1 MiB
data = fileobj.read(blocksize)
if not data:
break

View File

@ -0,0 +1,29 @@
Subject: Fix forgetting password from keyring
From: WGH wgh@torlan.ru Sun Mar 21 20:44:02 2021 +0300
Date: Tue Apr 6 18:30:08 2021 -0400:
Git: d9b5090e061e9fad9738359a8b1f86f16eac45cf
First, Item.Delete never accepted any arguments, so this code likely
never worked.
Second, Item.Delete might return a Prompt object, which client
is supposed to call if keyring wants to confirm deletion.
diff --git a/virtManager/lib/keyring.py b/virtManager/lib/keyring.py
index 203886dc..c0f50142 100644
--- a/virtManager/lib/keyring.py
+++ b/virtManager/lib/keyring.py
@@ -87,7 +87,12 @@ class vmmKeyring(vmmGObject):
iface = Gio.DBusProxy.new_sync(self._dbus, 0, None,
"org.freedesktop.secrets", path,
"org.freedesktop.Secret.Item", None)
- iface.Delete("(s)", "/")
+ prompt = iface.Delete()
+ if prompt != "/":
+ iface = Gio.DBusProxy.new_sync(self._dbus, 0, None,
+ "org.freedesktop.secrets", prompt,
+ "org.freedesktop.Secret.Prompt", None)
+ iface.Prompt("(s)", "")
except Exception:
log.exception("Failed to delete keyring secret")

View File

@ -0,0 +1,29 @@
Subject: createnet: Remove some unnecessary max_length annotations
From: Cole Robinson crobinso@redhat.com Tue Apr 6 13:35:15 2021 -0400
Date: Tue Apr 6 13:35:15 2021 -0400:
Git: fe8722e763928980315467ef185a27dbf07d3d15
Fixes: #238
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/ui/createnet.ui b/ui/createnet.ui
index a70ec7e2..18a1795f 100644
--- a/ui/createnet.ui
+++ b/ui/createnet.ui
@@ -229,7 +229,6 @@
<object class="GtkEntry" id="net-name">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="max_length">16</property>
<property name="width_chars">25</property>
<child internal-child="accessible">
<object class="AtkObject" id="net-name-atkobject">
@@ -730,7 +729,6 @@
<object class="GtkEntry" id="net-domain-name">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="max_length">20</property>
<property name="invisible_char">●</property>
<property name="width_chars">20</property>
<child internal-child="accessible">

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jun 21 14:30:27 MDT 2021 - carnold@suse.com
- Upstream bug fixes (bsc#1027942)
d3c627f1-volumeupload-Use-1MiB-read-size.patch
cf93e2db-console-fix-error-with-old-pygobject.patch
143c6bef-virtinst-fix-error-message-format-string.patch
fe8722e7-createnet-Remove-some-unnecessary-max_length-annotations.patch
d9b5090e-Fix-forgetting-password-from-keyring.patch
-------------------------------------------------------------------
Mon Apr 12 13:01:27 MDT 2021 - carnold@suse.com

View File

@ -34,6 +34,11 @@ Source3: virt-manager-supportconfig
# Upstream Patches
Patch1: e7222b50-addstorage-Dont-pass-None-to-widget.set_active.patch
Patch2: 4d0e3232-virtinst-Fix-TOCTOU-in-domain-enumeration.patch
Patch3: d3c627f1-volumeupload-Use-1MiB-read-size.patch
Patch4: cf93e2db-console-fix-error-with-old-pygobject.patch
Patch5: 143c6bef-virtinst-fix-error-message-format-string.patch
Patch6: fe8722e7-createnet-Remove-some-unnecessary-max_length-annotations.patch
Patch7: d9b5090e-Fix-forgetting-password-from-keyring.patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
@ -167,6 +172,11 @@ machine).
# Upstream Patches
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
# SUSE Only
%patch70 -p1
%patch71 -p1