~bzr-pqm/bzr/bzr.dev

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
Releasing Bazaar
================

This document describes the processes for making and announcing a Bazaar
release, and managing the release process.

We normally have one person acting as the release manager, who 
organizes development for the release and also actually makes the release
tarball and posts announcements.  It can be a different person from one
release to the next.

See also: `Bazaar Developer Document Catalog <index.html>`_.


.. contents::

General process
---------------

Our usual process is that one week before release we will make a release
branch from the trunk.  We do one commit to that branch to change the
version number to 'rc1', and advance the trunk version to 'dev' for the
next release.

We then publish and announce this release candidate according to the
process below.  We then have a week of general testing of the rc,
including some time for plugin authors to update their code for any
changes.

Normally no changes will be made on the release branch unless serious bugs
or regressions are found, and the release manager decides they should be
merged in.  After one week, the release branch's version number is updated
and it's published as the final release.  If regressions or serious
problems are discovered after the final release we may make an additional
point release from that branch.

The process or timing can vary if that seems appropriate in a particular
case but we try to release on a regular four week cycle.

The net effect is that the code gets some extra testing before release,
and the trunk is always open for general development.




Starting a Release
------------------

To start a new release cycle:

#. Send mail to the list with the key dates, who will be the release
   manager, and the main themes or targetted bugs.  Ask people to nominate
   objectives, or point out any high-risk things that are best done early,
   or that interact with other changes.

#. Add a new "series" in Launchpad at <https://launchpad.net/bzr/+addseries>.  There is one 
   series for every *x.y* release.


Weekly Metronome Mail
---------------------

Every week the release manager should send a mail to the Bazaar list
covering these points (as appropriate):

* Early communication about changing dependencies or defaults

* Reminder re lifecycle and where we're up to right now, in particular the 
  dates for the next release and/or candidate.

* Summary of recent successes and pending work.

* Reminder re release objectives

* Reminder re things needing attention, e.g. bug triage, reviews, testing of certain things, etc.


Preparing the tree for release
------------------------------

.. Was previously at http://bazaar-vcs.org/ReleaseChecklist

.. TODO: Still needs more clarity on what's in a RC versus a final
.. release?

This is the procedure for making a new bzr release:

#. If the release is the first candidate, make a new branch in PQM. 
   (Contact Robert Collins for this step).

   Register the branch at https://launchpad.net/products/bzr/+addbranch

#. Make a local branch for preparing this release.  (Only for the first 
   release in a series, otherwise you should already have a branch.) ::

     bzr branch trunk prepare-1.6

#. Configure pqm-submit for this branch, with a section like this in
   ``~/.bazaar/locations.conf``::

	[/home/mbp/bzr/prepare-1.4]
	pqm_email = Canonical PQM <pqm@bazaar-vcs.org>
	submit_branch = http://bazaar-vcs.org/bzr/bzr.1.4
	submit_to = bazaar@lists.canonical.com

#. In the release branch, update  ``version_info`` in
   ``./bzrlib/__init__.py``.  
   (This must match ``_script_version`` in the ``bzr`` script, but 
   that is updated at the start of the release cycle, and
   doesn't need to say if it's an rc or final release.)

   Run this command and check the output::

     ./bzr --version

#. Add the date and release number to ``./NEWS``, and a one-paragraph
   summary of changes in this release.

#. Commit these changes to the release branch, using a command like::
    
     bzr commit -m "Release 0.12rc1." 
   
   The diff before you commit will be something like::

       === modified file 'NEWS'
       --- NEWS        2006-10-23 13:11:17 +0000
       +++ NEWS        2006-10-23 22:50:50 +0000
       @@ -1,4 +1,4 @@
       -IN DEVELOPMENT
       +bzr 0.12rc1  2006-10-23

          IMPROVEMENTS:


       === modified file 'bzrlib/__init__.py'
       --- bzrlib/__init__.py  2006-10-16 01:47:43 +0000
       +++ bzrlib/__init__.py  2006-10-23 22:49:46 +0000
       @@ -35,7 +35,7 @@
        # Python version 2.0 is (2, 0, 0, 'final', 0)."  Additionally we use a
        # releaselevel of 'dev' for unreleased under-development code.

       -version_info = (0, 12, 0, 'dev', 0)
       +version_info = (0, 12, 0, 'candidate', 1)

        if version_info[3] == 'final':
            version_string = '%d.%d.%d' % version_info[:3]

#. Submit those changes to PQM for merge into the appropriate release
   branch::
 
     bzr push
     bzr pqm-submit -m "(mbp) prepare 1.6"

#. When PQM succeeds, pull down the master release branch.


Making the source tarball
-------------------------

#. Change into the source directory and run ::
  
     make dist

#. Now we'll try expanding this tarball and running the test suite
   to check for packaging problems::
 
     make check-dist-tarball


Publishing the release
----------------------

Now you have the releasable product.  The next step is making it
available to the world.

#. In <https://launchpad.net/bzr/> click the "Release series" for this
   series, to take you to e.g. <https://launchpad.net/bzr/1.1>.  Then
   click "Register a release", and add information about this release.

#. Within that release, upload the source tarball and the GPG signature.

#. Link from http://bazaar-vcs.org/Download to the tarball and signature.

#. Update http://doc.bazaar-vcs.org/ to have a directory of documentation
   for this release.  (Controlled by the ``update-bzr-docs`` script on
   escudero, and also update the ``latest`` symlink in
   ``/srv/bazaar.canonical.com/doc/``.)

#. Announce on the `Bazaar home page`__.
   
 __ http://bazaar-vcs.org/


Announcing the release
----------------------

Now that the release is publicly available, tell people about it.

#. Announce to ``bazaar-announce`` and ``bazaar`` mailing lists. 
   The announce mail will look something like this:
   
    | Subject: bzr 0.11 release candidate 1
    | 
    | INTRO HERE. Mention the release number and date, and why the release. (i.e. release candidate for testing, final release of a version, backport/bugfix etc).
    | 
    | Tarballs:
    | http://bazaar-vcs.org/releases/src/bzr-VERSION.tar.gz
    | and GPG signature:
    | http://bazaar-vcs.org/releases/src/bzr-VERSION.tar.gz.sig
    | 
    | DESCRIBE-CHANGES-IN-OVERVIEW-HERE
    | 
    | DESCRIBE-when the next release will be (if there is another - i.e. this is a release candidate)
    | 
    | Many thanks to all the contributors to this release! I've included the
    | contents of NEWS for VERSION below:

   To generate the data from NEWS, just copy and paste the relevant news section and clean it up as appropriate. The main clean-up task is to confirm that all major changes are indeed covered. This can be done by running ``bzr log`` back to the point when the branch was opened and cross checking the changes against the NEWS entries.

   (RC announcements should remind plugin maintainers to update their plugins.)

     * For point releases (i.e. a release candidate, or an incremental fix
       to a released version) take everything in the relevant NEWS section.  For
       example, for 0.11rc2 take everything in NEWS from the bzr 0.11rc2 line to the bzr 0.11rc1 line further down.

     * For major releases (i.e. 0.11, 0.12 etc), take all the combined NEWS sections from within that version: for 0.11 take all of the 0.11 specific section, plus 0.11rc2, plus 0.11rc1 etc.

#. Update the IRC channel topic. Use the ``/topic`` command to do this, ensuring the new topic text keeps the project name, web site link, etc.

#. Announce on http://freshmeat.net/projects/bzr/
   
   This should be done for both release candidates and final releases. If you do not have a Freshmeat account yet, ask one of the existing admins.

#. Update http://en.wikipedia.org/wiki/Bzr -- this should be done for final releases but not for Release Candidates.

#. Package maintainers should update packages when they see the
   announcement.

#. For final releases, also send the announcement mail to
   info-gnu@gnu.org and python-announce-list@python.org.

#. Also send a GNU directory update to bug-directory@gnu.org.

#. Update the python package index: <http://pypi.python.org/pypi/bzr> - best
   done by running ::

       python setup.py register

   Remember to check the results afterwards.

   To be able to register the release you must create an account on
   <http://pypi.python.org/pypi> and have one of the existing owners of
   the project add you to the group.


Merging the released code back to trunk
---------------------------------------

Merge the release branch back into the trunk.  Check that changes in NEWS
were merged into the right sections.  If it's not already done, advance
the version number in ``bzr`` and ``bzrlib/__init__.py``.  Submit this
back into pqm for bzr.dev.


Updating the PPA for a new release
----------------------------------

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.

  __ https://help.launchpad.net/PPAQuickStart

As of June 2008, there are actually two PPAs:

<https://launchpad.net/~bzr/+archive>
    Final released versions.

<https://launchpad.net/~bzr-beta-ppa/+archive>
    Releases and release candidates.    

We build packages for every supported Ubuntu release
<https://wiki.ubuntu.com/Releases>.  Packages need no longer be updated
when the release passes end-of-life because all users should
updated by then.  (As of May 2009, Edgy Eft is no longer supported.)

The ``debian/`` directory containing the packaging information is kept in
branches on Launchpad, named like 
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.

Preconditions for building these packages:
  
* You must have a Launchpad account and be a member of the `~bzr`__ team
  
__ https://edge.launchpad.net/~bzr/+members>

* You must have a GPG key registered to your Launchpad account.

* Configure ``dput`` to upload to our PPA with this section in your
  ``~/.dput.cf``::

    [bzr-beta-ppa]
    fqdn = ppa.launchpad.net
    method = ftp
    incoming = ~bzr-beta-ppa/ubuntu
    login = anonymous
    allow_unsigned_uploads = 0

    [bzr-ppa]
    fqdn = ppa.launchpad.net
    method = ftp
    incoming = ~bzr/ubuntu
    login = anonymous
    allow_unsigned_uploads = 0

  You may also want to add these lines to prevent inadvertently attempting
  to upload into Ubuntu or Debian, which will give a somewhat unclear
  error::

    [DEFAULT]
    default_host_main = notspecified
  
    [notspecified]
    fqdn = SPECIFY.A.PPA.NAME 

* You need a Ubuntu (or probably Debian) machine, and ::

    sudo apt-get install build-essential devscripts dput quilt patch

Here is the process; there are some steps which should be automated in
future:

#. You will need a working directory for each supported release, such as
   ``~/bzr/Packaging/hardy``

#. Download the official tarball of the release to e.g. ``~/bzr/Releases``

#. Copy the original tarball into your per-disto directory, then untar
   it::

     cp -l ~/bzr/Releases/bzr-1.3.tar.gz bzr_1.3.orig.tar.gz
     tar xfvz bzr_1.3.orig.tar.gz

   The bzrtools extracted directory does not contain a version number
   and must be renamed::

     mv bzrtools bzrtools-1.3.0

#. Change into that directory and check out the packaging branch::

     cd bzr
     bzr checkout \
       bzr+ssh://bazaar.launchpad.net/~bzr/bzr/packaging-hardy \
       debian

#. 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.3~), rsync
      Depends: ${python:Depends}, bzr (>= 1.3~), bzr (<< 1.4~), patch

#. Make a new ``debian/changelog`` entry for the new release,
   either by using ``dch`` or just editing the file::

     dch -v '1.3-1~bazaar1' -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 conversion), so make sure 
   to specify it.

   **Caution:** Release candidates must insert a tilde to make them sort 
   before the final release, like this: ``bzr-1.4~rc2-1~bazaar1``.

   Make sure you have the correct email address for yourself, version
   number, and distribution.  It should look something like this::

       bzr (1.3-1~bazaar1) hardy; urgency=low
     
        * New upstream release.
     
       -- John Sample <sample@example.com>  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.

#. Commit these changes into the packaging branch::

     bzr ci -m '1.3-1~bazaar1: New upstream release.' debian

#. Build a source package::

     debuild -S -sa -i -D

   This will create a ``.changes`` file in the per-distro directory,
   and should invoke gpg to sign it with your key.
   Check that file is reasonable: it should be uploading to the intended
   distribution, have a .orig file included, and the right version number.

#. Upload into the appropriate PPA, either ``bzr-ppa`` or
   ``bzr-beta-ppa``::

     dput bzr-ppa ../bzr__1.3-1\~bazaar1\_source.changes

#. Copy the uploaded package over to other Ubuntu releases, taking advantage 
   of Launchpad's Copy Package feature <https://launchpad.net/~bzr/+archive/+copy-packages>

   **Note:** The packaging dependencies may vary between different distro series.
   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 ~release1 to
   the package version, for example:: bzr.1.3-1~bazaar1~dapper1

#. 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 <https://launchpad.net/~bzr/+archive> and
   <https://launchpad.net/~bzr/+archive/+builds>.

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

..
   vim: filetype=rst textwidth=74 ai shiftwidth=4