|
|
44604a |
# portable jdk 17 specific bug, _jvmdir being missing
|
|
|
44604a |
%define _jvmdir /usr/lib/jvm
|
|
|
44604a |
|
|
|
44604a |
# debug_package %%{nil} is portable-jdks specific
|
|
|
44604a |
%define debug_package %{nil}
|
|
|
44604a |
|
|
|
44604a |
# RPM conditionals so as to be able to dynamically produce
|
|
|
44604a |
# slowdebug/release builds. See:
|
|
|
44604a |
# http://rpm.org/user_doc/conditional_builds.html
|
|
|
44604a |
#
|
|
|
44604a |
# Examples:
|
|
|
44604a |
#
|
|
|
44604a |
# Produce release, fastdebug *and* slowdebug builds on x86_64 (default):
|
|
|
44604a |
# $ rpmbuild -ba java-17-openjdk.spec
|
|
|
44604a |
#
|
|
|
44604a |
# Produce only release builds (no debug builds) on x86_64:
|
|
|
44604a |
# $ rpmbuild -ba java-17-openjdk.spec --without slowdebug --without fastdebug
|
|
|
44604a |
#
|
|
|
44604a |
# Only produce a release build on x86_64:
|
|
|
44604a |
# $ fedpkg mockbuild --without slowdebug --without fastdebug
|
|
|
44604a |
# Enable fastdebug builds by default on relevant arches.
|
|
|
44604a |
%bcond_without fastdebug
|
|
|
44604a |
# Enable slowdebug builds by default on relevant arches.
|
|
|
44604a |
%bcond_without slowdebug
|
|
|
44604a |
# Enable release builds by default on relevant arches.
|
|
|
44604a |
%bcond_without release
|
|
|
44604a |
# Enable static library builds by default.
|
|
|
44604a |
%bcond_without staticlibs
|
|
|
44604a |
# Build a fresh libjvm.so for use in a copy of the bootstrap JDK
|
|
|
44604a |
%bcond_without fresh_libjvm
|
|
|
44604a |
# Build with system libraries
|
|
|
44604a |
%bcond_with system_libs
|
|
|
44604a |
|
|
|
44604a |
# Workaround for stripping of debug symbols from static libraries
|
|
|
44604a |
%if %{with staticlibs}
|
|
|
44604a |
%define __brp_strip_static_archive %{nil}
|
|
|
44604a |
%global include_staticlibs 1
|
|
|
44604a |
%else
|
|
|
44604a |
%global include_staticlibs 0
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# Define whether to use the bootstrap JDK directly or with a fresh libjvm.so
|
|
|
44604a |
%if %{with fresh_libjvm}
|
|
|
44604a |
%global build_hotspot_first 1
|
|
|
44604a |
%else
|
|
|
44604a |
%global build_hotspot_first 0
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{with system_libs}
|
|
|
44604a |
%global system_libs 1
|
|
|
44604a |
%global link_type system
|
|
|
44604a |
%global freetype_lib %{nil}
|
|
|
44604a |
%else
|
|
|
44604a |
%global system_libs 0
|
|
|
44604a |
%global link_type bundled
|
|
|
44604a |
%global freetype_lib |libfreetype[.]so.*
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
|
|
|
44604a |
# This fixes detailed NMT and other tools which need minimal debug info.
|
|
|
44604a |
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879
|
|
|
44604a |
%global _find_debuginfo_opts -g
|
|
|
44604a |
|
|
|
44604a |
# Disable LTO as this causes build failures at the moment.
|
|
|
44604a |
# See RHBZ#1861401
|
|
|
44604a |
%define _lto_cflags %{nil}
|
|
|
44604a |
|
|
|
44604a |
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
|
|
|
44604a |
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
|
|
|
44604a |
# see the difference between global and define:
|
|
|
44604a |
# See https://github.com/rpm-software-management/rpm/issues/127 to comments at "pmatilai commented on Aug 18, 2017"
|
|
|
44604a |
# (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
|
|
|
44604a |
%global debug_suffix_unquoted -slowdebug
|
|
|
44604a |
%global fastdebug_suffix_unquoted -fastdebug
|
|
|
44604a |
%global main_suffix_unquoted -main
|
|
|
44604a |
%global staticlibs_suffix_unquoted -staticlibs
|
|
|
44604a |
# quoted one for shell operations
|
|
|
44604a |
%global debug_suffix "%{debug_suffix_unquoted}"
|
|
|
44604a |
%global fastdebug_suffix "%{fastdebug_suffix_unquoted}"
|
|
|
44604a |
%global normal_suffix ""
|
|
|
44604a |
%global main_suffix "%{main_suffix_unquoted}"
|
|
|
44604a |
%global staticlibs_suffix "%{staticlibs_suffix_unquoted}"
|
|
|
44604a |
|
|
|
44604a |
%global debug_warning This package is unoptimised with full debugging. Install only as needed and remove ASAP.
|
|
|
44604a |
%global fastdebug_warning This package is optimised with full debugging. Install only as needed and remove ASAP.
|
|
|
44604a |
%global debug_on unoptimised with full debugging on
|
|
|
44604a |
%global fastdebug_on optimised with full debugging on
|
|
|
44604a |
%global for_fastdebug for packages with debugging on and optimisation
|
|
|
44604a |
%global for_debug for packages with debugging on and no optimisation
|
|
|
44604a |
|
|
|
44604a |
%if %{with release}
|
|
|
44604a |
%global include_normal_build 1
|
|
|
44604a |
%else
|
|
|
44604a |
%global include_normal_build 0
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_normal_build}
|
|
|
44604a |
%global normal_build %{normal_suffix}
|
|
|
44604a |
%else
|
|
|
44604a |
%global normal_build %{nil}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# We have hardcoded list of files, which is appearing in alternatives, and in files
|
|
|
44604a |
# in alternatives those are slaves and master, very often triplicated by man pages
|
|
|
44604a |
# in files all masters and slaves are ghosted
|
|
|
44604a |
# the ghosts are here to allow installation via query like `dnf install /usr/bin/java`
|
|
|
44604a |
# you can list those files, with appropriate sections: cat *.spec | grep -e --install -e --slave -e post_
|
|
|
44604a |
# TODO - fix those hardcoded lists via single list
|
|
|
44604a |
# Those files must *NOT* be ghosted for *slowdebug* packages
|
|
|
44604a |
# FIXME - if you are moving jshell or jlink or similar, always modify all three sections
|
|
|
44604a |
# you can check via headless and devels:
|
|
|
44604a |
# rpm -ql --noghost java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin
|
|
|
44604a |
# == rpm -ql java-11-openjdk-headless-slowdebug-11.0.1.13-8.fc29.x86_64.rpm | grep bin
|
|
|
44604a |
# != rpm -ql java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin
|
|
|
44604a |
# similarly for other %%{_jvmdir}/{jre,java} and %%{_javadocdir}/{java,java-zip}
|
|
|
44604a |
%define is_release_build() %( if [ "%{?1}" == "%{debug_suffix_unquoted}" -o "%{?1}" == "%{fastdebug_suffix_unquoted}" ]; then echo "0" ; else echo "1"; fi )
|
|
|
44604a |
|
|
|
44604a |
# while JDK is a techpreview(is_system_jdk=0), some provides are turned off. Once jdk stops to be an techpreview, move it to 1
|
|
|
44604a |
# as sytem JDK, we mean any JDK which can run whole system java stack without issues (like bytecode issues, module issues, dependencies...)
|
|
|
44604a |
%global is_system_jdk 0
|
|
|
44604a |
|
|
|
44604a |
%global aarch64 aarch64 arm64 armv8
|
|
|
44604a |
# we need to distinguish between big and little endian PPC64
|
|
|
44604a |
%global ppc64le ppc64le
|
|
|
44604a |
%global ppc64be ppc64 ppc64p7
|
|
|
44604a |
# Set of architectures which support multiple ABIs
|
|
|
44604a |
%global multilib_arches %{power64} sparc64 x86_64
|
|
|
44604a |
# Set of architectures for which we build slowdebug builds
|
|
|
44604a |
%global debug_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} s390x
|
|
|
44604a |
# Set of architectures for which we build fastdebug builds
|
|
|
44604a |
%global fastdebug_arches x86_64 ppc64le aarch64
|
|
|
44604a |
# Set of architectures with a Just-In-Time (JIT) compiler
|
|
|
44604a |
%global jit_arches %{arm} %{aarch64} %{ix86} %{power64} s390x sparcv9 sparc64 x86_64
|
|
|
44604a |
# Set of architectures which use the Zero assembler port (!jit_arches)
|
|
|
44604a |
%global zero_arches ppc s390
|
|
|
44604a |
# Set of architectures which run a full bootstrap cycle
|
|
|
44604a |
%global bootstrap_arches %{jit_arches}
|
|
|
44604a |
# Set of architectures which support SystemTap tapsets
|
|
|
44604a |
%global systemtap_arches %{jit_arches}
|
|
|
44604a |
# Set of architectures with a Ahead-Of-Time (AOT) compiler
|
|
|
44604a |
%global aot_arches x86_64 %{aarch64}
|
|
|
44604a |
# Set of architectures which support the serviceability agent
|
|
|
44604a |
%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} %{arm}
|
|
|
44604a |
# Set of architectures which support class data sharing
|
|
|
44604a |
# As of JDK-8005165 in OpenJDK 10, class sharing is not arch-specific
|
|
|
44604a |
# However, it does segfault on the Zero assembler port, so currently JIT only
|
|
|
44604a |
%global share_arches %{jit_arches}
|
|
|
44604a |
# Set of architectures for which we build the Shenandoah garbage collector
|
|
|
44604a |
%global shenandoah_arches x86_64 %{aarch64}
|
|
|
44604a |
# Set of architectures for which we build the Z garbage collector
|
|
|
44604a |
%global zgc_arches x86_64
|
|
|
44604a |
# Set of architectures for which alt-java has SSB mitigation
|
|
|
44604a |
%global ssbd_arches x86_64
|
|
|
44604a |
# Set of architectures for which java has short vector math library (libjsvml.so)
|
|
|
44604a |
%global svml_arches x86_64
|
|
|
44604a |
# Set of architectures where we verify backtraces with gdb
|
|
|
44604a |
# s390x fails on RHEL 7 so we exclude it there
|
|
|
44604a |
%if (0%{?rhel} > 0 && 0%{?rhel} < 8)
|
|
|
44604a |
%global gdb_arches %{arm} %{aarch64} %{ix86} %{power64} sparcv9 sparc64 x86_64 %{zero_arches}
|
|
|
44604a |
%else
|
|
|
44604a |
%global gdb_arches %{jit_arches} %{zero_arches}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# By default, we build a slowdebug build during main build on JIT architectures
|
|
|
44604a |
%if %{with slowdebug}
|
|
|
44604a |
%ifarch %{debug_arches}
|
|
|
44604a |
%global include_debug_build 1
|
|
|
44604a |
%else
|
|
|
44604a |
%global include_debug_build 0
|
|
|
44604a |
%endif
|
|
|
44604a |
%else
|
|
|
44604a |
%global include_debug_build 0
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# On certain architectures, we compile the Shenandoah GC
|
|
|
44604a |
%ifarch %{shenandoah_arches}
|
|
|
44604a |
%global use_shenandoah_hotspot 1
|
|
|
44604a |
%else
|
|
|
44604a |
%global use_shenandoah_hotspot 0
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# By default, we build a fastdebug build during main build only on fastdebug architectures
|
|
|
44604a |
%if %{with fastdebug}
|
|
|
44604a |
%ifarch %{fastdebug_arches}
|
|
|
44604a |
%global include_fastdebug_build 1
|
|
|
44604a |
%else
|
|
|
44604a |
%global include_fastdebug_build 0
|
|
|
44604a |
%endif
|
|
|
44604a |
%else
|
|
|
44604a |
%global include_fastdebug_build 0
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_debug_build}
|
|
|
44604a |
%global slowdebug_build %{debug_suffix}
|
|
|
44604a |
%else
|
|
|
44604a |
%global slowdebug_build %{nil}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_fastdebug_build}
|
|
|
44604a |
%global fastdebug_build %{fastdebug_suffix}
|
|
|
44604a |
%else
|
|
|
44604a |
%global fastdebug_build %{nil}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# If you disable all builds, then the build fails
|
|
|
44604a |
# Build and test slowdebug first as it provides the best diagnostics
|
|
|
44604a |
%global build_loop %{slowdebug_build} %{fastdebug_build} %{normal_build}
|
|
|
44604a |
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
%global staticlibs_loop %{staticlibs_suffix}
|
|
|
44604a |
%else
|
|
|
44604a |
%global staticlibs_loop %{nil}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%ifarch %{bootstrap_arches}
|
|
|
44604a |
%global bootstrap_build true
|
|
|
44604a |
%else
|
|
|
44604a |
%global bootstrap_build false
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
# Extra target for producing the static-libraries. Separate from
|
|
|
44604a |
# other targets since this target is configured to use in-tree
|
|
|
44604a |
# AWT dependencies: lcms, libjpeg, libpng, libharfbuzz, giflib
|
|
|
44604a |
# and possibly others
|
|
|
44604a |
%global static_libs_target static-libs-image
|
|
|
44604a |
%else
|
|
|
44604a |
%global static_libs_target %{nil}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# The static libraries are produced under the same configuration as the main
|
|
|
44604a |
# build for portables, as we expect in-tree libraries to be used throughout.
|
|
|
44604a |
# If system libraries are enabled, the static libraries will also use them
|
|
|
44604a |
# which may cause issues.
|
|
|
44604a |
%global bootstrap_targets images %{static_libs_target} legacy-jre-image
|
|
|
44604a |
%global release_targets images docs-zip %{static_libs_target} legacy-jre-image
|
|
|
44604a |
# No docs nor bootcycle for debug builds
|
|
|
44604a |
%global debug_targets images %{static_libs_target} legacy-jre-image
|
|
|
44604a |
# Target to use to just build HotSpot
|
|
|
44604a |
%global hotspot_target hotspot
|
|
|
44604a |
|
|
|
44604a |
# JDK to use for bootstrapping
|
|
|
44604a |
%global bootjdk /usr/lib/jvm/java-%{buildjdkver}-openjdk
|
|
|
44604a |
|
|
|
44604a |
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
|
|
|
44604a |
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
|
|
|
44604a |
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
|
|
|
44604a |
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
|
|
|
44604a |
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
|
|
|
44604a |
%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||')
|
|
|
44604a |
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
|
|
|
44604a |
%global ourldflags %{__global_ldflags}
|
|
|
44604a |
|
|
|
44604a |
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
|
|
|
44604a |
# the initialization must be here. Later the pkg-config have buggy behavior
|
|
|
44604a |
# looks like openjdk RPM specific bug
|
|
|
44604a |
# Always set this so the nss.cfg file is not broken
|
|
|
44604a |
%global NSS_LIBDIR %(pkg-config --variable=libdir nss)
|
|
|
44604a |
|
|
|
44604a |
# In some cases, the arch used by the JDK does
|
|
|
44604a |
# not match _arch.
|
|
|
44604a |
# Also, in some cases, the machine name used by SystemTap
|
|
|
44604a |
# does not match that given by _target_cpu
|
|
|
44604a |
%ifarch x86_64
|
|
|
44604a |
%global archinstall amd64
|
|
|
44604a |
%global stapinstall x86_64
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch ppc
|
|
|
44604a |
%global archinstall ppc
|
|
|
44604a |
%global stapinstall powerpc
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch %{ppc64be}
|
|
|
44604a |
%global archinstall ppc64
|
|
|
44604a |
%global stapinstall powerpc
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch %{ppc64le}
|
|
|
44604a |
%global archinstall ppc64le
|
|
|
44604a |
%global stapinstall powerpc
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch %{ix86}
|
|
|
44604a |
%global archinstall i686
|
|
|
44604a |
%global stapinstall i386
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch ia64
|
|
|
44604a |
%global archinstall ia64
|
|
|
44604a |
%global stapinstall ia64
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch s390
|
|
|
44604a |
%global archinstall s390
|
|
|
44604a |
%global stapinstall s390
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch s390x
|
|
|
44604a |
%global archinstall s390x
|
|
|
44604a |
%global stapinstall s390
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch %{arm}
|
|
|
44604a |
%global archinstall arm
|
|
|
44604a |
%global stapinstall arm
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch %{aarch64}
|
|
|
44604a |
%global archinstall aarch64
|
|
|
44604a |
%global stapinstall arm64
|
|
|
44604a |
%endif
|
|
|
44604a |
# 32 bit sparc, optimized for v9
|
|
|
44604a |
%ifarch sparcv9
|
|
|
44604a |
%global archinstall sparc
|
|
|
44604a |
%global stapinstall %{_target_cpu}
|
|
|
44604a |
%endif
|
|
|
44604a |
# 64 bit sparc
|
|
|
44604a |
%ifarch sparc64
|
|
|
44604a |
%global archinstall sparcv9
|
|
|
44604a |
%global stapinstall %{_target_cpu}
|
|
|
44604a |
%endif
|
|
|
44604a |
# Need to support noarch for srpm build
|
|
|
44604a |
%ifarch noarch
|
|
|
44604a |
%global archinstall %{nil}
|
|
|
44604a |
%global stapinstall %{nil}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# always off for portable builds
|
|
|
44604a |
%ifarch %{systemtap_arches}
|
|
|
44604a |
%global with_systemtap 0
|
|
|
44604a |
%else
|
|
|
44604a |
%global with_systemtap 0
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# New Version-String scheme-style defines
|
|
|
44604a |
%global featurever 17
|
|
|
44604a |
%global interimver 0
|
|
|
44604a |
%global updatever 7
|
|
|
44604a |
%global patchver 0
|
|
|
44604a |
# buildjdkver is usually same as %%{featurever},
|
|
|
44604a |
# but in time of bootstrap of next jdk, it is featurever-1,
|
|
|
44604a |
# and this it is better to change it here, on single place
|
|
|
44604a |
%global buildjdkver 17
|
|
|
44604a |
# We don't add any LTS designator for STS packages (Fedora and EPEL).
|
|
|
44604a |
# We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined.
|
|
|
44604a |
%if 0%{?rhel} && !0%{?epel}
|
|
|
44604a |
%global lts_designator "LTS"
|
|
|
44604a |
%global lts_designator_zip -%{lts_designator}
|
|
|
44604a |
%else
|
|
|
44604a |
%global lts_designator ""
|
|
|
44604a |
%global lts_designator_zip ""
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# Define vendor information used by OpenJDK
|
|
|
44604a |
%global oj_vendor Red Hat, Inc.
|
|
|
44604a |
%global oj_vendor_url https://www.redhat.com/
|
|
|
44604a |
# Define what url should JVM offer in case of a crash report
|
|
|
44604a |
# order may be important, epel may have rhel declared
|
|
|
44604a |
%if 0%{?epel}
|
|
|
44604a |
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20EPEL&component=%{name}&version=epel%{epel}
|
|
|
44604a |
%else
|
|
|
44604a |
%if 0%{?fedora}
|
|
|
44604a |
# Does not work for rawhide, keeps the version field empty
|
|
|
44604a |
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}&version=%{fedora}
|
|
|
44604a |
%else
|
|
|
44604a |
%if 0%{?rhel}
|
|
|
44604a |
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%20%{rhel}&component=%{name}
|
|
|
44604a |
%else
|
|
|
44604a |
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi
|
|
|
44604a |
%endif
|
|
|
44604a |
%endif
|
|
|
44604a |
%endif
|
|
|
44604a |
%global oj_vendor_version (Red_Hat-%{version}-%{rpmrelease})
|
|
|
44604a |
|
|
|
44604a |
# Define IcedTea version used for SystemTap tapsets and desktop file
|
|
|
44604a |
%global icedteaver 6.0.0pre00-c848b93a8598
|
|
|
44604a |
# Define current Git revision for the FIPS support patches
|
|
|
44604a |
%global fipsver bf363eecce3
|
|
|
44604a |
|
|
|
44604a |
# Standard JPackage naming and versioning defines
|
|
|
44604a |
%global origin openjdk
|
|
|
44604a |
%global origin_nice OpenJDK
|
|
|
44604a |
%global top_level_dir_name %{origin}
|
|
|
44604a |
%global top_level_dir_name_backup %{top_level_dir_name}-backup
|
|
|
44604a |
%global buildver 7
|
|
|
44604a |
%global rpmrelease 2
|
|
|
44604a |
#%%global tagsuffix %%{nil}
|
|
|
44604a |
# 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
|
|
|
44604a |
%if %is_system_jdk
|
|
|
44604a |
# Using 10 digits may overflow the int used for priority, so we combine the patch and build versions
|
|
|
44604a |
# It is very unlikely we will ever have a patch version > 4 or a build version > 20, so we combine as (patch * 20) + build.
|
|
|
44604a |
# This means 11.0.9.0+11 would have had a priority of 11000911 as before
|
|
|
44604a |
# A 11.0.9.1+1 would have had a priority of 11000921 (20 * 1 + 1), thus ensuring it is bigger than 11.0.9.0+11
|
|
|
44604a |
%global combiver $( expr 20 '*' %{patchver} + %{buildver} )
|
|
|
44604a |
%global priority %( printf '%02d%02d%02d%02d' %{featurever} %{interimver} %{updatever} %{combiver} )
|
|
|
44604a |
%else
|
|
|
44604a |
# for techpreview, using 1, so slowdebugs can have 0
|
|
|
44604a |
%global priority %( printf '%08d' 1 )
|
|
|
44604a |
%endif
|
|
|
44604a |
%global newjavaver %{featurever}.%{interimver}.%{updatever}.%{patchver}
|
|
|
44604a |
%global javaver %{featurever}
|
|
|
44604a |
|
|
|
44604a |
# Strip up to 6 trailing zeros in newjavaver, as the JDK does, to get the correct version used in filenames
|
|
|
44604a |
%global filever %(svn=%{newjavaver}; for i in 1 2 3 4 5 6 ; do svn=${svn%%.0} ; done; echo ${svn})
|
|
|
44604a |
|
|
|
44604a |
# The tag used to create the OpenJDK tarball
|
|
|
44604a |
%global vcstag jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}}
|
|
|
44604a |
|
|
|
44604a |
# Define milestone (EA for pre-releases, GA for releases)
|
|
|
44604a |
# Release will be (where N is usually a number starting at 1):
|
|
|
44604a |
# - 0.N%%{?extraver}%%{?dist} for EA releases,
|
|
|
44604a |
# - N%%{?extraver}{?dist} for GA releases
|
|
|
44604a |
%global is_ga 1
|
|
|
44604a |
%if %{is_ga}
|
|
|
44604a |
%global build_type GA
|
|
|
44604a |
%global ea_designator ""
|
|
|
44604a |
%global ea_designator_zip ""
|
|
|
44604a |
%global extraver %{nil}
|
|
|
44604a |
%global eaprefix %{nil}
|
|
|
44604a |
%else
|
|
|
44604a |
%global build_type EA
|
|
|
44604a |
%global ea_designator ea
|
|
|
44604a |
%global ea_designator_zip -%{ea_designator}
|
|
|
44604a |
%global extraver .%{ea_designator}
|
|
|
44604a |
%global eaprefix 0.
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# parametrized macros are order-sensitive
|
|
|
44604a |
%global compatiblename java-%{featurever}-%{origin}
|
|
|
44604a |
%global fullversion %{compatiblename}-%{version}-%{release}
|
|
|
44604a |
# images directories from upstream build
|
|
|
44604a |
%global jdkimage jdk
|
|
|
44604a |
%global static_libs_image static-libs
|
|
|
44604a |
# output dir stub
|
|
|
44604a |
%define buildoutputdir() %{expand:build/jdk%{featurever}.build%{?1}}
|
|
|
44604a |
%define installoutputdir() %{expand:install/jdk%{featurever}.install%{?1}}
|
|
|
44604a |
%define packageoutputdir() %{expand:packages/jdk%{featurever}.packages%{?1}}
|
|
|
44604a |
# we can copy the javadoc to not arched dir, or make it not noarch
|
|
|
44604a |
%define uniquejavadocdir() %{expand:%{fullversion}.%{_arch}%{?1}}
|
|
|
44604a |
# main id and dir of this jdk
|
|
|
44604a |
%define uniquesuffix() %{expand:%{fullversion}.%{_arch}%{?1}}
|
|
|
44604a |
# portable only declarations
|
|
|
44604a |
%global jreimage jre
|
|
|
44604a |
%define jreportablenameimpl() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable%{1}.jre;g")
|
|
|
44604a |
%define jdkportablenameimpl() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable%{1}.jdk;g")
|
|
|
44604a |
%define staticlibsportablenameimpl() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable%{1}.static-libs;g")
|
|
|
44604a |
%define jreportablearchive() %{expand:%{jreportablenameimpl -- %%{1}}.tar.xz}
|
|
|
44604a |
%define jdkportablearchive() %{expand:%{jdkportablenameimpl -- %%{1}}.tar.xz}
|
|
|
44604a |
%define staticlibsportablearchive() %{expand:%{staticlibsportablenameimpl -- %%{1}}.tar.xz}
|
|
|
44604a |
%define jreportablename() %{expand:%{jreportablenameimpl -- %%{1}}}
|
|
|
44604a |
%define jdkportablename() %{expand:%{jdkportablenameimpl -- %%{1}}}
|
|
|
44604a |
# Intentionally use jdkportablenameimpl here since we want to have static-libs files overlayed on
|
|
|
44604a |
# top of the JDK archive
|
|
|
44604a |
%define staticlibsportablename() %{expand:%{jdkportablenameimpl -- %%{1}}}
|
|
|
44604a |
%define docportablename() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable.docs;g")
|
|
|
44604a |
%define docportablearchive() %{docportablename}.tar.xz
|
|
|
44604a |
%define miscportablename() %(echo %{uniquesuffix ""} | sed "s;el%{rhel}\\(_[0-9]\\)*;portable.misc;g")
|
|
|
44604a |
%define miscportablearchive() %{miscportablename}.tar.xz
|
|
|
44604a |
|
|
|
44604a |
#################################################################
|
|
|
44604a |
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
|
|
|
44604a |
# https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14
|
|
|
44604a |
# https://bugzilla.redhat.com/show_bug.cgi?id=1655938
|
|
|
44604a |
%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.*|libsystemconf[.]so.*|libzip[.]so.*%{freetype_lib}
|
|
|
44604a |
%global _publiclibs libjawt[.]so.*|libjava[.]so.*|libjvm[.]so.*|libverify[.]so.*|libjsig[.]so.*
|
|
|
44604a |
%if %is_system_jdk
|
|
|
44604a |
%global __provides_exclude ^(%{_privatelibs})$
|
|
|
44604a |
%global __requires_exclude ^(%{_privatelibs})$
|
|
|
44604a |
# Never generate lib-style provides/requires for slowdebug packages
|
|
|
44604a |
%global __provides_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
|
|
|
44604a |
%global __requires_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
|
|
|
44604a |
%global __provides_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
|
|
|
44604a |
%global __requires_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
|
|
|
44604a |
%else
|
|
|
44604a |
# Don't generate provides/requires for JDK provided shared libraries at all.
|
|
|
44604a |
%global __provides_exclude ^(%{_privatelibs}|%{_publiclibs})$
|
|
|
44604a |
%global __requires_exclude ^(%{_privatelibs}|%{_publiclibs})$
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
|
|
|
44604a |
%global etcjavasubdir %{_sysconfdir}/java/java-%{javaver}-%{origin}
|
|
|
44604a |
%define etcjavadir() %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}}
|
|
|
44604a |
# Standard JPackage directories and symbolic links.
|
|
|
44604a |
%define sdkdir() %{expand:%{uniquesuffix -- %{?1}}}
|
|
|
44604a |
%define jrelnk() %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%{?1}}
|
|
|
44604a |
|
|
|
44604a |
%define sdkbindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
|
|
|
44604a |
%define jrebindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
|
|
|
44604a |
|
|
|
44604a |
%global alt_java_name alt-java
|
|
|
44604a |
|
|
|
44604a |
%global rpm_state_dir %{_localstatedir}/lib/rpm-state/
|
|
|
44604a |
|
|
|
44604a |
# For flatpack builds hard-code /usr/sbin/alternatives,
|
|
|
44604a |
# otherwise use %%{_sbindir} relative path.
|
|
|
44604a |
%if 0%{?flatpak}
|
|
|
44604a |
%global alternatives_requires /usr/sbin/alternatives
|
|
|
44604a |
%else
|
|
|
44604a |
%global alternatives_requires %{_sbindir}/alternatives
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{with_systemtap}
|
|
|
44604a |
# Where to install systemtap tapset (links)
|
|
|
44604a |
# We would like these to be in a package specific sub-dir,
|
|
|
44604a |
# but currently systemtap doesn't support that, so we have to
|
|
|
44604a |
# use the root tapset dir for now. To distinguish between 64
|
|
|
44604a |
# and 32 bit architectures we place the tapsets under the arch
|
|
|
44604a |
# specific dir (note that systemtap will only pickup the tapset
|
|
|
44604a |
# for the primary arch for now). Systemtap uses the machine name
|
|
|
44604a |
# aka target_cpu as architecture specific directory name.
|
|
|
44604a |
%global tapsetroot /usr/share/systemtap
|
|
|
44604a |
%global tapsetdirttapset %{tapsetroot}/tapset/
|
|
|
44604a |
%global tapsetdir %{tapsetdirttapset}/%{stapinstall}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# x86 is not supported by OpenJDK 17
|
|
|
44604a |
ExcludeArch: %{ix86}
|
|
|
44604a |
|
|
|
44604a |
# Portables have no repo (requires/provides), but these are awesome for orientation in spec
|
|
|
44604a |
# Also scriptlets are happily missing and files are handled old fashion
|
|
|
44604a |
# not-duplicated requires/provides/obsoletes for normal/debug packages
|
|
|
44604a |
%define java_rpo() %{expand:
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
%define java_devel_rpo() %{expand:
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
%define java_static_libs_rpo() %{expand:
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
%define java_unstripped_rpo() %{expand:
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
%define java_docs_rpo() %{expand:
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
%define java_misc_rpo() %{expand:
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
# Prevent brp-java-repack-jars from being run
|
|
|
44604a |
%global __jar_repack 0
|
|
|
44604a |
|
|
|
44604a |
# portables have grown out of its component, moving back to java-x-vendor
|
|
|
44604a |
# this expression, when declared as global, filled component with java-x-vendor portable
|
|
|
44604a |
%define component %(echo %{name} | sed "s;-portable;;g")
|
|
|
44604a |
|
|
|
44604a |
Name: java-%{javaver}-%{origin}-portable
|
|
|
44604a |
Version: %{newjavaver}.%{buildver}
|
|
|
44604a |
Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
|
|
|
44604a |
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
|
|
|
44604a |
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
|
|
|
44604a |
# also included the epoch in their virtual provides. This created a
|
|
|
44604a |
# situation where in-the-wild java-1.5.0-ibm packages provided "java =
|
|
|
44604a |
# 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
|
|
|
44604a |
# interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
|
|
|
44604a |
# satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
|
|
|
44604a |
# JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
|
|
|
44604a |
# provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
|
|
|
44604a |
|
|
|
44604a |
Epoch: 1
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} Runtime Environment portable edition
|
|
|
44604a |
# Groups are only used up to RHEL 8 and on Fedora versions prior to F30
|
|
|
44604a |
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
|
|
|
44604a |
Group: Development/Languages
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# HotSpot code is licensed under GPLv2
|
|
|
44604a |
# JDK library code is licensed under GPLv2 with the Classpath exception
|
|
|
44604a |
# The Apache license is used in code taken from Apache projects (primarily xalan & xerces)
|
|
|
44604a |
# DOM levels 2 & 3 and the XML digital signature schemas are licensed under the W3C Software License
|
|
|
44604a |
# The JSR166 concurrency code is in the public domain
|
|
|
44604a |
# The BSD and MIT licenses are used for a number of third-party libraries (see ADDITIONAL_LICENSE_INFO)
|
|
|
44604a |
# The OpenJDK source tree includes:
|
|
|
44604a |
# - JPEG library (IJG), zlib & libpng (zlib), giflib (MIT), harfbuzz (ISC),
|
|
|
44604a |
# - freetype (FTL), jline (BSD) and LCMS (MIT)
|
|
|
44604a |
# - jquery (MIT), jdk.crypto.cryptoki PKCS 11 wrapper (RSA)
|
|
|
44604a |
# - public_suffix_list.dat from publicsuffix.org (MPLv2.0)
|
|
|
44604a |
# The test code includes copies of NSS under the Mozilla Public License v2.0
|
|
|
44604a |
# The PCSClite headers are under a BSD with advertising license
|
|
|
44604a |
# The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version
|
|
|
44604a |
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
|
|
|
44604a |
URL: http://openjdk.java.net/
|
|
|
44604a |
|
|
|
44604a |
|
|
|
44604a |
# The source tarball, generated using generate_source_tarball.sh
|
|
|
44604a |
Source0: openjdk-jdk%{featurever}u-%{vcstag}.tar.xz
|
|
|
44604a |
|
|
|
44604a |
# Use 'icedtea_sync.sh' to update the following
|
|
|
44604a |
# They are based on code contained in the IcedTea project (6.x).
|
|
|
44604a |
# Systemtap tapsets. Zipped up to keep it small.
|
|
|
44604a |
# Disabled in portables
|
|
|
44604a |
#Source8: tapsets-icedtea-%%{icedteaver}.tar.xz
|
|
|
44604a |
|
|
|
44604a |
# Desktop files. Adapted from IcedTea
|
|
|
44604a |
# Disabled in portables
|
|
|
44604a |
#Source9: jconsole.desktop.in
|
|
|
44604a |
|
|
|
44604a |
# Release notes
|
|
|
44604a |
Source10: NEWS
|
|
|
44604a |
|
|
|
44604a |
# nss configuration file
|
|
|
44604a |
Source11: nss.cfg.in
|
|
|
44604a |
|
|
|
44604a |
# Removed libraries that we link instead
|
|
|
44604a |
Source12: remove-intree-libraries.sh
|
|
|
44604a |
|
|
|
44604a |
# Ensure we aren't using the limited crypto policy
|
|
|
44604a |
Source13: TestCryptoLevel.java
|
|
|
44604a |
|
|
|
44604a |
# Ensure ECDSA is working
|
|
|
44604a |
Source14: TestECDSA.java
|
|
|
44604a |
|
|
|
44604a |
# Verify system crypto (policy) can be disabled via a property
|
|
|
44604a |
Source15: TestSecurityProperties.java
|
|
|
44604a |
|
|
|
44604a |
# Ensure vendor settings are correct
|
|
|
44604a |
Source16: CheckVendor.java
|
|
|
44604a |
|
|
|
44604a |
# Ensure translations are available for new timezones
|
|
|
44604a |
Source18: TestTranslations.java
|
|
|
44604a |
|
|
|
44604a |
############################################
|
|
|
44604a |
#
|
|
|
44604a |
# RPM/distribution specific patches
|
|
|
44604a |
#
|
|
|
44604a |
############################################
|
|
|
44604a |
|
|
|
44604a |
# Ignore AWTError when assistive technologies are loaded
|
|
|
44604a |
Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
|
|
|
44604a |
Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch
|
|
|
44604a |
# NSS via SunPKCS11 Provider (disabled due to memory leak).
|
|
|
44604a |
Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
|
|
|
44604a |
# RH1750419: enable build of speculative store bypass hardened alt-java (CVE-2018-3639)
|
|
|
44604a |
Patch600: rh1750419-redhat_alt_java.patch
|
|
|
44604a |
# Depend on pcsc-lite-libs instead of pcsc-lite-devel as this is only in optional repo
|
|
|
44604a |
Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch
|
|
|
44604a |
|
|
|
44604a |
# Crypto policy and FIPS support patches
|
|
|
44604a |
# Patch is generated from the fips-17u tree at https://github.com/rh-openjdk/jdk/tree/fips-17u
|
|
|
44604a |
# as follows: git diff %%{vcstag} src make test > fips-17u-$(git show -s --format=%h HEAD).patch
|
|
|
44604a |
# Diff is limited to src and make subdirectories to exclude .github changes
|
|
|
44604a |
# Fixes currently included:
|
|
|
44604a |
# PR3183, RH1340845: Follow system wide crypto policy
|
|
|
44604a |
# PR3695: Allow use of system crypto policy to be disabled by the user
|
|
|
44604a |
# RH1655466: Support RHEL FIPS mode using SunPKCS11 provider
|
|
|
44604a |
# RH1818909: No ciphersuites availale for SSLSocket in FIPS mode
|
|
|
44604a |
# RH1860986: Disable TLSv1.3 with the NSS-FIPS provider until PKCS#11 v3.0 support is available
|
|
|
44604a |
# RH1915071: Always initialise JavaSecuritySystemConfiguratorAccess
|
|
|
44604a |
# RH1929465: Improve system FIPS detection
|
|
|
44604a |
# RH1995150: Disable non-FIPS crypto in SUN and SunEC security providers
|
|
|
44604a |
# RH1996182: Login to the NSS software token in FIPS mode
|
|
|
44604a |
# RH1991003: Allow plain key import unless com.redhat.fips.plainKeySupport is set to false
|
|
|
44604a |
# RH2021263: Resolve outstanding FIPS issues
|
|
|
44604a |
# RH2052819: Fix FIPS reliance on crypto policies
|
|
|
44604a |
# RH2052829: Detect NSS at Runtime for FIPS detection
|
|
|
44604a |
# RH2052070: Enable AlgorithmParameters and AlgorithmParameterGenerator services in FIPS mode
|
|
|
44604a |
# RH2023467: Enable FIPS keys export
|
|
|
44604a |
# RH2094027: SunEC runtime permission for FIPS
|
|
|
44604a |
# RH2036462: sun.security.pkcs11.wrapper.PKCS11.getInstance breakage
|
|
|
44604a |
# RH2090378: Revert to disabling system security properties and FIPS mode support together
|
|
|
44604a |
# RH2104724: Avoid import/export of DH private keys
|
|
|
44604a |
# RH2092507: P11Key.getEncoded does not work for DH keys in FIPS mode
|
|
|
44604a |
# Build the systemconf library on all platforms
|
|
|
44604a |
# RH2048582: Support PKCS#12 keystores
|
|
|
44604a |
# RH2020290: Support TLS 1.3 in FIPS mode
|
|
|
44604a |
# Add nss.fips.cfg support to OpenJDK tree
|
|
|
44604a |
# RH2117972: Extend the support for NSS DBs (PKCS11) in FIPS mode
|
|
|
44604a |
# Remove forgotten dead code from RH2020290 and RH2104724
|
|
|
44604a |
# OJ1357: Fix issue on FIPS with a SecurityManager in place
|
|
|
44604a |
# RH2134669: Add missing attributes when registering services in FIPS mode.
|
|
|
44604a |
# test/jdk/sun/security/pkcs11/fips/VerifyMissingAttributes.java: fixed jtreg main class
|
|
|
44604a |
# RH1940064: Enable XML Signature provider in FIPS mode
|
|
|
44604a |
# RH2173781: Avoid calling C_GetInfo() too early, before cryptoki is initialized
|
|
|
44604a |
Patch1001: fips-17u-%{fipsver}.patch
|
|
|
44604a |
|
|
|
44604a |
#############################################
|
|
|
44604a |
#
|
|
|
44604a |
# OpenJDK patches in need of upstreaming
|
|
|
44604a |
#
|
|
|
44604a |
#############################################
|
|
|
44604a |
|
|
|
44604a |
# Currently empty
|
|
|
44604a |
|
|
|
44604a |
#############################################
|
|
|
44604a |
#
|
|
|
44604a |
# OpenJDK patches appearing in 17.0.8
|
|
|
44604a |
#
|
|
|
44604a |
#############################################
|
|
|
44604a |
# JDK-8274864: Remove Amman/Cairo hacks in ZoneInfoFile
|
|
|
44604a |
Patch2001: jdk8274864-remove_amman_cairo_hacks.patch
|
|
|
44604a |
# JDK-8305113: (tz) Update Timezone Data to 2023c
|
|
|
44604a |
Patch2002: jdk8305113-tzdata2023c.patch
|
|
|
44604a |
|
|
|
44604a |
#############################################
|
|
|
44604a |
#
|
|
|
44604a |
# Portable build specific patches
|
|
|
44604a |
#
|
|
|
44604a |
#############################################
|
|
|
44604a |
|
|
|
44604a |
#############################################
|
|
|
44604a |
#
|
|
|
44604a |
# OpenJDK patches targetted for 17.0.6
|
|
|
44604a |
#
|
|
|
44604a |
#############################################
|
|
|
44604a |
|
|
|
44604a |
BuildRequires: autoconf
|
|
|
44604a |
BuildRequires: automake
|
|
|
44604a |
BuildRequires: alsa-lib-devel
|
|
|
44604a |
BuildRequires: binutils
|
|
|
44604a |
BuildRequires: cups-devel
|
|
|
44604a |
BuildRequires: desktop-file-utils
|
|
|
44604a |
# elfutils only are OK for build without AOT
|
|
|
44604a |
BuildRequires: elfutils-devel
|
|
|
44604a |
BuildRequires: file
|
|
|
44604a |
BuildRequires: fontconfig-devel
|
|
|
44604a |
BuildRequires: gcc-c++
|
|
|
44604a |
BuildRequires: gdb
|
|
|
44604a |
BuildRequires: libxslt
|
|
|
44604a |
BuildRequires: libX11-devel
|
|
|
44604a |
BuildRequires: libXi-devel
|
|
|
44604a |
BuildRequires: libXinerama-devel
|
|
|
44604a |
BuildRequires: libXrandr-devel
|
|
|
44604a |
BuildRequires: libXrender-devel
|
|
|
44604a |
BuildRequires: libXt-devel
|
|
|
44604a |
BuildRequires: libXtst-devel
|
|
|
44604a |
# Requirement for setting up nss.cfg
|
|
|
44604a |
BuildRequires: nss-devel
|
|
|
44604a |
# Requirement for system security property test
|
|
|
44604a |
# N/A for portable. RHEL7 doesn't provide them
|
|
|
44604a |
#BuildRequires: crypto-policies
|
|
|
44604a |
BuildRequires: pkgconfig
|
|
|
44604a |
BuildRequires: xorg-x11-proto-devel
|
|
|
44604a |
BuildRequires: zip
|
|
|
44604a |
# to pack portable tarballs
|
|
|
44604a |
BuildRequires: tar
|
|
|
44604a |
BuildRequires: unzip
|
|
|
44604a |
# No javapackages-filesystem on el7,nor is needed for portables
|
|
|
44604a |
# BuildRequires: javapackages-filesystem
|
|
|
44604a |
BuildRequires: java-%{buildjdkver}-openjdk-devel
|
|
|
44604a |
# Zero-assembler build requirement
|
|
|
44604a |
%ifarch %{zero_arches}
|
|
|
44604a |
BuildRequires: libffi-devel
|
|
|
44604a |
%endif
|
|
|
44604a |
# 2023c required as of JDK-8305113
|
|
|
44604a |
BuildRequires: tzdata-java >= 2023c
|
|
|
44604a |
# cacerts build requirement in portable mode
|
|
|
44604a |
BuildRequires: ca-certificates
|
|
|
44604a |
# Earlier versions have a bug in tree vectorization on PPC
|
|
|
44604a |
BuildRequires: gcc >= 4.8.3-8
|
|
|
44604a |
|
|
|
44604a |
%if %{with_systemtap}
|
|
|
44604a |
BuildRequires: systemtap-sdt-devel
|
|
|
44604a |
%endif
|
|
|
44604a |
BuildRequires: make
|
|
|
44604a |
|
|
|
44604a |
%if %{system_libs}
|
|
|
44604a |
BuildRequires: freetype-devel
|
|
|
44604a |
BuildRequires: giflib-devel
|
|
|
44604a |
BuildRequires: harfbuzz-devel
|
|
|
44604a |
BuildRequires: lcms2-devel
|
|
|
44604a |
BuildRequires: libjpeg-devel
|
|
|
44604a |
BuildRequires: libpng-devel
|
|
|
44604a |
%else
|
|
|
44604a |
# Version in src/java.desktop/share/native/libfreetype/include/freetype/freetype.h
|
|
|
44604a |
Provides: bundled(freetype) = 2.12.1
|
|
|
44604a |
# Version in src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
|
|
|
44604a |
Provides: bundled(giflib) = 5.2.1
|
|
|
44604a |
# Version in src/java.desktop/share/native/libharfbuzz/hb-version.h
|
|
|
44604a |
Provides: bundled(harfbuzz) = 4.4.1
|
|
|
44604a |
# Version in src/java.desktop/share/native/liblcms/lcms2.h
|
|
|
44604a |
Provides: bundled(lcms2) = 2.12.0
|
|
|
44604a |
# Version in src/java.desktop/share/native/libjavajpeg/jpeglib.h
|
|
|
44604a |
Provides: bundled(libjpeg) = 6b
|
|
|
44604a |
# Version in src/java.desktop/share/native/libsplashscreen/libpng/png.h
|
|
|
44604a |
Provides: bundled(libpng) = 1.6.37
|
|
|
44604a |
# We link statically against libstdc++ to increase portability
|
|
|
44604a |
BuildRequires: libstdc++-static
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# this is always built, also during debug-only build
|
|
|
44604a |
# when it is built in debug-only this package is just placeholder
|
|
|
44604a |
%{java_rpo %{nil}}
|
|
|
44604a |
|
|
|
44604a |
%description
|
|
|
44604a |
The %{origin_nice} %{featurever} runtime environment - portable edition.
|
|
|
44604a |
|
|
|
44604a |
%if %{include_debug_build}
|
|
|
44604a |
%package slowdebug
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} Runtime Environment portable edition %{debug_on}
|
|
|
44604a |
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
|
|
|
44604a |
Group: Development/Languages
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%{java_rpo -- %{debug_suffix_unquoted}}
|
|
|
44604a |
%description slowdebug
|
|
|
44604a |
The %{origin_nice} %{featurever} runtime environment - portable edition.
|
|
|
44604a |
%{debug_warning}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_fastdebug_build}
|
|
|
44604a |
%package fastdebug
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} Runtime Environment portable edition %{fastdebug_on}
|
|
|
44604a |
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
|
|
|
44604a |
Group: Development/Languages
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%{java_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
44604a |
%description fastdebug
|
|
|
44604a |
The %{origin_nice} %{featurever} runtime environment - portable edition.
|
|
|
44604a |
%{fastdebug_warning}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_normal_build}
|
|
|
44604a |
%package devel
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} Development Environment portable edition
|
|
|
44604a |
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
|
|
|
44604a |
Group: Development/Languages
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%{java_devel_rpo %{nil}}
|
|
|
44604a |
|
|
|
44604a |
%description devel
|
|
|
44604a |
The %{origin_nice} %{featurever} development tools - portable edition.
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_debug_build}
|
|
|
44604a |
%package devel-slowdebug
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} Runtime and Development Environment portable edition %{debug_on}
|
|
|
44604a |
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
|
|
|
44604a |
Group: Development/Languages
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%{java_devel_rpo -- %{debug_suffix_unquoted}}
|
|
|
44604a |
|
|
|
44604a |
%description devel-slowdebug
|
|
|
44604a |
The %{origin_nice} %{featurever} development tools - portable edition.
|
|
|
44604a |
%{debug_warning}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_fastdebug_build}
|
|
|
44604a |
%package devel-fastdebug
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} Runtime and Development Environment portable edition %{fastdebug_on}
|
|
|
44604a |
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
|
|
|
44604a |
Group: Development/Tools
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%{java_devel_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
44604a |
|
|
|
44604a |
%description devel-fastdebug
|
|
|
44604a |
The %{origin_nice} %{featurever} runtime environment and development tools - portable edition
|
|
|
44604a |
%{fastdebug_warning}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
|
|
|
44604a |
%if %{include_normal_build}
|
|
|
44604a |
%package static-libs
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} libraries for static linking - portable edition
|
|
|
44604a |
|
|
|
44604a |
%{java_static_libs_rpo %{nil}}
|
|
|
44604a |
|
|
|
44604a |
%description static-libs
|
|
|
44604a |
The %{origin_nice} %{featurever} libraries for static linking - portable edition.
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_debug_build}
|
|
|
44604a |
%package static-libs-slowdebug
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} libraries for static linking - portable edition %{debug_on}
|
|
|
44604a |
|
|
|
44604a |
%{java_static_libs_rpo -- %{debug_suffix_unquoted}}
|
|
|
44604a |
|
|
|
44604a |
%description static-libs-slowdebug
|
|
|
44604a |
The %{origin_nice} %{featurever} libraries for static linking - portable edition
|
|
|
44604a |
%{debug_warning}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_fastdebug_build}
|
|
|
44604a |
%package static-libs-fastdebug
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} libraries for static linking - portable edition %{fastdebug_on}
|
|
|
44604a |
|
|
|
44604a |
%{java_static_libs_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
44604a |
|
|
|
44604a |
%description static-libs-fastdebug
|
|
|
44604a |
The %{origin_nice} %{featurever} libraries for static linking - portable edition
|
|
|
44604a |
%{fastdebug_warning}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# staticlibs
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_normal_build}
|
|
|
44604a |
%package unstripped
|
|
|
44604a |
Summary: The %{origin_nice} %{featurever} runtime environment.
|
|
|
44604a |
|
|
|
44604a |
%{java_unstripped_rpo %{nil}}
|
|
|
44604a |
|
|
|
44604a |
%description unstripped
|
|
|
44604a |
The %{origin_nice} %{featurever} runtime environment.
|
|
|
44604a |
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%package docs
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} API documentation
|
|
|
44604a |
|
|
|
44604a |
%{java_docs_rpo %{nil}}
|
|
|
44604a |
|
|
|
44604a |
%description docs
|
|
|
44604a |
The %{origin_nice} %{featurever} API documentation.
|
|
|
44604a |
|
|
|
44604a |
%package misc
|
|
|
44604a |
Summary: %{origin_nice} %{featurever} miscellany
|
|
|
44604a |
|
|
|
44604a |
%{java_misc_rpo %{nil}}
|
|
|
44604a |
|
|
|
44604a |
%description misc
|
|
|
44604a |
The %{origin_nice} %{featurever} miscellany.
|
|
|
44604a |
|
|
|
44604a |
%prep
|
|
|
44604a |
|
|
|
44604a |
echo "Preparing %{oj_vendor_version}"
|
|
|
44604a |
|
|
|
44604a |
# Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-(
|
|
|
44604a |
%if 0%{?stapinstall:1}
|
|
|
44604a |
echo "CPU: %{_target_cpu}, arch install directory: %{archinstall}, SystemTap install directory: %{stapinstall}"
|
|
|
44604a |
%else
|
|
|
44604a |
%{error:Unrecognised architecture %{_target_cpu}}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
|
|
|
44604a |
echo "include_normal_build is %{include_normal_build}"
|
|
|
44604a |
else
|
|
|
44604a |
echo "include_normal_build is %{include_normal_build}, that is invalid. Use 1 for yes or 0 for no"
|
|
|
44604a |
exit 11
|
|
|
44604a |
fi
|
|
|
44604a |
if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then
|
|
|
44604a |
echo "include_debug_build is %{include_debug_build}"
|
|
|
44604a |
else
|
|
|
44604a |
echo "include_debug_build is %{include_debug_build}, that is invalid. Use 1 for yes or 0 for no"
|
|
|
44604a |
exit 12
|
|
|
44604a |
fi
|
|
|
44604a |
if [ %{include_fastdebug_build} -eq 0 -o %{include_fastdebug_build} -eq 1 ] ; then
|
|
|
44604a |
echo "include_fastdebug_build is %{include_fastdebug_build}"
|
|
|
44604a |
else
|
|
|
44604a |
echo "include_fastdebug_build is %{include_fastdebug_build}, that is invalid. Use 1 for yes or 0 for no"
|
|
|
44604a |
exit 13
|
|
|
44604a |
fi
|
|
|
44604a |
if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 -a %{include_fastdebug_build} -eq 0 ] ; then
|
|
|
44604a |
echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no go."
|
|
|
44604a |
exit 14
|
|
|
44604a |
fi
|
|
|
44604a |
%setup -q -c -n %{uniquesuffix ""} -T -a 0
|
|
|
44604a |
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084
|
|
|
44604a |
prioritylength=`expr length %{priority}`
|
|
|
44604a |
if [ $prioritylength -ne 8 ] ; then
|
|
|
44604a |
echo "priority must be 8 digits in total, violated"
|
|
|
44604a |
exit 14
|
|
|
44604a |
fi
|
|
|
44604a |
|
|
|
44604a |
# OpenJDK patches
|
|
|
44604a |
|
|
|
44604a |
%if %{system_libs}
|
|
|
44604a |
# Remove libraries that are linked by both static and dynamic builds
|
|
|
44604a |
sh %{SOURCE12} %{top_level_dir_name}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# Patch the JDK
|
|
|
44604a |
pushd %{top_level_dir_name}
|
|
|
44604a |
%patch1 -p1
|
|
|
44604a |
%patch3 -p1
|
|
|
44604a |
%patch6 -p1
|
|
|
44604a |
# Add crypto policy and FIPS support
|
|
|
44604a |
%patch1001 -p1
|
|
|
44604a |
# nss.cfg PKCS11 support; must come last as it also alters java.security
|
|
|
44604a |
%patch1000 -p1
|
|
|
44604a |
# tzdata update
|
|
|
44604a |
%patch2001 -p1
|
|
|
44604a |
%patch2002 -p1
|
|
|
44604a |
popd # openjdk
|
|
|
44604a |
|
|
|
44604a |
%patch600
|
|
|
44604a |
|
|
|
44604a |
# The OpenJDK version file includes the current
|
|
|
44604a |
# upstream version information. For some reason,
|
|
|
44604a |
# configure does not automatically use the
|
|
|
44604a |
# default pre-version supplied there (despite
|
|
|
44604a |
# what the file claims), so we pass it manually
|
|
|
44604a |
# to configure
|
|
|
44604a |
VERSION_FILE=$(pwd)/%{top_level_dir_name}/make/conf/version-numbers.conf
|
|
|
44604a |
if [ -f ${VERSION_FILE} ] ; then
|
|
|
44604a |
UPSTREAM_EA_DESIGNATOR=$(grep '^DEFAULT_PROMOTED_VERSION_PRE' ${VERSION_FILE} | cut -d '=' -f 2)
|
|
|
44604a |
else
|
|
|
44604a |
echo "Could not find OpenJDK version file.";
|
|
|
44604a |
exit 16
|
|
|
44604a |
fi
|
|
|
44604a |
if [ "x${UPSTREAM_EA_DESIGNATOR}" != "x%{ea_designator}" ] ; then
|
|
|
44604a |
echo "WARNING: Designator mismatch";
|
|
|
44604a |
echo "Spec file is configured for a %{build_type} build with designator '%{ea_designator}'"
|
|
|
44604a |
echo "Upstream version-pre setting is '${UPSTREAM_EA_DESIGNATOR}'";
|
|
|
44604a |
exit 17
|
|
|
44604a |
fi
|
|
|
44604a |
|
|
|
44604a |
# Extract systemtap tapsets
|
|
|
44604a |
%if %{with_systemtap}
|
|
|
44604a |
tar --strip-components=1 -x -I xz -f %{SOURCE8}
|
|
|
44604a |
%if %{include_debug_build}
|
|
|
44604a |
cp -r tapset tapset%{debug_suffix}
|
|
|
44604a |
%endif
|
|
|
44604a |
%if %{include_fastdebug_build}
|
|
|
44604a |
cp -r tapset tapset%{fastdebug_suffix}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
for suffix in %{build_loop} ; do
|
|
|
44604a |
for file in "tapset"$suffix/*.in; do
|
|
|
44604a |
OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"`
|
|
|
44604a |
sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/server/libjvm.so:g" $file > $file.1
|
|
|
44604a |
sed -e "s:@JAVA_SPEC_VER@:%{javaver}:g" $file.1 > $file.2
|
|
|
44604a |
# TODO find out which architectures other than i686 have a client vm
|
|
|
44604a |
%ifarch %{ix86}
|
|
|
44604a |
sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" $file.2 > $OUTPUT_FILE
|
|
|
44604a |
%else
|
|
|
44604a |
sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.2 > $OUTPUT_FILE
|
|
|
44604a |
%endif
|
|
|
44604a |
sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE
|
|
|
44604a |
sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE
|
|
|
44604a |
sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE
|
|
|
44604a |
done
|
|
|
44604a |
done
|
|
|
44604a |
# systemtap tapsets ends
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# Prepare desktop files
|
|
|
44604a |
# Portables do not have desktop integration
|
|
|
44604a |
|
|
|
44604a |
# Setup nss.cfg
|
|
|
44604a |
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
|
|
|
44604a |
|
|
|
44604a |
%build
|
|
|
44604a |
# How many CPU's do we have?
|
|
|
44604a |
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
|
|
|
44604a |
export NUM_PROC=${NUM_PROC:-1}
|
|
|
44604a |
%if 0%{?_smp_ncpus_max}
|
|
|
44604a |
# Honor %%_smp_ncpus_max
|
|
|
44604a |
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%ifarch s390x sparc64 alpha %{power64} %{aarch64}
|
|
|
44604a |
export ARCH_DATA_MODEL=64
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch alpha
|
|
|
44604a |
export CFLAGS="$CFLAGS -mieee"
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# We use ourcppflags because the OpenJDK build seems to
|
|
|
44604a |
# pass EXTRA_CFLAGS to the HotSpot C++ compiler...
|
|
|
44604a |
# Explicitly set the C++ standard as the default has changed on GCC >= 6
|
|
|
44604a |
EXTRA_CFLAGS="%ourcppflags"
|
|
|
44604a |
EXTRA_CPP_FLAGS="%ourcppflags"
|
|
|
44604a |
|
|
|
44604a |
%ifarch %{power64} ppc
|
|
|
44604a |
# fix rpmlint warnings
|
|
|
44604a |
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch %{ix86}
|
|
|
44604a |
# Align stack boundary on x86_32
|
|
|
44604a |
EXTRA_CFLAGS="$(echo ${EXTRA_CFLAGS} | sed -e 's|-mstackrealign|-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4|')"
|
|
|
44604a |
EXTRA_CPP_FLAGS="$(echo ${EXTRA_CPP_FLAGS} | sed -e 's|-mstackrealign|-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4|')"
|
|
|
44604a |
%endif
|
|
|
44604a |
export EXTRA_CFLAGS EXTRA_CPP_FLAGS
|
|
|
44604a |
|
|
|
44604a |
echo "Building %{newjavaver}-%{buildver}, pre=%{ea_designator}, opt=%{lts_designator}"
|
|
|
44604a |
|
|
|
44604a |
function buildjdk() {
|
|
|
44604a |
local outputdir=${1}
|
|
|
44604a |
local buildjdk=${2}
|
|
|
44604a |
local maketargets="${3}"
|
|
|
44604a |
local debuglevel=${4}
|
|
|
44604a |
local link_opt=${5}
|
|
|
44604a |
local debug_symbols=${6}
|
|
|
44604a |
|
|
|
44604a |
local top_dir_abs_src_path=$(pwd)/%{top_level_dir_name}
|
|
|
44604a |
local top_dir_abs_build_path=$(pwd)/${outputdir}
|
|
|
44604a |
|
|
|
44604a |
# This must be set using the global, so that the
|
|
|
44604a |
# static libraries still use a dynamic stdc++lib
|
|
|
44604a |
if [ "x%{link_type}" = "xbundled" ] ; then
|
|
|
44604a |
libc_link_opt="static";
|
|
|
44604a |
else
|
|
|
44604a |
libc_link_opt="dynamic";
|
|
|
44604a |
fi
|
|
|
44604a |
|
|
|
44604a |
echo "Using output directory: ${outputdir}";
|
|
|
44604a |
echo "Checking build JDK ${buildjdk} is operational..."
|
|
|
44604a |
${buildjdk}/bin/java -version
|
|
|
44604a |
echo "Using make targets: ${maketargets}"
|
|
|
44604a |
echo "Using debuglevel: ${debuglevel}"
|
|
|
44604a |
echo "Using link_opt: ${link_opt}"
|
|
|
44604a |
echo "Using debug_symbols: ${debug_symbols}"
|
|
|
44604a |
echo "Building %{newjavaver}-%{buildver}, pre=%{ea_designator}, opt=%{lts_designator}"
|
|
|
44604a |
|
|
|
44604a |
mkdir -p ${outputdir}
|
|
|
44604a |
pushd ${outputdir}
|
|
|
44604a |
|
|
|
44604a |
# Note: zlib and freetype use %{link_type}
|
|
|
44604a |
# rather than ${link_opt} as the system versions
|
|
|
44604a |
# are always used in a system_libs build, even
|
|
|
44604a |
# for the static library build
|
|
|
44604a |
bash ${top_dir_abs_src_path}/configure \
|
|
|
44604a |
%ifarch %{zero_arches}
|
|
|
44604a |
--with-jvm-variants=zero \
|
|
|
44604a |
%endif
|
|
|
44604a |
%ifarch %{ppc64le}
|
|
|
44604a |
--with-jobs=1 \
|
|
|
44604a |
%endif
|
|
|
44604a |
--with-cacerts-file=$(readlink -f %{_sysconfdir}/pki/java/cacerts) \
|
|
|
44604a |
--with-version-build=%{buildver} \
|
|
|
44604a |
--with-version-pre="${ea_designator}" \
|
|
|
44604a |
--with-version-opt=%{lts_designator} \
|
|
|
44604a |
--with-vendor-version-string="%{oj_vendor_version}" \
|
|
|
44604a |
--with-vendor-name="%{oj_vendor}" \
|
|
|
44604a |
--with-vendor-url="%{oj_vendor_url}" \
|
|
|
44604a |
--with-vendor-bug-url="%{oj_vendor_bug_url}" \
|
|
|
44604a |
--with-vendor-vm-bug-url="%{oj_vendor_bug_url}" \
|
|
|
44604a |
--with-boot-jdk=${buildjdk} \
|
|
|
44604a |
--with-debug-level=${debuglevel} \
|
|
|
44604a |
--with-native-debug-symbols="${debug_symbols}" \
|
|
|
44604a |
--disable-sysconf-nss \
|
|
|
44604a |
--enable-unlimited-crypto \
|
|
|
44604a |
--with-zlib=%{link_type} \
|
|
|
44604a |
--with-freetype=%{link_type} \
|
|
|
44604a |
--with-libjpeg=${link_opt} \
|
|
|
44604a |
--with-giflib=${link_opt} \
|
|
|
44604a |
--with-libpng=${link_opt} \
|
|
|
44604a |
--with-lcms=${link_opt} \
|
|
|
44604a |
--with-harfbuzz=${link_opt} \
|
|
|
44604a |
--with-stdc++lib=${libc_link_opt} \
|
|
|
44604a |
--with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
|
|
|
44604a |
--with-extra-cflags="$EXTRA_CFLAGS" \
|
|
|
44604a |
--with-extra-ldflags="%{ourldflags}" \
|
|
|
44604a |
--with-num-cores="$NUM_PROC" \
|
|
|
44604a |
--with-source-date="${SOURCE_DATE_EPOCH}" \
|
|
|
44604a |
--disable-javac-server \
|
|
|
44604a |
%ifarch %{zgc_arches}
|
|
|
44604a |
--with-jvm-features=zgc \
|
|
|
44604a |
%endif
|
|
|
44604a |
--disable-warnings-as-errors
|
|
|
44604a |
|
|
|
44604a |
cat spec.gmk
|
|
|
44604a |
make LOG=trace $maketargets || \
|
|
|
44604a |
( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name \"hs_err_pid*.log\" | xargs cat && false )
|
|
|
44604a |
|
|
|
44604a |
popd
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
function installjdk() {
|
|
|
44604a |
local outputdir=${1}
|
|
|
44604a |
local installdir=${2}
|
|
|
44604a |
local jdkimagepath=${installdir}/images/%{jdkimage}
|
|
|
44604a |
local jreimagepath=${installdir}/images/%{jreimage}
|
|
|
44604a |
|
|
|
44604a |
echo "Installing build from ${outputdir} to ${installdir}..."
|
|
|
44604a |
mkdir -p ${installdir}
|
|
|
44604a |
echo "Installing images..."
|
|
|
44604a |
mv ${outputdir}/images ${installdir}
|
|
|
44604a |
if [ -d ${outputdir}/bundles ] ; then
|
|
|
44604a |
echo "Installing bundles...";
|
|
|
44604a |
mv ${outputdir}/bundles ${installdir} ;
|
|
|
44604a |
fi
|
|
|
44604a |
|
|
|
44604a |
%if !%{with artifacts}
|
|
|
44604a |
echo "Removing output directory...";
|
|
|
44604a |
rm -rf ${outputdir}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# legacy-jre-image target does not install any man pages for the JRE
|
|
|
44604a |
# We copy the jdk man directory and then remove pages for binaries that
|
|
|
44604a |
# don't exist in the JRE
|
|
|
44604a |
cp -a ${jdkimagepath}/man ${jreimagepath}
|
|
|
44604a |
for manpage in $(find ${jreimagepath}/man -name '*.1'); do
|
|
|
44604a |
filename=$(basename ${manpage});
|
|
|
44604a |
binary=${filename/.1/};
|
|
|
44604a |
if [ ! -f ${jreimagepath}/bin/${binary} ] ; then
|
|
|
44604a |
echo "Removing ${manpage} from JRE for which no binary ${binary} exists";
|
|
|
44604a |
rm -f ${manpage};
|
|
|
44604a |
fi;
|
|
|
44604a |
done
|
|
|
44604a |
|
|
|
44604a |
for imagepath in ${jdkimagepath} ${jreimagepath} ; do
|
|
|
44604a |
|
|
|
44604a |
if [ -d ${imagepath} ] ; then
|
|
|
44604a |
# the build (erroneously) removes read permissions from some jars
|
|
|
44604a |
# this is a regression in OpenJDK 7 (our compiler):
|
|
|
44604a |
# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
|
|
|
44604a |
find ${imagepath} -iname '*.jar' -exec chmod ugo+r {} \;
|
|
|
44604a |
|
|
|
44604a |
# Build screws up permissions on binaries
|
|
|
44604a |
# https://bugs.openjdk.java.net/browse/JDK-8173610
|
|
|
44604a |
find ${imagepath} -iname '*.so' -exec chmod +x {} \;
|
|
|
44604a |
find ${imagepath}/bin/ -exec chmod +x {} \;
|
|
|
44604a |
|
|
|
44604a |
# Install local files which are distributed with the JDK
|
|
|
44604a |
install -m 644 %{SOURCE10} ${imagepath}
|
|
|
44604a |
install -m 644 nss.cfg ${imagepath}/conf/security/
|
|
|
44604a |
|
|
|
44604a |
# Create fake alt-java as a placeholder for future alt-java
|
|
|
44604a |
pushd ${imagepath}
|
|
|
44604a |
# add alt-java man page
|
|
|
44604a |
echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > man/man1/%{alt_java_name}.1
|
|
|
44604a |
cat man/man1/java.1 >> man/man1/%{alt_java_name}.1
|
|
|
44604a |
popd
|
|
|
44604a |
|
|
|
44604a |
# Print release information
|
|
|
44604a |
cat ${imagepath}/release
|
|
|
44604a |
fi
|
|
|
44604a |
done
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
function genchecksum() {
|
|
|
44604a |
local checkedfile=${1}
|
|
|
44604a |
|
|
|
44604a |
checkdir=$(dirname ${1})
|
|
|
44604a |
checkfile=$(basename ${1})
|
|
|
44604a |
|
|
|
44604a |
echo "Generating checksum for ${checkfile} in ${checkdir}..."
|
|
|
44604a |
pushd ${checkdir}
|
|
|
44604a |
sha256sum ${checkfile} > ${checkfile}.sha256sum
|
|
|
44604a |
sha256sum --check ${checkfile}.sha256sum
|
|
|
44604a |
popd
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
function packagejdk() {
|
|
|
44604a |
local imagesdir=$(pwd)/${1}/images
|
|
|
44604a |
local docdir=$(pwd)/${1}/images/docs
|
|
|
44604a |
local bundledir=$(pwd)/${1}/bundles
|
|
|
44604a |
local packagesdir=$(pwd)/${2}
|
|
|
44604a |
local srcdir=$(pwd)/%{top_level_dir_name}
|
|
|
44604a |
|
|
|
44604a |
echo "Packaging build from ${imagesdir} to ${packagesdir}..."
|
|
|
44604a |
mkdir -p ${packagesdir}
|
|
|
44604a |
pushd ${imagesdir}
|
|
|
44604a |
|
|
|
44604a |
if [ "x$suffix" = "x" ] ; then
|
|
|
44604a |
nameSuffix=""
|
|
|
44604a |
else
|
|
|
44604a |
nameSuffix=`echo "$suffix"| sed s/-/./`
|
|
|
44604a |
fi
|
|
|
44604a |
|
|
|
44604a |
jdkname=%{jdkportablename -- "$nameSuffix"}
|
|
|
44604a |
jdkarchive=${packagesdir}/%{jdkportablearchive -- "$nameSuffix"}
|
|
|
44604a |
jrename=%{jreportablename -- "$nameSuffix"}
|
|
|
44604a |
jrearchive=${packagesdir}/%{jreportablearchive -- "$nameSuffix"}
|
|
|
44604a |
staticname=%{staticlibsportablename -- "$nameSuffix"}
|
|
|
44604a |
staticarchive=${packagesdir}/%{staticlibsportablearchive -- "$nameSuffix"}
|
|
|
44604a |
debugarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"}
|
|
|
44604a |
unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"}
|
|
|
44604a |
# We only use docs for the release build
|
|
|
44604a |
docname=%{docportablename}
|
|
|
44604a |
docarchive=${packagesdir}/%{docportablearchive}
|
|
|
44604a |
built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip
|
|
|
44604a |
# These are from the source tree so no debug variants
|
|
|
44604a |
miscname=%{miscportablename}
|
|
|
44604a |
miscarchive=${packagesdir}/%{miscportablearchive}
|
|
|
44604a |
|
|
|
44604a |
# Rename directories for packaging
|
|
|
44604a |
mv %{jdkimage} ${jdkname}
|
|
|
44604a |
mv %{jreimage} ${jrename}
|
|
|
44604a |
|
|
|
44604a |
# Release images have external debug symbols
|
|
|
44604a |
if [ "x$suffix" = "x" ] ; then
|
|
|
44604a |
# Keep the unstripped version for consumption by RHEL RPMs
|
|
|
44604a |
tar -cJf ${unstrippedarchive} ${jdkname}
|
|
|
44604a |
genchecksum ${unstrippedarchive}
|
|
|
44604a |
|
|
|
44604a |
# Strip the files
|
|
|
44604a |
for file in $(find ${jdkname} ${jrename} -type f) ; do
|
|
|
44604a |
if file ${file} | grep -q 'ELF'; then
|
|
|
44604a |
noextfile=${file/.so/};
|
|
|
44604a |
objcopy --only-keep-debug ${file} ${noextfile}.debuginfo;
|
|
|
44604a |
objcopy --add-gnu-debuglink=${noextfile}.debuginfo ${file};
|
|
|
44604a |
strip -g ${file};
|
|
|
44604a |
fi
|
|
|
44604a |
done
|
|
|
44604a |
|
|
|
44604a |
tar -cJf ${debugarchive} $(find ${jdkname} -name \*.debuginfo)
|
|
|
44604a |
genchecksum ${debugarchive}
|
|
|
44604a |
|
|
|
44604a |
mkdir ${docname}
|
|
|
44604a |
mv ${docdir} ${docname}
|
|
|
44604a |
mv ${bundledir}/${built_doc_archive} ${docname}
|
|
|
44604a |
tar -cJf ${docarchive} ${docname}
|
|
|
44604a |
genchecksum ${docarchive}
|
|
|
44604a |
|
|
|
44604a |
mkdir ${miscname}
|
|
|
44604a |
for s in 16 24 32 48 ; do
|
|
|
44604a |
cp -av ${srcdir}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png ${miscname}
|
|
|
44604a |
done
|
|
|
44604a |
cp -a ${srcdir}/src/sample ${miscname}
|
|
|
44604a |
tar -cJf ${miscarchive} ${miscname}
|
|
|
44604a |
genchecksum ${miscarchive}
|
|
|
44604a |
fi
|
|
|
44604a |
|
|
|
44604a |
tar -cJf ${jdkarchive} --exclude='**.debuginfo' ${jdkname}
|
|
|
44604a |
genchecksum ${jdkarchive}
|
|
|
44604a |
|
|
|
44604a |
tar -cJf ${jrearchive} --exclude='**.debuginfo' ${jrename}
|
|
|
44604a |
genchecksum ${jrearchive}
|
|
|
44604a |
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
# Static libraries (needed for building graal vm with native image)
|
|
|
44604a |
# Tar as overlay. Transform to the JDK name, since we just want to "add"
|
|
|
44604a |
# static libraries to that folder
|
|
|
44604a |
tar -cJf ${staticarchive} \
|
|
|
44604a |
--transform "s|^%{static_libs_image}/lib/*|${staticname}/lib/static/linux-%{archinstall}/glibc/|" "%{static_libs_image}/lib"
|
|
|
44604a |
genchecksum ${staticarchive}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# Revert directory renaming so testing will run
|
|
|
44604a |
# TODO: testing should run on the packaged JDK
|
|
|
44604a |
mv ${jdkname} %{jdkimage}
|
|
|
44604a |
mv ${jrename} %{jreimage}
|
|
|
44604a |
|
|
|
44604a |
popd #images
|
|
|
44604a |
|
|
|
44604a |
}
|
|
|
44604a |
|
|
|
44604a |
%if %{build_hotspot_first}
|
|
|
44604a |
# Build a fresh libjvm.so first and use it to bootstrap
|
|
|
44604a |
cp -LR --preserve=mode,timestamps %{bootjdk} newboot
|
|
|
44604a |
systemjdk=$(pwd)/newboot
|
|
|
44604a |
buildjdk build/newboot ${systemjdk} %{hotspot_target} "release" "bundled" "internal"
|
|
|
44604a |
mv build/newboot/jdk/lib/server/libjvm.so newboot/lib/server
|
|
|
44604a |
%else
|
|
|
44604a |
systemjdk=%{bootjdk}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
for suffix in %{build_loop} ; do
|
|
|
44604a |
|
|
|
44604a |
if [ "x$suffix" = "x" ] ; then
|
|
|
44604a |
debugbuild=release
|
|
|
44604a |
else
|
|
|
44604a |
# change --something to something
|
|
|
44604a |
debugbuild=`echo $suffix | sed "s/-//g"`
|
|
|
44604a |
fi
|
|
|
44604a |
# We build with internal debug symbols and do
|
|
|
44604a |
# our own stripping for one version of the
|
|
|
44604a |
# release build
|
|
|
44604a |
debug_symbols=internal
|
|
|
44604a |
|
|
|
44604a |
builddir=%{buildoutputdir -- ${suffix}}
|
|
|
44604a |
bootbuilddir=boot${builddir}
|
|
|
44604a |
installdir=%{installoutputdir -- ${suffix}}
|
|
|
44604a |
bootinstalldir=boot${installdir}
|
|
|
44604a |
packagesdir=%{packageoutputdir -- ${suffix}}
|
|
|
44604a |
|
|
|
44604a |
link_opt="%{link_type}"
|
|
|
44604a |
%if %{system_libs}
|
|
|
44604a |
# Copy the source tree so we can remove all in-tree libraries
|
|
|
44604a |
cp -a %{top_level_dir_name} %{top_level_dir_name_backup}
|
|
|
44604a |
# Remove all libraries that are linked
|
|
|
44604a |
sh %{SOURCE12} %{top_level_dir_name} full
|
|
|
44604a |
%endif
|
|
|
44604a |
# Debug builds don't need same targets as release for
|
|
|
44604a |
# build speed-up. We also avoid bootstrapping these
|
|
|
44604a |
# slower builds.
|
|
|
44604a |
if echo $debugbuild | grep -q "debug" ; then
|
|
|
44604a |
maketargets="%{debug_targets}"
|
|
|
44604a |
run_bootstrap=false
|
|
|
44604a |
else
|
|
|
44604a |
maketargets="%{release_targets}"
|
|
|
44604a |
run_bootstrap=%{bootstrap_build}
|
|
|
44604a |
fi
|
|
|
44604a |
if ${run_bootstrap} ; then
|
|
|
44604a |
buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild} ${link_opt} ${debug_symbols}
|
|
|
44604a |
installjdk ${bootbuilddir} ${bootinstalldir}
|
|
|
44604a |
buildjdk ${builddir} $(pwd)/${bootinstalldir}/images/%{jdkimage} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols}
|
|
|
44604a |
installjdk ${builddir} ${installdir}
|
|
|
44604a |
%{!?with_artifacts:rm -rf ${bootinstalldir}}
|
|
|
44604a |
else
|
|
|
44604a |
buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols}
|
|
|
44604a |
installjdk ${builddir} ${installdir}
|
|
|
44604a |
fi
|
|
|
44604a |
packagejdk ${installdir} ${packagesdir}
|
|
|
44604a |
|
|
|
44604a |
%if %{system_libs}
|
|
|
44604a |
# Restore original source tree we modified by removing full in-tree sources
|
|
|
44604a |
rm -rf %{top_level_dir_name}
|
|
|
44604a |
mv %{top_level_dir_name_backup} %{top_level_dir_name}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# build cycles
|
|
|
44604a |
done # end of release / debug cycle loop
|
|
|
44604a |
|
|
|
44604a |
%check
|
|
|
44604a |
|
|
|
44604a |
# We test debug first as it will give better diagnostics on a crash
|
|
|
44604a |
for suffix in %{build_loop} ; do
|
|
|
44604a |
|
|
|
44604a |
# portable builds have static_libs embedded, thus top_dir_abs_main_build_path is same as top_dir_abs_staticlibs_build_path
|
|
|
44604a |
top_dir_abs_main_build_path=$(pwd)/%{installoutputdir -- ${suffix}}
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
top_dir_abs_staticlibs_build_path=${top_dir_abs_main_build_path}
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage}
|
|
|
44604a |
|
|
|
44604a |
# Pre-test setup
|
|
|
44604a |
|
|
|
44604a |
# System security properties are disabled by default on portable.
|
|
|
44604a |
# Turn on system security properties
|
|
|
44604a |
#sed -i -e "s:^security.useSystemPropertiesFile=.*:security.useSystemPropertiesFile=true:" \
|
|
|
44604a |
#${JAVA_HOME}/conf/security/java.security
|
|
|
44604a |
|
|
|
44604a |
|
|
|
44604a |
#check Shenandoah is enabled
|
|
|
44604a |
%if %{use_shenandoah_hotspot}
|
|
|
44604a |
$JAVA_HOME//bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -version
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# Check unlimited policy has been used
|
|
|
44604a |
$JAVA_HOME/bin/javac -d . %{SOURCE13}
|
|
|
44604a |
$JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel
|
|
|
44604a |
|
|
|
44604a |
# Check ECC is working
|
|
|
44604a |
$JAVA_HOME/bin/javac -d . %{SOURCE14}
|
|
|
44604a |
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
|
|
|
44604a |
|
|
|
44604a |
# Check system crypto (policy) is active and can be disabled
|
|
|
44604a |
# Test takes a single argument - true or false - to state whether system
|
|
|
44604a |
# security properties are enabled or not.
|
|
|
44604a |
$JAVA_HOME/bin/javac -d . %{SOURCE15}
|
|
|
44604a |
export PROG=$(echo $(basename %{SOURCE15})|sed "s|\.java||")
|
|
|
44604a |
export SEC_DEBUG="-Djava.security.debug=properties"
|
|
|
44604a |
# Specific to portable:System security properties to be off by default
|
|
|
44604a |
$JAVA_HOME/bin/java ${SEC_DEBUG} ${PROG} false
|
|
|
44604a |
$JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=true ${PROG} false
|
|
|
44604a |
|
|
|
44604a |
# Check correct vendor values have been set
|
|
|
44604a |
$JAVA_HOME/bin/javac -d . %{SOURCE16}
|
|
|
44604a |
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE16})|sed "s|\.java||") "%{oj_vendor}" "%{oj_vendor_url}" "%{oj_vendor_bug_url}" "%{oj_vendor_version}"
|
|
|
44604a |
|
|
|
44604a |
# Check java launcher has no SSB mitigation
|
|
|
44604a |
if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi
|
|
|
44604a |
|
|
|
44604a |
# Check alt-java launcher has SSB mitigation on supported architectures
|
|
|
44604a |
%ifarch %{ssbd_arches}
|
|
|
44604a |
nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation
|
|
|
44604a |
%else
|
|
|
44604a |
if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if ! 0%{?flatpak}
|
|
|
44604a |
# Check translations are available for new timezones (during flatpak builds, the
|
|
|
44604a |
# tzdb.dat used by this test is not where the test expects it, so this is
|
|
|
44604a |
# disabled for flatpak builds)
|
|
|
44604a |
$JAVA_HOME/bin/javac -d . %{SOURCE18}
|
|
|
44604a |
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE
|
|
|
44604a |
$JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|sed "s|\.java||") CLDR
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
# Check debug symbols in static libraries (smoke test)
|
|
|
44604a |
export STATIC_LIBS_HOME=${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}
|
|
|
44604a |
ls -l $STATIC_LIBS_HOME
|
|
|
44604a |
ls -l $STATIC_LIBS_HOME/lib
|
|
|
44604a |
# they are here, but grep do not find the remainders
|
|
|
44604a |
#readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c
|
|
|
44604a |
#readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# Release builds strip the debug symbols into external .debuginfo files
|
|
|
44604a |
if [ "x$suffix" = "x" ] ; then
|
|
|
44604a |
so_suffix="debuginfo"
|
|
|
44604a |
else
|
|
|
44604a |
so_suffix="so"
|
|
|
44604a |
fi
|
|
|
44604a |
# Check debug symbols are present and can identify code
|
|
|
44604a |
find "$JAVA_HOME" -iname "*.$so_suffix" -print0 | while read -d $'\0' lib
|
|
|
44604a |
do
|
|
|
44604a |
if [ -f "$lib" ] ; then
|
|
|
44604a |
echo "Testing $lib for debug symbols"
|
|
|
44604a |
# All these tests rely on RPM failing the build if the exit code of any set
|
|
|
44604a |
# of piped commands is non-zero.
|
|
|
44604a |
|
|
|
44604a |
# Test for .debug_* sections in the shared object. This is the main test
|
|
|
44604a |
# Stripped objects will not contain these
|
|
|
44604a |
eu-readelf -S "$lib" | grep "] .debug_"
|
|
|
44604a |
test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
|
|
|
44604a |
|
|
|
44604a |
# Test FILE symbols. These will most likely be removed by anything that
|
|
|
44604a |
# manipulates symbol tables because it's generally useless. So a nice test
|
|
|
44604a |
# that nothing has messed with symbols
|
|
|
44604a |
old_IFS="$IFS"
|
|
|
44604a |
IFS=$'\n'
|
|
|
44604a |
for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT")
|
|
|
44604a |
do
|
|
|
44604a |
# We expect to see .cpp and .S files, except for architectures like aarch64 and
|
|
|
44604a |
# s390 where we expect .o and .oS files
|
|
|
44604a |
echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|S|oS))?$"
|
|
|
44604a |
done
|
|
|
44604a |
IFS="$old_IFS"
|
|
|
44604a |
|
|
|
44604a |
# If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking
|
|
|
44604a |
if [ "`basename $lib`" = "libjvm.so" ]; then
|
|
|
44604a |
eu-readelf -s "$lib" | \
|
|
|
44604a |
grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$"
|
|
|
44604a |
fi
|
|
|
44604a |
|
|
|
44604a |
# Test that there are no .gnu_debuglink sections pointing to another
|
|
|
44604a |
# debuginfo file. There shouldn't be any debuginfo files, so the link makes
|
|
|
44604a |
# no sense either
|
|
|
44604a |
eu-readelf -S "$lib" | grep 'gnu'
|
|
|
44604a |
if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
|
|
|
44604a |
echo "bad .gnu_debuglink section."
|
|
|
44604a |
eu-readelf -x .gnu_debuglink "$lib"
|
|
|
44604a |
false
|
|
|
44604a |
fi
|
|
|
44604a |
fi
|
|
|
44604a |
done
|
|
|
44604a |
|
|
|
44604a |
# Make sure gdb can do a backtrace based on line numbers on libjvm.so
|
|
|
44604a |
# javaCalls.cpp:58 should map to:
|
|
|
44604a |
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
|
|
|
44604a |
# Using line number 1 might cause build problems. See:
|
|
|
44604a |
# https://bugzilla.redhat.com/show_bug.cgi?id=1539664
|
|
|
44604a |
# https://bugzilla.redhat.com/show_bug.cgi?id=1538767
|
|
|
44604a |
gdb -q "$JAVA_HOME/bin/java" <
|
|
|
44604a |
handle SIGSEGV pass nostop noprint
|
|
|
44604a |
handle SIGILL pass nostop noprint
|
|
|
44604a |
set breakpoint pending on
|
|
|
44604a |
break javaCalls.cpp:58
|
|
|
44604a |
commands 1
|
|
|
44604a |
backtrace
|
|
|
44604a |
quit
|
|
|
44604a |
end
|
|
|
44604a |
run -version
|
|
|
44604a |
EOF
|
|
|
44604a |
%ifarch %{gdb_arches}
|
|
|
44604a |
grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
# Check src.zip has all sources. See RHBZ#1130490
|
|
|
44604a |
unzip -l $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe'
|
|
|
44604a |
|
|
|
44604a |
# Check class files include useful debugging information
|
|
|
44604a |
$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
|
|
|
44604a |
$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
|
|
|
44604a |
$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
|
|
|
44604a |
|
|
|
44604a |
# Check generated class files include useful debugging information
|
|
|
44604a |
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
|
|
|
44604a |
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
|
|
|
44604a |
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
|
|
|
44604a |
|
|
|
44604a |
# build cycles check
|
|
|
44604a |
done
|
|
|
44604a |
|
|
|
44604a |
%install
|
|
|
44604a |
|
|
|
44604a |
for suffix in %{build_loop} ; do
|
|
|
44604a |
|
|
|
44604a |
packagesdir=%{packageoutputdir -- ${suffix}}
|
|
|
44604a |
|
|
|
44604a |
if [ "x$suffix" == "x" ] ; then
|
|
|
44604a |
nameSuffix=""
|
|
|
44604a |
else
|
|
|
44604a |
nameSuffix=`echo "$suffix"| sed s/-/./`
|
|
|
44604a |
fi
|
|
|
44604a |
|
|
|
44604a |
# These definitions should match those in installjdk
|
|
|
44604a |
jdkarchive=${packagesdir}/%{jdkportablearchive -- "$nameSuffix"}
|
|
|
44604a |
jrearchive=${packagesdir}/%{jreportablearchive -- "$nameSuffix"}
|
|
|
44604a |
staticarchive=${packagesdir}/%{staticlibsportablearchive -- "$nameSuffix"}
|
|
|
44604a |
debugarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"}
|
|
|
44604a |
unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"}
|
|
|
44604a |
|
|
|
44604a |
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}
|
|
|
44604a |
|
|
|
44604a |
mv ${jdkarchive} $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${jdkarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${jrearchive} $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${jrearchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
mv ${staticarchive} $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${staticarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
if [ "x$suffix" = "x" ] ; then
|
|
|
44604a |
mv ${debugarchive} $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${debugarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${unstrippedarchive} $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${unstrippedarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
fi
|
|
|
44604a |
done
|
|
|
44604a |
|
|
|
44604a |
# These definitions should match those in installjdk
|
|
|
44604a |
# Install outside the loop as there are no debug variants
|
|
|
44604a |
docarchive=${packagesdir}/%{docportablearchive}
|
|
|
44604a |
miscarchive=${packagesdir}/%{miscportablearchive}
|
|
|
44604a |
|
|
|
44604a |
mv ${docarchive} $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${docarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${miscarchive} $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
mv ${miscarchive}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/
|
|
|
44604a |
|
|
|
44604a |
# To show sha in the build log
|
|
|
44604a |
for file in `ls $RPM_BUILD_ROOT%{_jvmdir}/*.sha256sum` ; do
|
|
|
44604a |
ls -l $file ;
|
|
|
44604a |
cat $file ;
|
|
|
44604a |
done
|
|
|
44604a |
|
|
|
44604a |
%if %{include_normal_build}
|
|
|
44604a |
|
|
|
44604a |
%files
|
|
|
44604a |
# main package builds always
|
|
|
44604a |
%{_jvmdir}/%{jreportablearchive -- %%{nil}}
|
|
|
44604a |
%{_jvmdir}/%{jreportablearchive -- %%{nil}}.sha256sum
|
|
|
44604a |
%else
|
|
|
44604a |
%files
|
|
|
44604a |
# placeholder
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%files devel
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- %%{nil}}
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- .debuginfo}
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- %%{nil}}.sha256sum
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- .debuginfo}.sha256sum
|
|
|
44604a |
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
%files static-libs
|
|
|
44604a |
%{_jvmdir}/%{staticlibsportablearchive -- %%{nil}}
|
|
|
44604a |
%{_jvmdir}/%{staticlibsportablearchive -- %%{nil}}.sha256sum
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%files unstripped
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- .unstripped}
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- .unstripped}.sha256sum
|
|
|
44604a |
|
|
|
44604a |
%if %{include_debug_build}
|
|
|
44604a |
|
|
|
44604a |
%files slowdebug
|
|
|
44604a |
%{_jvmdir}/%{jreportablearchive -- .slowdebug}
|
|
|
44604a |
%{_jvmdir}/%{jreportablearchive -- .slowdebug}.sha256sum
|
|
|
44604a |
|
|
|
44604a |
%files devel-slowdebug
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- .slowdebug}
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- .slowdebug}.sha256sum
|
|
|
44604a |
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
%files static-libs-slowdebug
|
|
|
44604a |
%{_jvmdir}/%{staticlibsportablearchive -- .slowdebug}
|
|
|
44604a |
%{_jvmdir}/%{staticlibsportablearchive -- .slowdebug}.sha256sum
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%if %{include_fastdebug_build}
|
|
|
44604a |
|
|
|
44604a |
%files fastdebug
|
|
|
44604a |
%{_jvmdir}/%{jreportablearchive -- .fastdebug}
|
|
|
44604a |
%{_jvmdir}/%{jreportablearchive -- .fastdebug}.sha256sum
|
|
|
44604a |
|
|
|
44604a |
%files devel-fastdebug
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- .fastdebug}
|
|
|
44604a |
%{_jvmdir}/%{jdkportablearchive -- .fastdebug}.sha256sum
|
|
|
44604a |
|
|
|
44604a |
%if %{include_staticlibs}
|
|
|
44604a |
%files static-libs-fastdebug
|
|
|
44604a |
%{_jvmdir}/%{staticlibsportablearchive -- .fastdebug}
|
|
|
44604a |
%{_jvmdir}/%{staticlibsportablearchive -- .fastdebug}.sha256sum
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%endif
|
|
|
44604a |
|
|
|
44604a |
%files docs
|
|
|
44604a |
%{_jvmdir}/%{docportablearchive}
|
|
|
44604a |
%{_jvmdir}/%{docportablearchive}.sha256sum
|
|
|
44604a |
|
|
|
44604a |
%files misc
|
|
|
44604a |
%{_jvmdir}/%{miscportablearchive}
|
|
|
44604a |
%{_jvmdir}/%{miscportablearchive}.sha256sum
|
|
|
44604a |
|
|
|
44604a |
%changelog
|
|
|
44604a |
* Tue Apr 25 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.7.0.7-2
|
|
|
44604a |
- Update to jdk-17.0.7.0+7
|
|
|
44604a |
- Update release notes to 17.0.7.0+7
|
|
|
44604a |
- Require tzdata 2023c due to local inclusion of JDK-8274864 & JDK-8305113
|
|
|
44604a |
- Reintroduce generate_source_tarball.sh from RHEL 9
|
|
|
44604a |
- Update generate_tarball.sh to add support for passing a boot JDK to the configure run
|
|
|
44604a |
- Add POSIX-friendly error codes to generate_tarball.sh and fix whitespace
|
|
|
44604a |
- Remove .jcheck and GitHub support when generating tarballs, as done in upstream release tarballs
|
|
|
44604a |
- Update FIPS support against 17.0.7+6 and bring in latest changes:
|
|
|
44604a |
- * RH2134669: Add missing attributes when registering services in FIPS mode.
|
|
|
44604a |
- * test/jdk/sun/security/pkcs11/fips/VerifyMissingAttributes.java: fixed jtreg main class
|
|
|
44604a |
- * RH1940064: Enable XML Signature provider in FIPS mode
|
|
|
44604a |
- * RH2173781: Avoid calling C_GetInfo() too early, before cryptoki is initialized
|
|
|
44604a |
- Fix trailing '.' in tarball name
|
|
|
44604a |
- Use rpmrelease in vendor version to avoid inclusion of dist tag
|
|
|
44604a |
- ** This tarball is embargoed until 2023-04-18 @ 1pm PT. **
|
|
|
44604a |
- Resolves: rhbz#2185182
|
|
|
44604a |
- Resolves: rhbz#2134669
|
|
|
44604a |
- Resolves: rhbz#1940064
|
|
|
44604a |
- Resolves: rhbz#2173781
|
|
|
44604a |
|
|
|
44604a |
* Thu Apr 20 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-7
|
|
|
44604a |
- Sync with existing RHEL 8 build, in order to start building portables on RHEL 8
|
|
|
44604a |
- Restore system bootstrap JDK (RHEL 8 has java-17-openjdk)
|
|
|
44604a |
- Remove use of devtoolset (RHEL 8 native compilers should be sufficient)
|
|
|
44604a |
- Explicitly exclude x86, as on RHEL RPMs
|
|
|
44604a |
|
|
|
44604a |
* Tue Feb 21 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-6
|
|
|
44604a |
- Add docs, icons and samples to the portable output
|
|
|
44604a |
- Make sure generated checksums work and don't include full path
|
|
|
44604a |
- The docs directory is a subdirectory of images, so remove confusing separate copying
|
|
|
44604a |
|
|
|
44604a |
* Wed Feb 15 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-5
|
|
|
44604a |
- Build with internal debuginfo as in RHEL and then create a stripped variant ourselves for the portable release build
|
|
|
44604a |
- Restore compiler flags to those used in RHEL
|
|
|
44604a |
- Drop unused static library patch
|
|
|
44604a |
- Drop syslookup workaround which was fixed by JDK-8276572 over a year ago
|
|
|
44604a |
|
|
|
44604a |
* Tue Feb 14 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-4
|
|
|
44604a |
- Separate JDK packaging into a separate function
|
|
|
44604a |
- Use variables to make it clearer what is going on
|
|
|
44604a |
- Use a package output directory as we do for building and installing
|
|
|
44604a |
- Workaround missing manpage directory in the JRE image
|
|
|
44604a |
|
|
|
44604a |
* Sun Feb 12 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-3
|
|
|
44604a |
- Adapt the portable build to use the same system library handling as RHEL builds
|
|
|
44604a |
|
|
|
44604a |
* Sat Jan 14 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-3
|
|
|
44604a |
- Add missing release note for JDK-8295687
|
|
|
44604a |
- Resolves: rhbz#2160111
|
|
|
44604a |
|
|
|
44604a |
* Fri Jan 13 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-2
|
|
|
44604a |
- Update FIPS support to bring in latest changes
|
|
|
44604a |
- * Add nss.fips.cfg support to OpenJDK tree
|
|
|
44604a |
- * RH2117972: Extend the support for NSS DBs (PKCS11) in FIPS mode
|
|
|
44604a |
- * Remove forgotten dead code from RH2020290 and RH2104724
|
|
|
44604a |
- * OJ1357: Fix issue on FIPS with a SecurityManager in place
|
|
|
44604a |
- Drop local nss.fips.cfg.in handling now this is handled in the patched OpenJDK build
|
|
|
44604a |
- Resolves: rhbz#2118493
|
|
|
44604a |
|
|
|
44604a |
* Fri Jan 13 2023 Stephan Bergmann <sbergman@redhat.com> - 1:17.0.6.0.10-2
|
|
|
44604a |
- Fix flatpak builds by disabling TestTranslations test due to missing tzdb.dat
|
|
|
44604a |
- Related: rhbz#2160111
|
|
|
44604a |
|
|
|
44604a |
* Wed Jan 11 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-1
|
|
|
44604a |
- Update to jdk-17.0.6.0+10
|
|
|
44604a |
- Update release notes to 17.0.6.0+10
|
|
|
44604a |
- Re-enable EA upstream status check now it is being actively maintained.
|
|
|
44604a |
- Drop JDK-8294357 (tzdata2022d) & JDK-8295173 (tzdata2022e) local patches which are now upstream
|
|
|
44604a |
- Drop JDK-8275535 local patch now this has been accepted and backported upstream
|
|
|
44604a |
- Drop local copy of JDK-8293834 now this is upstream
|
|
|
44604a |
- Require tzdata 2022g due to inclusion of JDK-8296108, JDK-8296715 & JDK-8297804
|
|
|
44604a |
- Update TestTranslations.java to test the new America/Ciudad_Juarez zone
|
|
|
44604a |
- ** This tarball is embargoed until 2023-01-17 @ 1pm PT. **
|
|
|
44604a |
- Resolves: rhbz#2160111
|
|
|
44604a |
|
|
|
44604a |
* Sat Oct 15 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.5.0.8-2
|
|
|
44604a |
- Update in-tree tzdata to 2022e with JDK-8294357 & JDK-8295173
|
|
|
44604a |
- Update CLDR data with Europe/Kyiv (JDK-8293834)
|
|
|
44604a |
- Drop JDK-8292223 patch which we found to be unnecessary
|
|
|
44604a |
- Update TestTranslations.java to use public API based on TimeZoneNamesTest upstream
|
|
|
44604a |
- Related: rhbz#2160111
|
|
|
44604a |
|
|
|
44604a |
* Thu Oct 13 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.5.0.8-1
|
|
|
44604a |
- Update to jdk-17.0.5+8 (GA)
|
|
|
44604a |
- Update release notes to 17.0.5+8 (GA)
|
|
|
44604a |
- Switch to GA mode for final release.
|
|
|
44604a |
- * This tarball is embargoed until 2022-10-18 @ 1pm PT. *
|
|
|
44604a |
- Resolves: rhbz#2133695
|
|
|
44604a |
|
|
|
44604a |
* Fri Sep 02 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.4.1.1-2
|
|
|
44604a |
- Update FIPS support to bring in latest changes
|
|
|
44604a |
- * RH2023467: Enable FIPS keys export
|
|
|
44604a |
- * RH2104724: Avoid import/export of DH private keys
|
|
|
44604a |
- * RH2092507: P11Key.getEncoded does not work for DH keys in FIPS mode
|
|
|
44604a |
- * Build the systemconf library on all platforms
|
|
|
44604a |
- * RH2048582: Support PKCS#12 keystores
|
|
|
44604a |
- * RH2020290: Support TLS 1.3 in FIPS mode
|
|
|
44604a |
- Resolves: rhbz#2123579
|
|
|
44604a |
- Resolves: rhbz#2123580
|
|
|
44604a |
- Resolves: rhbz#2123581
|
|
|
44604a |
- Resolves: rhbz#2123583
|
|
|
44604a |
- Resolves: rhbz#2123584
|
|
|
44604a |
|
|
|
44604a |
* Sun Aug 21 2022 Jayashree Huttanagoudar <jhuttana@redhat.com> - 1:17.0.4.1.1-1
|
|
|
44604a |
- Added a missing change to portable NEWS file from upstream.
|
|
|
44604a |
|
|
|
44604a |
* Sun Aug 21 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.4.1.1-1
|
|
|
44604a |
- Update to jdk-17.0.4.1+1
|
|
|
44604a |
- Update release notes to 17.0.4.1+1
|
|
|
44604a |
- Add patch to provide translations for Europe/Kyiv added in tzdata2022b
|
|
|
44604a |
- Add test to ensure timezones can be translated
|
|
|
44604a |
- Resolves: rhbz#2119532
|
|
|
44604a |
|
|
|
44604a |
* Mon Jul 18 2022 Jayashree Huttanagoudar <jhuttana@redhat.com> - 1:17.0.4.0.8-1
|
|
|
44604a |
- Commented out: fipsver f8142a23d0a which was from rhel-9-main
|
|
|
44604a |
- Picked 17.0.4+8 GA tag from rhel-9.0.0
|
|
|
44604a |
- For Jul 2022 CPU fipsver is 765f970aef1 on rhel-9.0.0
|
|
|
44604a |
|
|
|
44604a |
* Mon Jul 18 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.4.0.8-1
|
|
|
44604a |
- Update to jdk-17.0.4.0+8 (GA)
|
|
|
44604a |
- Update release notes to 17.0.4.0+8
|
|
|
44604a |
- Need to include the '.S' suffix in debuginfo checks after JDK-8284661
|
|
|
44604a |
- Switch to GA mode for release
|
|
|
44604a |
- ** This tarball is embargoed until 2022-07-19 @ 1pm PT. **
|
|
|
44604a |
|
|
|
44604a |
* Thu Jul 14 2022 Jayashree Huttanagoudar <jhuttana@redhat.com> - 1:17.0.4.0.1-0.2.ea
|
|
|
44604a |
- Fix issue where CheckVendor.java test erroneously passes when it should fail.
|
|
|
44604a |
- Add proper quoting so '&' is not treated as a special character by the shell.
|
|
|
44604a |
- Related: rhbz#2084779
|
|
|
44604a |
|
|
|
44604a |
* Tue Jul 12 2022 Jayashree Huttanagoudar <jhuttana@redhat.com> - 1:17.0.4.0.1-0.1.ea
|
|
|
44604a |
- Tweaked line to print release information for portable
|
|
|
44604a |
|
|
|
44604a |
* Tue Jul 12 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.4.0.1-0.1.ea
|
|
|
44604a |
- Update to jdk-17.0.4.0+1
|
|
|
44604a |
- Update release notes to 17.0.4.0+1
|
|
|
44604a |
- Switch to EA mode for 17.0.4 pre-release builds.
|
|
|
44604a |
- Print release file during build, which should now include a correct SOURCE value from .src-rev
|
|
|
44604a |
- Update tarball script with IcedTea GitHub URL and .src-rev generation
|
|
|
44604a |
- Include script to generate bug list for release notes
|
|
|
44604a |
- Update tzdata requirement to 2022a to match JDK-8283350
|
|
|
44604a |
- Move EA designator check to prep so failures can be caught earlier
|
|
|
44604a |
- Make EA designator check non-fatal while upstream is not maintaining it
|
|
|
44604a |
- Related: rhbz#2084218
|
|
|
44604a |
|
|
|
44604a |
* Thu Jun 30 2022 Jayashree Huttanagoudar <jhuttana@redhat.com> - 1:17.0.3.0.7-8
|
|
|
44604a |
- Comment line for portable: System security properties to be off by default
|
|
|
44604a |
|
|
|
44604a |
* Thu Jun 30 2022 Francisco Ferrari Bihurriet <fferrari@redhat.com> - 1:17.0.3.0.7-8
|
|
|
44604a |
- RH2007331: SecretKey generate/import operations don't add the CKA_SIGN attribute in FIPS mode
|
|
|
44604a |
- Resolves: rhbz#2102433
|
|
|
44604a |
|
|
|
44604a |
* Wed Jun 29 2022 Jayashree Huttanagoudar <jhuttana@redhat.com> - 1:17.0.3.0.7-7
|
|
|
44604a |
- System security properties are disabled by default on portable.
|
|
|
44604a |
- Commented out lines which are not applicable for portable.
|
|
|
44604a |
|
|
|
44604a |
* Wed Jun 29 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.3.0.7-7
|
|
|
44604a |
- Update FIPS support to bring in latest changes
|
|
|
44604a |
- * RH2036462: sun.security.pkcs11.wrapper.PKCS11.getInstance breakage
|
|
|
44604a |
- * RH2090378: Revert to disabling system security properties and FIPS mode support together
|
|
|
44604a |
- Rebase RH1648249 nss.cfg patch so it applies after the FIPS patch
|
|
|
44604a |
- Enable system security properties in the RPM (now disabled by default in the FIPS repo)
|
|
|
44604a |
- Improve security properties test to check both enabled and disabled behaviour
|
|
|
44604a |
- Run security properties test with property debugging on
|
|
|
44604a |
- Resolves: rhbz#2099844
|
|
|
44604a |
- Resolves: rhbz#2100677
|
|
|
44604a |
|
|
|
44604a |
* Tue Jun 28 2022 Jayashree Huttanagoudar <jhuttana@redhat.com> - 1:17.0.3.0.7-6
|
|
|
44604a |
- Removed upstreamed patch2001: aqaCheckSecurityAndProviderFileSocketPermissions.patch
|
|
|
44604a |
|
|
|
44604a |
* Sun Jun 12 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.3.0.7-6
|
|
|
44604a |
- Rebase FIPS patches from fips-17u branch and simplify by using a single patch from that repository
|
|
|
44604a |
- Rebase RH1648249 nss.cfg patch so it applies after the FIPS patch
|
|
|
44604a |
- RH2023467: Enable FIPS keys export
|
|
|
44604a |
- RH2094027: SunEC runtime permission for FIPS
|
|
|
44604a |
- Resolves: rhbz#2029657
|
|
|
44604a |
- Resolves: rhbz#2096117
|
|
|
44604a |
|
|
|
44604a |
* Wed May 25 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.3.0.7-5
|
|
|
44604a |
- Exclude s390x from the gdb test on RHEL 7 where we see failures with the portable build
|
|
|
44604a |
|
|
|
44604a |
* Tue May 24 2022 Jiri Vanek <jvanek@redhat.com> - 1:17.0.3.0.7-4
|
|
|
44604a |
- to pass aqa, fixing genuie failure in :
|
|
|
44604a |
- java/lang/SecurityManager/CheckAccessClassInPackagePermissions.java#CheckAccessClassInPackagePermissions
|
|
|
44604a |
- javax/xml/crypto/dsig/FileSocketPermissions.java#FileSocketPermissions
|
|
|
44604a |
- added and applied patch2001: aqaCheckSecurityAndProviderFileSocketPermissions.patch
|
|
|
44604a |
- this, properly named, patch must go to all our jdk17 builds, and to the fips repo
|
|
|
44604a |
|
|
|
44604a |
* Thu May 19 2022 Jiri Vanek <jvanek@redhat.com> - 1:17.0.3.0.7-3
|
|
|
44604a |
- to pass aqa:
|
|
|
44604a |
- removed copy system tzdb in favour of in-tree
|
|
|
44604a |
- removed Patch2: rh1648644-java_access_bridge_privileged_security.patch
|
|
|
44604a |
- This is not intended to release untill we decide proper steps
|
|
|
44604a |
|
|
|
44604a |
* Thu May 19 2022 Jayashree Huttanagoudar <jhuttana@redhat.com> - 1:17.0.3.0.7-2
|
|
|
44604a |
- Include BOOT_JDK for s390x for portable
|
|
|
44604a |
- BOOT_JDK downlaoded form hydra as
|
|
|
44604a |
java-17-temurin-17.0.3.7-0.private.ojdk17~upstream.hotspot.release.sdk.el7.s390x.tarxz
|
|
|
44604a |
and renamed
|
|
|
44604a |
- Added cosmetic changes to bypass a failure for s390x
|
|
|
44604a |
|
|
|
44604a |
* Wed Apr 20 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.3.0.7-1
|
|
|
44604a |
- April 2022 security update to jdk 17.0.3+7
|
|
|
44604a |
- Remove JDK-8284548 and JDK-8284920 they are upstreamed now
|
|
|
44604a |
- Resolves: rhbz#2073579
|
|
|
44604a |
|
|
|
44604a |
* Sat Apr 16 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.3.0.6-3
|
|
|
44604a |
- Add JDK-8284920 fix for XPath regression
|
|
|
44604a |
- Related: rhbz#2073575
|
|
|
44604a |
|
|
|
44604a |
* Fri Apr 15 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.3.0.6-2
|
|
|
44604a |
- Remove the patch jdk8283911-default_promoted_version_pre.patch which missed in previous commit
|
|
|
44604a |
- JDK-8275082 should be listed as also resolving JDK-8278008 & CVE-2022-21476
|
|
|
44604a |
- Related: rhbz#2073575
|
|
|
44604a |
|
|
|
44604a |
* Mon Apr 11 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.3.0.6-1
|
|
|
44604a |
- April 2022 security update to jdk 17.0.3+6
|
|
|
44604a |
- Update to jdk-17.0.3.0+6 pre-release tarball (17usec.17.0.3+5-220408)
|
|
|
44604a |
- Add JDK-8284548 regression fix missing from pre-release tarball but in jdk-17.0.3+6/jdk-17.0.3-ga
|
|
|
44604a |
- Update release notes to 17.0.3.0+6
|
|
|
44604a |
- Add missing README.md and generate_source_tarball.sh
|
|
|
44604a |
- Introduce tests/tests.yml, based on the one in java-11-openjdk
|
|
|
44604a |
- JDK-8283911 patch no longer needed now we're GA...
|
|
|
44604a |
- Switch to GA mode for release
|
|
|
44604a |
- ** This tarball is embargoed until 2022-04-19 @ 1pm PT. **
|
|
|
44604a |
- Resolves: rhbz#2073575
|
|
|
44604a |
|
|
|
44604a |
* Wed Apr 06 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.3.0.5-0.1.ea
|
|
|
44604a |
- Update to jdk-17.0.3.0+5
|
|
|
44604a |
- Update release notes to 17.0.3.0+5
|
|
|
44604a |
- Resolves: rhbz#2050460
|
|
|
44604a |
|
|
|
44604a |
* Tue Mar 29 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.3.0.1-0.1.ea
|
|
|
44604a |
- Update to jdk-17.0.3.0+1
|
|
|
44604a |
- Update release notes to 17.0.3.0+1
|
|
|
44604a |
- Switch to EA mode for 17.0.3 pre-release builds.
|
|
|
44604a |
- Add JDK-8283911 to fix bad DEFAULT_PROMOTED_VERSION_PRE value
|
|
|
44604a |
- Related: rhbz#2050456
|
|
|
44604a |
|
|
|
44604a |
* Mon Feb 28 2022 Jayashree Huttanagoudar <jhuttana@redhat.com> - 1:17.0.2.0.8-10
|
|
|
44604a |
- Update icedtea_sync.sh with suitable message for portable
|
|
|
44604a |
|
|
|
44604a |
* Mon Feb 28 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-10
|
|
|
44604a |
- Restructure the build so a minimal initial build is then used for the final build (with docs)
|
|
|
44604a |
- This reduces pressure on the system JDK and ensures the JDK being built can do a full build
|
|
|
44604a |
- Turn off bootstrapping for slow debug builds, which are particularly slow on ppc64le.
|
|
|
44604a |
- Handle Fedora in distro conditionals that currently only pertain to RHEL.
|
|
|
44604a |
- Run OpenJDK normalizer script on the spec file to fix further rogue whitespace
|
|
|
44604a |
- Sync gdb test with java-1.8.0-openjdk and improve architecture restrictions.
|
|
|
44604a |
- Introduce stapinstall variable to set SystemTap arch directory correctly (e.g. arm64 on aarch64)
|
|
|
44604a |
- Need to support noarch for creating source RPMs for non-scratch builds.
|
|
|
44604a |
- Replace -mstackrealign with -mincoming-stack-boundary=2 -mpreferred-stack-boundary=4 on x86_32 for stack alignment
|
|
|
44604a |
- Support a HotSpot-only build so a freshly built libjvm.so can then be used in the bootstrap JDK.
|
|
|
44604a |
- Explicitly list JIT architectures rather than relying on those with slowdebug builds
|
|
|
44604a |
- Disable the serviceability agent on Zero architectures even when the architecture itself is supported
|
|
|
44604a |
- Resolves: rhbz#2022822
|
|
|
44604a |
|
|
|
44604a |
* Mon Feb 28 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-9
|
|
|
44604a |
- Enable AlgorithmParameters and AlgorithmParameterGenerator services in FIPS mode
|
|
|
44604a |
- Correction to previous changelog entry
|
|
|
44604a |
- Resolves: rhbz#2052070
|
|
|
44604a |
|
|
|
44604a |
* Sun Feb 27 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-8
|
|
|
44604a |
- Detect NSS at runtime for FIPS detection
|
|
|
44604a |
- Resolves: rhbz#2051605
|
|
|
44604a |
|
|
|
44604a |
* Wed Feb 23 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-7
|
|
|
44604a |
- Add JDK-8275535 patch to fix LDAP authentication issue.
|
|
|
44604a |
- Resolves: rhbz#2053521
|
|
|
44604a |
|
|
|
44604a |
* Tue Feb 08 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-6
|
|
|
44604a |
- Minor cosmetic improvements to make spec more comparable between variants
|
|
|
44604a |
- Related: rhbz#2022822
|
|
|
44604a |
|
|
|
44604a |
* Thu Feb 03 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-5
|
|
|
44604a |
- Update tapsets from IcedTea 6.x repository with fix for JDK-8015774 changes (_heap->_heaps) and @JAVA_SPEC_VER@
|
|
|
44604a |
- Related: rhbz#2022822
|
|
|
44604a |
|
|
|
44604a |
* Thu Feb 03 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-4
|
|
|
44604a |
- Extend LTS check to exclude EPEL.
|
|
|
44604a |
- Related: rhbz#2022822
|
|
|
44604a |
|
|
|
44604a |
* Tue Jan 18 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-3
|
|
|
44604a |
- Separate crypto policy initialisation from FIPS initialisation, now they are no longer interdependent
|
|
|
44604a |
|
|
|
44604a |
* Mon Jan 17 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-2
|
|
|
44604a |
- Fix FIPS issues in native code and with initialisation of java.security.Security
|
|
|
44604a |
- Related: rhbz#2039366
|
|
|
44604a |
|
|
|
44604a |
* Wed Jan 12 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-1
|
|
|
44604a |
- January 2022 security update to jdk 17.0.2+8
|
|
|
44604a |
- Rebase RH1995150 & RH1996182 patches following JDK-8275863 addition to module-info.java
|
|
|
44604a |
- Resolves: rhbz#2039366
|
|
|
44604a |
- Minor change to the OUTPUT_FILE value to separate the name from the version with '-'
|
|
|
44604a |
|
|
|
44604a |
* Mon Nov 29 2021 Severin Gehwolf <sgehwolf@redhat.com> - 1:17.0.1.0.12-3
|
|
|
44604a |
- Use 'sql:' prefix in nss.fips.cfg as F35+ no longer ship the legacy
|
|
|
44604a |
secmod.db file as part of nss
|
|
|
44604a |
- Resolves: rhbz#2023537
|
|
|
44604a |
|
|
|
44604a |
* Tue Oct 26 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.1.0.12-2
|
|
|
44604a |
- Drop JDK-8272332/RH2004078 patch which is upstream in 17.0.1
|
|
|
44604a |
- October CPU update to jdk 17.0.1+12
|
|
|
44604a |
- Allow plain key import to be disabled with -Dcom.redhat.fips.plainKeySupport=false
|
|
|
44604a |
- Add patch to allow plain key import.
|
|
|
44604a |
|
|
|
44604a |
* Mon Oct 25 2021 Jiri Vanek <jvanek@redhat.com> - 1:17.0.0.0.35-5
|
|
|
44604a |
- cacerts symlink is resolved before passed to configure
|
|
|
44604a |
- https://issues.redhat.com/browse/OPENJDK-487
|
|
|
44604a |
- Disable FIPS mode detection using NSS in favour of using /proc/sys/crypto/fips_enabled for now, so we don't link against NSS
|
|
|
44604a |
-- effectively disabled Patch1008: rh1929465-improve_system_FIPS_detection.patch by settng --enable-sysconf-nss to --disable-sysconf-nss
|
|
|
44604a |
-- the enable-sysconf-nss was bringing in hard depndence on nss. Without nss, even in non fips, jvm had not even started
|
|
|
44604a |
|
|
|
44604a |
* Thu Sep 30 2021 Jiri Vanek <jvanek@redhat.com> - 1:17.0.0.0.35-4
|
|
|
44604a |
- initial import, based on jdk11 portbale, merged with jdk17 rpms and java-latest-openjdk for epel7
|