Skip to content

Commit

Permalink
Vanishing_commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sxa committed Oct 31, 2023
1 parent ad087df commit 69292a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tooling/release_download_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fi
FILTER=$(echo $TAG | sed 's/+/%2B/g')
fi
# Parse the releases list for the one we want and download everything in it
for URL in $(cat "$WORKSPACE/jdk${MAJOR_VERSION}.txt" | grep "$FILTER" | awk -F'"' '/browser_download_url/{print$4}'); do
for URL in $(grep "$FILTER" "$WORKSPACE/jdk${MAJOR_VERSION}.txt" | awk -F'"' '/browser_download_url/{print$4}'); do
[ "$VERBOSE" = "true" ] && echo Downloading $(basename "$URL")
curl -LORsS "$URL"
done
Expand Down Expand Up @@ -155,7 +155,7 @@ for SBOM in $(ls -1 staging/"$TAG"/OpenJDK*-sbom*json | grep -v metadata); do
echo "ERROR: Failed CycloneDX validation check"
RC=5
fi
if ! bash $(dirname "$0")/validateSBOMcontent.sh "$SBOM" $MAJOR_VERSION $TAG; then
if ! bash $(dirname "$0")/validateSBOMcontent.sh "$SBOM" "$MAJOR_VERSION" "$TAG"; then
echo "ERROR: Failed checks on $SBOM"
RC=6
fi
Expand Down
18 changes: 9 additions & 9 deletions tooling/validateSBOMcontent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ EXPECTED_GLIBC=""
EXPECTED_GCC=""
# [ "${MAJORVERSION}" = "17" ] && EXPECTED_GCC=10.3.0
EXPECTED_ALSA=N.A
EXPECTED_FREETYPE=N.A # https://github.com/adoptium/temurin-build/issues/3493
#EXPECTED_FREETYPE=N.A # https://github.com/adoptium/temurin-build/issues/3493
#EXPECTED_FREETYPE=https://github.com/freetype/freetype/commit/86bc8a95056c97a810986434a3f268cbe67f2902
if echo "$SBOMFILE" | grep _solaris_; then
EXPECTED_FREETYPE=N.A
#EXPECTED_FREETYPE=N.A
EXPECTED_COMPILER="solstudio (Oracle Solaris Studio)"
elif echo "$SBOMFILE" | grep _aix_; then
EXPECTED_COMPILER="xlc (IBM XL C/C++)"
elif echo "$SBOMFILE" | grep _alpine-linux_ > /dev/null; then
EXPECTED_FREETYPE=N.A
#EXPECTED_FREETYPE=N.A
EXPECTED_ALSA=1.1.6
EXPECTED_GCC=10.3.1
elif echo "$SBOMFILE" | grep _linux_; then
Expand All @@ -46,20 +46,20 @@ elif echo "$SBOMFILE" | grep _linux_; then
[ "${MAJORVERSION}" = "17" ] && EXPECTED_GCC=10.3.0
[ "${MAJORVERSION}" -ge 20 ] && EXPECTED_GCC=11.2.0
EXPECTED_ALSA=1.1.6
EXPECTED_FREETYPE=N.A
#EXPECTED_FREETYPE=N.A
#elif echo $SBOMFILE | grep _mac_; then
# EXPECTED_COMPILER="clang (clang/LLVM from Xcode 10.3)"
elif echo "$SBOMFILE" | grep _x64_windows_; then
if [ "${MAJORVERSION}" = "8" ]; then
EXPECTED_COMPILER="microsoft (Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING)"
EXPECTED_FREETYPE="https://github.com/freetype/freetype/commit/ec8853cd18e1a0c275372769bdad37a79550ed66"
#EXPECTED_FREETYPE="https://github.com/freetype/freetype/commit/ec8853cd18e1a0c275372769bdad37a79550ed66"
else
EXPECTED_COMPILER="microsoft (Microsoft Visual Studio 2019)"
fi
elif echo "$SBOMFILE" | grep _x86-32_windows_; then
if [ "${MAJORVERSION}" = "8" ]; then
EXPECTED_COMPILER="microsoft (Microsoft Visual Studio 2013)"
EXPECTED_FREETYPE="https://github.com/freetype/freetype/commit/ec8853cd18e1a0c275372769bdad37a79550ed66"
#EXPECTED_FREETYPE="https://github.com/freetype/freetype/commit/ec8853cd18e1a0c275372769bdad37a79550ed66"
elif [ "${MAJORVERSION}" = "11" ]; then
EXPECTED_COMPILER="microsoft (Microsoft Visual Studio 2017)"
else
Expand All @@ -76,7 +76,7 @@ fi

EXPECTED_FREEMARKER=N.A
RC=0
if echo "$SBOMFILE" | egrep 'linux_'; then
if echo "$SBOMFILE" | grep 'linux_'; then
[ "${GLIBC}" != "$EXPECTED_GLIBC" ] && echo "ERROR: GLIBC version not ${EXPECTED_GLIBC} (SBOM has ${GLIBC})" && RC=1
[ "${GCC}" != "$EXPECTED_GCC" ] && echo "ERROR: GCC version not ${EXPECTED_GCC} (SBOM has ${GCC})" && RC=1
fi
Expand All @@ -85,15 +85,15 @@ echo "BOOTJDK is ${BOOTJDK}"
[ "${ALSA}" != "$EXPECTED_ALSA" ] && echo "ERROR: ALSA version not ${EXPECTED_ALSA} (SBOM has ${ALSA})" && RC=1
# Freetype versions are inconsistent at present - see build#3484
#[ "${FREETYPE}" != "$EXPECTED_FREETYPE" ] && echo "ERROR: FreeType version not ${EXPECTED_FREETYPE} (SBOM has ${FREETYPE})" && RC=1
[ ! -n "$(echo $FREETYPE | tr -d '[0-9]\.')" ] && echo "ERROR: FreeType version not a valid number (SBOM has ${FREETYPE})" && RC=1
[ -n "$(echo $FREETYPE | tr -d '[0-9]\.')" ] && echo "ERROR: FreeType version not a valid number (SBOM has ${FREETYPE})" && RC=1
echo "FREETYPE is ${FREETYPE}"
[ "${FREEMARKER}" != "$EXPECTED_FREEMARKER" ] && echo "ERROR: Freemarker version not ${EXPECTED_FREEMARKER} (SBOM has ${FREEMARKER})" && RC=1

echo -n "Checking for JDK source SHA validity: "
GITSHA=$(jq '.components[].properties[] | select(.name|test("OpenJDK Source Commit")) | .value' "$1" | tr -d \")
GITREPO=$(echo "$GITSHA" | cut -d/ -f1-5)
GITSHA=$( echo "$GITSHA" | cut -d/ -f7)
if ! git ls-remote ${GITREPO} | grep ${GITSHA}; then
if ! git ls-remote "${GITREPO}" | grep "${GITSHA}"; then
echo "ERROR: git sha of source repo not found"
RC=1
fi
Expand Down

0 comments on commit 69292a5

Please sign in to comment.