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

Inconsistency of declared-licenses_processed in result.yml and reports like Webapp / evaluated-model.json #9537

Open
MNesche opened this issue Dec 3, 2024 · 0 comments
Labels
bug Issues that are considered to be bugs reporter About the reporter tool

Comments

@MNesche
Copy link

MNesche commented Dec 3, 2024

Describe the bug

If there is multiple declared licenses in a package, separated by comma, the result.yml of ORT declares an OR-Operator in declared_licenses_processed.
The report of the same result file, overwrites this value and declares an AND-Operator instead.
This leads to unnecessary license incompatibilities.

To Reproduce

Steps to reproduce the behavior:

  1. Do a full ORT run with a package that got multiple licenses declared, i.e. Maven:org.glassfish.jersey.core:jersey-common:3.0.15
    (Apache License, 2.0, EPL 2.0, Public Domain, The GNU General Public License (GPL), Version 2, With Classpath Exception)
  2. Check the result.yml under declared_licenses_processed for this package.
    The value will be: "Apache-2.0 OR EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR LicenseRef-scancode-public-domain-disclaimer"
  3. Do a report as Webapp or evaluated-model.json
  4. See the Licenses for this package.
    The value will be: "Apache-2.0 AND EPL-2.0 AND LicenseRef-scancode-public-domain-disclaimer AND GPL-2.0-only WITH Classpath-exception-2.0"

Expected behavior

Same as in the result.yml, otherwise it's not consistent if the result.yml is the leading part in case of license declaration.
Apache-2.0 OR EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR LicenseRef-scancode-public-domain-disclaimer

Console / log output

result.yml:

    - id: "Maven:org.glassfish.jersey.core:jersey-common:3.0.15"
      purl: "pkg:maven/org.glassfish.jersey.core/[email protected]"
      authors:
      - "Eclipse Foundation"
      - "Oracle Corporation"
      declared_licenses:
      - "Apache License, 2.0"
      - "EPL 2.0"
      - "Public Domain"
      - "The GNU General Public License (GPL), Version 2, With Classpath Exception"
      declared_licenses_processed:
        spdx_expression: "Apache-2.0 OR EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0\
          \ OR LicenseRef-scancode-public-domain-disclaimer"

evaluated-model.json:

    "id" : "Maven:org.glassfish.jersey.core:jersey-common:3.0.15",
    "is_project" : false,
    "definition_file_path" : "",
    "purl" : "pkg:maven/org.glassfish.jersey.core/[email protected]",
    "authors" : [ "Eclipse Foundation", "Oracle Corporation" ],
    "declared_licenses" : [ 41, 30, 44, 47 ],
    "declared_licenses_processed" : {
      "spdx_expression" : "Apache-2.0 AND EPL-2.0 AND LicenseRef-scancode-public-domain-disclaimer AND GPL-2.0-only WITH Classpath-exception-2.0",

Environment

Output of the ort requirements -l commands command:

<copy & paste console output to here; no screenshots please>

Or manually specify:

  • ORT version: 30.0.0 but tested also with 42.0.0
  • Java version: 21
  • OS: Windows

And specify (relevant parts of) your ORT configuration (config.yml):

nothing specific

Additional context

In this file, there's a statement, why the Operator should be an OR instead of an AND:

// See http://maven.apache.org/ref/3.6.3/maven-model/maven.html#project which says: "If multiple licenses
// are listed, it is assumed that the user can select any of them, not that they must accept all."

@MNesche MNesche added bug Issues that are considered to be bugs to triage Issues that need triaging labels Dec 3, 2024
@sschuberth sschuberth added reporter About the reporter tool and removed to triage Issues that need triaging labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are considered to be bugs reporter About the reporter tool
Projects
None yet
Development

No branches or pull requests

2 participants