[Toybox] Toybox Installer/setup routine?
scsijon
scsijon at lamiaworks.com.au
Tue Sep 3 11:18:08 PDT 2019
On 03/09/19 09:10, Denys Nykula wrote:
>>> which awk 2>&1 >/dev/null || ln -fsv nawk /bin/awk
>>> which vi 2>&1 >/dev/null || ln -fsv vim /bin/vi
>>
>> Those last two are on the todo list. But after toysh and route, which mkroot
>> needs. (And vi might be after make, and promoting half the stuff currently in
>> pending.)
>
> Implementing sh and make would definitely be most useful, as nobody has yet
> written light build tools ready to drop in place of GNU monopoly. The weakest
> bootstrap link would next be a subset of cmake interpreter enough to build
> LLVM. While existing awks and editors with simple license are okay.
>
And if your doing make you also should be doing the config(ure) stage,
but with the configure / make commands needing to be pulling in all
those variable switches from your system and not require you to work out
what it wants each time. It's a pet bug as far as i'm concerned that we
live with, with each program seeming to want some different ones and
some even use different switch names to do the same thing. And that IS a
whole lot of worms. I'm not sure that even Rob would dare to open that
can of worms.
>>> Since I symlink `/sbin` to `bin` and `/usr` to `.`,
>>
>> I go the other way with /usr (symlink the top level bin/sbin/lib into usr)
>> because I don't want more debris (include, local, share...) at the top level.
>
> Most do the classic usrmerge but hierarchies are my pet peeve, and the
> reversal seems slightly less complex with fewer total links.
>
>>> for i in head ifconfig route sed; do ln -fsv busybox /bin/$i; done
>>
>> What do you need head, ifconfig or sed for? (What is the toybox version missing
>> and/or getting wrong?)
>
> Head with negative -n value is used in Linux kernel build for atomics checks,
> it prints all except last few lines. Ifconfig and route didn't work against a
> pizza place Wi-Fi for unknown reason, busybox was okay there. For sed
> I have in my notes this line from some Portage script:
>
> if ! sed -n -e '/^# Generated by .*libtool/q0;4q1' "${f}"; then continue; fi
>
> Libtool is supposed to help with portability, but portability in GNU speak
> means nothing builds unless you run GNU, and distro maintainers use some
> tricks with even more GNU dependency to unbreak some of the problems
> libtool creates.
>
> There are also patch -f and find -newerXY but these are both tricky and
> unimportant compared to bootstrap tools.
>
>> As long as it doesn't dereference the symlink and stomp the binary at its end.
>> (The bzip2 installer used to do that to busybox. THAT was a fun one to debug.
>> And this is why the "install" command has different defaults than the "cp"
>> command. :)
>
> Portage seems careful with symlinks, but I have fun with each GCC install
> silently removing llvm-libunwind and no obvious line to blame for this.
>
More information about the Toybox
mailing list