On 3/21/2019 3:23 PM, Richard W.M. Jones wrote:

So what?  On Fedora /bin/sh is bash, and bash is a fine shell.

All this nonsense of using dash for /bin/sh on Debian is IMO a
pointless bunch of make-work.

Fedora has certainly made a lot of make-work projects over the last decade, under arguably more questionable reasoning.

IMO the situation that we're in now ("Assume you're running in bash, but called as -/bin/sh") is a worst-of-both-worlds middle ground, somewhat akin to mandating webpages be written in IE Quirks Mode for all time. It's neither pedantically correct, nor flexible for users and downstreams. And the resolution from all of this last time remains lacking in the guarantees that an independent spec should have:

http://web.archive.org/web/20150821020837/http://rpm.org/ticket/877
https://pagure.io/packaging-committee/issue/184
https://bugzilla.redhat.com/show_bug.cgi?id=850706
via https://lists.fedoraproject.org/pipermail/devel/2014-October/202998.html

RPM should IMHO indicate scriptlets are to be written in Bourne shell, give a 'SHOULD'-level recommendation for POSIX-correctness, and provide a mechanism for distros to override that default. And If Fedora's packaging guidelines are going to continue to state that bashisms are completely OK, then it should use that override mechanism to set the shell to "/bin/bash" explicitly.


-jc