public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 00/15] Add a plugin LicenseCheck in open ci
@ 2020-07-20  8:36 Zhang, Shenglei
  2020-07-20  8:36 ` [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck Zhang, Shenglei
                   ` (18 more replies)
  0 siblings, 19 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:36 UTC (permalink / raw)
  To: devel
  Cc: Michael D Kinney, Sean Brogan, Bret Barkelew, Eric Dong,
	Laszlo Ersek, Zhichao Gao, Jiewen Yao, Chao Zhang, Jordan Justen,
	Maciej Rabeda, Jiaxin Wu, Siyuan Fu, Liming Gao, Jian J Wang,
	Hao A Wu, Andrew Fish, Ray Ni, Xiaoyu Lu, Ard Biesheuvel,
	Leif Lindholm

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
LicenseCheck is now enabled in PatchCheck.py. But there's
a patch "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
to suggest revert the change.These patch series introduce
a plugin LicenseCheck into open ci so that license issues can
still be checked after the checker is disabled in PatchCheck.py.
1/15 is the plugin implementation.
2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow developers
to skip license check for some files like generated files.

Only BSD-2-Clause-Patent and BSD-3-Clause-Patent can pass this checker.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Shenglei Zhang (15):
  .pytool/Plugin: Add a plugin LicenseCheck
  FatPkg/FatPkg.ci.yaml: Add configuration for LicenseCheck
  ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for LicenseCheck
  CryptoPkg/CryptoPkg.ci.yaml: Add configuration for LicenseCheck
  EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration for LicenseCheck
  FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for LicenseCheck
  MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for LicenseCheck
  MdePkg/MdePkg.ci.yaml: Add configuration for LicenseCheck
  NetworkPkg/NetworkPkg.ci.yaml: Add configuration for LicenseCheck
  OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
  PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add configuration for
    LicenseCheck
  SecurityPkg/SecurityPkg.ci.yaml: Add configuration for LicenseCheck
  ShellPkg/ShellPkg.ci.yaml: Add configuration for LicenseCheck
  UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for LicenseCheck
  UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file

 .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118 ++++++++++++++++++
 .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11 ++
 .pytool/Plugin/LicenseCheck/Readme.md         |  17 +++
 ArmVirtPkg/ArmVirtPkg.ci.yaml                 |   4 +
 CryptoPkg/CryptoPkg.ci.yaml                   |   3 +
 EmulatorPkg/EmulatorPkg.ci.yaml               |   4 +
 FatPkg/FatPkg.ci.yaml                         |   3 +
 FmpDevicePkg/FmpDevicePkg.ci.yaml             |   3 +
 MdeModulePkg/MdeModulePkg.ci.yaml             |   4 +
 MdePkg/MdePkg.ci.yaml                         |   4 +
 NetworkPkg/NetworkPkg.ci.yaml                 |   3 +
 OvmfPkg/OvmfPkg.ci.yaml                       |   4 +
 PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml         |   3 +
 SecurityPkg/SecurityPkg.ci.yaml               |   3 +
 ShellPkg/ShellPkg.ci.yaml                     |   3 +
 UefiCpuPkg/UefiCpuPkg.ci.yaml                 |   3 +
 .../UnitTestFrameworkPkg.ci.yaml              |   4 +
 17 files changed, 194 insertions(+)
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck.py
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
 create mode 100644 .pytool/Plugin/LicenseCheck/Readme.md

-- 
2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
@ 2020-07-20  8:36 ` Zhang, Shenglei
  2020-07-28 23:29   ` Michael D Kinney
  2020-07-20  8:36 ` [PATCH 02/15] FatPkg/FatPkg.ci.yaml: Add configuration for LicenseCheck Zhang, Shenglei
                   ` (17 subsequent siblings)
  18 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:36 UTC (permalink / raw)
  To: devel; +Cc: Sean Brogan, Bret Barkelew, Michael D Kinney, Liming Gao

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
Add a plugin to check license conflict for new added
files in a patch. It will report out errors when meeting
files which are now contributed under BSD-2-Clause-Patent
or BSD-3-Clause-Patent.

Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118 ++++++++++++++++++
 .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11 ++
 .pytool/Plugin/LicenseCheck/Readme.md         |  17 +++
 3 files changed, 146 insertions(+)
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck.py
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
 create mode 100644 .pytool/Plugin/LicenseCheck/Readme.md

diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck.py b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
new file mode 100644
index 000000000000..98941ddda758
--- /dev/null
+++ b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
@@ -0,0 +1,118 @@
+# @file LicenseCheck.py
+#
+# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+import os
+import logging
+import re
+from io import StringIO
+from typing import List, Tuple
+from edk2toolext.environment.plugintypes.ci_build_plugin import ICiBuildPlugin
+from edk2toolext.environment.var_dict import VarDict
+from edk2toollib.utility_functions import RunCmd
+
+
+class LicenseCheck(ICiBuildPlugin):
+
+    """
+    A CiBuildPlugin to check the license for new added files.
+
+    Configuration options:
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
+    """
+
+    license_format_preflix = 'SPDX-License-Identifier'
+
+    bsd2_patent = 'BSD-2-Clause-Patent'
+
+    bsd3_patent = 'BSD-3-Clause-Patent'
+
+    Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)')
+
+    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"]
+
+    def GetTestName(self, packagename: str, environment: VarDict) -> tuple:
+        """ Provide the testcase name and classname for use in reporting
+            testclassname: a descriptive string for the testcase can include whitespace
+            classname: should be patterned <packagename>.<plugin>.<optionally any unique condition>
+
+            Args:
+              packagename: string containing name of package to build
+              environment: The VarDict for the test to run in
+            Returns:
+                a tuple containing the testcase name and the classname
+                (testcasename, classname)
+        """
+        return ("Check for license for " + packagename, packagename + ".LicenseCheck")
+
+    ##
+    # External function of plugin.  This function is used to perform the task of the ci_build_plugin Plugin
+    #
+    #   - package is the edk2 path to package.  This means workspace/packagepath relative.
+    #   - edk2path object configured with workspace and packages path
+    #   - PkgConfig Object (dict) for the pkg
+    #   - EnvConfig Object
+    #   - Plugin Manager Instance
+    #   - Plugin Helper Obj Instance
+    #   - Junit Logger
+    #   - output_stream the StringIO output stream from this plugin via logging
+    def RunBuildPlugin(self, packagename, Edk2pathObj, pkgconfig, environment, PLM, PLMHelper, tc, output_stream=None):
+        return_buffer = StringIO()
+        params = "diff --unified=0 origin/master HEAD"
+        RunCmd("git", params, outstream=return_buffer)
+        p = return_buffer.getvalue().strip()
+        patch = p.split("\n")
+        return_buffer.close()
+
+        ignore_files = []
+        if "IgnoreFiles" in pkgconfig:
+            ignore_files = pkgconfig["IgnoreFiles"]
+
+        self.ok = True
+        self.startcheck = False
+        self.license = True
+        self.all_file_pass = True
+        count = len(patch)
+        line_index = 0
+        for line in patch:
+            if line.startswith('--- /dev/null'):
+                nextline = patch[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 and packagename in added_file:
+                    if (self.IsIgnoreFile(added_file, ignore_files)):
+                        line_index = line_index + 1
+                        continue
+                    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
+            if line_index + 1 == count or patch[line_index + 1].startswith('diff --') and self.startcheck:
+                if not self.license:
+                    self.all_file_pass = False
+                    error_message = "Invalid license in: " + added_file + " Hint: Only BSD-2-Clause-Patent and" + \
+                                    " BSD-3-Clause-Patent are accepted."
+                    logging.error(error_message)
+                self.startcheck = False
+                self.license = True
+            line_index = line_index + 1
+
+        if self.all_file_pass:
+            tc.SetSuccess()
+            return 0
+        else:
+            tc.SetFailed("License Check {0} Failed. ".format(packagename), "LICENSE_CHECK_FAILED")
+            return 1
+
+    def IsIgnoreFile(self, file: str, ignore_files: List[str]) -> bool:
+        for f in ignore_files:
+            if f in file:
+                return True
+        return False
diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml b/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
new file mode 100644
index 000000000000..1d02f6da5a69
--- /dev/null
+++ b/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
@@ -0,0 +1,11 @@
+## @file
+# CiBuildPlugin used to check license issues for new added files
+#
+# Copyright (c) Microsoft Corporation.
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+{
+  "scope": "cibuild",
+  "name": "License Check Test",
+  "module": "LicenseCheck"
+}
diff --git a/.pytool/Plugin/LicenseCheck/Readme.md b/.pytool/Plugin/LicenseCheck/Readme.md
new file mode 100644
index 000000000000..57d9db6769fa
--- /dev/null
+++ b/.pytool/Plugin/LicenseCheck/Readme.md
@@ -0,0 +1,17 @@
+# License Check Plugin
+
+This CiBuildPlugin scans all new added files in a package to make sure code
+is contributed under BSD-2-Clause-Patent or BSD-3-Clause-Patent.
+
+## Configuration
+
+The plugin can be configured to ignore certain files.
+
+``` yaml
+"LicenseCheck": {
+    "IgnoreFiles": []
+}
+```
+### IgnoreFiles
+
+OPTIONAL List of file to ignore.
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 02/15] FatPkg/FatPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
  2020-07-20  8:36 ` [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck Zhang, Shenglei
@ 2020-07-20  8:36 ` Zhang, Shenglei
  2020-07-20  8:36 ` [PATCH 03/15] ArmVirtPkg/ArmVirtPkg.ci.yaml: " Zhang, Shenglei
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:36 UTC (permalink / raw)
  To: devel; +Cc: Ray Ni

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 FatPkg/FatPkg.ci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/FatPkg/FatPkg.ci.yaml b/FatPkg/FatPkg.ci.yaml
index 8b0fb1d4fcd5..489c4614e9e1 100644
--- a/FatPkg/FatPkg.ci.yaml
+++ b/FatPkg/FatPkg.ci.yaml
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     "CompilerPlugin": {
         "DscPath": "FatPkg.dsc"
     },
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 03/15] ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
  2020-07-20  8:36 ` [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck Zhang, Shenglei
  2020-07-20  8:36 ` [PATCH 02/15] FatPkg/FatPkg.ci.yaml: Add configuration for LicenseCheck Zhang, Shenglei
@ 2020-07-20  8:36 ` Zhang, Shenglei
  2020-07-20 21:59   ` Laszlo Ersek
  2020-07-20  8:36 ` [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: " Zhang, Shenglei
                   ` (15 subsequent siblings)
  18 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:36 UTC (permalink / raw)
  To: devel; +Cc: Laszlo Ersek, Ard Biesheuvel, Leif Lindholm

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 ArmVirtPkg/ArmVirtPkg.ci.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ArmVirtPkg/ArmVirtPkg.ci.yaml b/ArmVirtPkg/ArmVirtPkg.ci.yaml
index 4553725ee528..27bb7ff49011 100644
--- a/ArmVirtPkg/ArmVirtPkg.ci.yaml
+++ b/ArmVirtPkg/ArmVirtPkg.ci.yaml
@@ -8,6 +8,10 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    ## options defined .pytool/Plugin/LicenseCheck
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     ## options defined .pytool/Plugin/CompilerPlugin
     "CompilerPlugin": {
         "DscPath": "" # Don't support this test
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (2 preceding siblings ...)
  2020-07-20  8:36 ` [PATCH 03/15] ArmVirtPkg/ArmVirtPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:36 ` Zhang, Shenglei
  2020-07-20 14:23   ` [edk2-devel] " Yao, Jiewen
  2020-07-21  1:31   ` Guomin Jiang
  2020-07-20  8:36 ` [PATCH 05/15] EmulatorPkg/EmulatorPkg.ci.yaml: " Zhang, Shenglei
                   ` (14 subsequent siblings)
  18 siblings, 2 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:36 UTC (permalink / raw)
  To: devel; +Cc: Jian J Wang, Xiaoyu Lu

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 CryptoPkg/CryptoPkg.ci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CryptoPkg/CryptoPkg.ci.yaml b/CryptoPkg/CryptoPkg.ci.yaml
index f54ebfb22e70..e73b79e01fef 100644
--- a/CryptoPkg/CryptoPkg.ci.yaml
+++ b/CryptoPkg/CryptoPkg.ci.yaml
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     "CompilerPlugin": {
         "DscPath": "CryptoPkg.dsc"
     },
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 05/15] EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (3 preceding siblings ...)
  2020-07-20  8:36 ` [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:36 ` Zhang, Shenglei
  2020-07-20  8:37 ` [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml: " Zhang, Shenglei
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:36 UTC (permalink / raw)
  To: devel; +Cc: Jordan Justen, Andrew Fish, Ray Ni

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 EmulatorPkg/EmulatorPkg.ci.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/EmulatorPkg/EmulatorPkg.ci.yaml b/EmulatorPkg/EmulatorPkg.ci.yaml
index 81f81780ec76..dead82f69745 100644
--- a/EmulatorPkg/EmulatorPkg.ci.yaml
+++ b/EmulatorPkg/EmulatorPkg.ci.yaml
@@ -8,6 +8,10 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    ## options defined .pytool/Plugin/LicenseCheck
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     ## options defined .pytool/Plugin/CompilerPlugin
     "CompilerPlugin": {
         "DscPath": "" # Don't support this test
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (4 preceding siblings ...)
  2020-07-20  8:36 ` [PATCH 05/15] EmulatorPkg/EmulatorPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-21  1:31   ` [edk2-devel] " Guomin Jiang
  2020-07-28 23:30   ` Michael D Kinney
  2020-07-20  8:37 ` [PATCH 07/15] MdeModulePkg/MdeModulePkg.ci.yaml: " Zhang, Shenglei
                   ` (12 subsequent siblings)
  18 siblings, 2 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao, Michael D Kinney

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 FmpDevicePkg/FmpDevicePkg.ci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/FmpDevicePkg/FmpDevicePkg.ci.yaml b/FmpDevicePkg/FmpDevicePkg.ci.yaml
index 74a0aefe8e49..d498ad7d21e1 100644
--- a/FmpDevicePkg/FmpDevicePkg.ci.yaml
+++ b/FmpDevicePkg/FmpDevicePkg.ci.yaml
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     "CompilerPlugin": {
         "DscPath": "FmpDevicePkg.dsc"
     },
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 07/15] MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (5 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-21  0:34   ` [edk2-devel] " Wu, Hao A
  2020-07-20  8:37 ` [PATCH 08/15] MdePkg/MdePkg.ci.yaml: " Zhang, Shenglei
                   ` (11 subsequent siblings)
  18 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Jian J Wang, Hao A Wu

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 MdeModulePkg/MdeModulePkg.ci.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MdeModulePkg/MdeModulePkg.ci.yaml b/MdeModulePkg/MdeModulePkg.ci.yaml
index 1cfc1328390e..0fc8c3633878 100644
--- a/MdeModulePkg/MdeModulePkg.ci.yaml
+++ b/MdeModulePkg/MdeModulePkg.ci.yaml
@@ -5,6 +5,10 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    ## options defined .pytool/Plugin/LicenseCheck
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     ## options defined ci/Plugin/CompilerPlugin
     "CompilerPlugin": {
         "DscPath": "MdeModulePkg.dsc"
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 08/15] MdePkg/MdePkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (6 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 07/15] MdeModulePkg/MdeModulePkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-20  8:37 ` [PATCH 09/15] NetworkPkg/NetworkPkg.ci.yaml: " Zhang, Shenglei
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Liming Gao

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 MdePkg/MdePkg.ci.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MdePkg/MdePkg.ci.yaml b/MdePkg/MdePkg.ci.yaml
index 3268f1535499..b088a4344908 100644
--- a/MdePkg/MdePkg.ci.yaml
+++ b/MdePkg/MdePkg.ci.yaml
@@ -5,6 +5,10 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    ## options defined .pytool/Plugin/LicenseCheck
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     ## options defined ci/Plugin/CompilerPlugin
     "CompilerPlugin": {
         "DscPath": "MdePkg.dsc"
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 09/15] NetworkPkg/NetworkPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (7 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 08/15] MdePkg/MdePkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-21 16:42   ` [edk2-devel] " Maciej Rabeda
  2020-07-20  8:37 ` [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: " Zhang, Shenglei
                   ` (9 subsequent siblings)
  18 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Maciej Rabeda, Jiaxin Wu, Siyuan Fu

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 NetworkPkg/NetworkPkg.ci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/NetworkPkg/NetworkPkg.ci.yaml b/NetworkPkg/NetworkPkg.ci.yaml
index 70f2e1014748..aa536830fc27 100644
--- a/NetworkPkg/NetworkPkg.ci.yaml
+++ b/NetworkPkg/NetworkPkg.ci.yaml
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     "CompilerPlugin": {
         "DscPath": "NetworkPkg.dsc"
     },
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (8 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 09/15] NetworkPkg/NetworkPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-20 22:01   ` Laszlo Ersek
  2020-07-20  8:37 ` [PATCH 11/15] PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: " Zhang, Shenglei
                   ` (8 subsequent siblings)
  18 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Jordan Justen, Laszlo Ersek, Ard Biesheuvel

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 OvmfPkg/OvmfPkg.ci.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/OvmfPkg/OvmfPkg.ci.yaml b/OvmfPkg/OvmfPkg.ci.yaml
index 98992f0429ff..ed342d7a3d08 100644
--- a/OvmfPkg/OvmfPkg.ci.yaml
+++ b/OvmfPkg/OvmfPkg.ci.yaml
@@ -8,6 +8,10 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    ## options defined .pytool/Plugin/LicenseCheck
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     ## options defined .pytool/Plugin/CompilerPlugin
     "CompilerPlugin": {
         "DscPath": "" # Don't support this test
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 11/15] PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (9 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-20  8:37 ` [PATCH 12/15] SecurityPkg/SecurityPkg.ci.yaml: " Zhang, Shenglei
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Ray Ni

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml b/PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml
index be470807bd9e..5543d15c3248 100644
--- a/PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml
+++ b/PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     "CompilerPlugin": {
         "DscPath": "PcAtChipsetPkg.dsc"
     },
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 12/15] SecurityPkg/SecurityPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (10 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 11/15] PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-20 14:24   ` Yao, Jiewen
  2020-07-20  8:37 ` [PATCH 13/15] ShellPkg/ShellPkg.ci.yaml: " Zhang, Shenglei
                   ` (6 subsequent siblings)
  18 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang, Chao Zhang

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 SecurityPkg/SecurityPkg.ci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/SecurityPkg/SecurityPkg.ci.yaml b/SecurityPkg/SecurityPkg.ci.yaml
index 953219053318..1ef1d2e67ead 100644
--- a/SecurityPkg/SecurityPkg.ci.yaml
+++ b/SecurityPkg/SecurityPkg.ci.yaml
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     "CompilerPlugin": {
         "DscPath": "SecurityPkg.dsc"
     },
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 13/15] ShellPkg/ShellPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (11 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 12/15] SecurityPkg/SecurityPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-27  6:28   ` [edk2-devel] " Gao, Zhichao
  2020-07-20  8:37 ` [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: " Zhang, Shenglei
                   ` (5 subsequent siblings)
  18 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Ray Ni, Zhichao Gao

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 ShellPkg/ShellPkg.ci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ShellPkg/ShellPkg.ci.yaml b/ShellPkg/ShellPkg.ci.yaml
index 67de34a2556e..565e08596b2f 100644
--- a/ShellPkg/ShellPkg.ci.yaml
+++ b/ShellPkg/ShellPkg.ci.yaml
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     "CompilerPlugin": {
         "DscPath": "ShellPkg.dsc"
     },
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (12 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 13/15] ShellPkg/ShellPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-20 21:59   ` Laszlo Ersek
  2020-07-21  0:24   ` Dong, Eric
  2020-07-20  8:37 ` [PATCH 15/15] UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file Zhang, Shenglei
                   ` (4 subsequent siblings)
  18 siblings, 2 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Eric Dong, Ray Ni, Laszlo Ersek

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 UefiCpuPkg/UefiCpuPkg.ci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/UefiCpuPkg/UefiCpuPkg.ci.yaml b/UefiCpuPkg/UefiCpuPkg.ci.yaml
index 99e460a8b090..d54651d43800 100644
--- a/UefiCpuPkg/UefiCpuPkg.ci.yaml
+++ b/UefiCpuPkg/UefiCpuPkg.ci.yaml
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     "CompilerPlugin": {
         "DscPath": "UefiCpuPkg.dsc"
     },
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 15/15] UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (13 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20  8:37 ` Zhang, Shenglei
  2020-07-28 23:29   ` [edk2-devel] " Michael D Kinney
  2020-07-25  1:38 ` [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci Rebecca Cran
                   ` (3 subsequent siblings)
  18 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:37 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Sean Brogan, Bret Barkelew

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
index 51e172537f8a..2988e03f763f 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
@@ -5,6 +5,10 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    ## options defined .pytool/Plugin/LicenseCheck
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     ## options defined .pytool/Plugin/CompilerPlugin
     "CompilerPlugin": {
         "DscPath": "UnitTestFrameworkPkg.dsc"
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* [PATCH 12/15] SecurityPkg/SecurityPkg.ci.yaml: Add configuration for LicenseCheck
@ 2020-07-20  8:39 Zhang, Shenglei
  0 siblings, 0 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-20  8:39 UTC (permalink / raw)
  To: devel; +Cc: Jiewen Yao, Jian J Wang

Add configuration IgnoreFiles for package config files.
So users can rely on this to skip license conflict for
some generated files.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
---
 SecurityPkg/SecurityPkg.ci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/SecurityPkg/SecurityPkg.ci.yaml b/SecurityPkg/SecurityPkg.ci.yaml
index 953219053318..1ef1d2e67ead 100644
--- a/SecurityPkg/SecurityPkg.ci.yaml
+++ b/SecurityPkg/SecurityPkg.ci.yaml
@@ -5,6 +5,9 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 {
+    "LicenseCheck": {
+        "IgnoreFiles": []
+    },
     "CompilerPlugin": {
         "DscPath": "SecurityPkg.dsc"
     },
-- 
2.18.0.windows.1


^ permalink raw reply related	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 ` [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20 14:23   ` Yao, Jiewen
  2020-07-21  1:31   ` Guomin Jiang
  1 sibling, 0 replies; 52+ messages in thread
From: Yao, Jiewen @ 2020-07-20 14:23 UTC (permalink / raw)
  To: devel@edk2.groups.io, Zhang, Shenglei; +Cc: Wang, Jian J, Lu, XiaoyuX

Reviewed-by: Jiewen.yao@intel.com

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>
> Subject: [edk2-devel] [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: Add
> configuration for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  CryptoPkg/CryptoPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/CryptoPkg/CryptoPkg.ci.yaml b/CryptoPkg/CryptoPkg.ci.yaml
> index f54ebfb22e70..e73b79e01fef 100644
> --- a/CryptoPkg/CryptoPkg.ci.yaml
> +++ b/CryptoPkg/CryptoPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      "CompilerPlugin": {
>          "DscPath": "CryptoPkg.dsc"
>      },
> --
> 2.18.0.windows.1
> 
> 
> 


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 12/15] SecurityPkg/SecurityPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:37 ` [PATCH 12/15] SecurityPkg/SecurityPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20 14:24   ` Yao, Jiewen
  0 siblings, 0 replies; 52+ messages in thread
From: Yao, Jiewen @ 2020-07-20 14:24 UTC (permalink / raw)
  To: Zhang, Shenglei, devel@edk2.groups.io; +Cc: Wang, Jian J, Chao Zhang

Reviewed-by: Jiewen.yao@intel.com

> -----Original Message-----
> From: Zhang, Shenglei <shenglei.zhang@intel.com>
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Chao Zhang <chao.b.zhang@intel.com>
> Subject: [PATCH 12/15] SecurityPkg/SecurityPkg.ci.yaml: Add configuration for
> LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Chao Zhang <chao.b.zhang@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  SecurityPkg/SecurityPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/SecurityPkg/SecurityPkg.ci.yaml b/SecurityPkg/SecurityPkg.ci.yaml
> index 953219053318..1ef1d2e67ead 100644
> --- a/SecurityPkg/SecurityPkg.ci.yaml
> +++ b/SecurityPkg/SecurityPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      "CompilerPlugin": {
>          "DscPath": "SecurityPkg.dsc"
>      },
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 03/15] ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 ` [PATCH 03/15] ArmVirtPkg/ArmVirtPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20 21:59   ` Laszlo Ersek
  0 siblings, 0 replies; 52+ messages in thread
From: Laszlo Ersek @ 2020-07-20 21:59 UTC (permalink / raw)
  To: Shenglei Zhang, devel; +Cc: Ard Biesheuvel, Leif Lindholm

On 07/20/20 10:36, Shenglei Zhang wrote:
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  ArmVirtPkg/ArmVirtPkg.ci.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/ArmVirtPkg/ArmVirtPkg.ci.yaml b/ArmVirtPkg/ArmVirtPkg.ci.yaml
> index 4553725ee528..27bb7ff49011 100644
> --- a/ArmVirtPkg/ArmVirtPkg.ci.yaml
> +++ b/ArmVirtPkg/ArmVirtPkg.ci.yaml
> @@ -8,6 +8,10 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +    ## options defined .pytool/Plugin/LicenseCheck
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      ## options defined .pytool/Plugin/CompilerPlugin
>      "CompilerPlugin": {
>          "DscPath": "" # Don't support this test
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:37 ` [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20 21:59   ` Laszlo Ersek
  2020-07-21  0:24   ` Dong, Eric
  1 sibling, 0 replies; 52+ messages in thread
From: Laszlo Ersek @ 2020-07-20 21:59 UTC (permalink / raw)
  To: Shenglei Zhang, devel; +Cc: Eric Dong, Ray Ni

On 07/20/20 10:37, Shenglei Zhang wrote:
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  UefiCpuPkg/UefiCpuPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/UefiCpuPkg/UefiCpuPkg.ci.yaml b/UefiCpuPkg/UefiCpuPkg.ci.yaml
> index 99e460a8b090..d54651d43800 100644
> --- a/UefiCpuPkg/UefiCpuPkg.ci.yaml
> +++ b/UefiCpuPkg/UefiCpuPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      "CompilerPlugin": {
>          "DscPath": "UefiCpuPkg.dsc"
>      },
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:37 ` [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-20 22:01   ` Laszlo Ersek
  2020-07-27  6:21     ` Zhang, Shenglei
  0 siblings, 1 reply; 52+ messages in thread
From: Laszlo Ersek @ 2020-07-20 22:01 UTC (permalink / raw)
  To: Shenglei Zhang, devel; +Cc: Jordan Justen, Ard Biesheuvel

On 07/20/20 10:37, Shenglei Zhang wrote:
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  OvmfPkg/OvmfPkg.ci.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/OvmfPkg/OvmfPkg.ci.yaml b/OvmfPkg/OvmfPkg.ci.yaml
> index 98992f0429ff..ed342d7a3d08 100644
> --- a/OvmfPkg/OvmfPkg.ci.yaml
> +++ b/OvmfPkg/OvmfPkg.ci.yaml
> @@ -8,6 +8,10 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +    ## options defined .pytool/Plugin/LicenseCheck
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      ## options defined .pytool/Plugin/CompilerPlugin
>      "CompilerPlugin": {
>          "DscPath": "" # Don't support this test
> 

Can you list the following file at once, please:

  OvmfPkg/QemuVideoDxe/VbeShim.h

With that:

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:37 ` [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: " Zhang, Shenglei
  2020-07-20 21:59   ` Laszlo Ersek
@ 2020-07-21  0:24   ` Dong, Eric
  1 sibling, 0 replies; 52+ messages in thread
From: Dong, Eric @ 2020-07-21  0:24 UTC (permalink / raw)
  To: Zhang, Shenglei, devel@edk2.groups.io; +Cc: Ni, Ray, Laszlo Ersek

Reviewed-by: Eric Dong <eric.dong@intel.com>

> -----Original Message-----
> From: Zhang, Shenglei <shenglei.zhang@intel.com>
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Laszlo
> Ersek <lersek@redhat.com>
> Subject: [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration
> for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for some generated files.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  UefiCpuPkg/UefiCpuPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/UefiCpuPkg/UefiCpuPkg.ci.yaml
> b/UefiCpuPkg/UefiCpuPkg.ci.yaml index 99e460a8b090..d54651d43800
> 100644
> --- a/UefiCpuPkg/UefiCpuPkg.ci.yaml
> +++ b/UefiCpuPkg/UefiCpuPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      "CompilerPlugin": {
>          "DscPath": "UefiCpuPkg.dsc"
>      },
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 07/15] MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:37 ` [PATCH 07/15] MdeModulePkg/MdeModulePkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-21  0:34   ` Wu, Hao A
  0 siblings, 0 replies; 52+ messages in thread
From: Wu, Hao A @ 2020-07-21  0:34 UTC (permalink / raw)
  To: devel@edk2.groups.io, Zhang, Shenglei; +Cc: Wang, Jian J

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>
> Subject: [edk2-devel] [PATCH 07/15] MdeModulePkg/MdeModulePkg.ci.yaml:
> Add configuration for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for some generated files.
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  MdeModulePkg/MdeModulePkg.ci.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.ci.yaml
> b/MdeModulePkg/MdeModulePkg.ci.yaml
> index 1cfc1328390e..0fc8c3633878 100644
> --- a/MdeModulePkg/MdeModulePkg.ci.yaml
> +++ b/MdeModulePkg/MdeModulePkg.ci.yaml
> @@ -5,6 +5,10 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +    ## options defined .pytool/Plugin/LicenseCheck
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },


Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


>      ## options defined ci/Plugin/CompilerPlugin
>      "CompilerPlugin": {
>          "DscPath": "MdeModulePkg.dsc"
> --
> 2.18.0.windows.1
> 
> 
> 


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:36 ` [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: " Zhang, Shenglei
  2020-07-20 14:23   ` [edk2-devel] " Yao, Jiewen
@ 2020-07-21  1:31   ` Guomin Jiang
  1 sibling, 0 replies; 52+ messages in thread
From: Guomin Jiang @ 2020-07-21  1:31 UTC (permalink / raw)
  To: devel@edk2.groups.io, Zhang, Shenglei; +Cc: Wang, Jian J, Lu, XiaoyuX

I think the better subject is "Add configuration for avoiding License Conflict".

Anyway, it's good to me.

Reviewed-by: Guomin Jiang <guomin.jiang@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>
> Subject: [edk2-devel] [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: Add
> configuration for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for some generated files.
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  CryptoPkg/CryptoPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/CryptoPkg/CryptoPkg.ci.yaml b/CryptoPkg/CryptoPkg.ci.yaml
> index f54ebfb22e70..e73b79e01fef 100644
> --- a/CryptoPkg/CryptoPkg.ci.yaml
> +++ b/CryptoPkg/CryptoPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      "CompilerPlugin": {
>          "DscPath": "CryptoPkg.dsc"
>      },
> --
> 2.18.0.windows.1
> 
> 
> 


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:37 ` [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-21  1:31   ` Guomin Jiang
  2020-07-28 23:30   ` Michael D Kinney
  1 sibling, 0 replies; 52+ messages in thread
From: Guomin Jiang @ 2020-07-21  1:31 UTC (permalink / raw)
  To: devel@edk2.groups.io, Zhang, Shenglei; +Cc: Gao, Liming, Kinney, Michael D

I think the better subject is "Add configuration for avoiding License Conflict".

Anyway, it's good to me.

Reviewed-by: Guomin Jiang <guomin.jiang@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: [edk2-devel] [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml:
> Add configuration for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for some generated files.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  FmpDevicePkg/FmpDevicePkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/FmpDevicePkg/FmpDevicePkg.ci.yaml
> b/FmpDevicePkg/FmpDevicePkg.ci.yaml
> index 74a0aefe8e49..d498ad7d21e1 100644
> --- a/FmpDevicePkg/FmpDevicePkg.ci.yaml
> +++ b/FmpDevicePkg/FmpDevicePkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      "CompilerPlugin": {
>          "DscPath": "FmpDevicePkg.dsc"
>      },
> --
> 2.18.0.windows.1
> 
> 
> 


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 09/15] NetworkPkg/NetworkPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:37 ` [PATCH 09/15] NetworkPkg/NetworkPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-21 16:42   ` Maciej Rabeda
  0 siblings, 0 replies; 52+ messages in thread
From: Maciej Rabeda @ 2020-07-21 16:42 UTC (permalink / raw)
  To: devel, shenglei.zhang; +Cc: Jiaxin Wu, Siyuan Fu

Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>

On 20-Jul-20 10:37, Zhang, Shenglei wrote:
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
>
> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>   NetworkPkg/NetworkPkg.ci.yaml | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/NetworkPkg/NetworkPkg.ci.yaml b/NetworkPkg/NetworkPkg.ci.yaml
> index 70f2e1014748..aa536830fc27 100644
> --- a/NetworkPkg/NetworkPkg.ci.yaml
> +++ b/NetworkPkg/NetworkPkg.ci.yaml
> @@ -5,6 +5,9 @@
>   # SPDX-License-Identifier: BSD-2-Clause-Patent
>   ##
>   {
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>       "CompilerPlugin": {
>           "DscPath": "NetworkPkg.dsc"
>       },


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (14 preceding siblings ...)
  2020-07-20  8:37 ` [PATCH 15/15] UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file Zhang, Shenglei
@ 2020-07-25  1:38 ` Rebecca Cran
  2020-07-27  2:34   ` Liming Gao
       [not found]   ` <16257B609DB8C7F6.7401@groups.io>
  2020-07-27  3:00 ` Liming Gao
                   ` (2 subsequent siblings)
  18 siblings, 2 replies; 52+ messages in thread
From: Rebecca Cran @ 2020-07-25  1:38 UTC (permalink / raw)
  To: devel, shenglei.zhang
  Cc: Michael D Kinney, Sean Brogan, Bret Barkelew, Eric Dong,
	Laszlo Ersek, Zhichao Gao, Jiewen Yao, Chao Zhang, Jordan Justen,
	Maciej Rabeda, Jiaxin Wu, Siyuan Fu, Liming Gao, Jian J Wang,
	Hao A Wu, Andrew Fish, Ray Ni, Xiaoyu Lu, Ard Biesheuvel,
	Leif Lindholm

On 7/20/20 2:36 AM, Zhang, Shenglei wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> LicenseCheck is now enabled in PatchCheck.py. But there's
> a patch "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
> to suggest revert the change.These patch series introduce
> a plugin LicenseCheck into open ci so that license issues can
> still be checked after the checker is disabled in PatchCheck.py.
> 1/15 is the plugin implementation.
> 2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow developers
> to skip license check for some files like generated files.

Has there been any progress on this? I'm waiting for it because it's 
required for my bhyve changes.


-- 

Rebecca Cran



^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-25  1:38 ` [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci Rebecca Cran
@ 2020-07-27  2:34   ` Liming Gao
       [not found]   ` <16257B609DB8C7F6.7401@groups.io>
  1 sibling, 0 replies; 52+ messages in thread
From: Liming Gao @ 2020-07-27  2:34 UTC (permalink / raw)
  To: Rebecca Cran, devel@edk2.groups.io, Zhang, Shenglei
  Cc: Kinney, Michael D, Sean Brogan, Bret Barkelew, Dong, Eric,
	Laszlo Ersek, Gao, Zhichao, Yao, Jiewen, Chao Zhang,
	Justen, Jordan L, Maciej Rabeda, Wu, Jiaxin, Fu, Siyuan,
	Wang, Jian J, Wu, Hao A, Andrew Fish, Ni, Ray, Lu, XiaoyuX,
	Ard Biesheuvel, Leif Lindholm

Rebecca:
  I see Shenglei patch. I plan to finish review early of this week, then merge this patch set, and revert the original change in PatchCheck.py. 

Thanks
Liming
-----Original Message-----
From: Rebecca Cran <rebecca@bsdio.com> 
Sent: 2020年7月25日 9:38
To: devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Gao, Liming <liming.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>
Subject: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

On 7/20/20 2:36 AM, Zhang, Shenglei wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> LicenseCheck is now enabled in PatchCheck.py. But there's a patch 
> "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
> to suggest revert the change.These patch series introduce a plugin 
> LicenseCheck into open ci so that license issues can still be checked 
> after the checker is disabled in PatchCheck.py.
> 1/15 is the plugin implementation.
> 2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow developers to 
> skip license check for some files like generated files.

Has there been any progress on this? I'm waiting for it because it's required for my bhyve changes.


-- 

Rebecca Cran



^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (15 preceding siblings ...)
  2020-07-25  1:38 ` [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci Rebecca Cran
@ 2020-07-27  3:00 ` Liming Gao
       [not found] ` <1623691E419E189F.16344@groups.io>
  2020-07-28 23:33 ` [PATCH 00/15] Add a plugin LicenseCheck in open ci Michael D Kinney
  18 siblings, 0 replies; 52+ messages in thread
From: Liming Gao @ 2020-07-27  3:00 UTC (permalink / raw)
  To: Zhang, Shenglei, devel@edk2.groups.io
  Cc: Kinney, Michael D, Sean Brogan, Bret Barkelew, Dong, Eric,
	Laszlo Ersek, Gao, Zhichao, Yao, Jiewen, Chao Zhang,
	Justen, Jordan L, Maciej Rabeda, Wu, Jiaxin, Fu, Siyuan,
	Wang, Jian J, Wu, Hao A, Andrew Fish, Ni, Ray, Lu, XiaoyuX,
	Ard Biesheuvel, Leif Lindholm

Shenglei:
  I have one comment. Seemly, LicenseCheck_plug_in.yaml copyright may be Intel one. 

  Reviewed-by: Liming Gao <liming.gao@intel.com> for this patch set. 

Thanks
Liming
-----Original Message-----
From: Zhang, Shenglei <shenglei.zhang@intel.com> 
Sent: 2020年7月20日 16:37
To: devel@edk2.groups.io
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Gao, Liming <liming.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>
Subject: [PATCH 00/15] Add a plugin LicenseCheck in open ci

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
LicenseCheck is now enabled in PatchCheck.py. But there's a patch "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
to suggest revert the change.These patch series introduce a plugin LicenseCheck into open ci so that license issues can still be checked after the checker is disabled in PatchCheck.py.
1/15 is the plugin implementation.
2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow developers to skip license check for some files like generated files.

Only BSD-2-Clause-Patent and BSD-3-Clause-Patent can pass this checker.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Shenglei Zhang (15):
  .pytool/Plugin: Add a plugin LicenseCheck
  FatPkg/FatPkg.ci.yaml: Add configuration for LicenseCheck
  ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for LicenseCheck
  CryptoPkg/CryptoPkg.ci.yaml: Add configuration for LicenseCheck
  EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration for LicenseCheck
  FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for LicenseCheck
  MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for LicenseCheck
  MdePkg/MdePkg.ci.yaml: Add configuration for LicenseCheck
  NetworkPkg/NetworkPkg.ci.yaml: Add configuration for LicenseCheck
  OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
  PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add configuration for
    LicenseCheck
  SecurityPkg/SecurityPkg.ci.yaml: Add configuration for LicenseCheck
  ShellPkg/ShellPkg.ci.yaml: Add configuration for LicenseCheck
  UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for LicenseCheck
  UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file

 .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118 ++++++++++++++++++
 .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11 ++
 .pytool/Plugin/LicenseCheck/Readme.md         |  17 +++
 ArmVirtPkg/ArmVirtPkg.ci.yaml                 |   4 +
 CryptoPkg/CryptoPkg.ci.yaml                   |   3 +
 EmulatorPkg/EmulatorPkg.ci.yaml               |   4 +
 FatPkg/FatPkg.ci.yaml                         |   3 +
 FmpDevicePkg/FmpDevicePkg.ci.yaml             |   3 +
 MdeModulePkg/MdeModulePkg.ci.yaml             |   4 +
 MdePkg/MdePkg.ci.yaml                         |   4 +
 NetworkPkg/NetworkPkg.ci.yaml                 |   3 +
 OvmfPkg/OvmfPkg.ci.yaml                       |   4 +
 PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml         |   3 +
 SecurityPkg/SecurityPkg.ci.yaml               |   3 +
 ShellPkg/ShellPkg.ci.yaml                     |   3 +
 UefiCpuPkg/UefiCpuPkg.ci.yaml                 |   3 +
 .../UnitTestFrameworkPkg.ci.yaml              |   4 +
 17 files changed, 194 insertions(+)
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck.py
 create mode 100644 .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
 create mode 100644 .pytool/Plugin/LicenseCheck/Readme.md

--
2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20 22:01   ` Laszlo Ersek
@ 2020-07-27  6:21     ` Zhang, Shenglei
  2020-07-27  9:50       ` Laszlo Ersek
  0 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-27  6:21 UTC (permalink / raw)
  To: Laszlo Ersek, devel@edk2.groups.io; +Cc: Justen, Jordan L, Ard Biesheuvel

Hi Laszlo,

VbeShim.h is existing in edk2 now. This plugin only checks the patches to be checked in.
So there's no need to add existing files to this section.

Thanks,
Shenglei

> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Tuesday, July 21, 2020 6:01 AM
> To: Zhang, Shenglei <shenglei.zhang@intel.com>; devel@edk2.groups.io
> Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>
> Subject: Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for
> LicenseCheck
> 
> On 07/20/20 10:37, Shenglei Zhang wrote:
> > Add configuration IgnoreFiles for package config files.
> > So users can rely on this to skip license conflict for
> > some generated files.
> >
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> > ---
> >  OvmfPkg/OvmfPkg.ci.yaml | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/OvmfPkg/OvmfPkg.ci.yaml b/OvmfPkg/OvmfPkg.ci.yaml
> > index 98992f0429ff..ed342d7a3d08 100644
> > --- a/OvmfPkg/OvmfPkg.ci.yaml
> > +++ b/OvmfPkg/OvmfPkg.ci.yaml
> > @@ -8,6 +8,10 @@
> >  # SPDX-License-Identifier: BSD-2-Clause-Patent
> >  ##
> >  {
> > +    ## options defined .pytool/Plugin/LicenseCheck
> > +    "LicenseCheck": {
> > +        "IgnoreFiles": []
> > +    },
> >      ## options defined .pytool/Plugin/CompilerPlugin
> >      "CompilerPlugin": {
> >          "DscPath": "" # Don't support this test
> >
> 
> Can you list the following file at once, please:
> 
>   OvmfPkg/QemuVideoDxe/VbeShim.h
> 
> With that:
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 
> Thanks
> Laszlo


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 15/15] UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file
       [not found] ` <1623691E419E189F.16344@groups.io>
@ 2020-07-27  6:26   ` Zhang, Shenglei
  0 siblings, 0 replies; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-27  6:26 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io, Sean Brogan,
	Bret Barkelew
  Cc: Zhang, Shenglei

Hi Michael/Sean/Bret,

Could you help review this patch?

Thanks,
Shenglei

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan
> <sean.brogan@microsoft.com>; Bret Barkelew
> <Bret.Barkelew@microsoft.com>
> Subject: [edk2-devel] [PATCH 15/15] UnitTestFrameworkPkg: Add
> configuration for LicenseCheck in yaml file
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
> b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
> index 51e172537f8a..2988e03f763f 100644
> --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
> +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
> @@ -5,6 +5,10 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +    ## options defined .pytool/Plugin/LicenseCheck
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      ## options defined .pytool/Plugin/CompilerPlugin
>      "CompilerPlugin": {
>          "DscPath": "UnitTestFrameworkPkg.dsc"
> --
> 2.18.0.windows.1
> 
> 
> 


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 13/15] ShellPkg/ShellPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:37 ` [PATCH 13/15] ShellPkg/ShellPkg.ci.yaml: " Zhang, Shenglei
@ 2020-07-27  6:28   ` Gao, Zhichao
  0 siblings, 0 replies; 52+ messages in thread
From: Gao, Zhichao @ 2020-07-27  6:28 UTC (permalink / raw)
  To: devel@edk2.groups.io, Zhang, Shenglei; +Cc: Ni, Ray

Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>

Thanks,
Zhichao

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Zhang,
> Shenglei
> Sent: Monday, July 20, 2020 4:37 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>
> Subject: [edk2-devel] [PATCH 13/15] ShellPkg/ShellPkg.ci.yaml: Add configuration
> for LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for some generated files.
> 
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  ShellPkg/ShellPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/ShellPkg/ShellPkg.ci.yaml b/ShellPkg/ShellPkg.ci.yaml index
> 67de34a2556e..565e08596b2f 100644
> --- a/ShellPkg/ShellPkg.ci.yaml
> +++ b/ShellPkg/ShellPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  ##  {
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      "CompilerPlugin": {
>          "DscPath": "ShellPkg.dsc"
>      },
> --
> 2.18.0.windows.1
> 
> 
> 


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-27  6:21     ` Zhang, Shenglei
@ 2020-07-27  9:50       ` Laszlo Ersek
  2020-07-28  1:11         ` Zhang, Shenglei
  0 siblings, 1 reply; 52+ messages in thread
From: Laszlo Ersek @ 2020-07-27  9:50 UTC (permalink / raw)
  To: Zhang, Shenglei, Rebecca Cran
  Cc: devel@edk2.groups.io, Justen, Jordan L, Ard Biesheuvel

On 07/27/20 08:21, Zhang, Shenglei wrote:
> Hi Laszlo,
> 
> VbeShim.h is existing in edk2 now. This plugin only checks the patches to be checked in.
> So there's no need to add existing files to this section.

OK, thanks, we can always extend this stanza later, if needed.

Rebecca: once this patch is upstream, please post a separate patch for listing "OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.h" in "IgnoreFiles". Otherwise I won't be able to merge your patch at <https://edk2.groups.io/g/devel/message/62395>.


Shenglei: I have a question regarding IgnoreFiles syntax. In "MdeModulePkg/MdeModulePkg.ci.yaml", there are two syntaxes:

- The IgnoreFiles stanza for "CharEncodingCheck" uses pathnames that are relative to the *project* root:

>     ## options defined ci/Plugin/CharEncodingCheck
>     "CharEncodingCheck": {
>         "IgnoreFiles": [
>             "MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/test/testc.c",
>             "MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/windows/testc.c"
>         ]
>     },

- The IgnoreFiles stanza for "SpellCheck" uses pathnames that are relative to the *package* (not project) root:

>     "SpellCheck": {
> ...
>         "IgnoreFiles": [             # use gitignore syntax to ignore errors in matching files
>             "Library/LzmaCustomDecompressLib/Sdk/DOC/*"
>         ],

How do we know whether a particular check's IgnoreFiles stanza requires project-root-relative or package-root-relative pathnames?

Thanks!
Laszlo

> Thanks,
> Shenglei
> 
>> -----Original Message-----
>> From: Laszlo Ersek <lersek@redhat.com>
>> Sent: Tuesday, July 21, 2020 6:01 AM
>> To: Zhang, Shenglei <shenglei.zhang@intel.com>; devel@edk2.groups.io
>> Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Ard Biesheuvel
>> <ard.biesheuvel@arm.com>
>> Subject: Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for
>> LicenseCheck
>>
>> On 07/20/20 10:37, Shenglei Zhang wrote:
>>> Add configuration IgnoreFiles for package config files.
>>> So users can rely on this to skip license conflict for
>>> some generated files.
>>>
>>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>> Cc: Laszlo Ersek <lersek@redhat.com>
>>> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
>>> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
>>> ---
>>>  OvmfPkg/OvmfPkg.ci.yaml | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/OvmfPkg/OvmfPkg.ci.yaml b/OvmfPkg/OvmfPkg.ci.yaml
>>> index 98992f0429ff..ed342d7a3d08 100644
>>> --- a/OvmfPkg/OvmfPkg.ci.yaml
>>> +++ b/OvmfPkg/OvmfPkg.ci.yaml
>>> @@ -8,6 +8,10 @@
>>>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>>>  ##
>>>  {
>>> +    ## options defined .pytool/Plugin/LicenseCheck
>>> +    "LicenseCheck": {
>>> +        "IgnoreFiles": []
>>> +    },
>>>      ## options defined .pytool/Plugin/CompilerPlugin
>>>      "CompilerPlugin": {
>>>          "DscPath": "" # Don't support this test
>>>
>>
>> Can you list the following file at once, please:
>>
>>   OvmfPkg/QemuVideoDxe/VbeShim.h
>>
>> With that:
>>
>> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>>
>> Thanks
>> Laszlo
> 


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-27  9:50       ` Laszlo Ersek
@ 2020-07-28  1:11         ` Zhang, Shenglei
  2020-07-28  9:56           ` Laszlo Ersek
  0 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-28  1:11 UTC (permalink / raw)
  To: Laszlo Ersek, Rebecca Cran
  Cc: devel@edk2.groups.io, Justen, Jordan L, Ard Biesheuvel

Hi Laszlo,

> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Monday, July 27, 2020 5:51 PM
> To: Zhang, Shenglei <shenglei.zhang@intel.com>; Rebecca Cran
> <rebecca@bsdio.com>
> Cc: devel@edk2.groups.io; Justen, Jordan L <jordan.l.justen@intel.com>;
> Ard Biesheuvel <ard.biesheuvel@arm.com>
> Subject: Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for
> LicenseCheck
> 
> On 07/27/20 08:21, Zhang, Shenglei wrote:
> > Hi Laszlo,
> >
> > VbeShim.h is existing in edk2 now. This plugin only checks the patches to
> be checked in.
> > So there's no need to add existing files to this section.
> 
> OK, thanks, we can always extend this stanza later, if needed.
> 
> Rebecca: once this patch is upstream, please post a separate patch for listing
> "OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.h" in "IgnoreFiles". Otherwise I
> won't be able to merge your patch at
> <https://edk2.groups.io/g/devel/message/62395>.
> 
> 
> Shenglei: I have a question regarding IgnoreFiles syntax. In
> "MdeModulePkg/MdeModulePkg.ci.yaml", there are two syntaxes:
> 
> - The IgnoreFiles stanza for "CharEncodingCheck" uses pathnames that are
> relative to the *project* root:
> 
> >     ## options defined ci/Plugin/CharEncodingCheck
> >     "CharEncodingCheck": {
> >         "IgnoreFiles": [
> >
> "MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/test/testc.c",
> >
> "MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/windows/tes
> tc.c"
> >         ]
> >     },
> 
> - The IgnoreFiles stanza for "SpellCheck" uses pathnames that are relative to
> the *package* (not project) root:
> 
> >     "SpellCheck": {
> > ...
> >         "IgnoreFiles": [             # use gitignore syntax to ignore errors in matching
> files
> >             "Library/LzmaCustomDecompressLib/Sdk/DOC/*"
> >         ],
> 
> How do we know whether a particular check's IgnoreFiles stanza requires
> project-root-relative or package-root-relative pathnames?

It depends on the designing of the plugins, likes the check scope.
But looks like all checks' IgnoreFiles stanza only requires package-root-relative pathnames, currently.
It's recommended to use package-root-relative pathnames because a plugin must support this format.

Thanks,
Shenglei

> 
> Thanks!
> Laszlo
> 
> > Thanks,
> > Shenglei
> >
> >> -----Original Message-----
> >> From: Laszlo Ersek <lersek@redhat.com>
> >> Sent: Tuesday, July 21, 2020 6:01 AM
> >> To: Zhang, Shenglei <shenglei.zhang@intel.com>; devel@edk2.groups.io
> >> Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Ard Biesheuvel
> >> <ard.biesheuvel@arm.com>
> >> Subject: Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration
> for
> >> LicenseCheck
> >>
> >> On 07/20/20 10:37, Shenglei Zhang wrote:
> >>> Add configuration IgnoreFiles for package config files.
> >>> So users can rely on this to skip license conflict for
> >>> some generated files.
> >>>
> >>> Cc: Jordan Justen <jordan.l.justen@intel.com>
> >>> Cc: Laszlo Ersek <lersek@redhat.com>
> >>> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> >>> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> >>> ---
> >>>  OvmfPkg/OvmfPkg.ci.yaml | 4 ++++
> >>>  1 file changed, 4 insertions(+)
> >>>
> >>> diff --git a/OvmfPkg/OvmfPkg.ci.yaml b/OvmfPkg/OvmfPkg.ci.yaml
> >>> index 98992f0429ff..ed342d7a3d08 100644
> >>> --- a/OvmfPkg/OvmfPkg.ci.yaml
> >>> +++ b/OvmfPkg/OvmfPkg.ci.yaml
> >>> @@ -8,6 +8,10 @@
> >>>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> >>>  ##
> >>>  {
> >>> +    ## options defined .pytool/Plugin/LicenseCheck
> >>> +    "LicenseCheck": {
> >>> +        "IgnoreFiles": []
> >>> +    },
> >>>      ## options defined .pytool/Plugin/CompilerPlugin
> >>>      "CompilerPlugin": {
> >>>          "DscPath": "" # Don't support this test
> >>>
> >>
> >> Can you list the following file at once, please:
> >>
> >>   OvmfPkg/QemuVideoDxe/VbeShim.h
> >>
> >> With that:
> >>
> >> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> >>
> >> Thanks
> >> Laszlo
> >


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-28  1:11         ` Zhang, Shenglei
@ 2020-07-28  9:56           ` Laszlo Ersek
  0 siblings, 0 replies; 52+ messages in thread
From: Laszlo Ersek @ 2020-07-28  9:56 UTC (permalink / raw)
  To: Zhang, Shenglei, Rebecca Cran
  Cc: devel@edk2.groups.io, Justen, Jordan L, Ard Biesheuvel

On 07/28/20 03:11, Zhang, Shenglei wrote:
> Hi Laszlo,
> 
>> -----Original Message-----
>> From: Laszlo Ersek <lersek@redhat.com>
>> Sent: Monday, July 27, 2020 5:51 PM
>> To: Zhang, Shenglei <shenglei.zhang@intel.com>; Rebecca Cran
>> <rebecca@bsdio.com>
>> Cc: devel@edk2.groups.io; Justen, Jordan L <jordan.l.justen@intel.com>;
>> Ard Biesheuvel <ard.biesheuvel@arm.com>
>> Subject: Re: [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: Add configuration for
>> LicenseCheck
>>
>> On 07/27/20 08:21, Zhang, Shenglei wrote:
>>> Hi Laszlo,
>>>
>>> VbeShim.h is existing in edk2 now. This plugin only checks the patches to
>> be checked in.
>>> So there's no need to add existing files to this section.
>>
>> OK, thanks, we can always extend this stanza later, if needed.
>>
>> Rebecca: once this patch is upstream, please post a separate patch for listing
>> "OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.h" in "IgnoreFiles". Otherwise I
>> won't be able to merge your patch at
>> <https://edk2.groups.io/g/devel/message/62395>.
>>
>>
>> Shenglei: I have a question regarding IgnoreFiles syntax. In
>> "MdeModulePkg/MdeModulePkg.ci.yaml", there are two syntaxes:
>>
>> - The IgnoreFiles stanza for "CharEncodingCheck" uses pathnames that are
>> relative to the *project* root:
>>
>>>     ## options defined ci/Plugin/CharEncodingCheck
>>>     "CharEncodingCheck": {
>>>         "IgnoreFiles": [
>>>
>> "MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/test/testc.c",
>>>
>> "MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/windows/tes
>> tc.c"
>>>         ]
>>>     },
>>
>> - The IgnoreFiles stanza for "SpellCheck" uses pathnames that are relative to
>> the *package* (not project) root:
>>
>>>     "SpellCheck": {
>>> ...
>>>         "IgnoreFiles": [             # use gitignore syntax to ignore errors in matching
>> files
>>>             "Library/LzmaCustomDecompressLib/Sdk/DOC/*"
>>>         ],
>>
>> How do we know whether a particular check's IgnoreFiles stanza requires
>> project-root-relative or package-root-relative pathnames?
> 
> It depends on the designing of the plugins, likes the check scope.
> But looks like all checks' IgnoreFiles stanza only requires package-root-relative pathnames, currently.
> It's recommended to use package-root-relative pathnames because a plugin must support this format.

Thanks!

So we should ignore "Bhyve/BhyveRfbDxe/VbeShim.h".

Thanks
Laszlo


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck
  2020-07-20  8:36 ` [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck Zhang, Shenglei
@ 2020-07-28 23:29   ` Michael D Kinney
  2020-07-29  6:06     ` Zhang, Shenglei
  0 siblings, 1 reply; 52+ messages in thread
From: Michael D Kinney @ 2020-07-28 23:29 UTC (permalink / raw)
  To: Zhang, Shenglei, devel@edk2.groups.io, Kinney, Michael D
  Cc: Sean Brogan, Bret Barkelew, Gao, Liming

Where did the requirement for BSD-3-Clause-Patent come from?

Thanks,

Mike

> -----Original Message-----
> From: Zhang, Shenglei <shenglei.zhang@intel.com>
> Sent: Monday, July 20, 2020 1:37 AM
> To: devel@edk2.groups.io
> Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret
> Barkelew <Bret.Barkelew@microsoft.com>; Kinney, Michael
> D <michael.d.kinney@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: [PATCH 01/15] .pytool/Plugin: Add a plugin
> LicenseCheck
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> Add a plugin to check license conflict for new added
> files in a patch. It will report out errors when meeting
> files which are now contributed under BSD-2-Clause-
> Patent
> or BSD-3-Clause-Patent.
> 
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118
> ++++++++++++++++++
>  .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11 ++
>  .pytool/Plugin/LicenseCheck/Readme.md         |  17 +++
>  3 files changed, 146 insertions(+)
>  create mode 100644
> .pytool/Plugin/LicenseCheck/LicenseCheck.py
>  create mode 100644
> .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
>  create mode 100644
> .pytool/Plugin/LicenseCheck/Readme.md
> 
> diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> new file mode 100644
> index 000000000000..98941ddda758
> --- /dev/null
> +++ b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> @@ -0,0 +1,118 @@
> +# @file LicenseCheck.py
> +#
> +# Copyright (c) 2020, Intel Corporation. All rights
> reserved.<BR>
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +##
> +
> +import os
> +import logging
> +import re
> +from io import StringIO
> +from typing import List, Tuple
> +from
> edk2toolext.environment.plugintypes.ci_build_plugin
> import ICiBuildPlugin
> +from edk2toolext.environment.var_dict import VarDict
> +from edk2toollib.utility_functions import RunCmd
> +
> +
> +class LicenseCheck(ICiBuildPlugin):
> +
> +    """
> +    A CiBuildPlugin to check the license for new added
> files.
> +
> +    Configuration options:
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
> +    """
> +
> +    license_format_preflix = 'SPDX-License-Identifier'
> +
> +    bsd2_patent = 'BSD-2-Clause-Patent'
> +
> +    bsd3_patent = 'BSD-3-Clause-Patent'
> +
> +    Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)')
> +
> +    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"]
> +
> +    def GetTestName(self, packagename: str,
> environment: VarDict) -> tuple:
> +        """ Provide the testcase name and classname for
> use in reporting
> +            testclassname: a descriptive string for the
> testcase can include whitespace
> +            classname: should be patterned
> <packagename>.<plugin>.<optionally any unique condition>
> +
> +            Args:
> +              packagename: string containing name of
> package to build
> +              environment: The VarDict for the test to
> run in
> +            Returns:
> +                a tuple containing the testcase name
> and the classname
> +                (testcasename, classname)
> +        """
> +        return ("Check for license for " + packagename,
> packagename + ".LicenseCheck")
> +
> +    ##
> +    # External function of plugin.  This function is
> used to perform the task of the ci_build_plugin Plugin
> +    #
> +    #   - package is the edk2 path to package.  This
> means workspace/packagepath relative.
> +    #   - edk2path object configured with workspace and
> packages path
> +    #   - PkgConfig Object (dict) for the pkg
> +    #   - EnvConfig Object
> +    #   - Plugin Manager Instance
> +    #   - Plugin Helper Obj Instance
> +    #   - Junit Logger
> +    #   - output_stream the StringIO output stream from
> this plugin via logging
> +    def RunBuildPlugin(self, packagename, Edk2pathObj,
> pkgconfig, environment, PLM, PLMHelper, tc,
> output_stream=None):
> +        return_buffer = StringIO()
> +        params = "diff --unified=0 origin/master HEAD"
> +        RunCmd("git", params, outstream=return_buffer)
> +        p = return_buffer.getvalue().strip()
> +        patch = p.split("\n")
> +        return_buffer.close()
> +
> +        ignore_files = []
> +        if "IgnoreFiles" in pkgconfig:
> +            ignore_files = pkgconfig["IgnoreFiles"]
> +
> +        self.ok = True
> +        self.startcheck = False
> +        self.license = True
> +        self.all_file_pass = True
> +        count = len(patch)
> +        line_index = 0
> +        for line in patch:
> +            if line.startswith('--- /dev/null'):
> +                nextline = patch[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 and packagename in added_file:
> +                    if (self.IsIgnoreFile(added_file,
> ignore_files)):
> +                        line_index = line_index + 1
> +                        continue
> +                    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
> +            if line_index + 1 == count or
> patch[line_index + 1].startswith('diff --') and
> self.startcheck:
> +                if not self.license:
> +                    self.all_file_pass = False
> +                    error_message = "Invalid license
> in: " + added_file + " Hint: Only BSD-2-Clause-Patent
> and" + \
> +                                    " BSD-3-Clause-
> Patent are accepted."
> +                    logging.error(error_message)
> +                self.startcheck = False
> +                self.license = True
> +            line_index = line_index + 1
> +
> +        if self.all_file_pass:
> +            tc.SetSuccess()
> +            return 0
> +        else:
> +            tc.SetFailed("License Check {0} Failed.
> ".format(packagename), "LICENSE_CHECK_FAILED")
> +            return 1
> +
> +    def IsIgnoreFile(self, file: str, ignore_files:
> List[str]) -> bool:
> +        for f in ignore_files:
> +            if f in file:
> +                return True
> +        return False
> diff --git
> a/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> b/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> new file mode 100644
> index 000000000000..1d02f6da5a69
> --- /dev/null
> +++
> b/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> @@ -0,0 +1,11 @@
> +## @file
> +# CiBuildPlugin used to check license issues for new
> added files
> +#
> +# Copyright (c) Microsoft Corporation.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +##
> +{
> +  "scope": "cibuild",
> +  "name": "License Check Test",
> +  "module": "LicenseCheck"
> +}
> diff --git a/.pytool/Plugin/LicenseCheck/Readme.md
> b/.pytool/Plugin/LicenseCheck/Readme.md
> new file mode 100644
> index 000000000000..57d9db6769fa
> --- /dev/null
> +++ b/.pytool/Plugin/LicenseCheck/Readme.md
> @@ -0,0 +1,17 @@
> +# License Check Plugin
> +
> +This CiBuildPlugin scans all new added files in a
> package to make sure code
> +is contributed under BSD-2-Clause-Patent or BSD-3-
> Clause-Patent.
> +
> +## Configuration
> +
> +The plugin can be configured to ignore certain files.
> +
> +``` yaml
> +"LicenseCheck": {
> +    "IgnoreFiles": []
> +}
> +```
> +### IgnoreFiles
> +
> +OPTIONAL List of file to ignore.
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 15/15] UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file
  2020-07-20  8:37 ` [PATCH 15/15] UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file Zhang, Shenglei
@ 2020-07-28 23:29   ` Michael D Kinney
  0 siblings, 0 replies; 52+ messages in thread
From: Michael D Kinney @ 2020-07-28 23:29 UTC (permalink / raw)
  To: devel@edk2.groups.io, Zhang, Shenglei, Kinney, Michael D
  Cc: Sean Brogan, Bret Barkelew

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On
> Behalf Of Zhang, Shenglei
> Sent: Monday, July 20, 2020 1:37 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean
> Brogan <sean.brogan@microsoft.com>; Bret Barkelew
> <Bret.Barkelew@microsoft.com>
> Subject: [edk2-devel] [PATCH 15/15]
> UnitTestFrameworkPkg: Add configuration for LicenseCheck
> in yaml file
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml | 4
> ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git
> a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
> b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
> index 51e172537f8a..2988e03f763f 100644
> --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
> +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkg.ci.yaml
> @@ -5,6 +5,10 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +    ## options defined .pytool/Plugin/LicenseCheck
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      ## options defined .pytool/Plugin/CompilerPlugin
>      "CompilerPlugin": {
>          "DscPath": "UnitTestFrameworkPkg.dsc"
> --
> 2.18.0.windows.1
> 
> 
> 


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for LicenseCheck
  2020-07-20  8:37 ` [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml: " Zhang, Shenglei
  2020-07-21  1:31   ` [edk2-devel] " Guomin Jiang
@ 2020-07-28 23:30   ` Michael D Kinney
  1 sibling, 0 replies; 52+ messages in thread
From: Michael D Kinney @ 2020-07-28 23:30 UTC (permalink / raw)
  To: Zhang, Shenglei, devel@edk2.groups.io, Kinney, Michael D; +Cc: Gao, Liming

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

> -----Original Message-----
> From: Zhang, Shenglei <shenglei.zhang@intel.com>
> Sent: Monday, July 20, 2020 1:37 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>; Kinney, Michael
> D <michael.d.kinney@intel.com>
> Subject: [PATCH 06/15]
> FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for
> LicenseCheck
> 
> Add configuration IgnoreFiles for package config files.
> So users can rely on this to skip license conflict for
> some generated files.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> ---
>  FmpDevicePkg/FmpDevicePkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/FmpDevicePkg/FmpDevicePkg.ci.yaml
> b/FmpDevicePkg/FmpDevicePkg.ci.yaml
> index 74a0aefe8e49..d498ad7d21e1 100644
> --- a/FmpDevicePkg/FmpDevicePkg.ci.yaml
> +++ b/FmpDevicePkg/FmpDevicePkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +    "LicenseCheck": {
> +        "IgnoreFiles": []
> +    },
>      "CompilerPlugin": {
>          "DscPath": "FmpDevicePkg.dsc"
>      },
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
                   ` (17 preceding siblings ...)
       [not found] ` <1623691E419E189F.16344@groups.io>
@ 2020-07-28 23:33 ` Michael D Kinney
  2020-07-29  1:11   ` Liming Gao
  2020-07-29  9:12   ` Laszlo Ersek
  18 siblings, 2 replies; 52+ messages in thread
From: Michael D Kinney @ 2020-07-28 23:33 UTC (permalink / raw)
  To: Zhang, Shenglei, devel@edk2.groups.io, Kinney, Michael D
  Cc: Sean Brogan, Bret Barkelew, Dong, Eric, Laszlo Ersek,
	Gao, Zhichao, Yao, Jiewen, Chao Zhang, Justen, Jordan L,
	Maciej Rabeda, Wu, Jiaxin, Fu, Siyuan, Gao, Liming, Wang, Jian J,
	Wu, Hao A, Andrew Fish, Ni, Ray, Lu, XiaoyuX, Ard Biesheuvel,
	Leif Lindholm

CI already runs PatchCheck.  If we ported PatchCheck to
a CI plugin, then the plugin could perform both the 
current PatchCheck features and the license check.

What this option evaluated?

If we did provide PatchCheck as a CI plugin, developers
I believe developers could run a stuart command likely
for the NOOPT target to run a PatchCheck CI plugin locally.

Thanks,

Mike

> -----Original Message-----
> From: Zhang, Shenglei <shenglei.zhang@intel.com>
> Sent: Monday, July 20, 2020 1:37 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean
> Brogan <sean.brogan@microsoft.com>; Bret Barkelew
> <Bret.Barkelew@microsoft.com>; Dong, Eric
> <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>;
> Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Chao Zhang
> <chao.b.zhang@intel.com>; Justen, Jordan L
> <jordan.l.justen@intel.com>; Maciej Rabeda
> <maciej.rabeda@linux.intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>;
> Gao, Liming <liming.gao@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>;
> Andrew Fish <afish@apple.com>; Ni, Ray
> <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm
> <leif@nuviainc.com>
> Subject: [PATCH 00/15] Add a plugin LicenseCheck in open
> ci
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> LicenseCheck is now enabled in PatchCheck.py. But
> there's
> a patch "Revert 'BaseTools/PatchCheck.py: Add
> LicenseCheck'"
> to suggest revert the change.These patch series
> introduce
> a plugin LicenseCheck into open ci so that license
> issues can
> still be checked after the checker is disabled in
> PatchCheck.py.
> 1/15 is the plugin implementation.
> 2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow
> developers
> to skip license check for some files like generated
> files.
> 
> Only BSD-2-Clause-Patent and BSD-3-Clause-Patent can
> pass this checker.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Chao Zhang <chao.b.zhang@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Shenglei Zhang (15):
>   .pytool/Plugin: Add a plugin LicenseCheck
>   FatPkg/FatPkg.ci.yaml: Add configuration for
> LicenseCheck
>   ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for
> LicenseCheck
>   CryptoPkg/CryptoPkg.ci.yaml: Add configuration for
> LicenseCheck
>   EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration for
> LicenseCheck
>   FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration
> for LicenseCheck
>   MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration
> for LicenseCheck
>   MdePkg/MdePkg.ci.yaml: Add configuration for
> LicenseCheck
>   NetworkPkg/NetworkPkg.ci.yaml: Add configuration for
> LicenseCheck
>   OvmfPkg/OvmfPkg.ci.yaml: Add configuration for
> LicenseCheck
>   PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add
> configuration for
>     LicenseCheck
>   SecurityPkg/SecurityPkg.ci.yaml: Add configuration for
> LicenseCheck
>   ShellPkg/ShellPkg.ci.yaml: Add configuration for
> LicenseCheck
>   UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for
> LicenseCheck
>   UnitTestFrameworkPkg: Add configuration for
> LicenseCheck in yaml file
> 
>  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118
> ++++++++++++++++++
>  .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11 ++
>  .pytool/Plugin/LicenseCheck/Readme.md         |  17 +++
>  ArmVirtPkg/ArmVirtPkg.ci.yaml                 |   4 +
>  CryptoPkg/CryptoPkg.ci.yaml                   |   3 +
>  EmulatorPkg/EmulatorPkg.ci.yaml               |   4 +
>  FatPkg/FatPkg.ci.yaml                         |   3 +
>  FmpDevicePkg/FmpDevicePkg.ci.yaml             |   3 +
>  MdeModulePkg/MdeModulePkg.ci.yaml             |   4 +
>  MdePkg/MdePkg.ci.yaml                         |   4 +
>  NetworkPkg/NetworkPkg.ci.yaml                 |   3 +
>  OvmfPkg/OvmfPkg.ci.yaml                       |   4 +
>  PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml         |   3 +
>  SecurityPkg/SecurityPkg.ci.yaml               |   3 +
>  ShellPkg/ShellPkg.ci.yaml                     |   3 +
>  UefiCpuPkg/UefiCpuPkg.ci.yaml                 |   3 +
>  .../UnitTestFrameworkPkg.ci.yaml              |   4 +
>  17 files changed, 194 insertions(+)
>  create mode 100644
> .pytool/Plugin/LicenseCheck/LicenseCheck.py
>  create mode 100644
> .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
>  create mode 100644
> .pytool/Plugin/LicenseCheck/Readme.md
> 
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-28 23:33 ` [PATCH 00/15] Add a plugin LicenseCheck in open ci Michael D Kinney
@ 2020-07-29  1:11   ` Liming Gao
  2020-07-29  1:32     ` Michael D Kinney
  2020-07-29  9:12   ` Laszlo Ersek
  1 sibling, 1 reply; 52+ messages in thread
From: Liming Gao @ 2020-07-29  1:11 UTC (permalink / raw)
  To: Kinney, Michael D, Zhang, Shenglei, devel@edk2.groups.io
  Cc: Sean Brogan, Bret Barkelew, Dong, Eric, Laszlo Ersek,
	Gao, Zhichao, Yao, Jiewen, Chao Zhang, Justen, Jordan L,
	Maciej Rabeda, Wu, Jiaxin, Fu, Siyuan, Wang, Jian J, Wu, Hao A,
	Andrew Fish, Ni, Ray, Lu, XiaoyuX, Ard Biesheuvel, Leif Lindholm,
	Gao, Liming

Mike:
  Previous discussion (https://edk2.groups.io/g/devel/message/62494) is to revert the license check change in PatchCheck, and enable license check as plugin. If so, the package maintainers can configure the package level exception list to allow some special cases, such as autogen file. 

Thanks
Liming
-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com> 
Sent: 2020年7月29日 7:34
To: Zhang, Shenglei <shenglei.zhang@intel.com>; devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Gao, Liming <liming.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>
Subject: RE: [PATCH 00/15] Add a plugin LicenseCheck in open ci

CI already runs PatchCheck.  If we ported PatchCheck to a CI plugin, then the plugin could perform both the current PatchCheck features and the license check.

What this option evaluated?

If we did provide PatchCheck as a CI plugin, developers I believe developers could run a stuart command likely for the NOOPT target to run a PatchCheck CI plugin locally.

Thanks,

Mike

> -----Original Message-----
> From: Zhang, Shenglei <shenglei.zhang@intel.com>
> Sent: Monday, July 20, 2020 1:37 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan 
> <sean.brogan@microsoft.com>; Bret Barkelew 
> <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; 
> Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao 
> <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao 
> Zhang <chao.b.zhang@intel.com>; Justen, Jordan L 
> <jordan.l.justen@intel.com>; Maciej Rabeda 
> <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, 
> Siyuan <siyuan.fu@intel.com>; Gao, Liming <liming.gao@intel.com>; 
> Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; 
> Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX 
> <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif 
> Lindholm <leif@nuviainc.com>
> Subject: [PATCH 00/15] Add a plugin LicenseCheck in open ci
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> LicenseCheck is now enabled in PatchCheck.py. But there's a patch 
> "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
> to suggest revert the change.These patch series introduce a plugin 
> LicenseCheck into open ci so that license issues can still be checked 
> after the checker is disabled in PatchCheck.py.
> 1/15 is the plugin implementation.
> 2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow developers to 
> skip license check for some files like generated files.
> 
> Only BSD-2-Clause-Patent and BSD-3-Clause-Patent can pass this 
> checker.
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>
> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Chao Zhang <chao.b.zhang@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Shenglei Zhang (15):
>   .pytool/Plugin: Add a plugin LicenseCheck
>   FatPkg/FatPkg.ci.yaml: Add configuration for LicenseCheck
>   ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for LicenseCheck
>   CryptoPkg/CryptoPkg.ci.yaml: Add configuration for LicenseCheck
>   EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration for LicenseCheck
>   FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration for 
> LicenseCheck
>   MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration for 
> LicenseCheck
>   MdePkg/MdePkg.ci.yaml: Add configuration for LicenseCheck
>   NetworkPkg/NetworkPkg.ci.yaml: Add configuration for LicenseCheck
>   OvmfPkg/OvmfPkg.ci.yaml: Add configuration for LicenseCheck
>   PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add configuration for
>     LicenseCheck
>   SecurityPkg/SecurityPkg.ci.yaml: Add configuration for LicenseCheck
>   ShellPkg/ShellPkg.ci.yaml: Add configuration for LicenseCheck
>   UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for LicenseCheck
>   UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml 
> file
> 
>  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118
> ++++++++++++++++++
>  .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11 ++
>  .pytool/Plugin/LicenseCheck/Readme.md         |  17 +++
>  ArmVirtPkg/ArmVirtPkg.ci.yaml                 |   4 +
>  CryptoPkg/CryptoPkg.ci.yaml                   |   3 +
>  EmulatorPkg/EmulatorPkg.ci.yaml               |   4 +
>  FatPkg/FatPkg.ci.yaml                         |   3 +
>  FmpDevicePkg/FmpDevicePkg.ci.yaml             |   3 +
>  MdeModulePkg/MdeModulePkg.ci.yaml             |   4 +
>  MdePkg/MdePkg.ci.yaml                         |   4 +
>  NetworkPkg/NetworkPkg.ci.yaml                 |   3 +
>  OvmfPkg/OvmfPkg.ci.yaml                       |   4 +
>  PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml         |   3 +
>  SecurityPkg/SecurityPkg.ci.yaml               |   3 +
>  ShellPkg/ShellPkg.ci.yaml                     |   3 +
>  UefiCpuPkg/UefiCpuPkg.ci.yaml                 |   3 +
>  .../UnitTestFrameworkPkg.ci.yaml              |   4 +
>  17 files changed, 194 insertions(+)
>  create mode 100644
> .pytool/Plugin/LicenseCheck/LicenseCheck.py
>  create mode 100644
> .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
>  create mode 100644
> .pytool/Plugin/LicenseCheck/Readme.md
> 
> --
> 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-29  1:11   ` Liming Gao
@ 2020-07-29  1:32     ` Michael D Kinney
  2020-07-29  7:37       ` Liming Gao
  2020-07-29  9:21       ` Laszlo Ersek
  0 siblings, 2 replies; 52+ messages in thread
From: Michael D Kinney @ 2020-07-29  1:32 UTC (permalink / raw)
  To: Gao, Liming, Zhang, Shenglei, devel@edk2.groups.io,
	Kinney, Michael D
  Cc: Sean Brogan, Bret Barkelew, Dong, Eric, Laszlo Ersek,
	Gao, Zhichao, Yao, Jiewen, Chao Zhang, Justen, Jordan L,
	Maciej Rabeda, Wu, Jiaxin, Fu, Siyuan, Wang, Jian J, Wu, Hao A,
	Andrew Fish, Ni, Ray, Lu, XiaoyuX, Ard Biesheuvel, Leif Lindholm

Hi Liming,

There are exception to PatchCheck as well for line endings and tabs.

Seems like a similar problem, and a single CI plugin could
support all these cases.

Mike

> -----Original Message-----
> From: Gao, Liming <liming.gao@intel.com>
> Sent: Tuesday, July 28, 2020 6:12 PM
> To: Kinney, Michael D <michael.d.kinney@intel.com>;
> Zhang, Shenglei <shenglei.zhang@intel.com>;
> devel@edk2.groups.io
> Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret
> Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric
> <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>;
> Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Chao Zhang
> <chao.b.zhang@intel.com>; Justen, Jordan L
> <jordan.l.justen@intel.com>; Maciej Rabeda
> <maciej.rabeda@linux.intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>;
> Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A
> <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni,
> Ray <ray.ni@intel.com>; Lu, XiaoyuX
> <xiaoyux.lu@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>; Leif Lindholm
> <leif@nuviainc.com>; Gao, Liming <liming.gao@intel.com>
> Subject: RE: [PATCH 00/15] Add a plugin LicenseCheck in
> open ci
> 
> Mike:
>   Previous discussion
> (https://edk2.groups.io/g/devel/message/62494) is to
> revert the license check change in PatchCheck, and
> enable license check as plugin. If so, the package
> maintainers can configure the package level exception
> list to allow some special cases, such as autogen file.
> 
> Thanks
> Liming
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: 2020年7月29日 7:34
> To: Zhang, Shenglei <shenglei.zhang@intel.com>;
> devel@edk2.groups.io; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret
> Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric
> <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>;
> Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Chao Zhang
> <chao.b.zhang@intel.com>; Justen, Jordan L
> <jordan.l.justen@intel.com>; Maciej Rabeda
> <maciej.rabeda@linux.intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>;
> Gao, Liming <liming.gao@intel.com>; Wang, Jian J
> <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>;
> Andrew Fish <afish@apple.com>; Ni, Ray
> <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>;
> Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm
> <leif@nuviainc.com>
> Subject: RE: [PATCH 00/15] Add a plugin LicenseCheck in
> open ci
> 
> CI already runs PatchCheck.  If we ported PatchCheck to
> a CI plugin, then the plugin could perform both the
> current PatchCheck features and the license check.
> 
> What this option evaluated?
> 
> If we did provide PatchCheck as a CI plugin, developers
> I believe developers could run a stuart command likely
> for the NOOPT target to run a PatchCheck CI plugin
> locally.
> 
> Thanks,
> 
> Mike
> 
> > -----Original Message-----
> > From: Zhang, Shenglei <shenglei.zhang@intel.com>
> > Sent: Monday, July 20, 2020 1:37 AM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>;
> Sean Brogan
> > <sean.brogan@microsoft.com>; Bret Barkelew
> > <Bret.Barkelew@microsoft.com>; Dong, Eric
> <eric.dong@intel.com>;
> > Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao
> > <zhichao.gao@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Chao
> > Zhang <chao.b.zhang@intel.com>; Justen, Jordan L
> > <jordan.l.justen@intel.com>; Maciej Rabeda
> > <maciej.rabeda@linux.intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Fu,
> > Siyuan <siyuan.fu@intel.com>; Gao, Liming
> <liming.gao@intel.com>;
> > Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A
> <hao.a.wu@intel.com>;
> > Andrew Fish <afish@apple.com>; Ni, Ray
> <ray.ni@intel.com>; Lu, XiaoyuX
> > <xiaoyux.lu@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>; Leif
> > Lindholm <leif@nuviainc.com>
> > Subject: [PATCH 00/15] Add a plugin LicenseCheck in
> open ci
> >
> > REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> > REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> > LicenseCheck is now enabled in PatchCheck.py. But
> there's a patch
> > "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
> > to suggest revert the change.These patch series
> introduce a plugin
> > LicenseCheck into open ci so that license issues can
> still be checked
> > after the checker is disabled in PatchCheck.py.
> > 1/15 is the plugin implementation.
> > 2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow
> developers to
> > skip license check for some files like generated
> files.
> >
> > Only BSD-2-Clause-Patent and BSD-3-Clause-Patent can
> pass this
> > checker.
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Sean Brogan <sean.brogan@microsoft.com>
> > Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> > Cc: Eric Dong <eric.dong@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Chao Zhang <chao.b.zhang@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> > Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> > Cc: Siyuan Fu <siyuan.fu@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Hao A Wu <hao.a.wu@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Andrew Fish <afish@apple.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Cc: Leif Lindholm <leif@nuviainc.com>
> > Shenglei Zhang (15):
> >   .pytool/Plugin: Add a plugin LicenseCheck
> >   FatPkg/FatPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   CryptoPkg/CryptoPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration
> for LicenseCheck
> >   FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration
> for
> > LicenseCheck
> >   MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration
> for
> > LicenseCheck
> >   MdePkg/MdePkg.ci.yaml: Add configuration for
> LicenseCheck
> >   NetworkPkg/NetworkPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   OvmfPkg/OvmfPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add
> configuration for
> >     LicenseCheck
> >   SecurityPkg/SecurityPkg.ci.yaml: Add configuration
> for LicenseCheck
> >   ShellPkg/ShellPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   UnitTestFrameworkPkg: Add configuration for
> LicenseCheck in yaml
> > file
> >
> >  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118
> > ++++++++++++++++++
> >  .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11
> ++
> >  .pytool/Plugin/LicenseCheck/Readme.md         |  17
> +++
> >  ArmVirtPkg/ArmVirtPkg.ci.yaml                 |   4 +
> >  CryptoPkg/CryptoPkg.ci.yaml                   |   3 +
> >  EmulatorPkg/EmulatorPkg.ci.yaml               |   4 +
> >  FatPkg/FatPkg.ci.yaml                         |   3 +
> >  FmpDevicePkg/FmpDevicePkg.ci.yaml             |   3 +
> >  MdeModulePkg/MdeModulePkg.ci.yaml             |   4 +
> >  MdePkg/MdePkg.ci.yaml                         |   4 +
> >  NetworkPkg/NetworkPkg.ci.yaml                 |   3 +
> >  OvmfPkg/OvmfPkg.ci.yaml                       |   4 +
> >  PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml         |   3 +
> >  SecurityPkg/SecurityPkg.ci.yaml               |   3 +
> >  ShellPkg/ShellPkg.ci.yaml                     |   3 +
> >  UefiCpuPkg/UefiCpuPkg.ci.yaml                 |   3 +
> >  .../UnitTestFrameworkPkg.ci.yaml              |   4 +
> >  17 files changed, 194 insertions(+)
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/LicenseCheck.py
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/Readme.md
> >
> > --
> > 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck
  2020-07-28 23:29   ` Michael D Kinney
@ 2020-07-29  6:06     ` Zhang, Shenglei
  2020-07-29  7:29       ` Liming Gao
  0 siblings, 1 reply; 52+ messages in thread
From: Zhang, Shenglei @ 2020-07-29  6:06 UTC (permalink / raw)
  To: Kinney, Michael D, devel@edk2.groups.io
  Cc: Sean Brogan, Bret Barkelew, Gao, Liming

Five sorts of license are accepted in edk2(described in readme). They are BSD (2-clause), BSD (3-clause), MIT, Python-2.0 and zlib.
Minus non bsd plus patent license, they are BSD (2-clause) and BSD (3-clause).

Thanks,
Shenglei

> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Wednesday, July 29, 2020 7:29 AM
> To: Zhang, Shenglei <shenglei.zhang@intel.com>; devel@edk2.groups.io;
> Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew
> <Bret.Barkelew@microsoft.com>; Gao, Liming <liming.gao@intel.com>
> Subject: RE: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck
> 
> Where did the requirement for BSD-3-Clause-Patent come from?
> 
> Thanks,
> 
> Mike
> 
> > -----Original Message-----
> > From: Zhang, Shenglei <shenglei.zhang@intel.com>
> > Sent: Monday, July 20, 2020 1:37 AM
> > To: devel@edk2.groups.io
> > Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret
> > Barkelew <Bret.Barkelew@microsoft.com>; Kinney, Michael
> > D <michael.d.kinney@intel.com>; Gao, Liming
> > <liming.gao@intel.com>
> > Subject: [PATCH 01/15] .pytool/Plugin: Add a plugin
> > LicenseCheck
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> > Add a plugin to check license conflict for new added
> > files in a patch. It will report out errors when meeting
> > files which are now contributed under BSD-2-Clause-
> > Patent
> > or BSD-3-Clause-Patent.
> >
> > Cc: Sean Brogan <sean.brogan@microsoft.com>
> > Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> > ---
> >  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118
> > ++++++++++++++++++
> >  .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11 ++
> >  .pytool/Plugin/LicenseCheck/Readme.md         |  17 +++
> >  3 files changed, 146 insertions(+)
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/LicenseCheck.py
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/Readme.md
> >
> > diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > new file mode 100644
> > index 000000000000..98941ddda758
> > --- /dev/null
> > +++ b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > @@ -0,0 +1,118 @@
> > +# @file LicenseCheck.py
> > +#
> > +# Copyright (c) 2020, Intel Corporation. All rights
> > reserved.<BR>
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent
> > +##
> > +
> > +import os
> > +import logging
> > +import re
> > +from io import StringIO
> > +from typing import List, Tuple
> > +from
> > edk2toolext.environment.plugintypes.ci_build_plugin
> > import ICiBuildPlugin
> > +from edk2toolext.environment.var_dict import VarDict
> > +from edk2toollib.utility_functions import RunCmd
> > +
> > +
> > +class LicenseCheck(ICiBuildPlugin):
> > +
> > +    """
> > +    A CiBuildPlugin to check the license for new added
> > files.
> > +
> > +    Configuration options:
> > +    "LicenseCheck": {
> > +        "IgnoreFiles": []
> > +    },
> > +    """
> > +
> > +    license_format_preflix = 'SPDX-License-Identifier'
> > +
> > +    bsd2_patent = 'BSD-2-Clause-Patent'
> > +
> > +    bsd3_patent = 'BSD-3-Clause-Patent'
> > +
> > +    Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)')
> > +
> > +    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"]
> > +
> > +    def GetTestName(self, packagename: str,
> > environment: VarDict) -> tuple:
> > +        """ Provide the testcase name and classname for
> > use in reporting
> > +            testclassname: a descriptive string for the
> > testcase can include whitespace
> > +            classname: should be patterned
> > <packagename>.<plugin>.<optionally any unique condition>
> > +
> > +            Args:
> > +              packagename: string containing name of
> > package to build
> > +              environment: The VarDict for the test to
> > run in
> > +            Returns:
> > +                a tuple containing the testcase name
> > and the classname
> > +                (testcasename, classname)
> > +        """
> > +        return ("Check for license for " + packagename,
> > packagename + ".LicenseCheck")
> > +
> > +    ##
> > +    # External function of plugin.  This function is
> > used to perform the task of the ci_build_plugin Plugin
> > +    #
> > +    #   - package is the edk2 path to package.  This
> > means workspace/packagepath relative.
> > +    #   - edk2path object configured with workspace and
> > packages path
> > +    #   - PkgConfig Object (dict) for the pkg
> > +    #   - EnvConfig Object
> > +    #   - Plugin Manager Instance
> > +    #   - Plugin Helper Obj Instance
> > +    #   - Junit Logger
> > +    #   - output_stream the StringIO output stream from
> > this plugin via logging
> > +    def RunBuildPlugin(self, packagename, Edk2pathObj,
> > pkgconfig, environment, PLM, PLMHelper, tc,
> > output_stream=None):
> > +        return_buffer = StringIO()
> > +        params = "diff --unified=0 origin/master HEAD"
> > +        RunCmd("git", params, outstream=return_buffer)
> > +        p = return_buffer.getvalue().strip()
> > +        patch = p.split("\n")
> > +        return_buffer.close()
> > +
> > +        ignore_files = []
> > +        if "IgnoreFiles" in pkgconfig:
> > +            ignore_files = pkgconfig["IgnoreFiles"]
> > +
> > +        self.ok = True
> > +        self.startcheck = False
> > +        self.license = True
> > +        self.all_file_pass = True
> > +        count = len(patch)
> > +        line_index = 0
> > +        for line in patch:
> > +            if line.startswith('--- /dev/null'):
> > +                nextline = patch[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 and packagename in added_file:
> > +                    if (self.IsIgnoreFile(added_file,
> > ignore_files)):
> > +                        line_index = line_index + 1
> > +                        continue
> > +                    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
> > +            if line_index + 1 == count or
> > patch[line_index + 1].startswith('diff --') and
> > self.startcheck:
> > +                if not self.license:
> > +                    self.all_file_pass = False
> > +                    error_message = "Invalid license
> > in: " + added_file + " Hint: Only BSD-2-Clause-Patent
> > and" + \
> > +                                    " BSD-3-Clause-
> > Patent are accepted."
> > +                    logging.error(error_message)
> > +                self.startcheck = False
> > +                self.license = True
> > +            line_index = line_index + 1
> > +
> > +        if self.all_file_pass:
> > +            tc.SetSuccess()
> > +            return 0
> > +        else:
> > +            tc.SetFailed("License Check {0} Failed.
> > ".format(packagename), "LICENSE_CHECK_FAILED")
> > +            return 1
> > +
> > +    def IsIgnoreFile(self, file: str, ignore_files:
> > List[str]) -> bool:
> > +        for f in ignore_files:
> > +            if f in file:
> > +                return True
> > +        return False
> > diff --git
> > a/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> > b/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> > new file mode 100644
> > index 000000000000..1d02f6da5a69
> > --- /dev/null
> > +++
> > b/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> > @@ -0,0 +1,11 @@
> > +## @file
> > +# CiBuildPlugin used to check license issues for new
> > added files
> > +#
> > +# Copyright (c) Microsoft Corporation.
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent
> > +##
> > +{
> > +  "scope": "cibuild",
> > +  "name": "License Check Test",
> > +  "module": "LicenseCheck"
> > +}
> > diff --git a/.pytool/Plugin/LicenseCheck/Readme.md
> > b/.pytool/Plugin/LicenseCheck/Readme.md
> > new file mode 100644
> > index 000000000000..57d9db6769fa
> > --- /dev/null
> > +++ b/.pytool/Plugin/LicenseCheck/Readme.md
> > @@ -0,0 +1,17 @@
> > +# License Check Plugin
> > +
> > +This CiBuildPlugin scans all new added files in a
> > package to make sure code
> > +is contributed under BSD-2-Clause-Patent or BSD-3-
> > Clause-Patent.
> > +
> > +## Configuration
> > +
> > +The plugin can be configured to ignore certain files.
> > +
> > +``` yaml
> > +"LicenseCheck": {
> > +    "IgnoreFiles": []
> > +}
> > +```
> > +### IgnoreFiles
> > +
> > +OPTIONAL List of file to ignore.
> > --
> > 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck
  2020-07-29  6:06     ` Zhang, Shenglei
@ 2020-07-29  7:29       ` Liming Gao
  0 siblings, 0 replies; 52+ messages in thread
From: Liming Gao @ 2020-07-29  7:29 UTC (permalink / raw)
  To: Zhang, Shenglei, Kinney, Michael D, devel@edk2.groups.io
  Cc: Sean Brogan, Bret Barkelew

Shenglei:
  Readme mentions BSD-2-Clause Plus Patent License, but no BSD-3-Clause Plus Patent License. So, please check BSD-2-Clause Plus Patent License only. 

Thanks
Liming
-----Original Message-----
From: Zhang, Shenglei <shenglei.zhang@intel.com> 
Sent: 2020年7月29日 14:07
To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Gao, Liming <liming.gao@intel.com>
Subject: RE: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck

Five sorts of license are accepted in edk2(described in readme). They are BSD (2-clause), BSD (3-clause), MIT, Python-2.0 and zlib.
Minus non bsd plus patent license, they are BSD (2-clause) and BSD (3-clause).

Thanks,
Shenglei

> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Wednesday, July 29, 2020 7:29 AM
> To: Zhang, Shenglei <shenglei.zhang@intel.com>; devel@edk2.groups.io; 
> Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew 
> <Bret.Barkelew@microsoft.com>; Gao, Liming <liming.gao@intel.com>
> Subject: RE: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck
> 
> Where did the requirement for BSD-3-Clause-Patent come from?
> 
> Thanks,
> 
> Mike
> 
> > -----Original Message-----
> > From: Zhang, Shenglei <shenglei.zhang@intel.com>
> > Sent: Monday, July 20, 2020 1:37 AM
> > To: devel@edk2.groups.io
> > Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew 
> > <Bret.Barkelew@microsoft.com>; Kinney, Michael D 
> > <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>
> > Subject: [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> > Add a plugin to check license conflict for new added files in a 
> > patch. It will report out errors when meeting files which are now 
> > contributed under BSD-2-Clause- Patent or BSD-3-Clause-Patent.
> >
> > Cc: Sean Brogan <sean.brogan@microsoft.com>
> > Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
> > ---
> >  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118
> > ++++++++++++++++++
> >  .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11 ++
> >  .pytool/Plugin/LicenseCheck/Readme.md         |  17 +++
> >  3 files changed, 146 insertions(+)
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/LicenseCheck.py
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/Readme.md
> >
> > diff --git a/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > new file mode 100644
> > index 000000000000..98941ddda758
> > --- /dev/null
> > +++ b/.pytool/Plugin/LicenseCheck/LicenseCheck.py
> > @@ -0,0 +1,118 @@
> > +# @file LicenseCheck.py
> > +#
> > +# Copyright (c) 2020, Intel Corporation. All rights
> > reserved.<BR>
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent ##
> > +
> > +import os
> > +import logging
> > +import re
> > +from io import StringIO
> > +from typing import List, Tuple
> > +from
> > edk2toolext.environment.plugintypes.ci_build_plugin
> > import ICiBuildPlugin
> > +from edk2toolext.environment.var_dict import VarDict from 
> > +edk2toollib.utility_functions import RunCmd
> > +
> > +
> > +class LicenseCheck(ICiBuildPlugin):
> > +
> > +    """
> > +    A CiBuildPlugin to check the license for new added
> > files.
> > +
> > +    Configuration options:
> > +    "LicenseCheck": {
> > +        "IgnoreFiles": []
> > +    },
> > +    """
> > +
> > +    license_format_preflix = 'SPDX-License-Identifier'
> > +
> > +    bsd2_patent = 'BSD-2-Clause-Patent'
> > +
> > +    bsd3_patent = 'BSD-3-Clause-Patent'
> > +
> > +    Readdedfileformat = re.compile(r'\+\+\+ b\/(.*)')
> > +
> > +    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"]
> > +
> > +    def GetTestName(self, packagename: str,
> > environment: VarDict) -> tuple:
> > +        """ Provide the testcase name and classname for
> > use in reporting
> > +            testclassname: a descriptive string for the
> > testcase can include whitespace
> > +            classname: should be patterned
> > <packagename>.<plugin>.<optionally any unique condition>
> > +
> > +            Args:
> > +              packagename: string containing name of
> > package to build
> > +              environment: The VarDict for the test to
> > run in
> > +            Returns:
> > +                a tuple containing the testcase name
> > and the classname
> > +                (testcasename, classname)
> > +        """
> > +        return ("Check for license for " + packagename,
> > packagename + ".LicenseCheck")
> > +
> > +    ##
> > +    # External function of plugin.  This function is
> > used to perform the task of the ci_build_plugin Plugin
> > +    #
> > +    #   - package is the edk2 path to package.  This
> > means workspace/packagepath relative.
> > +    #   - edk2path object configured with workspace and
> > packages path
> > +    #   - PkgConfig Object (dict) for the pkg
> > +    #   - EnvConfig Object
> > +    #   - Plugin Manager Instance
> > +    #   - Plugin Helper Obj Instance
> > +    #   - Junit Logger
> > +    #   - output_stream the StringIO output stream from
> > this plugin via logging
> > +    def RunBuildPlugin(self, packagename, Edk2pathObj,
> > pkgconfig, environment, PLM, PLMHelper, tc,
> > output_stream=None):
> > +        return_buffer = StringIO()
> > +        params = "diff --unified=0 origin/master HEAD"
> > +        RunCmd("git", params, outstream=return_buffer)
> > +        p = return_buffer.getvalue().strip()
> > +        patch = p.split("\n")
> > +        return_buffer.close()
> > +
> > +        ignore_files = []
> > +        if "IgnoreFiles" in pkgconfig:
> > +            ignore_files = pkgconfig["IgnoreFiles"]
> > +
> > +        self.ok = True
> > +        self.startcheck = False
> > +        self.license = True
> > +        self.all_file_pass = True
> > +        count = len(patch)
> > +        line_index = 0
> > +        for line in patch:
> > +            if line.startswith('--- /dev/null'):
> > +                nextline = patch[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 and packagename in added_file:
> > +                    if (self.IsIgnoreFile(added_file,
> > ignore_files)):
> > +                        line_index = line_index + 1
> > +                        continue
> > +                    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
> > +            if line_index + 1 == count or
> > patch[line_index + 1].startswith('diff --') and
> > self.startcheck:
> > +                if not self.license:
> > +                    self.all_file_pass = False
> > +                    error_message = "Invalid license
> > in: " + added_file + " Hint: Only BSD-2-Clause-Patent and" + \
> > +                                    " BSD-3-Clause-
> > Patent are accepted."
> > +                    logging.error(error_message)
> > +                self.startcheck = False
> > +                self.license = True
> > +            line_index = line_index + 1
> > +
> > +        if self.all_file_pass:
> > +            tc.SetSuccess()
> > +            return 0
> > +        else:
> > +            tc.SetFailed("License Check {0} Failed.
> > ".format(packagename), "LICENSE_CHECK_FAILED")
> > +            return 1
> > +
> > +    def IsIgnoreFile(self, file: str, ignore_files:
> > List[str]) -> bool:
> > +        for f in ignore_files:
> > +            if f in file:
> > +                return True
> > +        return False
> > diff --git
> > a/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> > b/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> > new file mode 100644
> > index 000000000000..1d02f6da5a69
> > --- /dev/null
> > +++
> > b/.pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> > @@ -0,0 +1,11 @@
> > +## @file
> > +# CiBuildPlugin used to check license issues for new
> > added files
> > +#
> > +# Copyright (c) Microsoft Corporation.
> > +# SPDX-License-Identifier: BSD-2-Clause-Patent ## {
> > +  "scope": "cibuild",
> > +  "name": "License Check Test",
> > +  "module": "LicenseCheck"
> > +}
> > diff --git a/.pytool/Plugin/LicenseCheck/Readme.md
> > b/.pytool/Plugin/LicenseCheck/Readme.md
> > new file mode 100644
> > index 000000000000..57d9db6769fa
> > --- /dev/null
> > +++ b/.pytool/Plugin/LicenseCheck/Readme.md
> > @@ -0,0 +1,17 @@
> > +# License Check Plugin
> > +
> > +This CiBuildPlugin scans all new added files in a
> > package to make sure code
> > +is contributed under BSD-2-Clause-Patent or BSD-3-
> > Clause-Patent.
> > +
> > +## Configuration
> > +
> > +The plugin can be configured to ignore certain files.
> > +
> > +``` yaml
> > +"LicenseCheck": {
> > +    "IgnoreFiles": []
> > +}
> > +```
> > +### IgnoreFiles
> > +
> > +OPTIONAL List of file to ignore.
> > --
> > 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-29  1:32     ` Michael D Kinney
@ 2020-07-29  7:37       ` Liming Gao
  2020-07-29  9:21       ` Laszlo Ersek
  1 sibling, 0 replies; 52+ messages in thread
From: Liming Gao @ 2020-07-29  7:37 UTC (permalink / raw)
  To: Kinney, Michael D, Zhang, Shenglei, devel@edk2.groups.io
  Cc: Sean Brogan, Bret Barkelew, Dong, Eric, Laszlo Ersek,
	Gao, Zhichao, Yao, Jiewen, Justen, Jordan L, Maciej Rabeda,
	Wu, Jiaxin, Fu, Siyuan, Wang, Jian J, Wu, Hao A, Andrew Fish,
	Ni, Ray, Lu, XiaoyuX, Ard Biesheuvel, Leif Lindholm

Mike:
  I think this is a separate request. I submit BZ https://bugzilla.tianocore.org/show_bug.cgi?id=2868 for it. 

Thanks
Liming
-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com> 
Sent: 2020年7月29日 9:33
To: Gao, Liming <liming.gao@intel.com>; Zhang, Shenglei <shenglei.zhang@intel.com>; devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>
Subject: RE: [PATCH 00/15] Add a plugin LicenseCheck in open ci

Hi Liming,

There are exception to PatchCheck as well for line endings and tabs.

Seems like a similar problem, and a single CI plugin could support all these cases.

Mike

> -----Original Message-----
> From: Gao, Liming <liming.gao@intel.com>
> Sent: Tuesday, July 28, 2020 6:12 PM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; Zhang, Shenglei 
> <shenglei.zhang@intel.com>; devel@edk2.groups.io
> Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew 
> <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; 
> Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao 
> <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao 
> Zhang <chao.b.zhang@intel.com>; Justen, Jordan L 
> <jordan.l.justen@intel.com>; Maciej Rabeda 
> <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, 
> Siyuan <siyuan.fu@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; 
> Wu, Hao A <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray 
> <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel 
> <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>; Gao, 
> Liming <liming.gao@intel.com>
> Subject: RE: [PATCH 00/15] Add a plugin LicenseCheck in open ci
> 
> Mike:
>   Previous discussion
> (https://edk2.groups.io/g/devel/message/62494) is to revert the 
> license check change in PatchCheck, and enable license check as 
> plugin. If so, the package maintainers can configure the package level 
> exception list to allow some special cases, such as autogen file.
> 
> Thanks
> Liming
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: 2020年7月29日 7:34
> To: Zhang, Shenglei <shenglei.zhang@intel.com>; devel@edk2.groups.io; 
> Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew 
> <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; 
> Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao 
> <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao 
> Zhang <chao.b.zhang@intel.com>; Justen, Jordan L 
> <jordan.l.justen@intel.com>; Maciej Rabeda 
> <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, 
> Siyuan <siyuan.fu@intel.com>; Gao, Liming <liming.gao@intel.com>; 
> Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; 
> Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX 
> <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif 
> Lindholm <leif@nuviainc.com>
> Subject: RE: [PATCH 00/15] Add a plugin LicenseCheck in open ci
> 
> CI already runs PatchCheck.  If we ported PatchCheck to a CI plugin, 
> then the plugin could perform both the current PatchCheck features and 
> the license check.
> 
> What this option evaluated?
> 
> If we did provide PatchCheck as a CI plugin, developers I believe 
> developers could run a stuart command likely for the NOOPT target to 
> run a PatchCheck CI plugin locally.
> 
> Thanks,
> 
> Mike
> 
> > -----Original Message-----
> > From: Zhang, Shenglei <shenglei.zhang@intel.com>
> > Sent: Monday, July 20, 2020 1:37 AM
> > To: devel@edk2.groups.io
> > Cc: Kinney, Michael D <michael.d.kinney@intel.com>;
> Sean Brogan
> > <sean.brogan@microsoft.com>; Bret Barkelew 
> > <Bret.Barkelew@microsoft.com>; Dong, Eric
> <eric.dong@intel.com>;
> > Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao 
> > <zhichao.gao@intel.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Chao
> > Zhang <chao.b.zhang@intel.com>; Justen, Jordan L 
> > <jordan.l.justen@intel.com>; Maciej Rabeda 
> > <maciej.rabeda@linux.intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Fu,
> > Siyuan <siyuan.fu@intel.com>; Gao, Liming
> <liming.gao@intel.com>;
> > Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A
> <hao.a.wu@intel.com>;
> > Andrew Fish <afish@apple.com>; Ni, Ray
> <ray.ni@intel.com>; Lu, XiaoyuX
> > <xiaoyux.lu@intel.com>; Ard Biesheuvel
> <ard.biesheuvel@arm.com>; Leif
> > Lindholm <leif@nuviainc.com>
> > Subject: [PATCH 00/15] Add a plugin LicenseCheck in
> open ci
> >
> > REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> > REF:
> https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> > LicenseCheck is now enabled in PatchCheck.py. But
> there's a patch
> > "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
> > to suggest revert the change.These patch series
> introduce a plugin
> > LicenseCheck into open ci so that license issues can
> still be checked
> > after the checker is disabled in PatchCheck.py.
> > 1/15 is the plugin implementation.
> > 2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow
> developers to
> > skip license check for some files like generated
> files.
> >
> > Only BSD-2-Clause-Patent and BSD-3-Clause-Patent can
> pass this
> > checker.
> >
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > Cc: Sean Brogan <sean.brogan@microsoft.com>
> > Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
> > Cc: Eric Dong <eric.dong@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Chao Zhang <chao.b.zhang@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> > Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> > Cc: Siyuan Fu <siyuan.fu@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Hao A Wu <hao.a.wu@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Andrew Fish <afish@apple.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Cc: Leif Lindholm <leif@nuviainc.com> Shenglei Zhang (15):
> >   .pytool/Plugin: Add a plugin LicenseCheck
> >   FatPkg/FatPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   ArmVirtPkg/ArmVirtPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   CryptoPkg/CryptoPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   EmulatorPkg/EmulatorPkg.ci.yaml: Add configuration
> for LicenseCheck
> >   FmpDevicePkg/FmpDevicePkg.ci.yaml: Add configuration
> for
> > LicenseCheck
> >   MdeModulePkg/MdeModulePkg.ci.yaml: Add configuration
> for
> > LicenseCheck
> >   MdePkg/MdePkg.ci.yaml: Add configuration for
> LicenseCheck
> >   NetworkPkg/NetworkPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   OvmfPkg/OvmfPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: Add
> configuration for
> >     LicenseCheck
> >   SecurityPkg/SecurityPkg.ci.yaml: Add configuration
> for LicenseCheck
> >   ShellPkg/ShellPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   UefiCpuPkg/UefiCpuPkg.ci.yaml: Add configuration for
> LicenseCheck
> >   UnitTestFrameworkPkg: Add configuration for
> LicenseCheck in yaml
> > file
> >
> >  .pytool/Plugin/LicenseCheck/LicenseCheck.py   | 118
> > ++++++++++++++++++
> >  .../LicenseCheck/LicenseCheck_plug_in.yaml    |  11
> ++
> >  .pytool/Plugin/LicenseCheck/Readme.md         |  17
> +++
> >  ArmVirtPkg/ArmVirtPkg.ci.yaml                 |   4 +
> >  CryptoPkg/CryptoPkg.ci.yaml                   |   3 +
> >  EmulatorPkg/EmulatorPkg.ci.yaml               |   4 +
> >  FatPkg/FatPkg.ci.yaml                         |   3 +
> >  FmpDevicePkg/FmpDevicePkg.ci.yaml             |   3 +
> >  MdeModulePkg/MdeModulePkg.ci.yaml             |   4 +
> >  MdePkg/MdePkg.ci.yaml                         |   4 +
> >  NetworkPkg/NetworkPkg.ci.yaml                 |   3 +
> >  OvmfPkg/OvmfPkg.ci.yaml                       |   4 +
> >  PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml         |   3 +
> >  SecurityPkg/SecurityPkg.ci.yaml               |   3 +
> >  ShellPkg/ShellPkg.ci.yaml                     |   3 +
> >  UefiCpuPkg/UefiCpuPkg.ci.yaml                 |   3 +
> >  .../UnitTestFrameworkPkg.ci.yaml              |   4 +
> >  17 files changed, 194 insertions(+)  create mode 100644 
> > .pytool/Plugin/LicenseCheck/LicenseCheck.py
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/LicenseCheck_plug_in.yaml
> >  create mode 100644
> > .pytool/Plugin/LicenseCheck/Readme.md
> >
> > --
> > 2.18.0.windows.1


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-28 23:33 ` [PATCH 00/15] Add a plugin LicenseCheck in open ci Michael D Kinney
  2020-07-29  1:11   ` Liming Gao
@ 2020-07-29  9:12   ` Laszlo Ersek
  2020-07-29 12:12     ` Leif Lindholm
  1 sibling, 1 reply; 52+ messages in thread
From: Laszlo Ersek @ 2020-07-29  9:12 UTC (permalink / raw)
  To: Kinney, Michael D, Zhang, Shenglei, devel@edk2.groups.io
  Cc: Sean Brogan, Bret Barkelew, Dong, Eric, Gao, Zhichao, Yao, Jiewen,
	Chao Zhang, Justen, Jordan L, Maciej Rabeda, Wu, Jiaxin,
	Fu, Siyuan, Gao, Liming, Wang, Jian J, Wu, Hao A, Andrew Fish,
	Ni, Ray, Lu, XiaoyuX, Ard Biesheuvel, Leif Lindholm

On 07/29/20 01:33, Kinney, Michael D wrote:
> CI already runs PatchCheck.  If we ported PatchCheck to
> a CI plugin, then the plugin could perform both the 
> current PatchCheck features and the license check.
> 
> What this option evaluated?
> 
> If we did provide PatchCheck as a CI plugin, developers
> I believe developers could run a stuart command likely
> for the NOOPT target to run a PatchCheck CI plugin locally.

Not sure if I understand correctly, but I very much like the ability to
run PatchCheck without needing anything else than a local Python binary.

Thanks!
Laszlo


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-29  1:32     ` Michael D Kinney
  2020-07-29  7:37       ` Liming Gao
@ 2020-07-29  9:21       ` Laszlo Ersek
  2020-07-29 15:21         ` [edk2-devel] " Andrew Fish
  1 sibling, 1 reply; 52+ messages in thread
From: Laszlo Ersek @ 2020-07-29  9:21 UTC (permalink / raw)
  To: Kinney, Michael D, Gao, Liming, Zhang, Shenglei,
	devel@edk2.groups.io
  Cc: Sean Brogan, Bret Barkelew, Dong, Eric, Gao, Zhichao, Yao, Jiewen,
	Chao Zhang, Justen, Jordan L, Maciej Rabeda, Wu, Jiaxin,
	Fu, Siyuan, Wang, Jian J, Wu, Hao A, Andrew Fish, Ni, Ray,
	Lu, XiaoyuX, Ard Biesheuvel, Leif Lindholm

On 07/29/20 03:32, Kinney, Michael D wrote:
> Hi Liming,
> 
> There are exception to PatchCheck as well for line endings and tabs.
> 
> Seems like a similar problem, and a single CI plugin could
> support all these cases.

The exceptions for LicenseCheck are individual files that package
maintainers (and contributors too) could customize. The primary use case
is permitting generated files to have no SPDX tag at all. PatchCheck
does not have a customizable exception list; it only considers general
rules that apply to the whole tree.

I did suggest "@file: generated" as a general marker for generated files
(which would opt them out of SPDX enforcement), here:
<https://bugzilla.tianocore.org/show_bug.cgi?id=2833#c1>.

I'm equally happy with an IgnoreFiles stanza in
"OvmfPkg/OvmfPkg.ci.yaml", or a marker like "@file: generated" in some
files under OvmfPkg. What's important to me is that we can control and
update the license checks for OvmfPkg/ files with OvmfPkg/ patches. That
is, in case we need to tweak the license check for some OvmfPkg/ file,
the corresponding patch should need OvmfPkg maintainer approval *only*.
Adding exceptions to PatchCheck has been difficult, as (a) it affects
all of edk2, (b) technically it needs to pass BaseTools review.

With the license check, I'm happy to have the mechanism under BaseTools
and/or CI, but the policy should be per package. Again my sole
motivation at this time is generated files that we need to check in for
whatever reason.

Thanks!
Laszlo


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-29  9:12   ` Laszlo Ersek
@ 2020-07-29 12:12     ` Leif Lindholm
  0 siblings, 0 replies; 52+ messages in thread
From: Leif Lindholm @ 2020-07-29 12:12 UTC (permalink / raw)
  To: Laszlo Ersek
  Cc: Kinney, Michael D, Zhang, Shenglei, devel@edk2.groups.io,
	Sean Brogan, Bret Barkelew, Dong, Eric, Gao, Zhichao, Yao, Jiewen,
	Chao Zhang, Justen, Jordan L, Maciej Rabeda, Wu, Jiaxin,
	Fu, Siyuan, Gao, Liming, Wang, Jian J, Wu, Hao A, Andrew Fish,
	Ni, Ray, Lu, XiaoyuX, Ard Biesheuvel

On Wed, Jul 29, 2020 at 11:12:02 +0200, Laszlo Ersek wrote:
> On 07/29/20 01:33, Kinney, Michael D wrote:
> > CI already runs PatchCheck.  If we ported PatchCheck to
> > a CI plugin, then the plugin could perform both the 
> > current PatchCheck features and the license check.
> > 
> > What this option evaluated?
> > 
> > If we did provide PatchCheck as a CI plugin, developers
> > I believe developers could run a stuart command likely
> > for the NOOPT target to run a PatchCheck CI plugin locally.
> 
> Not sure if I understand correctly, but I very much like the ability to
> run PatchCheck without needing anything else than a local Python binary.

Likewise.

/
    Leif

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-29  9:21       ` Laszlo Ersek
@ 2020-07-29 15:21         ` Andrew Fish
  2020-07-30  0:59           ` Liming Gao
  0 siblings, 1 reply; 52+ messages in thread
From: Andrew Fish @ 2020-07-29 15:21 UTC (permalink / raw)
  To: edk2-devel-groups-io, Laszlo Ersek
  Cc: Mike Kinney, Gao, Liming, Zhang, Shenglei, Sean Brogan,
	Bret Barkelew, Dong, Eric, Gao, Zhichao, Yao, Jiewen, Chao Zhang,
	Jordan Justen, Maciej Rabeda, Wu, Jiaxin, Fu, Siyuan,
	Wang, Jian J, Wu, Hao A, Ni, Ray, Lu, XiaoyuX, Ard Biesheuvel,
	Leif Lindholm



> On Jul 29, 2020, at 2:21 AM, Laszlo Ersek <lersek@redhat.com> wrote:
> 
> On 07/29/20 03:32, Kinney, Michael D wrote:
>> Hi Liming,
>> 
>> There are exception to PatchCheck as well for line endings and tabs.
>> 
>> Seems like a similar problem, and a single CI plugin could
>> support all these cases.
> 
> The exceptions for LicenseCheck are individual files that package
> maintainers (and contributors too) could customize. The primary use case
> is permitting generated files to have no SPDX tag at all. PatchCheck
> does not have a customizable exception list; it only considers general
> rules that apply to the whole tree.
> 
> I did suggest "@file: generated" as a general marker for generated files
> (which would opt them out of SPDX enforcement), here:
> <https://bugzilla.tianocore.org/show_bug.cgi?id=2833#c1>.
> 

This sounds like a good plan for any file generated by the edk2.

Thanks,

Andrew Fish

> I'm equally happy with an IgnoreFiles stanza in
> "OvmfPkg/OvmfPkg.ci.yaml", or a marker like "@file: generated" in some
> files under OvmfPkg. What's important to me is that we can control and
> update the license checks for OvmfPkg/ files with OvmfPkg/ patches. That
> is, in case we need to tweak the license check for some OvmfPkg/ file,
> the corresponding patch should need OvmfPkg maintainer approval *only*.
> Adding exceptions to PatchCheck has been difficult, as (a) it affects
> all of edk2, (b) technically it needs to pass BaseTools review.
> 
> With the license check, I'm happy to have the mechanism under BaseTools
> and/or CI, but the policy should be per package. Again my sole
> motivation at this time is generated files that we need to check in for
> whatever reason.
> 
> Thanks!
> Laszlo
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-29 15:21         ` [edk2-devel] " Andrew Fish
@ 2020-07-30  0:59           ` Liming Gao
  0 siblings, 0 replies; 52+ messages in thread
From: Liming Gao @ 2020-07-30  0:59 UTC (permalink / raw)
  To: devel@edk2.groups.io, afish@apple.com, Laszlo Ersek
  Cc: Kinney, Michael D, Zhang, Shenglei, Sean Brogan, Bret Barkelew,
	Dong, Eric, Gao, Zhichao, Yao, Jiewen, Chao Zhang,
	Justen, Jordan L, Maciej Rabeda, Wu, Jiaxin, Fu, Siyuan,
	Wang, Jian J, Wu, Hao A, Ni, Ray, Lu, XiaoyuX, Ard Biesheuvel,
	Leif Lindholm



-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Andrew Fish via groups.io
Sent: 2020年7月29日 23:22
To: edk2-devel-groups-io <devel@edk2.groups.io>; Laszlo Ersek <lersek@redhat.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Zhang, Shenglei <shenglei.zhang@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>
Subject: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci



> On Jul 29, 2020, at 2:21 AM, Laszlo Ersek <lersek@redhat.com> wrote:
> 
> On 07/29/20 03:32, Kinney, Michael D wrote:
>> Hi Liming,
>> 
>> There are exception to PatchCheck as well for line endings and tabs.
>> 
>> Seems like a similar problem, and a single CI plugin could support 
>> all these cases.
> 
> The exceptions for LicenseCheck are individual files that package 
> maintainers (and contributors too) could customize. The primary use 
> case is permitting generated files to have no SPDX tag at all. 
> PatchCheck does not have a customizable exception list; it only 
> considers general rules that apply to the whole tree.
> 
> I did suggest "@file: generated" as a general marker for generated 
> files (which would opt them out of SPDX enforcement), here:
> <https://bugzilla.tianocore.org/show_bug.cgi?id=2833#c1>.
> 

This sounds like a good plan for any file generated by the edk2.

[Liming] I agree this is a good suggestion. This requires all generated files to follow this rule. 
The first step is to enable LicenseCheck plugin (the patch has passed review and ready for merge, https://edk2.groups.io/g/devel/message/63447). 
Then, package maintainers can add the exception files. Next, we can continue to enhance LicenseCheck. 

Thanks
Liming

Thanks,

Andrew Fish

> I'm equally happy with an IgnoreFiles stanza in 
> "OvmfPkg/OvmfPkg.ci.yaml", or a marker like "@file: generated" in some 
> files under OvmfPkg. What's important to me is that we can control and 
> update the license checks for OvmfPkg/ files with OvmfPkg/ patches. 
> That is, in case we need to tweak the license check for some OvmfPkg/ 
> file, the corresponding patch should need OvmfPkg maintainer approval *only*.
> Adding exceptions to PatchCheck has been difficult, as (a) it affects 
> all of edk2, (b) technically it needs to pass BaseTools review.
> 
> With the license check, I'm happy to have the mechanism under 
> BaseTools and/or CI, but the policy should be per package. Again my 
> sole motivation at this time is generated files that we need to check 
> in for whatever reason.
> 
> Thanks!
> Laszlo
> 
> 
> 
> 





^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci
       [not found]   ` <16257B609DB8C7F6.7401@groups.io>
@ 2020-07-31  3:50     ` Liming Gao
  2020-07-31  4:17       ` Rebecca Cran
  0 siblings, 1 reply; 52+ messages in thread
From: Liming Gao @ 2020-07-31  3:50 UTC (permalink / raw)
  To: devel@edk2.groups.io, Gao, Liming, Rebecca Cran, Zhang, Shenglei
  Cc: Kinney, Michael D, Sean Brogan, Bret Barkelew, Dong, Eric,
	Laszlo Ersek, Gao, Zhichao, Yao, Jiewen, Chao Zhang,
	Justen, Jordan L, Maciej Rabeda, Wu, Jiaxin, Fu, Siyuan,
	Wang, Jian J, Wu, Hao A, Andrew Fish, Ni, Ray, Lu, XiaoyuX,
	Ard Biesheuvel, Leif Lindholm

Rebecca:
  I have merged all changes of LicenseCheck. You can continue your work. If you meet with any issue, please let me know. 

Thanks
Liming
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Liming Gao
Sent: 2020年7月27日 10:35
To: Rebecca Cran <rebecca@bsdio.com>; devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>
Subject: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

Rebecca:
  I see Shenglei patch. I plan to finish review early of this week, then merge this patch set, and revert the original change in PatchCheck.py. 

Thanks
Liming
-----Original Message-----
From: Rebecca Cran <rebecca@bsdio.com>
Sent: 2020年7月25日 9:38
To: devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Gao, Liming <liming.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>
Subject: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci

On 7/20/20 2:36 AM, Zhang, Shenglei wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
> LicenseCheck is now enabled in PatchCheck.py. But there's a patch 
> "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
> to suggest revert the change.These patch series introduce a plugin 
> LicenseCheck into open ci so that license issues can still be checked 
> after the checker is disabled in PatchCheck.py.
> 1/15 is the plugin implementation.
> 2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow developers to 
> skip license check for some files like generated files.

Has there been any progress on this? I'm waiting for it because it's required for my bhyve changes.


-- 

Rebecca Cran






^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci
  2020-07-31  3:50     ` Liming Gao
@ 2020-07-31  4:17       ` Rebecca Cran
  0 siblings, 0 replies; 52+ messages in thread
From: Rebecca Cran @ 2020-07-31  4:17 UTC (permalink / raw)
  To: Gao, Liming, devel@edk2.groups.io, Zhang, Shenglei
  Cc: Kinney, Michael D, Sean Brogan, Bret Barkelew, Dong, Eric,
	Laszlo Ersek, Gao, Zhichao, Yao, Jiewen, Chao Zhang,
	Justen, Jordan L, Maciej Rabeda, Wu, Jiaxin, Fu, Siyuan,
	Wang, Jian J, Wu, Hao A, Andrew Fish, Ni, Ray, Lu, XiaoyuX,
	Ard Biesheuvel, Leif Lindholm

Thanks!

On 7/30/20 9:50 PM, Gao, Liming wrote:
> Rebecca:
>    I have merged all changes of LicenseCheck. You can continue your work. If you meet with any issue, please let me know.
>
> Thanks
> Liming
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Liming Gao
> Sent: 2020年7月27日 10:35
> To: Rebecca Cran <rebecca@bsdio.com>; devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com>
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>
> Subject: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci
>
> Rebecca:
>    I see Shenglei patch. I plan to finish review early of this week, then merge this patch set, and revert the original change in PatchCheck.py.
>
> Thanks
> Liming
> -----Original Message-----
> From: Rebecca Cran <rebecca@bsdio.com>
> Sent: 2020年7月25日 9:38
> To: devel@edk2.groups.io; Zhang, Shenglei <shenglei.zhang@intel.com>
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Sean Brogan <sean.brogan@microsoft.com>; Bret Barkelew <Bret.Barkelew@microsoft.com>; Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@redhat.com>; Gao, Zhichao <zhichao.gao@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Chao Zhang <chao.b.zhang@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Gao, Liming <liming.gao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Lu, XiaoyuX <xiaoyux.lu@intel.com>; Ard Biesheuvel <ard.biesheuvel@arm.com>; Leif Lindholm <leif@nuviainc.com>
> Subject: Re: [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci
>
> On 7/20/20 2:36 AM, Zhang, Shenglei wrote:
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2691
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2833
>> LicenseCheck is now enabled in PatchCheck.py. But there's a patch
>> "Revert 'BaseTools/PatchCheck.py: Add LicenseCheck'"
>> to suggest revert the change.These patch series introduce a plugin
>> LicenseCheck into open ci so that license issues can still be checked
>> after the checker is disabled in PatchCheck.py.
>> 1/15 is the plugin implementation.
>> 2/15 ~ 15/15 introduce sections "IgnoreFiles" to allow developers to
>> skip license check for some files like generated files.
> Has there been any progress on this? I'm waiting for it because it's required for my bhyve changes.
>
>


^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2020-07-31  4:17 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-20  8:36 [PATCH 00/15] Add a plugin LicenseCheck in open ci Zhang, Shenglei
2020-07-20  8:36 ` [PATCH 01/15] .pytool/Plugin: Add a plugin LicenseCheck Zhang, Shenglei
2020-07-28 23:29   ` Michael D Kinney
2020-07-29  6:06     ` Zhang, Shenglei
2020-07-29  7:29       ` Liming Gao
2020-07-20  8:36 ` [PATCH 02/15] FatPkg/FatPkg.ci.yaml: Add configuration for LicenseCheck Zhang, Shenglei
2020-07-20  8:36 ` [PATCH 03/15] ArmVirtPkg/ArmVirtPkg.ci.yaml: " Zhang, Shenglei
2020-07-20 21:59   ` Laszlo Ersek
2020-07-20  8:36 ` [PATCH 04/15] CryptoPkg/CryptoPkg.ci.yaml: " Zhang, Shenglei
2020-07-20 14:23   ` [edk2-devel] " Yao, Jiewen
2020-07-21  1:31   ` Guomin Jiang
2020-07-20  8:36 ` [PATCH 05/15] EmulatorPkg/EmulatorPkg.ci.yaml: " Zhang, Shenglei
2020-07-20  8:37 ` [PATCH 06/15] FmpDevicePkg/FmpDevicePkg.ci.yaml: " Zhang, Shenglei
2020-07-21  1:31   ` [edk2-devel] " Guomin Jiang
2020-07-28 23:30   ` Michael D Kinney
2020-07-20  8:37 ` [PATCH 07/15] MdeModulePkg/MdeModulePkg.ci.yaml: " Zhang, Shenglei
2020-07-21  0:34   ` [edk2-devel] " Wu, Hao A
2020-07-20  8:37 ` [PATCH 08/15] MdePkg/MdePkg.ci.yaml: " Zhang, Shenglei
2020-07-20  8:37 ` [PATCH 09/15] NetworkPkg/NetworkPkg.ci.yaml: " Zhang, Shenglei
2020-07-21 16:42   ` [edk2-devel] " Maciej Rabeda
2020-07-20  8:37 ` [PATCH 10/15] OvmfPkg/OvmfPkg.ci.yaml: " Zhang, Shenglei
2020-07-20 22:01   ` Laszlo Ersek
2020-07-27  6:21     ` Zhang, Shenglei
2020-07-27  9:50       ` Laszlo Ersek
2020-07-28  1:11         ` Zhang, Shenglei
2020-07-28  9:56           ` Laszlo Ersek
2020-07-20  8:37 ` [PATCH 11/15] PcAtChipsetPkg/PcAtChipsetPkg.ci.yaml: " Zhang, Shenglei
2020-07-20  8:37 ` [PATCH 12/15] SecurityPkg/SecurityPkg.ci.yaml: " Zhang, Shenglei
2020-07-20 14:24   ` Yao, Jiewen
2020-07-20  8:37 ` [PATCH 13/15] ShellPkg/ShellPkg.ci.yaml: " Zhang, Shenglei
2020-07-27  6:28   ` [edk2-devel] " Gao, Zhichao
2020-07-20  8:37 ` [PATCH 14/15] UefiCpuPkg/UefiCpuPkg.ci.yaml: " Zhang, Shenglei
2020-07-20 21:59   ` Laszlo Ersek
2020-07-21  0:24   ` Dong, Eric
2020-07-20  8:37 ` [PATCH 15/15] UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file Zhang, Shenglei
2020-07-28 23:29   ` [edk2-devel] " Michael D Kinney
2020-07-25  1:38 ` [edk2-devel] [PATCH 00/15] Add a plugin LicenseCheck in open ci Rebecca Cran
2020-07-27  2:34   ` Liming Gao
     [not found]   ` <16257B609DB8C7F6.7401@groups.io>
2020-07-31  3:50     ` Liming Gao
2020-07-31  4:17       ` Rebecca Cran
2020-07-27  3:00 ` Liming Gao
     [not found] ` <1623691E419E189F.16344@groups.io>
2020-07-27  6:26   ` [edk2-devel] [PATCH 15/15] UnitTestFrameworkPkg: Add configuration for LicenseCheck in yaml file Zhang, Shenglei
2020-07-28 23:33 ` [PATCH 00/15] Add a plugin LicenseCheck in open ci Michael D Kinney
2020-07-29  1:11   ` Liming Gao
2020-07-29  1:32     ` Michael D Kinney
2020-07-29  7:37       ` Liming Gao
2020-07-29  9:21       ` Laszlo Ersek
2020-07-29 15:21         ` [edk2-devel] " Andrew Fish
2020-07-30  0:59           ` Liming Gao
2020-07-29  9:12   ` Laszlo Ersek
2020-07-29 12:12     ` Leif Lindholm
  -- strict thread matches above, loose matches on Subject: below --
2020-07-20  8:39 [PATCH 12/15] SecurityPkg/SecurityPkg.ci.yaml: Add configuration for LicenseCheck Zhang, Shenglei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox