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

Re: HOWTO enhance Debian by removing HAL



Hi list,

I'm reluctant of following up to start yet another fruitless discussion
on bash vs. dash on this list,  if you are really interested cf at least
3 recent threads on that subject in debian-devel.

Please don't let us hijack this thread only because someone jumped
on an aside I'm already regretting in view of this OT subthread.

On Sun, Aug 02, 2009 at 18:36 -0500, Nate Bargmann wrote:
> * Siggy Brentrup <debian@psycho.i21k.de> [2009 Aug 02 11:54 -0500]:
[ snip ]
> > > So probably still better to help speed up that process instead of forking.
> > 
> > 5 years with 2 release cycles didn't change much apart from removed
> > bashisms. ...
> > 
> > The point of my aside you kindly jumped on was while doing a fork
> > don't forget to remove bash from essential.
> 
> Please enlighten me as to why removing Bash from essential is
> important.  My understanding was that Bash was the defacto standard
> shell these days.  I understand that Dash is smaller which means it
> could be useful.  Is Dash so much smaller/faster that it offers a real
> performance advantage over Bash on smaller systems like netbooks?  Or
> is it something else?

The point is not banning bash or neglecting it's de facto standard
status, the point is enforcing system and maintainer scripts starting
with '#!/bin/sh' to be POSIXLY_CORRECT and thus portable.

Shell scripts using bash extensions to POSIX must start with
'#!/bin/bash' and packages with maintainer scripts using bash
should declare a (Pre-)?Dependency on bash.  With bash being
essential, the last requirement can't be enforced.

Now the technical differences: 

% ls -lh /bin/[bd]ash
-rwxr-xr-x 1 root root 709K 2009-03-01 10:31 /bin/bash
-rwxr-xr-x 1 root root  83K 2009-02-16 15:51 /bin/dash

% ldd /bin/[bd]ash
/bin/bash:
	linux-gate.so.1 =>  (0xb7f8f000)
	libncurses.so.5 => /lib/libncurses.so.5 (0xb7f3f000)
	libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7f3b000)
	libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7ddb000)
	/lib/ld-linux.so.2 (0xb7f90000)
/bin/dash:
	linux-gate.so.1 =>  (0xb7fcf000)
	libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7e52000)
	/lib/ld-linux.so.2 (0xb7fd0000)

There is also a noticeable difference in performance, but with current
machines it sums up to the boot sequence being <10s slower when
/bin/sh -> bash compared to /bin/sh -> dash.  With slow machines
like my beloved SGI Indy R5000 the difference is more important:
iirc >1m (measured in '04).  

Apart from the boot sequence a lot of shell scripts are run in
succession when upgrading a system.  Same performance penalty here,
it's only relevant on slow boxes.

Back in '04 you had to point /bin/sh -> bash to be sure no maintainer
script broke on upgrade, implying the performance penalty.  Manoj and
others assured me on d-d, that this is no longer necessary.
  
The biggest problem in making bash non-essential are all those scripts
users wrote relying on bash always being available.  Once you make
/bin/sh -> dash the default as Ubuntu does, you can hear a great
moaning all over the world: "Debian broke my system!".

IMHO it was a fault to make bash essential in the early days of Debian
which nobody saw - with dash not yet available and shell functionality
required.

Hoping this lengthy discourse answers your questions
  Siggy
-- 
Please don't Cc: me when replying, I might not see either copy.
               bsb-at-psycho-dot-informationsanarchistik-dot-de
               or:                bsb-at-psycho-dot-i21k-dot-de
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Attachment: signature.asc
Description: Digital signature


Reply to: