1
0

Accepting request 1109291 from Java:packages

4.8.0

OBS-URL: https://build.opensuse.org/request/show/1109291
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/plexus-archiver?expand=0&rev=4
This commit is contained in:
Ana Guerrero 2023-09-06 17:00:09 +00:00 committed by Git OBS Bridge
commit 2f70575efd
8 changed files with 219 additions and 187 deletions

View File

@ -12,44 +12,44 @@ diff --git a/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java b/s
index 398ecf1..0d46cfc 100644
--- a/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
+++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
@@ -38,7 +38,6 @@
@@ -42,7 +42,6 @@
import org.codehaus.plexus.components.io.resources.PlexusIoResource;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
-import org.iq80.snappy.SnappyOutputStream;
import static org.codehaus.plexus.archiver.util.Streams.bufferedOutputStream;
/**
@@ -489,7 +488,7 @@ else if ( TarCompressionMethod.bzip2.equals( tarCompressionMethod ) )
}
else if ( TarCompressionMethod.snappy.equals( tarCompressionMethod ) )
{
- return new SnappyOutputStream( bufferedOutputStream( ostream ) );
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not upport snappy compression" );
}
else if ( TarCompressionMethod.xz.equals( tarCompressionMethod ) )
{
@@ -426,7 +425,7 @@ else if ( TarCompressionMethod.bzip2.equals( tarCompressionMethod ) )
} else if (TarCompressionMethod.bzip2.equals(tarCompressionMethod)) {
return new BZip2CompressorOutputStream(bufferedOutputStream(ostream));
} else if (TarCompressionMethod.snappy.equals(tarCompressionMethod)) {
- return new SnappyOutputStream(bufferedOutputStream(ostream));
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support snappy compression" );
} else if (TarCompressionMethod.xz.equals(tarCompressionMethod)) {
return new XZCompressorOutputStream(bufferedOutputStream(ostream));
} else if (TarCompressionMethod.zstd.equals(tarCompressionMethod)) {
diff --git a/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java b/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
index 4bc94a4..15f0494 100644
--- a/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
+++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
@@ -31,7 +31,6 @@
@@ -32,7 +32,6 @@
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.util.Streams;
import org.codehaus.plexus.components.io.filemappers.FileMapper;
import org.codehaus.plexus.util.IOUtil;
-import org.iq80.snappy.SnappyInputStream;
-import org.iq80.snappy.SnappyFramedInputStream;
/**
* @author <a href="mailto:evenisse@codehaus.org">Emmanuel Venisse</a>
@@ -154,7 +153,7 @@ else if ( compression == UntarCompressionMethod.BZIP2 )
}
else if ( compression == UntarCompressionMethod.SNAPPY )
{
- return new SnappyInputStream( istream, true );
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not upport snappy compression" );
}
else if ( compression == UntarCompressionMethod.XZ )
{
import static org.codehaus.plexus.archiver.util.Streams.bufferedInputStream;
import static org.codehaus.plexus.archiver.util.Streams.fileInputStream;
@@ -137,7 +136,7 @@ else if ( compression == UntarCompressionMethod.BZIP2 )
} else if (compression == UntarCompressionMethod.BZIP2) {
return new BZip2CompressorInputStream(istream);
} else if (compression == UntarCompressionMethod.SNAPPY) {
- return new SnappyFramedInputStream(istream, true);
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support snappy compression" );
} else if (compression == UntarCompressionMethod.XZ) {
return new XZCompressorInputStream(istream);
} else if (compression == UntarCompressionMethod.ZSTD) {
--
2.13.5

View File

@ -1,11 +0,0 @@
--- plexus-archiver-plexus-archiver-3.6.0/src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java 2018-05-06 14:13:22.000000000 +0200
+++ plexus-archiver-plexus-archiver-3.6.0/src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java 2019-03-08 07:35:58.658910163 +0100
@@ -31,7 +31,7 @@
throws Exception
{
super.setUp();
- getContainer().getLoggerManager().setThreshold( Logger.LEVEL_DEBUG );
+ ((org.codehaus.plexus.DefaultPlexusContainer)getContainer()).getLoggerManager().setThreshold( Logger.LEVEL_DEBUG );
}
public void testZipArchiver()

BIN
plexus-archiver-4.2.1.tar.gz (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,40 @@
diff -urEbwB plexus-archiver-4.8.0.orig/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java plexus-archiver-4.8.0/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
--- plexus-archiver-4.8.0.orig/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java 2023-09-04 18:07:46.209959586 +0200
+++ plexus-archiver-4.8.0/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java 2023-09-04 18:14:27.122780479 +0200
@@ -29,7 +29,6 @@
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
import org.apache.commons.compress.compressors.xz.XZCompressorOutputStream;
-import org.apache.commons.compress.compressors.zstandard.ZstdCompressorOutputStream;
import org.codehaus.plexus.archiver.AbstractArchiver;
import org.codehaus.plexus.archiver.ArchiveEntry;
import org.codehaus.plexus.archiver.ArchiverException;
@@ -429,7 +428,7 @@
} else if (TarCompressionMethod.xz.equals(tarCompressionMethod)) {
return new XZCompressorOutputStream(bufferedOutputStream(ostream));
} else if (TarCompressionMethod.zstd.equals(tarCompressionMethod)) {
- return new ZstdCompressorOutputStream(bufferedOutputStream(ostream));
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support zstd compression" );
}
return ostream;
diff -urEbwB plexus-archiver-4.8.0.orig/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java plexus-archiver-4.8.0/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
--- plexus-archiver-4.8.0.orig/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java 2023-09-04 18:07:46.209959586 +0200
+++ plexus-archiver-4.8.0/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java 2023-09-04 18:13:50.092519851 +0200
@@ -27,7 +27,6 @@
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
import org.apache.commons.compress.compressors.xz.XZCompressorInputStream;
-import org.apache.commons.compress.compressors.zstandard.ZstdCompressorInputStream;
import org.codehaus.plexus.archiver.AbstractUnArchiver;
import org.codehaus.plexus.archiver.ArchiverException;
import org.codehaus.plexus.archiver.util.Streams;
@@ -140,7 +139,7 @@
} else if (compression == UntarCompressionMethod.XZ) {
return new XZCompressorInputStream(istream);
} else if (compression == UntarCompressionMethod.ZSTD) {
- return new ZstdCompressorInputStream(istream);
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support zstd compression" );
}
return istream;
}

BIN
plexus-archiver-4.8.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -10,20 +10,15 @@
<property name="project.groupId" value="org.codehaus.plexus"/>
<property name="project.artifactId" value="plexus-archiver"/>
<property name="project.version" value="4.2.1"/>
<property name="project.version" value="4.8.0"/>
<property name="compiler.source" value="1.7"/>
<property name="compiler.source" value="1.8"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="src/main/java"/>
<property name="build.resourceDir" value="src/main/resources"/>
<property name="build.testOutputDir" value="${build.dir}/test-classes"/>
<property name="build.testDir" value="src/test/java"/>
<property name="build.testResourceDir" value="src/test/resources"/>
<property name="test.reports" value="${build.dir}/test-reports"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<!-- ====================================================================== -->
@ -35,11 +30,6 @@
<include name="**/*"/>
</fileset>
</path>
<path id="build.test.classpath">
<fileset dir="lib">
<include name="**/*"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
@ -70,110 +60,28 @@
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.outputDir}">
<fileset dir="${build.resourceDir}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Test-compilation target -->
<!-- Sisu javax.inject.Named generation target -->
<!-- ====================================================================== -->
<target name="compile-tests"
<target name="sisu"
depends="compile"
description="Compile the test code"
unless="test.skip">
<mkdir dir="${build.testOutputDir}"/>
<javac destdir="${build.testOutputDir}"
nowarn="false"
debug="true"
encoding="UTF-8"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.testDir}"/>
</src>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${build.outputDir}"/>
</classpath>
</javac>
<copy todir="${build.testOutputDir}">
<fileset dir="${build.testResourceDir}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Run all tests -->
<!-- ====================================================================== -->
<target name="test"
depends="compile-tests, junit-missing"
unless="junit.skipped"
description="Run the test cases">
<mkdir dir="${test.reports}"/>
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
<sysproperty key="basedir" value="."/>
<!-- Because of some test file names, the tests must run in UTF-8 environment -->
<env key="LC_ALL" value="en_US.UTF-8"/>
<env key="LANG" value="en_US.UTF-8"/>
<env key="LANGUAGE" value="en_US.UTF-8"/>
<formatter type="xml"/>
<formatter type="plain" usefile="false"/>
<classpath>
<path refid="build.test.classpath"/>
<pathelement location="${build.outputDir}"/>
<pathelement location="${build.testOutputDir}"/>
</classpath>
<batchtest todir="${test.reports}" unless="test">
<fileset dir="${build.testDir}">
<include name="**/Test*.java"/>
<include name="**/*Test.java"/>
<include name="**/*TestCase.java"/>
<exclude name="**/*Abstract*Test.java"/>
<exclude name="**/Base*ArchiverTest.java"/>
</fileset>
</batchtest>
<batchtest todir="${test.reports}" if="test">
<fileset dir="${build.testDir}">
<include name="**/${test}.java"/>
<exclude name="**/*Abstract*Test.java"/>
<exclude name="**/Base*ArchiverTest.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="test-junit-present">
<available classname="junit.framework.Test" property="junit.present" classpathref="build.test.classpath"/>
</target>
<target name="test-junit-status"
depends="test-junit-present">
<condition property="junit.missing">
<and>
<isfalse value="${junit.present}"/>
<isfalse value="${test.skip}"/>
</and>
</condition>
<condition property="junit.skipped">
<or>
<isfalse value="${junit.present}"/>
<istrue value="${test.skip}"/>
</or>
</condition>
</target>
<target name="junit-missing"
depends="test-junit-status"
if="junit.missing">
<echo>=================================== WARNING ===================================</echo>
<echo> JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.</echo>
<echo>===============================================================================</echo>
description="Generate javax.inject.Name index">
<sequential>
<java classname="org.eclipse.sisu.space.SisuIndex"
failonerror="true"
fork="true">
<classpath>
<path refid="build.classpath"/>
</classpath>
<arg value="${build.outputDir}"/>
</java>
<move todir="${build.outputDir}/META-INF">
<fileset dir="META-INF"/>
</move>
</sequential>
</target>
<!-- ====================================================================== -->
@ -209,7 +117,7 @@
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile,test" description="Package the application">
<target name="package" depends="sisu" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"

View File

@ -1,3 +1,113 @@
-------------------------------------------------------------------
Wed Sep 6 07:09:33 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Update to upstream version 4.8.0
- Changes of 4.8.0
* New features and improvements
+ Add tzst alias for tar.zst archiver/unarchived (#274)
* Bug Fixes
+ detect permissions for addFile (#293)
* Maintenance
+ Remove public modifier from JUnit 5 tests (#294)
+ Use https in scm/url (#291)
+ Remove junit-jupiter-engine from project dependencies (#292)
+ Remove parent and reports menu from site (#282)
+ Cleanup after "veryLargeJar" test (#281)
+ Override project.url (#279)
- Changes of 4.7.1
* Bug Fixes
+ don't apply umask on unknown perms (Win) (#273)
- Changes of 4.7.0
* New features and improvements
+ add umask support and use 022 in RB mode (#271)
+ Use NIO Files for creating temporary files (#270)
+ Deprecate the JAR Index feature (JDK-8302819) (#268)
+ Add Archiver aliases for tar.* (#266)
* Maintenance
+ Use JUnit TempDir to manage temporary files in tests (#269)
+ Override uId and gId for Tar in test (#264)
+ Bump maven-resources-plugin from 2.7 to 3.3.1 (#223)
- Changes of 4.6.3
* New features and improvements
+ Fix path traversal vulnerability (#261)
The vulnerability affects only directories whose name begins
with the same prefix as the destination directory. For example
malicious archive may extract file in /opt/directory instead
of /opt/dir.
- Changes of 4.6.2
* Bug Fixes
+ Fix regression in handling symbolic links. See
codehaus-plexus/plexus-io#89
- Changes of 4.6.1
* Bug Fixes
+ Normalize file separators before warning about equal archive
entries (#249)
- Changes of 4.6.0
* New features and improvements
+ keep file/directory permissions in Reproducible Builds
mode (#241)
- Changes of 4.5.0
* New features and improvements
+ Add zstd (un)archiver support (#226)
* Bug Fixes
+ Fix UnArchiver#isOverwrite not working as expected (#229)
Existing files were overridden only if UnArchiver#isOverwrite
was set and the existing files were older than the archive
entry.
Now it works as documented: older files are always overridden;
when UnArchiver#isOverwrite is true, existing files are always
overridden regardless if they are older or not.
- Changes of 4.4.0
* New features and improvements
+ Drop legacy plexus API and use only JSR330 components (#220)
- Changes of 4.3.0
* New features and improvements
+ Require Java 8 (#206)
+ Refactor to use FileTime API (#199)
+ Rename setTime method to setZipEntryTime (#209)
+ Convert InputStreamSupplier to lambdas (#212)
* Bug Fix
+ Reproducible Builds not working when using modular jar (#205)
- Changes of 4.2.7
* New features and improvements
+ Respect order of META-INF/ and META-INF/MANIFEST.MF entries in
a JAR file (#189)
- Changes of 4.2.6
* New features and improvements
+ FileInputStream, FileOutputStream, FileReader and FileWriter
are no longer used (#183)
+ Code cleanup (#172)
- Changes of 4.2.5
* New features and improvements
+ Speed improvements (#157)
* Bug Fixes
+ Fix use of a mismatching Unicode path extra field in zip
unarchiving (#167)
In some cases zip archiver may update the file path but not
the Unicode path extra field. This would result in Plexus
Archiver extracting the file using wrong (obsolete) path.
Now Plexus Archiver follows the specification and in this
case will ignore the extra filed and extract the file in the
correct location.
- Changes of 4.2.4
* Bug Fixes
+ Fix unjustified warning about casing for directory entries
(#155)
- Changes of 4.2.2
* Bug Fixes
+ DirectoryArchiver fails for symlinks if a parent directory
doesn't exist (#131)
- Modified patch:
* 0001-Remove-support-for-snappy.patch
+ rediff to changed context
- Removed patch:
* logger-level.patch
+ not needed any more with this version
- Added patch:
* plexus-archiver-4.8.0-no_zstd.patch
+ Remove support for ZStd compression to reduce the dependency
graph
-------------------------------------------------------------------
Tue May 11 14:50:27 UTC 2021 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package plexus-archiver
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,44 +16,30 @@
#
%bcond_with tests
%bcond_with snappy
Name: plexus-archiver
Version: 4.2.1
Version: 4.8.0
Release: 0
Summary: Plexus Archiver Component
License: Apache-2.0
Group: Development/Libraries/Java
URL: http://codehaus-plexus.github.io/plexus-archiver
URL: https://codehaus-plexus.github.io/plexus-archiver
Source0: https://github.com/codehaus-plexus/plexus-archiver/archive/plexus-archiver-%{version}.tar.gz
Source1: %{name}-build.xml
Patch0: 0001-Remove-support-for-snappy.patch
Patch1: logger-level.patch
Patch1: plexus-archiver-4.8.0-no_zstd.patch
BuildRequires: ant
BuildRequires: apache-commons-compress
BuildRequires: apache-commons-io
BuildRequires: atinject
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: javapackages-local >= 6
BuildRequires: jsr-305
BuildRequires: plexus-containers-container-default >= 2.1
BuildRequires: plexus-io >= 3.2
BuildRequires: plexus-utils >= 3.3
BuildRequires: sisu-inject
BuildRequires: slf4j
BuildRequires: xz-java
Requires: mvn(org.apache.commons:commons-compress)
Requires: mvn(org.codehaus.plexus:plexus-io)
Requires: mvn(org.codehaus.plexus:plexus-utils)
Requires: mvn(org.tukaani:xz)
BuildArch: noarch
%if %{with snappy}
BuildRequires: mvn(org.iq80.snappy:snappy)
%endif
%if %{with tests}
BuildRequires: ant-junit
BuildRequires: guava
BuildRequires: plexus-classworlds
BuildRequires: xbean
BuildRequires: xz-java
%endif
%description
Plexus contains end-to-end developer tools for writing applications.
@ -73,7 +59,6 @@ Javadoc for %{name}.
%setup -q -n %{name}-%{name}-%{version}
cp %{SOURCE1} build.xml
%if %{without snappy}
%patch0 -p1
%pom_remove_dep org.iq80.snappy:snappy
rm -rf src/main/java/org/codehaus/plexus/archiver/snappy
@ -81,24 +66,24 @@ rm -rf src/test/java/org/codehaus/plexus/archiver/snappy
rm -f src/main/java/org/codehaus/plexus/archiver/tar/SnappyTarFile.java
rm -f src/main/java/org/codehaus/plexus/archiver/tar/PlexusIoTarSnappyFileResourceCollection.java
rm -r src/test/java/org/codehaus/plexus/archiver/tar/TarSnappyUnArchiverTest.java
%endif
%patch1 -p1
%pom_remove_plugin :maven-enforcer-plugin
%pom_remove_parent .
%pom_xpath_inject "pom:project" "<groupId>org.codehaus.plexus</groupId>" .
%pom_remove_dep com.github.luben:zstd-jni
rm -rf src/main/java/org/codehaus/plexus/archiver/zstd
rm -rf src/test/java/org/codehaus/plexus/archiver/zstd
rm -rf src/main/java/org/codehaus/plexus/archiver/tar/PlexusIoTZstdFileResourceCollection.java
rm -rf src/main/java/org/codehaus/plexus/archiver/tar/ZstdTarFile.java
rm -rf src/main/java/org/codehaus/plexus/archiver/tar/TZstdUnArchiver.java
rm -rf src/main/java/org/codehaus/plexus/archiver/tar/TZstdArchiver.java
rm -rf src/main/java/org/codehaus/plexus/archiver/tar/TarZstdUnArchiver.java
rm -rf src/main/java/org/codehaus/plexus/archiver/tar/PlexusIoTarZstdFileResourceCollection.java
rm -rf src/main/java/org/codehaus/plexus/archiver/tar/TarZstdArchiver.java
rm -rf src/test/java/org/codehaus/plexus/archiver/tar/TarZstdUnArchiverTest.java
%build
mkdir -p lib
build-jar-repository -s lib plexus-containers/plexus-container-default jsr-305 commons-compress commons-io plexus/utils plexus/io
%if %{with tests}
build-jar-repository -s lib plexus/classworlds guava/guava xbean/xbean-reflect xz-java
%endif
build-jar-repository -s lib atinject slf4j/api org.eclipse.sisu.inject jsr-305 commons-compress commons-io plexus/utils plexus/io
%{ant} \
%if %{without tests}
-Dtest.skip=true \
%endif
jar javadoc
%install
@ -107,7 +92,7 @@ install -dm 0755 %{buildroot}%{_javadir}/plexus
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/plexus/archiver.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/plexus
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/plexus/archiver.pom
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/plexus/archiver.pom
%add_maven_depmap plexus/archiver.pom plexus/archiver.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}