[Bug build/24106] New: Bash interpreter in ldd script is taken from host

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug build/24106] New: Bash interpreter in ldd script is taken from host

fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24106

            Bug ID: 24106
           Summary: Bash interpreter in ldd script is taken from host
           Product: glibc
           Version: 2.23
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: romain.geissler at amadeus dot com
                CC: carlos at redhat dot com
  Target Milestone: ---

Hi,

We have just hit a small problem. We do build our dedicated toolchains and
glibc is part of it. This toolchain is installed in non-standard folder (ie it
can live side to side a OS-native toolchain). We do build our toolchain (glibc)
using a Debian Buster host, which has no /bin/bash, but instead /usr/bin/bash.
The resulting installed ldd script thus has this shebang:

#! /usr/bin/bash

However we do run this toolchain on machines using different OSs, in particular
SLES based machines, where apparently bash is found in /bin/bash rather than
/usr/bin/bash

Would it make sense to replace in elf/ldd.bash.in the shebang to:

!/usr/bin/env bash

to try to make it more portable ?

Cheers,
Romain

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug build/24106] Bash interpreter in ldd script is taken from host

fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24106

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
I think we should just remove the substitution for @BASH@ and hard-code
/bin/bash.  That's not going to go away even with UsrMove.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24106] Bash interpreter in ldd script is taken from host

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24106

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |drepper.fsp at gmail dot com
          Component|build                       |libc
              Flags|                            |security-

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24106] Bash interpreter in ldd script is taken from host

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24106

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Note this is not the only script using @BASH@.  @PERL@ is also a similar
issue if you're building with a nonstandard path to perl.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/24106] Bash interpreter in ldd script is taken from host

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24106

--- Comment #3 from Romain Geissler <romain.geissler at amadeus dot com> ---
Hi,

I have posted a patch here, based on what Florian suggested (it fixes only
BASH, not PERL): https://sourceware.org/ml/libc-alpha/2019-07/msg00308.html

Cheers,
Romain

--
You are receiving this mail because:
You are on the CC list for the bug.