Node.js: Check that License field is synced with bundled licenses #1525
No reviewers
Labels
No labels
announce
bootstrap
Closed As
accepted
Closed As
duplicate
Closed As
exceptionexpired
Closed As
fixed
Closed As
invalid
Closed As
nothingtodo
Closed As
permanentexception
Closed As
rejected
Closed As
temporaryexception
Closed As
wontfix
cmake
committee
draftneeded
hasdraft
meeting
meson
needinfo
Priority
In Committee
Priority
Needs Review
Priority
Waiting For Reporter
rust
writeup
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
packaging/guidelines!1525
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nodejs-licence-check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It would be easy to overlook a change/addition to the bundled licences, so suggest an automated check that they’re still as specified in the
.spec.Just
jqplease.IMO this should be made into a macro in nodejs-packaging, and the dependency added there.
Note that the current implementation is also a bit simplistic, and will break as soon as one of the components is dual-licensed (among other things).
join(" AND ")only works for simple cases like "MIT" or "BSD-3-Clause" but it is not uncommon for projects to be dual-licensed these days (likeMIT OR Apache-2.0), and the simple "concatenate with" AND "" will result in broken SPDX expressions, and cannot match the License tag of the package (or rather, it shouldn't - because if it did, then the package's License tag would be wrong, too).It would be good to make a more robust implementation (i.,e., not just simple string " AND " joining) and put it in a macro (like yselkowitz suggested) instead of copying long
jqinvocations into the Guidelines and then every specfile.In case it helps, the https://github.com/aboutcode-org/license-expression Python library is what go-vendor-tools uses to combine and compare license expressions, and it's worked pretty well for us.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.