bazaar and loggerhead a ( very ) quick guide

Posted by gjergj.sheldija on January 15, 2010

bazaar

first add the bazaar PPA to the repository list

vi /etc/apt/sources.list.d/bzr.list

add the following

# Bazaar PPA
deb http://ppa.launchpad.net/bzr/ubuntu hardy main
deb-src http://ppa.launchpad.net/bzr/ubuntu hardy main
aptitude update

bazaar server

aptitude install bzr bzrtools python-paramiko

sftp

aptitude install ssh openssh-server

create the user account

useradd --create-home --home-dir /var/local/bzr --shell /usr/lib/sftp-server bzr
passwd bzr
echo '/usr/lib/sftp-server' >> /etc/shells

Loggerhead

i decided to use Loggerhead instead of an apache or lighttpd integratrion so..

aptitude install python-configobj python-simpletal python-paste python-pastedeploy python-simplejson
bzr branch lp:loggerhead
wget http://launchpad.net/loggerhead/1.17/1.17/+download/loggerhead-1.17.tar.gz
tar zxvf loggerhead-1.17.tar.gz
python setup.py install
/usr/bin/serve-branches /var/local/bzr/

starting and stopping loggerhead

nano /etc/loggerhead.conf
# use this if you're mapping loggerhead within apache via proxy
# server.webpath = 'http://code.example.org/Loggerhead/'
# the access and debug logs can be set up to roll 'daily', 'weekly', or 'never':
log.roll = 'daily'
# here's an example of an auto-published folder:

[bazaar]
name = 'My Bazaar'
auto_publish_folder = '/var/local/bzr/'
loggerhead can be started and stopped via
/etc/init.d/loggerhead start
/etc/init.d/loggerhead stop
loggerhead searching
mkdir -p ~/.bazaar/plugins
bzr branch lp:bzr-search ~/.bazaar/plugins/search
bzr index /var/local/bzr/Project1
/etc/init.d/loggerhead restart