[Aboriginal] Replacing bash with mksh

idunham at lavabit.com idunham at lavabit.com
Tue Jun 4 19:29:47 PDT 2013


> Message: 1
> Date: Tue, 04 Jun 2013 05:13:09 -0500
> From: Rob Landley <rob at landley.net>
> To: Niklas Larsson <metaniklas at gmail.com>
> Cc: "aboriginal at lists.landley.net" <aboriginal at lists.landley.net>
> Subject: Re: [Aboriginal] Replacing bash with mksh
> Message-ID: <1370340789.2776.58 at driftwood>
> Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed
> 
> On 05/31/2013 03:00:09 AM, Niklas Larsson wrote:
> > Another nice thing with mksh is that it's the default shell in Android
> > since Ice cream sandwich.
> 
> It might be nice to try to build linux from scratch with it and see  
> what breaks. I've restarted my 7.3 conversion pass last weekend and I'm  
> going to try to switch on the compiler and libc builds this time, but  
> I'm doing it under bash first.
> 
> Ideally I want to get toysh implemented ASAP, and might take some code  
> from the public domain version of mksh to help that. In practice,  
> neither of my last two day jobs has been particularly amenable to  
> having as much free time to program as I'd like, and scheduled stuff  
> likekeeping up with kernel releases (3 targets currently broken in  
> 3.10-rc4) take priority. Plus I should really finish the musl  
> switchover...
> Rob

That would be OpenBSD pdksh, for which I'd strongly recomment using one
of these two Linux ports:
https://github.com/bobertlo/openbsd-pdksh
http://slackbuilds.org/repository/14.0/system/ksh-openbsd/
IIRC, I heard that the latter includes fixes for a number of things that 
"are subtly broken in OpenBSD".

I forget exactly how to go about applying the patches from the latter
source, but it didn't take that long.
The libbsd dependency is for one or two functions that are in musl.

That said, I'll warn you: there are well over 20 C files to go through.
And there are a few builtins that we have, like mknod.

PS: be sure to ignore "oksh", which is openbsd pdksh + the old pdksh
configure + a GPL3 notice and a few unsafe hacks to make it build
with glibc.
Also ignore "posh", a pdksh fork under GPL3 which focused on removing
non-POSIX features, but doesn't support all the traps mandated by POSIX
or any interactive line editing.

> Date: Tue, 4 Jun 2013 22:46:57 +0530
> From: Prasanna Balan <prazzb at gmail.com>
> To: aboriginal at lists.landley.net
> Subject: Re: [Aboriginal] Replacing bash with mksh

> On 04/06/13, Rob Landley wrote:
> > On 05/31/2013 03:00:09 AM, Niklas Larsson wrote:
> > > Another nice thing with mksh is that it's the default shell in Android
> > > since Ice cream sandwich.
> Have been reading about it... I am thinking of replacing my user shell
> from bash to mksh..need some more time to read up on it

No real issues for most things; I've used mksh as login shell on my
netbook for a few years, due to the bloat of modern bash with all
extensions loaded. 
Even shell expressions (like a.{c,sh}), work the same.

> > It might be nice to try to build linux from scratch with it and see  
> > what breaks. I've restarted my 7.3 conversion pass last weekend and I'm  
> > going to try to switch on the compiler and libc builds this time, but  
> > I'm doing it under bash first.
> 
> prazzb
> 


 1370399387.0


More information about the Aboriginal mailing list