summaryrefslogtreecommitdiff
path: root/net-irc
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-11-20 21:06:25 +0100
committerBertrand Jacquin <beber@meleeweb.net>2013-11-20 21:06:25 +0100
commit25e1568a74f759b3a8f78d62b2cc5aa41f708d4b (patch)
tree8ddf9ca3d46441d278cc0226f0229798cf5647db /net-irc
parentnet-irc/irker: Versionize patches (diff)
downloadportage-25e1568a74f759b3a8f78d62b2cc5aa41f708d4b.tar.xz
net-irc/irker: Version bump
Package-Manager: portage-2.2.7
Diffstat (limited to 'net-irc')
-rw-r--r--net-irc/irker/ChangeLog8
-rw-r--r--net-irc/irker/Manifest7
-rw-r--r--net-irc/irker/files/2.0-Git-Fixed-presentation-of-branches-containing-front-.patch39
-rw-r--r--net-irc/irker/files/2.0-Register-author_name-as-author-instead-of-email-user.patch32
-rw-r--r--net-irc/irker/files/2.0-irkerhook-Remove-file-listing.patch107
-rw-r--r--net-irc/irker/irker-2.0.ebuild54
6 files changed, 246 insertions, 1 deletions
diff --git a/net-irc/irker/ChangeLog b/net-irc/irker/ChangeLog
index 8b765d60..4f879ae0 100644
--- a/net-irc/irker/ChangeLog
+++ b/net-irc/irker/ChangeLog
@@ -1,3 +1,11 @@
+*irker-2.0 (20 Nov 2013)
+
+ 20 Nov 2013; Bertrand Jacquin <beber@meleeweb.net>
+ +files/2.0-Git-Fixed-presentation-of-branches-containing-front-.patch,
+ +files/2.0-Register-author_name-as-author-instead-of-email-user.patch,
+ +files/2.0-irkerhook-Remove-file-listing.patch, +irker-2.0.ebuild:
+ net-irc/irker: Version bump
+
20 Nov 2013; Bertrand Jacquin <beber@meleeweb.net>
+files/1.20-Fixed-utf-8-handling-in-metadata.patch,
+files/1.20-Git-Fixed-presentation-of-branches-containing-front-.patch,
diff --git a/net-irc/irker/Manifest b/net-irc/irker/Manifest
index 44777801..d70595ac 100644
--- a/net-irc/irker/Manifest
+++ b/net-irc/irker/Manifest
@@ -2,9 +2,14 @@ AUX 1.20-Fixed-utf-8-handling-in-metadata.patch 1049 SHA256 e3e308af155405a3b65d
AUX 1.20-Git-Fixed-presentation-of-branches-containing-front-.patch 1504 SHA256 b717332d181069b3059a5a3ad945bc2c76860e97e837b77e9d384ac4a3ba6695 WHIRLPOOL 22dc9f60a3f5510559856eee49b9975621f0551697b26923e7251ba77e84ad652e206dfde7df6a50114db3612e92a906aad8ec2368cfdc0c8a155965ff37e6b7
AUX 1.20-Register-author_name-as-author-instead-of-email-user.patch 1565 SHA256 80e9f3f969538c54d528b9438ad9b90a2a280215864181ef57340851e469c77e WHIRLPOOL cc6069301019e9e4a84682f6582d5b7709d97dd14649f62069fb9cf23616e418db0d47ff94398af9e3727f76bece10a23f4ec356c422ded86ba60660b8712bad
AUX 1.20-irkerhook-Remove-file-listing.patch 5971 SHA256 e885c10a463f3f29a5aa2d5659b023105f768b738541db94bf3ca654a05286fb WHIRLPOOL b94e1fa7f592671eb6188a66031c885be4ca3c0e8e3b17ee579cb62999bb9b6c8df63283531172e4df7bca809ad264ad38d9b77dcea9d19287c38732cc8217d9
+AUX 2.0-Git-Fixed-presentation-of-branches-containing-front-.patch 1498 SHA256 cab9650669d1836cfd91a6b3218ac0e28ff298547d20536a770dcf987153d3eb WHIRLPOOL def1f4322ba80b27c7381f664422e731c7364612c7902107dafa32ecfa0d1cabbac3a03483f7d757e756f73635b494c9c83ddca286a0f2c6c39ae1a5a6e8c2fa
+AUX 2.0-Register-author_name-as-author-instead-of-email-user.patch 1565 SHA256 1bc3c1f7566cacc08583c37f1a19ee1134d5a40f9938a919066595f95506447c WHIRLPOOL 098d36e2cb295d462390c32376883edc6bb97c2b9c0b1c53cf3e50beb44fce3501fb43084bb6947824ee2ba54bcd78207b083af0d95873d202f370aa6edf0f29
+AUX 2.0-irkerhook-Remove-file-listing.patch 5971 SHA256 d8283ccd00b83caf86a7e8e054313db57e1f2d51d27e097cb91121484127808b WHIRLPOOL f80130f989594f71f2f0aeafc7e600f82f95d94e2a220abe51f12e0486195154197f803e93855f1d085d66f52d51e2d3691c42a8665836f7a25816d9acd4b3d5
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
+DIST irker-2.0.tar.gz 37064 SHA256 7d92582330a05782108f6f2e266ed75f575474b038f4fbc7bc3858589fb40cec WHIRLPOOL cdcfe94ee7becc16564e1317b6d07f14eea03cea87e13128d0d25d077342b86fc7b654b26db0fa7652b82d70d3dc5f4d114211672a424e78b2c9a795cedc153e
EBUILD irker-1.20.ebuild 1679 SHA256 63836013301fa347a26a82b8270676a52f1cc90a9747544d12dd5bf8dc41a33f WHIRLPOOL 4827021ea8f5f5874d385239aa6de9b68d2d3e0768b0c40c1530ea46020e55ab591b4ea34a75098a873fe958dccbd79a5bdfc0ee7c3f53e6319a0317ccd6e9c4
-MISC ChangeLog 2069 SHA256 d446f58751894b846117dca0d044c93fe1f650e3e18786dbfd75545a45256cb0 WHIRLPOOL f82c3ddd9036234bb04b0c4c18a4d0b32ab249a9521522c2587a21637167020dd3b0d8929756de32aa37db09a4e32c1eb8aaf46351654911fb43b793560a83cf
+EBUILD irker-2.0.ebuild 1532 SHA256 f3b6502a2e27b9892e0b145597fac8d1fd2f76a2f6979f6db6c83f5bdbf788b1 WHIRLPOOL ab291ae77014ce9d6cc52bc3302f3db90c11992544065acb4908b395e0b471d3fdfb570af312a03aceae70a4cb3a55fb464c298ab57587c7baf3b3ca8714eaf5
+MISC ChangeLog 2394 SHA256 f1df22814c02a40990a23fb37e69ac3865e3431a3dab2c057f0e7b2a83d8d30d WHIRLPOOL 6a93b38abf663d59230a7bc7bde058c8e7eec0138301c65bc1d285695e49ce6eec881ccc9a5479f2a8acbe754ab31fac961fdc1affc41d28a1ceb14ca8f16800
MISC metadata.xml 251 SHA256 1dc1bab1ff96244c27b9b58c2fe2d28ce1a98c05f6524fac17a81bdcd7595126 WHIRLPOOL b295e8385062a941df1bd67b2fadb95b44b2d640189ad6b3c1deca82bd5204c7096a65bd681aa3120b248f71621c4d2224ae0849eb4e81030a2709e3fdefa752
diff --git a/net-irc/irker/files/2.0-Git-Fixed-presentation-of-branches-containing-front-.patch b/net-irc/irker/files/2.0-Git-Fixed-presentation-of-branches-containing-front-.patch
new file mode 100644
index 00000000..085c3464
--- /dev/null
+++ b/net-irc/irker/files/2.0-Git-Fixed-presentation-of-branches-containing-front-.patch
@@ -0,0 +1,39 @@
+From 32f9252f172934d542dfe61bf1e1acc6076ddbce Mon Sep 17 00:00:00 2001
+From: Tom Hacohen <tom@stosb.com>
+Date: Tue, 24 Sep 2013 16:45:42 +0100
+Subject: [PATCH] Git: Fixed presentation of branches containing front-slashes.
+
+Many projects use hierarchical branch names, for example:
+"devs/tasn/feature-branch"
+Before this commit, the branch above would be printed as "feature-branch"
+instead of "devs/tasn/feature-branch".
+---
+ irkerhook.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/irkerhook.py b/irkerhook.py
+index bfcfbea..b1de125 100755
+--- a/irkerhook.py
++++ b/irkerhook.py
+@@ -39,7 +39,7 @@ default_channels = "irc://chat.freenode.net/#commits"
+
+ version = "2.0"
+
+-import os, sys, commands, socket, urllib, subprocess, locale, datetime
++import os, sys, commands, socket, urllib, subprocess, locale, datetime, re
+ from pipes import quote as shellquote
+ try:
+ import simplejson as json # Faster, also makes us Python-2.5-compatible
+@@ -257,7 +257,8 @@ class GitExtractor(GenericExtractor):
+ def commit_factory(self, commit_id):
+ "Make a Commit object holding data for a specified commit ID."
+ commit = Commit(self, commit_id)
+- commit.branch = os.path.basename(self.refname)
++ # Get rid of refs/*/ for cleaner output.
++ commit.branch = re.sub(r"^refs/[^/]*/", "", self.refname)
+ # Compute a description for the revision
+ if self.revformat == 'raw':
+ commit.rev = commit.commit
+--
+1.8.4.3
+
diff --git a/net-irc/irker/files/2.0-Register-author_name-as-author-instead-of-email-user.patch b/net-irc/irker/files/2.0-Register-author_name-as-author-instead-of-email-user.patch
new file mode 100644
index 00000000..d34b5723
--- /dev/null
+++ b/net-irc/irker/files/2.0-Register-author_name-as-author-instead-of-email-user.patch
@@ -0,0 +1,32 @@
+From dd34537fe2042fd300388554e6667b9e0b8ee498 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 8087935..2a6c6da 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.4.3
+
diff --git a/net-irc/irker/files/2.0-irkerhook-Remove-file-listing.patch b/net-irc/irker/files/2.0-irkerhook-Remove-file-listing.patch
new file mode 100644
index 00000000..eb87ec19
--- /dev/null
+++ b/net-irc/irker/files/2.0-irkerhook-Remove-file-listing.patch
@@ -0,0 +1,107 @@
+From 3f906cac2506ec677d5dc8c8e03db8da8b478639 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <beber@meleeweb.net>
+Date: Mon, 7 Oct 2013 13:33:30 +0200
+Subject: [PATCH] irkerhook: Remove file listing
+
+---
+ irkerhook.py | 34 +++-------------------------------
+ 1 file changed, 3 insertions(+), 31 deletions(-)
+
+diff --git a/irkerhook.py b/irkerhook.py
+index 2a6c6da..bfcfbea 100755
+--- a/irkerhook.py
++++ b/irkerhook.py
+@@ -57,7 +57,6 @@ class Commit:
+ self.rev = None
+ self.mail = None
+ self.author = None
+- self.files = None
+ self.logmsg = None
+ self.url = None
+ self.author_date = None
+@@ -223,7 +222,7 @@ class GitExtractor(GenericExtractor):
+ self.channels = do("git config --get irker.channels")
+ self.email = do("git config --get irker.email")
+ self.tcp = do("git config --bool --get irker.tcp")
+- self.template = '%(bold)s%(project)s:%(reset)s %(green)s%(author)s%(reset)s %(repo)s:%(yellow)s%(branch)s%(reset)s * %(bold)s%(rev)s%(reset)s / %(bold)s%(files)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
++ self.template = '%(bold)s%(project)s:%(reset)s %(green)s%(author)s%(reset)s %(repo)s:%(yellow)s%(branch)s%(reset)s * %(bold)s%(rev)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
+ self.tinyifier = do("git config --get irker.tinyifier") or default_tinyifier
+ self.color = do("git config --get irker.color")
+ self.urlprefix = do("git config --get irker.urlprefix") or "gitweb"
+@@ -268,9 +267,6 @@ class GitExtractor(GenericExtractor):
+ commit.rev = do("git describe %s 2>/dev/null" % shellquote(commit.commit))
+ if not commit.rev:
+ commit.rev = commit.commit[:12]
+- # Extract the meta-information for the commit
+- commit.files = do("git diff-tree -r --name-only " + shellquote(commit.commit))
+- commit.files = " ".join(commit.files.strip().split("\n")[1:])
+ # 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.
+@@ -294,7 +290,7 @@ class SvnExtractor(GenericExtractor):
+ if tok.startswith("--repository="):
+ self.repository = tok[13:]
+ self.project = os.path.basename(self.repository)
+- self.template = '%(bold)s%(project)s%(reset)s: %(green)s%(author)s%(reset)s %(repo)s * %(bold)s%(rev)s%(reset)s / %(bold)s%(files)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
++ self.template = '%(bold)s%(project)s%(reset)s: %(green)s%(author)s%(reset)s %(repo)s * %(bold)s%(rev)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
+ self.urlprefix = "viewcvs"
+ self.load_preferences(os.path.join(self.repository, "irker.conf"))
+ self.do_overrides()
+@@ -308,7 +304,6 @@ class SvnExtractor(GenericExtractor):
+ commit.rev = "r%s" % self.id
+ commit.author = self.svnlook("author")
+ commit.commit_date = self.svnlook("date").partition('(')[0]
+- commit.files = self.svnlook("dirs-changed").strip().replace("\n", " ")
+ commit.logmsg = self.svnlook("log").strip()
+ return commit
+ def svnlook(self, info):
+@@ -352,7 +347,7 @@ class HgExtractor(GenericExtractor):
+ self.channels = ui.config('irker', 'channels')
+ self.email = ui.config('irker', 'email')
+ self.tcp = str(ui.configbool('irker', 'tcp')) # converted to bool again in do_overrides
+- self.template = '%(bold)s%(project)s:%(reset)s %(green)s%(author)s%(reset)s %(repo)s:%(yellow)s%(branch)s%(reset)s * %(bold)s%(rev)s%(reset)s / %(bold)s%(files)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
++ self.template = '%(bold)s%(project)s:%(reset)s %(green)s%(author)s%(reset)s %(repo)s:%(yellow)s%(branch)s%(reset)s * %(bold)s%(rev)s%(reset)s: %(logmsg)s %(brown)s%(url)s%(reset)s'
+ self.tinyifier = ui.config('irker', 'tinyifier') or default_tinyifier
+ self.color = ui.config('irker', 'color')
+ self.urlprefix = (ui.config('irker', 'urlprefix') or
+@@ -382,9 +377,6 @@ class HgExtractor(GenericExtractor):
+ commit.author_date = \
+ datetime.datetime.fromtimestamp(ctx.date()[0]).strftime('%Y-%m-%d %H:%M:%S')
+ commit.logmsg = ctx.description()
+- # Extract changed files from status against first parent
+- st = self.repository.status(ctx.p1().node(), ctx.node())
+- commit.files = ' '.join(st[0] + st[1] + st[2])
+ return commit
+
+ def hg_hook(ui, repo, **kwds):
+@@ -425,27 +417,7 @@ def ship(extractor, commit, debug):
+ sys.stderr.write("irkerhook.py: could not decode JSON: %s\n" % data)
+ raise SystemExit, 1
+
+- # Rewrite the file list if too long. The objective here is only
+- # to be easier on the eyes.
+- if extractor.cialike \
+- and extractor.cialike.lower() != "none" \
+- and len(metadata.files) > int(extractor.cialike):
+- files = metadata.files.split()
+- dirs = set([d.rpartition('/')[0] for d in files])
+- if len(dirs) == 1:
+- metadata.files = "(%s files)" % (len(files),)
+- else:
+- metadata.files = "(%s files in %s dirs)" % (len(files), len(dirs))
+- # Message reduction. The assumption here is that IRC can't handle
+- # lines more than 510 characters long. If we exceed that length, we
+- # try knocking out the file list, on the theory that for notification
+- # purposes the commit text is more important. If it's still too long
+- # there's nothing much can be done other than ship it expecting the IRC
+- # server to truncate.
+ privmsg = unicode(metadata)
+- if len(privmsg) > 510:
+- metadata.files = ""
+- privmsg = unicode(metadata)
+
+ # Anti-spamming guard. It's deliberate that we get maxchannels not from
+ # the user-filtered metadata but from the extractor data - means repo
+--
+1.8.4.3
+
diff --git a/net-irc/irker/irker-2.0.ebuild b/net-irc/irker/irker-2.0.ebuild
new file mode 100644
index 00000000..181a8bd1
--- /dev/null
+++ b/net-irc/irker/irker-2.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/irker/irker-1.20.ebuild,v 1.1 2013/05/22 03:40:55 patrick Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,2_6} )
+
+inherit python-single-r1 systemd eutils
+
+DESCRIPTION="Submission tools for IRC notifications"
+HOMEPAGE="http://www.catb.org/esr/irker/"
+SRC_URI="http://www.catb.org/esr/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto"
+
+src_prepare() {
+ # https://gitorious.org/irker/irker/merge_requests/25
+ epatch "${FILESDIR}/${PV}-Register-author_name-as-author-instead-of-email-user.patch"
+ # https://gitorious.org/irker/irker/merge_requests/24
+ epatch "${FILESDIR}/${PV}-Git-Fixed-presentation-of-branches-containing-front-.patch"
+
+ epatch "${FILESDIR}/${PV}-irkerhook-Remove-file-listing.patch"
+
+ # Rely on systemd eclass for systemd service install
+ sed -i -e "/^SYSTEMDSYSTEMUNITDIR/d" Makefile
+
+ # Prefix support
+ sed -i -e "/^ExecStart=/ s:=/:=${EROOT}:" irkerd.service
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+
+ python_doscript "${ED}/usr/bin/irkerd"
+ # Not installed with the default Makefile
+ python_doscript irk irkerhook.py
+
+ newinitd "${FILESDIR}/irkerd.initd" irkerd
+ newconfd "${FILESDIR}/irkerd.confd" irkerd
+
+ systemd_dounit irkerd.service
+
+ dodoc NEWS README hacking.txt security.txt
+ dohtml irkerd.html irkerhook.html
+
+ docinto examples
+ dodoc filter-example.py filter-test.py
+}