Replace build section with extraction of existing builds from portables

Resolves: RHEL-36129
This commit is contained in:
Andrew Hughes 2023-02-15 16:06:01 +00:00
parent 90aea71a09
commit 5fc3c3a202
5 changed files with 282 additions and 2488 deletions

30
.gitignore vendored
View File

@ -23,3 +23,33 @@
/openjdk-jdk17u-jdk-17.0.6+1.tar.xz
/openjdk-jdk17u-jdk-17.0.6+9.tar.xz
/openjdk-jdk17u-jdk-17.0.6+10.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.docs.el.aarch64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.docs.el.ppc64le.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.docs.el.s390x.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.docs.el.x86_64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.jdk.el.aarch64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.jdk.el.ppc64le.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.jdk.el.x86_64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.static-libs.el.aarch64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.static-libs.el.ppc64le.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.static-libs.el.x86_64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.misc.el.aarch64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.misc.el.ppc64le.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.misc.el.s390x.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.misc.el.x86_64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.aarch64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.ppc64le.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.s390x.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.x86_64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.aarch64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.ppc64le.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.s390x.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.x86_64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.aarch64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.ppc64le.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.s390x.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.x86_64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.aarch64.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.ppc64le.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.s390x.tar.xz
/java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.x86_64.tar.xz

2233
NEWS

File diff suppressed because it is too large Load Diff

57
get_sources.sh Executable file
View File

@ -0,0 +1,57 @@
#!/bin/sh
ID=${1}
FEATUREVER=17
if [ "x${ID}" = "x" ] ; then
echo "$0 <ID>";
exit 1;
fi
if [ "x${TMPDIR}" = "x" ] ; then
TMPDIR=/tmp
fi
downloaddir=${TMPDIR}/download.$$
mkdir ${downloaddir}
pushd ${downloaddir}
"Downloading build ${ID} in ${downloaddir}";
brew download-build ${ID}
versionregexp="[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*-[0-9]*"
basename=$(ls|grep java-${FEATUREVER}-openjdk-portable-${versionregexp}.el7openjdkportable.x86_64.rpm)
version=$(echo ${basename}|sed -r "s|^.*-(${versionregexp})\.el7.*$|\1|")
echo "Downloaded version ${version}"
# Remove stripped release builds for portable
rm -vf java-${FEATUREVER}-openjdk-portable-${FEATUREVER}*
rm -vf java-${FEATUREVER}-openjdk-portable-devel-${FEATUREVER}*
for file in *.rpm; do
rpm2archive ${file};
done
mkdir unpacked
for file in *.tgz; do
tar -C unpacked -xzf ${file};
done
mkdir ${HOME}/${version}
mv unpacked/usr/lib/jvm/* ${HOME}/${version}
pushd ${HOME}/${version}
for file in *.sha256sum; do
if ! sha256sum --check ${file} ; then
echo "${file} failed checksum.";
exit 2;
fi
done
popd
rm -rf unpacked
rm -vf *.tgz
rm -vf *.rpm
popd

View File

@ -67,14 +67,10 @@
# (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
%global debug_suffix_unquoted -slowdebug
%global fastdebug_suffix_unquoted -fastdebug
%global main_suffix_unquoted -main
%global staticlibs_suffix_unquoted -staticlibs
# quoted one for shell operations
%global debug_suffix "%{debug_suffix_unquoted}"
%global fastdebug_suffix "%{fastdebug_suffix_unquoted}"
%global normal_suffix ""
%global main_suffix "%{main_suffix_unquoted}"
%global staticlibs_suffix "%{staticlibs_suffix_unquoted}"
%global debug_warning This package is unoptimised with full debugging. Install only as needed and remove ASAP.
%global fastdebug_warning This package is optimised with full debugging. Install only as needed and remove ASAP.
@ -196,12 +192,6 @@
# Build and test slowdebug first as it provides the best diagnostics
%global build_loop %{slowdebug_build} %{fastdebug_build} %{normal_build}
%if %{include_staticlibs}
%global staticlibs_loop %{staticlibs_suffix}
%else
%global staticlibs_loop %{nil}
%endif
%if 0%{?flatpak}
%global bootstrap_build false
%else
@ -236,6 +226,8 @@
# JDK to use for bootstrapping
%global bootjdk /usr/lib/jvm/java-%{buildjdkver}-openjdk
# debugedit tool for rewriting ELF file paths
%global debugedit %{_rpmconfigdir}/debugedit
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
@ -369,7 +361,12 @@
%global top_level_dir_name %{origin}
%global top_level_dir_name_backup %{top_level_dir_name}-backup
%global buildver 10
%global rpmrelease 3
%global rpmrelease 4
# Settings used by the portable build
%global portablerelease 6
%global portablesuffix el7openjdkportable
%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
%if %is_system_jdk
# Using 10 digits may overflow the int used for priority, so we combine the patch and build versions
@ -417,7 +414,7 @@
%global jdkimage jdk
%global static_libs_image static-libs
# output dir stub
%define buildoutputdir() %{expand:build/jdk%{featurever}.build%{?1}}
%define installoutputdir() %{expand:install/jdk%{featurever}.install%{?1}}
# we can copy the javadoc to not arched dir, or make it not noarch
%define uniquejavadocdir() %{expand:%{fullversion}.%{_arch}%{?1}}
# main id and dir of this jdk
@ -1290,9 +1287,6 @@ Source8: tapsets-icedtea-%{icedteaver}.tar.xz
# Desktop files. Adapted from IcedTea
Source9: jconsole.desktop.in
# Release notes
Source10: NEWS
# nss configuration file
Source11: nss.cfg.in
@ -1314,6 +1308,89 @@ Source16: CheckVendor.java
# Ensure translations are available for new timezones
Source18: TestTranslations.java
# TODO: Portable packages are not yet available in buildroot
# Temporarily add them as sources
# aarch64
Source1000: java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.aarch64.tar.xz
Source1001: java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.aarch64.tar.xz
Source1002: java-17-openjdk-17.0.6.0.10-6.portable.docs.el.aarch64.tar.xz
Source1003: java-17-openjdk-17.0.6.0.10-6.portable.misc.el.aarch64.tar.xz
Source1004: java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.aarch64.tar.xz
Source1005: java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.aarch64.tar.xz
Source1006: java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.jdk.el.aarch64.tar.xz
Source1007: java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.static-libs.el.aarch64.tar.xz
# ppc64le
Source2000: java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.ppc64le.tar.xz
Source2001: java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.ppc64le.tar.xz
Source2002: java-17-openjdk-17.0.6.0.10-6.portable.docs.el.ppc64le.tar.xz
Source2003: java-17-openjdk-17.0.6.0.10-6.portable.misc.el.ppc64le.tar.xz
Source2004: java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.ppc64le.tar.xz
Source2005: java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.ppc64le.tar.xz
Source2006: java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.jdk.el.ppc64le.tar.xz
Source2007: java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.static-libs.el.ppc64le.tar.xz
# s390x
Source3000: java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.s390x.tar.xz
Source3001: java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.s390x.tar.xz
Source3002: java-17-openjdk-17.0.6.0.10-6.portable.docs.el.s390x.tar.xz
Source3003: java-17-openjdk-17.0.6.0.10-6.portable.misc.el.s390x.tar.xz
Source3004: java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.s390x.tar.xz
Source3005: java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.s390x.tar.xz
# x86_64
Source4000: java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.x86_64.tar.xz
Source4001: java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.x86_64.tar.xz
Source4002: java-17-openjdk-17.0.6.0.10-6.portable.docs.el.x86_64.tar.xz
Source4003: java-17-openjdk-17.0.6.0.10-6.portable.misc.el.x86_64.tar.xz
Source4004: java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.x86_64.tar.xz
Source4005: java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.x86_64.tar.xz
Source4006: java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.jdk.el.x86_64.tar.xz
Source4007: java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.static-libs.el.x86_64.tar.xz
# Setup variables to reference correct sources
%ifarch %{aarch64}
%global releasezip %{SOURCE1000}
%global staticlibzip %{SOURCE1001}
%global docszip %{SOURCE1002}
%global misczip %{SOURCE1003}
%global slowdebugzip %{SOURCE1004}
%global slowdebugstaticlibzip %{SOURCE1005}
%global fastdebugzip %{SOURCE1006}
%global fastdebugstaticlibzip %{SOURCE1007}
%endif
%ifarch %{ppc64le}
%global releasezip %{SOURCE2000}
%global staticlibzip %{SOURCE2001}
%global docszip %{SOURCE2002}
%global misczip %{SOURCE2003}
%global slowdebugzip %{SOURCE2004}
%global slowdebugstaticlibzip %{SOURCE2005}
%global fastdebugzip %{SOURCE2006}
%global fastdebugstaticlibzip %{SOURCE2007}
%endif
%ifarch s390x
%global releasezip %{SOURCE3000}
%global staticlibzip %{SOURCE3001}
%global docszip %{SOURCE3002}
%global misczip %{SOURCE3003}
%global slowdebugzip %{SOURCE3004}
%global slowdebugstaticlibzip %{SOURCE3005}
%global fastdebugzip %{nil}
%global fastdebugstaticlibzip %{nil}
%endif
%ifarch x86_64
%global releasezip %{SOURCE4000}
%global staticlibzip %{SOURCE4001}
%global docszip %{SOURCE4002}
%global misczip %{SOURCE4003}
%global slowdebugzip %{SOURCE4004}
%global slowdebugstaticlibzip %{SOURCE4005}
%global fastdebugzip %{SOURCE4006}
%global fastdebugstaticlibzip %{SOURCE4007}
%endif
############################################
#
# RPM/distribution specific patches
@ -1413,7 +1490,13 @@ BuildRequires: pkgconfig
BuildRequires: xorg-x11-proto-devel
BuildRequires: zip
BuildRequires: javapackages-filesystem
BuildRequires: java-17-openjdk-devel
# TODO: Portable packages are not yet available in buildroot
#BuildRequires: java-%{featurever}-openjdk-portable-unstripped = %{version}
#BuildRequires: java-%{featurever}-openjdk-portable-static-libs = %{version}
#BuildRequires: java-%{featurever}-openjdk-portable-devel-fastdebug = %{version}
#BuildRequires: java-%{featurever}-openjdk-portable-static-libs-fastdebug = %{version}
#BuildRequires: java-%{featurever}-openjdk-portable-devel-slowdebug = %{version}
#BuildRequires: java-%{featurever}-openjdk-portable-static-libs-slowdebug = %{version}
# Zero-assembler build requirement
%ifarch %{zero_arches}
BuildRequires: libffi-devel
@ -1448,8 +1531,6 @@ Provides: bundled(lcms2) = 2.12.0
Provides: bundled(libjpeg) = 6b
# Version in src/java.desktop/share/native/libsplashscreen/libpng/png.h
Provides: bundled(libpng) = 1.6.37
# We link statically against libstdc++ to increase portability
BuildRequires: libstdc++-static
%endif
# this is always built, also during debug-only build
@ -1891,248 +1972,79 @@ done
sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
%build
# How many CPU's do we have?
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
export NUM_PROC=${NUM_PROC:-1}
%if 0%{?_smp_ncpus_max}
# Honor %%_smp_ncpus_max
[ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
%endif
%ifarch s390x sparc64 alpha %{power64} %{aarch64}
export ARCH_DATA_MODEL=64
%endif
%ifarch alpha
export CFLAGS="$CFLAGS -mieee"
%endif
# We use ourcppflags because the OpenJDK build seems to
# pass EXTRA_CFLAGS to the HotSpot C++ compiler...
# Explicitly set the C++ standard as the default has changed on GCC >= 6
EXTRA_CFLAGS="%ourcppflags"
EXTRA_CPP_FLAGS="%ourcppflags"
%ifarch %{power64} ppc
# fix rpmlint warnings
EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
%endif
%ifarch %{ix86}
# Align stack boundary on x86_32
EXTRA_CFLAGS="$(echo ${EXTRA_CFLAGS} | sed -e 's|-mstackrealign|-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4|')"
EXTRA_CPP_FLAGS="$(echo ${EXTRA_CPP_FLAGS} | sed -e 's|-mstackrealign|-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4|')"
%endif
export EXTRA_CFLAGS EXTRA_CPP_FLAGS
function buildjdk() {
local outputdir=${1}
local buildjdk=${2}
local maketargets="${3}"
local debuglevel=${4}
local link_opt=${5}
local top_dir_abs_src_path=$(pwd)/%{top_level_dir_name}
local top_dir_abs_build_path=$(pwd)/${outputdir}
# This must be set using the global, so that the
# static libraries still use a dynamic stdc++lib
if [ "x%{link_type}" = "xbundled" ] ; then
libc_link_opt="static";
else
libc_link_opt="dynamic";
fi
echo "Using output directory: ${outputdir}";
echo "Checking build JDK ${buildjdk} is operational..."
${buildjdk}/bin/java -version
echo "Using make targets: ${maketargets}"
echo "Using debuglevel: ${debuglevel}"
echo "Using link_opt: ${link_opt}"
echo "Building %{newjavaver}-%{buildver}, pre=%{ea_designator}, opt=%{lts_designator}"
mkdir -p ${outputdir}
pushd ${outputdir}
# Note: zlib and freetype use %{link_type}
# rather than ${link_opt} as the system versions
# are always used in a system_libs build, even
# for the static library build
bash ${top_dir_abs_src_path}/configure \
%ifarch %{zero_arches}
--with-jvm-variants=zero \
%endif
%ifarch %{ppc64le}
--with-jobs=1 \
%endif
--with-version-build=%{buildver} \
--with-version-pre="%{ea_designator}" \
--with-version-opt=%{lts_designator} \
--with-vendor-version-string="%{oj_vendor_version}" \
--with-vendor-name="%{oj_vendor}" \
--with-vendor-url="%{oj_vendor_url}" \
--with-vendor-bug-url="%{oj_vendor_bug_url}" \
--with-vendor-vm-bug-url="%{oj_vendor_bug_url}" \
--with-boot-jdk=${buildjdk} \
--with-debug-level=${debuglevel} \
--with-native-debug-symbols="%{debug_symbols}" \
--disable-sysconf-nss \
--enable-unlimited-crypto \
--with-zlib=%{link_type} \
--with-freetype=%{link_type} \
--with-libjpeg=${link_opt} \
--with-giflib=${link_opt} \
--with-libpng=${link_opt} \
--with-lcms=${link_opt} \
--with-harfbuzz=${link_opt} \
--with-stdc++lib=${libc_link_opt} \
--with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
--with-extra-cflags="$EXTRA_CFLAGS" \
--with-extra-ldflags="%{ourldflags}" \
--with-num-cores="$NUM_PROC" \
--with-source-date="${SOURCE_DATE_EPOCH}" \
--disable-javac-server \
%ifarch %{zgc_arches}
--with-jvm-features=zgc \
%endif
--disable-warnings-as-errors
cat spec.gmk
make \
LOG=trace \
WARNINGS_ARE_ERRORS="-Wno-error" \
CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error" \
$maketargets || ( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name "hs_err_pid*.log" | xargs cat && false )
popd
}
function installjdk() {
function customisejdk() {
local imagepath=${1}
if [ -d ${imagepath} ] ; then
# the build (erroneously) removes read permissions from some jars
# this is a regression in OpenJDK 7 (our compiler):
# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
find ${imagepath} -iname '*.jar' -exec chmod ugo+r {} \;
# Turn on system security properties
sed -i -e "s:^security.useSystemPropertiesFile=.*:security.useSystemPropertiesFile=true:" \
${imagepath}/conf/security/java.security
# Build screws up permissions on binaries
# https://bugs.openjdk.java.net/browse/JDK-8173610
find ${imagepath} -iname '*.so' -exec chmod +x {} \;
find ${imagepath}/bin/ -exec chmod +x {} \;
# Install nss.cfg right away as we will be using the JRE above
install -m 644 nss.cfg ${imagepath}/conf/security/
# Turn on system security properties
sed -i -e "s:^security.useSystemPropertiesFile=.*:security.useSystemPropertiesFile=true:" \
${imagepath}/conf/security/java.security
# Use system-wide tzdata
rm ${imagepath}/lib/tzdb.dat
ln -s %{_datadir}/javazi-1.8/tzdb.dat ${imagepath}/lib/tzdb.dat
# Create fake alt-java as a placeholder for future alt-java
pushd ${imagepath}
# add alt-java man page
echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > man/man1/%{alt_java_name}.1
cat man/man1/java.1 >> man/man1/%{alt_java_name}.1
popd
# Use system-wide tzdata
rm ${imagepath}/lib/tzdb.dat
ln -s %{_datadir}/javazi-1.8/tzdb.dat ${imagepath}/lib/tzdb.dat
fi
}
%if %{build_hotspot_first}
# Build a fresh libjvm.so first and use it to bootstrap
cp -LR --preserve=mode,timestamps %{bootjdk} newboot
systemjdk=$(pwd)/newboot
buildjdk build/newboot ${systemjdk} %{hotspot_target} "release" "bundled"
mv build/newboot/jdk/lib/server/libjvm.so newboot/lib/server
%else
systemjdk=%{bootjdk}
%endif
for suffix in %{build_loop} ; do
if [ "x$suffix" = "x" ] ; then
debugbuild=release
else
# change --something to something
debugbuild=`echo $suffix | sed "s/-//g"`
jdkzip=%{releasezip}
staticlibzip=%{staticlibzip}
elif [ "x$suffix" = "x%{fastdebug_suffix_unquoted}" ] ; then
jdkzip=%{fastdebugzip}
staticlibzip=%{fastdebugstaticlibzip}
else # slowdebug
jdkzip=%{slowdebugzip}
staticlibzip=%{slowdebugstaticlibzip}
fi
installdir=%{installoutputdir -- ${suffix}}
for loop in %{main_suffix} %{staticlibs_loop} ; do
# TODO: should verify checksums when using packages from buildroot
tar -xJf ${jdkzip}
tar -xJf ${staticlibzip}
mkdir -p $(dirname ${installdir})
mv java-%{featurever}-openjdk* ${installdir}
builddir=%{buildoutputdir -- ${suffix}${loop}}
bootbuilddir=boot${builddir}
if test "x${loop}" = "x%{main_suffix}" ; then
link_opt="%{link_type}"
%if %{system_libs}
# Copy the source tree so we can remove all in-tree libraries
cp -a %{top_level_dir_name} %{top_level_dir_name_backup}
# Remove all libraries that are linked
sh %{SOURCE12} %{top_level_dir_name} full
%endif
# Debug builds don't need same targets as release for
# build speed-up. We also avoid bootstrapping these
# slower builds.
if echo $debugbuild | grep -q "debug" ; then
maketargets="%{debug_targets}"
run_bootstrap=false
else
maketargets="%{release_targets}"
run_bootstrap=%{bootstrap_build}
# Fix build paths in ELF files so it looks like we built them
portablenvr="%{name}-%{VERSION}-%{portablerelease}.%{portablesuffix}.%{_arch}"
for file in $(find ${installdir} -type f) ; do
if file ${file} | grep -q 'ELF'; then
%{debugedit} -b %{portablebuilddir}/${portablenvr} -d $(pwd) -n ${file}
fi
if ${run_bootstrap} ; then
buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild} ${link_opt}
buildjdk ${builddir} $(pwd)/${bootbuilddir}/images/%{jdkimage} "${maketargets}" ${debugbuild} ${link_opt}
rm -rf ${bootbuilddir}
else
buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt}
fi
%if %{system_libs}
# Restore original source tree we modified by removing full in-tree sources
rm -rf %{top_level_dir_name}
mv %{top_level_dir_name_backup} %{top_level_dir_name}
%endif
else
# Use bundled libraries for building statically
link_opt="bundled"
# Static library cycle only builds the static libraries
maketargets="%{static_libs_target}"
# Always just do the one build for the static libraries
buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt}
fi
done # end of main / staticlibs loop
done
# Final setup on the main image
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
installjdk ${top_dir_abs_main_build_path}/images/%{jdkimage}
customisejdk ${installdir}
# Print release information
cat ${top_dir_abs_main_build_path}/images/%{jdkimage}/release
cat ${installdir}/release
# build cycles
done # end of release / debug cycle loop
docdir=%{installoutputdir -- "-docs"}
tar -xJf %{docszip}
mv java-%{featurever}-openjdk*.docs.* ${docdir}
miscdir=%{installoutputdir -- "-misc"}
tar -xJf %{misczip}
mv java-%{featurever}-openjdk*.misc.* ${miscdir}
%check
# We test debug first as it will give better diagnostics on a crash
for suffix in %{build_loop} ; do
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
%if %{include_staticlibs}
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}}
%endif
export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage}
export JAVA_HOME=$(pwd)/%{installoutputdir -- ${suffix}}
# Pre-test setup
#check Shenandoah is enabled
# Check Shenandoah is enabled
%if %{use_shenandoah_hotspot}
$JAVA_HOME//bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -version
$JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -version
%endif
# Check unlimited policy has been used
@ -2173,9 +2085,9 @@ $JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|
%if %{include_staticlibs}
# Check debug symbols in static libraries (smoke test)
export STATIC_LIBS_HOME=${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c
readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c
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/libfdlibm.a | grep e_remainder.c
%endif
so_suffix="so"
@ -2266,11 +2178,15 @@ STRIP_KEEP_SYMTAB=libjvm*
for suffix in %{build_loop} ; do
top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}}
%if %{include_staticlibs}
top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_loop}}
%endif
jdk_image=${top_dir_abs_main_build_path}/images/%{jdkimage}
jdk_image=$(pwd)/%{installoutputdir -- ${suffix}}
# Should match same definitions in build section
docdir=$(pwd)/%{installoutputdir -- "-docs"}
miscdir=%{installoutputdir -- "-misc"}
# Install release notes
commondocdir=${RPM_BUILD_ROOT}%{_defaultdocdir}/%{uniquejavadocdir -- $suffix}
install -d -m 755 ${commondocdir}
mv ${jdk_image}/NEWS ${commondocdir}
# Install the jdk
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}
@ -2319,35 +2235,26 @@ pushd ${jdk_image}
rm -rf $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/man
popd
# Install static libs artefacts
%if %{include_staticlibs}
mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/static/linux-%{archinstall}/glibc
cp -a ${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image}/lib/*.a \
$RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/static/linux-%{archinstall}/glibc
%endif
if ! echo $suffix | grep -q "debug" ; then
# Install Javadoc documentation
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
cp -a ${top_dir_abs_main_build_path}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip
cp -a ${top_dir_abs_main_build_path}/bundles/${built_doc_archive} \
$RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip || ls -l ${top_dir_abs_main_build_path}/bundles/
# Install Javadoc documentation
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
cp -a ${docdir}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip
cp -a ${docdir}/${built_doc_archive} \
$RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip || ls -l ${top_dir_abs_main_build_path}/bundles/
touch $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip
fi
# Install release notes
commondocdir=${RPM_BUILD_ROOT}%{_defaultdocdir}/%{uniquejavadocdir -- $suffix}
install -d -m 755 ${commondocdir}
cp -a %{SOURCE10} ${commondocdir}
# Install icons and menu entries
for s in 16 24 32 48 ; do
install -D -p -m 644 \
%{top_level_dir_name}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png \
${miscdir}/java-icon${s}.png \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}-%{origin}.png
done
# Install desktop files
# TODO: provide desktop files via portable
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
for e in jconsole$suffix ; do
desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \
@ -2359,8 +2266,7 @@ done
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
# copy samples next to demos; samples are mostly js files
cp -r %{top_level_dir_name}/src/sample $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/
cp -r ${miscdir}/sample $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/
# moving config files to /etc
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}
@ -2626,6 +2532,10 @@ require "copy_jdk_configs.lua"
%endif
%changelog
* Wed Feb 15 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-4
- Replace build section with extraction of existing builds from portables
- Resolves: RHEL-36129
* Fri Jan 20 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.6.0.10-3
- Update to jdk-17.0.6.0+10
- Update release notes to 17.0.6.0+10

30
sources
View File

@ -1,2 +1,32 @@
SHA512 (tapsets-icedtea-6.0.0pre00-c848b93a8598.tar.xz) = 97d026212363b3c83f6a04100ad7f6fdde833d16579717f8756e2b8c2eb70e144a41a330cb9ccde9c3badd37a2d54fdf4650a950ec21d8b686d545ecb2a64d30
SHA512 (openjdk-jdk17u-jdk-17.0.6+10.tar.xz) = 2878aae52e2f49146b9631e3b0379370dce1a0a620dc5c5b763d1432b82e705e3aa33a83008391b4845bf0cb493b08179e7ac3419f597fb80fd65df393e12cf1
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.docs.el.aarch64.tar.xz) = d3e8b4c8cb8197b7a9023235f10ef142a5f865de1e05c43ebae9b20e3f38836c9d098317315c2ef465bacf3248d4953cd2ef84b7fccf808a4c8904999cd8d289
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.docs.el.ppc64le.tar.xz) = 80bf8db3245dd4f075b58da2f80df774c89988cf88da288b56e9118c9c759ec41c377341fad9d03672fad657ca02d04859e78e021d42b654f0c4690c1905bab5
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.docs.el.s390x.tar.xz) = 6753fb7288a737eacb41206c2de09ed673e2f852b23b6ded3d6ded78ec37a84719385087ea64712c7c3be9c6c1c2c9dffafb3dae0f5cd9e998febc39657c0537
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.docs.el.x86_64.tar.xz) = 423c964d0f351bbfc06fbcc7f3eba87d763b147a984b1e5fc54ee357a1b71bf0e2a67a446d7fc3596f054b5aaecc3b0a1e043a06a4dcb29598221c2d83e16613
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.jdk.el.aarch64.tar.xz) = e0062a9ed4dfc99c5f309cd33911b98988093e9afd287538c95ad0146b2cd74edf6b537b0f57db7d6b86e4cb0b0075975285736b217e0de1dee4c51a32614f31
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.jdk.el.ppc64le.tar.xz) = 170d5d3e2af07c2e2a2cf897a0ea215d4be146d501d9bc0ba91b0b369aebdc342c721a02417fb7f81d43b3bd684c82e9c6858407729cb5420a5a212fd68350ab
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.jdk.el.x86_64.tar.xz) = e1d360b26640a343b7f28e3ad665e17cd233ea4c34dedefa481b2d589a3b3a824d2c29529dfb0515f56aaa3d932924bbe6087e3f4f52ae37d6c8bcfac3c8475a
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.static-libs.el.aarch64.tar.xz) = 1eba570b6d1b2339b964e9019f95f7313731e75742b31d8c279a90ea9b59ab0d15f2001356164f1c88f231841bdfdd78b7db4193b4eeab4f09f16bee42fe0bbc
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.static-libs.el.ppc64le.tar.xz) = c2cc1e85756a8e1fd226177452ffff4d0e031a8dfc553d31defd95cb69b2041a991ea28d18d8ffb456f03069c774e78ca84bc7a2954ec6a2e3be601fc32e0e65
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.fastdebug.static-libs.el.x86_64.tar.xz) = ae0f202c18a80a41e2a9d5e44cf12f4026a7864018adbeeb0cff38f882fa2cee62ce568fef77100aed3bcd545193248efac8c2065a4cbe7c43e78f6030918b6f
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.misc.el.aarch64.tar.xz) = 91433ef5f1e8b11c8cd8a55b2eceb724d32f7781190a1404c0e637323e62fc6ed8af140e3d2bde4483fc3f92055d92d6d06bbee76136f22c041c35096ad1d19d
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.misc.el.ppc64le.tar.xz) = dca4fdac80f12f2bbf2ebdf13a1dceca42d8b2c401a32665c15667e447d5b2493cb41c16cf9cac2d4919b8fd35e5546803f2d1ec51599b010a82c16d1ef9c185
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.misc.el.s390x.tar.xz) = b9e7ac0ae220cb6fd04dc83adff6158bc3beea289ddd10109a1b8640379d367333a65ab6097339b8f988a9cdee369eb41ce5a41cde579b17f0f4d39118fbff84
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.misc.el.x86_64.tar.xz) = 1cbd58b6aa4c9c19d1f6e987af1092285c43e4c56202519dd4b75a4ff4d68cd07633ba09e22e7d2a62e91ceb0e3629a4878de943cf7a90ed01c74749bff597d5
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.aarch64.tar.xz) = 6e9d71bfcd5499b18e8503213201b4a918d3c3cbfb32f9d6e67f5a9b0de8ee9df349617ecd8935a38080eae59f2230d1b78dbd91135fba8b65e620da3e1538cf
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.ppc64le.tar.xz) = f5fb6a3bba17d36a4dcdc9a91916f4d0dde5a232e0f3c80297c45ff741efd8978bc96f661513ac9518b6e1d21607e5f751807d5803b998be2a68b5f0ee6b83f3
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.s390x.tar.xz) = 7d564c48a0299ac61c8cfa09b579c81a46ca0373ecf62dd6ae86268632e5672c9fa5e6f4ee5a6ff2e8d8b6fa75a7ba7e7203a432a6a34d2a10f2238395e12c40
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.jdk.el.x86_64.tar.xz) = 29e7d7c9a7a57bfe5bd0397adf8a70e466e8a6dc8dd7045851331990d496d4e8ba6ca0b633dd7add4aa29c1c60e01391461dc37ed787dd4f64a20445c83529c9
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.aarch64.tar.xz) = ce658bc5b3a3503b7548f02ce8b3fef21ca819dc345a69e4551242a6310fdd858ebe54dd25ed8336bdbfc4ffc408f83a1630ffbd61da006cc71d53602d4181b2
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.ppc64le.tar.xz) = 5f16ead60b099f8bdad44c187406107ff8767aca8d4172919883017b22dd454c44d3e70c339c1d6439d9e8f39f1a040f87ee5ea56dfb13b89638a7f02648bbbc
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.s390x.tar.xz) = a1308681c47f32b63b896611989acc3f1230a3ad161b618cc1af0524e0990d95b6d851df1d5a93d8cb20dc27ca1aad374bba60198530e2f65045f443bc44ccc9
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.slowdebug.static-libs.el.x86_64.tar.xz) = 9e481ca7367dc6bf25b85c6d68f6a3ea1a684d4d80e1535fa59ab0adebd6f13f12c95fc2f08a039ed2ec1bac749255ca033ca290e7fc553cc93da496768f7419
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.aarch64.tar.xz) = 3d57209da953e084c7633c13fe6ec6f808f13486648b054e344a6dd1aadac5025c9c95275b01b3fb83539cb86a36cd8845a38758d70749596e237ced492a9b63
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.ppc64le.tar.xz) = eaf9d01e19852d75bf99fc6b9b60499285405a6b328dd2ca9d080f1cf28da59e925bec802c248544415e3f1f023f64148a95faece98318d0e2e59c7425f3f033
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.s390x.tar.xz) = 6d57b3fad5fd2015050c441cca5bd1c47c1ffed4e15842386c302936c123690f95293c7ef01cf17b588b0520e939fb362ac3781f9ae9d7194add6172ab1bd423
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.static-libs.el.x86_64.tar.xz) = 7cf2b2645310f6d61fd38c1d8400a97e9f5ce118c607d455f97e897c903828d01711aedcede3ece052da52ceae39fe93e9897f4d4f315a5de7c1c0b505e4144b
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.aarch64.tar.xz) = bc317b65efefb0e62819e2f182bcc6b28648c1f5b1ebf1314ee818aa7b96dba0735ba15f08125f0f9fbc0bcdb97ebf46551d9d2c09362f642221c45169282bfe
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.ppc64le.tar.xz) = 3d871a04a201b29fac74c9ad33b7f43c31dd3d6353bad33dab5fdda218284bb0d0367b96a2f7e0d11c95ae2fa9cba2c5103247b6d05035f1c71e0fac7ae921e7
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.s390x.tar.xz) = 3b97c4a23929e5e8d9da10bf2853003af66cb92b33f54d6702c7f8aa4096e78f0f3b4449c9a63eff7fc4c1ddb6cda1a32393a6bf52c592b096fca2767bd634ac
SHA512 (java-17-openjdk-17.0.6.0.10-6.portable.unstripped.jdk.el.x86_64.tar.xz) = 5c12f586ac9f00bfc62948716def3d880af46519a8972a5722c8f1869fc69e2f03974248f89c4053aa340d08d9873fd6c3a5b5ba2f6e538771c2164a6c836f69