Blame SPECS/java-17-openjdk.spec

dee830
# RPM conditionals so as to be able to dynamically produce
dee830
# slowdebug/release builds. See:
dee830
# http://rpm.org/user_doc/conditional_builds.html
dee830
#
dee830
# Examples:
dee830
#
dee830
# Produce release, fastdebug *and* slowdebug builds on x86_64 (default):
dee830
# $ rpmbuild -ba java-17-openjdk.spec
dee830
#
dee830
# Produce only release builds (no debug builds) on x86_64:
dee830
# $ rpmbuild -ba java-17-openjdk.spec --without slowdebug --without fastdebug
dee830
#
dee830
# Only produce a release build on x86_64:
dee830
# $ fedpkg mockbuild --without slowdebug --without fastdebug
dee830
dee830
# Enable fastdebug builds by default on relevant arches.
dee830
%bcond_without fastdebug
dee830
# Enable slowdebug builds by default on relevant arches.
dee830
%bcond_without slowdebug
dee830
# Enable release builds by default on relevant arches.
dee830
%bcond_without release
dee830
# Enable static library builds by default.
dee830
%bcond_without staticlibs
dee830
# Build a fresh libjvm.so for use in a copy of the bootstrap JDK
dee830
%bcond_without fresh_libjvm
dee830
dee830
# Workaround for stripping of debug symbols from static libraries
dee830
%if %{with staticlibs}
dee830
%define __brp_strip_static_archive %{nil}
dee830
%global include_staticlibs 1
dee830
%else
dee830
%global include_staticlibs 0
dee830
%endif
dee830
dee830
# Define whether to use the bootstrap JDK directly or with a fresh libjvm.so
dee830
%if %{with fresh_libjvm}
dee830
%global build_hotspot_first 1
dee830
%else
dee830
%global build_hotspot_first 0
dee830
%endif
dee830
dee830
# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
dee830
# This fixes detailed NMT and other tools which need minimal debug info.
dee830
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879
dee830
%global _find_debuginfo_opts -g
dee830
dee830
# With LTO flags enabled, debuginfo checks fail for some reason. Disable
dee830
# LTO for a passing build. This really needs to be looked at.
dee830
%define _lto_cflags %{nil}
dee830
dee830
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
dee830
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
dee830
# see the difference between global and define:
dee830
# See https://github.com/rpm-software-management/rpm/issues/127 to comments at  "pmatilai commented on Aug 18, 2017"
dee830
# (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
dee830
%global debug_suffix_unquoted -slowdebug
dee830
%global fastdebug_suffix_unquoted -fastdebug
dee830
%global main_suffix_unquoted -main
dee830
%global staticlibs_suffix_unquoted -staticlibs
dee830
# quoted one for shell operations
dee830
%global debug_suffix "%{debug_suffix_unquoted}"
dee830
%global fastdebug_suffix "%{fastdebug_suffix_unquoted}"
dee830
%global normal_suffix ""
dee830
%global main_suffix "%{main_suffix_unquoted}"
dee830
%global staticlibs_suffix "%{staticlibs_suffix_unquoted}"
dee830
dee830
%global debug_warning This package is unoptimised with full debugging. Install only as needed and remove ASAP.
dee830
%global fastdebug_warning This package is optimised with full debugging. Install only as needed and remove ASAP.
dee830
%global debug_on unoptimised with full debugging on
dee830
%global fastdebug_on optimised with full debugging on
dee830
%global for_fastdebug for packages with debugging on and optimisation
dee830
%global for_debug for packages with debugging on and no optimisation
dee830
dee830
%if %{with release}
dee830
%global include_normal_build 1
dee830
%else
dee830
%global include_normal_build 0
dee830
%endif
dee830
dee830
%if %{include_normal_build}
dee830
%global normal_build %{normal_suffix}
dee830
%else
dee830
%global normal_build %{nil}
dee830
%endif
dee830
dee830
# We have hardcoded list of files, which  is appearing in alternatives, and in files
dee830
# in alternatives those are slaves and master, very often triplicated by man pages
dee830
# in files all masters and slaves are ghosted
dee830
# the ghosts are here to allow installation via query like `dnf install /usr/bin/java`
dee830
# you can list those files, with appropriate sections: cat *.spec | grep -e --install -e --slave -e post_ -e alternatives
dee830
# TODO - fix those hardcoded lists via single list
dee830
# Those files must *NOT* be ghosted for *slowdebug* packages
dee830
# FIXME - if you are moving jshell or jlink or similar, always modify all three sections
dee830
# you can check via headless and devels:
dee830
#    rpm -ql --noghost java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm  | grep bin
dee830
# == rpm -ql           java-11-openjdk-headless-slowdebug-11.0.1.13-8.fc29.x86_64.rpm  | grep bin
dee830
# != rpm -ql           java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm  | grep bin
dee830
# similarly for other %%{_jvmdir}/{jre,java} and %%{_javadocdir}/{java,java-zip}
dee830
%define is_release_build() %( if [ "%{?1}" == "%{debug_suffix_unquoted}" -o "%{?1}" == "%{fastdebug_suffix_unquoted}" ]; then echo "0" ; else echo "1"; fi )
dee830
dee830
# 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
dee830
# as sytem JDK, we mean any JDK which can run whole system java stack without issues (like bytecode issues, module issues, dependencies...)
dee830
%global is_system_jdk 0
dee830
dee830
%global aarch64         aarch64 arm64 armv8
dee830
# we need to distinguish between big and little endian PPC64
dee830
%global ppc64le         ppc64le
dee830
%global ppc64be         ppc64 ppc64p7
dee830
# Set of architectures which support multiple ABIs
dee830
%global multilib_arches %{power64} sparc64 x86_64
dee830
# Set of architectures for which we build slowdebug builds
dee830
%global debug_arches    %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} s390x
dee830
# Set of architectures for which we build fastdebug builds
dee830
%global fastdebug_arches x86_64 ppc64le aarch64
dee830
# Set of architectures with a Just-In-Time (JIT) compiler
dee830
%global jit_arches      %{arm} %{aarch64} %{ix86} %{power64} s390x sparcv9 sparc64 x86_64
dee830
# Set of architectures which use the Zero assembler port (!jit_arches)
dee830
%global zero_arches ppc s390
dee830
# Set of architectures which run a full bootstrap cycle
dee830
%global bootstrap_arches %{jit_arches}
dee830
# Set of architectures which support SystemTap tapsets
dee830
%global systemtap_arches %{jit_arches}
dee830
# Set of architectures with a Ahead-Of-Time (AOT) compiler
dee830
%global aot_arches      x86_64 %{aarch64}
dee830
# Set of architectures which support the serviceability agent
dee830
%global sa_arches       %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} %{arm}
dee830
# Set of architectures which support class data sharing
dee830
# See https://bugzilla.redhat.com/show_bug.cgi?id=513605
dee830
# MetaspaceShared::generate_vtable_methods is not implemented for the PPC JIT
dee830
%global share_arches    %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{arm} s390x
dee830
# Set of architectures for which we build the Shenandoah garbage collector
dee830
%global shenandoah_arches x86_64 %{aarch64}
dee830
# Set of architectures for which we build the Z garbage collector
dee830
%global zgc_arches x86_64
dee830
# Set of architectures for which alt-java has SSB mitigation
dee830
%global ssbd_arches x86_64
dee830
# Set of architectures for which java has short vector math library (libjsvml.so)
dee830
%global svml_arches x86_64
dee830
# Set of architectures where we verify backtraces with gdb
dee830
%global gdb_arches %{jit_arches} %{zero_arches}
dee830
dee830
# By default, we build a debug build during main build on JIT architectures
dee830
%if %{with slowdebug}
dee830
%ifarch %{debug_arches}
dee830
%global include_debug_build 1
dee830
%else
dee830
%global include_debug_build 0
dee830
%endif
dee830
%else
dee830
%global include_debug_build 0
dee830
%endif
dee830
dee830
# On certain architectures, we compile the Shenandoah GC
dee830
%ifarch %{shenandoah_arches}
dee830
%global use_shenandoah_hotspot 1
dee830
%else
dee830
%global use_shenandoah_hotspot 0
dee830
%endif
dee830
dee830
# By default, we build a fastdebug build during main build only on fastdebug architectures
dee830
%if %{with fastdebug}
dee830
%ifarch %{fastdebug_arches}
dee830
%global include_fastdebug_build 1
dee830
%else
dee830
%global include_fastdebug_build 0
dee830
%endif
dee830
%else
dee830
%global include_fastdebug_build 0
dee830
%endif
dee830
dee830
%if %{include_debug_build}
dee830
%global slowdebug_build %{debug_suffix}
dee830
%else
dee830
%global slowdebug_build %{nil}
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%global fastdebug_build %{fastdebug_suffix}
dee830
%else
dee830
%global fastdebug_build %{nil}
dee830
%endif
dee830
dee830
# If you disable all builds, then the build fails
dee830
# Build and test slowdebug first as it provides the best diagnostics
dee830
%global build_loop %{slowdebug_build} %{fastdebug_build} %{normal_build}
dee830
dee830
%if %{include_staticlibs}
dee830
%global staticlibs_loop %{staticlibs_suffix}
dee830
%else
dee830
%global staticlibs_loop %{nil}
dee830
%endif
dee830
dee830
%ifarch %{bootstrap_arches}
dee830
%global bootstrap_build true
dee830
%else
dee830
%global bootstrap_build false
dee830
%endif
dee830
dee830
%if %{include_staticlibs}
dee830
# Extra target for producing the static-libraries. Separate from
dee830
# other targets since this target is configured to use in-tree
dee830
# AWT dependencies: lcms, libjpeg, libpng, libharfbuzz, giflib
dee830
# and possibly others
dee830
%global static_libs_target static-libs-image
dee830
%else
dee830
%global static_libs_target %{nil}
dee830
%endif
dee830
dee830
# RPM JDK builds keep the debug symbols internal, to be later stripped by RPM
dee830
%global debug_symbols internal
dee830
dee830
# unlike portables,the rpms have to use static_libs_target very dynamically
dee830
%global bootstrap_targets images
dee830
%global release_targets images docs-zip
dee830
# No docs nor bootcycle for debug builds
dee830
%global debug_targets images
dee830
# Target to use to just build HotSpot
dee830
%global hotspot_target hotspot
dee830
dee830
# JDK to use for bootstrapping
dee830
%global bootjdk /usr/lib/jvm/java-%{buildjdkver}-openjdk
dee830
dee830
dee830
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
dee830
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
dee830
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
dee830
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
dee830
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
dee830
%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||')
dee830
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
dee830
%global ourldflags %{__global_ldflags}
dee830
dee830
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
dee830
# the initialization must be here. Later the pkg-config have buggy behavior
dee830
# looks like openjdk RPM specific bug
dee830
# Always set this so the nss.cfg file is not broken
dee830
%global NSS_LIBDIR %(pkg-config --variable=libdir nss)
dee830
dee830
# In some cases, the arch used by the JDK does
dee830
# not match _arch.
dee830
# Also, in some cases, the machine name used by SystemTap
dee830
# does not match that given by _target_cpu
dee830
%ifarch x86_64
dee830
%global archinstall amd64
dee830
%global stapinstall x86_64
dee830
%endif
dee830
%ifarch ppc
dee830
%global archinstall ppc
dee830
%global stapinstall powerpc
dee830
%endif
dee830
%ifarch %{ppc64be}
dee830
%global archinstall ppc64
dee830
%global stapinstall powerpc
dee830
%endif
dee830
%ifarch %{ppc64le}
dee830
%global archinstall ppc64le
dee830
%global stapinstall powerpc
dee830
%endif
dee830
%ifarch %{ix86}
dee830
%global archinstall i686
dee830
%global stapinstall i386
dee830
%endif
dee830
%ifarch ia64
dee830
%global archinstall ia64
dee830
%global stapinstall ia64
dee830
%endif
dee830
%ifarch s390
dee830
%global archinstall s390
dee830
%global stapinstall s390
dee830
%endif
dee830
%ifarch s390x
dee830
%global archinstall s390x
dee830
%global stapinstall s390
dee830
%endif
dee830
%ifarch %{arm}
dee830
%global archinstall arm
dee830
%global stapinstall arm
dee830
%endif
dee830
%ifarch %{aarch64}
dee830
%global archinstall aarch64
dee830
%global stapinstall arm64
dee830
%endif
dee830
# 32 bit sparc, optimized for v9
dee830
%ifarch sparcv9
dee830
%global archinstall sparc
dee830
%global stapinstall %{_target_cpu}
dee830
%endif
dee830
# 64 bit sparc
dee830
%ifarch sparc64
dee830
%global archinstall sparcv9
dee830
%global stapinstall %{_target_cpu}
dee830
%endif
dee830
# Need to support noarch for srpm build
dee830
%ifarch noarch
dee830
%global archinstall %{nil}
dee830
%global stapinstall %{nil}
dee830
%endif
dee830
dee830
%ifarch %{systemtap_arches}
dee830
%global with_systemtap 1
dee830
%else
dee830
%global with_systemtap 0
dee830
%endif
dee830
dee830
# New Version-String scheme-style defines
dee830
%global featurever 17
dee830
%global interimver 0
dee830
%global updatever 2
dee830
%global patchver 0
dee830
# If you bump featurever, you must also bump vendor_version_string
dee830
# Used via new version scheme. JDK 17 was
dee830
# GA'ed in September 2021 => 21.9
dee830
%global vendor_version_string 21.9
dee830
# buildjdkver is usually same as %%{featurever},
dee830
# but in time of bootstrap of next jdk, it is featurever-1,
dee830
# and this it is better to change it here, on single place
dee830
%global buildjdkver 17
dee830
# We don't add any LTS designator for STS packages (Fedora and EPEL).
dee830
# We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined.
dee830
%if 0%{?rhel} && !0%{?epel}
dee830
  %global lts_designator "LTS"
dee830
  %global lts_designator_zip -%{lts_designator}
dee830
%else
dee830
 %global lts_designator ""
dee830
 %global lts_designator_zip ""
dee830
%endif
dee830
dee830
# Define IcedTea version used for SystemTap tapsets and desktop file
dee830
%global icedteaver      6.0.0pre00-c848b93a8598
dee830
dee830
# Standard JPackage naming and versioning defines
dee830
%global origin          openjdk
dee830
%global origin_nice     OpenJDK
dee830
%global top_level_dir_name   %{origin}
dee830
%global top_level_dir_name_backup %{top_level_dir_name}-backup
dee830
%global buildver        8
dee830
%global rpmrelease      13
dee830
# 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
dee830
%if %is_system_jdk
dee830
# Using 10 digits may overflow the int used for priority, so we combine the patch and build versions
dee830
# It is very unlikely we will ever have a patch version > 4 or a build version > 20, so we combine as (patch * 20) + build.
dee830
# This means 11.0.9.0+11 would have had a priority of 11000911 as before
dee830
# 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
dee830
%global combiver $( expr 20 '*' %{patchver} + %{buildver} )
dee830
%global priority %( printf '%02d%02d%02d%02d' %{featurever} %{interimver} %{updatever} %{combiver} )
dee830
%else
dee830
# for techpreview, using 1, so slowdebugs can have 0
dee830
%global priority %( printf '%08d' 1 )
dee830
%endif
dee830
%global newjavaver %{featurever}.%{interimver}.%{updatever}.%{patchver}
dee830
%global javaver         %{featurever}
dee830
dee830
# Strip up to 6 trailing zeros in newjavaver, as the JDK does, to get the correct version used in filenames
dee830
%global filever %(svn=%{newjavaver}; for i in 1 2 3 4 5 6 ; do svn=${svn%%.0} ; done; echo ${svn})
dee830
dee830
# Define milestone (EA for pre-releases, GA for releases)
dee830
# Release will be (where N is usually a number starting at 1):
dee830
# - 0.N%%{?extraver}%%{?dist} for EA releases,
dee830
# - N%%{?extraver}{?dist} for GA releases
dee830
%global is_ga           1
dee830
%if %{is_ga}
dee830
%global build_type GA
dee830
%global expected_ea_designator ""
dee830
%global ea_designator_zip ""
dee830
%global extraver %{nil}
dee830
%global eaprefix %{nil}
dee830
%else
dee830
%global build_type EA
dee830
%global expected_ea_designator ea
dee830
%global ea_designator_zip -%{expected_ea_designator}
dee830
%global extraver .%{expected_ea_designator}
dee830
%global eaprefix 0.
dee830
%endif
dee830
dee830
# Define what url should JVM offer in case of a crash report
dee830
# order may be important, epel may have rhel declared
dee830
%if 0%{?epel}
dee830
%global bugs  https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20EPEL&component=%{name}&version=epel%{epel}
dee830
%else
dee830
%if 0%{?fedora}
dee830
# Does not work for rawhide, keeps the version field empty
dee830
%global bugs  https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}&version=%{fedora}
dee830
%else
dee830
%if 0%{?rhel}
dee830
%global bugs  https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%20%{rhel}&component=%{name}
dee830
%else
dee830
%global bugs  https://bugzilla.redhat.com/enter_bug.cgi
dee830
%endif
dee830
%endif
dee830
%endif
dee830
dee830
# parametrized macros are order-sensitive
dee830
%global compatiblename  java-%{featurever}-%{origin}
dee830
%global fullversion     %{compatiblename}-%{version}-%{release}
dee830
# images directories from upstream build
dee830
%global jdkimage                jdk
dee830
%global static_libs_image       static-libs
dee830
# output dir stub
dee830
%define buildoutputdir() %{expand:build/jdk%{featurever}.build%{?1}}
dee830
# we can copy the javadoc to not arched dir, or make it not noarch
dee830
%define uniquejavadocdir()    %{expand:%{fullversion}.%{_arch}%{?1}}
dee830
# main id and dir of this jdk
dee830
%define uniquesuffix()        %{expand:%{fullversion}.%{_arch}%{?1}}
dee830
dee830
#################################################################
dee830
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
dee830
#         https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14
dee830
#         https://bugzilla.redhat.com/show_bug.cgi?id=1655938
dee830
%global _privatelibs libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsystemconf[.]so.*|libzip[.]so.*
dee830
%global _publiclibs libjawt[.]so.*|libjava[.]so.*|libjvm[.]so.*|libverify[.]so.*|libjsig[.]so.*
dee830
%if %is_system_jdk
dee830
%global __provides_exclude ^(%{_privatelibs})$
dee830
%global __requires_exclude ^(%{_privatelibs})$
dee830
# Never generate lib-style provides/requires for any debug packages
dee830
%global __provides_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
dee830
%global __requires_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
dee830
%global __provides_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
dee830
%global __requires_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
dee830
%else
dee830
# Don't generate provides/requires for JDK provided shared libraries at all.
dee830
%global __provides_exclude ^(%{_privatelibs}|%{_publiclibs})$
dee830
%global __requires_exclude ^(%{_privatelibs}|%{_publiclibs})$
dee830
%endif
dee830
dee830
dee830
%global etcjavasubdir     %{_sysconfdir}/java/java-%{javaver}-%{origin}
dee830
%define etcjavadir()      %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}}
dee830
# Standard JPackage directories and symbolic links.
dee830
%define sdkdir()        %{expand:%{uniquesuffix -- %{?1}}}
dee830
%define jrelnk()        %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%{?1}}
dee830
dee830
%define sdkbindir()     %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
dee830
%define jrebindir()     %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
dee830
dee830
%global alt_java_name     alt-java
dee830
dee830
%global rpm_state_dir %{_localstatedir}/lib/rpm-state/
dee830
dee830
# For flatpack builds hard-code /usr/sbin/alternatives,
dee830
# otherwise use %%{_sbindir} relative path.
dee830
%if 0%{?flatpak}
dee830
%global alternatives_requires /usr/sbin/alternatives
dee830
%else
dee830
%global alternatives_requires %{_sbindir}/alternatives
dee830
%endif
dee830
dee830
%global family %{name}.%{_arch}
dee830
%global family_noarch  %{name}
dee830
dee830
%if %{with_systemtap}
dee830
# Where to install systemtap tapset (links)
dee830
# We would like these to be in a package specific sub-dir,
dee830
# but currently systemtap doesn't support that, so we have to
dee830
# use the root tapset dir for now. To distinguish between 64
dee830
# and 32 bit architectures we place the tapsets under the arch
dee830
# specific dir (note that systemtap will only pickup the tapset
dee830
# for the primary arch for now). Systemtap uses the machine name
dee830
# aka target_cpu as architecture specific directory name.
dee830
%global tapsetroot /usr/share/systemtap
dee830
%global tapsetdirttapset %{tapsetroot}/tapset/
dee830
%global tapsetdir %{tapsetdirttapset}/%{stapinstall}
dee830
%endif
dee830
dee830
# not-duplicated scriptlets for normal/debug packages
dee830
%global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
dee830
dee830
%define save_alternatives() %{expand:
dee830
  # warning! alternatives are localised!
dee830
  # LANG=cs_CZ.UTF-8  alternatives --display java | head
dee830
  # LANG=en_US.UTF-8  alternatives --display java | head
dee830
  function nonLocalisedAlternativesDisplayOfMaster() {
dee830
    LANG=en_US.UTF-8 alternatives --display "$MASTER"
dee830
  }
dee830
  function headOfAbove() {
dee830
    nonLocalisedAlternativesDisplayOfMaster | head -n $1
dee830
  }
dee830
  MASTER="%{?1}"
dee830
  LOCAL_LINK="%{?2}"
dee830
  FAMILY="%{?3}"
dee830
  rm -f %{_localstatedir}/lib/rpm-state/"$MASTER"_$FAMILY > /dev/null
dee830
  if nonLocalisedAlternativesDisplayOfMaster > /dev/null ; then
dee830
      if headOfAbove 1 | grep -q manual ; then
dee830
        if headOfAbove 2 | tail -n 1 | grep -q %{compatiblename} ; then
dee830
           headOfAbove 2  > %{_localstatedir}/lib/rpm-state/"$MASTER"_"$FAMILY"
dee830
        fi
dee830
      fi
dee830
  fi
dee830
}
dee830
dee830
%define save_and_remove_alternatives() %{expand:
dee830
  if [ "x$debug"  == "xtrue" ] ; then
dee830
    set -x
dee830
  fi
dee830
  upgrade1_uninstal0=%{?3}
dee830
  if [ "0$upgrade1_uninstal0" -gt 0 ] ; then # removal of this condition will cause persistence between uninstall
dee830
    %{save_alternatives %{?1} %{?2} %{?4}}
dee830
  fi
dee830
  alternatives --remove  "%{?1}" "%{?2}"
dee830
}
dee830
dee830
%define set_if_needed_alternatives() %{expand:
dee830
  MASTER="%{?1}"
dee830
  FAMILY="%{?2}"
dee830
  ALTERNATIVES_FILE="%{_localstatedir}/lib/rpm-state/$MASTER"_"$FAMILY"
dee830
  if [ -e  "$ALTERNATIVES_FILE" ] ; then
dee830
    rm "$ALTERNATIVES_FILE"
dee830
    alternatives --set $MASTER $FAMILY
dee830
  fi
dee830
}
dee830
dee830
dee830
%define post_script() %{expand:
dee830
update-desktop-database %{_datadir}/applications &> /dev/null || :
dee830
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
dee830
exit 0
dee830
}
dee830
dee830
%define alternatives_java_install() %{expand:
dee830
if [ "x$debug"  == "xtrue" ] ; then
dee830
  set -x
dee830
fi
dee830
PRIORITY=%{priority}
dee830
if [ "%{?1}" == %{debug_suffix} ]; then
dee830
  let PRIORITY=PRIORITY-1
dee830
fi
dee830
dee830
ext=.gz
dee830
key=java
dee830
alternatives \\
dee830
  --install %{_bindir}/java $key %{jrebindir -- %{?1}}/java $PRIORITY  --family %{family} \\
dee830
  --slave %{_jvmdir}/jre jre %{_jvmdir}/%{sdkdir -- %{?1}} \\
dee830
  --slave %{_bindir}/%{alt_java_name} %{alt_java_name} %{jrebindir -- %{?1}}/%{alt_java_name} \\
dee830
  --slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\
dee830
  --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir -- %{?1}}/rmiregistry \\
dee830
  --slave %{_mandir}/man1/java.1$ext java.1$ext \\
dee830
  %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/%{alt_java_name}.1$ext %{alt_java_name}.1$ext \\
dee830
  %{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\
dee830
  %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\
dee830
  %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1$ext
dee830
dee830
%{set_if_needed_alternatives $key %{family}}
dee830
dee830
for X in %{origin} %{javaver} ; do
dee830
  key=jre_"$X"
dee830
  alternatives --install %{_jvmdir}/jre-"$X" $key %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{family}
dee830
  %{set_if_needed_alternatives $key %{family}}
dee830
done
dee830
dee830
key=jre_%{javaver}_%{origin}
dee830
alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} $key %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY  --family %{family}
dee830
%{set_if_needed_alternatives $key %{family}}
dee830
}
dee830
dee830
%define post_headless() %{expand:
dee830
%ifarch %{share_arches}
dee830
%{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null
dee830
%endif
dee830
dee830
update-desktop-database %{_datadir}/applications &> /dev/null || :
dee830
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
dee830
dee830
# see pretrans where this file is declared
dee830
# also see that pretrans is only for non-debug
dee830
if [ ! "%{?1}" == %{debug_suffix} ]; then
dee830
  if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then
dee830
    sh  %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch}  %{_jvmdir}/%{sdkdir -- %{?1}}
dee830
  fi
dee830
fi
dee830
dee830
exit 0
dee830
}
dee830
dee830
%define postun_script() %{expand:
dee830
update-desktop-database %{_datadir}/applications &> /dev/null || :
dee830
if [ $1 -eq 0 ] ; then
dee830
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
dee830
    %{update_desktop_icons}
dee830
fi
dee830
exit 0
dee830
}
dee830
dee830
dee830
%define postun_headless() %{expand:
dee830
  if [ "x$debug"  == "xtrue" ] ; then
dee830
    set -x
dee830
  fi
dee830
  post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
dee830
  %{save_and_remove_alternatives  java  %{jrebindir -- %{?1}}/java $post_state %{family}}
dee830
  %{save_and_remove_alternatives  jre_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $post_state %{family}}
dee830
  %{save_and_remove_alternatives  jre_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}} $post_state %{family}}
dee830
  %{save_and_remove_alternatives  jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $post_state %{family}}
dee830
}
dee830
dee830
%define posttrans_script() %{expand:
dee830
%{update_desktop_icons}
dee830
}
dee830
dee830
dee830
%define alternatives_javac_install() %{expand:
dee830
if [ "x$debug"  == "xtrue" ] ; then
dee830
  set -x
dee830
fi
dee830
PRIORITY=%{priority}
dee830
if [ "%{?1}" == %{debug_suffix} ]; then
dee830
  let PRIORITY=PRIORITY-1
dee830
fi
dee830
dee830
ext=.gz
dee830
key=javac
dee830
alternatives \\
dee830
  --install %{_bindir}/javac $key %{sdkbindir -- %{?1}}/javac $PRIORITY  --family %{family} \\
dee830
  --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir -- %{?1}} \\
dee830
  --slave %{_bindir}/jlink jlink %{sdkbindir -- %{?1}}/jlink \\
dee830
  --slave %{_bindir}/jmod jmod %{sdkbindir -- %{?1}}/jmod \\
dee830
%ifarch %{sa_arches}
dee830
%ifnarch %{zero_arches}
dee830
  --slave %{_bindir}/jhsdb jhsdb %{sdkbindir -- %{?1}}/jhsdb \\
dee830
%endif
dee830
%endif
dee830
  --slave %{_bindir}/jar jar %{sdkbindir -- %{?1}}/jar \\
dee830
  --slave %{_bindir}/jarsigner jarsigner %{sdkbindir -- %{?1}}/jarsigner \\
dee830
  --slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\
dee830
  --slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\
dee830
  --slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\
dee830
  --slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\
dee830
  --slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\
dee830
  --slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\
dee830
  --slave %{_bindir}/jdeprscan jdeprscan %{sdkbindir -- %{?1}}/jdeprscan \\
dee830
  --slave %{_bindir}/jfr jfr %{sdkbindir -- %{?1}}/jfr \\
dee830
  --slave %{_bindir}/jimage jimage %{sdkbindir -- %{?1}}/jimage \\
dee830
  --slave %{_bindir}/jinfo jinfo %{sdkbindir -- %{?1}}/jinfo \\
dee830
  --slave %{_bindir}/jmap jmap %{sdkbindir -- %{?1}}/jmap \\
dee830
  --slave %{_bindir}/jps jps %{sdkbindir -- %{?1}}/jps \\
dee830
  --slave %{_bindir}/jpackage jpackage %{sdkbindir -- %{?1}}/jpackage \\
dee830
  --slave %{_bindir}/jrunscript jrunscript %{sdkbindir -- %{?1}}/jrunscript \\
dee830
  --slave %{_bindir}/jshell jshell %{sdkbindir -- %{?1}}/jshell \\
dee830
  --slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\
dee830
  --slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\
dee830
  --slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\
dee830
  --slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\
dee830
  --slave %{_mandir}/man1/jar.1$ext jar.1$ext \\
dee830
  %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \\
dee830
  %{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/javac.1$ext javac.1$ext \\
dee830
  %{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \\
dee830
  %{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/javap.1$ext javap.1$ext \\
dee830
  %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\
dee830
  %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\
dee830
  %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\
dee830
  %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \\
dee830
  %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \\
dee830
  %{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \\
dee830
  %{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jps.1$ext jps.1$ext \\
dee830
  %{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jpackage.1$ext jpackage.1$ext \\
dee830
  %{_mandir}/man1/jpackage-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \\
dee830
  %{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \\
dee830
  %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\
dee830
  %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\
dee830
  %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\
dee830
  --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\
dee830
  %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1$ext
dee830
dee830
%{set_if_needed_alternatives  $key %{family}}
dee830
dee830
for X in %{origin} %{javaver} ; do
dee830
  key=java_sdk_"$X"
dee830
  alternatives --install %{_jvmdir}/java-"$X" $key %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY  --family %{family}
dee830
  %{set_if_needed_alternatives  $key %{family}}
dee830
done
dee830
dee830
key=java_sdk_%{javaver}_%{origin}
dee830
alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} $key %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY  --family %{family}
dee830
%{set_if_needed_alternatives  $key %{family}}
dee830
}
dee830
dee830
%define post_devel() %{expand:
dee830
update-desktop-database %{_datadir}/applications &> /dev/null || :
dee830
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
dee830
dee830
exit 0
dee830
}
dee830
dee830
%define postun_devel() %{expand:
dee830
  if [ "x$debug"  == "xtrue" ] ; then
dee830
    set -x
dee830
  fi
dee830
  post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
dee830
  %{save_and_remove_alternatives  javac %{sdkbindir -- %{?1}}/javac $post_state %{family}}
dee830
  %{save_and_remove_alternatives  java_sdk_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $post_state %{family}}
dee830
  %{save_and_remove_alternatives  java_sdk_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}} $post_state %{family}}
dee830
  %{save_and_remove_alternatives  java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $post_state %{family}}
dee830
dee830
update-desktop-database %{_datadir}/applications &> /dev/null || :
dee830
dee830
if [ $1 -eq 0 ] ; then
dee830
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
dee830
    %{update_desktop_icons}
dee830
fi
dee830
exit 0
dee830
}
dee830
dee830
%define posttrans_devel() %{expand:
dee830
%{alternatives_javac_install --  %{?1}}
dee830
%{update_desktop_icons}
dee830
}
dee830
dee830
%define alternatives_javadoc_install() %{expand:
dee830
if [ "x$debug"  == "xtrue" ] ; then
dee830
  set -x
dee830
fi
dee830
PRIORITY=%{priority}
dee830
if [ "%{?1}" == %{debug_suffix} ]; then
dee830
  let PRIORITY=PRIORITY-1
dee830
fi
dee830
dee830
key=javadocdir
dee830
alternatives --install %{_javadocdir}/java $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $PRIORITY  --family %{family_noarch}
dee830
%{set_if_needed_alternatives  $key %{family_noarch}}
dee830
exit 0
dee830
}
dee830
dee830
%define postun_javadoc() %{expand:
dee830
if [ "x$debug"  == "xtrue" ] ; then
dee830
  set -x
dee830
fi
dee830
  post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
dee830
  %{save_and_remove_alternatives  javadocdir  %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
dee830
exit 0
dee830
}
dee830
dee830
%define alternatives_javadoczip_install() %{expand:
dee830
if [ "x$debug"  == "xtrue" ] ; then
dee830
  set -x
dee830
fi
dee830
PRIORITY=%{priority}
dee830
if [ "%{?1}" == %{debug_suffix} ]; then
dee830
  let PRIORITY=PRIORITY-1
dee830
fi
dee830
key=javadoczip
dee830
alternatives --install %{_javadocdir}/java-zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $PRIORITY  --family %{family_noarch}
dee830
%{set_if_needed_alternatives  $key %{family_noarch}}
dee830
exit 0
dee830
}
dee830
dee830
%define postun_javadoc_zip() %{expand:
dee830
  if [ "x$debug"  == "xtrue" ] ; then
dee830
    set -x
dee830
  fi
dee830
  post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
dee830
  %{save_and_remove_alternatives  javadoczip  %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
dee830
exit 0
dee830
}
dee830
dee830
%define files_jre() %{expand:
dee830
%{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}-%{origin}.png
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsplashscreen.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt_xawt.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjawt.so
dee830
}
dee830
dee830
dee830
%define files_jre_headless() %{expand:
dee830
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
dee830
%doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/NEWS
dee830
%dir %{_sysconfdir}/.java/.systemPrefs
dee830
%dir %{_sysconfdir}/.java
dee830
%dir %{_jvmdir}/%{sdkdir -- %{?1}}
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/release
dee830
%{_jvmdir}/%{jrelnk -- %{?1}}
dee830
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/java
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/%{alt_java_name}
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
dee830
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
dee830
%ifarch %{jit_arches}
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/classlist
dee830
%endif
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jspawnhelper
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jrt-fs.jar
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/modules
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/psfont.properties.ja
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/psfontj2d.properties
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/tzdb.dat
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjli.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jvm.cfg
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libattach.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libextnet.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsig.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt_headless.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libdt_socket.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libfontmanager.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libinstrument.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2gss.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2pcsc.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libj2pkcs11.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjaas.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjava.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjavajpeg.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjdwp.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjimage.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsound.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/liblcms.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_agent.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_ext.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmlib_image.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libnet.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libnio.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libprefs.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/librmi.so
dee830
# Some architectures don't have the serviceability agent
dee830
%ifarch %{sa_arches}
dee830
%ifnarch %{zero_arches}
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsaproc.so
dee830
%endif
dee830
%endif
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsctp.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsystemconf.so
dee830
%ifarch %{svml_arches}
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsvml.so
dee830
%endif
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libsyslookup.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libverify.so
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libzip.so
dee830
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/default.jfc
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/profile.jfc
dee830
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/
dee830
%ifarch %{share_arches}
dee830
%attr(444, root, root) %ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/classes.jsa
dee830
%endif
dee830
%dir %{etcjavasubdir}
dee830
%dir %{etcjavadir -- %{?1}}
dee830
%dir %{etcjavadir -- %{?1}}/lib
dee830
%dir %{etcjavadir -- %{?1}}/lib/security
dee830
%{etcjavadir -- %{?1}}/lib/security/cacerts
dee830
%dir %{etcjavadir -- %{?1}}/conf
dee830
%dir %{etcjavadir -- %{?1}}/conf/sdp
dee830
%dir %{etcjavadir -- %{?1}}/conf/management
dee830
%dir %{etcjavadir -- %{?1}}/conf/security
dee830
%dir %{etcjavadir -- %{?1}}/conf/security/policy
dee830
%dir %{etcjavadir -- %{?1}}/conf/security/policy/limited
dee830
%dir %{etcjavadir -- %{?1}}/conf/security/policy/unlimited
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/default.policy
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/blocked.certs
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/public_suffix_list.dat
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/limited/exempt_local.policy
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/limited/default_local.policy
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/limited/default_US_export.policy
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/unlimited/default_local.policy
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/policy/unlimited/default_US_export.policy
dee830
 %{etcjavadir -- %{?1}}/conf/security/policy/README.txt
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.policy
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.security
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/logging.properties
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/nss.cfg
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/nss.fips.cfg
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/jmxremote.access
dee830
# This is a config template, thus not config-noreplace
dee830
%config  %{etcjavadir -- %{?1}}/conf/management/jmxremote.password.template
dee830
%config  %{etcjavadir -- %{?1}}/conf/sdp/sdp.conf.template
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/management.properties
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/net.properties
dee830
%config(noreplace) %{etcjavadir -- %{?1}}/conf/sound.properties
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/conf
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/security
dee830
%if %is_system_jdk
dee830
%if %{is_release_build -- %{?1}}
dee830
%ghost %{_bindir}/java
dee830
%ghost %{_bindir}/%{alt_java_name}
dee830
%ghost %{_jvmdir}/jre
dee830
%ghost %{_bindir}/keytool
dee830
%ghost %{_bindir}/pack200
dee830
%ghost %{_bindir}/rmid
dee830
%ghost %{_bindir}/rmiregistry
dee830
%ghost %{_bindir}/unpack200
dee830
%ghost %{_jvmdir}/jre-%{origin}
dee830
%ghost %{_jvmdir}/jre-%{javaver}
dee830
%ghost %{_jvmdir}/jre-%{javaver}-%{origin}
dee830
%endif
dee830
%endif
dee830
# https://bugzilla.redhat.com/show_bug.cgi?id=1820172
dee830
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
dee830
%ghost %{_jvmdir}/%{sdkdir -- %{?1}}/conf.rpmmoved
dee830
%ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/security.rpmmoved
dee830
}
dee830
dee830
%define files_devel() %{expand:
dee830
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jar
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jarsigner
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javac
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeprscan
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jfr
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jimage
dee830
# Some architectures don't have the serviceability agent
dee830
%ifarch %{sa_arches}
dee830
%ifnarch %{zero_arches}
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jhsdb
dee830
%{_mandir}/man1/jhsdb-%{uniquesuffix -- %{?1}}.1.gz
dee830
%endif
dee830
%endif
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jinfo
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jlink
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmap
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmod
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jps
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jpackage
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jrunscript
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jshell
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/include
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
dee830
%if %{with_systemtap}
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/tapset
dee830
%endif
dee830
%{_datadir}/applications/*jconsole%{?1}.desktop
dee830
%{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jpackage-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1*
dee830
%{_mandir}/man1/jdeprscan-%{uniquesuffix -- %{?1}}.1.gz
dee830
%{_mandir}/man1/jlink-%{uniquesuffix -- %{?1}}.1.gz
dee830
%{_mandir}/man1/jmod-%{uniquesuffix -- %{?1}}.1.gz
dee830
%{_mandir}/man1/jshell-%{uniquesuffix -- %{?1}}.1.gz
dee830
%{_mandir}/man1/jfr-%{uniquesuffix -- %{?1}}.1.gz
dee830
dee830
%if %{with_systemtap}
dee830
%dir %{tapsetroot}
dee830
%dir %{tapsetdirttapset}
dee830
%dir %{tapsetdir}
dee830
%{tapsetdir}/*%{_arch}%{?1}.stp
dee830
%endif
dee830
%if %is_system_jdk
dee830
%if %{is_release_build -- %{?1}}
dee830
%ghost %{_bindir}/javac
dee830
%ghost %{_jvmdir}/java
dee830
%ghost %{_jvmdir}/%{alt_java_name}
dee830
%ghost %{_bindir}/jlink
dee830
%ghost %{_bindir}/jmod
dee830
%ghost %{_bindir}/jhsdb
dee830
%ghost %{_bindir}/jar
dee830
%ghost %{_bindir}/jarsigner
dee830
%ghost %{_bindir}/javadoc
dee830
%ghost %{_bindir}/javap
dee830
%ghost %{_bindir}/jcmd
dee830
%ghost %{_bindir}/jconsole
dee830
%ghost %{_bindir}/jdb
dee830
%ghost %{_bindir}/jdeps
dee830
%ghost %{_bindir}/jdeprscan
dee830
%ghost %{_bindir}/jimage
dee830
%ghost %{_bindir}/jinfo
dee830
%ghost %{_bindir}/jmap
dee830
%ghost %{_bindir}/jps
dee830
%ghost %{_bindir}/jrunscript
dee830
%ghost %{_bindir}/jshell
dee830
%ghost %{_bindir}/jstack
dee830
%ghost %{_bindir}/jstat
dee830
%ghost %{_bindir}/jstatd
dee830
%ghost %{_bindir}/serialver
dee830
%ghost %{_jvmdir}/java-%{origin}
dee830
%ghost %{_jvmdir}/java-%{javaver}
dee830
%ghost %{_jvmdir}/java-%{javaver}-%{origin}
dee830
%endif
dee830
%endif
dee830
}
dee830
dee830
%define files_jmods() %{expand:
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/jmods
dee830
}
dee830
dee830
%define files_demo() %{expand:
dee830
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/demo
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/sample
dee830
}
dee830
dee830
%define files_src() %{expand:
dee830
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/src.zip
dee830
}
dee830
dee830
%define files_static_libs() %{expand:
dee830
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/static
dee830
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/static/linux-%{archinstall}
dee830
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/static/linux-%{archinstall}/glibc
dee830
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/static/linux-%{archinstall}/glibc/lib*.a
dee830
}
dee830
dee830
%define files_javadoc() %{expand:
dee830
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
dee830
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
dee830
%if %is_system_jdk
dee830
%if %{is_release_build -- %{?1}}
dee830
%ghost %{_javadocdir}/java
dee830
%endif
dee830
%endif
dee830
}
dee830
dee830
%define files_javadoc_zip() %{expand:
dee830
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
dee830
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
dee830
%if %is_system_jdk
dee830
%if %{is_release_build -- %{?1}}
dee830
%ghost %{_javadocdir}/java-zip
dee830
%endif
dee830
%endif
dee830
}
dee830
dee830
# x86 is not supported by OpenJDK 17
dee830
ExcludeArch: %{ix86}
dee830
dee830
# not-duplicated requires/provides/obsoletes for normal/debug packages
dee830
%define java_rpo() %{expand:
dee830
Requires: fontconfig%{?_isa}
dee830
Requires: xorg-x11-fonts-Type1
dee830
# Require libXcomposite explicitly since it's only dynamically loaded
dee830
# at runtime. Fixes screenshot issues. See JDK-8150954.
dee830
Requires: libXcomposite%{?_isa}
dee830
# Requires rest of java
dee830
Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
# for java-X-openjdk package's desktop binding
dee830
# Where recommendations are available, recommend Gtk+ for the Swing look and feel
dee830
%if 0%{?rhel} >= 8 || 0%{?fedora} > 0
dee830
Recommends: gtk3%{?_isa}
dee830
%endif
dee830
dee830
Provides: java-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
dee830
dee830
# Standard JPackage base provides
dee830
Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: jre-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
dee830
%if %is_system_jdk
dee830
Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: jre%{?1} = %{epoch}:%{version}-%{release}
dee830
%endif
dee830
}
dee830
dee830
%define java_headless_rpo() %{expand:
dee830
# Require /etc/pki/java/cacerts
dee830
Requires: ca-certificates
dee830
# Require javapackages-filesystem for ownership of /usr/lib/jvm/ and macros
dee830
Requires: javapackages-filesystem
dee830
# Require zone-info data provided by tzdata-java sub-package
dee830
Requires: tzdata-java >= 2015d
dee830
# for support of kernel stream control
dee830
# libsctp.so.1 is being `dlopen`ed on demand
dee830
Requires: lksctp-tools%{?_isa}
dee830
%if ! 0%{?flatpak}
dee830
# tool to copy jdk's configs - should be Recommends only, but then only dnf/yum enforce it,
dee830
# not rpm transaction and so no configs are persisted when pure rpm -u is run. It may be
dee830
# considered as regression
dee830
Requires: copy-jdk-configs >= 4.0
dee830
OrderWithRequires: copy-jdk-configs
dee830
%endif
dee830
# for printing support
dee830
Requires: cups-libs
dee830
# for FIPS PKCS11 provider
dee830
Requires: nss
dee830
# Post requires alternatives to install tool alternatives
dee830
Requires(post):   %{alternatives_requires}
dee830
# Postun requires alternatives to uninstall tool alternatives
dee830
Requires(postun): %{alternatives_requires}
dee830
# Where suggestions are available, recommend the sctp and pcsc libraries
dee830
# for optional support of kernel stream control and card reader
dee830
%if 0%{?rhel} >= 8 || 0%{?fedora} > 0
dee830
Suggests: lksctp-tools%{?_isa}, pcsc-lite-libs%{?_isa}
dee830
%endif
dee830
dee830
# Standard JPackage base provides
dee830
Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
dee830
%if %is_system_jdk
dee830
Provides: java-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: jre-headless%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-headless%{?1} = %{epoch}:%{version}-%{release}
dee830
%endif
dee830
}
dee830
dee830
%define java_devel_rpo() %{expand:
dee830
# Requires base package
dee830
Requires:         %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
# Post requires alternatives to install tool alternatives
dee830
Requires(post):   %{alternatives_requires}
dee830
# Postun requires alternatives to uninstall tool alternatives
dee830
Requires(postun): %{alternatives_requires}
dee830
dee830
# Standard JPackage devel provides
dee830
Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{javaver}-%{origin}-devel%{?1} = %{epoch}:%{version}-%{release}
dee830
%if %is_system_jdk
dee830
Provides: java-devel-%{origin}%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-devel%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-sdk%{?1} = %{epoch}:%{version}-%{release}
dee830
%endif
dee830
}
dee830
dee830
%define java_static_libs_rpo() %{expand:
dee830
Requires:         %{name}-devel%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
}
dee830
dee830
%define java_jmods_rpo() %{expand:
dee830
# Requires devel package
dee830
# as jmods are bytecode, they should be OK without any _isa
dee830
Requires:         %{name}-devel%{?1} = %{epoch}:%{version}-%{release}
dee830
OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
dee830
dee830
Provides: java-%{javaver}-jmods%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{javaver}-%{origin}-jmods%{?1} = %{epoch}:%{version}-%{release}
dee830
%if %is_system_jdk
dee830
Provides: java-jmods%{?1} = %{epoch}:%{version}-%{release}
dee830
%endif
dee830
}
dee830
dee830
%define java_demo_rpo() %{expand:
dee830
Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
dee830
Provides: java-%{javaver}-demo%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{javaver}-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release}
dee830
%if %is_system_jdk
dee830
Provides: java-demo%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release}
dee830
%endif
dee830
}
dee830
dee830
%define java_javadoc_rpo() %{expand:
dee830
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
# Post requires alternatives to install javadoc alternative
dee830
Requires(post):   %{alternatives_requires}
dee830
# Postun requires alternatives to uninstall javadoc alternative
dee830
Requires(postun): %{alternatives_requires}
dee830
dee830
# Standard JPackage javadoc provides
dee830
Provides: java-%{javaver}-javadoc%{?1}%{?2} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{javaver}-%{origin}-javadoc%{?1}%{?2} = %{epoch}:%{version}-%{release}
dee830
%if %is_system_jdk
dee830
Provides: java-javadoc%{?1}%{?2} = %{epoch}:%{version}-%{release}
dee830
%endif
dee830
}
dee830
dee830
%define java_src_rpo() %{expand:
dee830
Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
dee830
dee830
# Standard JPackage sources provides
dee830
Provides: java-%{javaver}-src%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{javaver}-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
dee830
%if %is_system_jdk
dee830
Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
dee830
Provides: java-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
dee830
%endif
dee830
}
dee830
dee830
# Prevent brp-java-repack-jars from being run
dee830
%global __jar_repack 0
dee830
dee830
Name:    java-%{javaver}-%{origin}
dee830
Version: %{newjavaver}.%{buildver}
dee830
Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
dee830
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
dee830
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
dee830
# also included the epoch in their virtual provides. This created a
dee830
# situation where in-the-wild java-1.5.0-ibm packages provided "java =
dee830
# 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
dee830
# interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
dee830
# satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
dee830
# JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
dee830
# provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
dee830
dee830
Epoch:   1
dee830
Summary: %{origin_nice} %{featurever} Runtime Environment
dee830
# Groups are only used up to RHEL 8 and on Fedora versions prior to F30
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
# HotSpot code is licensed under GPLv2
dee830
# JDK library code is licensed under GPLv2 with the Classpath exception
dee830
# The Apache license is used in code taken from Apache projects (primarily xalan & xerces)
dee830
# DOM levels 2 & 3 and the XML digital signature schemas are licensed under the W3C Software License
dee830
# The JSR166 concurrency code is in the public domain
dee830
# The BSD and MIT licenses are used for a number of third-party libraries (see ADDITIONAL_LICENSE_INFO)
dee830
# The OpenJDK source tree includes:
dee830
# - JPEG library (IJG), zlib & libpng (zlib), giflib (MIT), harfbuzz (ISC),
dee830
# - freetype (FTL), jline (BSD) and LCMS (MIT)
dee830
# - jquery (MIT), jdk.crypto.cryptoki PKCS 11 wrapper (RSA)
dee830
# - public_suffix_list.dat from publicsuffix.org (MPLv2.0)
dee830
# The test code includes copies of NSS under the Mozilla Public License v2.0
dee830
# The PCSClite headers are under a BSD with advertising license
dee830
# The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version
dee830
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
dee830
URL:      http://openjdk.java.net/
dee830
dee830
dee830
# to regenerate source0 (jdk) run update_package.sh
dee830
# update_package.sh contains hard-coded repos, revisions, tags, and projects to regenerate the source archives
dee830
Source0: openjdk-jdk%{featurever}u-jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}}.tar.xz
dee830
dee830
# Use 'icedtea_sync.sh' to update the following
dee830
# They are based on code contained in the IcedTea project (6.x).
dee830
# Systemtap tapsets. Zipped up to keep it small.
dee830
Source8: tapsets-icedtea-%{icedteaver}.tar.xz
dee830
dee830
# Desktop files. Adapted from IcedTea
dee830
Source9: jconsole.desktop.in
dee830
dee830
# Release notes
dee830
Source10: NEWS
dee830
dee830
# nss configuration file
dee830
Source11: nss.cfg.in
dee830
dee830
# Removed libraries that we link instead
dee830
Source12: remove-intree-libraries.sh
dee830
dee830
# Ensure we aren't using the limited crypto policy
dee830
Source13: TestCryptoLevel.java
dee830
dee830
# Ensure ECDSA is working
dee830
Source14: TestECDSA.java
dee830
dee830
# Verify system crypto (policy) can be disabled via a property
dee830
Source15: TestSecurityProperties.java
dee830
dee830
# nss fips configuration file
dee830
Source17: nss.fips.cfg.in
dee830
dee830
############################################
dee830
#
dee830
# RPM/distribution specific patches
dee830
#
dee830
############################################
dee830
dee830
# NSS via SunPKCS11 Provider (disabled comment
dee830
# due to memory leak).
dee830
Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
dee830
# RH1750419: enable build of speculative store bypass hardened alt-java (CVE-2018-3639)
dee830
Patch600: rh1750419-redhat_alt_java.patch
dee830
dee830
# Ignore AWTError when assistive technologies are loaded
dee830
Patch1:    rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
dee830
# Restrict access to java-atk-wrapper classes
dee830
Patch2:    rh1648644-java_access_bridge_privileged_security.patch
dee830
Patch3:    rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch
dee830
# Follow system wide crypto policy RHBZ#1249083
dee830
Patch4:    pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
dee830
# PR3695: Allow use of system crypto policy to be disabled by the user
dee830
Patch5:    pr3695-toggle_system_crypto_policy.patch
dee830
# Depend on pcs-lite-libs instead of pcs-lite-devel as this is only in optional repo
dee830
Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch
dee830
dee830
# FIPS support patches
dee830
# RH1655466: Support RHEL FIPS mode using SunPKCS11 provider
dee830
Patch1001: rh1655466-global_crypto_and_fips.patch
dee830
# RH1818909: No ciphersuites availale for SSLSocket in FIPS mode
dee830
Patch1002: rh1818909-fips_default_keystore_type.patch
dee830
# RH1860986: Disable TLSv1.3 with the NSS-FIPS provider until PKCS#11 v3.0 support is available
dee830
Patch1004: rh1860986-disable_tlsv1.3_in_fips_mode.patch
dee830
# RH1915071: Always initialise JavaSecuritySystemConfiguratorAccess
dee830
Patch1007: rh1915071-always_initialise_configurator_access.patch
dee830
# RH1929465: Improve system FIPS detection
dee830
Patch1008: rh1929465-improve_system_FIPS_detection.patch
dee830
Patch1011: rh1929465-dont_define_unused_throwioexception.patch
dee830
# RH1995150: Disable non-FIPS crypto in SUN and SunEC security providers
dee830
Patch1009: rh1995150-disable_non-fips_crypto.patch
dee830
# RH1996182: Login to the NSS software token in FIPS mode
dee830
Patch1010: rh1996182-login_to_nss_software_token.patch
dee830
Patch1012: rh1996182-extend_security_policy.patch
dee830
# RH1991003: Allow plain key import unless com.redhat.fips.plainKeySupport is set to false
dee830
Patch1013: rh1991003-enable_fips_keys_import.patch
dee830
# RH2021263: Resolve outstanding FIPS issues
dee830
Patch1014: rh2021263-fips_ensure_security_initialised.patch
dee830
Patch1015: rh2021263-fips_missing_native_returns.patch
dee830
# RH2052819: Fix FIPS reliance on crypto policies
dee830
Patch1016: rh2021263-fips_separate_policy_and_fips_init.patch
dee830
# RH2052829: Detect NSS at Runtime for FIPS detection
dee830
Patch1017: rh2052829-fips_runtime_nss_detection.patch
dee830
# RH2052070: Enable AlgorithmParameters and AlgorithmParameterGenerator services in FIPS mode
dee830
Patch1018: rh2052070-enable_algorithmparameters_in_fips_mode.patch
dee830
dee830
#############################################
dee830
#
dee830
# OpenJDK patches in need of upstreaming
dee830
#
dee830
#############################################
dee830
# JDK-8275535, RH2053256: Retrying a failed authentication on multiple LDAP servers can lead to users blocked
dee830
Patch2000: jdk8275535-rh2053256-ldap_auth.patch
dee830
dee830
#############################################
dee830
#
dee830
# OpenJDK patches appearing in 17.0.1
dee830
#
dee830
#############################################
dee830
dee830
BuildRequires: autoconf
dee830
BuildRequires: automake
dee830
BuildRequires: alsa-lib-devel
dee830
BuildRequires: binutils
dee830
BuildRequires: cups-devel
dee830
BuildRequires: desktop-file-utils
dee830
# elfutils only are OK for build without AOT
dee830
BuildRequires: elfutils-devel
dee830
BuildRequires: fontconfig-devel
dee830
BuildRequires: freetype-devel
dee830
BuildRequires: giflib-devel
dee830
BuildRequires: gcc-c++
dee830
BuildRequires: gdb
dee830
BuildRequires: harfbuzz-devel
dee830
BuildRequires: lcms2-devel
dee830
BuildRequires: libjpeg-devel
dee830
BuildRequires: libpng-devel
dee830
BuildRequires: libxslt
dee830
BuildRequires: libX11-devel
dee830
BuildRequires: libXi-devel
dee830
BuildRequires: libXinerama-devel
dee830
BuildRequires: libXrandr-devel
dee830
BuildRequires: libXrender-devel
dee830
BuildRequires: libXt-devel
dee830
BuildRequires: libXtst-devel
dee830
# Requirement for setting up nss.cfg and nss.fips.cfg
dee830
BuildRequires: nss-devel
dee830
BuildRequires: pkgconfig
dee830
BuildRequires: xorg-x11-proto-devel
dee830
BuildRequires: zip
dee830
BuildRequires: javapackages-filesystem
dee830
BuildRequires: java-17-openjdk-devel
dee830
# Zero-assembler build requirement
dee830
%ifarch %{zero_arches}
dee830
BuildRequires: libffi-devel
dee830
%endif
dee830
BuildRequires: tzdata-java >= 2015d
dee830
# Earlier versions have a bug in tree vectorization on PPC
dee830
BuildRequires: gcc >= 4.8.3-8
dee830
dee830
%if %{with_systemtap}
dee830
BuildRequires: systemtap-sdt-devel
dee830
%endif
dee830
BuildRequires: make
dee830
dee830
# this is always built, also during debug-only build
dee830
# when it is built in debug-only this package is just placeholder
dee830
%{java_rpo %{nil}}
dee830
dee830
%description
dee830
The %{origin_nice} %{featurever} runtime environment.
dee830
dee830
%if %{include_debug_build}
dee830
%package slowdebug
dee830
Summary: %{origin_nice} %{featurever} Runtime Environment %{debug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_rpo -- %{debug_suffix_unquoted}}
dee830
%description slowdebug
dee830
The %{origin_nice} %{featurever} runtime environment.
dee830
%{debug_warning}
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%package fastdebug
dee830
Summary: %{origin_nice} %{featurever} Runtime Environment %{fastdebug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_rpo -- %{fastdebug_suffix_unquoted}}
dee830
%description fastdebug
dee830
The %{origin_nice} %{featurever} runtime environment.
dee830
%{fastdebug_warning}
dee830
%endif
dee830
dee830
%if %{include_normal_build}
dee830
%package headless
dee830
Summary: %{origin_nice} %{featurever} Headless Runtime Environment
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_headless_rpo %{nil}}
dee830
dee830
%description headless
dee830
The %{origin_nice} %{featurever} runtime environment without audio and video support.
dee830
%endif
dee830
dee830
%if %{include_debug_build}
dee830
%package headless-slowdebug
dee830
Summary: %{origin_nice} %{featurever} Runtime Environment %{debug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_headless_rpo -- %{debug_suffix_unquoted}}
dee830
dee830
%description headless-slowdebug
dee830
The %{origin_nice} %{featurever} runtime environment without audio and video support.
dee830
%{debug_warning}
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%package headless-fastdebug
dee830
Summary: %{origin_nice} %{featurever} Runtime Environment %{fastdebug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_headless_rpo -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%description headless-fastdebug
dee830
The %{origin_nice} %{featurever} runtime environment without audio and video support.
dee830
%{fastdebug_warning}
dee830
%endif
dee830
dee830
%if %{include_normal_build}
dee830
%package devel
dee830
Summary: %{origin_nice} %{featurever} Development Environment
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_devel_rpo %{nil}}
dee830
dee830
%description devel
dee830
The %{origin_nice} %{featurever} development tools.
dee830
%endif
dee830
dee830
%if %{include_debug_build}
dee830
%package devel-slowdebug
dee830
Summary: %{origin_nice} %{featurever} Development Environment %{debug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_devel_rpo -- %{debug_suffix_unquoted}}
dee830
dee830
%description devel-slowdebug
dee830
The %{origin_nice} %{featurever} development tools.
dee830
%{debug_warning}
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%package devel-fastdebug
dee830
Summary: %{origin_nice} %{featurever} Development Environment %{fastdebug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Tools
dee830
%endif
dee830
dee830
%{java_devel_rpo -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%description devel-fastdebug
dee830
The %{origin_nice} %{featurever} development tools              .
dee830
%{fastdebug_warning}
dee830
%endif
dee830
dee830
%if %{include_staticlibs}
dee830
dee830
%if %{include_normal_build}
dee830
%package static-libs
dee830
Summary: %{origin_nice} %{featurever} libraries for static linking
dee830
dee830
%{java_static_libs_rpo %{nil}}
dee830
dee830
%description static-libs
dee830
The %{origin_nice} %{featurever} libraries for static linking.
dee830
%endif
dee830
dee830
%if %{include_debug_build}
dee830
%package static-libs-slowdebug
dee830
Summary: %{origin_nice} %{featurever} libraries for static linking %{debug_on}
dee830
dee830
%{java_static_libs_rpo -- %{debug_suffix_unquoted}}
dee830
dee830
%description static-libs-slowdebug
dee830
The %{origin_nice} %{featurever} libraries for static linking.
dee830
%{debug_warning}
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%package static-libs-fastdebug
dee830
Summary: %{origin_nice} %{featurever} libraries for static linking %{fastdebug_on}
dee830
dee830
%{java_static_libs_rpo -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%description static-libs-fastdebug
dee830
The %{origin_nice} %{featurever} libraries for static linking.
dee830
%{fastdebug_warning}
dee830
%endif
dee830
dee830
# staticlibs
dee830
%endif
dee830
dee830
%if %{include_normal_build}
dee830
%package jmods
dee830
Summary: JMods for %{origin_nice} %{featurever}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_jmods_rpo %{nil}}
dee830
dee830
%description jmods
dee830
The JMods for %{origin_nice} %{featurever}.
dee830
%endif
dee830
dee830
%if %{include_debug_build}
dee830
%package jmods-slowdebug
dee830
Summary: JMods for %{origin_nice} %{featurever} %{debug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_jmods_rpo -- %{debug_suffix_unquoted}}
dee830
dee830
%description jmods-slowdebug
dee830
The JMods for %{origin_nice} %{featurever}.
dee830
%{debug_warning}
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%package jmods-fastdebug
dee830
Summary: JMods for %{origin_nice} %{featurever} %{fastdebug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Tools
dee830
%endif
dee830
dee830
%{java_jmods_rpo -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%description jmods-fastdebug
dee830
The JMods for %{origin_nice} %{featurever}.
dee830
%{fastdebug_warning}
dee830
%endif
dee830
dee830
%if %{include_normal_build}
dee830
%package demo
dee830
Summary: %{origin_nice} %{featurever} Demos
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_demo_rpo %{nil}}
dee830
dee830
%description demo
dee830
The %{origin_nice} %{featurever} demos.
dee830
%endif
dee830
dee830
%if %{include_debug_build}
dee830
%package demo-slowdebug
dee830
Summary: %{origin_nice} %{featurever} Demos %{debug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_demo_rpo -- %{debug_suffix_unquoted}}
dee830
dee830
%description demo-slowdebug
dee830
The %{origin_nice} %{featurever} demos.
dee830
%{debug_warning}
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%package demo-fastdebug
dee830
Summary: %{origin_nice} %{featurever} Demos %{fastdebug_on}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_demo_rpo -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%description demo-fastdebug
dee830
The %{origin_nice} %{featurever} demos.
dee830
%{fastdebug_warning}
dee830
%endif
dee830
dee830
%if %{include_normal_build}
dee830
%package src
dee830
Summary: %{origin_nice} %{featurever} Source Bundle
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_src_rpo %{nil}}
dee830
dee830
%description src
dee830
The %{compatiblename}-src sub-package contains the complete %{origin_nice} %{featurever}
dee830
class library source code for use by IDE indexers and debuggers.
dee830
%endif
dee830
dee830
%if %{include_debug_build}
dee830
%package src-slowdebug
dee830
Summary: %{origin_nice} %{featurever} Source Bundle %{for_debug}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_src_rpo -- %{debug_suffix_unquoted}}
dee830
dee830
%description src-slowdebug
dee830
The %{compatiblename}-src-slowdebug sub-package contains the complete %{origin_nice} %{featurever}
dee830
 class library source code for use by IDE indexers and debuggers, %{for_debug}.
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%package src-fastdebug
dee830
Summary: %{origin_nice} %{featurever} Source Bundle %{for_fastdebug}
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Development/Languages
dee830
%endif
dee830
dee830
%{java_src_rpo -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%description src-fastdebug
dee830
The %{compatiblename}-src-fastdebug sub-package contains the complete %{origin_nice} %{featurever}
dee830
 class library source code for use by IDE indexers and debuggers, %{for_fastdebug}.
dee830
%endif
dee830
dee830
%if %{include_normal_build}
dee830
%package javadoc
dee830
Summary: %{origin_nice} %{featurever} API documentation
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Documentation
dee830
%endif
dee830
Requires: javapackages-filesystem
dee830
Obsoletes: javadoc-slowdebug < 1:13.0.0.33-1.rolling
dee830
dee830
%{java_javadoc_rpo -- %{nil} %{nil}}
dee830
dee830
%description javadoc
dee830
The %{origin_nice} %{featurever} API documentation.
dee830
%endif
dee830
dee830
%if %{include_normal_build}
dee830
%package javadoc-zip
dee830
Summary: %{origin_nice} %{featurever} API documentation compressed in a single archive
dee830
%if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30)
dee830
Group:   Documentation
dee830
%endif
dee830
Requires: javapackages-filesystem
dee830
Obsoletes: javadoc-zip-slowdebug < 1:13.0.0.33-1.rolling
dee830
dee830
%{java_javadoc_rpo -- %{nil} -zip}
dee830
%{java_javadoc_rpo -- %{nil} %{nil}}
dee830
dee830
%description javadoc-zip
dee830
The %{origin_nice} %{featurever} API documentation compressed in a single archive.
dee830
%endif
dee830
dee830
%prep
dee830
dee830
# Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-(
dee830
%if 0%{?stapinstall:1}
dee830
  echo "CPU: %{_target_cpu}, arch install directory: %{archinstall}, SystemTap install directory: %{stapinstall}"
dee830
%else
dee830
  %{error:Unrecognised architecture %{_target_cpu}}
dee830
%endif
dee830
dee830
if [ %{include_normal_build} -eq 0 -o  %{include_normal_build} -eq 1 ] ; then
dee830
  echo "include_normal_build is %{include_normal_build}"
dee830
else
dee830
  echo "include_normal_build is %{include_normal_build}, that is invalid. Use 1 for yes or 0 for no"
dee830
  exit 11
dee830
fi
dee830
if [ %{include_debug_build} -eq 0 -o  %{include_debug_build} -eq 1 ] ; then
dee830
  echo "include_debug_build is %{include_debug_build}"
dee830
else
dee830
  echo "include_debug_build is %{include_debug_build}, that is invalid. Use 1 for yes or 0 for no"
dee830
  exit 12
dee830
fi
dee830
if [ %{include_fastdebug_build} -eq 0 -o  %{include_fastdebug_build} -eq 1 ] ; then
dee830
  echo "include_fastdebug_build is %{include_fastdebug_build}"
dee830
else
dee830
  echo "include_fastdebug_build is %{include_fastdebug_build}, that is invalid. Use 1 for yes or 0 for no"
dee830
  exit 13
dee830
fi
dee830
if [ %{include_debug_build} -eq 0 -a  %{include_normal_build} -eq 0 -a  %{include_fastdebug_build} -eq 0 ] ; then
dee830
  echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no go."
dee830
  exit 14
dee830
fi
dee830
%setup -q -c -n %{uniquesuffix ""} -T -a 0
dee830
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084
dee830
prioritylength=`expr length %{priority}`
dee830
if [ $prioritylength -ne 8 ] ; then
dee830
 echo "priority must be 8 digits in total, violated"
dee830
 exit 14
dee830
fi
dee830
dee830
# OpenJDK patches
dee830
# Remove libraries that are linked by both static and dynamic builds
dee830
sh %{SOURCE12} %{top_level_dir_name}
dee830
dee830
# Patch the JDK
dee830
pushd %{top_level_dir_name}
dee830
%patch1 -p1
dee830
%patch2 -p1
dee830
%patch3 -p1
dee830
%patch4 -p1
dee830
%patch5 -p1
dee830
%patch6 -p1
dee830
popd # openjdk
dee830
dee830
%patch1000
dee830
%patch600
dee830
%patch1001
dee830
%patch1002
dee830
%patch1004
dee830
%patch1007
dee830
%patch1008
dee830
%patch1009
dee830
%patch1010
dee830
%patch1011
dee830
%patch1012
dee830
%patch1013
dee830
%patch1014
dee830
%patch1015
dee830
%patch1016
dee830
%patch1017
dee830
%patch1018
dee830
dee830
%patch2000
dee830
dee830
# Extract systemtap tapsets
dee830
%if %{with_systemtap}
dee830
tar --strip-components=1 -x -I xz -f %{SOURCE8}
dee830
%if %{include_debug_build}
dee830
cp -r tapset tapset%{debug_suffix}
dee830
%endif
dee830
%if %{include_fastdebug_build}
dee830
cp -r tapset tapset%{fastdebug_suffix}
dee830
%endif
dee830
dee830
for suffix in %{build_loop} ; do
dee830
  for file in "tapset"$suffix/*.in; do
dee830
    OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"`
dee830
    sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/server/libjvm.so:g" $file > $file.1
dee830
    sed -e "s:@JAVA_SPEC_VER@:%{javaver}:g" $file.1 > $file.2
dee830
# TODO find out which architectures other than i686 have a client vm
dee830
%ifarch %{ix86}
dee830
    sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" $file.2 > $OUTPUT_FILE
dee830
%else
dee830
    sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.2 > $OUTPUT_FILE
dee830
%endif
dee830
    sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE
dee830
    sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE
dee830
    sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE
dee830
  done
dee830
done
dee830
# systemtap tapsets ends
dee830
%endif
dee830
dee830
# Prepare desktop files
dee830
# The _X_ syntax indicates variables that are replaced by make upstream
dee830
# The @X@ syntax indicates variables that are replaced by configure upstream
dee830
for suffix in %{build_loop} ; do
dee830
for file in %{SOURCE9}; do
dee830
    FILE=`basename $file | sed -e s:\.in$::g`
dee830
    EXT="${FILE##*.}"
dee830
    NAME="${FILE%.*}"
dee830
    OUTPUT_FILE=$NAME$suffix.$EXT
dee830
    sed    -e  "s:_SDKBINDIR_:%{sdkbindir -- $suffix}:g" $file > $OUTPUT_FILE
dee830
    sed -i -e  "s:@target_cpu@:%{_arch}:g" $OUTPUT_FILE
dee830
    sed -i -e  "s:@OPENJDK_VER@:%{version}-%{release}.%{_arch}$suffix:g" $OUTPUT_FILE
dee830
    sed -i -e  "s:@JAVA_VER@:%{javaver}:g" $OUTPUT_FILE
dee830
    sed -i -e  "s:@JAVA_VENDOR@:%{origin}:g" $OUTPUT_FILE
dee830
done
dee830
done
dee830
dee830
# Setup nss.cfg
dee830
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
dee830
dee830
# Setup nss.fips.cfg
dee830
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE17} > nss.fips.cfg
dee830
dee830
%build
dee830
# How many CPU's do we have?
dee830
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
dee830
export NUM_PROC=${NUM_PROC:-1}
dee830
%if 0%{?_smp_ncpus_max}
dee830
# Honor %%_smp_ncpus_max
dee830
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
dee830
%endif
dee830
dee830
%ifarch s390x sparc64 alpha %{power64} %{aarch64}
dee830
export ARCH_DATA_MODEL=64
dee830
%endif
dee830
%ifarch alpha
dee830
export CFLAGS="$CFLAGS -mieee"
dee830
%endif
dee830
dee830
# We use ourcppflags because the OpenJDK build seems to
dee830
# pass EXTRA_CFLAGS to the HotSpot C++ compiler...
dee830
# Explicitly set the C++ standard as the default has changed on GCC >= 6
dee830
EXTRA_CFLAGS="%ourcppflags"
dee830
EXTRA_CPP_FLAGS="%ourcppflags"
dee830
dee830
%ifarch %{power64} ppc
dee830
# fix rpmlint warnings
dee830
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
dee830
%endif
dee830
%ifarch %{ix86}
dee830
# Align stack boundary on x86_32
dee830
EXTRA_CFLAGS="$(echo ${EXTRA_CFLAGS} | sed -e 's|-mstackrealign|-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4|')"
dee830
EXTRA_CPP_FLAGS="$(echo ${EXTRA_CPP_FLAGS} | sed -e 's|-mstackrealign|-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4|')"
dee830
%endif
dee830
export EXTRA_CFLAGS EXTRA_CPP_FLAGS
dee830
dee830
function buildjdk() {
dee830
    local outputdir=${1}
dee830
    local buildjdk=${2}
dee830
    local maketargets="${3}"
dee830
    local debuglevel=${4}
dee830
    local link_opt=${5}
dee830
dee830
    local top_dir_abs_src_path=$(pwd)/%{top_level_dir_name}
dee830
    local top_dir_abs_build_path=$(pwd)/${outputdir}
dee830
dee830
    # The OpenJDK version file includes the current
dee830
    # upstream version information. For some reason,
dee830
    # configure does not automatically use the
dee830
    # default pre-version supplied there (despite
dee830
    # what the file claims), so we pass it manually
dee830
    # to configure
dee830
    VERSION_FILE=${top_dir_abs_src_path}/make/conf/version-numbers.conf
dee830
    if [ -f ${VERSION_FILE} ] ; then
dee830
      EA_DESIGNATOR=$(grep '^DEFAULT_PROMOTED_VERSION_PRE' ${VERSION_FILE} | cut -d '=' -f 2)
dee830
    else
dee830
      echo "Could not find OpenJDK version file.";
dee830
      exit 16
dee830
    fi
dee830
    if [ "x${EA_DESIGNATOR}" != "x%{expected_ea_designator}" ] ; then
dee830
      echo "Spec file is configured for a %{build_type} build, but upstream version-pre setting is ${EA_DESIGNATOR}";
dee830
      exit 17
dee830
    fi
dee830
dee830
    echo "Using output directory: ${outputdir}";
dee830
    echo "Checking build JDK ${buildjdk} is operational..."
dee830
    ${buildjdk}/bin/java -version
dee830
    echo "Using make targets: ${maketargets}"
dee830
    echo "Using debuglevel: ${debuglevel}"
dee830
    echo "Using link_opt: ${link_opt}"
dee830
    echo "Building %{newjavaver}-%{buildver}, pre=${EA_DESIGNATOR}, opt=%{lts_designator}"
dee830
dee830
    mkdir -p ${outputdir}
dee830
    pushd ${outputdir}
dee830
dee830
    bash ${top_dir_abs_src_path}/configure \
dee830
%ifarch %{zero_arches}
dee830
    --with-jvm-variants=zero \
dee830
%endif
dee830
%ifarch %{ppc64le}
dee830
    --with-jobs=1 \
dee830
%endif
dee830
    --with-version-build=%{buildver} \
dee830
    --with-version-pre="${EA_DESIGNATOR}" \
dee830
    --with-version-opt=%{lts_designator} \
dee830
    --with-vendor-version-string="%{vendor_version_string}" \
dee830
    --with-vendor-name="Red Hat, Inc." \
dee830
    --with-vendor-url="https://www.redhat.com/" \
dee830
    --with-vendor-bug-url="%{bugs}" \
dee830
    --with-vendor-vm-bug-url="%{bugs}" \
dee830
    --with-boot-jdk=${buildjdk} \
dee830
    --with-debug-level=${debuglevel} \
dee830
    --with-native-debug-symbols="%{debug_symbols}" \
dee830
    --disable-sysconf-nss \
dee830
    --enable-unlimited-crypto \
dee830
    --with-zlib=system \
dee830
    --with-libjpeg=${link_opt} \
dee830
    --with-giflib=${link_opt} \
dee830
    --with-libpng=${link_opt} \
dee830
    --with-lcms=${link_opt} \
dee830
    --with-harfbuzz=${link_opt} \
dee830
    --with-stdc++lib=dynamic \
dee830
    --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
dee830
    --with-extra-cflags="$EXTRA_CFLAGS" \
dee830
    --with-extra-ldflags="%{ourldflags}" \
dee830
    --with-num-cores="$NUM_PROC" \
dee830
    --with-source-date="${SOURCE_DATE_EPOCH}" \
dee830
    --disable-javac-server \
dee830
%ifarch %{zgc_arches}
dee830
    --with-jvm-features=zgc \
dee830
%endif
dee830
    --disable-warnings-as-errors
dee830
dee830
    cat spec.gmk
dee830
dee830
    make \
dee830
      LOG=trace \
dee830
      WARNINGS_ARE_ERRORS="-Wno-error" \
dee830
      CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error" \
dee830
      $maketargets || ( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name "hs_err_pid*.log" | xargs cat && false )
dee830
dee830
    popd
dee830
}
dee830
dee830
function installjdk() {
dee830
    local imagepath=${1}
dee830
dee830
    if [ -d ${imagepath} ] ; then
dee830
	# the build (erroneously) removes read permissions from some jars
dee830
	# this is a regression in OpenJDK 7 (our compiler):
dee830
	# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
dee830
	find ${imagepath} -iname '*.jar' -exec chmod ugo+r {} \;
dee830
dee830
	# Build screws up permissions on binaries
dee830
	# https://bugs.openjdk.java.net/browse/JDK-8173610
dee830
	find ${imagepath} -iname '*.so' -exec chmod +x {} \;
dee830
	find ${imagepath}/bin/ -exec chmod +x {} \;
dee830
dee830
	# Install nss.cfg right away as we will be using the JRE above
dee830
	install -m 644 nss.cfg ${imagepath}/conf/security/
dee830
dee830
	# Install nss.fips.cfg: NSS configuration for global FIPS mode (crypto-policies)
dee830
	install -m 644 nss.fips.cfg ${imagepath}/conf/security/
dee830
dee830
	# Use system-wide tzdata
dee830
	rm ${imagepath}/lib/tzdb.dat
dee830
	ln -s %{_datadir}/javazi-1.8/tzdb.dat ${imagepath}/lib/tzdb.dat
dee830
dee830
	# Create fake alt-java as a placeholder for future alt-java
dee830
	pushd ${imagepath}
dee830
	# add alt-java man page
dee830
	echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > man/man1/%{alt_java_name}.1
dee830
	cat man/man1/java.1 >> man/man1/%{alt_java_name}.1
dee830
	popd
dee830
    fi
dee830
}
dee830
dee830
%if %{build_hotspot_first}
dee830
  # Build a fresh libjvm.so first and use it to bootstrap
dee830
  cp -LR --preserve=mode,timestamps %{bootjdk} newboot
dee830
  systemjdk=$(pwd)/newboot
dee830
  buildjdk build/newboot ${systemjdk} %{hotspot_target} "release" "bundled"
dee830
  mv build/newboot/jdk/lib/server/libjvm.so newboot/lib/server
dee830
%else
dee830
  systemjdk=%{bootjdk}
dee830
%endif
dee830
dee830
for suffix in %{build_loop} ; do
dee830
dee830
  if [ "x$suffix" = "x" ] ; then
dee830
      debugbuild=release
dee830
  else
dee830
      # change --something to something
dee830
      debugbuild=`echo $suffix  | sed "s/-//g"`
dee830
  fi
dee830
dee830
dee830
  for loop in %{main_suffix} %{staticlibs_loop} ; do
dee830
dee830
    builddir=%{buildoutputdir -- ${suffix}${loop}}
dee830
    bootbuilddir=boot${builddir}
dee830
dee830
    if test "x${loop}" = "x%{main_suffix}" ; then
dee830
      # Copy the source tree so we can remove all in-tree libraries
dee830
      cp -a %{top_level_dir_name} %{top_level_dir_name_backup}
dee830
      # Remove all libraries that are linked
dee830
      sh %{SOURCE12} %{top_level_dir_name} full
dee830
      # Use system libraries
dee830
      link_opt="system"
dee830
      # Debug builds don't need same targets as release for
dee830
      # build speed-up. We also avoid bootstrapping these
dee830
      # slower builds.
dee830
      if echo $debugbuild | grep -q "debug" ; then
dee830
        maketargets="%{debug_targets}"
dee830
        run_bootstrap=false
dee830
      else
dee830
        maketargets="%{release_targets}"
dee830
        run_bootstrap=%{bootstrap_build}
dee830
      fi
dee830
      if ${run_bootstrap} ; then
dee830
        buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild} ${link_opt}
dee830
        buildjdk ${builddir} $(pwd)/${bootbuilddir}/images/%{jdkimage} "${maketargets}" ${debugbuild} ${link_opt}
dee830
        rm -rf ${bootbuilddir}
dee830
      else
dee830
        buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt}
dee830
      fi
dee830
      # Restore original source tree we modified by removing full in-tree sources
dee830
      rm -rf %{top_level_dir_name}
dee830
      mv %{top_level_dir_name_backup} %{top_level_dir_name}
dee830
    else
dee830
      # Use bundled libraries for building statically
dee830
      link_opt="bundled"
dee830
      # Static library cycle only builds the static libraries
dee830
      maketargets="%{static_libs_target}"
dee830
      # Always just do the one build for the static libraries
dee830
      buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt}
dee830
    fi
dee830
dee830
  done # end of main / staticlibs loop
dee830
dee830
  # Final setup on the main image
dee830
  top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
dee830
  installjdk ${top_dir_abs_main_build_path}/images/%{jdkimage}
dee830
dee830
# build cycles
dee830
done # end of release / debug cycle loop
dee830
dee830
%check
dee830
dee830
# We test debug first as it will give better diagnostics on a crash
dee830
for suffix in %{build_loop} ; do
dee830
dee830
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
dee830
%if %{include_staticlibs}
dee830
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}}
dee830
%endif
dee830
dee830
export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage}
dee830
dee830
#check Shenandoah is enabled
dee830
%if %{use_shenandoah_hotspot}
dee830
$JAVA_HOME//bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -version
dee830
%endif
dee830
dee830
# Check unlimited policy has been used
dee830
$JAVA_HOME/bin/javac -d . %{SOURCE13}
dee830
$JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel
dee830
dee830
# Check ECC is working
dee830
$JAVA_HOME/bin/javac -d . %{SOURCE14}
dee830
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
dee830
dee830
# Check system crypto (policy) can be disabled
dee830
$JAVA_HOME/bin/javac -d . %{SOURCE15}
dee830
$JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename %{SOURCE15})|sed "s|\.java||")
dee830
dee830
# Check java launcher has no SSB mitigation
dee830
if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi
dee830
dee830
# Check alt-java launcher has SSB mitigation on supported architectures
dee830
%ifarch %{ssbd_arches}
dee830
nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation
dee830
%else
dee830
if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi
dee830
%endif
dee830
dee830
%if %{include_staticlibs}
dee830
# Check debug symbols in static libraries (smoke test)
dee830
export STATIC_LIBS_HOME=${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}
dee830
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c
dee830
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c
dee830
%endif
dee830
dee830
so_suffix="so"
dee830
# Check debug symbols are present and can identify code
dee830
find "$JAVA_HOME" -iname "*.$so_suffix" -print0 | while read -d $'\0' lib
dee830
do
dee830
  if [ -f "$lib" ] ; then
dee830
    echo "Testing $lib for debug symbols"
dee830
    # All these tests rely on RPM failing the build if the exit code of any set
dee830
    # of piped commands is non-zero.
dee830
dee830
    # Test for .debug_* sections in the shared object. This is the main test
dee830
    # Stripped objects will not contain these
dee830
    eu-readelf -S "$lib" | grep "] .debug_"
dee830
    test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
dee830
dee830
    # Test FILE symbols. These will most likely be removed by anything that
dee830
    # manipulates symbol tables because it's generally useless. So a nice test
dee830
    # that nothing has messed with symbols
dee830
    old_IFS="$IFS"
dee830
    IFS=$'\n'
dee830
    for line in $(eu-readelf -s "$lib" | grep "00000000      0 FILE    LOCAL  DEFAULT")
dee830
    do
dee830
     # We expect to see .cpp files, except for architectures like aarch64 and
dee830
     # s390 where we expect .o and .oS files
dee830
      echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
dee830
    done
dee830
    IFS="$old_IFS"
dee830
dee830
    # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking
dee830
    if [ "`basename $lib`" = "libjvm.so" ]; then
dee830
      eu-readelf -s "$lib" | \
dee830
        grep -E "00000000      0 FILE    LOCAL  DEFAULT      ABS javaCalls.(cpp|o)$"
dee830
    fi
dee830
dee830
    # Test that there are no .gnu_debuglink sections pointing to another
dee830
    # debuginfo file. There shouldn't be any debuginfo files, so the link makes
dee830
    # no sense either
dee830
    eu-readelf -S "$lib" | grep 'gnu'
dee830
    if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
dee830
      echo "bad .gnu_debuglink section."
dee830
      eu-readelf -x .gnu_debuglink "$lib"
dee830
      false
dee830
    fi
dee830
  fi
dee830
done
dee830
dee830
# Make sure gdb can do a backtrace based on line numbers on libjvm.so
dee830
# javaCalls.cpp:58 should map to:
dee830
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58
dee830
# Using line number 1 might cause build problems. See:
dee830
# https://bugzilla.redhat.com/show_bug.cgi?id=1539664
dee830
# https://bugzilla.redhat.com/show_bug.cgi?id=1538767
dee830
gdb -q "$JAVA_HOME/bin/java" <
dee830
handle SIGSEGV pass nostop noprint
dee830
handle SIGILL pass nostop noprint
dee830
set breakpoint pending on
dee830
break javaCalls.cpp:58
dee830
commands 1
dee830
backtrace
dee830
quit
dee830
end
dee830
run -version
dee830
EOF
dee830
dee830
%ifarch %{gdb_arches}
dee830
grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
dee830
%endif
dee830
dee830
# Check src.zip has all sources. See RHBZ#1130490
dee830
unzip -l $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe'
dee830
dee830
# Check class files include useful debugging information
dee830
$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
dee830
$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
dee830
$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
dee830
dee830
# Check generated class files include useful debugging information
dee830
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
dee830
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
dee830
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
dee830
dee830
# build cycles check
dee830
done
dee830
dee830
%install
dee830
STRIP_KEEP_SYMTAB=libjvm*
dee830
dee830
for suffix in %{build_loop} ; do
dee830
dee830
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
dee830
%if %{include_staticlibs}
dee830
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}}
dee830
%endif
dee830
jdk_image=${top_dir_abs_main_build_path}/images/%{jdkimage}
dee830
dee830
# Install the jdk
dee830
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}
dee830
cp -a ${jdk_image} $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
dee830
dee830
pushd ${jdk_image}
dee830
dee830
%if %{with_systemtap}
dee830
  # Install systemtap support files
dee830
  install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
dee830
  # note, that uniquesuffix  is in BUILD dir in this case
dee830
  cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
dee830
  pushd  $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
dee830
   tapsetFiles=`ls *.stp`
dee830
  popd
dee830
  install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
dee830
  for name in $tapsetFiles ; do
dee830
    targetName=`echo $name | sed "s/.stp/$suffix.stp/"`
dee830
    ln -sf %{_jvmdir}/%{sdkdir -- $suffix}/tapset/$name $RPM_BUILD_ROOT%{tapsetdir}/$targetName
dee830
  done
dee830
%endif
dee830
dee830
  # Remove empty cacerts database
dee830
  rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/security/cacerts
dee830
  # Install cacerts symlink needed by some apps which hard-code the path
dee830
  pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/security
dee830
      ln -sf /etc/pki/java/cacerts .
dee830
  popd
dee830
dee830
  # Install version-ed symlinks
dee830
  pushd $RPM_BUILD_ROOT%{_jvmdir}
dee830
    ln -sf %{sdkdir -- $suffix} %{jrelnk -- $suffix}
dee830
  popd
dee830
dee830
  # Install man pages
dee830
  install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
dee830
  for manpage in man/man1/*
dee830
  do
dee830
    # Convert man pages to UTF8 encoding
dee830
    iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
dee830
    mv -f $manpage.tmp $manpage
dee830
    install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
dee830
      $manpage .1)-%{uniquesuffix -- $suffix}.1
dee830
  done
dee830
  # Remove man pages from jdk image
dee830
  rm -rf $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/man
dee830
dee830
popd
dee830
# Install static libs artefacts
dee830
%if %{include_staticlibs}
dee830
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/static/linux-%{archinstall}/glibc
dee830
cp -a ${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}/lib/*.a \
dee830
  $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/static/linux-%{archinstall}/glibc
dee830
%endif
dee830
dee830
if ! echo $suffix | grep -q "debug" ; then
dee830
  # Install Javadoc documentation
dee830
  install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
dee830
  cp -a ${top_dir_abs_main_build_path}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
dee830
  built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip
dee830
  cp -a ${top_dir_abs_main_build_path}/bundles/${built_doc_archive} \
dee830
     $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip || ls -l ${top_dir_abs_main_build_path}/bundles/
dee830
fi
dee830
dee830
# Install release notes
dee830
commondocdir=${RPM_BUILD_ROOT}%{_defaultdocdir}/%{uniquejavadocdir -- $suffix}
dee830
install -d -m 755 ${commondocdir}
dee830
cp -a %{SOURCE10} ${commondocdir}
dee830
dee830
# Install icons and menu entries
dee830
for s in 16 24 32 48 ; do
dee830
  install -D -p -m 644 \
dee830
    %{top_level_dir_name}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png \
dee830
    $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}-%{origin}.png
dee830
done
dee830
dee830
# Install desktop files
dee830
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
dee830
for e in jconsole$suffix ; do
dee830
    desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \
dee830
        --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
dee830
done
dee830
dee830
# Install /etc/.java/.systemPrefs/ directory
dee830
# See https://bugzilla.redhat.com/show_bug.cgi?id=741821
dee830
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
dee830
dee830
# copy samples next to demos; samples are mostly js files
dee830
cp -r %{top_level_dir_name}/src/sample  $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/
dee830
dee830
dee830
# moving config files to /etc
dee830
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}
dee830
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib
dee830
mv $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/conf/  $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}
dee830
mv $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/lib/security  $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib
dee830
pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}
dee830
  ln -s %{etcjavadir -- $suffix}/conf  ./conf
dee830
popd
dee830
pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/lib
dee830
  ln -s %{etcjavadir -- $suffix}/lib/security  ./security
dee830
popd
dee830
# end moving files to /etc
dee830
dee830
# stabilize permissions
dee830
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "*.so" -exec chmod 755 {} \; ;
dee830
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -type d -exec chmod 755 {} \; ;
dee830
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/legal -type f -exec chmod 644 {} \; ;
dee830
dee830
# end, dual install
dee830
done
dee830
dee830
%if %{include_normal_build}
dee830
# intentionally only for non-debug
dee830
%pretrans headless -p <lua>
dee830
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
dee830
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
dee830
-- if copy-jdk-configs is in transaction, it installs in pretrans to temp
dee830
-- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in transaction  and so is
dee830
-- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
dee830
-- whether copy-jdk-configs is installed or not. If so, then configs are copied
dee830
-- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
dee830
local posix = require "posix"
dee830
dee830
if (os.getenv("debug") == "true") then
dee830
  debug = true;
dee830
  print("cjc: in spec debug is on")
dee830
else
dee830
  debug = false;
dee830
end
dee830
dee830
SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
dee830
SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
dee830
dee830
local stat1 = posix.stat(SOURCE1, "type");
dee830
local stat2 = posix.stat(SOURCE2, "type");
dee830
dee830
  if (stat1 ~= nil) then
dee830
  if (debug) then
dee830
    print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.")
dee830
  end;
dee830
  package.path = package.path .. ";" .. SOURCE1
dee830
else
dee830
  if (stat2 ~= nil) then
dee830
  if (debug) then
dee830
    print(SOURCE2 .." exists - copy-jdk-configs already installed and NOT in transaction. Using.")
dee830
  end;
dee830
  package.path = package.path .. ";" .. SOURCE2
dee830
  else
dee830
    if (debug) then
dee830
      print(SOURCE1 .." does NOT exists")
dee830
      print(SOURCE2 .." does NOT exists")
dee830
      print("No config files will be copied")
dee830
    end
dee830
  return
dee830
  end
dee830
end
dee830
arg = nil ;  -- it is better to null the arg up, no meter if they exists or not, and use cjc as module in unified way, instead of relaying on "main" method during require "copy_jdk_configs.lua"
dee830
cjc = require "copy_jdk_configs.lua"
dee830
args = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
dee830
cjc.mainProgram(args)
dee830
dee830
%post
dee830
%{post_script %{nil}}
dee830
dee830
%post headless
dee830
%{post_headless %{nil}}
dee830
dee830
%postun
dee830
%{postun_script %{nil}}
dee830
dee830
%postun headless
dee830
%{postun_headless %{nil}}
dee830
dee830
%posttrans
dee830
%{posttrans_script %{nil}}
dee830
dee830
%posttrans headless
dee830
%{alternatives_java_install %{nil}}
dee830
dee830
%post devel
dee830
%{post_devel %{nil}}
dee830
dee830
%postun devel
dee830
%{postun_devel %{nil}}
dee830
dee830
%posttrans  devel
dee830
%{posttrans_devel %{nil}}
dee830
dee830
%posttrans javadoc
dee830
%{alternatives_javadoc_install %{nil}}
dee830
dee830
%postun javadoc
dee830
%{postun_javadoc %{nil}}
dee830
dee830
%posttrans javadoc-zip
dee830
%{alternatives_javadoczip_install %{nil}}
dee830
dee830
%postun javadoc-zip
dee830
%{postun_javadoc_zip %{nil}}
dee830
%endif
dee830
dee830
%if %{include_debug_build}
dee830
%post slowdebug
dee830
%{post_script -- %{debug_suffix_unquoted}}
dee830
dee830
%post headless-slowdebug
dee830
%{post_headless -- %{debug_suffix_unquoted}}
dee830
dee830
%posttrans headless-slowdebug
dee830
%{alternatives_java_install -- %{debug_suffix_unquoted}}
dee830
dee830
%postun slowdebug
dee830
%{postun_script -- %{debug_suffix_unquoted}}
dee830
dee830
%postun headless-slowdebug
dee830
%{postun_headless -- %{debug_suffix_unquoted}}
dee830
dee830
%posttrans slowdebug
dee830
%{posttrans_script -- %{debug_suffix_unquoted}}
dee830
dee830
%post devel-slowdebug
dee830
%{post_devel -- %{debug_suffix_unquoted}}
dee830
dee830
%postun devel-slowdebug
dee830
%{postun_devel -- %{debug_suffix_unquoted}}
dee830
dee830
%posttrans  devel-slowdebug
dee830
%{posttrans_devel -- %{debug_suffix_unquoted}}
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%post fastdebug
dee830
%{post_script -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%post headless-fastdebug
dee830
%{post_headless -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%postun fastdebug
dee830
%{postun_script -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%postun headless-fastdebug
dee830
%{postun_headless -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%posttrans fastdebug
dee830
%{posttrans_script -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%posttrans headless-fastdebug
dee830
%{alternatives_java_install -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%post devel-fastdebug
dee830
%{post_devel -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%postun devel-fastdebug
dee830
%{postun_devel -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%posttrans  devel-fastdebug
dee830
%{posttrans_devel -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%endif
dee830
dee830
%if %{include_normal_build}
dee830
%files
dee830
# main package builds always
dee830
%{files_jre %{nil}}
dee830
%else
dee830
%files
dee830
# placeholder
dee830
%endif
dee830
dee830
dee830
%if %{include_normal_build}
dee830
%files headless
dee830
# important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
dee830
# all config/noreplace files (and more) have to be declared in pretrans. See pretrans
dee830
%{files_jre_headless %{nil}}
dee830
dee830
%files devel
dee830
%{files_devel %{nil}}
dee830
dee830
%if %{include_staticlibs}
dee830
%files static-libs
dee830
%{files_static_libs %{nil}}
dee830
%endif
dee830
dee830
%files jmods
dee830
%{files_jmods %{nil}}
dee830
dee830
%files demo
dee830
%{files_demo %{nil}}
dee830
dee830
%files src
dee830
%{files_src %{nil}}
dee830
dee830
%files javadoc
dee830
%{files_javadoc %{nil}}
dee830
dee830
# This puts a huge documentation file in /usr/share
dee830
# It is now architecture-dependent, as eg. AOT and Graal are now x86_64 only
dee830
# same for debug variant
dee830
%files javadoc-zip
dee830
%{files_javadoc_zip %{nil}}
dee830
%endif
dee830
dee830
%if %{include_debug_build}
dee830
%files slowdebug
dee830
%{files_jre -- %{debug_suffix_unquoted}}
dee830
dee830
%files headless-slowdebug
dee830
%{files_jre_headless -- %{debug_suffix_unquoted}}
dee830
dee830
%files devel-slowdebug
dee830
%{files_devel -- %{debug_suffix_unquoted}}
dee830
dee830
%if %{include_staticlibs}
dee830
%files static-libs-slowdebug
dee830
%{files_static_libs -- %{debug_suffix_unquoted}}
dee830
%endif
dee830
dee830
%files jmods-slowdebug
dee830
%{files_jmods -- %{debug_suffix_unquoted}}
dee830
dee830
%files demo-slowdebug
dee830
%{files_demo -- %{debug_suffix_unquoted}}
dee830
dee830
%files src-slowdebug
dee830
%{files_src -- %{debug_suffix_unquoted}}
dee830
%endif
dee830
dee830
%if %{include_fastdebug_build}
dee830
%files fastdebug
dee830
%{files_jre -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%files headless-fastdebug
dee830
%{files_jre_headless -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%files devel-fastdebug
dee830
%{files_devel -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%if %{include_staticlibs}
dee830
%files static-libs-fastdebug
dee830
%{files_static_libs -- %{fastdebug_suffix_unquoted}}
dee830
%endif
dee830
dee830
%files jmods-fastdebug
dee830
%{files_jmods -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%files demo-fastdebug
dee830
%{files_demo -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%files src-fastdebug
dee830
%{files_src -- %{fastdebug_suffix_unquoted}}
dee830
dee830
%endif
dee830
dee830
%changelog
dee830
* Mon Feb 28 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-13
dee830
- Enable AlgorithmParameters and AlgorithmParameterGenerator services in FIPS mode
dee830
- Resolves: rhbz#2055383
dee830
dee830
* Mon Feb 28 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-12
dee830
- Add rpminspect.yaml to turn off Java bytecode inspections
dee830
- java-17-openjdk deliberately produces Java 17 bytecode, not the default Java 11 bytecode
dee830
- Resolves: rhbz#2023540
dee830
dee830
* Sun Feb 27 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-11
dee830
- Introduce tests/tests.yml, based on the one in java-11-openjdk
dee830
- Resolves: rhbz#2058490
dee830
dee830
* Fri Feb 25 2022 Jiri Vanek <jvanek@redhat.com> - 1:17.0.2.0.8-10
dee830
- Storing and restoring alterntives during update manually
dee830
- Fixing Bug 2001567 - update of JDK/JRE is removing its manually selected alterantives and select (as auto) system JDK/JRE
dee830
-- The move of alternatives creation to posttrans to fix:
dee830
-- Bug 1200302 - dnf reinstall breaks alternatives
dee830
-- Had caused the alternatives to be removed, and then created again,
dee830
-- instead of being added, and then removing the old, and thus persisting
dee830
-- the selection in family
dee830
-- Thus this fix, is storing the family of manually selected master, and if
dee830
-- stored, then it is restoring the family of the master
dee830
- Resolves: rhbz#2008206
dee830
dee830
* Fri Feb 25 2022 Jiri Vanek <jvanek@redhat.com> - 1:17.0.2.0.8-9
dee830
- Family extracted to globals
dee830
- Related: rhbz#2008206
dee830
dee830
* Wed Feb 23 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-8
dee830
- Detect NSS at runtime for FIPS detection
dee830
- Turn off build-time NSS linking and go back to an explicit Requires on NSS
dee830
- Resolves: rhbz#2052829
dee830
dee830
* Wed Feb 23 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-7
dee830
- Add JDK-8275535 patch to fix LDAP authentication issue.
dee830
- Resolves: rhbz#2053521
dee830
dee830
* Mon Feb 21 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-6
dee830
- Separate crypto policy initialisation from FIPS initialisation, now they are no longer interdependent
dee830
- Resolves: rhbz#2052819
dee830
dee830
* Fri Feb 18 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-5
dee830
- Fix FIPS issues in native code and with initialisation of java.security.Security
dee830
- Resolves: rhbz#2023531
dee830
dee830
* Thu Feb 17 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-4
dee830
- Restructure the build so a minimal initial build is then used for the final build (with docs)
dee830
- This reduces pressure on the system JDK and ensures the JDK being built can do a full build
dee830
- Turn off bootstrapping for slow debug builds, which are particularly slow on ppc64le.
dee830
- Handle Fedora in distro conditionals that currently only pertain to RHEL.
dee830
- Run OpenJDK normalizer script on the spec file to fix further rogue whitespace
dee830
- Sync gdb test with java-1.8.0-openjdk and improve architecture restrictions.
dee830
- Introduce stapinstall variable to set SystemTap arch directory correctly (e.g. arm64 on aarch64)
dee830
- Need to support noarch for creating source RPMs for non-scratch builds.
dee830
- Replace -mstackrealign with -mincoming-stack-boundary=2 -mpreferred-stack-boundary=4 on x86_32 for stack alignment
dee830
- Support a HotSpot-only build so a freshly built libjvm.so can then be used in the bootstrap JDK.
dee830
- Explicitly list JIT architectures rather than relying on those with slowdebug builds
dee830
- Disable the serviceability agent on Zero architectures even when the architecture itself is supported
dee830
- Resolves: rhbz#2022826
dee830
dee830
* Thu Feb 17 2022 Jiri Vanek <jvanek@redhat.com> - 1:17.0.2.0.8-4
dee830
- Replaced tabs by sets of spaces to make rpmlint happy
dee830
- javadoc-zip gets its own provides next to plain javadoc ones
dee830
- Resolves: rhbz#2022826
dee830
dee830
* Wed Feb 16 2022 Jiri Vanek <jvanek@redhat.com> - 1:17.0.2.0.8-3
dee830
- Minor cosmetic improvements to make spec more comparable between variants
dee830
- Related: rhbz#2022826
dee830
dee830
* Wed Feb 16 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-2
dee830
- Update tapsets from IcedTea 6.x repository with fix for JDK-8015774 changes (_heap->_heaps) and @JAVA_SPEC_VER@
dee830
- Update icedtea_sync.sh with a VCS mode that retrieves sources from a Mercurial repository
dee830
- Related: rhbz#2022826
dee830
dee830
* Fri Feb 11 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-1
dee830
- January 2022 security update to jdk 17.0.2+8
dee830
- Rebase RH1995150 & RH1996182 patches following JDK-8275863 addition to module-info.java
dee830
- Rename libsvml.so to libjsvml.so following JDK-8276025
dee830
- Drop JDK-8276572 patch which is now upstream
dee830
- Resolves: rhbz#2039392
dee830
dee830
* Thu Feb 10 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.1.0.12-3
dee830
- Sync desktop files with upstream IcedTea release 3.15.0 using new script
dee830
- Related: rhbz#2022826
dee830
dee830
* Mon Nov 29 2021 Severin Gehwolf <sgehwolf@redhat.com> - 1:17.0.1.0.12-2
dee830
- Use 'sql:' prefix in nss.fips.cfg as F35+ no longer ship the legacy
dee830
  secmod.db file as part of nss
dee830
- Resolves: rhbz#2023537
dee830
dee830
* Tue Nov 16 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.1.0.12-1
dee830
- Drop JDK-8272332 patch now included upstream.
dee830
- Resolves: rhbz#2013846
dee830
dee830
* Tue Nov 16 2021 Petra Alice Mikova <pmikova@redhat.com> - 1:17.0.1.0.12-1
dee830
- October CPU update to jdk 17.0.1+12
dee830
- Dropped commented-out source line
dee830
- Resolves: rhbz#2013846
dee830
dee830
* Tue Nov 09 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.35-8
dee830
- Extend LTS check to exclude EPEL.
dee830
- Related: rhbz#2013846
dee830
dee830
* Tue Nov 09 2021 Severin Gehwolf <sgehwolf@redhat.com> - 1:17.0.0.0.35-8
dee830
- Set LTS designator.
dee830
- Related: rhbz#2013846
dee830
dee830
* Mon Nov 08 2021 Jiri Vanek <jvanek@redhat.com> - 1:17.0.0.0.35-7
dee830
- alternatives creation moved to posttrans
dee830
- Thus fixing the old reinstall issue:
dee830
- https://bugzilla.redhat.com/show_bug.cgi?id=1200302
dee830
- https://bugzilla.redhat.com/show_bug.cgi?id=1976053
dee830
- Resolves: rhbz#2008206
dee830
dee830
* Fri Nov 05 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.35-6
dee830
- Patch syslookup.c so it actually has some code to be compiled into libsyslookup
dee830
- Related: rhbz#2013846
dee830
dee830
* Sun Oct 10 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.35-5
dee830
- Allow plain key import to be disabled with -Dcom.redhat.fips.plainKeySupport=false
dee830
- Resolves: rhbz#1994682
dee830
dee830
* Sun Oct 10 2021 Martin Balao <mbalao@redhat.com> - 1:17.0.0.0.35-5
dee830
- Add patch to allow plain key import.
dee830
- Resolves: rhbz#1994682
dee830
dee830
* Mon Sep 27 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.35-4
dee830
- Update release notes to document the major changes between OpenJDK 11 & 17.
dee830
- Resolves: rhbz#2000925
dee830
dee830
* Thu Sep 16 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.35-3
dee830
- Update to jdk-17+35, also known as jdk-17-ga.
dee830
- Switch to GA mode.
dee830
- Add JDK-8272332 fix so we actually link against HarfBuzz.
dee830
- Resolves: rhbz#2000925
dee830
dee830
* Mon Aug 30 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.33-0.5.ea
dee830
- Extend the default security policy to accomodate PKCS11 accessing jdk.internal.access.
dee830
- Resolves: rhbz#1997359
dee830
dee830
* Sat Aug 28 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.33-0.4.ea
dee830
- Fix unused function compiler warning found in systemconf.c
dee830
- Related: rhbz#1995889
dee830
dee830
* Sat Aug 28 2021 Martin Balao <mbalao@redhat.com> - 1:17.0.0.0.33-0.4.ea
dee830
- Add patch to login to the NSS software token when in FIPS mode.
dee830
- Resolves: rhbz#1997359
dee830
dee830
* Fri Aug 27 2021 Martin Balao <mbalao@redhat.com> - 1:17.0.0.0.33-0.3.ea
dee830
- Add patch to disable non-FIPS crypto in the SUN and SunEC security providers.
dee830
- Resolves: rhbz#1995889
dee830
dee830
* Fri Aug 27 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.33-0.2.ea
dee830
- Minor code cleanups on FIPS detection patch and check for SECMOD_GetSystemFIPSEnabled in configure.
dee830
- Remove unneeded Requires on NSS as it will now be dynamically linked and detected by RPM.
dee830
- Related: rhbz#1995889
dee830
dee830
* Fri Aug 27 2021 Martin Balao <mbalao@redhat.com> - 1:17.0.0.0.33-0.2.ea
dee830
- Detect FIPS using SECMOD_GetSystemFIPSEnabled in the new libsystemconf JDK library.
dee830
- Related: rhbz#1995889
dee830
dee830
* Thu Aug 26 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.33-0.1.ea
dee830
- Update RH1655466 FIPS patch with changes in OpenJDK 8 version.
dee830
- SunPKCS11 runtime provider name is a concatenation of "SunPKCS11-" and the name in the config file.
dee830
- Change nss.fips.cfg config name to "NSS-FIPS" to avoid confusion with nss.cfg.
dee830
- No need to substitute path to nss.fips.cfg as java.security file supports a java.home variable.
dee830
- Disable FIPS mode support unless com.redhat.fips is set to "true".
dee830
- Enable alignment with FIPS crypto policy by default (-Dcom.redhat.fips=false to disable).
dee830
- Add explicit runtime dependency on NSS for the PKCS11 provider in FIPS mode
dee830
- Move setup of JavaSecuritySystemConfiguratorAccess to Security class so it always occurs (RH1915071)
dee830
- Related: rhbz#1995889
dee830
dee830
* Thu Aug 26 2021 Martin Balao <mbalao@redhat.com> - 1:17.0.0.0.33-0.1.ea
dee830
- Support the FIPS mode crypto policy (RH1655466)
dee830
- Use appropriate keystore types when in FIPS mode (RH1818909)
dee830
- Disable TLSv1.3 when the FIPS crypto policy and the NSS-FIPS provider are in use (RH1860986)
dee830
- Related: rhbz#1995889
dee830
dee830
* Thu Aug 26 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.33-0.0.ea
dee830
- Update to jdk-17+33, including JDWP fix and July 2021 CPU
dee830
- Resolves: rhbz#1870625
dee830
dee830
* Thu Aug 26 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.26-0.5.ea
dee830
- Use the "reverse" build loop (debug first) as the main and only build loop to get more diagnostics.
dee830
- Remove restriction on disabling product build, as debug packages no longer have javadoc packages.
dee830
- Resolves: rhbz#1870625
dee830
dee830
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:17.0.0.0.26-0.4.ea.1
dee830
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
dee830
  Related: rhbz#1991688
dee830
dee830
* Wed Jul 14 2021 Petra Alice Mikova <pmikova@redhat.com> - 1:17.0.0.0.26-0.4.ea
dee830
- Fix patch rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch which made the SunPKCS provider show up again
dee830
- Resolves: rhbz#1870625
dee830
dee830
* Tue Jul 13 2021 Jiri Vanek <pmikova@redhat.com> - 1:17.0.0.0.26-0.3.ea
dee830
- Add gating support
dee830
- Resolves: rhbz#1870625
dee830
dee830
* Fri Jun 25 2021 Severin Gehwolf <sgehwolf@redhat.com> - 1:17.0.0.0.26-0.2.ea
dee830
- Re-enable TestSecurityProperties after inclusion of PR3695
dee830
- Resolves: rhbz#1870625
dee830
dee830
* Fri Jun 25 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.26-0.2.ea
dee830
- Add PR3695 to allow the system crypto policy to be turned off
dee830
- Resolves: rhbz#1870625
dee830
dee830
* Fri Jun 25 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.26-0.1.ea
dee830
- Remove boot JDKs in favour of OpenJDK 17 build now in the buildroot.
dee830
- Resolves: rhbz#1870625
dee830
dee830
* Thu Jun 24 2021 Severin Gehwolf <sgehwolf@redhat.com> - 1:17.0.0.0.26-0.1.ea
dee830
- Update buildjdkver to 17 so as to build with itself
dee830
- Resolves: rhbz#1870625
dee830
dee830
* Mon Jun 21 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.0.0.26-0.0.ea
dee830
- Rename to java-17-openjdk and bootstrap using boot JDK in local sources
dee830
- Exclude x86 as this is not supported by OpenJDK 17
dee830
- Use unzip to test src.zip to avoid looking for jar on path
dee830
- Resolves: rhbz#1870625
dee830
dee830
* Fri Jun 11 2021 Petra Alice Mikova <pmikova@redhat.com> - 1:17.0.0.0.26-0.0.ea.rolling
dee830
- update sources to jdk 17.0.0+26
dee830
- set is_ga to 0, as this is early access build
dee830
- change vendor_version_string
dee830
- change path to the version-numbers.conf
dee830
- removed rmid binary from files and from slaves
dee830
- removed JAVAC_FLAGS=-g from make command, as it breaks the build since JDK-8258407
dee830
- add lib/libsyslookup.so to files
dee830
- renamed lib/security/blacklisted.certs to lib/security/blocked.certs
dee830
- add lib/libsvml.so for intel
dee830
- skip debuginfo check for libsyslookup.so on s390x
dee830
dee830
* Fri May 07 2021 Jiri Vanek <jvanek@redhat.com> - 1:16.0.1.0.9-2.rolling
dee830
- removed cjc backward comaptiblity, to fix when both rpm 4.16 and 4.17 are in transaction
dee830
dee830
* Thu Apr 29 2021 Jiri Vanek <jvanek@redhat.com> -  1:16.0.1.0.9-2.rolling
dee830
- adapted to debug handling  in newer cjc
dee830
- The rest of the "rpm 4.17" patch must NOT be backported, as on rpm 4.16 and down, it would casue double execution
dee830
- Disable copy-jdk-configs for Flatpak builds
dee830
dee830
* Sun Apr 25 2021 Petra Alice Mikova <pmikova@redhat.com> - 1:16.0.1.0.9-1.rolling
dee830
- update to 16.0.1+9 april cpu tag
dee830
- dropped jdk8259949-allow_cf-protection_on_x86.patch
dee830
dee830
* Thu Mar 11 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:16.0.0.0.36-2.rolling
dee830
- Perform static library build on a separate source tree with bundled image libraries
dee830
- Make static library build optional
dee830
- Based on initial work by Severin Gehwolf
dee830
dee830
* Tue Mar 09 2021 Jiri Vanek <jvanek@redhat.com> - 1:16.0.0.0.36-1.rolling
dee830
- fixed suggests of wrong pcsc-lite-devel%{?_isa} to correct pcsc-lite-libs%{?_isa}
dee830
- bumped buildjdkver to build by itself - 16
dee830
dee830
* Fri Feb 19 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:16.0.0.0.36-0.rolling
dee830
- Update to jdk-16.0.0.0+36
dee830
- Update tarball generation script to use git following OpenJDK's move to github
dee830
- Update tarball generation script to use PR3823 which handles JDK-8235710 changes
dee830
- Use upstream default for version-pre rather than setting it to "ea" or ""
dee830
- Drop libsunec.so which is no longer generated, thanks to JDK-8235710
dee830
- Drop unnecessary compiler flags, dating back to work on GCC 6 & 10
dee830
- Adapt RH1750419 alt-java patch to still apply after some variable re-naming in the makefiles
dee830
- Update filever to remove any trailing zeros, as in the OpenJDK build, and use for source filename
dee830
- Use system harfbuzz now this is supported.
dee830
- Pass SOURCE_DATE_EPOCH to build for reproducible builds
dee830
dee830
* Fri Feb 19 2021 Stephan Bergmann <sbergman@redhat.com> - 1:15.0.2.0.7-1.rolling
dee830
- Hardcode /usr/sbin/alternatives for Flatpak builds
dee830
dee830
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:15.0.2.0.7-0.rolling.1
dee830
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
dee830
dee830
* Fri Jan 22 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:15.0.2.0.7-0.rolling
dee830
- Update to jdk-15.0.2.0+7
dee830
- Add release notes for 15.0.1.0 & 15.0.2.0
dee830
- Use JEP-322 Time-Based Versioning so we can handle a future 11.0.9.1-like release correctly.
dee830
- Still use 15.0.x rather than 15.0.x.0 for file naming, as the trailing zero is omitted from tags.
dee830
- Cleanup debug package descriptions and version number placement.
dee830
- Remove unused patch files.
dee830
dee830
* Tue Jan 19 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:15.0.1.9-10.rolling
dee830
- Use -march=i686 for x86 builds if -fcf-protection is detected (needs CMOV)
dee830
dee830
* Tue Dec 22 2020 Jiri Vanek <jvanek@redhat.com> - 1:15.0.1.9-9.rolling
dee830
- fixed missing condition for fastdebug packages being counted as debug ones
dee830
dee830
* Sat Dec 19 2020 Jiri Vanek <jvanek@redhat.com> - 1:15.0.1.9-8.rolling
dee830
- removed lib-style provides for fastdebug_suffix_unquoted
dee830
dee830
* Sat Dec 19 2020 Jiri Vanek <jvanek@redhat.com> - 1:15.0.1.9-6.rolling
dee830
- many cosmetic changes taken from more maintained jdk11
dee830
- introduced debug_arches, bootstrap_arches, systemtap_arches, fastdebug_arches, sa_arches, share_arches, shenandoah_arches, zgc_arches
dee830
  instead of various hardcoded ifarches
dee830
- updated systemtap
dee830
- added requires excludes for debug pkgs
dee830
- removed redundant logic around jsa files
dee830
- added runtime requires of lksctp-tools and libXcomposite%
dee830
- added and used Source15 TestSecurityProperties.java, but is made always positive as jdk15 now does not honor system policies
dee830
- s390x excluded form fastdebug build
dee830
dee830
* Thu Dec 17 2020 Andrew Hughes <gnu.andrew@redhat.com> - 1:15.0.1.9-5.rolling
dee830
- introduced nm based check to verify alt-java on x86_64 is patched, and no other alt-java or java is patched
dee830
- patch600 rh1750419-redhat_alt_java.patch amended to die, if it is used wrongly
dee830
- introduced ssbd_arches with currently only valid arch of x86_64 to separate real alt-java architectures
dee830
dee830
* Wed Dec 9 2020 Jiri Vanek <jvanek@redhat.com> - 1:15.0.1.9-4.rolling
dee830
- moved wrongly placed licenses to accompany other ones
dee830
- this bad placement was killng parallel-installability and thus having bad impact to leapp if used
dee830
dee830
* Tue Dec 01 2020 Jiri Vanek <jvanek@redhat.com> - 1:15.0.1.9-3.rolling
dee830
- added patch600, rh1750419-redhat_alt_java.patch, suprassing removed patch
dee830
- no longer copying of java->alt-java as it is created by  patch600
dee830
dee830
* Mon Nov 23 2020 Jiri Vanek <jvanek@redhat.com> - 1:15.0.1.9-2.rolling
dee830
- Create a copy of java as alt-java with alternatives and man pages
dee830
- java-11-openjdk doesn't have a JRE tree, so don't try and copy alt-java there...
dee830
dee830
* Sun Oct 25 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:15.0.1.9-1.rolling
dee830
- updated to October CPU 2020 sources
dee830
dee830
* Thu Oct 22 2020 Severin Gehwolf <sgehwolf@redhat.com> - 1:15.0.0.36-4.rolling
dee830
- Fix directory ownership of -static-libs sub-package.
dee830
dee830
* Fri Oct 09 2020 Jiri Vanek <jvanek@redhat.com> - 1:15.0.0.36-3.rolling
dee830
- Build static-libs-image and add resulting files via -static-libs sub-package.
dee830
- Disable stripping of debug symbols for static libraries part of the -static-libs sub-package.
dee830
- JDK-8245832 increases the set of static libraries, so try and include them all with a wildcard.
dee830
- Update static-libs packaging to new layout
dee830
dee830
* Mon Sep 21 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:15.0.0.36-2.rolling
dee830
- Add support for fastdebug builds on 64 bit architectures
dee830
dee830
* Tue Sep 15 2020 Severin Gehwolf <sgehwolf@redhat.com> - 1:15.0.0.36-1.rolling
dee830
- Remove EA designation
dee830
- Re-generate sources with PR3803 patch
dee830
dee830
* Mon Aug 31 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:15.0.0.36-0.1.ea.rolling
dee830
- Update to jdk 15.0.0.36 tag
dee830
- Modify rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
dee830
- Update vendor version string to 20.9
dee830
- jjs removed from packaging after JEP 372: Nashorn removal
dee830
- rmic removed from packaging after JDK-8225319
dee830
dee830
* Mon Jul 27 2020 Severin Gehwolf <sgehwolf@redhat.com> - 1:14.0.2.12-2.rolling
dee830
- Disable LTO so as to pass debuginfo check
dee830
dee830
* Wed Jul 22 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:14.0.2.12-1.rolling
dee830
- update to jdk 14.0.2.12 CPU version
dee830
- remove upstreamed patch jdk8237879-make_4_3_build_fixes.patch
dee830
- remove upstreamed patch jdk8235833-posixplatform_cpp_should_not_include_sysctl_h.patch
dee830
- remove upstreamed patch jdk8243059-build_fails_when_with_vendor_contains_comma.patch
dee830
dee830
* Thu Jul 09 2020 Andrew Hughes <gnu.andrew@redhat.com> - 1:14.0.1.7-4.rolling
dee830
- Re-introduce java-openjdk-src & java-openjdk-demo for system_jdk builds.
dee830
- Fix accidental renaming of java-openjdk-devel to java-devel-openjdk.
dee830
dee830
* Thu May 14 2020 Petra Alice Mikova <pmikova@redhat.com> -  1:14.0.1.7-3.rolling
dee830
- introduce patch jdk8235833-posixplatform_cpp_should_not_include_sysctl_h to fix build issues in rawhide
dee830
- rename and reorganize patch sections
dee830
dee830
* Thu Apr 23 2020 Severin Gehwolf <sgehwolf@redhat.com> - 1:14.0.1.7-2.rolling
dee830
- Fix vendor version to 20.3 (from 19.9)
dee830
dee830
* Fri Apr 17 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:14.0.1.7-1.rolling
dee830
- April security update
dee830
- uploaded new src tarball
dee830
dee830
* Wed Apr 08 2020 Jiri Vanek <jvanek@redhat.com> - 1:14.0.0.36-4.rolling
dee830
- set vendor property and vendor urls
dee830
- made urls to be preconfigured by os
dee830
dee830
* Tue Mar 24 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:14.0.0.36-3.rolling
dee830
- Remove s390x workaround flags for GCC 10
dee830
- bump buildjdkver to 14
dee830
- uploaded new src tarball
dee830
dee830
* Mon Mar 23 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:14.0.0.36-2.rolling
dee830
- removed a whitespace causing fail of postinstall script
dee830
- removed backslashes at the end of alternatives command
dee830
dee830
* Fri Mar 13 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:14.0.0.36-1.rolling
dee830
- update to jdk 14+36 ga build
dee830
- remove JDK-8224851 patch, as OpenJDK 14 already contains it
dee830
- removed pack200 and unpack200 binaries, slaves, manpages and libunpack.so library
dee830
- added listings for jpackage binary, manpages and added slave records to alternatives
dee830
dee830
* Thu Mar 12 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:13.0.2.8-4.rolling
dee830
- add patch for build issues with make 4.3
dee830
dee830
* Thu Feb 27 2020 Severin Gehwolf <sgehwolf@redhat.com> - 1:13.0.2.8-3.rolling
dee830
- add workaround for issues with build with GCC10 on s390x (see RHBZ#1799531)
dee830
- fix issues with build with GCC10: JDK-8224851, -fcommon switch
dee830
dee830
* Thu Feb 27 2020 Petra Alice Mikova pmikova@redhat.com> - 1:13.0.2.8-3.rolling
dee830
- Add JDK-8224851 patch to resolve aarch64 issues
dee830
dee830
* Tue Feb 04 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:13.0.2.8-2.rolling
dee830
- fix Release, as it was broken by last rpmdev-bumpspec
dee830
dee830
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:13.0.2.8-1.rolling.1
dee830
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
dee830
dee830
* Fri Jan 17 2020 Petra Alice Mikova <pmikova@redhat.com> - 1:13.0.2.8-1.rolling
dee830
- removed patch jdk8231405_guarantee_d_nonequals_null_failed_null_dominator_info.patch
dee830
- removed patch jdk8231583_fix_register_clash_in_sbsa_resolve_forwarding_pointer_borrowing.patch
dee830
- updated sources to the 13.0.2+8 tag
dee830
dee830
* Fri Oct 25 2019 Petra Alice Mikova <pmikova@redhat.com> - 1:13.0.1.9-2.rolling
dee830
- Fixed hardcoded major version in jdk13u to macro
dee830
- added jdk8231405_guarantee_d_nonequals_null_failed_null_dominator_info.patch
dee830
- added jdk8231583_fix_register_clash_in_sbsa_resolve_forwarding_pointer_borrowing.patch
dee830
dee830
* Mon Oct 21 2019 Petra Alice Mikova <pmikova@redhat.com> - 1:13.0.1.9-1.rolling
dee830
- Updated to October 2019 CPU sources
dee830
dee830
* Wed Oct 16 2019 Petra Alice Mikova <pmikova@redhat.com> - 1:13.0.0.33-3.rolling
dee830
- synced up generate tarball script with other OpenJDK packages
dee830
- dropped pr2126-synchronise_elliptic_curves_in_sun_security_ec_namedcurve_with_those_listed_by_nss.patch from the sources
dee830
- regenerated sources with the updated script
dee830
dee830
* Wed Oct 02 2019 Andrew Hughes <gnu.andrew@redhat.com> - 1:13.0.0.33-3.rolling
dee830
- Switch to in-tree SunEC code, dropping NSS runtime dependencies and patches to link against it.
dee830
dee830
* Wed Oct 02 2019 Andrew John Hughes <gnu.andrew@redhat.com> -  1:13.0.0.33-3.rolling
dee830
- Drop unnecessary build requirement on gtk3-devel, as OpenJDK searches for Gtk+ at runtime.
dee830
- Add missing build requirement for libXrender-devel, previously masked by Gtk3+ dependency
dee830
- Add missing build requirement for libXrandr-devel, previously masked by Gtk3+ dependency
dee830
- fontconfig build requirement should be fontconfig-devel, previously masked by Gtk3+ dependency
dee830
dee830
* Wed Oct 02 2019 Andrew Hughes <gnu.andrew@redhat.com> - 1:13.0.0.33-3.rolling
dee830
- Obsolete javadoc-slowdebug and javadoc-slowdebug-zip packages via javadoc and javadoc-zip respectively.
dee830
dee830
* Tue Oct 01 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1:13.0.0.33-2.rolling
dee830
- Don't produce javadoc/javadoc-zip sub packages for the
dee830
  debug variant build.
dee830
- Don't perform a bootcycle build for the debug variant build.
dee830
dee830
* Mon Sep 30 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1:13.0.0.33-2.rolling
dee830
- Fix vendor version as JDK 13 has been GA'ed September 2019: 19.3 => 19.9
dee830
dee830
* Wed Aug 14 2019 Petra Alice Mikova <pmikova@redhat.com> - 1:13.0.0.33-1.rolling
dee830
- updated to 13+33 sources
dee830
- added two manpages to file listings (jfr, jaotc)
dee830
- set is_ga to 1 to match build from jdk.java.net
dee830
dee830
* Fri Jul 26 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1:13.0.0.28-0.2.ea.rolling
dee830
- Fix bootjdkver macro. It attempted to build with jdk 12, which is
dee830
  no longer available in rawhide (it's 13 instead).
dee830
- Fix Release as rpmdev-bumpspec doesn't do it correctly.
dee830
dee830
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:13.0.0.28-0.1.ea.rolling.1
dee830
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
dee830
dee830
* Tue Jul 09 2019 Petra Alice Mikova <pmikova@redhat.com> - 1:13.0.0.28-0.1.ea.rolling
dee830
- updated to jdk 13
dee830
- adapted pr2126-synchronise_elliptic_curves_in_sun_security_ec_namedcurve_with_those_listed_by_nss.patch
dee830
- adapted rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
dee830
- fixed file listings
dee830
- included https://src.fedoraproject.org/rpms/java-11-openjdk/pull-request/49:
dee830
- Include 'ea' designator in Release when appropriate
dee830
- Handle milestone as variables so we can alter it easily and set the docs zip filename appropriately
dee830
dee830
* Tue May 21 2019 Petra Alice Mikova <pmikova@redhat.com> - 1:12.0.1.12-2.rolling
dee830
- fixed requires/provides for the non-system JDK case (backport of RHBZ#1702324)
dee830
dee830
* Thu Apr 18 2019 Petra Mikova <pmikova@redhat.com> - 1:12.0.1.12-1.rolling
dee830
- updated sources to current CPU release
dee830
dee830
* Thu Apr 04 2019 Petra Mikova <pmikova@redhat.com> - 1:12.0.0.33-4.rolling
dee830
- added slave for jfr binary in devel package
dee830
dee830
* Thu Mar 21 2019 Petra Mikova <pmikova@redhat.com> - 1:12.0.0.33-3.rolling
dee830
- Replaced pcsc-lite-devel (which is in optional channel) with pcsc-lite-libs.
dee830
- added rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch to make jdk work with pcsc
dee830
- removed LTS string from LTS designator, because epel builds get identified as rhel and JDK 12 is not LTS
dee830
- removed duplicated dependency on lksctp-tools
dee830
dee830
* Wed Mar 20 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1:12.0.0.33-2.ea.1.rolling
dee830
- Drop chkconfig dep, 1.7 shipped in f24
dee830
dee830
* Thu Mar 07 2019 Petra Mikova <pmikova@redhat.com> - 1:12.0.0.33-1.ea.1.rolling
dee830
- bumped sources to jdk12+33
dee830
dee830
* Mon Feb 11 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1:12.0.0.30-1.ea.1.rolling
dee830
- Only build 'bootcycle-images docs' target and 'images docs' targets, respectively.
dee830
dee830
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:12.0.0.25-0.ea.1.rolling.1
dee830
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
dee830
dee830
* Fri Dec 21 2018 Jiri Vanek <jvanek@redhat.com> - 1:12.0.0.25-0.ea.1.rolling
dee830
- bumped sources to jdk12. Crypto list synced.
dee830
- adapted patches to usptream (removed are upstreamed)
dee830
- removed fixed upstreamed patch6, jdk8211105-aarch64-disable_cos_sin_and_log_intrinsics.patch:
dee830
- renamed patch5, pr1983-rh1565658-..._sunec_provider_jdk11.patch to pr1983-rh1565658-..._sunec_provider_jdk12.patch
dee830
- adapted patch5, pr1983-rh1565658 to jdk12 (libraries.m4 and /Lib-jdk.crypto.ec.gmk)
dee830
- removed patch8, jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch
dee830
- removed patch9, jdk8210425-rh1632174-sharedRuntimeTrig_sharedRuntimeTrans_compiled_without_optimization.patch
dee830
- removed patch10, jdk8210647-rh1632174. Is rummored to be in upstream
dee830
- removed patch11, jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch
dee830
- removed patch12, jdk8210703-rh1632174-vmStructs_cpp_no_longer_compiled_with_o0
dee830
- removed patch584, jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch
dee830
- removed patch585, jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch
dee830
- set build jdk to jdk11; buildjdkver set to 11
dee830
- todo, revisit _privatelibs and slaves, discuse patch10, more?
dee830
- now building with --no-print-directory to workaround JDK8215213
dee830
- renamed original of docs zip to jdk-major+build
dee830
- check shenandaoh with -XX:+UnlockExperimentalVMOptions
dee830
- libjli moved from lib/libjli to lib
dee830
- added lib/jspawnhelper and bin/jfr and conf/sdp/sdp.conf.template
dee830
- added explanation to the --no-print-directory
dee830
- re-added lts_designator_zip macro
dee830
- added patch6 for rh1673833-remove_removal_of_wformat_during_test_compilation.patch
dee830
dee830
* Wed Dec 5 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.1.13-10.rolling
dee830
- for non debug supackages, ghosted all masters and slaves (rhbz1649776)
dee830
- for tech-preview packages, if-outed versionless provides. Aligned versions to be %%{epoch}:%%{version}-%%{release} instead of chaotic
dee830
- Removed all slowdebug provides (rhbz1655938); for tech-preview packages also removed all internal provides
dee830
dee830
* Tue Dec 04 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.1.13-9
dee830
- Added %%global _find_debuginfo_opts -g
dee830
- Resolves: RHBZ#1520879 (Detailed NMT issue)
dee830
dee830
* Fri Nov 30 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.1.13-8
dee830
- added rolling suffix to release (before dist) to prevent conflict with java-11-openjdk which now have same major version
dee830
dee830
* Mon Nov 12 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.1.13-6
dee830
- fixed tck failures of arraycopy and process exec with shenandoah on
dee830
- added patch585 rh1648995-shenandoah_array_copy_broken_by_not_always_copy_forward_for_disjoint_arrays.patch
dee830
dee830
* Wed Nov 07 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.1.13-5
dee830
- headless' suggests of cups, replaced by Requires of cups-libs
dee830
dee830
* Thu Nov 01 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.1.13-3
dee830
- added Patch584 jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch
dee830
dee830
* Mon Oct 29 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.1.13-3
dee830
- Use upstream's version of Aarch64 intrinsics disable patch:
dee830
  - Removed:
dee830
    RHBZ-1628612-JDK-8210461-workaround-disable-aarch64-intrinsic.patch
dee830
    RHBZ-1630996-JDK-8210858-workaround-disable-aarch64-intrinsic-log.patch
dee830
  - Superceded by:
dee830
    jdk8211105-aarch64-disable_cos_sin_and_log_intrinsics.patch
dee830
dee830
* Thu Oct 18 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.1.13-2
dee830
- Use LTS designator in version output for RHEL.
dee830
dee830
* Thu Oct 18 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.1.13-1
dee830
- Update to October 2018 CPU release, 11.0.1+13.
dee830
dee830
* Wed Oct 17 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.0.28-2
dee830
- Use --with-vendor-version-string=18.9 so as to show original
dee830
  GA date for the JDK.
dee830
dee830
* Fri Sep 28 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.0.28-1
dee830
- Identify as GA version and no longer as early access (EA).
dee830
- JDK 11 has been released for GA on 2018-09-25.
dee830
dee830
* Fri Sep 28 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-9
dee830
- Rework changes from 1:11.0.ea.22-6. RHBZ#1632174 supercedes
dee830
  RHBZ-1624122.
dee830
- Add patch, jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch, so as to
dee830
  optimize compilation of fdlibm library.
dee830
- Add patch, jdk8210425-rh1632174-sharedRuntimeTrig_sharedRuntimeTrans_compiled_without_optimization.patch, so
dee830
  as to optimize compilation of sharedRuntime{Trig,Trans}.cpp
dee830
- Add patch, jdk8210647-rh1632174-libsaproc_is_being_compiled_without_optimization.patch, so as to
dee830
  optimize compilation of libsaproc (extra c flags won't override
dee830
  optimization).
dee830
- Add patch, jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch, so as to
dee830
  optimize compilation of libjsig.
dee830
- Add patch, jdk8210703-rh1632174-vmStructs_cpp_no_longer_compiled_with_o0, so as to
dee830
  optimize compilation of vmStructs.cpp (part of libjvm.so).
dee830
- Reinstate filtering of opt flags coming from redhat-rpm-config.
dee830
dee830
* Thu Sep 27 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.28-8
dee830
- removed version less provides
dee830
- javadocdir moved to arched dir as it is no longer noarch
dee830
dee830
* Thu Sep 20 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-6
dee830
- Add patch, RHBZ-1630996-JDK-8210858-workaround-disable-aarch64-intrinsic-log.patch,
dee830
  so as to disable log math intrinsic on aarch64. Work-around for
dee830
  JDK-8210858
dee830
dee830
* Thu Sep 13 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-5
dee830
- Add patch, RHBZ-1628612-JDK-8210461-workaround-disable-aarch64-intrinsic.patch,
dee830
  so as to disable dsin/dcos math intrinsics on aarch64. Work-around for
dee830
  JDK-8210461.
dee830
dee830
* Wed Sep 12 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.22-6
dee830
- Add patch, JDK-8210416-RHBZ-1624122-fdlibm-opt-fix.patch, so as to
dee830
  optimize compilation of fdlibm library.
dee830
- Add patch, JDK-8210425-RHBZ-1624122-sharedRuntimeTrig-opt-fix.patch, so
dee830
  as to optimize compilation of sharedRuntime{Trig,Trans}.cpp
dee830
- Add patch, JDK-8210647-RHBZ-1624122-libsaproc-opt-fix.patch, so as to
dee830
  optimize compilation of libsaproc (extra c flags won't override
dee830
  optimization).
dee830
- Add patch, JDK-8210703-RHBZ-1624122-vmStructs-opt-fix.patch, so as to
dee830
  optimize compilation of vmStructs.cpp (part of libjvm.so).
dee830
- No longer filter -O flags from C flags coming from
dee830
  redhat-rpm-config.
dee830
dee830
* Mon Sep 10 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.28-4
dee830
- link to jhsdb followed its file to ifarch jit_arches ifnarch s390x
dee830
dee830
* Fri Sep 7 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-3
dee830
- Enable ZGC on x86_64.
dee830
dee830
* Tue Sep 4 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.28-2
dee830
- jfr/*jfc files listed for all arches
dee830
- lib/classlist do not exists s390, ifarch-ed via jit_arches out
dee830
dee830
* Fri Aug 31 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-1
dee830
- Update to latest upstream build jdk11+28, the first release
dee830
  candidate.
dee830
dee830
* Wed Aug 29 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.22-8
dee830
- Adjust system NSS patch, pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk11.patch, so
dee830
  as to filter -Wl,--as-needed from linker flags. Fixes FTBFS issue.
dee830
dee830
* Thu Aug 23 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.22-6
dee830
- dissabled accessibility, fixed provides for main package's debug variant
dee830
dee830
* Mon Jul 30 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.22-5
dee830
- now buildrequires javapackages-filesystem as the  issue with macros should be fixed
dee830
dee830
* Wed Jul 18 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.22-2
dee830
- changed to build by itself instead of by jdk10
dee830
dee830
* Tue Jul 17 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.22-1
dee830
- added Recommends gtk3 for main package
dee830
- changed BuildRequires from gtk2-devel to gtk3-devel (it can be more likely dropped)
dee830
- added Suggests lksctp-tools, pcsc-lite-devel, cups for headless package
dee830
- see RHBZ1598152
dee830
- added trick to catch hs_err files (sgehwolf)
dee830
- updated to shenandaoh-jdk-11+22
dee830
dee830
* Sat Jul 07 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.20-1
dee830
- removed patch6 JDK-8205616-systemLcmsAndJpgFixFor-rev_f0aeede1b855.patch
dee830
- improved a bit generate_source_tarball.sh to serve also for systemtap
dee830
- thus deleted generate_tapsets.sh
dee830
- simplified and cleared update_package.sh
dee830
- moved to single source jdk - from shenandoah/jdk11
dee830
- bumped to latest jdk11+20
dee830
- adapted PR2126 to jdk11+20
dee830
- adapted handling of systemtap sources to new style
dee830
- (no (misleading) version inside (full version is in name), thus different sed on tapsets and different directory)
dee830
- shortened summaries and descriptions to around 80 chars
dee830
- Hunspell spell checked
dee830
- license fixed to correct jdk11 (sgehwolf)
dee830
- more correct handling of internal libraries (sgehwolf)
dee830
- added lib/security/public_suffix_list.dat as +20 have added it (JDK-8201815)
dee830
- added test for shenandaoh GC presence where expected
dee830
- Removed workaround for broken aarch64 slowdebug build
dee830
- Removed all defattrs
dee830
- Removed no longer necessary cleanup of diz and  debuginfo files
dee830
dee830
* Fri Jun 22 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.19-1
dee830
- updated sources to jdk-11+19
dee830
- added patch6 systemLcmsAndJpgFixFor-f0aeede1b855.patch to fix regression of system libraries after f0aeede1b855 commit
dee830
- adapted pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk11.patch to accommodate changes after f0aeede1b855 commit
dee830
dee830
* Thu Jun 14 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.16-5
dee830
- Revert rename: java-11-openjdk => java-openjdk.
dee830
dee830
* Wed Jun 13 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.16-4
dee830
- Add aarch64 to aot_arches.
dee830
dee830
* Wed Jun 13 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.16-3
dee830
- Rename to package java-11-openjdk.
dee830
dee830
* Wed Jun 13 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.16-2
dee830
- Disable Aarch64 slowdebug build (see JDK-8204331).
dee830
- s390x doesn't have the SA even though it's a JIT arch.
dee830
dee830
* Wed Jun 13 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.16-1
dee830
- Initial version of JDK 11 ea based on tag jdk-11+16.
dee830
- Removed patches no longer needed or upstream:
dee830
  sorted-diff.patch (see JDK-8198844)
dee830
  JDK-8201788-bootcycle-images-jobs.patch
dee830
  JDK-8201509-s390-atomic_store.patch
dee830
  JDK-8202262-libjsig.so-extra-link-flags.patch (never was an issue on 11)
dee830
  JDK-8193802-npe-jar-getVersionMap.patch
dee830
- Updated and renamed patches:
dee830
  java-openjdk-s390-size_t.patch => JDK-8203030-s390-size_t.patch
dee830
- Updated patches for JDK 11:
dee830
  pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk11.patch
dee830
dee830
* Tue Jun 12 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-9
dee830
- Use proper private_libs expression for filtering requires/provides.
dee830
dee830
* Fri Jun 08 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-8
dee830
- Bump release and rebuild for fixed gdb. See RHBZ#1589118.
dee830
dee830
* Mon Jun 04 2018 Jiri Vanek <jvanek@redhat.com> - 1:10.0.1.10-7
dee830
- quoted sed expressions, changed possibly confusing # by @
dee830
- added vendor(origin) into icons
dee830
- removed last trace of relative symlinks
dee830
- added BuildRequires of javapackages-tools to fix build failure after Requires change to javapackages-filesystem
dee830
dee830
* Thu May 17 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-5
dee830
- Move to javapackages-filesystem for directory ownership.
dee830
  Resolves RHBZ#1500288
dee830
dee830
* Mon Apr 30 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-4
dee830
- Add JDK-8193802-npe-jar-getVersionMap.patch so as to fix
dee830
  RHBZ#1557375.
dee830
dee830
* Mon Apr 23 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-3
dee830
- Inject build flags properly. See RHBZ#1571359
dee830
- Added patch JDK-8202262-libjsig.so-extra-link-flags.patch
dee830
  since libjsig.so doesn't get linker flags injected properly.
dee830
dee830
* Fri Apr 20 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-2
dee830
- Removed unneeded patches:
dee830
  PStack-808293.patch
dee830
  multiple-pkcs11-library-init.patch
dee830
  ppc_stack_overflow_fix.patch
dee830
- Added patches for s390 Zero builds:
dee830
  JDK-8201495-s390-java-opts.patch
dee830
  JDK-8201509-s390-atomic_store.patch
dee830
- Renamed patches for clarity:
dee830
  aarch64BuildFailure.patch => JDK-8200556-aarch64-slowdebug-crash.patch
dee830
  systemCryptoPolicyPR3183.patch => pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
dee830
  bootcycle_jobs.patch => JDK-8201788-bootcycle-images-jobs.patch
dee830
  system-nss-ec-rh1565658.patch => pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk11.patch
dee830
dee830
* Fri Apr 20 2018 Jiri Vanek <jvanek@redhat.com> - 1:10.0.1.10-1
dee830
- updated to security update 1
dee830
- jexec unlinked from path
dee830
- used java-openjdk as boot jdk
dee830
- aligned provides/requires
dee830
- renamed zip javadoc
dee830
dee830
* Tue Apr 10 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.0.46-12
dee830
- Enable basic EC ciphers test in %%check.
dee830
dee830
* Tue Apr 10 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.0.46-11
dee830
- Port Martin Balao's JDK 9 patch for system NSS support to JDK 10.
dee830
- Resolves RHBZ#1565658
dee830
dee830
* Mon Apr 09 2018 Jiri Vanek <jvanek@redhat.com> - 1:10.0.0.46-10
dee830
- jexec linked to path
dee830
dee830
* Fri Apr 06 2018 Jiri Vanek <jvanek@redhat.com> - 1:10.0.0.46-9
dee830
- subpackage(s) replaced by sub-package(s) and other cosmetic changes
dee830
dee830
* Tue Apr 03 2018 Jiri Vanek <jvanek@redhat.com> - 1:10.0.0.46-8
dee830
- removed accessibility sub-packages
dee830
- kept applied patch and properties files
dee830
- debug sub-packages renamed to slowdebug
dee830
dee830
* Fri Feb 23 2018 Jiri Vanek <jvanek@redhat.com> - 1:10.0.0.46-1
dee830
- initial load