Subject: CIA hook for contrib/

From: Eric Raymond <[email-masked]>
Date: Sat, 27 Mar 2010 06:26:32 -0400

Summary:
* The CIA hooks for git are presently dusty and somewhat broken.
* I am requesting that they be given a home in git contrib/.
* I am supplying working, updated versions.
* I will accept maintainance responsibility if required.

Many listmembers will be aware of CIA.vc, a useful service that echoes
commits from open-source projects to IRC channels and maintains
various interesting statistics on commit activity.  Under git, it is
supported by one of two hook scripts: ciabot.pl and ciabot.pl.

In the course of migrating the GPSD project from Subversion to git, I
discovered that the 2006 version of ciabot.sh available from CIA.vc is
broken.  It requires, but does not have, a PATH adjustment to cope
with the fact that various git tools it uses now go in a commands
directory private to git.  The 2008 version of ciabot.sh made
available on the git wiki also has no PATH adjustment.

Upon investigating further, I find that ciabot.sh seems to be a
derivative of ciabot.pl, which is a dangling bit of the moribund
Cogito project.  I have been unable to get responses from the authors
of either ciabot.sh or ciabot.pl.

A fixed and working version in shell is enclosed.  It has some advantages
over the 2006 and 2008 versions:

* It uses only POSIX features.  Thus, it will work with Debian/Ubuntu
  dash and BSD's non-bash shells.

* It's faster, because it uses a lighter-weight shell.

* It's much closer to being autoconfiguring.  In the normal case, all
  the person installing an instance need supply is the project name.

* It is considerably better documented.

* It can support cgit as well as gitweb installations.

I am also enclosing a rewrite in Python. This has a serious functional
advantage over either Perl or sh; the batteries-included effect of the
Python libraries means it's not dependent on things like the path
location of sendmail or whether the hosting site will allow it to
run wget.

I think the broad usage of CIA.vc justifies adding one of these as an
official ciabot hook to git contrib/, and am so proposing. Should it
be required, I will accept maintainance responsibility; I expect the
amount of effort involved to be minimal.

Both versions have been live-tested on the GPSD project repo.  The
Python version is now in production use there.

Code is enclosed.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>