Skip to content

Commit

Permalink
Shut up linter because I don't agree with it
Browse files Browse the repository at this point in the history
Signed-off-by: Stewart X Addison <sxa@redhat.com>
  • Loading branch information
sxa committed Oct 31, 2023
1 parent 33c384e commit a6105fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tooling/release_download_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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 ..."
Expand Down
6 changes: 4 additions & 2 deletions tooling/validateSBOMcontent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit a6105fd

Please sign in to comment.