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-10 at 00:14 GMT, David Sainty wrote:

> On 08/12/15 08:55, Jonathan Perkin wrote:
> >* On 2015-12-07 at 19:01 GMT, Matthias Ferdinand wrote:
> >
> >>Hi,
> >>
> >>about a year ago I was using dash on my Ubuntu buildhosts, and after a
> >>change in mk/wrapper/ the libtool builds stopped working
> >>( )
> >>
> >>Currently I just use WRAPPER_SHELL=/bin/bash, but dash is a lot
> >>faster.
> >>
> >>Looking at the current mk/wrapper/, 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.
> >
> I've spent time in the past trying to come up with a reasonable way of
> making dash work, and gave up for the reason of this extremely unhelpful
> dash behaviour, and because pdksh does actually Just Work these days (after
> an integer overflow bug was fixed a while back).
> I really don't see much benefit in having a patched version of dash that
> behaves differently to every other version of dash, since the very way it
> would behave differently is also such a point of contention with the dash
> maintainers for some reason (and therefore the patch will never make it into
> "standard dash").
> That leaves us barely better off than using pdksh - which is comparably
> fast, and more likely to be available on other platforms as a base shell
> than a hacked dash will be (E.g. I can "apt-get install pdksh", but I can't
> "apt-get install dash-not-the-normal-dash-but-the-special-patched-dash").
> How about making work with the standard dash behaviour
> instead - perhaps by using "printf" instead of "echo" in
> under dash?

Yeh, as I wrote in a later mail this is what I'm currently working on.
I now have an Ubuntu 14.04 machine running bulk builds with its native
/bin/dash, and will work on this branch (which already has the printf

Once we're done with the branch we can revisit this.  As for pdksh, I
will for completeness perform a new bulk build with it to see if it
fares any better.  As I mentioned earlier, in previous testing it was
horribly broken, at times unable to even build lang/perl, so it will
be interesting to see if this is fixed.  Given it was never able to
perform a full build there was no chance to do any meaningful
performance comparison, so that will also be useful.


Jonathan Perkin  -  Joyent, Inc.  -

Home | Main Index | Thread Index | Old Index