* FYI: git-hooks update on sourceware.org
@ 2020-08-07 15:44 Joel Brobecker
2020-08-07 15:50 ` Joel Brobecker
0 siblings, 1 reply; 8+ messages in thread
From: Joel Brobecker @ 2020-08-07 15:44 UTC (permalink / raw)
To: gdb-patches, binutils
Hey Team,
Just to let you know, I've just done an update of the git-hooks
installed on sourceware.org and used by our binutils-gdb repository.
I've also undone a change that was made locally by Frank ages ago
which I am hoping is no longer necessary:
-exec git-update-server-info
+exec git update-server-info
This update brings a series of improvements made mostly in order to
answer GCC's specific needs. If you're curious about the list of
changes, you can have a look at the list of changes made since
commit 087a8bcdf0de43bc196ccdf83c2f572fef604f75 at
https://github.com/adacore/git-hooks.
One of the enhancements this update does bring is the ability to
provide custom commit validation, something I believe Simon asked
about, to prevent us from pushing commits we "git am"-ed using
an Author set to "xxx via Gdb-patches <gdb-patches@...>". Take
a look at the hooks.commit-extra-checker option in the doc. If
someone writes the script, I can get it installed.
These changes have been extensively tested, and we've been using
the same version at AdaCore for over a week, now; but do let me
know if you have any issues.
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FYI: git-hooks update on sourceware.org
2020-08-07 15:44 FYI: git-hooks update on sourceware.org Joel Brobecker
@ 2020-08-07 15:50 ` Joel Brobecker
2020-08-07 16:00 ` Simon Marchi
0 siblings, 1 reply; 8+ messages in thread
From: Joel Brobecker @ 2020-08-07 15:50 UTC (permalink / raw)
To: gdb-patches, binutils
> These changes have been extensively tested, and we've been using
> the same version at AdaCore for over a week, now; but do let me
> know if you have any issues.
Well, that didn't take long. Simon just emailed me about an error.
Apparently, the Python installed on sourceware.org doesn't have
the enum module installed.
I will revert the update, and ask overseers to install it.
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FYI: git-hooks update on sourceware.org
2020-08-07 15:50 ` Joel Brobecker
@ 2020-08-07 16:00 ` Simon Marchi
2020-08-07 16:02 ` Simon Marchi
0 siblings, 1 reply; 8+ messages in thread
From: Simon Marchi @ 2020-08-07 16:00 UTC (permalink / raw)
To: Joel Brobecker, gdb-patches, binutils
[-- Attachment #1: Type: text/plain, Size: 772 bytes --]
On 2020-08-07 11:50 a.m., Joel Brobecker wrote:
>> These changes have been extensively tested, and we've been using
>> the same version at AdaCore for over a week, now; but do let me
>> know if you have any issues.
>
> Well, that didn't take long. Simon just emailed me about an error.
> Apparently, the Python installed on sourceware.org doesn't have
> the enum module installed.
What version of Python are you using, is it really old? All the reasonably recent
and supported Python versions ship with the enum module.
> I will revert the update, and ask overseers to install it.
See the attached file, it's a very simple script to reject commits with the author
name/email munged by the mailing list. I don't think it will produce too many false
positives.
Simon
[-- Attachment #2: reject-via-ml.py --]
[-- Type: text/x-python, Size: 512 bytes --]
#!/usr/bin/env python3
import json
import sys
data = sys.stdin.read()
data = json.loads(data)
author_name = data["author_name"]
author_email = data["author_email"]
if " via " in author_name and "@sourceware.org" in author_email:
print(
"The author name ({}) and email address ({}) appear to have been munged by a mailing list.".format(
author_name, author_email
)
)
print("Please amend to the commit to put the proper author name and email address.")
sys.exit(1)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FYI: git-hooks update on sourceware.org
2020-08-07 16:00 ` Simon Marchi
@ 2020-08-07 16:02 ` Simon Marchi
2020-08-07 16:21 ` Joel Brobecker
0 siblings, 1 reply; 8+ messages in thread
From: Simon Marchi @ 2020-08-07 16:02 UTC (permalink / raw)
To: Joel Brobecker, gdb-patches, binutils
On 2020-08-07 12:00 p.m., Simon Marchi wrote:
> What version of Python are you using, is it really old? All the reasonably recent
> and supported Python versions ship with the enum module.
Ah nevermind, I thought it was available in 2.7, but no. So I presume you use 2.7.
In this case, this module can help, it backports the enum module introduced in 3.4:
https://pypi.org/project/enum34/
Or, making sure you use python3 on the server could just be easier.
Simon
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FYI: git-hooks update on sourceware.org
2020-08-07 16:02 ` Simon Marchi
@ 2020-08-07 16:21 ` Joel Brobecker
2020-08-07 16:27 ` H.J. Lu
2020-08-10 16:57 ` Joel Brobecker
0 siblings, 2 replies; 8+ messages in thread
From: Joel Brobecker @ 2020-08-07 16:21 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches, binutils
> > What version of Python are you using, is it really old? All the
> > reasonably recent and supported Python versions ship with the enum
> > module.
>
> Ah nevermind, I thought it was available in 2.7, but no. So I presume
> you use 2.7.
Overseers just got it installed for us. So I've re-done the update.
> Or, making sure you use python3 on the server could just be easier.
This is in my TODO, but I'm still busy finishing up on the enhancement
requests made by the GCC community. Once that's done, I'll start working
on the transition to Python 3.x. I expect it to be a lot of work, not
necessarily because the code might need a lot of transformation (it's
possible, but my experience with the style_checker regarding that has
been that it's fairly limited), but because I have to redo the testsuite
framework, and then transition every testcase (all 200 of them). Since
I do all that work during a few hours each weekend, I don't expect this
to be done before end of this year at best. I look forward to being
able to use all the new Python features brought by the latest Python
though!
I will install your script on Monday (I have more chances to be at
my desk if something goes wrong).
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FYI: git-hooks update on sourceware.org
2020-08-07 16:21 ` Joel Brobecker
@ 2020-08-07 16:27 ` H.J. Lu
2020-08-07 16:44 ` Joel Brobecker
2020-08-10 16:57 ` Joel Brobecker
1 sibling, 1 reply; 8+ messages in thread
From: H.J. Lu @ 2020-08-07 16:27 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Simon Marchi, Binutils, GDB
On Fri, Aug 7, 2020 at 9:21 AM Joel Brobecker <brobecker@adacore.com> wrote:
>
> > > What version of Python are you using, is it really old? All the
> > > reasonably recent and supported Python versions ship with the enum
> > > module.
> >
> > Ah nevermind, I thought it was available in 2.7, but no. So I presume
> > you use 2.7.
>
> Overseers just got it installed for us. So I've re-done the update.
>
> > Or, making sure you use python3 on the server could just be easier.
>
> This is in my TODO, but I'm still busy finishing up on the enhancement
> requests made by the GCC community. Once that's done, I'll start working
> on the transition to Python 3.x. I expect it to be a lot of work, not
> necessarily because the code might need a lot of transformation (it's
> possible, but my experience with the style_checker regarding that has
> been that it's fairly limited), but because I have to redo the testsuite
> framework, and then transition every testcase (all 200 of them). Since
> I do all that work during a few hours each weekend, I don't expect this
> to be done before end of this year at best. I look forward to being
> able to use all the new Python features brought by the latest Python
> though!
>
> I will install your script on Monday (I have more chances to be at
> my desk if something goes wrong).
The current hook ignores the commit subject when scanning for
PR/BZ #. It causes that glibc commit no longer updates glibc
bug report when BZ # is only mentioned in the commit subject.
--
H.J.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FYI: git-hooks update on sourceware.org
2020-08-07 16:27 ` H.J. Lu
@ 2020-08-07 16:44 ` Joel Brobecker
0 siblings, 0 replies; 8+ messages in thread
From: Joel Brobecker @ 2020-08-07 16:44 UTC (permalink / raw)
To: H.J. Lu; +Cc: Simon Marchi, Binutils, GDB
> > I will install your script on Monday (I have more chances to be at
> > my desk if something goes wrong).
>
> The current hook ignores the commit subject when scanning for
> PR/BZ #. It causes that glibc commit no longer updates glibc
> bug report when BZ # is only mentioned in the commit subject.
I assume that that the filing is achieved through the use of
a script set up via the hooks.file-commit-cmd option.
As far as I can tell, and verified by testing, there has been no change
of behavior in this area. The data passed to the script is the body
of the email, which should include the equivalent of a "git show"
of your commit. If the PR number is there, must have been given to
your filing script. That's where I would start looking. It could
be the script missed it for some reason, or that the wrong PR number
was used -- for instance. Otherwise, I'm going to need more information.
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: FYI: git-hooks update on sourceware.org
2020-08-07 16:21 ` Joel Brobecker
2020-08-07 16:27 ` H.J. Lu
@ 2020-08-10 16:57 ` Joel Brobecker
1 sibling, 0 replies; 8+ messages in thread
From: Joel Brobecker @ 2020-08-10 16:57 UTC (permalink / raw)
To: Simon Marchi; +Cc: binutils, gdb-patches
Hi Simon,
> I will install your script on Monday (I have more chances to be at
> my desk if something goes wrong).
Just to confirm that your script has been installed, and the repository's
configuration has been updated to use that script ;-).
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-08-10 16:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 15:44 FYI: git-hooks update on sourceware.org Joel Brobecker
2020-08-07 15:50 ` Joel Brobecker
2020-08-07 16:00 ` Simon Marchi
2020-08-07 16:02 ` Simon Marchi
2020-08-07 16:21 ` Joel Brobecker
2020-08-07 16:27 ` H.J. Lu
2020-08-07 16:44 ` Joel Brobecker
2020-08-10 16:57 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox