[PATCH] configure: resolve real path to bash
David Bremner
david at tethera.net
Wed Jan 30 17:34:42 PST 2019
Danh Doan <congdanhqx at gmail.com> writes:
> David Bremner <david at tethera.net> writes:
>
>> Danh Doan <congdanhqx at gmail.com> writes:
>>
>>>
>>> I wonder if it's better to keep `/usr/bin/env bash` instead of resolving
>>> bash to specific file. Something like this:
>>>
>>
>> This will require Debian (and I think Fedora) to do the resolution
>> themselves, because they don't support "#! /usr/bin/env interpreter"
>> Of course the distro specific patches are slightly less complicated,
>> since they can hard code the location of bash.
>
> I have nothing against your approach,
> but I still slightly prefer to be able to run `configure` script without
> setting environment variable.
>
Have you verified that you need to set an evironment variable? If there
is only one bash in $PATH, command -v should work fine. The previous bug
was using the variable BASH, which bash itself sets to /bin/sh (which I
find odd, but nobody asked me). I only have the environment variable
setting in the Debian packaging to work around a (since resolved)
misconfiguration [1] of the debian autobuilders.
> Is it acceptable to emulate `realpath` in `configure` script?
> If yes, we could borrow this script (MIT licensed).
>
> https://github.com/chriskempson/base16-shell/blob/master/realpath/realpath.sh
>
It starts to seem a bit overcomplicated at that point.
[1]: The autobuilders had /bin as a link to /usr/bin, but the resulting
binary packages were installed on systems without that link. Hilarity
ensued.
More information about the notmuch
mailing list