ports/152413: [PATCH] net-im/py-xmpppy fix patch fix
Ildar Hizbulin
hizel at vyborg.ru
Fri Nov 19 21:30:10 UTC 2010
>Number: 152413
>Category: ports
>Synopsis: [PATCH] net-im/py-xmpppy fix patch fix
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Nov 19 21:30:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Ildar Hizbulin
>Release: 7.3-RELEASE-p2
>Organization:
Ariadna-Link, ISP
>Environment:
FreeBSD vpn2.vyborg.ru 7.3-RELEASE-p2 FreeBSD 7.3-RELEASE-p2 #1: Tue Jul 13 12:12:12 MSD 2010 root at vpn2.vyborg.ru:/usr/obj/usr/src/sys/VPN i386
>Description:
Fix previous patch
>How-To-Repeat:
I use py-jabberbot:
#!/usr/bin/env python
from jabberbot import JabberBot, botcmd
class ZeroJabberBot(JabberBot):
@botcmd
def whoami( self, mess, args):
"""Tells you your username"""
return mess.getFrom()
username = 'user at domain.com'
password = 'securepass'
bot = ZeroJabberBot(username,password)
bot.serve_forever()
after ran:
Traceback (most recent call last):
File "tstbot.py", line 15, in <module>
bot.serve_forever()
File "/usr/local/lib/python2.6/site-packages/jabberbot.py", line 411, in serve_forever
conn = self.connect()
File "/usr/local/lib/python2.6/site-packages/jabberbot.py", line 126, in connect
authres = conn.auth(self.jid.getNode(), self.__password, self.res)
File "/usr/local/lib/python2.6/site-packages/xmpp/client.py", line 225, in auth
while self.SASL.startsasl=='in-process' and self.Process(1): pass
File "/usr/local/lib/python2.6/site-packages/xmpp/dispatcher.py", line 303, in dispatch
handler['func'](session,stanza)
File "/usr/local/lib/python2.6/site-packages/xmpp/auth.py", line 204, in SASLHandler
A1=C([H(C([resp['username'],resp['realm'],self.password])),resp['nonce'],resp['cnonce']])
NameError: global name 'H' is not defined
>Fix:
diff -ruN py-xmpppy.orig/Makefile py-xmpppy/Makefile
--- py-xmpppy.orig/Makefile 2010-11-20 00:11:00.000000000 +0300
+++ py-xmpppy/Makefile 2010-11-20 00:15:11.000000000 +0300
@@ -7,7 +7,7 @@
PORTNAME= xmpppy
PORTVERSION= 0.5.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-im python
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}-rc1/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
diff -ruN py-xmpppy.orig/files/patch-xmpp-auth.py py-xmpppy/files/patch-xmpp-auth.py
--- py-xmpppy.orig/files/patch-xmpp-auth.py 2010-11-20 00:11:00.000000000 +0300
+++ py-xmpppy/files/patch-xmpp-auth.py 2010-11-20 00:11:28.000000000 +0300
@@ -22,7 +22,7 @@
+ """ For python version >= 2.6 """
+ def _SHA(some): return hashlib.sha1(some)
+ def HH(some): return hashlib.md5(some).hexdigest()
-+ def h(some): return hashlib.md5(some).digest()
++ def H(some): return hashlib.md5(some).digest()
+
+
class NonSASL(PlugIn):
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list