Revert "Rely on the thread safety of the IRC library at versions >= 3.2.1."
[irker.git] / install.txt
1 = Forge installation instructions =
2
3 irker and irkerhook.py are intended to be installed on forge sites
4 such as SourceForge, GitHub, Gitorious, Gna, and Savannah.  This
5 file explains the theory of operation, how to install the code,
6 and how to test it.
7
8 == Theory of operation ==
9
10 irkerhook.py creates JSON notification requests and ships them to
11 irkerd's listener socket.  irkerd run as a daemon in order to maintain
12 all the client state required to post multiple notifications while generating
13 minimum of join/leave messages (which, from the point of view of
14 humans watching irkerd's output, are mere spam).
15
16 See the security.txt document for a detailed discussion of security
17 and DoS vulnerabilities related to irker.
18
19 == Installing irkerd ==
20
21 irker needs to run constantly, watching for TCP and UDP traffic on
22 port 6659.  Install it accordingly. It has no config file; you can
23 just start it up with no arguments.  If you want to see what it's
24 doing, give it command-line options -d 1 for sparse messages and -d 2
25 to show all traffic with IRC servers.
26
27 You should *not* make irker visible from outside the site firewall, as
28 it can be used to spam IRC channels while masking the source address.
29
30 You will need to have Jason Coombs's irc library where Python can see
31 it.  See <http://pypi.python.org/pypi/irc/>; use version 3.2.2 or later,
32 not 3.0 or the even older code from SourceForge.
33
34 The file org.catb.irkerd.plist is a Mac OS/X plist that can be
35 installed to launch irkerd as a boot-time service on that system.
36
37 == Installing irkerhook.py ==
38
39 Under git, a call to irkerhook.py should be installed in the update 
40 hook script of your repo.  Under Subversion, the call goes in your
41 repo's post-commit script. Under Mercurial there are two different
42 ways to install it. See the irkerhook manual page for details; the
43 source is irkerhook.xml in this distribution.
44
45 Note that if you were using the CIA service and have ciabot.py in your
46 git update script, you can simply replace this
47
48 /path/to/ciabot.py ${refname} $(git rev-list ${oldhead}..${newhead} | tac)
49
50 with this:
51
52 /path/to/irkerhook.py --refname=${refname} $(git rev-list ${oldhead}..${newhead} | tac)
53
54 == Testing ==
55
56 To verify that your repo produces well-formed JSON notifications,
57 you can run irkerhook.py in the repo directory using the -n switch,
58 which emits JSON to standard output rather than attempting to ship
59 to an irkerd instance.
60
61 Then, start irkerd and call irkerhook.py while watching the freenode
62 #commits channel.
63
64 The 'irk' script is a little test tool that takes two arguments,
65 a channel and a message, and does what you'd expect.
66
67 If you need help, there's a project chat channel at 
68
69    irc://chat.freenode.net/#irker
70
71 == Read-only access ==
72
73 If, for whatever reason, you can't modify the hook scripts in your 
74 repository, there is still hope.
75
76 There's a proxy that takes CIA XML-RPC notifications 
77 and passes them to a local irker instance. Find it here:
78
79     https://github.com/nenolod/irker-cia-proxy
80
81 There's also a poller daemon that can watch activity in a Subversion
82 repository and ship notifications via an irker instance.
83
84     https://github.com/shikadilord/irker-svnpoller
85