Mailinglist Archive: opensuse-factory (602 mails)

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


On 09/02/2019 04:31, Richard Brown wrote:
On Fri, 8 Feb 2019 at 18:28, Martin Wilck <mwilck@xxxxxxx> wrote:

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 ;)

You seem to be arguing for dash: https://wiki.ubuntu.com/DashAsBinSh.
But that article also painfully demonstrates all the stuff people need
to avoid if they want to write compliant code.

Yeah, but if major distributions like Debian and Ubuntu have already
taken that step in 2006 and we've got reviewers like Jan who've
already been generally espousing good practice, maybe this is not
beyond our ability to do.

Extrapolating Jans '7 out of 120' package sample, I'd estimate we have
probably around 700 packages out of the 11000 in the distribution that
could need attention.

We fixed ~350 when we flattened /var into a single btrfs subvolume,
this exercise seems only twice as bad ;)

I remain to be convinced if it's really worth the effort, so I'd like
to encourage others to weigh in with their opinions, but I'm certainly
open to the idea.


I'm just picking this email to piggy back off rather then replying to 5
individually.

I think since the introduction of systemd the general benefit is much
less, the reality is much less of the system depends on shell scripts
compared to say 10 years ago.

From a packaging perspective I don't mind so much either way if people
want to put in the work. I have never rejected a review because of
bashism's in a #!/bin/sh i'm guessing that I like many others simply
don't know everything that is and isn't a bashism. I don't think that
its reasonable to expect all developers to learn this. So if we did
decide to enforce this kind of rule personally i'd like to see some form
of automated checking whether its in rpmlint or something else so
everyone isn't expected to just know. Until that point I don't think we
should enforce it in reviews.

I also don't think without some form of checking we would be able to
properly guarantee that we hadn't accidentally broken something and as
such I wouldn't put it at the level of something we should officially
support as part of openSUSE. An openQA test that installs all the core
packages with dash instead of bash could be another alternative but I
expect it would be kinda hard to maintain.

--

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

< Previous Next >
Follow Ups