;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2017, 2018 Leo Famulari <leo@famulari.name>
;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
+ (ice-9 ftw)
(srfi srfi-1))
#:phases
(modify-phases %standard-phases
;; it create all the (un)versioned symlinks, so we handle it here.
(let* ((out (assoc-ref outputs "out"))
(libdir (string-append out "/lib"))
- ;; Find the actual library (e.g. "libbz2.so.1.0.6").
- (lib (string-drop
- (car (find-files
- "."
- (lambda (file stat)
- (and (string-prefix? "./libbz2.so" file)
- (eq? 'regular (stat:type stat))))))
- 2))
- (soversion (string-drop lib (string-length "libbz2.so."))))
+ (soname "libbz2.so")
+ ;; Locate the built library (e.g. "libbz2.so.1.0.6").
+ (lib (car (scandir "."
+ (lambda (file)
+ (and (string-prefix? soname file)
+ (eq? 'regular
+ (stat:type (lstat file))))))))
+ (soversion (string-drop lib (+ 1 (string-length soname)))))
(install-file lib libdir)
(with-directory-excursion libdir
;; Create symlinks libbz2.so.1 -> libbz2.so.1.0, etc.
- (let loop ((base "libbz2.so")
+ (let loop ((base soname)
(numbers (string-split soversion #\.)))
(unless (null? numbers)
(let ((so-file (string-append base "." (car numbers))))
(symlink so-file base)
(loop so-file (cdr numbers))))))
#t)))
+ (add-after 'install-shared-lib 'move-static-lib
+ (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 "libbz2.a" (string-append static "/lib"))
+ (delete-file "libbz2.a")
+ #t))))
(add-after 'install-shared-lib 'patch-scripts
(lambda* (#:key outputs inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")))
,@(if (%current-target-system)
'(#:tests? #f)
'())))
+ (outputs '("out" "static"))
(synopsis "High-quality data compression program")
(description
"bzip2 is a freely available, patent free (see below), high-quality data
(define-public xz
(package
(name "xz")
- (version "5.2.3")
+ (version "5.2.4")
(source (origin
(method url-fetch)
(uri (list (string-append "http://tukaani.org/xz/xz-" version
version ".tar.gz")))
(sha256
(base32
- "1jr8pxnz55ifc8cvp3ivgl79ph9iik5aypsc9cma228aglsqp4ki"))))
+ "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
(build-system gnu-build-system)
(synopsis "General-purpose data compression")
(description
(method url-fetch)
(uri (string-append "mirror://gnu/sharutils/sharutils-"
version ".tar.xz"))
+ (patches (search-patches "sharutils-CVE-2018-1000097.patch"))
(sha256
(base32
"16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))))
(license license:gpl3+)))
(define-public sfarkxtc
- (let ((commit "b5e0a2ba3921f019d74d4b92bd31c36dd19d2cf1"))
- (package
- (name "sfarkxtc")
- (version (string-take commit 10))
- (source (origin
- ;; There are no release tarballs, so we just fetch the latest
- ;; commit at this time.
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/raboof/sfarkxtc.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0f5x6i46qfl6ry21s7g2p4sd4b2r1g4fb03yqi2vv4kq3saryhvj"))))
- (build-system gnu-build-system)
- (arguments
- `(#:tests? #f ;no "check" target
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* "Makefile"
- (("/usr/local") (assoc-ref outputs "out")))
- #t)))))
- (inputs
- `(("zlib" ,zlib)
- ("sfarklib" ,sfarklib)))
- (home-page "https://github.com/raboof/sfarkxtc")
- (synopsis "Basic sfArk decompressor")
- (description "SfArk extractor converts SoundFonts in the compressed legacy
+ (let ((commit "13cd6f93725a90d91ec5ea75babf1dbd694ac463")
+ (revision "1"))
+ (package
+ (name "sfarkxtc")
+ (version (git-version "0" revision commit))
+ (source (origin
+ ;; There are no release tarballs, so we just fetch the latest
+ ;; commit at this time.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/raboof/sfarkxtc.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1mb1jyk1m11l1gppd9hmql9cyp55sdf7jk5rbc7acky1z4k4mv19"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;no "check" target
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "Makefile"
+ (("/usr/local") (assoc-ref outputs "out")))
+ #t)))))
+ (inputs
+ `(("zlib" ,zlib)
+ ("sfarklib" ,sfarklib)))
+ (home-page "https://github.com/raboof/sfarkxtc")
+ (synopsis "Basic sfArk decompressor")
+ (description "SfArk extractor converts SoundFonts in the compressed legacy
sfArk file format to the uncompressed sf2 format.")
- (license license:gpl3+))))
+ (license license:gpl3+))))
(define-public libmspack
(package
(name "libmspack")
- (version "0.6")
+ (home-page "https://cabextract.org.uk/libmspack/")
+ (version "0.7")
(source
(origin
(method url-fetch)
- (uri (string-append "http://www.cabextract.org.uk/libmspack/libmspack-"
- version "alpha.tar.gz"))
+ (uri (string-append home-page name "-" version "alpha.tar.gz"))
(sha256
- (base32 "08gr2pcinas6bdqz3k0286g5cnksmcx813skmdwyca6bmj1fxnqy"))))
+ (base32 "0wi7ydq8vjiq0kfnpkj2d6vll2s49x38bywnsdqphqb0vdn53q1n"))))
(build-system gnu-build-system)
- (home-page "http://www.cabextract.org.uk/libmspack/")
+ (arguments
+ `(#:configure-flags '("--disable-static")))
(synopsis "Compression tools for some formats used by Microsoft")
(description
"The purpose of libmspack is to provide both compression and
(define-public perl-compress-raw-bzip2
(package
(name "perl-compress-raw-bzip2")
- (version "2.074")
+ (version "2.081")
(source
(origin
(method url-fetch)
"Compress-Raw-Bzip2-" version ".tar.gz"))
(sha256
(base32
- "0b5jwqf15zr787acnx8sfyy2zavdd7gfkd98n1dgy8fs6r8yb8a4"))))
+ "081mpkjy688lg48997fqh3d7ja12vazmz02fw84495civg4vb4l6"))))
(build-system perl-build-system)
;; TODO: Use our bzip2 package.
(home-page "http://search.cpan.org/dist/Compress-Raw-Bzip2")
(define-public perl-compress-raw-zlib
(package
(name "perl-compress-raw-zlib")
- (version "2.076")
+ (version "2.081")
(source
(origin
(method url-fetch)
"Compress-Raw-Zlib-" version ".tar.gz"))
(sha256
(base32
- "1al2h0i6mspldmlf5c09fy5a4j8swsxd31v6zi8zx9iyqk1lw7in"))))
+ "06rsm9ahp20xfyvd3jc69sd0k8vqysryxc6apzdbn96jbcsdwmp1"))))
(build-system perl-build-system)
(inputs
`(("zlib" ,zlib)))
(define-public perl-io-compress
(package
(name "perl-io-compress")
- (version "2.074")
+ (version "2.081")
(source
(origin
(method url-fetch)
"IO-Compress-" version ".tar.gz"))
(sha256
(base32
- "1wlpy2026djfmq0bjync531yq6s695jf7bcnpvjphrasi776igdl"))))
+ "1na66ns1g3nni0m9q5494ym4swr21hfgpv88mw8wbj2daiswf4aj"))))
(build-system perl-build-system)
(propagated-inputs
- `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib) ; >=2.074
- ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.074
+ `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib) ; >=2.081
+ ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.081
(home-page "http://search.cpan.org/dist/IO-Compress")
(synopsis "IO Interface to compressed files/buffers")
(description "IO-Compress provides a Perl interface to allow reading and
(string-append "prefix=" (assoc-ref %outputs "out")))
#:phases (modify-phases %standard-phases
(delete 'configure)))) ; no configure script
- (home-page "http://www.lz4.org")
+ (home-page "https://www.lz4.org")
(synopsis "Compression algorithm focused on speed")
(description "LZ4 is a lossless compression algorithm, providing
compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an
extract such file systems.")
(license license:gpl2+)))
+;; We need this for building squashfs images with symlinks.
+(define-public squashfs-tools-next
+ (let ((commit "fb33dfc32b131a1162dcf0e35bd88254ae10e265")
+ (revision "1"))
+ (package (inherit squashfs-tools)
+ (name "squashfs-tools-next")
+ (version (string-append "4.3-" revision (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/plougher/squashfs-tools.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1x2skf8hxzfch978nzx5mh46d4hhi6gl22270hiarjszsjk3bnsx")))))))
+
(define-public pigz
(package
(name "pigz")
respectively, based on the reference implementation from Google.")
(license license:expat))))
+(define-public bsdiff
+ (package
+ (name "bsdiff")
+ (version "4.3")
+ (home-page "https://www.daemonology.net/bsdiff/")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append home-page name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list "INSTALL=install" "CC=gcc"
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'fix-Makefile
+ (lambda _
+ (substitute* "Makefile"
+ ;; Adjust syntax to make it compatible with GNU Make.
+ (("^\\.") "")
+ ;; Help install(1) create the target directory.
+ (("\\$\\{PREFIX\\}") "-D -t ${PREFIX}"))
+ #t)))
+ #:tests? #f)) ;no tests
+ (inputs
+ `(("bzip2" ,bzip2)))
+ (synopsis "Patch binary files")
+ (description
+ "@command{bsdiff} and @command{bspatch} are tools for building and
+applying patches to binary files. By using suffix sorting (specifically
+Larsson and Sadakane's @code{qsufsort}) and taking advantage of how
+executable files change, bsdiff routinely produces binary patches 50-80%
+smaller than those produced by @code{Xdelta}.")
+ (license license:bsd-2)))
+
(define-public cabextract
(package
(name "cabextract")
- (version "1.6")
+ (home-page "https://cabextract.org.uk/")
+ (version "1.7")
(source (origin
(method url-fetch)
- (uri (string-append
- "http://cabextract.org.uk/cabextract-" version ".tar.gz"))
+ (uri (string-append home-page name "-" version ".tar.gz"))
(sha256
(base32
- "1ysmmz25fjghq7mxb2anyyvr1ljxqxzi4piwjhk0sdamcnsn3rnf"))))
+ "1g86wmb8lkjiv2jarfz979ngbgg7d3si8x5il4g801604v406wi9"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete bundled libmspack.
+ (delete-file-recursively "mspack")
+ #t))))
(build-system gnu-build-system)
(arguments '(#:configure-flags '("--with-external-libmspack")))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("libmspack" ,libmspack)))
- (home-page "http://www.cabextract.org.uk/")
(synopsis "Tool to unpack Cabinet archives")
(description "Extracts files out of Microsoft Cabinet (.cab) archives")
;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.
(add-before 'build 'build-jni
(lambda _
;; Rebuild one of the binaries we removed earlier
- (system* "javac" "src/main/java/org/xerial/snappy/OSInfo.java"
+ (invoke "javac" "src/main/java/org/xerial/snappy/OSInfo.java"
"-d" "lib")
;; Link to the dynamic bitshuffle and snappy, not the static ones
(substitute* "Makefile.common"
(add-before 'build 'build-jni
(lambda _
;; Rebuild one of the binaries we removed earlier
- (system* "javac" "src/main/java/org/xerial/snappy/OSInfo.java"
+ (invoke "javac" "src/main/java/org/xerial/snappy/OSInfo.java"
"-d" "lib")
;; Link to the dynamic snappy, not the static ones
(substitute* "Makefile.common"
(("NAME\\): \\$\\(SNAPPY_OBJ\\)")
"NAME): $(SNAPPY_OBJ)\n\t@mkdir -p $(@D)"))
;; Finally we can run the Makefile to build the dynamic library.
- (zero? (system* "make" "native"))))
+ (invoke "make" "native")))
;; Once we have built the shared library, we need to place it in the
;; "build" directory so it can be added to the jar file.
(add-after 'build-jni 'copy-jni
(replace 'check
(lambda _
(define (test class)
- (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
- ":build/classes"
- ":build/test-classes")
- "-Dtest.resources.dir=src/test/resources"
- "org.testng.TestNG" "-testclass"
- class)))
- (system* "ant" "compile-tests")
- (and
- (test "org.iq80.snappy.SnappyFramedStreamTest")
- (test "org.iq80.snappy.SnappyStreamTest"))))
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
+ ":build/classes"
+ ":build/test-classes")
+ "-Dtest.resources.dir=src/test/resources"
+ "org.testng.TestNG" "-testclass"
+ class))
+ (invoke "ant" "compile-tests")
+ (test "org.iq80.snappy.SnappyFramedStreamTest")
+ (test "org.iq80.snappy.SnappyStreamTest")))
(add-before 'build 'remove-hadoop-dependency
(lambda _
;; We don't have hadoop
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key system outputs #:allow-other-keys)
- (zero? (system* "cp"
- (let ((system ,(or (%current-target-system)
- (%current-system))))
- (cond
- ((string-prefix? "x86_64" system)
- "makefile.linux_amd64_asm")
- ((string-prefix? "i686" system)
- "makefile.linux_x86_asm_gcc_4.X")
- (else
- "makefile.linux_any_cpu_gcc_4.X")))
- "makefile.machine"))))
+ (invoke "cp"
+ (let ((system ,(or (%current-target-system)
+ (%current-system))))
+ (cond
+ ((string-prefix? "x86_64" system)
+ "makefile.linux_amd64_asm")
+ ((string-prefix? "i686" system)
+ "makefile.linux_x86_asm_gcc_4.X")
+ (else
+ "makefile.linux_any_cpu_gcc_4.X")))
+ "makefile.machine")))
(replace 'check
(lambda _
- (and (zero? (system* "make" "test"))
- (zero? (system* "make" "test_7z"))
- (zero? (system* "make" "test_7zr"))))))))
+ (invoke "make" "test")
+ (invoke "make" "test_7z")
+ (invoke "make" "test_7zr"))))))
(inputs
(let ((system (or (%current-target-system)
(%current-system))))
#t))
(replace 'check
(lambda _
- (zero? (system* "./run-tests.sh")))))))
+ (invoke "./run-tests.sh"))))))
(home-page "https://github.com/twogood/unshield")
(synopsis "Extract CAB files from InstallShield installers")
(description
(define-public zstd
(package
(name "zstd")
- (version "1.3.4")
+ (version "1.3.5")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/facebook/zstd/archive/v"
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "1a85sqk4z5b2jfp7fqkr38ibql8mdzca32lf4i3bssyjimp1pr4j"))))
+ "1sifbq18p0hc978g0pq8fymrlpzz1fcxqkbxfqk44z6v9jg5bqfn"))
+ ;; Fix a regression that causes the tests to fail. Both patches
+ ;; have been merged upstream and will be part of the next release.
+ (patches (search-patches "zstd-fix-stdin-list-without-tty.patch"
+ "zstd-fix-stdin-list-test.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(delete 'configure) ; no configure script
(add-before 'check 'compile-tests
(lambda* (#:key make-flags #:allow-other-keys)
- (zero? (apply system* "make" "tests" make-flags))))
+ (apply invoke "make" "tests" make-flags)))
(add-after 'install 'install-documentation
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(define-public libzip
(package
(name "libzip")
- (version "1.3.2")
+ (version "1.5.1")
(source (origin
(method url-fetch)
(uri (string-append
"https://libzip.org/download/" name "-" version ".tar.xz"))
(sha256
(base32
- "11g1hvm2bxa2v5plakfzcwyk5hb5fz4kgrkp38l0xhnv21888xv2"))))
+ "0wnkkvkq90wyawj9221i77sf3nix1vj3ygzdy59k8yvcjnv3bsh4"))))
(native-inputs
`(("perl" ,perl)))
(inputs
`(("zlib" ,zlib)))
- (build-system gnu-build-system)
+ (build-system cmake-build-system)
(home-page "https://libzip.org")
(synopsis "C library for reading, creating, and modifying zip archives")
(description "Libzip is a C library for reading, creating, and modifying
(define-public innoextract
(package
(name "innoextract")
- (version "1.6")
+ (version "1.7")
(source
(origin
(method url-fetch)
version ".tar.gz"))
(sha256
(base32
- "08sp5vbfjvq1irhhraqkn5m2x1z209r4axhx7laf1adcw30ccapi"))
+ "0khwi9f0q0h6xfbixrrc1rfpgj0b7ajwilq7yhmxnn5lpc807f6x"))
(file-name (string-append name "-" version ".tar.gz"))))
(build-system cmake-build-system)
(arguments
(define-public google-brotli
(package
(name "google-brotli")
- (version "1.0.2")
+ (version "1.0.4")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/google/brotli/archive/v"
version ".tar.gz"))
(sha256
(base32
- "08kl9gww2058p1p7j9xqmcmrabcfihhj3fq984d7fi3bchb2mky2"))))
+ "1hrpmz162k4x3xm6vmbpm443jlfr1kp536p8962y2dncy7gs6s12"))))
(build-system cmake-build-system)
(arguments
`(#:phases
The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
(license license:expat)))
+
+(define-public ucl
+ (package
+ (name "ucl")
+ (version "1.03")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.oberhumer.com/opensource/"
+ name "/download/" name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq"))))
+ (build-system gnu-build-system)
+ (home-page "http://www.oberhumer.com/opensource/ucl/")
+ (synopsis "Portable lossless data compression library")
+ (description "UCL implements a number of compression algorithms that
+achieve an excellent compression ratio while allowing fast decompression.
+Decompression requires no additional memory.
+
+Compared to LZO, the UCL algorithms achieve a better compression ratio but
+decompression is a little bit slower.")
+ (license license:gpl2+)))
+
+(define-public upx
+ (package
+ (name "upx")
+ (version "3.94")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/upx/upx/releases/download/v"
+ version "/" name "-" version "-src.tar.xz"))
+ (sha256
+ (base32
+ "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1"))
+ (patches (search-patches "upx-fix-CVE-2017-15056.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs `(("perl" ,perl)
+ ("ucl" ,ucl)))
+ (inputs `(("zlib" ,zlib)))
+ (arguments
+ `(#:make-flags
+ (list "all"
+ ;; CHECK_WHITESPACE does not seem to work.
+ ;; See https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/upx.
+ "CHECK_WHITESPACE=true")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'check)
+ (delete 'install)
+ (add-before 'build 'patch-exec-bin-sh
+ (lambda _
+ (substitute* (find-files "Makefile")
+ (("/bin/sh") (which "sh")))
+ (substitute* "src/Makefile"
+ (("/bin/sh") (which "sh")))
+ #t))
+ (add-after 'build 'install-upx
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "src/upx.out" (string-append bin "/upx")))
+ #t))
+ )))
+ (home-page "https://upx.github.io/")
+ ;; CVE-2017-16869 is about Mach-O files which is not of a big concern for Guix.
+ ;; See https://github.com/upx/upx/issues/146 and
+ ;; https://nvd.nist.gov/vuln/detail?vulnId=CVE-2017-16869.
+ ;; The issue will be fixed after version 3.94.
+ (properties `((lint-hidden-cve . ("CVE-2017-16869"))))
+ (synopsis "Compression tool for executables")
+ (description
+ "The Ultimate Packer for eXecutables (UPX) is an executable file
+compressor. UPX typically reduces the file size of programs and shared
+libraries by around 50%--70%, thus reducing disk space, network load times,
+download times, and other distribution and storage costs.")
+ (license license:gpl2+)))