From 2d5d63d7180137cc4bc9527a8fb472173629731c Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sun, 28 Sep 2014 01:48:58 -0400 Subject: gnu: bash: Update to 4.3.27 and fix out-of-bounds memory accesses. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on a patch by Ludovic Courtès . * gnu/packages/bash.scm (%patch-series-4.3): Add two patches. (bash)[source]: Add parser-oob patch. Add 'snippet'. [native-inputs]: New field. * gnu/packages/commencement.scm (bison-boot1): New variable. (static-bash-for-glibc): Add 'native-inputs'. Co-Authored-By: Ludovic Courtès --- gnu/packages/commencement.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 79c22a5974..92ac090722 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -27,8 +27,10 @@ #:use-module (gnu packages bash) #:use-module (gnu packages gcc) #:use-module (gnu packages ed) + #:use-module (gnu packages m4) #:use-module (gnu packages file) #:use-module (gnu packages gawk) + #:use-module (gnu packages bison) #:use-module (gnu packages guile) #:use-module (gnu packages multiprecision) #:use-module (gnu packages compression) @@ -396,6 +398,23 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ("bash" ,bash))) (inputs '()))) +(define bison-boot1 + ;; XXX: This Bison is needed to rebuild Bash's parser, which is modified by + ;; its CVE patches. Remove it when it's no longer needed. + (let* ((m4 (package-with-bootstrap-guile + (package-with-explicit-inputs m4 %boot0-inputs + (current-source-location) + #:guile %bootstrap-guile))) + (bison (package (inherit bison) + (native-inputs `(("perl" ,perl-boot0))) + (propagated-inputs `(("m4" ,m4))) + (inputs '()) ;remove Flex... + (arguments '(#:tests? #f))))) ;... and thus disable tests + (package-with-bootstrap-guile + (package-with-explicit-inputs bison %boot0-inputs + (current-source-location) + #:guile %bootstrap-guile)))) + (define static-bash-for-glibc ;; A statically-linked Bash to be embedded in GLIBC-FINAL, for use by ;; system(3) & co. @@ -403,6 +422,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" glibc-final-with-bootstrap-bash (car (assoc-ref %boot1-inputs "bash")))) (bash (package (inherit bash-light) + (native-inputs `(("bison" ,bison-boot1))) (arguments `(#:guile ,%bootstrap-guile ,@(package-arguments bash-light)))))) -- cgit v1.2.3