Repository navigation
sbom: move to wolfssl-compliance-tooling and pin its current master #964
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 8a96c64f9dc022fa136682a18f23860196de8610 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # cmake -P script: install SBOM artifacts. | ||
| # DESTDIR is read from the environment when this script runs, so | ||
| # DESTDIR=/staging cmake --build . --target install-sbom stages the files. | ||
| # | ||
| # The CycloneDX and SPDX JSON files must exist. The tag-value file is | ||
| # copied only when the caller set its path and the file exists. | ||
|
|
||
| if(NOT DEFINED WOLFSSL_COMPLIANCE_TOOLING_INSTALL_DIR OR WOLFSSL_COMPLIANCE_TOOLING_INSTALL_DIR STREQUAL "") | ||
| message(FATAL_ERROR "install-sbom.cmake: WOLFSSL_COMPLIANCE_TOOLING_INSTALL_DIR is required") | ||
| endif() | ||
|
|
||
| include("${CMAKE_CURRENT_LIST_DIR}/sbom-paths.cmake") | ||
| wolfssl_compliance_tooling_sbom_resolve_outputs(_cdx _spdx _tv) | ||
|
|
||
| # file(INSTALL) applies DESTDIR itself. Prepending it here would stage | ||
| # the files twice. file(MAKE_DIRECTORY) does not apply DESTDIR, so the | ||
| # directory is created at the staged path. | ||
| if(DEFINED ENV{DESTDIR}) | ||
| set(_destdir "$ENV{DESTDIR}") | ||
| else() | ||
| set(_destdir "") | ||
| endif() | ||
| set(_staged "${_destdir}${WOLFSSL_COMPLIANCE_TOOLING_INSTALL_DIR}") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On Windows, Stripping a leading |
||
|
|
||
| if(NOT EXISTS "${_cdx}") | ||
| message(FATAL_ERROR "install-sbom.cmake: missing CycloneDX file ${_cdx}") | ||
| endif() | ||
| if(NOT EXISTS "${_spdx}") | ||
| message(FATAL_ERROR "install-sbom.cmake: missing SPDX file ${_spdx}") | ||
| endif() | ||
|
|
||
| file(MAKE_DIRECTORY "${_staged}") | ||
| file(INSTALL "${_cdx}" "${_spdx}" DESTINATION "${WOLFSSL_COMPLIANCE_TOOLING_INSTALL_DIR}") | ||
| if(NOT _tv STREQUAL "" AND EXISTS "${_tv}") | ||
| file(INSTALL "${_tv}" DESTINATION "${WOLFSSL_COMPLIANCE_TOOLING_INSTALL_DIR}") | ||
| endif() | ||
|
|
||
| message(STATUS "Installed SBOM to ${_staged}") | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new helper call also adds
install-sbomanduninstall-sbom, but nothing in test-sbom.yml runs them. Could the CMake step runDESTDIR=$PWD/stage cmake --build build-sim --target install-sbom, check both documents land under the stage dir, then rununinstall-sbomand check they're gone?