diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-07 10:35:05 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-07 10:36:25 +0000 |
commit | fbc33831807ff5e0d79da76344366670f7432813 (patch) | |
tree | a2a878b9bae3931ef2dfb7fb837fdc367c17fb99 /main/busybox | |
parent | 85f87dc7402593bca38c216cd8580b4e5dd24b20 (diff) | |
download | aports-fbc33831807ff5e0d79da76344366670f7432813.tar.bz2 aports-fbc33831807ff5e0d79da76344366670f7432813.tar.xz |
main/busybox: add patches from upstream
fixes #539
Diffstat (limited to 'main/busybox')
-rw-r--r-- | main/busybox/APKBUILD | 6 | ||||
-rw-r--r-- | main/busybox/busybox-1.18.3-buildsys.patch | 10 | ||||
-rw-r--r-- | main/busybox/busybox-1.18.3-klogd.patch | 45 |
3 files changed, 60 insertions, 1 deletions
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD index a4e9fa5ef8..109e639d21 100644 --- a/main/busybox/APKBUILD +++ b/main/busybox/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=busybox pkgver=1.18.3 -pkgrel=3 +pkgrel=4 pkgdesc="Size optimized toolbox of many common UNIX utilities" url=http://busybox.net arch="all" @@ -13,6 +13,8 @@ triggers="busybox.trigger:/bin /usr/bin /sbin /usr/sbin /lib/modules/*" source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2 $pkgname-1.11.1-bb.patch busybox-uname-is-not-gnu.patch + busybox-1.18.3-buildsys.patch + busybox-1.18.3-klogd.patch busybox-1.18.3-wget.patch loginutils-sha512.patch busyboxconfig" @@ -75,6 +77,8 @@ static() { md5sums="660af4d44661d32b22025a66f4f78df2 busybox-1.18.3.tar.bz2 4c0f3b486eaa0674961b7ddcd0c60a9b busybox-1.11.1-bb.patch b5375210f13fd6e1ca61a565e8fabd35 busybox-uname-is-not-gnu.patch +1270a714d2ed9940f04379c97bb83cba busybox-1.18.3-buildsys.patch +f2277e7a31d04295bd9d56a98ff1535b busybox-1.18.3-klogd.patch abe065069fed8458eedbdad48c115e1f busybox-1.18.3-wget.patch d21d70d590e9e04bfc65ecb23b9d1617 loginutils-sha512.patch 181310149cad8fce22aba96220cbbd38 busyboxconfig" diff --git a/main/busybox/busybox-1.18.3-buildsys.patch b/main/busybox/busybox-1.18.3-buildsys.patch new file mode 100644 index 0000000000..330b73fbb8 --- /dev/null +++ b/main/busybox/busybox-1.18.3-buildsys.patch @@ -0,0 +1,10 @@ +--- busybox-1.18.3/Config.in ++++ busybox-1.18.3-buildsys/Config.in +@@ -126,7 +126,6 @@ config FEATURE_INSTALLER + config INSTALL_NO_USR + bool "Don't use /usr" + default n +- depends on FEATURE_INSTALLER + help + Disable use of /usr. busybox --install and "make install" + will install applets only to /bin and /sbin, diff --git a/main/busybox/busybox-1.18.3-klogd.patch b/main/busybox/busybox-1.18.3-klogd.patch new file mode 100644 index 0000000000..2272cd0030 --- /dev/null +++ b/main/busybox/busybox-1.18.3-klogd.patch @@ -0,0 +1,45 @@ +--- busybox-1.18.3/sysklogd/klogd.c ++++ busybox-1.18.3-klogd/sysklogd/klogd.c +@@ -150,12 +150,41 @@ int klogd_main(int argc UNUSED_PARAM, ch + */ + klogd_open(); + openlog("kernel", 0, LOG_KERN); ++ /* ++ * glibc problem: for some reason, glibc changes LOG_KERN to LOG_USER ++ * above. The logic behind this is that standard ++ * http://pubs.opengroup.org/onlinepubs/9699919799/functions/syslog.html ++ * says the following about openlog and syslog: ++ * "LOG_USER ++ * Messages generated by arbitrary processes. ++ * This is the default facility identifier if none is specified." ++ * ++ * I believe glibc misinterpreted this text as "if openlog's ++ * third parameter is 0 (=LOG_KERN), treat it as LOG_USER". ++ * Whereas it was meant to say "if *syslog* is called with facility ++ * 0 in its 1st parameter without prior call to openlog, then perform ++ * implicit openlog(LOG_USER)". ++ * ++ * As a result of this, eh, feature, standard klogd was forced ++ * to open-code its own openlog and syslog implementation (!). ++ * ++ * Note that prohibiting openlog(LOG_KERN) on libc level does not ++ * add any security: any process can open a socket to "/dev/log" ++ * and write a string "<0>Voila, a LOG_KERN + LOG_EMERG message" ++ * ++ * Google code search tells me there is no widespread use of ++ * openlog("foo", 0, 0), thus fixing glibc won't break userspace. ++ * ++ * The bug against glibc was filed: ++ * bugzilla.redhat.com/show_bug.cgi?id=547000 ++ */ + + if (i) + klogd_setloglevel(i); + +- bb_signals(BB_FATAL_SIGS, record_signo); + signal(SIGHUP, SIG_IGN); ++ /* We want klogd_read to not be restarted, thus _norestart: */ ++ bb_signals_recursive_norestart(BB_FATAL_SIGS, record_signo); + + syslog(LOG_NOTICE, "klogd started: %s", bb_banner); + |