new file mode 100755
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# SPDX-License-Identifier: GPL-2.0-or-later
+# SPDX-FileCopyrightText: © 2026 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+#
+# Verify that every file contains a valid license
+
+set -e
+
+source "$(dirname "$0")/lib.sh"
+
+libcamera_reuse() {
+ echo "Running reuse for $CI_COMMIT_REF_NAME ($CI_COMMIT_SHA)"
+
+ local files=$(reuse lint -j | jq -r '.non_compliant.missing_licensing_info[]')
+
+ if [ -n "$files" ] ; then
+ echo "The following files are missing license information:"
+ echo "$files"
+ exit 1
+ fi
+
+ echo "All files contain license information"
+}
+
+run libcamera_reuse
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: CC0-1.0
+
[built-in options]
cpp_args = ['-stdlib=libc++']
cpp_link_args = ['-stdlib=libc++']
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: CC0-1.0
+
[built-in options]
cpp_args = ['-stdlib=libstdc++']
cpp_link_args = ['-stdlib=libstdc++']
@@ -133,7 +133,7 @@ case $FDO_DISTRIBUTION_VERSION in
texlive-latex-extra
)
# Tools requires by the lint jobs.
- PKGS_LIBCAMERA_RUNTIME+=( clang-format python3-autopep8 shellcheck )
+ PKGS_LIBCAMERA_RUNTIME+=( clang-format jq python3-autopep8 reuse shellcheck )
# libclang-rt-dev for the clang ASan runtime.
PKGS_LIBCAMERA_RUNTIME_MULTIARCH+=( libclang-rt-19-dev )
# For the Android camera HAL and the virtual pipeline handler.
@@ -74,7 +74,7 @@ include:
.libcamera-ci.debian:13:
variables:
FDO_DISTRIBUTION_VERSION: 'trixie'
- FDO_DISTRIBUTION_TAG: '2026-04-05.0'
+ FDO_DISTRIBUTION_TAG: '2026-04-05.1'
.container-debian:
extends:
@@ -122,6 +122,7 @@ container-debian:13:
- LIBCAMERA_CI_URL="${CI_SERVER_URL}/${CI_CONFIG_PATH/*@/}"
- git clone --depth 1 --single-branch $LIBCAMERA_CI_URL .work/ci-config
- mv .work/ci-config/.gitlab-ci/ $CI_PROJECT_DIR
+ - rm -rf .work/ci-config/
#
# Build libcamera with a different compilers, using stock Debian images to
@@ -305,6 +306,18 @@ build-package:debug:
# Lint stage - Run checkstyle.py and check merge suitability
# ------------------------------------------------------------------------------
+license:
+ extends:
+ - .fdo.distribution-image@debian
+ - .libcamera-ci.debian:13
+ - .libcamera-ci.scripts
+ stage: lint
+ needs:
+ - job: container-debian:13
+ artifacts: false
+ script:
+ - $CI_PROJECT_DIR/.gitlab-ci/lint-reuse.sh
+
lint:
extends:
- .fdo.distribution-image@debian
libcamera uses REUSE to hhelp with license compliance. Every file in the source tree is required to have an SPDX license identifier, directly within the file or through REUSE.toml. Add a lint job that verifies this using the reuse lint tool. We need to add SPDX license identifiers to the meson native files as they are being copied to the source tree and the reuse tool doesn't have an option to specify files to ignore. For the same reason, remove the .work/ci-config/ directory after setting up the build environment. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- .gitlab-ci/lint-reuse.sh | 26 ++++++++++++++++++++++++++ .gitlab-ci/meson/libc++.native | 2 ++ .gitlab-ci/meson/libstdc++.native | 2 ++ .gitlab-ci/setup-container.sh | 2 +- gitlab-ci.yml | 15 ++++++++++++++- 5 files changed, 45 insertions(+), 2 deletions(-) create mode 100755 .gitlab-ci/lint-reuse.sh