Skip to content

feat: clean license doubles #571

Closed
Closed

Description

@andife

Hi,
I wonder if there are tools possibilities to clean up (or even merge) the generated cyclonedx-files a bit...

my generated file contains the following fragments:

e.g. [{'license': {'name': 'Apache 2.0'}}, {'license': {'name': 'Apache Software License'}}]
or
[{'license': {'name': 'MIT'}}, {'license': {'name': 'MIT License'}}]
or
[{'license': {'name': 'MPL-2.0'}}, {'license': {'name': 'Mozilla Public License 2.0 (MPL 2.0)'}}]

In my case one entry would be enough for me... Best would be the "SPDX ID"

Activity

  1. jkowalleck commented on Aug 30, 2023

    @jkowalleck
    Member

    The requested features should be fixed in the release of the upcoming version 4 of this tool.

  2. andife commented on Aug 30, 2023

    @andife
    ContributorAuthor

    Hi, I wonder how that works?

    I checked out the branch https://github.com/CycloneDX/cyclonedx-python/tree/dev/4.x.x and installed it with pip install -e . A build of sbom with version 4 with the option "-e" still gives me the exact number of corresponding multiple entries (does not matter the version).

    The packages are for example: tqdm, toml, scipy, prometheus-client, opencv-python, PyYAML

  3. jkowalleck commented on Aug 30, 2023

    @jkowalleck
    Member

    thank you for the report.

    The requested features should be fixed in the release of the upcoming version 4 of this tool.

    should ...
    maybe it is broken.

    issue was reopened for further investigation.

  4. added this to the 4.0.0 milestone on Aug 30, 2023
  5. jkowalleck commented on Aug 30, 2023

    @jkowalleck
    Member

    @andife , could you provide a reproducible setup? for testing purposes
    which steps need to be done to reproduce your results?

  6. andife commented on Aug 30, 2023

    @andife
    ContributorAuthor
  7. jkowalleck commented on Aug 31, 2023

    @jkowalleck
    Member

    found some "doubled" licenses:

        {
          "author": "Jeff Forcier",
          "bom-ref": "116dab0b-5e60-480a-bbc2-49bfacc90686",
          "licenses": [
            { "license": { "name": "BSD" } },
            { "license": { "name": "BSD License" } }
          ],
          "name": "invoke",
          "purl": "pkg:pypi/[email protected]",
          "type": "library",
          "version": "1.7.3"
        }

    found the SPDX detection still not working

  8. added
    bug
    on Aug 31, 2023
  9. changed the title [-]Clean-Up of cyclonedx-files a bit?[/-] [+]fix: license doubles & feat:SPDX license detection[/+] on Aug 31, 2023
  10. changed the title [-]fix: license doubles & feat:SPDX license detection[/-] [+]fix: license doubles & feat: SPDX license ID instead of named licenses[/+] on Aug 31, 2023
  11. jkowalleck commented on Aug 31, 2023

    @jkowalleck
    Member

    proper SPDX license detection is a feature of #459
    this issue should be a bugfix for the duplicates. it might depend on #459

  12. changed the title [-]fix: license doubles & feat: SPDX license ID instead of named licenses[/-] [+]fix: license doubles[/+] on Aug 31, 2023
  13. changed the title [-]fix: license doubles[/-] [+]feat: clean license doubles[/+] on Aug 31, 2023
  14. added
    enhancement
    on Aug 31, 2023
  15. jkowalleck commented on Aug 31, 2023

    @jkowalleck
    Member

    after #459 was implemented,
    it will still happen that some licenses are duplicate, since there is no fuzzy detection for license names, yet

  16. jkowalleck commented on Aug 31, 2023

    @jkowalleck
    Member

    remember: the "license" field may dome from multiple sources:

    they solve different purposes, and one allows free text ...

  17. removed
    bug
    on Aug 31, 2023
  18. jkowalleck commented on Sep 6, 2023

    @jkowalleck
    Member

    Cleaning the license doubles will not happen, sorry. some of the information is sourced from a free text where package authors may write whatever they want.

    The SPDX ids are mapped correctly now, thanks to #576.
    The SPDX expressions are detected correctly now, thanks to #578

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions