public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Keiya Nobuta" <nobuta.keiya@fujitsu.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/3] create-spdx: Fix "licenseDeclared" shows weird value
Date: Wed, 19 Oct 2022 19:23:57 -0700	[thread overview]
Message-ID: <17154.1666232637937411000@lists.openembedded.org> (raw)
In-Reply-To: <CAJdd5GYUxEHhZGNfj_7FL9_=7KF158kLoKmuSmEZR6q+5WdeKw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2122 bytes --]

On Thu, Oct 20, 2022 at 06:17 AM, Joshua Watt wrote:

> 
> On Wed, Oct 19, 2022 at 6:08 AM Keiya Nobuta <nobuta.keiya@fujitsu.com>
> wrote:
> 
>> Fixed an issue that "licenseDeclared" shows weird value, for example
>> `busybox.spdx.json` shows like:
>> 
>> "GPL-2.0-only AND DocumentRef-recipe-busybox:LicenseRef-bzip2-1.0.4"
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> unwanted value
> 
> I don't believe this is unwanted: the license text lives in another
> document (ecipe-busybox.spdx.json) so we need to indicate that here

Thanks for your comment.
I was misunderstanding, so I'm withdrawing this patch.

The reason I got it wrong was because the SPDX validation tool[1]
gave me the following message:

```
The following warning(s) were raised: [Invalid package
declared license:Incompatible type for property member: class
org.spdx.library.model.license.AnyLicenseInfo]
```

But this is probably due to a flaw in the validation tool. So I checked the
SPDX specification[2], and understood that it complies with the user defined
license reference.

[1] https://tools.spdx.org/app/validate/
[2] https://spdx.github.io/spdx-spec/SPDX-license-expressions/

> 
> 
>> Signed-off-by: Keiya Nobuta <nobuta.keiya@fujitsu.com>
>> ---
>> meta/classes/create-spdx.bbclass | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/meta/classes/create-spdx.bbclass
>> b/meta/classes/create-spdx.bbclass
>> index c190ad3889..1661c7d2f0 100644
>> --- a/meta/classes/create-spdx.bbclass
>> +++ b/meta/classes/create-spdx.bbclass
>> @@ -534,7 +534,7 @@ python do_create_spdx() {
>> recipe_ref.checksum.checksumValue = doc_sha1
>> 
>> sources = collect_dep_sources(d, dep_recipes)
>> - found_licenses = {license.name:recipe_ref.externalDocumentId + ":" +
>> license.licenseId for license in doc.hasExtractedLicensingInfos}
>> + found_licenses = {license.name: license.licenseId for license in
>> doc.hasExtractedLicensingInfos}
>> 
>> if not recipe_spdx_is_native(d, recipe):
>> bb.build.exec_func("read_subpackage_metadata", d)
>> --
>> 2.25.1
>> 
>> 
>> 
> 
>

[-- Attachment #2: Type: text/html, Size: 2497 bytes --]

  reply	other threads:[~2022-10-20  2:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 10:57 [PATCH 1/3] create-spdx: Remove ";name=..." for downloadLocation Keiya Nobuta
2022-10-19 10:57 ` [PATCH 2/3] create-spdx: Fix "licenseDeclared" shows weird value Keiya Nobuta
2022-10-19 21:17   ` [OE-core] " Joshua Watt
2022-10-20  2:23     ` Keiya Nobuta [this message]
2022-10-20 17:36     ` Alberto Pianon
2022-10-19 10:57 ` [PATCH 3/3] gnutls: Unified pakcage names to lower-case Keiya Nobuta
2022-10-19 14:57   ` [OE-core] " Khem Raj
2022-10-19 15:30   ` Ross Burton

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=17154.1666232637937411000@lists.openembedded.org \
    --to=nobuta.keiya@fujitsu.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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