aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-02-10 09:40:24 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-02-10 09:40:24 +0200
commit431e1276a70a3e8aa66663d30bf8bec6d51aa571 (patch)
tree51778f8b24fa03f160d1d3ed76a61a8447ba5a2c /main/busybox
parent49b10969569bb6d1e4332e91bf07c9ce7616fd76 (diff)
downloadaports-431e1276a70a3e8aa66663d30bf8bec6d51aa571.tar.bz2
aports-431e1276a70a3e8aa66663d30bf8bec6d51aa571.tar.xz
main/busybox: fix mkdir on 64-bits
Diffstat (limited to 'main/busybox')
-rw-r--r--main/busybox/APKBUILD4
-rw-r--r--main/busybox/busybox-mkdir-permissions-64bit.patch42
2 files changed, 45 insertions, 1 deletions
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index d655e3b9fe..e520d049f5 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=6
+pkgrel=7
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -19,6 +19,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
bb-app-location.patch
0001-loginutils-use-sha512.patch
acpid.patch
+ busybox-mkdir-permissions-64bit.patch
0001-acpid-fix-for-clean-exit-on-SIGTERM.patch
http://busybox.net/downloads/fixes-1.19.3/busybox-1.19.3-getty.patch
@@ -94,6 +95,7 @@ b5375210f13fd6e1ca61a565e8fabd35 busybox-uname-is-not-gnu.patch
754916e52fa11d3fe7c29c93248b6707 bb-app-location.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
5ed72ca85b8fba4598d64a550210b31f busybox-1.19.3-getty.patch
41636628e481f22b8774b6bee1eebfb1 busybox-1.19.3-modinfo.patch
diff --git a/main/busybox/busybox-mkdir-permissions-64bit.patch b/main/busybox/busybox-mkdir-permissions-64bit.patch
new file mode 100644
index 0000000000..54c109171c
--- /dev/null
+++ b/main/busybox/busybox-mkdir-permissions-64bit.patch
@@ -0,0 +1,42 @@
+From 46db33a38d815a2f0bfcc8ad5094b23efcb4e9bd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Fri, 10 Feb 2012 09:34:57 +0200
+Subject: [PATCH] mkdir: fix permissions on 64-bit platforms
+
+sizeof(long) != sizeof(mode_t), this causes the compare in
+bb_make_directory of (long)-1 != (mode_t)-1 to fail and mess up
+the permissions of final directory by doing chmod((mode_t) -1).
+---
+ coreutils/mkdir.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
+index a4429b1..b33b6bb 100644
+--- a/coreutils/mkdir.c
++++ b/coreutils/mkdir.c
+@@ -54,7 +54,7 @@ static const char mkdir_longopts[] ALIGN1 =
+ int mkdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+ int mkdir_main(int argc UNUSED_PARAM, char **argv)
+ {
+- mode_t mode = (mode_t)(-1);
++ long mode = -1;
+ int status = EXIT_SUCCESS;
+ int flags = 0;
+ unsigned opt;
+@@ -68,10 +68,11 @@ int mkdir_main(int argc UNUSED_PARAM, char **argv)
+ #endif
+ opt = getopt32(argv, "m:p" IF_SELINUX("Z:"), &smode IF_SELINUX(,&scontext));
+ if (opt & 1) {
+- mode = 0777;
+- if (!bb_parse_mode(smode, &mode)) {
++ mode_t mmode = 0777;
++ if (!bb_parse_mode(smode, &mmode)) {
+ bb_error_msg_and_die("invalid mode '%s'", smode);
+ }
++ mode = mmode;
+ }
+ if (opt & 2)
+ flags |= FILEUTILS_RECUR;
+--
+1.7.9
+