|
|
|
@ -22,9 +22,16 @@
|
|
|
|
|
%bcond_without slowdebug
|
|
|
|
|
# Enable release builds by default on relevant arches.
|
|
|
|
|
%bcond_without release
|
|
|
|
|
# Enable static library builds by default.
|
|
|
|
|
%bcond_without staticlibs
|
|
|
|
|
|
|
|
|
|
# Workaround for stripping of debug symbols from static libraries
|
|
|
|
|
%if %{with staticlibs}
|
|
|
|
|
%define __brp_strip_static_archive %{nil}
|
|
|
|
|
%global include_staticlibs 1
|
|
|
|
|
%else
|
|
|
|
|
%global include_staticlibs 0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
|
|
|
|
|
# This fixes detailed NMT and other tools which need minimal debug info.
|
|
|
|
@ -42,10 +49,14 @@
|
|
|
|
|
# (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
|
|
|
|
|
%global debug_suffix_unquoted -slowdebug
|
|
|
|
|
%global fastdebug_suffix_unquoted -fastdebug
|
|
|
|
|
%global main_suffix_unquoted -main
|
|
|
|
|
%global staticlibs_suffix_unquoted -staticlibs
|
|
|
|
|
# quoted one for shell operations
|
|
|
|
|
%global debug_suffix "%{debug_suffix_unquoted}"
|
|
|
|
|
%global fastdebug_suffix "%{fastdebug_suffix_unquoted}"
|
|
|
|
|
%global normal_suffix ""
|
|
|
|
|
%global main_suffix "%{main_suffix_unquoted}"
|
|
|
|
|
%global staticlibs_suffix "%{staticlibs_suffix_unquoted}"
|
|
|
|
|
|
|
|
|
|
%global debug_warning This package is unoptimised with full debugging. Install only as needed and remove ASAP.
|
|
|
|
|
%global debug_on with full debugging on
|
|
|
|
@ -162,6 +173,12 @@
|
|
|
|
|
# Test slowdebug first as it provides the best diagnostics
|
|
|
|
|
%global rev_build_loop %{slowdebug_build} %{fastdebug_build} %{normal_build}
|
|
|
|
|
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
%global staticlibs_loop %{staticlibs_suffix}
|
|
|
|
|
%else
|
|
|
|
|
%global staticlibs_loop %{nil}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%ifarch %{bootstrap_arches}
|
|
|
|
|
%global bootstrap_build 1
|
|
|
|
|
%else
|
|
|
|
@ -169,12 +186,20 @@
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{bootstrap_build}
|
|
|
|
|
%global release_targets bootcycle-images static-libs-image docs-zip
|
|
|
|
|
%global release_targets bootcycle-images docs-zip
|
|
|
|
|
%else
|
|
|
|
|
%global release_targets images docs-zip static-libs-image
|
|
|
|
|
%global release_targets images docs-zip
|
|
|
|
|
%endif
|
|
|
|
|
# No docs nor bootcycle for debug builds
|
|
|
|
|
%global debug_targets images static-libs-image
|
|
|
|
|
%global debug_targets images
|
|
|
|
|
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
# Extra target for producing the static-libraries. Separate from
|
|
|
|
|
# other targets since this target is configured to use in-tree
|
|
|
|
|
# AWT dependencies: lcms, libjpeg, libpng, libharfbuzz, giflib
|
|
|
|
|
# and possibly others
|
|
|
|
|
%global static_libs_target static-libs-image
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
|
|
|
|
@ -247,18 +272,18 @@
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# New Version-String scheme-style defines
|
|
|
|
|
%global featurever 15
|
|
|
|
|
%global featurever 16
|
|
|
|
|
%global interimver 0
|
|
|
|
|
%global updatever 2
|
|
|
|
|
%global updatever 1
|
|
|
|
|
%global patchver 0
|
|
|
|
|
# If you bump featurever, you must bump also vendor_version_string
|
|
|
|
|
# Used via new version scheme. JDK 15 was
|
|
|
|
|
# GA'ed in September 2020 => 20.9
|
|
|
|
|
%global vendor_version_string 20.9
|
|
|
|
|
# Used via new version scheme. JDK 16 was
|
|
|
|
|
# GA'ed in March 2020 => 21.3
|
|
|
|
|
%global vendor_version_string 21.3
|
|
|
|
|
# buildjdkver is usually same as %%{featurever},
|
|
|
|
|
# but in time of bootstrap of next jdk, it is featurever-1,
|
|
|
|
|
# and this it is better to change it here, on single place
|
|
|
|
|
%global buildjdkver %{featurever}
|
|
|
|
|
%global buildjdkver 16
|
|
|
|
|
# We don't add any LTS designator for STS packages (this package).
|
|
|
|
|
# Neither for Fedora nor EPEL which would have %%{rhel} macro defined.
|
|
|
|
|
%global lts_designator ""
|
|
|
|
@ -271,8 +296,9 @@
|
|
|
|
|
%global origin openjdk
|
|
|
|
|
%global origin_nice OpenJDK
|
|
|
|
|
%global top_level_dir_name %{origin}
|
|
|
|
|
%global buildver 7
|
|
|
|
|
%global rpmrelease 0
|
|
|
|
|
%global top_level_dir_name_backup %{top_level_dir_name}-backup
|
|
|
|
|
%global buildver 9
|
|
|
|
|
%global rpmrelease 2
|
|
|
|
|
# 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
|
|
|
|
|
# Using 10 digits may overflow the int used for priority, so we combine the patch and build versions
|
|
|
|
@ -286,30 +312,27 @@
|
|
|
|
|
%global priority %( printf '%08d' 1 )
|
|
|
|
|
%endif
|
|
|
|
|
%global newjavaver %{featurever}.%{interimver}.%{updatever}.%{patchver}
|
|
|
|
|
|
|
|
|
|
# Omit trailing 0 in filenames when the patch version is 0
|
|
|
|
|
%if 0%{?patchver} > 0
|
|
|
|
|
%global filever %{newjavaver}
|
|
|
|
|
%else
|
|
|
|
|
%global filever %{featurever}.%{interimver}.%{updatever}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%global javaver %{featurever}
|
|
|
|
|
|
|
|
|
|
# Strip up to 6 trailing zeros in newjavaver, as the JDK does, to get the correct version used in filenames
|
|
|
|
|
%global filever %(svn=%{newjavaver}; for i in 1 2 3 4 5 6 ; do svn=${svn%%.0} ; done; echo ${svn})
|
|
|
|
|
|
|
|
|
|
# Define milestone (EA for pre-releases, GA for releases)
|
|
|
|
|
# Release will be (where N is usually a number starting at 1):
|
|
|
|
|
# - 0.N%%{?extraver}%%{?dist} for EA releases,
|
|
|
|
|
# - N%%{?extraver}{?dist} for GA releases
|
|
|
|
|
%global is_ga 1
|
|
|
|
|
%if %{is_ga}
|
|
|
|
|
%global ea_designator ""
|
|
|
|
|
%global build_type GA
|
|
|
|
|
%global expected_ea_designator ""
|
|
|
|
|
%global ea_designator_zip ""
|
|
|
|
|
%global extraver %{nil}
|
|
|
|
|
%global eaprefix %{nil}
|
|
|
|
|
%else
|
|
|
|
|
%global ea_designator ea
|
|
|
|
|
%global ea_designator_zip -%{ea_designator}
|
|
|
|
|
%global extraver .%{ea_designator}
|
|
|
|
|
%global build_type EA
|
|
|
|
|
%global expected_ea_designator ea
|
|
|
|
|
%global ea_designator_zip -%{expected_ea_designator}
|
|
|
|
|
%global extraver .%{expected_ea_designator}
|
|
|
|
|
%global eaprefix 0.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
@ -337,7 +360,7 @@
|
|
|
|
|
%global jdkimage jdk
|
|
|
|
|
%global static_libs_image static-libs
|
|
|
|
|
# output dir stub
|
|
|
|
|
%define buildoutputdir() %{expand:openjdk/build%{?1}}
|
|
|
|
|
%define buildoutputdir() %{expand:build/jdk%{featurever}.build%{?1}}
|
|
|
|
|
# we can copy the javadoc to not arched dir, or make it not noarch
|
|
|
|
|
%define uniquejavadocdir() %{expand:%{fullversion}.%{_arch}%{?1}}
|
|
|
|
|
# main id and dir of this jdk
|
|
|
|
@ -347,7 +370,7 @@
|
|
|
|
|
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1655938
|
|
|
|
|
%global _privatelibs libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsunec[.]so.*|libzip[.]so.*
|
|
|
|
|
%global _privatelibs libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libzip[.]so.*
|
|
|
|
|
%global _publiclibs libjawt[.]so.*|libjava[.]so.*|libjvm[.]so.*|libverify[.]so.*|libjsig[.]so.*
|
|
|
|
|
%if %is_system_jdk
|
|
|
|
|
%global __provides_exclude ^(%{_privatelibs})$
|
|
|
|
@ -377,6 +400,14 @@
|
|
|
|
|
|
|
|
|
|
%global rpm_state_dir %{_localstatedir}/lib/rpm-state/
|
|
|
|
|
|
|
|
|
|
# For flatpack builds hard-code /usr/sbin/alternatives,
|
|
|
|
|
# otherwise use %%{_sbindir} relative path.
|
|
|
|
|
%if 0%{?flatpak}
|
|
|
|
|
%global alternatives_requires /usr/sbin/alternatives
|
|
|
|
|
%else
|
|
|
|
|
%global alternatives_requires %{_sbindir}/alternatives
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with_systemtap}
|
|
|
|
|
# Where to install systemtap tapset (links)
|
|
|
|
|
# We would like these to be in a package specific sub-dir,
|
|
|
|
@ -684,7 +715,6 @@ exit 0
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsaproc.so
|
|
|
|
|
%endif
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsctp.so
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsunec.so
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libverify.so
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libzip.so
|
|
|
|
|
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr
|
|
|
|
@ -937,19 +967,21 @@ Requires: tzdata-java >= 2015d
|
|
|
|
|
# for support of kernel stream control
|
|
|
|
|
# libsctp.so.1 is being `dlopen`ed on demand
|
|
|
|
|
Requires: lksctp-tools%{?_isa}
|
|
|
|
|
%if ! 0%{?flatpak}
|
|
|
|
|
# tool to copy jdk's configs - should be Recommends only, but then only dnf/yum enforce it,
|
|
|
|
|
# not rpm transaction and so no configs are persisted when pure rpm -u is run. It may be
|
|
|
|
|
# considered as regression
|
|
|
|
|
Requires: copy-jdk-configs >= 3.3
|
|
|
|
|
OrderWithRequires: copy-jdk-configs
|
|
|
|
|
%endif
|
|
|
|
|
# for printing support
|
|
|
|
|
Requires: cups-libs
|
|
|
|
|
# Post requires alternatives to install tool alternatives
|
|
|
|
|
Requires(post): %{_sbindir}/alternatives
|
|
|
|
|
Requires(post): %{alternatives_requires}
|
|
|
|
|
# Postun requires alternatives to uninstall tool alternatives
|
|
|
|
|
Requires(postun): %{_sbindir}/alternatives
|
|
|
|
|
Requires(postun): %{alternatives_requires}
|
|
|
|
|
# for optional support of kernel stream control, card reader and printing bindings
|
|
|
|
|
Suggests: lksctp-tools%{?_isa}, pcsc-lite-devel%{?_isa}
|
|
|
|
|
Suggests: lksctp-tools%{?_isa}, pcsc-lite-libs%{?_isa}
|
|
|
|
|
|
|
|
|
|
# Standard JPackage base provides
|
|
|
|
|
Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
|
@ -969,9 +1001,9 @@ Provides: java-headless%{?1} = %{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): %{_sbindir}/alternatives
|
|
|
|
|
Requires(post): %{alternatives_requires}
|
|
|
|
|
# Postun requires alternatives to uninstall tool alternatives
|
|
|
|
|
Requires(postun): %{_sbindir}/alternatives
|
|
|
|
|
Requires(postun): %{alternatives_requires}
|
|
|
|
|
|
|
|
|
|
# Standard JPackage devel provides
|
|
|
|
|
Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
|
@ -1019,9 +1051,9 @@ Provides: java-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release}
|
|
|
|
|
%define java_javadoc_rpo() %{expand:
|
|
|
|
|
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
|
|
# Post requires alternatives to install javadoc alternative
|
|
|
|
|
Requires(post): %{_sbindir}/alternatives
|
|
|
|
|
Requires(post): %{alternatives_requires}
|
|
|
|
|
# Postun requires alternatives to uninstall javadoc alternative
|
|
|
|
|
Requires(postun): %{_sbindir}/alternatives
|
|
|
|
|
Requires(postun): %{alternatives_requires}
|
|
|
|
|
|
|
|
|
|
# Standard JPackage javadoc provides
|
|
|
|
|
Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release}
|
|
|
|
@ -1051,7 +1083,7 @@ Version: %{newjavaver}.%{buildver}
|
|
|
|
|
# This package needs `.rolling` as part of Release so as to not conflict on install with
|
|
|
|
|
# java-X-openjdk. I.e. when latest rolling release is also an LTS release packaged as
|
|
|
|
|
# java-X-openjdk. See: https://bugzilla.redhat.com/show_bug.cgi?id=1647298
|
|
|
|
|
Release: %{?eaprefix}%{rpmrelease}%{?extraver}.rolling%{?dist}.1
|
|
|
|
|
Release: %{?eaprefix}%{rpmrelease}%{?extraver}.rolling%{?dist}
|
|
|
|
|
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
|
|
|
|
|
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
|
|
|
|
|
# also included the epoch in their virtual provides. This created a
|
|
|
|
@ -1085,7 +1117,8 @@ URL: http://openjdk.java.net/
|
|
|
|
|
|
|
|
|
|
# to regenerate source0 (jdk) run update_package.sh
|
|
|
|
|
# update_package.sh contains hard-coded repos, revisions, tags, and projects to regenerate the source archives
|
|
|
|
|
Source0: jdk-updates-jdk%{featurever}u-jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}}.tar.xz
|
|
|
|
|
Source0: openjdk-jdk%{featurever}u-jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}}.tar.xz
|
|
|
|
|
#Source0: openjdk-jdk%{featurever}-jdk-%{filever}+%{buildver}.tar.xz
|
|
|
|
|
|
|
|
|
|
# Use 'icedtea_sync.sh' to update the following
|
|
|
|
|
# They are based on code contained in the IcedTea project (3.x).
|
|
|
|
@ -1134,8 +1167,6 @@ Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk1
|
|
|
|
|
Patch4: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
|
|
|
|
|
# Depend on pcs-lite-libs instead of pcs-lite-devel as this is only in optional repo
|
|
|
|
|
Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch
|
|
|
|
|
# JDK-8259949: Use i686 instead of i586 on x86 when -fcf-protection is passed to the compiler, as CMOV is needed
|
|
|
|
|
Patch8: jdk8259949-allow_cf-protection_on_x86.patch
|
|
|
|
|
|
|
|
|
|
#############################################
|
|
|
|
|
#
|
|
|
|
@ -1157,6 +1188,7 @@ BuildRequires: freetype-devel
|
|
|
|
|
BuildRequires: giflib-devel
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: gdb
|
|
|
|
|
BuildRequires: harfbuzz-devel
|
|
|
|
|
BuildRequires: lcms2-devel
|
|
|
|
|
BuildRequires: libjpeg-devel
|
|
|
|
|
BuildRequires: libpng-devel
|
|
|
|
@ -1282,6 +1314,8 @@ The %{origin_nice} %{featurever} development tools .
|
|
|
|
|
%{fastdebug_warning}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
|
|
|
|
|
%if %{include_normal_build}
|
|
|
|
|
%package static-libs
|
|
|
|
|
Summary: %{origin_nice} %{featurever} libraries for static linking
|
|
|
|
@ -1314,6 +1348,9 @@ The %{origin_nice} %{featurever} libraries for static linking.
|
|
|
|
|
%{fastdebug_warning}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# staticlibs
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{include_normal_build}
|
|
|
|
|
%package jmods
|
|
|
|
|
Summary: JMods for %{origin_nice} %{featurever}
|
|
|
|
@ -1476,16 +1513,16 @@ if [ $prioritylength -ne 8 ] ; then
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# OpenJDK patches
|
|
|
|
|
# Remove libraries that are linked by both static and dynamic builds
|
|
|
|
|
sh %{SOURCE12} %{top_level_dir_name}
|
|
|
|
|
|
|
|
|
|
# Remove libraries that are linked
|
|
|
|
|
sh %{SOURCE12}
|
|
|
|
|
# Patch the JDK
|
|
|
|
|
pushd %{top_level_dir_name}
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
%patch3 -p1
|
|
|
|
|
%patch4 -p1
|
|
|
|
|
%patch6 -p1
|
|
|
|
|
%patch8 -p1
|
|
|
|
|
popd # openjdk
|
|
|
|
|
|
|
|
|
|
%patch1000
|
|
|
|
@ -1558,8 +1595,8 @@ export CFLAGS="$CFLAGS -mieee"
|
|
|
|
|
# We use ourcppflags because the OpenJDK build seems to
|
|
|
|
|
# pass EXTRA_CFLAGS to the HotSpot C++ compiler...
|
|
|
|
|
# Explicitly set the C++ standard as the default has changed on GCC >= 6
|
|
|
|
|
EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse -fcommon"
|
|
|
|
|
EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fcommon"
|
|
|
|
|
EXTRA_CFLAGS="%ourcppflags"
|
|
|
|
|
EXTRA_CPP_FLAGS="%ourcppflags"
|
|
|
|
|
|
|
|
|
|
%ifarch %{power64} ppc
|
|
|
|
|
# fix rpmlint warnings
|
|
|
|
@ -1575,13 +1612,52 @@ else
|
|
|
|
|
debugbuild=`echo $suffix | sed "s/-//g"`
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Variable used in hs_err hook on build failures
|
|
|
|
|
top_dir_abs_path=$(pwd)/%{top_level_dir_name}
|
|
|
|
|
for loop in %{main_suffix} %{staticlibs_loop} ; do
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildoutputdir -- $suffix}
|
|
|
|
|
pushd %{buildoutputdir -- $suffix}
|
|
|
|
|
if test "x${loop}" = "x%{main_suffix}" ; then
|
|
|
|
|
# Copy the source tree so we can remove all in-tree libraries
|
|
|
|
|
cp -a %{top_level_dir_name} %{top_level_dir_name_backup}
|
|
|
|
|
# Remove all libraries that are linked
|
|
|
|
|
sh %{SOURCE12} %{top_level_dir_name} full
|
|
|
|
|
# Variable used by configure and hs_err hook on build failures
|
|
|
|
|
link_opt="system"
|
|
|
|
|
# Debug builds don't need same targets as release for
|
|
|
|
|
# build speed-up
|
|
|
|
|
maketargets="%{release_targets}"
|
|
|
|
|
if echo $debugbuild | grep -q "debug" ; then
|
|
|
|
|
maketargets="%{debug_targets}"
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
# Variable used by configure and hs_err hook on build failures
|
|
|
|
|
link_opt="bundled"
|
|
|
|
|
# Static library cycle only builds the static libraries
|
|
|
|
|
maketargets="%{static_libs_target}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
bash ../configure \
|
|
|
|
|
top_dir_abs_src_path=$(pwd)/%{top_level_dir_name}
|
|
|
|
|
top_dir_abs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}${loop}}
|
|
|
|
|
# The OpenJDK version file includes the current
|
|
|
|
|
# upstream version information. For some reason,
|
|
|
|
|
# configure does not automatically use the
|
|
|
|
|
# default pre-version supplied there (despite
|
|
|
|
|
# what the file claims), so we pass it manually
|
|
|
|
|
# to configure
|
|
|
|
|
VERSION_FILE=${top_dir_abs_src_path}/make/autoconf/version-numbers
|
|
|
|
|
if [ -f ${VERSION_FILE} ] ; then
|
|
|
|
|
EA_DESIGNATOR=$(grep '^DEFAULT_PROMOTED_VERSION_PRE' ${VERSION_FILE} | cut -d '=' -f 2)
|
|
|
|
|
else
|
|
|
|
|
echo "Could not find OpenJDK version file.";
|
|
|
|
|
exit 16
|
|
|
|
|
fi
|
|
|
|
|
if [ "x${EA_DESIGNATOR}" != "x%{expected_ea_designator}" ] ; then
|
|
|
|
|
echo "Spec file is configured for a %{build_type} build, but upstream version-pre setting is ${EA_DESIGNATOR}";
|
|
|
|
|
exit 17
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
mkdir -p ${top_dir_abs_build_path}
|
|
|
|
|
pushd ${top_dir_abs_build_path}
|
|
|
|
|
|
|
|
|
|
bash ${top_dir_abs_src_path}/configure \
|
|
|
|
|
%ifnarch %{jit_arches}
|
|
|
|
|
--with-jvm-variants=zero \
|
|
|
|
|
%endif
|
|
|
|
@ -1589,7 +1665,7 @@ bash ../configure \
|
|
|
|
|
--with-jobs=1 \
|
|
|
|
|
%endif
|
|
|
|
|
--with-version-build=%{buildver} \
|
|
|
|
|
--with-version-pre="%{ea_designator}" \
|
|
|
|
|
--with-version-pre="${EA_DESIGNATOR}" \
|
|
|
|
|
--with-version-opt=%{lts_designator} \
|
|
|
|
|
--with-vendor-version-string="%{vendor_version_string}" \
|
|
|
|
|
--with-vendor-name="Red Hat, Inc." \
|
|
|
|
@ -1601,48 +1677,54 @@ bash ../configure \
|
|
|
|
|
--with-native-debug-symbols=internal \
|
|
|
|
|
--enable-unlimited-crypto \
|
|
|
|
|
--with-zlib=system \
|
|
|
|
|
--with-libjpeg=system \
|
|
|
|
|
--with-giflib=system \
|
|
|
|
|
--with-libpng=system \
|
|
|
|
|
--with-lcms=system \
|
|
|
|
|
--with-libjpeg=${link_opt} \
|
|
|
|
|
--with-giflib=${link_opt} \
|
|
|
|
|
--with-libpng=${link_opt} \
|
|
|
|
|
--with-lcms=${link_opt} \
|
|
|
|
|
--with-harfbuzz=${link_opt} \
|
|
|
|
|
--with-stdc++lib=dynamic \
|
|
|
|
|
--with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
|
|
|
|
|
--with-extra-cflags="$EXTRA_CFLAGS" \
|
|
|
|
|
--with-extra-ldflags="%{ourldflags}" \
|
|
|
|
|
--with-num-cores="$NUM_PROC" \
|
|
|
|
|
--with-source-date="${SOURCE_DATE_EPOCH}" \
|
|
|
|
|
--disable-javac-server \
|
|
|
|
|
%ifarch %{zgc_arches}
|
|
|
|
|
--with-jvm-features=zgc \
|
|
|
|
|
%endif
|
|
|
|
|
--disable-warnings-as-errors
|
|
|
|
|
|
|
|
|
|
# Debug builds don't need same targets as release for
|
|
|
|
|
# build speed-up
|
|
|
|
|
maketargets="%{release_targets}"
|
|
|
|
|
if echo $debugbuild | grep -q "debug" ; then
|
|
|
|
|
maketargets="%{debug_targets}"
|
|
|
|
|
fi
|
|
|
|
|
make \
|
|
|
|
|
JAVAC_FLAGS=-g \
|
|
|
|
|
LOG=trace \
|
|
|
|
|
WARNINGS_ARE_ERRORS="-Wno-error" \
|
|
|
|
|
CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error" \
|
|
|
|
|
$maketargets || ( pwd; find $top_dir_abs_path -name "hs_err_pid*.log" | xargs cat && false )
|
|
|
|
|
$maketargets || ( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name "hs_err_pid*.log" | xargs cat && false )
|
|
|
|
|
|
|
|
|
|
popd >& /dev/null
|
|
|
|
|
|
|
|
|
|
# Restore original source tree if we modified it by removing full in-tree sources
|
|
|
|
|
if [ -d %{top_level_dir_name_backup} ] ; then
|
|
|
|
|
rm -rf %{top_level_dir_name}
|
|
|
|
|
mv %{top_level_dir_name_backup} %{top_level_dir_name}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
done # end of main / staticlibs loop
|
|
|
|
|
|
|
|
|
|
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
|
|
|
|
|
|
|
|
|
|
# the build (erroneously) removes read permissions from some jars
|
|
|
|
|
# this is a regression in OpenJDK 7 (our compiler):
|
|
|
|
|
# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
|
|
|
|
|
find images/%{jdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
|
|
|
|
|
find ${top_dir_abs_main_build_path}/images/%{jdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
|
|
|
|
|
|
|
|
|
|
# Build screws up permissions on binaries
|
|
|
|
|
# https://bugs.openjdk.java.net/browse/JDK-8173610
|
|
|
|
|
find images/%{jdkimage} -iname '*.so' -exec chmod +x {} \;
|
|
|
|
|
find images/%{jdkimage}/bin/ -exec chmod +x {} \;
|
|
|
|
|
|
|
|
|
|
popd >& /dev/null
|
|
|
|
|
find ${top_dir_abs_main_build_path}/images/%{jdkimage} -iname '*.so' -exec chmod +x {} \;
|
|
|
|
|
find ${top_dir_abs_main_build_path}/images/%{jdkimage}/bin/ -exec chmod +x {} \;
|
|
|
|
|
|
|
|
|
|
# Install nss.cfg right away as we will be using the JRE above
|
|
|
|
|
export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{jdkimage}
|
|
|
|
|
export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage}
|
|
|
|
|
|
|
|
|
|
# Install nss.cfg right away as we will be using the JRE above
|
|
|
|
|
install -m 644 nss.cfg $JAVA_HOME/conf/security/
|
|
|
|
@ -1659,14 +1741,19 @@ cat man/man1/java.1 >> man/man1/%{alt_java_name}.1
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# build cycles
|
|
|
|
|
done
|
|
|
|
|
done # end of release / debug cycle loop
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
|
|
|
|
|
# We test debug first as it will give better diagnostics on a crash
|
|
|
|
|
for suffix in %{rev_build_loop} ; do
|
|
|
|
|
|
|
|
|
|
export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{jdkimage}
|
|
|
|
|
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage}
|
|
|
|
|
|
|
|
|
|
#check Shenandoah is enabled
|
|
|
|
|
%if %{use_shenandoah_hotspot}
|
|
|
|
@ -1695,10 +1782,12 @@ 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
|
|
|
|
|
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
# Check debug symbols in static libraries (smoke test)
|
|
|
|
|
export STATIC_LIBS_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{static_libs_image}
|
|
|
|
|
export STATIC_LIBS_HOME=${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}
|
|
|
|
|
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c
|
|
|
|
|
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Check debug symbols are present and can identify code
|
|
|
|
|
find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
|
|
|
|
@ -1789,12 +1878,17 @@ STRIP_KEEP_SYMTAB=libjvm*
|
|
|
|
|
|
|
|
|
|
for suffix in %{build_loop} ; do
|
|
|
|
|
|
|
|
|
|
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}}
|
|
|
|
|
%endif
|
|
|
|
|
jdk_image=${top_dir_abs_main_build_path}/images/%{jdkimage}
|
|
|
|
|
|
|
|
|
|
# Install the jdk
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}
|
|
|
|
|
cp -a %{buildoutputdir -- $suffix}/images/%{jdkimage} \
|
|
|
|
|
$RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
|
|
|
|
|
cp -a ${jdk_image} $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
|
|
|
|
|
|
|
|
|
|
pushd %{buildoutputdir $suffix}/images/%{jdkimage}
|
|
|
|
|
pushd ${jdk_image}
|
|
|
|
|
|
|
|
|
|
%if %{with_systemtap}
|
|
|
|
|
# Install systemtap support files
|
|
|
|
@ -1838,17 +1932,19 @@ pushd %{buildoutputdir $suffix}/images/%{jdkimage}
|
|
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
# Install static libs artefacts
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/static/linux-%{archinstall}/glibc
|
|
|
|
|
cp -a %{buildoutputdir -- $suffix}/images/%{static_libs_image}/lib/*.a \
|
|
|
|
|
cp -a ${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}/lib/*.a \
|
|
|
|
|
$RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/static/linux-%{archinstall}/glibc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
if ! echo $suffix | grep -q "debug" ; then
|
|
|
|
|
# Install Javadoc documentation
|
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
|
|
|
|
|
cp -a %{buildoutputdir -- $suffix}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
|
|
|
|
|
cp -a ${top_dir_abs_main_build_path}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
|
|
|
|
|
built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip
|
|
|
|
|
cp -a %{buildoutputdir -- $suffix}/bundles/${built_doc_archive} \
|
|
|
|
|
$RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip || ls -l %{buildoutputdir -- $suffix}/bundles/
|
|
|
|
|
cp -a ${top_dir_abs_main_build_path}/bundles/${built_doc_archive} \
|
|
|
|
|
$RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip || ls -l ${top_dir_abs_main_build_path}/bundles/
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Install release notes
|
|
|
|
@ -1910,7 +2006,13 @@ done
|
|
|
|
|
-- whether copy-jdk-configs is installed or not. If so, then configs are copied
|
|
|
|
|
-- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
|
|
|
|
|
local posix = require "posix"
|
|
|
|
|
local debug = false
|
|
|
|
|
|
|
|
|
|
if (os.getenv("debug") == "true") then
|
|
|
|
|
debug = true;
|
|
|
|
|
print("cjc: in spec debug is on")
|
|
|
|
|
else
|
|
|
|
|
debug = false;
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
|
|
|
|
|
SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
|
|
|
|
@ -2051,8 +2153,10 @@ require "copy_jdk_configs.lua"
|
|
|
|
|
%files devel
|
|
|
|
|
%{files_devel %{nil}}
|
|
|
|
|
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
%files static-libs
|
|
|
|
|
%{files_static_libs %{nil}}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files jmods
|
|
|
|
|
%{files_jmods %{nil}}
|
|
|
|
@ -2083,8 +2187,10 @@ require "copy_jdk_configs.lua"
|
|
|
|
|
%files devel-slowdebug
|
|
|
|
|
%{files_devel -- %{debug_suffix_unquoted}}
|
|
|
|
|
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
%files static-libs-slowdebug
|
|
|
|
|
%{files_static_libs -- %{debug_suffix_unquoted}}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files jmods-slowdebug
|
|
|
|
|
%{files_jmods -- %{debug_suffix_unquoted}}
|
|
|
|
@ -2106,8 +2212,10 @@ require "copy_jdk_configs.lua"
|
|
|
|
|
%files devel-fastdebug
|
|
|
|
|
%{files_devel -- %{fastdebug_suffix_unquoted}}
|
|
|
|
|
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
%files static-libs-fastdebug
|
|
|
|
|
%{files_static_libs -- %{fastdebug_suffix_unquoted}}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files jmods-fastdebug
|
|
|
|
|
%{files_jmods -- %{fastdebug_suffix_unquoted}}
|
|
|
|
@ -2121,6 +2229,39 @@ require "copy_jdk_configs.lua"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Apr 29 2021 Jiri Vanek <jvanek@redhat.com> - 1:16.0.1.0.9-2.rolling
|
|
|
|
|
- adapted to debug handling in newer cjc
|
|
|
|
|
- The rest of the "rpm 4.17" patch must NOT be backported, as on rpm 4.16 and down, it would casue double execution
|
|
|
|
|
- Disable copy-jdk-configs for Flatpak builds
|
|
|
|
|
|
|
|
|
|
* Sun Apr 25 2021 Petra Alice Mikova <pmikova@redhat.com> - 1:16.0.1.0.9-1.rolling
|
|
|
|
|
- update to 16.0.1+9 april cpu tag
|
|
|
|
|
- dropped jdk8259949-allow_cf-protection_on_x86.patch
|
|
|
|
|
|
|
|
|
|
* Thu Mar 11 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:16.0.0.0.36-2.rolling
|
|
|
|
|
- Perform static library build on a separate source tree with bundled image libraries
|
|
|
|
|
- Make static library build optional
|
|
|
|
|
- Based on initial work by Severin Gehwolf
|
|
|
|
|
|
|
|
|
|
* Tue Mar 09 2021 Jiri Vanek <jvanek@redhat.com> - 1:16.0.0.0.36-1.rolling
|
|
|
|
|
- fixed suggests of wrong pcsc-lite-devel%{?_isa} to correct pcsc-lite-libs%{?_isa}
|
|
|
|
|
- bumped buildjdkver to build by itself - 16
|
|
|
|
|
|
|
|
|
|
* Fri Feb 19 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:16.0.0.0.36-0.rolling
|
|
|
|
|
- Update to jdk-16.0.0.0+36
|
|
|
|
|
- Update tarball generation script to use git following OpenJDK's move to github
|
|
|
|
|
- Update tarball generation script to use PR3823 which handles JDK-8235710 changes
|
|
|
|
|
- Use upstream default for version-pre rather than setting it to "ea" or ""
|
|
|
|
|
- Drop libsunec.so which is no longer generated, thanks to JDK-8235710
|
|
|
|
|
- Drop unnecessary compiler flags, dating back to work on GCC 6 & 10
|
|
|
|
|
- Adapt RH1750419 alt-java patch to still apply after some variable re-naming in the makefiles
|
|
|
|
|
- Update filever to remove any trailing zeros, as in the OpenJDK build, and use for source filename
|
|
|
|
|
- Use system harfbuzz now this is supported.
|
|
|
|
|
- Pass SOURCE_DATE_EPOCH to build for reproducible builds
|
|
|
|
|
|
|
|
|
|
* Fri Feb 19 2021 Stephan Bergmann <sbergman@redhat.com> - 1:15.0.2.0.7-1.rolling
|
|
|
|
|
- Hardcode /usr/sbin/alternatives for Flatpak builds
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:15.0.2.0.7-0.rolling.1
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|