From ff141f41a555d17249876786100760a4d38a58dd Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Wed, 19 Mar 2014 22:29:53 +0000 Subject: [PATCH] - bnc#868194 - virt-manager gets stuck with some netinst urls virtinst-check-detection-timeout-fix.patch - bnc#869208 - virt-manager create new virtual machine fail virtman-show-suse-install-repos.patch - bnc#869181 - virt-manager: vm wizard -Error launching manager: 'NoneType' object has no attribute 'startswith' virtinst-modify-gui-defaults.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=153 --- virt-manager.changes | 11 +++++++++++ virt-manager.spec | 2 ++ virtinst-check-detection-timeout-fix.patch | 11 +++++++++++ virtinst-modify-gui-defaults.patch | 4 ++-- virtman-show-suse-install-repos.patch | 6 +++++- virtman-vminstall.patch | 2 +- 6 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 virtinst-check-detection-timeout-fix.patch diff --git a/virt-manager.changes b/virt-manager.changes index 269b83a0..d19aab8c 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Mar 19 13:12:57 MDT 2014 - carnold@suse.com + +- bnc#868194 - virt-manager gets stuck with some netinst urls + virtinst-check-detection-timeout-fix.patch +- bnc#869208 - virt-manager create new virtual machine fail + virtman-show-suse-install-repos.patch +- bnc#869181 - virt-manager: vm wizard -Error launching manager: + 'NoneType' object has no attribute 'startswith' + virtinst-modify-gui-defaults.patch + ------------------------------------------------------------------- Tue Mar 18 14:15:06 MDT 2014 - carnold@suse.com diff --git a/virt-manager.spec b/virt-manager.spec index 673a1317..3ece4d50 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -94,6 +94,7 @@ Patch153: virtinst-support-suse-distros.patch Patch154: virtinst-detect-suse-distros.patch Patch155: virtinst-xen-drive-type.patch Patch156: virtinst-modify-gui-defaults.patch +Patch157: virtinst-check-detection-timeout-fix.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -239,6 +240,7 @@ machine). %patch154 -p1 %patch155 -p1 %patch156 -p1 +%patch157 -p1 %build %if %{qemu_user} diff --git a/virtinst-check-detection-timeout-fix.patch b/virtinst-check-detection-timeout-fix.patch new file mode 100644 index 00000000..521c4ffc --- /dev/null +++ b/virtinst-check-detection-timeout-fix.patch @@ -0,0 +1,11 @@ +--- virt-manager-1.0.0/virtManager/create.py.orig 2014-03-19 15:55:26.000000000 -0600 ++++ virt-manager-1.0.0/virtManager/create.py 2014-03-19 15:56:17.000000000 -0600 +@@ -2020,7 +2020,7 @@ class vmmCreate(vmmGObjectUI): + try: + base = _("Detecting") + +- if (self.detectedDistro == -1) or (idx >= (DETECT_TIMEOUT * 2)): ++ if (self.detectedDistro == -1) and (idx < (DETECT_TIMEOUT * 2)): + detect_str = base + ("." * ((idx % 3) + 1)) + self.set_distro_labels(detect_str, detect_str) + diff --git a/virtinst-modify-gui-defaults.patch b/virtinst-modify-gui-defaults.patch index d713a46c..df9e35c6 100644 --- a/virtinst-modify-gui-defaults.patch +++ b/virtinst-modify-gui-defaults.patch @@ -15,8 +15,8 @@ Index: virt-manager-1.0.0/virtManager/create.py + # Default to Network install if host was installed that way + host_instsrc = util.getHostInstallSource() + if host_instsrc is not None and \ -+ host_instsrc.startswith('ftp:') or host_instsrc.startswith('http:') or \ -+ host_instsrc.startswith('smb:') or host_instsrc.startswith('nfs:'): ++ (host_instsrc.startswith('ftp:') or host_instsrc.startswith('http:') or \ ++ host_instsrc.startswith('smb:') or host_instsrc.startswith('nfs:')): + self.widget("method-local").set_active(False) + self.widget("method-tree").set_active(True) diff --git a/virtman-show-suse-install-repos.patch b/virtman-show-suse-install-repos.patch index bad2b909..362e764b 100644 --- a/virtman-show-suse-install-repos.patch +++ b/virtman-show-suse-install-repos.patch @@ -44,7 +44,7 @@ Index: virt-manager-1.0.0/virtinst/util.py def listify(l): -@@ -531,3 +533,92 @@ def convert_units(value, old_unit, new_u +@@ -531,3 +533,96 @@ def convert_units(value, old_unit, new_u power = get_power(new_unit) return in_bytes / pow(factor, power) @@ -53,6 +53,8 @@ Index: virt-manager-1.0.0/virtinst/util.py + global _host_repo_url + if _host_repo_url is not None: + return _host_repo_url ++ if os.geteuid() != 0: ++ return None + + if os.path.exists('/var/lib/YaST2/install.inf'): + server_ip = server_name = server_dir = inst_mode = None @@ -102,6 +104,8 @@ Index: virt-manager-1.0.0/virtinst/util.py + return None + +def getInstallRepos(enabled_sources_only = True): ++ if os.geteuid() != 0: ++ return (0, []) + dom0_inst_source = getHostInstallSource() + locations = commands.getoutput("/usr/bin/zypper lr -u | awk -F'|' '{ print $6 }'") + locations = locations[(locations.rfind('URI')):].split() diff --git a/virtman-vminstall.patch b/virtman-vminstall.patch index 6f67935f..cb75d51a 100644 --- a/virtman-vminstall.patch +++ b/virtman-vminstall.patch @@ -161,7 +161,7 @@ Index: virt-manager-1.0.0/virtManager/engine.py + self._get_create_dialog().show(src.topwin, uri) + self.remote_install = True + else: -+ if os.getuid() == 0: ++ if os.geteuid() == 0: + args = ['/usr/bin/vm-install'] + logging.debug("Launching: %s" % str(args)) + p = Popen(args)