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

update license lists from official spdx data #34

Merged
merged 1 commit into from
Jan 14, 2023
Merged

Conversation

elrayle
Copy link
Collaborator

@elrayle elrayle commented Jan 14, 2023

Description

Update licenses in spdxexp/license.go to the latest set of official spdx licenses.

Active licenses and deprecated licenses were extracted from spdx/license-list-data/json/licenses.json.

Exception licenses were extracted from spdx/license-list-data/json/exceptions.json.

Extraction Utility

A utility to extract the license ids from the official files was created. The following describes what it does, how to run it, and how to update go-spdx to use the updated ids.

Extracts license, deprecation, and exception ids from the official spdx license list data. The source data needs to be manually updated by copying the licenses.json file from https://github.com/spdx/license-list-data/blob/main/json/licenses.json and exceptions.json file from https://github.com/spdx/license-list-data/blob/main/json/exceptions.json.

After running the extract command, the license_ids.json, deprecated_ids.json, and exception_ids.json files will be overwritten with the extracted ids. These license ids can then be used to update the spdxexp/license.go file.

Command to run all extractions (run command from the /cmd directory):
  `go run . extract -l -e`

Usage options:
  -h: prints this help message
  -l: Extract license ids
  -e: Extract exception ids

Remaining Work

Update range data for licenses. This requires human analysis.

@elrayle elrayle requested a review from ajhenry as a code owner January 14, 2023 03:24
@elrayle elrayle force-pushed the elr/license-updates branch 2 times, most recently from 97950a3 to cc7c2ad Compare January 14, 2023 03:35
Update licenses in spdxexp/license.go to the latest set of [official spdx licenses](https://github.com/spdx/license-list-data).

Active licenses and deprecated licenses were extracted from [spdx/license-list-data/json/licenses.json](https://github.com/spdx/license-list-data/blob/main/json/licenses.json).

Exception licenses were extracted from [spdx/license-list-data/json/exceptions.json](https://github.com/spdx/license-list-data/blob/main/json/exceptions.json).

Update range data for licenses.  This requires human analysis.
@elrayle elrayle force-pushed the elr/license-updates branch from cc7c2ad to 442905e Compare January 14, 2023 03:41
@elrayle elrayle merged commit 9edaf20 into main Jan 14, 2023
@elrayle elrayle deleted the elr/license-updates branch January 14, 2023 03:42
@elrayle elrayle mentioned this pull request Feb 8, 2023
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

Successfully merging this pull request may close these issues.

1 participant