Using Bazaar for web development on Ubuntu Hardy

This is a guide to set up a no nonsense web development workflow with Bazaar on Ubuntu. Easy ftp uploads and all.

Bazaar is a nice version control system for me, it allows to keep my project directory versioned without much fiddling with the vcs-savvy stuff.

1. Get updated version of Bazaar

On Ubuntu 8.04 LTS (hardy) the bazaar packages are kind of outdated, but there is a simple solution. The PPA for Bazaar Developers is a Launchpad project but it contains package repositories for all supported Ubuntu systems.

To get the packages jut edit /etc/apt/sources.list.d/sources.list, add the following lines:

deb hardy main
deb-src hardy main

You can subsitute hardy with your ubuntu version if it’s supported. Add the OpenPGP key id for the repository:

$ sudo apt-key adv --keyserver --recv-keys 8C6C1EFD

Be sure to check the proper key-id of the repository. At the time of writing this is 8C6C1EFD. Note: apt-key needs the gnupg package to do this.

Then update and install the new versions:

$ sudo apt-get update
$ sudo apt-get install bzr bzrtools

2. Get the bzr upload plugin

The bzr-upload plugin incrementally uploads changes to a dumb server. Web sites are often hosted on servers where bzr can’t be installed. In other cases, the web site must not give access to its corresponding branch (for security reasons for example). Finally, web hosting providers often provides only ftp access to upload sites.

This plugin uploads only the relevant changes since the last upload using ftp or sftp protocols.

The bzr-upload is not available as a package for Hardy. Luckily, installing this is really easy, just type:

$ mkdir -p ~/.bazaar/plugins
$ bzr co lp:bzr-upload ~/.bazaar/plugins/upload

The plugin is instantly available for use after checking out. Now you can use the plugin via:

$ bzr upload sftp://username@server:22/~/sites/
$ bzr upload --auto

See bzr help upload for detailed usage information.

Last updated on by Attila