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
|
Managing the Bazaar PPA
=======================
See also: `Bazaar Developer Document Catalog <index.html>`_.
Background
----------
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 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
have upgraded by then. (As of May 2008, Edgy Eft is no longer supported.)
We build a distinct package for each distrorelease that has
different packaging requirements. As of bzr 1.5, Dapper uses
``python-support`` and later distributions use ``python-central``, so we
build one version for dapper and one version for everything else. If you
upload a release-specific version, you should add a suffix to the
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``.
Every package is first uploaded into one distroversion of the beta ppa.
It can then be copied to other compatible distroversions. For final
release versions it is also copied to the main PPA.
The ``debian/`` directory containing the packaging information is kept in
branches on Launchpad, named like
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.
Preconditions
-------------
* You must have a Launchpad account and be a member of the teams
that own these PPAs (``~bzr``, ``~bzr-beta-ppa``).
* 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
* You need a Ubuntu (or probably Debian) machine, and ::
sudo apt-get install build-essential devscripts dput quilt patch
Packaging Bazaar
----------------
#. 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``
if you don't already have it.
#. Decide on the final version number. It should be of this form::
bzr-1.6~beta3-1~bazaar1~hardy1
There are three hyphen-separated parts: the *package name*, the *upstream
version*, and the *packaging version*.
**Caution:** Upstream betas or release candidates must insert a tilde
to make them sort before the final release, like this:
``bzr-1.6~beta3-1~bazaar1~hardy1``.
#. Create a directory per release::
mkdir ~/bzr/Releases/hardy
#. Copy or hardlink the original tarball into your per-disto directory, under an
appropriate name ending in ``.orig.tar.gz``. Untar it. The extracted
source directory and ``.orig`` file must match the version number you
calculated above. For example::
cp -l ~/bzr/Releases/bzr-1.6b3.tar.gz ~/bzr/Releases/hardy/bzr_1.6~beta3.orig.tar.gz
cd ~/bzr/Releases/hardy
tar xfvz bzr_1.6~beta3.orig.tar.gz
mv bzr-1.6b3 bzr-1.6~beta3
#. Change into that directory and check out the packaging branch::
cd bzr-1.6~beta3
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.6~), rsync
Depends: ${python:Depends}, bzr (>= 1.6~), bzr (<< 1.7~), patch
#. Make a new ``debian/changelog`` entry for the new release,
either by using ``dch`` or just editing the file::
dch -v '1.6~beta3-1~bazaar1~hardy1' -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.
Make sure you have the correct email address for yourself, version
number, and distribution. It should look something like this::
bzr (1.6~beta3-1~bazaar1~hardy1) 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.6~beta3-1~bazaar1~hardy1: New upstream release.' debian
#. Remove the .bzr directory from the Debian dir, as this adds unnecessary
cruft to the package::
rm debian/.bzr -R
#. 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 beta PPA for each release::
dput bzr-beta-ppa ../bzr__1.6~beta3-1\~bazaar1\~hardy1\_source.changes
#. For final release versions, also copy it into the ``~bzr`` PPA::
dput bzr-ppa ../bzr__1.6-1\~bazaar1\~hardy1\_source.changes
#. 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-beta-ppa/+archive> and
<https://launchpad.net/~bzr-beta-ppa/+archive/+builds>.
Monitoring the contents of PPAs
-------------------------------
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
|