Mailinglist Archive: opensuse-factory (602 mails)

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

On Fri, 2019-02-08 at 14:25 +0100, Jan Engelhardt wrote:
On Friday 2019-02-08 13:22, Martin Wilck wrote:
I'm aware that, in principle, /bin/sh is supposed to be the Bourne
shell on Unix systems. But as a matter of fact, on current
openSUSE, it
is not.

But it could be. In fact, it can be. `zypper dup` yesterday with an
update block of 120 packages yielded only 7 scriptlet problems when
sh is dash.

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.

No one needs to write sh-compatible code. The code just needs to be
annotated that it requires a certain interpreter. Since script files
already have a #! line most of the time, that's taken care of.

... unless that line reads '#! /bin/sh'.

Debian is one distro where dash is prominently featured in one capacity or
another, so upstream software already has to deal with the situation.

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.

Since I literally get to see every new line of spec code due to
factory-review, many specfiles have already gotten their treatment
(if one was even needed). The upside is that specfiles don't need a
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)

* fulfilled?
No => give up, complain (comment), or let someone else have the honor to
reject it

* fulfilled?
No => complain or outright make an independent SR to the develprj/DP
for evaluation and debate

(only sometimes and only cursory, since there's a dedicated legal department
and robots doing that already)
metadata mismatch => reject

failure to abide => SR to DP (the bots don't catch it ATM)

* 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?


Do other reviewers follow the same rules as you do?

Reviewers may forget some points sometimes letting bad stuff pass
through, but they be forgiven for the guidelines are so plentiful and
humans have a certain MTBF. So... yes, they follow the "rules".

Do they follow the same algorithm? I suspect not everyone will
jump in and proactively fix a submission for the submitter,
because that constitutes a development not a review activity.
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups