|
|
Log in / Subscribe / Register

Switching /bin/sh to dash (part two)

From:  Raphael Geissert <atomo64-AT-gmail.com>
To:  debian-devel-AT-lists.debian.org
Subject:  Switching /bin/sh to dash (part two)
Date:  Sun, 19 Jul 2009 18:04:13 +0200
Message-ID:  <200907191804.18204.atomo64@gmail.com>
Archive‑link:  Article

Hello everybody,

This is a follow up to my previous thread, with a slightly different proposal.

What actually needs to be done is:
* Make dash essential, make it divert the current /bin/sh symlink by default, 
make another essential package depend on dash. Prompt the user before 
diverting on interactive upgrades.

What won't change:
* Bash will still be used as the default interactive shells for users.

Side effects:
* Errors caused by the use of bashisms.
* Faster boot, builds, and general usage of /bin/sh scripts.
* Reduced memory footprint when running /bin/sh scripts.

Counter side effects:
* Fix known bashisms,
* rebuild the archive with dash as /bin/sh.

Policy references:
* Section 10.4[2]:
 "Scripts may assume that /bin/sh implements the SUSv3 Shell Command Language"
 "If a shell script requires non-SUSv3 features from the shell interpreter 
other than those listed above, the appropriate shell must be specified in the 
first line of the script"

Facts:
* Dash's inst popcon from Debian: 10733
* Over 783 issues detected and fixed
* It's been more than three years since Ubuntu made the switch,
   without all the extra bashisms-hunting Debian has done,
   without rolling it back.

References of interest:
[1]http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=debian...
[2]http://www.debian.org/doc/debian-policy/ch-files.html#s-s...
[3]https://wiki.ubuntu.com/DashAsBinSh
[4]http://manpages.debian.net/cgi-bin/man.cgi?query=checkbas...
[5]http://release.debian.org/lenny/goals.txt
[6]http://lists.debian.org/debian-release/2009/04/msg00133.html

Main diff between the previous proposal:
Current installations will only be switched to dash if it was not previously 
installed and if you agree to make the switch (debconf prompt).

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net



to post comments


Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds