Skip to content

contributing: Use SPDX copyright tags in individually resolved file headers#7762

Open
wenzeslaus wants to merge 1 commit into
OSGeo:mainfrom
wenzeslaus:spdx-hand-pass
Open

contributing: Use SPDX copyright tags in individually resolved file headers#7762
wenzeslaus wants to merge 1 commit into
OSGeo:mainfrom
wenzeslaus:spdx-hand-pass

Conversation

@wenzeslaus

@wenzeslaus wenzeslaus commented Jul 18, 2026

Copy link
Copy Markdown
Member

Converts 91 files whose notices the bulk conversions (#7743, #7756) left for a person: notices naming several holders, notices whose license text is separated from them by an author list, and a handful of one-off shapes.

  • One line per holder, a shared year range repeated on each line, email addresses and affiliations kept as written.
  • Author lists and other text interleaved with the old notices stay in place.
  • 27 files remain for another round, listed in the attached report.

A typical replacement:

 /*
  * r.in.lidar metadata-related functions
  *
- * Copyright 2011-2015 by Markus Metz, and the GRASS Development Team
+ * SPDX-FileCopyrightText: 2011-2015 Markus Metz
+ * SPDX-FileCopyrightText: Other GRASS authors
+ * SPDX-License-Identifier: GPL-2.0-or-later
  * Authors:
  *  Markus Metz (r.in.lidar)
  *  Vaclav Petras (move code to standalone functions)
  *
- * This program is free software licensed under the GPL (>=v2).
- * Read the COPYING file that comes with GRASS for details.
- *
  */

The policy decisions were made during GRASS Community Meeting 2026 in San Michele all'Adige.

Like the other conversion PRs, this should technically merge after #7749, which defines "Other GRASS authors", but it does not have to.

The edits were generated as one reviewed replacement per file by a script that asserts each old text occurs exactly once and refuses anything it cannot resolve safely. The script was written and this conversion prepared with AI assistance (Claude Code with Opus 4.8 and Fable 5); the decisions are the author's.

Details: decisions, deferred files, and how it was checked (AI generated)

Decisions

  • The lib/datetime notices name two people joined by an ampersand; each gets a line with the shared year: 1995 Bill Brown <brown@gis.uiuc.edu> and 1995 Michael Shapiro.
  • The lib/linkm notices, Copyright 1992 USA-CERL All rights reserved., convert with the identifier under the CERL-era rule of contributing: Use SPDX copyright tags in unlabeled file headers #7756. The "All rights reserved" phrase is not carried over: it grants nothing and contradicts the license the code has shipped under.
  • lib/gis/asprintf.c carries its own clause for the team next to a named one. Following the v.delaunay precedent of contributing: Use SPDX copyright tags in more complicated file headers #7751, the named holder keeps its years and the collective line is bare, so the team clause years 2002-2014 are not carried over. This is the only file in this PR where years from the old notice are not preserved.
  • Adam Laza, GSoC 2016 stays on one line as written, the same treatment as affiliations.
  • A stray margin star glued to two d.legend notices (...Development Team*) is treated as formatting, not text.
  • man/build_check.py, deferred by contributing: Use SPDX copyright tags in unlabeled file headers #7756 because the pinned ruff hook rewrote it on the unmodified base, converts cleanly here: with the new header the hook accepts the file as it is.

Left for another round (27 files)

  • Individual-held notices from 1993 on with no license text (lib/rst/interp_float, v.lrs.segment): adding an identifier would assert a license the file never stated, so they wait for their authors.
  • Headers that need reading in full: the r.sun address block with several email addresses, the v.perturb and v.normal textbook-algorithm attributions, r.resamp.rst, r.surf.area, mswindows/osgeo4w/mysql_config, and utils/gitlog2changelog.py.
  • Two vendored web assets (man/jquery.fixedheadertable.min.js, man/parser_standard_options.css) that belong with the third-party exclusions.

Each is listed with its verbatim notice in the attached hand-deferred.md.

Checked

The generating script asserts for every file that the old text occurs exactly once and that the trailing bytes do not change, and it refuses notices it cannot resolve safely; everything it refused is in the deferred list rather than half-converted. Across the 91 files: no license prose remains, the set of years on notice lines is unchanged everywhere except the asprintf case called out above, no emitted C line exceeds 78 columns, and pre-commit over all files passes with nothing reformatted. The script (resolve_bare.py.txt), the conversion library it builds on from the earlier PRs (spdx_headers.py.txt), and the deferred report (hand-deferred.md) are attached.

hand-deferred.md
resolve_bare.py.txt
spdx_headers.py.txt

…eaders

Convert 91 files whose notices the bulk conversions left for a person:
notices naming several holders, notices whose license text is separated
from them by an author list, and a handful of one-off shapes.

Holders are split into one line per person with a shared year range
repeated on each line, keeping email addresses and affiliations as
written. Author lists and other text interleaved with the old notices
stay in place. The USA-CERL notices from 1992 in lib/linkm convert with
the identifier under the CERL-era rule, without carrying over the "All
rights reserved" phrase. In lib/gis/asprintf.c, with its own clause for
the team next to a named one, the named holder keeps its years and the
collective line is bare, following the v.delaunay precedent.

27 files remain for another round and are listed in the attached report:
individual-held notices from 1993 on with no license text, and headers
that need reading in full, such as the r.sun address block and the
v.perturb textbook-algorithm attributions. Two of them are vendored web
assets and belong with the third-party exclusions.

The edits were generated as one reviewed replacement per file by a
script that asserts each old text occurs exactly once and refuses
anything it cannot resolve safely. The script was written and this
conversion prepared with AI assistance (Claude Code with Opus 4.8 and
Fable 5); the decisions are the author's.
@github-actions github-actions Bot added GUI wxGUI related vector Related to vector data processing raster Related to raster data processing Python Related code is in Python C Related code is in C C++ Related code is in C++ database Related to database management libraries module docs markdown Related to markdown, markdown files display imagery tests Related to Test Suite raster3d labels Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C Related code is in C C++ Related code is in C++ database Related to database management display docs GUI wxGUI related imagery libraries markdown Related to markdown, markdown files module Python Related code is in Python raster Related to raster data processing raster3d tests Related to Test Suite vector Related to vector data processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant