aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-09-28 01:48:58 -0400
committerMark H Weaver <mhw@netris.org>2014-09-29 14:14:54 -0400
commit2d5d63d7180137cc4bc9527a8fb472173629731c (patch)
tree985291e91e2be204e283d6d7f1ceacd820f50ce9 /gnu/packages/commencement.scm
parentb5f4bb855d97708f12b29bdce4d81ae68ee960ff (diff)
downloadguix-2d5d63d7180137cc4bc9527a8fb472173629731c.tar.gz
guix-2d5d63d7180137cc4bc9527a8fb472173629731c.zip
gnu: bash: Update to 4.3.27 and fix out-of-bounds memory accesses.
Based on a patch by Ludovic Courtès <ludo@gnu.org>. * 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 <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm20
1 files changed, 20 insertions, 0 deletions
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))))))