diff options
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r-- | gnu/packages/compression.scm | 147 |
1 files changed, 60 insertions, 87 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 684979018c..501db8f38b 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <[email protected]> ;;; Copyright © 2016 David Craven <[email protected]> ;;; Copyright © 2016, 2019, 2020 Kei Kebreau <[email protected]> -;;; Copyright © 2016, 2018, 2019, 2020, 2021 Marius Bakke <[email protected]> +;;; Copyright © 2016, 2018-2022 Marius Bakke <[email protected]> ;;; Copyright © 2017 Nikita <[email protected]> ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <[email protected]> ;;; Copyright © 2017 Theodoros Foradis <[email protected]> @@ -35,6 +35,7 @@ ;;; Copyright © 2021 Simon Tournier <[email protected]> ;;; Copyright © 2021 Maxim Cournoyer <[email protected]> ;;; Copyright © 2021 Ahmad Jarara <[email protected]> +;;; Copyright © 2022 Greg Hogan <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -99,53 +100,55 @@ (define-public zlib (package (name "zlib") - (version "1.2.11") + (version "1.2.12") (source (origin - (method url-fetch) - (uri (list (string-append "http://zlib.net/zlib-" + (method url-fetch) + (uri (list (string-append "http://zlib.net/zlib-" version ".tar.gz") - (string-append "mirror://sourceforge/libpng/zlib/" - version "/zlib-" version ".tar.gz"))) - (sha256 - (base32 - "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3")))) + (string-append "mirror://sourceforge/libpng/zlib/" + version "/zlib-" version ".tar.gz"))) + (patches (search-patches "zlib-cc.patch" + "zlib-correct-crc32-inputs.patch")) + (sha256 + (base32 + "1n9na4fq4wagw1nzsfjr6wyly960jfa94460ncbf6p1fac44i14i")))) (build-system gnu-build-system) (outputs '("out" "static")) (arguments - `(#:make-flags - ,(if (target-mingw?) - `(list ,(string-append "PREFIX=" (%current-target-system) "-") - "BINARY_PATH = $(prefix)/bin" - "INCLUDE_PATH = $(prefix)/include" - "LIBRARY_PATH = $(prefix)/lib" - "SHARED_MODE = 1" - (string-append "prefix = " (assoc-ref %outputs "out"))) - ''()) - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; Zlib's home-made `configure' fails when passed - ;; extra flags like `--enable-fast-install', so we need to - ;; invoke it with just what it understand. - (let ((out (assoc-ref outputs "out"))) - ;; 'configure' doesn't understand '--host'. - ,@(if (%current-target-system) - `((setenv "CHOST" ,(%current-target-system))) - '()) - ,@(if (target-mingw?) - `((rename-file "win32/Makefile.gcc" "Makefile")) - `((invoke "./configure" - (string-append "--prefix=" out))))))) - (add-after 'install 'move-static-library - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (static (assoc-ref outputs "static"))) - (with-directory-excursion (string-append out "/lib") - (install-file "libz.a" (string-append static "/lib")) - (delete-file "libz.a") - #t))))))) + (list + #:make-flags + (if (target-mingw?) + #~(list #$(string-append "PREFIX=" (%current-target-system) "-") + "BINARY_PATH = $(prefix)/bin" + "INCLUDE_PATH = $(prefix)/include" + "LIBRARY_PATH = $(prefix)/lib" + "SHARED_MODE = 1" + (string-append "prefix = " #$output)) + #~'()) + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + ;; Zlib's home-made `configure' fails when passed + ;; extra flags like `--enable-fast-install', so we need to + ;; invoke it with just what it understand. + (setenv "CC" #$(cc-for-target)) + ;; 'configure' doesn't understand '--host'. + #$@(if (%current-target-system) + #~((setenv "CHOST" #$(%current-target-system))) + #~()) + + #$@(if (target-mingw?) + #~((rename-file "win32/Makefile.gcc" "Makefile")) + #~((invoke "./configure" + (string-append "--prefix=" #$output)))))) + (add-after 'install 'move-static-library + (lambda _ + (with-directory-excursion (string-append #$output "/lib") + (install-file "libz.a" (string-append #$output:static + "/lib")) + (delete-file "libz.a"))))))) (home-page "https://zlib.net/") (synopsis "Compression library") (description @@ -244,43 +247,28 @@ adding and extracting files to/from a tar archive.") (define-public gzip (package (name "gzip") - (version "1.10") + (version "1.12") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gzip/gzip-" version ".tar.xz")) (sha256 (base32 - "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4")))) + "0mhrx5wk9gazmxdw7vmbpg036yzqqhsww6h12kwf2dzn37jh6pnf")))) (build-system gnu-build-system) (synopsis "General file (de)compression (using lzw)") (arguments ;; FIXME: The test suite wants `less', and optionally Perl. '(#:tests? #f + #:configure-flags '("ac_cv_prog_LESS=\"less\"") #:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-for-glibc-2.28 - (lambda _ - ;; Adjust the bundled gnulib to work with glibc 2.28. See e.g. - ;; "m4-gnulib-libio.patch". This is a phase rather than patch - ;; or snippet to work around <https://bugs.gnu.org/32347>. - (substitute* (find-files "lib" "\\.c$") - (("#if defined _IO_ftrylockfile") - "#if defined _IO_EOF_SEEN")) - (substitute* "lib/stdio-impl.h" - (("^/\\* BSD stdio derived implementations") - (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n" - "# define _IO_IN_BACKUP 0x100\n" - "#endif\n\n" - "/* BSD stdio derived implementations"))) - #t)) (add-after 'unpack 'use-absolute-name-of-gzip (lambda* (#:key outputs #:allow-other-keys) (substitute* "gunzip.in" - (("exec gzip") + (("exec 'gzip'") (string-append "exec " (assoc-ref outputs "out") - "/bin/gzip"))) - #t))))) + "/bin/gzip")))))))) (description "GNU Gzip provides data compression and decompression utilities; the typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single @@ -496,7 +484,7 @@ compressed with pbzip2 can be decompressed with bzip2).") (define-public xz (package (name "xz") - (version "5.2.5") + (version "5.2.6") (source (origin (method url-fetch) (uri (list (string-append "http://tukaani.org/xz/xz-" version @@ -505,7 +493,7 @@ compressed with pbzip2 can be decompressed with bzip2).") version ".tar.gz"))) (sha256 (base32 - "045s9agl3bpv3swlwydhgsqh7791957vmgw2plw8f1rks07r3x7n")))) + "185kj56a996d04d943xisvpifvnsbr7iplyf2nyjxkbvw6z5l452")))) (build-system gnu-build-system) (arguments `(#:phases @@ -623,14 +611,14 @@ some compression ratio).") (define-public lzip (package (name "lzip") - (version "1.22") + (version "1.23") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/lzip/lzip-" version ".tar.gz")) (sha256 (base32 - "0j59hx72258334rmkwn57ahr6s69nlrx0a5ip1jw2fbiwr12sd63")))) + "03985xc696210irdzv475mlvf30ylahni3msanfz4ppivm3w14j7")))) (build-system gnu-build-system) (home-page "https://www.nongnu.org/lzip/lzip.html") (synopsis "Lossless data compressor based on the LZMA algorithm") @@ -1590,28 +1578,21 @@ or junctions, and always follows hard links.") (define-public zstd (package (name "zstd") - (version "1.5.0") + (version "1.5.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/facebook/zstd/releases/download/" "v" version "/zstd-" version ".tar.gz")) (sha256 - (base32 "150y541303vnvfhd8wkbih00lfvvm98rd12yijwlbkqzg3xgp52i")))) + (base32 "1l1zm1imcc2ixayykyh4y421shdj3pzp7g2xm2k2js8jmipxahkw")))) (build-system gnu-build-system) - (outputs '("out" ;1.2MiB executables and documentation + (outputs '("out" ;1.5MiB executables and documentation "lib" ;1.2MiB shared library and headers "static")) ;1.2MiB static library (arguments `(#:phases (modify-phases %standard-phases - (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) @@ -1768,7 +1749,6 @@ Compression ratios of 2:1 to 3:1 are common for text files.") (package (inherit zip) (name "unzip") (version "6.0") - (replacement unzip/fixed) (source (origin (method url-fetch) @@ -1814,7 +1794,9 @@ Compression ratios of 2:1 to 3:1 are common for text files.") "unzip-zipbomb-part3.patch" ;; https://github.com/madler/unzip/issues/2 - "unzip-32bit-zipbomb-fix.patch")))) + "unzip-32bit-zipbomb-fix.patch" + + "unzip-CVE-2022-0529+CVE-2022-0530.patch")))) (build-system gnu-build-system) ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO (arguments @@ -1859,15 +1841,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) - (source - (origin - (inherit (package-source unzip)) - (patches (append - (origin-patches (package-source unzip)) - (search-patches "unzip-CVE-2022-0529+CVE-2022-0530.patch"))))))) - (define-public ziptime (let ((commit "2a5bc9dfbf7c6a80e5f7cb4dd05b4036741478bc") (revision "0")) |