Add zero_arches to the portable_build_arches now that the portable build bundles libffi

- Temporarily workaround libffi.so not being in lib/%%{archinstall} by copying it
- Exclude libffi.so from the debugedit run
- Add a simple -version check on both the JDK and JRE bin/java
- Add libffi.so to the filelist, including expanding the lib/%%{archinstall} contents as with jre/lib

Resolves: RHEL-74304
This commit is contained in:
Andrew Hughes 2025-01-16 20:55:34 +00:00
parent 8b8410b67d
commit be6098a358

View File

@ -132,7 +132,7 @@
# Set of architectures where we verify backtraces with gdb
%global gdb_arches %{jit_arches} %{zero_arches}
# Set of architectures for which we have a portable build
%global portable_build_arches %{aarch64} %{ix86} %{power64} s390x x86_64
%global portable_build_arches %{aarch64} %{ix86} %{power64} x86_64 %{zero_arches}
# Architecture on which we run Java only tests
%global jdk_test_arch x86_64
@ -348,7 +348,7 @@
# rpmrelease numbering must start at 2 to be later than the 8.6 RPM
%global rpmrelease 3
# Settings used by the portable build
%global portablerelease 1
%global portablerelease 2
%global portablesuffix el8
%global portablebuilddir /builddir/build/BUILD
@ -893,6 +893,9 @@ exit 0
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt.so
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt_headless.so
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libdt_socket.so
%ifarch %{zero_arches}
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libffi.so.*
%endif
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libfontmanager.so
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libhprof.so
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libinstrument.so
@ -1033,7 +1036,13 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsimport
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/xjc
%{_jvmdir}/%{sdkdir -- %{?1}}/include/*
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}/jli
%ifarch %{zero_arches}
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}/libffi.so.*
%endif
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}/libjawt.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}/jli/libjli.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
%if %{with_systemtap}
%{_jvmdir}/%{sdkdir -- %{?1}}/tapset
@ -2052,17 +2061,23 @@ for suffix in %{build_loop} ; do
# TODO: should verify checksums when using packages from buildroot
tar -xJf ${jdkzip}
mv %{name}* ${installdir}
%ifarch %{zero_arches}
# FIXME: Workaround libffi only being in jre/lib not lib
cp -av ${installdir}/jre/lib/%{archinstall}/libffi.* ${installdir}/lib/%{archinstall}
%endif
# Fix build paths in ELF files so it looks like we built them
portablenvr="%{name}-portable-%{pversion}-%{prelease}.%{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}
if ! echo ${file} | grep -q 'libffi' ; then
if file ${file} | grep -q 'ELF'; then
%{debugedit} -b %{portablebuilddir}/${portablenvr} -d $(pwd) -n ${file}
fi
fi
done
# Set tapset variables to match this build
%if %{with_systemtap}
for file in ${miscdir}/tapset${suffix}/*.in; do
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/server/libjvm.so:g" $file > ${OUTPUT_FILE}
# TODO find out which architectures other than i686 have a client vm
@ -2092,6 +2107,10 @@ for suffix in %{build_loop} ; do
export JAVA_HOME=$(pwd)/%{installoutputdir -- $suffix}
# Basic version check
$JAVA_HOME/jre/bin/java -version
$JAVA_HOME/bin/java -version
# Only test on one architecture (the fastest) for Java only tests
%ifarch %{jdk_test_arch}
@ -2684,7 +2703,15 @@ cjc.mainProgram(args)
%endif
%changelog
* Mon Jan 06 2025 Andrew Hughes <gnu.andrew@redhat.com> - 1:1.8.0.442.b05-0.1.ea
* Thu Jan 16 2025 Andrew Hughes <gnu.andrew@redhat.com> - 1:1.8.0.442.b05-0.3.ea
- Add zero_arches to the portable_build_arches now that the portable build bundles libffi
- Temporarily workaround libffi.so not being in lib/%%{archinstall} by copying it
- Exclude libffi.so from the debugedit run
- Add a simple -version check on both the JDK and JRE bin/java
- Add libffi.so to the filelist, including expanding the lib/%%{archinstall} contents as with jre/lib
- Resolves: RHEL-74304
* Mon Jan 06 2025 Andrew Hughes <gnu.andrew@redhat.com> - 1:1.8.0.442.b05-0.2.ea
- Update to 8u442-b05 (EA).
- Update release notes for 8u442-b05.
- Switch to EA mode for pre-release.