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

Add support for more license_expression fields #563

Closed
tdruez opened this issue Jun 27, 2024 · 5 comments
Closed

Add support for more license_expression fields #563

tdruez opened this issue Jun 27, 2024 · 5 comments

Comments

@tdruez
Copy link
Member

tdruez commented Jun 27, 2024

In particular declared_license_expression and other_license_expression following their addition in DejaCode.

@DennisClark
Copy link
Member

thanks for logging this issue @tdruez we definitely want support for the two new license fields in aboutcode-toolkit.

@chinyeungli
Copy link
Contributor

Questions:

  1. Do the declared_license_expression and other_license_expression also use the Scancode license key/expression, or can they be in other formats, such as a list or a string like 'MIT' (which is invalid, as it should be mit)?
  2. When I do the --fetch_license, should these licenses also be fetched and created?

@mjherzog
Copy link
Member

mjherzog commented Jul 1, 2024

These should be standard license expressions with either ScanCode or SPDX license ids (one or the other per expression - no mix & match). We will, of course, have other license names and "expressions" in Scan data, but not in ABCTK.

@chinyeungli
Copy link
Contributor

Another question, for the generated ABOUT file, should the new licenses also "group" into the "licenses"?
Current format

about_resource: test.c
name: test.c
license_expression: mit
declared_license_expression: isc
other_license_expression: mit-0
copyright: robot
licenses:
  - key: mit
    name: MIT License
    file: mit.LICENSE
    url: https://scancode-licensedb.aboutcode.org/mit.LICENSE
    spdx_license_key: MIT

Should it be something like:

about_resource: test.c
name: test.c
license_expression: mit
declared_license_expression: isc
other_license_expression: mit-0
copyright: robot
licenses:
  - key: mit
    name: MIT License
    file: mit.LICENSE
    url: https://scancode-licensedb.aboutcode.org/mit.LICENSE
    spdx_license_key: MIT
  - key: isc
    name: ISC License
    file: isc.LICENSE
    url: https://scancode-licensedb.aboutcode.org/isc.LICENSE
    spdx_license_key: ISC
  - key: mit-0
    name: MIT-0-Clause
    file: mit-0.LICENSE
    url: https://scancode-licensedb.aboutcode.org/mit-0.LICENSE
    spdx_license_key: MIT-0

chinyeungli added a commit that referenced this issue Jul 8, 2024
 * Updated changelog
 * Support "declared_license_expression" and "other_license_expression"
 * Added test code
 * Update doc (missing description)

Signed-off-by: Chin Yeung Li <tli@nexb.com>
chinyeungli added a commit that referenced this issue Jul 8, 2024
Signed-off-by: Chin Yeung Li <tli@nexb.com>
@chinyeungli
Copy link
Contributor

This is fixed

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

4 participants