From 2c8da5a112721dcce5db30aa1d48b02f0a598925 Mon Sep 17 00:00:00 2001 From: tigro Date: Thu, 23 Jan 2025 13:51:21 +0300 Subject: [PATCH] import java-17-openjdk-portable-17.0.14.0.7-1.el8 --- .gitignore | 2 +- .java-17-openjdk-portable.metadata | 2 +- SPECS/java-17-openjdk-portable.spec | 195 +++++++++++++++++----------- 3 files changed, 123 insertions(+), 76 deletions(-) diff --git a/.gitignore b/.gitignore index da8a369..ab843d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ SOURCES/tapsets-icedtea-6.0.0pre00-c848b93a8598.tar.xz -SOURCES/openjdk-17.0.13+11.tar.xz +SOURCES/openjdk-17.0.14+7.tar.xz diff --git a/.java-17-openjdk-portable.metadata b/.java-17-openjdk-portable.metadata index ed8aaf9..25f988a 100644 --- a/.java-17-openjdk-portable.metadata +++ b/.java-17-openjdk-portable.metadata @@ -1,2 +1,2 @@ c8281ee37b77d535c9c1af86609a531958ff7b34 SOURCES/tapsets-icedtea-6.0.0pre00-c848b93a8598.tar.xz -d8fdb1feceb3941a7f42642a070453290e336135 SOURCES/openjdk-17.0.13+11.tar.xz +9a22dd5bbab0d3755b8d391790dd63650b19f5bc SOURCES/openjdk-17.0.14+7.tar.xz diff --git a/SPECS/java-17-openjdk-portable.spec b/SPECS/java-17-openjdk-portable.spec index d9c3b7e..594d535 100644 --- a/SPECS/java-17-openjdk-portable.spec +++ b/SPECS/java-17-openjdk-portable.spec @@ -146,6 +146,8 @@ %else %global gdb_arches %{jit_arches} %{zero_arches} %endif +# Architecture on which we run Java only tests +%global jdk_test_arch x86_64 # By default, we build a slowdebug build during main build on JIT architectures %if %{with slowdebug} @@ -313,7 +315,7 @@ # New Version-String scheme-style defines %global featurever 17 %global interimver 0 -%global updatever 13 +%global updatever 14 %global patchver 0 # buildjdkver is usually same as %%{featurever}, # but in time of bootstrap of next jdk, it is featurever-1, @@ -345,11 +347,11 @@ # Define what url should JVM 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=%{component}&version=epel%{epel} +%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20EPEL&component=%{name}&version=epel%{epel} %else %if 0%{?fedora} # Does not work for rawhide, keeps the version field empty -%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{component}&version=%{fedora} +%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}&version=%{fedora} %else %if 0%{?rhel} %global oj_vendor_bug_url https://access.redhat.com/support/cases/ @@ -377,7 +379,7 @@ %global origin_nice OpenJDK %global top_level_dir_name %{vcstag} %global top_level_dir_name_backup %{top_level_dir_name}-backup -%global buildver 11 +%global buildver 7 %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 @@ -428,9 +430,9 @@ %define uniquesuffix() %{expand:%{fullversion}.%{_arch}%{?1}} # portable only declarations %global jreimage jre -%define jreportablenameimpl() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable%{1}.jre;g") -%define jdkportablenameimpl() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable%{1}.jdk;g") -%define staticlibsportablenameimpl() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable%{1}.static-libs;g") +%define jreportablenameimpl() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\+\\)*;portable%{1}.jre;g") +%define jdkportablenameimpl() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\+\\)*;portable%{1}.jdk;g") +%define staticlibsportablenameimpl() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\+\\)*;portable%{1}.static-libs;g") %define jreportablearchive() %{expand:%{jreportablenameimpl -- %%{1}}.tar.xz} %define jdkportablearchive() %{expand:%{jdkportablenameimpl -- %%{1}}.tar.xz} %define staticlibsportablearchive() %{expand:%{staticlibsportablenameimpl -- %%{1}}.tar.xz} @@ -439,9 +441,9 @@ # Intentionally use jdkportablenameimpl here since we want to have static-libs files overlayed on # top of the JDK archive %define staticlibsportablename() %{expand:%{jdkportablenameimpl -- %%{1}}} -%define docportablename() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable.docs;g") +%define docportablename() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\+\\)*;portable.docs;g") %define docportablearchive() %{docportablename}.tar.xz -%define miscportablename() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable.misc;g") +%define miscportablename() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\+\\)*;portable.misc;g") %define miscportablearchive() %{miscportablename}.tar.xz ################################################################# @@ -606,7 +608,7 @@ Source18: TestTranslations.java Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch # This patch is almost certainly not needed, but I am keeping it # forever because java.security has shipped to customers already, and -# is marked %config(noreplace). I do not want to risk +# is marked %%config(noreplace). I do not want to risk # warnings/confusion/conflict by changing its default contents # mid-lifecycle. # NSS via SunPKCS11 Provider (commented out due to memory leak). @@ -619,10 +621,10 @@ Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-d # Crypto policy and FIPS support patches # Patch is generated from the fips-17u tree at https://github.com/rh-openjdk/jdk/tree/fips-17u -# as follows: git diff %%{vcstag} src make test > fips-17u-$(git show -s --format=%h HEAD).patch +# as follows: git diff %%{vcstag} src make test > fips-17u-$(git show -s --format=%%h HEAD).patch # Diff is limited to src and make subdirectories to exclude .github changes # The following list is generated by: -# git log %%{vcstag}.. --no-merges --format=%s --reverse +# git log %%{vcstag}.. --no-merges --format=%%s --reverse # Fixes currently included: # PR3183, RH1340845: Support Fedora & RHEL system crypto policy # PR3695: Allow system crypto policy enforcement to be toggled on/off @@ -752,7 +754,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 @@ -760,7 +762,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 @@ -963,16 +965,16 @@ sh %{SOURCE12} %{top_level_dir_name} # Patch the JDK pushd %{top_level_dir_name} # This syntax is deprecated: -# %patchN [...] +# %%patchN [...] # and should be replaced with: -# %patch -PN [...] +# %%patch -PN [...] # For example: -# %patch1001 -p1 +# %%patch1001 -p1 # becomes: -# %patch -P1001 -p1 +# %%patch -P1001 -p1 # The replacement format suggested by recent (circa Fedora 38) RPM # deprecation messages: -# %patch N [...] +# %%patch N [...] # is not backward-compatible with prior (circa RHEL-8) versions of # rpmbuild. %patch -P1 -p1 @@ -1144,7 +1146,7 @@ function buildjdk() { mkdir -p ${outputdir} pushd ${outputdir} - # Note: zlib and freetype use %{link_type} + # Note: zlib and freetype use %%{link_type} # rather than ${link_opt} as the system versions # are always used in a system_libs build, even # for the static library build @@ -1388,17 +1390,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} find ${jdkname} -print0 | LC_ALL=C sort -z | tar ${tar_opts} ${unstrippedarchive} @@ -1412,6 +1407,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} + find ${jdkname} -name \*.debuginfo -print0 | LC_ALL=C sort -z | tar ${tar_opts} ${debugarchive} genchecksum ${debugarchive} @@ -1551,6 +1555,9 @@ export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage} $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -version %endif +# Only test on one architecture (the fastest) for Java only tests +%ifarch %{jdk_test_arch} + # 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 @@ -1573,16 +1580,6 @@ $JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=tru $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 - %if ! 0%{?flatpak} # Check translations are available for new timezones (during flatpak builds, the # tzdb.dat used by this test is not where the test expects it, so this is @@ -1593,6 +1590,36 @@ $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 %endif +# Check src.zip has all sources. See RHBZ#1130490 +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 + +# 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 + +%else + +# Just run a basic java -version test on other architectures +$JAVA_HOME/bin/java -version + +%endif + +# 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 + %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} @@ -1673,19 +1700,6 @@ EOF grep 'JavaCallWrapper::JavaCallWrapper' gdb.out %endif -# Check src.zip has all sources. See RHBZ#1130490 -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 - -# 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 - # build cycles check done @@ -1701,12 +1715,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} @@ -1721,23 +1733,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 ; @@ -1755,6 +1767,8 @@ done # placeholder %endif +%if %{include_normal_build} + %files devel %{_jvmdir}/%{jdkportablearchive -- %%{nil}} %{_jvmdir}/%{jdkportablearchive -- .debuginfo} @@ -1771,6 +1785,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 @@ -1807,18 +1831,41 @@ done %endif -%files docs -%{_jvmdir}/%{docportablearchive} -%{_jvmdir}/%{docportablearchive}.sha256sum - -%files misc -%{_jvmdir}/%{miscportablearchive} -%{_jvmdir}/%{miscportablearchive}.sha256sum - %changelog -* Wed Oct 16 2024 Arkady L. Shane - 1:17.0.13.0.11-1 +* Thu Jan 23 2025 Arkady L. Shane - 1:17.0.14.0.7-1 - Rebuilt for MSVSphere 8.10 +* Mon Jan 13 2025 Thomas Fitzsimmons - 1:17.0.14.0.7-1 +- Update to jdk-17.0.14+7 (GA) +- Add to .gitignore openjdk-17.0.14+7.tar.xz +- Set buildver to 7 +- Set is_ga to 1 +- Update sources to openjdk-17.0.14+7.tar.xz +- Sync NEWS from private-gnu_andrew-rhel-8.5-vanilla +- ** This tarball is embargoed until 2025-01-21 @ 1pm PT. ** + +* Fri Nov 29 2024 Andrew Hughes - 1:17.0.14.0.1-0.1.ea +- Move unstripped, misc and doc tarball handling into normal build / no suffix blocks +- Resolves: OPENJDK-3218 +- Limit Java only tests to one architecture using jdk_test_arch +- Resolves: OPENJDK-3185 + +* Fri Nov 29 2024 Thomas Fitzsimmons - 1:17.0.14.0.1-0.1.ea +- Update to jdk-17.0.14+1 (EA) +- Add to .gitignore openjdk-17.0.14+1-ea.tar.xz +- Set updatever to 14 +- Set buildver to 1 +- Set is_ga to 0 +- Update sources to openjdk-17.0.14+1-ea.tar.xz +- Update NEWS for jdk-17.0.14+1 (EA) +- Double percent signs consistently throughout comments +- Set bundled giflib provide version to 5.2.2 +- Set bundled libpng provide version to 1.6.43 +- Warn about bundled provide version bumps and backouts in openjdk_news.sh +- Support two digit suffixes in portablename macro sed expressions +- Remove 0001-8332174-Remove-2-unpaired-RLO-Unicode-characters-in-.patch file +- Revert: Use component in EPEL and Fedora bug URLs + * Tue Oct 8 2024 Thomas Fitzsimmons - 1:17.0.13.0.11-1 - Update NEWS for jdk-17.0.13+11 (GA)