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 1F2B4A00BE; Thu, 11 Jun 2020 23:40:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4B4A21DB8; Thu, 11 Jun 2020 23:39:59 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 1238A2A62 for ; Thu, 11 Jun 2020 23:39:58 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 8FAE65C0109; Thu, 11 Jun 2020 17:39:57 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 11 Jun 2020 17:39:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= wU3W1AxA2O0P3BEkJC/G6q3A5Xkm7DIXwQZ4+zuEv/0=; b=r4YSWxfeMoFxT6fQ GB9CgffBczqdxL/59vbkIURiU2Go+auJgVi6aYwDPO20YzV6cOxgMITFxd9gshtV 5y0i11AGsSR9uU9GhdT5lcCB2ItqgcBjoVy4QJqRjkPhu+d4191RH216jXaU+BcH tkuqJVoeTOOHZcoTqWiJksUG0d7p9wBIok4dKO3P7L66i7lHIo7Ldl8jKzprgknM 5AWC87/ukTUZkBX1QLHZG37jt5uKhfaS/LqQXaPxHB4or32Tq7ea35U+VdcRs/Dp 0HDct81MKShOVBvrxSg2G5HHeGZOkCukwxIORobBXfuYLjMSVn45d0tYQABcc5jj SjrAPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=wU3W1AxA2O0P3BEkJC/G6q3A5Xkm7DIXwQZ4+zuEv /0=; b=Wsg7gJ3wwd5nHqz0qn4YRSZt/b+kwwYfg2O1UREyepTSPWyPnHna3CxYI t3/w3rn0v7Z8a5hE/iASrNHuCRra1y/uSiGpG86pZM5MZhRVmruTVGqL6CGR8qO7 SbhbV3YbO0ID5lmnoFtYCYb0M1bN5f1Hyk9mMARsUhQI/K3rcWCHzW+yEpgrjlIA iGVm3oM9pd1p3vXVHe/BA1E0XNl8bK6n39v9pRRcF4rvKPrTh/5gkdp8riHqovlz SP96ikHdTJ14lOMdZZGNRAl7Avw93kMaJ92aFWCQ8vU+YnP8e1vpzpbxmOYBCEKd pCENMz8RYv8T+pSRB1Mdab3C+F3og== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeitddgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepkeevgfehjeeuudehjeffjedtfeelvdevtdetgfekkefhhfejheel feejgeffhfevnecuffhomhgrihhnpehgihhtrdgtihdpshhpugigrdhorhhgnecukfhppe ejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id E96C73060FE7; Thu, 11 Jun 2020 17:39:56 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org Date: Thu, 11 Jun 2020 23:39:55 +0200 Message-ID: <37903858.QyUTlBbKYA@thomas> In-Reply-To: <20200224210130.672-1-stephen@networkplumber.org> References: <20200129155907.20556-1-stephen@networkplumber.org> <20200224210130.672-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 24/02/2020 22:01, Stephen Hemminger: > +tmpfile=$(mktemp) Please check how other temp files are created in other scripts for consitency. > + git grep -L SPDX-License-Identifier -- \ > + ':^.git*' ':^.ci/*' ':^.travis.yml' \ > + ':^README' ':^MAINTAINERS' ':^VERSION' ':^ABI_VERSION' \ > + ':^*/Kbuild' ':^*/README' \ > + ':^license/' ':^doc/' ':^config/' ':^buildtools/' \ I think doc/ should be part of the license check, same for buildtools/. > + ':^*.cocci' ':^*.abignore' \ > + ':^*.def' ':^*.map' ':^*.ini' ':^*.data' ':^*.cfg' ':^*.txt' \ > + > $tmpfile > + > + errors=0 > + while read -r line > + do $quiet || echo $line > + errors=$((errors + 1)) I'm surprised this works for you. In general, "while" creates a subshell which makes impossible updating a variable. I recommend using "for" with IFS=$'\n'. > + done < $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' | > + while read line > + do $quiet || echo $line > + warnings=$((warnings + 1)) > + done Same comment about "while" subshell. > + > + warnings=0 > + while read -r line > + do $quiet || echo $line > + warnings=$((errors + 1)) Here too > + done < $tmpfile > +} [...] > +Each file must begin with a special comment containing the > +`Software Package Data Exchange (SPDX) License Identfier `_. Typo: Identifier > + > +Generally this is the BSD License, except for code granted special exceptions. Is a verb missing? > +The SPDX licences identifier is sufficient, a file should not contain > +an additional text version of the license (boilerplate).