From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4E13CA052B; Fri, 31 Jul 2020 01:41:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0953E2BB8; Fri, 31 Jul 2020 01:41:57 +0200 (CEST) Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by dpdk.org (Postfix) with ESMTP id C080F1023 for ; Fri, 31 Jul 2020 01:41:55 +0200 (CEST) Received: by mail-pj1-f67.google.com with SMTP id a9so5613718pjd.3 for ; Thu, 30 Jul 2020 16:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GyACdgqG5d41rsvlVbBF28aiSM4cwxD+OVPRVnxObiA=; b=MjXuEYzLC48qM59Kb0XAB9cpovNu72JcFP377R7ed6a+MkFZMpOdoaPvDJKLmTIc0v ScFe1juu7285ISTsQ3oj06/ZpSJzDR3e3pQZnu91A6+u/isMn12b02DeSHiCNM78OT8H PAQGMgbcotU+3jG4B+fptaI3AcJ1TMobYVVEltVoOIqpClc3kFdAOUBHji9UlZU+AaYo DixPvjt8/RZvUQ7WM6rCt5/RanMFzM7kUKxaW5t+bUujjdzR9Pp1NcK+GvI7J6iZt907 DuQ97+wdrzu4i+7y1sQJt8ZPFcnIjAWAuANdBLO2ETmptgliI/4s6rSk4qN5ik++baM6 7lfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GyACdgqG5d41rsvlVbBF28aiSM4cwxD+OVPRVnxObiA=; b=jIfXT+nvaqgZHWA+qiWDMl18C1nNuD7DnK1x14Caw+zZHmPkJIiPo+Fbvx3LYk0rqp MnOwL8npWmJjy0Kv5v0P56/XI9f2BHDyAszOayEHzQ0BtawA23unUb61f7IafcnZ8Fd3 Z5yUnrECdyaJG0LDKbbwc1iynX8udG+W8dFSLNA4iUbLJ9dpNIsfUeCL/+XxPUnadRSW OmG24SN+hsnTuJqO312luy8nUsRyRZ+oimEnWqgvIAo2B6cGqlkgI1x/cdxAADNFt/XE qg3f5VFopN8mOIkhRpAStv4natgR0ty/SZ54zGhUW616nTChE7aQDgQjWlmXz1r14ycz e90g== X-Gm-Message-State: AOAM532suRgiBYoy1/FM5CQGXvY0BAE0bNrW3PHJ7A2k4hJjJyptjEeL mHIg3JHyl0LEB3NPqhakvXaLKocF7Lf0eA== X-Google-Smtp-Source: ABdhPJy8LWT/ualygtFLDS+Zy/1FuE372fga7WLFTyZZvMOC39FylMekdUDzMwyNZjEmiiNRVch7Sw== X-Received: by 2002:a17:902:b603:: with SMTP id b3mr1397894pls.285.1596152514746; Thu, 30 Jul 2020 16:41:54 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id u2sm7636257pfl.21.2020.07.30.16.41.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2020 16:41:54 -0700 (PDT) Date: Thu, 30 Jul 2020 16:41:51 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20200730164151.2de6a917@hermes.lan> In-Reply-To: <3584477.4m1K3HXnfP@thomas> References: <20200129155907.20556-1-stephen@networkplumber.org> <20200714232101.32544-1-stephen@networkplumber.org> <3584477.4m1K3HXnfP@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5] devtools: add new SPDX license compliance checker X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 31 Jul 2020 00:06:23 +0200 Thomas Monjalon 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 > [...] > > +#! /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 :-)_