From 385ae063c9826baf00ae47d7689f23af52bce753 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 15 Jul 2015 22:55:26 -0400 Subject: gnu: unzip: Fix CVE-2014-9636 and some other bugs. * gnu/packages/patches/unzip-CVE-2014-9636.patch, gnu/packages/patches/unzip-allow-greater-hostver-values.patch, gnu/packages/patches/unzip-increase-size-of-cfactorstr.patch, gnu/packages/patches/unzip-initialize-symlink-flag.patch, gnu/packages/patches/unzip-remove-build-date.patch: New files. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/zip.scm (unzip)[source]: Add patches. [arguments]: Use 'modify-phases'. Remove custom 'configure' phase; pass additional make-flags instead. Add custom 'build' phase that builds "generic_gcc" target; remove "generic_gcc" from make-flags. --- gnu/packages/zip.scm | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'gnu/packages/zip.scm') diff --git a/gnu/packages/zip.scm b/gnu/packages/zip.scm index e6f5067295..f0f27ddfe2 100644 --- a/gnu/packages/zip.scm +++ b/gnu/packages/zip.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Andreas Enge -;;; Copyright © 2014 Mark H Weaver +;;; Copyright © 2014, 2015 Mark H Weaver ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,23 +81,29 @@ (define-public unzip (sha256 (base32 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83")) - (patches (list (search-patch "unzip-CVE-2014-8139.patch") - (search-patch "unzip-CVE-2014-8140.patch") - (search-patch "unzip-CVE-2014-8141.patch"))))) + (patches (map search-patch '("unzip-CVE-2014-8139.patch" + "unzip-CVE-2014-8140.patch" + "unzip-CVE-2014-8141.patch" + "unzip-CVE-2014-9636.patch" + "unzip-allow-greater-hostver-values.patch" + "unzip-increase-size-of-cfactorstr.patch" + "unzip-initialize-symlink-flag.patch" + "unzip-remove-build-date.patch"))))) (build-system gnu-build-system) ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO (arguments - `(#:make-flags '("generic_gcc") - #:phases - (alist-replace - 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out"))) - (copy-file "unix/Makefile" "Makefile") - (substitute* "Makefile" - (("/usr/local") out) - (("/man/") "/share/man/")))) - %standard-phases))) + `(#:phases (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (zero? (apply system* "make" + `("-j" ,(number->string + (parallel-job-count)) + ,@make-flags + "generic_gcc")))))) + #:make-flags (list "-f" "unix/Makefile" + (string-append "prefix=" %output) + (string-append "MANDIR=" %output "/share/man/man1")))) (home-page "http://www.info-zip.org/UnZip.html") (synopsis "Decompression and file extraction utility") (description -- cgit v1.2.3