PackagingJam
Ubuntu Community Packaging Jam
The Ubuntu Michigan LoCo Team started a project to teach its member how to create packages of software for Ubuntu. The goals were to increase general packaging knowledge, provide some hands on learning experience by building packages, and to hopefully help members with potential projects within the Ubuntu Community.
From that first Packaging Jam we've put together this brief how-to/suggestion list for putting together your own packaging jam.
Requirements
- Someone that knows packaging fairly well and can handle questions and some of the unexpected likely to come up
- A day with some spare time. We went from noon until 8pm on a Saturday. Progress will be slower than you might think.
- A meeting location with network connectivity, power for everyone, and some room to get comfy for a little bit
Optional, but useful: A local Ubuntu mirror is very helpful if the internet connectivity is weak or altogether lacking. A good how-to for setting up an ubuntu mirror can be found here: https://help.ubuntu.com/community/Debmirror
- Snacks!
Actual Schedule/Topics Covered
Start out getting everyone setup, check for connectivity, and watch out for people with different versions of Ubuntu running. For instance the mirror might only have gutsy and someone comes with feisty. It's not a deal killer, but adds for suprises.
Now we suggest everyone use Gobby for communicating things throughout the meeting. It makes for a great place for the person running the Jam to paste links, commands, and other notes for the group to follow. This really lets the people save the shared documents and everyone goes him with notes from the day's events. It also really eliminates the need for a projector or other method of sharing screens.
The next step is to get everyone's GPG keys setup and make sure that they're available for signing the packages later on. This is also a good time to have a mini key signing party to get everyone introduced and to verify any GPG key issues are sorted out early. There's some good documentation for this on the GnuPrivacyGuardHowto
Next we suggest following the https://wiki.ubuntu.com/PackagingGuide documentation.
First go through the Getting Started section to get everyone's packaging environment setup.
Then start with the https://wiki.ubuntu.com/PackagingGuide/Basic and walk through the packaging of hello together. A helpful hint is to keep one version back when you download initially. This gives you a chance to walk through upgrading the package to the latest source available later on.
After getting hello packaged try to update to the latest source version by using uupdate. This should be a nice quick exercise.
Once you get through packaging hello, see if anyone brought a packaging problem the group can work on together. In our group someone wanted to update the xastir package. We did it together so the users had a real world example of something and one person went home with their own problem solved.
More advanced ideas
There was a lot of interest in moving forward and covering a number of topics. We plan on holding another Jam in a few months. There is a lot to cover so these Jams could be a regularly occurring event. Other topics/ideas include:
- Merging a package from Debian to Ubuntu
- Package a Python app
- Fix a bitesize bug in launchpad together for a package and upload/commit
- Full walkthrough of setting up a PPA and how PPAs work
- Packaging a Java App
- Detailed discussion of working with Launchpad including handling bugs, packaging info on current packages, etc
Conclusion
The hope is that over time people from your packaging jam find an interest in packaging and might want to apply to become an Ubuntu MOTU.
The full notes from the Michigan Team's Gobby session are available here.
Michigan Specific Jam Information
These are the notes/things we used for our jam that might prove useful. Please edit/remove what isn't, but it's here for completeness.
- Flyer: we used the following flyer made in scribus for the jam:
Full Main Gobby Notes File
# Daniel Holbach's Packaging Guide https://wiki.ubuntu.com/PackagingGuide # Skip introduction go to /GettingStarted # Install these apps sudo apt-get install build-essential devscripts debhelper dh-make diff patch gnupg fakeroot \ lintian linda pbuilder # Create your pbuilder environment (uses it's own sources; config in /etc/pbuilder/pbuilderrc) sudo pbuilder create --distribution gutsy \ --othermirror "deb http://archive.ubuntu.com/ubuntu gutsy universe multiverse" # Optional Add these lines to your ~/.bashrc export DEBEMAIL="your.email@host.com" export DEBFULLNAME="First Last" # Then source ~/.bashrc # Browse to the next section of the packaging guide https://wiki.ubuntu.com/PackagingGuide/Basic wget ftp://ftp.gnu.org/gnu/hello/hello-2.2.tar.gz cp hello-2.2.tar.gz hello_2.2.orig.tar.gz apt-get source hello cd ubuntu/hello-2.2/debian # Now on to actually MAKING a .deb package! # Make your build environment for hello mkdir ~/hello-debhelper cd ~/hello-debhelper # Grab hello source from upstream wget http://ftp.gnu.org/gnu/hello/hello-2.2.tar.gz # Grab Ubuntu-ified version for comparison mkdir ubuntu cd ubuntu apt-get source hello-debhelper cd ../ # Extract hello tar zxvf hello-2.2.tar.gz mv hello-2.2 hello-debhelper-2.2 # Do the Debian! ### STOP HERE!! #verify your environment variables echo $DEBFULLNAME $your $name echo $DEBEMAIL yourname@gmail.com cd hello-debhelper-2.2 dh_make -f ../hello-2.2.tar.gz cd debian rm *.ex *.EX # We'll start by modifying the changelog vi changelog # and change the following 1. unstable should become gutsy, or whatever environment you're building for 2. Wipe out everything after Initial release (on that line) 3. Verify your name & <email@address> are correct # For now we're copying these files, in "reality" you'd modify each one cp ../../ubuntu/hello-debhelper-2.2/debian/copyright . cp ../../ubuntu/hello-debhelper-2.2/debian/control . cp ../../ubuntu/hello-debhelper-2.2/debian/rules . # Now we create the source package cd .. debuild -S -k<your key ID if debuild doesn't find the env variables> # Build the package with pbuilder sudo pbuilder build ../*.dsc # To see your end result cd /var/cache/pbuilder/result/ # See how broken your .deb actually is! cd ~/hello-debhelper/ lintian -i *.dsc # Upgrading an existing package cd ~/hello-debhelper wget http://ftp.gnu.org/gnu/hello/hello-2.3.tar.gz cd hello-debhelper-2.2 uupdate -u hello-2.3.tar.gz # Cross your fingers, and hope a lot hasn't changed since the previous version debuild -S sudo pbuilder build ../*2.3*.dsc or ../hello-debhelper_2.3-1.dsc If everything went well you should have 2.3 debs in /var/cache/pbuilder/result
Misc Notes Gobby File
Pbuilder Notes
- Much like updating your local apt-repository
sudo pbuilder update
- When your complete with the previous step you should have a directory structure that looks as follows
~/hello/ubuntu drwxr-xr-x 3 alake alake 4096 2007-11-03 13:47 . drwxr-xr-x 3 alake alake 4096 2007-11-03 13:49 .. drwxr-xr-x 10 alake alake 4096 2007-11-03 13:47 hello-2.2 -rw-r--r-- 1 alake alake 4834 2007-04-27 06:06 hello_2.2-2.diff.gz -rw-r--r-- 1 alake alake 512 2007-04-27 06:06 hello_2.2-2.dsc -rw-r--r-- 1 alake alake 382629 2006-12-12 08:03 hello_2.2.orig.tar.gz
The CDBS "Easy way"
include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk
VIM Stuff
echo "syntax on" >> ~/.vimrc #if you use a dark background for your terminal echo "set bg=dark >> ~/.vimrc
Scp command
scp -r username@<HOME_IP>:~/.gnupg/ ~/
GPG Notes
- This worked for me:
debuild -k<YourKeyID> -S
-OR-
put in ~.bashrc
# gpg key export GPGKEY=$YOURGPGNUM
GPG Howto
Launchpad Bugs
Ubuntu Bugs to Fix: Bitesize tag
Xastir Notes Gobby File
# set up your xastir build directory (optional) mkdir -p ~/builds/xastir cd $_ # Get the current source for xastir apt-get source xastir # Grab the latest source wget http://superb-west.dl.sourceforge.net/sourceforge/xastir/xastir191-2007-Oct-05.tgz mv xastir191-2007-Oct-05.tgz xastir-1.9.1.20071005.tar.gz cd xastir-1.9.0 uupdate -u xastir-1.9.1.20071005.tar.gz cd ../xastir-1.9.1.20071005 debuild -S sudo pbuilder build ../xastir_1.9.1.20071005-1.dsc
PackagingJam (last edited 2008-08-06 16:40:03 by localhost)