Re: Alpine: useless-if-before-free: Exec format error

2019-06-14 Thread Bruno Haible
Paul Eggert wrote: > Perhaps we > should just prepend "#!/bin/sh" or "#!/usr/bin/env perl" (not sure > which) and let people on weird systems fix things by hand. "#!/usr/bin/env perl" does not work on GuixSD (where the only program that has a hardcoded file name is /bin/sh; there is no /usr and

Re: Alpine: useless-if-before-free: Exec format error

2019-06-14 Thread Paul Eggert
On 6/14/19 4:51 PM, Bruno Haible wrote: But POSIX does not specify that the command interpreter for scripts without shebang is /bin/sh; therefore IMHO it would be good not to make this assumption. Perhaps the code in those scripts was taken from an earlier version of the output of "perldoc per

Re: Alpine: useless-if-before-free: Exec format error

2019-06-14 Thread Bruno Haible
>Since xargs happens to use execvp(), the executable gets executed by "a >known command interpreter". This command interpreter might be sh, python, >emacs, or whatever. > > So, the *omission* of #! renders a script non-portable, when that script is > invoked like an executable. Anyway

Re: Alpine: useless-if-before-free: Exec format error

2019-06-14 Thread Bruno Haible
Eric Blake wrote: > Conversely, POSIX requires that execution by 'sh' is the expected > behavior when #! is missing, and that use of #! renders a script > non-portable: > > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_01 This paragraph specifies what happens wh

Re: Alpine: useless-if-before-free: Exec format error

2019-06-14 Thread Eric Blake
On 6/14/19 4:28 PM, Bruno Haible wrote: > Tim Rühsen wrote: >> Do you think it makes more sense to open a bug at busybox then ? > > I don't think so. Execution of scripts without shebang is considered > legacy. Quoting : > > "Note that, even in sys

Re: Alpine: useless-if-before-free: Exec format error

2019-06-14 Thread Bruno Haible
Tim Rühsen wrote: > Do you think it makes more sense to open a bug at busybox then ? I don't think so. Execution of scripts without shebang is considered legacy. Quoting : "Note that, even in systems with full kernel support for the #! magic number

Re: Alpine: useless-if-before-free: Exec format error

2019-06-14 Thread Tim Rühsen
On 14.06.19 19:50, Paul Eggert wrote: > On 6/14/19 10:04 AM, Tim Rühsen wrote: >> Adding a shebang to build-aux/useless-if-before-free fixes the issue. > > What shebang should that be, exactly? The current style is used in > several scripts (build-aux/announce-gen, build-aux/gitlog-to-changelog, >

Re: Alpine: useless-if-before-free: Exec format error

2019-06-14 Thread Paul Eggert
On 6/14/19 10:04 AM, Tim Rühsen wrote: Adding a shebang to build-aux/useless-if-before-free fixes the issue. What shebang should that be, exactly? The current style is used in several scripts (build-aux/announce-gen, build-aux/gitlog-to-changelog, build-aux/prefix-gnulib-mk, build-aux/update-

Alpine: useless-if-before-free: Exec format error

2019-06-14 Thread Tim Rühsen
Hi, on Alpine, with pretty much latest gnulib commit 5905d8ca9945f0d60ff40eb6cfa42afc0199ab8f, 'make syntax-check' throws out xargs: ./build-aux/useless-if-before-free: Exec format error Adding a shebang to build-aux/useless-if-before-free fixes the issue. Regards, Tim signature.asc Descript