buildbot vs git

If you are pulling code from a git Distributed Version Control System, then there is a known bug in older versions of buildbot, which can hit you if your git version is newer than 1.7.7.

This was fixed in the latest versions of buildbot (0.8.6), but that does not help if one of your testing machines (one of the buildslaves) has an unsupported combination of buildbot / git. Here is how to fix that in Debian 7.0 (Wheezy) and in Apple Mac OSX 10.7 (Lion) with Macports.

Debian 7.0 (Wheezy)

You need to pin the git package to a version supported by the current buildbot, as follows:

apt.get purge git
cd /etc/apt/preferences.d
cat > git-pinning
Package: git
Pin: version 1:1.7.2.5-3
Pin-Priority: 1001
apt-get install git

Apple Mac OSX 10.7 (Lion) with macports

You need to apply the required patch from here to buildbot:

cd /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/buildslave/commands
sudo vi git.py
...

Now force compile the modified code as root (the user impersonating buildbot will not have the privileges required to write in this directory) :

sudo /opt/local/bin/python2.7
<enter password>
import git
^D

Finally stop / restart the buildbot slave to pick up the updated code

cd ~/buildbot_home
buildslave stop .
buildslave start .