[indiana-discuss] Moving forward with a replacement for /sbin/sh ... / was: Re: [caiman-discuss] Need your input on safemodeboot archive in Indiana

Roland Mainz roland.mainz at nrubsig.org
Wed Dec 12 06:32:50 PST 2007


Bruno Jargot wrote:
> On Dec 5, 2007 5:50 AM, Roland Mainz <roland.mainz at nrubsig.org> wrote:
> > David.Comay at Sun.COM wrote:
[snip]
> > Erm... technically most (or better: _all_ of the work which I can do
> > alone has been done (see below for the remaning bits)) of the work has
> > already been done and the upcoming ksh93-integration update will
> > integrate further changes+fixes based on the feedback we got in the last
> > half year...
> > ... AFAIK the only remaning "blocker" ToDo item (before large-scale
> > testing/deployment as /sbin/sh ([1]) in a distribution like Indiana)
> > would be to create something like /sbin/ksh93 and move the ksh93
> > libraries (e.g. { libshell, libcmd, libdll, libsum and libast } to the
> > root filesystem as part of an ARC case. In theory we could do this with
> > the upcoming ksh93-integration update ARC case but we need _support_ for
> > a "consumer" for this (the original draft for PSARC/2006/550 proposed
> > /sbin/ksh93 but this was removed because we lacked such a consumer who
> > simply said "we need it [=/sbin/ksh93]" ... and we still have this
> > chicken&&egg problem (e.g. without having /sbin/ksh93 around the
> > important consumers can't use ksh93 and will therefore use other
> > solutions (or ignore simply ignore bugs (e.g. see the discussion in
> > sfwnv-discuss@ with SMF scripts not being able to detach processes)) but
> > without consumers we can't do the move...) ... ;-( ) - otherwise we're
> > just stuck in the chicken&&egg situation forever...
> >
> > [1]=See
> > http://mail.opensolaris.org/pipermail/indiana-discuss/2007-August/002079.html
> > , part 3 ('Which shell should replace the "original" Bourne shell as
> > /sbin/sh ?') - IMO /sbin/sh should be defined to be a "POSIX shell",
> > e.g. /sbin/sh should be more like an "abstract interface" which
> > implements the POSIX shell standard (erm... better wording is needed in
> > this case... ;-/ ). If someone needs any features beyond the feature set
> > defined in the standard a different interpreter (e.g. /sbin/ksh93)
> > should be used. This leaves the door open for future (POSIX conformant)
> > shells (this definition tries to ensure that we don't run into same
> > "update /sbin/sh"-trouble again in 10 or 20 years).
> 
> Roland, are you telling us that /bin/sh could be updated to ksh93 today?

Erm... the answer is both "yes" and "no", depending on how you see the
issue:

1. For Indiana the answer is "yes". The only remaining "blocker" is that
we need to move the ksh93 libraries (e.g. libshell, libcmd, libdll,
libsum and libast) to the root filesystem - beyond that most stuff has
been tested, we know the side-effects (which means: Check whether there
are cases of "set"+"unset" directly followed by a test for the return
code) and I did even demonstrate that ksh93 can run as /sbin/sh on the
OpenSolaris Summit in October using two of the workstations we had
installed with B72 (e.g. { boot, run, shotdown } Solaris and build
OS/Net and other consolidations, the X.org tree, KDE and other stuff
worked without problems).

2. The "official" change (= "/sbin/sh should be a POSIX shell" (which
leaves room for { bash-in-POSIX-mode, ksh93 or any future fully
POSIX-conformant shell } )) in OpenSolaris requires an ARC case (e.g. we
still have to do some work (see below) and therefore the answer is "no")
- which requires more work, including:
- The "proof" that this really works (as discussed long ago this
requires to run&&ship at least one OpenSolaris distribution by default
with this change (which means we have to do something like [1]))
- A set of "migration tools" which allow users to convert existing
Bourne shell scripts to POSIX shell syntax (this should cover the "{
set, unset } followed by test for return code"-item listed above, extra
builtins like "chdir" (which is identical to "cd") and the alternative
pipe symbol ('^'))
- Get the ksh93-update1 ARC case done and the code integrated
- Fix the RBAC mode - somehow we managed to add bugs shortly before
doing the putback into OS/Net and I still have to figure out what went
wrong
- Documentation and guidelines how to migrate existing scripts
- A justification

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)



More information about the indiana-discuss mailing list