From 948566fae4c90024fce7c14e724f35426acefad9 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Mon, 2 Dec 2019 16:03:34 +0000 Subject: [PATCH 1/2] Update to 1.5.4 release of auto Don't use compat version of guava any longer --- .gitignore | 1 + auto.spec | 29 +++++++++++++++-------------- gen_auto_tarball.sh | 24 ++++++++++++++++++++++++ sources | 2 +- 4 files changed, 41 insertions(+), 15 deletions(-) create mode 100755 gen_auto_tarball.sh diff --git a/.gitignore b/.gitignore index 9e1cc61..0825c58 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /auto-value-1.1.tar.gz /auto-value-1.3.tar.gz /auto-value-1.4.1.tar.gz +/auto-value-1.5.4.tar.gz diff --git a/auto.spec b/auto.spec index 8d76d3a..2b78e0e 100644 --- a/auto.spec +++ b/auto.spec @@ -1,13 +1,17 @@ Name: auto -Version: 1.4.1 +Version: 1.5.4 Release: 1%{?dist} Summary: A collection of source code generators for Java License: ASL 2.0 URL: https://github.com/google/auto -Source0: https://github.com/google/auto/archive/auto-value-%{version}.tar.gz + +# Source tarball is generated by script to ensure the correct tagged +# code is fetched for the various submodules +Source0: auto-value-%{version}.tar.gz +Source1: gen_auto_tarball.sh BuildRequires: maven-local -BuildRequires: mvn(com.google.guava:guava:19.0) +BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(com.squareup:javapoet) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) @@ -46,7 +50,7 @@ Summary: Javadoc for %{name} This package contains javadoc for %{name}. %prep -%setup -q -n auto-auto-value-%{version} +%setup -q -n auto-value-%{version} find -name '*.class' -print -delete find -name '*.jar' -print -delete @@ -54,20 +58,13 @@ find -name '*.jar' -print -delete # com.google.googlejavaformat:google-java-format %pom_disable_module factory build-pom.xml -%pom_xpath_set "pom:project/pom:version" 3 -for p in common factory service value ;do -%pom_xpath_set "pom:project/pom:version" %{version} ${p} -%pom_xpath_remove "pom:dependency[pom:scope = 'test']" ${p} -done +# Fix deps in service module +%pom_xpath_set "pom:parent/pom:version" 6 service +%pom_change_dep com.google.auto:auto-common com.google.auto:auto-common:0.10 service %pom_remove_plugin org.apache.maven.plugins:maven-checkstyle-plugin %pom_remove_plugin :maven-shade-plugin value %pom_remove_plugin :maven-invoker-plugin value -%pom_remove_plugin :maven-invoker-plugin factory - -%pom_xpath_set "pom:dependency[pom:artifactId = 'auto-common']/pom:version" %{version} factory service value -%pom_xpath_set "pom:dependency[pom:artifactId = 'auto-service']/pom:version" %{version} factory value -%pom_xpath_set "pom:dependency[pom:artifactId = 'auto-value']/pom:version" %{version} factory %mvn_package :build-only __noinstall @@ -99,6 +96,10 @@ done %license LICENSE.txt %changelog +* Fri Nov 29 2019 Mat Booth - 1.5.4-1 +- Update to 1.5.4 release of auto +- Don't use compat version of guava any longer + * Fri Feb 15 2019 Mat Booth - 1.4.1-1 - Update to release 1.4.1 of auto - Disable unused factory module due to missing deps diff --git a/gen_auto_tarball.sh b/gen_auto_tarball.sh new file mode 100755 index 0000000..be2911f --- /dev/null +++ b/gen_auto_tarball.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +VAL_TAG=auto-value-1.5.4 +COM_TAG=auto-common-0.10 +SER_TAG=auto-service-1.0-rc4 +PARENT_TAG=auto-parent-6 + +mkdir $VAL_TAG/ +pushd $VAL_TAG/ +wget https://github.com/google/auto/archive/$VAL_TAG.tar.gz +tar xvf $VAL_TAG.tar.gz --strip-components=1 +rm -rf pom.xml factory/ common/ service/ +wget https://github.com/google/auto/archive/$COM_TAG.tar.gz +tar xvf $COM_TAG.tar.gz --strip-components=1 auto-$COM_TAG/common +wget https://github.com/google/auto/archive/$SER_TAG.tar.gz +tar xvf $SER_TAG.tar.gz --strip-components=1 auto-$SER_TAG/service +wget https://github.com/google/auto/archive/$PARENT_TAG.tar.gz +tar xvf $PARENT_TAG.tar.gz --strip-components=1 auto-$PARENT_TAG/pom.xml +rm *.tar.gz +popd + +tar caf $VAL_TAG.tar.gz $VAL_TAG/ +rm -rf $VAL_TAG/ + diff --git a/sources b/sources index 689f2ba..ccb80a5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (auto-value-1.4.1.tar.gz) = 933add2e824c5ae241d1d4d4b5c6d9b953e9a51a97d02812b159402c14222e5f097eb83fdedfb1ece2e36750a0fa86f0e696af76321baee711ca19f46caee1da +SHA512 (auto-value-1.5.4.tar.gz) = eac782de9e32d516cec2e16d567b19ad663218334ffcd43113b7fd5d6f15fdd8289f8337b14ea4222057bbd6ced2c20fd22f182b7c17861058c2febe2cf601b8 From 90ad2d5c055f2c2d90d9879c911a7e774a0e2653 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Mon, 27 Jan 2020 15:18:36 +0000 Subject: [PATCH 2/2] Add broader guava support --- auto.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/auto.spec b/auto.spec index d04db8b..5dea852 100644 --- a/auto.spec +++ b/auto.spec @@ -11,7 +11,6 @@ Source0: auto-value-%{version}.tar.gz Source1: gen_auto_tarball.sh BuildRequires: maven-local -BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(com.squareup:javapoet) BuildRequires: mvn(org.codehaus.plexus:plexus-java) @@ -76,6 +75,14 @@ find -name '*.jar' -print -delete %mvn_package :build-only __noinstall +# Broader guava compatibility +sed -i -e 's/23.5-jre/20.0/' pom.xml +sed -i -e 's/toImmutableMap/toMap/' -e 's/static com.google.common.collect.ImmutableMap/static java.util.stream.Collectors/' \ + -e '/elementValues/s/ImmutableMap/Map/' \ + common/src/main/java/com/google/auto/common/SimpleAnnotationMirror.java +sed -i -e 's/toImmutableSet/toSet/' -e 's/static com.google.common.collect.ImmutableSet/static java.util.stream.Collectors/' \ + -e '/ImmutableSet