Tim Hatch

Weblog | Photos | Projects | Panoramas | About

Migrating Gitosis from Debian to Ubuntu 20 Oct, 2009

Today I decided it was time to move off Debian Etch and onto Ubuntu, mainly due to needing recent python2.6 and git binaries, and being tired of compiling my own.

The transition was pretty smooth. I started it over lunch and finished (enough to get server monitoring and gitosis back up) in a few minutes after work. In the process I discovered a weird way that gitosis can start silently failing if you move things around:

First, there’s a $HOME/.gitosis.conf symlink that won’t get updated if the post-commit hook is broken. In my case, the hook was:

  1. a broken symlink
  2. once fixed to the new location (for a hint, try python -c "import gitosis; print gitosis.__file__"), the target was not executable
  3. referenced git-update-server-info, and I don’t have the binaries strewn around like that, so had to remove the first dash

Once those were fixed, the contents of $HOME/.gitosis.conf updated as they should, and everything’s happy.

As another useful footnote, you can continue lines in a gitosis config, with leading whitespace like so:

writable = foo bar
      xyz abc