aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-05-01 13:19:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-05-01 13:20:56 +0000
commit6f6e2467917a263d14c833e107d2c6786188645a (patch)
tree68a8b21555d29f4078b391c28f7f812a0715a04f /main/busybox
parentb3656f38b9f336476831cbdb3416b1aa32a6492b (diff)
downloadaports-6f6e2467917a263d14c833e107d2c6786188645a.tar.bz2
aports-6f6e2467917a263d14c833e107d2c6786188645a.tar.xz
main/busybox: unzip: ignore chmod errors
so we can unzip on FAT
Diffstat (limited to 'main/busybox')
-rw-r--r--main/busybox/0001-unzip-ignore-chmod-errors-so-unzipping-on-FAT-works.patch67
-rw-r--r--main/busybox/APKBUILD4
2 files changed, 70 insertions, 1 deletions
diff --git a/main/busybox/0001-unzip-ignore-chmod-errors-so-unzipping-on-FAT-works.patch b/main/busybox/0001-unzip-ignore-chmod-errors-so-unzipping-on-FAT-works.patch
new file mode 100644
index 0000000000..72518fd514
--- /dev/null
+++ b/main/busybox/0001-unzip-ignore-chmod-errors-so-unzipping-on-FAT-works.patch
@@ -0,0 +1,67 @@
+From 414005993f9b015b5feb28fa8f823112331f89a3 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 1 May 2012 15:09:28 +0200
+Subject: [PATCH] unzip: ignore chmod errors so unzipping on FAT works
+
+---
+ archival/unzip.c | 4 ++--
+ include/libbb.h | 1 +
+ libbb/make_directory.c | 7 ++++++-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/archival/unzip.c b/archival/unzip.c
+index 4fa7293..e60bc82 100644
+--- a/archival/unzip.c
++++ b/archival/unzip.c
+@@ -594,8 +594,8 @@ int unzip_main(int argc, char **argv)
+ printf(" creating: %s\n", dst_fn);
+ }
+ unzip_create_leading_dirs(dst_fn);
+- if (bb_make_directory(dst_fn, dir_mode, 0)) {
+- bb_error_msg_and_die("exiting");
++ if (bb_make_directory(dst_fn, dir_mode, FILEUTILS_IGNORE_CHMOD_ERR)) {
++ xfunc_die();
+ }
+ } else {
+ if (!S_ISDIR(stat_buf.st_mode)) {
+diff --git a/include/libbb.h b/include/libbb.h
+index 63d0419..83a1a4d 100644
+--- a/include/libbb.h
++++ b/include/libbb.h
+@@ -331,6 +331,7 @@ enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */
+ FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 9, /* -c */
+ FILEUTILS_SET_SECURITY_CONTEXT = 1 << 10,
+ #endif
++ FILEUTILS_IGNORE_CHMOD_ERR = 1 << 11,
+ };
+ #define FILEUTILS_CP_OPTSTR "pdRfilsLH" IF_SELINUX("c")
+ extern int remove_file(const char *path, int flags) FAST_FUNC;
+diff --git a/libbb/make_directory.c b/libbb/make_directory.c
+index 72303e7..7826b90 100644
+--- a/libbb/make_directory.c
++++ b/libbb/make_directory.c
+@@ -107,6 +107,10 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags)
+ * an error. */
+ if ((mode != -1) && (chmod(path, mode) < 0)) {
+ fail_msg = "set permissions of";
++ if (flags & FILEUTILS_IGNORE_CHMOD_ERR) {
++ flags = 0;
++ goto print_err;
++ }
+ break;
+ }
+ goto ret0;
+@@ -116,8 +120,9 @@ int FAST_FUNC bb_make_directory(char *path, long mode, int flags)
+ *s = c;
+ } /* while (1) */
+
+- bb_perror_msg("can't %s directory '%s'", fail_msg, path);
+ flags = -1;
++ print_err:
++ bb_perror_msg("can't %s directory '%s'", fail_msg, path);
+ goto ret;
+ ret0:
+ flags = 0;
+--
+1.7.10
+
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index 55512e501d..0cf32cb3bf 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.19.4
-pkgrel=2
+pkgrel=3
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -23,6 +23,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
0001-acpid-do-not-install-handlers-for-fatal-signals.patch
0001-grep-support-for-x-match-whole-line.patch
0001-tar-Implement-no-recursion.patch
+ 0001-unzip-ignore-chmod-errors-so-unzipping-on-FAT-works.patch
busyboxconfig"
@@ -96,4 +97,5 @@ b5375210f13fd6e1ca61a565e8fabd35 busybox-uname-is-not-gnu.patch
cfafb917f777437f428ea97da0a63915 0001-acpid-do-not-install-handlers-for-fatal-signals.patch
699701047d05468a13e5c37b5ebc3824 0001-grep-support-for-x-match-whole-line.patch
b0977368029587bab23067f0267ae309 0001-tar-Implement-no-recursion.patch
+d13491d62d8987f79c385f6fdd94836a 0001-unzip-ignore-chmod-errors-so-unzipping-on-FAT-works.patch
42e2f49483e650193c0e142ade7de142 busyboxconfig"