/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
* You need a Ubuntu (or probably Debian) machine, and ::
77
78
    sudo apt-get install build-essential devscripts dput quilt patch
79
80
Packaging Bazaar
81
----------------
82
83
#. You will need a working directory for each supported release, such as
84
   ``~/bzr/Packaging/hardy``
85
86
#. Download the official tarball of the release to e.g. ``~/bzr/Releases``
87
   if you don't already have it.
88
89
#. Decide on the final version number.  It should be of this form::
90
3641.4.4 by Martin Albisetti
Meh
91
     bzr-1.6~beta3-1~bazaar1~hardy1
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
92
93
   There are three hyphen-separated parts: the *package name*, the *upstream
94
   version*, and the *packaging version*.
95
96
   **Caution:** Upstream betas or release candidates must insert a tilde
97
   to make them sort before the final release, like this:
3641.4.4 by Martin Albisetti
Meh
98
   ``bzr-1.6~beta3-1~bazaar1~hardy1``.
3641.4.2 by Martin Albisetti
More fixes to address jam's comments. Made all bzr versions in the examples the same.
99
100
#. Create a directory per release::
101
102
     mkdir ~/bzr/Releases/hardy
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
103
104
#. Copy or hardlink the original tarball into your per-disto directory, under an 
105
   appropriate name ending in ``.orig.tar.gz``.  Untar it.  The extracted
106
   source directory and ``.orig`` file must match the version number you
107
   calculated above.  For example::
108
3641.4.2 by Martin Albisetti
More fixes to address jam's comments. Made all bzr versions in the examples the same.
109
     cp -l ~/bzr/Releases/bzr-1.6b3.tar.gz ~/bzr/Releases/hardy/bzr_1.6~beta3.orig.tar.gz
110
     cd ~/bzr/Releases/hardy
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
111
     tar xfvz bzr_1.6~beta3.orig.tar.gz
112
     mv bzr-1.6b3 bzr-1.6~beta3
113
114
#. Change into that directory and check out the packaging branch::
115
116
     cd bzr-1.6~beta3
117
     bzr checkout \
118
       bzr+ssh://bazaar.launchpad.net/~bzr/bzr/packaging-hardy \
119
       debian
120
121
#. For Bazaar plugins, change the ``debian/control`` file to express a
122
   dependency on the correct version of ``bzr``.
123
124
   For bzrtools this is typically::
125
3641.4.2 by Martin Albisetti
More fixes to address jam's comments. Made all bzr versions in the examples the same.
126
      Build-Depends-Indep: bzr (>= 1.6~), rsync
127
      Depends: ${python:Depends}, bzr (>= 1.6~), bzr (<< 1.7~), patch
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
128
129
#. Make a new ``debian/changelog`` entry for the new release,
130
   either by using ``dch`` or just editing the file::
131
3641.4.3 by Martin Albisetti
Small whitespace fix
132
      dch -v '1.6~beta3-1~bazaar1~hardy1' -D hardy
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
133
134
   dch will default to the distro you're working in and this isn't checked
135
   against the version number (which is just our conversion), so make sure 
136
   to specify it.
137
138
   Make sure you have the correct email address for yourself, version
139
   number, and distribution.  It should look something like this::
140
3641.4.2 by Martin Albisetti
More fixes to address jam's comments. Made all bzr versions in the examples the same.
141
       bzr (1.6~beta3-1~bazaar1~hardy1) hardy; urgency=low
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
142
     
143
        * New upstream release.
144
     
145
       -- John Sample <sample@example.com>  Mon, 31 Mar 2008 12:36:27 +1100
146
147
   If you need to upload the package again to fix a problem, normally you
148
   should increment the last number in the version number, following the
149
   distro name.  Make sure not to omit the initial ``-1``, and make sure
150
   that the distro name in the version is consistent with the target name
151
   outside the parenthesis.
152
153
#. Commit these changes into the packaging branch::
154
3641.4.2 by Martin Albisetti
More fixes to address jam's comments. Made all bzr versions in the examples the same.
155
     bzr ci -m '1.6~beta3-1~bazaar1~hardy1: New upstream release.' debian
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
156
3641.4.1 by Martin Albisetti
Tweaks to the PPA docs to remove recommendation to use Launchpad's copy feature, and other small changes
157
#. Remove the .bzr directory from the Debian dir, as this adds unnecessary
158
   cruft to the package::
159
160
     rm debian/.bzr -R
161
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
162
#. Build a source package::
163
164
     debuild -S -sa -i -D
165
166
   This will create a ``.changes`` file in the per-distro directory,
167
   and should invoke gpg to sign it with your key.
168
   Check that file is reasonable: it should be uploading to the intended
169
   distribution, have a .orig file included, and the right version number.
170
3641.4.1 by Martin Albisetti
Tweaks to the PPA docs to remove recommendation to use Launchpad's copy feature, and other small changes
171
#. Upload into the beta PPA for each release::
172
3641.4.2 by Martin Albisetti
More fixes to address jam's comments. Made all bzr versions in the examples the same.
173
     dput bzr-beta-ppa ../bzr__1.6~beta3-1\~bazaar1\~hardy1\_source.changes
3641.4.1 by Martin Albisetti
Tweaks to the PPA docs to remove recommendation to use Launchpad's copy feature, and other small changes
174
175
#. For final release versions, also copy it into the ``~bzr`` PPA::
176
3641.4.2 by Martin Albisetti
More fixes to address jam's comments. Made all bzr versions in the examples the same.
177
    dput bzr-ppa ../bzr__1.6-1\~bazaar1\~hardy1\_source.changes
3549.3.1 by Martin Pool
Updated instructions in packaging into the PPA
178
179
#. You should soon get an "upload accepted" mail from Launchpad, which
180
   means that your package is waiting to be built.  You can then track its
181
   progress in <https://launchpad.net/~bzr-beta-ppa/+archive> and
182
   <https://launchpad.net/~bzr-beta-ppa/+archive/+builds>.
183
184
185
Monitoring the contents of PPAs
186
-------------------------------
187
188
If you add all the bzr PPAs to your ``sources.list`` then you can see a
189
summary of current package versions with::
190
191
  apt-cache madison bzr
192
193
194
..
195
   vim: filetype=rst textwidth=74 ai shiftwidth=4