From 0ce8bb88bb040cbabf69f77697ae4dd1c9fffb1a Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Fri, 12 Apr 2024 16:48:02 +0100 Subject: [PATCH] Define portablesuffix according to whether pkgos is defined or not Place the pkgos definition high enough that it is usable by portablesuffix. Related: RHEL-45217 --- java-21-openjdk.spec | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index 54bf488..657df1b 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -143,6 +143,13 @@ # Set of architectures where we verify backtraces with gdb %global gdb_arches %{jit_arches} %{zero_arches} +# Define the OS the portable JDK is built on +# This is undefined for CentOS & openjdk-portable-rhel-8 builds and +# equals 'rhel7' for openjdk-portable-rhel-7 builds +%if 0%{?centos} == 0 +%global pkgos rhel7 +%endif + # By default, we build a debug build during main build on JIT architectures %if %{with slowdebug} %ifarch %{debug_arches} @@ -351,10 +358,10 @@ %global top_level_dir_name %{vcstag} %global top_level_dir_name_backup %{top_level_dir_name}-backup %global buildver 13 -%global rpmrelease 1 +%global rpmrelease 2 # Settings used by the portable build %global portablerelease 1 -%global portablesuffix el9 +%global portablesuffix %{?pkgos:el7_9}%{!?pkgos:el9} %global portablebuilddir /builddir/build/BUILD # Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit @@ -1262,11 +1269,6 @@ Provides: java-%{origin}-src%{?1} = %{epoch}:%{version}-%{release} # Prevent brp-java-repack-jars from being run %global __jar_repack 0 -# Define the OS the portable JDK is built on -# Only used on RHEL -%if 0%{?centos} == 0 -%global pkgos rhel7 -%endif # Define the root name of the portable packages %global pkgnameroot java-%{featurever}-%{origin}-portable%{?pkgos:-%{pkgos}} @@ -2483,6 +2485,10 @@ cjc.mainProgram(args) %endif %changelog +* Fri Apr 12 2024 Andrew Hughes - 1:21.0.2.0.13-2 +- Define portablesuffix according to whether pkgos is defined or not +- Related: RHEL-45217 + * Tue Jan 09 2024 Andrew Hughes - 1:21.0.2.0.13-1 - Update to jdk-21.0.2+13 (GA) - Sync the copy of the portable specfile with the latest update