diff options
-rw-r--r-- | changelog | 1 | ||||
-rw-r--r-- | patches/01_man-install-to-usr-bin-not-sbin.patch | 19 | ||||
-rw-r--r-- | patches/02_awk-fix-handling-of-functions-with-empty-body.patch | 88 |
3 files changed, 1 insertions, 107 deletions
@@ -1,6 +1,7 @@ busybox (1.32.0-1) trunk * New upstream release. + - Drop patches that came from upstream. * Manage all applet links with update-alternatives. * /etc/init.d/networking: Write directly to </var/run/net-ifaces> instead of </etc/network/interfaces>. Users should now edit diff --git a/patches/01_man-install-to-usr-bin-not-sbin.patch b/patches/01_man-install-to-usr-bin-not-sbin.patch deleted file mode 100644 index 76a5234..0000000 --- a/patches/01_man-install-to-usr-bin-not-sbin.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Denys Vlasenko <vda.linux@googlemail.com> -Date: Wed, 27 Mar 2013 13:30:18 +0000 -Subject: man: install to /usr/bin, not /sbin -Origin: upstream, http://git.busybox.net/busybox/commit/?id=80a38ca1 - ---- -diff --git a/include/applets.src.h b/include/applets.src.h -index 29ab167..00172b1 100644 ---- a/include/applets.src.h -+++ b/include/applets.src.h -@@ -236,7 +236,7 @@ IF_LZOP(APPLET(lzop, BB_DIR_BIN, BB_SUID_DROP)) - IF_LZOP(APPLET_ODDNAME(lzopcat, lzop, BB_DIR_USR_BIN, BB_SUID_DROP, lzopcat)) - IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP)) - IF_MAKEMIME(APPLET(makemime, BB_DIR_BIN, BB_SUID_DROP)) --IF_MAN(APPLET(man, BB_DIR_SBIN, BB_SUID_DROP)) -+IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP)) - IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP)) - IF_MD5SUM(APPLET_NOEXEC(md5sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, md5sum)) - IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP)) diff --git a/patches/02_awk-fix-handling-of-functions-with-empty-body.patch b/patches/02_awk-fix-handling-of-functions-with-empty-body.patch deleted file mode 100644 index 102e128..0000000 --- a/patches/02_awk-fix-handling-of-functions-with-empty-body.patch +++ /dev/null @@ -1,88 +0,0 @@ -From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> -Date: Wed, 06 Mar 2013 20:01:05 +0000 -Date: Wed, 31 Jul 2013 13:29:20 +0000 -Origin: upstream, http://git.busybox.net/busybox/commit/?id=b79a0fef -Origin: upstream, http://git.busybox.net/busybox/commit/?id=a060a1ad -Subject: awk: Fix handling of functions with empty body - -This fixes the following error that occurs when building an unpatched GCC 4.7 -with BusyBox awk: - - awk: [...]/gcc/config/i386/i386-builtin-types.awk:164: Call to undefined function - -BusyBox awk throws this syntax error if the called function has no nodes in its -node chain (i.e. the function body is empty). - ---- -diff --git a/editors/awk.c b/editors/awk.c -index 3224788..77784df 100644 ---- a/editors/awk.c -+++ b/editors/awk.c -@@ -2661,7 +2661,8 @@ static var *evaluate(node *op, var *res) - var *vbeg, *v; - const char *sv_progname; - -- if (!op->r.f->body.first) -+ /* The body might be empty, still has to eval the args */ -+ if (!op->r.n->info && !op->r.f->body.first) - syntax_error(EMSG_UNDEF_FUNC); - - vbeg = v = nvalloc(op->r.f->nargs + 1); -diff --git a/testsuite/awk.tests b/testsuite/awk.tests -index f9c3b6b..6af6072 100755 ---- a/testsuite/awk.tests -+++ b/testsuite/awk.tests -@@ -25,6 +25,53 @@ testing "awk if string == " "awk 'BEGIN{if(\"a\"==\"ab\") print \"bar\"}'" "" - - # 4294967295 = 0xffffffff - testing "awk bitwise op" "awk '{ print or(4294967295,1) }'" "4.29497e+09\n" "" "\n" -+ -+# we were testing for a non-empty body when deciding if a function was -+# defined or not. The testcase below caused: -+# awk: cmd. line:8: Call to undefined function -+prg=' -+function empty_fun(count) { -+ # empty -+} -+END { -+ i=1 -+ print "L" i "\n" -+ empty_fun(i + i + ++i) -+ print "L" i "\n" -+}' -+testing "awk handles empty function f(arg){}" \ -+ "awk '$prg'" \ -+ "L1\n\nL2\n\n" \ -+ "" "" -+ -+prg=' -+function outer_fun() { -+ return 1 -+} -+END { -+ i=1 -+ print "L" i "\n" -+ i += outer_fun() -+ print "L" i "\n" -+}' -+testing "awk properly handles function from other scope" \ -+ "awk '$prg'" \ -+ "L1\n\nL2\n\n" \ -+ "" "" -+ -+prg=' -+END { -+ i=1 -+ print "L" i "\n" -+ i + trigger_error_fun() -+ print "L" i "\n" -+}' -+testing "awk properly handles undefined function" \ -+ "awk '$prg' 2>&1" \ -+ "L1\n\nawk: cmd. line:5: Call to undefined function\n" \ -+ "" "" -+ -+ - optional DESKTOP - testing "awk hex const 1" "awk '{ print or(0xffffffff,1) }'" "4.29497e+09\n" "" "\n" - testing "awk hex const 2" "awk '{ print or(0x80000000,1) }'" "2.14748e+09\n" "" "\n" |