From 404c30b2d854b9800a41428efafae4b2b16c4774 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Tue, 19 Jun 2018 18:42:22 +0000 Subject: [PATCH] - bsc#1098054 - osinfo-query and virt-install do not detect caasp3.0 virtinst-add-caasp-support.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=427 --- virt-manager.changes | 7 ++++++ virtinst-add-caasp-support.patch | 18 ++++++++------- virtinst-add-sle15-detection-support.patch | 22 +++++++++---------- ...inst-handle-tumbleweed-treeinfo-file.patch | 8 +++---- virtinst-python2-to-python3-conversion.patch | 8 +++---- virtinst-use-xenpae-kernel-for-32bit.patch | 8 +++---- 6 files changed, 40 insertions(+), 31 deletions(-) diff --git a/virt-manager.changes b/virt-manager.changes index c919da31..48ef1710 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 19 11:22:52 MDT 2018 - carnold@suse.com + +- bsc#1098054 - osinfo-query and virt-install do not detect + caasp3.0 + virtinst-add-caasp-support.patch + ------------------------------------------------------------------- Thu May 31 11:45:17 MDT 2018 - carnold@suse.com diff --git a/virtinst-add-caasp-support.patch b/virtinst-add-caasp-support.patch index 3d097c6f..c07134e8 100644 --- a/virtinst-add-caasp-support.patch +++ b/virtinst-add-caasp-support.patch @@ -1,21 +1,23 @@ References: bsc#1010060 -Index: virt-manager-1.5.0/virtinst/urlfetcher.py +Index: virt-manager-1.5.1/virtinst/urlfetcher.py =================================================================== ---- virt-manager-1.5.0.orig/virtinst/urlfetcher.py -+++ virt-manager-1.5.0/virtinst/urlfetcher.py -@@ -490,6 +490,10 @@ def _distroFromSUSEContent(fetcher, arch +--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py ++++ virt-manager-1.5.1/virtinst/urlfetcher.py +@@ -490,6 +490,12 @@ def _distroFromSUSEContent(fetcher, arch dclass = OESDistro if distro_version is None: distro_version = _parse_sle_distribution(distribution) -+ elif re.match(".*SUSE Container as a Service Platform*", distribution[1]): ++ elif re.match(".*SUSE Container as a Service Platform*", distribution[1]) or \ ++ re.match(".*SUSE CaaS Platform*", distribution[1]): + dclass = CAASPDistro + if distro_version is None: -+ distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[6]] ++ dparts = distribution[1].strip().rsplit(' ') ++ distro_version = ['VERSION', dparts[len(dparts)-1]] elif re.match(".*openSUSE.*", distribution[1]): dclass = OpensuseDistro if distro_version is None: -@@ -1076,6 +1080,8 @@ class SuseDistro(Distro): +@@ -1076,6 +1082,8 @@ class SuseDistro(Distro): self.os_variant += major_version + 'sp' + sp_version else: self.os_variant += major_version @@ -24,7 +26,7 @@ Index: virt-manager-1.5.0/virtinst/urlfetcher.py else: self.os_variant += "9" -@@ -1122,6 +1128,11 @@ class SLESDistro(SuseDistro): +@@ -1122,6 +1130,11 @@ class SLESDistro(SuseDistro): class SLEDDistro(SuseDistro): urldistro = "sled" diff --git a/virtinst-add-sle15-detection-support.patch b/virtinst-add-sle15-detection-support.patch index 5e110e93..499fe85b 100644 --- a/virtinst-add-sle15-detection-support.patch +++ b/virtinst-add-sle15-detection-support.patch @@ -6,10 +6,10 @@ We must continue to keep the content parsing code for the older distros. As a fallback, detection is also setup to look at the media.1/products and media.1/build files. -Index: virt-manager-1.5.0/virtinst/urlfetcher.py +Index: virt-manager-1.5.1/virtinst/urlfetcher.py =================================================================== ---- virt-manager-1.5.0.orig/virtinst/urlfetcher.py -+++ virt-manager-1.5.0/virtinst/urlfetcher.py +--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py ++++ virt-manager-1.5.1/virtinst/urlfetcher.py @@ -416,7 +416,23 @@ def _distroFromSUSEContent(fetcher, arch try: cbuf = fetcher.acquireFileContent("content") @@ -44,10 +44,10 @@ Index: virt-manager-1.5.0/virtinst/urlfetcher.py dclass = SLESDistro if distro_version is None: distro_version = _parse_sle_distribution(distribution) -@@ -505,10 +521,13 @@ def _distroFromSUSEContent(fetcher, arch - dclass = CAASPDistro +@@ -507,10 +523,13 @@ def _distroFromSUSEContent(fetcher, arch if distro_version is None: - distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[6]] + dparts = distribution[1].strip().rsplit(' ') + distro_version = ['VERSION', dparts[len(dparts)-1]] - elif re.match(".*openSUSE.*", distribution[1]): + elif re.match(".*openSUSE.*", distribution[1]) or re.match("openSUSE *", distribution[1]): dclass = OpensuseDistro @@ -60,7 +60,7 @@ Index: virt-manager-1.5.0/virtinst/urlfetcher.py if distro_version is None: return None -@@ -1027,6 +1046,7 @@ class SLDistro(RHELDistro): +@@ -1029,6 +1048,7 @@ class SLDistro(RHELDistro): class SuseDistro(Distro): name = "SUSE" @@ -68,7 +68,7 @@ Index: virt-manager-1.5.0/virtinst/urlfetcher.py _boot_iso_paths = ["boot/boot.iso"] -@@ -1064,8 +1084,11 @@ class SuseDistro(Distro): +@@ -1066,8 +1086,11 @@ class SuseDistro(Distro): self._xen_kernel_paths = [("boot/%s/vmlinuz-xenpae" % self.arch, "boot/%s/initrd-xenpae" % self.arch)] else: @@ -82,7 +82,7 @@ Index: virt-manager-1.5.0/virtinst/urlfetcher.py def _variantFromVersion(self): distro_version = self.version_from_content[1].strip() -@@ -1077,7 +1100,7 @@ class SuseDistro(Distro): +@@ -1079,7 +1102,7 @@ class SuseDistro(Distro): if len(distro_version.split('.', 1)) == 2: sp_version = 'sp' + distro_version.split('.', 1)[1].strip() self.os_variant += version @@ -91,7 +91,7 @@ Index: virt-manager-1.5.0/virtinst/urlfetcher.py self.os_variant += sp_version elif self.os_variant.startswith("opensuse"): if len(version) == 8: -@@ -1101,6 +1124,24 @@ class SuseDistro(Distro): +@@ -1103,6 +1126,24 @@ class SuseDistro(Distro): self.os_variant += "9" def isValidStore(self): @@ -116,7 +116,7 @@ Index: virt-manager-1.5.0/virtinst/urlfetcher.py # self.version_from_content is the VERSION line from the contents file if (not self.version_from_content or self.version_from_content[1] is None): -@@ -1152,8 +1193,6 @@ class OESDistro(SuseDistro): +@@ -1154,8 +1195,6 @@ class OESDistro(SuseDistro): urldistro = "oes" diff --git a/virtinst-handle-tumbleweed-treeinfo-file.patch b/virtinst-handle-tumbleweed-treeinfo-file.patch index dad128ac..db540030 100644 --- a/virtinst-handle-tumbleweed-treeinfo-file.patch +++ b/virtinst-handle-tumbleweed-treeinfo-file.patch @@ -1,11 +1,11 @@ References: bsc#1091113 In Tumbleweed the .treeinfo file has no version as it is mostly meaningless. -Index: virt-manager-1.5.0/virtinst/urlfetcher.py +Index: virt-manager-1.5.1/virtinst/urlfetcher.py =================================================================== ---- virt-manager-1.5.0.orig/virtinst/urlfetcher.py -+++ virt-manager-1.5.0/virtinst/urlfetcher.py -@@ -1136,7 +1136,10 @@ class SuseDistro(Distro): +--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py ++++ virt-manager-1.5.1/virtinst/urlfetcher.py +@@ -1138,7 +1138,10 @@ class SuseDistro(Distro): "Open Enterprise" in family and 'oes' in self.urldistro: ret = True if ret: diff --git a/virtinst-python2-to-python3-conversion.patch b/virtinst-python2-to-python3-conversion.patch index fdf04fdd..5779a7fb 100644 --- a/virtinst-python2-to-python3-conversion.patch +++ b/virtinst-python2-to-python3-conversion.patch @@ -497,7 +497,7 @@ Index: virt-manager-1.5.1/virtinst/urlfetcher.py except: bbuf = ["x86_64"] cbuf = cbuf + "\n" + " ".join(bbuf) -@@ -645,7 +652,7 @@ class Distro(object): +@@ -647,7 +654,7 @@ class Distro(object): try: kernelpath = self._getTreeinfoMedia("kernel") initrdpath = self._getTreeinfoMedia("initrd") @@ -506,7 +506,7 @@ Index: virt-manager-1.5.1/virtinst/urlfetcher.py pass if not kernelpath or not initrdpath: -@@ -712,6 +719,7 @@ class Distro(object): +@@ -714,6 +721,7 @@ class Distro(object): # Fetch 'filename' and return True/False if it matches the regex try: content = self.fetcher.acquireFileContent(filename) @@ -514,7 +514,7 @@ Index: virt-manager-1.5.1/virtinst/urlfetcher.py except ValueError: return False -@@ -781,15 +789,15 @@ class GenericDistro(Distro): +@@ -783,15 +791,15 @@ class GenericDistro(Distro): self._valid_kernel_path = ( self._getTreeinfoMedia("kernel"), self._getTreeinfoMedia("initrd")) @@ -533,7 +533,7 @@ Index: virt-manager-1.5.1/virtinst/urlfetcher.py logging.debug(e) if self.type == "xen": -@@ -1475,7 +1483,7 @@ class ALTLinuxDistro(Distro): +@@ -1477,7 +1485,7 @@ class ALTLinuxDistro(Distro): # Build list of all *Distro classes def _build_distro_list(): allstores = [] diff --git a/virtinst-use-xenpae-kernel-for-32bit.patch b/virtinst-use-xenpae-kernel-for-32bit.patch index 9ecfe5f5..2525011c 100644 --- a/virtinst-use-xenpae-kernel-for-32bit.patch +++ b/virtinst-use-xenpae-kernel-for-32bit.patch @@ -4,11 +4,11 @@ a non pae version. The sles10 sp4 32bit kernel will only boot para- virtualized if the pae kernel is selected. Note that sles12 and newer has no 32bit release. -Index: virt-manager-1.5.0/virtinst/urlfetcher.py +Index: virt-manager-1.5.1/virtinst/urlfetcher.py =================================================================== ---- virt-manager-1.5.0.orig/virtinst/urlfetcher.py -+++ virt-manager-1.5.0/virtinst/urlfetcher.py -@@ -1049,8 +1049,12 @@ class SuseDistro(Distro): +--- virt-manager-1.5.1.orig/virtinst/urlfetcher.py ++++ virt-manager-1.5.1/virtinst/urlfetcher.py +@@ -1051,8 +1051,12 @@ class SuseDistro(Distro): "boot/%s/initrd" % self.arch)) # Matches Opensuse > 10.2 and sles 10