~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/ppa.txt

  • Committer: Martin Pool
  • Date: 2010-07-16 15:20:17 UTC
  • mfrom: (5346.3.1 pathnotchild)
  • mto: This revision was merged to the branch mainline in revision 5351.
  • Revision ID: mbp@canonical.com-20100716152017-t4c73h9y1uoih7fb
PathNotChild should not give a traceback.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
  __ https://help.launchpad.net/PPAQuickStart
15
15
 
16
 
As of June 2008, there are three PPAs:
 
16
As of June 2010, there are three PPAs:
17
17
 
18
18
<https://launchpad.net/~bzr/+archive>
19
 
    Final released versions.
 
19
    Final released versions and updates.
20
20
 
21
21
<https://launchpad.net/~bzr-beta-ppa/+archive>
22
 
    Releases and release candidates.    
 
22
    Beta releases.
23
23
 
24
24
<https://launchpad.net/~bzr-nightly-ppa/+archive>
25
25
    Automatic nightly builds from trunk.
27
27
We build packages for every supported Ubuntu release
28
28
<https://wiki.ubuntu.com/Releases>.  Packages need no longer be updated
29
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.)
 
30
have upgraded by then.  
31
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
We build a distinct package for each distrorelease.  
34
33
If you upload a release-specific version, you should add a suffix to the
35
34
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``.
36
35
 
 
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.
 
39
 
37
40
Every package is first uploaded into the beta ppa.  For final release
38
41
versions it is also copied to the main PPA.
39
42
 
40
43
The packaging information is kept in branches of bzr on Launchpad, named
41
 
like 
 
44
like
42
45
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.
43
46
or
44
47
<lp:~bzr/bzr/packaging-hardy>.  These branches are intended to be used
45
48
with the ``bzr-builddeb`` plugin.
46
49
 
 
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.
 
53
 
47
54
Preconditions
48
55
-------------
49
 
  
50
 
* You must have a Launchpad account and be a member of the teams 
 
56
 
 
57
* You must have a Launchpad account and be a member of the teams
51
58
  that own these PPAs (``~bzr``, ``~bzr-beta-ppa``).
52
59
 
53
60
* You must have a GPG key registered to your Launchpad account.
54
61
 
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::
 
62
On reasonably recent versions of Ubuntu you no longer need special dput
 
63
configuration, because you can just say ::
 
64
 
 
65
  dput ppa:bzr/2.1-proposed <source.changes
 
66
  
 
67
 
 
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::
75
71
 
76
72
    [DEFAULT]
77
73
    default_host_main = notspecified
78
 
  
 
74
 
79
75
* Configure ``bzr-builddeb`` to sign the package, which is required for
80
76
  Launchpad to build it.  Put this in ``~/.bazaar/builddeb.conf`` ::
81
77
 
100
96
Packaging Bazaar
101
97
----------------
102
98
 
 
99
Overview of packaging with builddeb
 
100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
101
 
 
102
* First update the oldest supported branch, using ``bzr merge-upstream``.
 
103
 
 
104
* Run ``bzr builddeb -S -- -sa`` to build a source package, then put 
 
105
  that into the ppa.  
 
106
  
 
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.)
 
112
 
 
113
* Now merge across that change into each supported branch with a 
 
114
  simple ``bzr merge``.
 
115
  
 
116
Locally testing builds
 
117
~~~~~~~~~~~~~~~~~~~~~~
 
118
 
 
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> 
 
121
to wrap it.
 
122
 
 
123
 
103
124
Short form
104
125
~~~~~~~~~~
105
126
 
107
128
release packages is as simple as::
108
129
 
109
130
  cd ~/dev/bzr/releases/packaging
110
 
  ln ~/dev/bzr/releases/bzr-1.6.tar.gz ./bzr_1.6.orig.tar.gz
111
 
  export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"
 
131
  export VERSION="1.17~rc1-1~bazaar1"
 
132
  export PACKAGE="bzr"
 
133
  export UBUNTU_RELEASES="dapper hardy intrepid jaunty karmic"
112
134
  ~/dev/bzr/bzr.dev/tools/packaging/update-packaging-branches.sh
113
 
  ~/dev/bzr/bzr.dev/tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1
114
 
  ~/dev/bzr/bzr.dev/tools/packaging/build-packages
115
 
  dput bzr-beta-ppa bzr_1.6~beta3-1~bazaar1*.changes
 
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
 
139
 
 
140
Rinse and repeat for all the plugins by changing VERSION and PACKAGE.
116
141
 
117
142
Long Form
118
143
~~~~~~~~~
121
146
   release. Such as ``~/dev/bzr/releases/packaging/hardy``. In each of these
122
147
   branches, you will produce the package for the release.
123
148
 
 
149
   The scripts will also create the branches and produce packages for
 
150
   bzrtools and bzr-svn.
 
151
 
124
152
#. Decide on the final version number.  It should be of this form::
125
153
 
126
 
     bzr-1.6~beta3-1~bazaar1~hardy1
 
154
     bzr-1.17~rc1-1~bazaar1~hardy1
127
155
 
128
156
   **Note:** There are three hyphen-separated parts: the *package name*,
129
157
   the *upstream version*, and the *packaging version*.
130
158
 
131
159
   **Caution:** Upstream betas or release candidates must insert a tilde
132
160
   to make them sort before the final release, like this:
133
 
   ``bzr-1.6~beta3-1~bazaar1~hardy1``.
 
161
   ``bzr-1.17~rc1-1~bazaar1~hardy1``.
134
162
 
135
163
   Final releases will use a release string of the form:
136
 
   ``bzr-1.6-1~bazaar1~hardy1``
 
164
   ``bzr-1.17-1~bazaar1~hardy1``
 
165
 
 
166
   Set this base of this up as a usable environment variable::
 
167
 
 
168
      export VERSION="1.17~rc1-1~bazaar1"
137
169
 
138
170
#. Export the distroreleases that you will be packaging for::
139
171
 
140
 
      export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid jaunty"
 
172
      export UBUNTU_RELEASES="dapper hardy intrepid jaunty karmic"
 
173
 
 
174
#. Export the program you are packaging::
 
175
 
 
176
      export PACKAGE="bzr"
141
177
 
142
178
#. Checkout (or update) the packaging branch for each supported release::
143
179
 
155
191
 
156
192
   For bzrtools this is typically::
157
193
 
158
 
      Build-Depends-Indep: bzr (>= 1.6~), rsync
159
 
      Depends: ${python:Depends}, bzr (>= 1.6~), bzr (<< 1.7~), patch
 
194
      Build-Depends-Indep: bzr (>= 1.17~), rsync
 
195
      Depends: ${python:Depends}, bzr (>= 1.17~), bzr (<< 1.18~), patch
 
196
 
 
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::
 
199
 
 
200
    tools/packaging/update-control.sh
 
201
 
 
202
   You must supply the versions as arguments as follows
 
203
   OLD_VERSION CURRENT_VERSION NEXT_VERSION, such as::
 
204
 
 
205
    tools/packaging/update-control.sh 1.16 1.17 1.18
160
206
 
161
207
#. Make a new ``debian/changelog`` entry for the new release,
162
208
   either by using ``dch`` or just editing the file::
163
209
 
164
 
      dch -v '1.6~beta3-1~bazaar1~hardy1' -D hardy
 
210
      dch -v '1.17~rc1-1~bazaar1~hardy1' -D hardy
165
211
 
166
212
   dch will default to the distro you're working in and this isn't checked
167
 
   against the version number (which is just our convention), so make sure 
 
213
   against the version number (which is just our convention), so make sure
168
214
   to specify it.
169
215
 
170
216
   Make sure you have the correct email address for yourself (you may need
171
217
   export DEBEMAIL=`bzr whoami` if it isn't already set), version number, and
172
218
   distribution.  It should look something like this::
173
219
 
174
 
       bzr (1.6~beta3-1~bazaar1~hardy1) hardy; urgency=low
175
 
     
 
220
       bzr (1.17~rc1-1~bazaar1~hardy1) hardy; urgency=low
 
221
 
176
222
        * New upstream release.
177
 
     
 
223
 
178
224
       -- John Sample <sample@example.com>  Mon, 31 Mar 2008 12:36:27 +1100
179
225
 
180
226
   If you need to upload the package again to fix a problem, normally you
185
231
 
186
232
   You will also want to commit these changes into the packaging branch.
187
233
 
188
 
   There is a helper script which will update the changelog and commit it
 
234
   There is a helper script which will build all the packages
189
235
   for all of your ``$UBUNTU_RELEASES``. It is available as::
190
236
 
191
237
      tools/packaging/update-changelogs.sh
192
238
 
193
 
   You must supply the release string, such as::
194
 
 
195
 
      tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1
196
 
 
197
 
   It will automatically append the distro numbering on the end.
198
 
 
199
239
#. Build the source packages::
200
240
 
201
241
      cd packaging-$DISTRO; bzr builddeb -S
207
247
 
208
248
   where ``$UID`` is the gpg key you want to use to sign the changes.
209
249
 
 
250
   There is a helper script which will build the package
 
251
   for all of your ``$UBUNTU_RELEASES``. It is available as::
 
252
 
 
253
      tools/packaging/build-packages.sh
 
254
 
210
255
#. Upload into the beta PPA for each release::
211
256
 
212
 
     dput bzr-beta-ppa bzr_1.6-1*.changes
 
257
     dput bzr-beta-ppa bzr*1.17-1*.changes
213
258
 
214
259
#. For final release versions, also copy it into the ``~bzr`` PPA::
215
260
 
216
 
     dput bzr-ppa ../bzr_1.6-1\~bazaar1\~hardy1\_source.changes
 
261
     dput bzr-ppa ../bzr_1.17-1\~bazaar1\~hardy1\_source.changes
217
262
 
218
263
   Alternatively, you can use Launchpad's "copy" feature to copy the
219
264
   packages between repositories.
227
272
Packaging bzr-svn
228
273
~~~~~~~~~~~~~~~~~
229
274
 
230
 
bzr-svn uses a packaging branch that contains both the source 
 
275
bzr-svn uses a packaging branch that contains both the source
231
276
(including any changes against upstream) and the ``debian/`` directory.
232
277
 
233
278
To build bzr-svn:
234
279
 
235
280
#. Get a checkout of ``lp:~bzr/bzr-svn/hardy-ppa/``
236
281
 
237
 
#. Merge from ``http://bzr.debian.org/pkg-bazaar/bzr-svn/experimental/``
238
 
  
 
282
#. Merge from ``http://bzr.debian.org/pkg-bazaar/bzr-svn/unstable/``
 
283
 
239
284
   This should bring in both upstream and packaging changes for the new
240
285
   release, and it's updated as part of the bzr-svn release process.
241
286
 
 
287
   It's quite possible you will need to resolve some conflicts.
 
288
 
242
289
#. Run ``dch -v 0.4.15-1~bazaar1-hardy1 -D hardy`` or similar
243
290
 
244
291
#. Run ``bzr builddeb --source``
256
303
summary of current package versions with::
257
304
 
258
305
  apt-cache madison bzr
 
306
  
 
307
  
 
308
  
 
309
Packaging dependencies
 
310
----------------------
 
311
 
 
312
Some of our updates to bzr in previous releases require backports of our
 
313
dependencies.  Specific branches holding these backports:
 
314
 
 
315
 * ``lp:~bzr/ubuntu/dapper/configobj/dapper-backport``
259
316
 
260
317
 
261
318
..