- bsc#962221 - virt-install: 'NoneType' object has no attribute
'isdigit' eae7dc06-fix-URL-installs-when-content-length-header-missing.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=291
This commit is contained in:
parent
bac3f6bcbd
commit
9851188d58
@ -0,0 +1,25 @@
|
||||
Subject: urlfetcher: Fix URL installs when content-length header missing
|
||||
From: Cole Robinson crobinso@redhat.com Tue Jan 12 12:45:02 2016 -0500
|
||||
Date: Tue Jan 12 12:45:02 2016 -0500:
|
||||
Git: eae7dc061968a83fef8ebb632c8f939621ff22b1
|
||||
|
||||
Suggested-by: bduff@sjm.com
|
||||
|
||||
Index: virt-manager-1.3.2/virtinst/urlfetcher.py
|
||||
===================================================================
|
||||
--- virt-manager-1.3.2.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.3.2/virtinst/urlfetcher.py
|
||||
@@ -186,8 +186,11 @@ class _HTTPURLFetcher(_URLFetcher):
|
||||
"""
|
||||
response = requests.get(url, stream=True)
|
||||
response.raise_for_status()
|
||||
- size = response.headers.get('content-length')
|
||||
- return response, size.isdigit() and int(size) or None
|
||||
+ try:
|
||||
+ size = int(response.headers.get('content-length'))
|
||||
+ except:
|
||||
+ size = None
|
||||
+ return response, size
|
||||
|
||||
def _write(self, urlobj, fileobj):
|
||||
"""
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 18 13:43:47 MST 2016 - carnold@suse.com
|
||||
|
||||
- bsc#962221 - virt-install: 'NoneType' object has no attribute
|
||||
'isdigit'
|
||||
eae7dc06-fix-URL-installs-when-content-length-header-missing.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 8 11:50:46 MST 2016 - carnold@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package virt-manager
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -15,6 +15,7 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define with_guestfs 0
|
||||
%define askpass_package "openssh-askpass"
|
||||
%define qemu_user "qemu"
|
||||
@ -37,6 +38,7 @@ Source1: virt-install.rb
|
||||
Source2: virt-install.desktop
|
||||
# Upstream Patches
|
||||
Patch1: 89c3638b-fix-detection-that-libvirtd-is-stopped.patch
|
||||
Patch2: eae7dc06-fix-URL-installs-when-content-length-header-missing.patch
|
||||
# SUSE Only
|
||||
Patch70: virtman-desktop.patch
|
||||
Patch71: virtman-kvm.patch
|
||||
@ -158,6 +160,7 @@ machine).
|
||||
%setup -q
|
||||
# Upstream Patches
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
# SUSE Only
|
||||
%patch70 -p1
|
||||
%patch71 -p1
|
||||
|
@ -1,10 +1,10 @@
|
||||
Reference: bnc#869024
|
||||
Add s390x and ppc64 support
|
||||
Index: virt-manager-1.3.0/virtinst/urlfetcher.py
|
||||
Index: virt-manager-1.3.2/virtinst/urlfetcher.py
|
||||
===================================================================
|
||||
--- virt-manager-1.3.0.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.3.0/virtinst/urlfetcher.py
|
||||
@@ -427,6 +427,10 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
--- virt-manager-1.3.2.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.3.2/virtinst/urlfetcher.py
|
||||
@@ -430,6 +430,10 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
arch = "i586"
|
||||
elif cbuf.find("s390x") != -1:
|
||||
arch = "s390x"
|
||||
@ -15,7 +15,7 @@ Index: virt-manager-1.3.0/virtinst/urlfetcher.py
|
||||
|
||||
dclass = GenericDistro
|
||||
if distribution:
|
||||
@@ -966,10 +970,12 @@ class SuseDistro(Distro):
|
||||
@@ -969,10 +973,12 @@ class SuseDistro(Distro):
|
||||
oldkern += "64"
|
||||
oldinit += "64"
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
Enhancement to correctly detect Open Enterprise Server media is
|
||||
selected as the installation source.
|
||||
Index: virt-manager-1.3.0/virtinst/urlfetcher.py
|
||||
Index: virt-manager-1.3.2/virtinst/urlfetcher.py
|
||||
===================================================================
|
||||
--- virt-manager-1.3.0.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.3.0/virtinst/urlfetcher.py
|
||||
@@ -439,6 +439,10 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
--- virt-manager-1.3.2.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.3.2/virtinst/urlfetcher.py
|
||||
@@ -442,6 +442,10 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
dclass = SLEDDistro
|
||||
if distro_version is None:
|
||||
distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]
|
||||
|
@ -5,10 +5,10 @@ A fix for accessing nfs mounted media. A comment in the code states,
|
||||
and carry the latter form around internally"
|
||||
We need the RFC version to work correctly whereas redhat's anaconda
|
||||
needs their own modified version.
|
||||
Index: virt-manager-1.3.0/virtinst/util.py
|
||||
Index: virt-manager-1.3.2/virtinst/util.py
|
||||
===================================================================
|
||||
--- virt-manager-1.3.0.orig/virtinst/util.py
|
||||
+++ virt-manager-1.3.0/virtinst/util.py
|
||||
--- virt-manager-1.3.2.orig/virtinst/util.py
|
||||
+++ virt-manager-1.3.2/virtinst/util.py
|
||||
@@ -552,3 +552,22 @@ def getInstallRepos(enabled_sources_only
|
||||
return (index_dom0, zypper_output)
|
||||
|
||||
@ -32,10 +32,10 @@ Index: virt-manager-1.3.0/virtinst/util.py
|
||||
+
|
||||
+ return url
|
||||
+
|
||||
Index: virt-manager-1.3.0/virtinst/distroinstaller.py
|
||||
Index: virt-manager-1.3.2/virtinst/distroinstaller.py
|
||||
===================================================================
|
||||
--- virt-manager-1.3.0.orig/virtinst/distroinstaller.py
|
||||
+++ virt-manager-1.3.0/virtinst/distroinstaller.py
|
||||
--- virt-manager-1.3.2.orig/virtinst/distroinstaller.py
|
||||
+++ virt-manager-1.3.2/virtinst/distroinstaller.py
|
||||
@@ -49,6 +49,8 @@ def _sanitize_url(url):
|
||||
"""
|
||||
Do nothing for http or ftp, but make sure nfs is in the expected format
|
||||
@ -45,10 +45,10 @@ Index: virt-manager-1.3.0/virtinst/distroinstaller.py
|
||||
if url.startswith("nfs://"):
|
||||
# Convert RFC compliant NFS nfs://server/path/to/distro
|
||||
# to what mount/anaconda expect nfs:server:/path/to/distro
|
||||
Index: virt-manager-1.3.0/virtinst/urlfetcher.py
|
||||
Index: virt-manager-1.3.2/virtinst/urlfetcher.py
|
||||
===================================================================
|
||||
--- virt-manager-1.3.0.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.3.0/virtinst/urlfetcher.py
|
||||
--- virt-manager-1.3.2.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.3.2/virtinst/urlfetcher.py
|
||||
@@ -33,6 +33,7 @@ import urllib2
|
||||
import urlparse
|
||||
|
||||
@ -57,7 +57,7 @@ Index: virt-manager-1.3.0/virtinst/urlfetcher.py
|
||||
|
||||
|
||||
#########################################################################
|
||||
@@ -295,7 +296,8 @@ class _MountedURLFetcher(_LocalURLFetche
|
||||
@@ -298,7 +299,8 @@ class _MountedURLFetcher(_LocalURLFetche
|
||||
|
||||
logging.debug("Preparing mount at " + self._srcdir)
|
||||
if self.location.startswith("nfs:"):
|
||||
|
@ -1,9 +1,9 @@
|
||||
Reference: bnc#869024
|
||||
Disable graphics on s390x
|
||||
Index: virt-manager-1.3.0/virtinst/guest.py
|
||||
Index: virt-manager-1.3.2/virtinst/guest.py
|
||||
===================================================================
|
||||
--- virt-manager-1.3.0.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.3.0/virtinst/guest.py
|
||||
--- virt-manager-1.3.2.orig/virtinst/guest.py
|
||||
+++ virt-manager-1.3.2/virtinst/guest.py
|
||||
@@ -123,7 +123,10 @@ class Guest(XMLBuilder):
|
||||
self.skip_default_channel = False
|
||||
self.skip_default_sound = False
|
||||
@ -43,7 +43,7 @@ Index: virt-manager-1.3.0/virtinst/guest.py
|
||||
return
|
||||
self.add_device(VirtualGraphics(self.conn))
|
||||
|
||||
@@ -1052,7 +1057,7 @@ class Guest(XMLBuilder):
|
||||
@@ -1034,7 +1039,7 @@ class Guest(XMLBuilder):
|
||||
if self._hv_only_supports_virtio():
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user