1 From faeeb0f353f5540da2015a41cb60fe43d199a1ac Mon Sep 17 00:00:00 2001
2 From: Bernardo Meurer <bernardo@meurer.org>
3 Date: Fri, 22 Jul 2022 22:11:07 -0700
4 Subject: [PATCH] Revert "Remove all usage of @BASH@ or ${BASH} in installed
5 files, and hardcode /bin/bash instead"
7 We need the ability to override to use `/bin/sh` here to avoid having
8 some bootstrap tools in a final build product.
10 This reverts commit 5188a9d0265cc6f7235a8af1d31ab02e4a24853d.
12 Co-authored-by: Maximilian Bosch <maximilian@mbosch.me>
14 debug/Makefile | 5 +++--
15 debug/xtrace.sh | 2 +-
17 elf/ldd.bash.in | 2 +-
19 malloc/Makefile | 5 +++--
20 malloc/memusage.sh | 2 +-
21 timezone/Makefile | 3 ++-
22 8 files changed, 15 insertions(+), 10 deletions(-)
24 diff --git a/debug/Makefile b/debug/Makefile
25 index 96029f32ee..cbbdeda277 100644
28 @@ -238,7 +238,8 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
30 $(objpfx)xtrace: xtrace.sh
32 - sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \
33 - -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \
34 + sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
35 + -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \
36 + -e 's|@PKGVERSION@|$(PKGVERSION)|' \
37 -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
38 && rm -f $@ && mv $@.new $@ && chmod +x $@
39 diff --git a/debug/xtrace.sh b/debug/xtrace.sh
40 index 8c56e01449..c760391a33 100755
46 # Copyright (C) 1999-2022 Free Software Foundation, Inc.
47 # This file is part of the GNU C Library.
49 diff --git a/elf/Makefile b/elf/Makefile
50 index 3536b6af5e..83521d9dbc 100644
53 @@ -256,7 +256,8 @@ $(objpfx)sotruss-lib.so: $(common-objpfx)libc.so $(objpfx)ld.so \
54 $(common-objpfx)libc_nonshared.a
56 $(objpfx)sotruss: sotruss.sh $(common-objpfx)config.make
57 - sed -e 's%@VERSION@%$(version)%g' \
58 + sed -e 's%@BASH@%$(BASH)%g' \
59 + -e 's%@VERSION@%$(version)%g' \
60 -e 's%@TEXTDOMAINDIR@%$(localedir)%g' \
61 -e 's%@PREFIX@%$(prefix)%g' \
62 -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
63 @@ -1363,6 +1364,7 @@ ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
64 -e 's%@VERSION@%$(version)%g' \
65 -e 's|@PKGVERSION@|$(PKGVERSION)|g' \
66 -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g' \
67 + -e 's%@BASH@%$(BASH)%g' \
68 -e 's%@TEXTDOMAINDIR@%$(localedir)%g'
70 ifeq ($(ldd-rewrite-script),no)
71 diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
72 index 3253b32ef8..127eb59206 100644
78 # Copyright (C) 1996-2022 Free Software Foundation, Inc.
79 # This file is part of the GNU C Library.
81 diff --git a/elf/sotruss.sh b/elf/sotruss.sh
82 index 22327eac5c..7d15bf4fc8 100755
88 # Copyright (C) 2011-2022 Free Software Foundation, Inc.
89 # This file is part of the GNU C Library.
91 diff --git a/malloc/Makefile b/malloc/Makefile
92 index 2329cf718a..5d7de4bee7 100644
95 @@ -307,8 +307,9 @@ $(objpfx)mtrace: mtrace.pl
97 $(objpfx)memusage: memusage.sh
99 - sed -e 's|@VERSION@|$(version)|' -e 's|@SLIBDIR@|$(sLIBdir)|' \
100 - -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \
101 + sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
102 + -e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \
103 + -e 's|@PKGVERSION@|$(PKGVERSION)|' \
104 -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
105 && rm -f $@ && mv $@.new $@ && chmod +x $@
107 diff --git a/malloc/memusage.sh b/malloc/memusage.sh
108 index f447160b7d..faa4936639 100755
109 --- a/malloc/memusage.sh
110 +++ b/malloc/memusage.sh
114 # Copyright (C) 1999-2022 Free Software Foundation, Inc.
115 # This file is part of the GNU C Library.
117 diff --git a/timezone/Makefile b/timezone/Makefile
118 index a789c22d26..d65bdf2391 100644
119 --- a/timezone/Makefile
120 +++ b/timezone/Makefile
121 @@ -130,7 +130,8 @@ $(testdata)/XT5: testdata/gen-XT5.sh
124 $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
125 - sed -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
126 + sed -e 's|/bin/bash|$(BASH)|' \
127 + -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
128 -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
129 -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
130 -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \