~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/ppa.txt

  • Committer: Vincent Ladeuil
  • Date: 2010-01-25 17:48:22 UTC
  • mto: (4987.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4988.
  • Revision ID: v.ladeuil+lp@free.fr-20100125174822-nce4l19sbwx83jvq
Deploying the new overrideAttr facility further reduces the complexity
and make the code clearer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
Background
8
8
----------
9
9
 
10
 
We build Ubuntu ``.deb`` packages for Bazaar as an important part of the
11
 
release process.  These packages are hosted in a few `Personal Package
12
 
Archives (PPA)`__ on Launchpad.
 
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
 
12
Launchpad.
13
13
 
14
14
  __ https://help.launchpad.net/PPAQuickStart
15
15
 
16
 
As of September 2010, there are four PPAs:
17
 
 
18
 
<https://launchpad.net/~bzr/+archive/ppa>
19
 
    Final released versions and updates.
20
 
    Most users who want updates to bzr should add this.
21
 
 
22
 
<https://launchpad.net/~bzr/+archive/proposed>
23
 
    Proposed uploads to move into ~bzr, awaiting testing.
 
16
As of June 2008, there are three PPAs:
 
17
 
 
18
<https://launchpad.net/~bzr/+archive>
 
19
    Final released versions.
24
20
 
25
21
<https://launchpad.net/~bzr-beta-ppa/+archive>
26
 
    Beta releases.
 
22
    Releases and release candidates.
27
23
 
28
24
<https://launchpad.net/~bzr-nightly-ppa/+archive>
29
25
    Automatic nightly builds from trunk.
30
26
 
31
 
We build a distinct package for each distrorelease.  
 
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.  (As of May 2008, Edgy Eft is no longer supported.)
 
31
 
 
32
We build a distinct package for each distrorelease.  As of bzr 1.5, Dapper
 
33
uses ``python-support`` and later distributions use ``python-central``.
32
34
If you upload a release-specific version, you should add a suffix to the
33
35
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``.
34
36
 
35
 
Dapper uses the ``python-support`` framework and later distributions use
36
 
``python-central``.  This has little effect on everyday packaging but does
37
 
mean that some of the control files are quite different.
38
 
 
39
37
Every package is first uploaded into the beta ppa.  For final release
40
38
versions it is also copied to the main PPA.
41
39
 
42
40
The packaging information is kept in branches of bzr on Launchpad, named
43
41
like
44
 
<https://code.launchpad.net/~bzr/ubuntu/hardy/bzr/bzr-ppa>.
 
42
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.
45
43
or
46
 
<lp:~bzr/ubuntu/hardy/bzr/bzr-ppa>.  These branches are intended to be used
 
44
<lp:~bzr/bzr/packaging-hardy>.  These branches are intended to be used
47
45
with the ``bzr-builddeb`` plugin.
48
46
 
49
 
**You should almost always upload to the beta ppa first** and then either 
50
 
upload again or copy the packages into the release ppa.  That reduces the 
51
 
risk of breaking the main archive from which people get bzr updates.
52
 
 
53
 
 
54
 
Supported releases
55
 
------------------
56
 
 
57
 
We build packages for every supported Ubuntu release
58
 
<https://wiki.ubuntu.com/Releases>.  Packages need no longer be updated
59
 
when the release passes end-of-life because all users should
60
 
have upgraded by then.  
61
 
 
62
 
As of August 2010, the following releases are supported:
63
 
 
64
 
* Maverick 
65
 
* Lucid LTS
66
 
* Karmic
67
 
* Jaunty (support ends October 2010)
68
 
* Hardy LTS
69
 
* Dapper LTS (supported but no longer updated for new releases)
70
 
 
71
 
The ``rmadison bzr`` command will gives you an up-to-date summary
72
 
of which bzr releases are current in each Ubuntu release.
73
 
 
74
47
Preconditions
75
48
-------------
76
49
 
79
52
 
80
53
* You must have a GPG key registered to your Launchpad account.
81
54
 
82
 
On reasonably recent versions of Ubuntu you no longer need special dput
83
 
configuration, because you can just say ::
84
 
 
85
 
  dput ppa:bzr/proposed <source.changes
86
 
  
87
 
 
88
 
However, you may still want to add these lines to ``~/.dput.cf`` prevent 
89
 
inadvertently attempting to upload into Ubuntu or Debian, which will
90
 
give a somewhat unclear error::
 
55
* Configure ``dput`` to upload to our PPA with this section in your
 
56
  ``~/.dput.cf``::
 
57
 
 
58
    [bzr-beta-ppa]
 
59
    fqdn = ppa.launchpad.net
 
60
    method = ftp
 
61
    incoming = ~bzr-beta-ppa/ubuntu
 
62
    login = anonymous
 
63
    allow_unsigned_uploads = 0
 
64
 
 
65
    [bzr-ppa]
 
66
    fqdn = ppa.launchpad.net
 
67
    method = ftp
 
68
    incoming = ~bzr/ubuntu
 
69
    login = anonymous
 
70
    allow_unsigned_uploads = 0
 
71
 
 
72
  You may also want to add these lines to prevent inadvertently attempting
 
73
  to upload into Ubuntu or Debian, which will give a somewhat unclear
 
74
  error::
91
75
 
92
76
    [DEFAULT]
93
77
    default_host_main = notspecified
116
100
Packaging Bazaar
117
101
----------------
118
102
 
119
 
Overview of packaging with builddeb
120
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121
 
 
122
 
* First update the oldest supported branch, using ``bzr merge-upstream``.
123
 
 
124
 
* Run ``bzr builddeb -S -- -sa`` to build a source package, then put 
125
 
  that into the ppa.  
126
 
  
127
 
  (``-S`` says to make a source-only upload, which is
128
 
  required for Launchpad's builders.  ``--sa`` says to include the
129
 
  ``.orig.tgz`` even if this doesn't seem to be the first upload for an
130
 
  upstream release: this is often needed when rebuilding something that's
131
 
  previously been uploaded to Debian or Ubuntu or into a different PPA.)
132
 
 
133
 
* Now merge across that change into each supported branch with a 
134
 
  simple ``bzr merge``.
135
 
  
136
 
Locally testing using pbuilder
137
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
138
 
 
139
 
It may be useful to locally test builds inside pbuilder.  You may want to 
140
 
use the script from <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=255165> 
141
 
to wrap it, and to give it sensible defaults for your local machine.
142
 
 
143
 
Update all packages in proposed before copping the main ppa
144
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145
 
 
146
 
If one updates bzr, and there are plugins that are not compatible with the
147
 
new version of bzr, this can cause pain for users using the ppa. In order to
148
 
avoid this, we first get all packages up to date in the proposed ppa, and then
149
 
copy them to the main ppa.
150
 
 
151
 
 
152
103
Short form
153
104
~~~~~~~~~~
154
105
 
160
111
  export PACKAGE="bzr"
161
112
  export UBUNTU_RELEASES="dapper hardy intrepid jaunty karmic"
162
113
  ~/dev/bzr/bzr.dev/tools/packaging/update-packaging-branches.sh
163
 
  * Optionaly merge debian unstable. 
164
114
  ~/dev/bzr/bzr.dev/tools/packaging/update-changelogs.sh
165
115
  ~/dev/bzr/bzr.dev/tools/packaging/update-control.sh 1.16 1.17 1.18
166
116
  ~/dev/bzr/bzr.dev/tools/packaging/build-packages.sh
167
 
  dput ppa:bzr/proposed ${PACKAGE}_$VERSION*.changes
 
117
  dput bzr-beta-ppa ${PACKAGE}_$VERSION*.changes
168
118
 
169
119
Rinse and repeat for all the plugins by changing VERSION and PACKAGE.
170
120
 
206
156
 
207
157
#. Checkout (or update) the packaging branch for each supported release::
208
158
 
209
 
      bzr co lp:~bzr/ubuntu/hardy/bzr/bzr-ppa
 
159
      bzr co lp:~bzr/bzr/packaging-hardy
210
160
 
211
161
   There is a script available to help::
212
162
 
213
163
      tools/packaging/update-packaging-branches.sh
214
164
 
215
 
#. Optionaly, merge the Debian unstable branch into each of the packaging
216
 
   branches. You can find the Debian unstable branch here:
217
 
   http://bzr.debian.org/pkg-bazaar/
218
 
 
219
165
#. The ``bzr-builddeb`` step will download the original tarball if you do
220
166
   not already have it, putting it into a ``tarballs`` directory.
221
167
 
271
217
 
272
218
#. Build the source packages::
273
219
 
274
 
      cd bzr-$DISTRO; bzr builddeb -S
 
220
      cd packaging-$DISTRO; bzr builddeb -S
275
221
 
276
222
   This will create a ``.changes`` file.  If you didn't configure builddeb
277
223
   to automatically sign them, you can use ::
285
231
 
286
232
      tools/packaging/build-packages.sh
287
233
 
288
 
#. Upload into the PPA for each release::
289
 
 
290
 
     dput dput ppa:bzr/proposed bzr*1.17-1*.changes
 
234
#. Upload into the beta PPA for each release::
 
235
 
 
236
     dput bzr-beta-ppa bzr*1.17-1*.changes
 
237
 
 
238
#. For final release versions, also copy it into the ``~bzr`` PPA::
 
239
 
 
240
     dput bzr-ppa ../bzr_1.17-1\~bazaar1\~hardy1\_source.changes
 
241
 
 
242
   Alternatively, you can use Launchpad's "copy" feature to copy the
 
243
   packages between repositories.
291
244
 
292
245
#. You should soon get an "upload accepted" mail from Launchpad, which
293
246
   means that your package is waiting to be built.  You can then track its
329
282
summary of current package versions with::
330
283
 
331
284
  apt-cache madison bzr
332
 
  
333
 
  
334
 
Testing the contents of the PPA
335
 
-------------------------------
336
 
 
337
 
A somewhat crude but useful way to test the contents of the PPA is to
338
 
install the relevant packages into an schroot::
339
 
 
340
 
 schroot -c hardy-test -u root -- \
341
 
   apt-get install -o 'APT::Install-Suggests="true"' \
342
 
   -o 'APT::Install-Recommends="true"' \
343
 
   bzr
344
 
 
345
 
This should make sure everything can be installed; it won't guarantee that 
346
 
  
347
 
 
348
 
Packaging dependencies
349
 
----------------------
350
 
 
351
 
Some of our updates to bzr in previous releases require backports of our
352
 
dependencies.  Specific branches holding these backports:
353
 
 
354
 
 * ``lp:~bzr/ubuntu/dapper/configobj/dapper-backport``
355
285
 
356
286
 
357
287
..