From 69292a5ba5c01fe61ff01c5e55edc4b9361cb235 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Tue, 31 Oct 2023 17:23:07 +0000 Subject: [PATCH] Vanishing_commit --- tooling/release_download_test.sh | 4 ++-- tooling/validateSBOMcontent.sh | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tooling/release_download_test.sh b/tooling/release_download_test.sh index 4e2e0cb9c0..624d2527c9 100755 --- a/tooling/release_download_test.sh +++ b/tooling/release_download_test.sh @@ -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 @@ -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 diff --git a/tooling/validateSBOMcontent.sh b/tooling/validateSBOMcontent.sh index 15e0273f68..fc9bd5a31c 100755 --- a/tooling/validateSBOMcontent.sh +++ b/tooling/validateSBOMcontent.sh @@ -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 @@ -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 @@ -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 @@ -85,7 +85,7 @@ 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 @@ -93,7 +93,7 @@ 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