History

Merge tag 'spdx-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx

Pull SPDX update from Greg KH: "Here is a single SPDX-like change for 7.1-rc1. It explicitly allows the use of SPDX-FileCopyrightText which has been used already in many files. At the same time, update checkpatch to catch any "non allowed" spdx identifiers as we don't want to go overboard here. This has been in linux-next for a long time with no reported problems" * tag 'spdx-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: LICENSES: Explicitly allow SPDX-FileCopyrightText

Linus Torvalds committed 6 months ago

Commit f9569c62 parents cb4eb67 ebf1baf2 files · +13 −2Browse files

Unified · Split

2 files
  1. Documentation/process/license-rules.rst +5 −2
  2. scripts/checkpatch.pl +8 −0
Documentation/process/license-rules.rst+5−2
@@ -63,8 +63,11 @@ License identifier syntax · 62 unmodified lines
6363 The SPDX license identifier in kernel files shall be added at the first
6464 possible line in a file which can contain a comment. For the majority
6565 of files this is the first line, except for scripts which require the
66− '#!PATH_TO_INTERPRETER' in the first line. For those scripts the SPDX
67− identifier goes into the second line.
66+ '#!PATH_TO_INTERPRETER' in the first line. For those scripts, the SPDX
67+ license identifier goes into the second line.
68+
69+ The license identifier line can then be followed by one or multiple
70+ SPDX-FileCopyrightText lines if desired.
6871
6972 |
7073
scripts/checkpatch.pl+8−0
@@ -3866,6 +3866,14 @@ sub process { · 3865 unmodified lines
38663866 "Misplaced SPDX-License-Identifier tag - use line $checklicenseline instead\n" . $herecurr);
38673867 }
38683868
3869+# check for disallowed SPDX file tags
3870+ if ($rawline =~ /\bSPDX-.*:/ &&
3871+ $rawline !~ /\bSPDX-License-Identifier:/ &&
3872+ $rawline !~ /\bSPDX-FileCopyrightText:/) {
3873+ WARN("SPDX_LICENSE_TAG",
3874+ "Disallowed SPDX tag\n" . $herecurr);
3875+ }
3876+
38693877 # line length limit (with some exclusions)
38703878 #
38713879 # There are a few types of lines that may extend beyond $max_line_length: