[Toybox] Alpine bug.

Rob Landley rob at landley.net
Fri Jul 25 05:22:23 PDT 2014


Sorry for the delay answering (and being unable to thread properly),
the power brick for the machine with my email filters set up on it is
still in a box so I have to use the gmail web interface. (No idea
which pile to start looking in: floods are no fun. But hey, the giant
fans are finally gone. Now we talk to flooring people...)

So I installed alpine in a chroot following two different wikis:

http://alpinelinux.org/forum/installation/installing-edge-musl
http://wiki.alpinelinux.org/wiki/Installing_Alpine_Linux_in_a_chroot

And did you know if you run apk as a normal user to populate the
chroot, it complains about each package install failing but does _not_
abort? (I finally killed it at 6/15.)

Anyway, I reproduced the problem and the root cause is:

~/toybox # scripts/single.sh ls
...
~/toybox # grep =y .singleconfig
CONFIG_TOYBOX_CONTAINER=y
CONFIG_TOYBOX_FIFREEZE=y
CONFIG_TOYBOX_ICONV=y
CONFIG_TOYBOX_FALLOCATE=y
~/toybox #

I.E. CONFIG_LS did not get switched on, so it's building an
allnoconfig single command, and yes that won't work.

The guts of singleconfig.sh are fairly straightforward:

export KCONFIG_CONFIG=.singleconfig

make allnoconfig > /dev/null &&
sed -i -e "s/\(CONFIG_TOYBOX\)=y/# \1 is not set/" \
       -e "s/# CONFIG_\($NAME\|${NAME}_[^ ]*\|TOYBOX_HELP[^ ]*\|TOYBOX_I18N\|TOY
       "$KCONFIG_CONFIG" &&
make &&
mv toybox $PREFIX$1

Alas, gmail has horribly wrapped the sed expression here, but it looks
like it's boiling down to busybox sed regexes supporting "\|" when
built against glibc or uClibc, but _not_ working when built against
musl. (I know I've complained at dalias about this before.)

I expect the gnu/dammit sed would work even built against musl because
it implements its own regex engine internally and ignores the libc
one. (Of course.)

But yeah, known bug in musl that dalias insists is not a bug, which is
changing busybox behavior. I'll try to patch musl when I get it
installed the rest of the way in aboriginal and we can just have an
out of tree patch (same as the #ifdef _musl_ patch).

Rob

 1406290943.0


More information about the Toybox mailing list