- Upstream bug fixes (bsc#1027942)

b8aff280-virtinst-quickfix-ubuntu-net-preseed-insert-cdrom-error.patch
  25b88733-urldetect-Dont-overload-suse_content-variable.patch
  9308bae3-util-Fix-typo-vpcu-vcpu.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=438
This commit is contained in:
Charles Arnold 2018-10-30 22:11:22 +00:00 committed by Git OBS Bridge
parent 674d49879e
commit 686ee09506
9 changed files with 184 additions and 7 deletions

View File

@ -0,0 +1,49 @@
Subject: urldetect: Don't overload suse_content variable
From: Cole Robinson crobinso@redhat.com Thu Oct 18 17:16:14 2018 -0400
Date: Thu Oct 18 17:16:14 2018 -0400:
Git: 25b8873340cd7523a74babbd5b6c0f5c66935a05
Use an explicit check_for_suse_content variable rather than
stuffing -1 into suse_content
diff --git a/virtinst/urldetect.py b/virtinst/urldetect.py
index 4196b10..455ae00 100644
--- a/virtinst/urldetect.py
+++ b/virtinst/urldetect.py
@@ -28,6 +28,7 @@ class _DistroCache(object):
self.treeinfo_name = None
self.suse_content = None
+ self.checked_for_suse_content = False
self.debian_media_type = None
def acquire_file_content(self, path):
@@ -493,8 +494,8 @@ class SuseDistro(Distro):
if cache.treeinfo_family_regex(cls.famregex):
return True
- if not cache.suse_content:
- cache.suse_content = -1
+ if not cache.checked_for_suse_content:
+ cache.checked_for_suse_content = True
content_str = cache.acquire_file_content("content")
if content_str is None:
return False
@@ -505,7 +506,7 @@ class SuseDistro(Distro):
logging.debug("Error parsing SUSE content file: %s", str(e))
return False
- if cache.suse_content == -1:
+ if not cache.suse_content:
return False
for regex in cls._suse_regex:
if re.match(regex, cache.suse_content.product_name):
@@ -515,7 +516,7 @@ class SuseDistro(Distro):
def __init__(self, *args, **kwargs):
Distro.__init__(self, *args, **kwargs)
- if not self.cache.suse_content or self.cache.suse_content == -1:
+ if not self.cache.suse_content:
# This means we matched on treeinfo
self._kernel_paths = self.cache.get_treeinfo_media(self.type)
return

View File

@ -0,0 +1,20 @@
Subject: util: Fix typo vpcu -> vcpu
From: Martin Kletzander mkletzan@redhat.com Mon Oct 22 14:46:03 2018 +0100
Date: Mon Oct 22 15:05:30 2018 +0100:
Git: 9308bae310ff7889876d8c9d6f0187356e0fa2ce
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
diff --git a/man/virt-install.pod b/man/virt-install.pod
index 8cd56fe..062c785 100644
--- a/man/virt-install.pod
+++ b/man/virt-install.pod
@@ -262,7 +262,7 @@ Tune CPU parameters for the guest.
Configure which of the host's physical CPUs the domain VCPU will be pinned to. Example invocation
- --cputune vpcupin0.vcpu=0,vpcupin0.cpuset=0-3,vpcupin1.vcpu=1,vpcupin1.cpuset=4-7
+ --cputune vcpupin0.vcpu=0,vcpupin0.cpuset=0-3,vcpupin1.vcpu=1,vcpupin1.cpuset=4-7
Use --cputune=? to see a list of all available sub options. Complete details at L<https://libvirt.org/formatdomain.html#elementsCPUTuning>

View File

@ -0,0 +1,94 @@
Subject: virtinst: quickfix ubuntu net-preseed insert cdrom error
From: Johannes Tiefenbacher johannes.tiefenbacher@svc.co.at Tue Oct 9 15:52:23 2018 +0200
Date: Thu Oct 18 13:21:41 2018 -0400:
Git: b8aff28087d593f570b13aabe337b659bc260ae3
the proper kernel/initrd pair for booting from an http server is found in install/netboot/... on a mounted ubuntu iso.
this last worked in v1.4.2
Discussion: https://github.com/virt-manager/virt-manager/pull/34
(crobinso: add the fetcher.is_iso handling and add a comment)
diff --git a/virtinst/urldetect.py b/virtinst/urldetect.py
index 5da15d0..4196b10 100644
--- a/virtinst/urldetect.py
+++ b/virtinst/urldetect.py
@@ -30,7 +30,6 @@ class _DistroCache(object):
self.suse_content = None
self.debian_media_type = None
-
def acquire_file_content(self, path):
if path not in self._filecache:
try:
@@ -133,6 +132,9 @@ class _DistroCache(object):
verstr, version, update)
return version, update
+ def fetcher_is_iso(self):
+ return self._fetcher.is_iso()
+
class _SUSEContent(object):
"""
@@ -664,7 +666,16 @@ class DebianDistro(Distro):
media_type = "daily"
elif cache.content_regex(".disk/info",
"%s.*" % cls._debname.capitalize()):
- media_type = "disk"
+ # There's two cases here:
+ # 1) Direct access ISO, attached as CDROM afterwards. We
+ # use one set of kernels in that case which seem to
+ # assume the prescence of CDROM media
+ # 2) ISO mounted and exported over URL. We use a different
+ # set of kernels that expect to boot from the network
+ if cache.fetcher_is_iso():
+ media_type = "disk"
+ else:
+ media_type = "mounted_iso_url"
if media_type:
cache.debian_media_type = media_type
@@ -710,6 +721,8 @@ class DebianDistro(Distro):
url_prefix = "current/images"
if self.cache.debian_media_type == "daily":
url_prefix = "daily"
+ elif self.cache.debian_media_type == "mounted_iso_url":
+ url_prefix = "install"
tree_arch = self._find_treearch()
hvmroot = "%s/netboot/%s-installer/%s/" % (url_prefix,
diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py
index 56c024a..e18fe98 100644
--- a/virtinst/urlfetcher.py
+++ b/virtinst/urlfetcher.py
@@ -26,6 +26,7 @@ class _URLFetcher(object):
a media source, such as CD ISO, or HTTP/HTTPS/FTP server
"""
_block_size = 16384
+ _is_iso = False
def __init__(self, location, scratchdir, meter):
self.location = location
@@ -101,6 +102,12 @@ class _URLFetcher(object):
# Public API #
##############
+ def is_iso(self):
+ """
+ If this is a fetcher for local CDROM/ISO
+ """
+ return self._is_iso
+
def prepareLocation(self):
"""
Perform any necessary setup
@@ -288,6 +295,7 @@ class _LocalURLFetcher(_URLFetcher):
class _ISOURLFetcher(_URLFetcher):
_cache_file_list = None
+ _is_iso = True
def _make_full_url(self, filename):
return "/" + filename

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Oct 30 16:06:51 MDT 2018 - carnold@suse.com
- Upstream bug fixes (bsc#1027942)
b8aff280-virtinst-quickfix-ubuntu-net-preseed-insert-cdrom-error.patch
25b88733-urldetect-Dont-overload-suse_content-variable.patch
9308bae3-util-Fix-typo-vpcu-vcpu.patch
-------------------------------------------------------------------
Tue Oct 30 15:37:09 MDT 2018 - carnold@suse.com

View File

@ -32,6 +32,9 @@ Source1: virt-install.rb
Source2: virt-install.desktop
Source3: virt-manager-supportconfig
# Upstream Patches
Patch1: b8aff280-virtinst-quickfix-ubuntu-net-preseed-insert-cdrom-error.patch
Patch2: 25b88733-urldetect-Dont-overload-suse_content-variable.patch
Patch3: 9308bae3-util-Fix-typo-vpcu-vcpu.patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
@ -159,6 +162,9 @@ machine).
%prep
%setup -q
# Upstream Patches
%patch1 -p1
%patch2 -p1
%patch3 -p1
# SUSE Only
%patch70 -p1
%patch71 -p1

View File

@ -4,7 +4,7 @@ Index: virt-manager-2.0.0/virtinst/urldetect.py
===================================================================
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
+++ virt-manager-2.0.0/virtinst/urldetect.py
@@ -235,6 +235,12 @@ class _SUSEContent(object):
@@ -238,6 +238,12 @@ class _SUSEContent(object):
self.product_name.strip().rsplit(' ')[5][2])
distro_version = sle_version
@ -17,7 +17,7 @@ Index: virt-manager-2.0.0/virtinst/urldetect.py
return distro_version
@@ -567,6 +573,9 @@ class SuseDistro(Distro):
@@ -570,6 +576,9 @@ class SuseDistro(Distro):
# Tumbleweed 8 digit date
return "opensusetumbleweed"
@ -27,7 +27,7 @@ Index: virt-manager-2.0.0/virtinst/urldetect.py
if int(version) < 10:
return self._variant_prefix + "9"
@@ -642,6 +651,13 @@ class OpensuseDistro(SuseDistro):
@@ -645,6 +654,13 @@ class OpensuseDistro(SuseDistro):
famregex = ".*openSUSE.*"

View File

@ -4,7 +4,7 @@ Index: virt-manager-2.0.0/virtinst/urldetect.py
===================================================================
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
+++ virt-manager-2.0.0/virtinst/urldetect.py
@@ -627,6 +627,13 @@ class SuseDistro(Distro):
@@ -630,6 +630,13 @@ class SuseDistro(Distro):
return "install"

View File

@ -4,7 +4,7 @@ Index: virt-manager-2.0.0/virtinst/urldetect.py
===================================================================
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
+++ virt-manager-2.0.0/virtinst/urldetect.py
@@ -570,7 +570,7 @@ class SuseDistro(Distro):
@@ -573,7 +573,7 @@ class SuseDistro(Distro):
if int(version) < 10:
return self._variant_prefix + "9"
@ -13,7 +13,7 @@ Index: virt-manager-2.0.0/virtinst/urldetect.py
sp_version = ""
if len(distro_version.split('.', 1)) == 2:
sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
@@ -642,6 +642,13 @@ class OpensuseDistro(SuseDistro):
@@ -645,6 +645,13 @@ class OpensuseDistro(SuseDistro):
famregex = ".*openSUSE.*"

View File

@ -8,7 +8,7 @@ Index: virt-manager-2.0.0/virtinst/urldetect.py
===================================================================
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
+++ virt-manager-2.0.0/virtinst/urldetect.py
@@ -538,9 +538,14 @@ class SuseDistro(Distro):
@@ -541,9 +541,14 @@ class SuseDistro(Distro):
self._kernel_paths = []
if self.type == "xen":
# Matches Opensuse > 10.2 and sles 10