How to contribute to Open Source on Ubuntu

Last night I did a presentation for the OSU Open Source club on how to contribute to Open Source software, and here are my notes / commands:

1. Search in Bugzilla, then make a post:

http://bugzilla.gnome.org/show_bug.cgi?id=392431

2. Download the source code:

Code Sample:

## You only have to run this command once, not every time
# Install compiler + tools
sudo apt-get install build-essential fakeroot vim-full dpkg-dev

# Get the source, Luke!
apt-get source gnome-applets && sudo apt-get build-dep gnome-applets

3. Edit the code:

Code Sample:

# Builds index of methods, constants, classes, etc
ctags -R .

# Use Control-], (Control-w, ]), and Ctrl-T to find definitions of functions in gVim
gvim

4. Create and test a patch:

To test:

Code Sample:

# Installs app to /usr/local
./autogen.sh --prefix=/usr/local && make && sudo make install   

# Removes everything that was installed
sudo make uninstall && make distclean

To build and install packages:

Code Sample:

# Build Debian / Ubuntu package
dpkg-buildpackages -rfakeroot                        

# Install it
sudo dpkg -i *.deb

To make a patch:

Code Sample:

# Remove intermediate files
cd [The top directory]
sudo debian/rules clean  

# Make the patch                               
diff -ur gnome-applets-orig gnome-applets-modified > the-fix.patch

# Check for errors / clean up extra lines that aren’t needed
vim the-fix.patch

5. Send the patch back!

Tips:

  • Make patches clean and only do one thing, don’t clean up other misc. mistakes
  • Follow indentation rules (tab sizes, spacing, etc)
  • Read ./HACKING first and follow their naming conventions
  • Test your patch first!
Web 2.0, Go! These icons link to social bookmarking sites where readers can share and discover new web pages.
  • co.mments
  • del.icio.us
  • digg
  • Reddit
  • Shadows
  • YahooMyWeb

1 Comment »

  1. Juan said,

    January 17, 2007 @ 4:32 pm

    Nice blog.
    Added in my feeds reader.
    Category: programming and linux.

RSS feed for comments on this post · TrackBack URI

Leave a Comment