mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] report/cyclonedx_sbom: add propietary to ignore list
Date: Thu,  6 Nov 2025 12:31:06 +0100	[thread overview]
Message-ID: <20251106113108.2344624-1-m.grzeschik@pengutronix.de> (raw)

Some packages in customer BSPs have internaly set proprietary in their
license tag. Those packages should be ignored in the license parsing.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 scripts/report/cyclonedx_sbom.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/report/cyclonedx_sbom.py b/scripts/report/cyclonedx_sbom.py
index 70bf7ab7a..594824f3f 100644
--- a/scripts/report/cyclonedx_sbom.py
+++ b/scripts/report/cyclonedx_sbom.py
@@ -72,7 +72,7 @@ class CycloneDXSbomGenerator(SbomGenerator):
         )
 
         if licenses := pkg.get('licenses', None):
-            if licenses != 'ignore':
+            if licenses != 'ignore' and licenses != 'proprietary':
                 component.licenses = [
                     self.lc_factory.make_from_string(licenses)]
 
@@ -93,7 +93,7 @@ class CycloneDXSbomGenerator(SbomGenerator):
                     lic.url = prefix + file_path
                 license_list.append(lic)
             component.evidence = ComponentEvidence(licenses=license_list)
-        elif licenses != 'ignore' and not parent:
+        elif licenses != 'ignore' and licenses != 'proprietary' and not parent:
             print(f'Warning: missing license-files for "{pkg_name}"')
 
         if urls := pkg.get('url', None):
-- 
2.47.3




             reply	other threads:[~2025-11-06 11:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06 11:31 Michael Grzeschik [this message]
     [not found] ` <GVXPR03MB1120133FA7FF367A45F8CFB4CF4C2A@GVXPR03MB11201.eurprd03.prod.outlook.com>
2025-11-06 13:10   ` Michael Grzeschik

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=20251106113108.2344624-1-m.grzeschik@pengutronix.de \
    --to=m.grzeschik@pengutronix.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