Week 1: The First Patches
A lot of things happened this week and I don’t really know where to
begin. So I’ll start with the work I did and touch the other details
as I go through them.
As mentioned in the post the post before this, I am continuing the work
that Nsengiyumva has done before me and am builiding on his work
regarding the signature format. Git already has a way to output
signatures and the information related to it in pretty
, but
the goal here is to duplicate this format in ref-filter
so that
ref-filter
can do everything that pretty
is already doing.
My progress can be found from branches “sign1” to “sign5”. This
process of working on this has been very informative as I was tweaking
through old log messages, particularly of gpg-interface.{c, h}
.
The problem with Nsengiyumva’s patches was that they were breaking CI,
specifically on linux32. So if we figure out a way to make these tests
pass, we can propose a successful change and hopefully get the patches
that Nsegiyumva has worked on, merged since it is a step towards reaching
that single interface for formats.
What is breaking CI?
GNU Privacy Guard, that is GPG, is basically a crytographic tool that
helps make your files secure (this is really vague but see their
website). In Git, you can sign commits or tags with the help of GPG,
so that when you push it, people can verify and know that your change
was legitimate and has not been touched.
In this process, Git (in fact, GPG) allows you see what is going on
behind the curtain. Since what Nsengiyumva has worked on and what I am
now working on has to do with how we can customize this output to the way
we want to see it on stdout (see log), it is necessary we write tests to make
sure the output is indeed customized.
This is exactly where the CI breaks. You see, there is a difference in the
way GPG outputs on stderr between different major GPG versions. Since
linux32 (on which the CI jobs also run on) only supports GPG till v1.4.2,
the test written for the format option where the whole verification
message is shown fails on linux32 but passes on all other systems for
which we run the CI jobs because all of these use GPG v2.0.0 or higher.
I refactored the test to use a sed
script in hope of getting the test
to pass but it was in vain. So I started searching the logs.
Mentors
I was going through the log messages looking for something useful which
would help make this test pass on all systems. I found some commits
which were related but not really useful in this context. So I texted
Christian and Hariom saying this was the case. Since we had already
decided that we will be meeting online every Friday and it was Friday,
we discussed about this in the meet.
The meet was a great experience for me. It was the first time I talked
with my mentors and it was really exciting.
Christian suggested in the meet that we should introduce a new prereq
GPG2
, which would exclusively use GPG v2.0.0 or higher and will exit if
it is any other version. We agreed to go with it.
It was instantly clear to me the role that mentors played in a project.
Current Work
Along with the new prereq, I also cleaned up the code around the tests.
While going through the code related to the pretty
formats, I noticed
there was no test for the raw verification message format %GG
but didn’t
really give it much thought. After Christian looked at the final commits,
he thought it would be better to add such a test and I couldn’t agree more
so we added it.
This version can be found on branch “sign5” for which the CI is successful. This is also the version
that I sent to the mailing list and these are the first patches that I
sent to the mailing list as part of GSoC.
Also, for anyone trying to set up Mutt, if you have a GMail account or
really anything that requires a compulsory OAuth2 authentication, believe me,
you are in for real pain. There is a Red Hat post to help you with this
process but I didn’t find it that helpful. You’ll be much better off
reading the README associated with the mutt_oauth2.py
script instead. This
is the script which is facilitates the use of OAuth2 in Mutt.
‘til next time,
Kousik