aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-01-24 15:15:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-02-27 16:38:06 +0100
commit1c582242e08990c798e6dccddd7436a3934ed588 (patch)
tree2162e27e469ba176200270dad47c0e626bffbc61
parentc42d614e4be200793b593469247613c411424a83 (diff)
main/qemu: fix configure for s390x
the configure script assumes that grep handles binary data. Busybox grep does not when its compiled with musl so we filter the input with `strings`. Upstream: http://patchwork.ozlabs.org/patch/863654/
-rw-r--r--main/qemu/12-12-Fix-configure-for-s390-qemu-on-alpine.patch56
-rw-r--r--main/qemu/APKBUILD5
2 files changed, 60 insertions, 1 deletions
diff --git a/main/qemu/12-12-Fix-configure-for-s390-qemu-on-alpine.patch b/main/qemu/12-12-Fix-configure-for-s390-qemu-on-alpine.patch
new file mode 100644
index 00000000000..38b32da2ac8
--- /dev/null
+++ b/main/qemu/12-12-Fix-configure-for-s390-qemu-on-alpine.patch
@@ -0,0 +1,56 @@
+From patchwork Fri Jan 19 16:42:59 2018
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [12/12] Fix configure for s390 qemu on alpine
+X-Patchwork-Submitter: Christian Borntraeger <borntraeger@de.ibm.com>
+X-Patchwork-Id: 863654
+Message-Id: <1516380179-12737-1-git-send-email-borntraeger@de.ibm.com>
+To: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
+ Peter Maydell <peter.maydell@linaro.org>,
+ Paolo Bonzini <pbonzini@redhat.com>
+Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
+ Alice Frosi <alice@linux.vnet.ibm.com>,
+ Alice Frosi <alice@linux.vnet.ibm.comx>
+Date: Fri, 19 Jan 2018 17:42:59 +0100
+From: Christian Borntraeger <borntraeger@de.ibm.com>
+List-Id: <qemu-devel.nongnu.org>
+
+From: Alice Frosi <alice@linux.vnet.ibm.comx>
+
+In alpine docker image the qemu-system-s390x build is broken and
+it throws this error:
+qemu-system-s390x: Initialization of device s390-ipl failed: could not
+load bootloader 's390-ccw.img'
+
+The grep command of busybox uses regex. This fails on binary data
+(e.g. stops on every \0), so it does not identify the string
+BiGeNdIaN in the test case big/little. Therefore, it assumes
+that the architecture is little endian.
+
+This fix solves the grep problem by printing the content of
+TMPO with strings
+
+Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
+Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
+[some changes to patch description, add -a option to strings]
+---
+ configure | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 6d8c996..383b14e 100755
+--- a/configure
++++ b/configure
+@@ -1906,9 +1906,9 @@ int main(int argc, char *argv[]) {
+ EOF
+
+ if compile_object ; then
+- if grep -q BiGeNdIaN $TMPO ; then
++ if strings -a $TMPO | grep -q BiGeNdIaN ; then
+ bigendian="yes"
+- elif grep -q LiTtLeEnDiAn $TMPO ; then
++ elif strings -a $TMPO | grep -q LiTtLeEnDiAn ; then
+ bigendian="no"
+ else
+ echo big/little test failed
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD
index 49c8af467cb..566395b7a3a 100644
--- a/main/qemu/APKBUILD
+++ b/main/qemu/APKBUILD
@@ -4,7 +4,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qemu
pkgver=2.10.1
-pkgrel=2
+pkgrel=3
pkgdesc="QEMU is a generic machine emulator and virtualizer"
url="http://qemu.org/"
arch="all"
@@ -138,6 +138,8 @@ source="http://wiki.qemu-project.org/download/$pkgname-$pkgver.tar.bz2
fix-test-io-channel-tls-handshake-completion.patch
fix-test-io-channel-tls-temp-directory.patch
test-crypto-ivgen-skip-essiv.patch
+ 12-12-Fix-configure-for-s390-qemu-on-alpine.patch
+
$pkgname-guest-agent.confd
$pkgname-guest-agent.initd
80-kvm.rules
@@ -354,6 +356,7 @@ f4c6f9b1b1b22eecddb63e801a7e6070766868a63cc441647dbd571c86f29ba74d0fbd67f6016c85
f405d985a359069a310b03a714e6223dbe85c94442b03ba35d7e1fe5da02c02c6ad1ce52d3705a6f9fccb79c2494085298d93b3cb159bacaa3b3bf3597c25202 fix-test-io-channel-tls-handshake-completion.patch
2233b45389467b4386253e113c9b08ff0d6ad55f06361f4c6f9f49f2528895847e12c1a6e7f66efa356d49b384b61945d970325a0008e4a8715ef48b9d84b7fd fix-test-io-channel-tls-temp-directory.patch
8b8db136f78bd26b5da171effa9e11016ec2bc3e2fc8107228b5543b47aa370978ed883794aa4f917f334e284a5b49e82070e1da2d31d49301195b6713a48eff test-crypto-ivgen-skip-essiv.patch
+272272efbf380a6c070c267864c96aa6747c446394b650c9e40633f905e3b6240faa12202e38e9dede5fce02df3fc1bf5b0d6c7ce96826488e752ce339588117 12-12-Fix-configure-for-s390-qemu-on-alpine.patch
d90c034cae3f9097466854ed1a9f32ab4b02089fcdf7320e8f4da13b2b1ff65067233f48809911485e4431d7ec1a22448b934121bc9522a2dc489009e87e2b1f qemu-guest-agent.confd
1cd24c2444c5935a763c501af2b0da31635aad9cf62e55416d6477fcec153cddbe7de205d99616def11b085e0dd366ba22463d2270f831d884edbc307c7864a6 qemu-guest-agent.initd
9b7a89b20fcf737832cb7b4d5dc7d8301dd88169cbe5339eda69fbb51c2e537d8cb9ec7cf37600899e734209e63410d50d0821bce97e401421db39c294d97be2 80-kvm.rules