commit 2b65e07e6ac76b2aa6bbab6840b02eb6e1e783bb3ee4acda898d4881d155c72a Author: Fridrich Strba Date: Tue Oct 8 11:25:18 2024 +0000 OBS-URL: https://build.opensuse.org/package/show/Java:packages/guava?expand=0&rev=38 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/guava-build.tar.xz b/guava-build.tar.xz new file mode 100644 index 0000000..35c16ff --- /dev/null +++ b/guava-build.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86dbfca80ae01e492e2cb52a8fcd1da5d34a4e017d4689e5ba38af0784ed7d72 +size 2920 diff --git a/guava.changes b/guava.changes new file mode 100644 index 0000000..9408107 --- /dev/null +++ b/guava.changes @@ -0,0 +1,346 @@ +------------------------------------------------------------------- +Wed Jun 12 10:14:08 UTC 2024 - Fridrich Strba + +- Upgrade to guava 33.2.1 + * Changes of version 33.2.1 + + net: Changed InetAddress-String conversion methods to preserve + the IPv6 scope ID if present. The scope ID can be necessary + for IPv6-capable devices with multiple network interfaces. + However, preserving it can also lead to problems for callers + that rely on the returned values not to include the scope ID: + - Callers might compensate for the old behavior of the methods + by appending the scope ID to a returned string themselves. + If so, you can update your code to stop doing so at the same + time as you upgrade Guava. Of, if your code might run + against multiple versions of Guava, you can check whether + Guava has included a scope ID before you add one yourself. + - Callers might pass the returned string to another system + that does not understand scope IDs. If so, you can strip the + scope ID off, whether by truncating the string form at a % + character (leaving behind any trailing ] character in the + case of forUriString) or by replacing the returned + InetAddress with a new instance constructed by calling + InetAddress.getByAddress(addr). + - java.net.InetAddress validates any provided scope ID against + the interfaces available on the machine. As a result, + methods in InetAddresses may now fail if the scope ID fails + validation. + * Notable cases in which this may happen include: + - if the code runs in an Android app without networking + permission + - if code passes InetAddress instances or strings across + devices + * If this is not the behavior that you want, then you can + strip off the scope ID from the input string before + passing it to Guava, as discussed above. + * Changes of version 33.2.0 + + Dropped testing for Android versions before Lollipop (API + Level 21). Guava may stop working under older versions in + the future, or it may have done so already. + + Fixed a GWT compilation breakage under Gradle. + + collect: Made our Collector APIs (e.g., + ImmutableList.toImmutableList()) available in guava-android. + More Java 8 APIs will follow in future releases. + - As always, streams are available to Android code only when + that code enables library desugaring or targets a new enough + API Level (24 (Nougat) for many stream APIs). (But note that + we test only with library desugaring, so we don't currently + know if API Level 24 is high enough to use our Collector + APIs unless you have also enabled library desugaring.) Guava + users who avoid the Collector APIs do not need to meet this + requirement. + + collect: Fixed a potential NullPointerException in + ImmutableMap.Builder on a rare code path. + + net: Added HttpHeaders constants Ad-Auction-Allowed, + Permissions-Policy-Report-Only, and Sec-GPC. + +------------------------------------------------------------------- +Wed Apr 17 16:34:39 UTC 2024 - Fridrich Strba + +- Upgrade to guava 33.1.0 + * Changes of version 33.1.0: + + Updated our Error Prone dependency to 2.26.1, which includes + a JPMS-ready jar of annotations. If you use the Error Prone + annotations in a modular build of your own code, you may need + to add a requires line for them. + + base: Added a Duration overload for + Suppliers.memoizeWithExpiration. + + base: Deprecated the remaining two overloads of + Throwables.propagateIfPossible. They won't be deleted, but we + recommend migrating off them. + + cache: Fixed a bug that could cause false "recursive load" + reports during refresh. + + graph: Changed the return types of transitiveClosure() and + reachableNodes() to Immutable* types. reachableNodes() already + returned an immutable object (even though that was not + reflected in the declared return type); transitiveClosure() + used to return a mutable object. The old signatures remain + available, so this change does not break binary compatibility. + + graph: Changed the behavior of views returned by graph + accessor methods that take a graph element as input: They now + throw IllegalStateException when that element is removed from + the graph. + + hash: Optimized Checksum-based hash functions for Java 9+. + + testing: Exposed FakeTicker Duration methods to Android users. + + util.concurrent: Deprecated the constructors of + UncheckedExecutionException and ExecutionError that don't + accept a cause. We won't remove these constructors, but we + recommend migrating off them, as users of those classes often + assume that instances will contain a cause. + + util.concurrent: Improved the correctness of racy accesses for + J2ObjC users. + * Changes of version 33.0.0: + + This version of guava-android contains some package-private + methods whose signature includes the Java 8 Collector API. + This is a test to identify any problems before we expose those + methods publicly to users. Please report any problems that you + encounter. + + Changed various classes to catch Exception instead of + RuntimeException even when only RuntimeException is + theoretically possible. This can help code that throws + undeclared exceptions, as some bytecode rewriters (e.g., + Robolectric) and languages (e.g., Kotlin) do. + + Added an Automatic-Module-Name to failureaccess, Guava's one + strong runtime dependency. + + reflect: In guava-android only, removed + Invokable.getAnnotatedReturnType() and + Parameter.getAnnotatedType(). These methods never worked in an + Android VM, and to reflect that, they were born @Deprecated, + @Beta, and @DoNotCall. They're now preventing us from rolling + out some new Android compatibility testing. This is the only + binary-incompatible change in this release, and it should have + no effect in practice. Still, we bump the major version number + to follow Semantic Versioning. + + util.concurrent: Changed our implementations to avoid eagerly + initializing loggers during class loading. This can help + performance, especially under Android. + * Changes of version 32.1.3: + + Changed Gradle Metadata to include dependency versions + directly. This may address "Could not find some-dependency" + errors that some users have reported (which might be a result + of users' excluding guava-parent). + + collect: Changed Multisets.unmodifiableMultiset(set) + .removeIf(predicate) to throw an exception always, even if + nothing matches predicate. + + graph: Fixed the behavior of Graph/ValueGraph views for a node + when that node is removed from the graph. + + io: Fixed Files.createTempDir and FileBackedOutputStream under + Windows services, a rare use case. (The fix actually covers + only Java 9+ because Java 8 would require an additional + approach. Let us know if you need support under Java 8.) + + net: Made MediaType.parse allow and skip over whitespace + around the / and = separator tokens in addition to the ; + separator, for which it was already being allowed. + + util.concurrent: Tweaked Futures.getChecked + constructor-selection behavior: The method continues to prefer + to call constructors with a String parameter, but now it + breaks ties based on whether the constructor has a Throwable + parameter. Beyond that, the choice of constructor remains + undefined. (For this and other reasons, we discourage the use + of getChecked.) + * Changes of version 32.1.2: + + Removed the section of our Gradle metadata that caused Gradle + to report conflicts with listenablefuture. + + Changed our Maven project to avoid affecting which version of + Mockito our Gradle users see. + + collect: Under J2CL, exposed ImmutableList and ImmutableSet + methods copyOf and of for JavaScript usage. + + net: Optimized InternetDomainName construction. + * Changes of version 32.1.1: + + Fixed our broken Gradle metadata from 32.1.0. Sorry again for + the trouble. If you use Gradle, please still read the release + notes from that version: You may still see errors from the new + checking that the metadata enables, and the release notes + discuss how to fix those errors. + * Changes of version 32.1.0: + + collect: Tweaked more nullness annotations. + + hash: Enhanced crc32c() to use Java's hardware-accelerated + implementation where available. + + util.concurrent: Added Duration-based default methods to + ListeningExecutorService. + + Began updating Javadoc to focus less on APIs that have been + superseded by additions to the JDK. We're also looking to add + more documentation that directs users to JDK equivalents for + our APIs. Further PRs welcome! + + Fixed some problems with using Guava from a Java Agent. + (But we don't test that configuration, and we don't know how + well we'll be able to keep it working.) + + Fixed BootstrapMethodError when using CacheBuilder from a + custom system class loader. (As with the previous item, + we're not sure how well we'll be able to keep this use case + working.) + + Suppressed a harmless unusable-by-js warning seen by users of + guava-gwt. + +------------------------------------------------------------------- +Tue Mar 12 18:57:05 UTC 2024 - Fridrich Strba + +- Fix version mismatch in the ant build files. + +------------------------------------------------------------------- +Wed Feb 21 22:05:15 UTC 2024 - Fridrich Strba + +- Clean the spec file and simplify it a bit + +------------------------------------------------------------------- +Thu Jun 15 13:20:35 UTC 2023 - Fridrich Strba + +- Upgrade to guava 32.0.1 + * Security fixes: + + Reimplemented Files.createTempDir and FileBackedOutputStream + to further address CVE-2020-8908 (#4011, bsc#1179926) and + CVE-2023-2976 (#2575, bsc#1212401) + * Fixes: + + io: Fixed Files.createTempDir and FileBackedOutputStream under + Windows, which broke as part of the security fix in release + 32.0.0 + + Removed @Beta from almost all APIs. Most of the remaining + @Beta APIs are in graph and hash. + + Enhanced the Guava jar to include Proguard configurations that + are picked up automatically by the Android Gradle Plugin. This + should help with warnings that were promoted to errors in + Android Gradle Plugin 8.x. + + Enhanced the Guava jar to include information about method + parameters in its class files. If you use static analyzers + that look at method-parameter names, you may see new warnings + or errors if they are now able to detect mismatches. But + mostly, you may see better tooltips and autocompletion in + DEs. + + Improved nullness annotations on a few classes. + + Modified classes with "serial proxies" to declare + exception-throwing readObject methods, in accordance with best + practice. + + collect: Fixed Maps.newHashMapWithExpectedSize to stop + allocating maps that were larger than they needed to be. + + collect: Made various APIs work J2CL: + Maps.immutableEnumMap+toImmutableEnumMap, EnumMultiset, + CollectorTester. Previously, the APIs were present but failed + at runtime. + + collect: Optimized memory usage for Interner and MapMaker. + + graph: Changed directed graphs to reject attempts to add + undirected edges. + + io: Added BaseEncoding.ignoreCase() to support + case-insensitive decoding. + + net: Added HttpHeaders constants: + ~ No-Vary-Search + ~ Sec-CH-DPR + ~ Sec-CH-UA-Wow64 + ~ Sec-CH-Viewport-Width and Sec-CH-Viewport-Height + ~ Supports-Loading-Mode + + net: Added the MediaType constant for JWT. + + primitives: Added rotate() for arrays of all primitive types. + + util.concurrent: Changed AbstractFuture to run + interruptTask() just before afterDone(). Until this change, it + ran slightly earlier than that: We used to run it before + unblocking any pending get() calls, and now we run it after. + + util.concurrent: Fixed some cases in which we could catch + InterruptedException but fail to restore the interrupt bit. + +------------------------------------------------------------------- +Wed May 18 17:26:01 UTC 2022 - Fridrich Strba + +- Upgrade to guava 31.1 + * Fixes: + + base: Deprecated the Throwables methods lazyStackTrace and + lazyStackTraceIsLazy. They are no longer useful on any current + platform. + + collect: Added a new method + ImmutableMap.Builder.buildKeepingLast(), which keeps the last + value for any given key rather than throwing an exception when + a key appears more than once. + + collect: As a side-effect of the buildKeepingLast() change, + the idiom + ImmutableList.copyOf(Maps.transformValues(map, function)) + may produce different results if function has side-effects. + + hash: Added Hashing.fingerprint2011(). + + io: Changed ByteStreams.nullOutputStream() to follow the + contract of OutputStream.write by throwing an exception if + the range of bytes is out of bounds. + + net: Added @CheckReturnValue to the package (with a few + exceptions). + + net: Added HttpHeaders constant for + Access-Control-Allow-Private-Network. + + util.concurrent: Added accumulate/update methods for + AtomicDouble and AtomicDoubleArray. + * APIs promoted from @Beta: + + base: Throwables methods getCausalChain and getCauseAs + + collect: Streams methods mapWithIndex and findLast + + collect: the remaining methods in Comparators: min, max, + lexicographical, emptiesFirst, emptiesLast, isInOrder, + isInStrictOrder + + escape: various APIs + + io: various APIs in Files + + net: various APIs + + reflect: various APIs + + testlib: various APIs + + util.concurrent: AsyncCallable, ListenableScheduledFuture, + and ClosingFuture + + util.concurrent: ExecutionSequencer, + MoreExecutors.newSequentialExecutor, and Monitor + + util.concurrent: Futures methods: submit, submitAsync, + scheduleAsync, nonCancellationPropagating, inCompletionOrder + + util.concurrent: Uninterruptibles: + awaitTerminationUninterruptibly and the Duration overloads in + the class + + util.concurrent: the FluentFuture type, its factory methods, + and addCallback + * Remove the hack of removing annotations, since we have now + all the required dependencies packaged +- Removed patch: + * donotmock.patch + + hack not needed any more + +------------------------------------------------------------------- +Fri Mar 11 12:13:02 UTC 2022 - Fridrich Strba + +- Remove parent reference from ALL distributed pom files + +------------------------------------------------------------------- +Mon May 10 14:59:41 UTC 2021 - Fridrich Strba + +- Upgrade to guava 30.1.1 + * Fixes: + + cache: Fixed compatibility between asMap().compute(...) + and a load. + + cache: Added @CheckReturnValue to some APIs. + + collect: Added @DoNotCall to the mutator methods on immutable + types + + hash: Removed @Beta from HashCode. + + io: Removed @Beta from CountingOutputStream. + * fixes bsc#1179926, CVE-2020-8908: temp directory creation + vulnerability in Guava versions prior to 30.0 +- Removed patch: + * guava-25.0-java8compat.patch + + the compatibility is handled in the upstream code +- Added patch: + * donotmock.patch + + patch @DoNotMock annotation occurrences in order to put them + in a format that our regex is able to identify and kill + +------------------------------------------------------------------- +Wed Dec 4 17:32:18 UTC 2019 - Fridrich Strba + +- Avoid version-less dependencies that can cause problems with + some tools + +------------------------------------------------------------------- +Fri Nov 22 04:52:39 UTC 2019 - Fridrich Strba + +- Build the package with ant in order to prevent build cycles + * using a generated and customized ant build system + +------------------------------------------------------------------- +Thu Oct 10 21:00:22 UTC 2019 - Fridrich Strba + +- Added patch: + * guava-25.0-java8compat.patch + + Avoid callingoverridden methods with covariant return types + for java.nio.ByteBuffer and java.nio.CharBuffer, which were + introduced in Java 9 + + This allows us to produce with Java >= 9 binaries that are + compatible with Java 8 + +------------------------------------------------------------------- +Fri Apr 12 10:05:01 UTC 2019 - Fridrich Strba + +- Initial packaging of guava 25.0 diff --git a/guava.spec b/guava.spec new file mode 100644 index 0000000..7cc8fff --- /dev/null +++ b/guava.spec @@ -0,0 +1,112 @@ +# +# spec file for package guava +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: guava +Version: 33.2.1 +Release: 0 +Summary: Google Core Libraries for Java +License: Apache-2.0 AND CC0-1.0 +Group: Development/Libraries/Java +URL: https://github.com/google/guava +Source0: https://github.com/google/guava/archive/v%{version}.tar.gz +Source1: %{name}-build.tar.xz +BuildRequires: ant +BuildRequires: checker-qual +BuildRequires: fdupes +BuildRequires: google-errorprone-annotations >= 2.21.0 +BuildRequires: j2objc-annotations +BuildRequires: javapackages-local >= 6 +BuildRequires: jsr-305 +BuildRequires: junit +BuildArch: noarch + +%description +Guava is a suite of core and expanded libraries that include +utility classes, Google's collections, io classes, and much +much more. +This project is a complete packaging of all the Guava libraries +into a single jar. Individual portions of Guava can be used +by downloading the appropriate module and its dependencies. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +API documentation for %{name}. + +%package testlib +Summary: The guava-testlib artifact +Group: Development/Libraries/Java + +%description testlib +guava-testlib provides additional functionality for conveninent unit testing + +%prep +%setup -q -a1 + +find . -name '*.jar' -delete + +%pom_disable_module guava-gwt +%pom_disable_module guava-tests + +%pom_remove_plugin -r :animal-sniffer-maven-plugin + +%pom_xpath_inject /pom:project/pom:build/pom:plugins/pom:plugin/pom:configuration/pom:instructions "<_nouses>true" guava/pom.xml + +%pom_remove_dep -r :listenablefuture +%pom_remove_dep -r :failureaccess + +%build +mkdir -p lib +build-jar-repository -s lib junit jsr-305 google-errorprone/annotations checker-qual j2objc-annotations +%{ant} -Dproject.version=%{version} -Dtest.skip=true package javadoc + +%install +# jars +install -dm 0755 %{buildroot}%{_javadir}/%{name} +install -pm 0644 %{name}/target/%{name}-%{version}*.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar +install -pm 0644 %{name}-testlib/target/%{name}-testlib-%{version}*.jar %{buildroot}%{_javadir}/%{name}/%{name}-testlib.jar + +# poms +install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} +%{mvn_install_pom} %{name}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom +%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar +# We integrated this artifact in our main package +%{mvn_install_pom} futures/failureaccess/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/failureaccess.pom +%add_maven_depmap %{name}/failureaccess.pom %{name}/%{name}.jar +%{mvn_install_pom} %{name}-testlib/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}-testlib.pom +%add_maven_depmap %{name}/%{name}-testlib.pom %{name}/%{name}-testlib.jar -f %{name}-testlib + +# javadoc +install -dm 0755 %{buildroot}%{_javadocdir}/%{name} +cp -r %{name}/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/%{name} +cp -r %{name}-testlib/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/%{name}-testlib +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%doc CONTRIBUTORS README* +%license LICENSE + +%files javadoc +%{_javadocdir}/%{name} +%license LICENSE + +%files testlib -f .mfiles-guava-testlib + +%changelog diff --git a/v33.2.1.tar.gz b/v33.2.1.tar.gz new file mode 100644 index 0000000..d6b5c53 --- /dev/null +++ b/v33.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d156b483507d1f5d4ede95c468489b18521f2e7a28853862f880e093e17fba4 +size 5809432