diff --git a/eae7dc06-fix-URL-installs-when-content-length-header-missing.patch b/eae7dc06-fix-URL-installs-when-content-length-header-missing.patch new file mode 100644 index 00000000..611cafb5 --- /dev/null +++ b/eae7dc06-fix-URL-installs-when-content-length-header-missing.patch @@ -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): + """ diff --git a/virt-manager.changes b/virt-manager.changes index c3dee931..d7e90bfc 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -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 diff --git a/virt-manager.spec b/virt-manager.spec index f756f854..af22f09b 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -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 diff --git a/virtinst-add-ppc64-arch-support.patch b/virtinst-add-ppc64-arch-support.patch index c88a5b5c..d3eeb063 100644 --- a/virtinst-add-ppc64-arch-support.patch +++ b/virtinst-add-ppc64-arch-support.patch @@ -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" diff --git a/virtinst-detect-oes-distros.patch b/virtinst-detect-oes-distros.patch index 7ef3c990..ad498c0a 100644 --- a/virtinst-detect-oes-distros.patch +++ b/virtinst-detect-oes-distros.patch @@ -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]] diff --git a/virtinst-nfs-install-sanitize.patch b/virtinst-nfs-install-sanitize.patch index 586fff3c..aecbf8f5 100644 --- a/virtinst-nfs-install-sanitize.patch +++ b/virtinst-nfs-install-sanitize.patch @@ -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:"): diff --git a/virtinst-s390x-disable-graphics.patch b/virtinst-s390x-disable-graphics.patch index e255c825..f04d9684 100644 --- a/virtinst-s390x-disable-graphics.patch +++ b/virtinst-s390x-disable-graphics.patch @@ -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