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

Re: Several reasons why debian should not use bash for /bin/sh

In article <199807292326.QAA25932@kroner.ucdavis.edu>, Chris Ulrich
<cdulrich@ucdavis.edu> wrote:

>   I don't think posix compliance is worth running bash.  I'm not sure
> how un-compliant pdksh is, but I'd guess that it is pretty close to a
> full posix shell.

Just like bash, pdksh strives to be as POSIX compliant as sensible. And
it can be configured to be fully POSIX compliant if you really want it

> Also, since posix shell is basically ksh, using pdksh
> as a "posix" shell seems more natural.

The POSIX shell is not basically ksh. This is a long-standing ill rumor.
Rather, the POSIX shell is an intermediate between the Bourne shell and
ksh88 and also includes several small incompatibilities to both Bourne
and Korn.

See /usr/doc/pdksh/NOTES.gz for some of the subtle incompatibilities and
problems with the POSIX specs.

> I'm not sure posix compliance is a good enough goal because there are
> lots of non-posix compliant /bin/sh's out there.

<Shrug> There are also POSIX-compliant /bin/sh's out there. At least
some versions of AIX4 used ksh88 as /bin/sh (initially breaking GNU
autoconf scripts--ouch!), which isn't POSIX-compliant either. HP-UX has
a traditional Bourne shell with broken "$@" expansion as /bin/sh and a
POSIX compliant one as /bin/posix/sh or some such.

It's a zoo out there.

A loosely POSIX-compliant /bin/sh is a good idea. It will properly run
the great majority of Bourne shell scripts. Those that break need to be
fixed anyway, and probably already have been fixed by their authors who
ran into that problem elsewhere.

>   The only real standard is that /bin/sh has a minimum of traditional
> bourne shell compatibility.  Dependency on more is asking for trouble

Alas, this "minimum of traditional bourne shell compatibility" is
nowhere defined nor really agreed on.

Also note that discussions concerning extreme subtleties in shell
behavior become somewhat pointless when you consider the differences
across Unices between the various external commands typically called
from shell scripts. Lots of room for undetected GNU-isms and BSD-isms

Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    100+ SF Book Reviews: <URL:http://home.pages.de/~naddy/reviews/>

To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: