@pylint --output-format=parseable $(PYLINTOPTS) irkerhook.py
-SOURCES = README COPYING NEWS BUGS irker irkerhook.py Makefile irker.xml irker-logo.png
+SOURCES = README COPYING NEWS BUGS install.txt \
+ irker irkerhook.py Makefile irker.xml irker-logo.png
version:
@echo $(VERS)
irker is a specialized IRC client that runs as a daemon, allowing
other programs to ship IRC notifications by sending JSON objects to a
-listening socket. It is meant to be used by hook scripts in version-
-control repositories, allowing them to send commit notifications
-to project IRC channels.
+listening socket.
-A hook script supporting git and Subversion (irkerhook.py) is included.
-See its header comment for installation instructions.
+It is meant to be used by hook scripts in version- control
+repositories, allowing them to send commit notifications to project
+IRC channels. A hook script supporting git and Subversion
+is included.
+
+See the install.txt file for installation instructions.
Due to the abrupt death of cia.vc in late September 2012 the
inmitial release of this software was a bit rushed. See the file
--- /dev/null
+= Forge installation instructions =
+
+irker and irkerhook.py are intended to be installed on forge sites
+such as SourceForge, GitHub, Gitorious, Gna, and Savannah. This
+file explains the theory of operation, how to install the code,
+and how to test it.
+
+== Installing irker installation ==
+
+irker needs to run constantly, watching for TCP and UDP traffic on
+port 6659. Install it accordingly.
+
+You should *not* make irker visible from outside the site firewall, as
+it can be used to spam IRC channels while masking the source address.
+
+== Installing irkerhook.py ==
+
+irkerhook.py should be called from the post-commit hook of each
+repository. See its header comment for detailed installation
+instructions.
+
+You should set the server and either repository or project variables
+from the command line in your post-commit hook. The server variable
+should be set to the inside-the-firewall host running your irker
+instance.
+
+A git invocation line should look something like this:
+
+/usr/local/bin/irkerhook.py project=foobar server=internal.foobar.net
+
+A Subversion invocation should look something like this:
+
+REPOSITORY=$1
+REV=$2
+irkerhook.py repository=$REPOSITORY commit=$REV server=internal.foobar.net
+
+Note that the basename of the repository will be used as the project
+name.
+
+== Testing ==
+
+Go to a project repo and call
#
# Currently works for svn and git. For svn you must call it as follows:
#
-# irkerhook.py type=svn repository=REPO-PATH commit=REVISION channels=CHANNELS server=SERVER
+# irkerhook.py repository=REPO-PATH commit=REVISION channels=CHANNELS server=SERVER
#
# REPO-PATH must be the absolute path of the SVN repository (first
# argument of Subversion post-commit). REVISION must be the Subversion numeric
print "irkerhook.py: " + str(msg)
raise SystemExit, 1
- vcs = "git"
notify = True
channels = ""
commit = ""
+ repository= ""
for (switch, val) in options:
if switch == '-n':
notify = False
print "irkerhook.py: version", version
sys.exit(0)
- # Force the type if not git, also make globals settable
+ # Gather info for repo type discrimination, make globals settable
for tok in arguments:
- if tok.startswith("type="):
- vcs = tok[5:]
- elif tok.startswith("tinyfier="):
+ if tok.startswith("tinyfier="):
tinyfier = tok[9:]
+ elif tok.startswith("repository="):
+ repository = tok[11:]
+
+ # Determine the repository type. Default to git unless user has pointed
+ # us at a repo with identifiable internals.
+ vcs = "git"
+ if os.path.exists(os.path.join(repository, "format")):
+ vcs = "svn"
# Someday we'll have extractors for several version-control systems
- if vcs == "git":
- extractor = GitExtractor()
- else:
+ if vcs == "svn":
extractor = SvnExtractor(arguments)
+ else:
+ extractor = GitExtractor()
# Changeset URL prefix for your repo: when the commit ID is appended
# to this, it should point at a CGI that will display the commit