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 8F378A0540; Wed, 15 Jul 2020 01:23:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4323D1C1B2; Wed, 15 Jul 2020 01:23:54 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 3E9801C115 for ; Wed, 15 Jul 2020 01:23:52 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id z5so82482pgb.6 for ; Tue, 14 Jul 2020 16:23:52 -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=I1xRiPneYa5ZQryUInFHTqSkAgJg/4y2YUuzJZLDNdA=; b=C/+e9qaavWb2WXulbyztLN5aBFjKivsPuDNe8QLmo45oFvn8AS+sPpDsJoHPuBlThd 63AhSWg6D6lnE+W1eBQs7lMWZmzjcEN9ffWeYKN0R5n6n2CXJB1kStYel0F4dM7c3Xpj rRFTD4UZNMpH7qCSanHqDZNAXgY31dhPn65vdhmx8JH9/EWr5WQFrC5LPv0BWvsDec11 4nF4BJRzgKcFETiKcJpVIhHH7NgigwXDYeygjhggMxyB0k3uozQSfdsL1ERaRF8V9RD2 MmSYw62HRjmwVH6pgbGGjflPsDUnmXh+JcdHX4r3HWETOUhhcjp590q92iPIVwTHBnZv nHXg== 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=I1xRiPneYa5ZQryUInFHTqSkAgJg/4y2YUuzJZLDNdA=; b=uENewVqwLTO8WiHTrnHc0/LGWzROZImRZT0YJ3m7+rSoH2Oj6FmXHFPHj2ta8W3KHe KBxnEroVtpbO3p7evkOTkMud+nZcBLlCuqeWvTa204oPWXAtHvCaFswbOKPdM2RdBvb1 CV5iedzV6gCnC3hcFstDz7fpub4f90+ttYuhsEi3aNRLFN3f4CVz8fVIQO0er8NyMAUv gQ9PtJnHa5+EKE/+ZPkcKdvifG68JP/5lD7ppPhekKxWa4paHlH1I5M6Yw/3sFVdaRKx 7jAheFtucB1AbCVYofPF1b1hzn5S2ikzu4mv3A4jdkrDtIv9E7KqukWtY19Xrc9TfOlk z+wQ== X-Gm-Message-State: AOAM5330aKcb1DZNIblfVJCEU3GKpzW7mSdKE/pGKQgBSNQ2ae3wrp+8 FNwl34radssYDB0bNE8WtCo7G87cOw5DjQ== X-Google-Smtp-Source: ABdhPJwN6bnyaU1ioIlXBnIkluIt0Rj5N245I+3mv3QRkbdFHuRdncHPo/zE+QUQL85sOs+1aOHVQQ== X-Received: by 2002:a63:f91d:: with SMTP id h29mr5269097pgi.185.1594769031321; Tue, 14 Jul 2020 16:23:51 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id nh14sm151897pjb.4.2020.07.14.16.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 16:23:51 -0700 (PDT) Date: Tue, 14 Jul 2020 16:23:48 -0700 From: Stephen Hemminger To: =?UTF-8?B?R2HDq3Rhbg==?= Rivet Cc: dev@dpdk.org Message-ID: <20200714162348.681804f8@hermes.lan> In-Reply-To: <20200612090527.zsjttltuwt2dbj24@u256.net> References: <20200129155907.20556-1-stephen@networkplumber.org> <20200224210130.672-1-stephen@networkplumber.org> <20200612090527.zsjttltuwt2dbj24@u256.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v4] 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, 12 Jun 2020 11:05:27 +0200 Ga=C3=ABtan Rivet 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. > >=20 > > Update the contribution guidelines to indicate that SPDX license > > identfier is required for this project. > >=20 > > Signed-off-by: Stephen Hemminger > > --- > > v4 - add MAINTAINERS entry > > update coding style document > > change name of script > >=20 > > 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 > >=20 > > 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 =20 >=20 > I find it easier to maintain an exclude list by setting a variable and > generating the relevant parameters: >=20 > excludes=3D'.git* .ci/* .travis.yml */Kbuild */README' > exclude_opt=3D"" > set -f > for pattern in $excludes; do > exclude_opt=3D"$exclude_opt ':^${pattern}'" > done > set +f > printf "\"%s\"\n" "$exclude_opt" >=20 > 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.