lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <14f411527d551411defdd73a2507a13b7f07e789.camel@perches.com>
Date:   Mon, 30 Jul 2018 08:40:59 -0700
From:   Joe Perches <joe@...ches.com>
To:     Charlemagne Lasse <charlemagnelasse@...il.com>
Cc:     Rob Herring <robh@...nel.org>, Gleixner <tglx@...utronix.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: checkpatch: SPDX integration breaks --root

On Mon, 2018-07-30 at 10:53 +0200, Charlemagne Lasse wrote:
> Hi,
> 
> I am now getting python errors when using --root with checkpatch.pl
> and not being inside the linux repository.
> 
> $ ./linux-next/scripts/checkpatch.pl --root=/usr/src/linux-next
> --strict -f linux-next/Makefile
> FAIL: /usr/src
> Traceback (most recent call last):
>  File /usr/src/linux-next/scripts/spdxcheck.py", line 230, in <module>
>    repo = git.Repo(os.getcwd())
>  File "/usr/lib/python2.7/dist-packages/git/repo/base.py", line 156, in __init__
>    raise InvalidGitRepositoryError(epath)
> InvalidGitRepositoryError: /usr/src
> 
> total: 0 errors, 0 warnings, 0 checks, 1726 lines checked
> 
> linux-next/Makefile has no obvious style problems and is ready for submission.

Does this work for you:
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f25f708cd2a7..f0e6913c5cc1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -852,7 +852,7 @@ 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 -`;
 	return 0 if ($status ne "");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ