From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Ralf Glaser <glaser@iotmaxx.de>
Cc: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] creating a valid SPDX-SBOM
Date: Fri, 27 Jun 2025 08:56:51 +0200 [thread overview]
Message-ID: <aF5As3SrHbAY_TbS@pengutronix.de> (raw)
In-Reply-To: <BEZP281MB33612D7F1BD7C9B60A9B1DF9A56DA@BEZP281MB3361.DEUP281.PROD.OUTLOOK.COM>
On Tue, Jun 03, 2025 at 03:42:13PM +0000, Ralf Glaser wrote:
> My current goal is to use ptxdist to create a SPDX-SBOM that is
> recognized by https://tools.spdx.org/app/validate/ as valid.
> I have already sent patches to remedy the demands of spdx.org that go
> beyond the JSON schema. Now I'm trying to figure out how to handle not
> SPDX recognized licenses:
>
> public_domain
> ==========
> - no license file to copy from
> - set to NOASSERTION seems inaccurate
> option: create a LicenseRef-PublicDomain which is added and referenced
> whenever a public_domain licenses package is included and add some clever
> text for it (proposals welcome)
Hmm, do you know how this is handled elsewhere?
> unknown
> ======
> This is uses ambiguously in the ptxdist rules and could mean:
> - "unknown": setting it to NOASSERTION seems accurate then
> - "for some reason i did not specify the correct license": setting it to
> NOASSERTION would hide this
> option: set to NOASSERTION but issue a warning, possibly find a term that
> says 'NOASSERTION is what i really want' to get rid of the warnings
'unknown' means, nobody looked at the package. So the correct thing is
always to check the source and set the correct identifier or expression.
> other licenses
> =========
> This is the tricky one.
> option: use an additional variable like <pkg>_LICENSE_FILES_NONSPDX
> which contains the usual file://SOMEFILE;md5=abcd syntax and is
> concatenated to <pkg>_LICENSE_FILES so nothing breaks and pick this up
> later to create a set of LicenseRef-<pkg>-# licenses that can be
> referenced by the package. Seems like an ugly hack though...
So something that I've been thinking about but would be quite a bit of work
is this:
For each file in _LICENSE_FILES, allow '...;license=something'. If that
'something' is not a valid spdx identifier we can create a LicenseRef-.
With that, we just need file that matches any unknown license.
That would help in other ways as well. e.g. we could validate, that we have
the text for each license specified in _LICENSE.
For some packages that would be trivial. For others with license files that
contain a long list of licenses, that would mean splitting the file with
startline=/endline=, so quite a bit more work.
Doing that for all packages would be a lot of work, but we could start with
the ones where it is needed and require it for new packages.
Michael
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2025-06-27 6:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 15:42 Ralf Glaser
2025-06-27 6:56 ` Michael Olbrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aF5As3SrHbAY_TbS@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=glaser@iotmaxx.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox