Blame SPECS/java-11-openjdk.spec

c0c534
# RPM conditionals so as to be able to dynamically produce
c0c534
# slowdebug/release builds. See:
c0c534
# http://rpm.org/user_doc/conditional_builds.html
c0c534
#
c0c534
# Examples:
c0c534
#
c0c534
# Produce release *and* slowdebug builds on x86_64 (default):
c0c534
# $ rpmbuild -ba java-1.8.0-openjdk.spec
c0c534
#
c0c534
# Produce only release builds (no slowdebug builds) on x86_64:
c0c534
# $ rpmbuild -ba java-1.8.0-openjdk.spec --without slowdebug
c0c534
#
c0c534
# Only produce a release build on x86_64:
c0c534
# $ fedpkg mockbuild --without slowdebug
c0c534
#
c0c534
# Only produce a debug build on x86_64:
c0c534
# $ fedpkg local --without release
c0c534
#
c0c534
# Enable slowdebug builds by default on relevant arches.
c0c534
%bcond_without slowdebug
c0c534
# Enable release builds by default on relevant arches.
c0c534
%bcond_without release
c0c534
c0c534
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
c0c534
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
c0c534
# see the difference between global and define:
c0c534
# See https://github.com/rpm-software-management/rpm/issues/127 to comments at  "pmatilai commented on Aug 18, 2017"
c0c534
# (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
c0c534
%global debug_suffix_unquoted -debug
c0c534
# quoted one for shell operations
c0c534
%global debug_suffix "%{debug_suffix_unquoted}"
c0c534
%global normal_suffix ""
c0c534
c0c534
# if you want only debug build but providing java build only normal build but set normalbuild_parameter
c0c534
%global debug_warning This package has full debug on. Install only in need and remove asap.
c0c534
%global debug_on with full debug on
c0c534
%global for_debug for packages with debug on
c0c534
c0c534
%if %{with release}
c0c534
%global include_normal_build 1
c0c534
%else
c0c534
%global include_normal_build 0
c0c534
%endif
c0c534
c0c534
%if %{include_normal_build}
c0c534
%global build_loop1 %{normal_suffix}
c0c534
%else
c0c534
%global build_loop1 %{nil}
c0c534
%endif
c0c534
c0c534
%global aarch64         aarch64 arm64 armv8
c0c534
# we need to distinguish between big and little endian PPC64
c0c534
%global ppc64le         ppc64le
c0c534
%global ppc64be         ppc64 ppc64p7
c0c534
%global multilib_arches %{power64} sparc64 x86_64
c0c534
%global jit_arches      %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} %{arm} s390x
c0c534
%global aot_arches      x86_64 %{aarch64}
c0c534
c0c534
# By default, we build a debug build during main build on JIT architectures
c0c534
%if %{with slowdebug}
c0c534
%ifarch %{jit_arches}
c0c534
%ifnarch %{arm}
c0c534
%global include_debug_build 1
c0c534
%else
c0c534
%global include_debug_build 0
c0c534
%endif
c0c534
%else
c0c534
%global include_debug_build 0
c0c534
%endif
c0c534
%else
c0c534
%global include_debug_build 0
c0c534
%endif
c0c534
c0c534
# On x86_64 and AArch64, we use the Shenandoah HotSpot
c0c534
%ifarch x86_64 %{aarch64}
c0c534
%global use_shenandoah_hotspot 1
c0c534
%else
c0c534
%global use_shenandoah_hotspot 0
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%global build_loop2 %{debug_suffix}
c0c534
%else
c0c534
%global build_loop2 %{nil}
c0c534
%endif
c0c534
c0c534
# if you disable both builds, then the build fails
c0c534
%global build_loop  %{build_loop1} %{build_loop2}
c0c534
# note: that order: normal_suffix debug_suffix, in case of both enabled
c0c534
# is expected in one single case at the end of the build
c0c534
%global rev_build_loop  %{build_loop2} %{build_loop1}
c0c534
c0c534
%ifarch %{jit_arches}
c0c534
%global bootstrap_build 1
c0c534
%else
c0c534
%global bootstrap_build 1
c0c534
%endif
c0c534
c0c534
%if %{bootstrap_build}
c0c534
%global targets bootcycle-images all docs
c0c534
%else
c0c534
%global targets all docs
c0c534
%endif
c0c534
c0c534
c0c534
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
c0c534
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
c0c534
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
c0c534
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
c0c534
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
c0c534
%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||')
c0c534
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
c0c534
%global ourldflags %{__global_ldflags}
c0c534
c0c534
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
c0c534
# the initialization must be here. Later the pkg-config have buggy behavior
c0c534
# looks like openjdk RPM specific bug
c0c534
# Always set this so the nss.cfg file is not broken
c0c534
%global NSS_LIBDIR %(pkg-config --variable=libdir nss)
c0c534
%global NSS_LIBS %(pkg-config --libs nss)
c0c534
%global NSS_CFLAGS %(pkg-config --cflags nss-softokn)
c0c534
# see https://bugzilla.redhat.com/show_bug.cgi?id=1332456
c0c534
%global NSSSOFTOKN_BUILDTIME_NUMBER %(pkg-config --modversion nss-softokn || : )
c0c534
%global NSS_BUILDTIME_NUMBER %(pkg-config --modversion nss || : )
c0c534
# this is workaround for processing of requires during srpm creation
c0c534
%global NSSSOFTOKN_BUILDTIME_VERSION %(if [ "x%{NSSSOFTOKN_BUILDTIME_NUMBER}" == "x" ] ; then echo "" ;else echo ">= %{NSSSOFTOKN_BUILDTIME_NUMBER}" ;fi)
c0c534
%global NSS_BUILDTIME_VERSION %(if [ "x%{NSS_BUILDTIME_NUMBER}" == "x" ] ; then echo "" ;else echo ">= %{NSS_BUILDTIME_NUMBER}" ;fi)
c0c534
c0c534
c0c534
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
c0c534
%global _privatelibs libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsunec[.]so.*|libunpack[.]so.*|libzip[.]so.*
c0c534
c0c534
%global __provides_exclude ^(%{_privatelibs})$
c0c534
%global __requires_exclude ^(%{_privatelibs})$
c0c534
c0c534
# In some cases, the arch used by the JDK does
c0c534
# not match _arch.
c0c534
# Also, in some cases, the machine name used by SystemTap
c0c534
# does not match that given by _build_cpu
c0c534
%ifarch x86_64
c0c534
%global archinstall amd64
c0c534
%endif
c0c534
%ifarch ppc
c0c534
%global archinstall ppc
c0c534
%endif
c0c534
%ifarch %{ppc64be}
c0c534
%global archinstall ppc64
c0c534
%endif
c0c534
%ifarch %{ppc64le}
c0c534
%global archinstall ppc64le
c0c534
%endif
c0c534
%ifarch %{ix86}
c0c534
%global archinstall i686
c0c534
%endif
c0c534
%ifarch ia64
c0c534
%global archinstall ia64
c0c534
%endif
c0c534
%ifarch s390
c0c534
%global archinstall s390
c0c534
%endif
c0c534
%ifarch s390x
c0c534
%global archinstall s390x
c0c534
%endif
c0c534
%ifarch %{arm}
c0c534
%global archinstall arm
c0c534
%endif
c0c534
%ifarch %{aarch64}
c0c534
%global archinstall aarch64
c0c534
%endif
c0c534
# 32 bit sparc, optimized for v9
c0c534
%ifarch sparcv9
c0c534
%global archinstall sparc
c0c534
%endif
c0c534
# 64 bit sparc
c0c534
%ifarch sparc64
c0c534
%global archinstall sparcv9
c0c534
%endif
c0c534
%ifnarch %{jit_arches}
c0c534
%global archinstall %{_arch}
c0c534
%endif
c0c534
c0c534
c0c534
c0c534
%ifarch %{jit_arches}
c0c534
%global with_systemtap 1
c0c534
%else
c0c534
%global with_systemtap 0
c0c534
%endif
c0c534
c0c534
# New Version-String scheme-style defines
c0c534
%global majorver 11
c82467
%global securityver 2
e50716
# Used via new version scheme. JDK 11 was
e50716
# GA'ed in September 2018 => 18.9
e50716
%global vendor_version_string 18.9
e50716
# Add LTS designator for RHEL builds
e50716
%if 0%{?rhel}
e50716
  %global lts_designator "LTS"
e50716
  %global lts_designator_zip -%{lts_designator}
e50716
%else
e50716
  %global lts_designator ""
e50716
  %global lts_designator_zip ""
e50716
%endif
c0c534
c0c534
# Standard JPackage naming and versioning defines
c0c534
%global origin          openjdk
c0c534
%global origin_nice     OpenJDK
c0c534
%global top_level_dir_name   %{origin}
c0c534
%global minorver        0
c82467
%global buildver        7
c82467
#%%global tagsuffix      %{nil}
c0c534
# priority must be 7 digits in total
c0c534
# setting to 1, so debug ones can have 0
c0c534
%global priority        00000%{minorver}1
c0c534
%global newjavaver      %{majorver}.%{minorver}.%{securityver}
c0c534
c0c534
%global javaver         %{majorver}
c0c534
c0c534
# parametrized macros are order-sensitive
c0c534
%global compatiblename  java-%{majorver}-%{origin}
c0c534
%global fullversion     %{compatiblename}-%{version}-%{release}
c0c534
# images stub
c0c534
%global jdkimage       jdk
c0c534
# output dir stub
c0c534
%global buildoutputdir() %{expand:openjdk/build%1}
c0c534
# we can copy the javadoc to not arched dir, or make it not noarch
e50716
# javadoc is no longer noarch, as it have aot on only some arches
e50716
%global uniquejavadocdir()    %{expand:%{fullversion}.%{_arch}%1}
c0c534
# main id and dir of this jdk
c0c534
%global uniquesuffix()        %{expand:%{fullversion}.%{_arch}%1}
c0c534
c0c534
# Standard JPackage directories and symbolic links.
c0c534
%global sdkdir()        %{expand:%{uniquesuffix %%1}}
c0c534
%global jrelnk()        %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%1}
c0c534
c0c534
%global sdkbindir()     %{expand:%{_jvmdir}/%{sdkdir %%1}/bin}
c0c534
%global jrebindir()     %{expand:%{_jvmdir}/%{sdkdir %%1}/bin}
c0c534
c0c534
%global rpm_state_dir %{_localstatedir}/lib/rpm-state/
c0c534
c0c534
%if %{with_systemtap}
c0c534
# Where to install systemtap tapset (links)
c0c534
# We would like these to be in a package specific sub-dir,
c0c534
# but currently systemtap doesn't support that, so we have to
c0c534
# use the root tapset dir for now. To distinguish between 64
c0c534
# and 32 bit architectures we place the tapsets under the arch
c0c534
# specific dir (note that systemtap will only pickup the tapset
c0c534
# for the primary arch for now). Systemtap uses the machine name
c0c534
# aka build_cpu as architecture specific directory name.
c0c534
%global tapsetroot /usr/share/systemtap
c0c534
%global tapsetdirttapset %{tapsetroot}/tapset/
c0c534
%global tapsetdir %{tapsetdirttapset}/%{_build_cpu}
c0c534
%endif
c0c534
c0c534
# not-duplicated scriptlets for normal/debug packages
c0c534
%global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
c0c534
c0c534
c0c534
%define post_script() %{expand:
c0c534
update-desktop-database %{_datadir}/applications &> /dev/null || :
c0c534
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
c0c534
exit 0
c0c534
}
c0c534
c0c534
c0c534
%define post_headless() %{expand:
c0c534
%ifarch %{jit_arches}
c0c534
# MetaspaceShared::generate_vtable_methods not implemented for PPC JIT
c0c534
%ifnarch %{ppc64le}
c0c534
# see https://bugzilla.redhat.com/show_bug.cgi?id=513605
c0c534
%{jrebindir %%1}/java -Xshare:dump >/dev/null 2>/dev/null
c0c534
%endif
c0c534
%endif
c0c534
c0c534
PRIORITY=%{priority}
c0c534
if [ "%1" == %{debug_suffix} ]; then
c0c534
  let PRIORITY=PRIORITY-1
c0c534
fi
c0c534
c0c534
ext=.gz
c0c534
alternatives \\
c0c534
  --install %{_bindir}/java java %{jrebindir %%1}/java $PRIORITY  --family %{name}.%{_arch} \\
c0c534
  --slave %{_jvmdir}/jre jre %{_jvmdir}/%{sdkdir %%1} \\
c0c534
  --slave %{_bindir}/jjs jjs %{jrebindir %%1}/jjs \\
c0c534
  --slave %{_bindir}/keytool keytool %{jrebindir %%1}/keytool \\
c0c534
  --slave %{_bindir}/pack200 pack200 %{jrebindir %%1}/pack200 \\
c0c534
  --slave %{_bindir}/rmid rmid %{jrebindir %%1}/rmid \\
c0c534
  --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir %%1}/rmiregistry \\
c0c534
  --slave %{_bindir}/unpack200 unpack200 %{jrebindir %%1}/unpack200 \\
c0c534
  --slave %{_mandir}/man1/java.1$ext java.1$ext \\
c0c534
  %{_mandir}/man1/java-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \\
c0c534
  %{_mandir}/man1/jjs-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\
c0c534
  %{_mandir}/man1/keytool-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \\
c0c534
  %{_mandir}/man1/pack200-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \\
c0c534
  %{_mandir}/man1/rmid-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\
c0c534
  %{_mandir}/man1/rmiregistry-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \\
c0c534
  %{_mandir}/man1/unpack200-%{uniquesuffix %%1}.1$ext
c0c534
c0c534
for X in %{origin} %{javaver} ; do
c0c534
  alternatives --install %{_jvmdir}/jre-"$X" jre_"$X" %{_jvmdir}/%{sdkdir %%1} $PRIORITY --family %{name}.%{_arch}
c0c534
done
c0c534
c0c534
update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk %%1} $PRIORITY  --family %{name}.%{_arch}
c0c534
c0c534
c0c534
update-desktop-database %{_datadir}/applications &> /dev/null || :
c0c534
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
c0c534
c0c534
# see pretrans where this file is declared
c0c534
# also see that pretrans is only for non-debug
c0c534
if [ ! "%1" == %{debug_suffix} ]; then
c0c534
  if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then
c0c534
    sh  %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch}  %{_jvmdir}/%{sdkdir %%1}
c0c534
  fi
c0c534
fi
c0c534
c0c534
exit 0
c0c534
}
c0c534
c0c534
%global postun_script() %{expand:
c0c534
update-desktop-database %{_datadir}/applications &> /dev/null || :
c0c534
if [ $1 -eq 0 ] ; then
c0c534
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
c0c534
    %{update_desktop_icons}
c0c534
fi
c0c534
exit 0
c0c534
}
c0c534
c0c534
c0c534
%global postun_headless() %{expand:
c0c534
  alternatives --remove java %{jrebindir %%1}/java
c0c534
  alternatives --remove jre_%{origin} %{_jvmdir}/%{sdkdir %%1}
c0c534
  alternatives --remove jre_%{javaver} %{_jvmdir}/%{sdkdir %%1}
c0c534
  alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk %%1}
c0c534
}
c0c534
c0c534
%global posttrans_script() %{expand:
c0c534
%{update_desktop_icons}
c0c534
}
c0c534
c0c534
%global post_devel() %{expand:
c0c534
c0c534
PRIORITY=%{priority}
c0c534
if [ "%1" == %{debug_suffix} ]; then
c0c534
  let PRIORITY=PRIORITY-1
c0c534
fi
c0c534
c0c534
ext=.gz
c0c534
alternatives \\
c0c534
  --install %{_bindir}/javac javac %{sdkbindir %%1}/javac $PRIORITY  --family %{name}.%{_arch} \\
c0c534
  --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir %%1} \\
c0c534
%ifarch %{aot_arches}
c0c534
  --slave %{_bindir}/jaotc jaotc %{sdkbindir %%1}/jaotc \\
c0c534
%endif
c0c534
  --slave %{_bindir}/jlink jlink %{sdkbindir %%1}/jlink \\
c0c534
  --slave %{_bindir}/jmod jmod %{sdkbindir %%1}/jmod \\
e50716
%ifarch %{jit_arches}
e50716
%ifnarch s390x
c0c534
  --slave %{_bindir}/jhsdb jhsdb %{sdkbindir %%1}/jhsdb \\
e50716
%endif
e50716
%endif
c0c534
  --slave %{_bindir}/jar jar %{sdkbindir %%1}/jar \\
c0c534
  --slave %{_bindir}/jarsigner jarsigner %{sdkbindir %%1}/jarsigner \\
c0c534
  --slave %{_bindir}/javadoc javadoc %{sdkbindir %%1}/javadoc \\
c0c534
  --slave %{_bindir}/javap javap %{sdkbindir %%1}/javap \\
c0c534
  --slave %{_bindir}/jcmd jcmd %{sdkbindir %%1}/jcmd \\
c0c534
  --slave %{_bindir}/jconsole jconsole %{sdkbindir %%1}/jconsole \\
c0c534
  --slave %{_bindir}/jdb jdb %{sdkbindir %%1}/jdb \\
c0c534
  --slave %{_bindir}/jdeps jdeps %{sdkbindir %%1}/jdeps \\
c0c534
  --slave %{_bindir}/jdeprscan jdeprscan %{sdkbindir %%1}/jdeprscan \\
c0c534
  --slave %{_bindir}/jimage jimage %{sdkbindir %%1}/jimage \\
c0c534
  --slave %{_bindir}/jinfo jinfo %{sdkbindir %%1}/jinfo \\
c0c534
  --slave %{_bindir}/jmap jmap %{sdkbindir %%1}/jmap \\
c0c534
  --slave %{_bindir}/jps jps %{sdkbindir %%1}/jps \\
c0c534
  --slave %{_bindir}/jrunscript jrunscript %{sdkbindir %%1}/jrunscript \\
c0c534
  --slave %{_bindir}/jshell jshell %{sdkbindir %%1}/jshell \\
c0c534
  --slave %{_bindir}/jstack jstack %{sdkbindir %%1}/jstack \\
c0c534
  --slave %{_bindir}/jstat jstat %{sdkbindir %%1}/jstat \\
c0c534
  --slave %{_bindir}/jstatd jstatd %{sdkbindir %%1}/jstatd \\
c0c534
  --slave %{_bindir}/rmic rmic %{sdkbindir %%1}/rmic \\
c0c534
  --slave %{_bindir}/serialver serialver %{sdkbindir %%1}/serialver \\
c0c534
  --slave %{_mandir}/man1/jar.1$ext jar.1$ext \\
c0c534
  %{_mandir}/man1/jar-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \\
c0c534
  %{_mandir}/man1/jarsigner-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/javac.1$ext javac.1$ext \\
c0c534
  %{_mandir}/man1/javac-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \\
c0c534
  %{_mandir}/man1/javadoc-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/javap.1$ext javap.1$ext \\
c0c534
  %{_mandir}/man1/javap-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\
c0c534
  %{_mandir}/man1/jcmd-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\
c0c534
  %{_mandir}/man1/jconsole-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\
c0c534
  %{_mandir}/man1/jdb-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \\
c0c534
  %{_mandir}/man1/jdeps-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \\
c0c534
  %{_mandir}/man1/jinfo-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \\
c0c534
  %{_mandir}/man1/jmap-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jps.1$ext jps.1$ext \\
c0c534
  %{_mandir}/man1/jps-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \\
c0c534
  %{_mandir}/man1/jrunscript-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \\
c0c534
  %{_mandir}/man1/jstack-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\
c0c534
  %{_mandir}/man1/jstat-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\
c0c534
  %{_mandir}/man1/jstatd-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \\
c0c534
  %{_mandir}/man1/rmic-%{uniquesuffix %%1}.1$ext \\
c0c534
  --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\
c0c534
  %{_mandir}/man1/serialver-%{uniquesuffix %%1}.1$ext \\
c0c534
c0c534
for X in %{origin} %{javaver} ; do
c0c534
  alternatives \\
c0c534
    --install %{_jvmdir}/java-"$X" java_sdk_"$X" %{_jvmdir}/%{sdkdir %%1} $PRIORITY  --family %{name}.%{_arch}
c0c534
done
c0c534
c0c534
update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir %%1} $PRIORITY  --family %{name}.%{_arch}
c0c534
c0c534
update-desktop-database %{_datadir}/applications &> /dev/null || :
c0c534
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
c0c534
c0c534
exit 0
c0c534
}
c0c534
c0c534
%global postun_devel() %{expand:
c0c534
  alternatives --remove javac %{sdkbindir %%1}/javac
c0c534
  alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir %%1}
c0c534
  alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir %%1}
c0c534
  alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir %%1}
c0c534
c0c534
update-desktop-database %{_datadir}/applications &> /dev/null || :
c0c534
c0c534
if [ $1 -eq 0 ] ; then
c0c534
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
c0c534
    %{update_desktop_icons}
c0c534
fi
c0c534
exit 0
c0c534
}
c0c534
c0c534
%global posttrans_devel() %{expand:
c0c534
%{update_desktop_icons}
c0c534
}
c0c534
c0c534
%global post_javadoc() %{expand:
c0c534
c0c534
PRIORITY=%{priority}
c0c534
if [ "%1" == %{debug_suffix} ]; then
c0c534
  let PRIORITY=PRIORITY-1
c0c534
fi
c0c534
c0c534
alternatives \\
c0c534
  --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir %%1}/api \\
c0c534
  $PRIORITY  --family %{name}
c0c534
exit 0
c0c534
}
c0c534
c0c534
%global postun_javadoc() %{expand:
c0c534
  alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir %%1}/api
c0c534
exit 0
c0c534
}
c0c534
c0c534
%global post_javadoc_zip() %{expand:
c0c534
c0c534
PRIORITY=%{priority}
c0c534
if [ "%1" == %{debug_suffix} ]; then
c0c534
  let PRIORITY=PRIORITY-1
c0c534
fi
c0c534
c0c534
alternatives \\
c0c534
  --install %{_javadocdir}/java-zip javadoczip %{_javadocdir}/%{uniquejavadocdir %%1}.zip \\
c0c534
  $PRIORITY  --family %{name}
c0c534
exit 0
c0c534
}
c0c534
c0c534
%global postun_javadoc_zip() %{expand:
c0c534
  alternatives --remove javadoczip %{_javadocdir}/%{uniquejavadocdir %%1}.zip
c0c534
exit 0
c0c534
}
c0c534
c0c534
%define files_jre() %{expand:
c0c534
%{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}-%{origin}.png
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libsplashscreen.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libawt_xawt.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libjawt.so
c0c534
}
c0c534
c0c534
c0c534
%define files_jre_headless() %{expand:
c0c534
%license %{_jvmdir}/%{sdkdir %%1}/legal
c0c534
%dir %{_sysconfdir}/.java/.systemPrefs
c0c534
%dir %{_sysconfdir}/.java
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}
c0c534
%{_jvmdir}/%{sdkdir %%1}/release
c0c534
%{_jvmdir}/%{jrelnk %%1}
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/bin
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/java
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jjs
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/keytool
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/pack200
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/rmid
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/rmiregistry
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/unpack200
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/lib
c0c534
%ifarch %{jit_arches}
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/classlist
c0c534
%endif
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/jexec
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/jrt-fs.jar
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/modules
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/psfont.properties.ja
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/psfontj2d.properties
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/tzdb.dat
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/lib/jli
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/jli/libjli.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/jvm.cfg
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libattach.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libawt.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libextnet.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libjsig.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libawt_headless.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libdt_socket.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libfontmanager.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libinstrument.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libj2gss.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libj2pcsc.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libj2pkcs11.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libjaas.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libjava.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libjavajpeg.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libjdwp.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libjimage.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libjsound.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/liblcms.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libmanagement.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libmanagement_agent.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libmanagement_ext.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libmlib_image.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libnet.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libnio.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libprefs.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/librmi.so
c0c534
# Zero and S390x don't have SA
c0c534
%ifarch %{jit_arches}
c0c534
%ifnarch s390x
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libsaproc.so
c0c534
%endif
c0c534
%endif
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libsctp.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libsunec.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libunpack.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libverify.so
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/libzip.so
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/lib/jfr
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/jfr/default.jfc
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/jfr/profile.jfc
c0c534
%{_mandir}/man1/java-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jjs-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/keytool-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/pack200-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/rmid-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/rmiregistry-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/unpack200-%{uniquesuffix %%1}.1*
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/server/
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/client/
c0c534
%ifarch %{jit_arches}
c0c534
%ifnarch %{power64}
c0c534
%attr(444, root, root) %ghost %{_jvmdir}/%{sdkdir %%1}/lib/server/classes.jsa
c0c534
%attr(444, root, root) %ghost %{_jvmdir}/%{sdkdir %%1}/lib/client/classes.jsa
c0c534
%endif
c0c534
%endif
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/lib/security
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/security/cacerts
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/conf
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/conf/management
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/conf/security
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/conf/security/policy
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/conf/security/policy/limited
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/conf/security/policy/unlimited
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/lib/security/default.policy
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/lib/security/blacklisted.certs
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/lib/security/public_suffix_list.dat
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/security/policy/limited/exempt_local.policy
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/security/policy/limited/default_local.policy
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/security/policy/limited/default_US_export.policy
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/security/policy/unlimited/default_local.policy
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/security/policy/unlimited/default_US_export.policy
c0c534
 %{_jvmdir}/%{sdkdir %%1}/conf/security/policy/README.txt
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/security/java.policy
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/security/java.security
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/logging.properties
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/security/nss.cfg
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/management/jmxremote.access
c0c534
# this is conifg template, thus not config-noreplace
c0c534
%config  %{_jvmdir}/%{sdkdir %%1}/conf/management/jmxremote.password.template
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/management/management.properties
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/net.properties
c0c534
%config(noreplace) %{_jvmdir}/%{sdkdir %%1}/conf/sound.properties
c0c534
}
c0c534
c0c534
%global files_devel() %{expand:
c0c534
%dir %{_jvmdir}/%{sdkdir %%1}/bin
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jar
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jarsigner
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/javac
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/javadoc
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/javap
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jconsole
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jcmd
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jdb
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jdeps
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jdeprscan
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jimage
c0c534
# Zero and S390x don't have SA
c0c534
%ifarch %{jit_arches}
c0c534
%ifnarch s390x
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jhsdb
c0c534
%endif
c0c534
%endif
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jinfo
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jlink
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jmap
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jmod
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jps
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jrunscript
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jshell
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jstack
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jstat
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jstatd
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/rmic
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/serialver
c0c534
%ifarch %{aot_arches}
c0c534
%{_jvmdir}/%{sdkdir %%1}/bin/jaotc
c0c534
%endif
c0c534
%{_jvmdir}/%{sdkdir %%1}/include
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/ct.sym
c0c534
%if %{with_systemtap}
c0c534
%{_jvmdir}/%{sdkdir %%1}/tapset
c0c534
%endif
c0c534
%{_datadir}/applications/*jconsole%1.desktop
c0c534
%{_mandir}/man1/jar-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jarsigner-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/javac-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/javadoc-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/javap-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jconsole-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jcmd-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jdb-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jdeps-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jinfo-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jmap-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jps-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jrunscript-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jstack-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jstat-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/jstatd-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/rmic-%{uniquesuffix %%1}.1*
c0c534
%{_mandir}/man1/serialver-%{uniquesuffix %%1}.1*
c0c534
%if %{with_systemtap}
c0c534
%dir %{tapsetroot}
c0c534
%dir %{tapsetdirttapset}
c0c534
%dir %{tapsetdir}
c0c534
%{tapsetdir}/*%{_arch}%1.stp
c0c534
%endif
c0c534
}
c0c534
c0c534
%define files_jmods() %{expand:
c0c534
%{_jvmdir}/%{sdkdir %%1}/jmods
c0c534
}
c0c534
c0c534
%define files_demo() %{expand:
c0c534
%license %{_jvmdir}/%{sdkdir %%1}/legal
c0c534
%{_jvmdir}/%{sdkdir %%1}/demo
c0c534
%{_jvmdir}/%{sdkdir %%1}/sample
c0c534
}
c0c534
c0c534
%define files_src() %{expand:
c0c534
%license %{_jvmdir}/%{sdkdir %%1}/legal
c0c534
%{_jvmdir}/%{sdkdir %%1}/lib/src.zip
c0c534
}
c0c534
c0c534
%define files_javadoc() %{expand:
c0c534
%doc %{_javadocdir}/%{uniquejavadocdir %%1}
c0c534
%license %{buildoutputdir %%1}/images/%{jdkimage}/legal
c0c534
}
c0c534
c0c534
%define files_javadoc_zip() %{expand:
c0c534
%doc %{_javadocdir}/%{uniquejavadocdir %%1}.zip
c0c534
%license %{buildoutputdir %%1}/images/%{jdkimage}/legal
c0c534
}
c0c534
c0c534
# not-duplicated requires/provides/obsolate for normal/debug packages
c0c534
%global java_rpo() %{expand:
c0c534
Requires: fontconfig%{?_isa}
c0c534
Requires: xorg-x11-fonts-Type1
c0c534
# Requires rest of java
c0c534
Requires: %{name}-headless%1%{?_isa} = %{epoch}:%{version}-%{release}
c0c534
OrderWithRequires: %{name}-headless%1%{?_isa} = %{epoch}:%{version}-%{release}
c0c534
# for java-X-openjdk package's desktop binding
c0c534
#Recommends: gtk2%{?_isa}
c0c534
# rhel7 do not have week depndencies
c0c534
c0c534
Provides: java-%{javaver}-%{origin}%1 = %{epoch}:%{version}-%{release}
c0c534
c0c534
# Standard JPackage base provides
e50716
#Provides: jre = %{javaver}%1
e50716
#Provides: jre-%{origin}%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: jre-%{javaver}%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: jre-%{javaver}-%{origin}%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}%1 = %{epoch}:%{version}-%{release}
e50716
#Provides: java-%{origin}%1 = %{epoch}:%{version}-%{release}
e50716
#Provides: java%1 = %{epoch}:%{javaver}
c0c534
}
c0c534
c0c534
%global java_headless_rpo() %{expand:
c0c534
# Require /etc/pki/java/cacerts
c0c534
Requires: ca-certificates
c0c534
# Require jpackage-utils for ownership of /usr/lib/jvm/ and macros
c0c534
Requires: javapackages-tools
c0c534
# Require zone-info data provided by tzdata-java sub-package
c0c534
Requires: tzdata-java >= 2015d
c0c534
# libsctp.so.1 is being `dlopen`ed on demand
c0c534
Requires: lksctp-tools%{?_isa}
c0c534
# there is a need to depend on the exact version of NSS
c0c534
Requires: nss%{?_isa} %{NSS_BUILDTIME_VERSION}
c0c534
Requires: nss-softokn%{?_isa} %{NSSSOFTOKN_BUILDTIME_VERSION}
c0c534
# tool to copy jdk's configs - should be Recommends only, but then only dnf/yum enforce it,
c0c534
# not rpm transaction and so no configs are persisted when pure rpm -u is run. It may be
c0c534
# considered as regression
c0c534
Requires: copy-jdk-configs >= 3.3
c0c534
OrderWithRequires: copy-jdk-configs
c0c534
# Post requires alternatives to install tool alternatives
c0c534
Requires(post):   %{_sbindir}/alternatives
c0c534
# in version 1.7 and higher for --family switch
c0c534
Requires(post):   chkconfig >= 1.7
c0c534
# Postun requires alternatives to uninstall tool alternatives
c0c534
Requires(postun): %{_sbindir}/alternatives
c0c534
# in version 1.7 and higher for --family switch
c0c534
Requires(postun):   chkconfig >= 1.7
c0c534
# for optional support of kernel stream control, card reader and printing bindings
c0c534
#Suggests: lksctp-tools%{?_isa}, pcsc-lite-devel%{?_isa}, cups
c0c534
# rhel7 do not have week depndencies
c0c534
c0c534
# Standard JPackage base provides
e50716
#Provides: jre-headless%1 = %{epoch}:%{javaver}
c0c534
Provides: jre-%{javaver}-%{origin}-headless%1 = %{epoch}:%{version}-%{release}
e50716
#Provides: jre-%{origin}-headless%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: jre-%{javaver}-headless%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-%{origin}-headless%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-headless%1 = %{epoch}:%{version}-%{release}
e50716
#Provides: java-%{origin}-headless%1 = %{epoch}:%{version}-%{release}
e50716
#Provides: java-headless%1 = %{epoch}:%{javaver}
c0c534
c0c534
# https://bugzilla.redhat.com/show_bug.cgi?id=1312019
c0c534
Provides: /usr/bin/jjs
c0c534
c0c534
}
c0c534
c0c534
%global java_devel_rpo() %{expand:
c0c534
# Require base package
c0c534
Requires:         %{name}%1%{?_isa} = %{epoch}:%{version}-%{release}
c0c534
OrderWithRequires: %{name}-headless%1%{?_isa} = %{epoch}:%{version}-%{release}
c0c534
# Post requires alternatives to install tool alternatives
c0c534
Requires(post):   %{_sbindir}/alternatives
c0c534
# in version 1.7 and higher for --family switch
c0c534
Requires(post):   chkconfig >= 1.7
c0c534
# Postun requires alternatives to uninstall tool alternatives
c0c534
Requires(postun): %{_sbindir}/alternatives
c0c534
# in version 1.7 and higher for --family switch
c0c534
Requires(postun):   chkconfig >= 1.7
c0c534
c0c534
# Standard JPackage devel provides
c0c534
Provides: java-sdk-%{javaver}-%{origin}%1 = %{epoch}:%{version}
c0c534
Provides: java-sdk-%{javaver}%1 = %{epoch}:%{version}
c0c534
#Provides: java-sdk-%{origin}%1 = %{epoch}:%{version}
c0c534
#Provides: java-sdk%1 = %{epoch}:%{javaver}
c0c534
Provides: java-%{javaver}-devel%1 = %{epoch}:%{version}
c0c534
Provides: java-%{javaver}-%{origin}-devel%1 = %{epoch}:%{version}
c0c534
#Provides: java-devel-%{origin}%1 = %{epoch}:%{version}
c0c534
#Provides: java-devel%1 = %{epoch}:%{javaver}
c0c534
c0c534
}
c0c534
c0c534
%define java_jmods_rpo() %{expand:
c0c534
# Requires devel package
c0c534
# as jmods are bytecode, they should be OK without any _isa
c0c534
Requires:         %{name}-devel%1 = %{epoch}:%{version}-%{release}
c0c534
OrderWithRequires: %{name}-headless%1 = %{epoch}:%{version}-%{release}
c0c534
c0c534
Provides: java-jmods%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-jmods%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-%{origin}-jmods%1 = %{epoch}:%{version}-%{release}
c0c534
c0c534
}
c0c534
c0c534
%global java_demo_rpo() %{expand:
c0c534
Requires: %{name}%1%{?_isa} = %{epoch}:%{version}-%{release}
c0c534
OrderWithRequires: %{name}-headless%1%{?_isa} = %{epoch}:%{version}-%{release}
c0c534
c0c534
Provides: java-demo%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-demo%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-%{origin}-demo%1 = %{epoch}:%{version}-%{release}
c0c534
c0c534
}
c0c534
c0c534
%global java_javadoc_rpo() %{expand:
c0c534
OrderWithRequires: %{name}-headless%1%{?_isa} = %{epoch}:%{version}-%{release}
c0c534
# Post requires alternatives to install javadoc alternative
c0c534
Requires(post):   %{_sbindir}/alternatives
c0c534
# in version 1.7 and higher for --family switch
c0c534
Requires(post):   chkconfig >= 1.7
c0c534
# Postun requires alternatives to uninstall javadoc alternative
c0c534
Requires(postun): %{_sbindir}/alternatives
c0c534
# in version 1.7 and higher for --family switch
c0c534
Requires(postun):   chkconfig >= 1.7
c0c534
c0c534
# Standard JPackage javadoc provides.
c0c534
Provides: java-javadoc%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-javadoc%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-%{origin}-javadoc%1 = %{epoch}:%{version}-%{release}
c0c534
}
c0c534
c0c534
%global java_src_rpo() %{expand:
c0c534
Requires: %{name}-headless%1%{?_isa} = %{epoch}:%{version}-%{release}
c0c534
c0c534
# Standard JPackage sources provides.
c0c534
Provides: java-src%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-src%1 = %{epoch}:%{version}-%{release}
c0c534
Provides: java-%{javaver}-%{origin}-src%1 = %{epoch}:%{version}-%{release}
c0c534
}
c0c534
c0c534
# Prevent brp-java-repack-jars from being run.
c0c534
%global __jar_repack 0
c0c534
c0c534
Name:    java-%{javaver}-%{origin}
c0c534
Version: %{newjavaver}.%{buildver}
c82467
Release: 0%{?dist}
c0c534
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
c0c534
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
c0c534
# also included the epoch in their virtual provides. This created a
c0c534
# situation where in-the-wild java-1.5.0-ibm packages provided "java =
c0c534
# 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
c0c534
# interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
c0c534
# satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
c0c534
# JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
c0c534
# provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
c0c534
c0c534
Epoch:   1
c0c534
Summary: %{origin_nice} Runtime Environment %{majorver}
c0c534
Group:   Development/Languages
c0c534
c0c534
# HotSpot code is licensed under GPLv2
c0c534
# JDK library code is licensed under GPLv2 with the Classpath exception
c0c534
# The Apache license is used in code taken from Apache projects (primarily xalan & xerces)
c0c534
# DOM levels 2 & 3 and the XML digital signature schemas are licensed under the W3C Software License
c0c534
# The JSR166 concurrency code is in the public domain
c0c534
# The BSD and MIT licenses are used for a number of third-party libraries (see ADDITIONAL_LICENSE_INFO)
c0c534
# The OpenJDK source tree includes:
c0c534
# - JPEG library (IJG), zlib & libpng (zlib), giflib (MIT), harfbuzz (ISC),
c0c534
# - freetype (FTL), jline (BSD) and LCMS (MIT)
c0c534
# - jquery (MIT), jdk.crypto.cryptoki PKCS 11 wrapper (RSA)
c0c534
# - public_suffix_list.dat from publicsuffix.org (MPLv2.0)
c0c534
# The test code includes copies of NSS under the Mozilla Public License v2.0
c0c534
# The PCSClite headers are under a BSD with advertising license
c0c534
# The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version
c0c534
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
c0c534
URL:      http://openjdk.java.net/
c0c534
c0c534
c0c534
# to regenerate source0 (jdk) and source8 (jdk's taspets) run update_package.sh
c0c534
# update_package.sh contains hard-coded repos, revisions, tags, and projects to regenerate the source archives
c82467
Source0: shenandoah-jdk%{majorver}-shenandoah-jdk-%{newjavaver}+%{buildver}%{?tagsuffix:-%{tagsuffix}}.tar.xz
c0c534
Source8: systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz
c0c534
c0c534
# Desktop files. Adapted from IcedTea
c0c534
Source9: jconsole.desktop.in
c0c534
c0c534
# nss configuration file
c0c534
Source11: nss.cfg.in
c0c534
c0c534
# Removed libraries that we link instead
c0c534
Source12: remove-intree-libraries.sh
c0c534
c0c534
# Ensure we aren't using the limited crypto policy
c0c534
Source13: TestCryptoLevel.java
c0c534
c0c534
# Ensure ECDSA is working
c0c534
Source14: TestECDSA.java
c0c534
c0c534
############################################
c0c534
#
c0c534
# RPM/distribution specific patches
c0c534
#
c0c534
############################################
c0c534
c0c534
# NSS via SunPKCS11 Provider (disabled comment
c0c534
# due to memory leak).
c82467
Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
c0c534
c0c534
# Ignore AWTError when assistive technologies are loaded
c82467
Patch1:    rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
c0c534
# Restrict access to java-atk-wrapper classes
c82467
Patch2:    rh1648644-java_access_bridge_privileged_security.patch
c82467
# PR1834, RH1022017: Reduce curves reported by SSL to those in NSS
c82467
# Not currently suitable to go upstream as it disables curves
c82467
# for all providers unconditionally
c82467
Patch525: rh1022017-reduce_ssl_curves.patch
c82467
Patch3:    rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch
c0c534
# Follow system wide crypto policy RHBZ#1249083
c82467
Patch4:    pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
c0c534
# System NSS via SunEC Provider
c82467
Patch5:    pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk11.patch
c82467
c82467
#############################################
c82467
#
c82467
# Shenandaoh specific patches
c82467
#
c82467
#############################################
c0c534
c0c534
#############################################
c0c534
#
c0c534
# OpenJDK specific patches
c0c534
#
c0c534
#############################################
c0c534
e50716
# 8210416, RHBZ#1632174: [linux] Poor StrictMath performance due to non-optimized compilation
c82467
Patch8:    jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch
e50716
# 8210425, RHBZ#1632174: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization
c82467
Patch9:    jdk8210425-rh1632174-sharedRuntimeTrig_sharedRuntimeTrans_compiled_without_optimization.patch
e50716
e50716
#############################################
e50716
#
e50716
# JDK 9+ only patches
e50716
#
e50716
#############################################
e50716
e50716
# 8210647, RHBZ#1632174: libsaproc is being compiled without optimization
c82467
Patch10:    jdk8210647-rh1632174-libsaproc_is_being_compiled_without_optimization.patch
e50716
# 8210761, RHBZ#1632174: libjsig is being compiled without optimization
c82467
Patch11:    jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch
e50716
# 8210703, RHBZ#1632174: vmStructs.cpp compiled with -O0
c82467
Patch12:    jdk8210703-rh1632174-vmStructs_cpp_no_longer_compiled_with_o0
e50716
c82467
#############################################
c82467
#
c82467
# Patches appearing in 11.0.2
c82467
#
c82467
#############################################
c0c534
c0c534
BuildRequires: autoconf
c0c534
BuildRequires: automake
c0c534
BuildRequires: alsa-lib-devel
c0c534
BuildRequires: binutils
c0c534
BuildRequires: cups-devel
c0c534
BuildRequires: desktop-file-utils
c0c534
# elfutils only are OK for build without AOT
c0c534
BuildRequires: elfutils-devel
c0c534
BuildRequires: fontconfig
c0c534
BuildRequires: freetype-devel
c0c534
BuildRequires: giflib-devel
c0c534
BuildRequires: gcc-c++
c0c534
BuildRequires: gdb
c0c534
BuildRequires: gtk2-devel
c0c534
# LCMS on rhel7 is older then LCMS in intree JDK
c0c534
BuildRequires: lcms2-devel
c0c534
BuildRequires: libjpeg-devel
c0c534
BuildRequires: libpng-devel
c0c534
BuildRequires: libxslt
c0c534
BuildRequires: libX11-devel
c0c534
BuildRequires: libXi-devel
c0c534
BuildRequires: libXinerama-devel
c0c534
BuildRequires: libXt-devel
c0c534
BuildRequires: libXtst-devel
c0c534
# Requirements for setting up the nss.cfg
c0c534
BuildRequires: nss-devel
c0c534
BuildRequires: pkgconfig
c0c534
BuildRequires: xorg-x11-proto-devel
c0c534
BuildRequires: zip
c0c534
BuildRequires: javapackages-tools
c0c534
BuildRequires: java-11-openjdk-devel
c0c534
# Zero-assembler build requirement
c0c534
%ifnarch %{jit_arches}
c0c534
BuildRequires: libffi-devel
c0c534
%endif
c0c534
BuildRequires: tzdata-java >= 2015d
c0c534
# Earlier versions have a bug in tree vectorization on PPC
c0c534
BuildRequires: gcc >= 4.8.3-8
c0c534
# Build requirements for SunEC system NSS support
c0c534
BuildRequires: nss-softokn-freebl-devel >= 3.16.1
c0c534
c0c534
%if %{with_systemtap}
c0c534
BuildRequires: systemtap-sdt-devel
c0c534
%endif
c0c534
c0c534
# this is always built, also during debug-only build
c0c534
# when it is built in debug-only this package is just placeholder
c0c534
%{java_rpo %{nil}}
c0c534
c0c534
%description
c0c534
The %{origin_nice} runtime environment.
c0c534
c0c534
%if %{include_debug_build}
c0c534
%package debug
c0c534
Summary: %{origin_nice} Runtime Environment %{majorver} %{debug_on}
c0c534
Group:   Development/Languages
c0c534
c0c534
%{java_rpo -- %{debug_suffix_unquoted}}
c0c534
%description debug
c0c534
The %{origin_nice} runtime environment.
c0c534
%{debug_warning}
c0c534
%endif
c0c534
c0c534
%if %{include_normal_build}
c0c534
%package headless
c0c534
Summary: %{origin_nice} Headless Runtime Environment %{majorver}
c0c534
Group:   Development/Languages
c0c534
c0c534
%{java_headless_rpo %{nil}}
c0c534
c0c534
%description headless
c0c534
The %{origin_nice} runtime environment %{majorver} without audio and video support.
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%package headless-debug
c0c534
Summary: %{origin_nice} Runtime Environment %{debug_on}
c0c534
Group:   Development/Languages
c0c534
c0c534
%{java_headless_rpo -- %{debug_suffix_unquoted}}
c0c534
c0c534
%description headless-debug
c0c534
The %{origin_nice} runtime environment %{majorver} without audio and video support.
c0c534
%{debug_warning}
c0c534
%endif
c0c534
c0c534
%if %{include_normal_build}
c0c534
%package devel
c0c534
Summary: %{origin_nice} Development Environment %{majorver}
c0c534
Group:   Development/Tools
c0c534
c0c534
%{java_devel_rpo %{nil}}
c0c534
c0c534
%description devel
c0c534
The %{origin_nice} development tools %{majorver}.
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%package devel-debug
c0c534
Summary: %{origin_nice} Development Environment %{majorver} %{debug_on}
c0c534
Group:   Development/Tools
c0c534
c0c534
%{java_devel_rpo -- %{debug_suffix_unquoted}}
c0c534
c0c534
%description devel-debug
c0c534
The %{origin_nice} development tools %{majorver}.
c0c534
%{debug_warning}
c0c534
%endif
c0c534
c0c534
%if %{include_normal_build}
c0c534
%package jmods
c0c534
Summary: JMods for %{origin_nice} %{majorver}
c0c534
Group:   Development/Tools
c0c534
c0c534
%{java_jmods_rpo %{nil}}
c0c534
c0c534
%description jmods
c0c534
The JMods for %{origin_nice}.
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%package jmods-debug
c0c534
Summary: JMods for %{origin_nice} %{majorver} %{debug_on}
c0c534
Group:   Development/Tools
c0c534
c0c534
%{java_jmods_rpo -- %{debug_suffix_unquoted}}
c0c534
c0c534
%description jmods-debug
c0c534
The JMods for %{origin_nice} %{majorver}.
c0c534
%{debug_warning}
c0c534
%endif
c0c534
c0c534
%if %{include_normal_build}
c0c534
%package demo
c0c534
Summary: %{origin_nice} Demos %{majorver}
c0c534
Group:   Development/Languages
c0c534
c0c534
%{java_demo_rpo %{nil}}
c0c534
c0c534
%description demo
c0c534
The %{origin_nice} demos %{majorver}.
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%package demo-debug
c0c534
Summary: %{origin_nice} Demos %{majorver} %{debug_on}
c0c534
Group:   Development/Languages
c0c534
c0c534
%{java_demo_rpo -- %{debug_suffix_unquoted}}
c0c534
c0c534
%description demo-debug
c0c534
The %{origin_nice} demos %{majorver}.
c0c534
%{debug_warning}
c0c534
%endif
c0c534
c0c534
%if %{include_normal_build}
c0c534
%package src
c0c534
Summary: %{origin_nice} Source Bundle %{majorver}
c0c534
Group:   Development/Languages
c0c534
c0c534
%{java_src_rpo %{nil}}
c0c534
c0c534
%description src
c0c534
The java-%{origin}-src sub-package contains the complete %{origin_nice} %{majorver}
c0c534
class library source code for use by IDE indexers and debuggers.
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%package src-debug
e50716
Summary: %{origin_nice} Source Bundle %{majorver} %{for_debug}
c0c534
Group:   Development/Languages
c0c534
c0c534
%{java_src_rpo -- %{debug_suffix_unquoted}}
c0c534
c0c534
%description src-debug
c0c534
The java-%{origin}-src-slowdebug sub-package contains the complete %{origin_nice} %{majorver}
c0c534
 class library source code for use by IDE indexers and debuggers. Debugging %{for_debug}.
c0c534
%endif
c0c534
c0c534
%if %{include_normal_build}
c0c534
%package javadoc
c0c534
Summary: %{origin_nice} %{majorver} API documentation
c0c534
Group:   Documentation
c0c534
Requires: javapackages-tools
c0c534
c0c534
%{java_javadoc_rpo %{nil}}
c0c534
c0c534
%description javadoc
c0c534
The %{origin_nice} %{majorver} API documentation.
c0c534
%endif
c0c534
c0c534
%if %{include_normal_build}
c0c534
%package javadoc-zip
c0c534
Summary: %{origin_nice} %{majorver} API documentation compressed in single archive
c0c534
Group:   Documentation
c0c534
Requires: javapackages-tools
c0c534
c0c534
%{java_javadoc_rpo %{nil}}
c0c534
c0c534
%description javadoc-zip
c0c534
The %{origin_nice} %{majorver} API documentation compressed in single archive.
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%package javadoc-debug
c0c534
Summary: %{origin_nice} %{majorver} API documentation %{for_debug}
c0c534
Group:   Documentation
c0c534
Requires: javapackages-tools
c0c534
c0c534
%{java_javadoc_rpo -- %{debug_suffix_unquoted}}
c0c534
c0c534
%description javadoc-debug
c0c534
The %{origin_nice} %{majorver} API documentation %{for_debug}.
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%package javadoc-zip-debug
c0c534
Summary: %{origin_nice} %{majorver} API documentation compressed in single archive %{for_debug}
c0c534
Group:   Documentation
c0c534
Requires: javapackages-tools
c0c534
c0c534
%{java_javadoc_rpo -- %{debug_suffix_unquoted}}
c0c534
c0c534
%description javadoc-zip-debug
c0c534
The %{origin_nice} %{majorver} API documentation compressed in single archive %{for_debug}.
c0c534
%endif
c0c534
c0c534
c0c534
%prep
c0c534
if [ %{include_normal_build} -eq 0 -o  %{include_normal_build} -eq 1 ] ; then
c0c534
  echo "include_normal_build is %{include_normal_build}"
c0c534
else
c0c534
  echo "include_normal_build is %{include_normal_build}, thats invalid. Use 1 for yes or 0 for no"
c0c534
  exit 11
c0c534
fi
c0c534
if [ %{include_debug_build} -eq 0 -o  %{include_debug_build} -eq 1 ] ; then
c0c534
  echo "include_debug_build is %{include_debug_build}"
c0c534
else
c0c534
  echo "include_debug_build is %{include_debug_build}, thats invalid. Use 1 for yes or 0 for no"
c0c534
  exit 12
c0c534
fi
c0c534
if [ %{include_debug_build} -eq 0 -a  %{include_normal_build} -eq 0 ] ; then
c0c534
  echo "You have disabled both include_debug_build and include_normal_build. That is a no go."
c0c534
  exit 13
c0c534
fi
c0c534
%setup -q -c -n %{uniquesuffix ""} -T -a 0
c0c534
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084
c0c534
prioritylength=`expr length %{priority}`
c0c534
if [ $prioritylength -ne 7 ] ; then
c0c534
 echo "priority must be 7 digits in total, violated"
c0c534
 exit 14
c0c534
fi
c0c534
c0c534
# OpenJDK patches
c0c534
c0c534
# Remove libraries that are linked
c0c534
sh %{SOURCE12}
c0c534
pushd %{top_level_dir_name}
c0c534
%patch1 -p1
c0c534
%patch2 -p1
c0c534
%patch3 -p1
c0c534
%patch4 -p1
c0c534
%patch5 -p1
e50716
%patch8 -p1
e50716
%patch9 -p1
e50716
%patch10 -p1
e50716
%patch11 -p1
e50716
%patch12 -p1
c82467
%patch525 -p1
c0c534
popd # openjdk
c0c534
c0c534
%patch1000
c0c534
c0c534
# Extract systemtap tapsets
c0c534
%if %{with_systemtap}
c0c534
tar --strip-components=1 -x -I xz -f %{SOURCE8}
c0c534
%if %{include_debug_build}
c0c534
cp -r tapset tapset%{debug_suffix}
c0c534
%endif
c0c534
c0c534
c0c534
for suffix in %{build_loop} ; do
c0c534
  for file in "tapset"$suffix/*.in; do
c0c534
    OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g"`
c0c534
    sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir $suffix}/lib/server/libjvm.so:g" $file > $file.1
c0c534
# TODO find out which architectures other than i686 have a client vm
c0c534
%ifarch %{ix86}
c0c534
    sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir $suffix}/lib/client/libjvm.so:g" $file.1 > $OUTPUT_FILE
c0c534
%else
c0c534
    sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.1 > $OUTPUT_FILE
c0c534
%endif
c0c534
    sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir $suffix}:g" $OUTPUT_FILE
c0c534
    sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE
c0c534
    sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir $suffix}/:g" $OUTPUT_FILE
c0c534
  done
c0c534
done
c0c534
# systemtap tapsets ends
c0c534
%endif
c0c534
c0c534
# Prepare desktop files
c0c534
for suffix in %{build_loop} ; do
c0c534
for file in %{SOURCE9}; do
c0c534
    FILE=`basename $file | sed -e s:\.in$::g`
c0c534
    EXT="${FILE##*.}"
c0c534
    NAME="${FILE%.*}"
c0c534
    OUTPUT_FILE=$NAME$suffix.$EXT
c0c534
    sed    -e  "s:@JAVA_HOME@:%{sdkbindir $suffix}:g" $file > $OUTPUT_FILE
c0c534
    sed -i -e  "s:@JRE_HOME@:%{jrebindir $suffix}:g" $OUTPUT_FILE
c0c534
    sed -i -e  "s:@ARCH@:%{version}-%{release}.%{_arch}$suffix:g" $OUTPUT_FILE
c0c534
    sed -i -e  "s:@JAVA_MAJOR_VERSION@:%{majorver}:g" $OUTPUT_FILE
c0c534
    sed -i -e  "s:@JAVA_VENDOR@:%{origin}:g" $OUTPUT_FILE
c0c534
done
c0c534
done
c0c534
c0c534
# Setup nss.cfg
c0c534
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
c0c534
c0c534
c0c534
%build
c0c534
# How many CPU's do we have?
c0c534
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
c0c534
export NUM_PROC=${NUM_PROC:-1}
c0c534
%if 0%{?_smp_ncpus_max}
c0c534
# Honor %%_smp_ncpus_max
c0c534
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
c0c534
%endif
c0c534
c0c534
%ifarch s390x sparc64 alpha %{power64} %{aarch64}
c0c534
export ARCH_DATA_MODEL=64
c0c534
%endif
c0c534
%ifarch alpha
c0c534
export CFLAGS="$CFLAGS -mieee"
c0c534
%endif
c0c534
c0c534
# We use ourcppflags because the OpenJDK build seems to
c0c534
# pass EXTRA_CFLAGS to the HotSpot C++ compiler...
c0c534
# Explicitly set the C++ standard as the default has changed on GCC >= 6
c0c534
EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks"
c0c534
EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks"
c0c534
c0c534
%ifarch %{power64} ppc
c0c534
# fix rpmlint warnings
c0c534
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
c0c534
%endif
c0c534
export EXTRA_CFLAGS
c0c534
c0c534
for suffix in %{build_loop} ; do
c0c534
if [ "x$suffix" = "x" ] ; then
c0c534
  debugbuild=release
c0c534
else
c0c534
  # change --something to something and rpeffix as slow
c0c534
  debugbuild=`echo slow$suffix  | sed "s/-//g"`
c0c534
fi
c0c534
c0c534
# Variable used in hs_err hook on build failures
c0c534
top_dir_abs_path=$(pwd)/%{top_level_dir_name}
c0c534
c0c534
mkdir -p %{buildoutputdir $suffix}
c0c534
pushd %{buildoutputdir $suffix}
c0c534
c0c534
bash ../configure \
c0c534
%ifnarch %{jit_arches}
c0c534
    --with-jvm-variants=zero \
c0c534
%endif
c0c534
%ifarch %{ppc64le}
c0c534
    --with-jobs=1 \
c0c534
%endif
c0c534
    --with-version-build=%{buildver} \
e50716
    --with-version-pre="" \
e50716
    --with-version-opt=%{lts_designator} \
e50716
    --with-vendor-version-string="%{vendor_version_string}" \
c0c534
    --with-boot-jdk=/usr/lib/jvm/java-11-openjdk \
c0c534
    --with-debug-level=$debugbuild \
c0c534
    --with-native-debug-symbols=internal \
c0c534
    --enable-unlimited-crypto \
c0c534
    --enable-system-nss \
c0c534
    --with-zlib=system \
c0c534
    --with-libjpeg=system \
c0c534
    --with-giflib=system \
c0c534
    --with-libpng=system \
c0c534
    --with-lcms=bundled \
c0c534
    --with-stdc++lib=dynamic \
c0c534
    --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
c0c534
    --with-extra-cflags="$EXTRA_CFLAGS" \
c0c534
    --with-extra-ldflags="%{ourldflags}" \
c0c534
    --with-num-cores="$NUM_PROC" \
c0c534
    --disable-javac-server \
e50716
%ifarch x86_64
e50716
    --with-jvm-features=zgc \
e50716
%endif
c0c534
    --disable-warnings-as-errors
c0c534
c0c534
make \
c0c534
    JAVAC_FLAGS=-g \
c0c534
    LOG=trace \
c0c534
    WARNINGS_ARE_ERRORS="-Wno-error" \
c0c534
    CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error" \
c0c534
    %{targets} || ( pwd; find $top_dir_abs_path -name "hs_err_pid*.log" | xargs cat && false )
c0c534
c0c534
make docs-zip
c0c534
c0c534
# the build (erroneously) removes read permissions from some jars
c0c534
# this is a regression in OpenJDK 7 (our compiler):
c0c534
# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
c0c534
find images/%{jdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
c0c534
c0c534
# Build screws up permissions on binaries
c0c534
# https://bugs.openjdk.java.net/browse/JDK-8173610
c0c534
find images/%{jdkimage} -iname '*.so' -exec chmod +x {} \;
c0c534
find images/%{jdkimage}/bin/ -exec chmod +x {} \;
c0c534
c0c534
popd >& /dev/null
c0c534
c0c534
# Install nss.cfg right away as we will be using the JRE above
c0c534
export JAVA_HOME=$(pwd)/%{buildoutputdir $suffix}/images/%{jdkimage}
c0c534
c0c534
# Install nss.cfg right away as we will be using the JRE above
c0c534
install -m 644 nss.cfg $JAVA_HOME/conf/security/
c0c534
c0c534
# Use system-wide tzdata
c0c534
rm $JAVA_HOME/lib/tzdb.dat
c0c534
ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/lib/tzdb.dat
c0c534
c0c534
# build cycles
c0c534
done
c0c534
c0c534
%check
c0c534
c0c534
# We test debug first as it will give better diagnostics on a crash
c0c534
for suffix in %{rev_build_loop} ; do
c0c534
c0c534
export JAVA_HOME=$(pwd)/%{buildoutputdir $suffix}/images/%{jdkimage}
c0c534
c0c534
#check sheandoah is enabled
c0c534
%if %{use_shenandoah_hotspot}
c0c534
$JAVA_HOME//bin/java -XX:+UseShenandoahGC -version
c0c534
%endif
c0c534
c0c534
# Check unlimited policy has been used
c0c534
$JAVA_HOME/bin/javac -d . %{SOURCE13}
c0c534
$JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLevel
c0c534
c0c534
# Check ECC is working
c0c534
$JAVA_HOME/bin/javac -d . %{SOURCE14}
c0c534
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
c0c534
c0c534
# Check debug symbols are present and can identify code
c0c534
find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
c0c534
do
c0c534
  if [ -f "$lib" ] ; then
c0c534
    echo "Testing $lib for debug symbols"
c0c534
    # All these tests rely on RPM failing the build if the exit code of any set
c0c534
    # of piped commands is non-zero.
c0c534
c0c534
    # Test for .debug_* sections in the shared object. This is the main test
c0c534
    # Stripped objects will not contain these
c0c534
    eu-readelf -S "$lib" | grep "] .debug_"
c0c534
    test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
c0c534
c0c534
    # Test FILE symbols. These will most likely be removed by anything that
c0c534
    # manipulates symbol tables because it's generally useless. So a nice test
c0c534
    # that nothing has messed with symbols
c0c534
    old_IFS="$IFS"
c0c534
    IFS=$'\n'
c0c534
    for line in $(eu-readelf -s "$lib" | grep "00000000      0 FILE    LOCAL  DEFAULT")
c0c534
    do
c0c534
     # We expect to see .cpp files, except for architectures like aarch64 and
c0c534
     # s390 where we expect .o and .oS files
c0c534
      echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
c0c534
    done
c0c534
    IFS="$old_IFS"
c0c534
c0c534
    # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking
c0c534
    if [ "`basename $lib`" = "libjvm.so" ]; then
c0c534
      eu-readelf -s "$lib" | \
c0c534
        grep -E "00000000      0 FILE    LOCAL  DEFAULT      ABS javaCalls.(cpp|o)$"
c0c534
    fi
c0c534
c0c534
    # Test that there are no .gnu_debuglink sections pointing to another
c0c534
    # debuginfo file. There shouldn't be any debuginfo files, so the link makes
c0c534
    # no sense either
c0c534
    eu-readelf -S "$lib" | grep 'gnu'
c0c534
    if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
c0c534
      echo "bad .gnu_debuglink section."
c0c534
      eu-readelf -x .gnu_debuglink "$lib"
c0c534
      false
c0c534
    fi
c0c534
  fi
c0c534
done
c0c534
c0c534
# Make sure gdb can do a backtrace based on line numbers on libjvm.so
c0c534
# javaCalls.cpp:58 should map to:
c0c534
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58 
c0c534
# Using line number 1 might cause build problems. See:
c0c534
# https://bugzilla.redhat.com/show_bug.cgi?id=1539664
c0c534
# https://bugzilla.redhat.com/show_bug.cgi?id=1538767
c0c534
gdb -q "$JAVA_HOME/bin/java" <
c0c534
handle SIGSEGV pass nostop noprint
c0c534
handle SIGILL pass nostop noprint
c0c534
set breakpoint pending on
c0c534
break javaCalls.cpp:1
c0c534
commands 1
c0c534
backtrace
c0c534
quit
c0c534
end
c0c534
run -version
c0c534
EOF
c0c534
grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
c0c534
c0c534
# Check src.zip has all sources. See RHBZ#1130490
c0c534
jar -tf $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe'
c0c534
c0c534
# Check class files include useful debugging information
c0c534
$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
c0c534
$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
c0c534
$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
c0c534
c0c534
# Check generated class files include useful debugging information
c0c534
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
c0c534
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
c0c534
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
c0c534
c0c534
# build cycles check
c0c534
done
c0c534
c0c534
%install
c0c534
STRIP_KEEP_SYMTAB=libjvm*
c0c534
c0c534
for suffix in %{build_loop} ; do
c0c534
c0c534
# Install the jdk
c0c534
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}
c0c534
cp -a %{buildoutputdir $suffix}/images/%{jdkimage} \
c0c534
  $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}
c0c534
c0c534
# Install jsa directories so we can owe them
c0c534
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/lib/%{archinstall}/server/
c0c534
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/lib/%{archinstall}/client/
c0c534
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/lib/client/ || true  ; # sometimes is here, sometimes not, ifout it or || true it out
c0c534
c0c534
pushd %{buildoutputdir $suffix}/images/%{jdkimage}
c0c534
c0c534
%if %{with_systemtap}
c0c534
  # Install systemtap support files
c0c534
  install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/tapset
c0c534
  # note, that uniquesuffix  is in BUILD dir in this case
c0c534
  cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/tapset/
c0c534
  pushd  $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/tapset/
c0c534
   tapsetFiles=`ls *.stp`
c0c534
  popd
c0c534
  install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
c0c534
  for name in $tapsetFiles ; do
c0c534
    targetName=`echo $name | sed "s/.stp/$suffix.stp/"`
c0c534
    ln -sf %{_jvmdir}/%{sdkdir $suffix}/tapset/$name $RPM_BUILD_ROOT%{tapsetdir}/$targetName
c0c534
  done
c0c534
%endif
c0c534
c0c534
  # Remove empty cacerts database
c0c534
  rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/lib/security/cacerts
c0c534
  # Install cacerts symlink needed by some apps which hard-code the path
c0c534
  pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/lib/security
c0c534
      ln -sf /etc/pki/java/cacerts .
c0c534
  popd
c0c534
c0c534
  # Install version-ed symlinks
c0c534
  pushd $RPM_BUILD_ROOT%{_jvmdir}
c0c534
    ln -sf %{sdkdir $suffix} %{jrelnk $suffix}
c0c534
  popd
c0c534
c0c534
c0c534
  # Install man pages
c0c534
  install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
c0c534
  for manpage in man/man1/*
c0c534
  do
c0c534
    # Convert man pages to UTF8 encoding
c0c534
    iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
c0c534
    mv -f $manpage.tmp $manpage
c0c534
    install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
c0c534
      $manpage .1)-%{uniquesuffix $suffix}.1
c0c534
  done
c0c534
  # Remove man pages from jdk image
c0c534
  rm -rf $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir $suffix}/man
c0c534
c0c534
popd
c0c534
c0c534
c0c534
# Install Javadoc documentation
c0c534
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
c0c534
cp -a %{buildoutputdir $suffix}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir $suffix}
e50716
cp -a %{buildoutputdir $suffix}/bundles/jdk-%{newjavaver}+%{buildver}%{lts_designator_zip}-docs.zip  $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir $suffix}.zip
c0c534
c0c534
# Install icons and menu entries
c0c534
for s in 16 24 32 48 ; do
c0c534
  install -D -p -m 644 \
c0c534
    %{top_level_dir_name}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png \
c0c534
    $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}-%{origin}.png
c0c534
done
c0c534
c0c534
# Install desktop files
c0c534
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
c0c534
for e in jconsole$suffix ; do
c0c534
    desktop-file-install --vendor=%{uniquesuffix $suffix} --mode=644 \
c0c534
        --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
c0c534
done
c0c534
c0c534
# Install /etc/.java/.systemPrefs/ directory
c0c534
# See https://bugzilla.redhat.com/show_bug.cgi?id=741821
c0c534
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
c0c534
c0c534
# copy samples next to demos; samples are mostly js files
c0c534
cp -r %{top_level_dir_name}/src/sample  $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir $suffix}/
c0c534
c0c534
c0c534
# stabilize permissions
c0c534
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir $suffix}/ -name "*.so" -exec chmod 755 {} \; ; 
c0c534
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir $suffix}/ -type d -exec chmod 755 {} \; ; 
c0c534
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir $suffix}/legal -type f -exec chmod 644 {} \; ; 
c0c534
c0c534
# end, dual install
c0c534
done
c0c534
c0c534
%if %{include_normal_build}
c0c534
# intentionally only for non-debug
c0c534
%pretrans headless -p <lua>
c0c534
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
c0c534
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
c0c534
-- if copy-jdk-configs is in transaction, it installs in pretrans to temp
c0c534
-- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in transaction  and so is
c0c534
-- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
c0c534
-- whether copy-jdk-configs is installed or not. If so, then configs are copied
c0c534
-- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
c0c534
local posix = require "posix"
c0c534
local debug = false
c0c534
c0c534
SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
c0c534
SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
c0c534
c0c534
local stat1 = posix.stat(SOURCE1, "type");
c0c534
local stat2 = posix.stat(SOURCE2, "type");
c0c534
c0c534
  if (stat1 ~= nil) then
c0c534
  if (debug) then
c0c534
    print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.")
c0c534
  end;
c0c534
  package.path = package.path .. ";" .. SOURCE1
c0c534
else
c0c534
  if (stat2 ~= nil) then
c0c534
  if (debug) then
c0c534
    print(SOURCE2 .." exists - copy-jdk-configs already installed and NOT in transaction. Using.")
c0c534
  end;
c0c534
  package.path = package.path .. ";" .. SOURCE2
c0c534
  else
c0c534
    if (debug) then
c0c534
      print(SOURCE1 .." does NOT exists")
c0c534
      print(SOURCE2 .." does NOT exists")
c0c534
      print("No config files will be copied")
c0c534
    end
c0c534
  return
c0c534
  end
c0c534
end
c0c534
-- run content of included file with fake args
c0c534
arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
c0c534
require "copy_jdk_configs.lua"
c0c534
c0c534
%post
c0c534
%{post_script %{nil}}
c0c534
c0c534
%post headless
c0c534
%{post_headless %{nil}}
c0c534
c0c534
%postun
c0c534
%{postun_script %{nil}}
c0c534
c0c534
%postun headless
c0c534
%{postun_headless %{nil}}
c0c534
c0c534
%posttrans
c0c534
%{posttrans_script %{nil}}
c0c534
c0c534
%post devel
c0c534
%{post_devel %{nil}}
c0c534
c0c534
%postun devel
c0c534
%{postun_devel %{nil}}
c0c534
c0c534
%posttrans  devel
c0c534
%{posttrans_devel %{nil}}
c0c534
c0c534
%post javadoc
c0c534
%{post_javadoc %{nil}}
c0c534
c0c534
%postun javadoc
c0c534
%{postun_javadoc %{nil}}
c0c534
c0c534
%post javadoc-zip
c0c534
%{post_javadoc_zip %{nil}}
c0c534
c0c534
%postun javadoc-zip
c0c534
%{postun_javadoc_zip %{nil}}
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%post debug
c0c534
%{post_script -- %{debug_suffix_unquoted}}
c0c534
c0c534
%post headless-debug
c0c534
%{post_headless -- %{debug_suffix_unquoted}}
c0c534
c0c534
%postun debug
c0c534
%{postun_script -- %{debug_suffix_unquoted}}
c0c534
c0c534
%postun headless-debug
c0c534
%{postun_headless -- %{debug_suffix_unquoted}}
c0c534
c0c534
%posttrans debug
c0c534
%{posttrans_script -- %{debug_suffix_unquoted}}
c0c534
c0c534
%post devel-debug
c0c534
%{post_devel -- %{debug_suffix_unquoted}}
c0c534
c0c534
%postun devel-debug
c0c534
%{postun_devel -- %{debug_suffix_unquoted}}
c0c534
c0c534
%posttrans  devel-debug
c0c534
%{posttrans_devel -- %{debug_suffix_unquoted}}
c0c534
c0c534
%post javadoc-debug
c0c534
%{post_javadoc -- %{debug_suffix_unquoted}}
c0c534
c0c534
%postun javadoc-debug
c0c534
%{postun_javadoc -- %{debug_suffix_unquoted}}
c0c534
c0c534
%post javadoc-zip-debug
c0c534
%{post_javadoc_zip -- %{debug_suffix_unquoted}}
c0c534
c0c534
%postun javadoc-zip-debug
c0c534
%{postun_javadoc_zip -- %{debug_suffix_unquoted}}
c0c534
%endif
c0c534
c0c534
%if %{include_normal_build}
c0c534
%files
c0c534
# main package builds always
c0c534
%{files_jre %{nil}}
c0c534
%else
c0c534
%files
c0c534
# placeholder
c0c534
%endif
c0c534
c0c534
c0c534
%if %{include_normal_build}
c0c534
%files headless
c0c534
# important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
c0c534
# all config/noreplace files (and more) have to be declared in pretrans. See pretrans
c0c534
%{files_jre_headless %{nil}}
c0c534
c0c534
%files devel
c0c534
%{files_devel %{nil}}
c0c534
c0c534
%files jmods
c0c534
%{files_jmods %{nil}}
c0c534
c0c534
%files demo
c0c534
%{files_demo %{nil}}
c0c534
c0c534
%files src
c0c534
%{files_src %{nil}}
c0c534
c0c534
%files javadoc
c0c534
%{files_javadoc %{nil}}
c0c534
c0c534
# this puts huge file to /usr/share
c0c534
# unluckily ti is really a documentation file
c0c534
# and unluckily it really is architecture-dependent, as eg. aot and grail are now x86_64 only
c0c534
# same for debug variant
c0c534
%files javadoc-zip
c0c534
%{files_javadoc_zip %{nil}}
c0c534
%endif
c0c534
c0c534
%if %{include_debug_build}
c0c534
%files debug
c0c534
%{files_jre -- %{debug_suffix_unquoted}}
c0c534
c0c534
%files headless-debug
c0c534
%{files_jre_headless -- %{debug_suffix_unquoted}}
c0c534
c0c534
%files devel-debug
c0c534
%{files_devel -- %{debug_suffix_unquoted}}
c0c534
c0c534
%files jmods-debug
c0c534
%{files_jmods -- %{debug_suffix_unquoted}}
c0c534
c0c534
%files demo-debug
c0c534
%{files_demo -- %{debug_suffix_unquoted}}
c0c534
c0c534
%files src-debug
c0c534
%{files_src -- %{debug_suffix_unquoted}}
c0c534
c0c534
%files javadoc-debug
c0c534
%{files_javadoc -- %{debug_suffix_unquoted}}
c0c534
c0c534
%files javadoc-zip-debug
c0c534
%{files_javadoc_zip -- %{debug_suffix_unquoted}}
c0c534
%endif
c0c534
c0c534
c0c534
%changelog
c82467
* Tue Jan 15 2019 Andrew Hughes <gnu.andrew@redhat.com> - 1:11.0.2.7-0
c82467
- Update to shenandoah-jdk-11.0.2+7 (January 2019 CPU)
c82467
- Make tagsuffix optional and comment it out while unused.
c82467
- Drop JDK-8211105/RH1628612/RH1630996 applied upstream.
c82467
- Drop JDK-8209639/RH1640127 applied upstream.
c82467
- Re-generate JDK-8210416/RH1632174 following JDK-8209786
c82467
- Resolves: rhbz#1661577
c82467
c82467
* Mon Jan 14 2019 Andrew Hughes <gnu.andrew@redhat.com> - 1:11.0.1.13-4
c82467
- Update to shenandoah-jdk-11.0.1+13-20190101
c82467
- Update tarball generation script in preparation for PR3681/RH1656677 SunEC changes.
c82467
- Use remove-intree-libraries.sh to remove the remaining SunEC code for now.
c82467
- Fix remove-intree-libraries.sh to not exit early and skip SunEC handling.
c82467
- Fix PR1983 SunEC patch so that ecc_impl.h is patched rather than added
c82467
- Add missing RH1022017 patch to reduce curves reported by SSL to those we support.
c82467
- Resolves: rhbz#1661577
c82467
c82467
* Thu Nov 01 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.1.13-3
c82467
- added Patch584 jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch
c82467
c82467
* Mon Oct 29 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.1.13-3
c82467
- Use upstream's version of Aarch64 intrinsics disable patch:
c82467
  - Removed:
c82467
    RHBZ-1628612-JDK-8210461-workaround-disable-aarch64-intrinsic.patch
c82467
    RHBZ-1630996-JDK-8210858-workaround-disable-aarch64-intrinsic-log.patch
c82467
  - Superceded by:
c82467
    jdk8211105-aarch64-disable_cos_sin_and_log_intrinsics.patch
e50716
e50716
* Thu Oct 18 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.1.13-2
e50716
- Use LTS designator in version output for RHEL.
e50716
e50716
* Thu Oct 18 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.1.13-1
e50716
- Update to October 2018 CPU release, 11.0.1+13.
e50716
e50716
* Wed Oct 17 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.0.28-2
e50716
- Use --with-vendor-version-string=18.9 so as to show original
e50716
  GA date for the JDK.
e50716
e50716
* Fri Sep 28 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.0.28-1
e50716
- Identify as GA version and no longer as early access (EA).
e50716
- JDK 11 has been released for GA on 2018-09-25.
e50716
e50716
* Fri Sep 28 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-9
e50716
- Rework changes from 1:11.0.ea.22-6. RHBZ#1632174 supercedes
e50716
  RHBZ-1624122.
c82467
- Add patch, jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch, so as to
e50716
  optimize compilation of fdlibm library.
c82467
- Add patch, jdk8210425-rh1632174-sharedRuntimeTrig_sharedRuntimeTrans_compiled_without_optimization.patch, so
e50716
  as to optimize compilation of sharedRuntime{Trig,Trans}.cpp
c82467
- Add patch, jdk8210647-rh1632174-libsaproc_is_being_compiled_without_optimization.patch, so as to
e50716
  optimize compilation of libsaproc (extra c flags won't override
e50716
  optimization).
c82467
- Add patch, jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch, so as to
e50716
  optimize compilation of libjsig.
c82467
- Add patch, jdk8210703-rh1632174-vmStructs_cpp_no_longer_compiled_with_o0, so as to
e50716
  optimize compilation of vmStructs.cpp (part of libjvm.so).
e50716
- Reinstate filtering of opt flags coming from redhat-rpm-config.
e50716
e50716
* Thu Sep 27 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.28-8
e50716
- removed version less provides
e50716
- javadocdir moved to arched dir as it is no longer noarch
e50716
- Resolves: rhbz#1570856
e50716
e50716
* Thu Sep 20 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-6
c0c534
- Add patch, RHBZ-1630996-JDK-8210858-workaround-disable-aarch64-intrinsic-log.patch,
c0c534
  so as to disable log math intrinsic on aarch64. Work-around for
c0c534
  JDK-8210858
c0c534
- Resolves: rhbz#1570856
c0c534
e50716
* Thu Sep 13 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-5
c0c534
- Add patch, RHBZ-1628612-JDK-8210461-workaround-disable-aarch64-intrinsic.patch,
c0c534
  so as to disable dsin/dcos math intrinsics on aarch64. Work-around for
c0c534
  JDK-8210461.
c0c534
- Resolves: rhbz#1570856
c0c534
e50716
* Wed Sep 12 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.22-6
e50716
- Add patch, JDK-8210416-RHBZ-1624122-fdlibm-opt-fix.patch, so as to
e50716
  optimize compilation of fdlibm library.
e50716
- Add patch, JDK-8210425-RHBZ-1624122-sharedRuntimeTrig-opt-fix.patch, so
e50716
  as to optimize compilation of sharedRuntime{Trig,Trans}.cpp
e50716
- Add patch, JDK-8210647-RHBZ-1624122-libsaproc-opt-fix.patch, so as to
e50716
  optimize compilation of libsaproc (extra c flags won't override
e50716
  optimization).
e50716
- Add patch, JDK-8210703-RHBZ-1624122-vmStructs-opt-fix.patch, so as to
e50716
  optimize compilation of vmStructs.cpp (part of libjvm.so).
e50716
- No longer filter -O flags from C flags coming from
e50716
  redhat-rpm-config.
e50716
- Resolves: RHBZ#1570856
e50716
e50716
* Mon Sep 10 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.28-4
e50716
- link to jhsdb followed its file to ifarch jit_arches ifnarch s390x
e50716
- Resolves: rhbz#1570856
e50716
c0c534
* Fri Sep 7 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.28-4
c0c534
- modified to build by itself
c0c534
- Resolves: rhbz#1570856
c0c534
e50716
* Fri Sep 7 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-3
e50716
- Enable ZGC on x86_64.
e50716
- Resolves: RHBZ#1570856
e50716
c0c534
* Wed Sep 5 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.28-2
c0c534
- jfr/*jfc files listed for all arches
c0c534
- lib/classlist do not exists s390, ifarch-ed via jit_arches out
c0c534
- specfile slightly improved to allow srpm rebuild on rhel8/fedoras
c0c534
- Resolves: rhbz#1570856
c0c534
c0c534
* Fri Aug 31 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.28-1
c0c534
- Update to latest upstream build jdk11+28, the first release
c0c534
  candidate.
c0c534
- Resolves: rhbz#1570856
c0c534
c0c534
* Wed Aug 29 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.ea.22-8
c82467
- Adjust system NSS patch, pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk11.patch, so
c0c534
  as to filter -Wl,--as-needed from linker flags. Fixes FTBFS issue.
c0c534
- Resolves: rhbz#1570856
c0c534
e50716
* Tue Aug 28 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.22-6
e50716
- dissabled accessibility, fixed provides for main package's debug variant
e50716
- Resolves: RHBZ#1570856
e50716
c0c534
* Mon Aug 27 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.22-8
c0c534
- jfr/*jfc files listed for all arches
c0c534
- Resolves: rhbz#1570856
c0c534
c0c534
* Mon Aug 27 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.22-7
c0c534
- added space behind jmd slave
c0c534
- Resolves: rhbz#1570856
c0c534
c0c534
* Mon Aug 27 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.22-6
c0c534
- jfr/*jfc files listed also for ppc
c0c534
- Resolves: rhbz#1570856
c0c534
c0c534
* Thu Aug 23 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.ea.22-5
c0c534
- Initial Load
c0c534
- removed -fno-lifetime-dse; rhel7 gcc to old (4.8.5)
c0c534
- lib/classlist do not exists s390, ifarch-ed via jit_arches out
c0c534
- Resolves: rhbz#1570856