All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v5] devtools: add new SPDX license compliance checker
Date: Thu, 30 Jul 2020 16:41:51 -0700	[thread overview]
Message-ID: <20200730164151.2de6a917@hermes.lan> (raw)
In-Reply-To: <3584477.4m1K3HXnfP@thomas>

On Fri, 31 Jul 2020 00:06:23 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:

> 15/07/2020 01:21, Stephen Hemminger:
> > Simple script to look for drivers and scripts that
> > are missing requires SPDX header.
> > 
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>  
> [...]
> > +#! /bin/sh
> > +# SPDX-License-Identifier: BSD-3-Clause
> > +# Copyright 2020 Microsoft Corporation
> > +#
> > +# Produce a list of files with incorrect license tags
> > +
> > +errors=0
> > +warnings=0
> > +quiet=false
> > +verbose=false
> > +
> > +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/' ':^config/' ':^buildtools/' \
> > +	':^*.cocci' ':^*.abignore' \
> > +	':^*.def' ':^*.map' ':^*.ini' ':^*.data' ':^*.cfg' ':^*.txt' \
> > +	':^*.svg' ':^*.png'\  
> 
> I don't agree with this list of files.
> But I guess we can start with that and be more strict in future.
> 
> > +	> $tmpfile
> > +
> > +    errors=$(wc -l < $tmpfile)
> > +    $quiet || cat $tmpfile
> > +}
> > +
> > +check_boilerplate() {
> > +    if $verbose ; then
> > +	echo
> > +	echo "Files with redundant license text"
> > +	echo "---------------------------------"
> > +    fi
> > +
> > +    git grep -l Redistribution -- \
> > +	':^license/' ':^/devtools/check-spdx-tag.sh' > $tmpfile
> > +
> > +    warnings=$(wc -l <$tmpfile)
> > +    $quiet || cat $tmpfile
> > +}
> > +
> > +while getopts qvh ARG ; do
> > +	case $ARG in
> > +		q ) quiet=true ;;
> > +		v ) verbose=true ;;
> > +		h ) print_usage ; exit 0 ;;
> > +		? ) print_usage ; exit 1 ;;
> > +	esac
> > +done
> > +shift $(($OPTIND - 1))
> > +
> > +tmpfile=$(mktemp)  
> 
> Should be mktemp -t dpdk.checkspdx.XXXXXX
> to keep namespace of our temp files. Will fix.
> 
> > +trap 'rm -f -- "$tmpfile"' INT TERM HUP EXIT  
> 
> Why catching HUP signal?

General practice to have a script cleanup if user logs out.
Back in the old days, connections were lost sometimes :-)_



  reply	other threads:[~2020-07-30 23:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 15:59 [dpdk-dev] [PATCH v2] devtools: add new SPDX license compliance checker 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
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 [this message]
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=20200730164151.2de6a917@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.