From 7f89b8141dbbf4977356dbb7193c5f59739b4258 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Mon, 7 Aug 2023 11:38:13 +0100 Subject: [PATCH] Fix SBOM glibc and gcc version info Signed-off-by: Andrew Leonard --- sbin/build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sbin/build.sh b/sbin/build.sh index 698c5ac27..938957d08 100755 --- a/sbin/build.sh +++ b/sbin/build.sh @@ -928,9 +928,8 @@ cat ${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/${BUILD_CONFIG[O fi if [[ "$libc_type" == "musl" ]]; then - # This is the only way to print the musl version - #local MUSL_VERSION=$("/lib/libc.musl-x86_64.so.1" 2>&1 | grep "Version" | tr -s " " | cut -d" " -f2) - local MUSL_VERSION=$(ldd --version) + # Get musl build ldd version + local MUSL_VERSION=$(ldd --version | grep "Version" | tr -s " " | cut -d" " -f2) echo "Adding MUSL version to SBOM: ${MUSL_VERSION}" addSBOMMetadataTools "${javaHome}" "${classpath}" "${sbomJson}" "MUSL" "${MUSL_VERSION}" else