Managing the Bazaar PPA

See also: Bazaar Developer Document Catalog.


We build Ubuntu .deb packages for Bazaar as an important part of the release process. These packages are hosted in a few Personal Package Archives (PPA) on Launchpad.

As of June 2008, there are three PPAs:

Final released versions.
Releases and release candidates.
Automatic nightly builds from trunk.

We build packages for every supported Ubuntu release <>. Packages need no longer be updated when the release passes end-of-life because all users should have upgraded by then. (As of May 2008, Edgy Eft is no longer supported.)

We build a distinct package for each distrorelease. As of bzr 1.5, Dapper uses python-support and later distributions use python-central. If you upload a release-specific version, you should add a suffix to the package version, e.g. bzr.1.3-1~bazaar1~dapper1.

Every package is first uploaded into the beta ppa. For final release versions it is also copied to the main PPA.

The packaging information is kept in branches of bzr on Launchpad, named like <>. or <lp:~bzr/bzr/packaging-hardy>. These branches are intended to be used with the bzr-builddeb plugin.


Packaging Bazaar

Short form

For people who have already set up everything they need, building the release packages is as simple as:

cd ~/dev/bzr/releases/packaging
ln ~/dev/bzr/releases/bzr-1.6.tar.gz ./bzr_1.6.orig.tar.gz
export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"
~/dev/bzr/ 1.6~beta3-1~bazaar1
dput bzr-beta-ppa bzr_1.6~beta3-1~bazaar1*.changes

Long Form

  1. You will end up checking out a separate directory for each supported release. Such as ~/dev/bzr/releases/packaging/hardy. In each of these branches, you will produce the package for the release.

  2. Decide on the final version number. It should be of this form:


    Note: There are three hyphen-separated parts: the package name, the upstream version, and the packaging version.

    Caution: Upstream betas or release candidates must insert a tilde to make them sort before the final release, like this: bzr-1.6~beta3-1~bazaar1~hardy1.

    Final releases will use a release string of the form: bzr-1.6-1~bazaar1~hardy1

  3. Export the distroreleases that you will be packaging for:

    export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid jaunty"
  4. Checkout (or update) the packaging branch for each supported release:

    bzr co lp:~bzr/bzr/packaging-hardy

    There is a script available to help:

  5. The bzr-builddeb step will download the original tarball if you do not already have it, putting it into a tarballs directory.

  6. For Bazaar plugins, change the debian/control file to express a dependency on the correct version of bzr.

    For bzrtools this is typically:

    Build-Depends-Indep: bzr (>= 1.6~), rsync
    Depends: ${python:Depends}, bzr (>= 1.6~), bzr (<< 1.7~), patch
  7. Make a new debian/changelog entry for the new release, either by using dch or just editing the file:

    dch -v '1.6~beta3-1~bazaar1~hardy1' -D hardy

    dch will default to the distro you're working in and this isn't checked against the version number (which is just our convention), so make sure to specify it.

    Make sure you have the correct email address for yourself (you may need export DEBEMAIL=`bzr whoami` if it isn't already set), version number, and distribution. It should look something like this:

    bzr (1.6~beta3-1~bazaar1~hardy1) hardy; urgency=low
     * New upstream release.
    -- John Sample <>  Mon, 31 Mar 2008 12:36:27 +1100

    If you need to upload the package again to fix a problem, normally you should increment the last number in the version number, following the distro name. Make sure not to omit the initial -1, and make sure that the distro name in the version is consistent with the target name outside the parenthesis.

    You will also want to commit these changes into the packaging branch.

    There is a helper script which will update the changelog and commit it for all of your $UBUNTU_RELEASES. It is available as:


    You must supply the release string, such as:

    tools/packaging/ 1.6~beta3-1~bazaar1

    It will automatically append the distro numbering on the end.

  8. Build the source packages:

    cd packaging-$DISTRO; bzr builddeb -S

    This will create a .changes file. If you didn't configure builddeb to automatically sign them, you can use

    debsign -m$UID *.changes

    where $UID is the gpg key you want to use to sign the changes.

  9. Upload into the beta PPA for each release:

    dput bzr-beta-ppa bzr_1.6-1*.changes
  10. For final release versions, also copy it into the ~bzr PPA:

    dput bzr-ppa ../bzr_1.6-1\~bazaar1\~hardy1\_source.changes

    Alternatively, you can use Launchpad's "copy" feature to copy the packages between repositories.

  11. You should soon get an "upload accepted" mail from Launchpad, which means that your package is waiting to be built. You can then track its progress in <> and <>.

Packaging bzr-svn

bzr-svn uses a packaging branch that contains both the source (including any changes against upstream) and the debian/ directory.

To build bzr-svn:

  1. Get a checkout of lp:~bzr/bzr-svn/hardy-ppa/

  2. Merge from

    This should bring in both upstream and packaging changes for the new release, and it's updated as part of the bzr-svn release process.

  3. Run dch -v 0.4.15-1~bazaar1-hardy1 -D hardy or similar

  4. Run bzr builddeb --source

    bzr-builddeb will automatically check out the appropriate tag from the main branch of bzr-svn, build, and package it.

  5. dput bzr-beta-ppa ../bzr-svn_0.4.15-1~bazaar1~hardy1_source.changes

Monitoring the contents of PPAs

If you add all the bzr PPAs to your sources.list then you can see a summary of current package versions with:

apt-cache madison bzr