From 526a69a143dea2c6c7c3eb07cbdfd83e74b91251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n=20Kon=C4=8Dek?= Date: Thu, 1 Feb 2024 13:44:41 +0100 Subject: [PATCH] Add generated Requires on Java 21 Related: RHEL-13046 --- javapackages-config.json | 2 +- javapackages-tools.spec | 23 +++++++++++++++++++++-- toolchains-openjdk21.xml | 11 +++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 toolchains-openjdk21.xml diff --git a/javapackages-config.json b/javapackages-config.json index d78ebe1..1a419d9 100644 --- a/javapackages-config.json +++ b/javapackages-config.json @@ -2,7 +2,7 @@ "maven.req": { "always_generate": [ "javapackages-filesystem", - "(java-headless or java-17-headless or java-11-headless or java-1.8.0-headless)" + "(java-headless or java-21-headless or java-17-headless or java-11-headless or java-1.8.0-headless)" ], "java_requires": { "skip": true diff --git a/javapackages-tools.spec b/javapackages-tools.spec index bda439f..f9ef527 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -10,11 +10,11 @@ %global default_jdk %{_prefix}/lib/jvm/java-17-openjdk %global default_jre %{_prefix}/lib/jvm/jre-17-openjdk -%global maven_home %{_datadir}/xmvn +%global maven_home %{_usr}/share/xmvn Name: javapackages-tools Version: 6.1.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Macros and scripts for Java packaging support License: BSD URL: https://github.com/fedora-java/javapackages @@ -26,6 +26,7 @@ Source3: javapackages-config.json Source8: toolchains-openjdk8.xml Source11: toolchains-openjdk11.xml Source17: toolchains-openjdk17.xml +Source21: toolchains-openjdk21.xml BuildRequires: coreutils BuildRequires: which @@ -158,6 +159,15 @@ Requires: java-17-openjdk-devel %description -n maven-local-openjdk17 OpenJDK 17 toolchain for XMvn +%package -n maven-local-openjdk21 +Summary: OpenJDK 21 toolchain for XMvn +RemovePathPostfixes: -openjdk21 +Requires: maven-local +Requires: java-21-openjdk-devel + +%description -n maven-local-openjdk21 +OpenJDK 21 toolchain for XMvn + %prep %setup -q -n javapackages-%{version} @@ -186,6 +196,7 @@ mkdir -p %{buildroot}%{maven_home}/conf/ cp -p %{SOURCE8} %{buildroot}%{maven_home}/conf/toolchains.xml-openjdk8 cp -p %{SOURCE11} %{buildroot}%{maven_home}/conf/toolchains.xml-openjdk11 cp -p %{SOURCE17} %{buildroot}%{maven_home}/conf/toolchains.xml-openjdk17 +cp -p %{SOURCE21} %{buildroot}%{maven_home}/conf/toolchains.xml-openjdk21 install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/java/javapackages-config.json @@ -222,10 +233,18 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/java/javapackages-config %dir %{maven_home}/conf %{maven_home}/conf/toolchains.xml-openjdk17 +%files -n maven-local-openjdk21 +%dir %{maven_home}/conf +%{maven_home}/conf/toolchains.xml-openjdk21 + %files -n %{python_prefix}-javapackages -f files-python %license LICENSE %changelog +* Thu Feb 01 2024 Marián Konček - 6.1.0-6 +- Add generated Requires on Java 21 +- Related: RHEL-13046 + * Tue Jan 31 2023 Mikolaj Izdebski - 6.1.0-5 - Add generated Requires on multiple versions of java-headless - Resolves: rhbz#2165589 diff --git a/toolchains-openjdk21.xml b/toolchains-openjdk21.xml new file mode 100644 index 0000000..6235342 --- /dev/null +++ b/toolchains-openjdk21.xml @@ -0,0 +1,11 @@ + + + jdk + + xmvn + + + /usr/lib/jvm/java-21-openjdk + + +