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)
2000
2009
#. Update http://bazaar-vcs.org/WindowsDownloads to have the correct version number as well as the correct sha1sum displayed.
2012
The Bazaar PPA archive
2013
----------------------
2015
We build Ubuntu ``.deb`` packages for Bazaar as an important part of the release
2016
process. These packages are hosted in a `Personal Package Archive (PPA)`__ on
2017
Launchpad, at <https://launchpad.net/~bzr/+archive>.
2019
__ https://help.launchpad.net/PPAQuickStart
2021
We build packages for every supported Ubuntu release
2022
<https://wiki.ubuntu.com/Releases>. Packages need no longer be updated
2023
when the release passes end-of-life because all users should have then
2026
The ``debian/`` directory containing the packaging information is kept in
2027
branches on Launchpad, named like
2028
<https://code.launchpad.net/~bzr/bzrtools/packaging-dapper>
2030
Updating the PPA for a new release
2031
----------------------------------
2033
Preconditions for building these packages:
2035
* You must have a Launchpad account and be a member of the `~bzr`__ team
2037
__ https://edge.launchpad.net/~bzr/+members>
2039
* You must have a GPG key registered to your Launchpad account.
2041
* Configure ``dput`` to upload to our PPA with this section in your
2045
fqdn = ppa.launchpad.net
2047
incoming = ~bzr/ubuntu
2049
allow_unsigned_uploads = 0
2051
* You need a Ubuntu (or probably Debian) machine, and ::
2053
sudo apt-get install build-essential devscripts dput
2055
Here is the process; there are some steps which should be automated in
2058
#. You will need a working directory for each supported release, such as
2059
``~/bzr/Packaging/dapper``
2061
#. Download the official tarball of the release to e.g. ``~/bzr/Releases``
2063
#. Copy the original tarball into your per-disto directory, then untar it
2064
and if necessary rename it::
2066
cp -l ~/bzr/Releases/bzrtools-1.3.0.tar.gz bzrtools_1.3.0.orig.tar.gz
2067
tar xfvz bzrtools_1.3.0.orig.tar.gz
2068
mv bzrtools bzrtools-1.3.0
2070
#. Change into that directory and check out the packaging branch::
2074
bzr+ssh://bazaar.launchpad.net/~bzr/bzrtools/packaging-dapper \
2077
#. For Bazaar plugins, change the ``debian/control`` file to express a
2078
dependency on the correct version of ``bzr``.
2080
For bzrtools this is typically::
2082
Build-Depends-Indep: bzr (>= 1.3~), rsync
2083
Depends: ${python:Depends}, bzr (>= 1.3~), bzr (<< 1.4~), patch
2085
#. Make a new ``debian/changelog`` entry for the new release,
2086
either by using ``dch`` or just editing the file::
2088
dch -v '1.3.0-1~bazaar1~dapper1' -D dapper
2090
dch will default to the distro you're working in and this isn't checked
2091
against the version number (which is just our conversion). So make
2094
Make sure you have the correct email address for yourself, version
2095
number, and distribution. It should look something like this::
2097
> bzrtools (1.3.0-1~bazaar1~dapper1) dapper; urgency=low
2099
> * New upstream release.
2101
> -- John Sample <sample@example.com> Mon, 31 Mar 2008 12:36:27 +1100
2103
If you need to upload the package again to fix a problem, normally you
2104
should increment the last number in the version number, following the
2105
distro name. Make sure not to omit the initial ``-1``, and make sure
2106
that the distro name in the version is consistent with the target name
2107
outside the parenthesis.
2109
#. Commit these changes into the packaging branch::
2111
bzr ci -m '1.3.0-1~bazaar1~dapper1: New upstream release.' debian
2113
#. Build a source package::
2117
This will create a ``.changes`` file in the per-distro directory,
2118
and should invoke gpg to sign it with your key.
2119
Check that file is reasonable: it should be uploading to the intended
2120
distribution, have a .orig file included, and the right version number.
2122
#. Upload into the PPA::
2124
dput bzr-ppa ../bzrtools__1.3.0-1\~bazaar1\~dapper1_source.changes
2126
Don't forget the ``bzr-ppa`` component or dput will try to upload into
2127
the main archive by default. You can disable this by adding this
2128
section to your ``.dput.cf``::
2131
fqdn = SPECIFY.A.PPA.NAME
2133
#. You should soon get an "upload accepted" mail from Launchpad, which
2134
means that your package is waiting to be built. You can then track its
2135
progress in <https://launchpad.net/~bzr/+archive> and
2136
<https://launchpad.net/~bzr/+archive/+builds>.
2004
2140
vim: ft=rst tw=74 ai