Re: # CONFIG_BUSYBOX is not set: breakage on master

2016-08-27 Thread Cristian Ionescu-Idbohrn
On Sat, 27 Aug 2016, Denys Vlasenko wrote:
>
> This thing is meant for people who are in real squeeze and don't want
> any more functionality than they absolutely must have.
>
> If they configured 20 applets they need and they prepare their filesystem
> so that the /bin/foo -> /bin/busybox links are created by means
> other than busybox --install, they don't need the code which says this:
>
> BusyBox is copyrighted by many authors between 1998-2015.
> Licensed under GPLv2. See source distribution for detailed
> copyright notices.
>
> Usage: busybox [function [arguments]...]
>or: busybox --list[-full]
>or: busybox --install [-s] [DIR]
>or: function [arguments]...
>
> BusyBox is a multi-call binary that combines many common Unix
> utilities into a single executable.  Most people will create a
> link to busybox for each function they wish to use and BusyBox
> will act like whatever it was invoked as.
>
> It's just useless bloat for them. Now they can switch it off.

Got it, thanks.

But it's not only that text that's removed.  The "Currently defined
functions:" list is also gone, as well as the one-applet-per-line
list.  I do understand those might be considered bloat too, but that
was not intuitive for me.

> OTOH, you do want that code to be present. Thus, please turn
> CONFIG_BUSYBOX=y.

Yes, we can ;)


Cheers,

-- 
Cristian
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: # CONFIG_BUSYBOX is not set: breakage on master

2016-08-27 Thread Tito



On 08/27/2016 04:39 PM, Denys Vlasenko wrote:

On Sat, Aug 27, 2016 at 11:52 AM, Cristian Ionescu-Idbohrn
 wrote:

On Sat, 27 Aug 2016, Michael Conrad wrote:

On 8/27/2016 2:18 AM, Cristian Ionescu-Idbohrn wrote:

On Sat, 27 Aug 2016, Denys Vlasenko wrote:

config BUSYBOX
 bool "Include busybox applet"
 default y
 help
   The busybox applet provides general help regarding busybox and
   allows the included applets to be listed.  It's also required
   if applet links are to be installed at runtime.

   If you can live without these features disabling this will save
   some space.

And this is also expected:

$ ./busybox
busybox: applet not found

when executed immediately after build?  And this too?

$ ./busybox --help
-help: applet not found

$ ./busybox --list
-list: applet not found


Yes, adding or removing those behaviors is precisely the purpose of
the CONFIG_BUSYBOX setting.


Is it?  I didn't realize that and I still don't :(


Maybe you should explain your situation and what you expected?
because a person reading your subject line would assume you are
trying to say "I compiled busybox without the CONFIG_BUSYBOX flag,
and now I'm surprised that it did what it said it would do"...


Alright.  My bad.  I'll go back and read the ML...

So, I went back and re-read the "Make busybox an applet" threads where
"turn off help and list of applets" is mentioned.

On Tue, 31 May 2016, Ron Yorston wrote:
|
| This doesn't make busybox an applet, it just makes it possible to turn
| off help and list of applets.
|
| I'm not really interested in that:  I wanted busybox to be an actual
| applet to avoid having to treat it as a special case in standalone
| shell mode.
|
| If busybox is a real applet there's no need for FEATURE_SHARED_BUSYBOX
| because FEATURE_INDIVIDUAL will make a busybox binary along with those
| for all the other applets.

And my understandig now is that if CONFIG_BUSYBOX=y, the '--help',
'--list' and '--list-full' options are removed, and at the same time
adds about 900 bytes to the binary.

I may be thick, but what I still don't understand is what benefits
does that bring?


This thing is meant for people who are in real squeeze and don't want
any more functionality than they absolutely must have.

If they configured 20 applets they need and they prepare their filesystem
so that the /bin/foo -> /bin/busybox links are created by means
other than busybox --install, they don't need the code which says this:



Hi,
I think at least this part of text should be mandatory
with every possible config.

"BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices."

Eventually reduced to:

Busybox V. x.xx.x (C) GPLv2 1998-2016

The usage text etc. could be optional.

BTW we should update the year of the copyright text
to  1998-2016.

Ciao,
Tito



Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   or: function [arguments]...

BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable.  Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.

It's just useless bloat for them. Now they can switch it off.

OTOH, you do want that code to be present. Thus, please turn CONFIG_BUSYBOX=y.

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: # CONFIG_BUSYBOX is not set: breakage on master

2016-08-27 Thread Denys Vlasenko
On Sat, Aug 27, 2016 at 11:52 AM, Cristian Ionescu-Idbohrn
 wrote:
> On Sat, 27 Aug 2016, Michael Conrad wrote:
>> On 8/27/2016 2:18 AM, Cristian Ionescu-Idbohrn wrote:
>> > On Sat, 27 Aug 2016, Denys Vlasenko wrote:
>> > > config BUSYBOX
>> > >  bool "Include busybox applet"
>> > >  default y
>> > >  help
>> > >The busybox applet provides general help regarding busybox and
>> > >allows the included applets to be listed.  It's also required
>> > >if applet links are to be installed at runtime.
>> > >
>> > >If you can live without these features disabling this will 
>> > > save
>> > >some space.
>> > And this is also expected:
>> >
>> > $ ./busybox
>> > busybox: applet not found
>> >
>> > when executed immediately after build?  And this too?
>> >
>> > $ ./busybox --help
>> > -help: applet not found
>> >
>> > $ ./busybox --list
>> > -list: applet not found
>>
>> Yes, adding or removing those behaviors is precisely the purpose of
>> the CONFIG_BUSYBOX setting.
>
> Is it?  I didn't realize that and I still don't :(
>
>> Maybe you should explain your situation and what you expected?
>> because a person reading your subject line would assume you are
>> trying to say "I compiled busybox without the CONFIG_BUSYBOX flag,
>> and now I'm surprised that it did what it said it would do"...
>
> Alright.  My bad.  I'll go back and read the ML...
>
> So, I went back and re-read the "Make busybox an applet" threads where
> "turn off help and list of applets" is mentioned.
>
> On Tue, 31 May 2016, Ron Yorston wrote:
> |
> | This doesn't make busybox an applet, it just makes it possible to turn
> | off help and list of applets.
> |
> | I'm not really interested in that:  I wanted busybox to be an actual
> | applet to avoid having to treat it as a special case in standalone
> | shell mode.
> |
> | If busybox is a real applet there's no need for FEATURE_SHARED_BUSYBOX
> | because FEATURE_INDIVIDUAL will make a busybox binary along with those
> | for all the other applets.
>
> And my understandig now is that if CONFIG_BUSYBOX=y, the '--help',
> '--list' and '--list-full' options are removed, and at the same time
> adds about 900 bytes to the binary.
>
> I may be thick, but what I still don't understand is what benefits
> does that bring?

This thing is meant for people who are in real squeeze and don't want
any more functionality than they absolutely must have.

If they configured 20 applets they need and they prepare their filesystem
so that the /bin/foo -> /bin/busybox links are created by means
other than busybox --install, they don't need the code which says this:

BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   or: function [arguments]...

BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable.  Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.

It's just useless bloat for them. Now they can switch it off.

OTOH, you do want that code to be present. Thus, please turn CONFIG_BUSYBOX=y.
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: # CONFIG_BUSYBOX is not set: breakage on master

2016-08-27 Thread Jody Bruchon

On 2016-08-27 08:18, Tito wrote:

>> $ ./busybox
>> busybox: applet not found

The help text and applet list should not be shown and no error thrown
as this is the expected behavior so it should be:

>> $ ./busybox
>> $ echo $?
>> 0
This makes sense; return 0 if the busybox binary is called without an 
applet as the next argument.

In this other 2 cases the error messages are completely
broken and non-sense as they misrepresent the long name option
which is not correctly parsed as the applet name

>> $ ./busybox --help
>> -help: applet not found
>>
>> $ ./busybox --list
>> -list: applet not found
I know why this happens but it probably shouldn't happen. It's reading 
the first '-' specially.

The expected behavior should be something like this

>> $ ./busybox --list
>> --list: unknown option
>> $ echo $?
>> 1

Probably so.

I propose renaming the option to CONFIG_BUSYBOX_APPLET instead of 
CONFIG_BUSYBOX, making sure it's on by default (I think it already is), 
and modifying the config help text to warn the user of the consequences. 
Most people should probably not turn this off in the first place.

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: # CONFIG_BUSYBOX is not set: breakage on master

2016-08-27 Thread Tito



On 08/27/2016 09:39 AM, Michael Conrad wrote:

On 8/27/2016 2:18 AM, Cristian Ionescu-Idbohrn wrote:

On Sat, 27 Aug 2016, Denys Vlasenko wrote:

config BUSYBOX
 bool "Include busybox applet"
 default y
 help
   The busybox applet provides general help regarding busybox
and
   allows the included applets to be listed.  It's also required
   if applet links are to be installed at runtime.

   If you can live without these features disabling this will
save
   some space.

And this is also expected:

$ ./busybox
busybox: applet not found

when executed immediately after build?  And this too?

$ ./busybox --help
-help: applet not found

$ ./busybox --list
-list: applet not found



Yes, adding or removing those behaviors is precisely the purpose of the
CONFIG_BUSYBOX setting.

Maybe you should explain your situation and what you expected? because a
person reading your subject line would assume you are trying to say "I
compiled busybox without the CONFIG_BUSYBOX flag, and now I'm surprised
that it did what it said it would do"..._


Hi to all,
what busybox does with this option looks a little puzzling to me
and not coherent to what is written in the option's help text in all
of the 3 cases shown above:

>>
>> $ ./busybox
>> busybox: applet not found

The help text and applet list should not be shown and no error thrown
as this is the expected behavior so it should be:

>> $ ./busybox
>> $ echo $?
>> 0

In this other 2 cases the error messages are completely
broken and non-sense as they misrepresent the long name option
which is not correctly parsed as the applet name

>> $ ./busybox --help
>> -help: applet not found
>>
>> $ ./busybox --list
>> -list: applet not found

The expected behavior should be something like this

>> $ ./busybox --list
>> --list: unknown option
>> $ echo $?
>> 1

or following what was the busybox standard until now
print the usage text of the applet (or busybox), but
as we have none to print.

So it seems to me that this patch could be improved.

Ciao,
Tito



___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: # CONFIG_BUSYBOX is not set: breakage on master

2016-08-27 Thread Cristian Ionescu-Idbohrn
On Sat, 27 Aug 2016, Michael Conrad wrote:
> On 8/27/2016 2:18 AM, Cristian Ionescu-Idbohrn wrote:
> > On Sat, 27 Aug 2016, Denys Vlasenko wrote:
> > > config BUSYBOX
> > >  bool "Include busybox applet"
> > >  default y
> > >  help
> > >The busybox applet provides general help regarding busybox and
> > >allows the included applets to be listed.  It's also required
> > >if applet links are to be installed at runtime.
> > >
> > >If you can live without these features disabling this will save
> > >some space.
> > And this is also expected:
> >
> > $ ./busybox
> > busybox: applet not found
> >
> > when executed immediately after build?  And this too?
> >
> > $ ./busybox --help
> > -help: applet not found
> >
> > $ ./busybox --list
> > -list: applet not found
>
> Yes, adding or removing those behaviors is precisely the purpose of
> the CONFIG_BUSYBOX setting.

Is it?  I didn't realize that and I still don't :(

> Maybe you should explain your situation and what you expected?
> because a person reading your subject line would assume you are
> trying to say "I compiled busybox without the CONFIG_BUSYBOX flag,
> and now I'm surprised that it did what it said it would do"...

Alright.  My bad.  I'll go back and read the ML...

So, I went back and re-read the "Make busybox an applet" threads where
"turn off help and list of applets" is mentioned.

On Tue, 31 May 2016, Ron Yorston wrote:
|
| This doesn't make busybox an applet, it just makes it possible to turn
| off help and list of applets.
|
| I'm not really interested in that:  I wanted busybox to be an actual
| applet to avoid having to treat it as a special case in standalone
| shell mode.
|
| If busybox is a real applet there's no need for FEATURE_SHARED_BUSYBOX
| because FEATURE_INDIVIDUAL will make a busybox binary along with those
| for all the other applets.

And my understandig now is that if CONFIG_BUSYBOX=y, the '--help',
'--list' and '--list-full' options are removed, and at the same time
adds about 900 bytes to the binary.

I may be thick, but what I still don't understand is what benefits
does that bring?


Cheers,

-- 
Cristian
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: Not getting the correct result with SHA3

2016-08-27 Thread Lauri Kasanen
On Fri, Aug 26, 2016, at 21:28, Marlon Smith wrote:
> Hi everyone,
> 
> I'm using Busybox version 1.23.1 and it seems like sha3sum is giving an
> incorrect result.
> 
> For example if I run this command:
> 
> echo "abc" | sha3sum
> 
> I get an incorrect result:
> 
> e0a651904afe783ec83eeb586a2e602a09c43a3c6d795549ed7a58caae661074beaccd16d470ce4eac3ba98feee94bead3916ef4a75c1501
> 1f07df348ce7a9e7
> 
> I'm running BusyBox on an i.MX6 embedded Linux system based on Yocto.
> 
> Does anyone know why this could be the case?

Hi,

We're aware. SHA3 changed after we made the applet, IIRC in the padding
bits added after the data. Patches welcome, I'm really busy.

- Lauri

-- 
http://www.fastmail.com - Access your email from home and the web

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: # CONFIG_BUSYBOX is not set: breakage on master

2016-08-27 Thread Michael Conrad

On 8/27/2016 2:18 AM, Cristian Ionescu-Idbohrn wrote:

On Sat, 27 Aug 2016, Denys Vlasenko wrote:

config BUSYBOX
 bool "Include busybox applet"
 default y
 help
   The busybox applet provides general help regarding busybox and
   allows the included applets to be listed.  It's also required
   if applet links are to be installed at runtime.

   If you can live without these features disabling this will save
   some space.

And this is also expected:

$ ./busybox
busybox: applet not found

when executed immediately after build?  And this too?

$ ./busybox --help
-help: applet not found

$ ./busybox --list
-list: applet not found



Yes, adding or removing those behaviors is precisely the purpose of the 
CONFIG_BUSYBOX setting.


Maybe you should explain your situation and what you expected? because a 
person reading your subject line would assume you are trying to say "I 
compiled busybox without the CONFIG_BUSYBOX flag, and now I'm surprised 
that it did what it said it would do"...

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: # CONFIG_BUSYBOX is not set: breakage on master

2016-08-27 Thread Cristian Ionescu-Idbohrn
On Sat, 27 Aug 2016, Denys Vlasenko wrote:
> On Fri, Aug 26, 2016 at 11:33 PM, Cristian Ionescu-Idbohrn
>  wrote:
> > $ ./busybox
> > busybox: applet not found
> >
> > $ gcc --version
> > gcc (Debian 6.2.0-1) 6.2.0 20160822
> >
> > That's debian unstable.
> >
> > Everything since commit 877dedb seems broken.
>
> It's not a bug, it's a feature

Really?

> config BUSYBOX
> bool "Include busybox applet"
> default y
> help
>   The busybox applet provides general help regarding busybox and
>   allows the included applets to be listed.  It's also required
>   if applet links are to be installed at runtime.
>
>   If you can live without these features disabling this will save
>   some space.

And this is also expected:

$ ./busybox
busybox: applet not found

when executed immediately after build?  And this too?

$ ./busybox --help
-help: applet not found

$ ./busybox --list
-list: applet not found


Cheers,

-- 
Cristian
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox