--- Begin Message ---
Package: release.debian.org
User: release.debian....@packages.debian.org
Usertags: unblock
Please unblock package limnoria.
It is a new upstream, yes, but
1) it's a leaf package
2) it has a very extensive testsuite
3) the changes are so minimal...
4) it fixes the only bug this package has ;)
Attached a debdiff against the current version in stretch.
unblock limnoria/2017.01.10-1
--
regards,
Mattia Rizzolo
GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`.
more about me: https://mapreri.org : :' :
Launchpad user: https://launchpad.net/~mapreri `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
diffstat for limnoria-2016.12.08 limnoria-2017.01.10
PKG-INFO | 2 -
debian/changelog | 9 +++++
debian/rules | 1
plugins/Channel/plugin.py | 9 +----
plugins/Debug/plugin.py | 2 +
plugins/Google/plugin.py | 2 -
plugins/Unix/test.py | 6 ++-
scripts/supybot | 2 -
scripts/supybot-test | 5 ++
src/irclib.py | 78 ++++++++++++++++++++++++++++++++++++++--------
src/test.py | 1
src/version.py | 2 -
12 files changed, 94 insertions(+), 25 deletions(-)
diff -Nru limnoria-2016.12.08/debian/changelog
limnoria-2017.01.10/debian/changelog
--- limnoria-2016.12.08/debian/changelog 2016-12-15 08:40:27.000000000
+0100
+++ limnoria-2017.01.10/debian/changelog 2017-01-31 11:59:27.000000000
+0100
@@ -1,3 +1,12 @@
+limnoria (2017.01.10-1) unstable; urgency=medium
+
+ * New upstream version 2017.01.10.
+ * d/rules: use the new --no-setuid to skip tests that might require a
+ setuid binary (like /bin/ping in some hosts without settcap) as they
+ wouldn't work under libeatmydata. Closes: #834950
+
+ -- Mattia Rizzolo <mat...@debian.org> Tue, 31 Jan 2017 11:59:27 +0100
+
limnoria (2016.12.08-1) unstable; urgency=medium
* New upstream version 2016.12.08.
diff -Nru limnoria-2016.12.08/debian/rules limnoria-2017.01.10/debian/rules
--- limnoria-2016.12.08/debian/rules 2016-12-04 14:48:31.000000000 +0100
+++ limnoria-2017.01.10/debian/rules 2017-01-31 11:58:29.000000000 +0100
@@ -13,6 +13,7 @@
PYBUILD_TEST_ARGS="PYTHONPATH={build_dir} \
build/scripts-{version}/supybot-test \
test \
+ --no-setuid \
--no-network \
--disable-multiprocessing \
--plugins-dir={build_dir}/supybot/plugins/" \
diff -Nru limnoria-2016.12.08/PKG-INFO limnoria-2017.01.10/PKG-INFO
--- limnoria-2016.12.08/PKG-INFO 2016-12-08 21:11:36.000000000 +0100
+++ limnoria-2017.01.10/PKG-INFO 2017-01-27 00:14:32.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: limnoria
-Version: 2016.12.08
+Version: 2017.01.10
Summary: A modified version of Supybot (an IRC bot and framework)
Home-page: https://github.com/ProgVal/Limnoria
Author: Valentin Lorentz
diff -Nru limnoria-2016.12.08/plugins/Channel/plugin.py
limnoria-2017.01.10/plugins/Channel/plugin.py
--- limnoria-2016.12.08/plugins/Channel/plugin.py 2016-12-08
21:11:26.000000000 +0100
+++ limnoria-2017.01.10/plugins/Channel/plugin.py 2017-01-27
00:13:31.000000000 +0100
@@ -909,10 +909,9 @@
# Make sure we don't elicit information about private channels to
# people or channels that shouldn't know
capability = ircdb.makeChannelCapability(channel, 'op')
- hostmask = irc.state.nickToHostmask(msg.nick)
if 's' in irc.state.channels[channel].modes and \
msg.args[0] != channel and \
- not ircdb.checkCapability(hostmask, capability) and \
+ not ircdb.checkCapability(msg.prefix, capability) and \
(ircutils.isChannel(msg.args[0]) or \
msg.nick not in irc.state.channels[channel].users):
irc.error(_('You don\'t have access to that information.'),
@@ -937,8 +936,7 @@
if frm is not None:
s += format(_(' (from %s)'), frm)
for nick in irc.state.channels[channel].users:
- hostmask = irc.state.nickToHostmask(nick)
- if ircdb.checkCapability(hostmask, capability):
+ if ircdb.checkCapability(msg.prefix, capability):
irc.reply(s, to=nick, private=True)
irc.replySuccess()
@@ -969,8 +967,7 @@
else:
irc.error(Raise=True)
capability = ircdb.makeChannelCapability(channel, 'op')
- hostmask = irc.state.nickToHostmask(msg.nick)
- if not ircdb.checkCapabilities(hostmask, [capability, 'admin']):
+ if not ircdb.checkCapabilities(msg.prefix, [capability, 'admin']):
irc.errorNoCapability(capability, Raise=True)
try:
network = conf.supybot.networks.get(irc.network)
diff -Nru limnoria-2016.12.08/plugins/Debug/plugin.py
limnoria-2017.01.10/plugins/Debug/plugin.py
--- limnoria-2016.12.08/plugins/Debug/plugin.py 2016-12-08 21:11:26.000000000
+0100
+++ limnoria-2017.01.10/plugins/Debug/plugin.py 2017-01-27 00:13:31.000000000
+0100
@@ -34,6 +34,8 @@
a Supybot developer requests you to debug some issue.
"""
+# Import supybot for easier access to the module namespace
+import supybot
import supybot.plugins as plugins
import gc
diff -Nru limnoria-2016.12.08/plugins/Google/plugin.py
limnoria-2017.01.10/plugins/Google/plugin.py
--- limnoria-2016.12.08/plugins/Google/plugin.py 2016-12-08
21:11:26.000000000 +0100
+++ limnoria-2017.01.10/plugins/Google/plugin.py 2017-01-27
00:13:31.000000000 +0100
@@ -292,7 +292,7 @@
Returns <text> translated from <source language> into <target
language>. <source language> and <target language> take language
codes (not language names), which are listed here:
-
https://cloud.google.com/translate/v2/translate-reference#supported_languages
+ https://cloud.google.com/translate/docs/languages
"""
channel = msg.args[0]
(text, language) = self._translate(sourceLang, targetLang, text)
diff -Nru limnoria-2016.12.08/plugins/Unix/test.py
limnoria-2017.01.10/plugins/Unix/test.py
--- limnoria-2016.12.08/plugins/Unix/test.py 2016-12-08 21:11:26.000000000
+0100
+++ limnoria-2017.01.10/plugins/Unix/test.py 2017-01-27 00:13:31.000000000
+0100
@@ -48,9 +48,11 @@
'aspell/ispell not available.')
skipUnlessFortune = skipIf(utils.findBinaryInPath('fortune') is None,
'fortune not available.')
- skipUnlessPing = skipIf(utils.findBinaryInPath('ping') is None,
+ skipUnlessPing = skipIf(
+ utils.findBinaryInPath('ping') is None or not setuid,
'ping not available.')
- skipUnlessPing6 = skipIf(utils.findBinaryInPath('ping6') is None,
+ skipUnlessPing6 = skipIf(
+ utils.findBinaryInPath('ping6') is None or not setuid,
'ping6 not available.')
class UnixConfigTestCase(ChannelPluginTestCase):
diff -Nru limnoria-2016.12.08/scripts/supybot
limnoria-2017.01.10/scripts/supybot
--- limnoria-2016.12.08/scripts/supybot 2016-12-08 21:11:26.000000000 +0100
+++ limnoria-2017.01.10/scripts/supybot 2017-01-27 00:13:31.000000000 +0100
@@ -208,7 +208,7 @@
# The registry *MUST* be opened before importing log or conf.
i18n.getLocaleFromRegistryFilename(registryFilename)
registry.open_registry(registryFilename)
- shutil.copy(registryFilename, registryFilename + '.bak')
+ shutil.copyfile(registryFilename, registryFilename + '.bak')
except registry.InvalidRegistryFile as e:
s = '%s in %s. Please fix this error and start supybot again.' % \
(e, registryFilename)
diff -Nru limnoria-2016.12.08/scripts/supybot-test
limnoria-2017.01.10/scripts/supybot-test
--- limnoria-2016.12.08/scripts/supybot-test 2016-12-08 21:11:26.000000000
+0100
+++ limnoria-2017.01.10/scripts/supybot-test 2017-01-27 00:13:31.000000000
+0100
@@ -138,6 +138,9 @@
parser.add_option('', '--no-network', action='store_true', default=False,
dest='nonetwork', help='Causes the network-based tests '
'not to run.')
+ parser.add_option('', '--no-setuid', action='store_true', default=False,
+ dest='nosetuid', help='Causes the tests based on a '
+ 'setuid executable not to run.')
parser.add_option('', '--trace', action='store_true', default=False,
help='Traces all calls made. Unless you\'re really in '
'a pinch, you probably shouldn\'t do this; it results '
@@ -184,6 +187,8 @@
if options.nonetwork:
test.network = False
+ if options.nosetuid:
+ test.setuid = False
log.testing = True
world.testing = True
diff -Nru limnoria-2016.12.08/src/irclib.py limnoria-2017.01.10/src/irclib.py
--- limnoria-2016.12.08/src/irclib.py 2016-12-08 21:11:26.000000000 +0100
+++ limnoria-2017.01.10/src/irclib.py 2017-01-27 00:13:31.000000000 +0100
@@ -35,10 +35,14 @@
import collections
try:
- from ecdsa import SigningKey, BadDigestError
- ecdsa = True
+ import ecdsa
except ImportError:
- ecdsa = False
+ ecdsa = None
+
+try:
+ import pyxmpp2_scram as scram
+except ImportError:
+ scram = None
from . import conf, ircdb, ircmsgs, ircutils, log, utils, world
from .utils.str import rsplit
@@ -994,6 +998,7 @@
self.sasl_username = network_config.sasl.username()
self.sasl_password = network_config.sasl.password()
self.sasl_ecdsa_key = network_config.sasl.ecdsa_key()
+ self.sasl_scram_state = {'step': 'uninitialized'}
self.authenticate_decoder = None
self.sasl_next_mechanisms = []
self.sasl_current_mechanism = None
@@ -1006,6 +1011,9 @@
network_config.certfile() or
conf.supybot.protocols.irc.certfile()):
self.sasl_next_mechanisms.append(mechanism)
+ elif mechanism.startswith('scram-') and scram and \
+ self.sasl_username and self.sasl_password:
+ self.sasl_next_mechanisms.append(mechanism)
elif mechanism == 'plain' and \
self.sasl_username and self.sasl_password:
self.sasl_next_mechanisms.append(mechanism)
@@ -1101,20 +1109,24 @@
mechanism = self.sasl_current_mechanism
if mechanism == 'ecdsa-nist256p-challenge':
- if string == b'':
- self.sendSaslString(self.sasl_username.encode('utf-8'))
- return
+ self.doAuthenticateEcdsa(string)
+ elif mechanism == 'external':
+ self.sendSaslString(b'')
+ elif mechanism.startswith('scram-'):
+ step = self.sasl_scram_state['step']
try:
- with open(self.sasl_ecdsa_key) as fd:
- private_key = SigningKey.from_pem(fd.read())
- authstring =
private_key.sign(base64.b64decode(msg.args[0].encode()))
- self.sendSaslString(authstring)
- except (BadDigestError, OSError, ValueError):
+ if step == 'uninitialized':
+ self.doAuthenticateScramFirst()
+ elif step == 'first-sent':
+ self.doAuthenticateScramChallenge(string)
+ elif step == 'final-sent':
+ self.doAuthenticateScramFinish(string)
+ else:
+ assert False
+ except scram.ScramException:
self.sendMsg(ircmsgs.IrcMsg(command='AUTHENTICATE',
args=('*',)))
self.tryNextSaslMechanism()
- elif mechanism == 'external':
- self.sendSaslString(b'')
elif mechanism == 'plain':
authstring = b'\0'.join([
self.sasl_username.encode('utf-8'),
@@ -1123,6 +1135,46 @@
])
self.sendSaslString(authstring)
+ def doAuthenticateEcdsa(self, string):
+ if string == b'':
+ self.sendSaslString(self.sasl_username.encode('utf-8'))
+ return
+ try:
+ with open(self.sasl_ecdsa_key) as fd:
+ private_key = ecdsa.SigningKey.from_pem(fd.read())
+ authstring = private_key.sign(string)
+ self.sendSaslString(authstring)
+ except (ecdsa.BadDigestError, OSError, ValueError):
+ self.sendMsg(ircmsgs.IrcMsg(command='AUTHENTICATE',
+ args=('*',)))
+ self.tryNextSaslMechanism()
+
+ def doAuthenticateScramFirst(self):
+ """Handle sending the client-first message of SCRAM auth."""
+ hash_name = mechanism[len('scram-'):]
+ if hash_name.endswith('-plus'):
+ hash_name = hash_name[:-len('-plus')]
+ authenticator = scram.SCRAMClientAuthenticator(hash_name,
+ channel_binding=False)
+ self.sasl_scram_state['authenticator'] = authenticator
+ client_first = authenticator.start({
+ 'username': self.sasl_username,
+ 'password': self.sasl_password,
+ })
+ self.sendSaslString(client_first)
+ self.sasl_scram_state['step'] = 'first-sent'
+
+ def doAuthenticateScramChallenge(self, challenge):
+ client_final = self.sasl_scram_state['authenticator'] \
+ .challenge(challenge)
+ self.sasl_scram_state['step'] = 'final-sent'
+
+ def doAuthenticateScramFinish(self, data):
+ # TODO: do something with BadSuccessException
+ res = self.sasl_scram_state['authenticator'] \
+ .finish(data)
+ self.sasl_scram_state['step'] = 'authenticated'
+
def do903(self, msg):
log.info('%s: SASL authentication successful', self.network)
self.sasl_authenticated = True
diff -Nru limnoria-2016.12.08/src/test.py limnoria-2017.01.10/src/test.py
--- limnoria-2016.12.08/src/test.py 2016-12-08 21:11:26.000000000 +0100
+++ limnoria-2017.01.10/src/test.py 2017-01-27 00:13:31.000000000 +0100
@@ -59,6 +59,7 @@
i18n.import_conf()
network = True
+setuid = True
# This is the global list of suites that are to be run.
suites = []
diff -Nru limnoria-2016.12.08/src/version.py limnoria-2017.01.10/src/version.py
--- limnoria-2016.12.08/src/version.py 2016-12-08 21:11:36.000000000 +0100
+++ limnoria-2017.01.10/src/version.py 2017-01-27 00:14:32.000000000 +0100
@@ -1,4 +1,4 @@
-version = '2016.12.08'
+version = '2017.01.10'
try: # For import from setup.py
import supybot.utils.python
supybot.utils.python._debug_software_version = version
signature.asc
Description: PGP signature
--- End Message ---