853160
%global base_name       compress
853160
%global short_name      commons-%{base_name}
853160
853160
Name:           apache-%{short_name}
853160
Version:        1.20
853160
Release:        3%{?dist}
853160
Summary:        Java API for working with compressed files and archivers
853160
License:        ASL 2.0
853160
URL:            http://commons.apache.org/proper/commons-compress/
853160
BuildArch:      noarch
853160
853160
Source0:        http://archive.apache.org/dist/commons/compress/source/%{short_name}-%{version}-src.tar.gz
853160
853160
Patch0:         0001-Remove-Brotli-compressor.patch
853160
Patch1:         0002-Remove-ZSTD-compressor.patch
853160
Patch2:         0003-Avoid-use-of-internal-Mockito-API.patch
853160
853160
BuildRequires:  maven-local
853160
BuildRequires:  mvn(junit:junit)
853160
BuildRequires:  mvn(org.apache.commons:commons-parent:pom:)
853160
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
853160
BuildRequires:  mvn(org.apache.maven.plugins:maven-antrun-plugin)
853160
BuildRequires:  mvn(org.mockito:mockito-core)
853160
BuildRequires:  mvn(org.osgi:osgi.core)
853160
BuildRequires:  mvn(org.tukaani:xz)
853160
853160
%description
853160
The Apache Commons Compress library defines an API for working with
853160
ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200 and bzip2 files.
853160
In version 1.14 read-only support for Brotli decompression has been added,
853160
but it has been removed form this package.
853160
853160
%package javadoc
853160
Summary:        API documentation for %{name}
853160
853160
%description javadoc
853160
This package provides %{summary}.
853160
853160
%prep
853160
%setup -q -n %{short_name}-%{version}-src
853160
853160
# Unavailable Google Brotli library (org.brotli.dec)
853160
%patch0 -p1
853160
%pom_remove_dep org.brotli:dec
853160
rm -r src/{main,test}/java/org/apache/commons/compress/compressors/brotli
853160
853160
# Unavailable ZSTD JNI library
853160
%patch1 -p1
853160
%pom_remove_dep :zstd-jni
853160
rm -r src/{main,test}/java/org/apache/commons/compress/compressors/zstandard
853160
rm src/test/java/org/apache/commons/compress/compressors/DetectCompressorTestCase.java
853160
853160
# Avoid using internal Mockito APIs
853160
%patch2 -p1
853160
853160
# remove osgi tests, we don't have deps for them
853160
%pom_remove_dep org.ops4j.pax.exam:::test
853160
%pom_remove_dep :org.apache.felix.framework::test
853160
%pom_remove_dep :javax.inject::test
853160
%pom_remove_dep :slf4j-api::test
853160
rm src/test/java/org/apache/commons/compress/OsgiITest.java
853160
853160
# use osgi-core instead of felix-osgi-core
853160
%pom_change_dep :org.osgi.core org.osgi:osgi.core
853160
853160
# Remove test that requires powermock
853160
%pom_remove_dep org.powermock:
853160
%pom_add_dep org.mockito:mockito-core::test
853160
rm src/test/java/org/apache/commons/compress/compressors/z/ZCompressorInputStreamTest.java
853160
853160
# Generate Java 8 level bytecode when built on Java 11
853160
%pom_xpath_replace "pom:maven.compiler.release" "<maven.compiler.release>8</maven.compiler.release>"
853160
853160
%build
853160
%mvn_file  : %{short_name} %{name}
853160
%mvn_alias : commons:
853160
%mvn_build -- -Dcommons.osgi.symbolicName=org.apache.commons.compress
853160
853160
%install
853160
%mvn_install
853160
853160
%files -f .mfiles
853160
%doc LICENSE.txt NOTICE.txt
853160
853160
%files javadoc -f .mfiles-javadoc
853160
%doc LICENSE.txt NOTICE.txt
853160
853160
%changelog
853160
* Thu Jul 16 2020 Mat Booth <mat.booth@redhat.com> - 1.20-3
853160
- Ensure Java 8 level bytecode when built on Java 11
853160
853160
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 1.20-2
853160
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
853160
853160
* Mon Mar 02 2020 Fabio Valentini <decathorpe@gmail.com> - 1.20-1
853160
- Update to version 1.20.
853160
853160
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.19-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
853160
853160
* Fri Oct 04 2019 Fabio Valentini <decathorpe@gmail.com> - 1.19-1
853160
- Update to version 1.19.
853160
853160
* Wed Sep 18 2019 Fabio Valentini <decathorpe@gmail.com> - 1.18-7
853160
- Migrate from the obsolete felix-osgi-core to osgi-core.
853160
853160
* Wed Aug 14 2019 Fabio Valentini <decathorpe@gmail.com> - 1.18-6
853160
- Remove build-dependency on powermock
853160
853160
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-5
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
853160
853160
* Thu Feb 14 2019 Mat Booth <mat.booth@redhat.com> - 1.18-4
853160
- Rebuild to regenerate OSGi metadata
853160
853160
* Thu Feb 07 2019 Mat Booth <mat.booth@redhat.com> - 1.18-3
853160
- Fix test suite build against Mockito 2.x
853160
853160
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
853160
853160
* Fri Oct 05 2018 Marian Koncek <mkoncek@redhat.com> - 1.18-1
853160
- Update to upstream version 1.18
853160
- CVE-2018-11771
853160
853160
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.17-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
853160
853160
* Tue Jun 05 2018 Michael Simacek <msimacek@redhat.com> - 1.17-1
853160
- Update to upstream version 1.17
853160
853160
* Mon Feb 12 2018 Michael Simacek <msimacek@redhat.com> - 1.16.1-1
853160
- Update to upstream version 1.16.1
853160
853160
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
853160
853160
* Sun Oct 22 2017 Michael Simacek <msimacek@redhat.com> - 1.15-1
853160
- Update to upstream version 1.15
853160
853160
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.14-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
853160
853160
* Wed Jun 14 2017 Roman Vais <rvais@redhat.com> - 1.14-1
853160
- Update to upstream version 1.14
853160
- Remove Brotli support, it is not packaged for fedora 
853160
853160
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.13-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
853160
853160
* Mon Jan 02 2017 Michael Simacek <msimacek@redhat.com> - 1.13-1
853160
- Update to upstream version 1.13
853160
853160
* Wed Jun 22 2016 Michael Simacek <msimacek@redhat.com> - 1.12-1
853160
- Update to upstream version 1.12
853160
853160
* Mon May 02 2016 Michael Simacek <msimacek@redhat.com> - 1.11-1
853160
- Update to upstream version 1.11
853160
853160
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-0.3.svn1684406
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
853160
853160
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-0.2.svn1684406
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
853160
853160
* Tue Jun  9 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.10-0.1.svn1684406
853160
- Update to latest upstream snapshot
853160
853160
* Tue Oct 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.9-2
853160
- Remove legacy Obsoletes/Provides for jakarta-commons
853160
853160
* Mon Oct 13 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.9-1
853160
- Update to upstream version 1.9
853160
853160
* Wed Jul 30 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.1-3
853160
- Fix build-requires on apache-commons-parent
853160
853160
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.1-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
853160
853160
* Fri May 23 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.1-1
853160
- Update to upstream version 1.8.1
853160
853160
* Mon Mar 17 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8-2
853160
- Remove dependency on maven-scm-publish-plugin
853160
853160
* Fri Mar 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8-1
853160
- Update to upstream version 1.8
853160
853160
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.7-2
853160
- Use Requires: java-headless rebuild (#1067528)
853160
853160
* Mon Jan 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7-1
853160
- Update to upstream version 1.7
853160
853160
* Tue Oct 29 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.6-1
853160
- Update to upstream version 1.6
853160
853160
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
853160
853160
* Thu Mar 14 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5-1
853160
- Update to upstream version 1.5
853160
853160
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-6
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
853160
853160
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.4.1-5
853160
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
853160
- Replace maven BuildRequires with maven-local
853160
853160
* Wed Jan  9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.1-4
853160
- Bump release tag
853160
853160
* Tue Jan  8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.1-3
853160
- Build with xmvn
853160
- Update to current packaging guidelines
853160
853160
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
853160
853160
* Thu May 24 2012 Sandro Mathys <red at fedoraproject.org> - 1.4.1-1
853160
- Updated to 1.4.1
853160
- Fixes CVE-2012-2098 Low: Denial of Service
853160
853160
* Fri Apr 27 2012 Sandro Mathys <red at fedoraproject.org> - 1.4-1
853160
- Updated to 1.4
853160
853160
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-2
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
853160
853160
* Tue Nov 01 2011 Sandro Mathys <red at fedoraproject.org> - 1.3-1
853160
- Updated to 1.3
853160
853160
* Thu Aug 04 2011 Sandro Mathys <red at fedoraproject.org> - 1.2-2
853160
- Fixing mistake where different versions of the spec file got mixed up
853160
853160
* Thu Aug 04 2011 Sandro Mathys <red at fedoraproject.org> - 1.2-1
853160
- Updated to 1.2
853160
853160
* Sat Apr 16 2011 Chris Spike <spike@fedoraproject.org> 1.1-1
853160
- Updated to 1.1
853160
- Adapted to current java packaging guidelines
853160
853160
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-9
853160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
853160
853160
* Sun Jul 11 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-8
853160
- Fixed the Maven depmap line by replacing org.apache.maven by org.apache.commons
853160
853160
* Mon May 31 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-7
853160
- Fixed regression with missing Provides/Obsoletes for javadocs
853160
- Fixed changelog format
853160
853160
* Sun May 23 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-6
853160
- Fixed Maven depmap to use commons-compress
853160
853160
* Thu May 13 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-5
853160
- Added missing Provides/Obsoletes for javadocs 
853160
853160
* Mon May 10 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-4
853160
- Cleared some problems after the review
853160
853160
* Thu May 06 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-3
853160
- Now using maven2 (mvn-jpp) instead of directly calling javac & co
853160
853160
* Tue May 04 2010 Sandro Mathys <red at fedoraproject.org> - 1.0-2
853160
- Renamed from jakarta-commons-compress