Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update SBOM validator for April 2024 #3771

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tooling/release_download_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ verify_gcc_version() {
# shellcheck disable=SC2166
[ "${MAJOR_VERSION}" = "8" -o "${MAJOR_VERSION}" = "11" ] && expected_gcc=7.5.0
[ "${MAJOR_VERSION}" = "17" ] && expected_gcc=10.3.0
[ "${MAJOR_VERSION}" -ge 20 ] && expected_gcc=11.2.0
[ "${MAJOR_VERSION}" -ge 20 ] && expected_gcc=11.3.0
andrew-m-leonard marked this conversation as resolved.
Show resolved Hide resolved

if ! strings tarballtest/bin/java | grep "^GCC:.*${expected_gcc}"; then
print_error "GCC version detected in the JDK java executable is not the expected ${expected_gcc}"
Expand Down
23 changes: 15 additions & 8 deletions tooling/validateSBOMcontent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ if echo "$SBOMFILE" | grep _solaris_; then
EXPECTED_COMPILER="solstudio (Oracle Solaris Studio)"
elif echo "$SBOMFILE" | grep _aix_; then
EXPECTED_COMPILER="xlc (IBM XL C/C++)"
EXPECTED_FREETYPE=2.8.0
if [ "$MAJORVERSION" -lt 17 ]; then
EXPECTED_FREETYPE=2.8.0
else
EXPECTED_FREETYPE=2.13.2 # Bundled version
fi
elif echo "$SBOMFILE" | grep _alpine-linux_ > /dev/null; then
EXPECTED_FREETYPE=2.11.1
EXPECTED_ALSA=1.1.6
Expand All @@ -61,8 +65,12 @@ elif echo "$SBOMFILE" | grep _linux_; then
[ "${MAJORVERSION}" = "8" ] && EXPECTED_GCC=7.5.0
[ "${MAJORVERSION}" = "11" ] && EXPECTED_GCC=7.5.0
[ "${MAJORVERSION}" = "17" ] && EXPECTED_GCC=10.3.0
[ "${MAJORVERSION}" -ge 20 ] && EXPECTED_GCC=11.2.0 && EXPECTED_FREETYPE=Unknown
[ "${MAJORVERSION}" -ge 20 ] && EXPECTED_GCC=11.3.0 && EXPECTED_FREETYPE=Unknown
EXPECTED_ALSA=1.1.6
if echo "$SBOMFILE" | grep _riscv64_ > /dev/null; then
EXPECTED_GCC=10.5.0 # No devkit yet so default in Ubuntu 20.04
EXPECTED_GLIBC=2.31
fi
#elif echo $SBOMFILE | grep _mac_; then
# EXPECTED_COMPILER="clang (clang/LLVM from Xcode 10.3)"
elif echo "$SBOMFILE" | grep _x64_windows_; then
Expand All @@ -73,10 +81,10 @@ elif echo "$SBOMFILE" | grep _x64_windows_; then
EXPECTED_COMPILER="microsoft (Microsoft Visual Studio 2022)"
else # JDK11 and 17
EXPECTED_COMPILER="microsoft (Microsoft Visual Studio 2019)"
EXPECTED_FREETYPE=Unknown
EXPECTED_FREETYPE=2.13.2 # Bundled version
fi
elif echo "$SBOMFILE" | grep _x86-32_windows_; then
EXPECTED_FREETYPE=Unknown
EXPECTED_FREETYPE=2.13.2 # Bundled version
if [ "${MAJORVERSION}" = "8" ]; then
EXPECTED_COMPILER="microsoft (Microsoft Visual Studio 2013)"
EXPECTED_FREETYPE=2.5.3
Expand All @@ -87,17 +95,16 @@ elif echo "$SBOMFILE" | grep _x86-32_windows_; then
fi
elif echo "$SBOMFILE" | grep _mac_; then
# NOTE: mac/x64 native builds >=11 were using "clang (clang/LLVM from Xcode 10.3)"
EXPECTED_FREETYPE=Unknown
EXPECTED_COMPILER="clang (clang/LLVM from Xcode 15.0.1)"
EXPECTED_FREETYPE=2.13.2 # Bundled version
EXPECTED_COMPILER="clang (clang/LLVM from Xcode 15.2)"
# shellcheck disable=SC2166
if [ "${MAJORVERSION}" = "8" ] && echo "$SBOMFILE" | grep _x64_; then
EXPECTED_COMPILER="clang (clang/LLVM)"
EXPECTED_FREETYPE=2.9.1
fi
fi

[ "${MAJORVERSION}" -ge 20 ] && EXPECTED_FREETYPE=Unknown

[ "${MAJORVERSION}" -ge 20 ] && EXPECTED_FREETYPE=2.13.2 # Bundled version

RC=0
if echo "$SBOMFILE" | grep 'linux_'; then
Expand Down
Loading