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

Adding debian support to generate_sbom #997

Merged
merged 7 commits into from
May 3, 2024

Conversation

cschneemann
Copy link
Contributor

Added support for debian images to generate_sbom.
It checks if it is a debian based image by evaluating the os-release file.

It introduces some new BuildFlags to configure "special" behaviour:

spdx-declared-license:NOASSERTION licenseDeclared in spdx info for a package is set to "NOASSERATION",
if not set the found license from the package information is used (like for "licenseConcluded").

The license information is taken from the package's copyrightfile.

The generation of spdx' file section can be disabled, if just the package information is wanted.
This can be switched by buildflag "spdx-files-generation". To switch it off it has to be set to "no":
spdx-files-generation:no.
Default is to generate also the files information. This option is just available in the deb-handling. No changes to rpm made here.

As debian packages does not have a vendor information this information is taken from the
OBS vendor macro/OBS instance name.

Added the sbom generation also to build-receipe-livebuild for a first usage.

Added support for debian images to generate_sbom.
It checks if it is a debian based image by evaluating the os-release file.

It introduces some new BuildFlags to configure "special" behaviour:

`spdx-declared-license:NOASSERTION` licenseDeclared in spdx info for a package is set to "NOASSERATION",
if not set the found license from the package information is used (like for "licenseConcluded").

The license information is taken from the package's copyrightfile.

The generation of spdx' file section can be disabled, if just the package information is wanted.
This can be switched by buildflag "spdx-files-generation". To switch it off it has to be set to "no":
`spdx-files-generation:no'. Default is to generate also the files information.

As debian packages does not have a vendor information this information is taken from the
OBS vendor macro/OBS instance name.
Fixing usage of "chroot" in name-field, instead generating a nice
looking basename
@mlschroe
Copy link
Member

mlschroe commented May 3, 2024

What's with the "just join licenses" commit? Why is it needed? I think it was correct before, now there is $ret{'license'} = @license_uniq[0]; which doesn't seem to be good perl...

@cschneemann
Copy link
Contributor Author

What's with the "just join licenses" commit? Why is it needed? I think it was correct before, now there is $ret{'license'} = @license_uniq[0]; which doesn't seem to be good perl...

deleted my last comment, because it was "stupid".. The behaviour I wanted to fix with this was fixed by another change.

@mlschroe mlschroe merged commit 1033235 into openSUSE:master May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants