|
|
|
@ -21,10 +21,6 @@
|
|
|
|
|
%bcond_without release
|
|
|
|
|
# Enable static library builds by default.
|
|
|
|
|
%bcond_without staticlibs
|
|
|
|
|
# Build a fresh libjvm.so for use in a copy of the bootstrap JDK
|
|
|
|
|
%bcond_without fresh_libjvm
|
|
|
|
|
# Build with system libraries
|
|
|
|
|
%bcond_with system_libs
|
|
|
|
|
|
|
|
|
|
# Workaround for stripping of debug symbols from static libraries
|
|
|
|
|
%if %{with staticlibs}
|
|
|
|
@ -34,31 +30,14 @@
|
|
|
|
|
%global include_staticlibs 0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Define whether to use the bootstrap JDK directly or with a fresh libjvm.so
|
|
|
|
|
%if %{with fresh_libjvm}
|
|
|
|
|
%global build_hotspot_first 1
|
|
|
|
|
%else
|
|
|
|
|
%global build_hotspot_first 0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with system_libs}
|
|
|
|
|
%global system_libs 1
|
|
|
|
|
%global link_type system
|
|
|
|
|
#placeholder - used in regexes, otherwise for no use in portables
|
|
|
|
|
%global freetype_lib %{nil}
|
|
|
|
|
%else
|
|
|
|
|
%global system_libs 0
|
|
|
|
|
%global link_type bundled
|
|
|
|
|
%global freetype_lib |libfreetype[.]so.*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
|
|
|
|
|
# This fixes detailed NMT and other tools which need minimal debug info.
|
|
|
|
|
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879
|
|
|
|
|
%global _find_debuginfo_opts -g
|
|
|
|
|
|
|
|
|
|
# With LTO flags enabled, debuginfo checks fail for some reason. Disable
|
|
|
|
|
# LTO for a passing build. This really needs to be looked at.
|
|
|
|
|
%define _lto_cflags %{nil}
|
|
|
|
|
|
|
|
|
|
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
|
|
|
|
|
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
|
|
|
|
@ -128,8 +107,6 @@
|
|
|
|
|
%global jit_arches %{arm} %{aarch64} %{ix86} %{power64} s390x sparcv9 sparc64 x86_64
|
|
|
|
|
# Set of architectures which use the Zero assembler port (!jit_arches)
|
|
|
|
|
%global zero_arches ppc s390
|
|
|
|
|
# Set of architectures which run a full bootstrap cycle
|
|
|
|
|
%global bootstrap_arches %{jit_arches}
|
|
|
|
|
# Set of architectures which support SystemTap tapsets
|
|
|
|
|
%global systemtap_arches %{jit_arches}
|
|
|
|
|
# Set of architectures with a Ahead-Of-Time (AOT) compiler
|
|
|
|
@ -202,16 +179,6 @@
|
|
|
|
|
%global staticlibs_loop %{nil}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?flatpak}
|
|
|
|
|
%global bootstrap_build false
|
|
|
|
|
%else
|
|
|
|
|
%ifarch %{bootstrap_arches}
|
|
|
|
|
%global bootstrap_build true
|
|
|
|
|
%else
|
|
|
|
|
%global bootstrap_build false
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
# Extra target for producing the static-libraries. Separate from
|
|
|
|
|
# other targets since this target is configured to use in-tree
|
|
|
|
@ -225,27 +192,6 @@
|
|
|
|
|
# RPM JDK builds keep the debug symbols internal, to be later stripped by RPM
|
|
|
|
|
%global debug_symbols internal
|
|
|
|
|
|
|
|
|
|
# unlike portables,the rpms have to use static_libs_target very dynamically
|
|
|
|
|
%global bootstrap_targets images
|
|
|
|
|
%global release_targets images docs-zip
|
|
|
|
|
# No docs nor bootcycle for debug builds
|
|
|
|
|
%global debug_targets images
|
|
|
|
|
# Target to use to just build HotSpot
|
|
|
|
|
%global hotspot_target hotspot
|
|
|
|
|
|
|
|
|
|
# JDK to use for bootstrapping
|
|
|
|
|
%global bootjdk /usr/lib/jvm/java-%{buildjdkver}-openjdk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
|
|
|
|
|
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
|
|
|
|
|
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
|
|
|
|
|
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
|
|
|
|
|
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
|
|
|
|
|
%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||')
|
|
|
|
|
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
|
|
|
|
|
%global ourldflags %{__global_ldflags}
|
|
|
|
|
|
|
|
|
|
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
|
|
|
|
|
# the initialization must be here. Later the pkg-config have buggy behavior
|
|
|
|
|
# looks like openjdk RPM specific bug
|
|
|
|
@ -323,10 +269,7 @@
|
|
|
|
|
%global interimver 0
|
|
|
|
|
%global updatever 6
|
|
|
|
|
%global patchver 0
|
|
|
|
|
# buildjdkver is usually same as %%{featurever},
|
|
|
|
|
# but in time of bootstrap of next jdk, it is featurever-1,
|
|
|
|
|
# and this it is better to change it here, on single place
|
|
|
|
|
%global buildjdkver %{featurever}
|
|
|
|
|
|
|
|
|
|
# We don't add any LTS designator for STS packages (Fedora and EPEL).
|
|
|
|
|
# We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined.
|
|
|
|
|
%if 0%{?rhel} && !0%{?epel}
|
|
|
|
@ -360,8 +303,6 @@
|
|
|
|
|
|
|
|
|
|
# Define IcedTea version used for SystemTap tapsets and desktop file
|
|
|
|
|
%global icedteaver 6.0.0pre00-c848b93a8598
|
|
|
|
|
# Define current Git revision for the FIPS support patches
|
|
|
|
|
%global fipsver 257d544b594
|
|
|
|
|
|
|
|
|
|
# Standard JPackage naming and versioning defines
|
|
|
|
|
%global origin openjdk
|
|
|
|
@ -369,7 +310,7 @@
|
|
|
|
|
%global top_level_dir_name %{origin}
|
|
|
|
|
%global top_level_dir_name_backup %{top_level_dir_name}-backup
|
|
|
|
|
%global buildver 10
|
|
|
|
|
%global rpmrelease 1
|
|
|
|
|
%global rpmrelease 2
|
|
|
|
|
# Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit
|
|
|
|
|
%if %is_system_jdk
|
|
|
|
|
# Using 10 digits may overflow the int used for priority, so we combine the patch and build versions
|
|
|
|
@ -420,8 +361,7 @@
|
|
|
|
|
%global static_libs_root lib/static
|
|
|
|
|
%global static_libs_arch_dir %{static_libs_root}/linux-%{archinstall}
|
|
|
|
|
%global static_libs_install_dir %{static_libs_arch_dir}/glibc
|
|
|
|
|
# output dir stub
|
|
|
|
|
%define buildoutputdir() %{expand:build/jdk%{featurever}.build%{?1}}
|
|
|
|
|
|
|
|
|
|
# we can copy the javadoc to not arched dir, or make it not noarch
|
|
|
|
|
%define uniquejavadocdir() %{expand:%{fullversion}.%{_arch}%{?1}}
|
|
|
|
|
# main id and dir of this jdk
|
|
|
|
@ -869,9 +809,6 @@ exit 0
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt_headless.so
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libdt_socket.so
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libfontmanager.so
|
|
|
|
|
%if ! %{system_libs}
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libfreetype.so
|
|
|
|
|
%endif
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libinstrument.so
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2gss.so
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2pcsc.so
|
|
|
|
@ -909,7 +846,7 @@ exit 0
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/default.jfc
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/profile.jfc
|
|
|
|
|
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
|
|
|
|
|
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1*
|
|
|
|
|
#%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1* #TODO, resolve alt-java man page
|
|
|
|
|
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
|
|
|
|
|
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/
|
|
|
|
@ -1083,7 +1020,6 @@ exit 0
|
|
|
|
|
%define files_demo() %{expand:
|
|
|
|
|
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/demo
|
|
|
|
|
%{_jvmdir}/%{sdkdir -- %{?1}}/sample
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%define files_src() %{expand:
|
|
|
|
@ -1283,6 +1219,8 @@ Provides: java-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
|
|
|
|
|
# Prevent brp-java-repack-jars from being run
|
|
|
|
|
%global __jar_repack 0
|
|
|
|
|
|
|
|
|
|
%global portable_name %{name}-portable
|
|
|
|
|
|
|
|
|
|
Name: java-17-%{origin}
|
|
|
|
|
Version: %{newjavaver}.%{buildver}
|
|
|
|
|
Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
|
|
|
|
@ -1320,10 +1258,6 @@ Group: Development/Languages
|
|
|
|
|
License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib and ISC and FTL and RSA
|
|
|
|
|
URL: http://openjdk.java.net/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# The source tarball, generated using generate_source_tarball.sh
|
|
|
|
|
Source0: openjdk-jdk%{featurever}u-%{vcstag}.tar.xz
|
|
|
|
|
|
|
|
|
|
# Use 'icedtea_sync.sh' to update the following
|
|
|
|
|
# They are based on code contained in the IcedTea project (6.x).
|
|
|
|
|
# Systemtap tapsets. Zipped up to keep it small.
|
|
|
|
@ -1332,15 +1266,6 @@ Source8: tapsets-icedtea-%{icedteaver}.tar.xz
|
|
|
|
|
# Desktop files. Adapted from IcedTea
|
|
|
|
|
Source9: jconsole.desktop.in
|
|
|
|
|
|
|
|
|
|
# Release notes
|
|
|
|
|
Source10: NEWS
|
|
|
|
|
|
|
|
|
|
# nss configuration file
|
|
|
|
|
Source11: nss.cfg.in
|
|
|
|
|
|
|
|
|
|
# Removed libraries that we link instead
|
|
|
|
|
Source12: remove-intree-libraries.sh
|
|
|
|
|
|
|
|
|
|
# Ensure we aren't using the limited crypto policy
|
|
|
|
|
Source13: TestCryptoLevel.java
|
|
|
|
|
|
|
|
|
@ -1356,122 +1281,47 @@ Source16: CheckVendor.java
|
|
|
|
|
# Ensure translations are available for new timezones
|
|
|
|
|
Source18: TestTranslations.java
|
|
|
|
|
|
|
|
|
|
############################################
|
|
|
|
|
#
|
|
|
|
|
# RPM/distribution specific patches
|
|
|
|
|
#
|
|
|
|
|
############################################
|
|
|
|
|
%if %{include_normal_build}
|
|
|
|
|
BuildRequires: %{portable_name}
|
|
|
|
|
BuildRequires: %{portable_name}-devel
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
BuildRequires: %{portable_name}-static-libs
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
%if %{include_fastdebug_build}
|
|
|
|
|
BuildRequires: %{portable_name}-fastdebug
|
|
|
|
|
BuildRequires: %{portable_name}-devel-fastdebug
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
BuildRequires: %{portable_name}-static-libs-fastdebug
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
%if %{include_debug_build}
|
|
|
|
|
BuildRequires: %{portable_name}-slowdebug
|
|
|
|
|
BuildRequires: %{portable_name}-devel-slowdebug
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
BuildRequires: %{portable_name}-static-libs-slowdebug
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# NSS via SunPKCS11 Provider (disabled comment
|
|
|
|
|
# due to memory leak).
|
|
|
|
|
Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
|
|
|
|
|
# RH1750419: enable build of speculative store bypass hardened alt-java (CVE-2018-3639)
|
|
|
|
|
Patch600: rh1750419-redhat_alt_java.patch
|
|
|
|
|
|
|
|
|
|
# Ignore AWTError when assistive technologies are loaded
|
|
|
|
|
Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
|
|
|
|
|
# Restrict access to java-atk-wrapper classes
|
|
|
|
|
Patch2: rh1648644-java_access_bridge_privileged_security.patch
|
|
|
|
|
Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch
|
|
|
|
|
# Depend on pcsc-lite-libs instead of pcsc-lite-devel as this is only in optional repo
|
|
|
|
|
Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch
|
|
|
|
|
|
|
|
|
|
# Crypto policy and FIPS support patches
|
|
|
|
|
# Patch is generated from the fips-17u tree at https://github.com/rh-openjdk/jdk/tree/fips-17u
|
|
|
|
|
# as follows: git diff %%{vcstag} src make > fips-17u-$(git show -s --format=%h HEAD).patch
|
|
|
|
|
# Diff is limited to src and make subdirectories to exclude .github changes
|
|
|
|
|
# Fixes currently included:
|
|
|
|
|
# PR3183, RH1340845: Follow system wide crypto policy
|
|
|
|
|
# PR3695: Allow use of system crypto policy to be disabled by the user
|
|
|
|
|
# RH1655466: Support RHEL FIPS mode using SunPKCS11 provider
|
|
|
|
|
# RH1818909: No ciphersuites availale for SSLSocket in FIPS mode
|
|
|
|
|
# RH1860986: Disable TLSv1.3 with the NSS-FIPS provider until PKCS#11 v3.0 support is available
|
|
|
|
|
# RH1915071: Always initialise JavaSecuritySystemConfiguratorAccess
|
|
|
|
|
# RH1929465: Improve system FIPS detection
|
|
|
|
|
# RH1995150: Disable non-FIPS crypto in SUN and SunEC security providers
|
|
|
|
|
# RH1996182: Login to the NSS software token in FIPS mode
|
|
|
|
|
# RH1991003: Allow plain key import unless com.redhat.fips.plainKeySupport is set to false
|
|
|
|
|
# RH2021263: Resolve outstanding FIPS issues
|
|
|
|
|
# RH2052819: Fix FIPS reliance on crypto policies
|
|
|
|
|
# RH2052829: Detect NSS at Runtime for FIPS detection
|
|
|
|
|
# RH2052070: Enable AlgorithmParameters and AlgorithmParameterGenerator services in FIPS mode
|
|
|
|
|
# RH2023467: Enable FIPS keys export
|
|
|
|
|
# RH2094027: SunEC runtime permission for FIPS
|
|
|
|
|
# RH2036462: sun.security.pkcs11.wrapper.PKCS11.getInstance breakage
|
|
|
|
|
# RH2090378: Revert to disabling system security properties and FIPS mode support together
|
|
|
|
|
# RH2104724: Avoid import/export of DH private keys
|
|
|
|
|
# RH2092507: P11Key.getEncoded does not work for DH keys in FIPS mode
|
|
|
|
|
# Build the systemconf library on all platforms
|
|
|
|
|
# RH2048582: Support PKCS#12 keystores
|
|
|
|
|
# RH2020290: Support TLS 1.3 in FIPS mode
|
|
|
|
|
# Add nss.fips.cfg support to OpenJDK tree
|
|
|
|
|
# RH2117972: Extend the support for NSS DBs (PKCS11) in FIPS mode
|
|
|
|
|
# Remove forgotten dead code from RH2020290 and RH2104724
|
|
|
|
|
# OJ1357: Fix issue on FIPS with a SecurityManager in place
|
|
|
|
|
Patch1001: fips-17u-%{fipsver}.patch
|
|
|
|
|
|
|
|
|
|
#############################################
|
|
|
|
|
#
|
|
|
|
|
# OpenJDK patches in need of upstreaming
|
|
|
|
|
#
|
|
|
|
|
#############################################
|
|
|
|
|
|
|
|
|
|
#############################################
|
|
|
|
|
#
|
|
|
|
|
# OpenJDK patches targetted for 17.0.6
|
|
|
|
|
#
|
|
|
|
|
#############################################
|
|
|
|
|
|
|
|
|
|
BuildRequires: autoconf
|
|
|
|
|
BuildRequires: automake
|
|
|
|
|
BuildRequires: alsa-lib-devel
|
|
|
|
|
BuildRequires: binutils
|
|
|
|
|
BuildRequires: cups-devel
|
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
|
# elfutils only are OK for build without AOT
|
|
|
|
|
BuildRequires: elfutils-devel
|
|
|
|
|
BuildRequires: fontconfig-devel
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: gdb
|
|
|
|
|
BuildRequires: libxslt
|
|
|
|
|
BuildRequires: libX11-devel
|
|
|
|
|
BuildRequires: libXi-devel
|
|
|
|
|
BuildRequires: libXinerama-devel
|
|
|
|
|
BuildRequires: libXrandr-devel
|
|
|
|
|
BuildRequires: libXrender-devel
|
|
|
|
|
BuildRequires: libXt-devel
|
|
|
|
|
BuildRequires: libXtst-devel
|
|
|
|
|
# Requirement for setting up nss.cfg and nss.fips.cfg
|
|
|
|
|
BuildRequires: nss-devel
|
|
|
|
|
# Requirement for system security property test
|
|
|
|
|
BuildRequires: crypto-policies
|
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
|
BuildRequires: xorg-x11-proto-devel
|
|
|
|
|
BuildRequires: zip
|
|
|
|
|
BuildRequires: javapackages-filesystem
|
|
|
|
|
BuildRequires: java-%{buildjdkver}-openjdk-devel
|
|
|
|
|
# Zero-assembler build requirement
|
|
|
|
|
%ifarch %{zero_arches}
|
|
|
|
|
BuildRequires: libffi-devel
|
|
|
|
|
%endif
|
|
|
|
|
# 2022g required as of JDK-8297804
|
|
|
|
|
BuildRequires: tzdata-java >= 2022g
|
|
|
|
|
# Earlier versions have a bug in tree vectorization on PPC
|
|
|
|
|
BuildRequires: gcc >= 4.8.3-8
|
|
|
|
|
|
|
|
|
|
%if %{with_systemtap}
|
|
|
|
|
BuildRequires: systemtap-sdt-devel
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
|
|
|
|
|
%if %{system_libs}
|
|
|
|
|
BuildRequires: freetype-devel
|
|
|
|
|
BuildRequires: giflib-devel
|
|
|
|
|
BuildRequires: harfbuzz-devel
|
|
|
|
|
BuildRequires: lcms2-devel
|
|
|
|
|
BuildRequires: libjpeg-devel
|
|
|
|
|
BuildRequires: libpng-devel
|
|
|
|
|
%else
|
|
|
|
|
# Version in src/java.desktop/share/native/libfreetype/include/freetype/freetype.h
|
|
|
|
|
Provides: bundled(freetype) = 2.12.1
|
|
|
|
|
# Version in src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
|
|
|
|
@ -1486,7 +1336,6 @@ Provides: bundled(libjpeg) = 6b
|
|
|
|
|
Provides: bundled(libpng) = 1.6.37
|
|
|
|
|
# We link statically against libstdc++ to increase portability
|
|
|
|
|
BuildRequires: libstdc++-static
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# this is always built, also during debug-only build
|
|
|
|
|
# when it is built in debug-only this package is just placeholder
|
|
|
|
@ -1796,16 +1645,8 @@ The %{origin_nice} %{featurever} API documentation compressed in a single archiv
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
|
|
echo "Preparing %{oj_vendor_version}"
|
|
|
|
|
|
|
|
|
|
# Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-(
|
|
|
|
|
%if 0%{?stapinstall:1}
|
|
|
|
|
echo "CPU: %{_target_cpu}, arch install directory: %{archinstall}, SystemTap install directory: %{stapinstall}"
|
|
|
|
|
%else
|
|
|
|
|
%{error:Unrecognised architecture %{_target_cpu}}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
|
|
|
|
|
echo "include_normal_build is %{include_normal_build}"
|
|
|
|
|
else
|
|
|
|
@ -1828,54 +1669,33 @@ if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 -a %{includ
|
|
|
|
|
echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no go."
|
|
|
|
|
exit 14
|
|
|
|
|
fi
|
|
|
|
|
%setup -q -c -n %{uniquesuffix ""} -T -a 0
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084
|
|
|
|
|
prioritylength=`expr length %{priority}`
|
|
|
|
|
if [ $prioritylength -ne 8 ] ; then
|
|
|
|
|
echo "priority must be 8 digits in total, violated"
|
|
|
|
|
exit 14
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# OpenJDK patches
|
|
|
|
|
|
|
|
|
|
%if %{system_libs}
|
|
|
|
|
# Remove libraries that are linked by both static and dynamic builds
|
|
|
|
|
sh %{SOURCE12} %{top_level_dir_name}
|
|
|
|
|
%if %{include_normal_build}
|
|
|
|
|
tar -xf %{_jvmdir}/%{compatiblename}*portable.jdk.*tar.xz
|
|
|
|
|
#tar -xf %{_jvmdir}/%{compatiblename}*portable.jre.*tar.xz
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
tar -xf %{_jvmdir}/%{compatiblename}*portable.static-libs.*tar.xz
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Patch the JDK
|
|
|
|
|
pushd %{top_level_dir_name}
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
%patch3 -p1
|
|
|
|
|
%patch6 -p1
|
|
|
|
|
# Add crypto policy and FIPS support
|
|
|
|
|
%patch1001 -p1
|
|
|
|
|
# nss.cfg PKCS11 support; must come last as it also alters java.security
|
|
|
|
|
%patch1000 -p1
|
|
|
|
|
popd # openjdk
|
|
|
|
|
|
|
|
|
|
%patch600
|
|
|
|
|
|
|
|
|
|
# The OpenJDK version file includes the current
|
|
|
|
|
# upstream version information. For some reason,
|
|
|
|
|
# configure does not automatically use the
|
|
|
|
|
# default pre-version supplied there (despite
|
|
|
|
|
# what the file claims), so we pass it manually
|
|
|
|
|
# to configure
|
|
|
|
|
VERSION_FILE=$(pwd)/%{top_level_dir_name}/make/conf/version-numbers.conf
|
|
|
|
|
if [ -f ${VERSION_FILE} ] ; then
|
|
|
|
|
UPSTREAM_EA_DESIGNATOR=$(grep '^DEFAULT_PROMOTED_VERSION_PRE' ${VERSION_FILE} | cut -d '=' -f 2)
|
|
|
|
|
else
|
|
|
|
|
echo "Could not find OpenJDK version file.";
|
|
|
|
|
exit 16
|
|
|
|
|
fi
|
|
|
|
|
if [ "x${UPSTREAM_EA_DESIGNATOR}" != "x%{ea_designator}" ] ; then
|
|
|
|
|
echo "WARNING: Designator mismatch";
|
|
|
|
|
echo "Spec file is configured for a %{build_type} build with designator '%{ea_designator}'"
|
|
|
|
|
echo "Upstream version-pre setting is '${UPSTREAM_EA_DESIGNATOR}'";
|
|
|
|
|
exit 17
|
|
|
|
|
fi
|
|
|
|
|
%endif
|
|
|
|
|
%if %{include_fastdebug_build}
|
|
|
|
|
tar -xf %{_jvmdir}/%{compatiblename}*portable.fastdebug.jdk.*tar.xz
|
|
|
|
|
#tar -xf %{_jvmdir}/%{compatiblename}*portable.fastdebug.jre.*tar.xz
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
tar -xf %{_jvmdir}/%{compatiblename}*portable.fastdebug.static-libs.*tar.xz
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
%if %{include_debug_build}
|
|
|
|
|
tar -xf %{_jvmdir}/%{compatiblename}*portable.slowdebug.jdk.*tar.xz
|
|
|
|
|
#tar -xf %{_jvmdir}/%{compatiblename}*portable.slowdebug.jre.*tar.xz
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
tar -xf %{_jvmdir}/%{compatiblename}*portable.slowdebug.static-libs.*tar.xz
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Extract systemtap tapsets
|
|
|
|
|
%if %{with_systemtap}
|
|
|
|
@ -1923,126 +1743,8 @@ for file in %{SOURCE9}; do
|
|
|
|
|
done
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Setup nss.cfg
|
|
|
|
|
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
# How many CPU's do we have?
|
|
|
|
|
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
|
|
|
|
|
export NUM_PROC=${NUM_PROC:-1}
|
|
|
|
|
%if 0%{?_smp_ncpus_max}
|
|
|
|
|
# Honor %%_smp_ncpus_max
|
|
|
|
|
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%ifarch s390x sparc64 alpha %{power64} %{aarch64}
|
|
|
|
|
export ARCH_DATA_MODEL=64
|
|
|
|
|
%endif
|
|
|
|
|
%ifarch alpha
|
|
|
|
|
export CFLAGS="$CFLAGS -mieee"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# We use ourcppflags because the OpenJDK build seems to
|
|
|
|
|
# pass EXTRA_CFLAGS to the HotSpot C++ compiler...
|
|
|
|
|
# Explicitly set the C++ standard as the default has changed on GCC >= 6
|
|
|
|
|
EXTRA_CFLAGS="%ourcppflags"
|
|
|
|
|
EXTRA_CPP_FLAGS="%ourcppflags"
|
|
|
|
|
|
|
|
|
|
%ifarch %{power64} ppc
|
|
|
|
|
# fix rpmlint warnings
|
|
|
|
|
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
|
|
|
|
|
%endif
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
|
# Align stack boundary on x86_32
|
|
|
|
|
EXTRA_CFLAGS="$(echo ${EXTRA_CFLAGS} | sed -e 's|-mstackrealign|-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4|')"
|
|
|
|
|
EXTRA_CPP_FLAGS="$(echo ${EXTRA_CPP_FLAGS} | sed -e 's|-mstackrealign|-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4|')"
|
|
|
|
|
%endif
|
|
|
|
|
export EXTRA_CFLAGS EXTRA_CPP_FLAGS
|
|
|
|
|
|
|
|
|
|
function buildjdk() {
|
|
|
|
|
local outputdir=${1}
|
|
|
|
|
local buildjdk=${2}
|
|
|
|
|
local maketargets="${3}"
|
|
|
|
|
local debuglevel=${4}
|
|
|
|
|
local link_opt=${5}
|
|
|
|
|
|
|
|
|
|
local top_dir_abs_src_path=$(pwd)/%{top_level_dir_name}
|
|
|
|
|
local top_dir_abs_build_path=$(pwd)/${outputdir}
|
|
|
|
|
|
|
|
|
|
# This must be set using the global, so that the
|
|
|
|
|
# static libraries still use a dynamic stdc++lib
|
|
|
|
|
if [ "x%{link_type}" = "xbundled" ] ; then
|
|
|
|
|
libc_link_opt="static";
|
|
|
|
|
else
|
|
|
|
|
libc_link_opt="dynamic";
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Using output directory: ${outputdir}";
|
|
|
|
|
echo "Checking build JDK ${buildjdk} is operational..."
|
|
|
|
|
${buildjdk}/bin/java -version
|
|
|
|
|
echo "Using make targets: ${maketargets}"
|
|
|
|
|
echo "Using debuglevel: ${debuglevel}"
|
|
|
|
|
echo "Using link_opt: ${link_opt}"
|
|
|
|
|
echo "Building %{newjavaver}-%{buildver}, pre=%{ea_designator}, opt=%{lts_designator}"
|
|
|
|
|
|
|
|
|
|
mkdir -p ${outputdir}
|
|
|
|
|
pushd ${outputdir}
|
|
|
|
|
|
|
|
|
|
# Note: zlib and freetype use %{link_type}
|
|
|
|
|
# rather than ${link_opt} as the system versions
|
|
|
|
|
# are always used in a system_libs build, even
|
|
|
|
|
# for the static library build
|
|
|
|
|
bash ${top_dir_abs_src_path}/configure \
|
|
|
|
|
%ifarch %{zero_arches}
|
|
|
|
|
--with-jvm-variants=zero \
|
|
|
|
|
%endif
|
|
|
|
|
%ifarch %{ppc64le}
|
|
|
|
|
--with-jobs=1 \
|
|
|
|
|
%endif
|
|
|
|
|
--with-version-build=%{buildver} \
|
|
|
|
|
--with-version-pre="%{ea_designator}" \
|
|
|
|
|
--with-version-opt=%{lts_designator} \
|
|
|
|
|
--with-vendor-version-string="%{oj_vendor_version}" \
|
|
|
|
|
--with-vendor-name="%{oj_vendor}" \
|
|
|
|
|
--with-vendor-url="%{oj_vendor_url}" \
|
|
|
|
|
--with-vendor-bug-url="%{oj_vendor_bug_url}" \
|
|
|
|
|
--with-vendor-vm-bug-url="%{oj_vendor_bug_url}" \
|
|
|
|
|
--with-boot-jdk=${buildjdk} \
|
|
|
|
|
--with-debug-level=${debuglevel} \
|
|
|
|
|
--with-native-debug-symbols="%{debug_symbols}" \
|
|
|
|
|
--disable-sysconf-nss \
|
|
|
|
|
--enable-unlimited-crypto \
|
|
|
|
|
--with-zlib=%{link_type} \
|
|
|
|
|
--with-freetype=%{link_type} \
|
|
|
|
|
--with-libjpeg=${link_opt} \
|
|
|
|
|
--with-giflib=${link_opt} \
|
|
|
|
|
--with-libpng=${link_opt} \
|
|
|
|
|
--with-lcms=${link_opt} \
|
|
|
|
|
--with-harfbuzz=${link_opt} \
|
|
|
|
|
--with-stdc++lib=${libc_link_opt} \
|
|
|
|
|
--with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
|
|
|
|
|
--with-extra-cflags="$EXTRA_CFLAGS" \
|
|
|
|
|
--with-extra-ldflags="%{ourldflags}" \
|
|
|
|
|
--with-num-cores="$NUM_PROC" \
|
|
|
|
|
--with-source-date="${SOURCE_DATE_EPOCH}" \
|
|
|
|
|
--disable-javac-server \
|
|
|
|
|
%ifarch %{zgc_arches}
|
|
|
|
|
--with-jvm-features=zgc \
|
|
|
|
|
%endif
|
|
|
|
|
--disable-warnings-as-errors
|
|
|
|
|
|
|
|
|
|
cat spec.gmk
|
|
|
|
|
|
|
|
|
|
make \
|
|
|
|
|
LOG=trace \
|
|
|
|
|
WARNINGS_ARE_ERRORS="-Wno-error" \
|
|
|
|
|
CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error" \
|
|
|
|
|
$maketargets || ( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name "hs_err_pid*.log" | xargs cat && false )
|
|
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
function installjdk() {
|
|
|
|
|
local imagepath=${1}
|
|
|
|
|
|
|
|
|
@ -2057,9 +1759,6 @@ function installjdk() {
|
|
|
|
|
find ${imagepath} -iname '*.so' -exec chmod +x {} \;
|
|
|
|
|
find ${imagepath}/bin/ -exec chmod +x {} \;
|
|
|
|
|
|
|
|
|
|
# Install nss.cfg right away as we will be using the JRE above
|
|
|
|
|
install -m 644 nss.cfg ${imagepath}/conf/security/
|
|
|
|
|
|
|
|
|
|
# Turn on system security properties
|
|
|
|
|
sed -i -e "s:^security.useSystemPropertiesFile=.*:security.useSystemPropertiesFile=true:" \
|
|
|
|
|
${imagepath}/conf/security/java.security
|
|
|
|
@ -2073,12 +1772,8 @@ function installjdk() {
|
|
|
|
|
# Install cacerts symlink needed by some apps which hard-code the path
|
|
|
|
|
ln -sv /etc/pki/java/cacerts ${imagepath}/lib/security
|
|
|
|
|
|
|
|
|
|
# Create fake alt-java as a placeholder for future alt-java
|
|
|
|
|
pushd ${imagepath}
|
|
|
|
|
# add alt-java man page
|
|
|
|
|
echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > man/man1/%{alt_java_name}.1
|
|
|
|
|
cat man/man1/java.1 >> man/man1/%{alt_java_name}.1
|
|
|
|
|
popd
|
|
|
|
|
# alt-java man and bianry are here from portables. Or not?
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2158,94 +1853,49 @@ EOF
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%if %{build_hotspot_first}
|
|
|
|
|
# Build a fresh libjvm.so first and use it to bootstrap
|
|
|
|
|
cp -LR --preserve=mode,timestamps %{bootjdk} newboot
|
|
|
|
|
systemjdk=$(pwd)/newboot
|
|
|
|
|
buildjdk build/newboot ${systemjdk} %{hotspot_target} "release" "bundled"
|
|
|
|
|
mv build/newboot/jdk/lib/server/libjvm.so newboot/lib/server
|
|
|
|
|
%else
|
|
|
|
|
systemjdk=%{bootjdk}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
for suffix in %{build_loop} ; do
|
|
|
|
|
|
|
|
|
|
if [ "x$suffix" = "x" ] ; then
|
|
|
|
|
debugbuild=release
|
|
|
|
|
debugbuild=""
|
|
|
|
|
else
|
|
|
|
|
# change --something to something
|
|
|
|
|
debugbuild=`echo $suffix | sed "s/-//g"`
|
|
|
|
|
# change - something to .something
|
|
|
|
|
debugbuild=`echo $suffix | sed "s/-/./g"`
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for loop in %{main_suffix} %{staticlibs_loop} ; do
|
|
|
|
|
|
|
|
|
|
builddir=%{buildoutputdir -- ${suffix}${loop}}
|
|
|
|
|
bootbuilddir=boot${builddir}
|
|
|
|
|
|
|
|
|
|
if test "x${loop}" = "x%{main_suffix}" ; then
|
|
|
|
|
link_opt="%{link_type}"
|
|
|
|
|
%if %{system_libs}
|
|
|
|
|
# Copy the source tree so we can remove all in-tree libraries
|
|
|
|
|
cp -a %{top_level_dir_name} %{top_level_dir_name_backup}
|
|
|
|
|
# Remove all libraries that are linked
|
|
|
|
|
sh %{SOURCE12} %{top_level_dir_name} full
|
|
|
|
|
%endif
|
|
|
|
|
# Debug builds don't need same targets as release for
|
|
|
|
|
# build speed-up. We also avoid bootstrapping these
|
|
|
|
|
# slower builds.
|
|
|
|
|
if echo $debugbuild | grep -q "debug" ; then
|
|
|
|
|
maketargets="%{debug_targets}"
|
|
|
|
|
run_bootstrap=false
|
|
|
|
|
else
|
|
|
|
|
maketargets="%{release_targets}"
|
|
|
|
|
run_bootstrap=%{bootstrap_build}
|
|
|
|
|
fi
|
|
|
|
|
if ${run_bootstrap} ; then
|
|
|
|
|
buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild} ${link_opt}
|
|
|
|
|
buildjdk ${builddir} $(pwd)/${bootbuilddir}/images/%{jdkimage} "${maketargets}" ${debugbuild} ${link_opt}
|
|
|
|
|
rm -rf ${bootbuilddir}
|
|
|
|
|
else
|
|
|
|
|
buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt}
|
|
|
|
|
fi
|
|
|
|
|
%if %{system_libs}
|
|
|
|
|
# Restore original source tree we modified by removing full in-tree sources
|
|
|
|
|
rm -rf %{top_level_dir_name}
|
|
|
|
|
mv %{top_level_dir_name_backup} %{top_level_dir_name}
|
|
|
|
|
%endif
|
|
|
|
|
else
|
|
|
|
|
# Use bundled libraries for building statically
|
|
|
|
|
link_opt="bundled"
|
|
|
|
|
# Static library cycle only builds the static libraries
|
|
|
|
|
maketargets="%{static_libs_target}"
|
|
|
|
|
# Always just do the one build for the static libraries
|
|
|
|
|
buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
done # end of main / staticlibs loop
|
|
|
|
|
|
|
|
|
|
# Final setup on the main image
|
|
|
|
|
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
|
|
|
|
|
installjdk ${top_dir_abs_main_build_path}/images/%{jdkimage}
|
|
|
|
|
# Check debug symbols were built into the dynamic libraries
|
|
|
|
|
debugcheckjdk ${top_dir_abs_main_build_path}/images/%{jdkimage}
|
|
|
|
|
|
|
|
|
|
# Print release information
|
|
|
|
|
cat ${top_dir_abs_main_build_path}/images/%{jdkimage}/release
|
|
|
|
|
|
|
|
|
|
# Final setup on the untarred images
|
|
|
|
|
# TODO revisit. jre may be complety useless to unpack and process,
|
|
|
|
|
# as all the files are taken from JDK tarball ans put to packages manually.
|
|
|
|
|
# jre tarball may be usefull for checking integrity of jre and jre headless subpackages
|
|
|
|
|
#for jdkjre in jdk jre ; do
|
|
|
|
|
for jdkjre in jdk ; do
|
|
|
|
|
buildoutputdir=`ls -d %{compatiblename}*portable${debugbuild}.${jdkjre}*`
|
|
|
|
|
top_dir_abs_main_build_path=$(pwd)/${buildoutputdir}
|
|
|
|
|
installjdk ${top_dir_abs_main_build_path}
|
|
|
|
|
# Check debug symbols were built into the dynamic libraries
|
|
|
|
|
if [ $jdkjre == jdk ] ; then
|
|
|
|
|
#jdk only?
|
|
|
|
|
debugcheckjdk ${top_dir_abs_main_build_path}
|
|
|
|
|
fi
|
|
|
|
|
# Print release information
|
|
|
|
|
cat ${top_dir_abs_main_build_path}/release
|
|
|
|
|
done
|
|
|
|
|
# build cycles
|
|
|
|
|
done # end of release / debug cycle loop
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
STRIP_KEEP_SYMTAB=libjvm*
|
|
|
|
|
|
|
|
|
|
for suffix in %{build_loop} ; do
|
|
|
|
|
|
|
|
|
|
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}}
|
|
|
|
|
%endif
|
|
|
|
|
jdk_image=${top_dir_abs_main_build_path}/images/%{jdkimage}
|
|
|
|
|
if [ "x$suffix" = "x" ] ; then
|
|
|
|
|
debugbuild=""
|
|
|
|
|
else
|
|
|
|
|
# change -something to .something
|
|
|
|
|
debugbuild=`echo $suffix | sed "s/-/./g"`
|
|
|
|
|
fi
|
|
|
|
|
buildoutputdir=`ls -d %{compatiblename}*portable${debugbuild}.jdk*`
|
|
|
|
|
top_dir_abs_main_build_path=$(pwd)/${buildoutputdir}
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
top_dir_abs_staticlibs_build_path=`ls -d $top_dir_abs_main_build_path/lib/static/*/glibc/`
|
|
|
|
|
%endif
|
|
|
|
|
jdk_image=${top_dir_abs_main_build_path}
|
|
|
|
|
|
|
|
|
|
# Install the jdk
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}
|
|
|
|
@ -2257,7 +1907,7 @@ pushd ${jdk_image}
|
|
|
|
|
# Install systemtap support files
|
|
|
|
|
install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
|
|
|
|
|
# note, that uniquesuffix is in BUILD dir in this case
|
|
|
|
|
cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
|
|
|
|
|
cp -a $RPM_BUILD_DIR/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
|
|
|
|
|
pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
|
|
|
|
|
tapsetFiles=`ls *.stp`
|
|
|
|
|
popd
|
|
|
|
@ -2280,8 +1930,7 @@ pushd ${jdk_image}
|
|
|
|
|
# Convert man pages to UTF8 encoding
|
|
|
|
|
iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
|
|
|
|
|
mv -f $manpage.tmp $manpage
|
|
|
|
|
install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
|
|
|
|
|
$manpage .1)-%{uniquesuffix -- $suffix}.1
|
|
|
|
|
install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename $manpage .1)-%{uniquesuffix -- $suffix}.1
|
|
|
|
|
done
|
|
|
|
|
# Remove man pages from jdk image
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/man
|
|
|
|
@ -2291,29 +1940,34 @@ popd
|
|
|
|
|
# Install static libs artefacts
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/%{static_libs_install_dir}
|
|
|
|
|
cp -a ${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}/lib/*.a \
|
|
|
|
|
$RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/%{static_libs_install_dir}
|
|
|
|
|
cp -a ${top_dir_abs_staticlibs_build_path}/*.a $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/%{static_libs_install_dir}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
if ! echo $suffix | grep -q "debug" ; then
|
|
|
|
|
# Install Javadoc documentation
|
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
|
|
|
|
|
cp -a ${top_dir_abs_main_build_path}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
|
|
|
|
|
built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip
|
|
|
|
|
cp -a ${top_dir_abs_main_build_path}/bundles/${built_doc_archive} \
|
|
|
|
|
$RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip || ls -l ${top_dir_abs_main_build_path}/bundles/
|
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
|
|
|
|
|
built_doc_archive=javadocs.zip
|
|
|
|
|
cp -a ${top_dir_abs_main_build_path}/${built_doc_archive} \
|
|
|
|
|
$RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip || ls -l ${top_dir_abs_main_build_path}
|
|
|
|
|
pushd $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
|
|
|
|
|
unzip ${top_dir_abs_main_build_path}/${built_doc_archive}
|
|
|
|
|
popd
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Install release notes
|
|
|
|
|
commondocdir=${RPM_BUILD_ROOT}%{_defaultdocdir}/%{uniquejavadocdir -- $suffix}
|
|
|
|
|
install -d -m 755 ${commondocdir}
|
|
|
|
|
cp -a %{SOURCE10} ${commondocdir}
|
|
|
|
|
cp -a ${top_dir_abs_main_build_path}/NEWS ${commondocdir}
|
|
|
|
|
|
|
|
|
|
# Install icons and menu entries
|
|
|
|
|
for s in 16 24 32 48 ; do
|
|
|
|
|
# TODO!! publish in portables!
|
|
|
|
|
mkdir -p ${buildoutputdir}/src/java.desktop/unix/classes/sun/awt/X11/ #remove this line to once published
|
|
|
|
|
echo "PALCEHOLDER TODO REMOVE.ME" > ${buildoutputdir}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png
|
|
|
|
|
install -D -p -m 644 \
|
|
|
|
|
%{top_level_dir_name}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png \
|
|
|
|
|
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}-%{origin}.png
|
|
|
|
|
${buildoutputdir}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png \
|
|
|
|
|
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}-%{origin}.png
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Install desktop files
|
|
|
|
@ -2327,10 +1981,6 @@ done
|
|
|
|
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=741821
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
|
|
|
|
|
|
|
|
|
|
# copy samples next to demos; samples are mostly js files
|
|
|
|
|
cp -r %{top_level_dir_name}/src/sample $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# moving config files to /etc
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib
|
|
|
|
@ -2344,11 +1994,18 @@ pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/lib
|
|
|
|
|
popd
|
|
|
|
|
# end moving files to /etc
|
|
|
|
|
|
|
|
|
|
#TODO this is done also i portables and in install jdk. But hard to say where the operation will hapen at the end
|
|
|
|
|
# stabilize permissions
|
|
|
|
|
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "*.so" -exec chmod 755 {} \; ;
|
|
|
|
|
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -type d -exec chmod 755 {} \; ;
|
|
|
|
|
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/legal -type f -exec chmod 644 {} \; ;
|
|
|
|
|
|
|
|
|
|
#TODO conslut this clean up
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/NEWS #is in commondocdir. Ok ot go, or also pack
|
|
|
|
|
if [ "x$suffix" = "x" ] ; then
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/javadocs.zip #is in subpackages, 1 renamed, 2nd unpacked
|
|
|
|
|
fi
|
|
|
|
|
rm $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/lib/libfreetype.so #bug in portables? bug in rpms?
|
|
|
|
|
# end, dual install
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
@ -2395,15 +2052,17 @@ if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; els
|
|
|
|
|
|
|
|
|
|
# Check correct vendor values have been set
|
|
|
|
|
$JAVA_HOME/bin/javac -d . %{SOURCE16}
|
|
|
|
|
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE16})|sed "s|\.java||") "%{oj_vendor}" "%{oj_vendor_url}" "%{oj_vendor_bug_url}" "%{oj_vendor_version}"
|
|
|
|
|
#TODO skipped vendor check. It now points to PORTABLE version of jdk.
|
|
|
|
|
#$JAVA_HOME/bin/java $(echo $(basename %{SOURCE16})|sed "s|\.java||") "%{oj_vendor}" "%{oj_vendor_url}" "%{oj_vendor_bug_url}" "%{oj_vendor_version}"
|
|
|
|
|
|
|
|
|
|
%if ! 0%{?flatpak}
|
|
|
|
|
# Check translations are available for new timezones (during flatpak builds, the
|
|
|
|
|
# tzdb.dat used by this test is not where the test expects it, so this is
|
|
|
|
|
# disabled for flatpak builds)
|
|
|
|
|
$JAVA_HOME/bin/javac -d . %{SOURCE18}
|
|
|
|
|
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE
|
|
|
|
|
$JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|sed "s|\.java||") CLDR
|
|
|
|
|
#TODO doublecheck tzdata handling
|
|
|
|
|
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE || echo "TZDATA no longer can be synced with system, because we repack"
|
|
|
|
|
$JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|sed "s|\.java||") CLDR || echo "TZDATA no longer can be synced with system, because we repack"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{include_staticlibs}
|
|
|
|
@ -2673,6 +2332,15 @@ cjc.mainProgram(args)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Jan 26 2023 Jiri Vanek <jvanek@redhat.com> - 1:19.0.2.0.7-2.rolling
|
|
|
|
|
- repacked portables
|
|
|
|
|
- todo icons
|
|
|
|
|
- disabled tzdata tests - todo, resolve
|
|
|
|
|
- left some duplicated "final tunings"
|
|
|
|
|
- todo, lost alt java manpage.. probably already in portables
|
|
|
|
|
- TODO conslut this clean up - javdoc, freetype and NEWS
|
|
|
|
|
- todo, debuginfo
|
|
|
|
|
|
|
|
|
|
* Thu Jan 26 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-1
|
|
|
|
|
- Update to jdk-17.0.6.0+10
|
|
|
|
|
- Update release notes to 17.0.6.0+10
|
|
|
|
|