@ -1,6 +1,3 @@
# portable jdk 21 specific bug, _jvmdir being missing
%define _jvmdir /usr/lib/jvm
# debug_package %%{nil} is portable-jdks specific
# debug_package %%{nil} is portable-jdks specific
%define debug_package %{nil}
%define debug_package %{nil}
@ -31,6 +28,10 @@
# Build with system libraries
# Build with system libraries
%bcond_with system_libs
%bcond_with system_libs
# This is RHEL 7 specific as it doesn't seem to have the
# __brp_strip_static_archive macro.
%define __os_install_post %{nil}
# Workaround for stripping of debug symbols from static libraries
# Workaround for stripping of debug symbols from static libraries
%if %{with staticlibs}
%if %{with staticlibs}
%define __brp_strip_static_archive %{nil}
%define __brp_strip_static_archive %{nil}
@ -54,10 +55,6 @@
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879
%global _find_debuginfo_opts -g
%global _find_debuginfo_opts -g
# Disable LTO as this causes build failures at the moment.
# See RHBZ#1861401
%define _lto_cflags %{nil}
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
# see the difference between global and define:
# see the difference between global and define:
@ -144,7 +141,7 @@
%global zgc_arches x86_64
%global zgc_arches x86_64
# Set of architectures for which alt-java has SSB mitigation
# Set of architectures for which alt-java has SSB mitigation
%global ssbd_arches x86_64
%global ssbd_arches x86_64
# Set of architectures for which java has short vector math library (libj svml.so)
# Set of architectures for which java has short vector math library (libsvml.so)
%global svml_arches x86_64
%global svml_arches x86_64
# Set of architectures where we verify backtraces with gdb
# Set of architectures where we verify backtraces with gdb
# s390x fails on RHEL 7 so we exclude it there
# s390x fails on RHEL 7 so we exclude it there
@ -232,6 +229,13 @@
# Target to use to just build HotSpot
# Target to use to just build HotSpot
%global hotspot_target hotspot
%global hotspot_target hotspot
# DTS toolset to use to provide gcc & binutils
%global dtsversion 10
# Disable LTO as this causes build failures at the moment.
# See RHBZ#1861401
%define _lto_cflags %{nil}
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
@ -241,12 +245,6 @@
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
%global ourldflags %{__global_ldflags}
%global ourldflags %{__global_ldflags}
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
# the initialization must be here. Later the pkg-config have buggy behavior
# looks like openjdk RPM specific bug
# Always set this so the nss.cfg file is not broken
#%global NSS_LIBDIR %(pkg-config --variable=libdir nss)
# In some cases, the arch used by the JDK does
# In some cases, the arch used by the JDK does
# not match _arch.
# not match _arch.
# Also, in some cases, the machine name used by SystemTap
# Also, in some cases, the machine name used by SystemTap
@ -307,9 +305,8 @@
%global stapinstall %{nil}
%global stapinstall %{nil}
%endif
%endif
# always off for portable builds
%ifarch %{systemtap_arches}
%ifarch %{systemtap_arches}
%global with_systemtap 0
%global with_systemtap 1
%else
%else
%global with_systemtap 0
%global with_systemtap 0
%endif
%endif
@ -317,12 +314,12 @@
# New Version-String scheme-style defines
# New Version-String scheme-style defines
%global featurever 21
%global featurever 21
%global interimver 0
%global interimver 0
%global updatever 0
%global updatever 1
%global patchver 0
%global patchver 0
# buildjdkver is usually same as %%{featurever},
# buildjdkver is usually same as %%{featurever},
# but in time of bootstrap of next jdk, it is featurever-1,
# but in time of bootstrap of next jdk, it is featurever-1,
# and this it is better to change it here, on single place
# and this it is better to change it here, on single place
%global buildjdkver 20
%global buildjdkver %{featurever}
# We don't add any LTS designator for STS packages (Fedora and EPEL).
# We don't add any LTS designator for STS packages (Fedora and EPEL).
# We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined.
# We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined.
%if 0%{?rhel} && !0%{?epel}
%if 0%{?rhel} && !0%{?epel}
@ -333,7 +330,7 @@
%global lts_designator_zip ""
%global lts_designator_zip ""
%endif
%endif
# JDK to use for bootstrapping
# JDK to use for bootstrapping
%global bootjdk /usr/lib/jvm/java-%{feature ver}-openjdk
%global bootjdk /usr/lib/jvm/java-%{buildjdk ver}-openjdk
# Define whether to use the bootstrap JDK directly or with a fresh libjvm.so
# Define whether to use the bootstrap JDK directly or with a fresh libjvm.so
# This will only work where the bootstrap JDK is the same major version
# This will only work where the bootstrap JDK is the same major version
# as the JDK being built
# as the JDK being built
@ -356,7 +353,7 @@
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}&version=%{fedora}
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}&version=%{fedora}
%else
%else
%if 0%{?rhel}
%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
%else
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi
%endif
%endif
@ -381,8 +378,8 @@
%global origin_nice OpenJDK
%global origin_nice OpenJDK
%global top_level_dir_name %{vcstag}
%global top_level_dir_name %{vcstag}
%global top_level_dir_name_backup %{top_level_dir_name}-backup
%global top_level_dir_name_backup %{top_level_dir_name}-backup
%global buildver 35
%global buildver 12
%global rpmrelease 2
%global rpmrelease 1
#%%global tagsuffix %%{nil}
#%%global tagsuffix %%{nil}
# Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit
# Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit
%if %is_system_jdk
%if %is_system_jdk
@ -405,7 +402,7 @@
%if %{is_ga}
%if %{is_ga}
%global build_type GA
%global build_type GA
%global ea_designator ""
%global ea_designator ""
%global ea_designator_zip ""
%global ea_designator_zip %{nil}
%global extraver %{nil}
%global extraver %{nil}
%global eaprefix %{nil}
%global eaprefix %{nil}
%else
%else
@ -497,23 +494,6 @@
%global alternatives_requires %{_sbindir}/alternatives
%global alternatives_requires %{_sbindir}/alternatives
%endif
%endif
%if %{with_systemtap}
# Where to install systemtap tapset (links)
# We would like these to be in a package specific sub-dir,
# but currently systemtap doesn't support that, so we have to
# use the root tapset dir for now. To distinguish between 64
# and 32 bit architectures we place the tapsets under the arch
# specific dir (note that systemtap will only pickup the tapset
# for the primary arch for now). Systemtap uses the machine name
# aka target_cpu as architecture specific directory name.
%global tapsetroot /usr/share/systemtap
%global tapsetdirttapset %{tapsetroot}/tapset/
%global tapsetdir %{tapsetdirttapset}/%{stapinstall}
%endif
# x86 is not supported by OpenJDK 17
ExcludeArch: %{ix86}
# Portables have no repo (requires/provides), but these are awesome for orientation in spec
# Portables have no repo (requires/provides), but these are awesome for orientation in spec
# Also scriptlets are happily missing and files are handled old fashion
# Also scriptlets are happily missing and files are handled old fashion
# not-duplicated requires/provides/obsoletes for normal/debug packages
# not-duplicated requires/provides/obsoletes for normal/debug packages
@ -537,12 +517,12 @@ ExcludeArch: %{ix86}
# Prevent brp-java-repack-jars from being run
# Prevent brp-java-repack-jars from being run
%global __jar_repack 0
%global __jar_repack 0
# Define the architectures on which we build
ExclusiveArch: %{aarch64} %{ppc64le} s390x x86_64
# Define the OS this package is built on
%undefine pkgos
# portables have grown out of its component, moving back to java-x-vendor
Name: java-%{javaver}-%{origin}-portable%{?pkgos:-%{pkgos}}
# this expression, when declared as global, filled component with java-x-vendor portable
%define component %(echo %{name} | sed "s;-portable;;g")
Name: java-%{javaver}-%{origin}-portable
Version: %{newjavaver}.%{buildver}
Version: %{newjavaver}.%{buildver}
Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
@ -555,11 +535,16 @@ Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
# JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
# 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".
# provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
Epoch: 1
Epoch: 1
# portables have grown out of its component, moving back to java-x-vendor
# this expression, when declared as global, filled component with java-x-vendor portable
%define component %(echo %{name} | sed "s;-portable%{?pkgos:-%{pkgos}};;g")
Summary: %{origin_nice} %{featurever} Runtime Environment portable edition
Summary: %{origin_nice} %{featurever} Runtime Environment portable edition
# Groups are only used up to RHEL 8 and on Fedora versions prior to F30
# Groups are only used up to RHEL 8 and on Fedora versions prior to F30
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
Group: Development/Languages
Group: Development/Languages
%endif
%endif
# HotSpot code is licensed under GPLv2
# HotSpot code is licensed under GPLv2
@ -576,17 +561,16 @@ Group: Development/Languages
# The test code includes copies of NSS under the Mozilla Public License v2.0
# 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 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
# 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 and ISC and FTL and RSA
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 and ISC and FTL and RSA
URL: http://openjdk.java.net/
URL: http://openjdk.java.net/
# The source tarball, generated using generate_source_tarball.sh
# The source tarball, generated using generate_source_tarball.sh
Source0: https://openjdk-sources.osci.io/openjdk%{featurever}/openjdk-jdk%{featurever}u- %{vcstag}.tar.xz
Source0: https://openjdk-sources.osci.io/openjdk%{featurever}/open%{vcstag}%{ea_designator_zip }.tar.xz
# Use 'icedtea_sync.sh' to update the following
# Use 'icedtea_sync.sh' to update the following
# They are based on code contained in the IcedTea project (6.x).
# They are based on code contained in the IcedTea project (6.x).
# Systemtap tapsets. Zipped up to keep it small.
# Systemtap tapsets. Zipped up to keep it small.
# Disabled in portables
Source8: tapsets-icedtea-%%{icedteaver}.tar.xz
#Source8: tapsets-icedtea-%%{icedteaver}.tar.xz
# Desktop files. Adapted from IcedTea
# Desktop files. Adapted from IcedTea
# Disabled in portables
# Disabled in portables
@ -698,6 +682,8 @@ BuildRequires: desktop-file-utils
BuildRequires: elfutils-devel
BuildRequires: elfutils-devel
BuildRequires: file
BuildRequires: file
BuildRequires: fontconfig-devel
BuildRequires: fontconfig-devel
#BuildRequires: devtoolset-%{dtsversion}-gcc
#BuildRequires: devtoolset-%{dtsversion}-gcc-c++
BuildRequires: gcc-c++
BuildRequires: gcc-c++
BuildRequires: gdb
BuildRequires: gdb
BuildRequires: libxslt
BuildRequires: libxslt
@ -719,9 +705,8 @@ BuildRequires: zip
# to pack portable tarballs
# to pack portable tarballs
BuildRequires: tar
BuildRequires: tar
BuildRequires: unzip
BuildRequires: unzip
# Not needed for portables
BuildRequires: javapackages-tools
# BuildRequires: javapackages-filesystem
BuildRequires: java-%{buildjdkver}-%{origin}%{?pkgos:-%{pkgos}}-devel
BuildRequires: java-%{featurever}-openjdk-devel
# Zero-assembler build requirement
# Zero-assembler build requirement
%ifarch %{zero_arches}
%ifarch %{zero_arches}
BuildRequires: libffi-devel
BuildRequires: libffi-devel
@ -746,18 +731,18 @@ BuildRequires: lcms2-devel
BuildRequires: libjpeg-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libpng-devel
%else
%else
# Version in src/java.desktop/share/native/libfreetype/include/freetype/freetype.h
# Version in src/java.desktop/share/legal/freetype.md
Provides: bundled(freetype) = 2.12.1
Provides: bundled(freetype) = 2.13.0
# Version in src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
# Version in src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
Provides: bundled(giflib) = 5.2.1
Provides: bundled(giflib) = 5.2.1
# Version in src/java.desktop/share/native/libharfbuzz/hb-version.h
# Version in src/java.desktop/share/native/libharfbuzz/hb-version.h
Provides: bundled(harfbuzz) = 4.4.1
Provides: bundled(harfbuzz) = 7.2.0
# Version in src/java.desktop/share/native/liblcms/lcms2.h
# Version in src/java.desktop/share/native/liblcms/lcms2.h
Provides: bundled(lcms2) = 2.12 .0
Provides: bundled(lcms2) = 2.15 .0
# Version in src/java.desktop/share/native/libjavajpeg/jpeglib.h
# Version in src/java.desktop/share/native/libjavajpeg/jpeglib.h
Provides: bundled(libjpeg) = 6b
Provides: bundled(libjpeg) = 6b
# Version in src/java.desktop/share/native/libsplashscreen/libpng/png.h
# Version in src/java.desktop/share/native/libsplashscreen/libpng/png.h
Provides: bundled(libpng) = 1.6.37
Provides: bundled(libpng) = 1.6.39
# We link statically against libstdc++ to increase portability
# We link statically against libstdc++ to increase portability
BuildRequires: libstdc++-static
BuildRequires: libstdc++-static
%endif
%endif
@ -773,7 +758,7 @@ The %{origin_nice} %{featurever} runtime environment - portable edition.
%package slowdebug
%package slowdebug
Summary: %{origin_nice} %{featurever} Runtime Environment portable edition %{debug_on}
Summary: %{origin_nice} %{featurever} Runtime Environment portable edition %{debug_on}
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
Group: Development/Languages
Group: Development/Languages
%endif
%endif
%{java_rpo -- %{debug_suffix_unquoted}}
%{java_rpo -- %{debug_suffix_unquoted}}
@ -786,7 +771,7 @@ The %{origin_nice} %{featurever} runtime environment - portable edition.
%package fastdebug
%package fastdebug
Summary: %{origin_nice} %{featurever} Runtime Environment portable edition %{fastdebug_on}
Summary: %{origin_nice} %{featurever} Runtime Environment portable edition %{fastdebug_on}
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
Group: Development/Languages
Group: Development/Languages
%endif
%endif
%{java_rpo -- %{fastdebug_suffix_unquoted}}
%{java_rpo -- %{fastdebug_suffix_unquoted}}
@ -799,7 +784,7 @@ The %{origin_nice} %{featurever} runtime environment - portable edition.
%package devel
%package devel
Summary: %{origin_nice} %{featurever} Development Environment portable edition
Summary: %{origin_nice} %{featurever} Development Environment portable edition
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
Group: Development/Languages
Group: Development/Languages
%endif
%endif
%{java_devel_rpo %{nil}}
%{java_devel_rpo %{nil}}
@ -812,7 +797,7 @@ The %{origin_nice} %{featurever} development tools - portable edition.
%package devel-slowdebug
%package devel-slowdebug
Summary: %{origin_nice} %{featurever} Runtime and Development Environment portable edition %{debug_on}
Summary: %{origin_nice} %{featurever} Runtime and Development Environment portable edition %{debug_on}
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
Group: Development/Languages
Group: Development/Languages
%endif
%endif
%{java_devel_rpo -- %{debug_suffix_unquoted}}
%{java_devel_rpo -- %{debug_suffix_unquoted}}
@ -826,7 +811,7 @@ The %{origin_nice} %{featurever} development tools - portable edition.
%package devel-fastdebug
%package devel-fastdebug
Summary: %{origin_nice} %{featurever} Runtime and Development Environment portable edition %{fastdebug_on}
Summary: %{origin_nice} %{featurever} Runtime and Development Environment portable edition %{fastdebug_on}
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
Group: Development/Tools
Group: Development/Tools
%endif
%endif
%{java_devel_rpo -- %{fastdebug_suffix_unquoted}}
%{java_devel_rpo -- %{fastdebug_suffix_unquoted}}
@ -905,10 +890,10 @@ The %{origin_nice} %{featurever} miscellany.
echo "Preparing %{oj_vendor_version}"
echo "Preparing %{oj_vendor_version}"
# Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-(
# Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-(
%if 0%{?stapinstall :1}
%if 0%{?_build_cpu :1}
echo "CPU: %{_target_cpu}, arch install directory: %{archinstall}, SystemTap install directory: %{stapinstall }"
echo "CPU: %{_target_cpu}, arch install directory: %{archinstall}, SystemTap install directory: %{_build_cpu }"
%else
%else
%{error:Unrecognised architecture %{_target _cpu}}
%{error:Unrecognised architecture %{_build _cpu}}
%endif
%endif
if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
@ -995,18 +980,8 @@ cp -r tapset tapset%{fastdebug_suffix}
for suffix in %{build_loop} ; do
for suffix in %{build_loop} ; do
for file in "tapset"$suffix/*.in; do
for file in "tapset"$suffix/*.in; do
OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"`
sed -i -e "s:@JAVA_SPEC_VER@:%{javaver}:g" $file
sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/%{vm_variant}/libjvm.so:g" $file > $file.1
sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $file
sed -e "s:@JAVA_SPEC_VER@:%{javaver}:g" $file.1 > $file.2
# TODO find out which architectures other than i686 have a client vm
%ifarch %{ix86}
sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" $file.2 > $OUTPUT_FILE
%else
sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.2 > $OUTPUT_FILE
%endif
sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE
sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE
sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE
done
done
done
done
# systemtap tapsets ends
# systemtap tapsets ends
@ -1015,10 +990,8 @@ done
# Prepare desktop files
# Prepare desktop files
# Portables do not have desktop integration
# Portables do not have desktop integration
# Setup nss.cfg
#sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
%build
%build
# How many CPU's do we have?
# How many CPU's do we have?
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
export NUM_PROC=${NUM_PROC:-1}
export NUM_PROC=${NUM_PROC:-1}
@ -1092,22 +1065,22 @@ function buildjdk() {
# rather than ${link_opt} as the system versions
# rather than ${link_opt} as the system versions
# are always used in a system_libs build, even
# are always used in a system_libs build, even
# for the static library build
# for the static library build
bash ${top_dir_abs_src_path}/configure \
bash -c "bash ${top_dir_abs_src_path}/configure \
%ifarch %{zero_arches}
%ifarch %{zero_arches}
--with-jvm-variants=zero \
--with-jvm-variants=zero \
%endif
%endif
%ifarch %{ppc64le}
%ifarch %{ppc64le}
--with-jobs=1 \
--with-jobs=1 \
%endif
%endif
--with-cacerts-file=$(readlink -f %{_sysconfdir}/pki/java/cacerts) \
--with-cacerts-file=`readlink -f %{_sysconfdir}/pki/java/cacerts` \
--with-version-build=%{buildver} \
--with-version-build=%{buildver} \
--with-version-pre="${ea_designator} " \
--with-version-pre=\"%{ea_designator}\ " \
--with-version-opt=%{lts_designator} \
--with-version-opt=\" %{lts_designator}\" \
--with-vendor-version-string="%{oj_vendor_version}" \
--with-vendor-version-string=\ "%{oj_vendor_version}\ " \
--with-vendor-name="%{oj_vendor}" \
--with-vendor-name=\ "%{oj_vendor}\ " \
--with-vendor-url="%{oj_vendor_url}" \
--with-vendor-url=\ "%{oj_vendor_url}\ " \
--with-vendor-bug-url="%{oj_vendor_bug_url}" \
--with-vendor-bug-url=\ "%{oj_vendor_bug_url}\ " \
--with-vendor-vm-bug-url="%{oj_vendor_bug_url}" \
--with-vendor-vm-bug-url=\ "%{oj_vendor_bug_url}\ " \
--with-boot-jdk=${buildjdk} \
--with-boot-jdk=${buildjdk} \
--with-debug-level=${debuglevel} \
--with-debug-level=${debuglevel} \
--with-native-debug-symbols="${debug_symbols}" \
--with-native-debug-symbols="${debug_symbols}" \
@ -1121,29 +1094,76 @@ function buildjdk() {
--with-lcms=${link_opt} \
--with-lcms=${link_opt} \
--with-harfbuzz=${link_opt} \
--with-harfbuzz=${link_opt} \
--with-stdc++lib=${libc_link_opt} \
--with-stdc++lib=${libc_link_opt} \
--with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
--with-extra-cxxflags=\ "$EXTRA_CPP_FLAGS\ " \
--with-extra-cflags="$EXTRA_CFLAGS" \
--with-extra-cflags=\ "$EXTRA_CFLAGS\ " \
--with-extra-ldflags="%{ourldflags}" \
--with-extra-ldflags=\ "%{ourldflags}\ " \
--with-num-cores="$NUM_PROC" \
--with-num-cores=\ "$NUM_PROC\ " \
--with-source-date="${SOURCE_DATE_EPOCH}" \
--with-source-date=\ "${SOURCE_DATE_EPOCH}\ " \
--disable-javac-server \
--disable-javac-server \
%ifarch %{zgc_arches}
%ifarch %{zgc_arches}
--with-jvm-features=zgc \
--with-jvm-features=zgc \
%endif
%endif
--disable-warnings-as-errors
--disable-warnings-as-errors"
cat spec.gmk
cat spec.gmk
make LOG=trace $maketargets || \
bash -c "make LOG=trace $maketargets || \
( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name \"hs_err_pid*.log\" | xargs cat && false )
( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name \"hs_err_pid*.log\" | xargs cat && false )"
popd
popd
}
}
function stripjdk() {
local outputdir=${1}
local jdkimagepath=${outputdir}/images/%{jdkimage}
local jreimagepath=${outputdir}/images/%{jreimage}
local jmodimagepath=${outputdir}/images/jmods
local supportdir=${outputdir}/support
if [ "x$suffix" = "x" ] ; then
# Keep the unstripped version for consumption by RHEL RPMs
cp -a ${jdkimagepath}{,.unstripped}
# Strip the files
for file in $(find ${jdkimagepath} ${jreimagepath} ${supportdir} -type f) ; do
if file ${file} | grep -q 'ELF'; then
noextfile=${file/.so/};
bash -c "objcopy --only-keep-debug ${file} ${noextfile}.debuginfo";
bash -c "objcopy --add-gnu-debuglink=${noextfile}.debuginfo ${file}";
bash -c "strip -g ${file}";
fi
done
# Rebuild jmod files against the stripped binaries
if [ ! -d ${supportdir} ] ; then
echo "Support directory missing.";
exit 15
fi
for cmd in $(find ${supportdir} -name '*.jmod_exec.cmdline') ; do
pre=${cmd/_exec/_pre};
post=${cmd/_exec/_post};
jmod=$(echo ${cmd}|sed 's#.*_create_##'|sed 's#_exec.cmdline##')
echo "Rebuilding ${jmod} against stripped binaries...";
if [ -e ${pre} ] ; then
echo "Executing ${pre}...";
cat ${pre} | sh -s ;
fi
echo "Executing ${cmd}...";
cat ${cmd} | sh -s ;
if [ -e ${post} ] ; then
echo "Executing ${post}...";
cat ${post} | sh -s ;
fi
done
rm -rf ${jdkimagepath}/jmods
cp -a ${jmodimagepath} ${jdkimagepath}
fi
}
function installjdk() {
function installjdk() {
local outputdir=${1}
local outputdir=${1}
local installdir=${2}
local installdir=${2}
local jdkimagepath=${installdir}/images/%{jdkimage}
local jdkimagepath=${installdir}/images/%{jdkimage}
local jreimagepath=${installdir}/images/%{jreimage}
local jreimagepath=${installdir}/images/%{jreimage}
local unstripped=${jdkimagepath}.unstripped
echo "Installing build from ${outputdir} to ${installdir}..."
echo "Installing build from ${outputdir} to ${installdir}..."
mkdir -p ${installdir}
mkdir -p ${installdir}
@ -1172,7 +1192,7 @@ function installjdk() {
fi;
fi;
done
done
for imagepath in ${jdkimagepath} ${jreimagepath} ; do
for imagepath in ${jdkimagepath} ${jreimagepath} ${unstripped} ; do
if [ -d ${imagepath} ] ; then
if [ -d ${imagepath} ] ; then
# the build (erroneously) removes read permissions from some jars
# the build (erroneously) removes read permissions from some jars
@ -1187,7 +1207,6 @@ function installjdk() {
# Install local files which are distributed with the JDK
# Install local files which are distributed with the JDK
install -m 644 %{SOURCE10} ${imagepath}
install -m 644 %{SOURCE10} ${imagepath}
#install -m 644 nss.cfg ${imagepath}/conf/security/
# Create fake alt-java as a placeholder for future alt-java
# Create fake alt-java as a placeholder for future alt-java
pushd ${imagepath}
pushd ${imagepath}
@ -1221,6 +1240,7 @@ function packagejdk() {
local bundledir=$(pwd)/${1}/bundles
local bundledir=$(pwd)/${1}/bundles
local packagesdir=$(pwd)/${2}
local packagesdir=$(pwd)/${2}
local srcdir=$(pwd)/%{top_level_dir_name}
local srcdir=$(pwd)/%{top_level_dir_name}
local tapsetdir=$(pwd)/tapset
local altjavadir=$(pwd)/${3}
local altjavadir=$(pwd)/${3}
echo "Packaging build from ${imagesdir} to ${packagesdir}..."
echo "Packaging build from ${imagesdir} to ${packagesdir}..."
@ -1249,42 +1269,39 @@ function packagejdk() {
miscname=%{miscportablename}
miscname=%{miscportablename}
miscarchive=${packagesdir}/%{miscportablearchive}
miscarchive=${packagesdir}/%{miscportablearchive}
# Rename directories for packaging
mv %{jdkimage} ${jdkname}
mv %{jreimage} ${jrename}
# Release images have external debug symbols
if [ "x$suffix" = "x" ] ; then
if [ "x$suffix" = "x" ] ; then
# Keep the unstripped version for consumption by RHEL RPMs
# Keep the unstripped version for consumption by RHEL RPMs
mv %{jdkimage}.unstripped ${jdkname}
tar -cJf ${unstrippedarchive} ${jdkname}
tar -cJf ${unstrippedarchive} ${jdkname}
genchecksum ${unstrippedarchive}
genchecksum ${unstrippedarchive}
mv ${jdkname} %{jdkimage}.unstripped
fi
# Strip the files
# Rename directories for packaging
for file in $(find ${jdkname} ${jrename} -type f) ; do
mv %{jdkimage} ${jdkname}
if file ${file} | grep -q 'ELF'; then
mv %{jreimage} ${jrename}
noextfile=${file/.so/};
objcopy --only-keep-debug ${file} ${noextfile}.debuginfo;
objcopy --add-gnu-debuglink=${noextfile}.debuginfo ${file};
strip -g ${file};
fi
done
# Release images have external debug symbols
if [ "x$suffix" = "x" ] ; then
tar -cJf ${debugarchive} $(find ${jdkname} -name \*.debuginfo)
tar -cJf ${debugarchive} $(find ${jdkname} -name \*.debuginfo)
genchecksum ${debugarchive}
genchecksum ${debugarchive}
mkdir ${docname}
mkdir ${docname}
mv ${docdir} ${docname}
mv ${docdir} ${docname}
mv ${bundledir}/${built_doc_archive} ${docname}
mv ${bundledir}/${built_doc_archive} ${docname}
tar -cJf ${docarchive} ${docname}
tar -cJf ${docarchive} ${docname}
genchecksum ${docarchive}
genchecksum ${docarchive}
mkdir ${miscname}
mkdir ${miscname}
for s in 16 24 32 48 ; do
for s in 16 24 32 48 ; do
cp -av ${srcdir}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png ${miscname}
cp -av ${srcdir}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png ${miscname}
done
done
cp -av ${altjavadir}/%{alt_java_name} ${miscname}
%if %{with_systemtap}
tar -cJf ${miscarchive} ${miscname}
cp -a ${tapsetdir}* ${miscname}
genchecksum ${miscarchive}
%endif
cp -av ${altjavadir}/%{alt_java_name} ${miscname}
tar -cJf ${miscarchive} ${miscname}
genchecksum ${miscarchive}
fi
fi
tar -cJf ${jdkarchive} --exclude='**.debuginfo' ${jdkname}
tar -cJf ${jdkarchive} --exclude='**.debuginfo' ${jdkname}
@ -1361,10 +1378,12 @@ for suffix in %{build_loop} ; do
buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild} ${link_opt} ${debug_symbols}
buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild} ${link_opt} ${debug_symbols}
installjdk ${bootbuilddir} ${bootinstalldir}
installjdk ${bootbuilddir} ${bootinstalldir}
buildjdk ${builddir} $(pwd)/${bootinstalldir}/images/%{jdkimage} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols}
buildjdk ${builddir} $(pwd)/${bootinstalldir}/images/%{jdkimage} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols}
stripjdk ${builddir}
installjdk ${builddir} ${installdir}
installjdk ${builddir} ${installdir}
%{!?with_artifacts:rm -rf ${bootinstalldir}}
%{!?with_artifacts:rm -rf ${bootinstalldir}}
else
else
buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols}
buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols}
stripjdk ${builddir}
installjdk ${builddir} ${installdir}
installjdk ${builddir} ${installdir}
fi
fi
packagejdk ${installdir} ${packagesdir} %{altjavaoutputdir}
packagejdk ${installdir} ${packagesdir} %{altjavaoutputdir}
@ -1669,9 +1688,27 @@ done
%{_jvmdir}/%{miscportablearchive}.sha256sum
%{_jvmdir}/%{miscportablearchive}.sha256sum
%changelog
%changelog
* Mon Aug 21 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.0.0.35-1
* Sun Oct 29 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.1.0.12-1
- Update to jdk-21.0.1.0+12 (GA)
- Update release notes to 21.0.1.0+12
- Update openjdk_news script to specify subdirectory last
- Add missing discover_trees script required by openjdk_news
- Synchronise bundled versions with 21u sources (FreeType, LCMS, HarfBuzz, libpng)
- Sync generate_tarball.sh with 11u & 17u version
- Update bug URL for RHEL to point to the Red Hat customer portal
- Fix upstream release URL for OpenJDK source
- Update buildjdkver to match the featurever
- Re-enable SystemTap support and perform only substitutions possible without final NVR available
- Fix typo which stops the EA designator being included in the build
- Include tapsets in the miscellaneous tarball
- Drop unused globals for tapset installation
- Rebuild jmods using the stripped binaries in release builds
- Make sure the unstripped JDK is customised by the installjdk function
* Sat Oct 28 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.0.0.35-1
- Update to jdk-21.0.0+35
- Update to jdk-21.0.0+35
- Update release notes to 21.0.0+35
- Update release notes to 21.0.0+35
- Update documentation (README.md)
- Update system crypto policy & FIPS patch from new fips-21u tree
- Update system crypto policy & FIPS patch from new fips-21u tree
- Update generate_tarball.sh to sync with upstream vanilla script inc. no more ECC removal
- Update generate_tarball.sh to sync with upstream vanilla script inc. no more ECC removal
- Drop fakefeaturever now it is no longer needed
- Drop fakefeaturever now it is no longer needed
@ -1679,11 +1716,20 @@ done
- Change top_level_dir_name to use the VCS tag, matching new upstream release style tarball
- Change top_level_dir_name to use the VCS tag, matching new upstream release style tarball
- Use upstream release URL for OpenJDK source
- Use upstream release URL for OpenJDK source
- Re-enable tzdata tests now we are on the latest JDK and things are back in sync
- Re-enable tzdata tests now we are on the latest JDK and things are back in sync
- Fix trailing '.' in tarball name
* Mon Aug 21 2023 Petra Alice Mikova <pmikova@redhat.com> - 1:21.0.0.0.35-1
- Use rpmrelease in vendor version to avoid inclusion of dist tag
- Replace alt-java patch with a binary separate from the JDK
- Drop stale patches that are of little use any more:
- * nss.cfg has been disabled since early PKCS11 work and long superseded by FIPS work
- * No accessibility subpackage to warrant RH1648242 patch any more
- * No use of system libjpeg turbo to warrant RH649512 patch any more
- Replace RH1684077 pcsc-lite-libs patch with better JDK-8009550 fix being upstreamed
* Sat Oct 28 2023 Petra Alice Mikova <pmikova@redhat.com> - 1:21.0.0.0.35-1
- Replace smoke test files used in the staticlibs test, as fdlibm was removed by JDK-8303798
- Replace smoke test files used in the staticlibs test, as fdlibm was removed by JDK-8303798
- Related: rhbz#2192749
* Wed Aug 16 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:20.0.0.0.36-1
* Fri Oct 27 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:20.0.2.0.9-1. 1
- Update to jdk-20.0.2+9
- Update to jdk-20.0.2+9
- Update release notes to 20.0.2+9
- Update release notes to 20.0.2+9
- Update system crypto policy & FIPS patch from new fips-20u tree
- Update system crypto policy & FIPS patch from new fips-20u tree
@ -1691,12 +1737,12 @@ done
- Update CLDR reference data following update to 42 (Rocky Mountain-Normalzeit => Rocky-Mountain-Normalzeit)
- Update CLDR reference data following update to 42 (Rocky Mountain-Normalzeit => Rocky-Mountain-Normalzeit)
- Related: rhbz#2192749
- Related: rhbz#2192749
* Wed Aug 16 2023 Jiri Vanek <jvanek@redhat.com> - 1:20.0.0.0.36-1
* Fri Oct 27 2023 Jiri Vanek <jvanek@redhat.com> - 1:20.0.0.0.36-1
- Dropped JDK-8295447, JDK-8296239 & JDK-8299439 patches now upstream
- Dropped JDK-8295447, JDK-8296239 & JDK-8299439 patches now upstream
- Adapted rh1750419-redhat_alt_java.patch
- Adapted rh1750419-redhat_alt_java.patch
- Related: rhbz#2192749
- Related: rhbz#2192749
* Tue Aug 15 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:19.0.1.0.10-1
* Fri Oct 27 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:19.0.1.0.10-1
- Update to jdk-19.0.2 release
- Update to jdk-19.0.2 release
- Update release notes to 19.0.2
- Update release notes to 19.0.2
- Rebase FIPS patches from fips-19u branch
- Rebase FIPS patches from fips-19u branch
@ -1705,7 +1751,7 @@ done
- Add local patches for JDK-8296239 & JDK-8299439 (Croatia Euro update) which are present in 8u, 11u & 17u releases
- Add local patches for JDK-8296239 & JDK-8299439 (Croatia Euro update) which are present in 8u, 11u & 17u releases
- Related: rhbz#2192749
- Related: rhbz#2192749
* Thu Aug 10 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:18.0.2.0.9-1
* Tue Oct 24 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:18.0.2.0.9-1
- Update to jdk-18.0.2 release
- Update to jdk-18.0.2 release
- Update release notes to actually reflect OpenJDK 18
- Update release notes to actually reflect OpenJDK 18
- Support JVM variant zero following JDK-8273494 no longer installing Zero's libjvm.so in the server directory
- Support JVM variant zero following JDK-8273494 no longer installing Zero's libjvm.so in the server directory
@ -1715,18 +1761,25 @@ done
- Drop tzdata patches added for 17.0.7 which will eventually appear in the upstream tarball when we reach OpenJDK 21
- Drop tzdata patches added for 17.0.7 which will eventually appear in the upstream tarball when we reach OpenJDK 21
- Switch bootjdkver to java-21-openjdk
- Switch bootjdkver to java-21-openjdk
- Disable tzdata tests until we are on the latest JDK and things are back in sync
- Disable tzdata tests until we are on the latest JDK and things are back in sync
- Drop bootstrap JDKs and use the java-21-openjdk-rhel7 build
- Related: rhbz#2192749
- Related: rhbz#2192749
* Thu Aug 10 2023 Petra Alice Mikova <pmikova@redhat.com> - 1:18.0.0.0.37-1
* Tue Oct 24 2023 Petra Alice Mikova <pmikova@redhat.com> - 1:18.0.0.0.37-1
- Update to ea version of jdk18
- Update to ea version of jdk18
- Adjust rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch
- Adjust rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch
* Tue Aug 22 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.7.0.7-2
- Define architectures we build on to avoid those without DTS 10 (e.g. s390)
* Tue Aug 22 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.7.0.7-2
- Switch to DTS 10
- Related: rhbz#2192749
- Related: rhbz#2192749
* Mon May 15 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.7.0.7-2
* Mon May 15 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.7.0.7-2
- Create java-21-openjdk-portable package based on java-17-openjdk-portable
- Create java-21-openjdk-portable package based on java-17-openjdk-portable
- Related: rhbz#2192749
- Related: rhbz#2192749
* Tue Apr 25 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.7.0.7-2
* Thu Apr 13 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.7.0.7-1
- Update to jdk-17.0.7.0+7
- Update to jdk-17.0.7.0+7
- Update release notes to 17.0.7.0+7
- Update release notes to 17.0.7.0+7
- Require tzdata 2023c due to local inclusion of JDK-8274864 & JDK-8305113
- Require tzdata 2023c due to local inclusion of JDK-8274864 & JDK-8305113
@ -1739,20 +1792,12 @@ done
- * test/jdk/sun/security/pkcs11/fips/VerifyMissingAttributes.java: fixed jtreg main class
- * test/jdk/sun/security/pkcs11/fips/VerifyMissingAttributes.java: fixed jtreg main class
- * RH1940064: Enable XML Signature provider in FIPS mode
- * RH1940064: Enable XML Signature provider in FIPS mode
- * RH2173781: Avoid calling C_GetInfo() too early, before cryptoki is initialized
- * RH2173781: Avoid calling C_GetInfo() too early, before cryptoki is initialized
- Fix trailing '.' in tarball name
- Use rpmrelease in vendor version to avoid inclusion of dist tag
- ** This tarball is embargoed until 2023-04-18 @ 1pm PT. **
- ** This tarball is embargoed until 2023-04-18 @ 1pm PT. **
- Resolves: rhbz#2185182
- Resolves: rhbz#2185182
- Resolves: rhbz#2134669
- Resolves: rhbz#2134669
- Resolves: rhbz#1940064
- Resolves: rhbz#1940064
- Resolves: rhbz#2173781
- Resolves: rhbz#2173781
* Thu Apr 20 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-7
- Sync with existing RHEL 8 build, in order to start building portables on RHEL 8
- Restore system bootstrap JDK (RHEL 8 has java-17-openjdk)
- Remove use of devtoolset (RHEL 8 native compilers should be sufficient)
- Explicitly exclude x86, as on RHEL RPMs
* Tue Feb 21 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-6
* Tue Feb 21 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-6
- Add docs, icons and samples to the portable output
- Add docs, icons and samples to the portable output
- Make sure generated checksums work and don't include full path
- Make sure generated checksums work and don't include full path