From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web10.4342.1593689064266890972 for ; Thu, 02 Jul 2020 04:24:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=VK2Qr654; spf=pass (domain: nuviainc.com, ip: 209.85.221.68, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f68.google.com with SMTP id z2so5476373wrp.2 for ; Thu, 02 Jul 2020 04:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=APz6xlgDqEzHzGHsSQ0TBuv7HlkDADXdsrv6RyM/sE4=; b=VK2Qr654tdlqh5THCcF9yemBhrM2OgVISpjHnjJywiStqs07C0G06JnNDxKxZJD2VS Ib+YniINZKvfl18tQuvhsFIKc7X9OaAAO1Xg4MGBACxF/jbDHWhXNvbsf4+6uJW7pRNU UEuq0dWq27ac2ppbDGV/RchdWQjHrdOJWUxS+lyZivBUfBBs/ST3sjbWsxEE3wLwGVYm E1L1BlGjCnSa2JJVbBadVfQXNAPfHi2Y/5S5bBWNm345vevuor0OVsd3VWPoTFJdOibq 0h+6+eZzdN/LX7rG6Y9DCfKZJ8ghTFUEZ6yFYC0I5mtx9d7W4X9xzlIpRKCFbKAWkpqE agpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=APz6xlgDqEzHzGHsSQ0TBuv7HlkDADXdsrv6RyM/sE4=; b=Gf0p/G7sDflTWNKV6URq/4gVvcTD3ViEHGsGDStlD0ZF3ma+6NqDoGwhIFVlh7Zipi rn2+njJ1ofNR5mYn04w3/onKXyMp9D6So9LbCQDEh7moZp8O2NQb5fhwo2vYhqIXZal4 mAGvY5bKBfP1y19j2Nb1rRm7DsMPQ/YdBchVCQcSG53KA8yaZkWzCh5BxgokznXDbWCG qVy0aMtNXpu8695iUd8DWjtlZsA7fwaXyIUcmMmykYIBqLhfDySZva3Tip9SM4xEbKri V0twLKgwE+XGyAfVcGua161DtrUaCEyZz/0brZqzvUr3WZIirmPopuGp2WBv82nOmEow 3aSg== X-Gm-Message-State: AOAM533JWIfzcJynzGMD6QwN5jVQbrh3/vpn0w6wQt5/OrY27LhsILN4 TSUhn+J72+1gbM5xpHv8q5ScanMF3R5WZ8TFt2dbGw8fZYxtK341Pl7lQTPVUsnZIfYp81lHPxl F+Pjyy8Ci/6jaBZzpLUtIWPX+K5pc7B1m5XdMgxmATRcSqcxVPWIk+zjLugtsmfnMHA== X-Google-Smtp-Source: ABdhPJzNnXhJt5HSbD5u1UZ4rQ0N5Wk1fUrJPVRc4kVe62Nolno1CfU6oZVVcCJkppBShw5LMjtz1Q== X-Received: by 2002:adf:e38b:: with SMTP id e11mr30701673wrm.65.1593689062591; Thu, 02 Jul 2020 04:24:22 -0700 (PDT) Return-Path: Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id b10sm9732148wmj.30.2020.07.02.04.24.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 04:24:22 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Andrew Fish , Laszlo Ersek , Michael D Kinney , Shenglei Zhang , Yuwei Chen , Liming Gao Subject: [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add LicenseCheck" Date: Thu, 2 Jul 2020 12:24:19 +0100 Message-Id: <20200702112420.18408-2-leif@nuviainc.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200702112420.18408-1-leif@nuviainc.com> References: <20200702112420.18408-1-leif@nuviainc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This reverts commit a4cfb842fca9693a330cb5435284c1ee8bfbbace. This commit suggests inclusion of non-edk2+license content without a contribution agreement is something the community has made a decision on, which is incorrect. Cc: Shenglei Zhang Cc: Yuwei Chen Cc: Liming Gao Signed-off-by: Leif Lindholm --- BaseTools/Scripts/PatchCheck.py | 50 --------------------------------- 1 file changed, 50 deletions(-) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index e38cf61f93da..6372f71592d3 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -305,49 +305,12 @@ class GitDiffCheck: self.line_num = 0 self.state = START self.new_bin = [] - self.LicenseCheck(self.lines, self.count) while self.line_num < self.count and self.format_ok: line_num = self.line_num self.run() assert(self.line_num > line_num) self.report_message_result() - def LicenseCheck(self, lines, count): - self.ok = True - self.startcheck = False - self.license = True - line_index = 0 - for line in lines: - if line.startswith('--- /dev/null'): - nextline = lines[line_index + 1] - added_file = self.Readdedfileformat.search(nextline).group(1) - added_file_extension = os.path.splitext(added_file)[1] - if added_file_extension in self.file_extension_list: - self.startcheck = True - self.license = False - if self.startcheck and self.license_format_preflix in line: - if self.bsd2_patent in line or self.bsd3_patent in line: - self.license = True - else: - for optional_license in self.license_optional_list: - if optional_license in line: - self.license = True - self.warning(added_file) - if line_index + 1 == count or lines[line_index + 1].startswith('diff --') and self.startcheck: - if not self.license: - error_message = "Invalid License in: " + added_file - self.error(error_message) - self.startcheck = False - self.license = True - line_index = line_index + 1 - - def warning(self, *err): - count = 0 - for line in err: - warning_format = 'Warning: License accepted but not BSD plus patent license in' - print(warning_format, line) - count += 1 - def report_message_result(self): if Verbose.level < Verbose.NORMAL: return @@ -534,19 +497,6 @@ class GitDiffCheck: print(prefix, line) count += 1 - license_format_preflix = 'SPDX-License-Identifier' - - bsd2_patent = 'BSD-2-Clause-Patent' - - bsd3_patent = 'BSD-3-Clause-Patent' - - license_optional_list = ['BSD-2-Clause', 'BSD-3-Clause', 'MIT', 'Python-2.0', 'Zlib'] - - Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)\n') - - file_extension_list = [".c", ".h", ".inf", ".dsc", ".dec", ".py", ".bat", ".sh", ".uni", ".yaml", ".fdf", ".inc", "yml", ".asm", \ - ".asm16", ".asl", ".vfr", ".s", ".S", ".aslc", ".nasm", ".nasmb", ".idf", ".Vfr", ".H"] - class CheckOnePatch: """Checks the contents of a git email formatted patch. -- 2.20.1