[libguestfs/f21] Include upstream patches to fix ppc64le builds (RHBZ#1156449).

Richard W.M. Jones rjones at fedoraproject.org
Fri Oct 24 20:46:12 UTC 2014


commit 8132a3c9e0b8818663f99d0f3880f9a7ad244aba
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri Oct 24 21:40:48 2014 +0100

    Include upstream patches to fix ppc64le builds (RHBZ#1156449).

 ...figure-Look-for-qemu-system-ppc64-binary-.patch |   12 ++++++
 ...t-tool-Use-correct-qemu-system-ppc64-bina.patch |   29 +++++++++++++++
 ...andle-mapping-other-architectures-to-qemu.patch |   39 ++++++++++++++++++++
 libguestfs.spec                                    |   16 ++++++++-
 4 files changed, 95 insertions(+), 1 deletions(-)
---
diff --git a/0001-ppc64le-configure-Look-for-qemu-system-ppc64-binary-.patch b/0001-ppc64le-configure-Look-for-qemu-system-ppc64-binary-.patch
new file mode 100644
index 0000000..3f3063e
--- /dev/null
+++ b/0001-ppc64le-configure-Look-for-qemu-system-ppc64-binary-.patch
@@ -0,0 +1,12 @@
+--- libguestfs-1.28.1.old/configure.ac	2014-10-18 10:50:54.000000000 +0100
++++ libguestfs-1.28.1/configure.ac	2014-10-24 21:42:04.534071112 +0100
+@@ -725,7 +725,8 @@
+ qemu_system="$(
+     echo qemu-system-$host_cpu |
+     $SED -e 's/-i@<:@456@:>@86/-i386/g' \
+-         -e 's/-arm.*/-arm/g'
++         -e 's/-arm.*/-arm/g' \
++         -e 's/-ppc64le/-ppc64/g'
+     )"
+ default_qemu="qemu-kvm kvm $qemu_system qemu"
+ AC_ARG_WITH([qemu],
diff --git a/0002-ppc64le-test-tool-Use-correct-qemu-system-ppc64-bina.patch b/0002-ppc64le-test-tool-Use-correct-qemu-system-ppc64-bina.patch
new file mode 100644
index 0000000..3274dd9
--- /dev/null
+++ b/0002-ppc64le-test-tool-Use-correct-qemu-system-ppc64-bina.patch
@@ -0,0 +1,29 @@
+From 5018e001290a585ed303bc311cdeeca6b5c11e98 Mon Sep 17 00:00:00 2001
+From: Menanteau Guy <menantea at linux.vnet.ibm.com>
+Date: Fri, 24 Oct 2014 16:51:02 +0100
+Subject: [PATCH 2/3] ppc64le: test-tool: Use correct qemu-system-ppc64 binary
+ when creating qemu wrapper.
+
+---
+ test-tool/test-tool.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c
+index 3217a69..c0c4798 100644
+--- a/test-tool/test-tool.c
++++ b/test-tool/test-tool.c
+@@ -388,7 +388,11 @@ set_qemu (guestfs_h *g, const char *path, int use_wrapper)
+            "#!/bin/sh -\n"
+            "host_cpu=%s\n"
+            "qemudir='%s'\n"
++           "if [ $host_cpu != \"ppc64le\" ]; then \n"
+            "qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-$host_cpu\"\n"
++           "else"
++           "qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-ppc64\"\n"
++           "fi"
+            "exec \"$qemu\" -L \"$qemudir/pc-bios\" \"$@\"\n",
+            host_cpu, path);
+   fclose (fp);
+-- 
+2.0.4
+
diff --git a/0003-test-tool-Handle-mapping-other-architectures-to-qemu.patch b/0003-test-tool-Handle-mapping-other-architectures-to-qemu.patch
new file mode 100644
index 0000000..f153d25
--- /dev/null
+++ b/0003-test-tool-Handle-mapping-other-architectures-to-qemu.patch
@@ -0,0 +1,39 @@
+From 4ff6ba35502736a2aed1f17eda67728f624c3390 Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Fri, 24 Oct 2014 16:55:36 +0100
+Subject: [PATCH 3/3] test-tool: Handle mapping other architectures to
+ qemu-system-* binaries.
+
+---
+ test-tool/test-tool.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c
+index c0c4798..848571d 100644
+--- a/test-tool/test-tool.c
++++ b/test-tool/test-tool.c
+@@ -388,11 +388,16 @@ set_qemu (guestfs_h *g, const char *path, int use_wrapper)
+            "#!/bin/sh -\n"
+            "host_cpu=%s\n"
+            "qemudir='%s'\n"
+-           "if [ $host_cpu != \"ppc64le\" ]; then \n"
+-           "qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-$host_cpu\"\n"
+-           "else"
+-           "qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-ppc64\"\n"
+-           "fi"
++           "case $host_cpu in\n"
++           "    amd64*) qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-x86_64\"\n"
++           "            ;;\n"
++           "    arm*) qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-arm\"\n"
++           "          ;;\n"
++           "    ppc64le) qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-ppc64\"\n"
++           "             ;;\n"
++           "    *) qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-$host_cpu\"\n"
++           "       ;;\n"
++           "esac\n"
+            "exec \"$qemu\" -L \"$qemudir/pc-bios\" \"$@\"\n",
+            host_cpu, path);
+   fclose (fp);
+-- 
+2.0.4
+
diff --git a/libguestfs.spec b/libguestfs.spec
index 3e48f5d..b175c85 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -25,13 +25,19 @@ Summary:       Access and modify virtual machine disk images
 Name:          libguestfs
 Epoch:         1
 Version:       1.28.1
-Release:       1%{?dist}
+Release:       2%{?dist}
 License:       LGPLv2+
 
 # Source and patches.
 URL:           http://libguestfs.org/
 Source0:       http://libguestfs.org/download/1.28-stable/%{name}-%{version}.tar.gz
 
+# ppc64le support (RHBZ#1156449).  Upstream, will be added in 1.28.2.
+Patch1:        0001-ppc64le-configure-Look-for-qemu-system-ppc64-binary-.patch
+Patch2:        0002-ppc64le-test-tool-Use-correct-qemu-system-ppc64-bina.patch
+Patch3:        0003-test-tool-Handle-mapping-other-architectures-to-qemu.patch
+BuildRequires: autoconf
+
 # Basic build requirements:
 BuildRequires: perl(Pod::Simple)
 BuildRequires: perl(Pod::Man)
@@ -728,6 +734,11 @@ for %{name}.
 %prep
 %setup -q
 
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+autoconf
+
 if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then
     # For sVirt to work, the local temporary directory we use in the
     # tests must be labelled the same way as /tmp.
@@ -1226,6 +1237,9 @@ popd
 
 
 %changelog
+* Fri Oct 24 2014 Richard W.M. Jones <rjones at redhat.com> - 1:1.28.1-2
+- Include upstream patches to fix ppc64le builds (RHBZ#1156449).
+
 * Sat Oct 18 2014 Richard W.M. Jones <rjones at redhat.com> - 1:1.28.1-1
 - New upstream version 1.28.1.
 


More information about the scm-commits mailing list