- Fix initializing the default host installation source location
(bsc#1027942) virtman-default-guest-from-host-os.patch virtman-show-suse-install-repos.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=343
This commit is contained in:
parent
8101167365
commit
bd3768f9a6
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 15 22:24:27 MDT 2017 - carnold@suse.com
|
||||
|
||||
- Fix initializing the default host installation source location
|
||||
(bsc#1027942)
|
||||
virtman-default-guest-from-host-os.patch
|
||||
virtman-show-suse-install-repos.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 9 08:34:24 MST 2017 - carnold@suse.com
|
||||
|
||||
|
@ -3,11 +3,11 @@ Enhancement for the following GUI wizard installation options.
|
||||
is the default
|
||||
2) Under 'Network selection' default to a bridge that has an actual
|
||||
IP address if available (not just the first one found).
|
||||
Index: virt-manager-1.4.0/virtManager/create.py
|
||||
Index: virt-manager-1.4.1/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.0.orig/virtManager/create.py
|
||||
+++ virt-manager-1.4.0/virtManager/create.py
|
||||
@@ -376,7 +376,19 @@ class vmmCreate(vmmGObjectUI):
|
||||
--- virt-manager-1.4.1.orig/virtManager/create.py
|
||||
+++ virt-manager-1.4.1/virtManager/create.py
|
||||
@@ -377,7 +377,19 @@ class vmmCreate(vmmGObjectUI):
|
||||
self.widget("method-local").set_active(True)
|
||||
self.widget("create-conn").set_active(-1)
|
||||
activeconn = self._populate_conn_list(urihint)
|
||||
@ -28,10 +28,10 @@ Index: virt-manager-1.4.0/virtManager/create.py
|
||||
|
||||
if self._set_conn(activeconn) is False:
|
||||
return False
|
||||
Index: virt-manager-1.4.0/virtManager/netlist.py
|
||||
Index: virt-manager-1.4.1/virtManager/netlist.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.0.orig/virtManager/netlist.py
|
||||
+++ virt-manager-1.4.0/virtManager/netlist.py
|
||||
--- virt-manager-1.4.1.orig/virtManager/netlist.py
|
||||
+++ virt-manager-1.4.1/virtManager/netlist.py
|
||||
@@ -167,9 +167,19 @@ class vmmNetworkList(vmmGObjectUI):
|
||||
return rows, vnet_bridges, default_label
|
||||
|
||||
|
@ -9,9 +9,9 @@ Index: virt-manager-1.4.1/virtinst/util.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.1.orig/virtinst/util.py
|
||||
+++ virt-manager-1.4.1/virtinst/util.py
|
||||
@@ -444,3 +444,22 @@ def getInstallRepos(enabled_sources_only
|
||||
return (index_dom0, zypper_output)
|
||||
|
||||
@@ -447,3 +447,22 @@ def getInstallRepos():
|
||||
return (0, [])
|
||||
return lookupZypperRepos(getHostInstallSource())
|
||||
|
||||
+def sanitize_url(url):
|
||||
+ """
|
||||
|
@ -1,11 +1,11 @@
|
||||
References: bsc#919692
|
||||
Because openSUSE repos combine 32 and 64 bit sources we need to
|
||||
continue showing the 'Architecture' pop-up.
|
||||
Index: virt-manager-1.4.0/virtManager/create.py
|
||||
Index: virt-manager-1.4.1/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.0.orig/virtManager/create.py
|
||||
+++ virt-manager-1.4.0/virtManager/create.py
|
||||
@@ -780,11 +780,6 @@ class vmmCreate(vmmGObjectUI):
|
||||
--- virt-manager-1.4.1.orig/virtManager/create.py
|
||||
+++ virt-manager-1.4.1/virtManager/create.py
|
||||
@@ -781,11 +781,6 @@ class vmmCreate(vmmGObjectUI):
|
||||
for guest in self.conn.caps.guests:
|
||||
if guest.os_type == self._capsinfo.os_type:
|
||||
archs.append(guest.arch)
|
||||
|
@ -1,19 +1,20 @@
|
||||
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.4.0/virtManager/create.py
|
||||
Index: virt-manager-1.4.1/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.0.orig/virtManager/create.py
|
||||
+++ virt-manager-1.4.0/virtManager/create.py
|
||||
@@ -21,6 +21,8 @@
|
||||
--- virt-manager-1.4.1.orig/virtManager/create.py
|
||||
+++ virt-manager-1.4.1/virtManager/create.py
|
||||
@@ -21,6 +21,9 @@
|
||||
import logging
|
||||
import threading
|
||||
import time
|
||||
+import sys
|
||||
+import os
|
||||
+import re
|
||||
|
||||
from gi.repository import GObject
|
||||
from gi.repository import Gtk
|
||||
@@ -968,7 +970,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
@@ -968,7 +971,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
preferred = self.config.preferred_distros
|
||||
variants = virtinst.OSDB.list_os(typename=_type, sortpref=preferred)
|
||||
supportl = virtinst.OSDB.list_os(typename=_type, sortpref=preferred,
|
||||
@ -22,11 +23,17 @@ Index: virt-manager-1.4.0/virtManager/create.py
|
||||
|
||||
for v in variants:
|
||||
supported = v in supportl or v.name == "generic"
|
||||
@@ -1324,6 +1326,53 @@ class vmmCreate(vmmGObjectUI):
|
||||
@@ -1324,6 +1327,59 @@ class vmmCreate(vmmGObjectUI):
|
||||
def _cdrom_changed(self, src):
|
||||
self._detectable_media_widget_changed(src)
|
||||
|
||||
+ def _lookup_host_os(self):
|
||||
+ def _lookup_sp(line):
|
||||
+ sp = ""
|
||||
+ m = re.search(' SP[1234] ', line)
|
||||
+ if m:
|
||||
+ sp = m.group(0).strip().lower()
|
||||
+ return sp
|
||||
+ if sys.platform == 'linux2':
|
||||
+ if os.path.exists('/etc/issue'):
|
||||
+ f = open('/etc/issue')
|
||||
@ -40,13 +47,13 @@ Index: virt-manager-1.4.0/virtManager/create.py
|
||||
+ return 'linux', os_ver
|
||||
+ return 'linux', 'opensuse13.2'
|
||||
+ if "SUSE Linux Enterprise Server 12" in line:
|
||||
+ return 'linux', 'sles12'
|
||||
+ return 'linux', ('sles12' + _lookup_sp(line))
|
||||
+ if "SUSE Linux Enterprise Desktop 12" in line:
|
||||
+ return 'linux', 'sled12'
|
||||
+ return 'linux', ('sled12' + _lookup_sp(line))
|
||||
+ if "SUSE Linux Enterprise Server 11" in line:
|
||||
+ return 'linux', 'sles11'
|
||||
+ return 'linux', ('sles11' + _lookup_sp(line))
|
||||
+ if "SUSE Linux Enterprise Desktop 11" in line:
|
||||
+ return 'linux', 'sled11'
|
||||
+ return 'linux', ('sled11' + _lookup_sp(line))
|
||||
+ return None, None
|
||||
+
|
||||
+ def detect_host_os(self):
|
||||
@ -76,7 +83,7 @@ Index: virt-manager-1.4.0/virtManager/create.py
|
||||
def _toggle_detect_os(self, src):
|
||||
dodetect = src.get_active()
|
||||
|
||||
@@ -1336,6 +1385,8 @@ class vmmCreate(vmmGObjectUI):
|
||||
@@ -1336,6 +1392,8 @@ class vmmCreate(vmmGObjectUI):
|
||||
self.widget("install-os-version-entry").set_text("")
|
||||
self._os_already_detected_for_media = False
|
||||
self._start_detect_os_if_needed()
|
||||
|
@ -1,9 +1,9 @@
|
||||
Enhancement to default to PV instead of HVM on Xen host.
|
||||
Index: virt-manager-1.4.0/virtManager/create.py
|
||||
Index: virt-manager-1.4.1/virtManager/create.py
|
||||
===================================================================
|
||||
--- virt-manager-1.4.0.orig/virtManager/create.py
|
||||
+++ virt-manager-1.4.0/virtManager/create.py
|
||||
@@ -690,7 +690,12 @@ class vmmCreate(vmmGObjectUI):
|
||||
--- virt-manager-1.4.1.orig/virtManager/create.py
|
||||
+++ virt-manager-1.4.1/virtManager/create.py
|
||||
@@ -691,7 +691,12 @@ class vmmCreate(vmmGObjectUI):
|
||||
if gtype is None:
|
||||
# If none specified, prefer HVM so install options aren't limited
|
||||
# with a default PV choice.
|
||||
|
@ -38,7 +38,7 @@ Index: virt-manager-1.4.1/virtinst/util.py
|
||||
|
||||
def listify(l):
|
||||
if l is None:
|
||||
@@ -343,3 +346,101 @@ def make_meter(quiet):
|
||||
@@ -343,3 +346,104 @@ def make_meter(quiet):
|
||||
if quiet:
|
||||
return progress.BaseMeter()
|
||||
return progress.TextMeter(fo=sys.stdout)
|
||||
@ -96,19 +96,18 @@ Index: virt-manager-1.4.1/virtinst/util.py
|
||||
+ 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
|
||||
+ return None
|
||||
+
|
||||
+def getInstallRepos(enabled_sources_only = True):
|
||||
+ if os.geteuid() != 0:
|
||||
+ return (0, [])
|
||||
+ dom0_inst_source = getHostInstallSource()
|
||||
+def lookupZypperRepos(dom0_inst_source=None):
|
||||
+ try:
|
||||
+ env = os.environ.copy()
|
||||
+ env['LC_ALL'] = 'C'
|
||||
+ if enabled_sources_only is True:
|
||||
+ cmd = ['/usr/bin/zypper', 'lr', '-u', '-E']
|
||||
+ else:
|
||||
+ cmd = ['/usr/bin/zypper', 'lr', '-u']
|
||||
+ 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
|
||||
@ -139,4 +138,8 @@ Index: virt-manager-1.4.1/virtinst/util.py
|
||||
+ zypper_output.insert(0, dom0_inst_source)
|
||||
+ return (index_dom0, zypper_output)
|
||||
+
|
||||
+def getInstallRepos():
|
||||
+ if os.geteuid() != 0:
|
||||
+ return (0, [])
|
||||
+ return lookupZypperRepos(getHostInstallSource())
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user