diff options
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r-- | gnu/packages/compression.scm | 209 |
1 files changed, 73 insertions, 136 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 3dbe517f93..11fc339ee5 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> @@ -32,6 +32,7 @@ ;;; Copyright © 2020 Léo Le Bouter <lle-bout@zaclys.net> ;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net> ;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com> +;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -481,7 +482,7 @@ compressed with pbzip2 can be decompressed with bzip2).") (define-public xz (package (name "xz") - (version "5.2.4") + (version "5.2.5") (source (origin (method url-fetch) (uri (list (string-append "http://tukaani.org/xz/xz-" version @@ -490,7 +491,7 @@ compressed with pbzip2 can be decompressed with bzip2).") version ".tar.gz"))) (sha256 (base32 - "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm")))) + "045s9agl3bpv3swlwydhgsqh7791957vmgw2plw8f1rks07r3x7n")))) (build-system gnu-build-system) (arguments `(#:phases @@ -608,14 +609,14 @@ some compression ratio).") (define-public lzip (package (name "lzip") - (version "1.21") + (version "1.22") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/lzip/lzip-" version ".tar.gz")) (sha256 (base32 - "12qdcw5k1cx77brv9yxi1h4dzwibhfmdpigrj43nfk8nscwm12z4")))) + "0j59hx72258334rmkwn57ahr6s69nlrx0a5ip1jw2fbiwr12sd63")))) (build-system gnu-build-system) (home-page "https://www.nongnu.org/lzip/lzip.html") (synopsis "Lossless data compressor based on the LZMA algorithm") @@ -1426,15 +1427,14 @@ or junctions, and always follows hard links.") (define-public zstd (package (name "zstd") - (version "1.4.4") + (version "1.4.9") (source (origin (method url-fetch) (uri (string-append "https://github.com/facebook/zstd/releases/download/" "v" version "/zstd-" version ".tar.gz")) (sha256 - (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr")))) - (replacement zstd/fixed) + (base32 "14yj7309gsvg39rki4xqnd6w5idmqi0655v1fc0mk1m2kvhp9b19")))) (build-system gnu-build-system) (outputs '("out" ;1.2MiB executables and documentation "lib" ;1.2MiB shared library and headers @@ -1442,6 +1442,32 @@ or junctions, and always follows hard links.") (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-tests-32bit + ;; Remove when https://github.com/facebook/zstd/issues/2528 is fixed. + (lambda _ + (substitute* "tests/playTests.sh" + (("roundTripTest -g8M \"19 -T0 --long\"") + "roundTripTest -g8M \"16 -T0 --long\"")))) + (add-after 'unpack 'remove-bogus-check + (lambda _ + ;; lib/Makefile falsely claims that no .pc file can be created. + (substitute* "lib/Makefile" + (("error configured .*dir ") + "true ")) + #t)) + (add-after 'unpack 'patch-command-file-names + ;; Don't require hard requirements to be in $PATH. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (our (lambda (name) (string-append out "/bin/" name)))) + (substitute* "programs/zstdgrep" + (("(:-)(grep)" _ prefix command) + (string-append prefix (which command))) + (("(:-)(zstdcat)" _ prefix command) + (string-append prefix (our command)))) + (substitute* "programs/zstdless" + (("zstdcat" command) + (our command)))))) (delete 'configure) ;no configure script (add-after 'install 'adjust-library-locations (lambda* (#:key outputs #:allow-other-keys) @@ -1461,17 +1487,16 @@ or junctions, and always follows hard links.") ;; Make sure the pkg-config file refers to the right output. (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc") (("^prefix=.*") - (string-append "prefix=" lib "\n"))) - - #t)))) + ;; Note: The .pc file expects a trailing slash for 'prefix'. + (string-append "prefix=" lib "/\n"))))))) #:make-flags - ;; TODO: Integrate in next rebuild cycle. - (list ,(if (%current-target-system) - (string-append "CC=" (cc-for-target)) - "CC=gcc") - (string-append "PREFIX=" (assoc-ref %outputs "out")) - (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib") - (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include") + (list ,(string-append "CC=" (cc-for-target)) + (string-append "prefix=" (assoc-ref %outputs "out")) + (string-append "libdir=" (assoc-ref %outputs "lib") "/lib") + (string-append "includedir=" (assoc-ref %outputs "lib") "/include") + ;; Auto-detection is over-engineered and buggy. + "PCLIBDIR=lib" + "PCINCDIR=include" ;; Skip auto-detection of, and creating a dependency on, the build ;; environment's ‘xz’ for what amounts to a dubious feature anyway. "HAVE_LZMA=0" @@ -1494,17 +1519,6 @@ speed.") license:public-domain ; zlibWrapper/examples/fitblk* license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h} -(define zstd/fixed - (package - (inherit zstd) - (source - (origin - (inherit (package-source zstd)) - (patches - (search-patches - ;; From Ubuntu focal-security - "zstd-CVE-2021-24031_CVE-2021-24032.patch")))))) - (define-public pzstd (package/inherit zstd (name "pzstd") @@ -1617,8 +1631,32 @@ Compression ratios of 2:1 to 3:1 are common for text files.") "unzip-attribs-overflow.patch" "unzip-overflow-on-invalid-input.patch" "unzip-format-secure.patch" - "unzip-overflow-long-fsize.patch")))) - (replacement unzip/fixed) + "unzip-overflow-long-fsize.patch" + + ;; From Fedora + "unzip-alt-iconv-utf8.patch" + "unzip-alt-iconv-utf8-print.patch" + "unzip-fix-recmatch.patch" + "unzip-case-insensitive.patch" + "unzip-close.patch" + "unzip-COVSCAN-fix-unterminated-string.patch" + "unzip-CVE-2016-9844.patch" + "unzip-CVE-2018-1000035.patch" + "unzip-CVE-2018-18384.patch" + "unzip-exec-shield.patch" + "unzip-manpage-fix.patch" + "unzip-overflow.patch" + "unzip-timestamp.patch" + "unzip-valgrind.patch" + "unzip-x-option.patch" + ;; CVE-2019-13232 + "unzip-zipbomb-manpage.patch" + "unzip-zipbomb-part1.patch" + "unzip-zipbomb-part2.patch" + "unzip-zipbomb-part3.patch" + + ;; https://github.com/madler/unzip/issues/2 + "unzip-32bit-zipbomb-fix.patch")))) (build-system gnu-build-system) ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO (arguments @@ -1654,57 +1692,6 @@ recreates the stored directory structure by default.") (license (license:non-copyleft "file://LICENSE" "See LICENSE in the distribution.")))) -(define unzip/fixed - (package - (inherit unzip) - (version "6.0") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/infozip" - "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz")) - (sha256 - (base32 - "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83")) - (patches (search-patches "unzip-CVE-2014-8139.patch" - "unzip-CVE-2014-8140.patch" - "unzip-CVE-2014-8141.patch" - "unzip-CVE-2014-9636.patch" - "unzip-CVE-2015-7696.patch" - "unzip-CVE-2015-7697.patch" - "unzip-allow-greater-hostver-values.patch" - "unzip-initialize-symlink-flag.patch" - "unzip-remove-build-date.patch" - "unzip-attribs-overflow.patch" - "unzip-overflow-on-invalid-input.patch" - "unzip-format-secure.patch" - "unzip-overflow-long-fsize.patch" - - ;; From Fedora - "unzip-alt-iconv-utf8.patch" - "unzip-alt-iconv-utf8-print.patch" - "unzip-fix-recmatch.patch" - "unzip-case-insensitive.patch" - "unzip-close.patch" - "unzip-COVSCAN-fix-unterminated-string.patch" - "unzip-CVE-2016-9844.patch" - "unzip-CVE-2018-1000035.patch" - "unzip-CVE-2018-18384.patch" - "unzip-exec-shield.patch" - "unzip-manpage-fix.patch" - "unzip-overflow.patch" - "unzip-timestamp.patch" - "unzip-valgrind.patch" - "unzip-x-option.patch" - ;; CVE-2019-13232 - "unzip-zipbomb-manpage.patch" - "unzip-zipbomb-part1.patch" - "unzip-zipbomb-part2.patch" - "unzip-zipbomb-part3.patch" - - ;; https://github.com/madler/unzip/issues/2 - "unzip-32bit-zipbomb-fix.patch")))))) - (define-public ziptime (let ((commit "2a5bc9dfbf7c6a80e5f7cb4dd05b4036741478bc") (revision "0")) @@ -1757,38 +1744,22 @@ timestamps in the file header with a fixed time (1 January 2008). (define-public zziplib (package (name "zziplib") - (version "0.13.69") + (version "0.13.72") (home-page "https://github.com/gdraheim/zziplib") (source (origin (method git-fetch) (uri (git-reference (url home-page) (commit (string-append "v" version)))) (file-name (git-file-name name version)) - (patches (search-patches "zziplib-CVE-2018-16548.patch")) (sha256 (base32 - "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92")))) - (replacement zziplib/fixed) - (build-system gnu-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (add-before 'check 'make-files-writable - (lambda _ - (for-each make-file-writable - (find-files "test" #:directories? #t)) - #t))) - - ;; XXX: The default test target attempts to download external resources and - ;; fails without error: <https://github.com/gdraheim/zziplib/issues/53>. - ;; To prevent confusing log messages, just run a simple zip test that works. - #:test-target "check-readme")) + "0i6bpa2b13z19alm6ig80364dnin1w28cvif18k6wkkb0w3dzp8y")))) + (build-system cmake-build-system) (inputs `(("zlib" ,zlib))) (native-inputs `(("perl" ,perl) ; for the documentation ("pkg-config" ,pkg-config) - ;; for the documentation; Python 3 not supported, - ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html - ("python" ,python-2) + ("python" ,python) ("zip" ,zip))) ; to create test files (synopsis "Library for accessing zip files") (description @@ -1797,40 +1768,6 @@ timestamps in the file header with a fixed time (1 January 2008). ;; files carry the Zlib license; see "docs/copying.html" for details. (license (list license:lgpl2.0+ license:mpl1.1)))) -(define-public zziplib/fixed - (package - (inherit zziplib) - (name "zziplib") - (version "0.13.72") - (home-page "https://github.com/gdraheim/zziplib") - (source (origin - (method git-fetch) - (uri (git-reference (url home-page) - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0i6bpa2b13z19alm6ig80364dnin1w28cvif18k6wkkb0w3dzp8y")))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'install 'install-compatibility-symlinks - (lambda* (#:key outputs #:allow-other-keys) - (with-directory-excursion - (string-append (assoc-ref outputs "out") "/lib") - (map (lambda (lib new-symlink) - (symlink lib new-symlink)) - (list "libzzip.so.13" "libzzipfseeko.so.13" - "libzzipmmapped.so.13" "libzzipwrap.so.13") - (list "libzzip-0.so.13" "libzzipfseeko-0.so.13" - "libzzipmmapped-0.so.13" "libzzipwrap-0.so.13"))) - #t))))) - (native-inputs - `(("python" ,python) - ,@(alist-delete "python" - (package-native-inputs zziplib)))) - (build-system cmake-build-system))) - (define-public libzip (package (name "libzip") |