Open neteler opened 3 weeks ago
I'm really in favor of this, it would have been one of my 3 year goals otherwise ;)
About your question about having the spdx not under existing licences, if I recall correctly the convention (or requirement for tools) when using SPDX is having it really at the top. Before other human useful comments. So I don't see a problem with the output of your tool actually.
What about having SPDX ID as the only license information in each file instead of the longer text? I think when that was added, it was a must, but is it now?
What about having SPDX ID as the only license information in each file instead of the longer text?
I like this idea.
Quick check: such a change would affect around 2,000 files:
ag 'This program is free software' -l | wc -l
2245
SPDX License IDs are standardized short identifiers used to accurately and concisely identify the licenses associated with open source software (https://spdx.dev/learn/overview/). These identifiers are important for several reasons:
History 1: GRASS GIS going GPL 2+
In the GRASS GIS project, we had made a major effort over several years to prepare (i.e., clean up the source code) and release the GRASS IS software under GPL-2.0-or-later in 1999:
See also the history of commits at https://github.com/OSGeo/grass-legacy/.
History 2: GRASS GIS becoming a founding member of OSGeo
To become a founding member of OSGeo, we went into the https://wiki.osgeo.org/wiki/GRASS_Incubation_Progress, which took us and the mentor two years to complete due to the code review process (see https://wiki.osgeo.org/wiki/GRASS_Provenance_Review).
What would it look like?
Essentially it will be sufficient to add a single line to the headers. Random example:
What's next
As time goes on, it makes sense to update the license entries in the files to use the SPDX License IDs. This is basically a matter of adding one more line (see also Solving License Compliance at the Source: Adding SPDX License IDs).
How to perform this:
reuse annotate
to add REUSE information to file headers, SPDX linting (reuse lint
), etc.Caveat 1:
We need to carefully check for other licenses used in the source code (e.g., MIT) and add the respective SPDX one-liner there.
Caveat 2:
The
reuse annotate
tool does not place it under the existing license (but I didn't read the documentation yet):Result:
Hence a search/replace operation might be faster.
Trivia
Out of 7904 files, there are 3 with SPDX ID :-) (see here)