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