busybox: Enable long options for enabled applets
PATCH v3 1/1 busybox: Enable long options for enabled applets
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/MakeMaker.pm: COMPRESS ('gzip --best')
python3.9/test/test_gzip.py: 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
This patch add all the long options to this fragment. The long options for a tool will only get enabled if the corresponding tool/feature is enabled in main defconfig, otherwise it will be ignored in final .config
---
v2: Add all *_LONG_OPTIONS, so they can be enabled if main tool/applet
is enabled
v3: Move the long options to a dedicated cfg and enable it by default
meta/recipes-core/busybox/busybox/longopts.cfg | 15 +++++++++++++++ meta/recipes-core/busybox/busybox_1.33.0.bb | 1 + 2 files changed, 16 insertions(+) create mode 100644 meta/recipes-core/busybox/busybox/longopts.cfg
meta/recipes-core/busybox/busybox/longopts.cfg new file +15 -0
@@ -0,0 +1,15 @@ +CONFIG_FEATURE_GUNZIP_LONG_OPTIONS=y +CONFIG_FEATURE_GZIP_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y +CONFIG_FEATURE_CP_LONG_OPTIONS=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_FEATURE_DIFF_LONG_OPTIONS=y +CONFIG_FEATURE_BC_LONG_OPTIONS=y +CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y +CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y +CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y
meta/recipes-core/busybox/busybox_1.33.0.bb +1 -0
@@ -31,6 +31,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://sha1sum.cfg \ file://sha256sum.cfg \ file://getopts.cfg \ + file://longopts.cfg \ file://resize.cfg \ ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \ ${@["", "file://rcS.default"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \
Signature · 1 line
2.31.1