From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web11.2353.1593793234472925706 for ; Fri, 03 Jul 2020 09:20:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ldrfaahi; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593793233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=udLAqv6QJfbkHYBbDdwOcwqguj2yEEXNI7thQDQNzz4=; b=Ldrfaahi+cCoIBzX0p82IR90ymu+htRy1BJ085lhmQKGFF5DzzfLLDXb8mbx85P0Rjm20v ZhbyYmZfgG4iwRwRz/78miwEO4HG1z48aVE5sMZsWmdc4oTFNL4IKNtBpr/xxc+eeAJ6um tB1wmrQ/0yhs5BW0/KrcHLKc3u6opHE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-217-FhXhYVqpMnqnNwkLYOjFdw-1; Fri, 03 Jul 2020 12:20:32 -0400 X-MC-Unique: FhXhYVqpMnqnNwkLYOjFdw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4566F100CCC2; Fri, 3 Jul 2020 16:20:30 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-238.ams2.redhat.com [10.36.114.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 70F475BACD; Fri, 3 Jul 2020 16:20:27 +0000 (UTC) Subject: Re: [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add LicenseCheck" To: Leif Lindholm , devel@edk2.groups.io Cc: Andrew Fish , Michael D Kinney , Shenglei Zhang , Yuwei Chen , Liming Gao References: <20200702112420.18408-1-leif@nuviainc.com> <20200702112420.18408-2-leif@nuviainc.com> From: "Laszlo Ersek" Message-ID: <98aaf25a-62e3-6877-99fe-082f4b6ba437@redhat.com> Date: Fri, 3 Jul 2020 18:20:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200702112420.18408-2-leif@nuviainc.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 07/02/20 13:24, Leif Lindholm wrote: > This reverts commit a4cfb842fca9693a330cb5435284c1ee8bfbbace. > This commit suggests inclusion of non-edk2+license content without The expression "non-edk2+license" is a typo. I think you meant "non-BSD-2-Clause-Patent". > a contribution agreement is something the community has made a > decision on, which is incorrect. I'm OK with commit a4cfb842fca9 being reverted, as this solves the practical problem of adding generated files. Acked-by: Laszlo Ersek That said, I *still* don't grasp the more general problem you refer to. Can we express it as follows (using commits 6b621f958123 and 6f21d772aa6b as reference): (1) Content under OvmfPkg/Include/IndustryStandard/Xen was introduced under the MIT license in commit 6b621f958123. That commit was marked with: > License: This patch adds many files under the MIT licence. > Contributed-under: TianoCore Contribution Agreement 1.0 and the header files also contained open-coded instances of the MIT license. (These would later be replaced with SPDX identifiers in commit 6f21d772aa6b.) As a result, these files effectively granted use and distribution rights under the MIT license, *plus* a patent grant (per TCA). (2) If we did the same today (that is, add new MIT-licensed files, but no "Contributed-under: TCA" line on the commit message), then that would grant use and distribution rights under the "MIT license", and *no* patent grant. Is this the issue you're thinking of? So are we basically looking to replace (for example): SPDX-License-Identifier: MIT with *something* like: SPDX-License-Identifier: MIT-Patent ? (Assuming the latter exists -- which it doesn't, at the moment?) Thanks Laszlo > > 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. > >