Update to upstream version 1.16.1

This commit is contained in:
Michael Simacek 2018-02-12 11:02:38 +01:00
parent c0b673f177
commit 31cd177a01
5 changed files with 91 additions and 22 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ commons-compress-1.0-src.tar.gz
/commons-compress-1.13-src.tar.gz
/commons-compress-1.14-src.tar.gz
/commons-compress-1.15-src.tar.gz
/commons-compress-1.16.1-src.tar.gz

View File

@ -1,14 +1,14 @@
From 93736372a66cc6d35c2b848fd710b39b40293f0d Mon Sep 17 00:00:00 2001
From: Roman Vais <rvais@redhat.com>
Date: Wed, 14 Jun 2017 14:00:28 +0200
Subject: [PATCH] Remove Brotli compressor
From bba585e9e4fdfc67de3b53b58b8d60923e1ccd0c Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Mon, 12 Feb 2018 10:53:48 +0100
Subject: [PATCH 1/2] Remove Brotli compressor
---
.../commons/compress/compressors/CompressorStreamFactory.java | 9 ---------
1 file changed, 9 deletions(-)
.../commons/compress/compressors/CompressorStreamFactory.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
index 4bd22aa..238257d 100644
index d730b9d..ab178a9 100644
--- a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
+++ b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
@@ -31,8 +31,6 @@ import java.util.Set;
@ -20,20 +20,18 @@ index 4bd22aa..238257d 100644
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
import org.apache.commons.compress.compressors.deflate.DeflateCompressorInputStream;
@@ -540,13 +538,6 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
if (BZIP2.equalsIgnoreCase(name)) {
return new BZip2CompressorInputStream(in, actualDecompressConcatenated);
@@ -586,10 +584,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
}
-
- if (BROTLI.equalsIgnoreCase(name)) {
if (BROTLI.equalsIgnoreCase(name)) {
- if (!BrotliUtils.isBrotliCompressionAvailable()) {
- throw new CompressorException("Brotli compression is not available.");
- throw new CompressorException("Brotli compression is not available." + YOU_NEED_BROTLI_DEC);
- }
- return new BrotliCompressorInputStream(in);
- }
+ throw new CompressorException("Brotli compression is not available in this build.");
}
if (XZ.equalsIgnoreCase(name)) {
if (!XZUtils.isXZCompressionAvailable()) {
--
2.7.4
2.14.3

View File

@ -0,0 +1,58 @@
From bab91e014f73296a8ac9a3aef2aaa324a85e9b96 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Mon, 12 Feb 2018 10:59:55 +0100
Subject: [PATCH 2/2] Remove ZSTD compressor
---
.../compress/compressors/CompressorStreamFactory.java | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
index ab178a9..3817704 100644
--- a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
+++ b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
@@ -54,9 +54,6 @@ import org.apache.commons.compress.compressors.xz.XZCompressorInputStream;
import org.apache.commons.compress.compressors.xz.XZCompressorOutputStream;
import org.apache.commons.compress.compressors.xz.XZUtils;
import org.apache.commons.compress.compressors.z.ZCompressorInputStream;
-import org.apache.commons.compress.compressors.zstandard.ZstdCompressorInputStream;
-import org.apache.commons.compress.compressors.zstandard.ZstdCompressorOutputStream;
-import org.apache.commons.compress.compressors.zstandard.ZstdUtils;
import org.apache.commons.compress.utils.IOUtils;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.compress.utils.ServiceLoaderIterator;
@@ -516,10 +513,6 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
return LZ4_FRAMED;
}
- if (ZstdUtils.matches(signature, signatureLength)) {
- return ZSTANDARD;
- }
-
throw new CompressorException("No Compressor found for the stream signature.");
}
/**
@@ -595,10 +588,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
}
if (ZSTANDARD.equalsIgnoreCase(name)) {
- if (!ZstdUtils.isZstdCompressionAvailable()) {
- throw new CompressorException("Zstandard compression is not available." + YOU_NEED_ZSTD_JNI);
- }
- return new ZstdCompressorInputStream(in);
+ throw new CompressorException("Zstandard compression is not available in this build.");
}
if (LZMA.equalsIgnoreCase(name)) {
@@ -714,7 +704,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
}
if (ZSTANDARD.equalsIgnoreCase(name)) {
- return new ZstdCompressorOutputStream(out);
+ throw new CompressorException("Zstandard compression is not available in this build.");
}
} catch (final IOException e) {
throw new CompressorException("Could not create CompressorOutputStream", e);
--
2.14.3

View File

@ -2,8 +2,8 @@
%global short_name commons-%{base_name}
Name: apache-%{short_name}
Version: 1.15
Release: 2%{?dist}
Version: 1.16.1
Release: 1%{?dist}
Summary: Java API for working with compressed files and archivers
License: ASL 2.0
URL: http://commons.apache.org/proper/commons-compress/
@ -11,12 +11,15 @@ BuildArch: noarch
Source0: http://archive.apache.org/dist/commons/compress/source/%{short_name}-%{version}-src.tar.gz
Patch0: 0001-Remove-Brotli-compressor.patch
Patch0: 0001-Remove-Brotli-compressor.patch
Patch1: 0002-Remove-ZSTD-compressor.patch
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.objenesis:objenesis)
BuildRequires: mvn(org.powermock:powermock-api-mockito)
BuildRequires: mvn(org.powermock:powermock-module-junit4)
BuildRequires: mvn(org.tukaani:xz)
@ -35,11 +38,17 @@ This package provides %{summary}.
%prep
%setup -q -n %{short_name}-%{version}-src
# Unavailable Google Brotli library (org.brotli.dec)
%patch0 -p1
%pom_remove_dep org.brotli:dec
rm -r src/{main,test}/java/org/apache/commons/compress/compressors/brotli
rm -r src/main/java/org/apache/commons/compress/compressors/brotli
rm -r src/test/java/org/apache/commons/compress/compressors/brotli
# Unavailable ZSTD JNI library
%patch1 -p1
%pom_remove_dep :zstd-jni
rm -r src/{main,test}/java/org/apache/commons/compress/compressors/zstandard
rm src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCase.java
%build
%mvn_file : %{short_name} %{name}
@ -56,6 +65,9 @@ rm -r src/test/java/org/apache/commons/compress/compressors/brotli
%doc LICENSE.txt NOTICE.txt
%changelog
* Mon Feb 12 2018 Michael Simacek <msimacek@redhat.com> - 1.16.1-1
- Update to upstream version 1.16.1
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (commons-compress-1.15-src.tar.gz) = 9459e47ed0cc1c80e5de3fa90db43cb0a45c935f00d2911bc42c40a017e14e382828a36d9730f5c3a8f6f971f817120a51f8d1b3550b7e2c5a843c73b68b64fc
SHA512 (commons-compress-1.16.1-src.tar.gz) = e2205b04e099c34da7e182f2b7ec66c3e05cf144018f5a4774bf61aef268286cd6ed6b7b1987090d7a046c61a77387de69b23562cda5cf1888a42b606f4f6661