Not logged in - Log In / Register

Launchpad Help > Packaging > Daily builds > Getting started


To create your own daily builds, you need:

You should also have confirmed that you build will work by testing it locally.

Let's take a quick look at these in turn and then we can look at them in more detail later on.

Code in Launchpad

The code that you want to use for your daily build must be in Launchpad, either as a Bazaar branch that you have uploaded to Launchpad (easier) or as [[Code/Imports|an import from elsewhere.

You can import code that is hosted anywhere on the internet, so long as Launchpad can reach it and it is available without needing a username and password. Launchpad can import code hosted in the following formats:


It's likely that someone has already packaged the software you want to use in a daily build. If that's the case, Launchpad can borrow that packaging information and you're pretty much sorted.

Similarly, if there's a branch in Launchpad that contains packaging information for your software, you can use that.

If there's no existing packaging, either for Debian or Ubuntu, you'll need to create your own. You should read the Ubuntu community's guide to packaging to get started.

Note: you need to make sure that the build process specified by your packaging and deal with what's in your branch. For example, if you work on a C project with autotools, you might have to run autoreconf -i at some stage during the build to make sure that all the auto-generated files (which are not in version control) are present.

The recipe

The recipe is a simple description of what steps are needed to construct a package from your various Bazaar branch. It specifies:

Trying it out

The best way to learn how to create a daily build is to try out a simple example. All you need is a text editor and the bzr-builder plugin for Bazaar.

Getting bzr-builder

You can install the bzr-builder plugin from this PPA:

Read more about bzr-builder.

Writing a basic recipe

There are different ways to write a recipe but, for this example, we're going to use the simplest: you use the project's trunk, which contains no packaging, and nest another branch that contains only packaging information.

For other recipe types, see the recipe guide.

For this example, we'll use the project.

The anatomy of a recipe

Open your text editor and enter:

# bzr-builder format 0.2 deb-version {debupstream}+{revno}+{revno:packaging}
nest packaging lp:~gtg/gtg/debian debian

Now save the file as gtg.recipe.

This recipe is pretty straightforward to read, but let's look at each line in turn.

The first line tells Launchpad which recipe version we're using (in this case it's 0.2), along with how we want to name the resultant package.

The next line specifies the code branch, using Launchpad's short name system.

Finally, we specify where to find the packaging branch and say that we want to nest it into the code branch.

Testing your recipe and build

You should always test your recipe locally before sending it to Launchpad. Launchpad limits each user to five builds per distroseries, per recipe, per day, so failed builds will waste your allocation.

Testing the recipe

Let's start by testing the recipe itself. For now, we'll assume you're running the Ubuntu version that you want to test against.

Note: if you want to test a specific version, see the Ubuntu guide.

The bzr-builder plugin adds a dailydeb command to Bazaar.

Let's try it out in your terminal:

$ bzr dailydeb gtg.recipe working-dir

This processes your recipe and creates a directory called working-dir, into which it places the resulting source tree and source package.

Testing the build

If bzr-builder processed the recipe without any problems, you'll now have a source package. Let's make sure it builds.

First, you need to set up pbuilder, a tool that creates a clean, minimal environment for the build. This ensures that the build will work everywhere and that it's not dependent on something unusual in your own environment.

Step 1: Install pbuilder with sudo apt-get install pbuilder

Step 2: Edit ~/.pbuilderrc and add:

COMPONENTS="main universe multiverse restricted"

Step 3: sudo pbuilder create

Now, kick off the test build with:

sudo pbuilder build <working-dir>/<project>_<version>.dsc

If the build succeeds, you can test-install the resulting package from /var/cache/pbuilder/result/.

Setting up the recipe in Launchpad

Now that you've confirmed that both the recipe and build work, the rest is very simple.

Browse to the branch you want to build in Launchpad and click (+) Create packaging recipe.


Create the build in Launchpad

Now fill in all the necessary details:


If you have checked "build daily", Launchpad will automatically schedule a build of your recipe once every day, if any of the branches specified have changed since the last build. However, it's a good idea to try building it yourself first, to make sure that everything is working correctly. You can use the "Request build(s)" link for this:

Manually request a build

Next steps

Now that you've tried a simple example, let's take a more detailed look at writing recipes.

< Daily builds overview

Recipes in detail >

Packaging/DailyBuilds/GettingStarted/Draft (last edited 2011-03-22 14:04:02 by matthew.revell)