Mailinglist Archive: opensuse-factory (602 mails)

< Previous Next >
Re: [opensuse-factory] Can we assume that /bin/sh is bash?
  • From: Mischa Salle <mischa.salle@xxxxxxxxx>
  • Date: Mon, 18 Feb 2019 13:01:37 +0100
  • Message-id: <>
Hi all,

On Mon, Feb 18, 2019 at 9:41 AM Jan Engelhardt <jengelh@xxxxxxx> wrote:

On Friday 2019-02-08 18:10, Richard Brown wrote:
On Fri, 8 Feb 2019 at 13:23, Martin Wilck <mwilck@xxxxxxxx> wrote:
I'd like to carry our OBS dicussion to a wider audience

The question is whether we can assume that "/bin/sh" links to bash,

[...] But I think /bin/sh should be the bare minimum, smallest, leanest,
most generic shell.
I'm not sure it needs to be bash, I'm open to the idea of it changing,
and I'm even willing to help with the insane amount of fallout that
could be caused if we do decide to change it ;)


Perhaps you can help your colleague markkp on SR 676611, he seems to have a
severe difficulty in understanding the submission, particularly the sh part.
See, I am just trying to reduce the aforementioned fallout before it happens.

I might have missed part of this (very long) discussion, but in my opinion
- using /bin/sh means you SHOULD only use constructions which are
POSIX compliant.
- when you want to use bashisms, use /bin/bash. The same applies to
other shells.
I don't see why you ever want to deviate from that? Sticking to these
two rules keeps code portable, readable and actually more secure as
you know what to expect: bashisms might work differently in other
Also note that bash behaves slightly different when invokes as 'sh'
(see man page)...
If I read it correctly, these rules is what Jan tried to implement in which I would fully

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

< Previous Next >
Follow Ups