From a62764bdbbc3a2bdb50047f861261bcbfd0abd77 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 2 Jul 2018 20:09:50 +0200 Subject: gnu: zstd: Update to 1.3.5. * gnu/packages/compression.scm (zstd): Update to 1.3.5. [source]: Add two patches to make the test suite pass. * gnu/packages/patches/zstd-fix-stdin-list-without-tty.patch, gnu/packages/patches/zstd-fix-stdin-list-test.patch: New files. * gnu/local.mk (dist_patch_DATA): Add both. --- gnu/packages/compression.scm | 8 ++- .../patches/zstd-fix-stdin-list-test.patch | 30 ++++++++++ .../patches/zstd-fix-stdin-list-without-tty.patch | 67 ++++++++++++++++++++++ 3 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/zstd-fix-stdin-list-test.patch create mode 100644 gnu/packages/patches/zstd-fix-stdin-list-without-tty.patch (limited to 'gnu/packages') diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index de3acaedc0..2ca431b2c1 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -1649,7 +1649,7 @@ (define-public unshield (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" @@ -1657,7 +1657,11 @@ (define-public zstd (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 diff --git a/gnu/packages/patches/zstd-fix-stdin-list-test.patch b/gnu/packages/patches/zstd-fix-stdin-list-test.patch new file mode 100644 index 0000000000..a10355448c --- /dev/null +++ b/gnu/packages/patches/zstd-fix-stdin-list-test.patch @@ -0,0 +1,30 @@ +From 8e7bdc18d62632adcee029b2f8f5013d11549dd7 Mon Sep 17 00:00:00 2001 +From: "W. Felix Handte" +Date: Fri, 29 Jun 2018 16:31:22 -0400 +Subject: [PATCH] Fix Tests of `--list` Behavior with `stdin` + +--- + tests/playTests.sh | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/tests/playTests.sh b/tests/playTests.sh +index 09a7377f2..aa5535d59 100755 +--- a/tests/playTests.sh ++++ b/tests/playTests.sh +@@ -731,8 +731,14 @@ $ECHO "\n===> zstd --list/-l error detection tests " + ! $ZSTD -lv tmp1* + ! $ZSTD --list -v tmp2 tmp12.zst + +-$ECHO "\n===> zstd --list/-l exits 1 when stdin is piped in" +-! echo "piped STDIN" | $ZSTD --list ++$ECHO "\n===> zstd --list/-l errors when presented with stdin / no files" ++! $ZSTD -l ++! $ZSTD -l - ++! $ZSTD -l < tmp1.zst ++! $ZSTD -l - < tmp1.zst ++! $ZSTD -l - tmp1.zst ++! $ZSTD -l - tmp1.zst < tmp1.zst ++$ZSTD -l tmp1.zst < tmp1.zst # but doesn't error just because stdin is not a tty + + $ECHO "\n===> zstd --list/-l test with null files " + ./datagen -g0 > tmp5 diff --git a/gnu/packages/patches/zstd-fix-stdin-list-without-tty.patch b/gnu/packages/patches/zstd-fix-stdin-list-without-tty.patch new file mode 100644 index 0000000000..47fa3e59a7 --- /dev/null +++ b/gnu/packages/patches/zstd-fix-stdin-list-without-tty.patch @@ -0,0 +1,67 @@ +From 712a9fd9721c314f4b0238577d803b012845f6d2 Mon Sep 17 00:00:00 2001 +From: "W. Felix Handte" +Date: Fri, 29 Jun 2018 15:33:44 -0400 +Subject: [PATCH] Allow Invoking `zstd --list` When `stdin` is not a `tty` + +Also now returns an error when no inputs are given. + +New proposed behavior: + +``` +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l; echo $? +No files given +1 +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l Makefile.zst; echo $? +Frames Skips Compressed Uncompressed Ratio Check Filename + 1 0 3.08 KB 10.92 KB 3.544 XXH64 Makefile.zst +0 +felix@odin:~/prog/zstd (list-stdin-check)$ ./zstd -l