Severin Gehwolf 204045
# RPM conditionals so as to be able to dynamically produce
Severin Gehwolf 204045
# slowdebug/release builds. See:
Severin Gehwolf 204045
# http://rpm.org/user_doc/conditional_builds.html
Severin Gehwolf 204045
#
Severin Gehwolf 204045
# Examples:
Severin Gehwolf 204045
#
Severin Gehwolf 204045
# Produce release *and* slowdebug builds on x86_64 (default):
Severin Gehwolf 204045
# $ rpmbuild -ba java-1.8.0-openjdk.spec
Severin Gehwolf 204045
#
Severin Gehwolf 204045
# Produce only release builds (no slowdebug builds) on x86_64:
Severin Gehwolf 204045
# $ rpmbuild -ba java-1.8.0-openjdk.spec --without slowdebug
Severin Gehwolf 204045
#
Severin Gehwolf 204045
# Only produce a release build on x86_64:
Severin Gehwolf 204045
# $ fedpkg mockbuild --without slowdebug
Severin Gehwolf 204045
#
Severin Gehwolf 204045
# Only produce a debug build on x86_64:
Severin Gehwolf 204045
# $ fedpkg local --without release
Severin Gehwolf 204045
#
Severin Gehwolf 204045
# Enable slowdebug builds by default on relevant arches.
Severin Gehwolf 204045
%bcond_without slowdebug
Severin Gehwolf 204045
# Enable release builds by default on relevant arches.
Severin Gehwolf 204045
%bcond_without release
Severin Gehwolf 204045
Severin Gehwolf a7cd6c
# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
Severin Gehwolf a7cd6c
# This fixes detailed NMT and other tools which need minimal debug info.
Severin Gehwolf a7cd6c
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879
Severin Gehwolf a7cd6c
%global _find_debuginfo_opts -g
Severin Gehwolf a7cd6c
711d98
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
711d98
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
3f1969
# see the difference between global and define:
711d98
# See https://github.com/rpm-software-management/rpm/issues/127 to comments at  "pmatilai commented on Aug 18, 2017"
711d98
# (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
711d98
%global debug_suffix_unquoted -slowdebug
3f33df
# quoted one for shell operations
3f33df
%global debug_suffix "%{debug_suffix_unquoted}"
cc7ef6
%global normal_suffix ""
cc7ef6
711d98
# if you want only debug build but providing java build only normal build but set normalbuild_parameter
711d98
%global debug_warning This package has full debug on. Install only in need and remove asap.
1f8ac3
%global debug_on with full debug on
1f8ac3
%global for_debug for packages with debug on
3f33df
Severin Gehwolf 204045
%if %{with release}
cc7ef6
%global include_normal_build 1
Severin Gehwolf 204045
%else
Severin Gehwolf 204045
%global include_normal_build 0
Severin Gehwolf 204045
%endif
Severin Gehwolf 204045
cc7ef6
%if %{include_normal_build}
cc7ef6
%global build_loop1 %{normal_suffix}
cc7ef6
%else
cc7ef6
%global build_loop1 %{nil}
cc7ef6
%endif
cc7ef6
08e140
%global aarch64         aarch64 arm64 armv8
711d98
# we need to distinguish between big and little endian PPC64
08e140
%global ppc64le         ppc64le
08e140
%global ppc64be         ppc64 ppc64p7
08e140
%global multilib_arches %{power64} sparc64 x86_64
08e140
%global jit_arches      %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64}
4feeea
%global sa_arches       %{ix86} x86_64 sparcv9 sparc64 %{aarch64}
08e140
dc4e79
# By default, we build a debug build during main build on JIT architectures
Severin Gehwolf 204045
%if %{with slowdebug}
dc4e79
%ifarch %{jit_arches}
711d98
%ifnarch %{arm}
73bf52
%global include_debug_build 1
cc7ef6
%else
cc7ef6
%global include_debug_build 0
cc7ef6
%endif
711d98
%else
711d98
%global include_debug_build 0
711d98
%endif
Severin Gehwolf 204045
%else
Severin Gehwolf 204045
%global include_debug_build 0
Severin Gehwolf 204045
%endif
cc7ef6
cc7ef6
%if %{include_debug_build}
cc7ef6
%global build_loop2 %{debug_suffix}
cc7ef6
%else
cc7ef6
%global build_loop2 %{nil}
cc7ef6
%endif
cc7ef6
711d98
# if you disable both builds, then the build fails
cc7ef6
%global build_loop  %{build_loop1} %{build_loop2}
711d98
# note: that order: normal_suffix debug_suffix, in case of both enabled
711d98
# is expected in one single case at the end of the build
b0231b
%global rev_build_loop  %{build_loop2} %{build_loop1}
cc7ef6
c7d7be
%ifarch %{jit_arches}
c7d7be
%global bootstrap_build 1
c7d7be
%else
edf042
%global bootstrap_build 1
c7d7be
%endif
993373
c3c571
%global bootstrap_targets images
27d2d5
%global release_targets images zip-docs
27d2d5
# No docs nor bootcycle for debug builds
27d2d5
%global debug_targets images
0b5ec9
322a6a
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
322a6a
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
Severin Gehwolf 0c4d83
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
322a6a
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
322a6a
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
322a6a
%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||')
8a1e92
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
Severin Gehwolf a3d290
%global ourldflags %{__global_ldflags}
ff9254
711d98
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
3f1969
# the initialization must be here. Later the pkg-config have buggy behavior
711d98
# looks like openjdk RPM specific bug
b5340f
# Always set this so the nss.cfg file is not broken
b5340f
%global NSS_LIBDIR %(pkg-config --variable=libdir nss)
acfc6f
%global NSS_LIBS %(pkg-config --libs nss)
acfc6f
%global NSS_CFLAGS %(pkg-config --cflags nss-softokn)
de90c5
# see https://bugzilla.redhat.com/show_bug.cgi?id=1332456
de90c5
%global NSSSOFTOKN_BUILDTIME_NUMBER %(pkg-config --modversion nss-softokn || : )
de90c5
%global NSS_BUILDTIME_NUMBER %(pkg-config --modversion nss || : )
711d98
# this is workaround for processing of requires during srpm creation
de90c5
%global NSSSOFTOKN_BUILDTIME_VERSION %(if [ "x%{NSSSOFTOKN_BUILDTIME_NUMBER}" == "x" ] ; then echo "" ;else echo ">= %{NSSSOFTOKN_BUILDTIME_NUMBER}" ;fi)
de90c5
%global NSS_BUILDTIME_VERSION %(if [ "x%{NSS_BUILDTIME_NUMBER}" == "x" ] ; then echo "" ;else echo ">= %{NSS_BUILDTIME_NUMBER}" ;fi)
de90c5
b5340f
Severin Gehwolf b3b943
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349.
Severin Gehwolf b3b943
# See also https://bugzilla.redhat.com/show_bug.cgi?id=1590796
Severin Gehwolf b3b943
# as to why some libraries *cannot* be excluded. In particular,
Severin Gehwolf b3b943
# these are:
Severin Gehwolf b3b943
# libjsig.so, libjava.so, libjawt.so, libjvm.so and libverify.so
Severin Gehwolf b3b943
%global _privatelibs libatk-wrapper[.]so.*|libattach[.]so.*|libawt_headless[.]so.*|libawt[.]so.*|libawt_xawt[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libhprof[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas_unix[.]so.*|libjava_crw_demo[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjli[.]so.*|libjsdt[.]so.*|libjsoundalsa[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libnpt[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsplashscreen[.]so.*|libsunec[.]so.*|libunpack[.]so.*|libzip[.]so.*|lib[.]so\\(SUNWprivate_.*
711d98
b5340f
%global __provides_exclude ^(%{_privatelibs})$
b5340f
%global __requires_exclude ^(%{_privatelibs})$
b5340f
0fb9d7
# In some cases, the arch used by the JDK does
0fb9d7
# not match _arch.
0fb9d7
# Also, in some cases, the machine name used by SystemTap
1b1cbf
# does not match that given by _target_cpu
ff9254
%ifarch x86_64
ff9254
%global archinstall amd64
1b1cbf
%global stapinstall x86_64
ff9254
%endif
ff9254
%ifarch ppc
ff9254
%global archinstall ppc
1b1cbf
%global stapinstall powerpc
ff9254
%endif
04107e
%ifarch %{ppc64be}
ff9254
%global archinstall ppc64
1b1cbf
%global stapinstall powerpc
ff9254
%endif
04107e
%ifarch %{ppc64le}
04107e
%global archinstall ppc64le
1b1cbf
%global stapinstall powerpc
04107e
%endif
ff9254
%ifarch %{ix86}
ff9254
%global archinstall i386
1b1cbf
%global stapinstall i386
Jiri Vanek b78bd3
%endif
ff9254
%ifarch ia64
ff9254
%global archinstall ia64
1b1cbf
%global stapinstall ia64
ff9254
%endif
ff9254
%ifarch s390
ff9254
%global archinstall s390
1b1cbf
%global stapinstall s390
ff9254
%endif
ff9254
%ifarch s390x
ff9254
%global archinstall s390x
1b1cbf
%global stapinstall s390
ff9254
%endif
ff9254
%ifarch %{arm}
ff9254
%global archinstall arm
1b1cbf
%global stapinstall arm
ff9254
%endif
Jiri Vanek work 2acb4a
%ifarch %{aarch64}
Jiri Vanek work 2acb4a
%global archinstall aarch64
1b1cbf
%global stapinstall arm64
Jiri Vanek work 2acb4a
%endif
ff9254
# 32 bit sparc, optimized for v9
ff9254
%ifarch sparcv9
ff9254
%global archinstall sparc
1b1cbf
%global stapinstall %{_target_cpu}
ff9254
%endif
ff9254
# 64 bit sparc
ff9254
%ifarch sparc64
ff9254
%global archinstall sparcv9
1b1cbf
%global stapinstall %{_target_cpu}
ff9254
%endif
1b1cbf
# Need to support noarch for srpm build
1b1cbf
%ifarch noarch
1b1cbf
%global archinstall %{nil}
1b1cbf
%global stapinstall %{nil}
ff9254
%endif
ff9254
ff9254
%ifarch %{jit_arches}
ff9254
%global with_systemtap 1
0a505a
%else
0a505a
%global with_systemtap 0
ff9254
%endif
ff9254
711d98
# New Version-String scheme-style defines
711d98
%global majorver 8
711d98
562d2b
%ifarch %{ix86} x86_64
562d2b
%global with_openjfx_binding 1
284f94
%global openjfx_path %{_jvmdir}/openjfx8
562d2b
# links src directories
562d2b
%global jfx_jre_libs_dir %{openjfx_path}/rt/lib
562d2b
%global jfx_jre_native_dir %{jfx_jre_libs_dir}/%{archinstall}
562d2b
%global jfx_sdk_libs_dir %{openjfx_path}/lib
562d2b
%global jfx_sdk_bins_dir %{openjfx_path}/bin
9aef87
%global jfx_jre_exts_dir %{jfx_jre_libs_dir}/ext
562d2b
# links src files
562d2b
# maybe depend on jfx and generate the lists in build time? Yes, bad idea to inlcude cyclic depndenci, but this list is aweful
562d2b
%global jfx_jre_libs jfxswt.jar javafx.properties
f7dc79
%global jfx_jre_native libprism_es2.so libprism_common.so libjavafx_font.so libdecora_sse.so libjavafx_font_freetype.so libprism_sw.so libjavafx_font_pango.so libglass.so libjavafx_iio.so libglassgtk2.so libglassgtk3.so
562d2b
%global jfx_sdk_libs javafx-mx.jar packager.jar ant-javafx.jar
562d2b
%global jfx_sdk_bins javafxpackager javapackager
562d2b
%global jfx_jre_exts jfxrt.jar
562d2b
%else
562d2b
%global with_openjfx_binding 0
562d2b
%endif
562d2b
ff9254
# Standard JPackage naming and versioning defines.
ff9254
%global origin          openjdk
711d98
%global origin_nice     OpenJDK
711d98
%global top_level_dir_name   %{origin}
5ddc16
# note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there.
6e6e3e
%global shenandoah_project	aarch64-port
6e6e3e
%global shenandoah_repo		jdk8u-shenandoah
d2472c
%global shenandoah_revision    	aarch64-shenandoah-jdk8u252-b01
017a12
# Define old aarch64/jdk8u tree variables for compatibility
017a12
%global project         %{shenandoah_project}
017a12
%global repo            %{shenandoah_repo}
017a12
%global revision        %{shenandoah_revision}
37a4ca
# Define IcedTea version used for SystemTap tapsets and desktop files
c37435
%global icedteaver      3.15.0
6e6e3e
c8c45a
# e.g. aarch64-shenandoah-jdk8u212-b04-shenandoah-merge-2019-04-30 -> aarch64-shenandoah-jdk8u212-b04
2a3db7
%global version_tag     %(VERSION=%{revision}; echo ${VERSION%%-shenandoah-merge*})
5ddc16
# eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60  (dont forget spec escape % by %%)
c8c45a
%global whole_update    %(VERSION=%{version_tag}; echo ${VERSION%%-*})
5ddc16
# eg  jdk8u60 -> 60 or aarch64-jdk8u60 -> 60
5ddc16
%global updatever       %(VERSION=%{whole_update}; echo ${VERSION##*u})
5ddc16
# eg jdk8u60-b27 -> b27
c8c45a
%global buildver        %(VERSION=%{version_tag}; echo ${VERSION##*-})
f2a491
%global rpmrelease      3
Andrew John Hughes b961b8
# Define milestone (EA for pre-releases, GA ("fcs") for releases)
Andrew John Hughes b961b8
# Release will be (where N is usually a number starting at 1):
Andrew John Hughes b961b8
# - 0.N%%{?extraver}%%{?dist} for EA releases,
Andrew John Hughes b961b8
# - N%%{?extraver}{?dist} for GA releases
d2472c
%global is_ga           0
Andrew John Hughes b961b8
%if %{is_ga}
Andrew John Hughes b961b8
%global milestone          fcs
Andrew John Hughes b961b8
%global milestone_version  %{nil}
Andrew John Hughes b961b8
%global extraver %{nil}
Andrew John Hughes b961b8
%global eaprefix %{nil}
Andrew John Hughes b961b8
%else
Andrew John Hughes b961b8
%global milestone          ea
Andrew John Hughes b961b8
%global milestone_version  "-ea"
Andrew John Hughes b961b8
%global extraver .%{milestone}
Andrew John Hughes b961b8
%global eaprefix 0.
Andrew John Hughes b961b8
%endif
5ddc16
# priority must be 7 digits in total. The expression is workarounding tip
da1227
%global priority        %(TIP=1800%{updatever};  echo ${TIP/tip/999})
5ddc16
711d98
%global javaver         1.%{majorver}.0
ff9254
cc7ef6
# parametrized macros are order-sensitive
711d98
%global compatiblename  %{name}
711d98
%global fullversion     %{compatiblename}-%{version}-%{release}
711d98
# images stub
711d98
%global jdkimage       j2sdk-image
db0292
# output dir stub
c3c571
%define buildoutputdir() %{expand:build/jdk8.build%{?1}}
711d98
# we can copy the javadoc to not arched dir, or make it not noarch
701fb2
%define uniquejavadocdir()    %{expand:%{fullversion}%{?1}}
711d98
# main id and dir of this jdk
701fb2
%define uniquesuffix()        %{expand:%{fullversion}.%{_arch}%{?1}}
ff9254
1f48fa
%global etcjavasubdir     %{_sysconfdir}/java/java-%{javaver}-%{origin}
1f48fa
%define etcjavadir()      %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}}
cc7ef6
# Standard JPackage directories and symbolic links.
701fb2
%define sdkdir()        %{expand:%{uniquesuffix -- %{?1}}}
701fb2
%define jrelnk()        %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%{?1}}
cc7ef6
701fb2
%define jredir()        %{expand:%{sdkdir -- %{?1}}/jre}
701fb2
%define sdkbindir()     %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
701fb2
%define jrebindir()     %{expand:%{_jvmdir}/%{jredir -- %{?1}}/bin}
cc7ef6
8aabfb
%global rpm_state_dir %{_localstatedir}/lib/rpm-state/
8aabfb
0d8256
%if %{with_systemtap}
ff9254
# Where to install systemtap tapset (links)
3f1969
# We would like these to be in a package specific sub-dir,
ff9254
# but currently systemtap doesn't support that, so we have to
3f1969
# use the root tapset dir for now. To distinguish between 64
ff9254
# and 32 bit architectures we place the tapsets under the arch
ff9254
# specific dir (note that systemtap will only pickup the tapset
ff9254
# for the primary arch for now). Systemtap uses the machine name
1b1cbf
# aka target_cpu as architecture specific directory name.
ff9254
%global tapsetroot /usr/share/systemtap
711d98
%global tapsetdirttapset %{tapsetroot}/tapset/
1b1cbf
%global tapsetdir %{tapsetdirttapset}/%{stapinstall}
ff9254
%endif
ff9254
711d98
# not-duplicated scriptlets for normal/debug packages
3f33df
%global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
3f33df
a2c916
701fb2
%define post_script() %{expand:
3f33df
update-desktop-database %{_datadir}/applications &> /dev/null || :
3f33df
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
3f33df
exit 0
3f33df
}
3f33df
3f33df
701fb2
%define post_headless() %{expand:
3f33df
%ifarch %{jit_arches}
04107e
# MetaspaceShared::generate_vtable_methods not implemented for PPC JIT
04107e
%ifnarch %{power64}
711d98
# see https://bugzilla.redhat.com/show_bug.cgi?id=513605
701fb2
%{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null
3f33df
%endif
3f33df
%endif
3f33df
630609
PRIORITY=%{priority}
701fb2
if [ "%{?1}" == %{debug_suffix} ]; then
630609
  let PRIORITY=PRIORITY-1
630609
fi
630609
3f33df
ext=.gz
3f33df
alternatives \\
701fb2
  --install %{_bindir}/java java %{jrebindir -- %{?1}}/java $PRIORITY  --family %{name}.%{_arch} \\
701fb2
  --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jredir -- %{?1}} \\
701fb2
  --slave %{_bindir}/jjs jjs %{jrebindir -- %{?1}}/jjs \\
701fb2
  --slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\
701fb2
  --slave %{_bindir}/orbd orbd %{jrebindir -- %{?1}}/orbd \\
701fb2
  --slave %{_bindir}/pack200 pack200 %{jrebindir -- %{?1}}/pack200 \\
701fb2
  --slave %{_bindir}/rmid rmid %{jrebindir -- %{?1}}/rmid \\
701fb2
  --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir -- %{?1}}/rmiregistry \\
701fb2
  --slave %{_bindir}/servertool servertool %{jrebindir -- %{?1}}/servertool \\
701fb2
  --slave %{_bindir}/tnameserv tnameserv %{jrebindir -- %{?1}}/tnameserv \\
701fb2
  --slave %{_bindir}/policytool policytool %{jrebindir -- %{?1}}/policytool \\
701fb2
  --slave %{_bindir}/unpack200 unpack200 %{jrebindir -- %{?1}}/unpack200 \\
3f33df
  --slave %{_mandir}/man1/java.1$ext java.1$ext \\
701fb2
  %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \\
701fb2
  %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\
701fb2
  %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \\
701fb2
  %{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \\
701fb2
  %{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \\
701fb2
  %{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\
701fb2
  %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/servertool.1$ext servertool.1$ext \\
701fb2
  %{_mandir}/man1/servertool-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \\
701fb2
  %{_mandir}/man1/tnameserv-%{uniquesuffix -- %{?1}}.1$ext \\
f05ea5
  --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \\
701fb2
  %{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \\
701fb2
  %{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1$ext
3f33df
3f33df
for X in %{origin} %{javaver} ; do
701fb2
  alternatives --install %{_jvmdir}/jre-"$X" jre_"$X" %{_jvmdir}/%{jredir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
3f33df
done
3f33df
701fb2
update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY  --family %{name}.%{_arch}
4f0aee
3f33df
3f33df
update-desktop-database %{_datadir}/applications &> /dev/null || :
3f33df
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
6ec783
6ec783
# see pretrans where this file is declared
3f1969
# also see that pretrans is only for non-debug
701fb2
if [ ! "%{?1}" == %{debug_suffix} ]; then
6ec783
  if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then
701fb2
    sh  %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch}  %{_jvmdir}/%{sdkdir -- %{?1}}
6ec783
  fi
6ec783
fi
6ec783
3f33df
exit 0
3f33df
}
3f33df
701fb2
%define postun_script() %{expand:
3f33df
update-desktop-database %{_datadir}/applications &> /dev/null || :
3f33df
if [ $1 -eq 0 ] ; then
3f33df
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
3f33df
    %{update_desktop_icons}
3f33df
fi
3f33df
exit 0
3f33df
}
3f33df
3f33df
701fb2
%define postun_headless() %{expand:
701fb2
  alternatives --remove java %{jrebindir -- %{?1}}/java
701fb2
  alternatives --remove jre_%{origin} %{_jvmdir}/%{jredir -- %{?1}}
701fb2
  alternatives --remove jre_%{javaver} %{_jvmdir}/%{jredir -- %{?1}}
701fb2
  alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}}
3f33df
}
3f33df
701fb2
%define posttrans_script() %{expand:
3f33df
%{update_desktop_icons}
3f33df
}
3f33df
701fb2
%define post_devel() %{expand:
630609
630609
PRIORITY=%{priority}
701fb2
if [ "%{?1}" == %{debug_suffix} ]; then
630609
  let PRIORITY=PRIORITY-1
630609
fi
630609
3f33df
ext=.gz
3f33df
alternatives \\
701fb2
  --install %{_bindir}/javac javac %{sdkbindir -- %{?1}}/javac $PRIORITY  --family %{name}.%{_arch} \\
701fb2
  --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir -- %{?1}} \\
701fb2
  --slave %{_bindir}/appletviewer appletviewer %{sdkbindir -- %{?1}}/appletviewer \\
517cf6
  --slave %{_bindir}/clhsdb clhsdb %{sdkbindir -- %{?1}}/clhsdb \\
701fb2
  --slave %{_bindir}/extcheck extcheck %{sdkbindir -- %{?1}}/extcheck \\
517cf6
  --slave %{_bindir}/hsdb hsdb %{sdkbindir -- %{?1}}/hsdb \\
701fb2
  --slave %{_bindir}/idlj idlj %{sdkbindir -- %{?1}}/idlj \\
701fb2
  --slave %{_bindir}/jar jar %{sdkbindir -- %{?1}}/jar \\
701fb2
  --slave %{_bindir}/jarsigner jarsigner %{sdkbindir -- %{?1}}/jarsigner \\
701fb2
  --slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\
701fb2
  --slave %{_bindir}/javah javah %{sdkbindir -- %{?1}}/javah \\
701fb2
  --slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\
701fb2
  --slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\
701fb2
  --slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\
701fb2
  --slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\
701fb2
  --slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\
701fb2
  --slave %{_bindir}/jhat jhat %{sdkbindir -- %{?1}}/jhat \\
701fb2
  --slave %{_bindir}/jinfo jinfo %{sdkbindir -- %{?1}}/jinfo \\
701fb2
  --slave %{_bindir}/jmap jmap %{sdkbindir -- %{?1}}/jmap \\
701fb2
  --slave %{_bindir}/jps jps %{sdkbindir -- %{?1}}/jps \\
701fb2
  --slave %{_bindir}/jrunscript jrunscript %{sdkbindir -- %{?1}}/jrunscript \\
701fb2
  --slave %{_bindir}/jsadebugd jsadebugd %{sdkbindir -- %{?1}}/jsadebugd \\
701fb2
  --slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\
701fb2
  --slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\
701fb2
  --slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\
701fb2
  --slave %{_bindir}/native2ascii native2ascii %{sdkbindir -- %{?1}}/native2ascii \\
701fb2
  --slave %{_bindir}/rmic rmic %{sdkbindir -- %{?1}}/rmic \\
701fb2
  --slave %{_bindir}/schemagen schemagen %{sdkbindir -- %{?1}}/schemagen \\
701fb2
  --slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\
701fb2
  --slave %{_bindir}/wsgen wsgen %{sdkbindir -- %{?1}}/wsgen \\
701fb2
  --slave %{_bindir}/wsimport wsimport %{sdkbindir -- %{?1}}/wsimport \\
701fb2
  --slave %{_bindir}/xjc xjc %{sdkbindir -- %{?1}}/xjc \\
3f33df
  --slave %{_mandir}/man1/appletviewer.1$ext appletviewer.1$ext \\
701fb2
  %{_mandir}/man1/appletviewer-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/extcheck.1$ext extcheck.1$ext \\
701fb2
  %{_mandir}/man1/extcheck-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/idlj.1$ext idlj.1$ext \\
701fb2
  %{_mandir}/man1/idlj-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jar.1$ext jar.1$ext \\
701fb2
  %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \\
701fb2
  %{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/javac.1$ext javac.1$ext \\
701fb2
  %{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \\
701fb2
  %{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/javah.1$ext javah.1$ext \\
701fb2
  %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/javap.1$ext javap.1$ext \\
701fb2
  %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\
701fb2
  %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\
701fb2
  %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\
701fb2
  %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \\
701fb2
  %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jhat.1$ext jhat.1$ext \\
701fb2
  %{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \\
701fb2
  %{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \\
701fb2
  %{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jps.1$ext jps.1$ext \\
701fb2
  %{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \\
701fb2
  %{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \\
701fb2
  %{_mandir}/man1/jsadebugd-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \\
701fb2
  %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\
701fb2
  %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\
701fb2
  %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \\
701fb2
  %{_mandir}/man1/native2ascii-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \\
701fb2
  %{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \\
701fb2
  %{_mandir}/man1/schemagen-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\
701fb2
  %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/wsgen.1$ext wsgen.1$ext \\
701fb2
  %{_mandir}/man1/wsgen-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/wsimport.1$ext wsimport.1$ext \\
701fb2
  %{_mandir}/man1/wsimport-%{uniquesuffix -- %{?1}}.1$ext \\
3f33df
  --slave %{_mandir}/man1/xjc.1$ext xjc.1$ext \\
701fb2
  %{_mandir}/man1/xjc-%{uniquesuffix -- %{?1}}.1$ext
3f33df
3f33df
for X in %{origin} %{javaver} ; do
3f33df
  alternatives \\
701fb2
    --install %{_jvmdir}/java-"$X" java_sdk_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY  --family %{name}.%{_arch}
3f33df
done
3f33df
f3c8c1
update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY  --family %{name}.%{_arch}
3f33df
3f33df
update-desktop-database %{_datadir}/applications &> /dev/null || :
3f33df
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
3f33df
3f33df
exit 0
3f33df
}
3f33df
701fb2
%define postun_devel() %{expand:
701fb2
  alternatives --remove javac %{sdkbindir -- %{?1}}/javac
701fb2
  alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
701fb2
  alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}}
701fb2
  alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
3f33df
3f33df
update-desktop-database %{_datadir}/applications &> /dev/null || :
3f33df
3f33df
if [ $1 -eq 0 ] ; then
3f33df
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
3f33df
    %{update_desktop_icons}
3f33df
fi
3f33df
exit 0
3f33df
}
3f33df
701fb2
%define posttrans_devel() %{expand:
3f33df
%{update_desktop_icons}
3f33df
}
3f33df
701fb2
%define post_javadoc() %{expand:
630609
630609
PRIORITY=%{priority}
701fb2
if [ "%{?1}" == %{debug_suffix} ]; then
630609
  let PRIORITY=PRIORITY-1
630609
fi
630609
3f33df
alternatives \\
701fb2
  --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api \\
ad71d9
  $PRIORITY  --family %{name}
3f33df
exit 0
3f33df
}
3f33df
701fb2
%define postun_javadoc() %{expand:
701fb2
  alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api
3f33df
exit 0
3f33df
}
3f33df
701fb2
%define post_javadoc_zip() %{expand:
db2f51
db2f51
PRIORITY=%{priority}
701fb2
if [ "%{?1}" == %{debug_suffix} ]; then
db2f51
  let PRIORITY=PRIORITY-1
db2f51
fi
db2f51
db2f51
alternatives \\
701fb2
  --install %{_javadocdir}/java-zip javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip \\
ad71d9
  $PRIORITY  --family %{name}
db2f51
exit 0
db2f51
}
db2f51
701fb2
%define postun_javadoc_zip() %{expand:
701fb2
  alternatives --remove javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
db2f51
exit 0
db2f51
}
db2f51
701fb2
%define files_jre() %{expand:
711d98
%{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}-%{origin}.png
701fb2
%{_datadir}/applications/*policytool%{?1}.desktop
91c05c
%{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libjsoundalsa.so
91c05c
%{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libsplashscreen.so
91c05c
%{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libawt_xawt.so
91c05c
%{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libjawt.so
91c05c
%{_jvmdir}/%{sdkdir -- %{?1}}/jre/bin/policytool
cc7ef6
}
cc7ef6
cc7ef6
701fb2
%define files_jre_headless() %{expand:
cc7ef6
%defattr(-,root,root,-)
c372da
%dir %{_sysconfdir}/.java/.systemPrefs
c372da
%dir %{_sysconfdir}/.java
711d98
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/ASSEMBLY_EXCEPTION
711d98
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
711d98
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/THIRD_PARTY_README
701fb2
%dir %{_jvmdir}/%{sdkdir -- %{?1}}
701fb2
%{_jvmdir}/%{jrelnk -- %{?1}}
701fb2
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security
701fb2
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/cacerts
36b7ad
%dir %{_jvmdir}/%{jredir -- %{?1}}
36b7ad
%dir %{_jvmdir}/%{jredir -- %{?1}}/bin
955337
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/java
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/jjs
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/keytool
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/orbd
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/pack200
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/rmid
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/rmiregistry
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/servertool
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/tnameserv
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/bin/unpack200
eb7107
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/
eb7107
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/
eb7107
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/policy/unlimited/US_export_policy.jar
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/policy/unlimited/local_policy.jar
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/policy/limited/US_export_policy.jar
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/policy/limited/local_policy.jar
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/java.policy
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/java.security
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/blacklisted.certs
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/logging.properties
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/calendars.properties
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/US_export_policy.jar
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/local_policy.jar
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/US_export_policy.jar
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/local_policy.jar
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.policy
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.security
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/blacklisted.certs
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/logging.properties
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/calendars.properties
701fb2
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/servertool-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/tnameserv-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1*
1f48fa
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/nss.cfg
1f48fa
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/nss.cfg
cc7ef6
%ifarch %{jit_arches}
04107e
%ifnarch %{power64}
75dc79
%attr(444, root, root) %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/classes.jsa
75dc79
%attr(444, root, root) %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/classes.jsa
cc7ef6
%endif
04107e
%endif
1f48fa
%dir %{etcjavasubdir}
1f48fa
%dir %{etcjavadir -- %{?1}}
1f48fa
%dir %{etcjavadir -- %{?1}}/lib
1f48fa
%dir %{etcjavadir -- %{?1}}/lib/security
1f48fa
%{etcjavadir -- %{?1}}/lib/security/cacerts
1f48fa
%dir %{etcjavadir -- %{?1}}/lib/security/policy
1f48fa
%dir %{etcjavadir -- %{?1}}/lib/security/policy/limited
1f48fa
%dir %{etcjavadir -- %{?1}}/lib/security/policy/unlimited
701fb2
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/
701fb2
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/
f667e1
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}
36b7ad
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli/libjli.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jvm.cfg
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libattach.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt_headless.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libdt_socket.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libfontmanager.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libhprof.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libinstrument.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2gss.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pcsc.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pkcs11.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjaas_unix.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava_crw_demo.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjavajpeg.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjdwp.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsdt.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsig.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsound.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/liblcms.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmanagement.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmlib_image.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnet.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnio.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnpt.so
310772
%ifarch x86_64  %{ix86} %{aarch64}
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsaproc.so
215b0f
%endif
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsctp.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsunec.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libunpack.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libverify.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libzip.so
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/charsets.jar
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/classlist
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/content-types.properties
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/currency.data
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/flavormap.properties
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/hijrah-config-umalqura.properties
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors/*
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/jce.jar
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/jexec
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/jsse.jar
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/jvm.hprof.txt
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/meta-index
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/net.properties
554136
%config(noreplace) %{etcjavadir -- %{?1}}/lib/net.properties
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/psfont.properties.ja
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/psfontj2d.properties
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/resources.jar
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/rt.jar
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/sound.properties
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/tzdb.dat
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/management-agent.jar
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/management/*
91c05c
%{_jvmdir}/%{jredir -- %{?1}}/lib/cmm/*
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/cldrdata.jar
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/dnsns.jar
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/jaccess.jar
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/localedata.jar
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/meta-index
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/nashorn.jar
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunec.jar
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunjce_provider.jar
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunpkcs11.jar
711d98
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/zipfs.jar
711d98
f667e1
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images
955337
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors
36b7ad
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/management
36b7ad
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/cmm
36b7ad
%dir %{_jvmdir}/%{jredir -- %{?1}}/lib/ext
cc7ef6
}
cc7ef6
701fb2
%define files_devel() %{expand:
cc7ef6
%defattr(-,root,root,-)
711d98
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/ASSEMBLY_EXCEPTION
711d98
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/LICENSE
711d98
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/THIRD_PARTY_README
701fb2
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
701fb2
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/include
701fb2
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/appletviewer
c70480
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/clhsdb
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/extcheck
c70480
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/hsdb
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/idlj
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jar
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jarsigner
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/java
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javac
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javah
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/java-rmi.cgi
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jhat
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jinfo
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jjs
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmap
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jps
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jrunscript
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jsadebugd
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/native2ascii
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/orbd
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/pack200
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/policytool
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmic
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmid
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/schemagen
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/servertool
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/tnameserv
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/unpack200
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsgen
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsimport
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/xjc
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/include/*
215b0f
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
711d98
%if %{with_systemtap}
711d98
%{_jvmdir}/%{sdkdir -- %{?1}}/tapset
711d98
%endif
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/ir.idl
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jconsole.jar
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/orb.idl
4feeea
%ifarch %{sa_arches}
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/sa-jdi.jar
215b0f
%endif
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/dt.jar
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/tools.jar
701fb2
%{_datadir}/applications/*jconsole%{?1}.desktop
701fb2
%{_mandir}/man1/appletviewer-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/extcheck-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/idlj-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jsadebugd-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/native2ascii-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/schemagen-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/wsgen-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/wsimport-%{uniquesuffix -- %{?1}}.1*
701fb2
%{_mandir}/man1/xjc-%{uniquesuffix -- %{?1}}.1*
cc7ef6
%if %{with_systemtap}
5d5c27
%dir %{tapsetroot}
711d98
%dir %{tapsetdirttapset}
5d5c27
%dir %{tapsetdir}
711d98
%{tapsetdir}/*%{_arch}%{?1}.stp
cc7ef6
%endif
cc7ef6
}
cc7ef6
701fb2
%define files_demo() %{expand:
cc7ef6
%defattr(-,root,root,-)
711d98
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
cc7ef6
}
cc7ef6
701fb2
%define files_src() %{expand:
cc7ef6
%defattr(-,root,root,-)
711d98
%doc README.md
701fb2
%{_jvmdir}/%{sdkdir -- %{?1}}/src.zip
cc7ef6
}
cc7ef6
701fb2
%define files_javadoc() %{expand:
cc7ef6
%defattr(-,root,root,-)
701fb2
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
711d98
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
cc7ef6
}
cc7ef6
701fb2
%define files_javadoc_zip() %{expand:
db2f51
%defattr(-,root,root,-)
701fb2
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
711d98
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
db2f51
}
db2f51
701fb2
%define files_accessibility() %{expand:
701fb2
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libatk-wrapper.so
701fb2
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/java-atk-wrapper.jar
701fb2
%{_jvmdir}/%{jredir -- %{?1}}/lib/accessibility.properties
cc7ef6
}
cc7ef6
711d98
# not-duplicated requires/provides/obsoletes for normal/debug packages
701fb2
%define java_rpo() %{expand:
775f6c
Requires: fontconfig%{?_isa}
1f8ac3
Requires: xorg-x11-fonts-Type1
Severin Gehwolf 54b188
# Require libXcomposite explicitly since it's only dynamically loaded
Severin Gehwolf 54b188
# at runtime. Fixes screenshot issues. See JDK-8150954.
Severin Gehwolf 54b188
Requires: libXcomposite%{?_isa}
1f8ac3
# Requires rest of java
701fb2
Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
701fb2
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
bd8d55
# for java-X-openjdk package's desktop binding
90ed3e
%if 0%{?fedora} || 0%{?rhel} >= 8
bd8d55
Recommends: gtk2%{?_isa}
90ed3e
%endif
1f8ac3
711d98
Provides: java-%{javaver}-%{origin} = %{epoch}:%{version}-%{release}
1f8ac3
711d98
# Standard JPackage base provides
c5a2af
Provides: jre%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
711d98
Provides: jre-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: java-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java%{?1} = %{epoch}:%{version}-%{release}
1f8ac3
}
1f8ac3
701fb2
%define java_headless_rpo() %{expand:
711d98
# Require /etc/pki/java/cacerts
1f8ac3
Requires: ca-certificates
Severin Gehwolf ad1d27
# Require javapackages-filesystem for ownership of /usr/lib/jvm/
Severin Gehwolf ad1d27
Requires: javapackages-filesystem
3f1969
# Require zone-info data provided by tzdata-java sub-package
1d4d71
Requires: tzdata-java >= 2015d
9b9e82
# libsctp.so.1 is being `dlopen`ed on demand
775f6c
Requires: lksctp-tools%{?_isa}
711d98
# tool to copy jdk's configs - should be Recommends only, but then only dnf/yum enforce it,
711d98
# not rpm transaction and so no configs are persisted when pure rpm -u is run. It may be
711d98
# considered as regression
711d98
Requires: copy-jdk-configs >= 3.3
8aabfb
OrderWithRequires: copy-jdk-configs
7f870c
# for printing support
7f870c
Requires: cups-libs
711d98
# Post requires alternatives to install tool alternatives
1f8ac3
Requires(post):   %{_sbindir}/alternatives
711d98
# Postun requires alternatives to uninstall tool alternatives
1f8ac3
Requires(postun): %{_sbindir}/alternatives
bd8d55
# for optional support of kernel stream control, card reader and printing bindings
90ed3e
%if 0%{?fedora} || 0%{?rhel} >= 8
09a594
Suggests: lksctp-tools%{?_isa}, pcsc-lite-devel%{?_isa}
90ed3e
%endif
1f8ac3
711d98
# Standard JPackage base provides
c5a2af
Provides: jre-headless%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
711d98
Provides: java-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: java-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: java-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-headless%{?1} = %{epoch}:%{version}-%{release}
711d98
711d98
# https://bugzilla.redhat.com/show_bug.cgi?id=1312019
f142bc
Provides: /usr/bin/jjs
f142bc
1f8ac3
}
1f8ac3
701fb2
%define java_devel_rpo() %{expand:
711d98
# Requires base package
701fb2
Requires:         %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
701fb2
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
711d98
# Post requires alternatives to install tool alternatives
1f8ac3
Requires(post):   %{_sbindir}/alternatives
711d98
# Postun requires alternatives to uninstall tool alternatives
1f8ac3
Requires(postun): %{_sbindir}/alternatives
1f8ac3
711d98
# Standard JPackage devel provides
c5a2af
Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-sdk%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-%{javaver}-%{origin}-devel%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-%{origin}-devel%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-devel%{?1} = %{epoch}:%{version}-%{release}
701fb2
1f8ac3
}
1f8ac3
1f8ac3
701fb2
%define java_demo_rpo() %{expand:
701fb2
Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
701fb2
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1f8ac3
711d98
Provides: java-demo%{?1} = %{epoch}:%{version}-%{release}
37a3e1
Provides: java-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release}
711d98
Provides: java-%{javaver}-demo%{?1} = %{epoch}:%{version}-%{release}
711d98
Provides: java-%{javaver}-%{origin}-demo%{?1} = %{epoch}:%{version}-%{release}
b038c2
1f8ac3
}
1f8ac3
701fb2
%define java_javadoc_rpo() %{expand:
701fb2
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
711d98
# Post requires alternatives to install javadoc alternative
1f8ac3
Requires(post):   %{_sbindir}/alternatives
711d98
# Postun requires alternatives to uninstall javadoc alternative
1f8ac3
Requires(postun): %{_sbindir}/alternatives
1f8ac3
711d98
# Standard JPackage javadoc provides
701fb2
Provides: java-javadoc%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release}
711d98
Provides: java-%{javaver}-%{origin}-javadoc%{?1} = %{epoch}:%{version}-%{release}
1f8ac3
}
1f8ac3
701fb2
%define java_src_rpo() %{expand:
701fb2
Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1f8ac3
711d98
# Standard JPackage sources provides
701fb2
Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
37a3e1
Provides: java-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
701fb2
Provides: java-%{javaver}-src%{?1} = %{epoch}:%{version}-%{release}
711d98
Provides: java-%{javaver}-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
1f8ac3
}
1f8ac3
701fb2
%define java_accessibility_rpo() %{expand:
09ac4b
Requires: java-atk-wrapper%{?_isa}
701fb2
Requires: %{name}%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
701fb2
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
1f8ac3
c5a2af
Provides: java-accessibility%{?1} = %{epoch}:%{version}-%{release}
37a3e1
Provides: java-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-%{javaver}-accessibility%{?1} = %{epoch}:%{version}-%{release}
c5a2af
Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{release}
b038c2
1f8ac3
}
1f8ac3
711d98
# Prevent brp-java-repack-jars from being run
cdd367
%global __jar_repack 0
ff9254
ff9254
Name:    java-%{javaver}-%{origin}
a2e481
Version: %{javaver}.%{updatever}.%{buildver}
8d461f
Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
711d98
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
711d98
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
711d98
# also included the epoch in their virtual provides. This created a
ff9254
# situation where in-the-wild java-1.5.0-ibm packages provided "java =
711d98
# 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
711d98
# interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
711d98
# satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
ff9254
# JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
ff9254
# provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
f3b229
ff9254
Epoch:   1
711d98
Summary: %{origin_nice} Runtime Environment %{majorver}
ff9254
ff3d05
# HotSpot code is licensed under GPLv2
ff3d05
# JDK library code is licensed under GPLv2 with the Classpath exception
ff3d05
# The Apache license is used in code taken from Apache projects (primarily JAXP & JAXWS)
ff3d05
# DOM levels 2 & 3 and the XML digital signature schemas are licensed under the W3C Software License
ff3d05
# The JSR166 concurrency code is in the public domain
ff3d05
# The BSD and MIT licenses are used for a number of third-party libraries (see THIRD_PARTY_README)
ff3d05
# The OpenJDK source tree includes the JPEG library (IJG), zlib & libpng (zlib), giflib and LCMS (MIT)
ff3d05
# The test code includes copies of NSS under the Mozilla Public License v2.0
ff3d05
# The PCSClite headers are under a BSD with advertising license
ff3d05
# The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version
ff3d05
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
ff9254
URL:      http://openjdk.java.net/
ff9254
93b65a
# Shenandoah HotSpot
6e6e3e
# aarch64-port/jdk8u-shenandoah contains an integration forest of
6e6e3e
# OpenJDK 8u, the aarch64 port and Shenandoah
6e6e3e
# To regenerate, use:
6e6e3e
# VERSION=%%{shenandoah_revision}
6e6e3e
# FILE_NAME_ROOT=%%{shenandoah_project}-%%{shenandoah_repo}-${VERSION}
017a12
# REPO_ROOT=<path to="" checked-out="" repository=""> generate_source_tarball.sh
6e6e3e
# where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo}
f2a491
Source0: %{shenandoah_project}-%{shenandoah_repo}-%{shenandoah_revision}-4curve.tar.xz
93b65a
ff9254
# Custom README for -src subpackage
711d98
Source2:  README.md
ff9254
37a4ca
# Use 'icedtea_sync.sh' to update the following
37a4ca
# They are based on code contained in the IcedTea project (3.x).
37a4ca
# Systemtap tapsets. Zipped up to keep it small.
37a4ca
Source8: tapsets-icedtea-%{icedteaver}.tar.xz
0ccb6d
711d98
# Desktop files. Adapted from IcedTea
0ccb6d
Source9: jconsole.desktop.in
0ccb6d
Source10: policytool.desktop.in
ff9254
ff9254
# nss configuration file
0fb9d7
Source11: nss.cfg.in
ff9254
ff9254
# Removed libraries that we link instead
f3b229
Source12: %{name}-remove-intree-libraries.sh
ff9254
ff9254
# Ensure we aren't using the limited crypto policy
ff9254
Source13: TestCryptoLevel.java
ff9254
c7d7be
# Ensure ECDSA is working
c7d7be
Source14: TestECDSA.java
c7d7be
Severin Gehwolf d15d02
# Verify system crypto (policy) can be disabled via a property
Severin Gehwolf d15d02
Source15: TestSecurityProperties.java
Severin Gehwolf d15d02
fb001c
Source20: repackReproduciblePolycies.sh
fb001c
79ae09
# New versions of config files with aarch64 support. This is not upstream yet.
Jiri Vanek 9b793e
Source100: config.guess
Jiri Vanek 9b793e
Source101: config.sub
4821c3
711d98
############################################
711d98
#
ff9254
# RPM/distribution specific patches
711d98
#
Andrew John Hughes 5601c0
# This section includes patches specific to
Andrew John Hughes 5601c0
# Fedora/RHEL which can not be upstreamed
Andrew John Hughes 5601c0
# either in their current form or at all.
711d98
############################################
ff9254
ee3b4b
# Accessibility patches
ff9254
# Ignore AWTError when assistive technologies are loaded 
195d81
Patch1:   rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
af5a48
# Restrict access to java-atk-wrapper classes
195d81
Patch3:   rh1648644-java_access_bridge_privileged_security.patch
Andrew John Hughes 5d4b40
# Turn on AssumeMP by default on RHEL systems
195d81
Patch534: rh1648246-always_instruct_vm_to_assume_multiple_processors_are_available.patch
Severin Gehwolf 1cd817
Severin Gehwolf 1cd817
#############################################
Severin Gehwolf 1cd817
#
Severin Gehwolf 1cd817
# Upstreamable patches
Severin Gehwolf 1cd817
#
Andrew John Hughes 5601c0
# This section includes patches which need to
Andrew John Hughes 5601c0
# be reviewed & pushed to the current development
Andrew John Hughes 5601c0
# tree of OpenJDK.
Severin Gehwolf 1cd817
#############################################
Severin Gehwolf 1cd817
# PR2737: Allow multiple initialization of PKCS11 libraries
195d81
Patch5: pr2737-allow_multiple_pkcs11_library_initialisation_to_be_a_non_critical_error.patch
Severin Gehwolf 1cd817
# PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x)
195d81
Patch504: rh1163501-increase_2048_bit_dh_upper_bound_fedora_infrastructure_in_dhparametergenerator.patch
Severin Gehwolf 1cd817
# Turn off strict overflow on IndicRearrangementProcessor{,2}.cpp following 8140543: Arrange font actions
195d81
Patch512: rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch
418a52
# RH1337583, PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings
195d81
Patch523: pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch
da1227
# PR3083, RH1346460: Regression in SSL debug output without an ECC provider
195d81
Patch528: pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch
0b5ec9
# RH1566890: CVE-2018-3639
c78019
Patch529: rh1566890-CVE_2018_3639-speculative_store_bypass.patch
c78019
Patch531: rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch
b0622b
# PR3601: Fix additional -Wreturn-type issues introduced by 8061651
195d81
Patch530: pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch
Andrew John Hughes 5d4b40
# PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
Andrew John Hughes 5d4b40
# PR3575, RH1567204: System cacerts database handling should not affect jssecacerts
2a3db7
Patch539: pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_java_cacerts.patch
Andrew John Hughes 5d4b40
# PR3183, RH1340845: Support Fedora/RHEL8 system crypto policy
e8963d
Patch400: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
df6739
# PR3655: Allow use of system crypto policy to be disabled by the user
e8963d
Patch401: pr3655-toggle_system_crypto_policy.patch
Severin Gehwolf 4408c2
# JDK-8218811: replace open by os::open in hotspot coding
Severin Gehwolf 4408c2
# This fixes a GCC 10 build issue
Severin Gehwolf 4408c2
Patch111: jdk8218811-perfMemory_linux.patch
1b81e9
# JDK-8241296: Segfault in JNIHandleBlock::oops_do()
1b81e9
Patch112: jdk8241296-jnihandleblock_segfault.patch
d2472c
# JDK-8244461: [JDK 8u] Build fails with glibc 2.32
Severin Gehwolf 5ff7ed
Patch113: jdk8244461-remove_unused_sysctl.h.patch
47360e
Andrew John Hughes 5601c0
#############################################
Andrew John Hughes 5601c0
#
993373
# Arch-specific upstreamable patches
Andrew John Hughes 5601c0
#
Andrew John Hughes 5601c0
# This section includes patches which need to
Andrew John Hughes 5601c0
# be reviewed & pushed upstream and are specific
Andrew John Hughes 5601c0
# to certain architectures. This usually means the
Andrew John Hughes 5601c0
# current OpenJDK development branch, but may also
Andrew John Hughes 5601c0
# include other trees e.g. for the AArch64 port for
Andrew John Hughes 5601c0
# OpenJDK 8u.
Andrew John Hughes 5601c0
#############################################
0b5ec9
# s390: PR3593: Use "%z" for size_t on s390 as size_t != intptr_t
195d81
Patch103: pr3593-s390_use_z_format_specifier_for_size_t_arguments_as_size_t_not_equals_to_int.patch
0b5ec9
# x86: S8199936, PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations (-mstackrealign workaround)
195d81
Patch105: jdk8199936-pr3533-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x.patch
b0622b
# AArch64: PR3519: Fix further functions with a missing return value (AArch64)
195d81
Patch106: pr3519-fix_further_functions_with_a_missing_return_value.patch
c70480
# S390 ambiguous log2_intptr calls
c70480
Patch107: s390-8214206_fix.patch
Severin Gehwolf b2021a
# JDK-8224851: AArch64: fix warnings and errors with Clang and GCC 8.3
Severin Gehwolf b2021a
# GCC 10 fix for redeclaration
Severin Gehwolf d22128
Patch120: jdk8224851-aarch64_fix_warnings_and_errors_GCC_8_3.patch
42712c
711d98
#############################################
711d98
#
993373
# Patches which need backporting to 8u
711d98
#
Andrew John Hughes 5601c0
# This section includes patches which have
Andrew John Hughes 5601c0
# been pushed upstream to the latest OpenJDK
Andrew John Hughes 5601c0
# development tree, but need to be backported
Andrew John Hughes 5601c0
# to OpenJDK 8u.
711d98
#############################################
6e6e3e
# S8074839, PR2462: Resolve disabled warnings for libunpack and the unpack200 binary
322a6a
# This fixes printf warnings that lead to build failure with -Werror=format-security from optflags
195d81
Patch502: pr2462-resolve_disabled_warnings_for_libunpack_and_the_unpack200_binary.patch
da1227
# S8154313: Generated javadoc scattered all over the place
e8963d
Patch578: jdk8154313-generated_javadoc_scattered_all_over_the_place.patch
0b5ec9
# PR3591: Fix for bug 3533 doesn't add -mstackrealign to JDK code
195d81
Patch571: jdk8199936-pr3591-enable_mstackrealign_on_x86_linux_as_well_as_x86_mac_os_x_jdk.patch
b0622b
# 8143245, PR3548: Zero build requires disabled warnings
195d81
Patch574: jdk8143245-pr3548-zero_build_requires_disabled_warnings.patch
b0622b
# 8197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
195d81
Patch575: jdk8197981-pr3548-missing_return_statement_in_sync_val_compare_and_swap_8.patch
b0622b
# 8062808, PR3548: Turn on the -Wreturn-type warning
195d81
Patch577: jdk8062808-pr3548-turn_on_the_wreturn_type_warning.patch
Severin Gehwolf 1cd817
# s390: JDK-8203030, Type fixing for s390
195d81
Patch102: jdk8203030-zero_s390_31_bit_size_t_type_conflicts_in_shared_code.patch
Andrew John Hughes 5d4b40
# 8035341: Allow using a system installed libpng
626887
Patch202: jdk8035341-allow_using_system_installed_libpng.patch
Andrew John Hughes 5d4b40
# 8042159: Allow using a system-installed lcms2
195d81
Patch203: jdk8042159-allow_using_system_installed_lcms2.patch
6e6e3e
6e6e3e
#############################################
6e6e3e
#
39e7af
# Patches appearing in 8u262
Andrew John Hughes 4dd0d6
#
Andrew John Hughes 4dd0d6
# This section includes patches which are present
Andrew John Hughes 4dd0d6
# in the listed OpenJDK 8u release and should be
Andrew John Hughes 4dd0d6
# able to be removed once that release is out
Andrew John Hughes 4dd0d6
# and used by this RPM.
Andrew John Hughes 4dd0d6
#############################################
39e7af
# JDK-8233880: Support compilers with multi-digit major version numbers
39e7af
Patch579: jdk8233880-compiler_versioning.patch
Andrew John Hughes 4dd0d6
Andrew John Hughes 4dd0d6
#############################################
Andrew John Hughes 4dd0d6
#
993373
# Patches ineligible for 8u
711d98
#
Andrew John Hughes 5601c0
# This section includes patches which are present
Andrew John Hughes 5601c0
# upstream, but ineligible for upstream 8u backport.
711d98
#############################################
993373
# 8043805: Allow using a system-installed libjpeg
195d81
Patch201: jdk8043805-allow_using_system_installed_libjpeg.patch
993373
711d98
#############################################
711d98
#
Andrew John Hughes 5d4b40
# Shenandoah fixes
711d98
#
Andrew John Hughes 5601c0
# This section includes patches which are
Andrew John Hughes 5601c0
# specific to the Shenandoah garbage collector
Andrew John Hughes 5601c0
# and should be upstreamed to the appropriate
Andrew John Hughes 5601c0
# trees.
711d98
#############################################
017a12
711d98
#############################################
711d98
#
993373
# Non-OpenJDK fixes
711d98
#
Andrew John Hughes 5601c0
# This section includes patches to code other
Andrew John Hughes 5601c0
# that from OpenJDK.
711d98
#############################################
195d81
Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
9710a8
Andrew John Hughes 5601c0
#############################################
Andrew John Hughes 5601c0
#
Andrew John Hughes 5601c0
# Dependencies
Andrew John Hughes 5601c0
#
Andrew John Hughes 5601c0
#############################################
ff9254
BuildRequires: autoconf
ff9254
BuildRequires: automake
ff9254
BuildRequires: alsa-lib-devel
de413e
BuildRequires: binutils
ff9254
BuildRequires: cups-devel
ff9254
BuildRequires: desktop-file-utils
3f1969
# elfutils only are OK for build without AOT
711d98
BuildRequires: elfutils-devel
d7a3fc
BuildRequires: fontconfig-devel
ff9254
BuildRequires: freetype-devel
ff9254
BuildRequires: giflib-devel
Jiri Vanek 9b793e
BuildRequires: gcc-c++
ea1552
BuildRequires: gdb
ff9254
BuildRequires: lcms2-devel
ff9254
BuildRequires: libjpeg-devel
ff9254
BuildRequires: libpng-devel
ff9254
BuildRequires: libxslt
ff9254
BuildRequires: libX11-devel
d7a3fc
BuildRequires: libXext-devel
ff9254
BuildRequires: libXi-devel
ff9254
BuildRequires: libXinerama-devel
d7a3fc
BuildRequires: libXrender-devel
ff9254
BuildRequires: libXt-devel
ff9254
BuildRequires: libXtst-devel
b5340f
# Requirements for setting up the nss.cfg
b5340f
BuildRequires: nss-devel
ff9254
BuildRequires: pkgconfig
ff9254
BuildRequires: xorg-x11-proto-devel
ff9254
BuildRequires: zip
Severin Gehwolf 54b188
BuildRequires: unzip
4821c3
# Use OpenJDK 7 where available (on RHEL) to avoid
4821c3
# having to use the rhel-7.x-java-unsafe-candidate hack
d049cd
%if ! 0%{?fedora} && 0%{?rhel} <= 7
0b5ec9
# Require a boot JDK which doesn't fail due to RH1482244
ff3d05
BuildRequires: java-1.7.0-openjdk-devel >= 1.7.0.151-2.6.11.3
4821c3
%else
db534f
BuildRequires: java-1.8.0-openjdk-devel
4821c3
%endif
711d98
# Zero-assembler build requirement
ff9254
%ifnarch %{jit_arches}
ff9254
BuildRequires: libffi-devel
ff9254
%endif
1d4d71
BuildRequires: tzdata-java >= 2015d
ee3b4b
# Earlier versions have a bug in tree vectorization on PPC
ee3b4b
BuildRequires: gcc >= 4.8.3-8
acfc6f
0d8256
%if %{with_systemtap}
ff9254
BuildRequires: systemtap-sdt-devel
ff9254
%endif
ff9254
711d98
# this is always built, also during debug-only build
711d98
# when it is built in debug-only this package is just placeholder
1f8ac3
%{java_rpo %{nil}}
b5340f
1f8ac3
%description
50fd6b
The %{origin_nice} runtime environment %{majorver}.
c9dc16
1f8ac3
%if %{include_debug_build}
711d98
%package slowdebug
711d98
Summary: %{origin_nice} Runtime Environment %{majorver} %{debug_on}
c4c291
701fb2
%{java_rpo -- %{debug_suffix_unquoted}}
711d98
%description slowdebug
50fd6b
The %{origin_nice} runtime environment %{majorver}.
1f8ac3
%{debug_warning}
1f8ac3
%endif
c9dc16
1f8ac3
%if %{include_normal_build}
c9dc16
%package headless
711d98
Summary: %{origin_nice} Headless Runtime Environment %{majorver}
c9dc16
1f8ac3
%{java_headless_rpo %{nil}}
c4c291
c9dc16
%description headless
711d98
The %{origin_nice} runtime environment %{majorver} without audio and video support.
1f8ac3
%endif
c9dc16
1f8ac3
%if %{include_debug_build}
711d98
%package headless-slowdebug
50fd6b
Summary: %{origin_nice} Runtime Environment %{majorver} %{debug_on}
1f8ac3
701fb2
%{java_headless_rpo -- %{debug_suffix_unquoted}}
1f8ac3
711d98
%description headless-slowdebug
711d98
The %{origin_nice} runtime environment %{majorver} without audio and video support.
1f8ac3
%{debug_warning}
1f8ac3
%endif
1f8ac3
1f8ac3
%if %{include_normal_build}
ff9254
%package devel
711d98
Summary: %{origin_nice} Development Environment %{majorver}
ff9254
1f8ac3
%{java_devel_rpo %{nil}}
ff9254
1f8ac3
%description devel
711d98
The %{origin_nice} development tools %{majorver}.
1f8ac3
%endif
1f8ac3
1f8ac3
%if %{include_debug_build}
711d98
%package devel-slowdebug
711d98
Summary: %{origin_nice} Development Environment %{majorver} %{debug_on}
ff9254
701fb2
%{java_devel_rpo -- %{debug_suffix_unquoted}}
ff9254
711d98
%description devel-slowdebug
711d98
The %{origin_nice} development tools %{majorver}.
1f8ac3
%{debug_warning}
1f8ac3
%endif
ff9254
1f8ac3
%if %{include_normal_build}
ff9254
%package demo
711d98
Summary: %{origin_nice} Demos %{majorver}
ff9254
1f8ac3
%{java_demo_rpo %{nil}}
c4c291
ff9254
%description demo
711d98
The %{origin_nice} demos %{majorver}.
1f8ac3
%endif
1f8ac3
1f8ac3
%if %{include_debug_build}
711d98
%package demo-slowdebug
711d98
Summary: %{origin_nice} Demos %{majorver} %{debug_on}
1f8ac3
701fb2
%{java_demo_rpo -- %{debug_suffix_unquoted}}
1f8ac3
711d98
%description demo-slowdebug
711d98
The %{origin_nice} demos %{majorver}.
1f8ac3
%{debug_warning}
1f8ac3
%endif
ff9254
1f8ac3
%if %{include_normal_build}
ff9254
%package src
711d98
Summary: %{origin_nice} Source Bundle %{majorver}
ff9254
1f8ac3
%{java_src_rpo %{nil}}
c4c291
ff9254
%description src
3f1969
The java-%{origin}-src sub-package contains the complete %{origin_nice} %{majorver}
3f1969
class library source code for use by IDE indexers and debuggers.
1f8ac3
%endif
1f8ac3
1f8ac3
%if %{include_debug_build}
711d98
%package src-slowdebug
711d98
Summary: %{origin_nice} Source Bundle %{majorver} %{for_debug}
ff9254
701fb2
%{java_src_rpo -- %{debug_suffix_unquoted}}
1f8ac3
711d98
%description src-slowdebug
3f1969
The java-%{origin}-src-slowdebug sub-package contains the complete %{origin_nice} %{majorver}
3f1969
 class library source code for use by IDE indexers and debuggers. Debugging %{for_debug}.
1f8ac3
%endif
1f8ac3
1f8ac3
%if %{include_normal_build}
ff9254
%package javadoc
711d98
Summary: %{origin_nice} %{majorver} API documentation
Severin Gehwolf ad1d27
Requires: javapackages-filesystem
27d2d5
Obsoletes: javadoc-slowdebug < 1:1.8.0.222.b10-1
ff9254
BuildArch: noarch
ff9254
1f8ac3
%{java_javadoc_rpo %{nil}}
c4c291
ff9254
%description javadoc
711d98
The %{origin_nice} %{majorver} API documentation.
1f8ac3
%endif
1f8ac3
db2f51
%if %{include_normal_build}
db2f51
%package javadoc-zip
27d2d5
Summary: %{origin_nice} %{majorver} API documentation compressed in a single archive
Severin Gehwolf ad1d27
Requires: javapackages-filesystem
27d2d5
Obsoletes: javadoc-zip-slowdebug < 1:1.8.0.222.b10-1
db2f51
BuildArch: noarch
db2f51
db2f51
%{java_javadoc_rpo %{nil}}
db2f51
db2f51
%description javadoc-zip
27d2d5
The %{origin_nice} %{majorver} API documentation compressed in a single archive.
1f8ac3
%endif
1f8ac3
1f8ac3
%if %{include_normal_build}
6e4fd3
%package accessibility
711d98
Summary: %{origin_nice} %{majorver} accessibility connector
6e4fd3
1f8ac3
%{java_accessibility_rpo %{nil}}
c4c291
6e4fd3
%description accessibility
711d98
Enables accessibility support in %{origin_nice} %{majorver} by using java-atk-wrapper. This allows
6e4fd3
compatible at-spi2 based accessibility programs to work for AWT and Swing-based
6e4fd3
programs.
6e4fd3
711d98
Please note, the java-atk-wrapper is still in beta, and %{origin_nice} %{majorver} itself is still
6e4fd3
being tuned to be working with accessibility features. There are known issues
6e4fd3
with accessibility on, so please do not install this package unless you really
6e4fd3
need to.
1f8ac3
%endif
6e4fd3
1f8ac3
%if %{include_debug_build}
711d98
%package accessibility-slowdebug
711d98
Summary: %{origin_nice} %{majorver} accessibility connector %{for_debug}
1f8ac3
701fb2
%{java_accessibility_rpo -- %{debug_suffix_unquoted}}
1f8ac3
711d98
%description accessibility-slowdebug
1f8ac3
See normal java-%{version}-openjdk-accessibility description.
1f8ac3
%endif
6e4fd3
562d2b
562d2b
%if %{with_openjfx_binding}
562d2b
%package openjfx
562d2b
Summary: OpenJDK x OpenJFX connector. This package adds symliks finishing Java FX integration to %{name}
562d2b
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
284f94
Requires: openjfx8%{?_isa}
a6e9c7
Provides: javafx  = %{epoch}:%{version}-%{release}
562d2b
%description openjfx
562d2b
Set of links from OpenJDK (jre) to OpenJFX
562d2b
562d2b
%package openjfx-devel
562d2b
Summary: OpenJDK x OpenJFX connector for FX developers. This package adds symliks finishing Java FX integration to %{name}-devel
562d2b
Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
284f94
Requires: openjfx8-devel%{?_isa}
a6e9c7
Provides: javafx-devel = %{epoch}:%{version}-%{release}
562d2b
%description openjfx-devel
562d2b
Set of links from OpenJDK (sdk) to OpenJFX
562d2b
562d2b
%if %{include_debug_build}
72be25
%package openjfx-slowdebug
b897e4
Summary: OpenJDK x OpenJFX connector %{for_debug}. his package adds symliks finishing Java FX integration to %{name}-slowdebug
b897e4
Requires: %{name}-slowdebug%{?_isa} = %{epoch}:%{version}-%{release}
284f94
Requires: openjfx8%{?_isa}
b897e4
Provides: javafx-slowdebug = %{epoch}:%{version}-%{release}
b897e4
%description openjfx-slowdebug
b897e4
Set of links from OpenJDK-slowdebug (jre) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
562d2b
72be25
%package openjfx-devel-slowdebug
b897e4
Summary: OpenJDK x OpenJFX connector for FX developers %{for_debug}. This package adds symliks finishing Java FX integration to %{name}-devel-slowdebug
b897e4
Requires: %{name}-devel-slowdebug%{?_isa} = %{epoch}:%{version}-%{release}
284f94
Requires: openjfx8-devel%{?_isa}
b897e4
Provides: javafx-devel-slowdebug = %{epoch}:%{version}-%{release}
b897e4
%description openjfx-devel-slowdebug
b897e4
Set of links from OpenJDK-slowdebug (sdk) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
562d2b
%endif
562d2b
%endif
562d2b
ff9254
%prep
1b1cbf
1b1cbf
# Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-(
1b1cbf
%if 0%{?stapinstall:1}
1b1cbf
  echo "CPU: %{_target_cpu}, arch install directory: %{archinstall}, SystemTap install directory: %{stapinstall}"
1b1cbf
%else
1b1cbf
  %{error:Unrecognised architecture %{_target_cpu}}
1b1cbf
%endif
1b1cbf
cc7ef6
if [ %{include_normal_build} -eq 0 -o  %{include_normal_build} -eq 1 ] ; then
cc7ef6
  echo "include_normal_build is %{include_normal_build}"
cc7ef6
else
cc7ef6
  echo "include_normal_build is %{include_normal_build}, thats invalid. Use 1 for yes or 0 for no"
cc7ef6
  exit 11
cc7ef6
fi
cc7ef6
if [ %{include_debug_build} -eq 0 -o  %{include_debug_build} -eq 1 ] ; then
cc7ef6
  echo "include_debug_build is %{include_debug_build}"
cc7ef6
else
cc7ef6
  echo "include_debug_build is %{include_debug_build}, thats invalid. Use 1 for yes or 0 for no"
cc7ef6
  exit 12
cc7ef6
fi
cc7ef6
if [ %{include_debug_build} -eq 0 -a  %{include_normal_build} -eq 0 ] ; then
Severin Gehwolf 204045
  echo "You have disabled both include_debug_build and include_normal_build. That is a no go."
cc7ef6
  exit 13
cc7ef6
fi
Andrew John Hughes b961b8
Andrew John Hughes b961b8
echo "Update version: %{updatever}"
Andrew John Hughes b961b8
echo "Build number: %{buildver}"
Andrew John Hughes b961b8
echo "Milestone: %{milestone}"
cc7ef6
%setup -q -c -n %{uniquesuffix ""} -T -a 0
cd57c6
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084
fb001c
prioritylength=`expr length %{priority}`
fb001c
if [ $prioritylength -ne 7 ] ; then
fb001c
 echo "priority must be 7 digits in total, violated"
fb001c
 exit 14
fb001c
fi
deb3d7
# For old patches
017a12
ln -s %{top_level_dir_name} jdk8
8cd6f4
ff9254
cp %{SOURCE2} .
ff9254
79ae09
# replace outdated configure guess script
79ae09
#
79ae09
# the configure macro will do this too, but it also passes a few flags not
79ae09
# supported by openjdk configure script
3f7d11
cp %{SOURCE100} %{top_level_dir_name}/common/autoconf/build-aux/
3f7d11
cp %{SOURCE101} %{top_level_dir_name}/common/autoconf/build-aux/
Jiri Vanek 9b793e
ff9254
# OpenJDK patches
ff9254
ff9254
# Remove libraries that are linked
ff9254
sh %{SOURCE12}
ff9254
0fb9d7
# System library fixes
717abd
%patch201
717abd
%patch202
Jiri Vanek 8c391a
%patch203
0fb9d7
2f0cb2
# System security policy fixes
e8963d
%patch400
e8963d
%patch401
44da3c
481efd
%patch1
af5a48
%patch3
dfc563
%patch5
ff9254
5fc2f2
# s390 build fixes
ff9254
%patch102
993373
%patch103
c70480
%patch107
42712c
5930d5
# AArch64 fixes
b0622b
%patch106
Severin Gehwolf d22128
%patch120
711d98
0b5ec9
# x86 fixes
0b5ec9
%patch105
0b5ec9
0fb9d7
# Upstreamable fixes
322a6a
%patch502
deb3d7
%patch504
993373
%patch512
e8963d
%patch578
418a52
%patch523
da1227
%patch528
0b5ec9
%patch529
c78019
%patch531
b0622b
%patch530
0b5ec9
%patch571
b0622b
%patch574
b0622b
%patch575
b0622b
%patch577
Severin Gehwolf 4408c2
%patch111
1b81e9
%patch112
Severin Gehwolf 5ff7ed
%patch113
39e7af
%patch579
23b413
0fb9d7
# RPM-only fixes
4821c3
%patch539
2a3db7
%patch1000
ca9abc
dc4e79
# RHEL-only patches
d049cd
%if ! 0%{?fedora} && 0%{?rhel} <= 7
dc4e79
%patch534
dc4e79
%endif
76251b
017a12
# Shenandoah patches
0b5ec9
ff9254
# Extract systemtap tapsets
ff9254
%if %{with_systemtap}
ca2a20
tar --strip-components=1 -x -I xz -f %{SOURCE8}
cc7ef6
%if %{include_debug_build}
cc7ef6
cp -r tapset tapset%{debug_suffix}
cc7ef6
%endif
cc7ef6
ff9254
cc7ef6
for suffix in %{build_loop} ; do
cc7ef6
  for file in "tapset"$suffix/*.in; do
37a4ca
    OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"`
711d98
    sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/server/libjvm.so:g" $file > $file.1
b5340f
# TODO find out which architectures other than i686 have a client vm
3f612f
%ifarch %{ix86}
711d98
    sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/client/libjvm.so:g" $file.1 > $OUTPUT_FILE
3f612f
%else
711d98
    sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.1 > $OUTPUT_FILE
3f612f
%endif
711d98
    sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE
711d98
    sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE
711d98
    sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE
cc7ef6
  done
ff9254
done
cc7ef6
# systemtap tapsets ends
f3b229
%endif
ff9254
0ccb6d
# Prepare desktop files
37a4ca
# The _X_ syntax indicates variables that are replaced by make upstream
37a4ca
# The @X@ syntax indicates variables that are replaced by configure upstream
cc7ef6
for suffix in %{build_loop} ; do
0ccb6d
for file in %{SOURCE9} %{SOURCE10} ; do
cc7ef6
    FILE=`basename $file | sed -e s:\.in$::g`
cc7ef6
    EXT="${FILE##*.}"
cc7ef6
    NAME="${FILE%.*}"
cc7ef6
    OUTPUT_FILE=$NAME$suffix.$EXT
c37435
    sed    -e  "s:_SDKBINDIR_:%{sdkbindir -- $suffix}:g" $file > $OUTPUT_FILE
37a4ca
    sed -i -e  "s:_JREBINDIR_:%{jrebindir -- $suffix}:g" $OUTPUT_FILE
c37435
    sed -i -e  "s:@target_cpu@:%{_arch}:g" $OUTPUT_FILE
c37435
    sed -i -e  "s:@OPENJDK_VER@:%{version}-%{release}.%{_arch}$suffix:g" $OUTPUT_FILE
37a4ca
    sed -i -e  "s:@JAVA_VER@:%{javaver}:g" $OUTPUT_FILE
711d98
    sed -i -e  "s:@JAVA_VENDOR@:%{origin}:g" $OUTPUT_FILE
cc7ef6
done
0ccb6d
done
ff9254
0fb9d7
# Setup nss.cfg
711d98
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
0fb9d7
a2c916
ff9254
%build
3f1969
# How many CPU's do we have?
20c3d2
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
ff9254
export NUM_PROC=${NUM_PROC:-1}
20c3d2
%if 0%{?_smp_ncpus_max}
20c3d2
# Honor %%_smp_ncpus_max
20c3d2
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
20c3d2
%endif
ff9254
b5340f
%ifarch s390x sparc64 alpha %{power64} %{aarch64}
ff9254
export ARCH_DATA_MODEL=64
ff9254
%endif
ff9254
%ifarch alpha
ff9254
export CFLAGS="$CFLAGS -mieee"
ff9254
%endif
ff9254
322a6a
# We use ourcppflags because the OpenJDK build seems to
b0231b
# pass EXTRA_CFLAGS to the HotSpot C++ compiler...
39e7af
EXTRA_CFLAGS="%ourcppflags -Wno-error -fcommon"
39e7af
EXTRA_CPP_FLAGS="%ourcppflags"
711d98
d90461
%ifarch %{power64} ppc
0d059a
# fix rpmlint warnings
0d059a
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
d90461
%endif
d2472c
d2472c
EXTRA_ASFLAGS="${EXTRA_CFLAGS} -Wa,--generate-missing-build-notes=yes"
d2472c
export EXTRA_CFLAGS EXTRA_ASFLAGS
b5340f
711d98
(cd %{top_level_dir_name}/common/autoconf
ff9254
 bash ./autogen.sh
ff9254
)
ff9254
c3c571
function buildjdk() {
c3c571
    local outputdir=${1}
c3c571
    local buildjdk=${2}
c3c571
    local maketargets=${3}
c3c571
    local debuglevel=${4}
ff9254
c3c571
    local top_srcdir_abs_path=$(pwd)/%{top_level_dir_name}
c3c571
    # Variable used in hs_err hook on build failures
c3c571
    local top_builddir_abs_path=$(pwd)/${outputdir}
Severin Gehwolf 2d03e5
c3c571
    mkdir -p ${outputdir}
c3c571
    pushd ${outputdir}
ff9254
c3c571
    bash ${top_srcdir_abs_path}/configure \
b9ff0a
%ifnarch %{jit_arches}
b9ff0a
    --with-jvm-variants=zero \
b9ff0a
%endif
Severin Gehwolf 1cd817
    --with-native-debug-symbols=internal \
Andrew John Hughes b961b8
    --with-milestone=%{milestone} \
bb689e
    --with-update-version=%{updatever} \
ff9254
    --with-build-number=%{buildver} \
c3c571
    --with-boot-jdk=${buildjdk} \
c3c571
    --with-debug-level=${debuglevel} \
ff9254
    --enable-unlimited-crypto \
ff9254
    --with-zlib=system \
98cf81
    --with-libjpeg=system \
ff9254
    --with-giflib=system \
ff9254
    --with-libpng=system \
711d98
    --with-lcms=system \
ff9254
    --with-stdc++lib=dynamic \
33767a
    --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
d90461
    --with-extra-cflags="$EXTRA_CFLAGS" \
d2472c
    --with-extra-asflags="$EXTRA_ASFLAGS" \
Severin Gehwolf a3d290
    --with-extra-ldflags="%{ourldflags}" \
d90461
    --with-num-cores="$NUM_PROC"
ff9254
c3c571
    cat spec.gmk
c3c571
    cat hotspot-spec.gmk
c3c571
c3c571
    make \
c3c571
	JAVAC_FLAGS=-g \
c3c571
	LOG=trace \
c3c571
	SCTP_WERROR= \
c3c571
	${maketargets} || ( pwd; find ${top_srcdir_abs_path} ${top_builddir_abs_path} -name "hs_err_pid*.log" | xargs cat && false )
c3c571
c3c571
    # the build (erroneously) removes read permissions from some jars
c3c571
    # this is a regression in OpenJDK 7 (our compiler):
c3c571
    # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
c3c571
    find images/%{jdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
c3c571
    chmod ugo+r images/%{jdkimage}/lib/ct.sym
c3c571
c3c571
    # remove redundant *diz and *debuginfo files
c3c571
    find images/%{jdkimage} -iname '*.diz' -exec rm -v {} \;
c3c571
    find images/%{jdkimage} -iname '*.debuginfo' -exec rm -v {} \;
c3c571
c3c571
    # Build screws up permissions on binaries
c3c571
    # https://bugs.openjdk.java.net/browse/JDK-8173610
c3c571
    find images/%{jdkimage} -iname '*.so' -exec chmod +x {} \;
c3c571
    find images/%{jdkimage}/bin/ -exec chmod +x {} \;
c3c571
c3c571
    popd >& /dev/null
c3c571
}
c3c571
c3c571
for suffix in %{build_loop} ; do
c3c571
if [ "x$suffix" = "x" ] ; then
c3c571
  debugbuild=release
c3c571
else
c3c571
  # change --something to something
c3c571
  debugbuild=`echo $suffix  | sed "s/-//g"`
c3c571
fi
c3c571
c3c571
systemjdk=/usr/lib/jvm/java-openjdk
c3c571
builddir=%{buildoutputdir -- $suffix}
c3c571
bootbuilddir=boot${builddir}
f3b229
27d2d5
# Debug builds don't need same targets as release for
27d2d5
# build speed-up
27d2d5
maketargets="%{release_targets}"
27d2d5
if echo $debugbuild | grep -q "debug" ; then
27d2d5
  maketargets="%{debug_targets}"
27d2d5
fi
db2f51
c20d18
%if %{bootstrap_build}
c3c571
buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild}
c3c571
buildjdk ${builddir} $(pwd)/${bootbuilddir}/images/%{jdkimage} "${maketargets}" ${debugbuild}
c3c571
rm -rf ${bootbuilddir}
c3c571
%else
c3c571
buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild}
c3c571
%endif
ff9254
42712c
# Install nss.cfg right away as we will be using the JRE above
711d98
export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{jdkimage}
ff9254
b5340f
# Install nss.cfg right away as we will be using the JRE above
0fb9d7
install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/
b5340f
6911b5
# Use system-wide tzdata
db534f
rm $JAVA_HOME/jre/lib/tzdb.dat
db534f
ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat
ff9254
711d98
# build cycles
b0231b
done
b0231b
b0231b
%check
b0231b
b0231b
# We test debug first as it will give better diagnostics on a crash
b0231b
for suffix in %{rev_build_loop} ; do
b0231b
711d98
export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{jdkimage}
b0231b
ff9254
# Check unlimited policy has been used
ff9254
$JAVA_HOME/bin/javac -d . %{SOURCE13}
ff9254
$JAVA_HOME/bin/java TestCryptoLevel
ff9254
c7d7be
# Check ECC is working
c7d7be
$JAVA_HOME/bin/javac -d . %{SOURCE14}
956595
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
c7d7be
Severin Gehwolf d15d02
# Verify system crypto (policy) can be disabled
Severin Gehwolf d15d02
$JAVA_HOME/bin/javac -d . %{SOURCE15}
Severin Gehwolf d15d02
$JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename %{SOURCE15})|sed "s|\.java||")
Severin Gehwolf d15d02
de413e
# Check debug symbols are present and can identify code
ea1552
find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
ea1552
do
ea1552
  if [ -f "$lib" ] ; then
ea1552
    echo "Testing $lib for debug symbols"
ea1552
    # All these tests rely on RPM failing the build if the exit code of any set
ea1552
    # of piped commands is non-zero.
ea1552
711d98
    # Test for .debug_* sections in the shared object. This is the main test
711d98
    # Stripped objects will not contain these
ea1552
    eu-readelf -S "$lib" | grep "] .debug_"
b038c2
    test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
ea1552
711d98
    # Test FILE symbols. These will most likely be removed by anything that
ea1552
    # manipulates symbol tables because it's generally useless. So a nice test
711d98
    # that nothing has messed with symbols
ea1552
    old_IFS="$IFS"
ea1552
    IFS=$'\n'
ea1552
    for line in $(eu-readelf -s "$lib" | grep "00000000      0 FILE    LOCAL  DEFAULT")
ea1552
    do
ea1552
     # We expect to see .cpp files, except for architectures like aarch64 and
ea1552
     # s390 where we expect .o and .oS files
b038c2
      echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
ea1552
    done
ea1552
    IFS="$old_IFS"
ea1552
711d98
    # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking
ea1552
    if [ "`basename $lib`" = "libjvm.so" ]; then
ea1552
      eu-readelf -s "$lib" | \
b038c2
        grep -E "00000000      0 FILE    LOCAL  DEFAULT      ABS javaCalls.(cpp|o)$"
ea1552
    fi
ea1552
ea1552
    # Test that there are no .gnu_debuglink sections pointing to another
ea1552
    # debuginfo file. There shouldn't be any debuginfo files, so the link makes
711d98
    # no sense either
ea1552
    eu-readelf -S "$lib" | grep 'gnu'
ea1552
    if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
ea1552
      echo "bad .gnu_debuglink section."
ea1552
      eu-readelf -x .gnu_debuglink "$lib"
ea1552
      false
ea1552
    fi
ea1552
  fi
ea1552
done
ea1552
ea1552
# Make sure gdb can do a backtrace based on line numbers on libjvm.so
23b413
# javaCalls.cpp:58 should map to:
23b413
# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58 
23b413
# Using line number 1 might cause build problems. See:
23b413
# https://bugzilla.redhat.com/show_bug.cgi?id=1539664
23b413
# https://bugzilla.redhat.com/show_bug.cgi?id=1538767
ea1552
gdb -q "$JAVA_HOME/bin/java" <
ea1552
handle SIGSEGV pass nostop noprint
0c6240
handle SIGILL pass nostop noprint
ea1552
set breakpoint pending on
23b413
break javaCalls.cpp:58
ea1552
commands 1
ea1552
backtrace
ea1552
quit
ea1552
end
ea1552
run -version
ea1552
EOF
ea1552
grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
de413e
c02b44
# Check src.zip has all sources. See RHBZ#1130490
9f3137
jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe'
9f3137
9f3137
# Check class files include useful debugging information
9f3137
$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
9f3137
$JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
9f3137
$JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
9f3137
9f3137
# Check generated class files include useful debugging information
9f3137
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
9f3137
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
9f3137
$JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
b038c2
711d98
# build cycles check
cc7ef6
done
cc7ef6
ff9254
%install
ff9254
STRIP_KEEP_SYMTAB=libjvm*
ff9254
cc7ef6
for suffix in %{build_loop} ; do
ff9254
711d98
# Install the jdk
711d98
pushd %{buildoutputdir -- $suffix}/images/%{jdkimage}
ff9254
711d98
# Install jsa directories so we can owe them
1a4b84
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/server/
1a4b84
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/client/
b5340f
ff9254
  # Install main files.
1a4b84
  install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1a4b84
  cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1a4b84
  install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1a4b84
  cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
ff9254
0d8256
%if %{with_systemtap}
711d98
  # Install systemtap support files
1a4b84
  install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
cc7ef6
  # note, that uniquesuffix  is in BUILD dir in this case
1a4b84
  cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1a4b84
  pushd  $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
5d5c27
   tapsetFiles=`ls *.stp`
5d5c27
  popd
ff9254
  install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
711d98
  for name in $tapsetFiles ; do
711d98
    targetName=`echo $name | sed "s/.stp/$suffix.stp/"`
711d98
    ln -sf %{_jvmdir}/%{sdkdir -- $suffix}/tapset/$name $RPM_BUILD_ROOT%{tapsetdir}/$targetName
711d98
  done
ff9254
%endif
ff9254
711d98
  # Remove empty cacerts database
1a4b84
  rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security/cacerts
711d98
  # Install cacerts symlink needed by some apps which hardcode the path
1a4b84
  pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security
711d98
      ln -sf /etc/pki/java/cacerts .
93b65a
  popd
ff9254
711d98
  # Install versioned symlinks
ff9254
  pushd $RPM_BUILD_ROOT%{_jvmdir}
1a4b84
    ln -sf %{jredir -- $suffix} %{jrelnk -- $suffix}
ff9254
  popd
ff9254
ff9254
  # Remove javaws man page
ff9254
  rm -f man/man1/javaws*
ff9254
711d98
  # Install man pages
ff9254
  install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
ff9254
  for manpage in man/man1/*
ff9254
  do
711d98
    # Convert man pages to UTF8 encoding
ff9254
    iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
ff9254
    mv -f $manpage.tmp $manpage
ff9254
    install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
1a4b84
      $manpage .1)-%{uniquesuffix -- $suffix}.1
ff9254
  done
ff9254
ff9254
  # Install demos and samples.
1a4b84
  cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
ff9254
  mkdir -p sample/rmi
cc7ef6
  if [ ! -e sample/rmi/java-rmi.cgi ] ; then 
cc7ef6
    # hack to allow --short-circuit on install
cc7ef6
    mv bin/java-rmi.cgi sample/rmi
cc7ef6
  fi
1a4b84
  cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
ff9254
ff9254
popd
ff9254
27d2d5
if ! echo $suffix | grep -q "debug" ; then
27d2d5
  # Install Javadoc documentation
27d2d5
  install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
27d2d5
  cp -a %{buildoutputdir -- $suffix}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
27d2d5
  built_doc_archive=`echo "jdk-%{javaver}_%{updatever}%{milestone_version}$suffix-%{buildver}-docs.zip" | sed  s/slowdebug/debug/`
27d2d5
  cp -a %{buildoutputdir -- $suffix}/bundles/$built_doc_archive  $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip
27d2d5
fi
ff9254
711d98
# Install icons and menu entries
ff9254
for s in 16 24 32 48 ; do
ff9254
  install -D -p -m 644 \
3f7d11
    %{top_level_dir_name}/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
711d98
    $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}-%{origin}.png
ff9254
done
ff9254
711d98
# Install desktop files
ff9254
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
cc7ef6
for e in jconsole$suffix policytool$suffix ; do
1a4b84
    desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \
ff9254
        --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
ff9254
done
ff9254
b5340f
# Install /etc/.java/.systemPrefs/ directory
b5340f
# See https://bugzilla.redhat.com/show_bug.cgi?id=741821
b5340f
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
b5340f
711d98
# FIXME: remove SONAME entries from demo DSOs. See
ff9254
# https://bugzilla.redhat.com/show_bug.cgi?id=436497
ff9254
ff9254
# Find non-documentation demo files.
1a4b84
find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
1a4b84
  $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
ff9254
  -type f -o -type l | sort \
ff9254
  | grep -v README \
ff9254
  | sed 's|'$RPM_BUILD_ROOT'||' \
cc7ef6
  >> %{name}-demo.files"$suffix"
ff9254
# Find documentation demo files.
1a4b84
find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
1a4b84
  $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
ff9254
  -type f -o -type l | sort \
ff9254
  | grep README \
ff9254
  | sed 's|'$RPM_BUILD_ROOT'||' \
ff9254
  | sed 's|^|%doc |' \
cc7ef6
  >> %{name}-demo.files"$suffix"
ff9254
6e4fd3
# Create links which leads to separately installed java-atk-bridge and allow configuration
6e4fd3
# links points to java-atk-wrapper - an dependence
1a4b84
  pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}
c2cceb
    ln -s %{_libdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so
6e4fd3
  popd
1a4b84
  pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/ext
c2cceb
     ln -s %{_libdir}/java-atk-wrapper/java-atk-wrapper.jar  java-atk-wrapper.jar
6e4fd3
  popd
1a4b84
  pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/
6e4fd3
    echo "#Config file to  enable java-atk-wrapper" > accessibility.properties
6e4fd3
    echo "" >> accessibility.properties
6e4fd3
    echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties
6e4fd3
    echo "" >> accessibility.properties
6e4fd3
  popd
6e4fd3
562d2b
# intentionally after all else, fx links  with redirections on its own
562d2b
%if %{with_openjfx_binding}
562d2b
  FXSDK_FILES=%{name}-openjfx-devel.files"$suffix"
562d2b
  FXJRE_FILES=%{name}-openjfx.files"$suffix"
562d2b
  echo -n "" > $FXJRE_FILES
562d2b
  echo -n "" > $FXSDK_FILES
562d2b
  for file in  %{jfx_jre_libs} ; do
562d2b
    srcfile=%{jfx_jre_libs_dir}/$file
1a4b84
    targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/$file
562d2b
    ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
562d2b
    echo $targetfile >> $FXJRE_FILES
562d2b
  done
562d2b
  for file in  %{jfx_jre_native} ; do
562d2b
    srcfile=%{jfx_jre_native_dir}/$file
1a4b84
    targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/$file
562d2b
    ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
562d2b
    echo $targetfile >> $FXJRE_FILES
562d2b
  done
562d2b
  for file in  %{jfx_jre_exts} ; do
562d2b
    srcfile=%{jfx_jre_exts_dir}/$file
1a4b84
    targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/ext/$file
562d2b
    ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
562d2b
    echo $targetfile >> $FXJRE_FILES
562d2b
  done
562d2b
  for file in  %{jfx_sdk_libs} ; do
562d2b
    srcfile=%{jfx_sdk_libs_dir}/$file
1a4b84
    targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/lib/$file
562d2b
    ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
562d2b
    echo $targetfile >> $FXSDK_FILES
562d2b
  done
562d2b
  for file in  %{jfx_sdk_bins} ; do
562d2b
    srcfile=%{jfx_sdk_bins_dir}/$file
1a4b84
    targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/bin/$file
562d2b
    ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
562d2b
    echo $targetfile >> $FXSDK_FILES
562d2b
  done
562d2b
%endif
562d2b
1a4b84
bash %{SOURCE20} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix} %{javaver}
5b5aff
# https://bugzilla.redhat.com/show_bug.cgi?id=1183793
1a4b84
touch -t 201401010000 $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/security/java.security
fb001c
1f48fa
# moving config files to /etc
1f48fa
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib/security/policy/unlimited/
1f48fa
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib/security/policy/limited/
554136
for file in lib/security/cacerts lib/security/policy/unlimited/US_export_policy.jar lib/security/policy/unlimited/local_policy.jar lib/security/policy/limited/US_export_policy.jar lib/security/policy/limited/local_policy.jar lib/security/java.policy lib/security/java.security lib/security/blacklisted.certs lib/logging.properties lib/calendars.properties lib/security/nss.cfg lib/net.properties ; do
1f48fa
  mv      $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/$file   $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/$file
1f48fa
  ln -sf  %{etcjavadir -- $suffix}/$file                          $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/$file
1f48fa
done
1f48fa
711d98
# stabilize permissions
711d98
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "*.so" -exec chmod 755 {} \; ; 
711d98
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -type d -exec chmod 755 {} \; ; 
711d98
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "ASSEMBLY_EXCEPTION" -exec chmod 644 {} \; ; 
711d98
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "LICENSE" -exec chmod 644 {} \; ; 
711d98
find $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/ -name "THIRD_PARTY_README" -exec chmod 644 {} \; ; 
711d98
cc7ef6
# end, dual install
cc7ef6
done
cc7ef6
711d98
%if %{include_normal_build}
711d98
# intentionally only for non-debug
8aabfb
%pretrans headless -p <lua>
8aabfb
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
8aabfb
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
8aabfb
-- if copy-jdk-configs is in transaction, it installs in pretrans to temp
3f1969
-- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in transaction  and so is
711d98
-- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
8aabfb
-- whether copy-jdk-configs is installed or not. If so, then configs are copied
8aabfb
-- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
8aabfb
local posix = require "posix"
8aabfb
local debug = false
8aabfb
8aabfb
SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
8aabfb
SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
8aabfb