From d95cfc8fd6a6c0bbb742ba0ccbdf40321b78a1d6 Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Fri, 29 Sep 2023 01:31:41 +0100 Subject: [PATCH] Update to shenandoah-jdk8u392-b08 (GA) Sync the copy of the portable specfile with the latest update Update generate_tarball.sh to be closer to upstream vanilla script inc. no more ECC removal Update bug URL for RHEL to point to the Red Hat customer portal Change top_level_dir_name to use the VCS tag, matching new upstream release style tarball Regenerate PR2462 patch following JDK-8315135 Bump version of bundled libpng to 1.6.39 Add backport of JDK-8312489 heading upstream for 8u402 (see OPENJDK-2095) Move jcmd to the headless package For non debug subpackages, ghosted all alternatives (rhbz1649776) For non system JDKs, if-outed versionless provides. Aligned versions to be %%{epoch}:%%{version}-%%{release} instead of chaotic ** This tarball is embargoed until 2023-10-17 @ 1pm PT. ** Resolves: RHEL-12211 Resolves: RHEL-13595 Resolves: RHEL-13623 Resolves: RHEL-13630 Resolves: RHEL-11316 Resolves: RHEL-13607 Resolves: RHEL-2379 --- .gitignore | 3 + discover_trees.sh | 54 +++++ generate_source_tarball.sh | 72 ++---- java-1.8.0-openjdk-portable.specfile | 67 +++--- java-1.8.0-openjdk.spec | 206 ++++++++++++++---- jdk8312489-max_sig_default_increase.patch | 48 ++++ openjdk_news.sh | 4 +- ...r_libunpack_and_the_unpack200_binary.patch | 82 +++---- sources | 2 +- 9 files changed, 373 insertions(+), 165 deletions(-) create mode 100755 discover_trees.sh create mode 100644 jdk8312489-max_sig_default_increase.patch diff --git a/.gitignore b/.gitignore index 06064b9..df8e1dc 100644 --- a/.gitignore +++ b/.gitignore @@ -293,3 +293,6 @@ /openjdk-shenandoah-jdk8u-shenandoah-jdk8u382-b01-4curve.tar.xz /openjdk-shenandoah-jdk8u-shenandoah-jdk8u382-b04-4curve.tar.xz /openjdk-shenandoah-jdk8u-shenandoah-jdk8u382-b05-4curve.tar.xz +/openjdk-shenandoah-jdk8u-shenandoah-jdk8u392-b01.tar.xz +/openjdk-shenandoah-jdk8u-shenandoah-jdk8u392-b07.tar.xz +/openjdk-shenandoah-jdk8u-shenandoah-jdk8u392-b08.tar.xz diff --git a/discover_trees.sh b/discover_trees.sh new file mode 100755 index 0000000..8c31278 --- /dev/null +++ b/discover_trees.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +# Copyright (C) 2020 Red Hat, Inc. +# Written by Andrew John Hughes . +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +TREE=${1} + +if test "x${TREE}" = "x"; then + TREE=${PWD} +fi + +if [ -e ${TREE}/nashorn/.hg -o -e ${TREE}/nashorn/merge.changeset ] ; then + NASHORN="nashorn" ; +fi + +if [ -e ${TREE}/corba/.hg -o -e ${TREE}/corba/merge.changeset ] ; then + CORBA="corba"; +fi + +if [ -e ${TREE}/jaxp/.hg -o -e ${TREE}/jaxp/merge.changeset ] ; then + JAXP="jaxp"; +fi + +if [ -e ${TREE}/jaxws/.hg -o -e ${TREE}/jaxws/merge.changeset ] ; then + JAXWS="jaxws"; +fi + +if [ -e ${TREE}/langtools/.hg -o -e ${TREE}/langtools/merge.changeset ] ; then + LANGTOOLS="langtools"; +fi + +if [ -e ${TREE}/jdk/.hg -o -e ${TREE}/jdk/merge.changeset ] ; then + JDK="jdk"; +fi + +if [ -e ${TREE}/hotspot/.hg -o -e ${TREE}/hotspot/merge.changeset ] ; then + HOTSPOT="hotspot"; +fi + +SUBTREES="${CORBA} ${JAXP} ${JAXWS} ${LANGTOOLS} ${NASHORN} ${JDK} ${HOTSPOT}"; +echo ${SUBTREES} diff --git a/generate_source_tarball.sh b/generate_source_tarball.sh index b03b0a9..3c31664 100755 --- a/generate_source_tarball.sh +++ b/generate_source_tarball.sh @@ -4,7 +4,6 @@ # Example: # When used from local repo set REPO_ROOT pointing to file:// with your repo # If your local repo follows upstream forests conventions, it may be enough to set OPENJDK_URL -# If you want to use a local copy of patch PR3822, set the path to it in the PR3822 variable # # In any case you have to set PROJECT_NAME REPO_NAME and VERSION. eg: # PROJECT_NAME=openjdk @@ -22,13 +21,6 @@ SCRIPT_DIR=$(dirname $0) JCONSOLE_JS_PATCH_DEFAULT=${SCRIPT_DIR}/jconsole-plugin.patch -if [ ! "x$PR3822" = "x" ] ; then - if [ ! -f "$PR3822" ] ; then - echo "You have specified PR3822 as $PR3822 but it does not exist. Exiting" - exit 1 - fi -fi - if [ "x${JCONSOLE_JS_PATCH}" != "x" ] ; then if [ ! -f "${JCONSOLE_JS_PATCH}" ] ; then echo "You have specified the jconsole.js patch as ${JCONSOLE_JS_PATCH} but it does not exist. Exiting."; @@ -42,8 +34,6 @@ set -e OPENJDK_URL_DEFAULT=https://github.com COMPRESSION_DEFAULT=xz -# Corresponding IcedTea version -ICEDTEA_VERSION=3.0 if [ "x$1" = "xhelp" ] ; then echo -e "Behaviour may be specified by setting the following variables:\n" @@ -54,7 +44,6 @@ if [ "x$1" = "xhelp" ] ; then echo "COMPRESSION - the compression type to use (optional; defaults to ${COMPRESSION_DEFAULT})" echo "FILE_NAME_ROOT - name of the archive, minus extensions (optional; defaults to PROJECT_NAME-REPO_NAME-VERSION)" echo "REPO_ROOT - the location of the Git repository to archive (optional; defaults to OPENJDK_URL/PROJECT_NAME/REPO_NAME)" - echo "PR3822 - the path to the PR3822 patch to apply (optional; downloaded if unavailable)" echo "JCONSOLE_JS_PATCH - the path to a patch to fix non-availiability of jconsole.js (optional; defaults to ${JCONSOLE_JS_PATCH_DEFAULT})" echo "BOOT_JDK - the bootstrap JDK to satisfy the configure run" exit 1; @@ -139,7 +128,6 @@ echo -e "\tOPENJDK_URL: ${OPENJDK_URL}" echo -e "\tCOMPRESSION: ${COMPRESSION}" echo -e "\tFILE_NAME_ROOT: ${FILE_NAME_ROOT}" echo -e "\tREPO_ROOT: ${REPO_ROOT}" -echo -e "\tPR3822: ${PR3822}" echo -e "\tJCONSOLE_JS_PATCH: ${JCONSOLE_JS_PATCH}" echo -e "\tBOOT_JDK: ${BOOT_JDK}" @@ -147,9 +135,9 @@ mkdir "${FILE_NAME_ROOT}" pushd "${FILE_NAME_ROOT}" echo "Cloning ${VERSION} root repository from ${REPO_ROOT}" -git clone -b ${VERSION} ${REPO_ROOT} openjdk +git clone -b ${VERSION} ${REPO_ROOT} ${VERSION} -pushd openjdk +pushd ${VERSION} # UnderlineTaglet.java has a BSD license with a field-of-use restriction, making it non-Free if [ -d langtools ] ; then @@ -162,28 +150,6 @@ if [ -d jdk ]; then # jconsole.js has a BSD license with a field-of-use restriction, making it non-Free echo "Removing jconsole-plugin file with non-Free license" rm -vf jdk/src/share/demo/scripting/jconsole-plugin/src/resources/jconsole.js - echo "Removing EC source code we don't build" - rm -vf jdk/src/share/native/sun/security/ec/impl/ec2.h - rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_163.c - rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_193.c - rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_233.c - rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_aff.c - rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_mont.c - rm -vf jdk/src/share/native/sun/security/ec/impl/ecp_192.c - rm -vf jdk/src/share/native/sun/security/ec/impl/ecp_224.c - - echo "Syncing EC list with NSS" - if [ "x$PR3822" = "x" ] ; then - # get pr3822.patch (from https://github.com/icedtea-git/icedtea) in the ${ICEDTEA_VERSION} branch - # Do not push it or publish it - wget -O pr3822.patch https://github.com/icedtea-git/icedtea/raw/${ICEDTEA_VERSION}/patches/pr3822-4curve.patch - echo "Applying ${PWD}/pr3822.patch" - git apply --stat --apply -v -p1 pr3822.patch - rm pr3822.patch - else - echo "Applying ${PR3822}" - git apply --stat --apply -v -p1 $PR3822 - fi; fi echo "Patching out use of jconsole.js" @@ -196,28 +162,28 @@ popd # Generate .src-rev so build has knowledge of the revision the tarball was created from mkdir build pushd build -sh ${PWD}/../openjdk/configure --with-boot-jdk=${BOOT_JDK} +sh ${PWD}/../${VERSION}/configure --with-boot-jdk=${BOOT_JDK} make store-source-revision popd rm -rf build # Remove commit checks -echo "Removing $(find openjdk -name '.jcheck' -print)" -find openjdk -name '.jcheck' -print0 | xargs -0 rm -r +echo "Removing $(find ${VERSION} -name '.jcheck' -print)" +find ${VERSION} -name '.jcheck' -print0 | xargs -0 rm -r # Remove history and GHA -echo "find openjdk -name '.hgtags'" -find openjdk -name '.hgtags' -exec rm -v '{}' '+' -echo "find openjdk -name '.hgignore'" -find openjdk -name '.hgignore' -exec rm -v '{}' '+' -echo "find openjdk -name '.gitattributes'" -find openjdk -name '.gitattributes' -exec rm -v '{}' '+' -echo "find openjdk -name '.gitignore'" -find openjdk -name '.gitignore' -exec rm -v '{}' '+' -echo "find openjdk -name '.git'" -find openjdk -name '.git' -exec rm -rv '{}' '+' -echo "find openjdk -name '.github'" -find openjdk -name '.github' -exec rm -rv '{}' '+' +echo "find ${VERSION} -name '.hgtags'" +find ${VERSION} -name '.hgtags' -exec rm -v '{}' '+' +echo "find ${VERSION} -name '.hgignore'" +find ${VERSION} -name '.hgignore' -exec rm -v '{}' '+' +echo "find ${VERSION} -name '.gitattributes'" +find ${VERSION} -name '.gitattributes' -exec rm -v '{}' '+' +echo "find ${VERSION} -name '.gitignore'" +find ${VERSION} -name '.gitignore' -exec rm -v '{}' '+' +echo "find ${VERSION} -name '.git'" +find ${VERSION} -name '.git' -exec rm -rv '{}' '+' +echo "find ${VERSION} -name '.github'" +find ${VERSION} -name '.github' -exec rm -rv '{}' '+' echo "Compressing remaining forest" if [ "X$COMPRESSION" = "Xxz" ] ; then @@ -225,8 +191,8 @@ if [ "X$COMPRESSION" = "Xxz" ] ; then else SWITCH=czf fi -TARBALL_NAME=${FILE_NAME_ROOT}-4curve.tar.${COMPRESSION} -tar --exclude-vcs -$SWITCH ${TARBALL_NAME} openjdk +TARBALL_NAME=${FILE_NAME_ROOT}.tar.${COMPRESSION} +tar --exclude-vcs -$SWITCH ${TARBALL_NAME} ${VERSION} mv ${TARBALL_NAME} .. popd diff --git a/java-1.8.0-openjdk-portable.specfile b/java-1.8.0-openjdk-portable.specfile index caf4cd3..eaa8267 100644 --- a/java-1.8.0-openjdk-portable.specfile +++ b/java-1.8.0-openjdk-portable.specfile @@ -264,11 +264,22 @@ # New Version-String scheme-style defines %global majorver 8 +# Define version of OpenJDK 8 used +%global project openjdk +%global repo shenandoah-jdk8u +%global openjdk_revision jdk8u392-b08 +%global shenandoah_revision shenandoah-%{openjdk_revision} +# Define IcedTea version used for SystemTap tapsets and desktop file +%global icedteaver 3.15.0 +# Define current Git revision for the FIPS support patches +%global fipsver 6d1aade0648 +# Define current Git revision for the cacerts patch +%global cacertsver 8139f2361c2 # Standard JPackage naming and versioning defines %global origin openjdk %global origin_nice OpenJDK -%global top_level_dir_name %{origin} +%global top_level_dir_name %{shenandoah_revision} # Settings for local security configuration %global security_file %{top_level_dir_name}/jdk/src/share/lib/security/java.security-%{_target_os} @@ -287,38 +298,22 @@ %global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{component}&version=%{fedora} %else %if 0%{?rhel} -%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%20%{rhel}&component=%{component} +%global oj_vendor_bug_url https://access.redhat.com/support/cases/ %else %global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi %endif %endif %endif -# note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there. -%global shenandoah_project openjdk -%global shenandoah_repo shenandoah-jdk8u -%global openjdk_revision jdk8u382-b05 -%global shenandoah_revision shenandoah-%{openjdk_revision} -# Define old aarch64/jdk8u tree variables for compatibility -%global project %{shenandoah_project} -%global repo %{shenandoah_repo} -%global revision %{shenandoah_revision} -# Define IcedTea version used for SystemTap tapsets and desktop file -%global icedteaver 3.15.0 -# Define current Git revision for the FIPS support patches -%global fipsver 6d1aade0648 -# Define current Git revision for the cacerts patch -%global cacertsver 8139f2361c2 - # e.g. aarch64-shenandoah-jdk8u212-b04-shenandoah-merge-2019-04-30 -> aarch64-shenandoah-jdk8u212-b04 -%global version_tag %(VERSION=%{revision}; echo ${VERSION%%-shenandoah-merge*}) +%global version_tag %(VERSION=%{shenandoah_revision}; echo ${VERSION%%-shenandoah-merge*}) # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%) %global whole_update %(VERSION=%{version_tag}; echo ${VERSION%%-*}) # eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60 %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, @@ -436,10 +431,10 @@ URL: http://openjdk.java.net/ # OpenJDK 8u, the aarch64 port and Shenandoah # To regenerate, use: # VERSION=%%{shenandoah_revision} -# FILE_NAME_ROOT=%%{shenandoah_project}-%%{shenandoah_repo}-${VERSION} +# FILE_NAME_ROOT=%%{project}-%%{repo}-${VERSION} # REPO_ROOT= generate_source_tarball.sh -# where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo} -Source0: %{shenandoah_project}-%{shenandoah_repo}-%{shenandoah_revision}-4curve.tar.xz +# where the source is obtained from http://github.com/%%{project}/%%{repo} +Source0: %{project}-%{repo}-%{shenandoah_revision}.tar.xz # Custom README for -src subpackage Source2: README.md @@ -602,6 +597,8 @@ Patch204: jdk8042159-allow_using_system_installed_lcms2-jdk.patch Patch581: jdk8257794-remove_broken_assert.patch # JDK-8186464, RH1433262: ZipFile cannot read some InfoZip ZIP64 zip files Patch12: jdk8186464-rh1433262-zip64_failure.patch +# JDK-8312489, OJ2095: Increase jdk.jar.maxSignatureFileSize default which is too low for JARs such as WhiteSource/Mend unified agent jar +Patch2000: jdk8312489-max_sig_default_increase.patch ############################################# # @@ -709,7 +706,7 @@ Provides: bundled(lcms2) = 2.10.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.37 +Provides: bundled(libpng) = 1.6.39 # We link statically against libstdc++ to increase portability BuildRequires: libstdc++-static %endif @@ -813,6 +810,7 @@ if [ $prioritylength -ne 7 ] ; then fi # For old patches ln -s %{top_level_dir_name} jdk8 +ln -s %{top_level_dir_name} openjdk cp %{SOURCE2} . @@ -871,6 +869,8 @@ pushd %{top_level_dir_name} %patch1000 -p1 # system cacerts support %patch539 -p1 +# JDK-8312489 backport, proposed for 8u402: https://github.com/openjdk/jdk8u-dev/pull/381 +%patch2000 -p1 popd # RPM-only fixes @@ -1500,14 +1500,29 @@ done %{_jvmdir}/%{miscportablearchive}.sha256sum %changelog +* Wed Oct 11 2023 Andrew Hughes - 1:1.8.0.392.b08-1 +- Update to shenandoah-jdk8u392-b08 (GA) +- Update release notes for shenandoah-8u392-b08. +- Regenerate PR2462 patch following JDK-8315135 +- Bump version of bundled libpng to 1.6.39 +- Add backport of JDK-8312489 heading upstream for 8u402 (see OPENJDK-2095) +- ** This tarball is embargoed until 2023-10-17 @ 1pm PT. ** + +* Fri Sep 29 2023 Andrew Hughes - 1:1.8.0.392.b01-1 +- Update to shenandoah-jdk8u392-b01 (GA) +- Update release notes for shenandoah-8u392-b01. +- Update generate_tarball.sh to be closer to upstream vanilla script inc. no more ECC removal +- Update bug URL for RHEL to point to the Red Hat customer portal +- Change top_level_dir_name to use the VCS tag, matching new upstream release style tarball + * Fri Jul 14 2023 Andrew Hughes - 1:1.8.0.382.b05-2 - Re-enable SystemTap support and perform only substitutions possible without final NVR available - Include tapsets in the miscellaneous tarball - Drop unused globals for tapset installation * Fri Jul 14 2023 Andrew Hughes - 1:1.8.0.382.b05-1 -- Update to shenandoah-jdk8u372-b05 (GA) -- Update release notes for shenandoah-8u372-b05. +- Update to shenandoah-jdk8u382-b05 (GA) +- Update release notes for shenandoah-8u382-b05. - ** This tarball is embargoed until 2023-07-18 @ 1pm PT. ** * Fri Jul 07 2023 Andrew Hughes - 1:1.8.0.382.b04-0.1.ea diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index aff41a6..26157ba 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -98,6 +98,9 @@ # != rpm -ql java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin # similarly for other %%{_jvmdir}/{jre,java} and %%{_javadocdir}/{java,java-zip} +# Indicates whether this is the default JDK on this version of RHEL +%global is_system_jdk 1 + %global aarch64 aarch64 arm64 armv8 # we need to distinguish between big and little endian PPC64 %global ppc64le ppc64le @@ -291,10 +294,22 @@ # New Version-String scheme-style defines %global majorver 8 +# Define version of OpenJDK 8 used +%global project openjdk +%global repo shenandoah-jdk8u +%global openjdk_revision jdk8u392-b08 +%global shenandoah_revision shenandoah-%{openjdk_revision} +# Define IcedTea version used for SystemTap tapsets and desktop files +%global icedteaver 3.15.0 +# Define current Git revision for the FIPS support patches +%global fipsver 6d1aade0648 +# Define current Git revision for the cacerts patch +%global cacertsver 8139f2361c2 + # Standard JPackage naming and versioning defines %global origin openjdk %global origin_nice OpenJDK -%global top_level_dir_name %{origin} +%global top_level_dir_name %{shenandoah_revision} # Settings for local security configuration %global security_file %{top_level_dir_name}/jdk/src/share/lib/security/java.security-%{_target_os} @@ -313,31 +328,15 @@ %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://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%20%{rhel}&component=%{name} +%global oj_vendor_bug_url https://access.redhat.com/support/cases/ %else %global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi %endif %endif %endif -# note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there. -%global shenandoah_project openjdk -%global shenandoah_repo shenandoah-jdk8u -%global openjdk_revision jdk8u382-b05 -%global shenandoah_revision shenandoah-%{openjdk_revision} -# Define old aarch64/jdk8u tree variables for compatibility -%global project %{shenandoah_project} -%global repo %{shenandoah_repo} -%global revision %{shenandoah_revision} -# Define IcedTea version used for SystemTap tapsets and desktop files -%global icedteaver 3.15.0 -# Define current Git revision for the FIPS support patches -%global fipsver 6d1aade0648 -# Define current Git revision for the cacerts patch -%global cacertsver 8139f2361c2 - # e.g. aarch64-shenandoah-jdk8u212-b04-shenandoah-merge-2019-04-30 -> aarch64-shenandoah-jdk8u212-b04 -%global version_tag %(VERSION=%{revision}; echo ${VERSION%%-shenandoah-merge*}) +%global version_tag %(VERSION=%{shenandoah_revision}; echo ${VERSION%%-shenandoah-merge*}) # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%) %global whole_update %(VERSION=%{version_tag}; echo ${VERSION%%-*}) # eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60 @@ -346,7 +345,7 @@ %global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-}) %global rpmrelease 2 # Settings used by the portable build -%global portablerelease 2 +%global portablerelease 1 %global portablesuffix el8 %global portablebuilddir /builddir/build/BUILD @@ -367,7 +366,12 @@ %global eaprefix 0. %endif # priority must be 7 digits in total. The expression is workarounding tip +%if %is_system_jdk %global priority %(TIP=1800%{updatever}; echo ${TIP/tip/999}) +%else +# for non-default using 1, so slowdebugs can have 0 +%global priority 00000%{interimver}1 +%endif %global javaver 1.%{majorver}.0 @@ -497,6 +501,7 @@ alternatives \\ --install %{_bindir}/java $key %{jrebindir -- %{?1}}/java $PRIORITY --family %{family} \\ --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jredir -- %{?1}} \\ --slave %{_bindir}/%{alt_java_name} %{alt_java_name} %{jrebindir -- %{?1}}/%{alt_java_name} \\ + --slave %{_bindir}/jcmd jcmd %{jrebindir -- %{?1}}/jcmd \\ --slave %{_bindir}/jjs jjs %{jrebindir -- %{?1}}/jjs \\ --slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\ --slave %{_bindir}/orbd orbd %{jrebindir -- %{?1}}/orbd \\ @@ -511,6 +516,8 @@ alternatives \\ %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\ --slave %{_mandir}/man1/%{alt_java_name}.1$ext %{alt_java_name}.1$ext \\ %{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1$ext \\ + --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\ + %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\ --slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \\ %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1$ext \\ --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\ @@ -614,7 +621,6 @@ alternatives \\ --slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\ --slave %{_bindir}/javah javah %{sdkbindir -- %{?1}}/javah \\ --slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\ - --slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\ --slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\ --slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\ --slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\ @@ -655,8 +661,6 @@ alternatives \\ %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1$ext \\ --slave %{_mandir}/man1/javap.1$ext javap.1$ext \\ %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\ - --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\ - %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\ --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\ %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\ --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\ @@ -818,6 +822,7 @@ exit 0 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib %{_jvmdir}/%{jredir -- %{?1}}/bin/java %{_jvmdir}/%{jredir -- %{?1}}/bin/%{alt_java_name} +%{_jvmdir}/%{jredir -- %{?1}}/bin/jcmd %{_jvmdir}/%{jredir -- %{?1}}/bin/jjs %{_jvmdir}/%{jredir -- %{?1}}/bin/keytool %{_jvmdir}/%{jredir -- %{?1}}/bin/orbd @@ -850,6 +855,7 @@ exit 0 %{_jvmdir}/%{jredir -- %{?1}}/lib/calendars.properties %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1* +%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1* @@ -992,7 +998,6 @@ exit 0 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javah %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java-rmi.cgi -%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps @@ -1053,7 +1058,6 @@ exit 0 %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1* -%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1* @@ -1126,13 +1130,15 @@ Recommends: gtk2%{?_isa} Provides: java-%{javaver}-%{origin} = %{epoch}:%{version}-%{release} # Standard JPackage base provides -Provides: jre = %{javaver}%{?1} -Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release} Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release} Provides: jre-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release} Provides: java-%{javaver}%{?1} = %{epoch}:%{version}-%{release} +%if %is_system_jdk Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release} -Provides: java%{?1} = %{epoch}:%{javaver} +Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release} +Provides: java%{?1} = %{epoch}:%{version}-%{release} +Provides: jre%{?1} = %{epoch}:%{version}-%{release} +%endif } %define java_headless_rpo() %{expand: @@ -1172,14 +1178,16 @@ Suggests: lksctp-tools%{?_isa}, pcsc-lite-devel%{?_isa} %endif # Standard JPackage base provides -Provides: jre-headless%{?1} = %{epoch}:%{javaver} Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} -Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release} Provides: java-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} Provides: java-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release} +%if %is_system_jdk Provides: java-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} -Provides: java-headless%{?1} = %{epoch}:%{javaver} +Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release} +Provides: jre-headless%{?1} = %{epoch}:%{version}-%{release} +Provides: java-headless%{?1} = %{epoch}:%{version}-%{release} +%endif # https://bugzilla.redhat.com/show_bug.cgi?id=1312019 Provides: /usr/bin/jjs @@ -1200,15 +1208,16 @@ Requires(postun): %{alternatives_requires} Requires(postun): chkconfig >= 1.7 # Standard JPackage devel provides -Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version} -Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version} -Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version} -Provides: java-sdk%{?1} = %{epoch}:%{javaver} -Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version} -Provides: java-%{javaver}-%{origin}-devel%{?1} = %{epoch}:%{version} -Provides: java-devel-%{origin}%{?1} = %{epoch}:%{version} -Provides: java-devel%{?1} = %{epoch}:%{javaver} - +Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release} +Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version}-%{release} +Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version}-%{release} +Provides: java-%{javaver}-%{origin}-devel%{?1} = %{epoch}:%{version}-%{release} +%if %is_system_jdk +Provides: java-devel-%{origin}%{?1} = %{epoch}:%{version}-%{release} +Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version}-%{release} +Provides: java-devel%{?1} = %{epoch}:%{version}-%{release} +Provides: java-sdk%{?1} = %{epoch}:%{version}-%{release} +%endif } @@ -1216,10 +1225,11 @@ Provides: java-devel%{?1} = %{epoch}:%{javaver} Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release} OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release} -Provides: java-demo%{?1} = %{epoch}:%{version}-%{release} Provides: java-%{javaver}-demo%{?1} = %{epoch}:%{version}-%{release} Provides: java-%{javaver}-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release} - +%if %is_system_jdk +Provides: java-demo%{?1} = %{epoch}:%{version}-%{release} +%endif } %define java_javadoc_rpo() %{expand: @@ -1236,7 +1246,9 @@ Requires(postun): chkconfig >= 1.7 # Standard JPackage javadoc provides Provides: java-%{javaver}-javadoc%{?1}%{?2} = %{epoch}:%{version}-%{release} Provides: java-%{javaver}-%{origin}-javadoc%{?1}%{?2} = %{epoch}:%{version}-%{release} +%if %is_system_jdk Provides: java-javadoc%{?1}%{?2} = %{epoch}:%{version}-%{release} +%endif } %define java_src_rpo() %{expand: @@ -1299,10 +1311,10 @@ URL: http://openjdk.java.net/ # OpenJDK 8u, the aarch64 port and Shenandoah # To regenerate, use: # VERSION=%%{shenandoah_revision} -# FILE_NAME_ROOT=%%{shenandoah_project}-%%{shenandoah_repo}-${VERSION} +# FILE_NAME_ROOT=%%{project}-%%{repo}-${VERSION} # REPO_ROOT= generate_source_tarball.sh -# where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo} -Source0: %{shenandoah_project}-%{shenandoah_repo}-%{shenandoah_revision}-4curve.tar.xz +# where the source is obtained from http://github.com/%%{project}/%%{repo} +Source0: %{project}-%{repo}-%{shenandoah_revision}.tar.xz # Use 'icedtea_sync.sh' to update the following # They are based on code contained in the IcedTea project (3.x). @@ -1467,6 +1479,8 @@ Patch203: jdk8042159-allow_using_system_installed_lcms2-root.patch Patch204: jdk8042159-allow_using_system_installed_lcms2-jdk.patch # JDK-8257794: Zero: assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1) failed: wrong on Linux/x86_32 Patch581: jdk8257794-remove_broken_assert.patch +# JDK-8312489, OJ2095: Increase jdk.jar.maxSignatureFileSize default which is too low for JARs such as WhiteSource/Mend unified agent jar +Patch2000: jdk8312489-max_sig_default_increase.patch ############################################# # @@ -1581,7 +1595,7 @@ Provides: bundled(lcms2) = 2.10.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.37 +Provides: bundled(libpng) = 1.6.39 %endif # this is always built, also during debug-only build @@ -1860,6 +1874,7 @@ if [ $prioritylength -ne 7 ] ; then fi # For old patches ln -s %{top_level_dir_name} jdk8 +ln -s %{top_level_dir_name} openjdk # replace outdated configure guess script # @@ -1914,6 +1929,8 @@ pushd %{top_level_dir_name} %patch1000 -p1 # system cacerts support %patch539 -p1 +# JDK-8312489 backport, proposed for 8u402: https://github.com/openjdk/jdk8u-dev/pull/381 +%patch2000 -p1 popd # RPM-only fixes @@ -1972,6 +1989,9 @@ function customisejdk() { mv ${imagepath}/jre/lib/security/cacerts{,.upstream} # Install cacerts symlink needed by some apps which hard-code the path ln -sv %{cacerts_file} ${imagepath}/jre/lib/security + + # Move jcmd into the jre image (RHEL-12344) + mv ${imagepath}/bin/jcmd ${imagepath}/jre/bin fi } @@ -2476,6 +2496,9 @@ cjc.mainProgram(args) %files # main package builds always %{files_jre %{nil}} +%if %is_system_jdk +%ghost %{_bindir}/policytool +%endif %else %files # placeholder @@ -2487,9 +2510,66 @@ cjc.mainProgram(args) # important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue # all config/noreplace files (and more) have to be declared in pretrans. See pretrans %{files_jre_headless %{nil}} +# RHEL-11313; alternatives not owned by packages +%if %is_system_jdk +%ghost %{_bindir}/java +%ghost %{_jvmdir}/jre +%ghost %{_bindir}/%{alt_java_name} +%ghost %{_bindir}/jcmd +%ghost %{_bindir}/jjs +%ghost %{_bindir}/keytool +%ghost %{_bindir}/orbd +%ghost %{_bindir}/pack200 +%ghost %{_bindir}/rmid +%ghost %{_bindir}/rmiregistry +%ghost %{_bindir}/servertool +%ghost %{_bindir}/tnameserv +%ghost %{_bindir}/unpack200 +%ghost %{_jvmdir}/jre-%{origin} +%ghost %{_jvmdir}/jre-%{javaver} +%ghost %{_jvmdir}/jre-%{javaver}-%{origin} +%endif %files devel %{files_devel %{nil}} +# RHEL-11313; alternatives not owned by packages +%if %is_system_jdk +%ghost %{_bindir}/javac +%ghost %{_jvmdir}/java +%ghost %{_bindir}/appletviewer +%ghost %{_bindir}/clhsdb +%ghost %{_bindir}/extcheck +%ghost %{_bindir}/hsdb +%ghost %{_bindir}/idlj +%ghost %{_bindir}/jar +%ghost %{_bindir}/jarsigner +%ghost %{_bindir}/javadoc +%ghost %{_bindir}/javah +%ghost %{_bindir}/javap +%ghost %{_bindir}/jconsole +%ghost %{_bindir}/jdb +%ghost %{_bindir}/jdeps +%ghost %{_bindir}/jfr +%ghost %{_bindir}/jhat +%ghost %{_bindir}/jinfo +%ghost %{_bindir}/jmap +%ghost %{_bindir}/jps +%ghost %{_bindir}/jrunscript +%ghost %{_bindir}/jsadebugd +%ghost %{_bindir}/jstack +%ghost %{_bindir}/jstat +%ghost %{_bindir}/jstatd +%ghost %{_bindir}/native2ascii +%ghost %{_bindir}/rmic +%ghost %{_bindir}/schemagen +%ghost %{_bindir}/serialver +%ghost %{_bindir}/wsgen +%ghost %{_bindir}/wsimport +%ghost %{_bindir}/xjc +%ghost %{_jvmdir}/java-%{origin} +%ghost %{_jvmdir}/java-%{javaver} +%ghost %{_jvmdir}/java-%{javaver}-%{origin} +%endif %files demo -f %{name}-demo.files %{files_demo %{nil}} @@ -2499,12 +2579,20 @@ cjc.mainProgram(args) %files javadoc %{files_javadoc %{nil}} +# RHEL-11313; alternatives not owned by packages +%if %is_system_jdk +%ghost %{_javadocdir}/java +%endif # This puts a huge documentation file in /usr/share # It is now architecture-dependent, as eg. AOT and Graal are now x86_64 only # same for debug variant %files javadoc-zip %{files_javadoc_zip %{nil}} +# RHEL-11313; alternatives not owned by packages +%if %is_system_jdk +%ghost %{_javadocdir}/java-zip +%endif %files accessibility %{files_accessibility %{nil}} @@ -2551,6 +2639,32 @@ cjc.mainProgram(args) %endif %changelog +* Tue Oct 10 2023 Andrew Hughes - 1:1.8.0.392.b08-1 +- Update to shenandoah-jdk8u392-b08 (GA) +- Sync the copy of the portable specfile with the latest update +- Update generate_tarball.sh to be closer to upstream vanilla script inc. no more ECC removal +- Update bug URL for RHEL to point to the Red Hat customer portal +- Change top_level_dir_name to use the VCS tag, matching new upstream release style tarball +- Regenerate PR2462 patch following JDK-8315135 +- Bump version of bundled libpng to 1.6.39 +- Add backport of JDK-8312489 heading upstream for 8u402 (see OPENJDK-2095) +- Add missing JFR, alt-java, jre-* and java-* alternative ghosts +- Move jcmd to the headless package +- ** This tarball is embargoed until 2023-10-17 @ 1pm PT. ** +- Resolves: RHEL-12211 +- Resolves: RHEL-13595 +- Resolves: RHEL-13623 +- Resolves: RHEL-13630 +- Resolves: RHEL-11316 +- Resolves: RHEL-13607 +- Resolves: RHEL-2379 + +* Tue Oct 10 2023 Jiri Vanek - 1:1.8.0.392.b08-1 +- For non debug subpackages, ghosted all alternatives (rhbz1649776) +- For non system JDKs, if-outed versionless provides. +- Aligned versions to be %%{epoch}:%%{version}-%%{release} instead of chaotic +- Related: RHEL-11316 + * Wed Jul 19 2023 Andrew Hughes - 1:1.8.0.382.b05-2 - Bump release number so we are newer than 8.6 - Related: RHEL-12211 diff --git a/jdk8312489-max_sig_default_increase.patch b/jdk8312489-max_sig_default_increase.patch new file mode 100644 index 0000000..adf9e09 --- /dev/null +++ b/jdk8312489-max_sig_default_increase.patch @@ -0,0 +1,48 @@ +commit c38a36f124a7eb28920cc367cb01b67d973a55c0 +Author: Andrew John Hughes +Date: Wed Oct 11 01:42:03 2023 +0100 + + Backport e47a84f23dd2608c6f5748093eefe301fb5bf750 + +diff --git a/jdk/src/share/classes/java/util/jar/JarFile.java b/jdk/src/share/classes/java/util/jar/JarFile.java +index a26dcc4a1c7..ac2e1c9d6a8 100644 +--- a/jdk/src/share/classes/java/util/jar/JarFile.java ++++ b/jdk/src/share/classes/java/util/jar/JarFile.java +@@ -436,7 +436,9 @@ class JarFile extends ZipFile { + throw new IOException("Unsupported size: " + uncompressedSize + + " for JarEntry " + ze.getName() + + ". Allowed max size: " + +- SignatureFileVerifier.MAX_SIG_FILE_SIZE + " bytes"); ++ SignatureFileVerifier.MAX_SIG_FILE_SIZE + " bytes. " + ++ "You can use the jdk.jar.maxSignatureFileSize " + ++ "system property to increase the default value."); + } + int len = (int)uncompressedSize; + byte[] b = IOUtils.readAllBytes(is); +diff --git a/jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java b/jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java +index c335e964f63..afdfa406b92 100644 +--- a/jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java ++++ b/jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java +@@ -855,16 +855,16 @@ public class SignatureFileVerifier { + * the maximum allowed number of bytes for the signature-related files + * in a JAR file. + */ +- Integer tmp = AccessController.doPrivileged(new GetIntegerAction( +- "jdk.jar.maxSignatureFileSize", 8000000)); ++ int tmp = AccessController.doPrivileged(new GetIntegerAction( ++ "jdk.jar.maxSignatureFileSize", 16000000)); + if (tmp < 0 || tmp > MAX_ARRAY_SIZE) { + if (debug != null) { +- debug.println("Default signature file size 8000000 bytes " + +- "is used as the specified size for the " + +- "jdk.jar.maxSignatureFileSize system property " + ++ debug.println("The default signature file size of 16000000 bytes " + ++ "will be used for the jdk.jar.maxSignatureFileSize " + ++ "system property since the specified value " + + "is out of range: " + tmp); + } +- tmp = 8000000; ++ tmp = 16000000; + } + return tmp; + } diff --git a/openjdk_news.sh b/openjdk_news.sh index 560b356..386aa53 100755 --- a/openjdk_news.sh +++ b/openjdk_news.sh @@ -18,8 +18,8 @@ OLD_RELEASE=$1 NEW_RELEASE=$2 -SUBDIR=$3 -REPO=$4 +REPO=$3 +SUBDIR=$4 SCRIPT_DIR=$(dirname ${0}) if test "x${SUBDIR}" = "x"; then 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 17e1f69..5f05d73 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,11 @@ 8074839: Resolve disabled warnings for libunpack and the unpack200 binary Reviewed-by: dholmes, ksrini -diff --git openjdk/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 ---- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h +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 +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 -@@ -63,7 +63,7 @@ +@@ -63,7 +63,7 @@ struct bytes { bytes res; res.ptr = ptr + beg; res.len = end - beg; @@ -19,10 +20,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h openj return res; } // building C strings inside byte buffers: -diff --git openjdk/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 ---- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp +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 +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 -@@ -292,7 +292,7 @@ +@@ -292,7 +292,7 @@ Java_com_sun_java_util_jar_pack_NativeUnpack_getUnusedInput(JNIEnv *env, jobject if (uPtr->aborting()) { THROW_IOE(uPtr->get_abort_message()); @@ -31,16 +33,16 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp openj } // We have fetched all the files. -@@ -310,7 +310,7 @@ - JNIEXPORT jlong JNICALL - Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv *env, jobject pObj) { - unpacker* uPtr = get_unpacker(env, pObj, false); +@@ -312,7 +312,7 @@ Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv *env, jobject pObj) { + // There's no need to create a new unpacker here if we don't already have one + // just to immediatly free it afterwards. + unpacker* uPtr = get_unpacker(env, pObj, /* noCreate= */ true); - CHECK_EXCEPTION_RETURN_VALUE(uPtr, NULL); + CHECK_EXCEPTION_RETURN_VALUE(uPtr, 0); size_t consumed = uPtr->input_consumed(); + // free_unpacker() will set the unpacker field on 'pObj' to null free_unpacker(env, pObj, uPtr); - return consumed; -@@ -320,6 +320,7 @@ +@@ -323,6 +323,7 @@ JNIEXPORT jboolean JNICALL Java_com_sun_java_util_jar_pack_NativeUnpack_setOption(JNIEnv *env, jobject pObj, jstring pProp, jstring pValue) { unpacker* uPtr = get_unpacker(env, pObj); @@ -48,10 +50,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp openj 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/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 ---- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp +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 +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 -@@ -142,31 +142,28 @@ +@@ -142,31 +142,28 @@ static const char* nbasename(const char* progname) { return progname; } @@ -101,10 +104,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp open } } -diff --git openjdk/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 ---- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp +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 -@@ -222,9 +222,9 @@ +@@ -225,9 +225,9 @@ struct entry { } #ifdef PRODUCT @@ -116,7 +120,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op #endif }; -@@ -715,13 +715,13 @@ +@@ -718,13 +718,13 @@ void unpacker::read_file_header() { // Now we can size the whole archive. // Read everything else into a mega-buffer. rp = hdr.rp; @@ -134,7 +138,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op abort("EOF reading fixed input buffer"); return; } -@@ -735,7 +735,7 @@ +@@ -738,7 +738,7 @@ void unpacker::read_file_header() { return; } input.set(U_NEW(byte, add_size(header_size_0, archive_size, C_SLOP)), @@ -143,7 +147,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op CHECK; assert(input.limit()[0] == 0); // Move all the bytes we read initially into the real buffer. -@@ -958,13 +958,13 @@ +@@ -961,13 +961,13 @@ void cpool::init(unpacker* u_, int counts[CONSTANT_Limit]) { nentries = next_entry; // place a limit on future CP growth: @@ -159,7 +163,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op // Note that this CP does not include "empty" entries // for longs and doubles. Those are introduced when -@@ -982,8 +982,9 @@ +@@ -985,8 +985,9 @@ void cpool::init(unpacker* u_, int counts[CONSTANT_Limit]) { } // Initialize *all* our entries once @@ -170,7 +174,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op initGroupIndexes(); // Initialize hashTab to a generous power-of-two size. -@@ -3677,21 +3678,22 @@ +@@ -3681,21 +3682,22 @@ void cpool::computeOutputIndexes() { unpacker* debug_u; @@ -197,7 +201,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op case CONSTANT_Signature: if (value.b.ptr == null) return ref(0)->string(); -@@ -3711,26 +3713,28 @@ +@@ -3715,26 +3717,28 @@ char* entry::string() { break; default: if (nrefs == 0) { @@ -235,10 +239,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op } void print_cp_entries(int beg, int end) { -diff --git openjdk/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 ---- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h +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 -@@ -209,7 +209,7 @@ +@@ -209,7 +209,7 @@ struct unpacker { byte* rp; // read pointer (< rplimit <= input.limit()) byte* rplimit; // how much of the input block has been read? julong bytes_read; @@ -247,10 +252,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h open // 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/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 ---- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp +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 -@@ -81,7 +81,7 @@ +@@ -81,7 +81,7 @@ void breakpoint() { } // hook for debugger int assert_failed(const char* p) { char message[1<<12]; sprintf(message, "@assert failed: %s\n", p); @@ -259,10 +265,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp ope breakpoint(); unpack_abort(message); return 0; -diff --git openjdk/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 ---- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp +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 +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 -@@ -84,7 +84,7 @@ +@@ -84,7 +84,7 @@ void jar::init(unpacker* u_) { } // Write data to the ZIP output stream. @@ -271,7 +278,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openj while (len > 0) { int rc = (int)fwrite(buff, 1, len, jarfp); if (rc <= 0) { -@@ -323,12 +323,12 @@ +@@ -323,12 +323,12 @@ void jar::write_central_directory() { // Total number of disks (int) header64[36] = (ushort)SWAP_BYTES(1); header64[37] = 0; @@ -286,10 +293,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openj PRINTCR((2, "writing zip comment\n")); // Write the comment. -diff --git openjdk/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 ---- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h +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 +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 -@@ -68,8 +68,8 @@ +@@ -68,8 +68,8 @@ struct jar { } // Private Methods diff --git a/sources b/sources index 024a7f3..443fc46 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (tapsets-icedtea-3.15.0.tar.xz) = c752a197cb3d812d50c35e11e4722772be40096c81d2a57933e0d9b8a3c708b9c157b8108a4e33a06ca7bb81648170994408c75d6f69d5ff12785d0c31009671 -SHA512 (openjdk-shenandoah-jdk8u-shenandoah-jdk8u382-b05-4curve.tar.xz) = 630471974a292884f8ce59dc068379ff5e3012d93fa1d8edc3e3712e78f4daf277c2a2f47db354f381d0a2ec741fd0d08127a78120de35ae32c3b6597e972df3 +SHA512 (openjdk-shenandoah-jdk8u-shenandoah-jdk8u392-b08.tar.xz) = 0826958c414bcc7a23707fc9c1e832eed15e3e762ce35e0dfe4a4c6f44f057423b754092a1532a39dde6cd6f83f97208a857afd779ef7ba275f0bb46d84da102