-
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
Open
robn
wants to merge
13
commits into
openzfs:master
Choose a base branch
from
robn:spdx-license-tags
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.