aboutsummaryrefslogtreecommitdiffstats
path: root/main/qemu
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-01-17 10:51:06 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-01-17 10:51:06 +0000
commita1f3596c73e35c5da927b1a90098fe8c421bb806 (patch)
tree24570add463a7e670a889eb8e3ce5d3ba3a27350 /main/qemu
parent330075569831670d211a75ca3a755dfb2b4317b4 (diff)
downloadaports-a1f3596c73e35c5da927b1a90098fe8c421bb806.tar.bz2
aports-a1f3596c73e35c5da927b1a90098fe8c421bb806.tar.xz
main/qemu: add patch that makes golang work in linux-user
Diffstat (limited to 'main/qemu')
-rw-r--r--main/qemu/APKBUILD6
-rw-r--r--main/qemu/ignore-signals-33-and-64-to-allow-golang-emulation.patch56
2 files changed, 61 insertions, 1 deletions
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD
index 755882a2bb..4b8d929a1d 100644
--- a/main/qemu/APKBUILD
+++ b/main/qemu/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qemu
pkgver=2.8.0
-pkgrel=2
+pkgrel=3
pkgdesc="QEMU is a generic machine emulator and virtualizer"
url="http://qemu.org/"
arch="all"
@@ -125,6 +125,7 @@ source="http://wiki.qemu-project.org/download/$pkgname-$pkgver.tar.bz2
fix-sigevent-and-sigval_t.patch
xattr_size_max.patch
ncurses.patch
+ ignore-signals-33-and-64-to-allow-golang-emulation.patch
$pkgname-guest-agent.confd
$pkgname-guest-agent.initd
80-kvm.rules
@@ -306,6 +307,7 @@ d364208c4847ad2baeb237900befecd1 0006-linux-user-signal.c-define-__SIGRTMIN-MAX
18f3194bdb0751d1c96140bd4d98b86f fix-sigevent-and-sigval_t.patch
36b835d7f00aa99f69d909bcdff9b1cf xattr_size_max.patch
4b3b899ebc67accff89ace306d48668e ncurses.patch
+b4fa458e13a97c8938c3d527606aea56 ignore-signals-33-and-64-to-allow-golang-emulation.patch
1663bc6977f6886a58394155b1bf3676 qemu-guest-agent.confd
ea972f2fc5505488f68320bf386106bb qemu-guest-agent.initd
66660f143235201249dc0648b39b86ee 80-kvm.rules
@@ -318,6 +320,7 @@ ec5e2bd34636c47f464c6b9efd01e487a7b81602c8b598df6efe8d8ceed0c2e5 musl-F_SHLCK-a
5bd5723873af643406b250641e7eaa248ce728b8caf8e761e219728f59ce6072 fix-sigevent-and-sigval_t.patch
a0c21e70495ac249e3dfcba7420eebe044c6cccc5a8bdc5b635d89ca2e2eac7f xattr_size_max.patch
f24b9492f208d386edc5a7a5222906e4816733348e0c557c09ce813bbd80be92 ncurses.patch
+d093d1261760ac5d60419cf5ba4a180f3b216931d700c792cddd24fe0076e865 ignore-signals-33-and-64-to-allow-golang-emulation.patch
d84e53a94584f37f3bd1b21f44077b5de0d07094c6729f26ae20ab1f7b9cc298 qemu-guest-agent.confd
5bef90ccab2e743868fd562eee9a3ded35c8d3e01fa387367ed55a0da95570d5 qemu-guest-agent.initd
37f666f1cdb7d8a62171de69b531681dcb0fba74236729dac8b6c019232eba84 80-kvm.rules
@@ -330,6 +333,7 @@ ec84b27648c01c6e58781295dcd0c2ff8e5a635f9836ef50c1da5d0ed125db1afc4cb5b01cb97606
5da8114b9bd2e62f0f1f0f73f393fdbd738c5dea827ea60cedffd6f6edd0f5a97489c7148d37a8ec5a148d4e65d75cbefe9353714ee6b6f51a600200133fc914 fix-sigevent-and-sigval_t.patch
4b1e26ba4d53f9f762cbd5cea8ef6f8062d827ae3ae07bc36c5b0c0be4e94fc1856ad2477e8e791b074b8a25d51ed6d0ddd75e605e54600e5dd0799143793ce4 xattr_size_max.patch
b6ed02aaf95a9bb30a5f107d35371207967edca058f3ca11348b0b629ea7a9c4baa618db68a3df72199eea6d86d14ced74a5a229d17604cc3f0adedcfeae7a73 ncurses.patch
+fd178f2913639a0c33199b3880cb17536961f2b3ff171c12b27f4be6bca032d6b88fd16302d09c692bb34883346babef5c44407a6804b20a39a465bb2bc85136 ignore-signals-33-and-64-to-allow-golang-emulation.patch
d90c034cae3f9097466854ed1a9f32ab4b02089fcdf7320e8f4da13b2b1ff65067233f48809911485e4431d7ec1a22448b934121bc9522a2dc489009e87e2b1f qemu-guest-agent.confd
316b40d97587fea717821852859d81039cfdcb276a658bb6e6fb554e321d5856a833ebb3778149c4732cea625bac320b1008d374c88a9aae35c0fb67977c01b7 qemu-guest-agent.initd
9b7a89b20fcf737832cb7b4d5dc7d8301dd88169cbe5339eda69fbb51c2e537d8cb9ec7cf37600899e734209e63410d50d0821bce97e401421db39c294d97be2 80-kvm.rules
diff --git a/main/qemu/ignore-signals-33-and-64-to-allow-golang-emulation.patch b/main/qemu/ignore-signals-33-and-64-to-allow-golang-emulation.patch
new file mode 100644
index 0000000000..1162542233
--- /dev/null
+++ b/main/qemu/ignore-signals-33-and-64-to-allow-golang-emulation.patch
@@ -0,0 +1,56 @@
+From db186a3f83454268c43fc793a48bc28c41368a6c Mon Sep 17 00:00:00 2001
+From: Petros Angelatos <petrosagg@gmail.com>
+Date: Thu, 3 Mar 2016 23:58:53 -0800
+Subject: [PATCH] linux-user: ignore signals 33 and 64 to allow golang
+ emulation
+
+Signal 33 will always fail. This causes golang crash since
+https://github.com/golang/go/commit/675eb72c285cd0dd44a5f280bb3fa456ddf6de16
+
+As explained in that commit, these signals are very rarely used in a
+way that causes problems, so it's ok-ish to ignore one of them.
+
+Signal 64 will fail because QEMU uses SIGRTMAX for itself. This causes
+golang to crash for versions earlier than
+https://github.com/golang/go/commit/d10675089d74db0408f2432eae3bd89a8e1c2d6a
+
+Since after that commit golang ignores that signal, we also ignore it here to
+allow earlier versions to run as well.
+
+Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
+---
+ linux-user/signal.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/linux-user/signal.c b/linux-user/signal.c
+index 9a4d894..90aca55 100644
+--- a/linux-user/signal.c
++++ b/linux-user/signal.c
+@@ -744,6 +744,27 @@ int do_sigaction(int sig, const struct target_sigaction *act,
+ }
+
+ k = &sigact_table[sig - 1];
++
++ /* This signal will always fail. This causes golang crash since
++ * https://github.com/golang/go/commit/675eb72c285cd0dd44a5f280bb3fa456ddf6de16
++ *
++ * As explained in that commit, these signals are very rarely used in a
++ * way that causes problems, so it's ok-ish to ignore one of them here.
++ */
++ if (sig == 33) {
++ return 0;
++ }
++ /* This signal will fail because QEMU uses SIGRTMAX for itself. This causes
++ * golang to crash for versions earlier than
++ * https://github.com/golang/go/commit/d10675089d74db0408f2432eae3bd89a8e1c2d6a
++ *
++ * Since after that commit golang ignores that signal, we also ignore it here to
++ * allow earlier versions to run as well.
++ */
++ if (sig == 64) {
++ return 0;
++ }
++
+ if (oact) {
+ __put_user(k->_sa_handler, &oact->_sa_handler);
+ __put_user(k->sa_flags, &oact->sa_flags);