generate_sbom: add license mapping to rewrite licenses spdx conform #1006
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added functionalities to configure license mapping files (json-formatted) to do a rewrite of the licenses to write spdx conform ones into the generated document.
This is to handle non spdx conform license naming in packages taken from upstream without forking/fixing each package.
The mapping has to be part of the image sources/created rootfs (e.g. livebuild).
Example of a mapping file:
The mapping is activated by specifying the files in the project configuration:
The flag can be defined multiple times for different files if needed, the content of the files gets merged.
The files are defined in the BuildFlag with its path in the created rootfs.