Skip to content

Commit

Permalink
Fix SBOM glibc and gcc version info
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard committed Aug 7, 2023
1 parent 4450a58 commit 7f89b81
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f89b81

Please sign in to comment.