From 319c996f385fe594841e0d916dfe8cbb8956a0c8 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 22 Feb 2024 05:34:02 +0100 Subject: [PATCH] Switch to Java 21 for runtime Resolves: RHEL-52714 --- 0001-Use-OpenJDK-21.patch | 25 +++++++++++++++++++ ...le-JPMS-provides-and-JAR-transformer.patch | 8 +++--- xmvn-generator.spec | 12 ++++++--- 3 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 0001-Use-OpenJDK-21.patch rename 0001-Enable-JPMS-provides-and-JAR-transformer.patch => 0002-Enable-JPMS-provides-and-JAR-transformer.patch (85%) diff --git a/0001-Use-OpenJDK-21.patch b/0001-Use-OpenJDK-21.patch new file mode 100644 index 0000000..a33b9b8 --- /dev/null +++ b/0001-Use-OpenJDK-21.patch @@ -0,0 +1,25 @@ +From 089eacff83657ad118c1348ef521e46dc18645df Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Thu, 22 Feb 2024 05:30:33 +0100 +Subject: [PATCH 1/2] Use OpenJDK 21 + +--- + src/main/rpm/macros.xmvngen | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main/rpm/macros.xmvngen b/src/main/rpm/macros.xmvngen +index 4ff3f22..0b124f4 100644 +--- a/src/main/rpm/macros.xmvngen ++++ b/src/main/rpm/macros.xmvngen +@@ -3,7 +3,7 @@ + %__xmvngen_debug %{nil} + + # Path to JVM library (libjvm.so). Java 17 or newer is required. +-%__xmvngen_libjvm %{_jvmdir}/jre-17-openjdk/lib/server/libjvm.so ++%__xmvngen_libjvm %{_jvmdir}/jre-21-openjdk/lib/server/libjvm.so + + # Class path of nested JVM. This should be a colon-separated list of + # JARs that contains xmvn-generator.jar, JARs with third-party +-- +2.41.0 + diff --git a/0001-Enable-JPMS-provides-and-JAR-transformer.patch b/0002-Enable-JPMS-provides-and-JAR-transformer.patch similarity index 85% rename from 0001-Enable-JPMS-provides-and-JAR-transformer.patch rename to 0002-Enable-JPMS-provides-and-JAR-transformer.patch index 17c840f..48ddd04 100644 --- a/0001-Enable-JPMS-provides-and-JAR-transformer.patch +++ b/0002-Enable-JPMS-provides-and-JAR-transformer.patch @@ -1,14 +1,14 @@ -From ab348efccc347d192f582bd926ffa048f33d615c Mon Sep 17 00:00:00 2001 +From 1f80a6d816dc3dde83dc3df0d94d97b8a7f62937 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 30 Aug 2023 15:53:26 +0200 -Subject: [PATCH] Enable JPMS provides and JAR transformer +Subject: [PATCH 2/2] Enable JPMS provides and JAR transformer --- src/main/rpm/macros.xmvngen | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/rpm/macros.xmvngen b/src/main/rpm/macros.xmvngen -index 4ff3f22..ca1e3bb 100644 +index 0b124f4..b1ef101 100644 --- a/src/main/rpm/macros.xmvngen +++ b/src/main/rpm/macros.xmvngen @@ -1,6 +1,6 @@ @@ -18,7 +18,7 @@ index 4ff3f22..ca1e3bb 100644 +%__xmvngen_debug 1 # Path to JVM library (libjvm.so). Java 17 or newer is required. - %__xmvngen_libjvm %{_jvmdir}/jre-17-openjdk/lib/server/libjvm.so + %__xmvngen_libjvm %{_jvmdir}/jre-21-openjdk/lib/server/libjvm.so @@ -15,7 +15,7 @@ # generator factories (classes implementing GeneratorFactory interface). # Available hook factories are: diff --git a/xmvn-generator.spec b/xmvn-generator.spec index e443ce8..d8d9420 100644 --- a/xmvn-generator.spec +++ b/xmvn-generator.spec @@ -11,7 +11,8 @@ ExclusiveArch: %{java_arches} Source0: https://github.com/fedora-java/xmvn-generator/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch0: 0001-Enable-JPMS-provides-and-JAR-transformer.patch +Patch0: 0001-Use-OpenJDK-21.patch +Patch1: 0002-Enable-JPMS-provides-and-JAR-transformer.patch BuildRequires: gcc BuildRequires: rpm-devel @@ -28,7 +29,7 @@ BuildRequires: mvn(org.ow2.asm:asm) Requires: rpm-build Requires: lujavrite -Requires: java-17-openjdk-headless +Requires: java-21-openjdk-headless %description XMvn Generator is a dependency generator for RPM Package Manager @@ -39,8 +40,9 @@ from Lua. %prep %setup -q -%if !0%{?fedora} %patch0 -p1 +%if !0%{?fedora} +%patch1 -p1 %endif %mvn_file : %{name} @@ -63,6 +65,10 @@ install -D -p -m 644 src/main/rpm/xmvngen.attr %{buildroot}%{_fileattrsdir}/xmvn %doc README.md %changelog +* Mon Aug 05 2024 Mikolaj Izdebski - 1.2.2-4 +- Switch to Java 21 for runtime +- Resolves: RHEL-52714 + * Thu Aug 01 2024 Troy Dawson - 1.2.2-4 - Bump release for Aug 2024 java mass rebuild