Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

Installation FAQ

Installing Bazaar from Source

If you get stuck, then see the BzrSupport page for more help. There is also a bit of Windows specific install information available on BzrOnPureWindows and offsite documention for cygwin.

System Requirements

Required Packages

  • Python >= 2.4

  • cElementTree (10x faster XML processing) -- cElementTree is required only if you're using Python 2.4. It's been made part of the standard library since 2.5.
    • This in turn requires the ElementTree package to be installed

Suggested

  • Pyrex (better performance)
  • paramiko (provides sftp support)
    • Paramiko can create its own ssh connections if pyCrypto is installed
    • Or it can use Openssh as the transport agent
  • Bzrtools (provides rsync support, and other useful extra functionality)

Locating Bazaar Dependencies

Troubleshooting

Checking python is the right version

Python 2.4 or later is required. This can be checked with:

python -V

Checking for the installation of python modules

You can verify whether pycrypto, paramiko and cElementTree is installed by running the following commands. No complaints mean that you have the modules:

python -c "import Crypto"
python -c "import paramiko"

If you installed cElementTree manually:

python -c "import cElementTree"

If cElementTree comes with your Python installation (2.5 or later):

python -c "import xml.etree.cElementTree"

Verifying ssh is installed

The following command will return the path of ssh it is installed or nothing if it is not:

which ssh

Byte-compiling fails

If the installation fails at building the C extensions, then you might need to install the Python header files for your python version. They may be called something like python2.5-dev or python-devel.

GNU/Linux and FreeBSD

Install all of the aforementioned dependencies, via your package manager or "ports" system when possible, except for Bazaar itself. Then perform the following commands as root:

System-wide install (recommended)

To install system-wide, cd into the directory you downloaded Bazaar into and run the following command which will install 'bzr' into the default location (traditionally '/usr/local/bin'):

  • % sudo python setup.py install

Some distributions (notably Ubuntu and Debian) will install 'bzr' into '/usr/bin' instead. If you want to change the default behaviour, you can control the installation location by specifying the --prefix parameter. See the Python documentation on the prefix scheme for more details on customizing the installation location under Linux.

Install in home directory

You can install Bazaar into home directory, in ~/bin. This method requires that ~/bin is in your $PATH and that~/lib/python is in your $PYTHONPATH.

% python setup.py install --home $HOME

Run from source directory

You can also just make a symlink from the source directory (~/bzr/bzr.dev) onto a directory on your path (~/bin).

% make
% ln -s ~/bzr/bzr.dev/bzr ~/bin/bzr

Python should find the libraries by following the symlink. This may depend on whether '' is on your default python sys.path. You can check with:

% python -c "import sys; print sys.path"

Make sure that your PATH begins with ${HOME}/bin using the following:

% echo $PATH

If not, change your shell's startup file to make it so. If your login shell is bash, add the following line to your ~/.bashrc:

export PATH=${HOME}/bin:$PATH

Mac OS X

The easiest way to get bzr and its dependencies on Mac OS X is using the installer package from the Download page.

bzr and its dependencies are also available through MacPorts. See the Mac Ports Wiki page for detailed instructions.

Cygwin

Latest release (cygwin)

Bazaar is in the cygwin packaging system. Occasional problems have been noted with some missing python packages (particularly pycrypto). If you find that a python package is missing, then perform the following steps for each one:

  1. Download the missing package from the list on the top of this page
  2. Unpack the file by running tar xvzf downloadedfile.tgz
  3. cd into the created directory
  4. run  python setup.py install

Development line (cygwin)

Follow the steps given in the previous section, with the exception of not installing Bazar itself. Then follow the instructions given for GNU/Linux development. An alternative set of instructions are available on Cygwin Installation according to Jblack

After installation

Visit the Tutorials page with a particular eye towards IntroductionToBzr.

GnuPG Signatures

Detached signatures for the packages are available in the same location. Individual releases are signed by the associated release manager. Releases 0.9 and earlier were done by Martin Pool, and are signed with key id A0B3E88B. Releases 0.10 and 0.11 were done by Robert Collins (key id FBD3EB8E). Release 0.12 was done by John Arbash Meinel (key id 848D0003). Release 0.13rc1 was done by Wouter van Heyst (key id 0DC0B7D6). Packages in http://bazaar-vcs.org/releases/debs/ should be signed by the repository key EEA6AD6A.

Verifying signatures

You first have to get the key of the release manager from a keyserver serving it.

gpg --keyserver subkeys.pgp.net --recv-key 848D0003 

Now you can verify the signature, e.g. with

gpg --verify bzr-0.12.tar.gz.sig bzr-0.12.tar.gz 

or simply

gpg bzr-0.12.tar.gz.sig