chore(licenses): move api package to SPDX license headers - #20979
Merged
Conversation
SPDX is a modern alternative to the full GPL header used by the kernel. This allows us to move to `// SPDX-License-Identifier: GPL-3.0-or-later` in a compliant manner. ``` brew install reuse reuse download GPL-3.0-or-later reuse download LGPL-3.0-or-later ``` SPDX headers are advantageous, as they reduce line noise, makes reviews easier, and makes it impossible for someone to accidentally use `GPL-3.0-only`. https://reuse.software/tutorial/ https://www.kernel.org/doc/html/v5.7/process/license-rules.html https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions Issue 20954
SPDX is a modern alternative to the full GPL header used by the kernel. https://reuse.software/tutorial/ https://www.kernel.org/doc/html/v5.7/process/license-rules.html https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions ``` // SPDX-FileCopyrightText: 2025 David Allison <david@example.com> // SPDX-License-Identifier: GPL-3.0-or-later ``` Note: `// SPDX-FileCopyrightText:` allows dropping the `Copyright (c)` but we retain the full copyright declarations for existing contributors. This significantly cuts down on 'lines changed' in the codebase Mono-licensed files only for simplicity, but we the restriction should be relaxed to allow for mixed licenses once discussed. Issue 20954 Assisted-by: Claude Opus 4.7
SPDX headers are advantageous, as they reduce line noise, makes reviews easier, and makes it impossible for someone to accidentally use `GPL-3.0-only`. The API is LGPL, so this makes it a good place to start https://reuse.software/tutorial/ https://www.kernel.org/doc/html/v5.7/process/license-rules.html https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions Issue 20954
BrayanDSO
approved these changes
May 7, 2026
lukstbit
approved these changes
May 8, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
May 8, 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.
Note
Assisted-by: Claude Opus 4.7 - wording + code + tests
Purpose / Description
SPDX is a modern alternative to the full GPL header. In use by the Linux kernel.
SPDX headers are advantageous, as they reduce line noise, makes reviews easier, and makes it impossible for someone to accidentally use
GPL-3.0-only, orGPL-3.0-or-laterin the API.I selected the API module for a sample as it's LGPL and limited in scope.
Fixes
Approach
Note:
// SPDX-FileCopyrightText:allows dropping theCopyright (c), but I retain the full copyright declarations for existing contributors. The upsides of a few characters aren't worth the downsidesHow Has This Been Tested?
Unit tested
Learning (optional, can help others)
https://reuse.software/tutorial/
https://www.kernel.org/doc/html/v5.7/process/license-rules.html
https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions
Checklist