Packaging has often been lamented as a massive weak point in getting software to users for testing or distribution. It can sometimes be more complicated to package a piece of software than it is to write it in the first place!

While the packaging system won’t be disappearing from Ubuntu any time soon (after all, it does have its uses), the Launchpad team have been hard at work trying to make packaging less like bareback riding a wild elephant on a 36 hour cocaine bender and more like a quiet afternoon stroll through an indoor butterfly enclosure.

Launchpad source package recipes have been in quiet development for a wee while now, undergoing beta testing but with many developers already using it to package up their software. Now, recipes are finally official and available for all to use.

Very few people are packaging ninjas, and unfortunately I’m not one of them – so I’ll hand it over Matthew Revell from the Launchpad team to explain recipes in more detail with this example:

“Let’s say you’re the developer of a home finance application called Alvin. You track your project’s code using Git and host it on your own server. For the past couple of years Alvin has been packaged in the Ubuntu universe and your trunk has also been imported from Git to a Bazaar branch in Launchpad at lp:alvin.

Just as you’re approaching Alvin’s next release, you want to get some wider testing. In the past, you’ve published a nightly tarball and provided instructions on manual installation. That’s given you a handful of dedicated beta testers but you’re worried that you’re asking too much of people.

With Launchpad’s source package recipes, you write a short recipe that pulls in your trunk branch, adds the packaging from Alvin’s existing Ubuntu package and then builds an installable Ubuntu package in the PPA of your choice”

First hand account

Any new feature launch wouldn’t be complete without a first hand account from somebody who has been using recipes to successfully make their life easier. Luke Benstead has been using recipes while developing a game in his spare time:

“I’ve been using LP to develop some small open source game libraries. Because there are quite a few of them, packaging them all is a pain, so the package builds have worked out pretty well for them.

Now I get nightly builds delivered to a PPA, so I know that if I fix a bug it’s reflected to all my machines. And my recipes are only a single line so they’ve been really easy to use. I’m not really sure how they could be easier.”

See it in action

Matthew from the Canonical Launchpad team has even put together a neat little (beautifully narrated) demonstration video.

Source: Matthew Revell via Email & Launchpad Blog

launchpad packaging recipes