|
|
b6221f |
# RPM conditionals so as to be able to dynamically produce
|
|
|
b6221f |
# slowdebug/release builds. See:
|
|
|
b6221f |
# http://rpm.org/user_doc/conditional_builds.html
|
|
|
b6221f |
#
|
|
|
b6221f |
# Examples:
|
|
|
b6221f |
#
|
|
|
2f6c9a |
# Produce release, fastdebug *and* slowdebug builds on x86_64 (default):
|
|
|
2f6c9a |
# $ rpmbuild -ba java-11-openjdk.spec
|
|
|
b6221f |
#
|
|
|
2f6c9a |
# Produce only release builds (no debug builds) on x86_64:
|
|
|
2f6c9a |
# $ rpmbuild -ba java-11-openjdk.spec --without slowdebug --without fastdebug
|
|
|
b6221f |
#
|
|
|
b6221f |
# Only produce a release build on x86_64:
|
|
|
2f6c9a |
# $ rhpkg mockbuild --without slowdebug --without fastdebug
|
|
|
b6221f |
#
|
|
|
2f6c9a |
# Enable fastdebug builds by default on relevant arches.
|
|
|
2f6c9a |
%bcond_without fastdebug
|
|
|
b6221f |
# Enable slowdebug builds by default on relevant arches.
|
|
|
b6221f |
%bcond_without slowdebug
|
|
|
b6221f |
# Enable release builds by default on relevant arches.
|
|
|
b6221f |
%bcond_without release
|
|
|
0f37e5 |
# Enable static library builds by default.
|
|
|
0f37e5 |
%bcond_without staticlibs
|
|
|
b6221f |
|
|
|
140246 |
# Workaround for stripping of debug symbols from static libraries
|
|
|
0f37e5 |
%if %{with staticlibs}
|
|
|
140246 |
%define __brp_strip_static_archive %{nil}
|
|
|
0f37e5 |
%global include_staticlibs 1
|
|
|
0f37e5 |
%else
|
|
|
0f37e5 |
%global include_staticlibs 0
|
|
|
0f37e5 |
%endif
|
|
|
140246 |
|
|
|
b6221f |
# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
|
|
|
b6221f |
# This fixes detailed NMT and other tools which need minimal debug info.
|
|
|
b6221f |
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879
|
|
|
b6221f |
%global _find_debuginfo_opts -g
|
|
|
b6221f |
|
|
|
b6221f |
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
|
|
|
b6221f |
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
|
|
|
b6221f |
# see the difference between global and define:
|
|
|
b6221f |
# See https://github.com/rpm-software-management/rpm/issues/127 to comments at "pmatilai commented on Aug 18, 2017"
|
|
|
b6221f |
# (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
|
|
|
b6221f |
%global debug_suffix_unquoted -slowdebug
|
|
|
2f6c9a |
%global fastdebug_suffix_unquoted -fastdebug
|
|
|
0f37e5 |
%global main_suffix_unquoted -main
|
|
|
0f37e5 |
%global staticlibs_suffix_unquoted -staticlibs
|
|
|
b6221f |
# quoted one for shell operations
|
|
|
b6221f |
%global debug_suffix "%{debug_suffix_unquoted}"
|
|
|
2f6c9a |
%global fastdebug_suffix "%{fastdebug_suffix_unquoted}"
|
|
|
b6221f |
%global normal_suffix ""
|
|
|
0f37e5 |
%global main_suffix "%{main_suffix_unquoted}"
|
|
|
0f37e5 |
%global staticlibs_suffix "%{staticlibs_suffix_unquoted}"
|
|
|
b6221f |
|
|
|
2f6c9a |
%global debug_warning This package is unoptimised with full debugging. Install only as needed and remove ASAP.
|
|
|
2f6c9a |
%global fastdebug_warning This package is optimised with full debugging. Install only as needed and remove ASAP.
|
|
|
1d0aac |
%global debug_on unoptimised with full debugging on
|
|
|
1d0aac |
%global fastdebug_on optimised with full debugging on
|
|
|
1d0aac |
%global for_fastdebug for packages with debugging on and optimisation
|
|
|
1d0aac |
%global for_debug for packages with debugging on and no optimisation
|
|
|
b6221f |
|
|
|
b6221f |
%if %{with release}
|
|
|
b6221f |
%global include_normal_build 1
|
|
|
b6221f |
%else
|
|
|
b6221f |
%global include_normal_build 0
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
%if %{include_normal_build}
|
|
|
2f6c9a |
%global normal_build %{normal_suffix}
|
|
|
b6221f |
%else
|
|
|
2f6c9a |
%global normal_build %{nil}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
# We have hardcoded list of files, which is appearing in alternatives, and in files
|
|
|
b6221f |
# in alternatives those are slaves and master, very often triplicated by man pages
|
|
|
b6221f |
# in files all masters and slaves are ghosted
|
|
|
b6221f |
# the ghosts are here to allow installation via query like `dnf install /usr/bin/java`
|
|
|
b6221f |
# you can list those files, with appropriate sections: cat *.spec | grep -e --install -e --slave -e post_
|
|
|
b6221f |
# TODO - fix those hardcoded lists via single list
|
|
|
2f6c9a |
# Those files must *NOT* be ghosted for *slowdebug* packages
|
|
|
2f6c9a |
# FIXME - if you are moving jshell or jlink or similar, always modify all three sections
|
|
|
b6221f |
# you can check via headless and devels:
|
|
|
b6221f |
# rpm -ql --noghost java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin
|
|
|
b6221f |
# == rpm -ql java-11-openjdk-headless-slowdebug-11.0.1.13-8.fc29.x86_64.rpm | grep bin
|
|
|
b6221f |
# != rpm -ql java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin
|
|
|
b6221f |
# similarly for other %%{_jvmdir}/{jre,java} and %%{_javadocdir}/{java,java-zip}
|
|
|
1d0aac |
%define is_release_build() %( if [ "%{?1}" == "%{debug_suffix_unquoted}" -o "%{?1}" == "%{fastdebug_suffix_unquoted}" ]; then echo "0" ; else echo "1"; fi )
|
|
|
b6221f |
|
|
|
b6221f |
# 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
|
|
|
b6221f |
# as sytem JDK, we mean any JDK which can run whole system java stack without issues (like bytecode issues, module issues, dependencies...)
|
|
|
b6221f |
%global is_system_jdk 0
|
|
|
b6221f |
|
|
|
b6221f |
%global aarch64 aarch64 arm64 armv8
|
|
|
b6221f |
# we need to distinguish between big and little endian PPC64
|
|
|
b6221f |
%global ppc64le ppc64le
|
|
|
b6221f |
%global ppc64be ppc64 ppc64p7
|
|
|
2a959b |
# Set of architectures which support multiple ABIs
|
|
|
b6221f |
%global multilib_arches %{power64} sparc64 x86_64
|
|
|
2a959b |
# Set of architectures for which we build slowdebug builds
|
|
|
2a959b |
%global debug_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} s390x
|
|
|
2a959b |
# Set of architectures for which we build fastdebug builds
|
|
|
2f6c9a |
%global fastdebug_arches x86_64
|
|
|
2a959b |
# Set of architectures with a Just-In-Time (JIT) compiler
|
|
|
2a959b |
%global jit_arches %{debug_arches} %{arm}
|
|
|
2a959b |
# Set of architectures which run a full bootstrap cycle
|
|
|
2a959b |
%global bootstrap_arches %{jit_arches}
|
|
|
2a959b |
# Set of architectures which support SystemTap tapsets
|
|
|
2a959b |
%global systemtap_arches %{jit_arches}
|
|
|
2a959b |
# Set of architectures with a Ahead-Of-Time (AOT) compiler
|
|
|
2a959b |
%global aot_arches x86_64 %{aarch64}
|
|
|
2a959b |
# Set of architectures which support the serviceability agent
|
|
|
2a959b |
%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} %{arm}
|
|
|
2a959b |
# Set of architectures which support class data sharing
|
|
|
2a959b |
# As of JDK-8005165 in OpenJDK 10, class sharing is not arch-specific
|
|
|
2a959b |
# However, it does segfault on the Zero assembler port, so currently JIT only
|
|
|
2a959b |
%global share_arches %{jit_arches}
|
|
|
2a959b |
# Set of architectures for which we build the Shenandoah garbage collector
|
|
|
2a959b |
%global shenandoah_arches x86_64 %{aarch64}
|
|
|
2a959b |
# Set of architectures for which we build the Z garbage collector
|
|
|
2a959b |
%global zgc_arches x86_64
|
|
|
c3e128 |
# Set of architectures for which alt-java has SSB mitigation
|
|
|
c3e128 |
%global ssbd_arches x86_64
|
|
|
b6221f |
|
|
|
b6221f |
# By default, we build a debug build during main build on JIT architectures
|
|
|
b6221f |
%if %{with slowdebug}
|
|
|
2a959b |
%ifarch %{debug_arches}
|
|
|
b6221f |
%global include_debug_build 1
|
|
|
b6221f |
%else
|
|
|
b6221f |
%global include_debug_build 0
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%else
|
|
|
b6221f |
%global include_debug_build 0
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2a959b |
# On certain architectures, we compile the Shenandoah GC
|
|
|
2a959b |
%ifarch %{shenandoah_arches}
|
|
|
b6221f |
%global use_shenandoah_hotspot 1
|
|
|
2a959b |
%global shenandoah_feature shenandoahgc
|
|
|
b6221f |
%else
|
|
|
b6221f |
%global use_shenandoah_hotspot 0
|
|
|
2a959b |
%global shenandoah_feature -shenandoahgc
|
|
|
2a959b |
%endif
|
|
|
2a959b |
|
|
|
2a959b |
# On certain architectures, we compile the ZGC
|
|
|
2a959b |
%ifarch %{zgc_arches}
|
|
|
2a959b |
%global use_zgc_hotspot 1
|
|
|
2a959b |
%global zgc_feature zgc
|
|
|
2a959b |
%else
|
|
|
2a959b |
%global use_zgc_hotspot 0
|
|
|
2a959b |
%global zgc_feature -zgc
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2f6c9a |
# By default, we build a fastdebug build during main build only on fastdebug architectures
|
|
|
2f6c9a |
%if %{with fastdebug}
|
|
|
2f6c9a |
%ifarch %{fastdebug_arches}
|
|
|
2f6c9a |
%global include_fastdebug_build 1
|
|
|
2f6c9a |
%else
|
|
|
2f6c9a |
%global include_fastdebug_build 0
|
|
|
2f6c9a |
%endif
|
|
|
82e2ee |
%else
|
|
|
82e2ee |
%global include_fastdebug_build 0
|
|
|
2f6c9a |
%endif
|
|
|
2f6c9a |
|
|
|
b6221f |
%if %{include_debug_build}
|
|
|
2f6c9a |
%global slowdebug_build %{debug_suffix}
|
|
|
2f6c9a |
%else
|
|
|
2f6c9a |
%global slowdebug_build %{nil}
|
|
|
2f6c9a |
%endif
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%if %{include_fastdebug_build}
|
|
|
2f6c9a |
%global fastdebug_build %{fastdebug_suffix}
|
|
|
b6221f |
%else
|
|
|
2f6c9a |
%global fastdebug_build %{nil}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2f6c9a |
# If you disable both builds, then the build fails
|
|
|
2f6c9a |
# Note that the debug build requires the normal build for docs
|
|
|
2f6c9a |
%global build_loop %{normal_build} %{fastdebug_build} %{slowdebug_build}
|
|
|
2f6c9a |
# Test slowdebug first as it provides the best diagnostics
|
|
|
2f6c9a |
%global rev_build_loop %{slowdebug_build} %{fastdebug_build} %{normal_build}
|
|
|
b6221f |
|
|
|
0f37e5 |
%if %{include_staticlibs}
|
|
|
0f37e5 |
%global staticlibs_loop %{staticlibs_suffix}
|
|
|
0f37e5 |
%else
|
|
|
0f37e5 |
%global staticlibs_loop %{nil}
|
|
|
0f37e5 |
%endif
|
|
|
0f37e5 |
|
|
|
2a959b |
%ifarch %{bootstrap_arches}
|
|
|
b6221f |
%global bootstrap_build 1
|
|
|
b6221f |
%else
|
|
|
b6221f |
%global bootstrap_build 1
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
%if %{bootstrap_build}
|
|
|
0f37e5 |
%global release_targets bootcycle-images docs-zip
|
|
|
b6221f |
%else
|
|
|
0f37e5 |
%global release_targets images docs-zip
|
|
|
b6221f |
%endif
|
|
|
b6221f |
# No docs nor bootcycle for debug builds
|
|
|
0f37e5 |
%global debug_targets images
|
|
|
0f37e5 |
|
|
|
0f37e5 |
%if %{include_staticlibs}
|
|
|
0f37e5 |
# Extra target for producing the static-libraries. Separate from
|
|
|
0f37e5 |
# other targets since this target is configured to use in-tree
|
|
|
0f37e5 |
# AWT dependencies: lcms, libjpeg, libpng, libharfbuzz, giflib
|
|
|
0f37e5 |
# and possibly others
|
|
|
0f37e5 |
%global static_libs_target static-libs-image
|
|
|
0f37e5 |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
|
|
|
b6221f |
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
|
|
|
b6221f |
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
|
|
|
b6221f |
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
|
|
|
b6221f |
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
|
|
|
b6221f |
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
|
|
|
b6221f |
%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||')
|
|
|
b6221f |
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
|
|
|
b6221f |
%global ourldflags %{__global_ldflags}
|
|
|
b6221f |
|
|
|
b6221f |
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
|
|
|
b6221f |
# the initialization must be here. Later the pkg-config have buggy behavior
|
|
|
b6221f |
# looks like openjdk RPM specific bug
|
|
|
b6221f |
# Always set this so the nss.cfg file is not broken
|
|
|
b6221f |
%global NSS_LIBDIR %(pkg-config --variable=libdir nss)
|
|
|
b6221f |
|
|
|
b6221f |
# In some cases, the arch used by the JDK does
|
|
|
b6221f |
# not match _arch.
|
|
|
b6221f |
# Also, in some cases, the machine name used by SystemTap
|
|
|
b6221f |
# does not match that given by _target_cpu
|
|
|
b6221f |
%ifarch x86_64
|
|
|
b6221f |
%global archinstall amd64
|
|
|
b6221f |
%global stapinstall x86_64
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch ppc
|
|
|
b6221f |
%global archinstall ppc
|
|
|
b6221f |
%global stapinstall powerpc
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch %{ppc64be}
|
|
|
b6221f |
%global archinstall ppc64
|
|
|
b6221f |
%global stapinstall powerpc
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch %{ppc64le}
|
|
|
b6221f |
%global archinstall ppc64le
|
|
|
b6221f |
%global stapinstall powerpc
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch %{ix86}
|
|
|
b6221f |
%global archinstall i686
|
|
|
b6221f |
%global stapinstall i386
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch ia64
|
|
|
b6221f |
%global archinstall ia64
|
|
|
b6221f |
%global stapinstall ia64
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch s390
|
|
|
b6221f |
%global archinstall s390
|
|
|
b6221f |
%global stapinstall s390
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch s390x
|
|
|
b6221f |
%global archinstall s390x
|
|
|
b6221f |
%global stapinstall s390
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch %{arm}
|
|
|
b6221f |
%global archinstall arm
|
|
|
b6221f |
%global stapinstall arm
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch %{aarch64}
|
|
|
b6221f |
%global archinstall aarch64
|
|
|
b6221f |
%global stapinstall arm64
|
|
|
b6221f |
%endif
|
|
|
b6221f |
# 32 bit sparc, optimized for v9
|
|
|
b6221f |
%ifarch sparcv9
|
|
|
b6221f |
%global archinstall sparc
|
|
|
b6221f |
%global stapinstall %{_target_cpu}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
# 64 bit sparc
|
|
|
b6221f |
%ifarch sparc64
|
|
|
b6221f |
%global archinstall sparcv9
|
|
|
b6221f |
%global stapinstall %{_target_cpu}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
# Need to support noarch for srpm build
|
|
|
b6221f |
%ifarch noarch
|
|
|
b6221f |
%global archinstall %{nil}
|
|
|
b6221f |
%global stapinstall %{nil}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2a959b |
%ifarch %{systemtap_arches}
|
|
|
b6221f |
%global with_systemtap 1
|
|
|
b6221f |
%else
|
|
|
b6221f |
%global with_systemtap 0
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
# New Version-String scheme-style defines
|
|
|
c3e128 |
%global featurever 11
|
|
|
c3e128 |
%global interimver 0
|
|
|
c3e128 |
%global updatever 10
|
|
|
c3e128 |
%global patchver 0
|
|
|
c3e128 |
# If you bump featurever, you must bump also vendor_version_string
|
|
|
2a959b |
# Used via new version scheme. JDK 11 was
|
|
|
2a959b |
# GA'ed in September 2018 => 18.9
|
|
|
2a959b |
%global vendor_version_string 18.9
|
|
|
c3e128 |
# buildjdkver is usually same as %%{featurever},
|
|
|
c3e128 |
# but in time of bootstrap of next jdk, it is featurever-1,
|
|
|
b6221f |
# and this it is better to change it here, on single place
|
|
|
c3e128 |
%global buildjdkver %{featurever}
|
|
|
b6221f |
# Add LTS designator for RHEL builds
|
|
|
b6221f |
%if 0%{?rhel}
|
|
|
b6221f |
%global lts_designator "LTS"
|
|
|
b6221f |
%global lts_designator_zip -%{lts_designator}
|
|
|
b6221f |
%else
|
|
|
b6221f |
%global lts_designator ""
|
|
|
b6221f |
%global lts_designator_zip ""
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
e543ba |
# Define vendor information used by OpenJDK
|
|
|
2a959b |
%global oj_vendor Red Hat, Inc.
|
|
|
82e2ee |
%global oj_vendor_url https://www.redhat.com/
|
|
|
2a959b |
# Define what url should JVM offer in case of a crash report
|
|
|
2a959b |
# order may be important, epel may have rhel declared
|
|
|
2a959b |
%if 0%{?epel}
|
|
|
2a959b |
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20EPEL&component=%{name}&version=epel%{epel}
|
|
|
2a959b |
%else
|
|
|
2a959b |
%if 0%{?fedora}
|
|
|
2a959b |
# Does not work for rawhide, keeps the version field empty
|
|
|
2a959b |
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}&version=%{fedora}
|
|
|
2a959b |
%else
|
|
|
2a959b |
%if 0%{?rhel}
|
|
|
2a959b |
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%20%{rhel}&component=%{name}
|
|
|
2a959b |
%else
|
|
|
2a959b |
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi
|
|
|
2a959b |
%endif
|
|
|
2a959b |
%endif
|
|
|
2a959b |
%endif
|
|
|
e543ba |
|
|
|
b6221f |
# Define IcedTea version used for SystemTap tapsets and desktop file
|
|
|
9ecdd5 |
%global icedteaver 6.0.0pre00-c848b93a8598
|
|
|
b6221f |
|
|
|
b6221f |
# Standard JPackage naming and versioning defines
|
|
|
b6221f |
%global origin openjdk
|
|
|
b6221f |
%global origin_nice OpenJDK
|
|
|
b6221f |
%global top_level_dir_name %{origin}
|
|
|
0f37e5 |
%global top_level_dir_name_backup %{top_level_dir_name}-backup
|
|
|
49ab4b |
%global buildver 9
|
|
|
82e2ee |
%global rpmrelease 10
|
|
|
3722af |
#%%global tagsuffix %%{nil}
|
|
|
c3e128 |
# 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
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
c3e128 |
# Using 10 digits may overflow the int used for priority, so we combine the patch and build versions
|
|
|
c3e128 |
# It is very unlikely we will ever have a patch version > 4 or a build version > 20, so we combine as (patch * 20) + build.
|
|
|
c3e128 |
# This means 11.0.9.0+11 would have had a priority of 11000911 as before
|
|
|
c3e128 |
# 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
|
|
|
c3e128 |
%global combiver $( expr 20 '*' %{patchver} + %{buildver} )
|
|
|
c3e128 |
%global priority %( printf '%02d%02d%02d%02d' %{featurever} %{interimver} %{updatever} %{combiver} )
|
|
|
b6221f |
%else
|
|
|
b6221f |
# for techpreview, using 1, so slowdebugs can have 0
|
|
|
b6221f |
%global priority %( printf '%08d' 1 )
|
|
|
b6221f |
%endif
|
|
|
c3e128 |
%global newjavaver %{featurever}.%{interimver}.%{updatever}.%{patchver}
|
|
|
b6221f |
|
|
|
c3e128 |
# Omit trailing 0 in filenames when the patch version is 0
|
|
|
c3e128 |
%if 0%{?patchver} > 0
|
|
|
c3e128 |
%global filever %{newjavaver}
|
|
|
c3e128 |
%else
|
|
|
c3e128 |
%global filever %{featurever}.%{interimver}.%{updatever}
|
|
|
c3e128 |
%endif
|
|
|
c3e128 |
|
|
|
c3e128 |
%global javaver %{featurever}
|
|
|
b6221f |
|
|
|
b6221f |
# Define milestone (EA for pre-releases, GA for releases)
|
|
|
b6221f |
# Release will be (where N is usually a number starting at 1):
|
|
|
b6221f |
# - 0.N%%{?extraver}%%{?dist} for EA releases,
|
|
|
b6221f |
# - N%%{?extraver}{?dist} for GA releases
|
|
|
49ab4b |
%global is_ga 1
|
|
|
b6221f |
%if %{is_ga}
|
|
|
b6221f |
%global ea_designator ""
|
|
|
b6221f |
%global ea_designator_zip ""
|
|
|
b6221f |
%global extraver %{nil}
|
|
|
b6221f |
%global eaprefix %{nil}
|
|
|
b6221f |
%else
|
|
|
b6221f |
%global ea_designator ea
|
|
|
b6221f |
%global ea_designator_zip -%{ea_designator}
|
|
|
b6221f |
%global extraver .%{ea_designator}
|
|
|
b6221f |
%global eaprefix 0.
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
# parametrized macros are order-sensitive
|
|
|
c3e128 |
%global compatiblename java-%{featurever}-%{origin}
|
|
|
b6221f |
%global fullversion %{compatiblename}-%{version}-%{release}
|
|
|
140246 |
# images directories from upstream build
|
|
|
140246 |
%global jdkimage jdk
|
|
|
140246 |
%global static_libs_image static-libs
|
|
|
b6221f |
# output dir stub
|
|
|
0f37e5 |
%define buildoutputdir() %{expand:build/jdk11.build%{?1}}
|
|
|
b6221f |
# we can copy the javadoc to not arched dir, or make it not noarch
|
|
|
b6221f |
%define uniquejavadocdir() %{expand:%{fullversion}.%{_arch}%{?1}}
|
|
|
b6221f |
# main id and dir of this jdk
|
|
|
b6221f |
%define uniquesuffix() %{expand:%{fullversion}.%{_arch}%{?1}}
|
|
|
b6221f |
|
|
|
b6221f |
#################################################################
|
|
|
b6221f |
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
|
|
|
b6221f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14
|
|
|
b6221f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1655938
|
|
|
b6221f |
%global _privatelibs libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsunec[.]so.*|libunpack[.]so.*|libzip[.]so.*
|
|
|
b6221f |
%global _publiclibs libjawt[.]so.*|libjava[.]so.*|libjvm[.]so.*|libverify[.]so.*|libjsig[.]so.*
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
%global __provides_exclude ^(%{_privatelibs})$
|
|
|
b6221f |
%global __requires_exclude ^(%{_privatelibs})$
|
|
|
b6221f |
# Never generate lib-style provides/requires for slowdebug packages
|
|
|
b6221f |
%global __provides_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
|
|
|
b6221f |
%global __requires_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
|
|
|
1d0aac |
%global __provides_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
|
|
|
1d0aac |
%global __requires_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
|
|
|
b6221f |
%else
|
|
|
b6221f |
# Don't generate provides/requires for JDK provided shared libraries at all.
|
|
|
b6221f |
%global __provides_exclude ^(%{_privatelibs}|%{_publiclibs})$
|
|
|
b6221f |
%global __requires_exclude ^(%{_privatelibs}|%{_publiclibs})$
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
|
|
|
b6221f |
%global etcjavasubdir %{_sysconfdir}/java/java-%{javaver}-%{origin}
|
|
|
b6221f |
%define etcjavadir() %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}}
|
|
|
b6221f |
# Standard JPackage directories and symbolic links.
|
|
|
b6221f |
%define sdkdir() %{expand:%{uniquesuffix -- %{?1}}}
|
|
|
b6221f |
%define jrelnk() %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%{?1}}
|
|
|
b6221f |
|
|
|
b6221f |
%define sdkbindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
|
|
|
b6221f |
%define jrebindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
|
|
|
b6221f |
|
|
|
2f6c9a |
%global alt_java_name alt-java
|
|
|
2f6c9a |
|
|
|
b6221f |
%global rpm_state_dir %{_localstatedir}/lib/rpm-state/
|
|
|
b6221f |
|
|
|
0531ea |
# For flatpack builds hard-code /usr/sbin/alternatives,
|
|
|
0531ea |
# otherwise use %%{_sbindir} relative path.
|
|
|
0531ea |
%if 0%{?flatpak}
|
|
|
0531ea |
%global alternatives_requires /usr/sbin/alternatives
|
|
|
0531ea |
%else
|
|
|
0531ea |
%global alternatives_requires %{_sbindir}/alternatives
|
|
|
0531ea |
%endif
|
|
|
0531ea |
|
|
|
b6221f |
%if %{with_systemtap}
|
|
|
b6221f |
# Where to install systemtap tapset (links)
|
|
|
b6221f |
# We would like these to be in a package specific sub-dir,
|
|
|
b6221f |
# but currently systemtap doesn't support that, so we have to
|
|
|
b6221f |
# use the root tapset dir for now. To distinguish between 64
|
|
|
b6221f |
# and 32 bit architectures we place the tapsets under the arch
|
|
|
b6221f |
# specific dir (note that systemtap will only pickup the tapset
|
|
|
b6221f |
# for the primary arch for now). Systemtap uses the machine name
|
|
|
b6221f |
# aka target_cpu as architecture specific directory name.
|
|
|
b6221f |
%global tapsetroot /usr/share/systemtap
|
|
|
b6221f |
%global tapsetdirttapset %{tapsetroot}/tapset/
|
|
|
b6221f |
%global tapsetdir %{tapsetdirttapset}/%{stapinstall}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
# not-duplicated scriptlets for normal/debug packages
|
|
|
b6221f |
%global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
b6221f |
|
|
|
b6221f |
|
|
|
b6221f |
%define post_script() %{expand:
|
|
|
b6221f |
update-desktop-database %{_datadir}/applications &> /dev/null || :
|
|
|
b6221f |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
b6221f |
exit 0
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
|
|
|
b6221f |
%define post_headless() %{expand:
|
|
|
2a959b |
%ifarch %{share_arches}
|
|
|
b6221f |
%{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
PRIORITY=%{priority}
|
|
|
b6221f |
if [ "%{?1}" == %{debug_suffix} ]; then
|
|
|
b6221f |
let PRIORITY=PRIORITY-1
|
|
|
b6221f |
fi
|
|
|
b6221f |
|
|
|
b6221f |
ext=.gz
|
|
|
b6221f |
alternatives \\
|
|
|
b6221f |
--install %{_bindir}/java java %{jrebindir -- %{?1}}/java $PRIORITY --family %{name}.%{_arch} \\
|
|
|
b6221f |
--slave %{_jvmdir}/jre jre %{_jvmdir}/%{sdkdir -- %{?1}} \\
|
|
|
2f6c9a |
--slave %{_bindir}/%{alt_java_name} %{alt_java_name} %{jrebindir -- %{?1}}/%{alt_java_name} \\
|
|
|
b6221f |
--slave %{_bindir}/jjs jjs %{jrebindir -- %{?1}}/jjs \\
|
|
|
b6221f |
--slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\
|
|
|
b6221f |
--slave %{_bindir}/pack200 pack200 %{jrebindir -- %{?1}}/pack200 \\
|
|
|
b6221f |
--slave %{_bindir}/rmid rmid %{jrebindir -- %{?1}}/rmid \\
|
|
|
b6221f |
--slave %{_bindir}/rmiregistry rmiregistry %{jrebindir -- %{?1}}/rmiregistry \\
|
|
|
b6221f |
--slave %{_bindir}/unpack200 unpack200 %{jrebindir -- %{?1}}/unpack200 \\
|
|
|
b6221f |
--slave %{_mandir}/man1/java.1$ext java.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
2f6c9a |
--slave %{_mandir}/man1/%{alt_java_name}.1$ext %{alt_java_name}.1$ext \\
|
|
|
2f6c9a |
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1$ext
|
|
|
b6221f |
|
|
|
b6221f |
for X in %{origin} %{javaver} ; do
|
|
|
b6221f |
alternatives --install %{_jvmdir}/jre-"$X" jre_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
|
|
|
b6221f |
done
|
|
|
b6221f |
|
|
|
b6221f |
update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY --family %{name}.%{_arch}
|
|
|
b6221f |
|
|
|
b6221f |
|
|
|
b6221f |
update-desktop-database %{_datadir}/applications &> /dev/null || :
|
|
|
b6221f |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
b6221f |
|
|
|
b6221f |
# see pretrans where this file is declared
|
|
|
b6221f |
# also see that pretrans is only for non-debug
|
|
|
b6221f |
if [ ! "%{?1}" == %{debug_suffix} ]; then
|
|
|
b6221f |
if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then
|
|
|
b6221f |
sh %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch} %{_jvmdir}/%{sdkdir -- %{?1}}
|
|
|
b6221f |
fi
|
|
|
b6221f |
fi
|
|
|
b6221f |
|
|
|
b6221f |
exit 0
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define postun_script() %{expand:
|
|
|
b6221f |
update-desktop-database %{_datadir}/applications &> /dev/null || :
|
|
|
b6221f |
if [ $1 -eq 0 ] ; then
|
|
|
b6221f |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
|
|
b6221f |
%{update_desktop_icons}
|
|
|
b6221f |
fi
|
|
|
b6221f |
exit 0
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
|
|
|
b6221f |
%define postun_headless() %{expand:
|
|
|
b6221f |
alternatives --remove java %{jrebindir -- %{?1}}/java
|
|
|
b6221f |
alternatives --remove jre_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
|
|
|
b6221f |
alternatives --remove jre_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}}
|
|
|
b6221f |
alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}}
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define posttrans_script() %{expand:
|
|
|
b6221f |
%{update_desktop_icons}
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define post_devel() %{expand:
|
|
|
b6221f |
|
|
|
b6221f |
PRIORITY=%{priority}
|
|
|
b6221f |
if [ "%{?1}" == %{debug_suffix} ]; then
|
|
|
b6221f |
let PRIORITY=PRIORITY-1
|
|
|
b6221f |
fi
|
|
|
b6221f |
|
|
|
b6221f |
ext=.gz
|
|
|
b6221f |
alternatives \\
|
|
|
b6221f |
--install %{_bindir}/javac javac %{sdkbindir -- %{?1}}/javac $PRIORITY --family %{name}.%{_arch} \\
|
|
|
b6221f |
--slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir -- %{?1}} \\
|
|
|
b6221f |
%ifarch %{aot_arches}
|
|
|
b6221f |
--slave %{_bindir}/jaotc jaotc %{sdkbindir -- %{?1}}/jaotc \\
|
|
|
b6221f |
%endif
|
|
|
b6221f |
--slave %{_bindir}/jlink jlink %{sdkbindir -- %{?1}}/jlink \\
|
|
|
b6221f |
--slave %{_bindir}/jmod jmod %{sdkbindir -- %{?1}}/jmod \\
|
|
|
2a959b |
%ifarch %{sa_arches}
|
|
|
b6221f |
--slave %{_bindir}/jhsdb jhsdb %{sdkbindir -- %{?1}}/jhsdb \\
|
|
|
b6221f |
%endif
|
|
|
b6221f |
--slave %{_bindir}/jar jar %{sdkbindir -- %{?1}}/jar \\
|
|
|
b6221f |
--slave %{_bindir}/jarsigner jarsigner %{sdkbindir -- %{?1}}/jarsigner \\
|
|
|
b6221f |
--slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\
|
|
|
b6221f |
--slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\
|
|
|
b6221f |
--slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\
|
|
|
b6221f |
--slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\
|
|
|
b6221f |
--slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\
|
|
|
b6221f |
--slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\
|
|
|
b6221f |
--slave %{_bindir}/jdeprscan jdeprscan %{sdkbindir -- %{?1}}/jdeprscan \\
|
|
|
b6221f |
--slave %{_bindir}/jfr jfr %{sdkbindir -- %{?1}}/jfr \\
|
|
|
b6221f |
--slave %{_bindir}/jimage jimage %{sdkbindir -- %{?1}}/jimage \\
|
|
|
b6221f |
--slave %{_bindir}/jinfo jinfo %{sdkbindir -- %{?1}}/jinfo \\
|
|
|
b6221f |
--slave %{_bindir}/jmap jmap %{sdkbindir -- %{?1}}/jmap \\
|
|
|
b6221f |
--slave %{_bindir}/jps jps %{sdkbindir -- %{?1}}/jps \\
|
|
|
b6221f |
--slave %{_bindir}/jrunscript jrunscript %{sdkbindir -- %{?1}}/jrunscript \\
|
|
|
b6221f |
--slave %{_bindir}/jshell jshell %{sdkbindir -- %{?1}}/jshell \\
|
|
|
b6221f |
--slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\
|
|
|
b6221f |
--slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\
|
|
|
b6221f |
--slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\
|
|
|
b6221f |
--slave %{_bindir}/rmic rmic %{sdkbindir -- %{?1}}/rmic \\
|
|
|
b6221f |
--slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jar.1$ext jar.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/javac.1$ext javac.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/javap.1$ext javap.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jps.1$ext jps.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
--slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\
|
|
|
b6221f |
%{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1$ext \\
|
|
|
b6221f |
|
|
|
b6221f |
for X in %{origin} %{javaver} ; do
|
|
|
b6221f |
alternatives \\
|
|
|
b6221f |
--install %{_jvmdir}/java-"$X" java_sdk_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
|
|
|
b6221f |
done
|
|
|
b6221f |
|
|
|
b6221f |
update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
|
|
|
b6221f |
|
|
|
b6221f |
update-desktop-database %{_datadir}/applications &> /dev/null || :
|
|
|
b6221f |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
|
|
b6221f |
|
|
|
b6221f |
exit 0
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define postun_devel() %{expand:
|
|
|
b6221f |
alternatives --remove javac %{sdkbindir -- %{?1}}/javac
|
|
|
b6221f |
alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
|
|
|
b6221f |
alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}}
|
|
|
b6221f |
alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
|
|
|
b6221f |
|
|
|
b6221f |
update-desktop-database %{_datadir}/applications &> /dev/null || :
|
|
|
b6221f |
|
|
|
b6221f |
if [ $1 -eq 0 ] ; then
|
|
|
b6221f |
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
|
|
b6221f |
%{update_desktop_icons}
|
|
|
b6221f |
fi
|
|
|
b6221f |
exit 0
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define posttrans_devel() %{expand:
|
|
|
b6221f |
%{update_desktop_icons}
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define post_javadoc() %{expand:
|
|
|
b6221f |
|
|
|
b6221f |
PRIORITY=%{priority}
|
|
|
b6221f |
if [ "%{?1}" == %{debug_suffix} ]; then
|
|
|
b6221f |
let PRIORITY=PRIORITY-1
|
|
|
b6221f |
fi
|
|
|
b6221f |
|
|
|
b6221f |
alternatives \\
|
|
|
b6221f |
--install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api \\
|
|
|
b6221f |
$PRIORITY --family %{name}
|
|
|
b6221f |
exit 0
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define postun_javadoc() %{expand:
|
|
|
b6221f |
alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api
|
|
|
b6221f |
exit 0
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define post_javadoc_zip() %{expand:
|
|
|
b6221f |
|
|
|
b6221f |
PRIORITY=%{priority}
|
|
|
b6221f |
if [ "%{?1}" == %{debug_suffix} ]; then
|
|
|
b6221f |
let PRIORITY=PRIORITY-1
|
|
|
b6221f |
fi
|
|
|
b6221f |
|
|
|
b6221f |
alternatives \\
|
|
|
b6221f |
--install %{_javadocdir}/java-zip javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip \\
|
|
|
b6221f |
$PRIORITY --family %{name}
|
|
|
b6221f |
exit 0
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define postun_javadoc_zip() %{expand:
|
|
|
b6221f |
alternatives --remove javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
|
|
|
b6221f |
exit 0
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define files_jre() %{expand:
|
|
|
b6221f |
%{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}-%{origin}.png
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsplashscreen.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt_xawt.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjawt.so
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
|
|
|
b6221f |
%define files_jre_headless() %{expand:
|
|
|
b6221f |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
|
|
|
2a265a |
%doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/NEWS
|
|
|
b6221f |
%dir %{_sysconfdir}/.java/.systemPrefs
|
|
|
b6221f |
%dir %{_sysconfdir}/.java
|
|
|
b6221f |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/release
|
|
|
b6221f |
%{_jvmdir}/%{jrelnk -- %{?1}}
|
|
|
b6221f |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/java
|
|
|
2f6c9a |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/%{alt_java_name}
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jjs
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/pack200
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmid
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/unpack200
|
|
|
b6221f |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
|
|
|
b6221f |
%ifarch %{jit_arches}
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/classlist
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jspawnhelper
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jrt-fs.jar
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/modules
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/psfont.properties.ja
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/psfontj2d.properties
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/tzdb.dat
|
|
|
b6221f |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jli
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jli/libjli.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jvm.cfg
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libattach.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libextnet.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsig.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt_headless.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libdt_socket.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libfontmanager.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libinstrument.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2gss.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2pcsc.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2pkcs11.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjaas.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjava.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjavajpeg.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjdwp.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjimage.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsound.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/liblcms.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_agent.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_ext.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmlib_image.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libnet.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libnio.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libprefs.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/librmi.so
|
|
|
2a959b |
# Some architectures don't have the serviceability agent
|
|
|
2a959b |
%ifarch %{sa_arches}
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsaproc.so
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsctp.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsunec.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libunpack.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libverify.so
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libzip.so
|
|
|
b6221f |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/default.jfc
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/profile.jfc
|
|
|
b6221f |
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
|
|
|
2f6c9a |
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/
|
|
|
2a959b |
%ifarch %{share_arches}
|
|
|
b6221f |
%attr(444, root, root) %ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/classes.jsa
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%dir %{etcjavasubdir}
|
|
|
b6221f |
%dir %{etcjavadir -- %{?1}}
|
|
|
b6221f |
%dir %{etcjavadir -- %{?1}}/lib
|
|
|
b6221f |
%dir %{etcjavadir -- %{?1}}/lib/security
|
|
|
b6221f |
%{etcjavadir -- %{?1}}/lib/security/cacerts
|
|
|
b6221f |
%dir %{etcjavadir -- %{?1}}/conf
|
|
|
b6221f |
%dir %{etcjavadir -- %{?1}}/conf/management
|
|
|
b6221f |
%dir %{etcjavadir -- %{?1}}/conf/security
|
|
|
b6221f |
%dir %{etcjavadir -- %{?1}}/conf/security/policy
|
|
|
b6221f |
%dir %{etcjavadir -- %{?1}}/conf/security/policy/limited
|
|
|
b6221f |
%dir %{etcjavadir -- %{?1}}/conf/security/policy/unlimited
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/default.policy
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/blacklisted.certs
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/public_suffix_list.dat
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/limited/exempt_local.policy
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/limited/default_local.policy
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/limited/default_US_export.policy
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/unlimited/default_local.policy
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/unlimited/default_US_export.policy
|
|
|
b6221f |
%{etcjavadir -- %{?1}}/conf/security/policy/README.txt
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.policy
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.security
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/logging.properties
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/nss.cfg
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/nss.fips.cfg
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/jmxremote.access
|
|
|
b6221f |
# this is conifg template, thus not config-noreplace
|
|
|
b6221f |
%config %{etcjavadir -- %{?1}}/conf/management/jmxremote.password.template
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/management.properties
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/net.properties
|
|
|
b6221f |
%config(noreplace) %{etcjavadir -- %{?1}}/conf/sound.properties
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/conf
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/security
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
%if %{is_release_build -- %{?1}}
|
|
|
b6221f |
%ghost %{_bindir}/java
|
|
|
2f6c9a |
%ghost %{_bindir}/%{alt_java_name}
|
|
|
b6221f |
%ghost %{_jvmdir}/jre
|
|
|
b6221f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1312019
|
|
|
b6221f |
%ghost %{_bindir}/jjs
|
|
|
b6221f |
%ghost %{_bindir}/keytool
|
|
|
b6221f |
%ghost %{_bindir}/pack200
|
|
|
b6221f |
%ghost %{_bindir}/rmid
|
|
|
b6221f |
%ghost %{_bindir}/rmiregistry
|
|
|
b6221f |
%ghost %{_bindir}/unpack200
|
|
|
b6221f |
%ghost %{_jvmdir}/jre-%{origin}
|
|
|
b6221f |
%ghost %{_jvmdir}/jre-%{javaver}
|
|
|
b6221f |
%ghost %{_jvmdir}/jre-%{javaver}-%{origin}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%endif
|
|
|
2f6c9a |
# https://bugzilla.redhat.com/show_bug.cgi?id=1820172
|
|
|
2f6c9a |
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
|
|
|
2f6c9a |
%ghost %{_jvmdir}/%{sdkdir -- %{?1}}/conf.rpmmoved
|
|
|
2f6c9a |
%ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/security.rpmmoved
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define files_devel() %{expand:
|
|
|
b6221f |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jar
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jarsigner
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javac
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeprscan
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jfr
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jimage
|
|
|
2a959b |
# Some architectures don't have the serviceability agent
|
|
|
2a959b |
%ifarch %{sa_arches}
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jhsdb
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jinfo
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jlink
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmap
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmod
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jps
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jrunscript
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jshell
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmic
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
|
|
|
b6221f |
%ifarch %{aot_arches}
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jaotc
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/include
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
|
|
|
b6221f |
%if %{with_systemtap}
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/tapset
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%{_datadir}/applications/*jconsole%{?1}.desktop
|
|
|
b6221f |
%{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1*
|
|
|
b6221f |
%if %{with_systemtap}
|
|
|
b6221f |
%dir %{tapsetroot}
|
|
|
b6221f |
%dir %{tapsetdirttapset}
|
|
|
b6221f |
%dir %{tapsetdir}
|
|
|
b6221f |
%{tapsetdir}/*%{_arch}%{?1}.stp
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
%if %{is_release_build -- %{?1}}
|
|
|
b6221f |
%ghost %{_bindir}/javac
|
|
|
b6221f |
%ghost %{_jvmdir}/java
|
|
|
2f6c9a |
%ghost %{_jvmdir}/%{alt_java_name}
|
|
|
b6221f |
%ghost %{_bindir}/jaotc
|
|
|
b6221f |
%ghost %{_bindir}/jlink
|
|
|
b6221f |
%ghost %{_bindir}/jmod
|
|
|
b6221f |
%ghost %{_bindir}/jhsdb
|
|
|
b6221f |
%ghost %{_bindir}/jar
|
|
|
b6221f |
%ghost %{_bindir}/jarsigner
|
|
|
b6221f |
%ghost %{_bindir}/javadoc
|
|
|
b6221f |
%ghost %{_bindir}/javap
|
|
|
b6221f |
%ghost %{_bindir}/jcmd
|
|
|
b6221f |
%ghost %{_bindir}/jconsole
|
|
|
b6221f |
%ghost %{_bindir}/jdb
|
|
|
b6221f |
%ghost %{_bindir}/jdeps
|
|
|
b6221f |
%ghost %{_bindir}/jdeprscan
|
|
|
b6221f |
%ghost %{_bindir}/jimage
|
|
|
b6221f |
%ghost %{_bindir}/jinfo
|
|
|
b6221f |
%ghost %{_bindir}/jmap
|
|
|
b6221f |
%ghost %{_bindir}/jps
|
|
|
b6221f |
%ghost %{_bindir}/jrunscript
|
|
|
b6221f |
%ghost %{_bindir}/jshell
|
|
|
b6221f |
%ghost %{_bindir}/jstack
|
|
|
b6221f |
%ghost %{_bindir}/jstat
|
|
|
b6221f |
%ghost %{_bindir}/jstatd
|
|
|
b6221f |
%ghost %{_bindir}/rmic
|
|
|
b6221f |
%ghost %{_bindir}/serialver
|
|
|
b6221f |
%ghost %{_jvmdir}/java-%{origin}
|
|
|
b6221f |
%ghost %{_jvmdir}/java-%{javaver}
|
|
|
b6221f |
%ghost %{_jvmdir}/java-%{javaver}-%{origin}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define files_jmods() %{expand:
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/jmods
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define files_demo() %{expand:
|
|
|
b6221f |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/demo
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/sample
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define files_src() %{expand:
|
|
|
b6221f |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
|
|
|
b6221f |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/src.zip
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
140246 |
%define files_static_libs() %{expand:
|
|
|
2a959b |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/static
|
|
|
2a959b |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/static/linux-%{archinstall}
|
|
|
2a959b |
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/static/linux-%{archinstall}/glibc
|
|
|
2a959b |
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/static/linux-%{archinstall}/glibc/lib*.a
|
|
|
140246 |
}
|
|
|
140246 |
|
|
|
b6221f |
%define files_javadoc() %{expand:
|
|
|
b6221f |
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
|
|
|
edff69 |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
%if %{is_release_build -- %{?1}}
|
|
|
b6221f |
%ghost %{_javadocdir}/java
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define files_javadoc_zip() %{expand:
|
|
|
b6221f |
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
|
|
|
edff69 |
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
%if %{is_release_build -- %{?1}}
|
|
|
b6221f |
%ghost %{_javadocdir}/java-zip
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
# not-duplicated requires/provides/obsoletes for normal/debug packages
|
|
|
b6221f |
%define java_rpo() %{expand:
|
|
|
b6221f |
Requires: fontconfig%{?_isa}
|
|
|
b6221f |
Requires: xorg-x11-fonts-Type1
|
|
|
b6221f |
# Require libXcomposite explicitly since it's only dynamically loaded
|
|
|
b6221f |
# at runtime. Fixes screenshot issues. See JDK-8150954.
|
|
|
b6221f |
Requires: libXcomposite%{?_isa}
|
|
|
b6221f |
# Requires rest of java
|
|
|
b6221f |
Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
# for java-X-openjdk package's desktop binding
|
|
|
b6221f |
%if 0%{?rhel} >= 8
|
|
|
b6221f |
Recommends: gtk3%{?_isa}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
Provides: java-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
|
|
|
b6221f |
# Standard JPackage base provides
|
|
|
b6221f |
Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: jre-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: jre%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define java_headless_rpo() %{expand:
|
|
|
b6221f |
# Require /etc/pki/java/cacerts
|
|
|
b6221f |
Requires: ca-certificates
|
|
|
b6221f |
# Require javapackages-filesystem for ownership of /usr/lib/jvm/ and macros
|
|
|
b6221f |
Requires: javapackages-filesystem
|
|
|
b6221f |
# Require zone-info data provided by tzdata-java sub-package
|
|
|
2a959b |
# 2020b required as of JDK-8254177 in October CPU
|
|
|
c3e128 |
Requires: tzdata-java >= 2020b
|
|
|
140246 |
# for support of kernel stream control
|
|
|
b6221f |
# libsctp.so.1 is being `dlopen`ed on demand
|
|
|
b6221f |
Requires: lksctp-tools%{?_isa}
|
|
|
b6221f |
# tool to copy jdk's configs - should be Recommends only, but then only dnf/yum enforce it,
|
|
|
b6221f |
# not rpm transaction and so no configs are persisted when pure rpm -u is run. It may be
|
|
|
b6221f |
# considered as regression
|
|
|
b6221f |
Requires: copy-jdk-configs >= 3.3
|
|
|
b6221f |
OrderWithRequires: copy-jdk-configs
|
|
|
b6221f |
# for printing support
|
|
|
b6221f |
Requires: cups-libs
|
|
|
49ab4b |
# for FIPS PKCS11 provider
|
|
|
49ab4b |
Requires: nss
|
|
|
b6221f |
# Post requires alternatives to install tool alternatives
|
|
|
0531ea |
Requires(post): %{alternatives_requires}
|
|
|
b6221f |
# in version 1.7 and higher for --family switch
|
|
|
b6221f |
Requires(post): chkconfig >= 1.7
|
|
|
b6221f |
# Postun requires alternatives to uninstall tool alternatives
|
|
|
0531ea |
Requires(postun): %{alternatives_requires}
|
|
|
b6221f |
# in version 1.7 and higher for --family switch
|
|
|
b6221f |
Requires(postun): chkconfig >= 1.7
|
|
|
b6221f |
# for optional support of kernel stream control, card reader and printing bindings
|
|
|
b6221f |
%if 0%{?rhel} >= 8
|
|
|
b6221f |
Suggests: lksctp-tools%{?_isa}, pcsc-lite-devel%{?_isa}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
# Standard JPackage base provides
|
|
|
b6221f |
Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
Provides: java-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: jre-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define java_devel_rpo() %{expand:
|
|
|
b6221f |
# Requires base package
|
|
|
b6221f |
Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
# Post requires alternatives to install tool alternatives
|
|
|
0531ea |
Requires(post): %{alternatives_requires}
|
|
|
b6221f |
# in version 1.7 and higher for --family switch
|
|
|
b6221f |
Requires(post): chkconfig >= 1.7
|
|
|
b6221f |
# Postun requires alternatives to uninstall tool alternatives
|
|
|
0531ea |
Requires(postun): %{alternatives_requires}
|
|
|
b6221f |
# in version 1.7 and higher for --family switch
|
|
|
b6221f |
Requires(postun): chkconfig >= 1.7
|
|
|
b6221f |
|
|
|
b6221f |
# Standard JPackage devel provides
|
|
|
b6221f |
Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-%{javaver}-%{origin}-devel%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
Provides: java-devel-%{origin}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-devel%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-sdk%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
140246 |
%define java_static_libs_rpo() %{expand:
|
|
|
140246 |
Requires: %{name}-devel%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
140246 |
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
140246 |
}
|
|
|
140246 |
|
|
|
b6221f |
%define java_jmods_rpo() %{expand:
|
|
|
b6221f |
# Requires devel package
|
|
|
b6221f |
# as jmods are bytecode, they should be OK without any _isa
|
|
|
b6221f |
Requires: %{name}-devel%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
|
|
|
b6221f |
Provides: java-%{javaver}-jmods%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-%{javaver}-%{origin}-jmods%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
Provides: java-jmods%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define java_demo_rpo() %{expand:
|
|
|
b6221f |
Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
|
|
|
b6221f |
Provides: java-%{javaver}-demo%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-%{javaver}-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
Provides: java-demo%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define java_javadoc_rpo() %{expand:
|
|
|
b6221f |
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
# Post requires alternatives to install javadoc alternative
|
|
|
0531ea |
Requires(post): %{alternatives_requires}
|
|
|
b6221f |
# in version 1.7 and higher for --family switch
|
|
|
b6221f |
Requires(post): chkconfig >= 1.7
|
|
|
b6221f |
# Postun requires alternatives to uninstall javadoc alternative
|
|
|
0531ea |
Requires(postun): %{alternatives_requires}
|
|
|
b6221f |
# in version 1.7 and higher for --family switch
|
|
|
b6221f |
Requires(postun): chkconfig >= 1.7
|
|
|
b6221f |
|
|
|
b6221f |
# Standard JPackage javadoc provides
|
|
|
b6221f |
Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-%{javaver}-%{origin}-javadoc%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
Provides: java-javadoc%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
%define java_src_rpo() %{expand:
|
|
|
b6221f |
Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
|
|
|
b6221f |
# Standard JPackage sources provides
|
|
|
b6221f |
Provides: java-%{javaver}-src%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
Provides: java-%{javaver}-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%if %is_system_jdk
|
|
|
b6221f |
Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
}
|
|
|
b6221f |
|
|
|
b6221f |
# Prevent brp-java-repack-jars from being run
|
|
|
b6221f |
%global __jar_repack 0
|
|
|
b6221f |
|
|
|
b6221f |
Name: java-%{javaver}-%{origin}
|
|
|
b6221f |
Version: %{newjavaver}.%{buildver}
|
|
|
b6221f |
Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
|
|
|
b6221f |
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
|
|
|
b6221f |
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
|
|
|
b6221f |
# also included the epoch in their virtual provides. This created a
|
|
|
b6221f |
# situation where in-the-wild java-1.5.0-ibm packages provided "java =
|
|
|
b6221f |
# 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
|
|
|
b6221f |
# interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
|
|
|
b6221f |
# satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
|
|
|
b6221f |
# JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
|
|
|
b6221f |
# provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
|
|
|
b6221f |
|
|
|
b6221f |
Epoch: 1
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Runtime Environment
|
|
|
b6221f |
Group: Development/Languages
|
|
|
b6221f |
|
|
|
b6221f |
# HotSpot code is licensed under GPLv2
|
|
|
b6221f |
# JDK library code is licensed under GPLv2 with the Classpath exception
|
|
|
b6221f |
# The Apache license is used in code taken from Apache projects (primarily xalan & xerces)
|
|
|
b6221f |
# DOM levels 2 & 3 and the XML digital signature schemas are licensed under the W3C Software License
|
|
|
b6221f |
# The JSR166 concurrency code is in the public domain
|
|
|
b6221f |
# The BSD and MIT licenses are used for a number of third-party libraries (see ADDITIONAL_LICENSE_INFO)
|
|
|
b6221f |
# The OpenJDK source tree includes:
|
|
|
b6221f |
# - JPEG library (IJG), zlib & libpng (zlib), giflib (MIT), harfbuzz (ISC),
|
|
|
b6221f |
# - freetype (FTL), jline (BSD) and LCMS (MIT)
|
|
|
b6221f |
# - jquery (MIT), jdk.crypto.cryptoki PKCS 11 wrapper (RSA)
|
|
|
b6221f |
# - public_suffix_list.dat from publicsuffix.org (MPLv2.0)
|
|
|
b6221f |
# The test code includes copies of NSS under the Mozilla Public License v2.0
|
|
|
b6221f |
# The PCSClite headers are under a BSD with advertising license
|
|
|
b6221f |
# The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version
|
|
|
b6221f |
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
|
|
|
b6221f |
URL: http://openjdk.java.net/
|
|
|
b6221f |
|
|
|
b6221f |
|
|
|
b6221f |
# to regenerate source0 (jdk) run update_package.sh
|
|
|
b6221f |
# update_package.sh contains hard-coded repos, revisions, tags, and projects to regenerate the source archives
|
|
|
c3e128 |
Source0: jdk-updates-jdk%{featurever}u-jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}}-4curve.tar.xz
|
|
|
b6221f |
|
|
|
b6221f |
# Use 'icedtea_sync.sh' to update the following
|
|
|
9ecdd5 |
# They are based on code contained in the IcedTea project (6.x).
|
|
|
b6221f |
# Systemtap tapsets. Zipped up to keep it small.
|
|
|
b6221f |
Source8: tapsets-icedtea-%{icedteaver}.tar.xz
|
|
|
b6221f |
|
|
|
b6221f |
# Desktop files. Adapted from IcedTea
|
|
|
b6221f |
Source9: jconsole.desktop.in
|
|
|
b6221f |
|
|
|
2a265a |
# Release notes
|
|
|
2a265a |
Source10: NEWS
|
|
|
2a265a |
|
|
|
b6221f |
# nss configuration file
|
|
|
b6221f |
Source11: nss.cfg.in
|
|
|
b6221f |
|
|
|
b6221f |
# Removed libraries that we link instead
|
|
|
b6221f |
Source12: remove-intree-libraries.sh
|
|
|
b6221f |
|
|
|
b6221f |
# Ensure we aren't using the limited crypto policy
|
|
|
b6221f |
Source13: TestCryptoLevel.java
|
|
|
b6221f |
|
|
|
b6221f |
# Ensure ECDSA is working
|
|
|
b6221f |
Source14: TestECDSA.java
|
|
|
b6221f |
|
|
|
b6221f |
# nss fips configuration file
|
|
|
b6221f |
Source15: nss.fips.cfg.in
|
|
|
b6221f |
|
|
|
e543ba |
# Ensure vendor settings are correct
|
|
|
e543ba |
Source16: CheckVendor.java
|
|
|
e543ba |
|
|
|
b6221f |
############################################
|
|
|
b6221f |
#
|
|
|
b6221f |
# RPM/distribution specific patches
|
|
|
b6221f |
#
|
|
|
b6221f |
############################################
|
|
|
b6221f |
|
|
|
b6221f |
# Ignore AWTError when assistive technologies are loaded
|
|
|
b6221f |
Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
|
|
|
b6221f |
# Restrict access to java-atk-wrapper classes
|
|
|
b6221f |
Patch2: rh1648644-java_access_bridge_privileged_security.patch
|
|
|
b6221f |
# NSS via SunPKCS11 Provider (disabled due to memory leak).
|
|
|
b6221f |
Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
|
|
|
c3e128 |
# enable build of speculative store bypass hardened alt-java
|
|
|
c3e128 |
Patch600: rh1750419-redhat_alt_java.patch
|
|
|
1d0aac |
# RH1582504: Use RSA as default for keytool, as DSA is disabled in all crypto policies except LEGACY
|
|
|
1d0aac |
Patch1003: rh1842572-rsa_default_for_keytool.patch
|
|
|
1d0aac |
|
|
|
1d0aac |
# FIPS support patches
|
|
|
b6221f |
# RH1655466: Support RHEL FIPS mode using SunPKCS11 provider
|
|
|
b6221f |
Patch1001: rh1655466-global_crypto_and_fips.patch
|
|
|
140246 |
# RH1818909: No ciphersuites availale for SSLSocket in FIPS mode
|
|
|
140246 |
Patch1002: rh1818909-fips_default_keystore_type.patch
|
|
|
e543ba |
# RH1860986: Disable TLSv1.3 with the NSS-FIPS provider until PKCS#11 v3.0 support is available
|
|
|
e543ba |
Patch1004: rh1860986-disable_tlsv1.3_in_fips_mode.patch
|
|
|
b9837d |
# RH1868740: FIPS: IllegalAccessException by pkcs11 provider
|
|
|
b9837d |
Patch1005: rh1868740-cryptoki_access_to_sunjce.patch
|
|
|
2a959b |
# RH1883849: FIPS: IllegalAccessException by pkcs11 provider with security manager on
|
|
|
2a959b |
Patch1006: rh1883849-cryptoki_access_to_sunjce_with_security_manager.patch
|
|
|
1d0aac |
# RH1915071: Always initialise JavaSecuritySystemConfiguratorAccess
|
|
|
1d0aac |
Patch1007: rh1915071-always_initialise_configurator_access.patch
|
|
|
b6221f |
|
|
|
b6221f |
#############################################
|
|
|
b6221f |
#
|
|
|
b6221f |
# Shenandoah specific patches
|
|
|
b6221f |
#
|
|
|
b6221f |
#############################################
|
|
|
b6221f |
|
|
|
b6221f |
# Currently empty
|
|
|
b6221f |
|
|
|
b6221f |
#############################################
|
|
|
b6221f |
#
|
|
|
b6221f |
# Upstreamable patches
|
|
|
b6221f |
#
|
|
|
b6221f |
# This section includes patches which need to
|
|
|
b6221f |
# be reviewed & pushed to the current development
|
|
|
b6221f |
# tree of OpenJDK.
|
|
|
b6221f |
#############################################
|
|
|
b6221f |
|
|
|
b6221f |
Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch
|
|
|
b6221f |
# PR3694, RH1340845: Add security.useSystemPropertiesFile option to java.security to use system crypto policy
|
|
|
b6221f |
Patch4: pr3694-rh1340845-support_fedora_rhel_system_crypto_policy.patch
|
|
|
b6221f |
# PR3695: Allow use of system crypto policy to be disabled by the user
|
|
|
b6221f |
Patch7: pr3695-toggle_system_crypto_policy.patch
|
|
|
b9837d |
# RH1868754: FIPS: Ciphers remain in broken state (unusable), after being supplied with wrongly sized buffer
|
|
|
b9837d |
Patch11: rh1868754-pkcs11_cancel_on_failure.patch
|
|
|
e543ba |
|
|
|
e543ba |
#############################################
|
|
|
e543ba |
#
|
|
|
2a959b |
# Patches appearing in 11.0.10
|
|
|
e543ba |
#
|
|
|
e543ba |
# This section includes patches which are present
|
|
|
e543ba |
# in the listed OpenJDK 11u release and should be
|
|
|
e543ba |
# able to be removed once that release is out
|
|
|
e543ba |
# and used by this RPM.
|
|
|
e543ba |
#############################################
|
|
|
b6221f |
|
|
|
b6221f |
BuildRequires: autoconf
|
|
|
b6221f |
BuildRequires: automake
|
|
|
b6221f |
BuildRequires: alsa-lib-devel
|
|
|
b6221f |
BuildRequires: binutils
|
|
|
b6221f |
BuildRequires: cups-devel
|
|
|
b6221f |
BuildRequires: desktop-file-utils
|
|
|
b6221f |
# elfutils only are OK for build without AOT
|
|
|
b6221f |
BuildRequires: elfutils-devel
|
|
|
b6221f |
BuildRequires: fontconfig-devel
|
|
|
b6221f |
BuildRequires: freetype-devel
|
|
|
b6221f |
BuildRequires: giflib-devel
|
|
|
b6221f |
BuildRequires: gcc-c++
|
|
|
b6221f |
BuildRequires: gdb
|
|
|
c3e128 |
BuildRequires: harfbuzz-devel
|
|
|
b6221f |
BuildRequires: lcms2-devel
|
|
|
b6221f |
BuildRequires: libjpeg-devel
|
|
|
b6221f |
BuildRequires: libpng-devel
|
|
|
b6221f |
BuildRequires: libxslt
|
|
|
b6221f |
BuildRequires: libX11-devel
|
|
|
b6221f |
BuildRequires: libXi-devel
|
|
|
b6221f |
BuildRequires: libXinerama-devel
|
|
|
b6221f |
BuildRequires: libXrandr-devel
|
|
|
b6221f |
BuildRequires: libXrender-devel
|
|
|
b6221f |
BuildRequires: libXt-devel
|
|
|
b6221f |
BuildRequires: libXtst-devel
|
|
|
b6221f |
# Requirements for setting up the nss.cfg
|
|
|
b6221f |
BuildRequires: nss-devel
|
|
|
b6221f |
BuildRequires: pkgconfig
|
|
|
b6221f |
BuildRequires: xorg-x11-proto-devel
|
|
|
b6221f |
BuildRequires: zip
|
|
|
b6221f |
BuildRequires: unzip
|
|
|
b6221f |
BuildRequires: javapackages-filesystem
|
|
|
b6221f |
BuildRequires: java-%{buildjdkver}-openjdk-devel
|
|
|
b6221f |
# Zero-assembler build requirement
|
|
|
b6221f |
%ifnarch %{jit_arches}
|
|
|
b6221f |
BuildRequires: libffi-devel
|
|
|
b6221f |
%endif
|
|
|
2a959b |
# 2020b required as of JDK-8254177 in October CPU
|
|
|
c3e128 |
BuildRequires: tzdata-java >= 2020b
|
|
|
b6221f |
# Earlier versions have a bug in tree vectorization on PPC
|
|
|
b6221f |
BuildRequires: gcc >= 4.8.3-8
|
|
|
b6221f |
|
|
|
b6221f |
%if %{with_systemtap}
|
|
|
b6221f |
BuildRequires: systemtap-sdt-devel
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
# this is always built, also during debug-only build
|
|
|
b6221f |
# when it is built in debug-only this package is just placeholder
|
|
|
b6221f |
%{java_rpo %{nil}}
|
|
|
b6221f |
|
|
|
b6221f |
%description
|
|
|
c3e128 |
The %{origin_nice} %{featurever} runtime environment.
|
|
|
b6221f |
|
|
|
b6221f |
%if %{include_debug_build}
|
|
|
b6221f |
%package slowdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Runtime Environment %{debug_on}
|
|
|
b6221f |
Group: Development/Languages
|
|
|
b6221f |
|
|
|
b6221f |
%{java_rpo -- %{debug_suffix_unquoted}}
|
|
|
b6221f |
%description slowdebug
|
|
|
c3e128 |
The %{origin_nice} %{featurever} runtime environment.
|
|
|
b6221f |
%{debug_warning}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2f6c9a |
%if %{include_fastdebug_build}
|
|
|
2f6c9a |
%package fastdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Runtime Environment %{fastdebug_on}
|
|
|
2f6c9a |
Group: Development/Languages
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%{java_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
2f6c9a |
%description fastdebug
|
|
|
c3e128 |
The %{origin_nice} %{featurever} runtime environment.
|
|
|
2f6c9a |
%{fastdebug_warning}
|
|
|
2f6c9a |
%endif
|
|
|
2f6c9a |
|
|
|
b6221f |
%if %{include_normal_build}
|
|
|
b6221f |
%package headless
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Headless Runtime Environment
|
|
|
b6221f |
Group: Development/Languages
|
|
|
b6221f |
|
|
|
b6221f |
%{java_headless_rpo %{nil}}
|
|
|
b6221f |
|
|
|
b6221f |
%description headless
|
|
|
c3e128 |
The %{origin_nice} %{featurever} runtime environment without audio and video support.
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
%if %{include_debug_build}
|
|
|
b6221f |
%package headless-slowdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Runtime Environment %{debug_on}
|
|
|
b6221f |
Group: Development/Languages
|
|
|
b6221f |
|
|
|
b6221f |
%{java_headless_rpo -- %{debug_suffix_unquoted}}
|
|
|
b6221f |
|
|
|
b6221f |
%description headless-slowdebug
|
|
|
c3e128 |
The %{origin_nice} %{featurever} runtime environment without audio and video support.
|
|
|
b6221f |
%{debug_warning}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2f6c9a |
%if %{include_fastdebug_build}
|
|
|
2f6c9a |
%package headless-fastdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Runtime Environment %{fastdebug_on}
|
|
|
2f6c9a |
Group: Development/Languages
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%{java_headless_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%description headless-fastdebug
|
|
|
c3e128 |
The %{origin_nice} %{featurever} runtime environment without audio and video support.
|
|
|
2f6c9a |
%{fastdebug_warning}
|
|
|
2f6c9a |
%endif
|
|
|
2f6c9a |
|
|
|
b6221f |
%if %{include_normal_build}
|
|
|
b6221f |
%package devel
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Development Environment
|
|
|
b6221f |
Group: Development/Tools
|
|
|
b6221f |
|
|
|
b6221f |
%{java_devel_rpo %{nil}}
|
|
|
b6221f |
|
|
|
b6221f |
%description devel
|
|
|
c3e128 |
The %{origin_nice} %{featurever} development tools.
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
%if %{include_debug_build}
|
|
|
b6221f |
%package devel-slowdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Development Environment %{debug_on}
|
|
|
b6221f |
Group: Development/Tools
|
|
|
b6221f |
|
|
|
b6221f |
%{java_devel_rpo -- %{debug_suffix_unquoted}}
|
|
|
b6221f |
|
|
|
b6221f |
%description devel-slowdebug
|
|
|
0531ea |
The %{origin_nice} %{featurever} development tools.
|
|
|
b6221f |
%{debug_warning}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2f6c9a |
%if %{include_fastdebug_build}
|
|
|
2f6c9a |
%package devel-fastdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Development Environment %{fastdebug_on}
|
|
|
2f6c9a |
Group: Development/Tools
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%{java_devel_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%description devel-fastdebug
|
|
|
c3e128 |
The %{origin_nice} %{featurever} development tools.
|
|
|
2f6c9a |
%{fastdebug_warning}
|
|
|
2f6c9a |
%endif
|
|
|
2f6c9a |
|
|
|
0f37e5 |
%if %{include_staticlibs}
|
|
|
0f37e5 |
|
|
|
b6221f |
%if %{include_normal_build}
|
|
|
140246 |
%package static-libs
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} libraries for static linking
|
|
|
140246 |
|
|
|
140246 |
%{java_static_libs_rpo %{nil}}
|
|
|
140246 |
|
|
|
140246 |
%description static-libs
|
|
|
c3e128 |
The %{origin_nice} %{featurever} libraries for static linking.
|
|
|
140246 |
%endif
|
|
|
140246 |
|
|
|
140246 |
%if %{include_debug_build}
|
|
|
140246 |
%package static-libs-slowdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} libraries for static linking %{debug_on}
|
|
|
140246 |
|
|
|
140246 |
%{java_static_libs_rpo -- %{debug_suffix_unquoted}}
|
|
|
140246 |
|
|
|
140246 |
%description static-libs-slowdebug
|
|
|
c3e128 |
The %{origin_nice} %{featurever} libraries for static linking.
|
|
|
140246 |
%{debug_warning}
|
|
|
140246 |
%endif
|
|
|
140246 |
|
|
|
2f6c9a |
%if %{include_fastdebug_build}
|
|
|
2f6c9a |
%package static-libs-fastdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} libraries for static linking %{fastdebug_on}
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%{java_static_libs_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%description static-libs-fastdebug
|
|
|
c3e128 |
The %{origin_nice} %{featurever} libraries for static linking.
|
|
|
2f6c9a |
%{fastdebug_warning}
|
|
|
2f6c9a |
%endif
|
|
|
2f6c9a |
|
|
|
0f37e5 |
# staticlibs
|
|
|
0f37e5 |
%endif
|
|
|
0f37e5 |
|
|
|
140246 |
%if %{include_normal_build}
|
|
|
b6221f |
%package jmods
|
|
|
c3e128 |
Summary: JMods for %{origin_nice} %{featurever}
|
|
|
b6221f |
Group: Development/Tools
|
|
|
b6221f |
|
|
|
b6221f |
%{java_jmods_rpo %{nil}}
|
|
|
b6221f |
|
|
|
b6221f |
%description jmods
|
|
|
c3e128 |
The JMods for %{origin_nice} %{featurever}.
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
%if %{include_debug_build}
|
|
|
b6221f |
%package jmods-slowdebug
|
|
|
c3e128 |
Summary: JMods for %{origin_nice} %{featurever} %{debug_on}
|
|
|
b6221f |
Group: Development/Tools
|
|
|
b6221f |
|
|
|
b6221f |
%{java_jmods_rpo -- %{debug_suffix_unquoted}}
|
|
|
b6221f |
|
|
|
b6221f |
%description jmods-slowdebug
|
|
|
c3e128 |
The JMods for %{origin_nice} %{featurever}.
|
|
|
b6221f |
%{debug_warning}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2f6c9a |
%if %{include_fastdebug_build}
|
|
|
2f6c9a |
%package jmods-fastdebug
|
|
|
c3e128 |
Summary: JMods for %{origin_nice} %{featurever} %{fastdebug_on}
|
|
|
2f6c9a |
Group: Development/Tools
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%{java_jmods_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%description jmods-fastdebug
|
|
|
c3e128 |
The JMods for %{origin_nice} %{featurever}.
|
|
|
2f6c9a |
%{fastdebug_warning}
|
|
|
2f6c9a |
%endif
|
|
|
2f6c9a |
|
|
|
b6221f |
%if %{include_normal_build}
|
|
|
b6221f |
%package demo
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Demos
|
|
|
b6221f |
Group: Development/Languages
|
|
|
b6221f |
|
|
|
b6221f |
%{java_demo_rpo %{nil}}
|
|
|
b6221f |
|
|
|
b6221f |
%description demo
|
|
|
c3e128 |
The %{origin_nice} %{featurever} demos.
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
%if %{include_debug_build}
|
|
|
b6221f |
%package demo-slowdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Demos %{debug_on}
|
|
|
b6221f |
Group: Development/Languages
|
|
|
b6221f |
|
|
|
b6221f |
%{java_demo_rpo -- %{debug_suffix_unquoted}}
|
|
|
b6221f |
|
|
|
b6221f |
%description demo-slowdebug
|
|
|
c3e128 |
The %{origin_nice} %{featurever} demos.
|
|
|
b6221f |
%{debug_warning}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2f6c9a |
%if %{include_fastdebug_build}
|
|
|
2f6c9a |
%package demo-fastdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Demos %{fastdebug_on}
|
|
|
2f6c9a |
Group: Development/Languages
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%{java_demo_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%description demo-fastdebug
|
|
|
c3e128 |
The %{origin_nice} %{featurever} demos.
|
|
|
2f6c9a |
%{fastdebug_warning}
|
|
|
2f6c9a |
%endif
|
|
|
2f6c9a |
|
|
|
b6221f |
%if %{include_normal_build}
|
|
|
b6221f |
%package src
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Source Bundle
|
|
|
b6221f |
Group: Development/Languages
|
|
|
b6221f |
|
|
|
b6221f |
%{java_src_rpo %{nil}}
|
|
|
b6221f |
|
|
|
b6221f |
%description src
|
|
|
c3e128 |
The %{compatiblename}-src sub-package contains the complete %{origin_nice} %{featurever}
|
|
|
b6221f |
class library source code for use by IDE indexers and debuggers.
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
%if %{include_debug_build}
|
|
|
b6221f |
%package src-slowdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Source Bundle %{for_debug}
|
|
|
b6221f |
Group: Development/Languages
|
|
|
b6221f |
|
|
|
b6221f |
%{java_src_rpo -- %{debug_suffix_unquoted}}
|
|
|
b6221f |
|
|
|
b6221f |
%description src-slowdebug
|
|
|
c3e128 |
The %{compatiblename}-src-slowdebug sub-package contains the complete %{origin_nice} %{featurever}
|
|
|
c3e128 |
class library source code for use by IDE indexers and debuggers, %{for_debug}.
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
2f6c9a |
%if %{include_fastdebug_build}
|
|
|
2f6c9a |
%package src-fastdebug
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} Source Bundle %{for_fastdebug}
|
|
|
2f6c9a |
Group: Development/Languages
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%{java_src_rpo -- %{fastdebug_suffix_unquoted}}
|
|
|
2f6c9a |
|
|
|
2f6c9a |
%description src-fastdebug
|
|
|
c3e128 |
The %{compatiblename}-src-fastdebug sub-package contains the complete %{origin_nice} %{featurever}
|
|
|
c3e128 |
class library source code for use by IDE indexers and debuggers, %{for_fastdebug}.
|
|
|
2f6c9a |
%endif
|
|
|
2f6c9a |
|
|
|
b6221f |
%if %{include_normal_build}
|
|
|
b6221f |
%package javadoc
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} API documentation
|
|
|
b6221f |
Group: Documentation
|
|
|
b6221f |
Requires: javapackages-filesystem
|
|
|
b6221f |
Obsoletes: javadoc-debug
|
|
|
b6221f |
|
|
|
b6221f |
%{java_javadoc_rpo %{nil}}
|
|
|
b6221f |
|
|
|
b6221f |
%description javadoc
|
|
|
c3e128 |
The %{origin_nice} %{featurever} API documentation.
|
|
|
b6221f |
|
|
|
b6221f |
%package javadoc-zip
|
|
|
c3e128 |
Summary: %{origin_nice} %{featurever} API documentation compressed in a single archive
|
|
|
b6221f |
Group: Documentation
|
|
|
b6221f |
Requires: javapackages-filesystem
|
|
|
b6221f |
Obsoletes: javadoc-zip-debug
|
|
|
b6221f |
|
|
|
b6221f |
%{java_javadoc_rpo %{nil}}
|
|
|
b6221f |
|
|
|
b6221f |
%description javadoc-zip
|
|
|
c3e128 |
The %{origin_nice} %{featurever} API documentation compressed in a single archive.
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
%prep
|
|
|
b6221f |
|
|
|
b6221f |
# Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-(
|
|
|
b6221f |
%if 0%{?stapinstall:1}
|
|
|
b6221f |
echo "CPU: %{_target_cpu}, arch install directory: %{archinstall}, SystemTap install directory: %{stapinstall}"
|
|
|
b6221f |
%else
|
|
|
b6221f |
%{error:Unrecognised architecture %{_target_cpu}}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
|
|
|
b6221f |
echo "include_normal_build is %{include_normal_build}"
|
|
|
b6221f |
else
|
|
|
2f6c9a |
echo "include_normal_build is %{include_normal_build}, that is invalid. Use 1 for yes or 0 for no"
|
|
|
b6221f |
exit 11
|
|
|
b6221f |
fi
|
|
|
b6221f |
if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then
|
|
|
b6221f |
echo "include_debug_build is %{include_debug_build}"
|
|
|
b6221f |
else
|
|
|
2f6c9a |
echo "include_debug_build is %{include_debug_build}, that is invalid. Use 1 for yes or 0 for no"
|
|
|
b6221f |
exit 12
|
|
|
b6221f |
fi
|
|
|
2f6c9a |
if [ %{include_fastdebug_build} -eq 0 -o %{include_fastdebug_build} -eq 1 ] ; then
|
|
|
2f6c9a |
echo "include_fastdebug_build is %{include_fastdebug_build}"
|
|
|
2f6c9a |
else
|
|
|
2f6c9a |
echo "include_fastdebug_build is %{include_fastdebug_build}, that is invalid. Use 1 for yes or 0 for no"
|
|
|
b6221f |
exit 13
|
|
|
b6221f |
fi
|
|
|
2f6c9a |
if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 -a %{include_fastdebug_build} -eq 0 ] ; then
|
|
|
2f6c9a |
echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no go."
|
|
|
2f6c9a |
exit 14
|
|
|
2f6c9a |
fi
|
|
|
2f6c9a |
if [ %{include_normal_build} -eq 0 ] ; then
|
|
|
2f6c9a |
echo "You have disabled the normal build, but this is required to provide docs for the debug build."
|
|
|
2f6c9a |
exit 15
|
|
|
2f6c9a |
fi
|
|
|
b6221f |
%setup -q -c -n %{uniquesuffix ""} -T -a 0
|
|
|
b6221f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084
|
|
|
b6221f |
prioritylength=`expr length %{priority}`
|
|
|
b6221f |
if [ $prioritylength -ne 8 ] ; then
|
|
|
b6221f |
echo "priority must be 8 digits in total, violated"
|
|
|
b6221f |
exit 14
|
|
|
b6221f |
fi
|
|
|
b6221f |
|
|
|
b6221f |
# OpenJDK patches
|
|
|
0f37e5 |
# Remove libraries that are linked by both static and dynamic builds
|
|
|
0f37e5 |
sh %{SOURCE12} %{top_level_dir_name}
|
|
|
b6221f |
|
|
|
0f37e5 |
# Patch the JDK
|
|
|
b6221f |
pushd %{top_level_dir_name}
|
|
|
b6221f |
%patch1 -p1
|
|
|
b6221f |
%patch2 -p1
|
|
|
b6221f |
%patch3 -p1
|
|
|
b6221f |
%patch4 -p1
|
|
|
b6221f |
%patch7 -p1
|
|
|
b9837d |
%patch11 -p1
|
|
|
b6221f |
popd # openjdk
|
|
|
b6221f |
|
|
|
b6221f |
%patch1000
|
|
|
c3e128 |
%patch600
|
|
|
b6221f |
%patch1001
|
|
|
140246 |
%patch1002
|
|
|
2f6c9a |
%patch1003
|
|
|
e543ba |
%patch1004
|
|
|
b9837d |
%patch1005
|
|
|
2a959b |
%patch1006
|
|
|
1d0aac |
%patch1007
|
|
|
b6221f |
|
|
|
b6221f |
# Extract systemtap tapsets
|
|
|
b6221f |
%if %{with_systemtap}
|
|
|
b6221f |
tar --strip-components=1 -x -I xz -f %{SOURCE8}
|
|
|
b6221f |
%if %{include_debug_build}
|
|
|
b6221f |
cp -r tapset tapset%{debug_suffix}
|
|
|
b6221f |
%endif
|
|
|
2f6c9a |
%if %{include_fastdebug_build}
|
|
|
2f6c9a |
cp -r tapset tapset%{fastdebug_suffix}
|
|
|
2f6c9a |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
|
|
|
b6221f |
for suffix in %{build_loop} ; do
|
|
|
b6221f |
for file in "tapset"$suffix/*.in; do
|
|
|
b6221f |
OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"`
|
|
|
b6221f |
sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/server/libjvm.so:g" $file > $file.1
|
|
|
9ecdd5 |
sed -e "s:@JAVA_SPEC_VER@:%{javaver}:g" $file.1 > $file.2
|
|
|
b6221f |
# TODO find out which architectures other than i686 have a client vm
|
|
|
b6221f |
%ifarch %{ix86}
|
|
|
9ecdd5 |
sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" $file.2 > $OUTPUT_FILE
|
|
|
b6221f |
%else
|
|
|
9ecdd5 |
sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.2 > $OUTPUT_FILE
|
|
|
b6221f |
%endif
|
|
|
b6221f |
sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE
|
|
|
b6221f |
sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE
|
|
|
b6221f |
sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE
|
|
|
b6221f |
done
|
|
|
b6221f |
done
|
|
|
b6221f |
# systemtap tapsets ends
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
# Prepare desktop files
|
|
|
b6221f |
# The _X_ syntax indicates variables that are replaced by make upstream
|
|
|
b6221f |
# The @X@ syntax indicates variables that are replaced by configure upstream
|
|
|
b6221f |
for suffix in %{build_loop} ; do
|
|
|
b6221f |
for file in %{SOURCE9}; do
|
|
|
b6221f |
FILE=`basename $file | sed -e s:\.in$::g`
|
|
|
b6221f |
EXT="${FILE##*.}"
|
|
|
b6221f |
NAME="${FILE%.*}"
|
|
|
b6221f |
OUTPUT_FILE=$NAME$suffix.$EXT
|
|
|
b6221f |
sed -e "s:_SDKBINDIR_:%{sdkbindir -- $suffix}:g" $file > $OUTPUT_FILE
|
|
|
b6221f |
sed -i -e "s:@target_cpu@:%{_arch}:g" $OUTPUT_FILE
|
|
|
b6221f |
sed -i -e "s:@OPENJDK_VER@:%{version}-%{release}.%{_arch}$suffix:g" $OUTPUT_FILE
|
|
|
b6221f |
sed -i -e "s:@JAVA_VER@:%{javaver}:g" $OUTPUT_FILE
|
|
|
b6221f |
sed -i -e "s:@JAVA_VENDOR@:%{origin}:g" $OUTPUT_FILE
|
|
|
b6221f |
done
|
|
|
b6221f |
done
|
|
|
b6221f |
|
|
|
b6221f |
# Setup nss.cfg
|
|
|
b6221f |
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
|
|
|
b6221f |
|
|
|
b6221f |
# Setup nss.fips.cfg
|
|
|
b6221f |
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE15} > nss.fips.cfg
|
|
|
b6221f |
sed -i -e "s:@NSS_SECMOD@:/etc/pki/nssdb:g" nss.fips.cfg
|
|
|
b6221f |
|
|
|
b6221f |
%build
|
|
|
b6221f |
# How many CPU's do we have?
|
|
|
b6221f |
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
|
|
|
b6221f |
export NUM_PROC=${NUM_PROC:-1}
|
|
|
b6221f |
%if 0%{?_smp_ncpus_max}
|
|
|
b6221f |
# Honor %%_smp_ncpus_max
|
|
|
b6221f |
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
%ifarch s390x sparc64 alpha %{power64} %{aarch64}
|
|
|
b6221f |
export ARCH_DATA_MODEL=64
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch alpha
|
|
|
b6221f |
export CFLAGS="$CFLAGS -mieee"
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
# We use ourcppflags because the OpenJDK build seems to
|
|
|
b6221f |
# pass EXTRA_CFLAGS to the HotSpot C++ compiler...
|
|
|
b6221f |
# Explicitly set the C++ standard as the default has changed on GCC >= 6
|
|
|
b6221f |
EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse"
|
|
|
b6221f |
EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse"
|
|
|
b6221f |
|
|
|
b6221f |
%ifarch %{power64} ppc
|
|
|
b6221f |
# fix rpmlint warnings
|
|
|
b6221f |
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
|
|
|
b6221f |
%endif
|
|
|
2a265a |
EXTRA_ASFLAGS="${EXTRA_CFLAGS} -Wa,--generate-missing-build-notes=yes"
|
|
|
2a265a |
export EXTRA_CFLAGS EXTRA_ASFLAGS
|
|
|
b6221f |
|
|
|
b6221f |
for suffix in %{build_loop} ; do
|
|
|
b6221f |
if [ "x$suffix" = "x" ] ; then
|
|
|
b6221f |
debugbuild=release
|
|
|
b6221f |
else
|
|
|
b6221f |
# change --something to something
|
|
|
b6221f |
debugbuild=`echo $suffix | sed "s/-//g"`
|
|
|
b6221f |
fi
|
|
|
b6221f |
|
|
|
0f37e5 |
for loop in %{main_suffix} %{staticlibs_loop} ; do
|
|
|
0f37e5 |
|
|
|
0f37e5 |
if test "x${loop}" = "x%{main_suffix}" ; then
|
|
|
0f37e5 |
# Copy the source tree so we can remove all in-tree libraries
|
|
|
0f37e5 |
cp -a %{top_level_dir_name} %{top_level_dir_name_backup}
|
|
|
0f37e5 |
# Remove all libraries that are linked
|
|
|
0f37e5 |
sh %{SOURCE12} %{top_level_dir_name} full
|
|
|
0f37e5 |
# Variable used by configure and hs_err hook on build failures
|
|
|
0f37e5 |
link_opt="system"
|
|
|
0f37e5 |
# Debug builds don't need same targets as release for
|
|
|
0f37e5 |
# build speed-up
|
|
|
0f37e5 |
maketargets="%{release_targets}"
|
|
|
0f37e5 |
if echo $debugbuild | grep -q "debug" ; then
|
|
|
0f37e5 |
maketargets="%{debug_targets}"
|
|
|
0f37e5 |
fi
|
|
|
0f37e5 |
else
|
|
|
0f37e5 |
# Variable used by configure and hs_err hook on build failures
|
|
|
0f37e5 |
link_opt="bundled"
|
|
|
0f37e5 |
# Static library cycle only builds the static libraries
|
|
|
0f37e5 |
maketargets="%{static_libs_target}"
|
|
|
0f37e5 |
fi
|
|
|
b6221f |
|
|
|
0f37e5 |
top_dir_abs_src_path=$(pwd)/%{top_level_dir_name}
|
|
|
0f37e5 |
top_dir_abs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}${loop}}
|
|
|
0f37e5 |
mkdir -p ${top_dir_abs_build_path}
|
|
|
0f37e5 |
pushd ${top_dir_abs_build_path}
|
|
|
b6221f |
|
|
|
0f37e5 |
bash ${top_dir_abs_src_path}/configure \
|
|
|
b6221f |
%ifnarch %{jit_arches}
|
|
|
b6221f |
--with-jvm-variants=zero \
|
|
|
b6221f |
%endif
|
|
|
b6221f |
%ifarch %{ppc64le}
|
|
|
b6221f |
--with-jobs=1 \
|
|
|
b6221f |
%endif
|
|
|
b6221f |
--with-version-build=%{buildver} \
|
|
|
b6221f |
--with-version-pre="%{ea_designator}" \
|
|
|
b6221f |
--with-version-opt=%{lts_designator} \
|
|
|
b6221f |
--with-vendor-version-string="%{vendor_version_string}" \
|
|
|
2a959b |
--with-vendor-name="%{oj_vendor}" \
|
|
|
2a959b |
--with-vendor-url="%{oj_vendor_url}" \
|
|
|
2a959b |
--with-vendor-bug-url="%{oj_vendor_bug_url}" \
|
|
|
2a959b |
--with-vendor-vm-bug-url="%{oj_vendor_bug_url}" \
|
|
|
b6221f |
--with-boot-jdk=/usr/lib/jvm/java-%{buildjdkver}-openjdk \
|
|
|
b6221f |
--with-debug-level=$debugbuild \
|
|
|
b6221f |
--with-native-debug-symbols=internal \
|
|
|
b6221f |
--enable-unlimited-crypto \
|
|
|
b6221f |
--with-zlib=system \
|
|
|
0f37e5 |
--with-libjpeg=${link_opt} \
|
|
|
0f37e5 |
--with-giflib=${link_opt} \
|
|
|
0f37e5 |
--with-libpng=${link_opt} \
|
|
|
0f37e5 |
--with-lcms=${link_opt} \
|
|
|
0f37e5 |
--with-harfbuzz=${link_opt} \
|
|
|
b6221f |
--with-stdc++lib=dynamic \
|
|
|
b6221f |
--with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
|
|
|
b6221f |
--with-extra-cflags="$EXTRA_CFLAGS" \
|
|
|
2a265a |
--with-extra-asflags="$EXTRA_ASFLAGS" \
|
|
|
b6221f |
--with-extra-ldflags="%{ourldflags}" \
|
|
|
b6221f |
--with-num-cores="$NUM_PROC" \
|
|
|
b6221f |
--disable-javac-server \
|
|
|
2a959b |
--with-jvm-features="%{shenandoah_feature},%{zgc_feature}" \
|
|
|
b6221f |
--disable-warnings-as-errors
|
|
|
b6221f |
|
|
|
b6221f |
make \
|
|
|
b6221f |
JAVAC_FLAGS=-g \
|
|
|
b6221f |
LOG=trace \
|
|
|
b6221f |
WARNINGS_ARE_ERRORS="-Wno-error" \
|
|
|
b6221f |
CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error" \
|
|
|
0f37e5 |
$maketargets || ( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name "hs_err_pid*.log" | xargs cat && false )
|
|
|
0f37e5 |
|
|
|
0f37e5 |
popd >& /dev/null
|
|
|
0f37e5 |
|
|
|
0f37e5 |
# Restore original source tree if we modified it by removing full in-tree sources
|
|
|
0f37e5 |
if [ -d %{top_level_dir_name_backup} ] ; then
|
|
|
0f37e5 |
rm -rf %{top_level_dir_name}
|
|
|
0f37e5 |
mv %{top_level_dir_name_backup} %{top_level_dir_name}
|
|
|
0f37e5 |
fi
|
|
|
0f37e5 |
|
|
|
0f37e5 |
done # end of main / staticlibs loop
|
|
|
0f37e5 |
|
|
|
0f37e5 |
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
|
|
|
b6221f |
|
|
|
b6221f |
# the build (erroneously) removes read permissions from some jars
|
|
|
b6221f |
# this is a regression in OpenJDK 7 (our compiler):
|
|
|
b6221f |
# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
|
|
|
0f37e5 |
find ${top_dir_abs_main_build_path}/images/%{jdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
|
|
|
b6221f |
|
|
|
b6221f |
# Build screws up permissions on binaries
|
|
|
b6221f |
# https://bugs.openjdk.java.net/browse/JDK-8173610
|
|
|
0f37e5 |
find ${top_dir_abs_main_build_path}/images/%{jdkimage} -iname '*.so' -exec chmod +x {} \;
|
|
|
0f37e5 |
find ${top_dir_abs_main_build_path}/images/%{jdkimage}/bin/ -exec chmod +x {} \;
|
|
|
b6221f |
|
|
|
b6221f |
# Install nss.cfg right away as we will be using the JRE above
|
|
|
0f37e5 |
export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage}
|
|
|
b6221f |
|
|
|
b6221f |
# Install nss.cfg right away as we will be using the JRE above
|
|
|
b6221f |
install -m 644 nss.cfg $JAVA_HOME/conf/security/
|
|
|
b6221f |
|
|
|
b6221f |
# Install nss.fips.cfg: NSS configuration for global FIPS mode (crypto-policies)
|
|
|
b6221f |
install -m 644 nss.fips.cfg $JAVA_HOME/conf/security/
|
|
|
b6221f |
|
|
|
b6221f |
# Use system-wide tzdata
|
|
|
b6221f |
rm $JAVA_HOME/lib/tzdb.dat
|
|
|
b6221f |
ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/lib/tzdb.dat
|
|
|
b6221f |
|
|
|
2f6c9a |
# Create fake alt-java as a placeholder for future alt-java
|
|
|
2f6c9a |
pushd ${JAVA_HOME}
|
|
|
2f6c9a |
# add alt-java man page
|
|
|
2f6c9a |
echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > man/man1/%{alt_java_name}.1
|
|
|
2f6c9a |
cat man/man1/java.1 >> man/man1/%{alt_java_name}.1
|
|
|
2f6c9a |
popd
|
|
|
2f6c9a |
|
|
|
b6221f |
# build cycles
|
|
|
0f37e5 |
done # end of release / debug cycle loop
|
|
|
b6221f |
|
|
|
b6221f |
%check
|
|
|
b6221f |
|
|
|
b6221f |
# We test debug first as it will give better diagnostics on a crash
|
|
|
b6221f |
for suffix in %{rev_build_loop} ; do
|
|
|
b6221f |
|
|
|
0f37e5 |
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
|
|
|
0f37e5 |
%if %{include_staticlibs}
|
|
|
0f37e5 |
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}}
|
|
|
0f37e5 |
%endif
|
|
|
0f37e5 |
|
|
|
0f37e5 |
export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage}
|
|
|
b6221f |
|
|
|
b6221f |
#check Shenandoah is enabled
|
|
|
b6221f |
%if %{use_shenandoah_hotspot}
|
|
|
b6221f |
$JAVA_HOME//bin/java -XX:+UseShenandoahGC -version
|
|
|
b6221f |
%endif
|
|
|
b6221f |
|
|
|
b6221f |
# Check unlimited policy has been used
|
|
|
b6221f |
$JAVA_HOME/bin/javac -d . %{SOURCE13}
|
|
|
b6221f |
$JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel
|
|
|
b6221f |
|
|
|
b6221f |
# Check ECC is working
|
|
|
b6221f |
$JAVA_HOME/bin/javac -d . %{SOURCE14}
|
|
|
b6221f |
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
|
|
|
b6221f |
|
|
|
e543ba |
# Check correct vendor values have been set
|
|
|
e543ba |
$JAVA_HOME/bin/javac -d . %{SOURCE16}
|
|
|
82e2ee |
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE16})|sed "s|\.java||") "%{oj_vendor}" "%{oj_vendor_url}" "%{oj_vendor_bug_url}"
|
|
|
e543ba |
|
|
|
c3e128 |
# Check java launcher has no SSB mitigation
|
|
|
c3e128 |
if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi
|
|
|
c3e128 |
|
|
|
c3e128 |
# Check alt-java launcher has SSB mitigation on supported architectures
|
|
|
c3e128 |
%ifarch %{ssbd_arches}
|
|
|
c3e128 |
nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation
|
|
|
c3e128 |
%else
|
|
|
c3e128 |
if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi
|
|
|
c3e128 |
%endif
|
|
|
c3e128 |
|
|
|
0f37e5 |
%if %{include_staticlibs}
|
|
|
140246 |
# Check debug symbols in static libraries (smoke test)
|
|
|
0f37e5 |
export STATIC_LIBS_HOME=${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}
|
|
|
140246 |
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c
|
|
|
140246 |
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c
|
|
|
0f37e5 |
%endif
|
|
|
140246 |
|
|
|
b6221f |
# Check debug symbols are present and can identify code
|
|
|
b6221f |
find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
|
|
|
b6221f |
do
|
|
|
b6221f |
if [ -f "$lib" ] ; then
|
|
|
b6221f |
echo "Testing $lib for debug symbols"
|
|
|
b6221f |
# All these tests rely on RPM failing the build if the exit code of any set
|
|
|
b6221f |
# of piped commands is non-zero.
|
|
|
b6221f |
|
|
|
b6221f |
# Test for .debug_* sections in the shared object. This is the main test
|
|
|
b6221f |
# Stripped objects will not contain these
|
|
|
b6221f |
eu-readelf -S "$lib" | grep "] .debug_"
|
|
|
b6221f |
test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
|
|
|
b6221f |
|
|
|
b6221f |
# Test FILE symbols. These will most likely be removed by anything that
|
|
|
b6221f |
# manipulates symbol tables because it's generally useless. So a nice test
|
|
|
b6221f |
# that nothing has messed with symbols
|
|
|
b6221f |
old_IFS="$IFS"
|
|
|
b6221f |
IFS=$'\n'
|
|
|
b6221f |
for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT")
|
|
|
b6221f |
do
|
|
|
b6221f |
# We expect to see .cpp files, except for architectures like aarch64 and
|
|
|
b6221f |
# s390 where we expect .o and .oS files
|
|
|
b6221f |
echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
|
|
|
b6221f |
done
|
|
|
b6221f |
IFS="$old_IFS"
|
|
|
b6221f |
|
|
|
b6221f |
# If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking
|
|
|
b6221f |
if [ "`basename $lib`" = "libjvm.so" ]; then
|
|
|
b6221f |
eu-readelf -s "$lib" | \
|
|
|
b6221f |
grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$"
|
|
|
b6221f |
fi
|
|
|
b6221f |
|
|
|
b6221f |
# Test that there are no .gnu_debuglink sections pointing to another
|
|
|
b6221f |
# debuginfo file. There shouldn't be any debuginfo files, so the link makes
|
|
|
b6221f |
# no sense either
|
|
|
b6221f |
eu-readelf -S "$lib" | grep 'gnu'
|
|
|
b6221f |
if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
|
|
|
b6221f |
echo "bad .gnu_debuglink section."
|
|
|
b6221f |
eu-readelf -x .gnu_debuglink "$lib"
|
|
|
b6221f |
false
|
|
|
b6221f |
fi
|
|
|
b6221f |
fi
|
|
|
b6221f |
done
|
|
|
b6221f |
|
|
|
b6221f |
# Make sure gdb can do a backtrace based on line numbers on libjvm.so
|
|
|
b6221f |
# javaCalls.cpp:58 should map to:
|
|
|
b6221f |
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
|
|
|
b6221f |
# Using line number 1 might cause build problems. See:
|
|
|
b6221f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1539664
|
|
|
b6221f |
# https://bugzilla.redhat.com/show_bug.cgi?id=1538767
|
|
|
b6221f |
gdb -q "$JAVA_HOME/bin/java" <
|
|
|
b6221f |
handle SIGSEGV pass nostop noprint
|
|
|
b6221f |
handle SIGILL pass nostop noprint
|
|
|
b6221f |
set breakpoint pending on
|
|
|
b6221f |
break javaCalls.cpp:1
|
|
|
b6221f |
commands 1
|
|
|
b6221f |
backtrace
|
|
|
b6221f |
quit
|
|
|
b6221f |
end
|
|
|
b6221f |
run -version
|
|
|
b6221f |
EOF
|
|
|
b6221f |
grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
|
|
|
b6221f |
|
|
|
b6221f |
# Check src.zip has all sources. See RHBZ#1130490
|
|
|
b6221f |
jar -tf $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe'
|
|
|
b6221f |
|
|
|
b6221f |
# Check class files include useful debugging information
|
|
|
b6221f |
$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
|
|
|
b6221f |
$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
|
|
|
b6221f |
$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
|
|
|
b6221f |
|
|
|
b6221f |
# Check generated class files include useful debugging information
|
|
|
b6221f |
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
|
|
|
b6221f |
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
|
|
|
b6221f |
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
|
|
|
b6221f |
|
|
|
b6221f |
# build cycles check
|
|
|
b6221f |
done
|
|
|
b6221f |
|
|
|
|