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
Open

Conversation

Scanteianu
Copy link
Contributor

also includes changes from #4121 but this is the way @andrew-m-leonard suggested for configure args in #3917 .

@github-actions github-actions bot added the documentation Issues that request updates to our documentation label Jan 30, 2025
Copy link

Thank you for creating a pull request!
If you have not done so already, please familiarise yourself with our Contributing Guidelines and FAQ, even if you have contributed to the Adoptium project before. GitHub actions will now run a set of jobs against your PR that will lint and unit test your changes. Keep an eye out for the results from these on the latest commit you submitted. For more information, please see our testing documentation.

@Scanteianu Scanteianu changed the title Md in SBOM Metadata Directly In SBOM Jan 30, 2025
@Scanteianu
Copy link
Contributor Author

so far...
added "configure_args" as "configure.txt", added CONFIGURE_ARGS as "CONFIGURE_ARGS"
unsure where to find "BUILD_CONFIGURATION_param", "openjdk_source",

@sxa @andrew-m-leonard might be useful to go through the metadata file, see what we need and what we don't. I would appreciate pointers to where to get the keys we need that we don't have

README.md Outdated
@@ -25,6 +25,8 @@ the "boot JDK" which should generally be one major version prior to the one
you are building (although one of the same major version will also work).
Note that the build variant defaults to HotSpot if omitted which builds from the same repositories as Temurin.

If you're using wsl, use the `--wsl` flag (ie: `./makejdk-any-platform.sh -J /usr/lib/jvm/java-21-openjdk-amd64 --wsl --create-sbom jdk21`).
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer to keep #4121 in it's own PR, so changes are indepenedent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the idea was that hopefully #4121 would go first, and then the diff of this PR would just be the changes here (will update branch). When they go in, they would be independent changes (I'm assuming squash-and-merge policy), so can be independently reverted or cherrypicked

Copy link
Member

Choose a reason for hiding this comment

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

Looks like the wsl one has been merged so we should be able to rebase this on top of master now too get those changes "removed" from this PR 😀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the diff is now updated, so if it's squashed and merged only the relevant changes will be in this pr

@@ -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"

@andrew-m-leonard
Copy link
Contributor

so far... added "configure_args" as "configure.txt", added CONFIGURE_ARGS as "CONFIGURE_ARGS" unsure where to find "BUILD_CONFIGURATION_param", "openjdk_source",

@sxa @andrew-m-leonard might be useful to go through the metadata file, see what we need and what we don't. I would appreciate pointers to where to get the keys we need that we don't have

We already have "openjdk source" SHA:

addSBOMComponentPropertyFromFile "${javaHome}" "${classpath}" "${sbomJson}" "${componentName}" "OpenJDK Source Commit" "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[TARGET_DIR]}/metadata/openjdkSource.txt"

and "Build Config" :
addSBOMComponentProperty "${javaHome}" "${classpath}" "${sbomJson}" "${componentName}" "Build Config" "${built_config}"

it does raise the issue of naming convention for these things.... maybe best to look at that in the "restructuring issue"

@sxa
Copy link
Member

sxa commented Feb 7, 2025

it does raise the issue of naming convention for these things.... maybe best to look at that in the "restructuring issue"

Yeah I suggest that we don't use spaces for the new Configure Args value as part of this PR, but we should look at the others as part of any future restructure (and definitely if we end up publishing an XML one - let's get that right from the start).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues that request updates to our documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants