summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metadata/md5-cache/net-irc/irker-1.202
-rw-r--r--net-irc/irker/ChangeLog8
-rw-r--r--net-irc/irker/Manifest9
-rw-r--r--net-irc/irker/files/0001-Register-author_name-as-author-instead-of-email-user.patch32
-rw-r--r--net-irc/irker/files/irkerd.confd21
-rwxr-xr-x[-rw-r--r--]net-irc/irker/files/irkerd.initd44
-rw-r--r--net-irc/irker/irker-1.20.ebuild6
7 files changed, 105 insertions, 17 deletions
diff --git a/metadata/md5-cache/net-irc/irker-1.20 b/metadata/md5-cache/net-irc/irker-1.20
index dee1273e..09708847 100644
--- a/metadata/md5-cache/net-irc/irker-1.20
+++ b/metadata/md5-cache/net-irc/irker-1.20
@@ -10,4 +10,4 @@ RDEPEND==dev-lang/python-2* dev-python/irc
SLOT=0
SRC_URI=http://www.catb.org/esr/irker/irker-1.20.tar.gz
_eclasses_=eutils 4878e7f88afc0ba0866ac112190b0fd4 multilib 892e597faee02a5b94eb02ab512e7622 python-single-r1 2ca20eea86d11878e6bcd127a81af868 python-utils-r1 a4940acdd0a5ebdc58aaedd38de4983a systemd e80fe2d5b43ec0f0160c6e8ef931fa4c toolchain-funcs 7ffd28a8c7eea27218865352bfd3ab2f user d0a4d0735a6c0183d707ca919bd72f28
-_md5_=bc472ec071764eecdb3c4c4e621305fa
+_md5_=652aa32b7c7f080d885879020b73e8f5
diff --git a/net-irc/irker/ChangeLog b/net-irc/irker/ChangeLog
index 55ba2012..2fec67da 100644
--- a/net-irc/irker/ChangeLog
+++ b/net-irc/irker/ChangeLog
@@ -1,3 +1,11 @@
+ 23 Sep 2013; Bertrand Jacquin <beber@meleeweb.net>
+ +files/0001-Register-author_name-as-author-instead-of-email-user.patch,
+ files/irkerd.confd, files/irkerd.initd, irker-1.20.ebuild:
+ net-irc/irker: Define all supported irkerd options to confd, this eas the
+ logfile and loglevel handling, create logfile with correct permissions, close
+ stdin (in a bad way as ssd don't work as expected), use author name instead of
+ userpart email when sending messages
+
23 Sep 2013; Bertrand Jacquin <beber@meleeweb.net> irker-1.20.ebuild:
net-irc/irker: install missing irk binary
diff --git a/net-irc/irker/Manifest b/net-irc/irker/Manifest
index c020c989..c3986599 100644
--- a/net-irc/irker/Manifest
+++ b/net-irc/irker/Manifest
@@ -1,6 +1,7 @@
-AUX irkerd.confd 248 SHA256 7a67991746dee79d538ce2c16338aba985f5198f67bafc5ad60bf6c59e628587 WHIRLPOOL 485909f7495d986fae9d6402b67a92b6aed2643086d58da085d15288acbe1e75290671215b10b4b6966dd11b56d6105880097aaa0abcd9230917ed0f2bb70b79
-AUX irkerd.initd 457 SHA256 e8811c796aeca6e1c3d3ac9285d31c6a759e7c5b7e27009f2779a5678256c522 WHIRLPOOL 8b6968297bfde80285a4c36422a7b5f4a825473d54cefa33df4ede081db38f10f79b815f7521b5ab64cb25fa50a94433003826827feb81846ec0313cc7fc162c
+AUX 0001-Register-author_name-as-author-instead-of-email-user.patch 1565 SHA256 80e9f3f969538c54d528b9438ad9b90a2a280215864181ef57340851e469c77e WHIRLPOOL cc6069301019e9e4a84682f6582d5b7709d97dd14649f62069fb9cf23616e418db0d47ff94398af9e3727f76bece10a23f4ec356c422ded86ba60660b8712bad
+AUX irkerd.confd 500 SHA256 9f0c3754562843a4916c1208d3d68ad6af9cc903905bf1d57585641e876c7146 WHIRLPOOL 9159e614acc00b19af1ac376b880e773f8611b6fff3925a01781e1f7984e45ce38e624a3b19211f593923d435a96d76b9a0145f00fd0b46fc9dd36b0249c3d67
+AUX irkerd.initd 1403 SHA256 061fa09132477b79cb96277e0fac0ab96e7da96e4f80742f3fa261b7ec1ca99b WHIRLPOOL 6fabd5ee39a90f5c0708b1eb5527b5951cf1c3601266398b3ec50054621bdedab18326fc52a1e7e05c57439e4e736a1afcd4047c1bfeb3ee9c203b8245090d1b
DIST irker-1.20.tar.gz 33436 SHA256 c8d1552a819a1ebe7c6c7be06ff44c50557beddb75735ff6765a7c36df3536dd WHIRLPOOL b66fc9579534a32d05f090c4d6c82bcb9da5b50fdeaf4f934103fc3967d1eed0e13e89a7ec38246113898042fd52189e368c633a7ef1f945d370241813e6ab6a
-EBUILD irker-1.20.ebuild 1221 SHA256 fe79ea20e8136446e3bd95786b9052283347a02ad8c1936d1b79b96eead9c7cb WHIRLPOOL 781dbd4d470b20789ce66bea28675f21d44a6d52a37ec0f57199952621202c53986b35263d779d0a41f7b922c9a34ca34f85661ffa23a2da4bbfb9dde4fb7460
-MISC ChangeLog 415 SHA256 7fc61b0c2205719ddddd07e03c0aac0df7e4e85bb4b93abdf5ebaea47963d1bb WHIRLPOOL 8f64ad2ed6ee150ed59408ccf7fae62aadf86aa4d727517183d2f0fde24eed48239485a288ff14bff8473a70ba42603bb62b85522ef91851414d9fbaf8bcbd38
+EBUILD irker-1.20.ebuild 1315 SHA256 b7de27c28fef2fc77a28115b73fc9a54b34e38835c547387696053bac1acf9a7 WHIRLPOOL cc10091c62c81821a00f2c7511942b3cd878ecbf1960e5e10479499a38b223a4a12a99eb361d8fda6ae3c08cc37e2fe01b959889a7f34fae0477f5c1090bd388
+MISC ChangeLog 880 SHA256 56d0a4e362b7ff32677c3b6b57b2217bc3c12407569b96a9636e0ac8bc380dd1 WHIRLPOOL 1c39dc8fb3514496641a11b26e3dced691f624188dc44a33241101b2bfb66e53191075956f6279199f58fa40f9945545728ee0f5cd1d0170172175506890cce6
MISC metadata.xml 251 SHA256 1dc1bab1ff96244c27b9b58c2fe2d28ce1a98c05f6524fac17a81bdcd7595126 WHIRLPOOL b295e8385062a941df1bd67b2fadb95b44b2d640189ad6b3c1deca82bd5204c7096a65bd681aa3120b248f71621c4d2224ae0849eb4e81030a2709e3fdefa752
diff --git a/net-irc/irker/files/0001-Register-author_name-as-author-instead-of-email-user.patch b/net-irc/irker/files/0001-Register-author_name-as-author-instead-of-email-user.patch
new file mode 100644
index 00000000..0042684f
--- /dev/null
+++ b/net-irc/irker/files/0001-Register-author_name-as-author-instead-of-email-user.patch
@@ -0,0 +1,32 @@
+From 33596784f1ef15aaa985e8ec9667eaa692e3d179 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <beber@meleeweb.net>
+Date: Mon, 23 Sep 2013 23:10:23 +0200
+Subject: [PATCH] Register author_name as author instead of email userpart
+
+---
+ irkerhook.py | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/irkerhook.py b/irkerhook.py
+index 4b243a2..566c990 100755
+--- a/irkerhook.py
++++ b/irkerhook.py
+@@ -274,14 +274,9 @@ class GitExtractor(GenericExtractor):
+ # Design choice: for git we ship only the first line, which is
+ # conventionally supposed to be a summary of the commit. Under
+ # other VCSes a different choice may be appropriate.
+- commit.author_name = do("git log -1 '--pretty=format:%an' " + shellquote(commit.commit))
++ commit.author = do("git log -1 '--pretty=format:%an' " + shellquote(commit.commit))
+ commit.mail = do("git log -1 '--pretty=format:%ae' " + shellquote(commit.commit))
+ commit.logmsg = do("git log -1 '--pretty=format:%s' " + shellquote(commit.commit))
+- # This discards the part of the author's address after @.
+- # Might be be nice to ship the full email address, if not
+- # for spammers' address harvesters - getting this wrong
+- # would make the freenode #commits channel into harvester heaven.
+- commit.author = commit.mail.split("@")[0]
+ commit.author_date, commit.commit_date = \
+ do("git log -1 '--pretty=format:%ai|%ci' " + shellquote(commit.commit)).split("|")
+ return commit
+--
+1.8.3.2
+
diff --git a/net-irc/irker/files/irkerd.confd b/net-irc/irker/files/irkerd.confd
index bd0676ae..09baa6a5 100644
--- a/net-irc/irker/files/irkerd.confd
+++ b/net-irc/irker/files/irkerd.confd
@@ -1,8 +1,23 @@
# /etc/conf.d/irkerd: config file for /etc/init.d/irkerd
-# see man pages for irkerd for valid cmdline options
-#IRKERD_OPTS=""
+# Nick-Serv login
+# IRKERD_NICK=""
+
+# Nick-Server password
+# IRKERD_PASSWORD=""
+
+# Log file, intended for debug purpose only, no logrotate will
+# handle this logfile
+# IRKERD_LOGFILE=""
+
+# Debug Level
+# 1: info
+# 2: complete debug
+# IRKERD_LOGLEVEL=""
# To run an anonymous irkerd safely. It should not able able
# to write to anywhere on your system
-IRKERD_USER="nobody"
+# IRKERD_USER=""
+
+# see man pages for irkerd for valid cmdline options
+# IRKERD_OPTS=""
diff --git a/net-irc/irker/files/irkerd.initd b/net-irc/irker/files/irkerd.initd
index d2442188..ee8dbda8 100644..100755
--- a/net-irc/irker/files/irkerd.initd
+++ b/net-irc/irker/files/irkerd.initd
@@ -3,15 +3,45 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-irc/irker/files/irker.init,v 1.1 2012/10/13 05:53:35 patrick Exp $
+: ${pidfile:=/run/${RC_SVCNAME}.pid}
+
+: ${IRKERD_NICK:=}
+: ${IRKERD_PASSWORD:=}
+: ${IRKERD_LOGFILE:=/var/log/${RC_SVCNAME}.log}
+: ${IRKERD_LOGLEVEL:=0}
: ${IRKERD_USER:=nobody}
-command="/usr/bin/irkerd"
-command_args="${IRKERD_OPTS}"
-command_background="yes"
-pidfile="/run/${SVCNAME}.pid"
+depend() {
+ use net
+}
-start_stop_daemon_args="--user '${IRKERD_USER}' --make-pidfile"
+start () {
+ if (( IRKERD_LOGLEVEL != 0 )) ; then
+ IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}"
-depend() {
- use net
+ ewarn "IRKERD_LOGLEVEL is intended to be used for debugging purpose only"
+ ewarn "No logrotate can handle ${IRKERD_LOGFILE}"
+
+ checkpath -f \
+ -o "${IRKERD_USER}" \
+ "${IRKERD_LOGFILE}" \
+ || return 1
+ fi
+
+ if [[ -z "${IRKERD_USER}" ]] ; then
+ die "IRKERD_USER is mandatory"
+ fi
+
+ [[ -n "${IRKERD_LOGFILE}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -l ${IRKERD_LOGFILE}"
+ [[ -n "${IRKERD_NICK}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -n ${IRKERD_NICK}"
+ [[ -n "${IRKERD_PASSWORD}" ]] && IRKERD_OPTS="${IRKERD_OPTS} -p ${IRKERD_PASSWORD}"
+
+ ebegin "Starting ${RC_SVCNAME}"
+ start-stop-daemon --start \
+ --quiet --background \
+ --user "${IRKERD_USER}" \
+ --make-pidfile --pidfile "${pidfile}" \
+ --exec /usr/bin/irkerd \
+ -- ${IRKERD_OPTS} < /dev/null
+ eend $?
}
diff --git a/net-irc/irker/irker-1.20.ebuild b/net-irc/irker/irker-1.20.ebuild
index e2844425..2ce1eac4 100644
--- a/net-irc/irker/irker-1.20.ebuild
+++ b/net-irc/irker/irker-1.20.ebuild
@@ -5,7 +5,7 @@
EAPI=5
PYTHON_COMPAT=( python{2_7,2_6} )
-inherit python-single-r1 systemd
+inherit python-single-r1 systemd eutils
DESCRIPTION="Submission tools for IRC notifications"
HOMEPAGE="http://www.catb.org/esr/irker/"
@@ -22,6 +22,8 @@ RDEPEND="=dev-lang/python-2*
dev-python/irc"
src_prepare() {
+ epatch "${FILESDIR}/0001-Register-author_name-as-author-instead-of-email-user.patch"
+
# Rely on systemd eclass for systemd service install
sed -i -e "/^SYSTEMDSYSTEMUNITDIR/d" Makefile
@@ -33,7 +35,7 @@ src_install() {
emake DESTDIR="${ED}" install
python_doscript "${ED}/usr/bin/irkerd"
- # Not installed with the default makefile
+ # Not installed with the default Makefile
python_doscript irk irkerhook.py
newinitd "${FILESDIR}/irkerd.initd" irkerd