* [Patch] BaseTools/PatchCheck: Generate error if Contributed under found
@ 2019-04-04 22:43 Michael D Kinney
2019-04-05 7:00 ` [edk2-devel] " Jordan Justen
2019-04-11 1:36 ` Liming Gao
0 siblings, 2 replies; 5+ messages in thread
From: Michael D Kinney @ 2019-04-04 22:43 UTC (permalink / raw)
To: devel; +Cc: Jordan Justen, Bob Feng, Liming Gao, Yonghong Zhu
https://bugzilla.tianocore.org/show_bug.cgi?id=1655
With the change to BSD+Patent License, the TianoCore Contributor's
Agreement has been removed and as a result, a Contributed under
tag is no longer appropriate in patches. Remove the check for
the TianoCore Contributor's Agreement and instead, generate an
error if a patch contains a Contributed under tag in the commit
message.
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
BaseTools/Scripts/PatchCheck.py | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 0b580f3b31..19a7159358 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -1,7 +1,7 @@
## @file
# Check a patch for various format issues
#
-# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made
# available under the terms and conditions of the BSD License which
@@ -75,13 +75,9 @@ class CommitMessageCheck:
count += 1
def check_contributed_under(self):
- cu_msg='Contributed-under: TianoCore Contribution Agreement 1.1'
- if self.msg.find(cu_msg) < 0:
- # Allow 1.0 for now while EDK II community transitions to 1.1
- cu_msg='Contributed-under: TianoCore Contribution Agreement 1.0'
- if self.msg.find(cu_msg) < 0:
- self.error('Missing Contributed-under! (Note: this must be ' +
- 'added by the code contributor!)')
+ if self.msg.find('Contributed-under') >= 0:
+ self.error('Contributed-under! (Note: this must be ' +
+ 'removed by the code contributor!)')
@staticmethod
def make_signature_re(sig, re_input=False):
--
2.21.0.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [Patch] BaseTools/PatchCheck: Generate error if Contributed under found
2019-04-04 22:43 [Patch] BaseTools/PatchCheck: Generate error if Contributed under found Michael D Kinney
@ 2019-04-05 7:00 ` Jordan Justen
2019-04-09 18:27 ` Michael D Kinney
2019-04-11 1:36 ` Liming Gao
1 sibling, 1 reply; 5+ messages in thread
From: Jordan Justen @ 2019-04-05 7:00 UTC (permalink / raw)
To: Michael D Kinney, devel; +Cc: Bob Feng, Liming Gao, Yonghong Zhu
On 2019-04-04 15:43:01, Michael D Kinney wrote:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1655
>
> With the change to BSD+Patent License, the TianoCore Contributor's
> Agreement has been removed and as a result, a Contributed under
> tag is no longer appropriate in patches. Remove the check for
> the TianoCore Contributor's Agreement and instead, generate an
> error if a patch contains a Contributed under tag in the commit
> message.
>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Yonghong Zhu <yonghong.zhu@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
> BaseTools/Scripts/PatchCheck.py | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
> index 0b580f3b31..19a7159358 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -1,7 +1,7 @@
> ## @file
> # Check a patch for various format issues
> #
> -# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
> #
> # This program and the accompanying materials are licensed and made
> # available under the terms and conditions of the BSD License which
> @@ -75,13 +75,9 @@ class CommitMessageCheck:
> count += 1
>
> def check_contributed_under(self):
> - cu_msg='Contributed-under: TianoCore Contribution Agreement 1.1'
> - if self.msg.find(cu_msg) < 0:
> - # Allow 1.0 for now while EDK II community transitions to 1.1
> - cu_msg='Contributed-under: TianoCore Contribution Agreement 1.0'
> - if self.msg.find(cu_msg) < 0:
> - self.error('Missing Contributed-under! (Note: this must be ' +
> - 'added by the code contributor!)')
> + if self.msg.find('Contributed-under') >= 0:
> + self.error('Contributed-under! (Note: this must be ' +
> + 'removed by the code contributor!)')
I don't think it's too important, but what about something like?
contributed_under_re = \
re.compile(r'^\s*contributed-under\s*:', re.MULTILINE|re.IGNORECASE)
def check_contributed_under(self):
mo = self.contributed_under_re.search(self.msg)
if mo is not None:
self.error('Contributed-under! (Note: this must be ' +
'removed by the code contributor!)')
* only find 'contributed-under:' at the start of the line
* ignore case
* adds checking for the ':'
* also catches if they put a space before the c-u tag
It might let you have 'Contributed-under' in your commit message
without triggering the error. :)
Like I said, not too important, and either way:
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [Patch] BaseTools/PatchCheck: Generate error if Contributed under found
2019-04-05 7:00 ` [edk2-devel] " Jordan Justen
@ 2019-04-09 18:27 ` Michael D Kinney
0 siblings, 0 replies; 5+ messages in thread
From: Michael D Kinney @ 2019-04-09 18:27 UTC (permalink / raw)
To: Justen, Jordan L, devel@edk2.groups.io, Kinney, Michael D
Cc: Feng, Bob C, Gao, Liming, Zhu, Yonghong
Jordan,
Thanks for the feedback. I agree with your suggestion.
Mike
> -----Original Message-----
> From: Justen, Jordan L
> Sent: Friday, April 5, 2019 12:00 AM
> To: Kinney, Michael D <michael.d.kinney@intel.com>;
> devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
> <liming.gao@intel.com>; Zhu, Yonghong
> <yonghong.zhu@intel.com>
> Subject: Re: [edk2-devel] [Patch] BaseTools/PatchCheck:
> Generate error if Contributed under found
>
> On 2019-04-04 15:43:01, Michael D Kinney wrote:
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1655
> >
> > With the change to BSD+Patent License, the TianoCore
> Contributor's
> > Agreement has been removed and as a result, a
> Contributed under
> > tag is no longer appropriate in patches. Remove the
> check for
> > the TianoCore Contributor's Agreement and instead,
> generate an
> > error if a patch contains a Contributed under tag in
> the commit
> > message.
> >
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Bob Feng <bob.c.feng@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Cc: Yonghong Zhu <yonghong.zhu@intel.com>
> > Signed-off-by: Michael D Kinney
> <michael.d.kinney@intel.com>
> > ---
> > BaseTools/Scripts/PatchCheck.py | 12 ++++--------
> > 1 file changed, 4 insertions(+), 8 deletions(-)
> >
> > diff --git a/BaseTools/Scripts/PatchCheck.py
> b/BaseTools/Scripts/PatchCheck.py
> > index 0b580f3b31..19a7159358 100755
> > --- a/BaseTools/Scripts/PatchCheck.py
> > +++ b/BaseTools/Scripts/PatchCheck.py
> > @@ -1,7 +1,7 @@
> > ## @file
> > # Check a patch for various format issues
> > #
> > -# Copyright (c) 2015 - 2018, Intel Corporation. All
> rights reserved.<BR>
> > +# Copyright (c) 2015 - 2019, Intel Corporation. All
> rights reserved.<BR>
> > #
> > # This program and the accompanying materials are
> licensed and made
> > # available under the terms and conditions of the
> BSD License which
> > @@ -75,13 +75,9 @@ class CommitMessageCheck:
> > count += 1
> >
> > def check_contributed_under(self):
> > - cu_msg='Contributed-under: TianoCore
> Contribution Agreement 1.1'
> > - if self.msg.find(cu_msg) < 0:
> > - # Allow 1.0 for now while EDK II
> community transitions to 1.1
> > - cu_msg='Contributed-under: TianoCore
> Contribution Agreement 1.0'
> > - if self.msg.find(cu_msg) < 0:
> > - self.error('Missing Contributed-
> under! (Note: this must be ' +
> > - 'added by the code
> contributor!)')
> > + if self.msg.find('Contributed-under') >= 0:
> > + self.error('Contributed-under! (Note:
> this must be ' +
> > + 'removed by the code
> contributor!)')
>
> I don't think it's too important, but what about
> something like?
>
> contributed_under_re = \
> re.compile(r'^\s*contributed-under\s*:',
> re.MULTILINE|re.IGNORECASE)
>
> def check_contributed_under(self):
> mo = self.contributed_under_re.search(self.msg)
> if mo is not None:
> self.error('Contributed-under! (Note: this
> must be ' +
> 'removed by the code
> contributor!)')
>
> * only find 'contributed-under:' at the start of the
> line
> * ignore case
> * adds checking for the ':'
> * also catches if they put a space before the c-u tag
>
> It might let you have 'Contributed-under' in your
> commit message
> without triggering the error. :)
>
> Like I said, not too important, and either way:
>
> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [Patch] BaseTools/PatchCheck: Generate error if Contributed under found
2019-04-04 22:43 [Patch] BaseTools/PatchCheck: Generate error if Contributed under found Michael D Kinney
2019-04-05 7:00 ` [edk2-devel] " Jordan Justen
@ 2019-04-11 1:36 ` Liming Gao
2019-04-11 6:46 ` Michael D Kinney
1 sibling, 1 reply; 5+ messages in thread
From: Liming Gao @ 2019-04-11 1:36 UTC (permalink / raw)
To: devel@edk2.groups.io, Kinney, Michael D
Mike:
Could you also update wiki https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-Format to remove Contributed-under: TianoCore Contribution Agreement 1.1?
Thanks
Liming
>-----Original Message-----
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Michael D Kinney
>Sent: Friday, April 05, 2019 6:43 AM
>To: devel@edk2.groups.io
>Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Feng, Bob C
><bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Zhu,
>Yonghong <yonghong.zhu@intel.com>
>Subject: [edk2-devel] [Patch] BaseTools/PatchCheck: Generate error if
>Contributed under found
>
>https://bugzilla.tianocore.org/show_bug.cgi?id=1655
>
>With the change to BSD+Patent License, the TianoCore Contributor's
>Agreement has been removed and as a result, a Contributed under
>tag is no longer appropriate in patches. Remove the check for
>the TianoCore Contributor's Agreement and instead, generate an
>error if a patch contains a Contributed under tag in the commit
>message.
>
>Cc: Jordan Justen <jordan.l.justen@intel.com>
>Cc: Bob Feng <bob.c.feng@intel.com>
>Cc: Liming Gao <liming.gao@intel.com>
>Cc: Yonghong Zhu <yonghong.zhu@intel.com>
>Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
>---
> BaseTools/Scripts/PatchCheck.py | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
>diff --git a/BaseTools/Scripts/PatchCheck.py
>b/BaseTools/Scripts/PatchCheck.py
>index 0b580f3b31..19a7159358 100755
>--- a/BaseTools/Scripts/PatchCheck.py
>+++ b/BaseTools/Scripts/PatchCheck.py
>@@ -1,7 +1,7 @@
> ## @file
> # Check a patch for various format issues
> #
>-# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
>+# Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
> #
> # This program and the accompanying materials are licensed and made
> # available under the terms and conditions of the BSD License which
>@@ -75,13 +75,9 @@ class CommitMessageCheck:
> count += 1
>
> def check_contributed_under(self):
>- cu_msg='Contributed-under: TianoCore Contribution Agreement 1.1'
>- if self.msg.find(cu_msg) < 0:
>- # Allow 1.0 for now while EDK II community transitions to 1.1
>- cu_msg='Contributed-under: TianoCore Contribution Agreement 1.0'
>- if self.msg.find(cu_msg) < 0:
>- self.error('Missing Contributed-under! (Note: this must be ' +
>- 'added by the code contributor!)')
>+ if self.msg.find('Contributed-under') >= 0:
>+ self.error('Contributed-under! (Note: this must be ' +
>+ 'removed by the code contributor!)')
>
> @staticmethod
> def make_signature_re(sig, re_input=False):
>--
>2.21.0.windows.1
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [Patch] BaseTools/PatchCheck: Generate error if Contributed under found
2019-04-11 1:36 ` Liming Gao
@ 2019-04-11 6:46 ` Michael D Kinney
0 siblings, 0 replies; 5+ messages in thread
From: Michael D Kinney @ 2019-04-11 6:46 UTC (permalink / raw)
To: Gao, Liming, devel@edk2.groups.io, Kinney, Michael D
Liming,
Yes. I have that patch queued and will be sent out tomorrow.
There are other Wiki changes for the preferred license.
Mike
> -----Original Message-----
> From: Gao, Liming
> Sent: Wednesday, April 10, 2019 6:37 PM
> To: devel@edk2.groups.io; Kinney, Michael D
> <michael.d.kinney@intel.com>
> Subject: RE: [edk2-devel] [Patch] BaseTools/PatchCheck:
> Generate error if Contributed under found
>
> Mike:
> Could you also update wiki
> https://github.com/tianocore/tianocore.github.io/wiki/C
> ommit-Message-Format to remove Contributed-under:
> TianoCore Contribution Agreement 1.1?
>
> Thanks
> Liming
> >-----Original Message-----
> >From: devel@edk2.groups.io
> [mailto:devel@edk2.groups.io] On Behalf Of
> >Michael D Kinney
> >Sent: Friday, April 05, 2019 6:43 AM
> >To: devel@edk2.groups.io
> >Cc: Justen, Jordan L <jordan.l.justen@intel.com>;
> Feng, Bob C
> ><bob.c.feng@intel.com>; Gao, Liming
> <liming.gao@intel.com>; Zhu,
> >Yonghong <yonghong.zhu@intel.com>
> >Subject: [edk2-devel] [Patch] BaseTools/PatchCheck:
> Generate error if
> >Contributed under found
> >
> >https://bugzilla.tianocore.org/show_bug.cgi?id=1655
> >
> >With the change to BSD+Patent License, the TianoCore
> Contributor's
> >Agreement has been removed and as a result, a
> Contributed under
> >tag is no longer appropriate in patches. Remove the
> check for
> >the TianoCore Contributor's Agreement and instead,
> generate an
> >error if a patch contains a Contributed under tag in
> the commit
> >message.
> >
> >Cc: Jordan Justen <jordan.l.justen@intel.com>
> >Cc: Bob Feng <bob.c.feng@intel.com>
> >Cc: Liming Gao <liming.gao@intel.com>
> >Cc: Yonghong Zhu <yonghong.zhu@intel.com>
> >Signed-off-by: Michael D Kinney
> <michael.d.kinney@intel.com>
> >---
> > BaseTools/Scripts/PatchCheck.py | 12 ++++--------
> > 1 file changed, 4 insertions(+), 8 deletions(-)
> >
> >diff --git a/BaseTools/Scripts/PatchCheck.py
> >b/BaseTools/Scripts/PatchCheck.py
> >index 0b580f3b31..19a7159358 100755
> >--- a/BaseTools/Scripts/PatchCheck.py
> >+++ b/BaseTools/Scripts/PatchCheck.py
> >@@ -1,7 +1,7 @@
> > ## @file
> > # Check a patch for various format issues
> > #
> >-# Copyright (c) 2015 - 2018, Intel Corporation. All
> rights reserved.<BR>
> >+# Copyright (c) 2015 - 2019, Intel Corporation. All
> rights reserved.<BR>
> > #
> > # This program and the accompanying materials are
> licensed and made
> > # available under the terms and conditions of the
> BSD License which
> >@@ -75,13 +75,9 @@ class CommitMessageCheck:
> > count += 1
> >
> > def check_contributed_under(self):
> >- cu_msg='Contributed-under: TianoCore
> Contribution Agreement 1.1'
> >- if self.msg.find(cu_msg) < 0:
> >- # Allow 1.0 for now while EDK II
> community transitions to 1.1
> >- cu_msg='Contributed-under: TianoCore
> Contribution Agreement 1.0'
> >- if self.msg.find(cu_msg) < 0:
> >- self.error('Missing Contributed-
> under! (Note: this must be ' +
> >- 'added by the code
> contributor!)')
> >+ if self.msg.find('Contributed-under') >= 0:
> >+ self.error('Contributed-under! (Note:
> this must be ' +
> >+ 'removed by the code
> contributor!)')
> >
> > @staticmethod
> > def make_signature_re(sig, re_input=False):
> >--
> >2.21.0.windows.1
> >
> >
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-11 6:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-04 22:43 [Patch] BaseTools/PatchCheck: Generate error if Contributed under found Michael D Kinney
2019-04-05 7:00 ` [edk2-devel] " Jordan Justen
2019-04-09 18:27 ` Michael D Kinney
2019-04-11 1:36 ` Liming Gao
2019-04-11 6:46 ` Michael D Kinney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox