Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DOCS/new-license-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ If you don't feel like a cup of tea right now, you can run the `make validate-ca

### Handling Duplicate Licenses

The CI/CD pipeline will fail if it detects an existing license with matching license text. If this occurs, manually review the duplicate license. If this is expected (e.g. if the duplicate license is a deprecated version of the same license), add the following to the [expected-warnings](../expected-warnings) file:
The CI/CD pipeline will fail if it detects an existing license with matching license text. If this occurs, manually review the duplicate license. If this is expected (e.g. if the duplicate license is a deprecated version of the same license), add the following to the [expected-warnings.json](../expected-warnings.json) file:

```
,"Duplicates licenses: DUPLICATE_LICENSE_ID, MY_LICENSE_ID","Duplicates licenses: MY_LICENSE_ID, DUPLICATE_LICENSE_ID"
["DUPLICATE_LICENSE_ID", "MY_LICENSE_ID"],
```

where `DUPLICATE_LICENSE_ID` is the license ID of the duplicate license and `MY_LICENSE_ID` is the license ID of the license you are adding.
where `DUPLICATE_LICENSE_ID` is the license ID of the duplicate license and `MY_LICENSE_ID` is the license ID of the license you are adding. If the `DUPLICATE_LICENSE_ID` is already included in an existing list, add `MY_LICENSE_ID` to that same list.

If the duplicate license is not expected and you believe the licenses are indeed different, review the license XML for both licenses for any `<Optional>...` or `<Alt ...` tags that may cause a match.

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ STATIC_FILES_DEST = $(LICENSE_OUTPUT_DIR)/website/
.PHONY: validate-canonical-match
validate-canonical-match: licenseListPublisher-$(TOOL_VERSION).jar-valid $(TEST_DATA) $(FULL_TEST_DATA) $(LICENSE_OUTPUT_DIR)
echo Validating source files from $(LICENSE_SOURCE)
java -jar -DLocalFsfFreeJson=true -DlistedLicenseSchema="schema/ListedLicense.xsd" licenseListPublisher-$(TOOL_VERSION).jar LicenseRDFAGenerator '$(LICENSE_SOURCE:;=)' '$(LICENSE_OUTPUT_DIR)' 1.0 2000-01-01 $(TEST_DATA) expected-warnings $(FULL_TEST_DATA)
java -jar -DLocalFsfFreeJson=true -DlistedLicenseSchema="schema/ListedLicense.xsd" licenseListPublisher-$(TOOL_VERSION).jar LicenseRDFAGenerator '$(LICENSE_SOURCE:;=)' '$(LICENSE_OUTPUT_DIR)' 1.0 2000-01-01 $(TEST_DATA) expected-warnings.json $(FULL_TEST_DATA)

.PHONY: deploy-license-data
deploy-license-data: licenseListPublisher-$(TOOL_VERSION).jar-valid $(TEST_DATA) $(FULL_TEST_DATA)
Expand All @@ -36,7 +36,7 @@ deploy-license-data: licenseListPublisher-$(TOOL_VERSION).jar-valid $(TEST_DATA)
# Clean out the old data directories
find '$(LICENSE_OUTPUT_DIR)' -mindepth 1 -maxdepth 1 -name .git -prune -o -name .github -prune -o -type d -exec rm -rf {} \+
rm -f $(LICENSE_OUTPUT_DIR)/licenses.md
java -jar -DLocalFsfFreeJson=true -DlistedLicenseSchema="schema/ListedLicense.xsd" licenseListPublisher-$(TOOL_VERSION).jar LicenseRDFAGenerator '$(LICENSE_SOURCE_DIR)' '$(LICENSE_OUTPUT_DIR)' $(VERSION) $(RELEASE_DATE) $(TEST_DATA) expected-warnings $(FULL_TEST_DATA)
java -jar -DLocalFsfFreeJson=true -DlistedLicenseSchema="schema/ListedLicense.xsd" licenseListPublisher-$(TOOL_VERSION).jar LicenseRDFAGenerator '$(LICENSE_SOURCE_DIR)' '$(LICENSE_OUTPUT_DIR)' $(VERSION) $(RELEASE_DATE) $(TEST_DATA) expected-warnings.json $(FULL_TEST_DATA)
$(foreach f, $(STATIC_FILES), cp ${f} $(STATIC_FILES_DEST);)
git -C '$(LICENSE_OUTPUT_DIR)' add -A .
git config user.email "$(GIT_AUTHOR_EMAIL)"
Expand Down
1 change: 0 additions & 1 deletion expected-warnings

This file was deleted.

19 changes: 19 additions & 0 deletions expected-warnings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the functionality of the "ignore warnings" is to ignore all warnings, not just duplicate licenses (even if that is the only warnings being generated currently), suggest we change this from a JSON array to a JSON object with 2 properties:

  • duplicates
  • additionalWarnings

both would be arrays.

e.g.:

{
   "duplicates" : [ ["AGPL ...], ...],
   "additionalWarnings": []
}

["AGPL-1.0", "AGPL-1.0+", "AGPL-1.0-only", "AGPL-1.0-or-later"],
["AGPL-3.0", "AGPL-3.0+", "AGPL-3.0-only", "AGPL-3.0-or-later"],
["CAL-1.0", "CAL-1.0-Combined-Work-Exception"],
["GFDL-1.1", "GFDL-1.1+", "GFDL-1.1-only", "GFDL-1.1-or-later", "GFDL-1.1-invariants-only", "GFDL-1.1-invariants-or-later", "GFDL-1.1-no-invariants-only", "GFDL-1.1-no-invariants-or-later"],
["GFDL-1.2", "GFDL-1.2+", "GFDL-1.2-only", "GFDL-1.2-or-later", "GFDL-1.2-invariants-only", "GFDL-1.2-invariants-or-later", "GFDL-1.2-no-invariants-only", "GFDL-1.2-no-invariants-or-later"],
["GFDL-1.3", "GFDL-1.3+", "GFDL-1.3-only", "GFDL-1.3-or-later", "GFDL-1.3-invariants-only", "GFDL-1.3-invariants-or-later", "GFDL-1.3-no-invariants-only", "GFDL-1.3-no-invariants-or-later"],
["GPL-1.0", "GPL-1.0+", "GPL-1.0-only", "GPL-1.0-or-later"],
["GPL-2.0", "GPL-2.0+", "GPL-2.0-only", "GPL-2.0-or-later"],
["GPL-3.0", "GPL-3.0+", "GPL-3.0-only", "GPL-3.0-or-later"],
["HPND-sell-variant", "HPND-sell-variant-MIT-disclaimer-rev"],
["LGPL-2.0", "LGPL-2.0+", "LGPL-2.0-only", "LGPL-2.0-or-later"],
["LGPL-2.1", "LGPL-2.1+", "LGPL-2.1-only", "LGPL-2.1-or-later"],
["LGPL-3.0", "LGPL-3.0+", "LGPL-3.0-only", "LGPL-3.0-or-later"],
["MPL-2.0", "MPL-2.0-no-copyleft-exception"],
["OFL-1.0", "OFL-1.0-RFN", "OFL-1.0-no-RFN"],
["OFL-1.1", "OFL-1.1-RFN", "OFL-1.1-no-RFN"],
["SMLNJ", "StandardML-NJ"]
]
Loading