Mailinglist Archive: opensuse-factory (602 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?
On Fri, 2019-02-08 at 17:35 +0100, Jan Engelhardt wrote:
On Friday 2019-02-08 15:03, Martin Wilck wrote:

For me the question is, what's the benefit?

Off the top of my head and not very scientifically measured,
./configure for kopano.spec completes 15% faster with pbosh.

That's truly interesting. But I can bounce back your argument: you
could surely run "pbosh ./configure" to the same effect (what's pbosh,
btw? did you mean posh?).

Btw the comparison is a bit unfair: "configure", by design, is written
in the most portable shell dialect possible, forfeiting all chances for
bash to catch up with optimized builtins.

There is some evidence that bash is not the fastest of shells (
). OTOH, shell script performance matters much
less these days than it used to.

Which leaves us with SUSE-specific software, and from a glance at
e.g., they all quite consistently declare
bash. I
would argue that, in fact, people rather write #!/bin/bash these days
just because it's in more or less every howto, and no newbie wants to
have to deal the significant changes that a POSIX sh would bring.

But isn't that also an argument for having /bin/sh always point to
bash? Like it or not, bash is the "de-facto standard" (yuck) shell
today under Linux. People expect it to be that way.

Since I literally get to see every new line of spec code due to
factory-review, many specfiles have already gotten their
(if one was even needed). The upside is that specfiles don't need
lot of work because everyone tries to keep them short anyway and
reuse macros due to the volume of it all.

What rules do you follow in this review work?

* Does it build?
No => back to the drawing board (reject)

Thanks a lot for the extensive description, I was merely interested in
your rules wrt to shell scriptlets :-)

* and
nonconformance => SR to DP, so I get the credit for fixing it

* Anything else appears worth fixing
=> SR to DP

Do you require POSIX compliance?


Or compliance with dash's features, which is not the same?


I'm surprised - "No" to both of these, yet you reject bash-isms?

Back to my point - openSUSE needs to have a reliable standard what
kind of shell syntax is acceptable in scriptlets which don't use "-p".
IOW, packagers need good guidance how to write scriptlets, and ideally
a tool to verify that they comply. What should that standard be, and
how would we define it, if not by "it complies iff it runs correctly
under xyzsh" ? I'd be fine with xyzsh being dash rather than bash, but
we need to settle down on _something_.


Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >