26
26
when the release passes end-of-life because all users should
27
27
have upgraded by then. (As of May 2008, Edgy Eft is no longer supported.)
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
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
34
32
package version, e.g. ``bzr.1.3-1~bazaar1~dapper1``.
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.
34
Every package is first uploaded into the beta ppa. For final release
35
versions it is also copied to the main PPA.
40
37
The ``debian/`` directory containing the packaging information is kept in
41
38
branches on Launchpad, named like
42
39
<https://code.launchpad.net/~bzr/bzr/packaging-hardy>.
41
<lp:~bzr/bzr/packaging-hardy>.
78
77
sudo apt-get install build-essential devscripts dput quilt patch
79
* You will also want to have the ``bzr-builddeb`` plugin installed.
83
#. You will need a working directory for each supported release, such as
84
``~/bzr/Packaging/hardy``
86
#. Download the official tarball of the release to e.g. ``~/bzr/Releases``
87
if you don't already have it.
88
For people who have already set up everything they need, building the
89
release packages is as simple as::
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
101
#. You will end up checking out a separate directory for each supported
102
release. Such as ``~/dev/bzr/releases/packaging/hardy``
89
104
#. Decide on the final version number. It should be of this form::
97
112
to make them sort before the final release, like this:
98
113
``bzr-1.6~beta3-1~bazaar1~hardy1``.
100
#. Create a directory per release::
102
mkdir ~/bzr/Releases/hardy
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::
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
111
tar xfvz bzr_1.6~beta3.orig.tar.gz
112
mv bzr-1.6b3 bzr-1.6~beta3
114
#. Change into that directory and check out the packaging branch::
118
bzr+ssh://bazaar.launchpad.net/~bzr/bzr/packaging-hardy \
115
Final releases will use a release string of the form:
116
``bzr-1.6-1~bazaar1~hardy1``
118
#. Export the distroreleases that you will be packaging for::
120
export UBUNTU_RELEASES="dapper feisty gutsy hardy intrepid"
122
#. Checkout (or update) the packaging branch for each supported release::
124
bzr co lp:~bzr/bzr/packaging-hardy
126
There is a script available to help::
128
tools/packaging/update-packaging-branches.sh
130
#. The ``bzr-builddeb`` step will download the original tarball if you do
131
not already have it. Putting it into a ``tarballs`` directory.
121
133
#. For Bazaar plugins, change the ``debian/control`` file to express a
122
134
dependency on the correct version of ``bzr``.
132
144
dch -v '1.6~beta3-1~bazaar1~hardy1' -D hardy
134
146
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
147
against the version number (which is just our convention), so make sure
138
150
Make sure you have the correct email address for yourself, version
150
162
that the distro name in the version is consistent with the target name
151
163
outside the parenthesis.
153
#. Commit these changes into the packaging branch::
155
bzr ci -m '1.6~beta3-1~bazaar1~hardy1: New upstream release.' debian
157
#. Remove the .bzr directory from the Debian dir, as this adds unnecessary
158
cruft to the package::
162
#. Build a source package::
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.
165
You will also want to commit these changes into the packaging branch.
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::
170
tools/packaging/update-changelogs.sh
172
You must supply the release string, such as::
174
tools/packaging/update-changelogs.sh 1.6~beta3-1~bazaar1
176
It will automatically append the distro numbering on the end.
178
#. Build the source packages::
180
cd packaging-$DISTRO; bzr builddeb -S
182
This will create a ``.changes`` file in ``build-area``. You will need
185
debsign -m$UID build-area/*.changes
187
Where ``$UID`` is the gpg key you want to use to sign the changes.
188
Alternatively, you can configure ``~/.bazaar/builddeb.conf`` with::
191
builder = dpkg-buildpackage -rfakeroot
192
source-builder= dpkg-buildpackage -rfakeroot -S -sa
194
Which tells ``bzr builddeb`` to automatically sign the package with the
195
key associated with the user who created the changelog entry.
171
197
#. Upload into the beta PPA for each release::
173
dput bzr-beta-ppa ../bzr__1.6~beta3-1\~bazaar1\~hardy1\_source.changes
199
dput bzr-beta-ppa build-area/*.changes
175
201
#. For final release versions, also copy it into the ``~bzr`` PPA::
177
dput bzr-ppa ../bzr__1.6-1\~bazaar1\~hardy1\_source.changes
203
dput bzr-ppa ../bzr__1.6-1\~bazaar1\~hardy1\_source.changes
205
Alternatively, you can use Launchpad's "copy" feature to copy the
206
packages between repositories.
179
208
#. You should soon get an "upload accepted" mail from Launchpad, which
180
209
means that your package is waiting to be built. You can then track its