aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-22 08:31:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-22 08:31:15 +0000
commitf0636bcb70a3dca8d675f9c42a8fe0feedaa89e5 (patch)
tree7fa933d08b831fd33a5413461052b316661af8c5
parent2ff99dcc795b7bc24ff6b6b972a7f4d4a2f8e28d (diff)
downloadaports-f0636bcb70a3dca8d675f9c42a8fe0feedaa89e5.tar.bz2
aports-f0636bcb70a3dca8d675f9c42a8fe0feedaa89e5.tar.xz
main/busybox: use upstream fix for acpid fix
-rw-r--r--main/busybox/0001-acpid-do-not-install-handlers-for-fatal-signals.patch42
-rw-r--r--main/busybox/0001-acpid-fix-for-clean-exit-on-SIGTERM.patch30
-rw-r--r--main/busybox/APKBUILD6
3 files changed, 45 insertions, 33 deletions
diff --git a/main/busybox/0001-acpid-do-not-install-handlers-for-fatal-signals.patch b/main/busybox/0001-acpid-do-not-install-handlers-for-fatal-signals.patch
new file mode 100644
index 0000000000..b62ab4aade
--- /dev/null
+++ b/main/busybox/0001-acpid-do-not-install-handlers-for-fatal-signals.patch
@@ -0,0 +1,42 @@
+From bbf1e3c144c1ee93409a0e0546cb56b34eccfcfd Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Sun, 5 Feb 2012 15:08:08 +0100
+Subject: [PATCH 1/4] acpid: do not install handlers for fatal signals
+
+For acpid, it's ok to die at once.
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+---
+ util-linux/acpid.c | 8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/util-linux/acpid.c b/util-linux/acpid.c
+index 361a2b2..1b22f3a 100644
+--- a/util-linux/acpid.c
++++ b/util-linux/acpid.c
+@@ -268,8 +268,12 @@ int acpid_main(int argc UNUSED_PARAM, char **argv)
+
+ xchdir(opt_dir);
+
++ /* We spawn children but don't wait for them. Prevent zombies: */
+ bb_signals((1 << SIGCHLD), SIG_IGN);
+- bb_signals(BB_FATAL_SIGS, record_signo);
++ // If you enable this, (1) explain why, (2)
++ // make sure while(poll) loop below is still interruptible
++ // by SIGTERM et al:
++ //bb_signals(BB_FATAL_SIGS, record_signo);
+
+ pfd = NULL;
+ nfd = 0;
+@@ -337,7 +341,7 @@ int acpid_main(int argc UNUSED_PARAM, char **argv)
+ }
+ if (!event)
+ continue;
+- // spawn event handler
++ /* spawn event handler */
+ process_event(event);
+ }
+ }
+--
+1.7.9.1
+
diff --git a/main/busybox/0001-acpid-fix-for-clean-exit-on-SIGTERM.patch b/main/busybox/0001-acpid-fix-for-clean-exit-on-SIGTERM.patch
deleted file mode 100644
index 4218971889..0000000000
--- a/main/busybox/0001-acpid-fix-for-clean-exit-on-SIGTERM.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 4d5e59384109ab83309f07b67a1e2eef1f392daf Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Fri, 3 Feb 2012 14:32:51 +0100
-Subject: [PATCH] acpid: fix for clean exit on SIGTERM
-
-f4b2f335506e570a06d5eab09068da3f61 introduced safe_poll() and no
-longer exits on SIGTERM. We solve this by explicit checking for
-bb_got_signal.
-
-Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
----
- util-linux/acpid.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/util-linux/acpid.c b/util-linux/acpid.c
-index 361a2b2..63c7a6d 100644
---- a/util-linux/acpid.c
-+++ b/util-linux/acpid.c
-@@ -293,7 +293,7 @@ int acpid_main(int argc UNUSED_PARAM, char **argv)
-
- write_pidfile(opt_pidfile);
-
-- while (safe_poll(pfd, nfd, -1) > 0) {
-+ while (safe_poll(pfd, nfd, -1) > 0 && !bb_got_signal) {
- int i;
- for (i = 0; i < nfd; i++) {
- const char *event;
---
-1.7.9
-
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index e520d049f5..9c5ddc944c 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.19.3
-pkgrel=7
+pkgrel=8
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -20,7 +20,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
0001-loginutils-use-sha512.patch
acpid.patch
busybox-mkdir-permissions-64bit.patch
- 0001-acpid-fix-for-clean-exit-on-SIGTERM.patch
+ 0001-acpid-do-not-install-handlers-for-fatal-signals.patch
http://busybox.net/downloads/fixes-1.19.3/busybox-1.19.3-getty.patch
http://busybox.net/downloads/fixes-1.19.3/busybox-1.19.3-modinfo.patch
@@ -96,7 +96,7 @@ b5375210f13fd6e1ca61a565e8fabd35 busybox-uname-is-not-gnu.patch
784383013b8f015fb0d214618c46b4b8 0001-loginutils-use-sha512.patch
361a26d690e6f1585c6710b3afeb10a6 acpid.patch
78bb1e70897124a0e09d50c425210e83 busybox-mkdir-permissions-64bit.patch
-058da9d0a595430e840e5793b5a5d059 0001-acpid-fix-for-clean-exit-on-SIGTERM.patch
+cfafb917f777437f428ea97da0a63915 0001-acpid-do-not-install-handlers-for-fatal-signals.patch
5ed72ca85b8fba4598d64a550210b31f busybox-1.19.3-getty.patch
41636628e481f22b8774b6bee1eebfb1 busybox-1.19.3-modinfo.patch
cb48bffc0e1e3be527cd4ff67324a2a2 busybox-1.19.3-wget.patch