[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /bin/sh



Thorsten Glaser <tg@debian.org> writes:
> Helmut Grohne <helmut <at> subdivi.de> writes:

>> What are the benefits of using shells other than dash for /bin/sh? (as

> Why does dash get special treatment, anyway? It was “suddenly“ in
> Debian after having been used in Ubuntu, but… there never was an
> evaluation of shells.

There was, at the time.  dash was the fastest and most mature available
Bourne shell that offered a substantial speed improvement over bash in
extensive testing (particularly around boot speed).  We (and Ubuntu, for
similar reasons) therefore switched the default /bin/sh.

It's possible that, if mksh were available at the time and already
packaged and people had been testing it, it may have been chosen instead.
I don't know.  But I don't believe that it was in a state to be a
contender at the time.

Now, dash is already the default shell.  In order to change the default
shell again, I think those advocating a new default shell need to do the
same work that the dash advocates did the first time: show that the new
shell is substantially better than our current default shell in some
measurable, or at least clearly defensible, way.

> I still believe the codebase of mksh is better (modulo issues introduced
> due to the active development), but I’m happy with freedom to choose
> one’s own system shell…

I'm generally in favor of flexibility *provided that* it doesn't cost us
significant complexity.  However, the experience of the root shell switch
from bash to dash was that there's a *lot* of complexity here.

I think that, to convince people that flexibility won't cause stability
and complexity problems, you're going to need to present a complete and
fairly bulletproof implementation plan.  Given how difficult the bash to
dash transition was, I think it's going to have a fairly high bar to meet.

That being said, I think removing the use of diversions for handling the
default shell and simplifying the current situation would remove
complexity, and therefore should be strongly considered.  Once that's
done, if you really want to change the root shell on your own system, it
should again be possible to use a simple local diversion to do so.  (This
would, of course, not be a configuration directly supported by Debian as a
whole, so if anything breaks, you'll have to talk package maintainers into
being willing to take changes to fix it.)

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: