[PATCH] tzselect.ksh: Use /bin/sh default shell interpreter

Khem Raj raj.khem@gmail.com
Thu Dec 16 07:29:59 GMT 2021


On Wed, Dec 15, 2021 at 10:27 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
>
> On 12/15/21 21:52, Khem Raj wrote:
> > checkbashism reports no issues with tzselect.ksh, therefore using
> > /bin/sh instead of /bin/bash should be safe and portable across systems
> > which don't ship bash ( embedded systems )
>
> Didn't we already go through this? You proposed a better patch here:
>
> https://sourceware.org/pipermail/libc-alpha/2021-December/133938.html
>
> and I okayed it here:
>
> https://sourceware.org/pipermail/libc-alpha/2021-December/133940.html
>
>
> In contrast, the patch you just now emailed would change tzselect.ksh to
> just use /bin/sh. This would be an inferior patch because:
>
> (1) tzselect.ksh should be taken verbatim from upstream as Joseph
> mentioned
> <https://sourceware.org/pipermail/libc-alpha/2021-December/133559.html>.
>
> (2) tzselect.ksh has a better UI with Bash (or with ksh) than it does
> with a vanilla POSIX shell. It dynamically probes shell features and
> uses the Bash/ksh 'select' only if supported. Evidently this sort of
> dynamic probe is something that checkbashism is not smart enough to
> grok, so you shouldn't trust checkbashism on this script.

I am ok with either of the fixes since both are good for the usecase I have.
Adhemerval suggested to send this version as well. We can apply the previous one
too.


More information about the Libc-alpha mailing list