/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
1
Managing the Bazaar PPA
2
=======================
3
4
See also: `Bazaar Developer Document Catalog <index.html>`_.
5
6
7
Background
8
----------
9
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
14
  __ https://help.launchpad.net/PPAQuickStart
15
16
As of June 2008, there are two PPAs:
17
18
<https://launchpad.net/~bzr/+archive>
19
    Final released versions.
20
21
<https://launchpad.net/~bzr-beta-ppa/+archive>
22
    Releases and release candidates.    
23
24
We build packages for every supported Ubuntu release
25
<https://wiki.ubuntu.com/Releases>.  Packages need no longer be updated
26
when the release passes end-of-life because all users should
27
have upgraded by then.  (As of May 2008, Edgy Eft is no longer supported.)
28
29
We build a distinct package for each distrorelease that has
30
different packaging requirements.  As of bzr 1.5, Dapper uses
31
``python-support`` and later distributions use ``python-central``, so we
32
build one version for dapper and one version for everything else.  If you
33
upload a release-specific version, you should add a suffix to the
34
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``.
35
36
Every package is first uploaded into one distroversion of the beta ppa.
37
It can then be copied to other compatible distroversions.  For final
38
release versions it is also copied to the main PPA.
39
40
The ``debian/`` directory containing the packaging information is kept in
41
branches on Launchpad, named like 
42
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.
43
44
Preconditions
45
-------------
46
  
47
* You must have a Launchpad account and be a member of the teams 
48
  that own these PPAs (``~bzr``, ``~bzr-beta-ppa``).
49
50
* You must have a GPG key registered to your Launchpad account.
51
52
* Configure ``dput`` to upload to our PPA with this section in your
53
  ``~/.dput.cf``::
54
55
    [bzr-beta-ppa]
56
    fqdn = ppa.launchpad.net
57
    method = ftp
58
    incoming = ~bzr-beta-ppa/ubuntu
59
    login = anonymous
60
    allow_unsigned_uploads = 0
61
62
    [bzr-ppa]
63
    fqdn = ppa.launchpad.net
64
    method = ftp
65
    incoming = ~bzr/ubuntu
66
    login = anonymous
67
    allow_unsigned_uploads = 0
68
69
  You may also want to add these lines to prevent inadvertently attempting
70
  to upload into Ubuntu or Debian, which will give a somewhat unclear
71
  error::
72
73
    [DEFAULT]
74
    default_host_main = notspecified
75
  
76
    [notspecified]
77
    fqdn = SPECIFY.A.PPA.NAME 
78
79
* You need a Ubuntu (or probably Debian) machine, and ::
80
81
    sudo apt-get install build-essential devscripts dput quilt patch
82
83
Packaging Bazaar
84
----------------
85
86
#. You will need a working directory for each supported release, such as
87
   ``~/bzr/Packaging/hardy``
88
89
#. Download the official tarball of the release to e.g. ``~/bzr/Releases``
90
   if you don't already have it.
91
92
#. Decide on the final version number.  It should be of this form::
93
94
     bzr-1.6~beta3-1~bazaar1
95
96
   There are three hyphen-separated parts: the *package name*, the *upstream
97
   version*, and the *packaging version*.
98
99
   **Caution:** Upstream betas or release candidates must insert a tilde
100
   to make them sort before the final release, like this:
101
   ``bzr-1.4~rc2-1~bazaar1``.
102
103
#. Copy or hardlink the original tarball into your per-disto directory, under an 
104
   appropriate name ending in ``.orig.tar.gz``.  Untar it.  The extracted
105
   source directory and ``.orig`` file must match the version number you
106
   calculated above.  For example::
107
108
     cp -l ~/bzr/Releases/bzr-1.6b3.tar.gz bzr_1.6~beta3.orig.tar.gz
109
     tar xfvz bzr_1.6~beta3.orig.tar.gz
110
     mv bzr-1.6b3 bzr-1.6~beta3
111
112
#. Change into that directory and check out the packaging branch::
113
114
     cd bzr-1.6~beta3
115
     bzr checkout \
116
       bzr+ssh://bazaar.launchpad.net/~bzr/bzr/packaging-hardy \
117
       debian
118
119
#. For Bazaar plugins, change the ``debian/control`` file to express a
120
   dependency on the correct version of ``bzr``.
121
122
   For bzrtools this is typically::
123
124
      Build-Depends-Indep: bzr (>= 1.3~), rsync
125
      Depends: ${python:Depends}, bzr (>= 1.3~), bzr (<< 1.4~), patch
126
127
#. Make a new ``debian/changelog`` entry for the new release,
128
   either by using ``dch`` or just editing the file::
129
130
     dch -v '1.3-1~bazaar1' -D hardy
131
132
   dch will default to the distro you're working in and this isn't checked
133
   against the version number (which is just our conversion), so make sure 
134
   to specify it.
135
136
   Make sure you have the correct email address for yourself, version
137
   number, and distribution.  It should look something like this::
138
139
       bzr (1.3-1~bazaar1) hardy; urgency=low
140
     
141
        * New upstream release.
142
     
143
       -- John Sample <sample@example.com>  Mon, 31 Mar 2008 12:36:27 +1100
144
145
   If you need to upload the package again to fix a problem, normally you
146
   should increment the last number in the version number, following the
147
   distro name.  Make sure not to omit the initial ``-1``, and make sure
148
   that the distro name in the version is consistent with the target name
149
   outside the parenthesis.
150
151
#. Commit these changes into the packaging branch::
152
153
     bzr ci -m '1.3-1~bazaar1: New upstream release.' debian
154
155
#. Build a source package::
156
157
     debuild -S -sa -i -D
158
159
   This will create a ``.changes`` file in the per-distro directory,
160
   and should invoke gpg to sign it with your key.
161
   Check that file is reasonable: it should be uploading to the intended
162
   distribution, have a .orig file included, and the right version number.
163
164
#. Upload into the beta PPA::
165
166
     dput bzr-beta-ppa ../bzr__1.3-1\~bazaar1\_source.changes
167
168
#. Copy the uploaded package over to other Ubuntu releases, taking advantage 
169
   of Launchpad's Copy Package feature 
170
   <https://launchpad.net/~bzr-beta-ppa/+archive/+copy-packages>
171
172
#. For final release versions, also copy it into the ``~bzr`` PPA.
173
174
#. You should soon get an "upload accepted" mail from Launchpad, which
175
   means that your package is waiting to be built.  You can then track its
176
   progress in <https://launchpad.net/~bzr-beta-ppa/+archive> and
177
   <https://launchpad.net/~bzr-beta-ppa/+archive/+builds>.
178
179
180
Monitoring the contents of PPAs
181
-------------------------------
182
183
If you add all the bzr PPAs to your ``sources.list`` then you can see a
184
summary of current package versions with::
185
186
  apt-cache madison bzr
187
188
189
..
190
   vim: filetype=rst textwidth=74 ai shiftwidth=4