-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 SPDX license tags and checking tool #17001
base: master
Are you sure you want to change the base?
Conversation
8bc3e50
to
35ea0f5
Compare
For the curious:
|
I manually tested with two fake files. The changes have to be in your commit as the PR description mentions, but it worked correctly:
|
35ea0f5
to
62412d5
Compare
FYI, if you were to remove all the exceptions and overrides in |
f0379df
to
50d5bfc
Compare
50d5bfc
to
338f2b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for helping to somewhat clarify the situation and adding a tool for this.
338f2b1
to
9960185
Compare
Last push rebased to master and conflicts resolved. |
9960185
to
79c7608
Compare
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
SPDX have repeatedly rejected the creation of a tag for a public domain dedication, as not all dedications are clear and unambiguious in their meaning and not all jurisdictions permit relinquishing a copyright anyway. A reasonably common workaround appears to be to create a local (project-specific) identifier to convey whatever meaning the project wishes it to. To cover OpenZFS' use of third-party code with a public domain dedication, we use this custom tag. Further reading: - https://github.com/spdx/old-wiki/blob/main/Pages/Legal%20Team/Decisions/Dealing%20with%20Public%20Domain%20within%20SPDX%20Files.md - https://spdx.github.io/spdx-spec/v2.3/other-licensing-information-detected/ - https://cr.yp.to/spdx.html Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris <[email protected]>
79c7608
to
bde3a12
Compare
Motivation and Context
After another fun cycle of OpenZFS licensing opinions being shared, I decided I would like to better understand what our licensing situation actually is, with a view to maybe someday setting a clear policy for new contributions and being able to enforce it.
A reasonable place to start is to add SPDX license identifier tags to every source file, and then write a program to enforce these for new files.
Description
Most of this PR is adding license tags to files that have clear and unambiguous license headers. It's arranged as multiple commits, but that's mostly a side effect of my method, which was a glorified search-and-replace.
The final commit adds a program called
spdxcheck
, to be run as part ofcheckstyle
. This interrogates git for a canonical file list, searches them all for license tags, then decides if they have the correct license tag based on a number of factors. It reports on:I've documented a lot of this in
spdxcheck
itself, so I won't repeat it all here. It's sort of written with an eye towards a license policy that doesn't currently exist, but would likely say something like: we prefer X, we tolerate Y, and in these specific places, these different rules apply.One important thing to note is that this PR is not trying to change any licenses, but rather reflect what's already there. Along the way, I found that we have quite a few files that don't have clear licenses (either ambiguous or omitted entirely), and many that are "wrong" for what they are, usually either GPL code in the core or FreeBSD platform code, or CDDL code in the Linux platform code. So,
spdxcheck
is carrying a lot of exclusions and overrides that I intend to sort out, but that will take time, as it's going to involve a lot of study of the history and a lot of actually asking original authors to clarify.How Has This Been Tested?
No code changes.
spdxcheck
was developed in tandem with applying tags to files and building out exception lists, until it ran clean.Types of changes
Checklist:
Signed-off-by
.