summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2017-01-25 00:22:19 -0500
committerLeo Famulari <leo@famulari.name>2017-04-08 15:36:53 -0400
commitb496bfea415750d710dd3ead4bc2ded9d4a6e71d (patch)
tree91dd74c8bd860575881a64196b7e65dbfd6fcf91
parentb0eb2af2e6ccb1026b322db7240d40251cfca88d (diff)
gnu: lz4: Update to 1.7.5.
* gnu/packages/compression.scm (lz4): Update to 1.7.5. [source]: Update source URL. Use patch 'lz4-fix-test-failures.patch'. [home-page]: Update URL. * gnu/packages/patches/lz4-fix-test-failures.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/compression.scm12
-rw-r--r--gnu/packages/patches/lz4-fix-test-failures.patch136
3 files changed, 144 insertions, 5 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 93bafa282d..ac6a596923 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -759,6 +759,7 @@ dist_patch_DATA = \
%D%/packages/patches/luit-posix.patch \
%D%/packages/patches/lvm2-static-link.patch \
%D%/packages/patches/lxsession-use-gapplication.patch \
+ %D%/packages/patches/lz4-fix-test-failures.patch \
%D%/packages/patches/make-impure-dirs.patch \
%D%/packages/patches/mars-install.patch \
%D%/packages/patches/mars-sfml-2.3.patch \
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 5404f66ecf..4793755c21 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -5,7 +5,7 @@
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
@@ -673,14 +673,16 @@ writing of compressed data created with the zlib and bzip2 libraries.")
(define-public lz4
(package
(name "lz4")
- (version "1.7.4.2")
+ (version "1.7.5")
(source
(origin
(method url-fetch)
- (uri (string-append "https://github.com/Cyan4973/lz4/archive/"
+ (uri (string-append "https://github.com/lz4/lz4/archive/"
"v" version ".tar.gz"))
+ (patches (search-patches "lz4-fix-test-failures.patch"))
(sha256
- (base32 "0l39bymif15rmmfz7h6wvrr853rix4wj8wbqq8z8fm49xa7gx9fb"))
+ (base32
+ "0zkykqqjfa1q3ji0qmb1ml3l9063qqfh99agyj3cnb02cg6wm401"))
(file-name (string-append name "-" version ".tar.gz"))))
(build-system gnu-build-system)
(native-inputs `(("valgrind" ,valgrind))) ; for tests
@@ -691,7 +693,7 @@ writing of compressed data created with the zlib and bzip2 libraries.")
(string-append "PREFIX=" (assoc-ref %outputs "out")))
#:phases (modify-phases %standard-phases
(delete 'configure)))) ; no configure script
- (home-page "https://github.com/Cyan4973/lz4")
+ (home-page "https://github.com/lz4/lz4")
(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
diff --git a/gnu/packages/patches/lz4-fix-test-failures.patch b/gnu/packages/patches/lz4-fix-test-failures.patch
new file mode 100644
index 0000000000..d38357d402
--- /dev/null
+++ b/gnu/packages/patches/lz4-fix-test-failures.patch
@@ -0,0 +1,136 @@
+These two patches fix some bugs in lz4's test suite:
+
+https://github.com/lz4/lz4/issues/308
+
+Patches copied from upstream source repository:
+
+https://github.com/lz4/lz4/commit/b89cac7b2e92b792af98bb0a12e4d14684d07629
+https://github.com/lz4/lz4/commit/0dfb0b9dad2a8cb7cc347d2139bf9b84de7e1481
+
+From b89cac7b2e92b792af98bb0a12e4d14684d07629 Mon Sep 17 00:00:00 2001
+From: Eric Siegerman <pub08-git@davor.org>
+Date: Tue, 14 Feb 2017 14:17:06 -0500
+Subject: [PATCH] Don't use "foo && false || true"
+
+Replace it with either:
+ test ! -f $FILE_THAT_SHOULD_NOT_EXIST
+or:
+ ! $COMMAND_THAT_SHOULD_FAIL
+
+as appropriate.
+---
+ tests/Makefile | 38 +++++++++++++++++++-------------------
+ 1 file changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 77e6ae7..ebab278 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -236,17 +236,17 @@ test-lz4-basic: lz4 datagen unlz4 lz4cat
+ ./datagen -g256MB | $(LZ4) -vqB4D | $(LZ4) -t
+ @echo "hello world" > tmp
+ $(LZ4) --rm -f tmp
+- ls -ls tmp && false || true # must fail (--rm)
+- ls -ls tmp.lz4
+- $(PRGDIR)/lz4cat tmp.lz4 # must display hello world
+- ls -ls tmp.lz4
++ test ! -f tmp # must fail (--rm)
++ test -f tmp.lz4
++ $(PRGDIR)/lz4cat tmp.lz4 # must display hello world
++ test -f tmp.lz4
+ $(PRGDIR)/unlz4 --rm tmp.lz4
+- ls -ls tmp
+- ls -ls tmp.lz4 && false || true # must fail (--rm)
+- ls -ls tmp.lz4.lz4 && false || true # must fail (unlz4)
+- $(PRGDIR)/lz4cat tmp # pass-through mode
+- ls -ls tmp
+- ls -ls tmp.lz4 && false || true # must fail (lz4cat)
++ test -f tmp
++ test ! -f tmp.lz4 # must fail (--rm)
++ test ! -f tmp.lz4.lz4 # must fail (unlz4)
++ $(PRGDIR)/lz4cat tmp # pass-through mode
++ test -f tmp
++ test ! -f tmp.lz4 # must fail (lz4cat)
+ $(LZ4) tmp # creates tmp.lz4
+ $(PRGDIR)/lz4cat < tmp.lz4 > tmp3 # checks lz4cat works with stdin (#285)
+ $(DIFF) -q tmp tmp3
+@@ -262,22 +262,22 @@ test-lz4-hugefile: lz4 datagen
+
+ test-lz4-testmode: lz4 datagen
+ @echo "\n ---- bench mode ----"
+- $(LZ4) -bi1
++ $(LZ4) -bi1
+ @echo "\n ---- test mode ----"
+- ./datagen | $(LZ4) -t && false || true
+- ./datagen | $(LZ4) -tf && false || true
++ ! ./datagen | $(LZ4) -t
++ ! ./datagen | $(LZ4) -tf
+ @echo "\n ---- pass-through mode ----"
+- ./datagen | $(LZ4) -d > $(VOID) && false || true
+- ./datagen | $(LZ4) -df > $(VOID)
++ ! ./datagen | $(LZ4) -d > $(VOID)
++ ./datagen | $(LZ4) -df > $(VOID)
+ @echo "Hello World !" > tmp1
+ $(LZ4) -dcf tmp1
+ @echo "from underground..." > tmp2
+ $(LZ4) -dcfm tmp1 tmp2
+ @echo "\n ---- test cli ----"
+- $(LZ4) file-does-not-exist && false || true
+- $(LZ4) -f file-does-not-exist && false || true
+- $(LZ4) -fm file1-dne file2-dne && false || true
+- $(LZ4) -fm file1-dne file2-dne && false || true
++ ! $(LZ4) file-does-not-exist
++ ! $(LZ4) -f file-does-not-exist
++ ! $(LZ4) -fm file1-dne file2-dne
++ ! $(LZ4) -fm file1-dne file2-dne
+
+ test-lz4-opt-parser: lz4 datagen
+ @echo "\n ---- test opt-parser ----"
+--
+2.12.2
+
+From 0dfb0b9dad2a8cb7cc347d2139bf9b84de7e1481 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Sun, 5 Mar 2017 23:20:10 +0000
+Subject: [PATCH] Fix test-lz4-basic
+
+When no output filename is specified and stdout is not a terminal,
+lz4 doesn't attempt to guess an output filename and uses stdout for
+output.
+
+This change fixes test-lz4-basic when run without a terminal
+by specifying output filenames.
+---
+ tests/Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/Makefile b/tests/Makefile
+index ebab278..d68c700 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -235,19 +235,19 @@ test-lz4-basic: lz4 datagen unlz4 lz4cat
+ ./datagen -g33M | $(LZ4) --no-frame-crc | $(LZ4) -t
+ ./datagen -g256MB | $(LZ4) -vqB4D | $(LZ4) -t
+ @echo "hello world" > tmp
+- $(LZ4) --rm -f tmp
++ $(LZ4) --rm -f tmp tmp.lz4
+ test ! -f tmp # must fail (--rm)
+ test -f tmp.lz4
+ $(PRGDIR)/lz4cat tmp.lz4 # must display hello world
+ test -f tmp.lz4
+- $(PRGDIR)/unlz4 --rm tmp.lz4
++ $(PRGDIR)/unlz4 --rm tmp.lz4 tmp
+ test -f tmp
+ test ! -f tmp.lz4 # must fail (--rm)
+ test ! -f tmp.lz4.lz4 # must fail (unlz4)
+ $(PRGDIR)/lz4cat tmp # pass-through mode
+ test -f tmp
+ test ! -f tmp.lz4 # must fail (lz4cat)
+- $(LZ4) tmp # creates tmp.lz4
++ $(LZ4) tmp tmp.lz4 # creates tmp.lz4
+ $(PRGDIR)/lz4cat < tmp.lz4 > tmp3 # checks lz4cat works with stdin (#285)
+ $(DIFF) -q tmp tmp3
+ $(PRGDIR)/lz4cat < tmp > tmp2 # checks lz4cat works with stdin (#285)
+--
+2.12.2
+