python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / glibc / 0001-Revert-Remove-all-usage-of-BASH-or-BASH-in-installed.patch
blobb2c998aabbef5e010a6f58e019b9fb68f6c1143c
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>
13 ---
14 debug/Makefile | 5 +++--
15 debug/xtrace.sh | 2 +-
16 elf/Makefile | 4 +++-
17 elf/ldd.bash.in | 2 +-
18 elf/sotruss.sh | 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
26 --- a/debug/Makefile
27 +++ b/debug/Makefile
28 @@ -238,7 +238,8 @@ $(objpfx)pcprofiledump: $(objpfx)pcprofiledump.o
30 $(objpfx)xtrace: xtrace.sh
31 rm -f $@.new
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
41 --- a/debug/xtrace.sh
42 +++ b/debug/xtrace.sh
43 @@ -1,4 +1,4 @@
44 -#!/bin/bash
45 +#! @BASH@
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
51 --- a/elf/Makefile
52 +++ b/elf/Makefile
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
73 --- a/elf/ldd.bash.in
74 +++ b/elf/ldd.bash.in
75 @@ -1,4 +1,4 @@
76 -#!/bin/bash
77 +#! @BASH@
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
83 --- a/elf/sotruss.sh
84 +++ b/elf/sotruss.sh
85 @@ -1,4 +1,4 @@
86 -#!/bin/bash
87 +#! @BASH@
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
93 --- a/malloc/Makefile
94 +++ b/malloc/Makefile
95 @@ -307,8 +307,9 @@ $(objpfx)mtrace: mtrace.pl
97 $(objpfx)memusage: memusage.sh
98 rm -f $@.new
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
111 @@ -1,4 +1,4 @@
112 -#!/bin/bash
113 +#! @BASH@
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
122 mv $@.tmp $@
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)"|' \
132 2.37.0