From bc0d1a98e9504d87e9b6bd5f155790c4ef7cbafb Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Wed, 19 Mar 2014 20:09:50 +0100 Subject: net-irc/irker: Version bump, TLS/SSL support, Python 3.2 and 3.3 support, depend on virtual/python-argparse Package-Manager: portage-2.2.8-r1 --- net-irc/irker/ChangeLog | 13 +++ net-irc/irker/Manifest | 16 ++-- ...resentation-of-branches-containing-front-.patch | 39 -------- ...thor_name-as-author-instead-of-email-user.patch | 32 ------- .../files/2.6-irkerhook-Remove-file-listing.patch | 105 --------------------- ...resentation-of-branches-containing-front-.patch | 39 ++++++++ ...thor_name-as-author-instead-of-email-user.patch | 32 +++++++ .../files/2.7-irkerhook-Remove-file-listing.patch | 105 +++++++++++++++++++++ net-irc/irker/files/irkerd.confd | 4 +- net-irc/irker/files/irkerd.initd | 4 +- net-irc/irker/irker-2.6.ebuild | 54 ----------- net-irc/irker/irker-2.7.ebuild | 56 +++++++++++ 12 files changed, 256 insertions(+), 243 deletions(-) delete mode 100644 net-irc/irker/files/2.6-Git-Fixed-presentation-of-branches-containing-front-.patch delete mode 100644 net-irc/irker/files/2.6-Register-author_name-as-author-instead-of-email-user.patch delete mode 100644 net-irc/irker/files/2.6-irkerhook-Remove-file-listing.patch create mode 100644 net-irc/irker/files/2.7-Git-Fixed-presentation-of-branches-containing-front-.patch create mode 100644 net-irc/irker/files/2.7-Register-author_name-as-author-instead-of-email-user.patch create mode 100644 net-irc/irker/files/2.7-irkerhook-Remove-file-listing.patch delete mode 100644 net-irc/irker/irker-2.6.ebuild create mode 100644 net-irc/irker/irker-2.7.ebuild (limited to 'net-irc/irker') diff --git a/net-irc/irker/ChangeLog b/net-irc/irker/ChangeLog index f15f1b0c..5396b96e 100644 --- a/net-irc/irker/ChangeLog +++ b/net-irc/irker/ChangeLog @@ -1,3 +1,16 @@ +*irker-2.7 (19 Mar 2014) + + 19 Mar 2014; Bertrand Jacquin + +files/2.7-Git-Fixed-presentation-of-branches-containing-front-.patch, + +files/2.7-Register-author_name-as-author-instead-of-email-user.patch, + +files/2.7-irkerhook-Remove-file-listing.patch, +irker-2.7.ebuild, + -files/2.6-Git-Fixed-presentation-of-branches-containing-front-.patch, + -files/2.6-Register-author_name-as-author-instead-of-email-user.patch, + -files/2.6-irkerhook-Remove-file-listing.patch, -irker-2.6.ebuild, + files/irkerd.confd, files/irkerd.initd: + net-irc/irker: Version bump, TLS/SSL support, Python 3.2 and 3.3 support, + depend on virtual/python-argparse + *irker-2.6 (15 Feb 2014) 15 Feb 2014; Bertrand Jacquin diff --git a/net-irc/irker/Manifest b/net-irc/irker/Manifest index 9f13a9a7..78412405 100644 --- a/net-irc/irker/Manifest +++ b/net-irc/irker/Manifest @@ -1,9 +1,9 @@ -AUX 2.6-Git-Fixed-presentation-of-branches-containing-front-.patch 1544 SHA256 9d3b9cabb5ee4aa475fd4c4b6c301a4686db1b52ca36d0c59670a1f063424c02 WHIRLPOOL 96e50a1370e8738be3f6709caa5e533ce00f7c5eb14869f0458d729fa21b809927093d35ee122dcd281e8066641e77875e14662e9b212228bedd0a178308fa5c -AUX 2.6-Register-author_name-as-author-instead-of-email-user.patch 1637 SHA256 8f16155c0d282e0f0fbdf33296cf0924a7605a46b7312ae43482f91220d163f7 WHIRLPOOL feb626593e672bf030b88499c4dd082c1846872799467b72a8819e541de4765d64d0ba2b07f03cdc220bf575ed5dc5173b92f7501e0f7fc852fd3a6a32b87b66 -AUX 2.6-irkerhook-Remove-file-listing.patch 6023 SHA256 36ed70840b34270b15f24f9c22ed62e28f40baccbf5dfa59cfc40bf8918f9573 WHIRLPOOL 2b6e15e4039b70e5c6102de84e8a88b0f6a2425af33faf0be9b1a33e95328a1e1b24a19c61997fa1b51fef9a06883c1e37fc5849fffc4a0fe0390568f1cd26a1 -AUX irkerd.confd 500 SHA256 9f0c3754562843a4916c1208d3d68ad6af9cc903905bf1d57585641e876c7146 WHIRLPOOL 9159e614acc00b19af1ac376b880e773f8611b6fff3925a01781e1f7984e45ce38e624a3b19211f593923d435a96d76b9a0145f00fd0b46fc9dd36b0249c3d67 -AUX irkerd.initd 1403 SHA256 061fa09132477b79cb96277e0fac0ab96e7da96e4f80742f3fa261b7ec1ca99b WHIRLPOOL 6fabd5ee39a90f5c0708b1eb5527b5951cf1c3601266398b3ec50054621bdedab18326fc52a1e7e05c57439e4e736a1afcd4047c1bfeb3ee9c203b8245090d1b -DIST irker-2.6.tar.gz 38576 SHA256 510ab5efc9d2702c08751cbe6ffbfe570c0835cd194e33ced4a62812f9c669c8 WHIRLPOOL f016986b940224465263206be6fb165f360558251fe16fd51d62af14a8e5f9230fde53e016091cb1f23923e3fe9917c35c97b4113b62209212cf6a1a0b657cff -EBUILD irker-2.6.ebuild 1532 SHA256 34222777d61e019471bab4b9b6191be8c246a0f0b75c9d3605f199ba5aca17cb WHIRLPOOL 13dbc06362d4a07c8964e9b1117692cc3d63e0bc0d4fd5ac3f00e900465de92ff4c33e70bf10bb600911b0f268900927f6f9a8b19a0ab0c1dcc2f427ddd16e15 -MISC ChangeLog 3827 SHA256 26610fc0d01ab439d3f237497575657dacf91438d791369841ddaddec6e2423d WHIRLPOOL 93e8cd29fa378d5663651e665d03c1f4450459904695fa0a1ac96ba4703a4d5cb69471d4ca7faeb03c57d7fe341a53970b7d7fed20163f9c29f29c98d909aeaa +AUX 2.7-Git-Fixed-presentation-of-branches-containing-front-.patch 1544 SHA256 332b325839a412fd0f17f96aa14b898bdfabfcc8da933f49381f74f698f19dc8 WHIRLPOOL cf4690211055b611156d1498e325a2612a01b6f413627d04a1bb7a8f278c50f8a4c1d80a8d0f2188a6a3af1add1544725a0466bc87f01600fe0cff186ba4f45b +AUX 2.7-Register-author_name-as-author-instead-of-email-user.patch 1637 SHA256 c742b823b0a14452604d63b6ad5a4f5490f6c923641ddda1ec46fc714a37fed4 WHIRLPOOL a27111384b551daaad88d44441686d6ed939b6e70bdf20509bd699580f970c28b1b046294590c15c0affcf6d68e034be81ee397c0b48b833ff89249ef487fd3a +AUX 2.7-irkerhook-Remove-file-listing.patch 6023 SHA256 97ff5bbdfb91dd0c07f339e248fa67acc030502d855784dff0f1b9aff6da6a1e WHIRLPOOL 862b9f2b4a35be9b9f92f07861656c8e4a33d602b76229e95473cbc87dad849eb2db4eb043d25dab7dfa41cc549a667e41f2ea8fc9192985ce2887b3303fd791 +AUX irkerd.confd 508 SHA256 e564b3427f08be4bc232afcbed5e86caf129153e88da113f87b81342904d8a5e WHIRLPOOL d89c267abd723477ef7ee2b03d7958a1cb4db032a3d29efa865ca7be9e92a151672d432974774259df45cc217dd5ad48a92f7362cf427f8161e0eb9065f2e703 +AUX irkerd.initd 1401 SHA256 0cd9461cd6c2b260eeb726b4028d9aa2dfbe70ed4511f8c7dd0c1112175df6aa WHIRLPOOL 99c16fada3c9547cdbe4d007e5fd0cc8c068fa16193127385d83f549acdd0bdd5bb3b0da8f49ea0dc849626a217c2c38dc66ed94ba9e5d7d52468dbd56a81801 +DIST irker-2.7.tar.gz 39679 SHA256 d4d2513e7baa9282f461d128a52ca0e6b7f22600c0c674734ef29119a14bb779 WHIRLPOOL 0893ddaee80d4bf13d4d5f3ec4e0b55e7212bba29909b7c2532bcdfb901cb833a990e7e217063cb6b2e20404f699b8fb1ccd184803afec0cf13f4afd83df92bb +EBUILD irker-2.7.ebuild 1604 SHA256 4014830dceeab395f87dda80a1364b0fdf3b1ae14f22d67e7c8fe42011af24b9 WHIRLPOOL 3af56af954fcdc30e919eada4c5f22012d636b107d77ff46d89be74adfcca7c492d1c1a16fea3d43122c8a766a8daa856c6df3ca6c6179e4976469957e4f14ac +MISC ChangeLog 4491 SHA256 1b97bd68fa35ceae34b2af92a54a6a7576009f05a389f1b23a093964717efc19 WHIRLPOOL 0945a26c196d2de07f3099a5a63636d2c7bdf96df0b14bd870546c458a95e2fbb7d74c407e2e2cea6c7837ff30098c1ed9795f3134af09b01eb33c49d6938a80 MISC metadata.xml 251 SHA256 1dc1bab1ff96244c27b9b58c2fe2d28ce1a98c05f6524fac17a81bdcd7595126 WHIRLPOOL b295e8385062a941df1bd67b2fadb95b44b2d640189ad6b3c1deca82bd5204c7096a65bd681aa3120b248f71621c4d2224ae0849eb4e81030a2709e3fdefa752 diff --git a/net-irc/irker/files/2.6-Git-Fixed-presentation-of-branches-containing-front-.patch b/net-irc/irker/files/2.6-Git-Fixed-presentation-of-branches-containing-front-.patch deleted file mode 100644 index 6cc3f5dc..00000000 --- a/net-irc/irker/files/2.6-Git-Fixed-presentation-of-branches-containing-front-.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f940f895e7e7eccf12fc319a4ec94126ae87aebf Mon Sep 17 00:00:00 2001 -From: Tom Hacohen -Date: Tue, 24 Sep 2013 16:45:42 +0100 -Subject: [PATCH 3/3] 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". - -Signed-off-by: Bertrand Jacquin ---- - irkerhook.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/irkerhook.py b/irkerhook.py -index 00a33b0..47aacd1 100755 ---- a/irkerhook.py -+++ b/irkerhook.py -@@ -39,7 +39,7 @@ default_channels = "irc://chat.freenode.net/#commits" - - version = "2.6" - --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 -@@ -258,7 +258,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 diff --git a/net-irc/irker/files/2.6-Register-author_name-as-author-instead-of-email-user.patch b/net-irc/irker/files/2.6-Register-author_name-as-author-instead-of-email-user.patch deleted file mode 100644 index 8217cae4..00000000 --- a/net-irc/irker/files/2.6-Register-author_name-as-author-instead-of-email-user.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 31f3aeef70d29fef4dca6c73bde427f13e241d77 Mon Sep 17 00:00:00 2001 -From: Bertrand Jacquin -Date: Mon, 23 Sep 2013 23:10:23 +0200 -Subject: [PATCH 1/3] Register author_name as author instead of email userpart - -Signed-off-by: Bertrand Jacquin ---- - irkerhook.py | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -diff --git a/irkerhook.py b/irkerhook.py -index d17248a..603e7f1 100755 ---- a/irkerhook.py -+++ b/irkerhook.py -@@ -275,15 +275,8 @@ class GitExtractor(GenericExtractor): - # Design choice: for git we ship only the first message line, which is - # conventionally supposed to be a summary of the commit. Under - # other VCSes a different choice may be appropriate. -- commit.author_name, commit.mail, commit.logmsg = \ -- do("git log -1 '--pretty=format:%an%n%ae%n%s' " + shellquote(commit.commit)).split("\n") -- # 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("|") -+ commit.logmsg = do("git log -1 '--pretty=format:%s' " + shellquote(commit.commit)) -+ commit.author = do("git log -1 '--pretty=format:%an' " + shellquote(commit.commit)) - return commit - - class SvnExtractor(GenericExtractor): diff --git a/net-irc/irker/files/2.6-irkerhook-Remove-file-listing.patch b/net-irc/irker/files/2.6-irkerhook-Remove-file-listing.patch deleted file mode 100644 index 8ab55a4d..00000000 --- a/net-irc/irker/files/2.6-irkerhook-Remove-file-listing.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 0b363f9cf303048df8dbc63fd037d50f2919ccf5 Mon Sep 17 00:00:00 2001 -From: Bertrand Jacquin -Date: Mon, 7 Oct 2013 13:33:30 +0200 -Subject: [PATCH 2/3] irkerhook: Remove file listing - -Signed-off-by: Bertrand Jacquin ---- - irkerhook.py | 34 +++------------------------------- - 1 file changed, 3 insertions(+), 31 deletions(-) - -diff --git a/irkerhook.py b/irkerhook.py -index 603e7f1..00a33b0 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 -@@ -224,7 +223,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" -@@ -269,9 +268,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 message line, which is - # conventionally supposed to be a summary of the commit. Under - # other VCSes a different choice may be appropriate. -@@ -292,7 +288,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() -@@ -306,7 +302,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): -@@ -350,7 +345,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 -@@ -380,9 +375,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): -@@ -423,27 +415,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 diff --git a/net-irc/irker/files/2.7-Git-Fixed-presentation-of-branches-containing-front-.patch b/net-irc/irker/files/2.7-Git-Fixed-presentation-of-branches-containing-front-.patch new file mode 100644 index 00000000..84e14a07 --- /dev/null +++ b/net-irc/irker/files/2.7-Git-Fixed-presentation-of-branches-containing-front-.patch @@ -0,0 +1,39 @@ +From 6bcd90c94d2faf586f2730c591de8175238b043d Mon Sep 17 00:00:00 2001 +From: Tom Hacohen +Date: Tue, 24 Sep 2013 16:45:42 +0100 +Subject: [PATCH 3/3] 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". + +Signed-off-by: Bertrand Jacquin +--- + irkerhook.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/irkerhook.py b/irkerhook.py +index f2f82cf..82281e3 100755 +--- a/irkerhook.py ++++ b/irkerhook.py +@@ -39,7 +39,7 @@ default_channels = "irc://chat.freenode.net/#commits" + + version = "2.7" + +-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 +@@ -258,7 +258,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 diff --git a/net-irc/irker/files/2.7-Register-author_name-as-author-instead-of-email-user.patch b/net-irc/irker/files/2.7-Register-author_name-as-author-instead-of-email-user.patch new file mode 100644 index 00000000..a19da1f4 --- /dev/null +++ b/net-irc/irker/files/2.7-Register-author_name-as-author-instead-of-email-user.patch @@ -0,0 +1,32 @@ +From 108e898c600cf7a80a3d01a83a270c7579460b42 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Mon, 23 Sep 2013 23:10:23 +0200 +Subject: [PATCH 1/3] Register author_name as author instead of email userpart + +Signed-off-by: Bertrand Jacquin +--- + irkerhook.py | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/irkerhook.py b/irkerhook.py +index 5f15032..36a875e 100755 +--- a/irkerhook.py ++++ b/irkerhook.py +@@ -275,15 +275,8 @@ class GitExtractor(GenericExtractor): + # Design choice: for git we ship only the first message line, which is + # conventionally supposed to be a summary of the commit. Under + # other VCSes a different choice may be appropriate. +- commit.author_name, commit.mail, commit.logmsg = \ +- do("git log -1 '--pretty=format:%an%n%ae%n%s' " + shellquote(commit.commit)).split("\n") +- # 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("|") ++ commit.logmsg = do("git log -1 '--pretty=format:%s' " + shellquote(commit.commit)) ++ commit.author = do("git log -1 '--pretty=format:%an' " + shellquote(commit.commit)) + return commit + + class SvnExtractor(GenericExtractor): diff --git a/net-irc/irker/files/2.7-irkerhook-Remove-file-listing.patch b/net-irc/irker/files/2.7-irkerhook-Remove-file-listing.patch new file mode 100644 index 00000000..cbbb38c2 --- /dev/null +++ b/net-irc/irker/files/2.7-irkerhook-Remove-file-listing.patch @@ -0,0 +1,105 @@ +From 82376d74107035950ef4181fdc889ae9409378b6 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Mon, 7 Oct 2013 13:33:30 +0200 +Subject: [PATCH 2/3] irkerhook: Remove file listing + +Signed-off-by: Bertrand Jacquin +--- + irkerhook.py | 34 +++------------------------------- + 1 file changed, 3 insertions(+), 31 deletions(-) + +diff --git a/irkerhook.py b/irkerhook.py +index 36a875e..f2f82cf 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 +@@ -224,7 +223,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" +@@ -269,9 +268,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 message line, which is + # conventionally supposed to be a summary of the commit. Under + # other VCSes a different choice may be appropriate. +@@ -292,7 +288,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() +@@ -306,7 +302,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): +@@ -350,7 +345,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 +@@ -380,9 +375,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): +@@ -423,27 +415,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 diff --git a/net-irc/irker/files/irkerd.confd b/net-irc/irker/files/irkerd.confd index 09baa6a5..f176e624 100644 --- a/net-irc/irker/files/irkerd.confd +++ b/net-irc/irker/files/irkerd.confd @@ -10,9 +10,7 @@ # handle this logfile # IRKERD_LOGFILE="" -# Debug Level -# 1: info -# 2: complete debug +# Debug Level (critical, error, warning, info, debug) # IRKERD_LOGLEVEL="" # To run an anonymous irkerd safely. It should not able able diff --git a/net-irc/irker/files/irkerd.initd b/net-irc/irker/files/irkerd.initd index ee8dbda8..dcc1dfb5 100755 --- a/net-irc/irker/files/irkerd.initd +++ b/net-irc/irker/files/irkerd.initd @@ -1,5 +1,5 @@ #!/sbin/runscript -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # 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 $ @@ -16,7 +16,7 @@ depend() { } start () { - if (( IRKERD_LOGLEVEL != 0 )) ; then + if [[ ${IRKERD_LOGLEVEL} ]] ; then IRKERD_OPTS="${IRKERD_OPTS} -d ${IRKERD_LOGLEVEL}" ewarn "IRKERD_LOGLEVEL is intended to be used for debugging purpose only" diff --git a/net-irc/irker/irker-2.6.ebuild b/net-irc/irker/irker-2.6.ebuild deleted file mode 100644 index 12c610bf..00000000 --- a/net-irc/irker/irker-2.6.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2014 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 -} diff --git a/net-irc/irker/irker-2.7.ebuild b/net-irc/irker/irker-2.7.ebuild new file mode 100644 index 00000000..9009f846 --- /dev/null +++ b/net-irc/irker/irker-2.7.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2014 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_6,2_7,3_2,3_3} ) +PYTHON_REQ_USE="ssl" + +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="virtual/python-argparse[${PYTHON_USEDEP}] + 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 +} -- cgit v1.2.3