gnome – submitting a patch

As part of gnome’s GSoC project, I was learning to submit a patch to gnome, so I thought : Why not blog about it ?

The mundane way to submit a patch is by using git to make a patch file (using format-patch) and attaching it to the bug. But this is way to tiresome ! Here we use the git bz utility (gnome’s recommended way of doing this) to automatically send the patch to bugzilla which is a lot easier. Later, this same patch can be updated

Step 1 : Save the git-bz link to /bin/git-bz or /usr/bin/git-bz (anywhere that your terminal can find it) and make it executable:

cd /usr/local/bin
sudo wget
sudo chmod a+x git-bz

Step 2 : Now, open firefox and make sure to be logged into gnome’s bugzilla. And also, find the number of the bug you wish to attach a patch to.

Step 3 : Create a branch where you will keep all your changes

git checkout -b my/new/testbed

Step 4 : Now, make the changes you want to submit as a patch.

Step 5 : Add all your files and commit using the following commands:

git add -i .
git commit -a -m "some message here"

Step 6 : Run the following command to apply your last commit as a patch to the bug:

git bz attach nnnnnn HEAD

And, that’s all there is to it !

2 Comments Add yours

  1. zerwas says:

    Thanks for the little tutorial. A little note: /usr/local/bin is for binaries which are not managed by the distribution’s package maneger, so it makes sense to put git-bz in there:

    sudo wget -O /usr/local/bin/git-bz
    sudo chmod +x /usr/local/bin/git-bz


    1. abdealijk says:

      True, thanks ! I’ve edited the post ^_^


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s