1
Managing the Bazaar PPA
 
 
2
=======================
 
 
4
See also: `Bazaar Developer Document Catalog <index.html>`_.
 
 
10
We build Ubuntu ``.deb`` packages for Bazaar as an important part of the release
 
 
11
process.  These packages are hosted in a few `Personal Package Archives (PPA)`__ on
 
 
14
  __ https://help.launchpad.net/PPAQuickStart
 
 
16
As of June 2008, there are two PPAs:
 
 
18
<https://launchpad.net/~bzr/+archive>
 
 
19
    Final released versions.
 
 
21
<https://launchpad.net/~bzr-beta-ppa/+archive>
 
 
22
    Releases and release candidates.    
 
 
24
We build packages for every supported Ubuntu release
 
 
25
<https://wiki.ubuntu.com/Releases>.  Packages need no longer be updated
 
 
26
when the release passes end-of-life because all users should
 
 
27
have upgraded by then.  (As of May 2008, Edgy Eft is no longer supported.)
 
 
29
We build a distinct package for each distrorelease.  As of bzr 1.5, Dapper
 
 
30
uses ``python-support`` and later distributions use ``python-central``.
 
 
31
If you upload a release-specific version, you should add a suffix to the
 
 
32
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``.
 
 
34
Every package is first uploaded into the beta ppa.  For final release
 
 
35
versions it is also copied to the main PPA.
 
 
37
The ``debian/`` directory containing the packaging information is kept in
 
 
38
branches on Launchpad, named like 
 
 
39
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.
 
 
41
<lp:~bzr/bzr/packaging-hardy>.
 
 
46
* You must have a Launchpad account and be a member of the teams 
 
 
47
  that own these PPAs (``~bzr``, ``~bzr-beta-ppa``).
 
 
49
* You must have a GPG key registered to your Launchpad account.
 
 
51
* Configure ``dput`` to upload to our PPA with this section in your
 
 
55
    fqdn = ppa.launchpad.net
 
 
57
    incoming = ~bzr-beta-ppa/ubuntu
 
 
59
    allow_unsigned_uploads = 0
 
 
62
    fqdn = ppa.launchpad.net
 
 
64
    incoming = ~bzr/ubuntu
 
 
66
    allow_unsigned_uploads = 0
 
 
68
  You may also want to add these lines to prevent inadvertently attempting
 
 
69
  to upload into Ubuntu or Debian, which will give a somewhat unclear
 
 
73
    default_host_main = notspecified
 
 
75
* You need a Ubuntu (or probably Debian) machine, and ::
 
 
77
    sudo apt-get install build-essential devscripts dput quilt patch
 
 
79
* You will also want to have the ``bzr-builddeb`` plugin installed.
 
 
88
For people who have already set up everything they need, building the
 
 
89
release packages is as simple as::
 
 
91
  cd ~/dev/bzr/releases/packaging
 
 
92
  export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"
 
 
93
  ~/dev/bzr/bzr.dev/tools/packaging/update-packaging-branches.sh
 
 
94
  ~/dev/bzr/bzr.dev/tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1
 
 
95
  ~/dev/bzr/bzr.dev/tools/packaging/build-packages
 
 
96
  dput bzr-beta-ppa build-area/bzr_1.6~beta3~bazaar1*.changes
 
 
101
#. You will end up checking out a separate directory for each supported
 
 
102
   release. Such as ``~/dev/bzr/releases/packaging/hardy``
 
 
104
#. Decide on the final version number.  It should be of this form::
 
 
106
     bzr-1.6~beta3-1~bazaar1~hardy1
 
 
108
   There are three hyphen-separated parts: the *package name*, the *upstream
 
 
109
   version*, and the *packaging version*.
 
 
111
   **Caution:** Upstream betas or release candidates must insert a tilde
 
 
112
   to make them sort before the final release, like this:
 
 
113
   ``bzr-1.6~beta3-1~bazaar1~hardy1``.
 
 
115
   Final releases will use a release string of the form:
 
 
116
   ``bzr-1.6-1~bazaar1~hardy1``
 
 
118
#. Export the distroreleases that you will be packaging for::
 
 
120
      export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"
 
 
122
#. Checkout (or update) the packaging branch for each supported release::
 
 
124
      bzr co lp:~bzr/bzr/packaging-hardy
 
 
126
   There is a script available to help::
 
 
128
      tools/packaging/update-packaging-branches.sh
 
 
130
#. The ``bzr-builddeb`` step will download the original tarball if you do
 
 
131
   not already have it. Putting it into a ``tarballs`` directory.
 
 
133
#. For Bazaar plugins, change the ``debian/control`` file to express a
 
 
134
   dependency on the correct version of ``bzr``.
 
 
136
   For bzrtools this is typically::
 
 
138
      Build-Depends-Indep: bzr (>= 1.6~), rsync
 
 
139
      Depends: ${python:Depends}, bzr (>= 1.6~), bzr (<< 1.7~), patch
 
 
141
#. Make a new ``debian/changelog`` entry for the new release,
 
 
142
   either by using ``dch`` or just editing the file::
 
 
144
      dch -v '1.6~beta3-1~bazaar1~hardy1' -D hardy
 
 
146
   dch will default to the distro you're working in and this isn't checked
 
 
147
   against the version number (which is just our convention), so make sure 
 
 
150
   Make sure you have the correct email address for yourself, version
 
 
151
   number, and distribution.  It should look something like this::
 
 
153
       bzr (1.6~beta3-1~bazaar1~hardy1) hardy; urgency=low
 
 
155
        * New upstream release.
 
 
157
       -- John Sample <sample@example.com>  Mon, 31 Mar 2008 12:36:27 +1100
 
 
159
   If you need to upload the package again to fix a problem, normally you
 
 
160
   should increment the last number in the version number, following the
 
 
161
   distro name.  Make sure not to omit the initial ``-1``, and make sure
 
 
162
   that the distro name in the version is consistent with the target name
 
 
163
   outside the parenthesis.
 
 
165
   You will also want to commit these changes into the packaging branch.
 
 
167
   There is a helper script which will update the changelog and commit it
 
 
168
   for all of your ``$UBUNTU_RELEASES``. It is available as::
 
 
170
      tools/packaging/update-changelogs.sh
 
 
172
   You must supply the release string, such as::
 
 
174
      tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1
 
 
176
   It will automatically append the distro numbering on the end.
 
 
178
#. Build the source packages::
 
 
180
      cd packaging-$DISTRO; bzr builddeb -S
 
 
182
   This will create a ``.changes`` file in ``build-area``. You will need
 
 
185
      debsign -m$UID build-area/*.changes
 
 
187
   Where ``$UID`` is the gpg key you want to use to sign the changes.
 
 
188
   Alternatively, you can configure ``~/.bazaar/builddeb.conf`` with::
 
 
191
      builder = dpkg-buildpackage -rfakeroot
 
 
192
      source-builder= dpkg-buildpackage -rfakeroot -S -sa
 
 
194
   Which tells ``bzr builddeb`` to automatically sign the package with the
 
 
195
   key associated with the user who created the changelog entry.
 
 
197
#. Upload into the beta PPA for each release::
 
 
199
     dput bzr-beta-ppa build-area/*.changes
 
 
201
#. For final release versions, also copy it into the ``~bzr`` PPA::
 
 
203
     dput bzr-ppa ../bzr__1.6-1\~bazaar1\~hardy1\_source.changes
 
 
205
   Alternatively, you can use Launchpad's "copy" feature to copy the
 
 
206
   packages between repositories.
 
 
208
#. You should soon get an "upload accepted" mail from Launchpad, which
 
 
209
   means that your package is waiting to be built.  You can then track its
 
 
210
   progress in <https://launchpad.net/~bzr-beta-ppa/+archive> and
 
 
211
   <https://launchpad.net/~bzr-beta-ppa/+archive/+builds>.
 
 
214
Monitoring the contents of PPAs
 
 
215
-------------------------------
 
 
217
If you add all the bzr PPAs to your ``sources.list`` then you can see a
 
 
218
summary of current package versions with::
 
 
220
  apt-cache madison bzr
 
 
224
   vim: filetype=rst textwidth=74 ai shiftwidth=4