Port to OpenJDK 21

Resolves: RHEL-52717
This commit is contained in:
Marian Koncek 2024-02-20 10:22:36 +01:00 committed by Mikolaj Izdebski
parent 0d183971af
commit 435037c445
2 changed files with 45 additions and 3 deletions

View File

@ -0,0 +1,36 @@
From 5dc1f89e58e41069158e4e00e7772220a6493480 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Sat, 24 Feb 2024 17:01:21 +0100
Subject: [PATCH] Fix broken modular jars
---
byte-buddy/pom.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/byte-buddy/pom.xml b/byte-buddy/pom.xml
index b954bb7..68c18b4 100644
--- a/byte-buddy/pom.xml
+++ b/byte-buddy/pom.xml
@@ -162,9 +162,9 @@
</dependencies>
<executions>
<execution>
- <phase>prepare-package</phase>
+ <phase>package</phase>
<goals>
- <goal>make-module</goal>
+ <goal>inject-module</goal>
</goals>
<configuration>
<skip>${modulemaker.skip}</skip>
@@ -181,6 +181,7 @@
com.sun.jna,
com.sun.jna.platform
</static-requires>
+ <main-class>net.bytebuddy.build.Plugin$Engine$Default</main-class>
</configuration>
</execution>
</executions>
--
2.43.0

View File

@ -11,6 +11,7 @@ Source0: https://github.com/raphw/byte-buddy/archive/refs/tags/byte-buddy
# Patch the build to avoid bundling inside shaded jars
Patch1: 0001-Avoid-bundling-asm.patch
Patch2: 0002-Remove-dependencies.patch
Patch3: 0003-Fix-broken-modular-jars.patch
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
@ -77,8 +78,9 @@ This package contains API documentation for %{name}.
%prep
%setup -q -n %{name}-%{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch 1 -p1
%patch 2 -p1
%patch 3 -p1
find -name '*.class' -delete
@ -131,7 +133,7 @@ rm byte-buddy-agent/src/test/java/net/bytebuddy/agent/VirtualMachineAttachmentTe
# NOTE you can obtain valid profiles for precompilation by:
# xmllint --xpath '//*[local-name()="profile"]/*[local-name()="id"]/text()' byte-buddy-dep/pom.xml | grep 'precompile$' | grep -v 'no-precompile$' | sed 's/\(.*\)/-P\1/'
profiles='-Pjava-8-precompile -Pjava-8-parameters-precompile -Pjava-11-precompile -Pjava-16-precompile -Pjava-17-precompile'
%mvn_build -s -- -P'java8,!checks' "${profiles}" -Dsourcecode.test.version=1.8 -Dmaven.test.failure.ignore=true
%mvn_build -s -- -P'java8,!checks' "${profiles}" -Dsourcecode.main.version=8 -Dsourcecode.test.version=8 -Dmaven.test.failure.ignore=true
%install
%mvn_install
@ -149,6 +151,10 @@ profiles='-Pjava-8-precompile -Pjava-8-parameters-precompile -Pjava-11-precompil
%license LICENSE NOTICE
%changelog
* Mon Aug 05 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.14.2-8
- Port to OpenJDK 21
- Resolves: RHEL-52717
* Thu Aug 01 2024 Troy Dawson <tdawson@redhat.com> - 1.14.2-8
- Bump release for Aug 2024 java mass rebuild