- Upstream bug fixes (bsc#1027942)

b5b2433a-baseclass-Fix-UI-file-loading-on-py3.patch
  0c6bcb09-fix-bytes-string-mess-in-serial-console.patch
  bc8c5b07-append--attach-to-virt-viewer-if-graphics-has-listen-type-none.patch
  0e812e3c-dont-skip-authentication-for-listen-type-none-with-fixed-QEMU.patch
  67122615-python2to3-division-compatability.patch
- Dropped in favor of upstream version
  0001-virtinst-python3-terminal-width-should-be-int.patch
  python3-fix-bytes-string-mess-in-serial-console.patch

- Default to sles15 and opensuse15 as the 'preferred_distros' for
  this release. (bsc#1054986)
  virtinst-osdict-get_supported.patch
  virt-manager.spec
  (bsc#1070896)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=405
This commit is contained in:
Charles Arnold 2018-02-06 20:28:37 +00:00 committed by Git OBS Bridge
parent 0739f1e214
commit a962c4a1c4
16 changed files with 553 additions and 167 deletions

View File

@ -14,11 +14,11 @@ longer life.
virtManager/connection.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/virtManager/connection.py b/virtManager/connection.py
index c98fff3d..f9da6677 100644
--- a/virtManager/connection.py
+++ b/virtManager/connection.py
@@ -1439,7 +1439,8 @@ class vmmConnection(vmmGObject):
Index: virt-manager-1.4.3/virtManager/connection.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/connection.py
+++ virt-manager-1.4.3/virtManager/connection.py
@@ -1441,7 +1441,8 @@ class vmmConnection(vmmGObject):
self._tick(*args, **kwargs)
except KeyboardInterrupt:
raise
@ -28,6 +28,3 @@ index c98fff3d..f9da6677 100644
pass
if e is None:
--
2.15.1

View File

@ -1,30 +0,0 @@
From 79fa0f9de08f766dee6129fdc2c48648bba6fc6e Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Thu, 7 Dec 2017 11:09:02 +0100
Subject: [PATCH 1/4] virtinst: python3: terminal width should be int
This avoids errors like this:
File "/usr/share/virt-manager/virtinst/progress.py", line 224, in _term_add_bar
return tl.add(' [%-*.*s]' % (blen, blen, bar))
TypeError: * wants int
---
virtinst/progress.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtinst/progress.py b/virtinst/progress.py
index 868d0f0f0544..e07591a14fa0 100644
--- a/virtinst/progress.py
+++ b/virtinst/progress.py
@@ -79,7 +79,7 @@ class TerminalLine:
a number of different elements (default=2). """
if self._llen < fixed:
return 0
- return (self._llen - fixed) / elements
+ return int((self._llen - fixed) / elements)
def add(self, element, full_len=None):
""" If there is room left in the line, above min_len, add element.
--
2.15.1

View File

@ -1,16 +1,13 @@
From e025b9c0fe78621f1c6f9f7655c142a8a3d516fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cedric.bosdonnat@free.fr>
Date: Wed, 13 Dec 2017 11:35:39 +0100
Subject: [PATCH] python3: fix bytes/string mess in serial console
Subject: python3: fix bytes/string mess in serial console
From: Cédric Bosdonnat cbosdonnat@suse.com Wed Dec 13 12:08:50 2017 +0100
Date: Wed Dec 20 16:09:35 2017 -0500:
Git: 0c6bcb09176d683e0e7de7623a1a215937c60aa8
Add a few encode() and decode() to convert between libvirt stream
functions expecting bytes arrays and Vte callbacks providing strings.
---
virtManager/serialcon.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/virtManager/serialcon.py b/virtManager/serialcon.py
index 7caf6db4..21ab8ae7 100644
index 7caf6db..21ab8ae 100644
--- a/virtManager/serialcon.py
+++ b/virtManager/serialcon.py
@@ -149,7 +149,7 @@ class LibvirtConsoleConnection(ConsoleConnection):
@ -40,6 +37,3 @@ index 7caf6db4..21ab8ae7 100644
class vmmSerialConsole(vmmGObject):
--
2.15.1

View File

@ -0,0 +1,42 @@
Subject: vnc: don't skip authentication for listen type none with fixed QEMU
From: Pavel Hrdina phrdina@redhat.com Tue Jan 16 09:30:50 2018 +0100
Date: Tue Jan 16 09:42:11 2018 +0100:
Git: 0e812e3c423787ac0392f9c083d20a5ca7d0ed8c
This was fixed by commit <fa03cb7fd21> in QEMU.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1445239
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
diff --git a/virtManager/domain.py b/virtManager/domain.py
index 183a56c..1134a43 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -1198,11 +1198,11 @@ class vmmDomain(vmmLibvirtObject):
flags = 0
# Ugly workaround for VNC bug where the display cannot be opened
- # if the listen type is "none". When this gets fixed in QEMU
- # we should skip auth only for broken QEMUs.
+ # if the listen type is "none". This bug was fixed in QEMU-2.9.0.
graphics = self.get_graphics_devices()[0]
if (graphics.type == "vnc" and
- graphics.get_first_listen_type() == "none"):
+ graphics.get_first_listen_type() == "none" and
+ not self.conn.SUPPORT_CONN_VNC_NONE_AUTH):
flags = libvirt.VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH
return self._backend.openGraphicsFD(0, flags)
diff --git a/virtinst/support.py b/virtinst/support.py
index 115c9b1..c27dd50 100644
--- a/virtinst/support.py
+++ b/virtinst/support.py
@@ -325,6 +325,7 @@ SUPPORT_CONN_RNG_URANDOM = _make(version="1.3.4")
SUPPORT_CONN_USB3_PORTS = _make(version="1.3.5")
SUPPORT_CONN_MACHVIRT_PCI_DEFAULT = _make(version="3.0.0")
SUPPORT_CONN_QEMU_XHCI = _make(version="3.3.0")
+SUPPORT_CONN_VNC_NONE_AUTH = _make(hv_version={"qemu": "2.9.0"})
# This is for disk <driver name=qemu>. xen supports this, but it's

View File

@ -0,0 +1,344 @@
Subject: Python 2/3 division compatability
From: Radostin Stoyanov rstoyanov1@gmail.com Wed Oct 11 12:35:55 2017 +0100
Date: Sat Jan 27 15:30:17 2018 -0500:
Git: 6712261510953f9c729624dded29bfffd32f88e6
In Python 2 the classic devision of integers returns an integer
but in Python 3 it might return float.
Example:
- Python 2: - Python 3:
>>> 9 / 4 >>> 9 / 4
2 2.25
>>> 9 // 4 >>> 9 // 4
2 2
>>> 9 / 4.0 >>> 9 / 4.0
2.25 2.25
>>> 9 // 4.0 >>> 9 // 4.0
2.0 2.0
For more info see: https://www.python.org/dev/peps/pep-0238/
Index: virt-manager-1.4.3/virtManager/console.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/console.py
+++ virt-manager-1.4.3/virtManager/console.py
@@ -399,12 +399,12 @@ class vmmConsolePages(vmmGObjectUI):
if align_ratio > desktop_ratio:
desktop_w = int(req.height * desktop_ratio)
desktop_h = req.height
- dx = (req.width - desktop_w) / 2
+ dx = (req.width - desktop_w) // 2
else:
desktop_w = req.width
- desktop_h = int(req.width / desktop_ratio)
- dy = (req.height - desktop_h) / 2
+ desktop_h = int(req.width // desktop_ratio)
+ dy = (req.height - desktop_h) // 2
viewer_alloc = Gdk.Rectangle()
viewer_alloc.x = dx
Index: virt-manager-1.4.3/virtManager/create.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/create.py
+++ virt-manager-1.4.3/virtManager/create.py
@@ -691,7 +691,7 @@ class vmmCreate(vmmGObjectUI):
{'maxmem': _pretty_memory(memory)})
mem_label = ("<span size='small' color='#484848'>%s</span>" %
mem_label)
- self.widget("mem").set_range(50, memory / 1024)
+ self.widget("mem").set_range(50, memory // 1024)
self.widget("phys-mem-label").set_markup(mem_label)
# CPU
@@ -2142,7 +2142,7 @@ class vmmCreate(vmmGObjectUI):
# Change the default values suggested to the user.
ram_size = DEFAULT_MEM
if res and res.get("ram") > 0:
- ram_size = res["ram"] / (1024 ** 2)
+ ram_size = res["ram"] // (1024 ** 2)
self.widget("mem").set_value(ram_size)
n_cpus = 1
@@ -2151,7 +2151,7 @@ class vmmCreate(vmmGObjectUI):
self.widget("cpus").set_value(n_cpus)
if res and res.get("storage"):
- storage_size = int(res["storage"]) / (1024 ** 3)
+ storage_size = int(res["storage"]) // (1024 ** 3)
self._addstorage.widget("storage-size").set_value(storage_size)
# Validation passed, store the install path (if there is one) in
Index: virt-manager-1.4.3/virtManager/createnet.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/createnet.py
+++ virt-manager-1.4.3/virtManager/createnet.py
@@ -627,7 +627,7 @@ class vmmCreateNetwork(vmmGObjectUI):
valid_ip = (ip.numhosts >= 8 and ip.is_private)
gateway = (ip.prefixlen != 32 and str(ip.network + 1) or "")
info = (ip.is_private and _("Private") or _("Other/Public"))
- start = int(ip.numhosts / 2)
+ start = int(ip.numhosts // 2)
end = int(ip.numhosts - 2)
src.modify_bg(Gtk.StateType.NORMAL, valid_ip and _green or _red)
Index: virt-manager-1.4.3/virtManager/details.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/details.py
+++ virt-manager-1.4.3/virtManager/details.py
@@ -2584,7 +2584,7 @@ class vmmDetails(vmmGObjectUI):
def refresh_config_memory(self):
host_mem_widget = self.widget("state-host-memory")
- host_mem = self.vm.conn.host_memory_size() / 1024
+ host_mem = self.vm.conn.host_memory_size() // 1024
vm_cur_mem = self.vm.get_memory() / 1024.0
vm_max_mem = self.vm.maximum_memory() / 1024.0
@@ -2965,7 +2965,7 @@ class vmmDetails(vmmGObjectUI):
ram = vid.vram
heads = vid.heads
try:
- ramlabel = ram and "%d MiB" % (int(ram) / 1024) or "-"
+ ramlabel = ram and "%d MiB" % (int(ram) // 1024) or "-"
except Exception:
ramlabel = "-"
Index: virt-manager-1.4.3/virtManager/domain.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/domain.py
+++ virt-manager-1.4.3/virtManager/domain.py
@@ -1984,7 +1984,7 @@ class vmmDomain(vmmLibvirtObject):
except libvirt.libvirtError as err:
logging.error("Error reading mem stats: %s", err)
- pcentCurrMem = (curmem / float(totalmem)) * 100
+ pcentCurrMem = (curmem // float(totalmem)) * 100
pcentCurrMem = max(0.0, min(pcentCurrMem, 100.0))
return pcentCurrMem, curmem
@@ -2033,10 +2033,10 @@ class vmmDomain(vmmLibvirtObject):
"cpuGuestPercent": pcentGuestCpu,
"curmem": curmem,
"currMemPercent": pcentCurrMem,
- "diskRdKiB": rdBytes / 1024,
- "diskWrKiB": wrBytes / 1024,
- "netRxKiB": rxBytes / 1024,
- "netTxKiB": txBytes / 1024,
+ "diskRdKiB": rdBytes // 1024,
+ "diskWrKiB": wrBytes // 1024,
+ "netRxKiB": rxBytes // 1024,
+ "netTxKiB": txBytes // 1024,
}
for r in ["diskRd", "diskWr", "netRx", "netTx"]:
Index: virt-manager-1.4.3/virtManager/fsdetails.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/fsdetails.py
+++ virt-manager-1.4.3/virtManager/fsdetails.py
@@ -190,7 +190,7 @@ class vmmFSDetails(vmmGObjectUI):
if dev.type != VirtualFilesystem.TYPE_RAM:
self.widget("fs-source").set_text(dev.source)
else:
- self.widget("fs-ram-source-spin").set_value(int(dev.source) / 1024)
+ self.widget("fs-ram-source-spin").set_value(int(dev.source) // 1024)
self.widget("fs-target").set_text(dev.target or "")
self.widget("fs-readonly").set_active(dev.readonly)
Index: virt-manager-1.4.3/virtManager/graphwidgets.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/graphwidgets.py
+++ virt-manager-1.4.3/virtManager/graphwidgets.py
@@ -150,7 +150,7 @@ class CellRendererSparkline(Gtk.CellRend
graph_width = (cell_area.width - (GRAPH_PAD * 2))
graph_height = (cell_area.height - (GRAPH_PAD * 2))
- pixels_per_point = (graph_width / max(1, len(self.data_array) - 1))
+ pixels_per_point = (graph_width // max(1, len(self.data_array) - 1))
# Graph width needs to be some multiple of the amount of data points
# we have
@@ -316,7 +316,7 @@ class Sparkline(Gtk.DrawingArea):
w = window.get_width()
h = window.get_height()
- points_per_set = (len(self.data_array) / self.num_sets)
+ points_per_set = (len(self.data_array) // self.num_sets)
pixels_per_point = (float(w) /
(float((points_per_set - 1) or 1)))
@@ -330,9 +330,9 @@ class Sparkline(Gtk.DrawingArea):
max_ticks = 4
for index in range(1, max_ticks):
Gtk.render_line(ctx, cr, 1,
- (h / max_ticks) * index,
+ (h // max_ticks) * index,
w - 2,
- (h / max_ticks) * index)
+ (h // max_ticks) * index)
# Foreground-color graphics context
# This draws the black border
Index: virt-manager-1.4.3/virtManager/manager.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/manager.py
+++ virt-manager-1.4.3/virtManager/manager.py
@@ -1067,7 +1067,7 @@ class vmmManager(vmmGObjectUI):
return
d1, d2 = obj.disk_io_vectors(GRAPH_LEN, self.max_disk_rate)
- data = [(x + y) / 2 for x, y in zip(d1, d2)]
+ data = [(x + y) // 2 for x, y in zip(d1, d2)]
cell.set_property('data_array', data)
def network_traffic_img(self, column_ignore, cell, model, _iter, data):
@@ -1076,5 +1076,5 @@ class vmmManager(vmmGObjectUI):
return
d1, d2 = obj.network_traffic_vectors(GRAPH_LEN, self.max_net_rate)
- data = [(x + y) / 2 for x, y in zip(d1, d2)]
+ data = [(x + y) // 2 for x, y in zip(d1, d2)]
cell.set_property('data_array', data)
Index: virt-manager-1.4.3/virtManager/storagelist.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/storagelist.py
+++ virt-manager-1.4.3/virtManager/storagelist.py
@@ -415,7 +415,7 @@ class vmmStorageList(vmmGObjectUI):
model.clear()
vadj = self.widget("vol-scroll").get_vadjustment()
- vscroll_percent = vadj.get_value() / max(vadj.get_upper(), 1)
+ vscroll_percent = vadj.get_value() // max(vadj.get_upper(), 1)
for vol in vols:
key = vol.get_connkey()
Index: virt-manager-1.4.3/virtinst/cpu.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/cpu.py
+++ virt-manager-1.4.3/virtinst/cpu.py
@@ -175,18 +175,18 @@ class CPU(XMLBuilder):
vcpus = int(vcpus or 0)
if not self.sockets:
if not self.cores:
- self.sockets = vcpus / self.threads
+ self.sockets = vcpus // self.threads
else:
- self.sockets = vcpus / self.cores
+ self.sockets = vcpus // self.cores
if not self.cores:
if not self.threads:
- self.cores = vcpus / self.sockets
+ self.cores = vcpus // self.sockets
else:
- self.cores = vcpus / (self.sockets * self.threads)
+ self.cores = vcpus // (self.sockets * self.threads)
if not self.threads:
- self.threads = vcpus / (self.sockets * self.cores)
+ self.threads = vcpus // (self.sockets * self.cores)
return
Index: virt-manager-1.4.3/virtinst/devicedisk.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/devicedisk.py
+++ virt-manager-1.4.3/virtinst/devicedisk.py
@@ -430,7 +430,7 @@ class VirtualDisk(VirtualDevice):
"""
digits = []
for factor in range(0, 3):
- amt = (num % (26 ** (factor + 1))) / (26 ** factor)
+ amt = (num % (26 ** (factor + 1))) // (26 ** factor)
if amt == 0 and num >= (26 ** (factor + 1)):
amt = 26
num -= amt
Index: virt-manager-1.4.3/virtinst/diskbackend.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/diskbackend.py
+++ virt-manager-1.4.3/virtinst/diskbackend.py
@@ -404,7 +404,7 @@ class CloneStorageCreator(_StorageCreato
if msg:
msg += (_(" %d M requested > %d M available") %
- ((need / (1024 * 1024)), (avail / (1024 * 1024))))
+ ((need // (1024 * 1024)), (avail // (1024 * 1024))))
return (ret, msg)
def create(self, progresscb):
Index: virt-manager-1.4.3/virtinst/progress.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/progress.py
+++ virt-manager-1.4.3/virtinst/progress.py
@@ -79,7 +79,7 @@ class TerminalLine:
a number of different elements (default=2). """
if self._llen < fixed:
return 0
- return (self._llen - fixed) / elements
+ return (self._llen - fixed) // elements
def add(self, element, full_len=None):
""" If there is room left in the line, above min_len, add element.
@@ -249,7 +249,7 @@ class TextMeter(BaseMeter):
sofar_size = None
if _text_meter_total_size:
sofar_size = _text_meter_sofar_size + amount_read
- sofar_pc = (sofar_size * 100) / _text_meter_total_size
+ sofar_pc = (sofar_size * 100) // _text_meter_total_size
# Include text + ui_rate in minimal
tl = TerminalLine(8, 8+1+8)
@@ -385,7 +385,7 @@ class RateEstimator:
(can be None for unknown transfer size)"""
if self.total is None: return None
elif self.total == 0: return 1.0
- else: return float(self.last_amount_read)/self.total
+ else: return float(self.last_amount_read) / self.total
#########################################################################
# support methods
@@ -432,7 +432,7 @@ class RateEstimator:
"""
if rt < 0: return 0.0
- shift = int(math.log(rt/start_time)/math.log(2))
+ shift = int(math.log(rt / start_time) / math.log(2))
rt = int(rt)
if shift <= 0: return rt
return float(int(rt) >> shift << shift)
@@ -446,10 +446,10 @@ def format_time(seconds, use_hours=0):
return 'Infinite'
else:
seconds = int(seconds)
- minutes = seconds / 60
+ minutes = seconds // 60
seconds = seconds % 60
if use_hours:
- hours = minutes / 60
+ hours = minutes // 60
minutes = minutes % 60
return '%02i:%02i:%02i' % (hours, minutes, seconds)
else:
Index: virt-manager-1.4.3/virtinst/storage.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/storage.py
+++ virt-manager-1.4.3/virtinst/storage.py
@@ -904,13 +904,13 @@ class StorageVolume(_StorageObject):
return (True, _("There is not enough free space on the storage "
"pool to create the volume. "
"(%d M requested allocation > %d M available)") %
- ((self.allocation / (1024 * 1024)),
- (avail / (1024 * 1024))))
+ ((self.allocation // (1024 * 1024)),
+ (avail // (1024 * 1024))))
elif self.capacity > avail:
return (False, _("The requested volume capacity will exceed the "
"available pool space when the volume is fully "
"allocated. "
"(%d M requested capacity > %d M available)") %
- ((self.capacity / (1024 * 1024)),
- (avail / (1024 * 1024))))
+ ((self.capacity // (1024 * 1024)),
+ (avail // (1024 * 1024))))
return (False, "")

View File

@ -0,0 +1,24 @@
Subject: baseclass: Fix UI file loading on py3
From: Cole Robinson crobinso@redhat.com Wed Dec 20 16:04:36 2017 -0500
Date: Wed Dec 20 16:04:36 2017 -0500:
Git: b5b2433ad5578767abd2552e3c635c939511db83
We were passing in a unicode string object, but add_from_string
depends on knowing binary length. This caused signals to not
be registered which broke reopening the details window
Just switch to add_from_file to sidestep the issue
diff --git a/virtManager/baseclass.py b/virtManager/baseclass.py
index f8bff2b..c2f1ecd 100644
--- a/virtManager/baseclass.py
+++ b/virtManager/baseclass.py
@@ -220,7 +220,7 @@ class vmmGObjectUI(vmmGObject):
self.builder = Gtk.Builder()
self.builder.set_translation_domain("virt-manager")
- self.builder.add_from_string(open(uifile).read())
+ self.builder.add_from_file(uifile)
if not topwin:
self.topwin = self.widget(windowname)

View File

@ -0,0 +1,42 @@
Subject: cli: append "--attach" to virt-viewer if graphics has listen type none
From: Pavel Hrdina phrdina@redhat.com Fri Jan 5 09:13:45 2018 +0100
Date: Sun Jan 7 08:59:43 2018 +0100:
Git: bc8c5b0778ed633386d1ad50a107ff1b97543a4f
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1527834
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Index: virt-manager-1.4.3/virtinst/cli.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/cli.py
+++ virt-manager-1.4.3/virtinst/cli.py
@@ -442,8 +442,8 @@ def _gfx_console(guest):
"--wait", guest.name]
# Currently virt-viewer needs attaching to the local display while
- # spice gl is enabled.
- if guest.has_gl():
+ # spice gl is enabled or listen type none is used.
+ if guest.has_gl() or guest.has_listen_none():
args.append("--attach")
logging.debug("Launching virt-viewer for graphics type '%s'",
Index: virt-manager-1.4.3/virtinst/guest.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/guest.py
+++ virt-manager-1.4.3/virtinst/guest.py
@@ -1233,6 +1233,13 @@ class Guest(XMLBuilder):
if gfx.gl:
return True
+ def has_listen_none(self):
+ for gfx in self.get_devices("graphics"):
+ listen = gfx.get_first_listen_type()
+ if listen and listen == "none":
+ return True
+ return False
+
def _set_video_defaults(self):
if self.has_spice():
self._add_spice_channels()

View File

@ -1,7 +1,29 @@
-------------------------------------------------------------------
Tue Feb 6 11:57:54 MST 2018 - carnold@suse.com
- Upstream bug fixes (bsc#1027942)
b5b2433a-baseclass-Fix-UI-file-loading-on-py3.patch
0c6bcb09-fix-bytes-string-mess-in-serial-console.patch
bc8c5b07-append--attach-to-virt-viewer-if-graphics-has-listen-type-none.patch
0e812e3c-dont-skip-authentication-for-listen-type-none-with-fixed-QEMU.patch
67122615-python2to3-division-compatability.patch
- Dropped in favor of upstream version
0001-virtinst-python3-terminal-width-should-be-int.patch
python3-fix-bytes-string-mess-in-serial-console.patch
-------------------------------------------------------------------
Mon Feb 5 16:26:48 MST 2018 - carnold@suse.com
- Default to sles15 and opensuse15 as the 'preferred_distros' for
this release. (bsc#1054986)
virtinst-osdict-get_supported.patch
virt-manager.spec
-------------------------------------------------------------------
Wed Jan 24 19:08:03 UTC 2018 - bjorn.lie@gmail.com
- Replace conditional gtk2-tools with gtk3-tools BuildRequires.
(bsc#1070896)
-------------------------------------------------------------------
Tue Jan 16 10:15:04 UTC 2018 - cbosdonnat@suse.com

View File

@ -21,7 +21,7 @@
%define qemu_user "qemu"
%define libvirt_kvm_packages ""
%define libvirt_xen_packages ""
%define preferred_distros "sles12sp3,opensuse42.3"
%define preferred_distros "sles15,opensuse15"
%define kvm_packages ""
%define _version 1.4.3
%define _release 0
@ -74,6 +74,11 @@ Patch33: 7fc7e94f-fix-virtio-scsi-controller-target-calculation.patch
Patch34: 2eb455c9-correctly-calculate-virtio-scsi-controller-index.patch
Patch35: f836e47b-virtinst-Fix-URLFetcher-for-reading-files.patch
Patch36: c174b550-connection-Another-py3-exception-variable-fix.patch
Patch37: b5b2433a-baseclass-Fix-UI-file-loading-on-py3.patch
Patch38: 0c6bcb09-fix-bytes-string-mess-in-serial-console.patch
Patch39: bc8c5b07-append--attach-to-virt-viewer-if-graphics-has-listen-type-none.patch
Patch40: 0e812e3c-dont-skip-authentication-for-listen-type-none-with-fixed-QEMU.patch
Patch41: 67122615-python2to3-division-compatability.patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
@ -116,6 +121,7 @@ Patch166: virtinst-check-date-format.patch
Patch167: virtinst-no-usb-tablet-for-xenpv.patch
Patch168: virtinst-add-sle15-detection-support.patch
Patch169: virtinst-keep-install-iso-attached.patch
Patch170: virtinst-osdict-get_supported.patch
# Python2 to Python3 patches
Patch200: virtmisc-python2-to-python3-conversion.patch
Patch201: virtcli-python2-to-python3-conversion.patch
@ -123,13 +129,11 @@ Patch202: virtconv-python2-to-python3-conversion.patch
Patch203: virtinst-python2-to-python3-conversion.patch
Patch204: virtman-python2-to-python3-conversion.patch
Patch205: virttests-python2-to-python3-conversion.patch
Patch206: 0001-virtinst-python3-terminal-width-should-be-int.patch
Patch207: 0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
Patch208: 0003-virtinst-python3-avoid-using-long-type.patch
Patch209: 0004-virtinst-python3-use-binary-mode-for-kernel.patch
Patch210: virtman-register-delete-event-for-details-dialog.patch
Patch211: python3-fix-bytes-string-mess-in-serial-console.patch
Patch212: 0001-py3-store-exception-variables-for-use-outside-except.patch
Patch206: 0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
Patch207: 0003-virtinst-python3-avoid-using-long-type.patch
Patch208: 0004-virtinst-python3-use-binary-mode-for-kernel.patch
Patch209: virtman-register-delete-event-for-details-dialog.patch
Patch210: 0001-py3-store-exception-variables-for-use-outside-except.patch
# For upstream review
Patch500: 0001-Improve-container-image-url-example.patch
Patch501: 0002-create-wizard-fix-alignment-in-os-container-page.patch
@ -255,6 +259,11 @@ machine).
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
%patch41 -p1
# SUSE Only
%patch70 -p1
%patch71 -p1
@ -297,6 +306,7 @@ machine).
%patch167 -p1
%patch168 -p1
%patch169 -p1
%patch170 -p1
# Python2 to Python3 patches
%patch200 -p1
%patch201 -p1
@ -309,8 +319,6 @@ machine).
%patch208 -p1
%patch209 -p1
%patch210 -p1
%patch211 -p1
%patch212 -p1
%patch500 -p1
%patch501 -p1
%patch502 -p1

View File

@ -5,11 +5,11 @@ A fix for accessing nfs mounted media. A comment in the code states,
and carry the latter form around internally"
We need the RFC version to work correctly whereas redhat's anaconda
needs their own modified version.
Index: virt-manager-1.4.2/virtinst/util.py
Index: virt-manager-1.4.3/virtinst/util.py
===================================================================
--- virt-manager-1.4.2.orig/virtinst/util.py
+++ virt-manager-1.4.2/virtinst/util.py
@@ -421,3 +421,22 @@ def getInstallRepos():
--- virt-manager-1.4.3.orig/virtinst/util.py
+++ virt-manager-1.4.3/virtinst/util.py
@@ -374,3 +374,22 @@ def getInstallRepos():
return (0, [])
return lookupZypperRepos(getHostInstallSource())
@ -32,10 +32,10 @@ Index: virt-manager-1.4.2/virtinst/util.py
+
+ return url
+
Index: virt-manager-1.4.2/virtinst/distroinstaller.py
Index: virt-manager-1.4.3/virtinst/distroinstaller.py
===================================================================
--- virt-manager-1.4.2.orig/virtinst/distroinstaller.py
+++ virt-manager-1.4.2/virtinst/distroinstaller.py
--- virt-manager-1.4.3.orig/virtinst/distroinstaller.py
+++ virt-manager-1.4.3/virtinst/distroinstaller.py
@@ -44,6 +44,8 @@ def _sanitize_url(url):
"""
Do nothing for http or ftp, but make sure nfs is in the expected format
@ -45,10 +45,10 @@ Index: virt-manager-1.4.2/virtinst/distroinstaller.py
if url.startswith("nfs://"):
# Convert RFC compliant NFS nfs://server/path/to/distro
# to what mount/anaconda expect nfs:server:/path/to/distro
Index: virt-manager-1.4.2/virtinst/urlfetcher.py
Index: virt-manager-1.4.3/virtinst/urlfetcher.py
===================================================================
--- virt-manager-1.4.2.orig/virtinst/urlfetcher.py
+++ virt-manager-1.4.2/virtinst/urlfetcher.py
--- virt-manager-1.4.3.orig/virtinst/urlfetcher.py
+++ virt-manager-1.4.3/virtinst/urlfetcher.py
@@ -34,6 +34,7 @@ import urlparse
import requests

View File

@ -0,0 +1,22 @@
Some distros are out of support for normal customers but continue
to be supported through LTSS contracts for others. Hence the EOL
date in the osinfo-db file may be past but we want the distro to
continue to show up in the list.
Index: virt-manager-1.4.3/virtinst/osdict.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/osdict.py
+++ virt-manager-1.4.3/virtinst/osdict.py
@@ -376,8 +376,11 @@ class _OsVariant(object):
# EOL date. So assume None == EOL, add some manual work arounds.
# We should fix this in a new libosinfo version, and then drop
# this hack
+ # SUSE: How to handle EOL distros that still have LTSS support
if self._is_related_to(["fedora24", "rhel7.0", "debian6",
- "ubuntu13.04", "win8", "win2k12", "mageia5", "centos7.0"],
+ "ubuntu13.04", "win8", "win2k12", "mageia5", "centos7.0",
+ "sles15", "sles12sp3", "sles12sp2", "sles12sp1", "sles11sp4",
+ "tumbleweed", "opensuse15", "opensuse42.3" ],
check_clones=False, check_derives=False):
return True
return False

View File

@ -25,10 +25,10 @@ Index: virt-manager-1.4.3/virtinst/support.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/support.py
+++ virt-manager-1.4.3/virtinst/support.py
@@ -325,6 +325,8 @@ SUPPORT_CONN_RNG_URANDOM = _make(version
SUPPORT_CONN_USB3_PORTS = _make(version="1.3.5")
@@ -326,6 +326,8 @@ SUPPORT_CONN_USB3_PORTS = _make(version=
SUPPORT_CONN_MACHVIRT_PCI_DEFAULT = _make(version="3.0.0")
SUPPORT_CONN_QEMU_XHCI = _make(version="3.3.0")
SUPPORT_CONN_VNC_NONE_AUTH = _make(hv_version={"qemu": "2.9.0"})
+SUPPORT_CONN_NOCOW = _make(
+ version="1.2.18", hv_version={"qemu": "2.2.0", "test": 0})

View File

@ -25,7 +25,7 @@ Index: virt-manager-1.4.3/virtManager/create.py
+ if m:
+ sp = m.group(0).strip().lower()
+ return sp
+ if sys.platform == 'linux2':
+ if sys.platform.startswith('linux'):
+ if os.path.exists('/etc/issue'):
+ f = open('/etc/issue')
+ lines = f.readlines()

View File

@ -6,7 +6,7 @@ Index: virt-manager-1.4.3/virtManager/connection.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/connection.py
+++ virt-manager-1.4.3/virtManager/connection.py
@@ -1086,7 +1086,7 @@ class vmmConnection(vmmGObject):
@@ -1088,7 +1088,7 @@ class vmmConnection(vmmGObject):
self.caps.get_cpu_values(self.caps.host.cpu.arch)
try:

View File

@ -118,7 +118,7 @@ Index: virt-manager-1.4.3/virtManager/connection.py
def __init__(self, uri):
vmmGObject.__init__(self)
@@ -1213,35 +1213,35 @@ class vmmConnection(vmmGObject):
@@ -1215,35 +1215,35 @@ class vmmConnection(vmmGObject):
def _update_nets(self, dopoll):
keymap = dict((o.get_connkey(), o) for o in self.list_nets())
if not dopoll or not self.is_network_capable():
@ -291,15 +291,6 @@ Index: virt-manager-1.4.3/virtManager/graphwidgets.py
def _line_helper(cairo_ct, x, y, w, h, points, for_fill=False):
@@ -316,7 +316,7 @@ class Sparkline(Gtk.DrawingArea):
w = window.get_width()
h = window.get_height()
- points_per_set = (len(self.data_array) / self.num_sets)
+ points_per_set = (len(self.data_array) // self.num_sets)
pixels_per_point = (float(w) /
(float((points_per_set - 1) or 1)))
Index: virt-manager-1.4.3/virtManager/host.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/host.py
@ -827,25 +818,3 @@ Index: virt-manager-1.4.3/virtManager/createnet.py
PAGE_MAX = PAGE_MISC
Index: virt-manager-1.4.3/virtManager/baseclass.py
===================================================================
--- virt-manager-1.4.3.orig/virtManager/baseclass.py
+++ virt-manager-1.4.3/virtManager/baseclass.py
@@ -18,6 +18,7 @@
# MA 02110-1301 USA.
#
+import io
import logging
import os
import sys
@@ -220,7 +221,8 @@ class vmmGObjectUI(vmmGObject):
self.builder = Gtk.Builder()
self.builder.set_translation_domain("virt-manager")
- self.builder.add_from_string(open(uifile).read())
+ ui = io.open(uifile, mode="r", encoding="utf-8").read()
+ self.builder.add_from_string(ui)
if not topwin:
self.topwin = self.widget(windowname)

View File

@ -1,11 +1,10 @@
Enhancement that gets the hosts installation location from
install.inf and also collects the repos provided by zypper.
Enhancement that gets installation repos from zypper.
These locations are then presented as potential installation
locations when creating a VM.
Index: virt-manager-1.4.2/virtManager/create.py
sources when creating a VM.
Index: virt-manager-1.4.3/virtManager/create.py
===================================================================
--- virt-manager-1.4.2.orig/virtManager/create.py
+++ virt-manager-1.4.2/virtManager/create.py
--- virt-manager-1.4.3.orig/virtManager/create.py
+++ virt-manager-1.4.3/virtManager/create.py
@@ -424,7 +424,13 @@ class vmmCreate(vmmGObjectUI):
self.widget("install-url-entry").set_text("")
self.widget("install-url-options").set_expanded(False)
@ -21,10 +20,10 @@ Index: virt-manager-1.4.2/virtManager/create.py
self._set_distro_labels("-", "-")
# Install import
Index: virt-manager-1.4.2/virtinst/util.py
Index: virt-manager-1.4.3/virtinst/util.py
===================================================================
--- virt-manager-1.4.2.orig/virtinst/util.py
+++ virt-manager-1.4.2/virtinst/util.py
--- virt-manager-1.4.3.orig/virtinst/util.py
+++ virt-manager-1.4.3/virtinst/util.py
@@ -23,9 +23,12 @@ import os
import random
import re
@ -38,7 +37,7 @@ Index: virt-manager-1.4.2/virtinst/util.py
def listify(l):
if l is None:
@@ -317,3 +320,104 @@ def make_meter(quiet):
@@ -317,3 +320,57 @@ def make_meter(quiet):
if quiet:
return progress.BaseMeter()
return progress.TextMeter(fo=sys.stdout)
@ -50,57 +49,10 @@ Index: virt-manager-1.4.2/virtinst/util.py
+ if os.geteuid() != 0:
+ return None
+
+ if os.path.exists('/var/lib/YaST2/install.inf'):
+ server_ip = server_name = server_dir = inst_mode = None
+ f = open('/var/lib/YaST2/install.inf')
+ lines = f.readlines()
+ f.close()
+ # Newer install.inf files use RepoURL. Older versions require parsing more fields
+ for line in lines:
+ if line.startswith('RepoURL:'):
+ repo_url = line[:-1].split('?', 1)[0]
+ repo_url = repo_url.split(' ')
+ if len(repo_url) > 1:
+ if repo_url[1].startswith('ftp:') or repo_url[1].startswith('http:') or \
+ repo_url[1].startswith('smb:') or repo_url[1].startswith('nfs:'):
+ _host_repo_url = repo_url[1]
+ return repo_url[1]
+ return None
+ elif line.startswith('InstMode:'):
+ inst_mode = line[:-1].split('?', 1)[0]
+ inst_mode = inst_mode.split(' ')
+ inst_mode = inst_mode[1]
+ if inst_mode != 'ftp' and inst_mode != 'http' and inst_mode != 'smb' and inst_mode != 'nfs':
+ return None
+ elif line.startswith('ServerIP:'):
+ server_ip = line[:-1].split('?', 1)[0]
+ server_ip = server_ip.split(' ')
+ server_ip = server_ip[1]
+ elif line.startswith('ServerName:'):
+ server_name = line[:-1].split('?', 1)[0]
+ server_name = server_name.split(' ')
+ server_name = server_name[1]
+ elif line.startswith('Serverdir:'):
+ server_dir = line[:-1].split('?', 1)[0]
+ server_dir = server_dir.split(' ')
+ server_dir = server_dir[1]
+ if inst_mode:
+ repo_url = inst_mode + "://"
+ if server_name:
+ repo_url = repo_url + server_name + "/"
+ if server_dir:
+ repo_url = repo_url + server_dir
+ elif server_ip:
+ repo_url = repo_url + server_ip + "/"
+ if server_dir:
+ repo_url = repo_url + server_dir
+ _host_repo_url = repo_url
+ return repo_url
+ else:
+ (_,zypper_output) = lookupZypperRepos()
+ if len(zypper_output):
+ _host_repo_url = zypper_output[0]
+ return _host_repo_url
+ (_,zypper_output) = lookupZypperRepos()
+ if len(zypper_output):
+ _host_repo_url = zypper_output[0]
+ return _host_repo_url
+ return None
+
+def lookupZypperRepos(dom0_inst_source=None):
@ -110,7 +62,7 @@ Index: virt-manager-1.4.2/virtinst/util.py
+ cmd = ['/usr/bin/zypper', 'lr', '-u', '-P', '-E']
+ p = subprocess.Popen(cmd, stdout=PIPE, stderr=PIPE, env=env)
+ stdout, stderr = p.communicate()
+ zypper_output = stdout
+ zypper_output = stdout.decode()
+ zypper_list = zypper_output.split("\n")
+ zypper_header = [x.strip(' ') for x in zypper_list[0].split("|")]
+ uri_index = zypper_header.index("URI")