SPDX: boosting the signal
High on my list of Things That Annoy Me When I Hack is sourcefiles that contain huge blobs of license text at the top. That is valuable territory which should be occupied by a header comment explaining the code, not a boatload of boilerplate that I’ve seen hundreds of times before.
Hackers have a lot of superstitious ideas about IP law and one is that these blobs are necessary for the license to be binding. They are not: incorporation by reference is a familiar concept to lawyers and courts, it suffices to unambiguously name the license you want to apply rather than quoting it in full.
This is what I do in my code. But to make the practice really comfortable for lawyers we need a registry of standardized license identifiers and an unambiguous way of specifying that we intend to include by reference.
Comes now the Software Package Data Exchange to solve this problem once and for all. It’s a great idea, I endorse it, and I will be using it in all my software projects from now on.
Here is what the hacking guide for NTPsec now says on this topic, lightly edited to remove some project-specific references:
We use the SPDX convention for inclusion by reference You can read about this at
When you create a new file, mark it as follows (updating the year) as required:
/* Copyright 2015 by the NTPsec project contributors
* SPDX-License-Identifier: BSD-2-Clause
*/
For documentation:
// Copyright 2015 by the NTPsec project contributors
// SPDX-License-Identifier: CC-BY-4.0
Modify as needed for whatever comment syntax the language or markup uses. Good places for these markings are at the end of an extended header comment, or at the very top of the file.
When you modify a file, leave existing copyrights in place. You may add a project copyright and replace the inline license with an SPDX tag. For example:
/* Copyright 2015 by the NTPsec project contributors
* SPDX-License-Identifier: NTP
*/
We recognize that occasionally a file may have changed so much that the historic copyright is no longer appropriate, but such decisions cannot be made casually. Discuss it with the project management before moving.
Eric S. Raymond's Blog
- Eric S. Raymond's profile
- 142 followers
