-
Notifications
You must be signed in to change notification settings - Fork 20
Better handle licenses that have SPDX templates/variables (e.g. MIT, BSD) #16
Comments
@silverhook IMHO I think the copyright is not part of the license terms hence a mere copyright statement change does not trigger the creation of a new id or LicenseRef. That's always been the intent with SPDX alright. The thing that makes things confusing has been the inclusion of template/placeholders for a copyright statement in SPDX texts (and in some cases in OSI texts too). That's IMHO to provide guidance and nothing else. |
I agree, but the problem is that the copyright notice currently is part of the SPDX templates. So either we get rid of it in the SPDX templates, or we have to find a way to deal with it. |
This is a primeval flaw alright. The simple solution is to get rid of them if you want to have canonical reusable license texts. That's what we do on ScanCode for SPDX-listed and non-SPDX licenses. |
Right, but in that case you need to make an exception to using SPDX texts for those kinds of licenses. Options I see are still the same as I mention above. Revelant: spdx/license-list-XML#523 P.S. @carmenbianca, @mxmehl: it seems the |
The back-then-beta archiving function of our gitea triggered a strange edge case which rendered the repo unusable. To be honest I didn't think of the issues and deleted the repo altogether. If it is of large importance to you, I can try a restore. Just tell me, but it could take some days before I find time. |
@mxmehl, it would help. But I can also try to remember what I wrote there. The issue hasn’t changed. But it will take me time to remember and write it down again. |
A fourth option perhaps: Include
... and then provide a script that fills in the two variables (year, copyright holders) for all copyright holders found within the project. Some problems:
|
@carmenbianca, that is also not a bad idea. But I see (some) of the issues with it differently than you. The SPDX License List in its source XML stores the licenses in templates, where appropriate. Optional parts are enclosed in Parts where different strings are valid are enclosed in If you look e.g. at MIT License (and its XML source), the following would still be an SPDX valid MIT License:
As you can see, I entered a funky copyright statement and removed the optional text So the matching is not really the problem. The problem arises though, when there are several copyright holders who (want to) have their copyright statements in the license text itself – e.g. if the project/package includes MIT-licensed code of different origins. In that case, you may have a naming clash for all the License Files that are actually valid If we end up with still having to juggle several different MIT (or BSD, …) License Files only because of a different copyright holder, it might make sense to select a separator that’s not used in SPDX License Identifiers. That way tools can rely on where in the file name the SPDX License Identifier ends and the copyriight holder (or other) variation starts. The most elegant solution, as @pombredanne indicated, would be to kick out the copyright statement from the license texts in SPDX templates. Or at least make the copyright statement as an optional part of the license text (preferably one that’s off by default, in the plain text version). Pulling in @kestewart, @jlovejoy, @goneall for ideas. |
I just need a bit more context - is the issue related to matching or to capturing the notice text for a disclosure (or both)? There is an issue I run across rather frequently where some organization I work with prefer to identify each BSD or MIT license with a different copyright as a different license. This is due to a process they use to capture the notice text for disclosures even though the license terms and obligations are the same within a particular license family. In terms of matching the copyrightText, the guidelines mark this as replaceable (or variable) text, but not optional. There is a copyright element in the licenseXML schema, but it currently is not being translated to alt or optional template fields by the tool. It would be a good improvement to add this to the publisher tool. The license XML for MIT already include alt text after The BSD 3-clause does not have any alt or optional elements but it does enclose the copyright in a |
@goneall This is the problem. MIT (and BSD) have a clause saying that the copyright notice must be included in copies of the software. But if I copy MIT.txt from spdxx/license-list-data, then obviously the copyright notice is not included. The question is how the user can comply:
The problem with option number 2 is that it is extraordinarily laborious. You have to create all these separate licenses and remember to link to the correct The spec that is currently online at https://reuse.software/ but is due for replacement mandates the second option. #23 gets rid of this recommendation and does not mention this problem at all, which officially makes it Not Our Problem™. But it would still be good to have a solid recommendation for the FAQ, because people are invariably going to run into this. |
The SPDX document for the file shroud have the field |
@carmenbianca Thanks for the context. I haven't found a perfection solution for the attribution generation, but I'll include a couple opinions below FWIW. For matching using the SPDX license matching guidelines and associated tools, the copyright will be ignored either because it is currently wrapped in an In terms of capturing the information for attribution, my favorite approach would be to maintain a complete SPDX document which includes |
This issue should be (all but) solved upstream when @goneall updates the license list publishing system (see spdx/license-list-XML#866 (comment)) |
Closed in favour of #48 |
Currently the 2.0 spec asks for licenses which include the copyright statement in their text to:
LicenseRef-
prepended-<copyright_owner>
appendedThis I suspect is in order to store the license texts as they were found (i.e. with different copyright holders in them), to distinct them from each other and not to clash with SDPX spec.
Now while the SPDX spec on the hand does say that non-standard licenses should be prepended with
LicenseRef-
, its standard license texts are also in form of a template, so if the variable strings (e.g. the copyright statement and copyright holder in BSD-3-Clause is modified), it would still match and be a valid (e.g. BSD-3-Clause) SPDX license.But if we use the
License-Ref
prefix it prejudices that the license is not on SPDX’ list, which is not true.One option could be that we handle the MIT/BSD/… special case as is suggested in https://git.fsfe.org/reuse/included-hello/issues/1 – i.e. to also add a
Valid-License-Identifier:
pointing to a valid SPDX license to the license text itself, so e.g. the headers in the code should read:and the header of the license text in
LICENSES/LicenseRef-MIT-Microsoft.txt
should read:Another option would be to simply state
MIT
(orBSD-3-Clause
) in the licensing header and rely on the copyright notice together with the SDPX ID to be the differentiator for the license text, so e.g.:the following copyright notice header:
would simply be linked to the
LICENSES/LicenseRef-MIT-CompanyX-and-ProjectZ-contributors.txt
license text file, which would include the MIT license text with the copyright holder/statement corrected and would not need its own licensing text header, as the name of the license file is auto-generated (and can be followed back) by combining the SPDX ID with the copyright holder string.With both of these options either a person or a machine could follow from the the source code’s header (to the actual license text file and then) to the SPDX ID of the license.
A third option could be to just say all of these fall within the scope of the template and not bother with the details. But that is probably the least favourable option.
In any case, it would make sense to reach out to SPDX and work on this together. I feel the solution is just within reach, but we need to agree on it.
The text was updated successfully, but these errors were encountered: