+ checkpatch-fix-spdx-license-check-with-root=path.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: checkpatch: fix SPDX license check with --root=<path>
has been added to the -mm tree.  Its filename is
     checkpatch-fix-spdx-license-check-with-root=path.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-fix-spdx-license-check-with-root%3Dpath.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-fix-spdx-license-check-with-root%3Dpath.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Joe Perches <joe@xxxxxxxxxxx>
Subject: checkpatch: fix SPDX license check with --root=<path>

checkpatch uses the in-kernel script spdxcheck.py to validate the specific
license in a file or script.

This check can currently fail for a couple reasons:

o spdxcheck.py assumes the existence of git tree that may not
  exist for a bare source tree from something like a tarball
o the spdxcheck.py must be run from the top level root directory

So add a git existence test and set the subprocess subdirectory.

Link: http://lkml.kernel.org/r/2b32864324ae9c92948b002ec4c0c22409ed98f1.camel@xxxxxxxxxxx
Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
Reported-by: Charlemagne Lasse <charlemagnelasse@xxxxxxxxx>
Tested-by: Charlemagne Lasse <charlemagnelasse@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


diff -puN scripts/checkpatch.pl~checkpatch-fix-spdx-license-check-with-root=path scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-fix-spdx-license-check-with-root=path
+++ a/scripts/checkpatch.pl
@@ -852,9 +852,10 @@ sub is_maintained_obsolete {
 sub is_SPDX_License_valid {
 	my ($license) = @_;
 
-	return 1 if (!$tree || which("python") eq "" || !(-e "$root/scripts/spdxcheck.py"));
+	return 1 if (!$tree || which("python") eq "" || !(-e "$root/scripts/spdxcheck.py") || !(-e "$root/.git"));
 
-	my $status = `echo "$license" | python $root/scripts/spdxcheck.py -`;
+	my $root_path = abs_path($root);
+	my $status = `cd "$root_path"; echo "$license" | python scripts/spdxcheck.py -`;
 	return 0 if ($status ne "");
 	return 1;
 }
_

Patches currently in -mm which might be from joe@xxxxxxxxxxx are

spdxcheck-work-with-current-head-licenses-directory.patch
checkpatch-add-a-strict-test-for-structs-with-bool-member-definitions.patch
checkpatch-add-fix-for-concatenated_string-and-string_fragments.patch
checkpatch-improve-runtime-execution-speed-a-little.patch
checkpatch-fix-macro-argument-reuse-test.patch
checkpatch-validate-spdx-license-with-spdxcheckpy.patch
checkpatch-fix-krealloc-reuse-test.patch
checkpatch-check-for-functions-with-passed-by-value-structs-or-unions.patch
checkpatch-warn-when-a-patch-doesnt-have-a-description.patch
checkpatch-fix-spdx-license-check-with-root=path.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux