latest upstream (1.1.1)

This commit is contained in:
Pádraig Brady 2016-11-02 12:52:36 +00:00
parent 954509f026
commit 5ec02f6c23
6 changed files with 15 additions and 114 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/zstd-1.1.0.tar.gz
/zstd-1.1.1.tar.gz

View File

@ -1,31 +0,0 @@
From ca7bbb35b0566ed0c8dfe89d86dcd4009788eca9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Thu, 6 Oct 2016 15:13:10 +0100
Subject: [PATCH] pzstd: fix test failure on headless build
If I/O is not connected to a terminal
(like in a package build system for example),
a portion of the test expected to fail would pass.
This adjusts the test to not depend on the failure.
---
contrib/pzstd/test/OptionsTest.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/pzstd/test/OptionsTest.cpp b/contrib/pzstd/test/OptionsTest.cpp
index e7d4b2b..b624225 100644
--- a/contrib/pzstd/test/OptionsTest.cpp
+++ b/contrib/pzstd/test/OptionsTest.cpp
@@ -183,7 +183,9 @@ TEST(Options, GetOutputFile) {
{
Options options;
auto args = makeArray("-o-");
- EXPECT_FAILURE(options.parse(args.size(), args.data()));
+ /* This may pass or fail depending on whether std{in,out}
+ are connected to a tty */
+ options.parse(args.size(), args.data());
EXPECT_EQ("-", options.getOutputFile(options.inputFiles[0]));
}
{
--
2.5.5

View File

@ -1,6 +1,7 @@
--- zstd-1.1.0.orig/programs/zstd.1 2016-09-27 22:15:03.000000000 +0000
+++ zstd-1.1.0.new/programs/zstd.1 2016-10-06 12:25:28.912681891 +0000
@@ -94,6 +94,13 @@
diff -Naur zstd-1.1.1.orig/programs/zstd.1 zstd-1.1.1/programs/zstd.1
--- zstd-1.1.1.orig/programs/zstd.1 2016-11-01 18:13:22.000000000 +0000
+++ zstd-1.1.1/programs/zstd.1 2016-11-02 13:01:39.964648652 +0000
@@ -219,6 +219,13 @@
All arguments after -- are treated as files
@ -11,6 +12,6 @@
+ number of threads to use for (de)compression (default:4)
+
+
.SH DICTIONARY
.SH DICTIONARY BUILDER
.PP
\fBzstd\fR offers \fIdictionary\fR compression, useful for very small files and messages.

View File

@ -1 +1 @@
64fc5efcd1ca60a3cd74a3ccaf25006e zstd-1.1.0.tar.gz
487cfdc41d7afebb565c171bf3df27a2 zstd-1.1.1.tar.gz

View File

@ -1,73 +1,3 @@
diff -Naur zstd-1.1.0.orig/contrib/pzstd/Makefile zstd-1.1.0.new/contrib/pzstd/Makefile
--- zstd-1.1.0.orig/contrib/pzstd/Makefile 2016-09-27 22:15:03.000000000 +0000
+++ zstd-1.1.0.new/contrib/pzstd/Makefile 2016-10-06 11:01:38.436955726 +0000
@@ -37,9 +37,8 @@
all: pzstd
-libzstd.a: $(ZSTD_FILES)
+$(ZSTDDIR)/libzstd.a: $(ZSTD_FILES)
$(MAKE) -C $(ZSTDDIR) libzstd
- @cp $(ZSTDDIR)/libzstd.a .
Pzstd.o: Pzstd.h Pzstd.cpp ErrorHolder.h utils/*.h
$(CXX) $(FLAGS) -c Pzstd.cpp -o $@
@@ -53,12 +52,11 @@
main.o: main.cpp *.h utils/*.h
$(CXX) $(FLAGS) -c main.cpp -o $@
-pzstd: Pzstd.o SkippableFrame.o Options.o main.o libzstd.a
+pzstd: Pzstd.o SkippableFrame.o Options.o main.o $(ZSTDDIR)/libzstd.a
$(CXX) $(FLAGS) $^ -o $@$(EXT) -lpthread
-libzstd32.a: $(ZSTD_FILES)
+$(ZSTDDIR)/libzstd32.a: $(ZSTD_FILES)
$(MAKE) -C $(ZSTDDIR) libzstd MOREFLAGS="-m32"
- @cp $(ZSTDDIR)/libzstd.a libzstd32.a
Pzstd32.o: Pzstd.h Pzstd.cpp ErrorHolder.h utils/*.h
$(CXX) -m32 $(FLAGS) -c Pzstd.cpp -o $@
@@ -94,7 +92,7 @@
cd googletest/build && cmake -G "MSYS Makefiles" .. && $(MAKE)
test:
- $(MAKE) libzstd.a
+ $(MAKE) $(ZSTDDIR)/libzstd.a
$(MAKE) pzstd MOREFLAGS="-Wall -Wextra -pedantic -Werror"
$(MAKE) -C utils/test clean
$(MAKE) -C utils/test test MOREFLAGS="-Wall -Wextra -pedantic -Werror"
@@ -102,7 +100,7 @@
$(MAKE) -C test test MOREFLAGS="-Wall -Wextra -pedantic -Werror"
test32:
- $(MAKE) libzstd.a MOREFLAGS="-m32"
+ $(MAKE) $(ZSTDDIR)/libzstd.a MOREFLAGS="-m32"
$(MAKE) pzstd MOREFLAGS="-m32 -Wall -Wextra -pedantic -Werror"
$(MAKE) -C utils/test clean
$(MAKE) -C utils/test test MOREFLAGS="-m32 -Wall -Wextra -pedantic -Werror"
@@ -114,5 +112,5 @@
$(MAKE) -C $(ZSTDDIR) clean
$(MAKE) -C utils/test clean
$(MAKE) -C test clean
- @$(RM) -rf libzstd.a *.o pzstd$(EXT) pzstd32$(EXT)
+ @$(RM) -rf $(ZSTDDIR)/libzstd.a *.o pzstd$(EXT) pzstd32$(EXT)
@echo Cleaning completed
diff -Naur zstd-1.1.0.orig/contrib/pzstd/test/Makefile zstd-1.1.0.new/contrib/pzstd/test/Makefile
--- zstd-1.1.0.orig/contrib/pzstd/test/Makefile 2016-09-27 22:15:03.000000000 +0000
+++ zstd-1.1.0.new/contrib/pzstd/test/Makefile 2016-10-06 12:46:21.768547487 +0000
@@ -30,10 +30,10 @@
FLAGS = $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
datagen.o: $(PROGDIR)/datagen.*
- $(CC) $(CPPFLAGS) -O3 $(MOREFLAGS) $(LDFLAGS) -Wno-long-long -Wno-variadic-macros $(PROGDIR)/datagen.c -c -o $@
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(MOREFLAGS) $(LDFLAGS) -Wno-long-long -Wno-variadic-macros $(PROGDIR)/datagen.c -c -o $@
%: %.cpp *.h datagen.o
- $(CXX) $(FLAGS) $@.cpp datagen.o $(PZSTDDIR)/Pzstd.o $(PZSTDDIR)/SkippableFrame.o $(PZSTDDIR)/Options.o $(PZSTDDIR)/libzstd.a -o $@$(EXT) $(GTEST_FLAGS) -lgtest -lgtest_main -lpthread
+ $(CXX) $(FLAGS) $@.cpp datagen.o $(PZSTDDIR)/Pzstd.o $(PZSTDDIR)/SkippableFrame.o $(PZSTDDIR)/Options.o $(ZSTDDIR)/libzstd.a -o $@$(EXT) $(GTEST_FLAGS) -lgtest -lgtest_main -lpthread
.PHONY: test clean
diff -Naur zstd-1.1.0.orig/lib/Makefile zstd-1.1.0.new/lib/Makefile
--- zstd-1.1.0.orig/lib/Makefile 2016-09-27 22:15:03.000000000 +0000
+++ zstd-1.1.0.new/lib/Makefile 2016-10-06 10:56:25.612493000 +0000

View File

@ -8,8 +8,8 @@
%endif
Name: zstd
Version: 1.1.0
Release: 2%{?dist}
Version: 1.1.1
Release: 1%{?dist}
Summary: Zstd compression library
License: BSD and MIT
@ -20,9 +20,6 @@ Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{n
Patch0: zstd-lib-no-rebuild.patch
Patch1: pzstd.1.patch
# https://github.com/facebook/zstd/pull/406
Patch2: pzstd-test-headless.patch
BuildRequires: gcc gtest-devel
%description
@ -50,7 +47,6 @@ find -name .gitignore -delete
%if 0%{?with_pzstd}
%patch1 -p1
%endif
%patch2 -p1
%build
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
@ -58,14 +54,14 @@ for dir in lib programs; do
CFLAGS="%{optflags}" %make_build -C "$dir"
done
%if 0%{?with_pzstd}
CXXFLAGS="%{optflags}" %make_build -C 'contrib/pzstd'
CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" %make_build -C 'contrib/pzstd'
%endif
%check
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
CFLAGS="%{optflags}" make -C tests test-zstd
%if 0%{?with_pzstd}
CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" make -C contrib/pzstd test
CFLAGS="%{optflags}" CXXFLAGS="%{optflags} -std=c++11" make -C contrib/pzstd test
%endif
%install
@ -98,6 +94,7 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1
%{_includedir}/zbuff.h
%{_includedir}/zdict.h
%{_includedir}/zstd.h
%{_includedir}/zstd_errors.h
%{_libdir}/pkgconfig/libzstd.pc
%{_libdir}/libzstd.so
@ -105,6 +102,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}/%{_mandir}/man1/p%{name}.1
%postun -n lib%{name} -p /sbin/ldconfig
%changelog
* Wed Nov 02 2016 Pádraig Brady <pbrady@redhat.com> - 1.1.1-1
- Latest upstream
* Thu Oct 6 2016 Pádraig Brady <pbrady@fb.com> 1.1.0-2
- Add pzstd(1)