Charliej cjsmo at
Tue Apr 29 21:50:47 BST 2008

1.  If dash is implemented in lenny how will this affect future releases of Ubuntu?

2. Is "" in the Ubuntu dev scripts?

--------------Forwarded Message ----------------

Dear sponsors, mentors, maintainers,


Please be aware that although bash is currently the default /bin/sh there's a 
release goal for Lenny to make dash the default /bin/sh[1].
This release goal affects every single /bin/sh script and every single 
makefile not defining a different SHELL. Although they are 'affected', 
everything is ok unless 'bashisms'[2] are used.

There is a tool called 'checkbashisms' which is shipped by the 'devscripts' 
package, which is able to find several kind of bashisms in /bin/sh scripts 
and makefiles (since version 2.0.26 and above when using -f, but version from 
SVN[3] is recommended). This is the tool being used to generate reports for 
the goal's mass bug filing.

With the recent improvements made to checkbashisms a lot of bashisms were 
found in makefiles such as debian/rules. Based on the last archive wide check 
there are about 312 (spread between 306 packages) bashisms in debian/rules.

Although the number of false positives when using checkbashisms on makefiles 
is higher than the number of false positives when checking /bin/sh scripts, 
there are still way too many bashisms around.


I would like to request everybody to check for bashisms in the packages they: 
prepare, review, and upload.
lintian is currently not able to check for bashisms in files other than 
maintainer scripts (debian/rules excluded), so it is not as easy as 
saying 'just check with the latest lintian'.

How to do it:

I've written a script called[4] which can be used 
to easily check for bashisms in a .deb once checkbashisms is in $PATH.
Please be aware that this script only looks for bashisms in some directories 
and not _everywhere_, which means there might be some bashisms left in other 
places (suggestions and patches welcome!).


Running without any argument will display:
$ ./ foo.deb [bar.deb [...]]
Simple script to run checkbashisms on files inside a .deb, v0.0.1
Copyright 2008 Raphael Geissert <atomo64 at>

To check for bashisms in a give .deb (or several .debs):
$ ./ kopete_3.5.9-1_i386.deb

Processing kopete_3.5.9-1_i386.deb...
possible bashism in ./usr/bin/ line 225 (let ...):

To check for bashisms in debian/rules use:
$ checkbashisms -f -debian/rules
possible bashism in debian/rules line 740 (brace expansion):
                builddir-$(TARGET) {configure,build,install}-$(TARGET)-stamp

*Note* that --force/-f is required for checkbashisms to check for bashisms in 

I hope that this will make people more aware of bashisms and help the release 

If you want more information about dash as /bin/sh, you can read:

Fixing bashisms is pretty simple, you can get some ideas at:
If the bashism you found is not there you can always ask in d-devel at l.d.o, or 
even here in -mentors.

Other ways to help include:
 * Providing patches for the goal-dash bugs[5].
 * Switching your /bin/sh to dash!
    (apt-get install dash && dpkg-reconfigure dash))
 * Helping others to fix their bashisms
 * Spread the word! bashisms are not allowed by policy.

'bashism': in the context of the release goal a bashism is any kind of shell 
feature not required by the Debian Policy section 10.4.

Thanks in advance.

-- Atomo64 - Raphael Please avoid sending me Word, PowerPoint or Excel 
attachments. See

More information about the Ubuntu-motu mailing list