Re: [PATCH] busybox: Enable long options for enabled applets

Andre McCurdy

On Tue, Apr 27, 2021 at 10:06 PM Khem Raj <raj.khem@...> wrote:

certain applets are enabled but the long options are not enabled for
them, it results in subtle failures in ptests where its expecting these
options e.g. gzip --best is commonly used in many package tests e.g.

root@qemux86-64:/usr/lib# grep -r "\-\-best" *
acl/ptest/Makefile:GZIP_ENV = --best
attr/ptest/Makefile:GZIP_ENV = --best
coreutils/ptest/Makefile:GZIP_ENV = --best
ethtool/ptest/Makefile:GZIP_ENV = --best
libxml2/ptest/Makefile:GZIP_ENV = --best
lttng-tools/ptest/Makefile:GZIP_ENV = --best
opkg/ptest/Makefile:GZIP_ENV = --best
perl/ptest/cpan/ExtUtils-MakeMaker/lib/ExtUtils/ COMPRESS ('gzip --best')
python3.9/test/ for compress_level in ('--fast', '--best'):

this ensures that these options are enabled by default, which makes them more
compatible than now with coreutils provided utilities

busybox size grows by 4K which perhaps is acceptable

--rwxr-xr-x root root 817704 ./bin/busybox.nosuid
+-rwxr-xr-x root root 821800 ./bin/busybox.nosuid

This makes autopoint-3/gettext pass

Signed-off-by: Khem Raj <raj.khem@...>
meta/recipes-core/busybox/busybox/getopts.cfg | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/meta/recipes-core/busybox/busybox/getopts.cfg b/meta/recipes-core/busybox/busybox/getopts.cfg
index 8db0a4a8f2..aeb5ac691f 100644
--- a/meta/recipes-core/busybox/busybox/getopts.cfg
+++ b/meta/recipes-core/busybox/busybox/getopts.cfg
@@ -1,3 +1,10 @@
What's the connection between enabling the getopt applet (a utility to
help with parsing options in shell scripts etc) and enabling support
for long options in a bunch of other unconnected apps?

I think enabling support for long options in a particular app would be
better done where that app is enabled (e.g.
is enabled - in the defconfig file).

Join to automatically receive all group messages.