On Tue, Mar 12, 2019 at 10:41 AM Ludwig Nussel <ludwig.nussel@suse.de> wrote:
Martin Wilck schrieb:
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.
I can't see a consensus reached in this discussion. Yet, a request to put /bin/sh under control of update-alternatives is on the way to Factory. So just creating facts.
That creates a dependency loop, though. Managing the core shell through alternatives is nuts because it'll break things for stateless things, require a scriptlet engine to run the program, and the scriptlet engine isn't configured yet because alternatives isn't set up... -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org