From 5ec8cb8593acec19d84d4dfffb634dd9ae3d68bf Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Wed, 21 Aug 2024 15:10:25 +0800 Subject: [PATCH 1/3] update to java-1.8.0-openjdk-1.8.0.422.b05-2.src.rpm Signed-off-by: Zhao Hang --- NEWS | 0 download | 2 +- java-1.8.0-openjdk-portable.specfile | 199 +++++++++------- java-1.8.0-openjdk.spec | 215 ++++++++++-------- ...r_libunpack_and_the_unpack200_binary.patch | 75 +++--- ...libraries.sh => remove-intree-libraries.sh | 0 ...cies.sh => repack_reproducible_policies.sh | 0 7 files changed, 273 insertions(+), 218 deletions(-) create mode 100644 NEWS rename java-1.8.0-openjdk-remove-intree-libraries.sh => remove-intree-libraries.sh (100%) rename repackReproduciblePolycies.sh => repack_reproducible_policies.sh (100%) diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/download b/download index 09306f6..54ec71c 100644 --- a/download +++ b/download @@ -1,2 +1,2 @@ -58d7fcc4ac671cf8452e73ade985b897 shenandoah8u412-b08.tar.xz +fd19cb2805cc20bb377fe580a3b8ad7a shenandoah8u422-b05.tar.xz 870d829d8e1c38e251cc7498032a768a tapsets-icedtea-3.15.0.tar.xz diff --git a/java-1.8.0-openjdk-portable.specfile b/java-1.8.0-openjdk-portable.specfile index 6edeb9d..16b26be 100644 --- a/java-1.8.0-openjdk-portable.specfile +++ b/java-1.8.0-openjdk-portable.specfile @@ -107,6 +107,8 @@ %global ssbd_arches x86_64 # Set of architectures where we verify backtraces with gdb %global gdb_arches %{jit_arches} %{zero_arches} +# Architecture on which we run Java only tests +%global jdk_test_arch x86_64 # By default, we build a debug build during main build on JIT architectures %if %{with slowdebug} @@ -267,7 +269,7 @@ # Define version of OpenJDK 8 used %global project openjdk %global repo shenandoah-jdk8u -%global openjdk_revision 8u412-b08 +%global openjdk_revision 8u422-b05 %global shenandoah_revision shenandoah%{openjdk_revision} # Define IcedTea version used for SystemTap tapsets and desktop file %global icedteaver 3.15.0 @@ -313,7 +315,7 @@ %global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u}) # eg jdk8u60-b27 -> b27 %global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-}) -%global rpmrelease 2 +%global rpmrelease 1 # Define milestone (EA for pre-releases, GA ("fcs") for releases) # Release will be (where N is usually a number starting at 1): # - 0.N%%{?extraver}%%{?dist} for EA releases, @@ -475,9 +477,6 @@ Source17: nss.fips.cfg.in # Ensure translations are available for new timezones Source18: TestTranslations.java -# Disabled in portables -#Source20: repackReproduciblePolycies.sh - # New versions of config files with aarch64 support. This is not upstream yet. Source100: config.guess Source101: config.sub @@ -668,17 +667,15 @@ BuildRequires: nss-devel #BuildRequires: crypto-policies BuildRequires: pkgconfig BuildRequires: xorg-x11-proto-devel -BuildRequires: zip BuildRequires: tar BuildRequires: unzip +BuildRequires: zip # Require a boot JDK which doesn't fail due to RH1482244 BuildRequires: java-%{buildjdkver}-openjdk-devel >= 1.7.0.151-2.6.11.3 # Zero-assembler build requirement %ifarch %{zero_arches} BuildRequires: libffi-devel %endif -# 2024a required as of JDK-8325150 -BuildRequires: tzdata-java >= 2024a # Earlier versions have a bug in tree vectorization on PPC BuildRequires: gcc >= 4.8.3-8 @@ -693,17 +690,18 @@ BuildRequires: giflib-devel BuildRequires: lcms2-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel +BuildRequires: zlib-devel %else -# Version in jdk/src/share/native/java/util/zip/zlib/zlib.h -Provides: bundled(zlib) = 1.2.13 # Version in jdk/src/share/native/sun/awt/giflib/gif_lib.h Provides: bundled(giflib) = 5.2.1 # Version in jdk/src/share/native/sun/java2d/cmm/lcms/lcms2.h -Provides: bundled(lcms2) = 2.10.0 +Provides: bundled(lcms2) = 2.11.0 # Version in jdk/src/share/native/sun/awt/image/jpeg/jpeglib.h Provides: bundled(libjpeg) = 6b # Version in jdk/src/share/native/sun/awt/libpng/png.h Provides: bundled(libpng) = 1.6.39 +# Version in jdk/src/share/native/java/util/zip/zlib/zlib.h +Provides: bundled(zlib) = 1.2.13 # We link statically against libstdc++ to increase portability BuildRequires: libstdc++-static %endif @@ -865,7 +863,6 @@ sh %{SOURCE12} %patch -P105 # Upstreamable fixes -%patch -P502 %patch -P512 %patch -P523 %patch -P528 @@ -875,6 +872,9 @@ sh %{SOURCE12} %patch -P581 %patch -P541 %patch -P12 +pushd %{top_level_dir_name} +%patch -P502 -p1 +popd pushd %{top_level_dir_name} # Add crypto policy and FIPS support @@ -1147,16 +1147,6 @@ function packagejdk() { jdkarchive=${packagesdir}/%{jdkportablearchive -- "$nameSuffix"} jrename=%{jreportablename -- "$nameSuffix"} jrearchive=${packagesdir}/%{jreportablearchive -- "$nameSuffix"} - debugjdkarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"} - debugjrearchive=${packagesdir}/%{jreportablearchive -- "${nameSuffix}.debuginfo"} - unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"} - # We only use docs for the release build - docname=%{docportablename} - docarchive=${packagesdir}/%{docportablearchive} - built_doc_archive=jdk-%{javaver}_%{updatever}%{milestone_version}$suffix-%{buildver}-docs.zip - # These are from the source tree so no debug variants - miscname=%{miscportablename} - miscarchive=${packagesdir}/%{miscportablearchive} # Rename directories for packaging mv %{jdkimage} ${jdkname} @@ -1164,6 +1154,17 @@ function packagejdk() { # Release images have external debug symbols if [ "x$suffix" = "x" ] ; then + debugjdkarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"} + debugjrearchive=${packagesdir}/%{jreportablearchive -- "${nameSuffix}.debuginfo"} + unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"} + # We only use docs for the release build + docname=%{docportablename} + docarchive=${packagesdir}/%{docportablearchive} + built_doc_archive=jdk-%{javaver}_%{updatever}%{milestone_version}$suffix-%{buildver}-docs.zip + # These are from the source tree so no debug variants + miscname=%{miscportablename} + miscarchive=${packagesdir}/%{miscportablearchive} + # Keep the unstripped version for consumption by RHEL RPMs tar ${tar_opts} ${unstrippedarchive} ${jdkname} genchecksum ${unstrippedarchive} @@ -1288,27 +1289,54 @@ for suffix in %{build_loop} ; do export JAVA_HOME=$(pwd)/%{installoutputdir -- $suffix}/images/%{jdkimage} -# Check unlimited policy has been used -$JAVA_HOME/bin/javac -d . %{SOURCE13} -$JAVA_HOME/bin/java TestCryptoLevel +# 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 TestCryptoLevel + + # Check ECC is working + $JAVA_HOME/bin/javac -d . %{SOURCE14} + $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") + + # 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. + # Portable specific: default is false + $JAVA_HOME/bin/javac -d . %{SOURCE15} + export PROG=$(echo $(basename %{SOURCE15})|sed "s|\.java||") + export SEC_DEBUG="-Djava.security.debug=properties" + $JAVA_HOME/bin/java ${SEC_DEBUG} ${PROG} false + $JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=true ${PROG} false + + # 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} -# Check ECC is working -$JAVA_HOME/bin/javac -d . %{SOURCE14} -$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") + # Check translations are available for new timezones + $JAVA_HOME/bin/javac -d . %{SOURCE18} + $JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE -# 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 src.zip has all sources. See RHBZ#1130490 + unzip -l $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe' -# 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} + # 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 @@ -1320,10 +1348,6 @@ nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation 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 - # Release builds strip the debug symbols into external .debuginfo files if [ "x$suffix" = "x" ] ; then so_suffix="debuginfo" @@ -1397,19 +1421,6 @@ EOF grep 'JavaCallWrapper::JavaCallWrapper' gdb.out %endif -# Check src.zip has all sources. See RHBZ#1130490 -jar -tf $JAVA_HOME/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 @@ -1425,12 +1436,9 @@ 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"} - debugjdkarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"} - debugjrearchive=${packagesdir}/%{jreportablearchive -- "${nameSuffix}.debuginfo"} - unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"} mkdir -p $RPM_BUILD_ROOT%{_jvmdir} @@ -1440,24 +1448,26 @@ for suffix in %{build_loop} ; do mv ${jrearchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ if [ "x$suffix" = "x" ] ; then + # These definitions should match those in packagejdk + debugjdkarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"} + debugjrearchive=${packagesdir}/%{jreportablearchive -- "${nameSuffix}.debuginfo"} + unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"} + docarchive=${packagesdir}/%{docportablearchive} + miscarchive=${packagesdir}/%{miscportablearchive} + mv ${debugjdkarchive} $RPM_BUILD_ROOT%{_jvmdir}/ mv ${debugjdkarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ mv ${debugjrearchive} $RPM_BUILD_ROOT%{_jvmdir}/ mv ${debugjrearchive}.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}/ +done # To show sha in the build log for file in `ls $RPM_BUILD_ROOT%{_jvmdir}/*.sha256sum` ; do @@ -1465,7 +1475,6 @@ for file in `ls $RPM_BUILD_ROOT%{_jvmdir}/*.sha256sum` ; do cat $file ; done - %if %{include_normal_build} %files @@ -1474,23 +1483,36 @@ done %{_jvmdir}/%{jreportablearchive -- .debuginfo} %{_jvmdir}/%{jreportablearchive -- %%{nil}}.sha256sum %{_jvmdir}/%{jreportablearchive -- .debuginfo}.sha256sum + %else + %files # placeholder + %endif %if %{include_normal_build} + %files devel %{_jvmdir}/%{jdkportablearchive -- %%{nil}} %{_jvmdir}/%{jdkportablearchive -- .debuginfo} %{_jvmdir}/%{jdkportablearchive -- %%{nil}}.sha256sum %{_jvmdir}/%{jdkportablearchive -- .debuginfo}.sha256sum -%endif %files unstripped %{_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 @@ -1500,6 +1522,7 @@ done %files devel-slowdebug %{_jvmdir}/%{jdkportablearchive -- .slowdebug} %{_jvmdir}/%{jdkportablearchive -- .slowdebug}.sha256sum + %endif %if %{include_fastdebug_build} @@ -1514,15 +1537,29 @@ done %endif -%files docs -%{_jvmdir}/%{docportablearchive} -%{_jvmdir}/%{docportablearchive}.sha256sum - -%files misc -%{_jvmdir}/%{miscportablearchive} -%{_jvmdir}/%{miscportablearchive}.sha256sum - %changelog +* Wed Jul 10 2024 Andrew Hughes - 1:1.8.0.422.b05-1.1 +- Update to shenandoah-jdk8u422-b05 (GA) +- Update release notes for shenandoah-8u422-b05. +- Rebase PR2462 patch following patched hunk being removed by JDK-8322106 +- Switch to GA mode. +- Limit Java only tests to one architecture using jdk_test_arch +- Remove unused policy repacking script repackReproduciblePolycies.sh +- Sync README.md with RHEL 8 +- Add missing build dependency on zlib-devel +- Update LCMS version to match JDK-8245400 +- Move unstripped, misc and doc tarball handling into normal build / no suffix blocks +- Drop unneeded tzdata-java build dependency following 11d4d3308dd3334acae563101c007be9db017b83 +- ** This tarball is embargoed until 2024-07-16 @ 1pm PT. ** +- Resolves: OPENJDK-3183 +- Resolves: OPENJDK-3187 +- Resolves: OPENJDK-3193 + +* Tue Jul 09 2024 Andrew Hughes - 1:1.8.0.422.b01-0.1.ea +- Update to shenandoah-jdk8u422-b01 (EA) +- Update release notes for shenandoah-8u422-b01. +- Switch to EA mode. + * Wed Apr 10 2024 Andrew Hughes - 1:1.8.0.412.b08-2 - Add CVEs to release notes diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index ba15cc2..41f145b 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 # To rebuild this RPM, you must first rebuild the portable # RPM using the java-1.8.0-openjdk-portable.specfile, install # it and then adjust portablerelease and portablesuffix @@ -109,11 +108,11 @@ # Set of architectures which support multiple ABIs %global multilib_arches %{power64} sparc64 x86_64 # Set of architectures for which we build slowdebug builds -%global debug_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} loongarch64 +%global debug_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} # Set of architectures for which we build fastdebug builds -%global fastdebug_arches x86_64 ppc64le aarch64 loongarch64 +%global fastdebug_arches x86_64 ppc64le aarch64 # Set of architectures with a Just-In-Time (JIT) compiler -%global jit_arches %{aarch64} %{ix86} %{power64} sparcv9 sparc64 x86_64 loongarch64 +%global jit_arches %{aarch64} %{ix86} %{power64} sparcv9 sparc64 x86_64 # Set of architectures which use the Zero assembler port (!jit_arches) %global zero_arches %{arm} ppc s390 s390x # Set of architectures which run a full bootstrap cycle @@ -121,11 +120,11 @@ # Set of architectures which support SystemTap tapsets %global systemtap_arches %{jit_arches} # Set of architectures which support the serviceability agent -%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} loongarch64 +%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} # Set of architectures which support class data sharing # See https://bugzilla.redhat.com/show_bug.cgi?id=513605 # MetaspaceShared::generate_vtable_methods is not implemented for the PPC JIT -%global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} loongarch64 +%global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} # Set of architectures which support Java Flight Recorder (JFR) %global jfr_arches %{jit_arches} # Set of architectures for which alt-java has SSB mitigation @@ -133,7 +132,9 @@ # Set of architectures where we verify backtraces with gdb %global gdb_arches %{jit_arches} %{zero_arches} # Set of architectures for which we have a portable build -%global portable_build_arches %{aarch64} %{ix86} %{power64} s390x x86_64 loongarch64 +%global portable_build_arches %{aarch64} %{ix86} %{power64} s390x x86_64 +# Architecture on which we run Java only tests +%global jdk_test_arch x86_64 # By default, we build a debug build during main build on JIT architectures %if %{with slowdebug} @@ -270,10 +271,6 @@ %global archinstall aarch64 %global stapinstall arm64 %endif -%ifarch loongarch64 -%global archinstall loongarch64 -%global stapinstall loongarch64 -%endif # 32 bit sparc, optimized for v9 %ifarch sparcv9 %global archinstall sparc @@ -302,7 +299,7 @@ # Define version of OpenJDK 8 used %global project openjdk %global repo shenandoah-jdk8u -%global openjdk_revision 8u412-b08 +%global openjdk_revision 8u422-b05 %global shenandoah_revision shenandoah%{openjdk_revision} # Define IcedTea version used for SystemTap tapsets and desktop files %global icedteaver 3.15.0 @@ -348,10 +345,11 @@ %global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u}) # eg jdk8u60-b27 -> b27 %global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-}) +# rpmrelease numbering must start at 2 to be later than the 8.6 RPM %global rpmrelease 2 # Settings used by the portable build -%global portablerelease 2%{anolis_release} -%global portablesuffix an8 +%global portablerelease 1 +%global portablesuffix el8 %global portablebuilddir /builddir/build/BUILD # Define milestone (EA for pre-releases, GA ("fcs") for releases) @@ -1152,8 +1150,7 @@ Requires: ca-certificates # Require javapackages-filesystem for ownership of /usr/lib/jvm/ Requires: javapackages-filesystem # 2024a required as of JDK-8325150 -# Use 2023d until 2024a is in the buildroot -Requires: tzdata-java >= 2023d +Requires: tzdata-java >= 2024a # for support of kernel stream control # libsctp.so.1 is being `dlopen`ed on demand Requires: lksctp-tools%{?_isa} @@ -1202,7 +1199,7 @@ Provides: /usr/bin/jjs %define java_devel_rpo() %{expand: # Requires base package -Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release} OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release} # Post requires alternatives to install tool alternatives Requires(post): %{alternatives_requires} @@ -1280,9 +1277,9 @@ Provides: java-%{javaver}-%{origin}-accessibility = %{epoch}:%{version}-%{releas # Prevent brp-java-repack-jars from being run %global __jar_repack 0 -Name: java-%{javaver}-%{origin} +Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{anolis_release}%{?dist} +Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist} # Equivalent for the portable build %global prelease %{?eaprefix}%{portablerelease}%{?extraver} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons @@ -1295,9 +1292,9 @@ Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{anolis_release}%{?dist} # JDK package >= 1.6.0 to 1, and packages referring to JDK virtual # provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0". -Epoch: 1 +Epoch: 1 Summary: %{origin_nice} %{majorver} Runtime Environment -Group: Development/Languages +Group: Development/Languages # HotSpot code is licensed under GPLv2 # JDK library code is licensed under GPLv2 with the Classpath exception @@ -1309,8 +1306,8 @@ Group: Development/Languages # The test code includes copies of NSS under the Mozilla Public License v2.0 # The PCSClite headers are under a BSD with advertising license # The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version -License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib -URL: http://openjdk.java.net/ +License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib +URL: http://openjdk.java.net/ # Shenandoah HotSpot # openjdk/shenandoah-jdk8u contains an integration forest of @@ -1335,7 +1332,7 @@ Source10: policytool.desktop.in Source11: nss.cfg.in # Removed libraries that we link instead -Source12: %{name}-remove-intree-libraries.sh +Source12: remove-intree-libraries.sh # Ensure we aren't using the limited crypto policy Source13: TestCryptoLevel.java @@ -1355,8 +1352,6 @@ Source17: nss.fips.cfg.in # Ensure translations are available for new timezones Source18: TestTranslations.java -Source21: repackReproduciblePolycies.sh - # New versions of config files with aarch64 support. This is not upstream yet. Source100: config.guess Source101: config.sub @@ -1364,6 +1359,10 @@ Source101: config.sub # Include portable spec and instructions on how to rebuild Source19: README.md Source20: java-1.%{majorver}.0-openjdk-portable.specfile +Source21: NEWS + +# Repack export policy JARs with reproducible timestamps +Source22: repack_reproducible_policies.sh # Setup variables to reference correct sources %global releasezip %{_jvmdir}/%{name}-portable-%{version}-%{prelease}.portable.unstripped.jdk.%{_arch}.tar.xz @@ -1383,7 +1382,7 @@ Source20: java-1.%{majorver}.0-openjdk-portable.specfile # Accessibility patches # Ignore AWTError when assistive technologies are loaded -Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch +Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch # Turn on AssumeMP by default on RHEL systems Patch534: rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch # RH1648249: Add PKCS11 provider to java.security @@ -1558,8 +1557,9 @@ BuildRequires: nss-devel BuildRequires: crypto-policies BuildRequires: pkgconfig BuildRequires: xorg-x11-proto-devel -BuildRequires: zip +BuildRequires: tar BuildRequires: unzip +BuildRequires: zip # For definitions and macros like jvmdir BuildRequires: javapackages-filesystem %if %{include_normal_build} @@ -1578,8 +1578,7 @@ BuildRequires: java-1.%{majorver}.0-openjdk-portable-misc = %{epoch}:%{version}- BuildRequires: libffi-devel %endif # 2024a required as of JDK-8325150 -# Use 2023d until 2024a is in the buildroot -BuildRequires: tzdata-java >= 2023d +BuildRequires: tzdata-java >= 2024a # Earlier versions have a bug in tree vectorization on PPC BuildRequires: gcc >= 4.8.3-8 @@ -1592,17 +1591,18 @@ BuildRequires: giflib-devel BuildRequires: lcms2-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel +BuildRequires: zlib-devel %else -# Version in jdk/src/share/native/java/util/zip/zlib/zlib.h -Provides: bundled(zlib) = 1.2.13 # Version in jdk/src/share/native/sun/awt/giflib/gif_lib.h Provides: bundled(giflib) = 5.2.1 # Version in jdk/src/share/native/sun/java2d/cmm/lcms/lcms2.h -Provides: bundled(lcms2) = 2.10.0 +Provides: bundled(lcms2) = 2.11.0 # Version in jdk/src/share/native/sun/awt/image/jpeg/jpeglib.h Provides: bundled(libjpeg) = 6b # Version in jdk/src/share/native/sun/awt/libpng/png.h Provides: bundled(libpng) = 1.6.39 +# Version in jdk/src/share/native/java/util/zip/zlib/zlib.h +Provides: bundled(zlib) = 1.2.13 %endif # this is always built, also during debug-only build @@ -1615,7 +1615,7 @@ The %{origin_nice} %{majorver} runtime environment. %if %{include_debug_build} %package slowdebug Summary: %{origin_nice} %{majorver} Runtime Environment %{debug_on} -Group: Development/Languages +Group: Development/Languages %{java_rpo -- %{debug_suffix_unquoted}} %description slowdebug @@ -1626,7 +1626,7 @@ The %{origin_nice} %{majorver} runtime environment. %if %{include_fastdebug_build} %package fastdebug Summary: %{origin_nice} %{majorver} Runtime Environment %{fastdebug_on} -Group: Development/Languages +Group: Development/Languages %{java_rpo -- %{fastdebug_suffix_unquoted}} %description fastdebug @@ -1637,7 +1637,7 @@ The %{origin_nice} %{majorver} runtime environment. %if %{include_normal_build} %package headless Summary: %{origin_nice} %{majorver} Headless Runtime Environment -Group: Development/Languages +Group: Development/Languages %{java_headless_rpo %{nil}} @@ -1648,7 +1648,7 @@ The %{origin_nice} %{majorver} runtime environment without audio and video suppo %if %{include_debug_build} %package headless-slowdebug Summary: %{origin_nice} %{majorver} Runtime Environment %{debug_on} -Group: Development/Languages +Group: Development/Languages %{java_headless_rpo -- %{debug_suffix_unquoted}} @@ -1660,7 +1660,7 @@ The %{origin_nice} %{majorver} runtime environment without audio and video suppo %if %{include_fastdebug_build} %package headless-fastdebug Summary: %{origin_nice} %{majorver} Runtime Environment %{fastdebug_on} -Group: Development/Languages +Group: Development/Languages %{java_headless_rpo -- %{fastdebug_suffix_unquoted}} @@ -1672,7 +1672,7 @@ The %{origin_nice} %{majorver} runtime environment without audio and video suppo %if %{include_normal_build} %package devel Summary: %{origin_nice} %{majorver} Development Environment -Group: Development/Tools +Group: Development/Tools %{java_devel_rpo %{nil}} @@ -1683,7 +1683,7 @@ The %{origin_nice} %{majorver} development tools. %if %{include_debug_build} %package devel-slowdebug Summary: %{origin_nice} %{majorver} Development Environment %{debug_on} -Group: Development/Tools +Group: Development/Tools %{java_devel_rpo -- %{debug_suffix_unquoted}} @@ -1695,7 +1695,7 @@ The %{origin_nice} %{majorver} development tools. %if %{include_fastdebug_build} %package devel-fastdebug Summary: %{origin_nice} %{majorver} Development Environment %{fastdebug_on} -Group: Development/Tools +Group: Development/Tools %{java_devel_rpo -- %{fastdebug_suffix_unquoted}} @@ -1707,7 +1707,7 @@ The %{origin_nice} %{majorver} development tools. %if %{include_normal_build} %package demo Summary: %{origin_nice} %{majorver} Demos -Group: Development/Languages +Group: Development/Languages %{java_demo_rpo %{nil}} @@ -1718,7 +1718,7 @@ The %{origin_nice} %{majorver} demos. %if %{include_debug_build} %package demo-slowdebug Summary: %{origin_nice} %{majorver} Demos %{debug_on} -Group: Development/Languages +Group: Development/Languages %{java_demo_rpo -- %{debug_suffix_unquoted}} @@ -1730,7 +1730,7 @@ The %{origin_nice} %{majorver} demos. %if %{include_fastdebug_build} %package demo-fastdebug Summary: %{origin_nice} %{majorver} Demos %{fastdebug_on} -Group: Development/Languages +Group: Development/Languages %{java_demo_rpo -- %{fastdebug_suffix_unquoted}} @@ -1742,7 +1742,7 @@ The %{origin_nice} %{majorver} demos. %if %{include_normal_build} %package src Summary: %{origin_nice} %{majorver} Source Bundle -Group: Development/Languages +Group: Development/Languages %{java_src_rpo %{nil}} @@ -1754,7 +1754,7 @@ class library source code for use by IDE indexers and debuggers. %if %{include_debug_build} %package src-slowdebug Summary: %{origin_nice} %{majorver} Source Bundle %{for_debug} -Group: Development/Languages +Group: Development/Languages %{java_src_rpo -- %{debug_suffix_unquoted}} @@ -1766,7 +1766,7 @@ The %{compatiblename}-src-slowdebug sub-package contains the complete %{origin_n %if %{include_fastdebug_build} %package src-fastdebug Summary: %{origin_nice} %{majorver} Source Bundle %{for_fastdebug} -Group: Development/Languages +Group: Development/Languages %{java_src_rpo -- %{fastdebug_suffix_unquoted}} @@ -1778,7 +1778,7 @@ The %{compatiblename}-src-fastdebug sub-package contains the complete %{origin_n %if %{include_normal_build} %package javadoc Summary: %{origin_nice} %{majorver} API documentation -Group: Documentation +Group: Documentation Requires: javapackages-filesystem Obsoletes: javadoc-slowdebug < 1:1.8.0.212.b04-4 BuildArch: noarch @@ -1791,7 +1791,7 @@ The %{origin_nice} %{majorver} API documentation. %package javadoc-zip Summary: %{origin_nice} %{majorver} API documentation compressed in a single archive -Group: Documentation +Group: Documentation Requires: javapackages-filesystem Obsoletes: javadoc-zip-slowdebug < 1:1.8.0.212.b04-4 BuildArch: noarch @@ -1890,10 +1890,8 @@ ln -s %{top_level_dir_name} openjdk # # the configure macro will do this too, but it also passes a few flags not # supported by openjdk configure script -%ifnarch loongarch64 cp %{SOURCE100} %{top_level_dir_name}/common/autoconf/build-aux/ cp %{SOURCE101} %{top_level_dir_name}/common/autoconf/build-aux/ -%endif # OpenJDK patches @@ -1924,7 +1922,6 @@ sh %{SOURCE12} %patch -P204 %endif -%ifnarch loongarch64 %patch -P1 %patch -P5 @@ -1939,7 +1936,6 @@ sh %{SOURCE12} %patch -P105 # Upstreamable fixes -%patch -P502 %patch -P512 %patch -P523 %patch -P528 @@ -1949,7 +1945,9 @@ sh %{SOURCE12} %patch -P581 %patch -P541 %patch -P12 -%endif +pushd %{top_level_dir_name} +%patch -P502 -p1 +popd pushd %{top_level_dir_name} # Add crypto policy and FIPS support @@ -2085,22 +2083,53 @@ for suffix in %{build_loop} ; do export JAVA_HOME=$(pwd)/%{installoutputdir -- $suffix} -# Check unlimited policy has been used -$JAVA_HOME/bin/javac -d . %{SOURCE13} -$JAVA_HOME/bin/java TestCryptoLevel +# 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 TestCryptoLevel + + # Check ECC is working + $JAVA_HOME/bin/javac -d . %{SOURCE14} + $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") + + # 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" + $JAVA_HOME/bin/java ${SEC_DEBUG} ${PROG} true + $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} -# 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" -$JAVA_HOME/bin/java ${SEC_DEBUG} ${PROG} true -$JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=true ${PROG} false + # Check translations are available for new timezones + $JAVA_HOME/bin/javac -d . %{SOURCE18} + $JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE + + # Check src.zip has all sources. See RHBZ#1130490 + unzip -l $JAVA_HOME/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 @@ -2112,14 +2141,6 @@ nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi %endif -# 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} - -# Check translations are available for new timezones -$JAVA_HOME/bin/javac -d . %{SOURCE18} -$JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE - # Check debug symbols are present and can identify code find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib do @@ -2186,19 +2207,6 @@ EOF grep 'JavaCallWrapper::JavaCallWrapper' gdb.out %endif -# Check src.zip has all sources. See RHBZ#1130490 -unzip -l $JAVA_HOME/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 @@ -2344,7 +2352,7 @@ find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \ popd -bash %{SOURCE21} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix} %{javaver} +bash %{SOURCE22} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix} %{javaver} # https://bugzilla.redhat.com/show_bug.cgi?id=1183793 touch -t 201401010000 $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/security/java.security @@ -2663,9 +2671,30 @@ cjc.mainProgram(args) %endif %changelog -* Thu Apr 25 2024 Hong Wei Qin - 1:1.8.0.412.b08-2.0.1 -- Update portable pkg dist -- Add loongarch64 base support (zhaixiang@loongson.cn) +* Wed Jul 10 2024 Andrew Hughes - 1:1.8.0.422.b05-1.1 +- Update to shenandoah-jdk8u422-b05 (GA) +- Update release notes for shenandoah-8u422-b05. +- Rebase PR2462 patch following patched hunk being removed by JDK-8322106 +- Switch to GA mode. +- Sync the copy of the portable specfile with the latest update +- Actually require tzdata 2024a now it is available in the buildroot +- Add missing build dependencies on zlib-devel and tar +- Update LCMS version to match JDK-8245400 +- ** This tarball is embargoed until 2024-07-16 @ 1pm PT. ** +- Resolves: RHEL-46866 +- Resolves: RHEL-47001 + +* Tue Jul 09 2024 Andrew Hughes - 1:1.8.0.422.b01-0.1.ea +- Update to shenandoah-jdk8u422-b01 (EA) +- Update release notes for shenandoah-8u422-b01. +- Switch to EA mode. +- Sync the copy of the portable specfile with the latest update +- Restore NEWS file and rename remove-intree-libraries.sh so portable can be rebuilt +- Document policy repacking script and rename to correct spelling and style +- Limit Java only tests to one architecture using jdk_test_arch +- Related: RHEL-46866 +- Resolves: RHEL-47067 +- Resolves: RHEL-47087 * Mon Apr 08 2024 Andrew Hughes - 1:1.8.0.412.b08-2 - Update to shenandoah-jdk8u412-b08 (GA) diff --git a/pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch b/pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch index 5f05d73..cbb72b6 100644 --- a/pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch +++ b/pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch @@ -7,10 +7,10 @@ 8074839: Resolve disabled warnings for libunpack and the unpack200 binary Reviewed-by: dholmes, ksrini -diff --git openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h +diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h b/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h index bdaf95a2f6a..60c5b4f2a69 100644 ---- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h -+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h +--- a/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h ++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h @@ -63,7 +63,7 @@ struct bytes { bytes res; res.ptr = ptr + beg; @@ -20,10 +20,10 @@ index bdaf95a2f6a..60c5b4f2a69 100644 return res; } // building C strings inside byte buffers: -diff --git openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp +diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp index 5fbc7261fb3..4c002e779d8 100644 ---- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp -+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp +--- a/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp ++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp @@ -292,7 +292,7 @@ Java_com_sun_java_util_jar_pack_NativeUnpack_getUnusedInput(JNIEnv *env, jobject if (uPtr->aborting()) { @@ -50,10 +50,10 @@ index 5fbc7261fb3..4c002e779d8 100644 const char* prop = env->GetStringUTFChars(pProp, JNI_FALSE); CHECK_EXCEPTION_RETURN_VALUE(prop, false); const char* value = env->GetStringUTFChars(pValue, JNI_FALSE); -diff --git openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp +diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp index 6fbc43a18ae..722c8baaff0 100644 ---- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp -+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp +--- a/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp ++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp @@ -142,31 +142,28 @@ static const char* nbasename(const char* progname) { return progname; } @@ -104,10 +104,10 @@ index 6fbc43a18ae..722c8baaff0 100644 } } -diff --git openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp -index 56f391b1e87..f0a25f8cd20 100644 ---- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp -+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp +diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp +index a585535c513..8df3fade499 100644 +--- a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp ++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp @@ -225,9 +225,9 @@ struct entry { } @@ -120,7 +120,7 @@ index 56f391b1e87..f0a25f8cd20 100644 #endif }; -@@ -718,13 +718,13 @@ void unpacker::read_file_header() { +@@ -719,13 +719,13 @@ void unpacker::read_file_header() { // Now we can size the whole archive. // Read everything else into a mega-buffer. rp = hdr.rp; @@ -138,7 +138,7 @@ index 56f391b1e87..f0a25f8cd20 100644 abort("EOF reading fixed input buffer"); return; } -@@ -738,7 +738,7 @@ void unpacker::read_file_header() { +@@ -739,7 +739,7 @@ void unpacker::read_file_header() { return; } input.set(U_NEW(byte, add_size(header_size_0, archive_size, C_SLOP)), @@ -147,7 +147,7 @@ index 56f391b1e87..f0a25f8cd20 100644 CHECK; assert(input.limit()[0] == 0); // Move all the bytes we read initially into the real buffer. -@@ -961,13 +961,13 @@ void cpool::init(unpacker* u_, int counts[CONSTANT_Limit]) { +@@ -962,13 +962,13 @@ void cpool::init(unpacker* u_, int counts[CONSTANT_Limit]) { nentries = next_entry; // place a limit on future CP growth: @@ -163,18 +163,7 @@ index 56f391b1e87..f0a25f8cd20 100644 // Note that this CP does not include "empty" entries // for longs and doubles. Those are introduced when -@@ -985,8 +985,9 @@ void cpool::init(unpacker* u_, int counts[CONSTANT_Limit]) { - } - - // Initialize *all* our entries once -- for (int i = 0 ; i < maxentries ; i++) -+ for (uint i = 0 ; i < maxentries ; i++) { - entries[i].outputIndex = REQUESTED_NONE; -+ } - - initGroupIndexes(); - // Initialize hashTab to a generous power-of-two size. -@@ -3681,21 +3682,22 @@ void cpool::computeOutputIndexes() { +@@ -3694,21 +3694,22 @@ void cpool::computeOutputIndexes() { unpacker* debug_u; @@ -201,7 +190,7 @@ index 56f391b1e87..f0a25f8cd20 100644 case CONSTANT_Signature: if (value.b.ptr == null) return ref(0)->string(); -@@ -3715,26 +3717,28 @@ char* entry::string() { +@@ -3728,26 +3729,28 @@ char* entry::string() { break; default: if (nrefs == 0) { @@ -239,10 +228,10 @@ index 56f391b1e87..f0a25f8cd20 100644 } void print_cp_entries(int beg, int end) { -diff --git openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h -index cec7a88b24e..ed5f3336a59 100644 ---- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h -+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h +diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h +index 4ec595333c4..aad0c971ef2 100644 +--- a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h ++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h @@ -209,7 +209,7 @@ struct unpacker { byte* rp; // read pointer (< rplimit <= input.limit()) byte* rplimit; // how much of the input block has been read? @@ -252,10 +241,10 @@ index cec7a88b24e..ed5f3336a59 100644 // callback to read at least one byte, up to available input typedef jlong (*read_input_fn_t)(unpacker* self, void* buf, jlong minlen, jlong maxlen); -diff --git openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp -index e5197e1a3f1..40a10055ea5 100644 ---- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp -+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp +diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp +index da39a589545..1281d8b25c8 100644 +--- a/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp ++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp @@ -81,7 +81,7 @@ void breakpoint() { } // hook for debugger int assert_failed(const char* p) { char message[1<<12]; @@ -265,10 +254,10 @@ index e5197e1a3f1..40a10055ea5 100644 breakpoint(); unpack_abort(message); return 0; -diff --git openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp +diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp index f58c94956c0..343da3e183b 100644 ---- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp -+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp +--- a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp ++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp @@ -84,7 +84,7 @@ void jar::init(unpacker* u_) { } @@ -293,10 +282,10 @@ index f58c94956c0..343da3e183b 100644 PRINTCR((2, "writing zip comment\n")); // Write the comment. -diff --git openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h +diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h index 14ffc9d65bd..9877f6f68ca 100644 ---- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h -+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h +--- a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h ++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h @@ -68,8 +68,8 @@ struct jar { } diff --git a/java-1.8.0-openjdk-remove-intree-libraries.sh b/remove-intree-libraries.sh similarity index 100% rename from java-1.8.0-openjdk-remove-intree-libraries.sh rename to remove-intree-libraries.sh diff --git a/repackReproduciblePolycies.sh b/repack_reproducible_policies.sh similarity index 100% rename from repackReproduciblePolycies.sh rename to repack_reproducible_policies.sh -- Gitee From 2918bf00b957ee7e716e41fce3b53888b282afed Mon Sep 17 00:00:00 2001 From: Jacob Wang Date: Sat, 1 Jul 2023 20:10:54 +0800 Subject: [PATCH 2/3] Update dist for portable pkg Signed-off-by: Jacob Wang --- java-1.8.0-openjdk.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 41f145b..c5fb51a 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 # To rebuild this RPM, you must first rebuild the portable # RPM using the java-1.8.0-openjdk-portable.specfile, install # it and then adjust portablerelease and portablesuffix @@ -348,8 +349,8 @@ # rpmrelease numbering must start at 2 to be later than the 8.6 RPM %global rpmrelease 2 # Settings used by the portable build -%global portablerelease 1 -%global portablesuffix el8 +%global portablerelease 1%{anolis_release} +%global portablesuffix an8 %global portablebuilddir /builddir/build/BUILD # Define milestone (EA for pre-releases, GA ("fcs") for releases) @@ -1279,7 +1280,7 @@ Provides: java-%{javaver}-%{origin}-accessibility = %{epoch}:%{version}-%{releas Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist} +Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{anolis_release}%{?dist} # Equivalent for the portable build %global prelease %{?eaprefix}%{portablerelease}%{?extraver} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons @@ -2671,6 +2672,9 @@ cjc.mainProgram(args) %endif %changelog +* Mon Sep 02 2024 Hong Wei Qin - 1:1.8.0.422.b05-1.0.1 +- Update portable pkg dist + * Wed Jul 10 2024 Andrew Hughes - 1:1.8.0.422.b05-1.1 - Update to shenandoah-jdk8u422-b05 (GA) - Update release notes for shenandoah-8u422-b05. -- Gitee From 20900db63539b5bc532463434b7a02efe1585cba Mon Sep 17 00:00:00 2001 From: zhaixiang Date: Thu, 22 Feb 2024 16:33:21 +0800 Subject: [PATCH 3/3] Add loongarch64 base support --- java-1.8.0-openjdk.spec | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index c5fb51a..9fa69a2 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 # To rebuild this RPM, you must first rebuild the portable # RPM using the java-1.8.0-openjdk-portable.specfile, install # it and then adjust portablerelease and portablesuffix @@ -109,11 +109,11 @@ # Set of architectures which support multiple ABIs %global multilib_arches %{power64} sparc64 x86_64 # Set of architectures for which we build slowdebug builds -%global debug_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} +%global debug_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} loongarch64 # Set of architectures for which we build fastdebug builds -%global fastdebug_arches x86_64 ppc64le aarch64 +%global fastdebug_arches x86_64 ppc64le aarch64 loongarch64 # Set of architectures with a Just-In-Time (JIT) compiler -%global jit_arches %{aarch64} %{ix86} %{power64} sparcv9 sparc64 x86_64 +%global jit_arches %{aarch64} %{ix86} %{power64} sparcv9 sparc64 x86_64 loongarch64 # Set of architectures which use the Zero assembler port (!jit_arches) %global zero_arches %{arm} ppc s390 s390x # Set of architectures which run a full bootstrap cycle @@ -121,11 +121,11 @@ # Set of architectures which support SystemTap tapsets %global systemtap_arches %{jit_arches} # Set of architectures which support the serviceability agent -%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} +%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} loongarch64 # Set of architectures which support class data sharing # See https://bugzilla.redhat.com/show_bug.cgi?id=513605 # MetaspaceShared::generate_vtable_methods is not implemented for the PPC JIT -%global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} +%global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} loongarch64 # Set of architectures which support Java Flight Recorder (JFR) %global jfr_arches %{jit_arches} # Set of architectures for which alt-java has SSB mitigation @@ -133,7 +133,7 @@ # Set of architectures where we verify backtraces with gdb %global gdb_arches %{jit_arches} %{zero_arches} # Set of architectures for which we have a portable build -%global portable_build_arches %{aarch64} %{ix86} %{power64} s390x x86_64 +%global portable_build_arches %{aarch64} %{ix86} %{power64} s390x x86_64 loongarch64 # Architecture on which we run Java only tests %global jdk_test_arch x86_64 @@ -272,6 +272,10 @@ %global archinstall aarch64 %global stapinstall arm64 %endif +%ifarch loongarch64 +%global archinstall loongarch64 +%global stapinstall loongarch64 +%endif # 32 bit sparc, optimized for v9 %ifarch sparcv9 %global archinstall sparc @@ -1891,8 +1895,10 @@ ln -s %{top_level_dir_name} openjdk # # the configure macro will do this too, but it also passes a few flags not # supported by openjdk configure script +%ifnarch loongarch64 cp %{SOURCE100} %{top_level_dir_name}/common/autoconf/build-aux/ cp %{SOURCE101} %{top_level_dir_name}/common/autoconf/build-aux/ +%endif # OpenJDK patches @@ -1923,6 +1929,7 @@ sh %{SOURCE12} %patch -P204 %endif +%ifnarch loongarch64 %patch -P1 %patch -P5 @@ -1949,6 +1956,7 @@ sh %{SOURCE12} pushd %{top_level_dir_name} %patch -P502 -p1 popd +%endif pushd %{top_level_dir_name} # Add crypto policy and FIPS support @@ -2672,6 +2680,9 @@ cjc.mainProgram(args) %endif %changelog +* Mon Sep 02 2024 Xiang Zhai - 1:1.8.0.422.b05-1.0.2 +- Add loongarch64 base support + * Mon Sep 02 2024 Hong Wei Qin - 1:1.8.0.422.b05-1.0.1 - Update portable pkg dist -- Gitee