Skip to content

Unify license mappings and make them configurable #10498

@sschuberth

Description

@sschuberth

ORT currently has multiple license mappings, of which only some are configurable:

  1. SpdxSimpleLicenseMapping
  • Map simple licenses or deprecated licenses (sometimes with license exceptions) to SpdxSingleLicenseExpression.
  • Hard-coded, not configurable.
  • Used mostly in DeclaredLicenseProcessor, but also in e.g. the FossId scanner.
  1. SpdxDeclaredLicenseMapping
  • Map declared licenses to SpdxExpression.
  • Hard-coded, not configurable.
  • Used exclusively in DeclaredLicenseProcessor.
  1. detectedLicenseMapping
  • Map SpdxExpressions from scanners.
  • Configurable in the global config.yml.
  • Originally introduced to correct licenses returned by FossId.

As far as unification is concerned, an open question is whether we need to / it still makes sense to distinguish between "simple" and "declared" license mappings. Further, does it make sense to have a different mapping for "detected" licenses (scanner phase) vs "declared" licenses (analyzer phase).

My currently thinking is that if scanner return non-SPDX licenses, ORT should turn these into LicenseRef-<scanner>-... licenses anyway, and when having such a prefix there would be no clash with declared licenses, meaning mappings of declared and detected licenses could be combined into a single (configurable) map (with safe defaults).

Metadata

Metadata

Assignees

No one assigned

    Labels

    configurationAbout configuration topicsocctetIssues that are relevant for https://occtet.eu/

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions