aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-12-02 16:14:02 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-12-02 16:14:02 +0000
commit86a7194908b0f8c2796f5a0fc00cd13c6c00bb14 (patch)
treeed571f0ea311882b37fa6851294595aef12e4653
parent6942f42baa6d305430f75e6f1ba4b407d065499d (diff)
downloadaports-86a7194908b0f8c2796f5a0fc00cd13c6c00bb14.tar.bz2
aports-86a7194908b0f8c2796f5a0fc00cd13c6c00bb14.tar.xz
main/fakeroot: fix signal handling for msgrcv
Retry msgrcv in case signal arrives, otherwise we return bad values from libc hooks. According to docs msgrcv is never restarted automatically regardless of SA_RESTART flag, so do it in the code. Incidentally mksquashfs sets up SIGALRM to fire relatively often so it is good at trigger this race with different weird error messages.
-rw-r--r--main/fakeroot/APKBUILD6
-rw-r--r--main/fakeroot/fakeroot-msgrcv-signal.patch12
2 files changed, 17 insertions, 1 deletions
diff --git a/main/fakeroot/APKBUILD b/main/fakeroot/APKBUILD
index 50d2e8e992..ea317ed5f2 100644
--- a/main/fakeroot/APKBUILD
+++ b/main/fakeroot/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fakeroot
pkgver=1.21
-pkgrel=0
+pkgrel=1
pkgdesc="Gives a fake root environment, useful for building packages as a non-privileged user"
arch="all"
license='GPL'
@@ -17,6 +17,7 @@ source="http://ftp.debian.org/debian/pool/main/f/$pkgname/${pkgname}_${pkgver}.o
fakeroot-no64.patch
fakeroot-stdint.patch
fakeroot-no-ldlibrarypath.patch
+ fakeroot-msgrcv-signal.patch
xstatjunk.patch
"
@@ -63,6 +64,7 @@ md5sums="be5c9a0e516869fca4a6758105968e5a fakeroot_1.21.orig.tar.gz
3fc66a8ffb365fcf2acd652d33f101a2 fakeroot-no64.patch
50a899380cfd5eae8ce3aaf878fb17b2 fakeroot-stdint.patch
75b41eae4e68552728c6df4cbce28bf2 fakeroot-no-ldlibrarypath.patch
+f6143e122b4f5c8b5963a31d61f18ec5 fakeroot-msgrcv-signal.patch
2438e71f447a784eac87f19a7fdbc531 xstatjunk.patch"
sha256sums="5d293c1b3604b2a9265d1811a9890c749887ef08aec55f3237d32bf35836171a fakeroot_1.21.orig.tar.gz
6b881eaecacacba100cbaa96d552c51a622639a40f3d7701b6756b4cde0e5d95 busybox-getopt.patch
@@ -70,6 +72,7 @@ sha256sums="5d293c1b3604b2a9265d1811a9890c749887ef08aec55f3237d32bf35836171a fa
3420da0789caef582fcfc890c657da4136b3b06d1205443f4409cdf85ab02a46 fakeroot-no64.patch
8739c0b79c3f2b0e46cd0dffa8b73d946efbe994f61f69f7d1115c2dcec22df1 fakeroot-stdint.patch
e95d525b119d97aeacc944879664b281218292f70eabe9ee65fae38a8712c6c2 fakeroot-no-ldlibrarypath.patch
+e773b7aff621a5897243207f9bb9ed4005247db0358377f3972b0c20e5705785 fakeroot-msgrcv-signal.patch
5694b33fcfc9682f42b4c11ab49a8b5b402128dd9f0cd870eaad659c9b2679cf xstatjunk.patch"
sha512sums="b55ec626bbe4ce7df7d3ea519db34961163ef824143d08366af2931e2576db6fa532e7cb49eab49f7566228058bc269555444d8bbc28b6937d1d43e9df11cb13 fakeroot_1.21.orig.tar.gz
9024263f4452bcb46c9670f8b8106e67c2d9b4cf45215def7ff4e78d2c908e4f98d494dd6f514fb3325165b0f61571fa031632b4642163cf9b1b3386d0867c5f busybox-getopt.patch
@@ -77,4 +80,5 @@ sha512sums="b55ec626bbe4ce7df7d3ea519db34961163ef824143d08366af2931e2576db6fa532
7a832e6bed3838c7c488e0e12ba84b8d256e84bbb06d6020247452a991de505fa5c6bd7bcb84dce8753eb242e0fcab863b5461301cd56695f2b003fe8d6ff209 fakeroot-no64.patch
ed7a58b0d201139545420f9e5429f503c00e00f36dea84473e77ea99b23bb8d421da1a8a8ce98ff90e72e378dff4cb9ea3c1a863a969899a5f50dfac3b9c5fac fakeroot-stdint.patch
acfc1e5efce132279adddf9e11c28d65602059d5cd723ad98b67cb9183e1de68445f3bba7ac54ee60265b85f25141fcc9b2156f551aa5c624a92631320f5b743 fakeroot-no-ldlibrarypath.patch
+0dcef505b5bb8c9388b1bf26f430ecb7f6af6699548532089b704b49ede9cbc2c47676f67fd552d17ce7b782382071b8813e32143bd9046b06853d862d697fe3 fakeroot-msgrcv-signal.patch
5efd33fd778bd94a529ed7e439fb8fea25ff865dda3f6f9e431264e942b37f3b5d7a0ad14107b55c5fa81b86efd5a82aedb3803cfab08ec57f27f5b229d2fe88 xstatjunk.patch"
diff --git a/main/fakeroot/fakeroot-msgrcv-signal.patch b/main/fakeroot/fakeroot-msgrcv-signal.patch
new file mode 100644
index 0000000000..5def144dd8
--- /dev/null
+++ b/main/fakeroot/fakeroot-msgrcv-signal.patch
@@ -0,0 +1,12 @@
+--- fakeroot-1.21/communicate.c.orig 2016-12-02 17:46:15.754013876 +0200
++++ fakeroot-1.21/communicate.c 2016-12-02 17:47:42.755155118 +0200
+@@ -553,7 +553,7 @@
+ l=msgrcv(msg_get,
+ (struct my_msgbuf*)buf,
+ sizeof(*buf)-sizeof(buf->mtype),0,0);
+- while((buf->serial!=serial)||buf->pid!=pid);
++ while((l==-1&&errno==EINTR)||(buf->serial!=serial)||buf->pid!=pid);
+
+ semaphore_down();
+
+