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 |
||
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
29 |
We build a distinct package for each distrorelease. As of bzr 1.5, Dapper |
30 |
uses ``python-support`` and later distributions use ``python-central``. |
|
31 |
If you upload a release-specific version, you should add a suffix to the |
|
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
32 |
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``. |
33 |
||
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
34 |
Every package is first uploaded into the beta ppa. For final release |
35 |
versions it is also copied to the main PPA. |
|
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
36 |
|
37 |
The ``debian/`` directory containing the packaging information is kept in |
|
38 |
branches on Launchpad, named like |
|
39 |
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>. |
|
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
40 |
or |
41 |
<lp:~bzr/bzr/packaging-hardy>. |
|
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
42 |
|
43 |
Preconditions |
|
44 |
------------- |
|
45 |
||
46 |
* You must have a Launchpad account and be a member of the teams |
|
47 |
that own these PPAs (``~bzr``, ``~bzr-beta-ppa``). |
|
48 |
||
49 |
* You must have a GPG key registered to your Launchpad account. |
|
50 |
||
51 |
* Configure ``dput`` to upload to our PPA with this section in your |
|
52 |
``~/.dput.cf``:: |
|
53 |
||
54 |
[bzr-beta-ppa] |
|
55 |
fqdn = ppa.launchpad.net |
|
56 |
method = ftp |
|
57 |
incoming = ~bzr-beta-ppa/ubuntu |
|
58 |
login = anonymous |
|
59 |
allow_unsigned_uploads = 0 |
|
60 |
||
61 |
[bzr-ppa] |
|
62 |
fqdn = ppa.launchpad.net |
|
63 |
method = ftp |
|
64 |
incoming = ~bzr/ubuntu |
|
65 |
login = anonymous |
|
66 |
allow_unsigned_uploads = 0 |
|
67 |
||
68 |
You may also want to add these lines to prevent inadvertently attempting |
|
69 |
to upload into Ubuntu or Debian, which will give a somewhat unclear |
|
70 |
error:: |
|
71 |
||
72 |
[DEFAULT] |
|
73 |
default_host_main = notspecified |
|
74 |
||
75 |
* You need a Ubuntu (or probably Debian) machine, and :: |
|
76 |
||
77 |
sudo apt-get install build-essential devscripts dput quilt patch |
|
78 |
||
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
79 |
* You will also want to have the ``bzr-builddeb`` plugin installed. |
80 |
||
81 |
||
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
82 |
Packaging Bazaar |
83 |
---------------- |
|
84 |
||
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
85 |
Short form |
86 |
~~~~~~~~~~ |
|
87 |
||
88 |
For people who have already set up everything they need, building the |
|
89 |
release packages is as simple as:: |
|
90 |
||
91 |
cd ~/dev/bzr/releases/packaging |
|
92 |
export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid" |
|
93 |
~/dev/bzr/bzr.dev/tools/packaging/update-packaging-branches.sh |
|
94 |
~/dev/bzr/bzr.dev/tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1 |
|
95 |
~/dev/bzr/bzr.dev/tools/packaging/build-packages |
|
96 |
dput bzr-beta-ppa build-area/bzr_1.6~beta3~bazaar1*.changes |
|
97 |
||
98 |
Long Form |
|
99 |
~~~~~~~~~ |
|
100 |
||
101 |
#. You will end up checking out a separate directory for each supported |
|
102 |
release. Such as ``~/dev/bzr/releases/packaging/hardy`` |
|
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
103 |
|
104 |
#. Decide on the final version number. It should be of this form:: |
|
105 |
||
3641.4.4
by Martin Albisetti
Meh |
106 |
bzr-1.6~beta3-1~bazaar1~hardy1 |
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
107 |
|
108 |
There are three hyphen-separated parts: the *package name*, the *upstream |
|
109 |
version*, and the *packaging version*. |
|
110 |
||
111 |
**Caution:** Upstream betas or release candidates must insert a tilde |
|
112 |
to make them sort before the final release, like this: |
|
3641.4.4
by Martin Albisetti
Meh |
113 |
``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. |
114 |
|
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
115 |
Final releases will use a release string of the form: |
116 |
``bzr-1.6-1~bazaar1~hardy1`` |
|
117 |
||
118 |
#. Export the distroreleases that you will be packaging for:: |
|
119 |
||
120 |
export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid" |
|
121 |
||
122 |
#. Checkout (or update) the packaging branch for each supported release:: |
|
123 |
||
124 |
bzr co lp:~bzr/bzr/packaging-hardy |
|
125 |
||
126 |
There is a script available to help:: |
|
127 |
||
128 |
tools/packaging/update-packaging-branches.sh |
|
129 |
||
130 |
#. The ``bzr-builddeb`` step will download the original tarball if you do |
|
131 |
not already have it. Putting it into a ``tarballs`` directory. |
|
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
132 |
|
133 |
#. For Bazaar plugins, change the ``debian/control`` file to express a |
|
134 |
dependency on the correct version of ``bzr``. |
|
135 |
||
136 |
For bzrtools this is typically:: |
|
137 |
||
3641.4.2
by Martin Albisetti
More fixes to address jam's comments. Made all bzr versions in the examples the same. |
138 |
Build-Depends-Indep: bzr (>= 1.6~), rsync |
139 |
Depends: ${python:Depends}, bzr (>= 1.6~), bzr (<< 1.7~), patch |
|
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
140 |
|
141 |
#. Make a new ``debian/changelog`` entry for the new release, |
|
142 |
either by using ``dch`` or just editing the file:: |
|
143 |
||
3641.4.3
by Martin Albisetti
Small whitespace fix |
144 |
dch -v '1.6~beta3-1~bazaar1~hardy1' -D hardy |
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
145 |
|
146 |
dch will default to the distro you're working in and this isn't checked |
|
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
147 |
against the version number (which is just our convention), so make sure |
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
148 |
to specify it. |
149 |
||
150 |
Make sure you have the correct email address for yourself, version |
|
151 |
number, and distribution. It should look something like this:: |
|
152 |
||
3641.4.2
by Martin Albisetti
More fixes to address jam's comments. Made all bzr versions in the examples the same. |
153 |
bzr (1.6~beta3-1~bazaar1~hardy1) hardy; urgency=low |
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
154 |
|
155 |
* New upstream release. |
|
156 |
||
157 |
-- John Sample <sample@example.com> Mon, 31 Mar 2008 12:36:27 +1100 |
|
158 |
||
159 |
If you need to upload the package again to fix a problem, normally you |
|
160 |
should increment the last number in the version number, following the |
|
161 |
distro name. Make sure not to omit the initial ``-1``, and make sure |
|
162 |
that the distro name in the version is consistent with the target name |
|
163 |
outside the parenthesis. |
|
164 |
||
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
165 |
You will also want to commit these changes into the packaging branch. |
166 |
||
167 |
There is a helper script which will update the changelog and commit it |
|
168 |
for all of your ``$UBUNTU_RELEASES``. It is available as:: |
|
169 |
||
170 |
tools/packaging/update-changelogs.sh |
|
171 |
||
172 |
You must supply the release string, such as:: |
|
173 |
||
174 |
tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1 |
|
175 |
||
176 |
It will automatically append the distro numbering on the end. |
|
177 |
||
178 |
#. Build the source packages:: |
|
179 |
||
180 |
cd packaging-$DISTRO; bzr builddeb -S |
|
181 |
||
182 |
This will create a ``.changes`` file in ``build-area``. You will need |
|
183 |
to sign it with:: |
|
184 |
||
185 |
debsign -m$UID build-area/*.changes |
|
186 |
||
187 |
Where ``$UID`` is the gpg key you want to use to sign the changes. |
|
188 |
Alternatively, you can configure ``~/.bazaar/builddeb.conf`` with:: |
|
189 |
||
190 |
[BUILDDEB] |
|
191 |
builder = dpkg-buildpackage -rfakeroot |
|
192 |
source-builder= dpkg-buildpackage -rfakeroot -S -sa |
|
193 |
||
194 |
Which tells ``bzr builddeb`` to automatically sign the package with the |
|
195 |
key associated with the user who created the changelog entry. |
|
196 |
||
3641.4.1
by Martin Albisetti
Tweaks to the PPA docs to remove recommendation to use Launchpad's copy feature, and other small changes |
197 |
#. Upload into the beta PPA for each release:: |
198 |
||
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
199 |
dput bzr-beta-ppa build-area/*.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 |
200 |
|
201 |
#. For final release versions, also copy it into the ``~bzr`` PPA:: |
|
202 |
||
3649.4.1
by John Arbash Meinel
Merge in Lukáš's helper scripts. |
203 |
dput bzr-ppa ../bzr__1.6-1\~bazaar1\~hardy1\_source.changes |
204 |
||
205 |
Alternatively, you can use Launchpad's "copy" feature to copy the |
|
206 |
packages between repositories. |
|
3549.3.1
by Martin Pool
Updated instructions in packaging into the PPA |
207 |
|
208 |
#. You should soon get an "upload accepted" mail from Launchpad, which |
|
209 |
means that your package is waiting to be built. You can then track its |
|
210 |
progress in <https://launchpad.net/~bzr-beta-ppa/+archive> and |
|
211 |
<https://launchpad.net/~bzr-beta-ppa/+archive/+builds>. |
|
212 |
||
213 |
||
214 |
Monitoring the contents of PPAs |
|
215 |
------------------------------- |
|
216 |
||
217 |
If you add all the bzr PPAs to your ``sources.list`` then you can see a |
|
218 |
summary of current package versions with:: |
|
219 |
||
220 |
apt-cache madison bzr |
|
221 |
||
222 |
||
223 |
.. |
|
224 |
vim: filetype=rst textwidth=74 ai shiftwidth=4 |