Blame SPECS/java-11-openjdk.spec

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