[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    Re: [OE-core] [PATCH] busybox: Enable long options for enabled applets
From:       "Khem Raj" <raj.khem () gmail ! com>
Date:       2021-04-30 2:13:05
Message-ID: CAMKF1spfpW8o4HMG8++a5H9WBqzahOQB-2D_29KRJO6-JUxw+g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Apr 29, 2021 at 5:44 PM Andre McCurdy <armccurdy@gmail.com> wrote:

> On Thu, Apr 29, 2021 at 3:29 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > On Wed, Apr 28, 2021 at 10:40 AM Andre McCurdy <armccurdy@gmail.com>
> wrote:
> > >
> > > On Tue, Apr 27, 2021 at 10:06 PM Khem Raj <raj.khem@gmail.com> 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 <raj.khem@gmail.com>
> > > > ---
> > > >  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).


Yeah perhaps a single flagment is good enough

>
>

[Attachment #5 (text/html)]

<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On \
Thu, Apr 29, 2021 at 5:44 PM Andre McCurdy &lt;<a \
href="mailto:armccurdy@gmail.com">armccurdy@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Apr 29, 2021 at 3:29 PM \
Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" \
target="_blank">raj.khem@gmail.com</a>&gt; wrote:<br> &gt;<br>
&gt; On Wed, Apr 28, 2021 at 10:40 AM Andre McCurdy &lt;<a \
href="mailto:armccurdy@gmail.com" target="_blank">armccurdy@gmail.com</a>&gt; \
wrote:<br> &gt; &gt;<br>
&gt; &gt; On Tue, Apr 27, 2021 at 10:06 PM Khem Raj &lt;<a \
href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt; \
wrote:<br> &gt; &gt; &gt;<br>
&gt; &gt; &gt; certain applets are enabled but the long options are not enabled \
for<br> &gt; &gt; &gt; them, it results in subtle failures in ptests where its \
expecting these<br> &gt; &gt; &gt; options e.g. gzip --best is commonly used in many \
package tests e.g.<br> &gt; &gt; &gt;<br>
&gt; &gt; &gt; root@qemux86-64:/usr/lib# grep -r &quot;\-\-best&quot; *<br>
&gt; &gt; &gt; acl/ptest/Makefile:GZIP_ENV = --best<br>
&gt; &gt; &gt; attr/ptest/Makefile:GZIP_ENV = --best<br>
&gt; &gt; &gt; coreutils/ptest/Makefile:GZIP_ENV = --best<br>
&gt; &gt; &gt; ethtool/ptest/Makefile:GZIP_ENV = --best<br>
&gt; &gt; &gt; libxml2/ptest/Makefile:GZIP_ENV = --best<br>
&gt; &gt; &gt; lttng-tools/ptest/Makefile:GZIP_ENV = --best<br>
&gt; &gt; &gt; opkg/ptest/Makefile:GZIP_ENV = --best<br>
&gt; &gt; &gt; perl/ptest/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm:      \
COMPRESS        (&#39;gzip --best&#39;)<br> &gt; &gt; &gt; \
python3.9/test/test_gzip.py:            for compress_level in (&#39;--fast&#39;, \
&#39;--best&#39;):<br> &gt; &gt; &gt; ...<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; this ensures that these options are enabled by default, which makes \
them more<br> &gt; &gt; &gt; compatible than now with coreutils provided \
utilities<br> &gt; &gt; &gt;<br>
&gt; &gt; &gt; busybox size grows by 4K which perhaps is acceptable<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; --rwxr-xr-x root           root                 817704 \
./bin/busybox.nosuid<br> &gt; &gt; &gt; +-rwxr-xr-x root           root               \
821800 ./bin/busybox.nosuid<br> &gt; &gt; &gt;<br>
&gt; &gt; &gt; This makes autopoint-3/gettext pass<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" \
target="_blank">raj.khem@gmail.com</a>&gt;<br> &gt; &gt; &gt; ---<br>
&gt; &gt; &gt;   meta/recipes-core/busybox/busybox/getopts.cfg | 7 +++++++<br>
&gt; &gt; &gt;   1 file changed, 7 insertions(+)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; diff --git a/meta/recipes-core/busybox/busybox/getopts.cfg \
b/meta/recipes-core/busybox/busybox/getopts.cfg<br> &gt; &gt; &gt; index \
8db0a4a8f2..aeb5ac691f 100644<br> &gt; &gt; &gt; --- \
a/meta/recipes-core/busybox/busybox/getopts.cfg<br> &gt; &gt; &gt; +++ \
b/meta/recipes-core/busybox/busybox/getopts.cfg<br> &gt; &gt; &gt; @@ -1,3 +1,10 \
@@<br> &gt; &gt; &gt;   CONFIG_GETOPT=y<br>
&gt; &gt; &gt;   CONFIG_LONG_OPTS=y<br>
&gt; &gt; &gt;   CONFIG_FEATURE_GETOPT_LONG=y<br>
&gt; &gt; &gt; +CONFIG_FEATURE_GZIP_LONG_OPTIONS=y<br>
&gt; &gt; &gt; +CONFIG_FEATURE_TAR_LONG_OPTIONS=y<br>
&gt; &gt; &gt; +CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y<br>
&gt; &gt; &gt; +CONFIG_FEATURE_CP_LONG_OPTIONS=y<br>
&gt; &gt; &gt; +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y<br>
&gt; &gt; &gt; +CONFIG_FEATURE_DIFF_LONG_OPTIONS=y<br>
&gt; &gt; &gt; +CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y<br>
&gt; &gt;<br>
&gt; &gt; What&#39;s the connection between enabling the getopt applet (a utility \
to<br> &gt; &gt; help with parsing options in shell scripts etc) and enabling \
support<br> &gt; &gt; for long options in a bunch of other unconnected apps?<br>
&gt; &gt;<br>
&gt; &gt; I think enabling support for long options in a particular app would be<br>
&gt; &gt; better done where that app is enabled (e.g.<br>
&gt; &gt; CONFIG_FEATURE_GZIP_LONG_OPTIONS should be enabled where CONFIG_GZIP<br>
&gt; &gt; is enabled - in the defconfig file).<br>
&gt;<br>
&gt; I experimented a bit more and it seems that these options are tied to<br>
&gt; the corresponding feature being enabled<br>
&gt; so they can be enabled in a fragment, unless the feature itself is<br>
&gt; enabled it will be ignored and disabled. So for<br>
&gt; disabled features/applets these options are moot. So as such, I think<br>
&gt; enabling them is a good thing as it will<br>
&gt; widen the ecompatibility for busibox systems.<br>
<br>
OK, so all that&#39;s left to do is to move them into their own config<br>
fragment (since they have nothing to do with the existing getops<br>
config fragment).</blockquote><div dir="auto"><br></div><div dir="auto">Yeah perhaps \
a single flagment is good enough  </div><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" dir="auto"><br> \
</blockquote></div></div>



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#151125): https://lists.openembedded.org/g/openembedded-core/message/151125
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 [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic