@ -1,3 +1,8 @@
# To rebuild this RPM, you must first rebuild the portable
# RPM using the java-21-openjdk-portable.specfile, install
# it and then adjust portablerelease and portablesuffix
# to match the new portable.
# RPM conditionals so as to be able to dynamically produce
# RPM conditionals so as to be able to dynamically produce
# slowdebug/release builds. See:
# slowdebug/release builds. See:
# http://rpm.org/user_doc/conditional_builds.html
# http://rpm.org/user_doc/conditional_builds.html
@ -21,8 +26,6 @@
%bcond_without release
%bcond_without release
# Enable static library builds by default.
# Enable static library builds by default.
%bcond_without staticlibs
%bcond_without staticlibs
# Build a fresh libjvm.so for use in a copy of the bootstrap JDK
%bcond_without fresh_libjvm
# Build with system libraries
# Build with system libraries
%bcond_with system_libs
%bcond_with system_libs
@ -34,13 +37,6 @@
%global include_staticlibs 0
%global include_staticlibs 0
%endif
%endif
# Define whether to use the bootstrap JDK directly or with a fresh libjvm.so
%if %{with fresh_libjvm}
%global build_hotspot_first 1
%else
%global build_hotspot_first 0
%endif
%if %{with system_libs}
%if %{with system_libs}
%global system_libs 1
%global system_libs 1
%global link_type system
%global link_type system
@ -133,9 +129,9 @@
# Set of architectures which support the serviceability agent
# Set of architectures which support the serviceability agent
%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} %{arm}
%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} %{arm}
# Set of architectures which support class data sharing
# Set of architectures which support class data sharing
# See https://bugzilla.redhat.com/show_bug.cgi?id=513605
# As of JDK-8005165 in OpenJDK 10, class sharing is not arch-specific
# MetaspaceShared::generate_vtable_methods is not implemented for the PPC JIT
# However, it does segfault on the Zero assembler port, so currently JIT only
%global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{arm} s390x
%global share_arches %{jit_arches}
# Set of architectures for which we build the Shenandoah garbage collector
# Set of architectures for which we build the Shenandoah garbage collector
%global shenandoah_arches x86_64 %{aarch64}
%global shenandoah_arches x86_64 %{aarch64}
# Set of architectures for which we build the Z garbage collector
# Set of architectures for which we build the Z garbage collector
@ -223,9 +219,6 @@
# Target to use to just build HotSpot
# Target to use to just build HotSpot
%global hotspot_target hotspot
%global hotspot_target hotspot
# JDK to use for bootstrapping
%global bootjdk /usr/lib/jvm/java-%{buildjdkver}-openjdk
# debugedit tool for rewriting ELF file paths
# debugedit tool for rewriting ELF file paths
%global debugedit %{_rpmconfigdir}/debugedit
%global debugedit %{_rpmconfigdir}/debugedit
@ -238,12 +231,6 @@
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
%global ourldflags %{__global_ldflags}
%global ourldflags %{__global_ldflags}
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
# the initialization must be here. Later the pkg-config have buggy behavior
# looks like openjdk RPM specific bug
# Always set this so the nss.cfg file is not broken
%global NSS_LIBDIR %(pkg-config --variable=libdir nss)
# In some cases, the arch used by the JDK does
# In some cases, the arch used by the JDK does
# not match _arch.
# not match _arch.
# Also, in some cases, the machine name used by SystemTap
# Also, in some cases, the machine name used by SystemTap
@ -311,15 +298,10 @@
%endif
%endif
# New Version-String scheme-style defines
# New Version-String scheme-style defines
%global featurever 17
%global featurever 21
%global fakefeaturever 21
%global interimver 0
%global interimver 0
%global updatever 7
%global updatever 1
%global patchver 0
%global patchver 0
# buildjdkver is usually same as %%{featurever},
# but in time of bootstrap of next jdk, it is featurever-1,
# and this it is better to change it here, on single place
%global buildjdkver 17
# We don't add any LTS designator for STS packages (Fedora and EPEL).
# We don't add any LTS designator for STS packages (Fedora and EPEL).
# We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined.
# We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined.
%if 0%{?rhel} && !0%{?epel}
%if 0%{?rhel} && !0%{?epel}
@ -343,7 +325,7 @@
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}&version=%{fedora}
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}&version=%{fedora}
%else
%else
%if 0%{?rhel}
%if 0%{?rhel}
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%20%{rhel}&component=%{name}
%global oj_vendor_bug_url https://access.redhat.com/support/cases/
%else
%else
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi
%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi
%endif
%endif
@ -354,18 +336,25 @@
# Define IcedTea version used for SystemTap tapsets and desktop file
# Define IcedTea version used for SystemTap tapsets and desktop file
%global icedteaver 6.0.0pre00-c848b93a8598
%global icedteaver 6.0.0pre00-c848b93a8598
# Define current Git revision for the FIPS support patches
# Define current Git revision for the FIPS support patches
%global fipsver bf363eecce3
%global fipsver 75ffdc48eda
# Define JDK versions
%global newjavaver %{featurever}.%{interimver}.%{updatever}.%{patchver}
%global javaver %{featurever}
# Strip up to 6 trailing zeros in newjavaver, as the JDK does, to get the correct version used in filenames
%global filever %(svn=%{newjavaver}; for i in 1 2 3 4 5 6 ; do svn=${svn%%.0} ; done; echo ${svn})
# The tag used to create the OpenJDK tarball
%global vcstag jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}}
# Standard JPackage naming and versioning defines
# Standard JPackage naming and versioning defines
%global origin openjdk
%global origin openjdk
%global origin_nice OpenJDK
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
%global top_level_dir_name %{vcstag }
%global top_level_dir_name_backup %{top_level_dir_name}-backup
%global top_level_dir_name_backup %{top_level_dir_name}-backup
%global buildver 7
%global buildver 12
%global rpmrelease 4
%global rpmrelease 2
# Settings used by the portable build
# Settings used by the portable build
%global portablerelease 2
%global portablerelease 1
%global portablesuffix el8
%global portablesuffix el7_9
%global portablebuilddir /builddir/build/BUILD
%global portablebuilddir /builddir/build/BUILD
# Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit
# Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit
@ -380,15 +369,6 @@
# for techpreview, using 1, so slowdebugs can have 0
# for techpreview, using 1, so slowdebugs can have 0
%global priority %( printf '%08d' 1 )
%global priority %( printf '%08d' 1 )
%endif
%endif
%global newjavaver %{featurever}.%{interimver}.%{updatever}.%{patchver}
# Force 21 until we are actually ready to build that JDK version
%global javaver %{fakefeaturever}
# Strip up to 6 trailing zeros in newjavaver, as the JDK does, to get the correct version used in filenames
%global filever %(svn=%{newjavaver}; for i in 1 2 3 4 5 6 ; do svn=${svn%%.0} ; done; echo ${svn})
# The tag used to create the OpenJDK tarball
%global vcstag jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}}
# Define milestone (EA for pre-releases, GA for releases)
# Define milestone (EA for pre-releases, GA for releases)
# Release will be (where N is usually a number starting at 1):
# Release will be (where N is usually a number starting at 1):
@ -398,7 +378,7 @@
%if %{is_ga}
%if %{is_ga}
%global build_type GA
%global build_type GA
%global ea_designator ""
%global ea_designator ""
%global ea_designator_zip ""
%global ea_designator_zip %{nil}
%global extraver %{nil}
%global extraver %{nil}
%global eaprefix %{nil}
%global eaprefix %{nil}
%else
%else
@ -410,13 +390,13 @@
%endif
%endif
# parametrized macros are order-sensitive
# parametrized macros are order-sensitive
%global compatiblename java-%{fakef eaturever}-%{origin}
%global compatiblename java-%{featurever}-%{origin}
%global fullversion %{compatiblename}-%{version}-%{release}
%global fullversion %{compatiblename}-%{version}-%{release}
# images directories from upstream build
# images directories from upstream build
%global jdkimage jdk
%global jdkimage jdk
%global static_libs_image static-libs
%global static_libs_image static-libs
# output dir stub
# output dir stub
%define installoutputdir() %{expand:install/jdk%{fakef eaturever}.install%{?1}}
%define installoutputdir() %{expand:install/jdk%{featurever}.install%{?1}}
# we can copy the javadoc to not arched dir, or make it not noarch
# we can copy the javadoc to not arched dir, or make it not noarch
%define uniquejavadocdir() %{expand:%{fullversion}.%{_arch}%{?1}}
%define uniquejavadocdir() %{expand:%{fullversion}.%{_arch}%{?1}}
# main id and dir of this jdk
# main id and dir of this jdk
@ -426,7 +406,7 @@
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
# https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14
# https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14
# https://bugzilla.redhat.com/show_bug.cgi?id=1655938
# https://bugzilla.redhat.com/show_bug.cgi?id=1655938
%global _privatelibs libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsystemconf[.]so.*|libzip[.]so.*%{freetype_lib}
%global _privatelibs libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|lible[.]so.*|lib management[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsystemconf[.]so.*|libzip[.]so.*%{freetype_lib}
%global _publiclibs libjawt[.]so.*|libjava[.]so.*|libjvm[.]so.*|libverify[.]so.*|libjsig[.]so.*
%global _publiclibs libjawt[.]so.*|libjava[.]so.*|libjvm[.]so.*|libverify[.]so.*|libjsig[.]so.*
%if %is_system_jdk
%if %is_system_jdk
%global __provides_exclude ^(%{_privatelibs})$
%global __provides_exclude ^(%{_privatelibs})$
@ -442,6 +422,12 @@
%global __requires_exclude ^(%{_privatelibs}|%{_publiclibs})$
%global __requires_exclude ^(%{_privatelibs}|%{_publiclibs})$
%endif
%endif
# VM variant being built
%ifarch %{zero_arches}
%global vm_variant zero
%else
%global vm_variant server
%endif
%global etcjavasubdir %{_sysconfdir}/java/java-%{javaver}-%{origin}
%global etcjavasubdir %{_sysconfdir}/java/java-%{javaver}-%{origin}
%define etcjavadir() %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}}
%define etcjavadir() %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}}
@ -550,12 +536,15 @@ alternatives \\
--install %{_bindir}/java $key %{jrebindir -- %{?1}}/java $PRIORITY --family %{family} \\
--install %{_bindir}/java $key %{jrebindir -- %{?1}}/java $PRIORITY --family %{family} \\
--slave %{_jvmdir}/jre jre %{_jvmdir}/%{sdkdir -- %{?1}} \\
--slave %{_jvmdir}/jre jre %{_jvmdir}/%{sdkdir -- %{?1}} \\
--slave %{_bindir}/%{alt_java_name} %{alt_java_name} %{jrebindir -- %{?1}}/%{alt_java_name} \\
--slave %{_bindir}/%{alt_java_name} %{alt_java_name} %{jrebindir -- %{?1}}/%{alt_java_name} \\
--slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\
--slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\
--slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\
--slave %{_bindir}/rmiregistry rmiregistry %{jrebindir -- %{?1}}/rmiregistry \\
--slave %{_bindir}/rmiregistry rmiregistry %{jrebindir -- %{?1}}/rmiregistry \\
--slave %{_mandir}/man1/java.1$ext java.1$ext \\
--slave %{_mandir}/man1/java.1$ext java.1$ext \\
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/%{alt_java_name}.1$ext %{alt_java_name}.1$ext \\
--slave %{_mandir}/man1/%{alt_java_name}.1$ext %{alt_java_name}.1$ext \\
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\
--slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\
--slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\
@ -575,10 +564,6 @@ alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} $key %{_jvmdir}/%{jre
}
}
%define post_headless() %{expand:
%define post_headless() %{expand:
%ifarch %{share_arches}
%{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null
%endif
update-desktop-database %{_datadir}/applications &> /dev/null || :
update-desktop-database %{_datadir}/applications &> /dev/null || :
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
@ -644,7 +629,6 @@ alternatives \\
--slave %{_bindir}/jarsigner jarsigner %{sdkbindir -- %{?1}}/jarsigner \\
--slave %{_bindir}/jarsigner jarsigner %{sdkbindir -- %{?1}}/jarsigner \\
--slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\
--slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\
--slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\
--slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\
--slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\
--slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\
--slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\
--slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\
--slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\
--slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\
--slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\
@ -660,6 +644,7 @@ alternatives \\
--slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\
--slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\
--slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\
--slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\
--slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\
--slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\
--slave %{_bindir}/jwebserver jwebserver %{sdkbindir -- %{?1}}/jwebserver \\
--slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\
--slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\
--slave %{_mandir}/man1/jar.1$ext jar.1$ext \\
--slave %{_mandir}/man1/jar.1$ext jar.1$ext \\
%{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\
@ -671,8 +656,6 @@ alternatives \\
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/javap.1$ext javap.1$ext \\
--slave %{_mandir}/man1/javap.1$ext javap.1$ext \\
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\
--slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\
--slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\
@ -693,6 +676,8 @@ alternatives \\
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\
--slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/jwebserver.1$ext jwebserver.1$ext \\
%{_mandir}/man1/jwebserver-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\
--slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\
--slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\
--slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\
@ -750,6 +735,15 @@ PRIORITY=%{priority}
if [ "%{?1}" == %{debug_suffix} ]; then
if [ "%{?1}" == %{debug_suffix} ]; then
let PRIORITY=PRIORITY-1
let PRIORITY=PRIORITY-1
fi
fi
for X in %{origin} %{javaver} ; do
key=javadocdir_"$X"
alternatives --install %{_javadocdir}/java-"$X" $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $PRIORITY --family %{family_noarch}
%{set_if_needed_alternatives $key %{family_noarch}}
done
key=javadocdir_%{javaver}_%{origin}
alternatives --install %{_javadocdir}/java-%{javaver}-%{origin} $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $PRIORITY --family %{family_noarch}
%{set_if_needed_alternatives $key %{family_noarch}}
key=javadocdir
key=javadocdir
alternatives --install %{_javadocdir}/java $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $PRIORITY --family %{family_noarch}
alternatives --install %{_javadocdir}/java $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $PRIORITY --family %{family_noarch}
@ -763,6 +757,9 @@ if [ "x$debug" == "xtrue" ] ; then
fi
fi
post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
%{save_and_remove_alternatives javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
%{save_and_remove_alternatives javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
%{save_and_remove_alternatives javadocdir_%{origin} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
%{save_and_remove_alternatives javadocdir_%{javaver} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
%{save_and_remove_alternatives javadocdir_%{javaver}_%{origin} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
exit 0
exit 0
}
}
@ -774,6 +771,17 @@ PRIORITY=%{priority}
if [ "%{?1}" == %{debug_suffix} ]; then
if [ "%{?1}" == %{debug_suffix} ]; then
let PRIORITY=PRIORITY-1
let PRIORITY=PRIORITY-1
fi
fi
for X in %{origin} %{javaver} ; do
key=javadoczip_"$X"
alternatives --install %{_javadocdir}/java-"$X".zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $PRIORITY --family %{family_noarch}
%{set_if_needed_alternatives $key %{family_noarch}}
done
key=javadoczip_%{javaver}_%{origin}
alternatives --install %{_javadocdir}/java-%{javaver}-%{origin}.zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $PRIORITY --family %{family_noarch}
%{set_if_needed_alternatives $key %{family_noarch}}
# Weird legacy filename for backwards-compatibility
key=javadoczip
key=javadoczip
alternatives --install %{_javadocdir}/java-zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $PRIORITY --family %{family_noarch}
alternatives --install %{_javadocdir}/java-zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $PRIORITY --family %{family_noarch}
%{set_if_needed_alternatives $key %{family_noarch}}
%{set_if_needed_alternatives $key %{family_noarch}}
@ -786,6 +794,9 @@ exit 0
fi
fi
post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
%{save_and_remove_alternatives javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
%{save_and_remove_alternatives javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
%{save_and_remove_alternatives javadoczip_%{origin} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
%{save_and_remove_alternatives javadoczip_%{javaver} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
%{save_and_remove_alternatives javadoczip_%{javaver}_%{origin} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
exit 0
exit 0
}
}
@ -801,7 +812,7 @@ exit 0
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
%doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/NEWS
%doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/NEWS
%doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/README.md
%doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/README.md
%doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/java-%{fakef eaturever}-openjdk-portable.specfile
%doc %{_defaultdocdir}/%{uniquejavadocdir -- %{?1}}/java-%{featurever}-openjdk-portable.specfile
%dir %{_sysconfdir}/.java/.systemPrefs
%dir %{_sysconfdir}/.java/.systemPrefs
%dir %{_sysconfdir}/.java
%dir %{_sysconfdir}/.java
%dir %{_jvmdir}/%{sdkdir -- %{?1}}
%dir %{_jvmdir}/%{sdkdir -- %{?1}}
@ -810,6 +821,7 @@ exit 0
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/java
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/java
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/%{alt_java_name}
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/%{alt_java_name}
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
@ -846,6 +858,7 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjimage.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjimage.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsound.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsound.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/liblcms.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/liblcms.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/lible.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_agent.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_agent.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_ext.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_ext.so
@ -873,11 +886,15 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/profile.jfc
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/jfr/profile.jfc
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/%{alt_java_name}-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/server /
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{vm_variant} /
%ifarch %{share_arches}
%ifarch %{share_arches}
%attr(444, root, root) %ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/classes.jsa
%attr(444, root, root) %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{vm_variant}/classes.jsa
%ifnarch %{ix86} %{arm32}
%attr(444, root, root) %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{vm_variant}/classes_nocoops.jsa
%endif
%endif
%endif
%dir %{etcjavasubdir}
%dir %{etcjavasubdir}
%dir %{etcjavadir -- %{?1}}
%dir %{etcjavadir -- %{?1}}
@ -902,14 +919,14 @@ exit 0
%{etcjavadir -- %{?1}}/conf/security/policy/README.txt
%{etcjavadir -- %{?1}}/conf/security/policy/README.txt
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.policy
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.policy
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.security
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/java.security
%config(noreplace) %{etcjavadir -- %{?1}}/conf/logging.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/nss.cfg
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/nss.fips.cfg
%config(noreplace) %{etcjavadir -- %{?1}}/conf/security/nss.fips.cfg
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/jmxremote.access
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/jmxremote.access
# This is a config template, thus not config-noreplace
# This is a config template, thus not config-noreplace
%config %{etcjavadir -- %{?1}}/conf/management/jmxremote.password.template
%config %{etcjavadir -- %{?1}}/conf/management/jmxremote.password.template
%config %{etcjavadir -- %{?1}}/conf/sdp/sdp.conf.template
%config %{etcjavadir -- %{?1}}/conf/sdp/sdp.conf.template
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/management.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/management.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/jaxp.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/logging.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/net.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/net.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/sound.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/sound.properties
%{_jvmdir}/%{sdkdir -- %{?1}}/conf
%{_jvmdir}/%{sdkdir -- %{?1}}/conf
@ -917,13 +934,11 @@ exit 0
%if %is_system_jdk
%if %is_system_jdk
%if %{is_release_build -- %{?1}}
%if %{is_release_build -- %{?1}}
%ghost %{_bindir}/java
%ghost %{_bindir}/java
%ghost %{_bindir}/%{alt_java_name}
%ghost %{_jvmdir}/jre
%ghost %{_jvmdir}/jre
%ghost %{_bindir}/%{alt_java_name}
%ghost %{_bindir}/jcmd
%ghost %{_bindir}/keytool
%ghost %{_bindir}/keytool
%ghost %{_bindir}/pack200
%ghost %{_bindir}/rmid
%ghost %{_bindir}/rmiregistry
%ghost %{_bindir}/rmiregistry
%ghost %{_bindir}/unpack200
%ghost %{_jvmdir}/jre-%{origin}
%ghost %{_jvmdir}/jre-%{origin}
%ghost %{_jvmdir}/jre-%{javaver}
%ghost %{_jvmdir}/jre-%{javaver}
%ghost %{_jvmdir}/jre-%{javaver}-%{origin}
%ghost %{_jvmdir}/jre-%{javaver}-%{origin}
@ -943,7 +958,6 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeprscan
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeprscan
@ -967,6 +981,7 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jwebserver
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
%{_jvmdir}/%{sdkdir -- %{?1}}/include
%{_jvmdir}/%{sdkdir -- %{?1}}/include
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
@ -980,23 +995,23 @@ exit 0
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jdeprscan-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jfr-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jlink-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jmod-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jpackage-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jpackage-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jshell-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jwebserver-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jdeprscan-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jlink-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jmod-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jshell-%{uniquesuffix -- %{?1}}.1*
%{_mandir}/man1/jfr-%{uniquesuffix -- %{?1}}.1*
%if %{with_systemtap}
%if %{with_systemtap}
%dir %{tapsetroot}
%dir %{tapsetroot}
@ -1008,7 +1023,6 @@ exit 0
%if %{is_release_build -- %{?1}}
%if %{is_release_build -- %{?1}}
%ghost %{_bindir}/javac
%ghost %{_bindir}/javac
%ghost %{_jvmdir}/java
%ghost %{_jvmdir}/java
%ghost %{_jvmdir}/%{alt_java_name}
%ghost %{_bindir}/jlink
%ghost %{_bindir}/jlink
%ghost %{_bindir}/jmod
%ghost %{_bindir}/jmod
%ghost %{_bindir}/jhsdb
%ghost %{_bindir}/jhsdb
@ -1016,20 +1030,22 @@ exit 0
%ghost %{_bindir}/jarsigner
%ghost %{_bindir}/jarsigner
%ghost %{_bindir}/javadoc
%ghost %{_bindir}/javadoc
%ghost %{_bindir}/javap
%ghost %{_bindir}/javap
%ghost %{_bindir}/jcmd
%ghost %{_bindir}/jconsole
%ghost %{_bindir}/jconsole
%ghost %{_bindir}/jdb
%ghost %{_bindir}/jdb
%ghost %{_bindir}/jdeps
%ghost %{_bindir}/jdeps
%ghost %{_bindir}/jdeprscan
%ghost %{_bindir}/jdeprscan
%ghost %{_bindir}/jfr
%ghost %{_bindir}/jimage
%ghost %{_bindir}/jimage
%ghost %{_bindir}/jinfo
%ghost %{_bindir}/jinfo
%ghost %{_bindir}/jmap
%ghost %{_bindir}/jmap
%ghost %{_bindir}/jps
%ghost %{_bindir}/jps
%ghost %{_bindir}/jpackage
%ghost %{_bindir}/jrunscript
%ghost %{_bindir}/jrunscript
%ghost %{_bindir}/jshell
%ghost %{_bindir}/jshell
%ghost %{_bindir}/jstack
%ghost %{_bindir}/jstack
%ghost %{_bindir}/jstat
%ghost %{_bindir}/jstat
%ghost %{_bindir}/jstatd
%ghost %{_bindir}/jstatd
%ghost %{_bindir}/jwebserver
%ghost %{_bindir}/serialver
%ghost %{_bindir}/serialver
%ghost %{_jvmdir}/java-%{origin}
%ghost %{_jvmdir}/java-%{origin}
%ghost %{_jvmdir}/java-%{javaver}
%ghost %{_jvmdir}/java-%{javaver}
@ -1045,7 +1061,6 @@ exit 0
%define files_demo() %{expand:
%define files_demo() %{expand:
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
%{_jvmdir}/%{sdkdir -- %{?1}}/demo
%{_jvmdir}/%{sdkdir -- %{?1}}/demo
%{_jvmdir}/%{sdkdir -- %{?1}}/sample
}
}
%define files_src() %{expand:
%define files_src() %{expand:
@ -1066,6 +1081,9 @@ exit 0
%if %is_system_jdk
%if %is_system_jdk
%if %{is_release_build -- %{?1}}
%if %{is_release_build -- %{?1}}
%ghost %{_javadocdir}/java
%ghost %{_javadocdir}/java
%ghost %{_javadocdir}/java-%{origin}
%ghost %{_javadocdir}/java-%{javaver}
%ghost %{_javadocdir}/java-%{javaver}-%{origin}
%endif
%endif
%endif
%endif
}
}
@ -1076,6 +1094,9 @@ exit 0
%if %is_system_jdk
%if %is_system_jdk
%if %{is_release_build -- %{?1}}
%if %{is_release_build -- %{?1}}
%ghost %{_javadocdir}/java-zip
%ghost %{_javadocdir}/java-zip
%ghost %{_javadocdir}/java-%{origin}.zip
%ghost %{_javadocdir}/java-%{javaver}.zip
%ghost %{_javadocdir}/java-%{javaver}-%{origin}.zip
%endif
%endif
%endif
%endif
}
}
@ -1119,8 +1140,8 @@ Requires: ca-certificates
# Require javapackages-filesystem for ownership of /usr/lib/jvm/ and macros
# Require javapackages-filesystem for ownership of /usr/lib/jvm/ and macros
Requires: javapackages-filesystem
Requires: javapackages-filesystem
# Require zone-info data provided by tzdata-java sub-package
# Require zone-info data provided by tzdata-java sub-package
# 2022g required as of JDK-8297804
# 2023c required as of JDK-8305113
Requires: tzdata-java >= 2022g
Requires: tzdata-java >= 2023c
# for support of kernel stream control
# for support of kernel stream control
# libsctp.so.1 is being `dlopen`ed on demand
# libsctp.so.1 is being `dlopen`ed on demand
Requires: lksctp-tools%{?_isa}
Requires: lksctp-tools%{?_isa}
@ -1241,10 +1262,16 @@ Provides: java-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
# Prevent brp-java-repack-jars from being run
# Prevent brp-java-repack-jars from being run
%global __jar_repack 0
%global __jar_repack 0
# Define the OS the portable JDK is built on
%global pkgos rhel7
# Define the root name of the portable packages
%global pkgnameroot java-%{featurever}-%{origin}-portable%{?pkgos:-%{pkgos}}
Name: java-%{javaver}-%{origin}
Name: java-%{javaver}-%{origin}
Version: %{newjavaver}.%{buildver}
Version: %{newjavaver}.%{buildver}
Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
# Equivalent for the portable build
%global prelease %{?eaprefix}%{portablerelease}%{?extraver}
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
# also included the epoch in their virtual provides. This created a
@ -1279,9 +1306,8 @@ Group: Development/Languages
License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib and ISC and FTL and RSA
License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib and ISC and FTL and RSA
URL: http://openjdk.java.net/
URL: http://openjdk.java.net/
# The source tarball, generated using generate_source_tarball.sh
# The source tarball, generated using generate_source_tarball.sh
Source0: openjdk-jdk%{featurever}u-%{vcstag }.tar.xz
Source0: https://openjdk-sources.osci.io/openjdk%{featurever}/open%{vcstag}%{ea_designator_zip }.tar.xz
# Use 'icedtea_sync.sh' to update the following
# Use 'icedtea_sync.sh' to update the following
# They are based on code contained in the IcedTea project (6.x).
# They are based on code contained in the IcedTea project (6.x).
@ -1291,8 +1317,8 @@ Source8: tapsets-icedtea-%{icedteaver}.tar.xz
# Desktop files. Adapted from IcedTea
# Desktop files. Adapted from IcedTea
Source9: jconsole.desktop.in
Source9: jconsole.desktop.in
# nss configuration file
# Source code for alt-java
Source11: nss.cfg.in
Source11: alt-java.c
# Removed libraries that we link instead
# Removed libraries that we link instead
Source12: remove-intree-libraries.sh
Source12: remove-intree-libraries.sh
@ -1314,17 +1340,17 @@ Source18: TestTranslations.java
# Include portable spec and instructions on how to rebuild
# Include portable spec and instructions on how to rebuild
Source19: README.md
Source19: README.md
Source20: java-%{fakef eaturever}-openjdk-portable.specfile
Source20: java-%{featurever}-openjdk-portable.specfile
# Setup variables to reference correct sources
# Setup variables to reference correct sources
%global releasezip %{_jvmdir}/%{name}-%{version}-%{portable release}.portable.unstripped.jdk.%{_arch}.tar.xz
%global releasezip %{_jvmdir}/%{name}-%{version}-%{prelease}.portable.unstripped.jdk.%{_arch}.tar.xz
%global staticlibzip %{_jvmdir}/%{name}-%{version}-%{portable release}.portable.static-libs.%{_arch}.tar.xz
%global staticlibzip %{_jvmdir}/%{name}-%{version}-%{prelease}.portable.static-libs.%{_arch}.tar.xz
%global docszip %{_jvmdir}/%{name}-%{version}-%{portable release}.portable.docs.%{_arch}.tar.xz
%global docszip %{_jvmdir}/%{name}-%{version}-%{prelease}.portable.docs.%{_arch}.tar.xz
%global misczip %{_jvmdir}/%{name}-%{version}-%{portable release}.portable.misc.%{_arch}.tar.xz
%global misczip %{_jvmdir}/%{name}-%{version}-%{prelease}.portable.misc.%{_arch}.tar.xz
%global slowdebugzip %{_jvmdir}/%{name}-%{version}-%{portable release}.portable.slowdebug.jdk.%{_arch}.tar.xz
%global slowdebugzip %{_jvmdir}/%{name}-%{version}-%{prelease}.portable.slowdebug.jdk.%{_arch}.tar.xz
%global slowdebugstaticlibzip %{_jvmdir}/%{name}-%{version}-%{portable release}.portable.slowdebug.static-libs.%{_arch}.tar.xz
%global slowdebugstaticlibzip %{_jvmdir}/%{name}-%{version}-%{prelease}.portable.slowdebug.static-libs.%{_arch}.tar.xz
%global fastdebugzip %{_jvmdir}/%{name}-%{version}-%{portable release}.portable.fastdebug.jdk.%{_arch}.tar.xz
%global fastdebugzip %{_jvmdir}/%{name}-%{version}-%{prelease}.portable.fastdebug.jdk.%{_arch}.tar.xz
%global fastdebugstaticlibzip %{_jvmdir}/%{name}-%{version}-%{portable release}.portable.fastdebug.static-libs.%{_arch}.tar.xz
%global fastdebugstaticlibzip %{_jvmdir}/%{name}-%{version}-%{prelease}.portable.fastdebug.static-libs.%{_arch}.tar.xz
############################################
############################################
#
#
@ -1332,23 +1358,9 @@ Source20: java-%{fakefeaturever}-openjdk-portable.specfile
#
#
############################################
############################################
# NSS via SunPKCS11 Provider (disabled comment
# due to memory leak).
Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch
# RH1750419: enable build of speculative store bypass hardened alt-java (CVE-2018-3639)
Patch600: rh1750419-redhat_alt_java.patch
# Ignore AWTError when assistive technologies are loaded
Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch
# Restrict access to java-atk-wrapper classes
Patch2: rh1648644-java_access_bridge_privileged_security.patch
Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch
# Depend on pcsc-lite-libs instead of pcsc-lite-devel as this is only in optional repo
Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch
# Crypto policy and FIPS support patches
# Crypto policy and FIPS support patches
# Patch is generated from the fips-17 u tree at https://github.com/rh-openjdk/jdk/tree/fips-17 u
# Patch is generated from the fips-21u tree at https://github.com/rh-openjdk/jdk/tree/fips-21u
# as follows: git diff %%{vcstag} src make test > fips-17 u-$(git show -s --format=%h HEAD).patch
# as follows: git diff %%{vcstag} src make test > fips-21u-$(git show -s --format=%h HEAD).patch
# Diff is limited to src and make subdirectories to exclude .github changes
# Diff is limited to src and make subdirectories to exclude .github changes
# Fixes currently included:
# Fixes currently included:
# PR3183, RH1340845: Follow system wide crypto policy
# PR3183, RH1340845: Follow system wide crypto policy
@ -1372,7 +1384,7 @@ Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-d
# RH2104724: Avoid import/export of DH private keys
# RH2104724: Avoid import/export of DH private keys
# RH2092507: P11Key.getEncoded does not work for DH keys in FIPS mode
# RH2092507: P11Key.getEncoded does not work for DH keys in FIPS mode
# Build the systemconf library on all platforms
# Build the systemconf library on all platforms
# RH2048582: Support PKCS#12 keystores
# RH2048582: Support PKCS#12 keystores [now part of JDK-8301553 upstream]
# RH2020290: Support TLS 1.3 in FIPS mode
# RH2020290: Support TLS 1.3 in FIPS mode
# Add nss.fips.cfg support to OpenJDK tree
# Add nss.fips.cfg support to OpenJDK tree
# RH2117972: Extend the support for NSS DBs (PKCS11) in FIPS mode
# RH2117972: Extend the support for NSS DBs (PKCS11) in FIPS mode
@ -1381,8 +1393,8 @@ Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-d
# RH2134669: Add missing attributes when registering services in FIPS mode.
# RH2134669: Add missing attributes when registering services in FIPS mode.
# test/jdk/sun/security/pkcs11/fips/VerifyMissingAttributes.java: fixed jtreg main class
# test/jdk/sun/security/pkcs11/fips/VerifyMissingAttributes.java: fixed jtreg main class
# RH1940064: Enable XML Signature provider in FIPS mode
# RH1940064: Enable XML Signature provider in FIPS mode
# RH2173781: Avoid calling C_GetInfo() too early, before cryptoki is initialized
# RH2173781: Avoid calling C_GetInfo() too early, before cryptoki is initialized [now part of JDK-8301553 upstream]
Patch1001: fips-17 u-%{fipsver}.patch
Patch1001: fips-%{featurever} u-%{fipsver}.patch
#############################################
#############################################
#
#
@ -1390,15 +1402,27 @@ Patch1001: fips-17u-%{fipsver}.patch
#
#
#############################################
#############################################
# JDK-8009550, RH910107: Depend on pcsc-lite-libs instead of pcsc-lite-devel as this is only in optional repo
# PR: https://github.com/openjdk/jdk/pull/15409
Patch6: jdk8009550-rh910107-fail_to_load_pcsc_library.patch
# Currently empty
#############################################
#
# OpenJDK patches which missed last update
#
#############################################
# Currently empty
#############################################
#############################################
#
#
# OpenJDK patches targetted for 17.0.8
# Portable build specific patches
#
#
#############################################
#############################################
# JDK-8274864: Remove Amman/Cairo hacks in ZoneInfoFile
Patch2001: jdk8274864-remove_amman_cairo_hacks.patch
# Currently empty
# JDK-8305113: (tz) Update Timezone Data to 2023c
Patch2002: jdk8305113-tzdata2023c.patch
BuildRequires: autoconf
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: automake
@ -1419,7 +1443,7 @@ BuildRequires: libXrandr-devel
BuildRequires: libXrender-devel
BuildRequires: libXrender-devel
BuildRequires: libXt-devel
BuildRequires: libXt-devel
BuildRequires: libXtst-devel
BuildRequires: libXtst-devel
# Requirement for setting up nss.cfg and nss. fips.cfg
# Requirement for setting up nss.fips.cfg
BuildRequires: nss-devel
BuildRequires: nss-devel
# Requirement for system security property test
# Requirement for system security property test
BuildRequires: crypto-policies
BuildRequires: crypto-policies
@ -1428,19 +1452,19 @@ BuildRequires: xorg-x11-proto-devel
BuildRequires: zip
BuildRequires: zip
BuildRequires: javapackages-filesystem
BuildRequires: javapackages-filesystem
%if %{include_normal_build}
%if %{include_normal_build}
BuildRequires: java-%{fakefeaturever}-openjdk-portable-unstripped = %{epoch}:%{version}-%{portable release}.%{portablesuffix}
BuildRequires: %{pkgnameroot}-unstripped = %{epoch}:%{version}-%{p release}.%{portablesuffix}
BuildRequires: java-%{fakefeaturever}-openjdk-portable-static-libs = %{epoch}:%{version}-%{portable release}.%{portablesuffix}
BuildRequires: %{pkgnameroot}-static-libs = %{epoch}:%{version}-%{p release}.%{portablesuffix}
%endif
%endif
%if %{include_fastdebug_build}
%if %{include_fastdebug_build}
BuildRequires: java-%{fakefeaturever}-openjdk-portable-devel-fastdebug = %{epoch}:%{version}-%{portable release}.%{portablesuffix}
BuildRequires: %{pkgnameroot}-devel-fastdebug = %{epoch}:%{version}-%{p release}.%{portablesuffix}
BuildRequires: java-%{fakefeaturever}-openjdk-portable-static-libs-fastdebug = %{epoch}:%{version}-%{portable release}.%{portablesuffix}
BuildRequires: %{pkgnameroot}-static-libs-fastdebug = %{epoch}:%{version}-%{p release}.%{portablesuffix}
%endif
%endif
%if %{include_debug_build}
%if %{include_debug_build}
BuildRequires: java-%{fakefeaturever}-openjdk-portable-devel-slowdebug = %{epoch}:%{version}-%{portable release}.%{portablesuffix}
BuildRequires: %{pkgnameroot}-devel-slowdebug = %{epoch}:%{version}-%{p release}.%{portablesuffix}
BuildRequires: java-%{fakefeaturever}-openjdk-portable-static-libs-slowdebug = %{epoch}:%{version}-%{portable release}.%{portablesuffix}
BuildRequires: %{pkgnameroot}-static-libs-slowdebug = %{epoch}:%{version}-%{p release}.%{portablesuffix}
%endif
%endif
BuildRequires: java-%{fakefeaturever}-openjdk-portable-docs = %{epoch}:%{version}-%{portable release}.%{portablesuffix}
BuildRequires: %{pkgnameroot}-docs = %{epoch}:%{version}-%{p release}.%{portablesuffix}
BuildRequires: java-%{fakefeaturever}-openjdk-portable-misc = %{epoch}:%{version}-%{portable release}.%{portablesuffix}
BuildRequires: %{pkgnameroot}-misc = %{epoch}:%{version}-%{p release}.%{portablesuffix}
# Zero-assembler build requirement
# Zero-assembler build requirement
%ifarch %{zero_arches}
%ifarch %{zero_arches}
BuildRequires: libffi-devel
BuildRequires: libffi-devel
@ -1463,18 +1487,18 @@ BuildRequires: lcms2-devel
BuildRequires: libjpeg-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libpng-devel
%else
%else
# Version in src/java.desktop/share/native/libfreetype/include/freetype/freetype.h
# Version in src/java.desktop/share/legal/freetype.md
Provides: bundled(freetype) = 2.12.1
Provides: bundled(freetype) = 2.13.0
# Version in src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
# Version in src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
Provides: bundled(giflib) = 5.2.1
Provides: bundled(giflib) = 5.2.1
# Version in src/java.desktop/share/native/libharfbuzz/hb-version.h
# Version in src/java.desktop/share/native/libharfbuzz/hb-version.h
Provides: bundled(harfbuzz) = 4.4.1
Provides: bundled(harfbuzz) = 7.2.0
# Version in src/java.desktop/share/native/liblcms/lcms2.h
# Version in src/java.desktop/share/native/liblcms/lcms2.h
Provides: bundled(lcms2) = 2.12 .0
Provides: bundled(lcms2) = 2.15 .0
# Version in src/java.desktop/share/native/libjavajpeg/jpeglib.h
# Version in src/java.desktop/share/native/libjavajpeg/jpeglib.h
Provides: bundled(libjpeg) = 6b
Provides: bundled(libjpeg) = 6b
# Version in src/java.desktop/share/native/libsplashscreen/libpng/png.h
# Version in src/java.desktop/share/native/libsplashscreen/libpng/png.h
Provides: bundled(libpng) = 1.6.37
Provides: bundled(libpng) = 1.6.39
%endif
%endif
# this is always built, also during debug-only build
# this is always built, also during debug-only build
@ -1817,6 +1841,7 @@ if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 -a %{includ
echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no go."
echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no go."
exit 14
exit 14
fi
fi
%setup -q -c -n %{uniquesuffix ""} -T -a 0
%setup -q -c -n %{uniquesuffix ""} -T -a 0
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084
prioritylength=`expr length %{priority}`
prioritylength=`expr length %{priority}`
@ -1834,20 +1859,12 @@ sh %{SOURCE12} %{top_level_dir_name}
# Patch the JDK
# Patch the JDK
pushd %{top_level_dir_name}
pushd %{top_level_dir_name}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch6 -p1
# Add crypto policy and FIPS support
# Add crypto policy and FIPS support
%patch1001 -p1
%patch1001 -p1
# nss.cfg PKCS11 support; must come last as it also alters java.security
# Patches in need of upstreaming
%patch1000 -p1
%patch6 -p1
# tzdata update
%patch2001 -p1
%patch2002 -p1
popd # openjdk
popd # openjdk
%patch600
# The OpenJDK version file includes the current
# The OpenJDK version file includes the current
# upstream version information. For some reason,
# upstream version information. For some reason,
@ -1869,35 +1886,6 @@ if [ "x${UPSTREAM_EA_DESIGNATOR}" != "x%{ea_designator}" ] ; then
exit 17
exit 17
fi
fi
# Extract systemtap tapsets
%if %{with_systemtap}
tar --strip-components=1 -x -I xz -f %{SOURCE8}
%if %{include_debug_build}
cp -r tapset tapset%{debug_suffix}
%endif
%if %{include_fastdebug_build}
cp -r tapset tapset%{fastdebug_suffix}
%endif
for suffix in %{build_loop} ; do
for file in "tapset"$suffix/*.in; do
OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"`
sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/server/libjvm.so:g" $file > $file.1
sed -e "s:@JAVA_SPEC_VER@:%{javaver}:g" $file.1 > $file.2
# TODO find out which architectures other than i686 have a client vm
%ifarch %{ix86}
sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" $file.2 > $OUTPUT_FILE
%else
sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.2 > $OUTPUT_FILE
%endif
sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE
sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE
sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE
done
done
# systemtap tapsets ends
%endif
# Prepare desktop files
# Prepare desktop files
# The _X_ syntax indicates variables that are replaced by make upstream
# The _X_ syntax indicates variables that are replaced by make upstream
# The @X@ syntax indicates variables that are replaced by configure upstream
# The @X@ syntax indicates variables that are replaced by configure upstream
@ -1915,9 +1903,6 @@ for file in %{SOURCE9}; do
done
done
done
done
# Setup nss.cfg
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
%build
%build
function customisejdk() {
function customisejdk() {
@ -1934,6 +1919,16 @@ function customisejdk() {
fi
fi
}
}
mkdir -p $(dirname %{installoutputdir})
docdir=%{installoutputdir -- "-docs"}
tar -xJf %{docszip}
mv java-%{featurever}-openjdk*.docs.* ${docdir}
miscdir=%{installoutputdir -- "-misc"}
tar -xJf %{misczip}
mv java-%{featurever}-openjdk*.misc.* ${miscdir}
for suffix in %{build_loop} ; do
for suffix in %{build_loop} ; do
if [ "x$suffix" = "x" ] ; then
if [ "x$suffix" = "x" ] ; then
@ -1952,17 +1947,32 @@ for suffix in %{build_loop} ; do
# TODO: should verify checksums when using packages from buildroot
# TODO: should verify checksums when using packages from buildroot
tar -xJf ${jdkzip}
tar -xJf ${jdkzip}
tar -xJf ${staticlibzip}
tar -xJf ${staticlibzip}
mkdir -p $(dirname ${installdir})
mv java-%{featurever}-openjdk* ${installdir}
mv java-%{fakefeaturever}-openjdk* ${installdir}
# Fix build paths in ELF files so it looks like we built them
# Fix build paths in ELF files so it looks like we built them
portablenvr="%{name}-%{VERSION}-%{portable release}.%{portablesuffix}.%{_arch}"
portablenvr="%{name}-%{VERSION}-%{prelease}.%{portablesuffix}.%{_arch}"
for file in $(find ${installdir} -type f) ; do
for file in $(find ${installdir} -type f) ; do
if file ${file} | grep -q 'ELF'; then
if file ${file} | grep -q 'ELF'; then
%{debugedit} -b %{portablebuilddir}/${portablenvr} -d $(pwd) -n ${file}
%{debugedit} -b %{portablebuilddir}/${portablenvr} -d $(pwd) -n ${file}
fi
fi
done
done
# Set tapset variables to match this build
%if %{with_systemtap}
for file in ${miscdir}/tapset${suffix}/*.in; do
OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"`
sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/%{vm_variant}/libjvm.so:g" $file > ${OUTPUT_FILE}
# TODO find out which architectures other than i686 have a client vm
%ifarch %{ix86}
sed -i -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" ${OUTPUT_FILE}
%else
sed -i -e "/@ABS_CLIENT_LIBJVM_SO@/d" ${OUTPUT_FILE}
%endif
sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE
sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE
done
%endif
# Final setup on the main image
# Final setup on the main image
customisejdk ${installdir}
customisejdk ${installdir}
@ -1972,14 +1982,6 @@ for suffix in %{build_loop} ; do
# build cycles
# build cycles
done # end of release / debug cycle loop
done # end of release / debug cycle loop
docdir=%{installoutputdir -- "-docs"}
tar -xJf %{docszip}
mv java-%{fakefeaturever}-openjdk*.docs.* ${docdir}
miscdir=%{installoutputdir -- "-misc"}
tar -xJf %{misczip}
mv java-%{fakefeaturever}-openjdk*.misc.* ${miscdir}
%check
%check
# We test debug first as it will give better diagnostics on a crash
# We test debug first as it will give better diagnostics on a crash
@ -2015,16 +2017,19 @@ $JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=tru
if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi
if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi
# Check alt-java launcher has SSB mitigation on supported architectures
# Check alt-java launcher has SSB mitigation on supported architectures
# set_speculation function exists in both cases, so check for prctl call
alt_java_binary=$RPM_BUILD_ROOT%{jrebindir -- $suffix}/%{alt_java_name}
%ifarch %{ssbd_arches}
%ifarch %{ssbd_arches}
nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation
nm ${alt_java_binary} | grep prctl
%else
%else
if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi
if ! nm ${alt_java_binary} | grep prctl ; then true ; else false; fi
%endif
%endif
%if ! 0%{?flatpak}
%if ! 0%{?flatpak}
# Check translations are available for new timezones (during flatpak builds, the
# Check translations are available for new timezones (during flatpak builds, the
# tzdb.dat used by this test is not where the test expects it, so this is
# tzdb.dat used by this test is not where the test expects it, so this is
# disabled for flatpak builds)
# disabled for flatpak builds)
# Disable test until we are on the latest JDK
$JAVA_HOME/bin/javac -d . %{SOURCE18}
$JAVA_HOME/bin/javac -d . %{SOURCE18}
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE
$JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|sed "s|\.java||") CLDR
$JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|sed "s|\.java||") CLDR
@ -2033,8 +2038,8 @@ $JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|
%if %{include_staticlibs}
%if %{include_staticlibs}
# Check debug symbols in static libraries (smoke test)
# Check debug symbols in static libraries (smoke test)
export STATIC_LIBS_HOME=${JAVA_HOME}/lib/static/linux-%{archinstall}/glibc
export STATIC_LIBS_HOME=${JAVA_HOME}/lib/static/linux-%{archinstall}/glibc
readelf --debug-dump $STATIC_LIBS_HOME/libfdlibm.a | grep w_remainder .c
readelf --debug-dump $STATIC_LIBS_HOME/libnet.a | grep Inet4AddressImpl .c
readelf --debug-dump $STATIC_LIBS_HOME/libfdlibm.a | grep e_remainder .c
readelf --debug-dump $STATIC_LIBS_HOME/libnet.a | grep Inet6AddressImpl .c
%endif
%endif
so_suffix="so"
so_suffix="so"
@ -2128,7 +2133,7 @@ for suffix in %{build_loop} ; do
jdk_image=$(pwd)/%{installoutputdir -- ${suffix}}
jdk_image=$(pwd)/%{installoutputdir -- ${suffix}}
# Should match same definitions in build section
# Should match same definitions in build section
docdir=$(pwd)/%{installoutputdir -- "-docs"}
docdir=$(pwd)/%{installoutputdir -- "-docs"}
miscdir=%{installoutputdir -- "-misc"}
miscdir=$(pwd)/ %{installoutputdir -- "-misc"}
# Install release notes and rebuild instructions
# Install release notes and rebuild instructions
commondocdir=${RPM_BUILD_ROOT}%{_defaultdocdir}/%{uniquejavadocdir -- $suffix}
commondocdir=${RPM_BUILD_ROOT}%{_defaultdocdir}/%{uniquejavadocdir -- $suffix}
@ -2139,14 +2144,13 @@ cp -a %{SOURCE19} %{SOURCE20} ${commondocdir}
# Install the jdk
# Install the jdk
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}
cp -a ${jdk_image} $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
cp -a ${jdk_image} $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
# Install %{alt_java_name} binary
pushd ${jdk_image }
install -D -p -m 755 ${miscdir}/%{alt_java_name} $RPM_BUILD_ROOT%{jrebindir -- $suffix }
%if %{with_systemtap}
%if %{with_systemtap}
# Install systemtap support files
# Install systemtap support files
install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
# note, that uniquesuffix is in BUILD dir in this case
cp -a ${miscdir}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
tapsetFiles=`ls *.stp`
tapsetFiles=`ls *.stp`
popd
popd
@ -2171,6 +2175,7 @@ pushd ${jdk_image}
# Install man pages
# Install man pages
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
pushd ${jdk_image}
for manpage in man/man1/*
for manpage in man/man1/*
do
do
# Convert man pages to UTF8 encoding
# Convert man pages to UTF8 encoding
@ -2181,7 +2186,6 @@ pushd ${jdk_image}
done
done
# Remove man pages from jdk image
# Remove man pages from jdk image
rm -rf $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/man
rm -rf $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/man
popd
popd
if ! echo $suffix | grep -q "debug" ; then
if ! echo $suffix | grep -q "debug" ; then
@ -2213,9 +2217,6 @@ done
# See https://bugzilla.redhat.com/show_bug.cgi?id=741821
# See https://bugzilla.redhat.com/show_bug.cgi?id=741821
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
# copy samples next to demos; samples are mostly js files
cp -r ${miscdir}/sample $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/
# moving config files to /etc
# moving config files to /etc
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}/lib
@ -2481,6 +2482,117 @@ cjc.mainProgram(args)
%endif
%endif
%changelog
%changelog
* Mon Oct 30 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.1.0.12-2
- Switch to using portable binaries built on RHEL 7
- Sync the copy of the portable specfile with the RHEL 7 version
- Related: RHEL-12997
* Fri Oct 27 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.1.0.12-1
- Update to jdk-21.0.1.0+12 (GA)
- Update release notes to 21.0.1.0+12
- Sync the copy of the portable specfile with the latest update
- Update openjdk_news script to specify subdirectory last
- Add missing discover_trees script required by openjdk_news
- Synchronise bundled versions with 21u sources (FreeType, LCMS, HarfBuzz, libpng)
- Sync generate_tarball.sh with 11u & 17u version
- Update bug URL for RHEL to point to the Red Hat customer portal
- Fix upstream release URL for OpenJDK source
- Following JDK-8005165, class data sharing can be enabled on all JIT architectures
- Use tapsets from the misc tarball
- Introduce 'prelease' for the portable release versioning, to handle EA builds
- Make sure root installation directory is created first
- Use in-place substitution for all but the first of the tapset changes
- Synchronise runtime and buildtime tzdata requirements
- Remove ghosts for binaries not in java-21-openjdk (pack200, rmid, unpack200)
- Add missing jfr, jpackage and jwebserver alternative ghosts
- Move jcmd to the headless package
- Revert alt-java binary location to being within the JDK tree
- Resolves: RHEL-12997
- Resolves: RHEL-14954
- Resolves: RHEL-14962
- Resolves: RHEL-14958
- Related: RHEL-14946
- Resolves: RHEL-14959
- Resolves: RHEL-14948
* Fri Oct 27 2023 Jiri Vanek <jvanek@redhat.com> - 1:21.0.1.0.12-1
- Exclude classes_nocoops.jsa on i686 and arm32
- Related: RHEL-14946
* Fri Oct 27 2023 Severin Gehwolf <sgehwolf@redhat.com> - 1:21.0.1.0.12-1
- Fix packaging of CDS archives
- Resolves: RHEL-14946
* Thu Aug 24 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.0.0.35-2
- Update documentation (README.md)
- Replace alt-java patch with a binary separate from the JDK
- Drop stale patches that are of little use any more:
- * nss.cfg has been disabled since early PKCS11 work and long superseded by FIPS work
- * No accessibility subpackage to warrant RH1648242 & RH1648644 patches any more
- * No use of system libjpeg turbo to warrant RH649512 patch any more
- Replace RH1684077 pcsc-lite-libs patch with better JDK-8009550 fix being upstreamed
- Adapt alt-java test to new binary where there is always a set_speculation function
- Related: RHEL-12997
* Mon Aug 21 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.0.0.35-1
- Update to jdk-21.0.0+35
- Update system crypto policy & FIPS patch from new fips-21u tree
- Update generate_tarball.sh to sync with upstream vanilla script inc. no more ECC removal
- Drop fakefeaturever now it is no longer needed
- Change top_level_dir_name to use the VCS tag, matching new upstream release style tarball
- Use upstream release URL for OpenJDK source
- Re-enable tzdata tests now we are on the latest JDK and things are back in sync
- Install jaxp.properties introduced by JDK-8303530
- Install lible.so introduced by JDK-8306983
- Related: RHEL-12997
* Mon Aug 21 2023 Petra Alice Mikova <pmikova@redhat.com> - 1:21.0.0.0.35-1
- Replace smoke test files used in the staticlibs test, as fdlibm was removed by JDK-8303798
- Related: RHEL-12997
* Wed Aug 16 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:20.0.0.0.36-1
- Update to jdk-20.0.2+9
- Update release notes to 20.0.2+9
- Update system crypto policy & FIPS patch from new fips-20u tree
- Update generate_tarball.sh ICEDTEA_VERSION
- Update CLDR reference data following update to 42 (Rocky Mountain-Normalzeit => Rocky-Mountain-Normalzeit)
- Related: RHEL-12997
* Wed Aug 16 2023 Jiri Vanek <jvanek@redhat.com> - 1:20.0.0.0.36-1
- Dropped JDK-8295447, JDK-8296239 & JDK-8299439 patches now upstream
- Adapted rh1750419-redhat_alt_java.patch
- Related: RHEL-12997
* Tue Aug 15 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:19.0.1.0.10-1
- Update to jdk-19.0.2 release
- Update release notes to 19.0.2
- Rebase FIPS patches from fips-19u branch
- Remove references to sample directory removed by JDK-8284999
- Add local patch JDK-8295447 (javac NPE) which was accepted into 19u upstream but not in the GA tag
- Add local patches for JDK-8296239 & JDK-8299439 (Croatia Euro update) which are present in 8u, 11u & 17u releases
- Related: RHEL-12997
* Thu Aug 10 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:18.0.2.0.9-1
- Update to jdk-18.0.2 release
- Support JVM variant zero following JDK-8273494 no longer installing Zero's libjvm.so in the server directory
- Rebase FIPS patches from fips-18u branch
- Rebase RH1648249 nss.cfg patch so it applies after the FIPS patch
- Drop now unused fresh_libjvm, build_hotspot_first, bootjdk and buildjdkver variables, as we don't build a JDK here
- Drop tzdata patches added for 17.0.7 which will eventually appear in the upstream tarball when we reach OpenJDK 21
- Disable tzdata tests until we are on the latest JDK and things are back in sync
- Use empty nss.fips.cfg until it is again available via the FIPS patch
- Related: RHEL-12997
* Thu Aug 10 2023 Petra Alice Mikova <pmikova@redhat.com> - 1:18.0.2.0.9-1
- Update to ea version of jdk18
- Add new slave jwebserver and corresponding manpage
- Adjust rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch
- Related: RHEL-12997
* Thu Aug 10 2023 FeRD (Frank Dana) <ferdnyc@gmail.com> - 1:18.0.2.0.9-1
- Add javaver- and origin-specific javadoc and javadoczip alternatives.
- Related: RHEL-12997
* Tue Aug 08 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.7.0.7-4
* Tue Aug 08 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.7.0.7-4
- Add files missed by centpkg import.
- Add files missed by centpkg import.
- Related: rhbz#2192748
- Related: rhbz#2192748