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 2010, there are three PPAs:
18
<https://launchpad.net/~bzr/+archive>
19
Final released versions and updates.
21
<https://launchpad.net/~bzr-beta-ppa/+archive>
24
<https://launchpad.net/~bzr-nightly-ppa/+archive>
25
Automatic nightly builds from trunk.
27
We build packages for every supported Ubuntu release
28
<https://wiki.ubuntu.com/Releases>. Packages need no longer be updated
29
when the release passes end-of-life because all users should
30
have upgraded by then.
32
We build a distinct package for each distrorelease.
33
If you upload a release-specific version, you should add a suffix to the
34
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``.
36
Dapper uses the ``python-support`` framework and later distributions use
37
``python-central``. This has little effect on everyday packaging but does
38
mean that some of the control files are quite different.
40
Every package is first uploaded into the beta ppa. For final release
41
versions it is also copied to the main PPA.
43
The packaging information is kept in branches of bzr on Launchpad, named
45
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.
47
<lp:~bzr/bzr/packaging-hardy>. These branches are intended to be used
48
with the ``bzr-builddeb`` plugin.
50
**You should almost always upload to the beta ppa first** and then either
51
upload again or copy the packages into the release ppa. That reduces the
52
risk of breaking the main archive from which people get bzr updates.
57
* You must have a Launchpad account and be a member of the teams
58
that own these PPAs (``~bzr``, ``~bzr-beta-ppa``).
60
* You must have a GPG key registered to your Launchpad account.
62
On reasonably recent versions of Ubuntu you no longer need special dput
63
configuration, because you can just say ::
65
dput ppa:bzr/2.1-proposed <source.changes
68
However, you may still want to add these lines to ``~/.dput.cf`` prevent
69
inadvertently attempting to upload into Ubuntu or Debian, which will
70
give a somewhat unclear error::
73
default_host_main = notspecified
75
* Configure ``bzr-builddeb`` to sign the package, which is required for
76
Launchpad to build it. Put this in ``~/.bazaar/builddeb.conf`` ::
79
builder = dpkg-buildpackage -rfakeroot
80
source-builder= dpkg-buildpackage -rfakeroot -S -sa
82
* You need a Ubuntu (or probably Debian) machine, and ::
84
sudo apt-get install build-essential devscripts dput quilt patch libcrypt-ssleay-perl debhelper cdbs python-docutils
86
Please update this document if you encounter unmet dependencies or find a
87
shorter way to express them.
89
* You will also want to have the `bzr-builddeb`_ plugin installed, which
90
depends on `bzrtools`_.
92
.. _`bzr-builddeb`: http://launchpad.net/bzr-builddeb
93
.. _`bzrtools`: http://launchpad.net/bzrtools
99
Overview of packaging with builddeb
100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102
* First update the oldest supported branch, using ``bzr merge-upstream``.
104
* Run ``bzr builddeb -S -- -sa`` to build a source package, then put
107
(``-S`` says to make a source-only upload, which is
108
required for Launchpad's builders. ``--sa`` says to include the
109
``.orig.tgz`` even if this doesn't seem to be the first upload for an
110
upstream release: this is often needed when rebuilding something that's
111
previously been uploaded to Debian or Ubuntu or into a different PPA.)
113
* Now merge across that change into each supported branch with a
114
simple ``bzr merge``.
116
Locally testing builds
117
~~~~~~~~~~~~~~~~~~~~~~
119
It may be useful to locally test builds inside pbuilder. You may want to
120
use the script from <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=255165>
127
For people who have already set up everything they need, building the
128
release packages is as simple as::
130
cd ~/dev/bzr/releases/packaging
131
export VERSION="1.17~rc1-1~bazaar1"
133
export UBUNTU_RELEASES="dapper hardy intrepid jaunty karmic"
134
~/dev/bzr/bzr.dev/tools/packaging/update-packaging-branches.sh
135
~/dev/bzr/bzr.dev/tools/packaging/update-changelogs.sh
136
~/dev/bzr/bzr.dev/tools/packaging/update-control.sh 1.16 1.17 1.18
137
~/dev/bzr/bzr.dev/tools/packaging/build-packages.sh
138
dput bzr-beta-ppa ${PACKAGE}_$VERSION*.changes
140
Rinse and repeat for all the plugins by changing VERSION and PACKAGE.
145
#. You will end up checking out a separate directory for each supported
146
release. Such as ``~/dev/bzr/releases/packaging/hardy``. In each of these
147
branches, you will produce the package for the release.
149
The scripts will also create the branches and produce packages for
150
bzrtools and bzr-svn.
152
#. Decide on the final version number. It should be of this form::
154
bzr-1.17~rc1-1~bazaar1~hardy1
156
**Note:** There are three hyphen-separated parts: the *package name*,
157
the *upstream version*, and the *packaging version*.
159
**Caution:** Upstream betas or release candidates must insert a tilde
160
to make them sort before the final release, like this:
161
``bzr-1.17~rc1-1~bazaar1~hardy1``.
163
Final releases will use a release string of the form:
164
``bzr-1.17-1~bazaar1~hardy1``
166
Set this base of this up as a usable environment variable::
168
export VERSION="1.17~rc1-1~bazaar1"
170
#. Export the distroreleases that you will be packaging for::
172
export UBUNTU_RELEASES="dapper hardy intrepid jaunty karmic"
174
#. Export the program you are packaging::
178
#. Checkout (or update) the packaging branch for each supported release::
180
bzr co lp:~bzr/bzr/packaging-hardy
182
There is a script available to help::
184
tools/packaging/update-packaging-branches.sh
186
#. The ``bzr-builddeb`` step will download the original tarball if you do
187
not already have it, putting it into a ``tarballs`` directory.
189
#. For Bazaar plugins, change the ``debian/control`` file to express a
190
dependency on the correct version of ``bzr``.
192
For bzrtools this is typically::
194
Build-Depends-Indep: bzr (>= 1.17~), rsync
195
Depends: ${python:Depends}, bzr (>= 1.17~), bzr (<< 1.18~), patch
197
There is a helper script which will update the control file and commit it
198
for all of your ``$UBUNTU_RELEASES``. It is available as::
200
tools/packaging/update-control.sh
202
You must supply the versions as arguments as follows
203
OLD_VERSION CURRENT_VERSION NEXT_VERSION, such as::
205
tools/packaging/update-control.sh 1.16 1.17 1.18
207
#. Make a new ``debian/changelog`` entry for the new release,
208
either by using ``dch`` or just editing the file::
210
dch -v '1.17~rc1-1~bazaar1~hardy1' -D hardy
212
dch will default to the distro you're working in and this isn't checked
213
against the version number (which is just our convention), so make sure
216
Make sure you have the correct email address for yourself (you may need
217
export DEBEMAIL=`bzr whoami` if it isn't already set), version number, and
218
distribution. It should look something like this::
220
bzr (1.17~rc1-1~bazaar1~hardy1) hardy; urgency=low
222
* New upstream release.
224
-- John Sample <sample@example.com> Mon, 31 Mar 2008 12:36:27 +1100
226
If you need to upload the package again to fix a problem, normally you
227
should increment the last number in the version number, following the
228
distro name. Make sure not to omit the initial ``-1``, and make sure
229
that the distro name in the version is consistent with the target name
230
outside the parenthesis.
232
You will also want to commit these changes into the packaging branch.
234
There is a helper script which will build all the packages
235
for all of your ``$UBUNTU_RELEASES``. It is available as::
237
tools/packaging/update-changelogs.sh
239
#. Build the source packages::
241
cd packaging-$DISTRO; bzr builddeb -S
243
This will create a ``.changes`` file. If you didn't configure builddeb
244
to automatically sign them, you can use ::
246
debsign -m$UID *.changes
248
where ``$UID`` is the gpg key you want to use to sign the changes.
250
There is a helper script which will build the package
251
for all of your ``$UBUNTU_RELEASES``. It is available as::
253
tools/packaging/build-packages.sh
255
#. Upload into the beta PPA for each release::
257
dput bzr-beta-ppa bzr*1.17-1*.changes
259
#. For final release versions, also copy it into the ``~bzr`` PPA::
261
dput bzr-ppa ../bzr_1.17-1\~bazaar1\~hardy1\_source.changes
263
Alternatively, you can use Launchpad's "copy" feature to copy the
264
packages between repositories.
266
#. You should soon get an "upload accepted" mail from Launchpad, which
267
means that your package is waiting to be built. You can then track its
268
progress in <https://launchpad.net/~bzr-beta-ppa/+archive> and
269
<https://launchpad.net/~bzr-beta-ppa/+archive/+builds>.
275
bzr-svn uses a packaging branch that contains both the source
276
(including any changes against upstream) and the ``debian/`` directory.
280
#. Get a checkout of ``lp:~bzr/bzr-svn/hardy-ppa/``
282
#. Merge from ``http://bzr.debian.org/pkg-bazaar/bzr-svn/unstable/``
284
This should bring in both upstream and packaging changes for the new
285
release, and it's updated as part of the bzr-svn release process.
287
It's quite possible you will need to resolve some conflicts.
289
#. Run ``dch -v 0.4.15-1~bazaar1-hardy1 -D hardy`` or similar
291
#. Run ``bzr builddeb --source``
293
bzr-builddeb will automatically check out the appropriate tag from the
294
main branch of bzr-svn, build, and package it.
296
#. ``dput bzr-beta-ppa ../bzr-svn_0.4.15-1~bazaar1~hardy1_source.changes``
299
Monitoring the contents of PPAs
300
-------------------------------
302
If you add all the bzr PPAs to your ``sources.list`` then you can see a
303
summary of current package versions with::
305
apt-cache madison bzr
309
Packaging dependencies
310
----------------------
312
Some of our updates to bzr in previous releases require backports of our
313
dependencies. Specific branches holding these backports:
315
* ``lp:~bzr/ubuntu/dapper/configobj/dapper-backport``
319
vim: filetype=rst textwidth=74 ai shiftwidth=4