[PATCH 1/3] Support both custom scripts and scripted applets

Kang-Che Sung explorer09 at gmail.com
Sat Nov 17 01:24:26 UTC 2018


On Sat, Nov 17, 2018 at 6:56 AM Denys Vlasenko <vda.linux at googlemail.com> wrote:
> I basically agree.
>
> How about this? - embed/ applets can have configuration.
> If it exists, then they are visible in "make menuconfig"
> and can be selected or deselected.
> But if config is _absent_, they are included unconditionally.
>
> This seems to cover both cases.

A compromise approach? That sounds good.

However, I'm still in the position that BusyBox shouldn't be a supplier of
scripted applets (as I said, that would complicate the configuration too much).
If you downstream are okay to deploy scripted applets, then go ahead. I just
don't wish dependency hell that's essentially bikeshedding (i.e. script applets
too trivial to implement) to come up here.

On Wed, Nov 14, 2018 at 7:54 PM Ron Yorston <rmy at pobox.com> wrote:
> My view is that 'scripted applets' should require configuration in the
> same way as native applets:
>
> - it should be possible to enable and disable them individually
> - they should be listed (in alphabetical order!) by 'busybox --help' and
>   'busybox --list'
> - they should be installed by 'busybox --install'
> - they should respond to 'busybox --help name' and 'name --help'
>
> The infrastructure for all of this is already present.
>
> Custom scripts on the other hand should require no configuration, apart
> from just dropping them in the 'embed' directory.  If 'embed' is empty
> the code to support custom scripts won't be present in the binary.
>
> I'd prefer to maintain this distinction and use the same 'embedded
> scripts' machinery to support deployment of both types of script.
>
How about this:

For the 'scripted applets' use case, you provide Kbuild and Config files just
like other applets, except they just happen to reside in embed directory.

For custom scripts, require at least a "list file" to indicate which should be
built and embedded into the binary, and also in what order they would present
in the 'busybox --help' output (they need not be in alphabetical order).

Scripts in the embed directory but without any _directive_ on how they should
be built would be ignored.


More information about the busybox mailing list