busybox 1.24.1 ash regression
Natanael Copa
ncopa at alpinelinux.org
Thu Oct 29 07:16:30 UTC 2015
Hi,
musl's configure script fails with busybox 1.24.1 ash:
./configure: line 50: syntax error: unexpected "}"
The relevant code from the script
quote () {
tr '\n' ' ' <<EOF | grep '^[-[:alnum:]_=,./:]* $' >/dev/null 2>&1 && { echo "$1" ; return 0 ; }
$1
EOF
printf %s\\n "$1" | sed -e "s/'/'\\\\''/g" -e "1s/^/'/" -e "\$s/\$/'/" -e "s#^'\([-[:alnum:]_,./:]*\)=\(.*\)\$#\1='\2#"
}
It is the "tr ... <<EOF | grep .. && { ... }" that triggers it.
Simplfied test case:
foo () {
tr '\n' ' ' <<EOF | grep '.*' && { echo "$1" ; return 0 ; }
$1
EOF
}
foo "bar"
The simplified testcase works with bash, dash and busybox 1.23 ash, but
fails with busybox 1.24.1.
-nc
More information about the busybox
mailing list