-
Notifications
You must be signed in to change notification settings - Fork 260
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
chore: add SPDX licensing for snippets and files missing attribution #1528
base: main
Are you sure you want to change the base?
Conversation
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.
The reuse FAQ entry on this is,
Can I license only a part of a file as being under a different license?
The short answer is that yes, you can, but no, there is no standard way for REUSE to recognize this. If you have a small segment of a file that is licensed differently, you should list that license under a separate SPDX-License-Identifier tag in the header.
You can use your own comments to specify which segment is separately licensed. For instance: “The class Foo is copied from project Bar and licensed under MIT. All changes are licensed under GPL-3.0-or-later.”
A possible way to circumvent the problem is to extract the segment from the file, and to keep it in its own file.
I think the header suggestion is reasonable -- in addition to marking the sections themselves, any embedded alternate licenses should probably be included in the header as well.
src/service/plugins/contacts.js
Outdated
/* SPDX-SnippetBegin | ||
* SPDX-License-Identifier: MIT | ||
* SPDX-SnippetCopyrightText: Mathias Bynens | ||
* SPDX-SnippetComment: https://github.com/mathiasbynens/quoted-printable/blob/master/src/quoted-printable.js | ||
*/ |
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.
For instance, this file should probably cause the reuse lint
check to fail, because the MIT license is not currently installed in /LICENSES/
. The path to that would seem to be making the header something like,
// SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect
//
// SPDX-License-Identifier: GPL-2.0-or-later
//
// License for _decodeQuotedPrintable():
// SPDX-License-Identifier: MIT
// SPDX-SnippetCopyrightText: Mathias Bynens
// SPDX-SnippetComment: https://github.com/mathiasbynens/quoted-printable/blob/master/src/quoted-printable.js
...I think that could work... (Well, I just tested, and it definitely does work to make reuse lint
fail until the MIT license file is downloaded into the repo.)
Whether we then still duplicate all of that info in both places, limit the header addition to just the extra license identifier, or move the bulk of it up to the header and limit the local comment to the SPDX-Snippet...
markers and a reference... any of those seems reasonable enough to me.
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.
Either's fine by me. REUSE won't find things it doesn't know about anyways, so having the snippet outside the header seems relatively moot.
There's also SDPX-SnippetLineRange: <start>:<finish>
that can be used in the header, although REUSE probably doesn't recognize that field either.
6eeb1ff
to
31b1686
Compare
31b1686
to
10f4c84
Compare
I'll need to revisit this sometime in the future, unless someone else wants to take it over. The latest REUSE linter has some issues, so I don't mind putting it off a little longer to see how that plays out. |
No description provided.