From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH v2 0/3] scripts: mandate use of SPDX-License-Identifier tags in new files
Date: Tue, 19 Nov 2024 11:29:00 +0000 [thread overview]
Message-ID: <20241119112903.1010350-1-berrange@redhat.com> (raw)
One of the items raised at the QEMU maintainers meeting at KVM Forum
2024 was adoption of SPDX-License-Identifier for licensing of newly
contributed source files, for which there were no dissenting voices.
Thus, this series proposes a way to put this into action by extending
checkpatch.pl to mandate SPDX-License-Identifier in all new files.
Furthermore, anytime it sees SPDX-License-Identifier in any patch,
whether a new file or pre-existing, it validates the declared license
name. If it is not one of the commonly used QEMU licenses (the GPL
variants, MIT, & a few BSD variants), it will report an error. To
encourage sticking with GPL-2.0-or-later by default, it will issue
a warning even if it is one of the common licenses, encouraging
the contributor to double check their choice. This will reduce
accidental license proliferation.
Finally, I've seen a few other random SPDX tags such as:
* SPDX-FileCopyrightText - replacing "Copyright ..."
* SPDX-FileContributor - replacing "Authors: ..."
* SPDX-URL - a link to the link license text
* SPDX-sourceInfo - arbitrary free form text about the file
These may or may not be worth considering in QEMU, but this series
discourages their usage by raising an error in checkpatch for now.
If we feel we want to adopt any of these, I think it should be
through a concious decision applied universally. Inconsistent &
adhoc usage of other SPDX tags by a subset of contributors feels
like it doesn't seem to give a clear win, and could even be a
net loss through making practices inconsistent across the code.
Changed in v2:
* Tweaks to the commit messages
* Expand the message warning about non GPL-2.0-or-later
usage, to request an explanation in the commit message
for the unusual choice.
Daniel P. Berrangé (3):
scripts: mandate that new files have SPDX-License-Identifier
scripts: validate SPDX license choices
scripts: forbid use of arbitrary SPDX tags besides license identifiers
scripts/checkpatch.pl | 106 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 106 insertions(+)
--
2.46.0
next reply other threads:[~2024-11-19 11:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 11:29 Daniel P. Berrangé [this message]
2024-11-19 11:29 ` [PATCH v2 1/3] scripts: mandate that new files have SPDX-License-Identifier Daniel P. Berrangé
2024-11-19 11:29 ` [PATCH v2 2/3] scripts: validate SPDX license choices Daniel P. Berrangé
2024-12-02 16:41 ` Peter Maydell
2024-12-02 16:54 ` Daniel P. Berrangé
2025-01-02 15:34 ` Philippe Mathieu-Daudé
2024-11-19 11:29 ` [PATCH v2 3/3] scripts: forbid use of arbitrary SPDX tags besides license identifiers Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241119112903.1010350-1-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).