Mailinglist Archive: opensuse-factory (401 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?


On 13/03/2019 20:55, Joerg Schilling wrote:
Jan Engelhardt <jengelh@xxxxxxx> wrote:


On Tuesday 2019-03-12 17:23, Neal Gompa wrote:

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.

bash already pulled in update-alternatives (at least for build time)
already in some way, so using it seemed more or less free.

I am not sure what you mean by that, but bash can be compiled as "POSIX
compliant". This is e.g. done on Mac OS (where bash is installed as /bin/sh and
where no other POSIX shell is provided by the OS) and on Solaris, where bash is
just installed as /usr/bin/bash (with a symlink /usr -> /usr/bin) and where
bash is just one of many shells.

If you do that, you break all noncompliant scripts that typically make
non-POSIX assumptions on the behavior of the built in "echo" command.

Given that posix has extensions and all the shells have some wriggle room to do things slightly differently, having something like the subset of features that work on shell X, Y and Z is far more useful and actually testable where if you just say "posix" people could choose to interpret that as bash --posix which won't necessarily work on dash so the point is we need to create an openSUSE definition of posix that is clear and everyone understands such a definition could be "the subset of commands / syntax that works on both bash and dash", if there are other shells that people care about that break under that definition its simple to add them. Then everything is clear and easy bots can be written etc...

--

Simon Lees (Simotek) http://simotek.net

Emergency Update Team keybase.io/simotek
SUSE Linux Adelaide Australia, UTC+10:30
GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups