Discussion:
[PATCH] build: GuixSD doesn't have /bin/bash.
Mathieu Lirzin
2018-01-22 21:14:55 UTC
Permalink
* Makefile (SHELL): Search 'bash' in the PATH environment variable.
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index aa5bf01c1..6c3a22851 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@
# that you have tools like git, makeinfo and cppi installed.

# Required for the use of <(...) below.
-SHELL=/bin/bash
+SHELL=bash

# Produce some files that are not stored in the repository.
all:
--
2.16.0
Paul Eggert
2018-01-23 00:14:55 UTC
Permalink
Post by Mathieu Lirzin
-SHELL=/bin/bash
+SHELL=bash
Historically $(SHELL) needed to be absolute, so that it could be put
into the #! lines at the start of script. Does this ever happen with
Gnulib? If so, we need a better solution than that.
Mathieu Lirzin
2018-01-23 02:07:12 UTC
Permalink
Post by Paul Eggert
Post by Mathieu Lirzin
-SHELL=/bin/bash
+SHELL=bash
Historically $(SHELL) needed to be absolute, so that it could be put
into the #! lines at the start of script. Does this ever happen with
Gnulib?
I don't think, since ‘grep -r '^#! *\$'’ doesn't bring any results.
Post by Paul Eggert
If so, we need a better solution than that.
Considering the requirements of having an absolute filename and not
being able to reliably guess that filename, it seems that we should
either use ‘which’ or add a configure phase to generate the Makefile
with the correct SHELL variable.

Using ‘which’ would have the drawback of adding another dependency to
the build process. OTOH Having a configure script allows other
prerequisites such as GNU Make, ‘git’, ‘makeinfo’ and ‘cppi’ to be
checked explicitly which would be an improvement. Maybe there is a good
reason I am overlooking that explains why Gnulib doesn't already have a
configure script.
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Bruno Haible
2018-01-23 05:23:34 UTC
Permalink
Post by Mathieu Lirzin
OTOH Having a configure script allows other
prerequisites such as GNU Make, ‘git’, ‘makeinfo’ and ‘cppi’ to be
checked explicitly which would be an improvement. Maybe there is a good
reason I am overlooking that explains why Gnulib doesn't already have a
configure script.
We don't need another layer of 'configure' for gnulib's main Makefile
and gnulib-tool. Both are meant to be used by developers on their development
machines. It is *not* meant to be used in poor runtime environments.

I am in favour of applying your patch.

Bruno
Paul Eggert
2018-01-23 05:42:28 UTC
Permalink
Post by Mathieu Lirzin
I don't think, since ‘grep -r '^#! *\$'’ doesn't bring any results.
OK, thanks for checking. I installed it into gnulib master after creating a
ChangeLog entry for it and tweaking the punctuation in the commit message
Post by Mathieu Lirzin
Considering the requirements of having an absolute filename and not
being able to reliably guess that filename, it seems that we should
either use ‘which’ or add a configure phase to generate the Makefile
with the correct SHELL variable.
Probably overkill, as Bruno wrote. And 'which' has its own portability problems.
Mathieu Lirzin
2018-01-23 12:33:33 UTC
Permalink
Post by Paul Eggert
Post by Mathieu Lirzin
I don't think, since ‘grep -r '^#! *\$'’ doesn't bring any results.
OK, thanks for checking. I installed it into gnulib master after
creating a ChangeLog entry for it and tweaking the punctuation in the
commit message
Thanks for applying it. Sorry for the extra work.
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Loading...