[Pkg-libvirt-commits] [virt-manager] 04/08: Cherry-pick some ustream patches

Guido Guenther agx at moszumanska.debian.org
Thu Aug 31 08:01:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to annotated tag debian/1%1.4.2-1
in repository virt-manager.

commit be8dfede6b0221950a2d9a9b37dc4df31ab09253
Author: Guido Günther <agx at sigxcpu.org>
Date:   Wed Aug 30 18:44:58 2017 +0200

    Cherry-pick some ustream patches
    
      Add virtinst-connection-Fix-error-caching-new-pool.patch
      Add virtinst-adjust-media-paths-for-s390x.patch
    
    Closes: #873714
---
 debian/patches/series                              |  2 +
 .../virtinst-adjust-media-paths-for-s390x.patch    | 55 ++++++++++++++++++++++
 ...nst-connection-Fix-error-caching-new-pool.patch | 24 ++++++++++
 3 files changed, 81 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 71f0093..8accf64 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
 virtinst/fix-path-to-hvmloader.patch
 virtinst/Fix-patch-to-pygrub.patch
 Use-usr-bin-python.patch
+virtinst-connection-Fix-error-caching-new-pool.patch
+virtinst-adjust-media-paths-for-s390x.patch
diff --git a/debian/patches/virtinst-adjust-media-paths-for-s390x.patch b/debian/patches/virtinst-adjust-media-paths-for-s390x.patch
new file mode 100644
index 0000000..a70a27f
--- /dev/null
+++ b/debian/patches/virtinst-adjust-media-paths-for-s390x.patch
@@ -0,0 +1,55 @@
+From: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
+Date: Tue, 29 Aug 2017 15:51:43 +0200
+Subject: virtinst: adjust media paths for s390x
+
+The install kernel and intrd files are located in <url-prefix>/generic
+of the Debian and Ubuntu s390x install trees. Further they follow a
+different naming scheme than on x86. Adjust the url fetching accordingly.
+
+Signed-off-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
+---
+ virtinst/urlfetcher.py | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py
+index 1e944a4..96ec583 100644
+--- a/virtinst/urlfetcher.py
++++ b/virtinst/urlfetcher.py
+@@ -1129,6 +1129,12 @@ class DebianDistro(Distro):
+         kernel_basename = "linux"
+         if self._treeArch in ["ppc64el"]:
+             kernel_basename = "vmlinux"
++
++        if self._treeArch == "s390x":
++            hvmroot = "%s/generic/" % self._url_prefix
++            kernel_basename = "kernel.%s" % self.name.lower()
++            initrd_basename = "initrd.%s" % self.name.lower()
++
+         self._hvm_kernel_paths = [
+             (hvmroot + kernel_basename, hvmroot + initrd_basename)]
+ 
+@@ -1147,7 +1153,11 @@ class DebianDistro(Distro):
+             return False
+ 
+         filename = "%s/MANIFEST" % self._url_prefix
+-        regex = ".*%s.*" % self._installer_dirname
++        if self.arch == "s390x":
++            regex = ".*generic/kernel\.%s.*" % self.name.lower()
++        else:
++            regex = ".*%s.*" % self._installer_dirname
++
+         if not self._fetchAndMatchRegex(filename, regex):
+             logging.debug("Regex didn't match, not a %s distro", self.name)
+             return False
+@@ -1196,7 +1206,10 @@ class UbuntuDistro(DebianDistro):
+         if self.fetcher.hasFile("%s/MANIFEST" % self._url_prefix):
+             # For regular trees
+             filename = "%s/MANIFEST" % self._url_prefix
+-            regex = ".*%s.*" % self._installer_dirname
++            if self.arch == "s390x":
++                regex = ".*generic/kernel\.%s.*" % self.name.lower()
++            else:
++                regex = ".*%s.*" % self._installer_dirname
+         elif self.fetcher.hasFile("install/netboot/version.info"):
+             # For trees based on ISO's
+             self._url_prefix = "install"
diff --git a/debian/patches/virtinst-connection-Fix-error-caching-new-pool.patch b/debian/patches/virtinst-connection-Fix-error-caching-new-pool.patch
new file mode 100644
index 0000000..ba1b11c
--- /dev/null
+++ b/debian/patches/virtinst-connection-Fix-error-caching-new-pool.patch
@@ -0,0 +1,24 @@
+From: Cole Robinson <crobinso at redhat.com>
+Date: Wed, 30 Aug 2017 10:34:17 -0400
+Subject: virtinst: connection: Fix error caching new pool
+
+$ virt-install --connect test:///default --name foo --ram 64 --import --disk /tmp/idontexist.img
+ERROR    Error: --disk /tmp/idontexist.img: 'vols'
+---
+ virtinst/connection.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/virtinst/connection.py b/virtinst/connection.py
+index d6d66fc..0b2fbb0 100644
+--- a/virtinst/connection.py
++++ b/virtinst/connection.py
+@@ -249,6 +249,9 @@ class VirtualConnection(object):
+         poollist = self._fetch_cache[self._FETCH_KEY_POOLS]
+         poolxmlobj = self._build_pool_raw(poolobj)
+         poollist.append(poolxmlobj)
++
++        if self._FETCH_KEY_VOLS not in self._fetch_cache:
++            return
+         vollist = self._fetch_cache[self._FETCH_KEY_VOLS]
+         vollist.extend(self._fetch_vols_raw(poolxmlobj))
+ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/virt-manager.git



More information about the Pkg-libvirt-commits mailing list