Ubuntu: make the world a better place by holding users hostages?

Note: to the many people who just want to fix their problems and don't care about politics — scroll to the end of this post.

As I was having trouble getting the VMWare MUI to work on Ubuntu, I came upon a bugzilla thread that solved my original problems, but made me very concerned about the Ubuntu developer team. The discussion highlights serious problems with their mentality, priorities, and attitude.

The controversy centers around the default Bourne shell, /bin/sh, which executes scripts in Linux (expert readers may skip this paragraph and the next two). For as long as anyone remembers, Linux distros have provided GNU Bash, an "embrace and extend" version of the original sh (the behaviour of sh is actually standardised in POSIX 1003.2). So /bin/sh was a symlink to /bin/bash — yet bash has extensions that would not work in a standards-compliant sh.

Now, scripts get to choose which shell they run under: the first line in any shell script must read something like #!/path/to/shell. But authors want their scripts to run on as many systems as possible, and the only cross-UNIX shell is /bin/sh — if you required /bin/bash, your script might not run on Solaris.

The problem is that many scripts only see actual usage on Linux, and since there has never really been a "bare" sh around, many scripts inadvertently rely on bash-only features. Everything worked though, and no one complained — until last year, that is.

In June 2006, Ubuntu registered a "feature specification" to use dash rather than bash as /bin/sh. Apparently, dash is faster and needs less memory, so mostly for these reasons the change was approved for Edgy. But dash also struggles to be "more catholic" than bash (though it has its sins too), so not every bash script runs on dash. Since Debian had previously conducted a shell script audit to rid packages of bash-isms, this wasn't immediately noticed. However, outside packages were never reviewed, and complaints started piling up as new users (and upgraders) flocked to Ubuntu Edgy after its final release.

At that point, a previously obscure bug started gaining entries and visibility. The developers' response was not what you'd expect for a distro backed by Canonical and self-styled "Linux for human beings":

there are no plans to change the default configuration back to bash [...] If vendors are distributing software that expects /bin/sh to be bash, then that software is broken. Please take it up with them.

So the users are supposed to notice the breakage, carefully debug the scripts to learn that the bug is due to bash-isms, complain to the authors and wait for the fix to arrive. If the users are not programmers, they're out of luck. All this for software that ran just fine previously, mind you.

Of course, Ubuntu could easily fix this bug, retaining the speed improvement without inconveniencing users: revert sh to bash, and change Ubuntu packages to use dash. But I suppose that would mean conceding users were right from the start (and thus losing face).

Is this going to be a Jeff Johnson moment? What really scared me were comments by someone who claims to be a non-developer (strangely enough, the only non-developer to support the official policy):

Bashisms are bad. They need to be fixed [...] Sometimes you have to do things the hard way to make the world a better place. I think we have begun down a slippery slope towards eradication of bashisms. They never would have gone away if it was just 'the right thing to do', but now if you write broken scripts you give up support for a major distro.

So, making the world a better place involves taking the userbase hostage, wasting thousands of people anywhere from 30 minutes to a couple of hours, and expecting them to do your bidding (i.e. persuade third parties to conform to some lousy standard that sported incompatible changes several times in a decade)? I really hope this is not what the developer team is secretly thinking, but the fact that there are exactly two replies from a single developer, in spite of the mounting frustration expressed in tens of comments, doesn't look good. In any case, causing lost productivity that ranges somewhere into the hundreds of thousands of dollars is a remarkable accomplishment, only not one to be proud of.

Update: to those who just want to fix this problem without downgrading Ubuntu: either run dpkg-reconfigure dash or, more brutally, ln -sf /bin/bash /bin/sh


No one's claiming the scripts were correct. This was never the point. The point is the users shouldn't be the ones punished (as they currently are).

Regarding LSB: indeed, this is a larger, LSB issue. This does not change the point. Users don't need to know about LSB or Posix — "Linux for human beings", right?

I share your frustration about *how* the Ubuntu team made the bash->dash transition. However, it is not fair to claim that using a syntax exclusive to bash, while declaring it to be POSIX-compatible Bourne shell (by setting shebang to #!/bin/sh) is justified under any circumstances.

Good for you, LionsPhil :)

The discussion on that post follows a familiar pattern: the people who are not affected by this bug go on and on about the "right thing", while those who were bitten try to explain that users shouldn't be the ones to suffer.

I was using "bugzilla" generically, of course.


Then again, bash is "bourne again shell", not the original bourne shell...

Regarding the quote mentioning the software package is broken, maybe you should include the entire post and not just the choice segment:

The standard, as defined by the LSB, is that /bin/sh conforms to POSIX
(with one extension related to login shells, but that's not relevant in
this case). If vendors are distributing software that expects /bin/sh to
be bash, then that software is broken. Please take it up with them.

I think he has a very valid point in that case, after all, bash isn't the default shell on all *nix operating systems.

Beaten it to you by several months, mate. ;)


And it's not a bugzilla thread, because (mercifully) they don't use that broken piece-of-crap bugtracker.