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

Package file name may be incorrect in SPDX output for d2d projects with ABOUT files #1076

Closed
pombredanne opened this issue Feb 11, 2024 · 1 comment

Comments

@pombredanne
Copy link
Member

I see for instance this snippet in an SPDX output:

 "packages": [
    {
      "name": "apache-tomcat",
      "SPDXID": "SPDXRef-scancodeio-discoveredpackage-689de760-7611-4d26-8fa7-2dcfee8440ac",
      "downloadLocation": "https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.82/bin/apache-tomcat-9.0.82.tar.gz",
      "licenseConcluded": "Apache-2.0 AND bzip2-1.0.6 AND CDDL-1.0 AND CPL-1.0 AND EPL-1.0 AND LZMA-exception AND Zlib",
      "copyrightText": "Copyright 1999-2023 The Apache Software Foundation",
      "filesAnalyzed": false,
      "versionInfo": "9.0.82",
      "licenseDeclared": "Apache-2.0 AND bzip2-1.0.6 AND CDDL-1.0 AND CPL-1.0 AND EPL-1.0 AND LZMA-exception AND Zlib",
      "packageFileName": "*tomcat-9.0.82/*",
      "externalRefs": [
        {
          "referenceCategory": "PACKAGE-MANAGER",
          "referenceType": "purl",
          "referenceLocator": "pkg:generic/apache-tomcat@9.0.82"
        }
      ],

This came from a d2d pipeline with an ABOUT file with this:

about_resource:  "*tomcat-9.0.82/*"

https://spdx.github.io/spdx-spec/v2.3/package-information/#74-package-file-name-field

The field is optional, and makes not much sense at scale as a package can have one or more paths or files or archives with includes and excludes and the name of its compressed archive has usually little value or bearing on what we see on disk.

I think it would be better to exclude packageFileName entirely from the SPDX output as it is not well specified and not practically usable for actual real life cases.

tdruez added a commit that referenced this issue Feb 14, 2024
Signed-off-by: tdruez <tdruez@nexb.com>
@tdruez
Copy link
Member

tdruez commented Feb 14, 2024

27480f5

@tdruez tdruez closed this as completed Feb 14, 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

No branches or pull requests

2 participants