Re: [PATCH] configure: resolve real path to bash

Subject: Re: [PATCH] configure: resolve real path to bash

Date: Wed, 30 Jan 2019 21:34:42 -0400

To: Danh Doan, notmuch@notmuchmail.org

Cc:

From: David Bremner


Danh Doan <congdanhqx@gmail.com> writes:

> David Bremner <david@tethera.net> writes:
>
>> Danh Doan <congdanhqx@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.

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: