diff options
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r-- | gnu/packages/compression.scm | 327 |
1 files changed, 290 insertions, 37 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 37a7d230fe..cfbc959182 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <[email protected]> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <[email protected]> ;;; Copyright © 2015, 2016 Eric Bavier <[email protected]> -;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <[email protected]> +;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Ricardo Wurmus <[email protected]> ;;; Copyright © 2015, 2017, 2018 Leo Famulari <[email protected]> ;;; Copyright © 2015 Jeff Mickey <[email protected]> ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <[email protected]> @@ -13,7 +13,7 @@ ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <[email protected]> ;;; Copyright © 2016 David Craven <[email protected]> ;;; Copyright © 2016, 2019, 2020 Kei Kebreau <[email protected]> -;;; Copyright © 2016, 2018, 2019, 2020 Marius Bakke <[email protected]> +;;; Copyright © 2016, 2018, 2019, 2020, 2021 Marius Bakke <[email protected]> ;;; Copyright © 2017 Nikita <[email protected]> ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <[email protected]> ;;; Copyright © 2017 Theodoros Foradis <[email protected]> @@ -32,6 +32,7 @@ ;;; Copyright © 2020 Léo Le Bouter <[email protected]> ;;; Copyright © 2021 Antoine Côté <[email protected]> ;;; Copyright © 2021 Vincent Legoll <[email protected]> +;;; Copyright © 2021 Maxim Cournoyer <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,6 +67,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) + #:use-module (gnu packages benchmark) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages curl) @@ -76,12 +78,14 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) #:use-module (gnu packages gtk) + #:use-module (gnu packages llvm) #:use-module (gnu packages man) #:use-module (gnu packages maths) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages qt) + #:use-module (gnu packages selinux) #:use-module (gnu packages tls) #:use-module (gnu packages valgrind) #:use-module (gnu packages version-control) @@ -671,6 +675,7 @@ decompressors when faced with corrupted input.") (modules '((guix build utils))) (snippet '(begin + ;; Adjust for newer libc versions. (substitute* (find-files "lib" "\\.c$") (("#if defined _IO_ftrylockfile") "#if defined _IO_EOF_SEEN")) @@ -680,9 +685,15 @@ decompressors when faced with corrupted input.") "# define _IO_IN_BACKUP 0x100\n" "#endif\n\n" "/* BSD stdio derived implementations"))) - #t)))) + ;; ... and for newer GCC with -fno-common. + (substitute* '("src/shar-opts.h" + "src/unshar-opts.h" + "src/uudecode-opts.h" + "src/uuencode-opts.h") + (("char const \\* const program_name" all) + (string-append "extern " all))))))) (build-system gnu-build-system) - (inputs + (native-inputs `(("which" ,which))) (arguments `(#:phases @@ -692,8 +703,7 @@ decompressors when faced with corrupted input.") ;; in fact test data (lambda _ (substitute* "tests/shar-1.ok" - (((which "sh")) "/bin/sh")) - #t))))) + (((which "sh")) "/bin/sh"))))))) (home-page "https://www.gnu.org/software/sharutils/") (synopsis "Archives in shell scripts, uuencode/uudecode") (description @@ -848,15 +858,16 @@ time for compression ratio.") (define-public squashfs-tools (package (name "squashfs-tools") - (version "4.4") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/squashfs/squashfs/" - "squashfs" version "/" - "squashfs" version ".tar.gz")) - (sha256 - (base32 - "0zmhvczscqz0mzh4b9m8m42asq14db0a6lc8clp5ljq5ybrv70d9")))) + (version "4.4-git.1") ; ‘A point release of […] 4.4’ + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/plougher/squashfs-tools") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1hb95iy445hs2p3f7hg51jkrpkfi3bphddk60p2la0qmcdjkgbbm")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no check target @@ -865,29 +876,109 @@ time for compression ratio.") "XZ_SUPPORT=1" "LZO_SUPPORT=1" "LZ4_SUPPORT=1" + "ZSTD_SUPPORT=1" (string-append "INSTALL_DIR=" %output "/bin")) #:phases (modify-phases %standard-phases (replace 'configure (lambda _ - (chdir "squashfs-tools") - #t))))) + (chdir "squashfs-tools"))) + (add-after 'install 'install-documentation + ;; Install what very little usage documentation is provided. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (string-append out "/share/doc/" ,name))) + (install-file "../USAGE" doc))))))) (inputs `(("lz4" ,lz4) ("lzo" ,lzo) ("xz" ,xz) - ("zlib" ,zlib))) + ("zlib" ,zlib) + ("zstd:lib" ,zstd "lib"))) (home-page "https://github.com/plougher/squashfs-tools") (synopsis "Tools to create and extract squashfs file systems") (description - "Squashfs is a highly compressed read-only file system for Linux. It uses -zlib to compress files, inodes, and directories. All blocks are packed to -minimize the data overhead, and block sizes of between 4K and 1M are supported. -It is intended to be used for archival use, for live CDs, and for embedded -systems where low overhead is needed. This package allows you to create and -extract such file systems.") + "Squashfs is a highly compressed read-only file system for Linux. It +compresses files, inodes, and directories with one of several compressors. +All blocks are packed to minimize the data overhead, and block sizes of +between 4K and 1M are supported. It is intended to be used for archival use, +for live media, and for embedded systems where low overhead is needed. +This package allows you to create and extract such file systems.") (license license:gpl2+))) +(define-public squashfs-tools-ng + (package + (name "squashfs-tools-ng") + (version "1.1.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/AgentD/squashfs-tools-ng") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "13gx6mc57wjjnrpnkb74zi2wiqazz2q715y1zz7rff02wh1vb5k9")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete bundled third-party libraries. + (for-each (lambda (directory) + (substitute* "Makefile.am" + (((format #f "^include ~a.*" directory)) "")) + (delete-file-recursively directory)) + (list "lib/lz4" + "lib/zlib")))))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list "--disable-static"))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (inputs + `(("libselinux" ,libselinux) + + ;; Compression algorithms. + ("bzip2" ,bzip2) + ("lz4" ,lz4) + ("lzo" ,lzo) + ("xz" ,xz) + ("zlib" ,zlib) + ("zstd:lib" ,zstd "lib"))) + (home-page "https://github.com/AgentD/squashfs-tools-ng") + (synopsis "Tools to create and extract squashfs file systems") + (description + "Squashfs is a highly compressed read-only file system for Linux. It +compresses files, inodes, and directories with one of several compressors. +All blocks are packed to minimize the data overhead, and block sizes of +between 4K and 1M are supported. It is intended to be used for archival use, +for live media, and for embedded systems where low overhead is needed. + +The squashfs-tools-ng package offers alternative tooling to create and extract +such file systems. It is not based on the older squashfs-tools package and +its tools have different names: + +@enumerate +@item @command{gensquashfs} produces SquashFS images from a directory or +@command{gen_init_cpio}-like file listings and can generate SELinux labels. +@item @command{rdsquashfs} inspects and unpacks SquashFS images. +@item @command{sqfs2tar} and @command{tar2sqfs} convert between SquashFS and +tarballs. +@item @command{sqfsdiff} compares the contents of two SquashFS images. +@end enumerate + +These commands are largely command-line wrappers around the included +@code{libsquashfs} library that intends to make SquashFS available to other +applications as an embeddable, extensible archive format. + +Both the library and tools operate deterministically: same input will produce +byte-for-byte identical output.") + ;; Upstream goes to some lengths to ensure that libsquashfs is LGPL3+. + (license license:gpl3+))) + (define-public pigz (package (name "pigz") @@ -1000,7 +1091,7 @@ tarballs.") (define-public libjcat (package (name "libjcat") - (version "0.1.6") + (version "0.1.8") (source (origin (method git-fetch) @@ -1010,7 +1101,7 @@ tarballs.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1a2z34m8611xvna9kwch8ralxx7c9mk4rm9vrxx7p9hr8sbqbsaz")))) + (base32 "18qkyg19r7fxzv93kar5n808n3582ygjmqwa7rnyg5y4b6hnwihl")))) (build-system meson-build-system) (native-inputs `(("gobject-introspection" ,gobject-introspection) @@ -1108,7 +1199,7 @@ well as bzip2.") (define-public snappy (package (name "snappy") - (version "1.1.8") + (version "1.1.9") (source (origin (method git-fetch) @@ -1117,11 +1208,35 @@ well as bzip2.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv")) - (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch")))) + (base32 "03zz56h79z0sgvi5sangjqn9dahhzvf645v26n1y0gwmfbmsax95")) + (patches + (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch" + "snappy-add-inline-for-GCC.patch")))) (build-system cmake-build-system) (arguments - `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) + `(#:configure-flags + (list "-DBUILD_SHARED_LIBS=ON" + ;; These would be installed alongside Snappy otherwise. + "-DBENCHMARK_ENABLE_INSTALL=OFF" + "-DINSTALL_GTEST=OFF") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-third_party-subprojects + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "third_party" + (for-each (lambda (subproject) + (let* ((input (string-append subproject "-source")) + (source (assoc-ref inputs input))) + (with-directory-excursion subproject + ;; Take advantage of the coincidence that both + ;; use GIT-FETCH, which creates a directory. + (copy-recursively source ".")))) + (list "benchmark" + "googletest")) + #;punt)))))) + (native-inputs + `(("benchmark-source" ,(package-source benchmark)) + ("googletest-source" ,(package-source googletest)))) (home-page "https://github.com/google/snappy") (synopsis "Fast compressor/decompressor") (description "Snappy is a compression/decompression library. It does not @@ -1132,6 +1247,54 @@ for most inputs, but the resulting compressed files are anywhere from 20% to 100% bigger.") (license license:asl2.0))) +;; We need this for irods. +(define-public snappy-with-clang6 + (package + (inherit snappy) + (name "snappy-with-clang") + ;; XXX 1.1.9 fails to build with clang with + ;; error: invalid output constraint '=@ccz' in asm + (version "1.1.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/snappy") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv")))) + (arguments + `(#:configure-flags + '("-DBUILD_SHARED_LIBS=ON" + "-DCMAKE_CXX_COMPILER=clang++" + "-DCMAKE_CXX_FLAGS=-stdlib=libc++" + "-DCMAKE_EXE_LINKER_FLAGS=-lc++abi") + #:phases + (modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (let ((gcc (assoc-ref (or native-inputs inputs) "gcc"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (cons* (string-append (assoc-ref inputs "libcxx+libcxxabi") + "/include/c++/v1") + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the Clang headers. + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:))) + ":")) + (format #true + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")))))))) + (properties `((hidden? . #true))) + (native-inputs + `(("clang" ,clang-toolchain-6))) + (inputs + `(("libcxx+libcxxabi" ,libcxx+libcxxabi-6) + ("libcxxabi" ,libcxxabi-6))))) + (define-public p7zip (package (name "p7zip") @@ -1809,21 +1972,23 @@ timestamps in the file header with a fixed time (1 January 2008). (define-public libzip (package (name "libzip") - (version "1.7.3") + (version "1.8.0") (source (origin (method url-fetch) (uri (string-append "https://libzip.org/download/libzip-" version ".tar.xz")) (sha256 (base32 - "0ck1dk7zn5qzpgxklg0r26nfsf04xb6c46gsig060hkvvgzp6156")))) + "0zn9vaiwy2izj8cnm8i7c2mbdn38n328grqb8f07x55s4kd3nxph")))) (native-inputs - `(("perl" ,perl))) + `(("perl" ,perl) + ("pkg-config" ,pkg-config))) (inputs `(("gnutls" ,gnutls) ("liblzma" ,xz) ("openssl" ,openssl) - ("zlib" ,zlib))) + ("zlib" ,zlib) + ("zstd:lib" ,zstd "lib"))) (build-system cmake-build-system) (home-page "https://libzip.org") (synopsis "C library for reading, creating, and modifying zip archives") @@ -2164,7 +2329,7 @@ download times, and other distribution and storage costs.") (native-inputs `(("doxygen" ,doxygen))) (inputs - `(("qtbase" ,qtbase) + `(("qtbase" ,qtbase-5) ("zlib" ,zlib))) (home-page "https://stachenov.github.io/quazip/index.html") (synopsis "Qt/C++ wrapper for Minizip") @@ -2182,6 +2347,58 @@ reading from and writing to ZIP archives. ") ;; distributed under zlib terms. (license (list license:lgpl2.1+ license:zlib)))) +(define-public zchunk + (package + (name "zchunk") + (version "1.1.16") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zchunk/zchunk") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0nlzwnv6wh2yjyyv27f81jnvmk7psgpbnw7dsdp7frfkya569hgv")))) + (build-system meson-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/zck_gen_zdict.c" + (("/usr/bin/zstd") + (string-append (assoc-ref inputs "zstd") + "/bin/zstd")))))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("curl" ,curl) + ("zstd" ,zstd))) + (propagated-inputs + `(("zstd:lib" ,zstd "lib"))) ;in Requires.private of zck.pc + (home-page "https://github.com/zchunk/zchunk") + (synopsis "Compressed file format for efficient deltas") + (description "The zchunk compressed file format allows splitting a file +into independent chunks. This makes it possible to retrieve only changed +chunks when downloading a new version of the file, and also makes zchunk files +efficient over rsync. Along with the library, this package provides the +following utilities: +@table @command +@item unzck +To decompress a zchunk file. +@item zck +To compress a new zchunk file, or re-compress an existing one. +@item zck_delta_size +To calculate the difference between two zchunk files. +@item zck_gen_zdict +To create a dictionary for a zchunk file. +@item zck_read_header +To read a zchunk header. +@item zckdl +To download a zchunk file. +@end table") + (license license:bsd-2))) + (define-public zutils (package (name "zutils") @@ -2434,17 +2651,53 @@ with their error correction data losslessly rearranged for better compression, to their original, binary CD format.") (license license:gpl3+))) +(define-public libdeflate + (package + (name "libdeflate") + (version "1.8") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ebiggers/libdeflate") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0nw1zhr2s6ffcc3s0n5wsshvjb6pmybwapagli135zzn2fx1pdiz")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "CC=" ,(cc-for-target)) + (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (inputs + `(("zlib" ,zlib))) + (home-page "https://github.com/ebiggers/libdeflate") + (synopsis "Library for DEFLATE/zlib/gzip compression and decompression") + (description "Libdeflate is a library for fast, whole-buffer DEFLATE-based +compression and decompression. The supported formats are: + +@enumerate +@item DEFLATE (raw) +@item zlib (a.k.a. DEFLATE with a zlib wrapper) +@item gzip (a.k.a. DEFLATE with a gzip wrapper) +@end enumerate +") + (license license:expat))) + (define-public tarlz (package (name "tarlz") - (version "0.19") + (version "0.21") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/lzip/tarlz/" "tarlz-" version ".tar.lz")) (sha256 - (base32 "09xal55973ivzpaja93jcc1pfla8gb3vrk8dx7pj9qvvz5aynf9n")))) + (base32 "1x5dw03lcwfigcv97cg70gkbkfycjmv1012s9lwnl4izvl9235qg")))) (build-system gnu-build-system) (native-inputs `(("lzip" ,lzip))) |