From a6105fd1d936c27863ded7cdef061785010c6ccf Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Tue, 31 Oct 2023 17:56:53 +0000 Subject: [PATCH] Shut up linter because I don't agree with it Signed-off-by: Stewart X Addison --- tooling/release_download_test.sh | 5 ++++- tooling/validateSBOMcontent.sh | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tooling/release_download_test.sh b/tooling/release_download_test.sh index 9d1033933b..d917c44ba2 100755 --- a/tooling/release_download_test.sh +++ b/tooling/release_download_test.sh @@ -59,6 +59,7 @@ fi # Parse the releases list for the one we want and download everything in it # shellcheck disable=SC2013 for URL in $(grep "$FILTER" "$WORKSPACE/jdk${MAJOR_VERSION}.txt" | awk -F'"' '/browser_download_url/{print$4}'); do + # shellcheck disable=SC2046 [ "$VERBOSE" = "true" ] && echo Downloading $(basename "$URL") curl -LORsS "$URL" done @@ -73,6 +74,7 @@ export GPGID=3B04D753C9050D9A5D343F39843C48A565F8F04B export GNUPGHOME="$WORKSPACE/.gpg-temp" rm -rf "$GNUPGHOME" mkdir -p "$GNUPGHOME" && chmod og-rwx "$GNUPGHOME" +# shellcheck disable=SC3037 gpg -q --keyserver keyserver.ubuntu.com --recv-keys "${GPGID}" || exit 1 /bin/echo -e "5\ny\nq\n" | gpg -q --batch --command-fd 0 --expert --edit-key "${GPGID}" trust || exit 1 @@ -131,6 +133,7 @@ if ! strings tarballtest/bin/java | grep ^GLIBC_2.17 > /dev/null; then RC=4 fi +# shellcheck disable=SC2166 [ "${MAJOR_VERSION}" = "8" -o "${MAJOR_VERSION}" = "11" ] && EXPECTED_GCC=7.5 [ "${MAJOR_VERSION}" = "17" ] && EXPECTED_GCC=10.3 [ "${MAJOR_VERSION}" -ge 20 ] && EXPECTED_GCC=11.2 @@ -148,7 +151,7 @@ if [ "$(sha256sum cyclonedx-linux-arm64 | cut -d' ' -f1)" != "eaac307ca4d7f3ee2a exit 1 fi chmod 700 cyclonedx-linux-* -cd "$STARTDIR" +cd "$STARTDIR" || exit 1 for SBOM in $(ls -1 staging/"$TAG"/OpenJDK*-sbom*json | grep -v metadata); do echo "$(date +%T) : IVT : Validating $SBOM ..." diff --git a/tooling/validateSBOMcontent.sh b/tooling/validateSBOMcontent.sh index f8feb21268..1807ae891d 100755 --- a/tooling/validateSBOMcontent.sh +++ b/tooling/validateSBOMcontent.sh @@ -68,6 +68,7 @@ elif echo "$SBOMFILE" | grep _x86-32_windows_; then elif echo "$SBOMFILE" | grep _mac_; then # NOTE: mac/x64 native builds >=11 were using "clang (clang/LLVM from Xcode 10.3)" EXPECTED_COMPILER="clang (clang/LLVM from Xcode 12.4)" + # shellcheck disable=SC2166 if [ "${MAJORVERSION}" = "8" -o "${MAJORVERSION}" = "11" ] && echo "$SBOMFILE" | grep _x64_; then EXPECTED_COMPILER="clang (clang/LLVM)" # EXPECTED_FREETYPE="https://github.com/freetype/freetype/commit/ec8853cd18e1a0c275372769bdad37a79550ed66" @@ -86,11 +87,11 @@ echo "BOOTJDK is ${BOOTJDK}" # Freetype versions are inconsistent at present - see build#3484 #[ "${FREETYPE}" != "$EXPECTED_FREETYPE" ] && echo "ERROR: FreeType version not ${EXPECTED_FREETYPE} (SBOM has ${FREETYPE})" && RC=1 - # shellcheck disable=SC2086 +# shellcheck disable=SC2086 [ -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 - +# shellcheck disable=SC3037 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) @@ -100,6 +101,7 @@ if ! git ls-remote "${GITREPO}" | grep "${GITSHA}"; then RC=1 fi +# shellcheck disable=SC3037 echo -n "Checking for temurin-build SHA validity: " GITSHA=$(jq '.components[].properties[] | select(.name|test("Temurin Build Ref")) | .value' "$1" | tr -d \") GITREPO=$(echo "$GITSHA" | cut -d/ -f1-5)