From 9e140b357960d8801ad8705f0beaaad7ee6b7c17 Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Fri, 2 Aug 2024 23:05:35 +0100 Subject: [PATCH] Sync with RHEL 7 portable build - Use ExclusiveArch over ExcludeArch - pkgos definition needs to be early enough to be used in portablesuffix - Related: RHEL-58798 --- java-21-openjdk.spec | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index 6797183..e4cf05e 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -145,11 +145,6 @@ # Architecture on which we run Java only tests %global jdk_test_arch x86_64 -# Define the OS the portable JDK is built on -# This is undefined for openjdk-portable-rhel-8 builds and -# equals 'rhel7' for openjdk-portable-rhel-7 builds -%global pkgos rhel7 - # By default, we build a debug build during main build on JIT architectures %if %{with slowdebug} %ifarch %{debug_arches} @@ -358,13 +353,20 @@ # The tag used to create the OpenJDK tarball %global vcstag jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}} +# 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 + # Standard JPackage naming and versioning defines %global origin openjdk %global origin_nice OpenJDK %global top_level_dir_name %{vcstag} %global top_level_dir_name_backup %{top_level_dir_name}-backup %global buildver 7 -%global rpmrelease 2 +%global rpmrelease 3 # Settings used by the portable build %global portablerelease 1 # Portable suffix differs between RHEL and CentOS @@ -1119,9 +1121,6 @@ exit 0 %endif } -# x86 is not supported by OpenJDK 17 -ExcludeArch: %{ix86} - # not-duplicated requires/provides/obsoletes for normal/debug packages %define java_rpo() %{expand: Requires: fontconfig%{?_isa} @@ -1283,6 +1282,9 @@ Provides: java-%{origin}-src%{?1} = %{epoch}:%{version}-%{release} # Define the root name of the portable packages %global pkgnameroot java-%{featurever}-%{origin}-portable%{?pkgos:-%{pkgos}} +# Define the architectures on which we build +ExclusiveArch: %{aarch64} %{ppc64le} s390x x86_64 + Name: java-%{javaver}-%{origin} Version: %{newjavaver}.%{buildver} Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist} @@ -2529,10 +2531,13 @@ require "copy_jdk_configs.lua" %endif %changelog -* Mon Oct 07 2024 Andrew Hughes - 1:21.0.4.0.7-2 +* Fri Oct 11 2024 Andrew Hughes - 1:21.0.4.0.7-3 - Vary portablesuffix depending on whether we are on RHEL ('el8') or CentOS ('el9') - Handle debugedit being a separate package installed in /usr on RHEL/CentOS 10 - Add build scripts to repository to ease remembering all CentOS & RHEL targets and options +- Sync with RHEL 7 portable build: + - Use ExclusiveArch over ExcludeArch + - pkgos definition needs to be early enough to be used in portablesuffix - Related: RHEL-58798 * Fri Jul 12 2024 Andrew Hughes - 1:21.0.4.0.7-1