From c5e1dc484f5c363b781c0a54fac02ebedc2a5fc7 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Thu, 26 Sep 2024 15:37:05 -0400 Subject: [PATCH] Replace jrelnk alternative with sdkdir - Replace jrelnk alternative with sdkdir - Related: RHEL-68848 --- java-21-openjdk.spec | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index 3d66df9..cb7a35d 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -453,7 +453,6 @@ %define etcjavadir() %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}} # Standard JPackage directories and symbolic links. %define sdkdir() %{expand:%{uniquesuffix -- %{?1}}} -%define jrelnk() %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%{?1}} %define sdkbindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin} %define jrebindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin} @@ -520,7 +519,7 @@ alternatives --install %{_bindir}/java java %{jrebindir -- %{?1}}/java %{priorit %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1.gz alternatives --install %{_jvmdir}/jre-%{origin} jre_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} %{priority_for -- %{?1}} alternatives --install %{_jvmdir}/jre-%{javaver} jre_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}} %{priority_for -- %{?1}} -alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} %{priority_for -- %{?1}} +alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} %{priority_for -- %{?1}} } %define post_headless() %{expand: @@ -547,7 +546,7 @@ then alternatives --remove java %{jrebindir -- %{?1}}/java alternatives --remove jre_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} alternatives --remove jre_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}} - alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} + alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} fi } @@ -731,7 +730,6 @@ fi %dir %{_sysconfdir}/.java %dir %{_jvmdir}/%{sdkdir -- %{?1}} %{_jvmdir}/%{sdkdir -- %{?1}}/release -%{_jvmdir}/%{jrelnk -- %{?1}} %dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java %{_jvmdir}/%{sdkdir -- %{?1}}/bin/%{alt_java_name} @@ -2102,11 +2100,6 @@ install -D -p -m 755 ${miscdir}/%{alt_java_name} $RPM_BUILD_ROOT%{jrebindir -- $ ln -sf /etc/pki/java/cacerts . popd - # Install version-ed symlinks - pushd $RPM_BUILD_ROOT%{_jvmdir} - ln -sf %{sdkdir -- $suffix} %{jrelnk -- $suffix} - popd - # Copy alt-java man page into image so it gets installed with the others cp -a ${miscdir}/%{alt_java_name}.1 ${jdk_image}/man/man1 # Install man pages @@ -2381,6 +2374,7 @@ done - Unroll alternatives --install loops - Remove exit 0 from alternatives scriptlets - Move alternatives installation from posttrans to post +- Replace jrelnk alternative with sdkdir * Tue Oct 29 2024 Troy Dawson - 1:21.0.5.0.11-2.1 - Bump release for October 2024 mass rebuild: