0d1383
%bcond_with bootstrap
0d1383
0d1383
Name:           guava
0d1383
Version:        30.1
48a382
Release:        6%{?dist}
0d1383
Summary:        Google Core Libraries for Java
0d1383
# Most of the code is under ASL 2.0
0d1383
# Few classes are under CC0, grep for creativecommons
0d1383
License:        ASL 2.0 and CC0
0d1383
URL:            https://github.com/google/guava
0d1383
BuildArch:      noarch
0d1383
0d1383
Source0:        https://github.com/google/guava/archive/v%{version}.tar.gz
0d1383
0d1383
Patch1:         0001-Remove-multi-line-annotations.patch
0d1383
0d1383
BuildRequires:  maven-local-openjdk8
0d1383
%if %{with bootstrap}
0d1383
BuildRequires:  javapackages-bootstrap
0d1383
%else
0d1383
BuildRequires:  %{?module_prefix}mvn(com.google.code.findbugs:jsr305)
0d1383
BuildRequires:  mvn(junit:junit)
0d1383
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
0d1383
BuildRequires:  mvn(org.apache.maven.plugins:maven-enforcer-plugin)
0d1383
%endif
0d1383
0d1383
%description
0d1383
Guava is a suite of core and expanded libraries that include
0d1383
utility classes, Google’s collections, io classes, and much
0d1383
much more.
0d1383
This project is a complete packaging of all the Guava libraries
0d1383
into a single jar.  Individual portions of Guava can be used
0d1383
by downloading the appropriate module and its dependencies.
0d1383
0d1383
%{?javadoc_package}
0d1383
0d1383
%package testlib
0d1383
Summary:        The guava-testlib artifact
0d1383
0d1383
%description testlib
0d1383
guava-testlib provides additional functionality for conveninent unit testing
0d1383
0d1383
%prep
0d1383
%setup -q
0d1383
0d1383
find . -name '*.jar' -delete
0d1383
0d1383
%pom_remove_parent guava-bom
0d1383
0d1383
%pom_disable_module guava-gwt
0d1383
%pom_disable_module guava-tests
0d1383
0d1383
%pom_xpath_inject pom:modules "<module>futures/failureaccess</module>"
0d1383
%pom_xpath_inject pom:parent "<relativePath>../..</relativePath>" futures/failureaccess
0d1383
%pom_xpath_set pom:parent/pom:version %{version}-jre futures/failureaccess
0d1383
0d1383
%pom_remove_plugin -r :animal-sniffer-maven-plugin
0d1383
# Downloads JDK source for doc generation
0d1383
%pom_remove_plugin :maven-dependency-plugin guava
0d1383
0d1383
%pom_remove_dep :caliper guava-tests
0d1383
0d1383
%mvn_package :guava-parent guava
0d1383
0d1383
# javadoc generation fails due to strict doclint in JDK 1.8.0_45
0d1383
%pom_remove_plugin -r :maven-javadoc-plugin
0d1383
0d1383
%pom_xpath_inject /pom:project/pom:build/pom:plugins/pom:plugin/pom:configuration/pom:instructions "<_nouses>true</_nouses>" guava/pom.xml
0d1383
0d1383
%pom_remove_dep -r :error_prone_annotations
0d1383
%pom_remove_dep -r :j2objc-annotations
0d1383
%pom_remove_dep -r org.checkerframework:
0d1383
%pom_remove_dep -r :listenablefuture
0d1383
0d1383
annotations=$(
0d1383
    find -name '*.java' \
0d1383
    | xargs fgrep -h \
0d1383
        -e 'import com.google.j2objc.annotations' \
0d1383
        -e 'import com.google.errorprone.annotation' \
0d1383
        -e 'import com.google.errorprone.annotations' \
0d1383
        -e 'import com.google.common.annotations' \
0d1383
        -e 'import org.codehaus.mojo.animal_sniffer' \
0d1383
        -e 'import org.checkerframework' \
0d1383
    | sort -u \
0d1383
    | sed 's/.*\.\([^.]*\);/\1/' \
0d1383
    | paste -sd\|
0d1383
)
0d1383
0d1383
# guava started using quite a few annotation libraries for code quality, which
0d1383
# we don't have. This ugly regex is supposed to remove their usage from the code
0d1383
find -name '*.java' | xargs sed -ri \
0d1383
    "s/^import .*\.($annotations);//;s/@($annotations)"'\>\s*(\((("[^"]*")|([^)]*))\))?//g'
0d1383
0d1383
%patch1 -p1
0d1383
0d1383
%mvn_package "com.google.guava:failureaccess" guava
0d1383
0d1383
%mvn_package "com.google.guava:guava-bom" __noinstall
0d1383
0d1383
%build
0d1383
# Tests fail on Koji due to insufficient memory,
0d1383
# see https://bugzilla.redhat.com/show_bug.cgi?id=1332971
0d1383
%mvn_build -s -f
0d1383
0d1383
%install
0d1383
%mvn_install
0d1383
0d1383
%files -f .mfiles-guava
0d1383
%doc CONTRIBUTORS README*
0d1383
%license COPYING
0d1383
0d1383
%files testlib -f .mfiles-guava-testlib
0d1383
0d1383
%changelog
48a382
* Mon Jan 30 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 30.1-6
48a382
- Rebuild to regenerate auto-requires
48a382
0d1383
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 30.1-5
0d1383
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
0d1383
  Related: rhbz#1991688
0d1383
0d1383
* Wed Jun 09 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 30.1-4
0d1383
- Rebuild to workaround DistroBaker issue
0d1383
0d1383
* Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 30.1-3
0d1383
- Bootstrap Maven for CentOS Stream 9
0d1383
0d1383
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 30.1-2
0d1383
- Bootstrap build
0d1383
- Non-bootstrap build
0d1383
0d1383
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-10
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
0d1383
0d1383
* Tue Jan 26 2021 Marian Koncek <mkoncek@redhat.com> - 30.1-1
0d1383
- Update to upstream version 30.1
0d1383
0d1383
* Fri Sep 18 2020 Marian Koncek <mkoncek@redhat.com> - 29.0-1
0d1383
- Update to upstream version 29.0
0d1383
0d1383
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-9
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0d1383
0d1383
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 25.0-8
0d1383
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
0d1383
0d1383
* Wed Feb 19 2020 Fabio Valentini <decathorpe@gmail.com> - 25.0-7
0d1383
- Drop unnecessary dependency on parent POM.
0d1383
0d1383
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-6
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
0d1383
0d1383
* Sat Jan 25 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 28.2-2
0d1383
- Build with OpenJDK 8
0d1383
0d1383
* Fri Jan 24 2020 Marian Koncek <mkoncek@redhat.com> - 28.2-1
0d1383
- Update to upstream version 28.2
0d1383
0d1383
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 28.1-2
0d1383
- Mass rebuild for javapackages-tools 201902
0d1383
0d1383
* Mon Sep 02 2019 Marian Koncek <mkoncek@redhat.com> - 28.1-1
0d1383
- Update to upstream version 28.1
0d1383
0d1383
* Thu Aug 01 2019 Marian Koncek <mkoncek@redhat.com> - 28.0-1
0d1383
- Update to upstream version 28.0
0d1383
0d1383
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-5
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
0d1383
0d1383
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 25.0-4
0d1383
- Mass rebuild for javapackages-tools 201901
0d1383
0d1383
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-4
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
0d1383
0d1383
* Fri Aug 03 2018 Michael Simacek <msimacek@redhat.com> - 25.0-3
0d1383
- Fix license tag to include CC0
0d1383
0d1383
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 25.0-2
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0d1383
0d1383
* Wed May 02 2018 Michael Simacek <msimacek@redhat.com> - 25.0-1
0d1383
- Update to upstream version 25.0
0d1383
0d1383
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 24.0-2
0d1383
- Escape macros in %%changelog
0d1383
0d1383
* Mon Feb 05 2018 Michael Simacek <msimacek@redhat.com> - 24.0-1
0d1383
- Update to upstream version 24.0
0d1383
0d1383
* Mon Nov 06 2017 Michael Simacek <msimacek@redhat.com> - 20.0-1
0d1383
- Update to upstream version 20.0
0d1383
0d1383
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 18.0-11
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0d1383
0d1383
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 18.0-10
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0d1383
0d1383
* Mon Oct 10 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-9
0d1383
- Allow conditional builds without testlib
0d1383
0d1383
* Thu Jun 16 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-8
0d1383
- Cleanup package
0d1383
0d1383
* Tue May 10 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-7
0d1383
- Disable tests due to insufficient memory on Koji
0d1383
0d1383
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 18.0-6
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0d1383
0d1383
* Wed Jun 22 2015 Noa Resare <noa@resare.com> - 18.0-5
0d1383
- enable module guava-testlib
0d1383
- enable tests in guava-testlib
0d1383
- backport fix to HashMap related test from 19.0-SNAPSHOT
0d1383
0d1383
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 18.0-4
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0d1383
0d1383
* Thu May 14 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-3
0d1383
- Remove maven-javadoc-plugin execution
0d1383
0d1383
* Fri Feb  6 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 18.0-2
0d1383
- Update upstream website URL
0d1383
0d1383
* Wed Jan  7 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 18.0-1
0d1383
- Update to v. 18 (#1175401)
0d1383
- Use %%license
0d1383
0d1383
* Wed Oct  8 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 17.0-2
0d1383
- Add alias for com.google.guava:guava-jdk5
0d1383
0d1383
* Fri Jun 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 17.0-1
0d1383
- Add patch for Java 8
0d1383
0d1383
* Tue Jun 17 2014 Roland Grunberg <rgrunber@redhat.com> - 15.0-4
0d1383
- Do not generate uses directive for exports.
0d1383
0d1383
* Fri Jun 13 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> 17.0-1
0d1383
- Update to latest upstream version (#1109442).
0d1383
0d1383
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.0-3
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0d1383
0d1383
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 15.0-2
0d1383
- Use Requires: java-headless rebuild (#1067528)
0d1383
0d1383
* Wed Jan  8 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 15.0-1
0d1383
- Update to upstream version 15.0
0d1383
0d1383
* Mon Aug 12 2013 gil cattaneo <puntogil@libero.it> 13.0-6
0d1383
- fix rhbz#992456
0d1383
- update to current packaging guidelines
0d1383
0d1383
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.0-5
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0d1383
0d1383
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 13.0-4
0d1383
- Replace BR on ant-nodeps with ant
0d1383
0d1383
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 13.0-4
0d1383
- Rebuild to regenerate API documentation
0d1383
- Resolves: CVE-2013-1571
0d1383
0d1383
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 13.0-3
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0d1383
0d1383
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 13.0-2
0d1383
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
0d1383
- Replace maven BuildRequires with maven-local
0d1383
0d1383
* Tue Aug  7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 13.0-1
0d1383
- Update to upstream version 13.0
0d1383
- Remove RPM bug workaround
0d1383
- Convert patches to pom macros
0d1383
0d1383
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 11.0.2-2
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0d1383
0d1383
* Sat Apr 28 2012 gil cattaneo <puntogil@libero.it> 11.0.2-1
0d1383
- Update to 11.0.2
0d1383
0d1383
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 09-2
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
0d1383
0d1383
* Mon Sep 12 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 09-1
0d1383
- Update to 09
0d1383
- Packaging fixes
0d1383
- Build with maven
0d1383
0d1383
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 05-5
0d1383
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
0d1383
0d1383
* Wed Jul 14 2010 Hui wang <huwang@redhat.com> - 05-4
0d1383
- Patch pom
0d1383
0d1383
* Fri Jun 18 2010 Hui Wang <huwang@redhat.com> - 05-3
0d1383
- Fixed jar name in install section
0d1383
- Removed spaces in description
0d1383
0d1383
* Thu Jun 17 2010 Hui Wang <huwang@redhat.com> - 05-2
0d1383
- Fixed summary
0d1383
- Fixed description
0d1383
- Fixed creating symlink insturctions
0d1383
- add depmap
0d1383
0d1383
* Thu Jun 10 2010 Hui Wang <huwang@redhat.com> - 05-1
0d1383
- Initial version of the package