]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove all usage of @BASH@ or ${BASH} in installed files, and hardcode /bin/bash...
authorRomain GEISSLER <romain.geissler@amadeus.com>
Wed, 12 May 2021 02:15:33 +0000 (07:45 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 12 May 2021 02:17:11 +0000 (07:47 +0530)
(FYI, this is a repost of
https://sourceware.org/pipermail/libc-alpha/2019-July/105035.html now
that FSF papers have been signed and confirmed on FSF side).

This trivial patch attemps to fix BZ 24106. Basically the bash locally
used when building glibc on the host shall not leak on the installed
glibc, as the system where it is installed might be different and use
another bash location.

So I have looked for all occurences of @BASH@ or $(BASH) in installed
files, and replaced it by /bin/bash. This was suggested by Florian
Weimer in the bug report.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
debug/Makefile
debug/xtrace.sh
elf/Makefile
elf/ldd.bash.in
elf/sotruss.sh
malloc/Makefile
malloc/memusage.sh
timezone/Makefile

index 3f66666c6c103f689a4507ce99565b87a4d083d6..6893111cbfaa090027bbbe4f9815b4a8603210ef 100644 (file)
@@ -216,8 +216,7 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
 
 $(objpfx)xtrace: xtrace.sh
        rm -f $@.new
-       sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
-           -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \
-           -e 's|@PKGVERSION@|$(PKGVERSION)|' \
+       sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \
+           -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \
            -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
        && rm -f $@ && mv $@.new $@ && chmod +x $@
index 279fe59ac61a2cf8cf13ec883858b3de90e06afc..9697fbe0b411d389ca314ad74ce96054d821501d 100755 (executable)
@@ -1,4 +1,4 @@
-#! @BASH@
+#!/bin/bash
 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 # Contributed by Ulrich Drepper <drepper@gnu.org>, 1999.
index 3241cb60460d37e11a0f306589039c90374ebdc8..4e148e532a9cc29f04568e5ff70ca77172fa37a8 100644 (file)
@@ -144,8 +144,7 @@ $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
        $(common-objpfx)libc_nonshared.a
 
 $(objpfx)sotruss: sotruss.sh $(common-objpfx)config.make
-       sed -e 's%@BASH@%$(BASH)%g' \
-           -e 's%@VERSION@%$(version)%g' \
+       sed -e 's%@VERSION@%$(version)%g' \
            -e 's%@TEXTDOMAINDIR@%$(localedir)%g' \
            -e 's%@PREFIX@%$(prefix)%g' \
            -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
@@ -654,7 +653,6 @@ ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
              -e 's%@VERSION@%$(version)%g' \
              -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
              -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
-             -e 's%@BASH@%$(BASH)%g' \
              -e 's%@TEXTDOMAINDIR@%$(localedir)%g'
 
 ifeq ($(ldd-rewrite-script),no)
index 57442bc3f235b7f7ea8ec8e446d407e47c255820..ba736464ac5e4a9390b1b6a39595035238250232 100644 (file)
@@ -1,4 +1,4 @@
-#! @BASH@
+#!/bin/bash
 # Copyright (C) 1996-2021 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
index fd4da80244014142f123c5728d1633dad7d3918a..003cf4d825392f7dab4f8506ddee1e219e08af10 100755 (executable)
@@ -1,4 +1,4 @@
-#! @BASH@
+#!/bin/bash
 # Copyright (C) 2011-2021 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
index 641967c5127af58ddef343ef2e0e0443e61e9c92..afcd296ef6bcb85cb994db14b254587fbeff055c 100644 (file)
@@ -238,9 +238,8 @@ $(objpfx)mtrace: mtrace.pl
 
 $(objpfx)memusage: memusage.sh
        rm -f $@.new
-       sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
-           -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \
-           -e 's|@PKGVERSION@|$(PKGVERSION)|' \
+       sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \
+           -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \
            -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
        && rm -f $@ && mv $@.new $@ && chmod +x $@
 
index c1cd4e23b7348d6bcfdaf07cf8558235064594a0..0645f09911d0b642e23aebbfb2e9a010e098be01 100755 (executable)
@@ -1,4 +1,4 @@
-#! @BASH@
+#!/bin/bash
 # Copyright (C) 1999-2021 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 # Contributed by Ulrich Drepper <drepper@gnu.org>, 1999.
index 395abfeebde05bc880fa5f30b7b3edbae4532e13..c624a189b322cb5ffd10a4a3f9c1ca64c5cbc0ec 100644 (file)
@@ -123,8 +123,7 @@ $(testdata)/XT%: testdata/XT%
        cp $< $@
 
 $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
-       sed -e 's|/bin/bash|$(BASH)|' \
-           -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
+       sed -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
            -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
            -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
            -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \