From openembedded-core Fri Apr 30 00:44:36 2021 From: "Andre McCurdy" Date: Fri, 30 Apr 2021 00:44:36 +0000 To: openembedded-core Subject: Re: [OE-core] [PATCH] busybox: Enable long options for enabled applets Message-Id: X-MARC-Message: https://marc.info/?l=openembedded-core&m=161974348703515 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--J4Q3S7TOqdNaW8xQM8yf" --J4Q3S7TOqdNaW8xQM8yf Content-Type: text/plain; charset="UTF-8" On Thu, Apr 29, 2021 at 3:29 PM Khem Raj wrote: > > On Wed, Apr 28, 2021 at 10:40 AM Andre McCurdy wrote: > > > > On Tue, Apr 27, 2021 at 10:06 PM Khem Raj 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/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 > > > > > > Signed-off-by: Khem Raj > > > --- > > > 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 @@ > > > CONFIG_GETOPT=y > > > CONFIG_LONG_OPTS=y > > > CONFIG_FEATURE_GETOPT_LONG=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_DIFF_LONG_OPTIONS=y > > > +CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y > > > > 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. > > CONFIG_FEATURE_GZIP_LONG_OPTIONS should be enabled where CONFIG_GZIP > > is enabled - in the defconfig file). > > I experimented a bit more and it seems that these options are tied to > the corresponding feature being enabled > so they can be enabled in a fragment, unless the feature itself is > enabled it will be ignored and disabled. So for > disabled features/applets these options are moot. So as such, I think > enabling them is a good thing as it will > widen the ecompatibility for busibox systems. OK, so all that's left to do is to move them into their own config fragment (since they have nothing to do with the existing getops config fragment). --J4Q3S7TOqdNaW8xQM8yf Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Links: You receive all messages sent to this group. View/Reply Online (#151124): https://lists.openembedded.org/g/openembedded= -core/message/151124 Mute This Topic: https://lists.openembedded.org/mt/82422704/4454766 Group Owner: openembedded-core+owner@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ope= nembedded-core@marc.info] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --J4Q3S7TOqdNaW8xQM8yf--