2
2
Bazaar Developer Guide
3
3
======================
5
This document describes the Bazaar internals and the development process.
6
It's meant for people interested in developing Bazaar, and some parts will
7
also be useful to people developing Bazaar plugins.
9
If you have any questions or something seems to be incorrect, unclear or
10
missing, please talk to us in ``irc://irc.freenode.net/#bzr``, or write to
11
the Bazaar mailing list. To propose a correction or addition to this
12
document, send a merge request or new text to the mailing list.
14
The current version of this document is available in the file
15
``doc/developers/HACKING.txt`` in the source tree, or at
16
http://doc.bazaar-vcs.org/bzr.dev/en/developer-guide/HACKING.html
7
(The current version of this document is available in the file
8
``doc/developers/HACKING.txt`` in the source tree, or at
9
http://doc.bazaar-vcs.org/bzr.dev/en/developer-guide/HACKING.html)
1996
2005
#. Update http://bazaar-vcs.org/WindowsDownloads to have the correct version number as well as the correct sha1sum displayed.
2008
The Bazaar PPA archive
2009
----------------------
2011
We build Ubuntu ``.deb`` packages for Bazaar as an important part of the release
2012
process. These packages are hosted in a `Personal Package Archive (PPA)`__ on
2013
Launchpad, at <https://launchpad.net/~bzr/+archive>.
2015
__ https://help.launchpad.net/PPAQuickStart
2017
We build packages for every supported Ubuntu release
2018
<https://wiki.ubuntu.com/Releases>. Packages need no longer be updated
2019
when the release passes end-of-life because all users should have then
2022
The ``debian/`` directory containing the packaging information is kept in
2023
branches on Launchpad, named like
2024
<https://code.launchpad.net/~bzr/bzrtools/packaging-dapper>
2026
Updating the PPA for a new release
2027
----------------------------------
2029
Preconditions for building these packages:
2031
* You must have a Launchpad account and be a member of the `~bzr`__ team
2033
__ https://edge.launchpad.net/~bzr/+members>
2035
* You must have a GPG key registered to your Launchpad account.
2037
* Configure ``dput`` to upload to our PPA with this section in your
2041
fqdn = ppa.launchpad.net
2043
incoming = ~bzr/ubuntu
2045
allow_unsigned_uploads = 0
2047
* You need a Ubuntu (or probably Debian) machine, and ::
2049
sudo apt-get install build-essential devscripts dput
2051
Here is the process; there are some steps which should be automated in
2054
#. You will need a working directory for each supported release, such as
2055
``~/bzr/Packaging/dapper``
2057
#. Download the official tarball of the release to e.g. ``~/bzr/Releases``
2059
#. Copy the original tarball into your per-disto directory, then untar it
2060
and if necessary rename it::
2062
cp -l ~/bzr/Releases/bzrtools-1.3.0.tar.gz bzrtools_1.3.0.orig.tar.gz
2063
tar xfvz bzrtools_1.3.0.orig.tar.gz
2064
mv bzrtools bzrtools-1.3.0
2066
#. Change into that directory and check out the packaging branch::
2070
bzr+ssh://bazaar.launchpad.net/~bzr/bzrtools/packaging-dapper \
2073
#. For Bazaar plugins, change the ``debian/control`` file to express a
2074
dependency on the correct version of ``bzr``.
2076
For bzrtools this is typically::
2078
Build-Depends-Indep: bzr (>= 1.3~), rsync
2079
Depends: ${python:Depends}, bzr (>= 1.3~), bzr (<< 1.4~), patch
2081
#. Make a new ``debian/changelog`` entry for the new release,
2082
either by using ``dch`` or just editing the file::
2084
dch -v '1.3.0-1~bazaar1~dapper1' -D dapper
2086
dch will default to the distro you're working in and this isn't checked
2087
against the version number (which is just our conversion). So make
2090
Make sure you have the correct email address for yourself, version
2091
number, and distribution. It should look something like this:
2093
> bzrtools (1.3.0-1~bazaar1~dapper1) dapper; urgency=low
2095
> * New upstream release.
2097
> -- Martin Pool <mbp@canonical.com> Mon, 31 Mar 2008 12:36:27 +1100
2099
If you need to upload the package again to fix a problem, normally you
2100
should increment the last number in the version number, following the
2101
distro name. Make sure not to omit the initial ``-1``, and make sure
2102
that the distro name in the version is consistent with the target name
2103
outside the parenthesis.
2105
#. Commit these changes into the packaging branch::
2107
bzr ci -m '1.3.0-1~bazaar1~dapper1: New upstream release.' debian
2109
#. Build a source package::
2113
This will create a ``.changes`` file in the per-distro directory,
2114
and should invoke gpg to sign it with your key.
2115
Check that file is reasonable: it should be uploading to the intended
2116
distribution, have a .orig file included, and the right version number.
2118
#. Upload into the PPA::
2120
dput bzr-ppa ../bzrtools__1.3.0-1\~bazaar1\~dapper1_source.changes
2122
Don't forget the ``bzr-ppa`` component or dput will try to upload into
2123
the main archive by default. You can disable this by adding this
2124
section to your ``.dput.cf``::
2127
fqdn = SPECIFY.A.PPA.NAME
2129
#. You should soon get an "upload accepted" mail from Launchpad, which
2130
means that your package is waiting to be built. You can then track its
2131
progress in <https://launchpad.net/~bzr/+archive> and
2132
<https://launchpad.net/~bzr/+archive/+builds>.
2000
2136
vim: ft=rst tw=74 ai