Remove macro references in comments where possible (%dnl not compatible enough yet)
- After discussion with fitzsim, it is easier and more compatible - to rewrite (or just plain drop in the case of the %patch examples) - macros in comments. There doesn't seem to be a way to detect the - presence of %dnl on older RPM versions, so we can't use it until - we are only working on RHEL >= 9. - While it works fine locally, attempting to build on CentOS 9 causes - the srpm stage to fail with: - error: /builddir/build/SPECS/java-25-openjdk.spec: line 3: %dnl: unexpected argument Resolves: RHEL-150977
This commit is contained in:
parent
bc0c9a72cb
commit
f8659abd07
@ -87,19 +87,20 @@
|
||||
%global normal_build %{nil}
|
||||
%endif
|
||||
|
||||
# We have hardcoded list of files, which is appearing in alternatives, and in files
|
||||
# in alternatives those are slaves and master, very often triplicated by man pages
|
||||
# in files all masters and slaves are ghosted
|
||||
# the ghosts are here to allow installation via query like `dnf install /usr/bin/java`
|
||||
# you can list those files, with appropriate sections: cat *.spec | grep -e --install -e --slave -e post_ -e alternatives
|
||||
# We have a hardcoded list of files, which appears in alternatives and in files
|
||||
# In alternatives, those are slaves and master, very often triplicated by man pages
|
||||
# In files, all masters and slaves are ghosted
|
||||
# The ghosts are here to allow installation via query like `dnf install /usr/bin/java`
|
||||
# You can list those files, with appropriate sections: cat *.spec | grep -e --install -e --slave -e post_ -e alternatives
|
||||
# TODO - fix those hardcoded lists via single list
|
||||
# Those files must *NOT* be ghosted for *slowdebug* packages
|
||||
# Those files must *NOT* be ghosted for *debug* packages
|
||||
# FIXME - if you are moving jshell or jlink or similar, always modify all three sections
|
||||
# you can check via headless and devels:
|
||||
# You can check via headless and devels:
|
||||
# rpm -ql --noghost java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin
|
||||
# == rpm -ql java-11-openjdk-headless-slowdebug-11.0.1.13-8.fc29.x86_64.rpm | grep bin
|
||||
# != rpm -ql java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin
|
||||
# similarly for other %%{_jvmdir}/{jre,java} and %%{_javadocdir}/{java,java-zip}
|
||||
# and similarly for other packages.
|
||||
|
||||
%define is_release_build() %( if [ "%{?1}" == "%{debug_suffix_unquoted}" -o "%{?1}" == "%{fastdebug_suffix_unquoted}" ]; then echo "0" ; else echo "1"; fi )
|
||||
|
||||
# Indicates whether this is the default JDK on this version of RHEL
|
||||
@ -288,8 +289,9 @@
|
||||
%global interimver 0
|
||||
%global updatever 3
|
||||
%global patchver 0
|
||||
|
||||
# We don't add any LTS designator for STS packages (Fedora and EPEL).
|
||||
# We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined.
|
||||
# We need to explicitly exclude EPEL as it has the rhel macro defined.
|
||||
%if 0%{?rhel} && !0%{?epel}
|
||||
%global lts_designator "LTS"
|
||||
%global lts_designator_zip -%{lts_designator}
|
||||
@ -301,7 +303,8 @@
|
||||
# Define vendor information used by OpenJDK
|
||||
%global oj_vendor Red Hat, Inc.
|
||||
%global oj_vendor_url https://www.redhat.com/
|
||||
# Define what url should JVM offer in case of a crash report
|
||||
|
||||
# Define what url the JVM should offer in case of a crash report
|
||||
# order may be important, epel may have rhel declared
|
||||
%if 0%{?epel}
|
||||
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20EPEL&component=%{name}&version=epel%{epel}
|
||||
@ -382,8 +385,8 @@
|
||||
|
||||
# Define milestone (EA for pre-releases, GA for releases)
|
||||
# Release will be (where N is usually a number starting at 1):
|
||||
# - 0.N%%{?extraver}%%{?dist} for EA releases,
|
||||
# - N%%{?extraver}{?dist} for GA releases
|
||||
# - 0.N.ea<dist> for EA releases,
|
||||
# - N<dist> for GA releases
|
||||
%global is_ga 1
|
||||
%if %{is_ga}
|
||||
%global build_type GA
|
||||
@ -399,7 +402,7 @@
|
||||
%global eaprefix 0.
|
||||
%endif
|
||||
|
||||
# parametrized macros are order-sensitive
|
||||
# Parameterised macros are order-sensitive
|
||||
%global compatiblename java-%{featurever}-%{origin}
|
||||
%global fullversion %{compatiblename}-%{version}-%{release}
|
||||
# output dir stub
|
||||
@ -448,7 +451,7 @@
|
||||
%global rpm_state_dir %{_localstatedir}/lib/rpm-state/
|
||||
|
||||
# For flatpack builds hard-code /usr/sbin/alternatives,
|
||||
# otherwise use %%{_sbindir} relative path.
|
||||
# otherwise use _sbindir relative path.
|
||||
%if 0%{?flatpak}
|
||||
%global alternatives_requires /usr/sbin/alternatives
|
||||
%else
|
||||
@ -1367,9 +1370,11 @@ Source32: create-redhat-properties-files.bash
|
||||
############################################
|
||||
|
||||
# Crypto policy and FIPS support patches
|
||||
|
||||
# Patch is generated from the fips-25u tree at https://github.com/rh-openjdk/jdk/tree/fips-25u
|
||||
# as follows: git diff %%{vcstag} src make test > fips-25u-$(git show -s --format=%h HEAD).patch
|
||||
# as follows: git diff <vcstag> src make test > fips-25u-$(git show -s --format=%h HEAD).patch
|
||||
# Diff is limited to src and make subdirectories to exclude .github changes
|
||||
|
||||
# Fixes currently included:
|
||||
# OPENJDK-2108: Internal __redhat_fips__ property
|
||||
# OPENJDK-2123: Algorithms lockdown
|
||||
@ -1910,19 +1915,7 @@ sh %{SOURCE12} %{top_level_dir_name}
|
||||
%endif
|
||||
|
||||
# Patch the JDK
|
||||
# This syntax is deprecated:
|
||||
# %patchN [...]
|
||||
# and should be replaced with:
|
||||
# %patch -PN [...]
|
||||
# For example:
|
||||
# %patch1001 -p1
|
||||
# becomes:
|
||||
# %patch -P1001 -p1
|
||||
# The replacement format suggested by recent (circa Fedora 38) RPM
|
||||
# deprecation messages:
|
||||
# %patch N [...]
|
||||
# is not backward-compatible with prior (circa RHEL-8) versions of
|
||||
# rpmbuild.
|
||||
|
||||
pushd %{top_level_dir_name}
|
||||
# Add crypto policy and FIPS support
|
||||
%patch -P1001 -p1
|
||||
@ -2611,8 +2604,10 @@ exit 0
|
||||
- * scripts/builds/waive_rpminspect.sh: Likewise.
|
||||
- * scripts/builds/waive_usual_rpminspect.sh: Likewise and add missing WORKING_DIR variable.
|
||||
- * scripts/builds/waive_usual_tier0.sh: Remove redundant 'test "x"' usage.
|
||||
- Remove macro references in comments where possible (%dnl not compatible enough yet)
|
||||
- Related: RHEL-155327
|
||||
- Related: RHEL-155339
|
||||
- Resolves: RHEL-150977
|
||||
|
||||
* Sat Apr 18 2026 Andrew Hughes <gnu.andrew@redhat.com> - 1:25.0.3.0.9-1
|
||||
- Update to jdk-25.0.3+9 (GA)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user