tech-pkg archive

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

Re: Implement dash as bootstrap shell



* On 2015-12-07 at 19:01 GMT, Matthias Ferdinand wrote:

> On Mon, Dec 07, 2015 at 02:57:12PM +0000, Sevan / Venture37 wrote:
> > Hello,
> > 
> > On 5 December 2015 at 08:03, Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
> > > The platforms which currently require pdksh are AIX and OSF1.  AIX is
> > > listed in the dash ChangeLog as being supported, but I have no idea
> > > about OSF1.  Maybe Sevan can perform his magic and get us an OSF1 host
> > > to test on? :)
> > 
> > I switched AIX to pdksh earlier this year, it could very well be that
> > I made a mistake (I never managed to get a bulk build going properly
> > on AIX 7).
> > Re OSF1, we need a pkgsrc zoo! :)
> 
> 
> Hi,
> 
> about a year ago I was using dash on my Ubuntu buildhosts, and after a
> change in mk/wrapper/gen-transform.sh the libtool builds stopped working
> ( http://mail-index.netbsd.org/pkgsrc-users/2014/09/23/msg020394.html )
> 
> Currently I just use WRAPPER_SHELL=/bin/bash, but dash is a lot
> faster.
> 
> Looking at the current mk/wrapper/gen-transform.sh, it still uses the
> problematic echo sequences \1 and \2:
> 
>     146                         $echo "s|\([$_sep]\)$1\(/[^$_sep]*\.la[$_sep]\)|\1$2\2|g"
> 
> which result in Ctrl-A and Ctrl-B under dash (also dash from pkgsrc).

This is a known issue.  The default dash behaviour (and that of the
Debian/Ubuntu implementation) is within its POSIX rights to implement
'echo \[0-9]' differently to other shells as the behaviour is
implementation defined.

However in my proposal I chose the pragmatic route and include the
Gentoo patch which changes the behaviour to what you'd expect, thus
avoiding any of these issues.

At some point though I would like to audit pkgsrc and migrate all
these instances to printf, which is the recommended way to portably
handle this situation.  We can then drop the dash patch, and will also
then be able to bootstrap natively on Debian/Ubuntu.

> I wonder why this causes next to no problems for the bulk builds, but I
> haven't tried using dash in a year (and I still use pkg_rr and no bulk
> builds ...).

I'm surprised you got past the bootstrap check which explicitly looks
for dash and aborts if the echo test fails.

Cheers,

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index