aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-12-25 16:02:17 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-12-25 16:04:40 +0000
commitd1a3dd5facaaa6206c7b86d644a63737212ca506 (patch)
treecbd8969989beeec1466e4ba20d57a8e61645c26e /main/busybox
parent2665e3254aa6dd80bf94c11c75b8d52434d67f5f (diff)
downloadaports-d1a3dd5facaaa6206c7b86d644a63737212ca506.tar.bz2
aports-d1a3dd5facaaa6206c7b86d644a63737212ca506.tar.xz
main/busybox: fix ash segfault
The upstream commit e9ab07c2 (ash: make ${#var} unicode-aware, 2014-08-13) introduced a regression that makes ash segfault. revert it til upstream has fixed it. http://lists.busybox.net/pipermail/busybox/2014-December/082129.html
Diffstat (limited to 'main/busybox')
-rw-r--r--main/busybox/0001-Revert-ash-make-var-unicode-aware.patch77
-rw-r--r--main/busybox/APKBUILD7
2 files changed, 83 insertions, 1 deletions
diff --git a/main/busybox/0001-Revert-ash-make-var-unicode-aware.patch b/main/busybox/0001-Revert-ash-make-var-unicode-aware.patch
new file mode 100644
index 0000000000..a7ea60f3ab
--- /dev/null
+++ b/main/busybox/0001-Revert-ash-make-var-unicode-aware.patch
@@ -0,0 +1,77 @@
+From 9b1736cc9ad620fef7d386e12ed52aab73319cef Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 25 Dec 2014 16:56:20 +0100
+Subject: [PATCH] Revert "ash: make ${#var} unicode-aware"
+
+This reverts commit e9ab07c211b283c0f798628858eaaef93a4893aa.
+---
+ shell/ash.c | 39 +++++++++++++--------------------------
+ 1 file changed, 13 insertions(+), 26 deletions(-)
+
+diff --git a/shell/ash.c b/shell/ash.c
+index 90fb00f..337d63d 100644
+--- a/shell/ash.c
++++ b/shell/ash.c
+@@ -2128,22 +2128,6 @@ lookupvar(const char *name)
+ return NULL;
+ }
+
+-static void reinit_unicode_for_ash(void)
+-{
+- /* Unicode support should be activated even if LANG is set
+- * _during_ shell execution, not only if it was set when
+- * shell was started. Therefore, re-check LANG every time:
+- */
+- if (ENABLE_FEATURE_CHECK_UNICODE_IN_ENV
+- || ENABLE_UNICODE_USING_LOCALE
+- ) {
+- const char *s = lookupvar("LC_ALL");
+- if (!s) s = lookupvar("LC_CTYPE");
+- if (!s) s = lookupvar("LANG");
+- reinit_unicode(s);
+- }
+-}
+-
+ /*
+ * Search the environment of a builtin command.
+ */
+@@ -6829,15 +6813,7 @@ evalvar(char *p, int flags, struct strlist *var_str_list)
+ varunset(p, var, 0, 0);
+
+ if (subtype == VSLENGTH) {
+- ssize_t n = varlen;
+- if (n > 0) {
+- reinit_unicode_for_ash();
+- if (unicode_status == UNICODE_ON) {
+- const char *val = lookupvar(var);
+- n = unicode_strlen(val);
+- }
+- }
+- cvtnum(n > 0 ? n : 0);
++ cvtnum(varlen > 0 ? varlen : 0);
+ goto record;
+ }
+
+@@ -9696,7 +9672,18 @@ preadfd(void)
+ # if ENABLE_FEATURE_TAB_COMPLETION
+ line_input_state->path_lookup = pathval();
+ # endif
+- reinit_unicode_for_ash();
++ /* Unicode support should be activated even if LANG is set
++ * _during_ shell execution, not only if it was set when
++ * shell was started. Therefore, re-check LANG every time:
++ */
++ if (ENABLE_FEATURE_CHECK_UNICODE_IN_ENV
++ || ENABLE_UNICODE_USING_LOCALE
++ ) {
++ const char *s = lookupvar("LC_ALL");
++ if (!s) s = lookupvar("LC_CTYPE");
++ if (!s) s = lookupvar("LANG");
++ reinit_unicode(s);
++ }
+ nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout);
+ if (nr == 0) {
+ /* Ctrl+C pressed */
+--
+2.2.1
+
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index c942296717..af2c88fcf4 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.23.0
-pkgrel=0
+pkgrel=1
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -32,6 +32,8 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
1001-fbsplash-support-console-switching.patch
1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
+ 0001-Revert-ash-make-var-unicode-aware.patch
+
busyboxconfig
glibc.patch"
@@ -127,6 +129,7 @@ e1c183cbe1ca18a0fa0d9597314076c9 0001-ifupdown-use-x-hostname-NAME-with-udhcpc.
699ce5aa1095ba4419cd595cec8a8f75 1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
b56d306ccba574da78dff060b7330806 1001-fbsplash-support-console-switching.patch
4fe5f9e973674c7db3d07f295c363a7c 1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
+387da51492382fa190bab9fa1302a310 0001-Revert-ash-make-var-unicode-aware.patch
3cff842a3618c84465d7ef5425c8749b busyboxconfig
befaac2c59c380e36a452b3f1c1d4a3a glibc.patch"
sha256sums="483ab594dd962ddbb332fd24e36ffdd6e36ac2182fbff055c56e1ca49fda09e4 busybox-1.23.0.tar.bz2
@@ -144,6 +147,7 @@ ac2cd5fed91bfaec22ed1f2766396d0feb29b9b96f20b2c12d5d8ac8769afae9 0001-linedit-d
043963183cad556bdae5d5608180f0cb76cf7eede175cd97aa002a787780500f 1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
b8b0b16ed67b0159256193b1d2108b8ef9aa8a334ab81e463bb970c71257da9a 1001-fbsplash-support-console-switching.patch
e1f3fad8e21dfd72cfcae7ab3ba31d7938e964e0f9ec08b2da0b14d462435424 1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
+e470de005aab40c1e68c35080a63f0f5e48d9cdf02cb869991a24e69fe9b7240 0001-Revert-ash-make-var-unicode-aware.patch
342bb69c144a1e63d7a7fe4c24578ce5b483c09751ac16bb36d1b88929068141 busyboxconfig
c604ef791c31d35a8c5ee4558d21428a46f37a6d762c4a7e29864f4037fc44a0 glibc.patch"
sha512sums="02c8f9dd9e47ad67b417fa58ba952bbdda6e79bad5399fba3d8217803053c2fd045228bd76d56e97d40c98296841dc66e4fa829887c05378a83bdeabafeb7f72 busybox-1.23.0.tar.bz2
@@ -161,5 +165,6 @@ a35b66cd28b79ccc14b47315ac94677fdf8c14d8a6e8956707e71fb50d453dfc5b4b822832cd1fae
2a8e9360e1cedd26bdb70d8cc036ef0abc7588bf2eee147c1c7436d7a40763f8e31d346b980145a36649130a2f811d299e4f46f7e1b60a8165a60ae9e79727d5 1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
a181dd54e8e11cf1199edb1b1fcd4b7402bbf142593b6014f32c6815bb7093b56899ad0fcc9f73c382f56203ac5274fb3d51fa070feb541436f23c31680f1a69 1001-fbsplash-support-console-switching.patch
c33073416f7da2805a20f3f456f869217171c8fbfdef85f4ae481307aeb1e1b5717084bbbc619010fa5500c3f3f49b6468d5c122024fcc49d637c82427a3f553 1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
+ea6bb04b2a16399a6c193a118e11a33595df95d0a3be612ea650ed7d4a3f58d0ae5c3e7d19925fc723d8da75ff0c437902ac0e13153df6e9252591366a1741ef 0001-Revert-ash-make-var-unicode-aware.patch
2efb13f23c48a4dc3e2eb6343256694719c3425fe8ddd36ce9fb1837e45fafa3326c2630a08d731abc6bbc104536218d095b2d997861c5b35a7f7907177d2e66 busyboxconfig
1d2739379dab1deb3eae7cffd4845300eb7d30f7343b4a1209b21a5680860d55080ad45fdefe098b249ce3040c01951fa7f0a79cd447b2d7b260eb000099d9dc glibc.patch"