Busybox build problem

Paul Smith psmith at netezza.com
Mon Feb 19 00:40:08 UTC 2007


On Sun, 2007-02-18 at 17:12 +0100, Denis Vlasenko wrote:

> > > It's too late. Face the reality. bash installed base is too big.
> > 
> > I disagree; major distributions such as Ubuntu are right now ditching
> > bash as /bin/sh, for other shells like dash and ash: they are doing this
> > to try to get more efficiency and speed during bootup etc.
> 
> bash is not a reason why bootup is slow. For desktop machine,
> bash is small enough (700kb IIRC) to not matter.
> 
> Bootup is slow because of SysV init scripts. I ditched them,
> and my boot is fast enough for me ever since.

Ubuntu is ditching SysV init scripts also; as of their previous release
they're now using Upstart https://wiki.ubuntu.com/ReplacementInit
although they're going there incrementally (so many of the services in
Edgy still use traditional scripts).  For a general purpose desktop
system you must have something more advanced than hardcoded scripting
(see the use cases described in the Wiki page above for some things that
need to be supported).

Anyway, this is neither here nor there; regardless of the reasons for it
and whether the reasons are correct or not, the fact remains that Ubuntu
(at least) does not use bash as /bin/sh, and they are convincing many
common packages to clean up their scripting.

> Standards are not gods, they are just codified practice.
> What is so terribly wrong with "function" syntax?

Nothing, other than the mild criticism that it's redundant and
potentially confusing ("this function doesn't have 'function' and this
one does... why is that?  What's the difference?" followed by a
time-wasting search through the documentation).  I have no problem with
adding it if you want to.  All I'm saying is that I don't believe
there's a technical reason to add it; I don't think "bash is ubiquitous
and so we should implement its idiosyncrasies" is accurate.

> > > How you realistically imagine everyone starting to audit all their
> > > scripts for usage of "function"? How many man-years will it take?
> > > Then compare it to the effort required to add support for this feature
> > > to dash.
> > 
> > That, of course, is up to you.  However, I will point out that I can
> > count on the fingers of one hand (with some left over) the number of
> > package shell scripts I've ever seen that use "function".  And I've been
> > building free software since the 1980's.
> 
> Wow, you read makefiles and supporting shell script machinery
> of every package you build? Must be terribly time consuming task...

I'm not sure where this hostile tone is coming from.

In fact, I've build hundreds of packages over many years on systems that
were NOT Linux, including various BSD's, SunOS, Solaris, HPUX, AIX,
DG-UX, OSF1, and others, and not one of those used or uses bash
as /bin/sh.  And while I had portability problems galore, and ran across
many bash-isms in files marked as /bin/sh, I hardly ever ran across a
situation where the failure was the use of "function" in a shell script.



More information about the busybox mailing list