From 838b0abe42e4bc7107245020acbf16145e35517f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 28 Aug 2012 00:22:20 -0400 Subject: [PATCH] Packaged for release. --- .gitignore | 2 ++ COPYING | 28 ++++++++++++++++++++ Makefile | 39 +++++++++++++++++++++++++++ README | 10 +++++++ control | 19 +++++++++++++ irker.xml | 78 +++++++++++++++++++++++++++++++++++++++++++++--------- 6 files changed, 164 insertions(+), 12 deletions(-) create mode 100644 COPYING create mode 100644 Makefile create mode 100644 README create mode 100644 control diff --git a/.gitignore b/.gitignore index 5056604..bd533a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ irker.pyc +irker.1 +irker.html irc irc-*/ diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..7e5dd19 --- /dev/null +++ b/COPYING @@ -0,0 +1,28 @@ + BSD LICENSE + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +Neither name of the this project nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..751f21f --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +# Makefile for the irker relaying tool + +VERS=$(shell irker.py -V | sed 's/irker version //') + +docs: irker.html irker.1 + +irker.1: irker.xml + xmlto man irker.xml +irker.html: irker.xml + xmlto html-nochunks irker.xml + +install: irker.1 uninstall + install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/ + install -m 755 -o 0 -g 0 irker.py $(ROOT)/usr/bin/irker.py + install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man1/ + install -m 755 -o 0 -g 0 irker.1 $(ROOT)/usr/share/man/man6/irker.1 + +uninstall: + rm -f ${ROOT}/usr/bin/irker.py ${ROOT}/usr/share/man/man1/irker.1 + +clean: + rm -f irker irker.1 irker-*.rpm irker-*.tar.gz *~ + rm -f SHIPPER.* *.html + +SOURCES = README COPYING irker.py Makefile irker.xml + +version: + @echo $(VERS) + +irker-$(VERS).tar.gz: $(SOURCES) irker.1 + @ls $(SOURCES) irker.1 | sed s:^:irker-$(VERS)/: >MANIFEST + @(cd ..; ln -s irker irker-$(VERS)) + (cd ..; tar -czf irker/irker-$(VERS).tar.gz `cat irker/MANIFEST`) + @(cd ..; rm irker-$(VERS)) + +dist: irker-$(VERS).tar.gz + +release: irker-$(VERS).tar.gz irker.html + shipper -u -m -t; make clean diff --git a/README b/README new file mode 100644 index 0000000..4df5369 --- /dev/null +++ b/README @@ -0,0 +1,10 @@ + irker - submission tool for IRC notifications + +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. + + Eric S. Raymond + August 2012 diff --git a/control b/control new file mode 100644 index 0000000..e662d97 --- /dev/null +++ b/control @@ -0,0 +1,19 @@ +# This is not a real Debian control file, though the syntax is compatible. +# It's project metadata for the shipper tool + +Package: irker + +Description: IRC client that runs as a daemon accepting JSON notifications + 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. + +XBS-Destinations: freecode + +Homepage: http://www.catb.org/~esr/irker + +#XBS-Logo: shipper-logo.png + +XBS-Project-Tag-List: IRC, client + diff --git a/irker.xml b/irker.xml index ea24347..c67c5e7 100644 --- a/irker.xml +++ b/irker.xml @@ -4,7 +4,7 @@ irker -8 +1 Aug 27 2012 irker irker @@ -18,11 +18,11 @@ irker - - - - - + -t + -p number + -n namesuffix + -d debuglevel + -V @@ -42,20 +42,74 @@ destination list, and "privmsg" specifying the message test. Examples: {"to":"irc://chat.freenode.net/git-ciabot", "privmsg":"Hello, world!"} {"to":["irc://chat.freenode.net/git-ciabot","irc://chat.freenode.net/gpsd"],"privmsg":"Multichannel test"} +{"to":"irc://chat.hypothetical.net:6668/git-ciabot", "privmsg":"Hello, world!"} - +The host part of the URL may have a port-number suffix separated by a +colon, as shown in the third example; otherwise +irker sends messages to the the default 6667 IRC +port of each server. -AUTHORS -Eric S. Raymond <esr@snark.thyrsus.com>. See ESR's home +OPTIONS + +irker takes the following options: + + + +-n +Takes a following value which sets the name suffix +for the nicks that irker uses. The default suffix is derived from the +FQDN of the site on which irker is running; the intent is to avoid +nick collisions by instances running on different sites. + + +-p +Takes a following value which sets the port on which the +daemon will listen. + + +-t +Accept TCP connections. The default is UDP. This choice +trades slightly increased latency for reliability of delivery. + + +-d +Takes a following value, seting the debugging level from +it. This option will generally only be of interest to developers; +consult the source code for details. + + +-V +Write the program version to stdout and +terminate. + + + + + +AUTHOR +Eric S. Raymond <esr@snark.thyrsus.com>. See the project page at http://www.catb.org/~esr/ for -updates and other resources. +url='http://www.catb.org/~esr/'>http://www.catb.org/~esr/irker +for updates and other resources. The implementation uses the Python IRC +library LIMITATIONS - +We accept requests via UDP, optimizing for lowest latency and +network load by avoiding TCP connection setup time; the cost is that +delivery is not reliable in the face of packet loss. But see the +description of the option above. + +No attempt at a content-based spam-filtering facility has been +made, since IRC servers have to do that anyway. An +irker instance with a publicly-accessible +request socket could complicate spam-blocking by making it easy for +spammers to submit while hiding their IP addresses; the better way to +deploy, then, is on places like project-hosting sites where the +irker socket can be visible from commit-hook +code but not exposed to the outside world. -- 2.26.2