~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/releasing.txt

  • Committer: Martin Pool
  • Date: 2008-05-02 02:05:46 UTC
  • mto: (3408.1.1 doc)
  • mto: This revision was merged to the branch mainline in revision 3409.
  • Revision ID: mbp@sourcefrog.net-20080502020546-a7aldjqc74r23kju
Separate out and update the release manager instructions

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Releasing Bazaar
 
2
================
 
3
 
 
4
This document describes the processes for making and announcing a Bazaar
 
5
release, and managing the release process.
 
6
 
 
7
See also: `Bazaar Developer Document Catalog <index.html>`_.
 
8
 
 
9
 
 
10
.. contents::
 
11
 
 
12
 
 
13
Starting a Release
 
14
------------------
 
15
 
 
16
To start a new release cycle:
 
17
 
 
18
#. Send mail to the list with the key dates, who will be the release
 
19
   manager, and the main themes or targetted bugs.  Ask people to nominate
 
20
   objectives, or point out an high-risk things that are best done early,
 
21
   or that interact with other changes.
 
22
 
 
23
#. Add a new "series" in Launchpad at <https://launchpad.net/bzr/+addseries>.  There is one 
 
24
   series for every *x.y* release.
 
25
 
 
26
Weekly Status Updates
 
27
---------------------
 
28
 
 
29
TODO: Things to cover:
 
30
 
 
31
* Early communication to downstream teams (e.g. Launchpad) about changes in dependencies.
 
32
* Reminder re lifecycle and where we're up to right now
 
33
* Summary of recent successes and pending work
 
34
* Reminder re release objectives
 
35
* Reminder re things needing attention, e.g. bug triage, reviews, testing of certain things, etc.
 
36
 
 
37
 
 
38
Feature Freeze
 
39
--------------
 
40
 
 
41
TODO: Get material from http://bazaar-vcs.org/FeatureFreeze.
 
42
 
 
43
 
 
44
 
 
45
Making a Release or Release Candidate
 
46
-------------------------------------
 
47
 
 
48
.. Was previously at http://bazaar-vcs.org/ReleaseChecklist
 
49
 
 
50
.. TODO: Still needs more clarity on what's in a RC versus a final
 
51
.. release?
 
52
 
 
53
.. TODO: Too much of this is manual but could be automated...
 
54
 
 
55
This is the procedure for making a new bzr release:
 
56
 
 
57
#. If the release is the first candidate, make a new branch in PQM. (Contact RobertCollins for this step).
 
58
 
 
59
   Register the branch at https://launchpad.net/products/bzr/+addbranch
 
60
 
 
61
#. Run the automatic test suite and any non-automated tests.  (For example, try a download over http; these should eventually be scripted though not automatically run.). Try to have all optional dependencies installed so that there are no tests skipped. Also make sure that you have the c extensions compiled (``make`` or ``python setup.py build_ext -i``).
 
62
 
 
63
#. In the release branch, update  ``version_info`` in ``./bzrlib/__init__.py``
 
64
 
 
65
#. Add the date and release number to ``./NEWS``.
 
66
 
 
67
#. Update the release number in the README. (It's not there as of 0.15, but please check).
 
68
 
 
69
#. Commit these changes to the release branch, using a command like::
 
70
    
 
71
     bzr commit -m "(jam) Release 0.12rc1." 
 
72
   
 
73
   The diff before you commit will be something like::
 
74
 
 
75
       === modified file 'NEWS'
 
76
       --- NEWS        2006-10-23 13:11:17 +0000
 
77
       +++ NEWS        2006-10-23 22:50:50 +0000
 
78
       @@ -1,4 +1,4 @@
 
79
       -IN DEVELOPMENT
 
80
       +bzr 0.12rc1  2006-10-23
 
81
 
 
82
          IMPROVEMENTS:
 
83
 
 
84
 
 
85
       === modified file 'bzrlib/__init__.py'
 
86
       --- bzrlib/__init__.py  2006-10-16 01:47:43 +0000
 
87
       +++ bzrlib/__init__.py  2006-10-23 22:49:46 +0000
 
88
       @@ -35,7 +35,7 @@
 
89
        # Python version 2.0 is (2, 0, 0, 'final', 0)."  Additionally we use a
 
90
        # releaselevel of 'dev' for unreleased under-development code.
 
91
 
 
92
       -version_info = (0, 12, 0, 'dev', 0)
 
93
       +version_info = (0, 12, 0, 'candidate', 1)
 
94
 
 
95
        if version_info[3] == 'final':
 
96
            version_string = '%d.%d.%d' % version_info[:3]
 
97
 
 
98
#. Send the changes to PQM, to update the official master branch.
 
99
 
 
100
#. When PQM succeeds, pull down the master release branch.
 
101
 
 
102
#. 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.
 
103
 
 
104
#. Make a distribution directory by running e.g. ``bzr export /tmp/bzr-<version>/`` in the working directory.
 
105
 
 
106
#. Run make in /tmp/bzr-<version>. This creates the extensions from the pyrex source.
 
107
 
 
108
#. Run the test suite in the distribution directory
 
109
 
 
110
#. Run ``setup.py install`` --root=prefix to do a test install into your system directory, home directory, or some other prefix.  Check the install worked and that the installed version is usable. (run the bzr script from the installed path with PYTHONPATH set to the site-packages directory it created). i.e. ::
 
111
 
 
112
    python setup.py install --root=installed
 
113
    PYTHONPATH=installed/usr/lib/python2.4/site-packages installed/usr/bin/bzr
 
114
 
 
115
#. Clean the tree to get rid of .pyc files etc: make clean && rm -rf build && rm bzrlib/_*.c bzrlib/_*.so
 
116
 
 
117
#. Generate the reference documentation in text format: make doc/en/user-reference/bzr_man.txt.
 
118
 
 
119
#. Change back to your original branch and then run: make clean && make to create the compiled pyrex extensions.  You then need to copy the .c files over to the exported directory. 
 
120
   
 
121
   ``find . -name "*.c"`` will tell you which files you need.
 
122
 
 
123
#. Create the release tarball::
 
124
   
 
125
     cd /tmp && tar czf bzr-<version>.tar.gz bzr-<version>
 
126
 
 
127
#. Sign the tarball with e.g. ``gpg --detach-sign -a bzr-0.10rc1.tar.gz``
 
128
 
 
129
 
 
130
Publishing the release
 
131
----------------------
 
132
 
 
133
Now you have the releasable product.  The next step is making it
 
134
available to the world.
 
135
 
 
136
#. In <https://launchpad.net/bzr/> click the "Release series" for this
 
137
   series, to take you to e.g. <https://launchpad.net/bzr/1.1>.  Then
 
138
   click "Register a release", and add information about this release.
 
139
 
 
140
#. Within that release, upload the source tarball and the GPG signature.
 
141
 
 
142
   (These used to also be uploaded to 
 
143
   <sftp://escudero.ubuntu.com/srv/bazaar.canonical.com/www/releases/src>
 
144
   but that's not accessible to all developers, and gets some mime types
 
145
   wrong...)
 
146
 
 
147
#. Link from http://bazaar-vcs.org/Download to the tarball and signature.
 
148
 
 
149
#. Update http://doc.bazaar-vcs.org/ to have a directory of documentation
 
150
   for this release.  (Controlled by the ``update-bzr-docs`` script on
 
151
   escudero, and also update the ``latest`` symlink in
 
152
   ``/srv/bazaar.canonical.com/doc/``.)
 
153
 
 
154
#. Announce on the `Bazaar home page`__
 
155
   
 
156
 __ http://bazaar-vcs.org/
 
157
 
 
158
 
 
159
Announcing the release
 
160
----------------------
 
161
 
 
162
Now that the release is publicly available, tell people about it.
 
163
 
 
164
#. Announce to ``bazaar-announce`` and ``bazaar`` mailing lists. 
 
165
   The announce mail will look something like this:
 
166
   
 
167
    | Subject: bzr 0.11 release candidate 1
 
168
    | 
 
169
    | 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).
 
170
    | 
 
171
    | Tarballs:
 
172
    | http://bazaar-vcs.org/releases/src/bzr-VERSION.tar.gz
 
173
    | and GPG signature:
 
174
    | http://bazaar-vcs.org/releases/src/bzr-VERSION.tar.gz.sig
 
175
    | 
 
176
    | DESCRIBE-CHANGES-IN-OVERVIEW-HERE
 
177
    | 
 
178
    | DESCRIBE-when the next release will be (if there is another - i.e. this is a release candidate)
 
179
    | 
 
180
    | Many thanks to all the contributors to this release! I've included the
 
181
    | contents of NEWS for VERSION below:
 
182
 
 
183
   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.
 
184
 
 
185
   (RC announcements should remind plugin maintainers to update their plugins.)
 
186
 
 
187
     * For point releases (i.e. a release candidate, or an incremental fix to a released version) take everything in the relevant NEWS secion : for 0.11rc2 take everything in NEWS from the bzr 0.11rc2 line to the bzr 0.11rc1 line further down.
 
188
 
 
189
     * 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.
 
190
 
 
191
#. Update the `news side menu`__ -- this currently requires downloading the file, editing it, deleting it, and uploading a replacement.
 
192
 
 
193
   __ http://bazaar-vcs.org/site/menu?action=AttachFile&do=view&target=news.html
 
194
 
 
195
#. 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.
 
196
 
 
197
#. Announce on http://freshmeat.net/projects/bzr/
 
198
   
 
199
   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.
 
200
 
 
201
#. Update http://en.wikipedia.org/wiki/Bzr -- this should be done for final releases but not Release Candidates.
 
202
 
 
203
#. Package maintainers should update packages when they see the
 
204
   announcement.
 
205
 
 
206
#. Blog about it.
 
207
 
 
208
#. Post to http://mail.python.org/mailman/listinfo/python-announce-list for major releases
 
209
 
 
210
#. Update the python package index: <http://pypi.python.org/pypi/bzr> - best
 
211
   done by running ::
 
212
 
 
213
       python setup.py register
 
214
 
 
215
   Remember to check the results afterwards.
 
216
 
 
217
 
 
218
The Bazaar PPA archive
 
219
----------------------
 
220
 
 
221
We build Ubuntu ``.deb`` packages for Bazaar as an important part of the release
 
222
process.  These packages are hosted in a `Personal Package Archive (PPA)`__ on
 
223
Launchpad, at <https://launchpad.net/~bzr/+archive>.
 
224
 
 
225
  __ https://help.launchpad.net/PPAQuickStart
 
226
 
 
227
We build packages for every supported Ubuntu release
 
228
<https://wiki.ubuntu.com/Releases>.  Packages need no longer be updated
 
229
when the release passes end-of-life because all users should have then
 
230
update.
 
231
 
 
232
The ``debian/`` directory containing the packaging information is kept in
 
233
branches on Launchpad, named like 
 
234
<https://code.launchpad.net/~bzr/bzrtools/packaging-dapper>
 
235
 
 
236
Updating the PPA for a new release
 
237
----------------------------------
 
238
 
 
239
Preconditions for building these packages:
 
240
  
 
241
* You must have a Launchpad account and be a member of the `~bzr`__ team
 
242
  
 
243
__ https://edge.launchpad.net/~bzr/+members>
 
244
 
 
245
* You must have a GPG key registered to your Launchpad account.
 
246
 
 
247
* Configure ``dput`` to upload to our PPA with this section in your
 
248
  ``~/.dput.cf``::
 
249
 
 
250
    [bzr-ppa]
 
251
    fqdn = ppa.launchpad.net
 
252
    method = ftp
 
253
    incoming = ~bzr/ubuntu
 
254
    login = anonymous
 
255
    allow_unsigned_uploads = 0
 
256
 
 
257
* You need a Ubuntu (or probably Debian) machine, and ::
 
258
 
 
259
    sudo apt-get install build-essential devscripts dput
 
260
 
 
261
Here is the process; there are some steps which should be automated in
 
262
future:
 
263
 
 
264
#. You will need a working directory for each supported release, such as
 
265
   ``~/bzr/Packaging/dapper``
 
266
 
 
267
#. Download the official tarball of the release to e.g. ``~/bzr/Releases``
 
268
 
 
269
#. Copy the original tarball into your per-disto directory, then untar it 
 
270
   and if necessary rename it::
 
271
 
 
272
     cp -l ~/bzr/Releases/bzrtools-1.3.0.tar.gz bzrtools_1.3.0.orig.tar.gz
 
273
     tar xfvz bzrtools_1.3.0.orig.tar.gz
 
274
     mv bzrtools bzrtools-1.3.0
 
275
 
 
276
#. Change into that directory and check out the packaging branch::
 
277
 
 
278
     cd bzrtools
 
279
     bzr checkout \
 
280
       bzr+ssh://bazaar.launchpad.net/~bzr/bzrtools/packaging-dapper \
 
281
       debian
 
282
 
 
283
#. For Bazaar plugins, change the ``debian/control`` file to express a
 
284
   dependency on the correct version of ``bzr``.
 
285
 
 
286
   For bzrtools this is typically::
 
287
 
 
288
      Build-Depends-Indep: bzr (>= 1.3~), rsync
 
289
      Depends: ${python:Depends}, bzr (>= 1.3~), bzr (<< 1.4~), patch
 
290
 
 
291
#. Make a new ``debian/changelog`` entry for the new release,
 
292
   either by using ``dch`` or just editing the file::
 
293
 
 
294
     dch -v '1.3.0-1~bazaar1~dapper1' -D dapper
 
295
 
 
296
   dch will default to the distro you're working in and this isn't checked
 
297
   against the version number (which is just our conversion), so make sure 
 
298
   to specify it.
 
299
 
 
300
   **Caution:** Release candidates must insert a tilde to make them sort before the
 
301
   final release, like this: ``bzr-1.4~rc2-1~bazaar1~dapper1``.
 
302
 
 
303
   Make sure you have the correct email address for yourself, version
 
304
   number, and distribution.  It should look something like this::
 
305
 
 
306
       bzrtools (1.3.0-1~bazaar1~dapper1) dapper; urgency=low
 
307
     
 
308
        * New upstream release.
 
309
     
 
310
       -- John Sample <sample@example.com>  Mon, 31 Mar 2008 12:36:27 +1100
 
311
 
 
312
   If you need to upload the package again to fix a problem, normally you
 
313
   should increment the last number in the version number, following the
 
314
   distro name.  Make sure not to omit the initial ``-1``, and make sure
 
315
   that the distro name in the version is consistent with the target name
 
316
   outside the parenthesis.
 
317
 
 
318
#. Commit these changes into the packaging branch::
 
319
 
 
320
     bzr ci -m '1.3.0-1~bazaar1~dapper1: New upstream release.' debian
 
321
 
 
322
#. Build a source package::
 
323
 
 
324
     debuild -S -sa -i
 
325
 
 
326
   This will create a ``.changes`` file in the per-distro directory,
 
327
   and should invoke gpg to sign it with your key.
 
328
   Check that file is reasonable: it should be uploading to the intended
 
329
   distribution, have a .orig file included, and the right version number.
 
330
 
 
331
#. Upload into the PPA::
 
332
 
 
333
     dput bzr-ppa ../bzrtools__1.3.0-1\~bazaar1\~dapper1_source.changes
 
334
 
 
335
   Don't forget the ``bzr-ppa`` component or dput will try to upload into
 
336
   the main archive by default.  You can disable this by adding this
 
337
   section to your ``.dput.cf``::
 
338
 
 
339
     [ubuntu]
 
340
     fqdn = SPECIFY.A.PPA.NAME
 
341
 
 
342
#. You should soon get an "upload accepted" mail from Launchpad, which
 
343
   means that your package is waiting to be built.  You can then track its
 
344
   progress in <https://launchpad.net/~bzr/+archive> and
 
345
   <https://launchpad.net/~bzr/+archive/+builds>.
 
346
 
 
347