- Fix sle15 detection because of changes in osinfo-db (bsc#1054986)

virtinst-add-sle15-detection-support.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=430
This commit is contained in:
Charles Arnold 2018-07-17 14:59:44 +00:00 committed by Git OBS Bridge
parent 3228f1bc39
commit e40190cf63
5 changed files with 35 additions and 13 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jul 13 16:03:17 MDT 2018 - carnold@suse.com
- Fix sle15 detection because of changes in osinfo-db (bsc#1054986)
virtinst-add-sle15-detection-support.patch
-------------------------------------------------------------------
Wed Jun 20 11:04:14 MDT 2018 - carnold@suse.com

View File

@ -82,7 +82,12 @@ Index: virt-manager-1.5.1/virtinst/urlfetcher.py
def _variantFromVersion(self):
distro_version = self.version_from_content[1].strip()
@@ -1079,7 +1102,7 @@ class SuseDistro(Distro):
@@ -1075,11 +1098,11 @@ class SuseDistro(Distro):
self.os_variant = self.urldistro
sp_version = None
- if self.os_variant.startswith(("sles", "sled")):
+ if self.os_variant.startswith(("sle")):
if len(distro_version.split('.', 1)) == 2:
sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
self.os_variant += version
@ -101,7 +106,7 @@ Index: virt-manager-1.5.1/virtinst/urlfetcher.py
+ family = self.treeinfo.get("general", "family")
+ if "SUSE Linux Enterprise Server" in family and 'sles' in self.urldistro or \
+ "SUSE Linux Enterprise Desktop" in family and 'sled' in self.urldistro or \
+ "SUSE Linux Enterprise" in family and 'sles' in self.urldistro or \
+ "SUSE Linux Enterprise" in family and 'sle' in self.urldistro or \
+ "SUSE Containers" in family and 'caasp' in self.urldistro or \
+ "openSUSE" in family and 'opensuse' in self.urldistro or \
+ "Open Enterprise" in family and 'oes' in self.urldistro:
@ -116,7 +121,18 @@ Index: virt-manager-1.5.1/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):
@@ -1154,8 +1195,6 @@ class OESDistro(SuseDistro):
@@ -1138,6 +1179,10 @@ class SuseDistro(Distro):
return self.os_variant
+class SLEDistro(SuseDistro):
+ urldistro = "sle"
+
+
class SLESDistro(SuseDistro):
urldistro = "sles"
@@ -1154,8 +1199,6 @@ class OESDistro(SuseDistro):
urldistro = "oes"

View File

@ -3,10 +3,10 @@ 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
Index: virt-manager-1.5.1/virtinst/osdict.py
===================================================================
--- virt-manager-1.4.3.orig/virtinst/osdict.py
+++ virt-manager-1.4.3/virtinst/osdict.py
--- virt-manager-1.5.1.orig/virtinst/osdict.py
+++ virt-manager-1.5.1/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
@ -15,7 +15,7 @@ Index: virt-manager-1.4.3/virtinst/osdict.py
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",
+ "sle15", "sles12sp3", "sles12sp2", "sles12sp1", "sles11sp4",
+ "tumbleweed", "opensuse15", "opensuse42.3" ],
check_clones=False, check_derives=False):
return True

View File

@ -541,7 +541,7 @@ Index: virt-manager-1.5.1/virtinst/urlfetcher.py
logging.debug(e)
if self.type == "xen":
@@ -1477,7 +1486,7 @@ class ALTLinuxDistro(Distro):
@@ -1481,7 +1490,7 @@ class ALTLinuxDistro(Distro):
# Build list of all *Distro classes
def _build_distro_list():
allstores = []

View File

@ -1,9 +1,9 @@
Enhancement to default to the host os version when creating a VM
and media detection of the install source is turned off.
Index: virt-manager-1.5.0/virtManager/create.py
Index: virt-manager-1.5.1/virtManager/create.py
===================================================================
--- virt-manager-1.5.0.orig/virtManager/create.py
+++ virt-manager-1.5.0/virtManager/create.py
--- virt-manager-1.5.1.orig/virtManager/create.py
+++ virt-manager-1.5.1/virtManager/create.py
@@ -24,6 +24,9 @@ import pkgutil
import os
import threading
@ -37,8 +37,8 @@ Index: virt-manager-1.5.0/virtManager/create.py
+ os_ver = "opensuse" + parts[3]
+ return 'linux', os_ver
+ return 'linux', 'opensuse42.2'
+ if "SUSE Linux Enterprise Server 15" in line:
+ return 'linux', ('sles15' + _lookup_sp(line))
+ if "SUSE Linux Enterprise 15" in line:
+ return 'linux', ('sle15' + _lookup_sp(line))
+ if "SUSE Linux Enterprise Server 12" in line:
+ return 'linux', ('sles12' + _lookup_sp(line))
+ if "SUSE Linux Enterprise Server 11" in line: