[00/11] libcamera: Fix missing license information
mbox series

Message ID 20260405191443.1209948-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • libcamera: Fix missing license information
Related show

Message

Laurent Pinchart April 5, 2026, 7:14 p.m. UTC
Hello,

libcamera uses SPDX headers to convey license information, and the REUSE
specification and tool to ensure all files have a license. As the rule
is not enforced by tools, files with missing license information
regularly slip in.

This series adds license information where missing. It is part of a
larger effort to fix the issue once and for all by adding a check in CI,
which will be posted as a separate patch series.

Patches 01/11 and 02/11 prepare the ground by merging the two soft ISP
TODO files together and converting them to markdown. We could have
simply added SPDX headers to the two text files, but it's a good
drive-by cleanup.

Patch 03/11 adds missing entries to subprojects/.gitignore, to ensure
the reuse tool will ignore those files.

The following patches update the REUSE license information file. Patch
04/11 then converts from the deprecated .reuse/dep5 file to REUSE.toml,
and patches 05/11 to 07/11 update REUSE.toml by updating paths, droppind
stale entries and adding missing ones. At that point all files that
can't easily contain SPDX headers (JSON, SVG and binary files) are
handled by REUSE.toml.

The next patch, 08/11, works around an issue with the extract-docs.py
script. The script contains a regular expression to find
SPDX-License-Idenfier instances in files, which gets picked by the reuse
tool as a badly formatted SPDX headers. Patches 09/11 to 11/11 then add
missing SPDX headers to all remaining text files.

Here's the output of `reuse lint` with the series applied, with the list
of files missing copyright information dropped as we don't aim at being
REUSE compliant for copyright infomation for the time being.

----------------------------------------
# DEPRECATED LICENSES

The following licenses are deprecated by SPDX:
* GPL-2.0
* GPL-2.0+


# MISSING COPYRIGHT AND LICENSING INFORMATION

The following files have no copyright information:

[snip]

# SUMMARY

* Bad licenses: 0
* Deprecated licenses: GPL-2.0, GPL-2.0+
* Licenses without file extension: 0
* Missing licenses: 0
* Unused licenses: 0
* Used licenses: GPL-2.0-or-later, CC-BY-SA-4.0, BSD-3-Clause, Apache-2.0, CC-BY-4.0, MIT, GPL-2.0, Linux-syscall-note, BSD-2-Clause, LGPL-2.1-or-later, GPL-2.0+, CC0-1.0, GPL-2.0-only
* Read errors: 0
* Files with copyright information: 1247 / 1455
* Files with license information: 1455 / 1455

Unfortunately, your project is not compliant with version 3.3 of the REUSE Specification :-(


# RECOMMENDATIONS

* Fix deprecated licenses: At least one of the licenses in the LICENSES
  directory and/or provided by an 'SPDX-License-Identifier' tag or in
  '.reuse/dep5' has been deprecated by SPDX. The current list and their
  respective recommended  new identifiers can be found here:
  <https://spdx.org/licenses/#deprecated>
* Fix missing copyright/licensing information: For one or more files, the tool
  cannot find copyright and/or licensing information. You typically do this by
  adding 'SPDX-FileCopyrightText' and 'SPDX-License-Identifier' tags to each
  file. The tutorial explains additional ways to do this:
  <https://reuse.software/tutorial/>
----------------------------------------

The deprecated licenses come from kernel header files. Those should be
fixed upstream first.


Laurent Pinchart (11):
  libcamera: software_isp: Convert TODO list to markdown
  libcamera: software_isp: Move GPU TODO items to TODO.md
  subprojects: Add nlohmann_json to .gitignore
  reuse: Convert to REUSE.toml
  reuse: Update file paths in REUSE.toml
  reuse: Drop unnecessary entry from REUSE.toml
  reuse: Add missing files to REUSE.toml
  utils: ipc: extract-docs: Work around reuse tool problem
  libcamera: Add missing SPDX headers
  libcamera: rpi: Add missing SPDX headers
  include: linux: Convert drm_fourcc.h to use SPDX

 .b4-config                                    |  2 +
 .reuse/dep5                                   | 28 ------
 Documentation/mainpage.dox                    |  2 +
 Documentation/thread-safety.dox               |  2 +
 REUSE.toml                                    | 41 ++++++++
 include/linux/drm_fourcc.h                    | 20 +---
 src/ipa/rpi/controller/decompand_status.h     |  1 +
 src/ipa/rpi/controller/rpi/decompand.cpp      |  2 +
 src/ipa/rpi/controller/rpi/decompand.h        |  1 +
 .../pipeline/rpi/pisp/data/example.yaml       |  1 +
 .../pipeline/rpi/vc4/data/example.yaml        |  1 +
 src/libcamera/pipeline/virtual/README.md      |  3 +
 .../pipeline/virtual/data/meson.build         |  2 +
 src/libcamera/software_isp/{TODO => TODO.md}  | 99 +++++++++++++++----
 src/libcamera/software_isp/gpuisp-todo.txt    | 40 --------
 subprojects/.gitignore                        |  2 +
 utils/codegen/ipc/extract-docs.py             |  2 +-
 utils/raspberrypi/ctt/README.md               |  2 +
 utils/tuning/config-example.yaml              |  3 +-
 utils/tuning/libtuning/ctt_colors.py          |  5 +
 utils/tuning/requirements.txt                 |  1 +
 21 files changed, 152 insertions(+), 108 deletions(-)
 delete mode 100644 .reuse/dep5
 create mode 100644 REUSE.toml
 rename src/libcamera/software_isp/{TODO => TODO.md} (76%)
 delete mode 100644 src/libcamera/software_isp/gpuisp-todo.txt


base-commit: 4b6c47bd6675c428c19ea76370f0301c24f23bf1