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 1059FA00BE; Fri, 12 Jun 2020 17:42:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F29571BFCD; Fri, 12 Jun 2020 17:42:16 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 96A651BF9E for ; Fri, 12 Jun 2020 17:42:15 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 2759F5C01A7; Fri, 12 Jun 2020 11:42:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 12 Jun 2020 11:42:15 -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= DgHsdKUOxrM63RsejNS2C6DZMED3kx55kXMXOnaLdBc=; b=cTJw6pfH07R8GD6L yykDZD5NO1pzF3QN/U2yijE4JknT0+l7ZbO3A8u22OOwDd/ObzuXP8o6LEvULKly tlOZbnUh7CQ6SvAfDOT4CU6/hudmghhozCU67B/27Sr+M/Euac2LyccJoq9xI2xi 1ONh6Xyae30mwadPkAkZcEo++2jIJuDu/LNri12RLkcGlp8Ar7asf04bC5SwhAhb /viULGY6b3a1wrpovN6HiGRgWCRnTVUy2tTQ9B2XYCdEkpVgTBEGORf8yJgl9y5h iLm2eu8YibYKtVbinRVRuhZqoK35qJqfxQceAdqmRveFIEFEHSoe7hg7WKwtyXpx 0Pl38g== 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=DgHsdKUOxrM63RsejNS2C6DZMED3kx55kXMXOnaLd Bc=; b=WWyupuNZ/WByXFzGuPdfoJOTsgx7jj6m5xgTMxDd8tEDRApjay3xczhIq D9eeXS7sYdzGeCuag2DHwgVo3/JIJWegToh/YM9F2tQ+UM8zrVdviF2MN+644Txd m+Qsbdr09UMoYaYEQL6U327xh9KspqeOXKtn1G2ySXIMSZrpHXxS6tKRnkUzNPHe m3QliDlymE8qEr7WuZZcWy9zmU61rqJ8dJl1fp+RmKBNcQHaxri1DmGefrgBuEc+ IR70OXzU3z2200rWPw/pnvoUVc8y5RLYtxbm/sKEXu0Ci+vlxv1lrTrH6JiePzRc 5DT0TChaKZa5Cb0/nuUt4YZQHzKYA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudeiuddgledvucetufdoteggodetrfdotf 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 A6522328005E; Fri, 12 Jun 2020 11:42:14 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org Date: Fri, 12 Jun 2020 17:42:13 +0200 Message-ID: <3800667.TsBKUvMEcr@thomas> In-Reply-To: <20200612075312.24299ddd@hermes.lan> References: <20200129155907.20556-1-stephen@networkplumber.org> <37903858.QyUTlBbKYA@thomas> <20200612075312.24299ddd@hermes.lan> 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" 12/06/2020 16:53, Stephen Hemminger: > On Thu, 11 Jun 2020 23:39:55 +0200 > Thomas Monjalon wrote: > > > 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). > > Thanks for the feedback. > Text processing is simpler in python, will rewrite in next version? I don't see a need for rewrite. I think addressing the comments is simpler.