Repository navigation
contributing: Define the SPDX copyright header convention - #7749
Merged
Merged
Conversation
wenzeslaus
force-pushed
the
spdx-convention
branch
from
July 17, 2026 15:23
cd1b329 to
4926d8b
Compare
cwhite911
approved these changes
Jul 18, 2026
cwhite911
left a comment
Contributor
There was a problem hiding this comment.
Overall, looks good I just had a few clarifying questions that I don't know if they are correct or not.
This was referenced Jul 18, 2026
cwhite911
previously approved these changes
Jul 20, 2026
nilason
reviewed
Aug 31, 2026
Source file copyright notices are moving to SPDX tags, where the collective holder is spelled "Other GRASS authors". Define it, so that the files carrying it point at something. The definition is by authorship rather than by membership of a body: the authors of a file who are not named individually in it. COPYING already opens by saying GRASS is copyright by members of the GRASS Development Team, so the new text does not restate it. The wording avoids quotation marks and apostrophes deliberately. COPYING is wrapped line by line into C string literals by include/CMakeLists.txt and include/grass/Makefile, neither of which escapes anything, and the file has never contained either character.
Commit 0211182 replaced the GPL prose in these templates with an SPDX-License-Identifier line and left the COPYRIGHT field alone. Finish that move: replace the field with SPDX-FileCopyrightText lines so the whole notice is machine readable. One holder per line, named holders first, the collective line last, and the license identifier after all copyright lines. COPYING defines the collective. State the rules next to the template, since the templates alone do not say who adds a line or when. Drafted with AI assistance (Claude Opus 4.8); the decisions are the author's.
Scripts generated by --script carried a COPYRIGHT field and the full GPL paragraph. Emit SPDX tags instead, matching the style guide templates, so that generated scripts start out in the form the project documents. GRASS_VERSION_DATE is a bare year, so it feeds SPDX-FileCopyrightText unchanged. Update the sample output in both g.parser.md and g.parser.html in the same commit, so the documentation never shows a header the tool cannot produce. Convert this file's own header as well: a generator that emits SPDX tags while carrying a legacy notice contradicts itself. The remaining files using the bare (C) notice form are out of scope here. Drafted with AI assistance (Claude Opus 4.8); the decisions are the author's.
Check the properties the header has to hold to rather than its exact text: that no COPYRIGHT field or GPL paragraph survives in the generated script, and that each copyright line names one holder with the collective line last. Comparing against a copy of the template would only restate what parser_script.c already defines, and would need updating whenever that file changes, so it would report edits rather than find faults. Written with AI assistance (Claude Opus 4.8); the decisions are the author's.
The script is unreferenced, and it cannot run: it shells out to cvs2cl.pl, which is not in the repository and which reads CVS history that no longer exists, and it hardcodes launching xemacs. It also embeds a third header template, which would otherwise have to be kept in sync with the style guide and with g.parser --script. Its method, deriving copyright holders by parsing commit history, is not one the project wants to carry forward. Removing the file does not strip a copyright notice from any surviving file, and its authorship remains in the history.
…line Replace "Other GRASS authors" with "GRASS Development Team", the name the notices used before, so the collective line keeps the established holder name rather than introducing a new term. COPYING keeps defining what the line stands for.
…he project The paragraph added to COPYING defined GRASS Development Team as the authors of a file who are not named individually, which reads as changing what the existing copyright holder means. COPYING already states that GRASS is copyright by members of the GRASS Development Team, so drop the addition and let the style guide point to that.
wenzeslaus
force-pushed
the
spdx-convention
branch
from
September 17, 2026 02:30
02f051b to
2a8d408
Compare
This was referenced Sep 17, 2026
nilason
approved these changes
Sep 18, 2026
This file contains hidden or 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
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.
Defines the SPDX copyright header convention that #7743 applies to most of the source files.
SPDX-License-Identifierand left theCOPYRIGHTfield alone.g.parser --scriptgenerates the new header, with the documentation updated to match and a test for the generated header.utils/copywrite.pl, which is unused.The "collective" author is unchanged, i.e., the GRASS Development Team, which
COPYINGalready names;COPYINGitself is unchanged.The decision to use SPDX was made during GRASS Community Meeting 2026 in San Michele all'Adige.
Written with AI assistance (Claude Code with Opus 4.8 and Fable 5), especially the tests.
Details (mostly AI generated)
The files that specify a header
These were left out of #7743 because each states what a header should look like rather than merely carrying one, so they need reading rather than converting, and two of them generate headers into new files.
COPYINGis not modified. The style guide refers to its existing statement that GRASS is copyright by members of the GRASS Development Team.doc/development/style_guide.mdconverts all three templates, Python, wxGUI docstring and C, and states the rules the templates cannot show: who adds a line, when, and that other people's lines are left alone. The wxGUI template is team-only, so its collective keeps the year; the other two name a holder, so their collective is bare.lib/gis/parser_script.creplaces tenfprintfcalls emitting the GPL paragraph with three SPDX lines.GRASS_VERSION_DATEis a bare year, so it feedsSPDX-FileCopyrightTextunchanged. Its own header is converted too.general/g.parser/g.parser.mdand.htmlupdate the sample output in the same commit as the code, so the documentation never shows a header the tool cannot produce. Nothing tests this, so it holds by review rather than automatically.utils/copywrite.plis removed. Nothing references it, it shells out tocvs2cl.plwhich is not in the repository and which reads CVS history that no longer exists, and it hardcodes launchingxemacs.The test
general/g.parser/tests/g_parser_script_test.pychecks the generated script for the SPDX lines and (the lack of)COPYRIGHTfield or GPL prose, and that each copyright line names one holder with the collective last.