[packages/mksh] - behave as proper sh when invoked as /bin/sh, wothout fancy, incompatible hacks - rel 2

Jan Rękorajski baggins at pld-linux.org
Wed Dec 17 16:06:23 CET 2014


On Wed, 17 Dec 2014, Kacper Kornet wrote:

> On Tue, Dec 16, 2014 at 11:29:05PM +0100, baggins wrote:
> > commit e8ed3f0e4ba55966f3aa461d8deb6617f32d106e
> > Author: Jan Rękorajski <baggins at pld-linux.org>
> > Date:   Tue Dec 16 23:30:41 2014 +0100
> 
> >     - behave as proper sh when invoked as /bin/sh, wothout fancy, incompatible hacks
> >     - rel 2
> 
> This change breaks our rc-scripts:
> 
> $ rpm -q mksh
> mksh-50d-1.x86_64
> $ /bin/sh -c "echo -en '\n'" 
> 
> $ rpm -q mksh
> mksh-50d-2.x86_64
> $ /bin/sh -c "echo -en '\n'"
> -en \n
> 
> There was a small discussion about it some time ago:
> https://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2011-May/153795.html

Yea, I fell for it. And disabled {} expansion.
This 'echo' behavior is broken, totally. It prevents glibc to build for
x32, some scripts there use '\\n\ and '\n' in echo and expect it to pass
- every shel just passes it as-is without -e to echo, but not mksh.

I'm more and more leaning to just flush down the drain all those fancy,
crappy ksh reinventions and just go with bash as /bin/sh. The main
reason to use pdksh (and later mksh) as /bin/sh was it's speed when used
in rc-scripts, AFAIK bash caught up and we're moving towards systemd
which doesn't need shell.

-- 
Jan Rękorajski                                 | PLD/Linux
SysAdm                                         | http://www.pld-linux.org/
baggins<at>google.com
baggins<at>pld-linux.org


More information about the pld-devel-en mailing list