java-11-openjdk/get_sources.sh
Andrew Hughes 354f2edc44 On portable architectures, replace build section with extraction of existing builds from portables
Rewrite ELF files so the source file path is correct and debugsources can be assembled
Backport SHA-3 support for PKCS11 provider
Sync patch set with portable build we are using by removing rh1648644-java_access_bridge_privileged_security.patch

Related: RHEL-30918
2024-04-28 00:29:32 +01:00

60 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
ID=${1}
FEATUREVER=11
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}
echo "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 and JREs
rm -vf java-${FEATUREVER}-openjdk-portable-${FEATUREVER}*
rm -vf java-${FEATUREVER}-openjdk-portable-devel-${FEATUREVER}*
rm -vf java-${FEATUREVER}-openjdk-portable-slowdebug-${FEATUREVER}*
rm -vf java-${FEATUREVER}-openjdk-portable-fastdebug-${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