From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.11921.1594693743745727623 for ; Mon, 13 Jul 2020 19:29:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=gRldN4bQ; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: liming.gao@intel.com) IronPort-SDR: wXGwKsIRnUyH0goFHiDcwdLKCEhVYhzMsMkj0hENtY53EtmxwhonGJqnMoqKorogd38EkHy86S oSXmAckgfsWg== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="136253004" X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="136253004" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2020 19:29:03 -0700 IronPort-SDR: W5wMy6mcxYqZ6Q2QRTMOwr6j9KecqRpd01I6rud7s8fF20tTAlL4fBJVjUNRr0Vh3BXfbws/n7 m02mEGmf4UBw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,349,1589266800"; d="scan'208";a="281606889" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP; 13 Jul 2020 19:29:02 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 13 Jul 2020 19:29:02 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 13 Jul 2020 19:29:00 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.175) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 13 Jul 2020 19:29:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F2enFtJtkQ9K2z2dr7OO7J6qcNuDn1OLpEPM6yAbkeqRi1tlIredK7mqaqoSu7ADCYWRUHZZ82RMRKLgiWvKGgejkvK4vtUsMA6S+POODje8iHLmKl1kTO15oP25oc2z0tXgfzNRJ9rZ3kIMypy19g/Yk/dsbpFJvMHYWPuoZ7AdmXRh+zWxU/TdNYGfIF4dGVsBpzYyQx0VNsFyP19X+rsFtKGZuk57K1+1ojRMDLDIm6KtC31kx8AbstgSPPQkpCWnvqGYOwaWuCKYb8QT0cI3KqcY4dtLStgBNr9+Ftt1mlEBE1/sZInyskhNudMKn8IVMI8gFc1FE4GzZck5/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sBgkUMNyVUpeRKgZV4nN2dV0XTFxJUhL3k56EnPtHGo=; b=HIK30cWR+dxXYaOMCSajTbO65l+XjP9AwnSvQcSxHhq8RdETDFSlxnGpzRJlM1Daz0F32M3hnwBe1xucaAUHqeW/cpqijzKc5V576Bz3b5zPnAte8RHrTHt0VHDqG728V40JkbcmewhUjb/HeI5NfUPnEHudHtnUuIPu7iN7hMPXQhr5dUxONTuCoDFRB6EJc81mZpOKw+VfkzYY4vfvmQLnruXzptjUA+733vhXm0x0EsjTXz20dd9O1qDv9M4J24X+hJXd8lJNSwEnn03i5W9Z/y5uGjbfcS7dtuV25ybdVD03D4AgiFkik6Rpyb8oeACShecqEaF85BMvALIysw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sBgkUMNyVUpeRKgZV4nN2dV0XTFxJUhL3k56EnPtHGo=; b=gRldN4bQ2v50vDx9tqBFugv4uwWH0zk6e9kpCeVpXjQJMZTQgw/v+n7/AK53im/ZWfwPCeBWeKrRgGGJo2VaDoF8alCXmTwMHauB4i0tt5y0Trpkw376+qgUDs1jZXs/pRVUCtUrxhBFrkmqX0tyACbgQRu4W7C8zWSnlRQNg6Y= Received: from MWHPR11MB1630.namprd11.prod.outlook.com (2603:10b6:301:e::7) by MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Tue, 14 Jul 2020 02:28:59 +0000 Received: from MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::7847:b564:1b55:b67e]) by MWHPR11MB1630.namprd11.prod.outlook.com ([fe80::7847:b564:1b55:b67e%6]) with mapi id 15.20.3174.025; Tue, 14 Jul 2020 02:28:59 +0000 From: "Liming Gao" To: Leif Lindholm , "devel@edk2.groups.io" , "lersek@redhat.com" CC: Andrew Fish , "Kinney, Michael D" , "Zhang, Shenglei" , "Chen, Yuwei" Subject: Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add LicenseCheck" Thread-Topic: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add LicenseCheck" Thread-Index: AQHWUGNmc1VaqFbLqkKpXQ/ZVhCzxKj2CvEAgAZC24CAChvyYA== Date: Tue, 14 Jul 2020 02:28:59 +0000 Message-ID: References: <20200702112420.18408-1-leif@nuviainc.com> <20200702112420.18408-2-leif@nuviainc.com> <98aaf25a-62e3-6877-99fe-082f4b6ba437@redhat.com> <20200707155717.GG12303@vanye> In-Reply-To: <20200707155717.GG12303@vanye> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.217] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 859bd8e9-7e31-4e29-ebb2-08d8279daa3e x-ms-traffictypediagnostic: MWHPR11MB1631: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8iDS5uh9WwrHJJslyKTVIP3ZGKJpjnJIbmiYJbgvnmKEIAtVC9JfX7CswwEJcnbEdZuXpVmGjJAELKEKU9UWQbat5uSUtVQnXje6MJLckwQt30vg2olzU9XHRNb2zgYH6xD3IdD/vYx3d1zNoyPKkxZJQWNs33F3t10L2JokGjNNAp7YaHeygY5GU5hfPxHFtlns/TQt5h7OD+e4qfWb193d1wcVGV7aMyYVfCoQ88gHF8vujll1+km66azKW0mrJoNym4gz/friZzE7Bxnm+Bi3faiUZAKQAi0m1KIJv/BBRejjXfINLuOhzm01vhLyp3eBvmAiyzLymLa1+4nb1+D64j/EtMAk6mK263kcp744Nzw3vzTqwz8Afn+Y1IHdoY3I7Uv+aNwpz51wyYDC6A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1630.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(346002)(396003)(39860400002)(136003)(366004)(376002)(52536014)(66476007)(64756008)(76116006)(66446008)(66556008)(71200400001)(966005)(83380400001)(54906003)(9686003)(66946007)(478600001)(26005)(8676002)(110136005)(6506007)(186003)(2906002)(53546011)(86362001)(55016002)(5660300002)(4326008)(8936002)(316002)(7696005)(107886003)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: cffrubf5pUCoEm4z9WTDS+4BoWTTjOYOxFqYdnNsv3/N/yNay/7e2s8ac//owLxTdK+2l8f9m98VBtOiumTnJyvxUq8QcSQbzbJRdU1+dL6rxO6IfNXXpTcOTnJCJ4L7MXkh3S3r5AVU9paW9a9arNsKbS4b6JjjE6vRHfteL7v5O7KZ7xxKLbt66V8k2l7WOBlYml2ArGMxxQtYvW6VhMStC/94n9Q20BOlvMoQisutUFILHCmKgJ2PBzzzIZSXirIv2BinOu97ZWY46YFnuwTrVZs6DlbAggCtmbdAPMmJKTMpZ9pUtA0dZpcftqSkcAs4oxF84ZTYiyugsLI/35sffkjRQVjc+CdUv6bt4Xi4dup0Qi976Ps36w+IIXEKNy/wBRpYPRfDFocXzw7LwLnHlAlGdOhfH/fnh2Z7mdUcTCaE7YFHvFRnRhGFbMw4MgGSGi84UZrExOVuI5FI4xpMlxkxTJ0xbIwgfEn4I9EqvWE5ktG900Q43NA/7XLh MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1630.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 859bd8e9-7e31-4e29-ebb2-08d8279daa3e X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jul 2020 02:28:59.1344 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tbqx3vi5pv11QFG5PCbXoIx9kf/8jh3cLlbpy+ngcEayPGPRtsaqK/X4E7mX9Cs4mHkG06Ubewma9pUzhdixfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1631 Return-Path: liming.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Leif: Shenglei is working on new patch to add license checker as open CI plug-= in (BZ 2833). This way allows to add the exception. So, the autogen file ca= n be handled. Based on current statement, only BSD-2-Clause-Patent license = will be allowed. Other license can be added as the exception case if necess= ary. With new license checker in open CI, I agree to revert this checker in= BaseTools/PatchCheck.py. Thanks Liming -----Original Message----- From: Leif Lindholm =20 Sent: 2020=1B$BG/=1B(B7=1B$B7n=1B(B7=1B$BF|=1B(B 23:57 To: devel@edk2.groups.io; lersek@redhat.com Cc: Andrew Fish ; Kinney, Michael D ; Zhang, Shenglei ; Chen, Yuwei ; Gao, Liming Subject: Re: [edk2-devel] [PATCH 1/2] Revert "BaseTools/PatchCheck.py: Add= LicenseCheck" On Fri, Jul 03, 2020 at 18:20:26 +0200, Laszlo Ersek wrote: > On 07/02/20 13:24, Leif Lindholm wrote: > > This reverts commit a4cfb842fca9693a330cb5435284c1ee8bfbbace. > > This commit suggests inclusion of non-edk2+license content without >=20 > The expression "non-edk2+license" is a typo. >=20 > I think you meant "non-BSD-2-Clause-Patent". Err, yes. Sorry. > > a contribution agreement is something the community has made a=20 > > decision on, which is incorrect. >=20 > I'm OK with commit a4cfb842fca9 being reverted, as this solves the=20 > practical problem of adding generated files. >=20 > Acked-by: Laszlo Ersek >=20 > That said, I *still* don't grasp the more general problem you refer to. >=20 > Can we express it as follows (using commits 6b621f958123 and=20 > 6f21d772aa6b as reference): >=20 > (1) Content under OvmfPkg/Include/IndustryStandard/Xen was introduced=20 > under the MIT license in commit 6b621f958123. That commit was marked wit= h: >=20 > > License: This patch adds many files under the MIT licence. > > Contributed-under: TianoCore Contribution Agreement 1.0 >=20 > and the header files also contained open-coded instances of the MIT=20 > license. (These would later be replaced with SPDX identifiers in=20 > commit > 6f21d772aa6b.) >=20 > As a result, these files effectively granted use and distribution=20 > rights under the MIT license, *plus* a patent grant (per TCA). Correct. > (2) If we did the same today (that is, add new MIT-licensed files, but= =20 > no "Contributed-under: TCA" line on the commit message), then that=20 > would grant use and distribution rights under the "MIT license", and=20 > *no* patent grant. >=20 > Is this the issue you're thinking of? Yes. > So are we basically looking to replace (for example): >=20 > SPDX-License-Identifier: MIT >=20 > with *something* like: >=20 > SPDX-License-Identifier: MIT-Patent >=20 > ? (Assuming the latter exists -- which it doesn't, at the moment?) It doesn't. For BSD3/BSD4, we can do what the BSD distros do and use (for example) SPDX-License-Identifier: BSD-3-Clause AND BSD-2-Clause-Patent It is not clear to me if (for example) "MIT AND BSD-2-Clause-Patent" is a valid expression. But what about "public domain"? Do we figure out a = jurisdiction in which public domain content can clearly have arbitrary lice= nses applied to it and ask someone there to relicense it to something we ca= n accept? If we decide the explicit patent grant isn't important, why did we add it = in the first place? If we decide it is important, we need to actively make = a decision on whether we can ever sidestep it, and if so under what circums= tances. (e.g.: "we permit it for tools" - but then the code generation aspe= ct also needs to be covered) Regards, Leif > Thanks > Laszlo >=20 > >=20 > > Cc: Shenglei Zhang > > Cc: Yuwei Chen > > Cc: Liming Gao > > Signed-off-by: Leif Lindholm > > --- > > BaseTools/Scripts/PatchCheck.py | 50=20 > > --------------------------------- > > 1 file changed, 50 deletions(-) > >=20 > > diff --git a/BaseTools/Scripts/PatchCheck.py=20 > > b/BaseTools/Scripts/PatchCheck.py index e38cf61f93da..6372f71592d3=20 > > 100755 > > --- a/BaseTools/Scripts/PatchCheck.py > > +++ b/BaseTools/Scripts/PatchCheck.py > > @@ -305,49 +305,12 @@ class GitDiffCheck: > > self.line_num =3D 0 > > self.state =3D START > > self.new_bin =3D [] > > - self.LicenseCheck(self.lines, self.count) > > while self.line_num < self.count and self.format_ok: > > line_num =3D self.line_num > > self.run() > > assert(self.line_num > line_num) > > self.report_message_result() > > > > - def LicenseCheck(self, lines, count): > > - self.ok =3D True > > - self.startcheck =3D False > > - self.license =3D True > > - line_index =3D 0 > > - for line in lines: > > - if line.startswith('--- /dev/null'): > > - nextline =3D lines[line_index + 1] > > - added_file =3D self.Readdedfileformat.search(nextline= ).group(1) > > - added_file_extension =3D os.path.splitext(added_file)= [1] > > - if added_file_extension in self.file_extension_list: > > - self.startcheck =3D True > > - self.license =3D False > > - if self.startcheck and self.license_format_preflix in lin= e: > > - if self.bsd2_patent in line or self.bsd3_patent in li= ne: > > - self.license =3D True > > - else: > > - for optional_license in self.license_optional_lis= t: > > - if optional_license in line: > > - self.license =3D True > > - self.warning(added_file) > > - if line_index + 1 =3D=3D count or lines[line_index + 1].s= tartswith('diff --') and self.startcheck: > > - if not self.license: > > - error_message =3D "Invalid License in: " + added_= file > > - self.error(error_message) > > - self.startcheck =3D False > > - self.license =3D True > > - line_index =3D line_index + 1 > > - > > - def warning(self, *err): > > - count =3D 0 > > - for line in err: > > - warning_format =3D 'Warning: License accepted but not BSD= plus patent license in' > > - print(warning_format, line) > > - count +=3D 1 > > - > > def report_message_result(self): > > if Verbose.level < Verbose.NORMAL: > > return > > @@ -534,19 +497,6 @@ class GitDiffCheck: > > print(prefix, line) > > count +=3D 1 > > > > - license_format_preflix =3D 'SPDX-License-Identifier' > > - > > - bsd2_patent =3D 'BSD-2-Clause-Patent' > > - > > - bsd3_patent =3D 'BSD-3-Clause-Patent' > > - > > - license_optional_list =3D ['BSD-2-Clause', 'BSD-3-Clause', 'MIT',= 'Python-2.0', 'Zlib'] > > - > > - Readdedfileformat =3D re.compile(r'\+\+\+ b\/(.*)\n') > > - > > - file_extension_list =3D [".c", ".h", ".inf", ".dsc", ".dec", ".py= ", ".bat", ".sh", ".uni", ".yaml", ".fdf", ".inc", "yml", ".asm", \ > > - ".asm16", ".asl", ".vfr", ".s", ".S", ".asl= c", ".nasm", ".nasmb", ".idf", ".Vfr", ".H"] > > - > > class CheckOnePatch: > > """Checks the contents of a git email formatted patch. > > > >=20 >=20 >=20 >=20 >=20