linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Enrico Weigelt, metux IT consult" <info@metux.net>,
	 linux-kernel@vger.kernel.org
Cc: michal.lkml@markovi.net, clang-built-linux@googlegroups.com,
	linux-kbuild@vger.kernel.org, yamada.masahiro@socionext.com,
	apw@canonical.com, linux-riscv@lists.infradead.org
Subject: Re: [PATCH 3/4] scripts: checkpatch.pl: don't complain that debian/rules is executable
Date: Tue, 09 Jul 2019 03:16:26 -0700	[thread overview]
Message-ID: <691a85e0825376450b946effad13ffdeecde611d.camel@perches.com> (raw)
In-Reply-To: <1562664759-16009-3-git-send-email-info@metux.net>

On Tue, 2019-07-09 at 11:32 +0200, Enrico Weigelt, metux IT consult
wrote:
> checkpatch.pl complains when adding executable "debian/rules",
> obviously a false alarm. Therefore add an exception for that.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  scripts/checkpatch.pl | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 342c7c7..caf0146 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2587,6 +2587,7 @@ sub process {
>  		if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
>  			my $permhere = $here . "FILE: $realfile\n";
>  			if ($realfile !~ m@scripts/@ &&
> +			    $realfile !~ "debian/rules" &&
>  			    $realfile !~ /\.(py|pl|awk|sh)$/) {
>  				ERROR("EXECUTE_PERMISSIONS",
>  				      "do not set execute permissions for source files\n" . $permhere);

There are several of these scripts that have
no filename extension type and I suspect just
adding debian/rules isn't all that valuable.

$ git ls-files -s | grep '^100755' | grep -vP '\.(py|pl|awk|sh)$' | grep -v 'scripts/'
100755 b803f4f886b5e5e4046daedbd516e894f0f7e897 0	Documentation/target/target-export-device
100755 532d458333965b80f8f3ea149ad705208893b58f 0	arch/powerpc/boot/wrapper
100755 fbac1732f874e8d117b9c4aaf0a66b203370b933 0	arch/s390/kernel/syscalls/syscalltbl
100755 47c481239e986c35ba4818cb3e96f9ba7a813c2e 0	drivers/staging/greybus/tools/lbtest
100755 d7fc32ea8ac224f0fb6f28c58b196c665e510992 0	lib/build_OID_registry
100755 030a60b0404632ed598e5f5b56267e2a6af4b25f 0	samples/mic/mpssd/micctrl
100755 248ac7313c714d7acb29ceaaadd8fc8ee484e85e 0	samples/mic/mpssd/mpss
100755 2240cb56e6e5e6ed30a75913d4d5fecbb8f193c3 0	tools/debugging/kernel-chktaint
100755 ad1b9e646c4913b31aab9696245bc94b661647ff 0	tools/kvm/kvm_stat/kvm_stat
100755 49af9fe19f5b0533b64c117a363fc1c3785fa1da 0	tools/lib/lockdep/lockdep
100755 459469b7222c1410f7a701561eec004d86568369 0	tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
100755 6c58060aa03beae7456e4f7cb0588e70207314be 0	tools/perf/arch/powerpc/entry/syscalls/mksyscalltbl
100755 72ecbb67637079f709262298981162b6cbb12c9f 0	tools/perf/arch/s390/entry/syscalls/mksyscalltbl
100755 fae26b1cf08f50a8c0caacf7bc0715e948ef0c03 0	tools/perf/tests/perf-targz-src-pkg
100755 3802cee5e1887f5b406324484832305e4a1b29b6 0	tools/perf/util/PERF-VERSION-GEN
100755 6d5e9e87c4b7f51f5904d17fa016a134563ba0d0 0	tools/testing/selftests/ftrace/ftracetest
100755 ea5938ec009a5eb9e28cb1778e081a568e66fd65 0	tools/testing/selftests/net/run_afpackettests
100755 14e41faf2c5740633f9dd30e500543647b736734 0	tools/testing/selftests/net/run_netsocktests
100755 4509f0cc9c918d33c39caf3372f2bcdfc81bceff 0	tools/testing/selftests/pstore/common_tests
100755 2a329bbb4aca3ad391a5aca9a67f554b060fdca2 0	tools/testing/selftests/pstore/pstore_crash_test
100755 d6da5e86efbf89c7f4d7454d9a2c6a11ef2ea9e4 0	tools/testing/selftests/pstore/pstore_post_reboot_tests
100755 1cef54458aff916b2f00af33deef703cb3101ab0 0	tools/testing/selftests/pstore/pstore_tests
100755 951c507a27f7df05f82ce2de78abba2e0d9848f4 0	tools/testing/selftests/vm/run_vmtests

Maybe setting an internal flag and looking at the file content
for a shebang might be better.

$ git ls-files -s  | grep '^100755' | grep -vP '\.(py|pl|awk|sh)$'|grep -v 'scripts/'|awk '{print $4}'|while read file ; do echo "$file       $(head -2 $file | grep '#!')" ; done
Documentation/target/target-export-device	#!/bin/sh
arch/powerpc/boot/wrapper	#!/bin/sh
arch/s390/kernel/syscalls/syscalltbl	#!/bin/sh
drivers/staging/greybus/tools/lbtest	#!/usr/bin/env python
lib/build_OID_registry	#!/usr/bin/perl -w
samples/mic/mpssd/micctrl	#!/bin/bash
samples/mic/mpssd/mpss	#!/bin/bash
tools/debugging/kernel-chktaint	#! /bin/sh
tools/kvm/kvm_stat/kvm_stat	#!/usr/bin/env python3
tools/lib/lockdep/lockdep	#!/bin/bash
tools/perf/arch/arm64/entry/syscalls/mksyscalltbl	#!/bin/sh
tools/perf/arch/powerpc/entry/syscalls/mksyscalltbl	#!/bin/sh
tools/perf/arch/s390/entry/syscalls/mksyscalltbl	#!/bin/sh
tools/perf/tests/perf-targz-src-pkg	#!/bin/sh
tools/perf/util/PERF-VERSION-GEN	#!/bin/sh
tools/testing/selftests/ftrace/ftracetest	#!/bin/sh
tools/testing/selftests/net/run_afpackettests	#!/bin/sh
tools/testing/selftests/net/run_netsocktests	#!/bin/sh
tools/testing/selftests/pstore/common_tests	#!/bin/sh
tools/testing/selftests/pstore/pstore_crash_test	#!/bin/sh
tools/testing/selftests/pstore/pstore_post_reboot_tests	#!/bin/sh
tools/testing/selftests/pstore/pstore_tests	#!/bin/sh
tools/testing/selftests/vm/run_vmtests	#!/bin/bash


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2019-07-09 10:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09  9:32 [PATCH 1/4] Makefile: rules for printing kernel architecture and localversion Enrico Weigelt, metux IT consult
2019-07-09  9:32 ` [PATCH 2/4] scripts: mkdebian: allow renaming generated debian/rules via env Enrico Weigelt, metux IT consult
2019-07-09  9:32 ` [PATCH 3/4] scripts: checkpatch.pl: don't complain that debian/rules is executable Enrico Weigelt, metux IT consult
2019-07-09 10:16   ` Joe Perches [this message]
2019-07-09  9:32 ` [PATCH 4/4] debian: add generic rule file Enrico Weigelt, metux IT consult
2019-07-15 12:28   ` Masahiro Yamada
2019-07-15 18:56     ` Enrico Weigelt, metux IT consult
2019-07-15 19:12       ` Theodore Y. Ts'o
2019-07-16  8:58         ` Masahiro Yamada
2019-07-16 12:34           ` Theodore Y. Ts'o
2019-07-17 14:16             ` Enrico Weigelt, metux IT consult
2019-07-17 15:23               ` Theodore Y. Ts'o
2019-07-17 11:08         ` Enrico Weigelt, metux IT consult
2019-07-09 14:54 ` [PATCH 1/4] Makefile: rules for printing kernel architecture and localversion Randy Dunlap

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=691a85e0825376450b946effad13ffdeecde611d.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=info@metux.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=michal.lkml@markovi.net \
    --cc=yamada.masahiro@socionext.com \
    /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).