On Mon, Mar 25, 2019 at 02:06:31PM +0100, Dridi Boukelmoune wrote:
> On Mon, Mar 25, 2019 at 1:12 PM Florian Weimer <f...@deneb.enyo.de> wrote:
> >
> > * Dridi Boukelmoune:
> >
> > > This is the kind of spec that leads to spoiled upstreams putting
> > > /bin/sh in shebangs and scratching their heads when they get bug
> > > reports for stricter systems...
> > >
> > > I'd be happier if Fedora was not part of the problem and maintainers
> > > were encouraged to figure out the correct shebang (and when in doubt
> > > use /usr/bin/bash).
> >
> > If you want more compatibility, you definitely can't use /usr/bin/bash.
> 
> Or /bin/bash, it is good to be reminded that not everyone did the UsrMove...
> 
> > Fedora is so different from other GNU/Linux systems these days, so I'm
> > not sure if *any* recommendation to encourage portability (at the cost
> > of convenience to Fedora developers or users) makes sense anymore.
> 
> For me it's not so much about the defaults. When I take a script that
> says #!/bin/sh and it turns out to contain bashisms (not even talking
> about GNU extensions in  coreutils programs) it's a needless pain in
> the backside.
> 
> If were somehow able to switch /bin/sh to dash and see where things
> blow up, we could gradually switch those to bash, not necessarily
> rewrite them to be more portable.
We *could*, but what would be the point? We might just as well mandate
that all tabs should be converted to spaces (with some specific number
per tab), and fight the uphill battle of fixing every file. Fedora
scriptlets are only used in Fedora, and we only use bash, and we don't
plan to switch to anything else, and like with tabs vs. spaces, even
if we achieved the goal of posix spec-files, it would be *zero* benefit
to our users. Seriously, no one would even notice.

In the past, Debian had the idea of switching to dash because dash was
faster and they were using sysvinit and had lots of scripts executed
at startup. We have a *much* better solution to this — let's not run
scripts at all. Systemd did away with a lot of init files, and in the
rpm land, we're in the processing of removing a large chunk of our
scriptlets and replacing them with a few filetriggers. This effect of
this is actually noticable by users and has other benefits apart from
speed. Any effort put into this is much better spent than tweaking
syntax details of scriptlets.

Zbyszek
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to