From: Stephen Hemminger <stephen@networkplumber.org>
To: "Gaëtan Rivet" <grive@u256.net>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v4] devtools: add new SPDX license compliance checker
Date: Tue, 14 Jul 2020 16:23:48 -0700 [thread overview]
Message-ID: <20200714162348.681804f8@hermes.lan> (raw)
In-Reply-To: <20200612090527.zsjttltuwt2dbj24@u256.net>
On Fri, 12 Jun 2020 11:05:27 +0200
Gaëtan Rivet <grive@u256.net> wrote:
> On 24/02/20 13:01 -0800, Stephen Hemminger wrote:
> > Simple script to look for drivers and scripts that
> > are missing requires SPDX header.
> >
> > Update the contribution guidelines to indicate that SPDX license
> > identfier is required for this project.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> > v4 - add MAINTAINERS entry
> > update coding style document
> > change name of script
> >
> > MAINTAINERS | 1 +
> > devtools/check-spdx-tag.sh | 77 ++++++++++++++++++++++++
> > doc/guides/contributing/coding_style.rst | 9 ++-
> > 3 files changed, 85 insertions(+), 2 deletions(-)
> > create mode 100755 devtools/check-spdx-tag.sh
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 3d5e8d1104b2..6b0e042c5fbb 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -96,6 +96,7 @@ F: devtools/check-maintainers.sh
> > F: devtools/check-forbidden-tokens.awk
> > F: devtools/check-git-log.sh
> > F: devtools/check-includes.sh
> > +F: devtools/check-spdx-tag.sh
> > F: devtools/check-symbol-maps.sh
> > F: devtools/checkpatches.sh
> > F: devtools/get-maintainer.sh
> > diff --git a/devtools/check-spdx-tag.sh b/devtools/check-spdx-tag.sh
> > new file mode 100755
> > index 000000000000..b1b8cdba4e4e
> > --- /dev/null
> > +++ b/devtools/check-spdx-tag.sh
> > @@ -0,0 +1,77 @@
> > +#! /bin/sh
> > +# SPDX-License-Identifier: BSD-3-Clause
> > +# Copyright (c) 2019 Microsoft Corporation
> > +#
> > +# Produce a list of files with incorrect license tags
> > +
> > +print_usage () {
> > + echo "usage: $(basename $0) [-q] [-v]"
> > + exit 1
> > +}
> > +
> > +check_spdx() {
> > + if $verbose; then
> > + echo "Files without SPDX License"
> > + echo "--------------------------"
> > + fi
> > + git grep -L SPDX-License-Identifier -- \
> > + ':^.git*' ':^.ci/*' ':^.travis.yml' \
> > + ':^README' ':^MAINTAINERS' ':^VERSION' ':^ABI_VERSION' \
> > + ':^*/Kbuild' ':^*/README' \
> > + ':^license/' ':^doc/' ':^config/' ':^buildtools/' \
> > + ':^*.cocci' ':^*.abignore' \
> > + ':^*.def' ':^*.map' ':^*.ini' ':^*.data' ':^*.cfg' ':^*.txt' \
> > + > $tmpfile
>
> I find it easier to maintain an exclude list by setting a variable and
> generating the relevant parameters:
>
> excludes='.git* .ci/* .travis.yml */Kbuild */README'
> exclude_opt=""
> set -f
> for pattern in $excludes; do
> exclude_opt="$exclude_opt ':^${pattern}'"
> done
> set +f
> printf "\"%s\"\n" "$exclude_opt"
>
> However I recognize that means dealing with contrarian globbing issues in shells,
> so it comes at a price. But I find changing the exclude list much easier that way.
This is no easier to maintain. Doing more string stuff in shell
is not worth it. If gets to be too much trouble, will consider moving
to python3.
next prev parent reply other threads:[~2020-07-14 23:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 15:59 [dpdk-dev] [PATCH v2] " Stephen Hemminger
2020-02-07 17:39 ` Stephen Hemminger
2020-02-07 17:52 ` [dpdk-dev] [PATCH v3] " Stephen Hemminger
2020-02-22 15:43 ` Thomas Monjalon
2020-02-22 15:45 ` Thomas Monjalon
2020-02-24 21:01 ` [dpdk-dev] [PATCH v4] " Stephen Hemminger
2020-04-28 20:15 ` Stephen Hemminger
2020-06-11 18:46 ` Stephen Hemminger
2020-06-11 21:32 ` Thomas Monjalon
2020-06-11 21:39 ` Thomas Monjalon
2020-06-12 8:36 ` Gaëtan Rivet
2020-06-12 14:53 ` Stephen Hemminger
2020-06-12 15:42 ` Thomas Monjalon
2020-06-12 9:05 ` Gaëtan Rivet
2020-07-14 23:23 ` Stephen Hemminger [this message]
2020-02-26 1:14 ` [dpdk-dev] [PATCH] " Stephen Hemminger
2020-07-14 23:21 ` [dpdk-dev] [PATCH v5] " Stephen Hemminger
2020-07-14 23:25 ` Stephen Hemminger
2020-07-30 22:00 ` Thomas Monjalon
2020-07-23 4:36 ` Stephen Hemminger
2020-07-30 22:06 ` Thomas Monjalon
2020-07-30 23:41 ` Stephen Hemminger
2020-08-26 15:12 ` Stephen Hemminger
2020-08-26 15:43 ` Bruce Richardson
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=20200714162348.681804f8@hermes.lan \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=grive@u256.net \
/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).