forked from pool/apache-commons-compress
Accepting request 963731 from Java:packages
Remove dependency on asm3 OBS-URL: https://build.opensuse.org/request/show/963731 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache-commons-compress?expand=0&rev=5
This commit is contained in:
commit
3e50cab586
54
0003-Remove-Pack200-compressor.patch
Normal file
54
0003-Remove-Pack200-compressor.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 9937297a90b43a5e1238932eb8a07c44303056ed Mon Sep 17 00:00:00 2001
|
||||
From: Marian Koncek <mkoncek@redhat.com>
|
||||
Date: Fri, 6 Aug 2021 13:42:40 +0200
|
||||
Subject: [PATCH] Remove Pack200 compressor
|
||||
|
||||
---
|
||||
.../compress/compressors/CompressorStreamFactory.java | 10 ++--------
|
||||
1 file changed, 2 insertions(+), 8 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 eee7c31..de7da23 100644
|
||||
--- a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
|
||||
+++ b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
|
||||
@@ -45,8 +45,6 @@ import org.apache.commons.compress.compressors.lz4.FramedLZ4CompressorOutputStre
|
||||
import org.apache.commons.compress.compressors.lzma.LZMACompressorInputStream;
|
||||
import org.apache.commons.compress.compressors.lzma.LZMACompressorOutputStream;
|
||||
import org.apache.commons.compress.compressors.lzma.LZMAUtils;
|
||||
-import org.apache.commons.compress.compressors.pack200.Pack200CompressorInputStream;
|
||||
-import org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream;
|
||||
import org.apache.commons.compress.compressors.snappy.FramedSnappyCompressorInputStream;
|
||||
import org.apache.commons.compress.compressors.snappy.FramedSnappyCompressorOutputStream;
|
||||
import org.apache.commons.compress.compressors.snappy.SnappyCompressorInputStream;
|
||||
@@ -478,10 +476,6 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
|
||||
return GZIP;
|
||||
}
|
||||
|
||||
- if (Pack200CompressorInputStream.matches(signature, signatureLength)) {
|
||||
- return PACK200;
|
||||
- }
|
||||
-
|
||||
if (FramedSnappyCompressorInputStream.matches(signature, signatureLength)) {
|
||||
return SNAPPY_FRAMED;
|
||||
}
|
||||
@@ -592,7 +586,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
|
||||
}
|
||||
|
||||
if (PACK200.equalsIgnoreCase(name)) {
|
||||
- return new Pack200CompressorInputStream(in);
|
||||
+ throw new CompressorException("Pack200 compression is not available in this build.");
|
||||
}
|
||||
|
||||
if (SNAPPY_RAW.equalsIgnoreCase(name)) {
|
||||
@@ -673,7 +667,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
|
||||
}
|
||||
|
||||
if (PACK200.equalsIgnoreCase(name)) {
|
||||
- return new Pack200CompressorOutputStream(out);
|
||||
+ throw new CompressorException("Pack200 compression is not available in this build.");
|
||||
}
|
||||
|
||||
if (LZMA.equalsIgnoreCase(name)) {
|
||||
--
|
||||
2.31.1
|
||||
|
@ -14,9 +14,8 @@
|
||||
<property name="build.dir" value="target"/>
|
||||
<property name="build.javadocDir" value="${build.dir}/site/apidocs"/>
|
||||
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||
<property name="build.srcDir.0" value="src/main/java"/>
|
||||
<property name="build.resourceDir.0" value="src/main/resources"/>
|
||||
<property name="build.resourceDir.1" value="."/>
|
||||
<property name="build.srcDir" value="src/main/java"/>
|
||||
<property name="build.resourceDir" value="src/main/resources"/>
|
||||
|
||||
<property name="commons.osgi.dynamicImport" value=""/>
|
||||
<property name="commons.osgi.excludeDependencies" value="true"/>
|
||||
@ -26,7 +25,7 @@
|
||||
<property name="commons.osgi.symbolicName" value="org.apache.commons.compress"/>
|
||||
|
||||
<property name="compiler.source" value="1.8"/>
|
||||
<property name="compiler.target" value="1.8"/>
|
||||
<property name="compiler.target" value="${compiler.source}"/>
|
||||
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
@ -65,17 +64,10 @@
|
||||
fork="false"
|
||||
source="${compiler.source}">
|
||||
<src>
|
||||
<pathelement location="${build.srcDir.0}"/>
|
||||
<pathelement location="${build.srcDir}"/>
|
||||
</src>
|
||||
<classpath refid="build.classpath"/>
|
||||
</javac>
|
||||
<mkdir dir="${build.outputDir}/META-INF"/>
|
||||
<copy todir="${build.outputDir}/META-INF">
|
||||
<fileset dir="${build.resourceDir.1}">
|
||||
<include name="NOTICE.txt"/>
|
||||
<include name="LICENSE.txt"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
@ -84,7 +76,7 @@
|
||||
|
||||
<target name="javadoc" description="Generates the Javadoc of the application">
|
||||
<mkdir dir="${build.javadocDir}"/>
|
||||
<javadoc sourcepath="${build.srcDir.0}"
|
||||
<javadoc sourcepath="${build.srcDir}"
|
||||
packagenames="*"
|
||||
destdir="${build.javadocDir}"
|
||||
access="protected"
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 21 08:57:33 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Added patch:
|
||||
* 0003-Remove-Pack200-compressor.patch
|
||||
+ Remove support for pack200 which depends on old asm3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 20 07:17:33 UTC 2021 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -30,9 +30,9 @@ Source1: http://archive.apache.org/dist/commons/compress/source/%{short_n
|
||||
Source2: %{name}-build.xml
|
||||
Patch0: 0001-Remove-Brotli-compressor.patch
|
||||
Patch1: 0002-Remove-ZSTD-compressor.patch
|
||||
Patch2: fix_java_8_compatibility.patch
|
||||
Patch2: 0003-Remove-Pack200-compressor.patch
|
||||
Patch3: fix_java_8_compatibility.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: asm3
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-local
|
||||
@ -71,8 +71,18 @@ rm -r src/{main,test}/java/org/apache/commons/compress/compressors/brotli
|
||||
rm -r src/{main,test}/java/org/apache/commons/compress/compressors/zstandard
|
||||
rm src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCase.java
|
||||
|
||||
# Restore Java 8 compatibility
|
||||
# Remove support for pack200 which depends on ancient asm:asm:3.2
|
||||
%patch2 -p1
|
||||
%pom_remove_dep asm:asm
|
||||
rm -r src/{main,test}/java/org/apache/commons/compress/harmony
|
||||
rm -r src/main/java/org/apache/commons/compress/compressors/pack200
|
||||
rm src/main/java/org/apache/commons/compress/java/util/jar/Pack200.java
|
||||
rm src/test/java/org/apache/commons/compress/compressors/Pack200TestCase.java
|
||||
rm -r src/test/java/org/apache/commons/compress/compressors/pack200
|
||||
rm src/test/java/org/apache/commons/compress/java/util/jar/Pack200Test.java
|
||||
|
||||
# Restore Java 8 compatibility
|
||||
%patch3 -p1
|
||||
|
||||
# NPE with jdk10
|
||||
%pom_remove_plugin :maven-javadoc-plugin
|
||||
@ -84,7 +94,7 @@ rm src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCas
|
||||
|
||||
%build
|
||||
mkdir -p lib
|
||||
build-jar-repository -s lib xz-java asm3
|
||||
build-jar-repository -s lib xz-java
|
||||
%{ant} package javadoc
|
||||
|
||||
%install
|
||||
|
Loading…
Reference in New Issue
Block a user