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

build: Generated SBOM is once again NTIA compliant #161

Merged
merged 1 commit into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
QtTools: 'tools_ifw'
QtKey: "6.6.3-ifw46"
BuildType: RelWithDebInfo
cmakeConfigure: "cmake -S. -Bbuild -DDEMOS=ON -DQT_DEFAULT_MAJOR_VERSION=6 -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja"
cmakeConfigure: "cmake -S. -Bbuild -DDEMOS=ON -DQT_DEFAULT_MAJOR_VERSION=6 -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja -DSBOM_LINT=ON"
debianRequirments: "build-essential git zlib1g-dev cmake doxygen graphviz qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools qt6-declarative-dev qt6-base-dev libqt6svg6-dev qt6-base-dev-tools qt6-translations-l10n libqt6core5compat6-dev libgl1-mesa-dev rename devscripts ninja-build clang"
jobs:
precheck:
Expand Down
5 changes: 5 additions & 0 deletions cmake/sbom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ function(sbom_generate)
set(SBOM_GENERATE_PROJECT "${PROJECT_NAME}")
endif()

string(REGEX MATCH "^Package-" HAS_MATCH ${SBOM_GENERATE_PROJECT})
if("${HAS_MATCH}" STREQUAL "")
string(PREPEND SBOM_GENERATE_PROJECT "Package-")
endif()

if("${SBOM_GENERATE_SUPPLIER}" STREQUAL "")
set(SBOM_GENERATE_SUPPLIER "${SBOM_SUPPLIER}")
elseif("${SBOM_SUPPLIER_URL}" STREQUAL "")
Expand Down
Loading