aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-10-29 18:15:30 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2015-10-29 18:17:23 +0100
commit2f7367b214a4a9c4ec14b99fd9a45511ed9ee3a8 (patch)
tree5a59c290429f3387f5292643e4fcb06af6da06fb /main
parent53a8ad90d2b9774b3397ce1bf3012a26c6765969 (diff)
downloadaports-2f7367b214a4a9c4ec14b99fd9a45511ed9ee3a8.tar.bz2
aports-2f7367b214a4a9c4ec14b99fd9a45511ed9ee3a8.tar.xz
main/busybox: fix heredocs in ash
Diffstat (limited to 'main')
-rw-r--r--main/busybox/0001-ash-fix-error-during-recursive-processing-of-here-do.patch80
-rw-r--r--main/busybox/APKBUILD6
2 files changed, 85 insertions, 1 deletions
diff --git a/main/busybox/0001-ash-fix-error-during-recursive-processing-of-here-do.patch b/main/busybox/0001-ash-fix-error-during-recursive-processing-of-here-do.patch
new file mode 100644
index 0000000000..3e89a16aba
--- /dev/null
+++ b/main/busybox/0001-ash-fix-error-during-recursive-processing-of-here-do.patch
@@ -0,0 +1,80 @@
+From 0df7bfd74aadd258d040c25fbe9e63d0298fa63b Mon Sep 17 00:00:00 2001
+From: Ron Yorston <rmy@pobox.com>
+Date: Thu, 29 Oct 2015 16:44:56 +0000
+Subject: [PATCH] ash: fix error during recursive processing of here document
+
+Save the value of the checkkwd flag to prevent it being clobbered
+during recursion.
+
+Based on commit ec2c84d from git://git.kernel.org/pub/scm/utils/dash/dash.git
+by Herbert Xu.
+
+function old new delta
+readtoken 190 203 +13
+------------------------------------------------------------------------------
+(add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0) Total: 13 bytes
+
+Signed-off-by: Ron Yorston <rmy@pobox.com>
+---
+ shell/ash.c | 5 +++--
+ shell/ash_test/ash-heredoc/heredoc3.right | 1 +
+ shell/ash_test/ash-heredoc/heredoc3.tests | 9 +++++++++
+ 3 files changed, 13 insertions(+), 2 deletions(-)
+ create mode 100644 shell/ash_test/ash-heredoc/heredoc3.right
+ create mode 100755 shell/ash_test/ash-heredoc/heredoc3.tests
+
+diff --git a/shell/ash.c b/shell/ash.c
+index f13dd2a..753eacf 100644
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -11887,6 +11887,7 @@ static int
+ readtoken(void)
+ {
+ int t;
++ int kwd = checkkwd;
+ #if DEBUG
+ smallint alreadyseen = tokpushback;
+ #endif
+@@ -11900,7 +11901,7 @@ readtoken(void)
+ /*
+ * eat newlines
+ */
+- if (checkkwd & CHKNL) {
++ if (kwd & CHKNL) {
+ while (t == TNL) {
+ parseheredoc();
+ t = xxreadtoken();
+@@ -11914,7 +11915,7 @@ readtoken(void)
+ /*
+ * check for keywords
+ */
+- if (checkkwd & CHKKWD) {
++ if (kwd & CHKKWD) {
+ const char *const *pp;
+
+ pp = findkwd(wordtext);
+diff --git a/shell/ash_test/ash-heredoc/heredoc3.right b/shell/ash_test/ash-heredoc/heredoc3.right
+new file mode 100644
+index 0000000..ce01362
+--- /dev/null
++++ b/shell/ash_test/ash-heredoc/heredoc3.right
+@@ -0,0 +1 @@
++hello
+diff --git a/shell/ash_test/ash-heredoc/heredoc3.tests b/shell/ash_test/ash-heredoc/heredoc3.tests
+new file mode 100755
+index 0000000..96c227c
+--- /dev/null
++++ b/shell/ash_test/ash-heredoc/heredoc3.tests
+@@ -0,0 +1,9 @@
++echo hello >greeting
++cat <<EOF &&
++$(cat greeting)
++EOF
++{
++ echo $?
++ cat greeting
++} >/dev/null
++rm greeting
+--
+2.6.1
+
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index b023b96af9..d9e81f53f2 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.24.1
-pkgrel=2
+pkgrel=3
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -34,6 +34,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
2003-modinfo-fix-argument-parsing-and-printing-of-firmwar.patch
0001-ash-backport-fix-for-here-document-issues.patch
+ 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
acpid.logrotate
busyboxconfig
@@ -149,6 +150,7 @@ ad908fc45563148d9f22b50c6e78e0d4 2001-modutils-merge-module_entry-and-module_in
313fa7175333161c549af097d9f62a79 2002-depmod-support-generating-kmod-binary-index-files.patch
47987a0add3da5f2b1bac13c62120423 2003-modinfo-fix-argument-parsing-and-printing-of-firmwar.patch
5f03ee6f3e93bbc6aedff0777b227810 0001-ash-backport-fix-for-here-document-issues.patch
+a4d1cf64fd1835a284ccc6dbc78e3ce0 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
4046b78ee6a25259954797d73b94f4bd acpid.logrotate
08cc87d52169236c035e7a562d606514 busyboxconfig
befaac2c59c380e36a452b3f1c1d4a3a glibc.patch"
@@ -169,6 +171,7 @@ e1f3fad8e21dfd72cfcae7ab3ba31d7938e964e0f9ec08b2da0b14d462435424 1002-fbsplash-
dbddad67d6b6054b8ffe7159f7fd3189bf3b433ba8f179fb6915caeea20d1b4e 2002-depmod-support-generating-kmod-binary-index-files.patch
ea589dcd25037e3fefd2f3d6ac801a2a4a61a5cfd2d765785ea5558ed3937776 2003-modinfo-fix-argument-parsing-and-printing-of-firmwar.patch
f712ce190ce86084d56977e125d1561615394f3d9b840e926537868260e19d79 0001-ash-backport-fix-for-here-document-issues.patch
+1d3f8f7b6d0972f8e56437fce8efbafe70e2d869fbe82f06eba11e0103fce224 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
f7cbeb5a5a47395ad30454ce8262abcd3e91c33ef803c2ae31a9258d7142dd48 acpid.logrotate
3c44bace3822cc83f1a68690775e7bf51a659565a50dfe5344b40bfca782b2ec busyboxconfig
c604ef791c31d35a8c5ee4558d21428a46f37a6d762c4a7e29864f4037fc44a0 glibc.patch"
@@ -189,6 +192,7 @@ d94d17806f08ad54366ca623fbe8663b6397b28d68860239edc9305e6006f01d4ea1c1fd2033b30d
daadb1b255a8d30f2a13b84c2120427998d8173cf10754b9117e19a6fea8926d1820005f4d99a4a6999a559e731b5339c12ead22b3efbe1f0e752671363129a5 2002-depmod-support-generating-kmod-binary-index-files.patch
80589e03021fd0cb7bf29c3747e5396bf53dc99ecfecf78de86759e5c3939652d7f022f4534de0a35228bd782c1a44c4762f027d198790ec2c1bb76d6f7f102d 2003-modinfo-fix-argument-parsing-and-printing-of-firmwar.patch
d55cab6ed08434e2a278edf1be6171b921bcaee47598988e4de6b390a01569e10394c54d5d4a27e6eba251ce68df5cc1ece358be32a9c31bdf1f7e9147cf5180 0001-ash-backport-fix-for-here-document-issues.patch
+c14a632f9477c13ea99b24a73c81c9c44ead8b536970acd758e739b43a6260860039674341192ce7bb20a9204ee7d93dcd9541e526f2437d4d2d88637b400867 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
dadb4c953ebc755b88ee95c1489feb0c2d352f6e44abc716166024e6eea11ab9d10c84fad62c081775834d205cb04aa1be3c994676c88f4284495c54b9188e8b acpid.logrotate
5d5a23dc4c6b808b62d888225ba79dc726c8c2776b86d85cc01206e7e861c72d8fe23434eef74b1cfa3e8054618fa87a81af05ca22264a1901fd52944ea8c30a busyboxconfig
1d2739379dab1deb3eae7cffd4845300eb7d30f7343b4a1209b21a5680860d55080ad45fdefe098b249ce3040c01951fa7f0a79cd447b2d7b260eb000099d9dc glibc.patch"