Mailinglist Archive: opensuse-factory (602 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?
On Tue, 2019-02-19 at 13:24 +1030, Simon Lees wrote:

I think that as a starting point we might not even need to go this
far.
A simple policy of "Contributors should accept submissions that
remove
bashism's from scripts with a #!/bin/sh shebang or replace it with
#!/bin/bash" is reasonable. That way we are not blocking people who
want
to work on this from working on it. Whether the shebang should be
replaced or the code is modified to be more compliant should be up to
the maintainer as they are the person who has to maintain the code
long
term. At the same time submissions to factory shouldn't be blocked
because scripts in #!/bin/sh are using shell specific features.

So - encourage people to remove bashisms on the one hand, and on the
other hand allow more bashisms to creep in? As a policy, that doesn't
make much sense to me.

We should either say a) "YES, /bin/sh is always bash on openSUSE" (like
Fedora), or b) "/bin/sh could be any POSIX compliant shell" (like
Debian). In case a), removing bashisms would be pointless and wrong and
should therefore be discouraged. If we go for b), we must avoid
bashisms in new submissions. Even the syntax "%post -p /bin/bash"
should be considered transitional in that case.

IMO it has to be either a) or b) eventually. I see no benefit in
looking for a middle ground (other than for transition).

Down the road if we decide as a project that we want to officially
support multiple shells as #!/bin/sh I'd like to see debians checkers
intergrated into rpmlint by the people who want to see this feature.

The longer this thread evolves, the more I wonder how a decision could
be reached. But I do think we need one. Otherwise we'll waste energy in
pointless races where some people remove bashisms and others introduce
new ones. We all have better things to do.

Regards
Martin

--
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 >
Follow Ups