* [PATCH libmnl] build: doc: refer to bash as bash, not /bin/bash
@ 2022-08-01 17:26 Mark Mentovai
2022-08-02 0:39 ` Duncan Roe
2022-08-04 3:26 ` Duncan Roe
0 siblings, 2 replies; 5+ messages in thread
From: Mark Mentovai @ 2022-08-01 17:26 UTC (permalink / raw)
To: netfilter-devel; +Cc: Duncan Roe
This locates bash according to its presence in the PATH, not at a
hard-coded path which may not exist or may not be the most suitable bash
to use.
Signed-off-by: Mark Mentovai <mark@mentovai.com>
---
doxygen/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doxygen/Makefile.am b/doxygen/Makefile.am
index 29078dee122a..189a233f3760 100644
--- a/doxygen/Makefile.am
+++ b/doxygen/Makefile.am
@@ -21,7 +21,7 @@ doxyfile.stamp: $(doc_srcs) Makefile.am
# The command has to be a single line so the functions work
# and so `make` gives all lines to `bash -c`
# (hence ";\" at the end of every line but the last).
- /bin/bash -p -c 'declare -A renamed_page;\
+ bash -p -c 'declare -A renamed_page;\
main(){ set -e; cd man/man3; rm -f _*;\
count_real_pages;\
rename_real_pages;\
--
2.37.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH libmnl] build: doc: refer to bash as bash, not /bin/bash
2022-08-01 17:26 [PATCH libmnl] build: doc: refer to bash as bash, not /bin/bash Mark Mentovai
@ 2022-08-02 0:39 ` Duncan Roe
2022-08-02 18:14 ` Mark Mentovai
2022-08-04 3:26 ` Duncan Roe
1 sibling, 1 reply; 5+ messages in thread
From: Duncan Roe @ 2022-08-02 0:39 UTC (permalink / raw)
To: Mark Mentovai; +Cc: Netfilter Development
Hi Mark,
On Mon, Aug 01, 2022 at 01:26:20PM -0400, Mark Mentovai wrote:
> This locates bash according to its presence in the PATH, not at a
> hard-coded path which may not exist or may not be the most suitable bash
> to use.
>
> Signed-off-by: Mark Mentovai <mark@mentovai.com>
> ---
> doxygen/Makefile.am | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/doxygen/Makefile.am b/doxygen/Makefile.am
> index 29078dee122a..189a233f3760 100644
> --- a/doxygen/Makefile.am
> +++ b/doxygen/Makefile.am
> @@ -21,7 +21,7 @@ doxyfile.stamp: $(doc_srcs) Makefile.am
> # The command has to be a single line so the functions work
> # and so `make` gives all lines to `bash -c`
> # (hence ";\" at the end of every line but the last).
> - /bin/bash -p -c 'declare -A renamed_page;\
> + bash -p -c 'declare -A renamed_page;\
> main(){ set -e; cd man/man3; rm -f _*;\
> count_real_pages;\
> rename_real_pages;\
> --
> 2.37.1
>
I would not apply this patch unless it's actually necessary for some
distribution.
If you have discovered a distribution where /bin/bash doesn't work, please let
us know.
Scripts that start "#!/bin/bash" are not uncommon, and Netfilter already has a
couple of these, in libnetfilter_queue and libnetfilter_log.
I somehow omitted to update libmnl to replace the cumbersome embedded script in
Makefile.am with a stand-alone script, but you've reminded me.
Cheers ... Duncan.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH libmnl] build: doc: refer to bash as bash, not /bin/bash
2022-08-02 0:39 ` Duncan Roe
@ 2022-08-02 18:14 ` Mark Mentovai
2022-08-04 3:30 ` Duncan Roe
0 siblings, 1 reply; 5+ messages in thread
From: Mark Mentovai @ 2022-08-02 18:14 UTC (permalink / raw)
To: Duncan Roe, Netfilter Development
Duncan Roe wrote:
> On Mon, Aug 01, 2022 at 01:26:20PM -0400, Mark Mentovai wrote:
>> This locates bash according to its presence in the PATH, not at a
>> hard-coded path which may not exist or may not be the most suitable bash
>> to use.
>>
>> Signed-off-by: Mark Mentovai <mark@mentovai.com>
>> ---
>> doxygen/Makefile.am | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/doxygen/Makefile.am b/doxygen/Makefile.am
>> index 29078dee122a..189a233f3760 100644
>> --- a/doxygen/Makefile.am
>> +++ b/doxygen/Makefile.am
>> @@ -21,7 +21,7 @@ doxyfile.stamp: $(doc_srcs) Makefile.am
>> # The command has to be a single line so the functions work
>> # and so `make` gives all lines to `bash -c`
>> # (hence ";\" at the end of every line but the last).
>> - /bin/bash -p -c 'declare -A renamed_page;\
>> + bash -p -c 'declare -A renamed_page;\
>> main(){ set -e; cd man/man3; rm -f _*;\
>> count_real_pages;\
>> rename_real_pages;\
>> --
>> 2.37.1
>>
> I would not apply this patch unless it's actually necessary for some
> distribution.
>
> If you have discovered a distribution where /bin/bash doesn't work, please let
> us know.
>
> Scripts that start "#!/bin/bash" are not uncommon, and Netfilter already has a
> couple of these, in libnetfilter_queue and libnetfilter_log.
>
> I somehow omitted to update libmnl to replace the cumbersome embedded script in
> Makefile.am with a stand-alone script, but you've reminded me.
>
> Cheers ... Duncan.
The context here is in OpenWrt,
https://github.com/openwrt/openwrt/commit/beeb49740bb4. The use of
/bin/bash is a problem during a cross build of libmnl, with a build system
running macOS or BSD. /bin/bash on macOS is an unsuitably old version, and
the OpenWrt build ensures that a recent bash is available in PATH. BSD
derivatives tend not to have /bin/bash at all, although bash may be
present elsewhere in PATH. Again, the OpenWrt build ensures this.
I would not expect the same treatment to be strictly necessary for scripts
like libnetfilter_queue or libnetfilter_log, which run on the target
system, but the reliance on /bin/bash is a problem for cross builds and in
particular non-Linux build systems. Considering that these cross builds
are otherwise perfectly clean given an appropriate toolchain, it seems
unnecessary to leave them broken for something like this, when a simple
reliance on locating bash via PATH ought to suffice for everyone.
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH libmnl] build: doc: refer to bash as bash, not /bin/bash
2022-08-01 17:26 [PATCH libmnl] build: doc: refer to bash as bash, not /bin/bash Mark Mentovai
2022-08-02 0:39 ` Duncan Roe
@ 2022-08-04 3:26 ` Duncan Roe
1 sibling, 0 replies; 5+ messages in thread
From: Duncan Roe @ 2022-08-04 3:26 UTC (permalink / raw)
To: Netfilter Development; +Cc: Mark Mentovai
On Mon, Aug 01, 2022 at 01:26:20PM -0400, Mark Mentovai wrote:
> This locates bash according to its presence in the PATH, not at a
> hard-coded path which may not exist or may not be the most suitable bash
> to use.
>
> Signed-off-by: Mark Mentovai <mark@mentovai.com>
> ---
> doxygen/Makefile.am | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/doxygen/Makefile.am b/doxygen/Makefile.am
> index 29078dee122a..189a233f3760 100644
> --- a/doxygen/Makefile.am
> +++ b/doxygen/Makefile.am
> @@ -21,7 +21,7 @@ doxyfile.stamp: $(doc_srcs) Makefile.am
> # The command has to be a single line so the functions work
> # and so `make` gives all lines to `bash -c`
> # (hence ";\" at the end of every line but the last).
> - /bin/bash -p -c 'declare -A renamed_page;\
> + bash -p -c 'declare -A renamed_page;\
> main(){ set -e; cd man/man3; rm -f _*;\
> count_real_pages;\
> rename_real_pages;\
> --
> 2.37.1
>
Acked-by: Duncan Roe <duncan_roe@optusnet.com.au>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH libmnl] build: doc: refer to bash as bash, not /bin/bash
2022-08-02 18:14 ` Mark Mentovai
@ 2022-08-04 3:30 ` Duncan Roe
0 siblings, 0 replies; 5+ messages in thread
From: Duncan Roe @ 2022-08-04 3:30 UTC (permalink / raw)
To: Mark Mentovai; +Cc: Netfilter Development
On Tue, Aug 02, 2022 at 02:14:29PM -0400, Mark Mentovai wrote:
[...]
>
> The context here is in OpenWrt,
> https://github.com/openwrt/openwrt/commit/beeb49740bb4. The use of /bin/bash
> is a problem during a cross build of libmnl, with a build system running
> macOS or BSD. /bin/bash on macOS is an unsuitably old version, and the
> OpenWrt build ensures that a recent bash is available in PATH. BSD
> derivatives tend not to have /bin/bash at all, although bash may be present
> elsewhere in PATH. Again, the OpenWrt build ensures this.
>
> I would not expect the same treatment to be strictly necessary for scripts
> like libnetfilter_queue or libnetfilter_log, which run on the target system,
> but the reliance on /bin/bash is a problem for cross builds and in
> particular non-Linux build systems. Considering that these cross builds are
> otherwise perfectly clean given an appropriate toolchain, it seems
> unnecessary to leave them broken for something like this, when a simple
> reliance on locating bash via PATH ought to suffice for everyone.
>
> Mark
Good enough for me - I acked the original patch.
Cheers ... Duncan.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-08-04 3:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01 17:26 [PATCH libmnl] build: doc: refer to bash as bash, not /bin/bash Mark Mentovai
2022-08-02 0:39 ` Duncan Roe
2022-08-02 18:14 ` Mark Mentovai
2022-08-04 3:30 ` Duncan Roe
2022-08-04 3:26 ` Duncan Roe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.