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

Metadata Directly In SBOM #4122

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
9 changes: 7 additions & 2 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ configureDevKitConfigureParameter() {
addConfigureArg "--with-devkit=" "${BUILD_CONFIG[ADOPTIUM_DEVKIT_LOCATION]}"
fi
fi
}
}

# Configure the boot JDK
configureBootJDKConfigureParameter() {
Expand Down Expand Up @@ -1121,6 +1121,11 @@ generateSBoM() {
addSBOMComponentPropertyFromFile "${javaHome}" "${classpath}" "${sbomJson}" "${componentName}" "makejdk_any_platform_args" "${BUILD_CONFIG[WORKSPACE_DIR]}/config/makejdk-any-platform.args"
# Add make_command_args JDK Component Property
addSBOMComponentPropertyFromFile "${javaHome}" "${classpath}" "${sbomJson}" "${componentName}" "make_command_args" "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[TARGET_DIR]}/metadata/makeCommandArg.txt"
# Add CONFIGURE_ARGS property
addSBOMComponentProperty "${javaHome}" "${classpath}" "${sbomJson}" "${componentName}" "Configure Args" "${CONFIGURE_ARGS}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although we don't strictly have a naming convention yet for the SBOM properties, i think we should follow roughly what's already there, and use a property name with lowercase , no spaces and use underscores, eg."configure_args", "configure_txt"

# Add configure.txt JDK Component Property
addSBOMComponentPropertyFromFile "${javaHome}" "${classpath}" "${sbomJson}" "${componentName}" "configure.txt" "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[TARGET_DIR]}/metadata/configure.txt"

done


Expand All @@ -1137,7 +1142,7 @@ generateSBoM() {
local openjdkSrcDir="${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}"

# strace analysis needs to know the bootJDK and optional local DevKit/Toolchain, as these versions will
# be present in the analysis and not necessarily installed as packages
# be present in the analysis and not necessarily installed as packages
local devkit_path=$(getConfigureArgPath "--with-devkit")
local cc_path=$(getCCFromSpecGmk)
if [[ -n "${cc_path}" ]]; then
Expand Down
Loading