I want to fix a bug. Where do I start?

Answering this question can get long and complicated, so I am instead going to point you to resources available instead of rehashing them here.

Documentation

  1. Getting Set Up for Ubuntu Development
  2. How to Fix Bugs

Tutorials

We run events throughout the cycle to help people just like you, specifically we run Ubuntu Developer Week in IRC, which is a live tutorial and Question and Answer workshop. There's one coming up at the end of February if you want to join in!

Here are two logs from a past session to give you an idea:

  • Getting Started in Ubuntu Development I
  • Getting Started in Ubuntu Development II

Places to Find Opportunities

  • Harvest - this tool goes through all the patches and packages in Launchpad (and even looks in other distros) for patches. Many of these can be snagged, applied, tested, and then fixed in Ubuntu and then sent upstream.
  • Cleansweep - List of patches sitting in Launchpad that someone has attached to a bug report. These could be useful or not, they still should be looked at though.

Getting Help

Contacting the MOTU on the mailing list or IRC is a good way to get help for individual problems you run into:

  • https://wiki.ubuntu.com/MOTU/Contact

Feedback

We've spent a lot of time reworking this documentation to be as easy as we can, if you would take notes on your experiences and how we can improve this stuff it would be very useful to know how to make it suck less for people like you.


Jorge's generalized answer is a great introduction to jumping into Ubuntu development, but let's try to look a little closer at you specific issue...

Apport's main upstream developer and Ubuntu maintainer are one and the same. This simplifies things for you a bit. Instead of having to learn about packaging and patch systems, the easiest path here is to work directly on the upstream code.

Apport's development is hosted on Launchpad. It uses the bazaar distributed version control system to manage its source code. The first step towards fixing your bug is to grab the source. If you haven't used bazaar before, the bazaar in five minutes tutorial is a good place to start.

Install bazaar with:

sudo apt-get install bzr

Pull apport's source code:

bzr branch lp:apport

Now you can get started hacking. As with most VCSs, when working with bazaar, it is a good idea to only make one change per commit. You should also make your commit messages informative. It makes your changes much easier to review. When you are ready to make your first commit, run:

bzr commit -m "My commit message. Did foo to bar in order to achieve baz."

Continue making changes and commits until you are satisfied that your bug is fixed. With your last commit, you can also tag it as fixing the bug by appending --fixes lp:<bug_number> to the commit command. Now you are ready to submit your changes for review and inclusion.

First, you need to push it to Launchpad in order to make it publicly available:

bzr push lp:~<launchpad_username>/apport/<branch_name>

Your branch can now be found at:

https://code.launchpad.net/~<launchpad_username>/apport/<branch_name>/

Running bzr lp-open in the branch will open that location in a browser.

Now we want to propose a merge. On that page, select "Propose for merging."

propose for merging

On the next page, select your target branch and give an overview of your changes.

describe merge

You will now have an active merge proposal.

active review

The maintainers will review your changes. If they are appropriate, they will be merged and be available in the next release. Alternatively, the proposal may be set to "Needs Work," and the maintainers will discuss with you additional changes that should be made before merging. If this happens, please don't take it as any kind of personal rejection of your work. When contributing to a new project for the first time, there are often little things like coding style that you might not be aware of.