[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: bootstrap: Build bootstrap bash deterministically.
From: |
guix-commits |
Subject: |
01/01: bootstrap: Build bootstrap bash deterministically. |
Date: |
Mon, 12 Aug 2019 00:02:49 -0400 (EDT) |
mhw pushed a commit to branch wip-cu-binaries
in repository guix.
commit eefabc1db04c91d6954306e319820cd95190c25d
Author: Mark H Weaver <address@hidden>
Date: Sun Aug 11 22:39:00 2019 -0400
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'.
---
gnu/local.mk | 1 +
gnu/packages/make-bootstrap.scm | 15 ++++++++---
.../patches/bash-4.4-linux-pgrp-pipe.patch | 30 ++++++++++++++++++++++
3 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 0c324cd..f31917f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -598,6 +598,7 @@ dist_patch_DATA =
\
%D%/packages/patches/avidemux-install-to-lib.patch \
%D%/packages/patches/awesome-reproducible-png.patch \
%D%/packages/patches/azr3.patch \
+ %D%/packages/patches/bash-4.4-linux-pgrp-pipe.patch \
%D%/packages/patches/bash-completion-directories.patch \
%D%/packages/patches/bastet-change-source-of-unordered_set.patch \
%D%/packages/patches/bazaar-CVE-2017-14176.patch \
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 4e2f050..4d021e7 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès
<address@hidden>
;;; Copyright © 2017 Efraim Flashner <address@hidden>
;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
-;;; Copyright © 2018 Mark H Weaver <address@hidden>
+;;; Copyright © 2018, 2019 Mark H Weaver <address@hidden>
;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <address@hidden>
;;;
;;; This file is part of GNU Guix.
@@ -125,6 +125,15 @@ for `sh' in $PATH, and without nscd, and with static NSS
modules."
(current-source-location)
#:native-inputs native-inputs))
+(define static-bash-for-bootstrap
+ (package
+ (inherit static-bash)
+ (source (origin
+ (inherit (package-source static-bash))
+ (patches
+ (cons (search-patch "bash-4.4-linux-pgrp-pipe.patch")
+ (origin-patches (package-source static-bash))))))))
+
(define %static-inputs
;; Packages that are to be used as %BOOTSTRAP-INPUTS.
(let ((coreutils (package (inherit coreutils)
@@ -193,7 +202,7 @@ for `sh' in $PATH, and without nscd, and with static NSS
modules."
(("-Wl,-export-dynamic") ""))
#t)))))))
(inputs (if (%current-target-system)
- `(("bash" ,static-bash))
+ `(("bash" ,static-bash-for-bootstrap))
'()))))
(tar (package (inherit tar)
(arguments
@@ -234,7 +243,7 @@ for `sh' in $PATH, and without nscd, and with static NSS
modules."
("sed" ,sed)
("grep" ,grep)
("gawk" ,gawk)))
- ("bash" ,static-bash))))
+ ("bash" ,static-bash-for-bootstrap))))
(define %static-binaries
(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 0000000..0d03d7c
--- /dev/null
+++ b/gnu/packages/patches/bash-4.4-linux-pgrp-pipe.patch
@@ -0,0 +1,30 @@
+Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of
+the kernel version in use on the build machine.
+
+--- configure.ac.orig 1969-12-31 19:00:00.000000000 -0500
++++ configure.ac 2019-08-11 22:28:26.038841961 -0400
+@@ -1092,9 +1092,7 @@
+ solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
+ lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+ linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
+- case "`uname -r`" in
+- 2.[[456789]]*|[[34]]*) AC_DEFINE(PGRP_PIPE) ;;
+- esac ;;
++ AC_DEFINE(PGRP_PIPE) ;;
+ *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
+ *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s"
LOCAL_LIBS="-lunix -lncurses" ;;
+ powerux*) LOCAL_LIBS="-lgen" ;;
+--- configure.orig 1969-12-31 19:00:00.000000000 -0500
++++ configure 2019-08-11 22:28:10.166763255 -0400
+@@ -16064,10 +16064,7 @@
+ solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
+ lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+ linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
+- case "`uname -r`" in
+- 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1"
>>confdefs.h
+- ;;
+- esac ;;
++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;;
+ *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
+ *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s"
LOCAL_LIBS="-lunix -lncurses" ;;
+ powerux*) LOCAL_LIBS="-lgen" ;;