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>.
74
73
default_host_main = notspecified
77
fqdn = SPECIFY.A.PPA.NAME
79
75
* You need a Ubuntu (or probably Debian) machine, and ::
81
77
sudo apt-get install build-essential devscripts dput quilt patch
79
* You will also want to have the ``bzr-builddeb`` plugin installed.
86
#. You will need a working directory for each supported release, such as
87
``~/bzr/Packaging/hardy``
89
#. Download the official tarball of the release to e.g. ``~/bzr/Releases``
90
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``
92
104
#. Decide on the final version number. It should be of this form::
94
bzr-1.6~beta3-1~bazaar1
106
bzr-1.6~beta3-1~bazaar1~hardy1
96
108
There are three hyphen-separated parts: the *package name*, the *upstream
97
109
version*, and the *packaging version*.
99
111
**Caution:** Upstream betas or release candidates must insert a tilde
100
112
to make them sort before the final release, like this:
101
``bzr-1.4~rc2-1~bazaar1``.
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::
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
112
#. Change into that directory and check out the packaging branch::
116
bzr+ssh://bazaar.launchpad.net/~bzr/bzr/packaging-hardy \
113
``bzr-1.6~beta3-1~bazaar1~hardy1``.
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.
119
133
#. For Bazaar plugins, change the ``debian/control`` file to express a
120
134
dependency on the correct version of ``bzr``.
122
136
For bzrtools this is typically::
124
Build-Depends-Indep: bzr (>= 1.3~), rsync
125
Depends: ${python:Depends}, bzr (>= 1.3~), bzr (<< 1.4~), patch
138
Build-Depends-Indep: bzr (>= 1.6~), rsync
139
Depends: ${python:Depends}, bzr (>= 1.6~), bzr (<< 1.7~), patch
127
141
#. Make a new ``debian/changelog`` entry for the new release,
128
142
either by using ``dch`` or just editing the file::
130
dch -v '1.3-1~bazaar1' -D hardy
144
dch -v '1.6~beta3-1~bazaar1~hardy1' -D hardy
132
146
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
147
against the version number (which is just our convention), so make sure
136
150
Make sure you have the correct email address for yourself, version
137
151
number, and distribution. It should look something like this::
139
bzr (1.3-1~bazaar1) hardy; urgency=low
153
bzr (1.6~beta3-1~bazaar1~hardy1) hardy; urgency=low
141
155
* New upstream release.
148
162
that the distro name in the version is consistent with the target name
149
163
outside the parenthesis.
151
#. Commit these changes into the packaging branch::
153
bzr ci -m '1.3-1~bazaar1: New upstream release.' debian
155
#. Build a source package::
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.
164
#. Upload into the beta PPA::
166
dput bzr-beta-ppa ../bzr__1.3-1\~bazaar1\_source.changes
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>
172
#. For final release versions, also copy it into the ``~bzr`` PPA.
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.
197
#. Upload into the beta PPA for each release::
199
dput bzr-beta-ppa build-area/*.changes
201
#. For final release versions, also copy it into the ``~bzr`` PPA::
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.
174
208
#. You should soon get an "upload accepted" mail from Launchpad, which
175
209
means that your package is waiting to be built. You can then track its