diff --git a/.gitignore b/.gitignore index 2220563..8ec063f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/openjdk-jdk11u-jdk-11.0.24+8.tar.xz +SOURCES/openjdk-jdk11u-jdk-11.0.25+9.tar.xz SOURCES/tapsets-icedtea-6.0.0pre00-c848b93a8598.tar.xz diff --git a/.java-11-openjdk.metadata b/.java-11-openjdk.metadata index 3acaed9..73a363e 100644 --- a/.java-11-openjdk.metadata +++ b/.java-11-openjdk.metadata @@ -1,2 +1,2 @@ -429facc8a28a96db15d2f08bc6eb5179cc465b70 SOURCES/openjdk-jdk11u-jdk-11.0.24+8.tar.xz +5fd3e49485572a2ac8c350503d872a624c59ddb2 SOURCES/openjdk-jdk11u-jdk-11.0.25+9.tar.xz c8281ee37b77d535c9c1af86609a531958ff7b34 SOURCES/tapsets-icedtea-6.0.0pre00-c848b93a8598.tar.xz diff --git a/SOURCES/java-11-openjdk-portable.specfile b/SOURCES/java-11-openjdk-portable.specfile index 5fa2b58..7d4b118 100644 --- a/SOURCES/java-11-openjdk-portable.specfile +++ b/SOURCES/java-11-openjdk-portable.specfile @@ -1,4 +1,4 @@ -# debug_package %%{nil} is portable-jdks specific +## debug_package %%{nil} is portable-jdks specific %define debug_package %{nil} # RPM conditionals so as to be able to dynamically produce @@ -25,7 +25,7 @@ # Enable static library builds by default. %bcond_without staticlibs # Remove build artifacts by default -%bcond_with artifacts +%bcond_without artifacts # Build a fresh libjvm.so for use in a copy of the bootstrap JDK %bcond_without fresh_libjvm # Build with system libraries @@ -147,6 +147,8 @@ %global zgc_arches x86_64 # Set of architectures for which alt-java has SSB mitigation %global ssbd_arches x86_64 +# Architecture on which we run Java only tests +%global jdk_test_arch x86_64 # Set of architectures where we verify backtraces with gdb # s390x fails on RHEL 7 so we exclude it there %if (0%{?rhel} > 0 && 0%{?rhel} < 8) @@ -339,7 +341,7 @@ # New Version-String scheme-style defines %global featurever 11 %global interimver 0 -%global updatever 24 +%global updatever 25 %global patchver 0 # buildjdkver is usually same as %%{featurever}, # but in time of bootstrap of next jdk, it is featurever-1, @@ -392,8 +394,8 @@ %global origin_nice OpenJDK %global top_level_dir_name %{vcstag} %global top_level_dir_name_backup %{top_level_dir_name}-backup -%global buildver 8 -%global rpmrelease 2 +%global buildver 9 +%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 %if %is_system_jdk @@ -726,9 +728,6 @@ BuildRequires: java-%{buildjdkver}-openjdk-devel %ifarch %{zero_arches} BuildRequires: libffi-devel %endif -# 2024a required as of JDK-8325150 -# Use 2023d until 2024a is in the buildroot -BuildRequires: tzdata-java >= 2023d # cacerts build requirement in portable mode BuildRequires: ca-certificates # Earlier versions have a bug in tree vectorization on PPC @@ -751,7 +750,7 @@ BuildRequires: zlib-devel # Version in src/java.desktop/share/native/libfreetype/include/freetype/freetype.h Provides: bundled(freetype) = 2.13.2 # Version in src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h -Provides: bundled(giflib) = 5.2.1 +Provides: bundled(giflib) = 5.2.2 # Version in src/java.desktop/share/native/libharfbuzz/hb-version.h Provides: bundled(harfbuzz) = 8.2.2 # Version in src/java.desktop/share/native/liblcms/lcms2.h @@ -759,7 +758,7 @@ Provides: bundled(lcms2) = 2.16.0 # Version in src/java.desktop/share/native/libjavajpeg/jpeglib.h Provides: bundled(libjpeg) = 6b # Version in src/java.desktop/share/native/libsplashscreen/libpng/png.h -Provides: bundled(libpng) = 1.6.40 +Provides: bundled(libpng) = 1.6.43 # Version in src/java.base/share/native/libzip/zlib/zlib.h Provides: bundled(zlib) = 1.3.1 # We link statically against libstdc++ to increase portability @@ -1112,13 +1111,14 @@ function stripjdk() { local jreimagepath=${outputdir}/images/%{jreimage} local jmodimagepath=${outputdir}/images/jmods local supportdir=${outputdir}/support + local modulefile=lib/modules if [ "x$suffix" = "x" ] ; then # Keep the unstripped version for consumption by RHEL RPMs cp -a ${jdkimagepath}{,.unstripped} - # Strip the files - for file in $(find ${jdkimagepath} ${jreimagepath} ${supportdir} -type f) ; do + # Strip libraries and executables + for file in $(find ${jdkimagepath} ${jreimagepath} ${supportdir} -type f | grep -v '\.o$' | grep -v '\.debuginfo$' | grep -v '\.class$' ) ; do if file ${file} | grep -q 'ELF'; then noextfile=${file/.so/}; objcopy --only-keep-debug ${file} ${noextfile}.debuginfo; @@ -1132,7 +1132,8 @@ function stripjdk() { echo "Support directory missing."; exit 15 fi - for cmd in $(find ${supportdir} -name '*.jmod.cmdline') ; do + echo "Rebuilding jmod files against the stripped binaries" + for cmd in $(find ${supportdir}/jmods -name '*.jmod.cmdline') ; do jmod=$(cat ${cmd} | sed -r 's|.*support/(.*$)|\1|'); echo "Rebuilding ${jmod} against stripped binaries..."; echo "Removing old jmod ${jmod}..."; @@ -1140,9 +1141,36 @@ function stripjdk() { rm -vf ${jdkimagepath}/jmods/$(basename ${jmod}); echo "Executing $(cat ${cmd})..."; cat ${cmd} | sh -s ; - echo "Moving jmod to image..."; + echo "Moving jmod to image and image/jmods..."; + cp -v ${supportdir}/${jmod} ${jmodimagepath}; mv -v ${supportdir}/${jmod} ${jdkimagepath}/jmods; done + echo "Rebuilding images with stripped modules..." + for image in %{jdkimage} %{jreimage} ; do + outdir=${outputdir}/images/${image}; + jlink=${supportdir}/images/${image}.cmdline; + echo "Running ${jlink}..." + if [ ! -f ${jlink} ]; then + echo "Cannot find JLINK command: ${jlink}" + echo "Supportdir images contains:" + ls -ali ${supportdir}/images + exit 16 + fi + # Backup the existing image as it contains files not generated by jlink + mv ${outdir}{,.bak} + # Regenerate the image using the command generated using the initial build + cat ${jlink} | sh -s; + # Move the new jmods and module file from the new image to the old one + if [ -e ${outdir}.bak/jmods ]; then + rm -rf ${outdir}.bak/jmods; + mv -vf ${outdir}/jmods ${outdir}.bak; + fi + # ... and move the modulefile too... + mv -vf ${outdir}/${modulefile} ${outdir}.bak/$(dirname ${modulefile}); + # Restore the original image + rm -rf ${outdir}; + mv -vf ${outdir}{.bak,}; + done fi } @@ -1235,17 +1263,10 @@ function packagejdk() { jrearchive=${packagesdir}/%{jreportablearchive -- "$nameSuffix"} staticname=%{staticlibsportablename -- "$nameSuffix"} staticarchive=${packagesdir}/%{staticlibsportablearchive -- "$nameSuffix"} - debugarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"} - unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"} - # We only use docs for the release build - docname=%{docportablename} - docarchive=${packagesdir}/%{docportablearchive} - built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip - # These are from the source tree so no debug variants - miscname=%{miscportablename} - miscarchive=${packagesdir}/%{miscportablearchive} if [ "x$suffix" = "x" ] ; then + unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"} + # Keep the unstripped version for consumption by RHEL RPMs mv %{jdkimage}.unstripped ${jdkname} tar -cJf ${unstrippedarchive} ${jdkname} @@ -1259,6 +1280,15 @@ function packagejdk() { # Release images have external debug symbols if [ "x$suffix" = "x" ] ; then + debugarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"} + # We only use docs for the release build + docname=%{docportablename} + docarchive=${packagesdir}/%{docportablearchive} + built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip + # These are from the source tree so no debug variants + miscname=%{miscportablename} + miscarchive=${packagesdir}/%{miscportablearchive} + tar -cJf ${debugarchive} $(find ${jdkname} -name \*.debuginfo) genchecksum ${debugarchive} @@ -1391,48 +1421,58 @@ export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage} $JAVA_HOME//bin/java -XX:+UseShenandoahGC -version %endif -# Check unlimited policy has been used -$JAVA_HOME/bin/javac -d . %{SOURCE13} -$JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel +# Only test on one architecture (the fastest) for Java only tests +%ifarch %{jdk_test_arch} -# Check ECC is working -$JAVA_HOME/bin/javac -d . %{SOURCE14} -$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") + # Check unlimited policy has been used + $JAVA_HOME/bin/javac -d . %{SOURCE13} + $JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel -# Check system crypto (policy) is active and can be disabled -# Test takes a single argument - true or false - to state whether system -# security properties are enabled or not. -$JAVA_HOME/bin/javac -d . %{SOURCE15} -export PROG=$(echo $(basename %{SOURCE15})|sed "s|\.java||") -export SEC_DEBUG="-Djava.security.debug=properties" -#Portable specific: set false whereas its true for upstream -$JAVA_HOME/bin/java ${SEC_DEBUG} ${PROG} false -$JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=true ${PROG} false + # Check ECC is working + $JAVA_HOME/bin/javac -d . %{SOURCE14} + $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") -# Check correct vendor values have been set -$JAVA_HOME/bin/javac -d . %{SOURCE16} -$JAVA_HOME/bin/java $(echo $(basename %{SOURCE16})|sed "s|\.java||") "%{oj_vendor}" "%{oj_vendor_url}" "%{oj_vendor_bug_url}" "%{oj_vendor_version}" + # Check system crypto (policy) is active and can be disabled + # Test takes a single argument - true or false - to state whether system + # security properties are enabled or not. + $JAVA_HOME/bin/javac -d . %{SOURCE15} + export PROG=$(echo $(basename %{SOURCE15})|sed "s|\.java||") + export SEC_DEBUG="-Djava.security.debug=properties" + #Portable specific: set false whereas its true for upstream + $JAVA_HOME/bin/java ${SEC_DEBUG} ${PROG} false + $JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=true ${PROG} false -# Check java launcher has no SSB mitigation -if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi + # Check correct vendor values have been set + $JAVA_HOME/bin/javac -d . %{SOURCE16} + $JAVA_HOME/bin/java $(echo $(basename %{SOURCE16})|sed "s|\.java||") "%{oj_vendor}" "%{oj_vendor_url}" "%{oj_vendor_bug_url}" "%{oj_vendor_version}" + + # Check java launcher has no SSB mitigation + if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi + + # Check alt-java launcher has SSB mitigation on supported architectures + %ifarch %{ssbd_arches} + nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation + %else + if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi + %endif + + # Check translations are available for new timezones + $JAVA_HOME/bin/javac -d . %{SOURCE18} + $JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE + $JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|sed "s|\.java||") CLDR + + %if %{include_staticlibs} + # Check debug symbols in static libraries (smoke test) + export STATIC_LIBS_HOME=${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image} + readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c + readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c + %endif -# Check alt-java launcher has SSB mitigation on supported architectures -%ifarch %{ssbd_arches} -nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation %else -if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi -%endif -# Check translations are available for new timezones -$JAVA_HOME/bin/javac -d . %{SOURCE18} -$JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE -$JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|sed "s|\.java||") CLDR + # Just run a basic java -version test on other architectures + $JAVA_HOME/bin/java -version -%if %{include_staticlibs} -# Check debug symbols in static libraries (smoke test) -export STATIC_LIBS_HOME=${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image} -readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c -readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c %endif # Release builds strip the debug symbols into external .debuginfo files @@ -1534,12 +1574,10 @@ for suffix in %{build_loop} ; do nameSuffix=`echo "$suffix"| sed s/-/./` fi - # These definitions should match those in installjdk + # These definitions should match those in packagejdk jdkarchive=${packagesdir}/%{jdkportablearchive -- "$nameSuffix"} jrearchive=${packagesdir}/%{jreportablearchive -- "$nameSuffix"} staticarchive=${packagesdir}/%{staticlibsportablearchive -- "$nameSuffix"} - debugarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"} - unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"} mkdir -p $RPM_BUILD_ROOT%{_jvmdir} @@ -1554,23 +1592,23 @@ for suffix in %{build_loop} ; do %endif if [ "x$suffix" = "x" ] ; then + # These definitions should match those in packagejdk + debugarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"} + unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"} + docarchive=${packagesdir}/%{docportablearchive} + miscarchive=${packagesdir}/%{miscportablearchive} + mv ${debugarchive} $RPM_BUILD_ROOT%{_jvmdir}/ mv ${debugarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ mv ${unstrippedarchive} $RPM_BUILD_ROOT%{_jvmdir}/ mv ${unstrippedarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ + mv ${docarchive} $RPM_BUILD_ROOT%{_jvmdir}/ + mv ${docarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ + mv ${miscarchive} $RPM_BUILD_ROOT%{_jvmdir}/ + mv ${miscarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ fi done -# These definitions should match those in installjdk -# Install outside the loop as there are no debug variants -docarchive=${packagesdir}/%{docportablearchive} -miscarchive=${packagesdir}/%{miscportablearchive} - -mv ${docarchive} $RPM_BUILD_ROOT%{_jvmdir}/ -mv ${docarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ -mv ${miscarchive} $RPM_BUILD_ROOT%{_jvmdir}/ -mv ${miscarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ - # To show sha in the build log for file in `ls $RPM_BUILD_ROOT%{_jvmdir}/*.sha256sum` ; do ls -l $file ; @@ -1588,6 +1626,8 @@ done # placeholder %endif +%if %{include_normal_build} + %files devel %{_jvmdir}/%{jdkportablearchive -- %%{nil}} %{_jvmdir}/%{jdkportablearchive -- .debuginfo} @@ -1604,6 +1644,16 @@ done %{_jvmdir}/%{jdkportablearchive -- .unstripped} %{_jvmdir}/%{jdkportablearchive -- .unstripped}.sha256sum +%files docs +%{_jvmdir}/%{docportablearchive} +%{_jvmdir}/%{docportablearchive}.sha256sum + +%files misc +%{_jvmdir}/%{miscportablearchive} +%{_jvmdir}/%{miscportablearchive}.sha256sum + +%endif + %if %{include_debug_build} %files slowdebug @@ -1640,15 +1690,58 @@ done %endif -%files docs -%{_jvmdir}/%{docportablearchive} -%{_jvmdir}/%{docportablearchive}.sha256sum - -%files misc -%{_jvmdir}/%{miscportablearchive} -%{_jvmdir}/%{miscportablearchive}.sha256sum - %changelog +* Thu Oct 10 2024 Antonio Vieiro - 1:11.0.25.0.9-1 +- Update to jdk-11.0.25+9 (GA) +- Update release notes to 11.0.25+9 +- Switch to GA mode for release +- Resolves: OPENJDK-3090 +- ** This tarball is embargoed until 2024-10-15 @ 1pm PT. ** + +* Mon Oct 07 2024 Antonio Vieiro - 1:11.0.25.0.8-0.2.ea +- Updated NEWS +- Using %bcond_without artifacts + +* Wed Oct 02 2024 Antonio Vieiro - 1:11.0.25.0.8-0.1.ea +- Update to jdk-11.0.25+8 (EA) +- Update release notes to 11.0.25+8 + +* Thu Sep 26 2024 Antonio Vieiro - 1:11.0.25.0.7-0.1.ea +- Update to jdk-11.0.25+7 (EA) +- Update release notes to 11.0.25+7 + +* Thu Sep 12 2024 Antonio Vieiro - 1:11.0.25.0.6-0.1.ea +- Update to jdk-11.0.25+6 (EA) +- Update release notes to 11.0.25+6 + +* Thu Sep 05 2024 Antonio Vieiro - 1:11.0.25.0.5-0.1.ea +- Update to jdk-11.0.25+5 (EA) +- Update release notes to 11.0.25+5 +- Switch to EA mode +- Bump giflib version to 5.2.2 following JDK-8328999 +- Bump libpng version to 1.6.43 following JDK-8329004 + +* Mon Aug 26 2024 Antonio Vieiro - 1:11.0.24.0.8-6 +- Add missing modulefile in stripjdk +- Skip `.o` and others in stripping loop +- Resolves: OPENJDK-3056 + +* Tue Aug 20 2024 Antonio Vieiro - 1:11.0.24.0.8-5 +- Limit Java only tests to one 'jdk_test_arch' +- Resolves: OPENJDK-3184 + +* Mon Aug 19 2024 Antonio Vieiro - 1:11.0.24.0.8-4 +- Rebuild the lib/modules jimage against the updated jmods +- Resolves: OPENJDK-3056 + +* Fri Jul 26 2024 Andrew Hughes - 1:11.0.24.0.8-2 +- Drop unneeded tzdata-java build dependency following 3e3cf8fa2df7bac2f6a60a0ddd596ec39228a3e1 +- Resolves: OPENJDK-3192 + +* Fri Jul 26 2024 Andrew Hughes - 1:11.0.24.0.8-2 +- Move unstripped, misc and doc tarball handling into normal build / no suffix blocks +- Resolves: OPENJDK-3217 + * Wed Jul 10 2024 Andrew Hughes - 1:11.0.24.0.8-2 - Adjusted DTLS & RPATH NEWS entries to match OpenJDK 17 & 21 release notes