From 14fe6e0238d151e394c1af1248e1a934ed39f816 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Tue, 27 Apr 2010 11:59:19 +0000 Subject: [PATCH] package/busybox: add 2 upstream fixes (ash & cpio), bumb release number SVN-Revision: 21186 --- package/busybox/Makefile | 2 +- .../busybox/patches/000-upstream-ash.patch | 14 ++++++ .../busybox/patches/000-upstream-cpio.patch | 49 +++++++++++++++++++ .../busybox/patches/250-ash_export-n.patch | 4 +- 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 package/busybox/patches/000-upstream-ash.patch create mode 100644 package/busybox/patches/000-upstream-cpio.patch diff --git a/package/busybox/Makefile b/package/busybox/Makefile index bc2554b019..3b93a0575d 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox PKG_VERSION:=1.16.1 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.busybox.net/downloads \ diff --git a/package/busybox/patches/000-upstream-ash.patch b/package/busybox/patches/000-upstream-ash.patch new file mode 100644 index 0000000000..c90e9d25c8 --- /dev/null +++ b/package/busybox/patches/000-upstream-ash.patch @@ -0,0 +1,14 @@ +--- a/shell/ash.c ++++ b/shell/ash.c +@@ -5424,7 +5424,11 @@ rmescapes(char *str, int flag) + size_t fulllen = len + strlen(p) + 1; + + if (flag & RMESCAPE_GROW) { ++ int strloc = str - (char *)stackblock(); + r = makestrspace(fulllen, expdest); ++ /* p and str may be invalidated by makestrspace */ ++ str = (char *)stackblock() + strloc; ++ p = str + len; + } else if (flag & RMESCAPE_HEAP) { + r = ckmalloc(fulllen); + } else { diff --git a/package/busybox/patches/000-upstream-cpio.patch b/package/busybox/patches/000-upstream-cpio.patch new file mode 100644 index 0000000000..863d56e9a0 --- /dev/null +++ b/package/busybox/patches/000-upstream-cpio.patch @@ -0,0 +1,49 @@ +--- a/archival/cpio.c ++++ b/archival/cpio.c +@@ -424,7 +424,7 @@ int cpio_main(int argc UNUSED_PARAM, cha + if (archive_handle->cpio__blocks != (off_t)-1 + && !(opt & CPIO_OPT_QUIET) + ) { +- printf("%"OFF_FMT"u blocks\n", archive_handle->cpio__blocks); ++ fprintf(stderr, "%"OFF_FMT"u blocks\n", archive_handle->cpio__blocks); + } + + return EXIT_SUCCESS; +--- a/testsuite/cpio.tests ++++ b/testsuite/cpio.tests +@@ -32,7 +32,7 @@ rm -rf cpio.testdir cpio.testdir2 2>/dev + # testing "test name" "command" "expected result" "file input" "stdin" + + testing "cpio extracts zero-sized hardlinks" \ +-"$ECHO -ne '$hexdump' | bzcat | cpio -i; echo \$?; ++"$ECHO -ne '$hexdump' | bzcat | cpio -i 2>&1; echo \$?; + ls -ln cpio.testdir | $FILTER_LS" \ + "\ + 1 blocks +@@ -45,7 +45,7 @@ ls -ln cpio.testdir | $FILTER_LS" \ + + test x"$SKIP_KNOWN_BUGS" = x"" && { + # Currently fails. Numerous buglets: "1 blocks" versus "1 block", +-# "1 block" must go to stderr, does not list cpio.testdir/x and cpio.testdir/y ++# does not list cpio.testdir/x and cpio.testdir/y + testing "cpio lists hardlinks" \ + "$ECHO -ne '$hexdump' | bzcat | cpio -t 2>&1; echo \$?" \ + "\ +@@ -70,7 +70,7 @@ ln cpio.testdir/nonempty cpio.testdir/no + mkdir cpio.testdir2 + + testing "cpio extracts zero-sized hardlinks 2" \ +-"find cpio.testdir | cpio -H newc --create | (cd cpio.testdir2 && cpio -i); echo \$?; ++"find cpio.testdir | cpio -H newc --create | (cd cpio.testdir2 && cpio -i 2>&1); echo \$?; + ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \ + "\ + 2 blocks +@@ -87,7 +87,7 @@ ls -ln cpio.testdir2/cpio.testdir | $FIL + # Was trying to create "/usr/bin", correct is "usr/bin". + rm -rf cpio.testdir + testing "cpio -p with absolute paths" \ +-"echo /usr/bin | cpio -dp cpio.testdir; echo \$?; ++"echo /usr/bin | cpio -dp cpio.testdir 2>&1; echo \$?; + ls cpio.testdir" \ + "\ + 1 blocks diff --git a/package/busybox/patches/250-ash_export-n.patch b/package/busybox/patches/250-ash_export-n.patch index c4bac4166e..bcc67d8eef 100644 --- a/package/busybox/patches/250-ash_export-n.patch +++ b/package/busybox/patches/250-ash_export-n.patch @@ -1,6 +1,6 @@ --- a/shell/ash.c +++ b/shell/ash.c -@@ -12340,8 +12340,17 @@ exportcmd(int argc UNUSED_PARAM, char ** +@@ -12344,8 +12344,17 @@ exportcmd(int argc UNUSED_PARAM, char ** const char *p; char **aptr; int flag = argv[0][0] == 'r' ? VREADONLY : VEXPORT; @@ -19,7 +19,7 @@ aptr = argptr; name = *aptr; if (name) { -@@ -12353,10 +12362,12 @@ exportcmd(int argc UNUSED_PARAM, char ** +@@ -12357,10 +12366,12 @@ exportcmd(int argc UNUSED_PARAM, char ** vp = *findvar(hashvar(name), name); if (vp) { vp->flags |= flag; -- 2.25.1