gnu: binutils: Fix security issues.

* gnu/packages/base.scm (binutils)[replacement]: New field.
(binutils/fixed): New variable.
* gnu/packages/commencement.scm (binutils-boot0, binutils-final): Use
'package/inherit' to correctly use replacement binutils.
This commit is contained in:
Efraim Flashner 2017-09-17 21:13:22 +03:00
parent 881006b65c
commit ce27857f71
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351
2 changed files with 17 additions and 2 deletions

View file

@ -394,6 +394,7 @@ (define-public gnu-make
(define-public binutils (define-public binutils
(package (package
(replacement binutils/fixed)
(name "binutils") (name "binutils")
(version "2.28") (version "2.28")
(source (origin (source (origin
@ -435,6 +436,19 @@ (define-public binutils
(license gpl3+) (license gpl3+)
(home-page "https://www.gnu.org/software/binutils/"))) (home-page "https://www.gnu.org/software/binutils/")))
(define binutils/fixed
(package
(inherit binutils)
;; 2.28.1 is two characters longer than 2.28, so grafting fails due to
;; mismatched lengths of filenames, so we have to force it to the same length.
(version "2281")
(source
(origin (inherit (package-source binutils))
(uri "mirror://gnu/binutils/binutils-2.28.1.tar.bz2")
(sha256
(base32
"1sj234nd05cdgga1r36zalvvdkvpfbr12g5mir2n8i1dwsdrj939"))))))
(define* (make-ld-wrapper name #:key (define* (make-ld-wrapper name #:key
(target (const #f)) (target (const #f))
binutils binutils

View file

@ -3,6 +3,7 @@
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -139,7 +140,7 @@ (define* (boot-triplet #:optional (system (%current-system)))
(define binutils-boot0 (define binutils-boot0
(package-with-bootstrap-guile (package-with-bootstrap-guile
(package (inherit binutils) (package/inherit binutils
(name "binutils-cross-boot0") (name "binutils-cross-boot0")
(arguments (arguments
`(#:guile ,%bootstrap-guile `(#:guile ,%bootstrap-guile
@ -667,7 +668,7 @@ (define %boot2-inputs
(define binutils-final (define binutils-final
(package-with-bootstrap-guile (package-with-bootstrap-guile
(package (inherit binutils) (package/inherit binutils
(arguments (arguments
`(#:guile ,%bootstrap-guile `(#:guile ,%bootstrap-guile
#:implicit-inputs? #f #:implicit-inputs? #f