How to install a custom permanent postinstall handler?

Andrey Repin
Mon Apr 4 11:20:00 GMT 2016

Greetings, Yaakov Selkowitz!

> On 2016-04-03 18:05, Andrey Repin wrote:
>> Because, within my reach, Cygwin is the only system that not using DASH as
>> /bin/sh. Though, I may try rolling some busybox…

> There *is* a world outside of Debian/Ubuntu;

I have no doubt in that.

> Fedora, RHEL/CentOS, and Arch Linux all use bash for /bin/sh.

I tested on CentOS and FreeBSD, CentOS failed for the aforementiond
reason(bash!), FreeBSD test succeed, but I were unable to obtain exact version
info about used shell. For some reason, /bin/sh doesn't like -V or --version.
But it wasn't dash (not present).

(The simple test was "/bin/sh -c '_test(){ local -; echo 1;}; _test'.")

> However, a simple test in the form of building GCC with dash as /bin/sh, while
> noticeably faster, showed that Debian/Ubuntu have yet to fully upstream
> their work ("gcc/genmultilib: 261: shift: can't shift that many").

Well, what did you expect shifting nonexistent parameters?
POSIX explicitly required[1] that n must not be greater than $#.

> As much as the speed difference is promising (and frankly tempting), I'm 
> afraid we simply don't have the resources to fix everything to work with 
> dash as /bin/sh.

If you want to blame anything, blame your GCC build script.

The same place[2] answered my original question. It doesn't look like "local"
is at all defined by POSIX, so using it with /bin/sh scripts is always a risk.


With best regards,
Andrey Repin
Monday, April 4, 2016 13:29:38

Sorry for my terrible english...

More information about the Cygwin mailing list