Sync the copy of the portable specfile with the latest update

Related: RHEL-120553
This commit is contained in:
Andrew Hughes 2025-11-08 22:18:44 +00:00
parent d4379dbf2e
commit 2e8c01e6e7
2 changed files with 35 additions and 14 deletions

View File

@ -247,6 +247,13 @@
%global dtsversion 10
%endif
# Check if pandoc is available to generate docs (including man pages)
%if 0%{?rhel} == 8
%global pandoc_available 1
%else
%global pandoc_available 0
%endif
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
@ -327,7 +334,7 @@
%endif
# New Version-String scheme-style defines
%global featurever 23
%global featurever 24
%global fakefeaturever 25
%global interimver 0
%global updatever 2
@ -385,7 +392,7 @@
%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 buildver 12
%global rpmrelease 1
#%%global tagsuffix %%{nil}
# 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
@ -746,7 +753,7 @@ BuildRequires: libffi-devel
%endif
# Full documentation build requirements
# pandoc is only available on RHEL/CentOS 8
%if 0%{?rhel} == 8
%if %{pandoc_available}
BuildRequires: graphviz
BuildRequires: pandoc
%endif
@ -1002,6 +1009,12 @@ pushd %{top_level_dir_name}
#%patch -P1001 -p1
popd # openjdk
echo "Generating %{alt_java_name} man page"
altjavamanpage=%{top_level_dir_name}/src/java.base/share/man/%{alt_java_name}.md
altjavatext="Hardened java binary recommended for launching untrusted code from the Web e.g. javaws"
sed -r -e 's|([^/.])java([^./])|\1alt-java\2|g' %{top_level_dir_name}/src/java.base/share/man/java.md | \
sed -e 's|JAVA(|ALT-JAVA(|' | \
sed -e "s|java - launch a Java application|alt-java - ${altjavatext}|" >> ${altjavamanpage}
# The OpenJDK version file includes the current
# upstream version information. For some reason,
@ -1362,6 +1375,7 @@ function installjdk() {
# legacy-jre-image target does not install any man pages for the JRE
# We copy the jdk man directory and then remove pages for binaries that
# don't exist in the JRE
%if %{pandoc_available}
cp -a ${jdkimagepath}/man ${jreimagepath}
for manpage in $(find ${jreimagepath}/man -name '*.1'); do
filename=$(basename ${manpage});
@ -1371,6 +1385,7 @@ function installjdk() {
rm -f ${manpage};
fi;
done
%endif
for imagepath in ${jdkimagepath} ${jreimagepath} ${unstripped}; do
@ -1521,7 +1536,7 @@ function packagejdk() {
%if %{with_systemtap}
cp -a ${tapsetdir}* ${miscname}
%endif
cp -av ${altjavadir}/%{alt_java_name}{,.1} ${miscname}
cp -av ${altjavadir}/%{alt_java_name} ${miscname}
createtar ${miscname} ${miscarchive}
genchecksum ${miscarchive}
fi
@ -1562,10 +1577,6 @@ function packagejdk() {
echo "Building %{SOURCE11}"
mkdir -p %{altjavaoutputdir}
LD_LIBRARY_PATH="${LIBPATH}" ${GCC} ${EXTRA_CFLAGS} -o %{altjavaoutputdir}/%{alt_java_name} %{SOURCE11}
echo "Generating %{alt_java_name} man page"
altjavamanpage=%{altjavaoutputdir}/%{alt_java_name}.1
echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > ${altjavamanpage}
cat %{top_level_dir_name}/src/java.base/share/man/java.1 >> ${altjavamanpage}
echo "Building %{newjavaver}-%{buildver}, pre=%{ea_designator}, opt=%{lts_designator}"
@ -1719,14 +1730,14 @@ $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -versi
unzip -l $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe'
# Check class files include useful debugging information
$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
$JAVA_HOME/bin/javap -c -l java.lang.Object | grep "Compiled from"
$JAVA_HOME/bin/javap -c -l java.lang.Object | grep LineNumberTable
$JAVA_HOME/bin/javap -c -l java.lang.Object | grep LocalVariableTable
# Check generated class files include useful debugging information
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
$JAVA_HOME/bin/javap -c -l java.nio.ByteBuffer | grep "Compiled from"
$JAVA_HOME/bin/javap -c -l java.nio.ByteBuffer | grep LineNumberTable
$JAVA_HOME/bin/javap -c -l java.nio.ByteBuffer | grep LocalVariableTable
%else
@ -1958,6 +1969,15 @@ done
%endif
%changelog
* Wed Nov 05 2025 Andrew Hughes <gnu.andrew@redhat.com> - 1:24.0.2.0.12-1
- Update to jdk-24.0.2+12 (GA)
- Update release notes with features of JDK 24
- Generate alt-java.md during prep following removal of pre-generated man pages in JDK-8344056
- Introduce pandoc_available global for conditional handling of both pandoc dependency and manpages
- Adjust TestTranslations.java with updated German translations from CLDR 46 (JDK-8333582) (Mountain->Mountains)
- Run javap with the disassembled code (-c) option now required for -l by JDK-8345145
- Related: RHELBU-3203
* Sat Oct 25 2025 Andrew Hughes <gnu.andrew@redhat.com> - 1:23.0.2.0.7-1
- Update to jdk-23.0.2+7 (GA)
- Update release notes with features of JDK 23

View File

@ -2482,6 +2482,7 @@ exit 0
- alt-java man page installation is now handled by the OpenJDK build
- Adjust TestTranslations.java with updated German translations from CLDR 46 (JDK-8333582) (Mountain->Mountains)
- Run javap with the disassembled code (-c) option now required for -l by JDK-8345145
- Sync the copy of the portable specfile with the latest update
- Related: RHEL-120553
* Sat Oct 25 2025 Andrew Hughes <gnu.andrew@redhat.com> - 1:23.0.2.0.7-1