Files
agrona/agrona.spec

179 lines
5.5 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package agrona
#
Accepting request 1265635 from home:urbic:branches:Java:packages - Fix build with both xmvn-mojo:javadoc and javadoc:aggregate - Update to v2.1.0 * Changed + Move get method declaration to the ReadablePosition class. (eb3b7d284d) + Bump Gradle to 8.13. + Bump Checkstyle to 10.21.3. + Bump ByteBuddy to 1.17.1. + Bump Shadow to 8.3.6. + Bump JUnit to 5.12.0. * Added + Add compareAndExchange methods to AtomicBuffer. (#334) + Add getAndAddPlain to AtomicCounter. (#328) + Add acquire/release methods to AtomicBuffer. (#314) + Add acquire/release methods to AtomicCounter. (#315) + Add acquire/release methods to Position. (#316) + Add plain methods to AtomicCounter. (#317) + Add opaque methods to AtomicCounter. (#319) + Add opaque methods to AtomicBuffer. (#313) + Add opaque methods to Position. (#324) + Add timestampRelease method to MarkFile. (#318) + Add different flavors of concurrent methods to StatusIndicator. (#323) * Fixed + CI: Fix crash logs upload on Windows + compress test data before upload. + Make UnsafeApi#arrayBaseOffset forwards compatible with JDK 25+ which changed the return type to long whereas we keep it as int. - Update to v2.0.1 * Changelog + [Java] Deprecated ThreadHints. (#312) + [Java] Adds a new convenience constructor to SleepingIdleStrategy. (#310) + [Java] Improved ordering/atomic doc in AtomicBuffer. (#309) + [Java] Upgrade to Mockito 5.15.2. + [Java] Upgrade to Checkstyle 10.21.1. + [CI] Add JDK 25-ea to the build matrix. - Update to v2.0.0 * Breaking changes + org.agrona.UnsafeAccess was removed. Use org.agrona.UnsafeApi instead. Note: --add-opens java.base/jdk.internal.misc=ALL-UNNAMED JVM option must be specified in order to use org.agrona.UnsafeApi. + org.agrona.concurrent.MemoryAccess was removed. Use either the equivalent APIs provided by org.agrona.UnsafeApi or java.lang.invoke.VarHandle. + org.agrona.concurrent.SigIntBarrier was removed. Use org.agrona.concurrent.ShutdownSignalBarrier instead. * Changelog + [Java] Added API to compute CRC-32C (org.agrona.checksum.Crc32c) and CRC-32 (org.agrona.checksum.Crc32) checksums. Note: Requires --add-opens java.base/java.util.zip=ALL-UNNAMED JVM option at run time in order to use these classes. + [Java] stop allocating on addAll / removeAll on ObjectHashSet. (#308) + [Java] Run Mockito as Agent, i.e. fix the following warning. + [Doc] Remove reference to java 8 (#304) + [Gradle] Disable auto detection of JVMs to force a specific JVM for test execution in CI. + [Gradle] Use Gradle's version catalog feature for declaring dependencies. + [Java] Add concurrent tests for getAndAdd and getAndSet operations. + [Java] Improve RingBuffer tests by reading one message at a time and minimizing the number of valid states. + [Java] Fail build on JavaDoc errors. + [Java] Use JUnit BOM. + [Java] Upgrade to Gradle 8.11.1. + [Java] Upgrade to Checkstyle 10.21.0. + [Java] Upgrade to ByteBuddy 1.15.11. + [Java] Upgrade to bnd 7.1.0. + [Java] Upgrade to Shadow 8.3.5. + [Java] Upgrade to JUnit 5.11.4. + [Java] Upgrade to Guava TestLib 33.4.0-jre. - Update to v1.23.1 * Breaking changes + [Java] Fix Object2IntHashMap#merge resizing the map while updating an existing key. - Update to v1.23.0 * Breaking changes + JDK 17 is required for compiling and running! + Removed NioSelectedKeySet and the corresponding TransportPoller.selectedKeySet field. + Removed MappedResizeableBuffer class to avoid having to open an internal JDK module (i.e. --add-opens java.base/sun.nio.ch=ALL-UNNAMED). + Removed RecordBuffer class. * Changelog + [Java] Improved documentation for the BackoffIdleStrategy. #297 + [Java] Resolve pid using ProcessHandle.current().pid(). + [Java] Use Thread.onSpinWait(). + [Java] Use invokeCleaner without MethodHandles. + [Java] Remove Selector hacks in favor of the new java.nio.channels.Selector.selectNow(Consumer<SelectionKey>) API. + [Java] Upgrade to Gradle 8.10. + [Java] Upgrade to ByteBuddy 1.15.0. + [Java] Upgrade to Shadow 8.3.0. + [Java] Upgrade to bnd 7.0.0. + [Java] Upgrade to Mockito 5.12.0. - Update to v1.22.0 * [Java] Improve performance of IntHashSet via avoiding the fill operation by using 0 as MISSING_VALUE. * [Java] Restore thread safety by overriding missing mutating operations in ConcurrentCountersManager. * [Java] Remove volatile read for FREE_FOR_REUSE_DEADLINE_OFFSET in CountersManager. * [Java] Upgrade to ByteBuddy 1.14.18. * [Java] Upgrade to Guava TestLib 33.2.1-jre. * [Java] Upgrade to JUnit 5.10.3. - Update to v1.21.2 * [Java] Fix {Int,Long}2ObjectCache. (#294) * [Java] ErrorLogReader: Do not crash when reading partial or corrupted error messages. Attempt to recover last error message when length is out of bounds. * [Java] SnowflakeIdGenerator: Increment sequence if the clock is not advancing or going backwards. * [Java] Fix build on JDK 23-ea caused by deprecation in Unsafe, i.e. https://openjdk.org/jeps/471. * [CI] Split the build into slow and fast, i.e. run concurrency tests only during slow build. * [Java] Upgrade to ByteBuddy 1.14.17. * [Java] Upgrade to Guava TestLib 33.2.0-jre. - Update to v1.21.1 * [Java] Fix Javadoc copyright year range. * [Java] Fix JDK 22 javadoc URL. * [CI] Enable JDK 23-ea build. * [Java] Upgrade to ASM 9.7. * [Java] Upgrade to ByteBuddy 1.14.13. - Update to v1.21.0 * [Java] Use -XX:+EnableDynamicAgentLoading on JDK 21+. * [CI] Add Mac M1 to the build matrix. * [CI] Build PRs against merge commit. * [CI] Action updates. * [Java] Upgrade to JUnit 5.10.2. * [Java] Upgrade to Versions 0.51.0. * [Java] Upgrade to ByteBuddy 1.14.12. * [Java] Upgrade to Guava TestLib 33.1.0-jre. - Update to v1.20.0 * Add Reference ID, a new metadata field, to counters in the value padding. * Suppress warnings about Unsafe APIs being deprecated for removal in JDK 22. * Enable dynamic agent loading on JDK 22 + run ByteBuddy in the experimental mode. * CI: Use JDK 21 GA, drop JDK 11, and add JDK 22-ea. * Fix JavaDoc link for JDK 21 GA. * Move bnd into bundle section to make it forward compatible with the next major version of the plugin. * Upgrade to ByteBuddy 1.14.9. * Upgrade to Guava TestLib 32.1.3-jre. * Upgrade to ASM 9.6. * Upgrade to Versions 0.49.0. - Update to v1.19.2 * Add missing bounds check to AbstractMutableDirectBuffer#getInt(int, java.nio.ByteOrder) (#285) * Upgrade to ByteBuddy 1.14.7. - Update to v1.19.1 * Fix NPE in SigInt.java (#283) * Upgrade to JMH 1.37. * Upgrade to Guava TestLib 32.1.2-jre. * Upgrade to JUnit 5.10.0. - Reproducible builds: use SOURCE_DATE_EPOCH for timestamp - Initial packaging with v1.19.0 OBS-URL: https://build.opensuse.org/request/show/1265635 OBS-URL: https://build.opensuse.org/package/show/Java:packages/agrona?expand=0&rev=8
2025-03-31 07:07:47 +00:00
# Copyright (c) 2025 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: agrona
Version: 2.2.2
Release: 0
Summary: High Performance data structures and utility methods for Java
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://github.com/real-logic/%{name}
Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: https://repo1.maven.org/maven2/org/%{name}/%{name}/%{version}/%{name}-%{version}.pom
Source2: https://repo1.maven.org/maven2/org/%{name}/%{name}-agent/%{version}/%{name}-agent-%{version}.pom
BuildRequires: fdupes
BuildRequires: java-devel >= 17
BuildRequires: maven-local
BuildRequires: mvn(net.bytebuddy:byte-buddy)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin)
BuildArch: noarch
%description
Agrona provides a library of data structures and utility methods that are a
common need when building high-performance applications in Java. Many of these
utilities are used in the Aeron efficient reliable UDP unicast, multicast, and
IPC message transport and provides high-performance buffer implementations to
support the Simple Binary Encoding Message Codec.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%autosetup
cp %{SOURCE1} %{name}/pom.xml
cp %{SOURCE2} %{name}-agent/pom.xml
%pom_add_dep org.%{name}:%{name}:%{version} %{name}-agent
%pom_add_dep net.bytebuddy:byte-buddy %{name}-agent
cat >pom.xml <<__POM__
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>4.0.0</modelVersion>
<groupId>org.%{name}</groupId>
<artifactId>%{name}-parent</artifactId>
<version>%{version}</version>
<packaging>pom</packaging>
<modules>
<module>%{name}</module>
<module>%{name}-agent</module>
</modules>
</project>
__POM__
sed -i \
-e 's#src/main/java/#%{name}/src/main/java/#' \
-e 's#build/generated-src#%{name}/target/generated-sources/java#' \
%{name}/src/main/java/org/agrona/generation/SpecialisationGenerator.java
%pom_add_plugin org.apache.maven.plugins:maven-compiler-plugin %{name} \
'<configuration>
<source>17</source>
<target>17</target>
</configuration>
<executions>
<execution>
<id>compile-generator</id>
<phase>generate-sources</phase>
<goals><goal>compile</goal></goals>
</execution>
<execution>
<id>compile-generated-sources</id>
<phase>process-sources</phase>
<goals><goal>compile</goal></goals>
</execution>
</executions>'
%pom_add_plugin org.apache.maven.plugins:maven-compiler-plugin %{name}-agent \
'<configuration>
Accepting request 1265635 from home:urbic:branches:Java:packages - Fix build with both xmvn-mojo:javadoc and javadoc:aggregate - Update to v2.1.0 * Changed + Move get method declaration to the ReadablePosition class. (eb3b7d284d) + Bump Gradle to 8.13. + Bump Checkstyle to 10.21.3. + Bump ByteBuddy to 1.17.1. + Bump Shadow to 8.3.6. + Bump JUnit to 5.12.0. * Added + Add compareAndExchange methods to AtomicBuffer. (#334) + Add getAndAddPlain to AtomicCounter. (#328) + Add acquire/release methods to AtomicBuffer. (#314) + Add acquire/release methods to AtomicCounter. (#315) + Add acquire/release methods to Position. (#316) + Add plain methods to AtomicCounter. (#317) + Add opaque methods to AtomicCounter. (#319) + Add opaque methods to AtomicBuffer. (#313) + Add opaque methods to Position. (#324) + Add timestampRelease method to MarkFile. (#318) + Add different flavors of concurrent methods to StatusIndicator. (#323) * Fixed + CI: Fix crash logs upload on Windows + compress test data before upload. + Make UnsafeApi#arrayBaseOffset forwards compatible with JDK 25+ which changed the return type to long whereas we keep it as int. - Update to v2.0.1 * Changelog + [Java] Deprecated ThreadHints. (#312) + [Java] Adds a new convenience constructor to SleepingIdleStrategy. (#310) + [Java] Improved ordering/atomic doc in AtomicBuffer. (#309) + [Java] Upgrade to Mockito 5.15.2. + [Java] Upgrade to Checkstyle 10.21.1. + [CI] Add JDK 25-ea to the build matrix. - Update to v2.0.0 * Breaking changes + org.agrona.UnsafeAccess was removed. Use org.agrona.UnsafeApi instead. Note: --add-opens java.base/jdk.internal.misc=ALL-UNNAMED JVM option must be specified in order to use org.agrona.UnsafeApi. + org.agrona.concurrent.MemoryAccess was removed. Use either the equivalent APIs provided by org.agrona.UnsafeApi or java.lang.invoke.VarHandle. + org.agrona.concurrent.SigIntBarrier was removed. Use org.agrona.concurrent.ShutdownSignalBarrier instead. * Changelog + [Java] Added API to compute CRC-32C (org.agrona.checksum.Crc32c) and CRC-32 (org.agrona.checksum.Crc32) checksums. Note: Requires --add-opens java.base/java.util.zip=ALL-UNNAMED JVM option at run time in order to use these classes. + [Java] stop allocating on addAll / removeAll on ObjectHashSet. (#308) + [Java] Run Mockito as Agent, i.e. fix the following warning. + [Doc] Remove reference to java 8 (#304) + [Gradle] Disable auto detection of JVMs to force a specific JVM for test execution in CI. + [Gradle] Use Gradle's version catalog feature for declaring dependencies. + [Java] Add concurrent tests for getAndAdd and getAndSet operations. + [Java] Improve RingBuffer tests by reading one message at a time and minimizing the number of valid states. + [Java] Fail build on JavaDoc errors. + [Java] Use JUnit BOM. + [Java] Upgrade to Gradle 8.11.1. + [Java] Upgrade to Checkstyle 10.21.0. + [Java] Upgrade to ByteBuddy 1.15.11. + [Java] Upgrade to bnd 7.1.0. + [Java] Upgrade to Shadow 8.3.5. + [Java] Upgrade to JUnit 5.11.4. + [Java] Upgrade to Guava TestLib 33.4.0-jre. - Update to v1.23.1 * Breaking changes + [Java] Fix Object2IntHashMap#merge resizing the map while updating an existing key. - Update to v1.23.0 * Breaking changes + JDK 17 is required for compiling and running! + Removed NioSelectedKeySet and the corresponding TransportPoller.selectedKeySet field. + Removed MappedResizeableBuffer class to avoid having to open an internal JDK module (i.e. --add-opens java.base/sun.nio.ch=ALL-UNNAMED). + Removed RecordBuffer class. * Changelog + [Java] Improved documentation for the BackoffIdleStrategy. #297 + [Java] Resolve pid using ProcessHandle.current().pid(). + [Java] Use Thread.onSpinWait(). + [Java] Use invokeCleaner without MethodHandles. + [Java] Remove Selector hacks in favor of the new java.nio.channels.Selector.selectNow(Consumer<SelectionKey>) API. + [Java] Upgrade to Gradle 8.10. + [Java] Upgrade to ByteBuddy 1.15.0. + [Java] Upgrade to Shadow 8.3.0. + [Java] Upgrade to bnd 7.0.0. + [Java] Upgrade to Mockito 5.12.0. - Update to v1.22.0 * [Java] Improve performance of IntHashSet via avoiding the fill operation by using 0 as MISSING_VALUE. * [Java] Restore thread safety by overriding missing mutating operations in ConcurrentCountersManager. * [Java] Remove volatile read for FREE_FOR_REUSE_DEADLINE_OFFSET in CountersManager. * [Java] Upgrade to ByteBuddy 1.14.18. * [Java] Upgrade to Guava TestLib 33.2.1-jre. * [Java] Upgrade to JUnit 5.10.3. - Update to v1.21.2 * [Java] Fix {Int,Long}2ObjectCache. (#294) * [Java] ErrorLogReader: Do not crash when reading partial or corrupted error messages. Attempt to recover last error message when length is out of bounds. * [Java] SnowflakeIdGenerator: Increment sequence if the clock is not advancing or going backwards. * [Java] Fix build on JDK 23-ea caused by deprecation in Unsafe, i.e. https://openjdk.org/jeps/471. * [CI] Split the build into slow and fast, i.e. run concurrency tests only during slow build. * [Java] Upgrade to ByteBuddy 1.14.17. * [Java] Upgrade to Guava TestLib 33.2.0-jre. - Update to v1.21.1 * [Java] Fix Javadoc copyright year range. * [Java] Fix JDK 22 javadoc URL. * [CI] Enable JDK 23-ea build. * [Java] Upgrade to ASM 9.7. * [Java] Upgrade to ByteBuddy 1.14.13. - Update to v1.21.0 * [Java] Use -XX:+EnableDynamicAgentLoading on JDK 21+. * [CI] Add Mac M1 to the build matrix. * [CI] Build PRs against merge commit. * [CI] Action updates. * [Java] Upgrade to JUnit 5.10.2. * [Java] Upgrade to Versions 0.51.0. * [Java] Upgrade to ByteBuddy 1.14.12. * [Java] Upgrade to Guava TestLib 33.1.0-jre. - Update to v1.20.0 * Add Reference ID, a new metadata field, to counters in the value padding. * Suppress warnings about Unsafe APIs being deprecated for removal in JDK 22. * Enable dynamic agent loading on JDK 22 + run ByteBuddy in the experimental mode. * CI: Use JDK 21 GA, drop JDK 11, and add JDK 22-ea. * Fix JavaDoc link for JDK 21 GA. * Move bnd into bundle section to make it forward compatible with the next major version of the plugin. * Upgrade to ByteBuddy 1.14.9. * Upgrade to Guava TestLib 32.1.3-jre. * Upgrade to ASM 9.6. * Upgrade to Versions 0.49.0. - Update to v1.19.2 * Add missing bounds check to AbstractMutableDirectBuffer#getInt(int, java.nio.ByteOrder) (#285) * Upgrade to ByteBuddy 1.14.7. - Update to v1.19.1 * Fix NPE in SigInt.java (#283) * Upgrade to JMH 1.37. * Upgrade to Guava TestLib 32.1.2-jre. * Upgrade to JUnit 5.10.0. - Reproducible builds: use SOURCE_DATE_EPOCH for timestamp - Initial packaging with v1.19.0 OBS-URL: https://build.opensuse.org/request/show/1265635 OBS-URL: https://build.opensuse.org/package/show/Java:packages/agrona?expand=0&rev=8
2025-03-31 07:07:47 +00:00
<source>11</source>
<target>11</target>
</configuration>'
%pom_add_plugin org.codehaus.mojo:exec-maven-plugin %{name} \
'<executions>
<execution>
<phase>process-sources</phase>
<goals><goal>java</goal></goals>
<configuration>
<mainClass>org.agrona.generation.SpecialisationGenerator</mainClass>
</configuration>
</execution>
</executions>'
%pom_add_plugin org.codehaus.mojo:build-helper-maven-plugin %{name} \
'<executions>
<execution>
<phase>generate-sources</phase>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>target/generated-sources/java</source>
</sources>
</configuration>
</execution>
</executions>'
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin %{name} \
'<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.agrona.core</Automatic-Module-Name>
<Implementation-Title>Agrona</Implementation-Title>
<Implementation-Vendor>Real Logic Limited</Implementation-Vendor>
<Implementation-Version>%{version}</Implementation-Version>
<Bundle-Name>org.agrona.core</Bundle-Name>
<Bundle-SymbolicName>org.agrona.core</Bundle-SymbolicName>
</manifestEntries>
</archive>
</configuration>'
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin %{name}-agent \
'<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.agrona.agent</Automatic-Module-Name>
<Implementation-Title>Agrona</Implementation-Title>
<Implementation-Vendor>Real Logic Limited</Implementation-Vendor>
<Implementation-Version>%{version}</Implementation-Version>
<Premain-Class>org.agrona.agent.BufferAlignmentAgent</Premain-Class>
<Agent-Class>org.agrona.agent.BufferAlignmentAgent</Agent-Class>
<Can-Redefine-Classes>true</Can-Redefine-Classes>
<Can-Retransform-Classes>true</Can-Retransform-Classes>
</manifestEntries>
</archive>
</configuration>'
%build
%{mvn_build} -f -- \
-DlegacyMode=true -Dverbose=true
%install
%{mvn_package} :%{name}-parent __noinstall
%mvn_install
%fdupes %{buildroot}%{_javadocdir}/%{name}
%files -f .mfiles
%license LICENSE
%doc README.md
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog