summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2019-08-11 22:37:12 -0400
committerMark H Weaver <mhw@netris.org>2019-08-15 14:46:20 -0400
commitfe507d7a3d83169c77b6f73a66ffa0ce59f1119d (patch)
tree595d722cdcfa8db89e0317f7b1e04619e4a0e9a8 /gnu/packages
parent6744cef5b033c60a388d1de9a6b08c917cc51a4c (diff)
bootstrap: Build bootstrap bash deterministically.
* gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/make-bootstrap.scm (static-bash-for-bootstrap): New variable. (%static-inputs): Use 'static-bash-for-bootstrap' instead of 'static-bash'.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/make-bootstrap.scm15
-rw-r--r--gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch30
2 files changed, 42 insertions, 3 deletions
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index d3b13d9d5f6..2f0bb30b91b 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -2,7 +2,7 @@
2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> 3;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
4;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> 4;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> 5;;; Copyright © 2018, 2019 Mark H Weaver <mhw@netris.org>
6;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> 6;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
7;;; 7;;;
8;;; This file is part of GNU Guix. 8;;; This file is part of GNU Guix.
@@ -125,6 +125,15 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
125 (current-source-location) 125 (current-source-location)
126 #:native-inputs native-inputs)) 126 #:native-inputs native-inputs))
127 127
128(define static-bash-for-bootstrap
129 (package
130 (inherit static-bash)
131 (source (origin
132 (inherit (package-source static-bash))
133 (patches
134 (cons (search-patch "bash-4.4-linux-pgrp-pipe.patch")
135 (origin-patches (package-source static-bash))))))))
136
128(define %static-inputs 137(define %static-inputs
129 ;; Packages that are to be used as %BOOTSTRAP-INPUTS. 138 ;; Packages that are to be used as %BOOTSTRAP-INPUTS.
130 (let ((coreutils (package (inherit coreutils) 139 (let ((coreutils (package (inherit coreutils)
@@ -192,7 +201,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
192 (("-Wl,-export-dynamic") "")) 201 (("-Wl,-export-dynamic") ""))
193 #t))))))) 202 #t)))))))
194 (inputs (if (%current-target-system) 203 (inputs (if (%current-target-system)
195 `(("bash" ,static-bash)) 204 `(("bash" ,static-bash-for-bootstrap))
196 '())))) 205 '()))))
197 (tar (package (inherit tar) 206 (tar (package (inherit tar)
198 (arguments 207 (arguments
@@ -233,7 +242,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
233 ("sed" ,sed) 242 ("sed" ,sed)
234 ("grep" ,grep) 243 ("grep" ,grep)
235 ("gawk" ,gawk))) 244 ("gawk" ,gawk)))
236 ("bash" ,static-bash)))) 245 ("bash" ,static-bash-for-bootstrap))))
237 246
238(define %static-binaries 247(define %static-binaries
239 (package 248 (package
diff --git a/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch
new file mode 100644
index 00000000000..0d03d7ce37a
--- /dev/null
+++ b/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch
@@ -0,0 +1,30 @@
1Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of
2the kernel version in use on the build machine.
3
4--- configure.ac.orig 1969-12-31 19:00:00.000000000 -0500
5+++ configure.ac 2019-08-11 22:28:26.038841961 -0400
6@@ -1092,9 +1092,7 @@
7 solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
8 lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
9 linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
10- case "`uname -r`" in
11- 2.[[456789]]*|[[34]]*) AC_DEFINE(PGRP_PIPE) ;;
12- esac ;;
13+ AC_DEFINE(PGRP_PIPE) ;;
14 *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
15 *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
16 powerux*) LOCAL_LIBS="-lgen" ;;
17--- configure.orig 1969-12-31 19:00:00.000000000 -0500
18+++ configure 2019-08-11 22:28:10.166763255 -0400
19@@ -16064,10 +16064,7 @@
20 solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
21 lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
22 linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
23- case "`uname -r`" in
24- 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h
25- ;;
26- esac ;;
27+ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;;
28 *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
29 *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
30 powerux*) LOCAL_LIBS="-lgen" ;;