Package: pyrad Version: 1.1-5 Severity: minor Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu karmic ubuntu-patch
In Ubuntu, we've applied the attached patch to achieve the following: * Add debian/patches/01-python26_deprecation_warnings.patch patch to fix Python 2.6 DeprecationWarnings (LP: #385987), thanks to Devin Cook for the patch. We thought you might be interested in doing the same. -- System Information: Debian Release: 5.0 APT prefers jaunty-updates APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 'jaunty-backports'), (500, 'jaunty') Architecture: amd64 (x86_64) Kernel: Linux 2.6.28-11-generic (SMP w/2 CPU cores) Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -u pyrad-1.1/debian/rules pyrad-1.1/debian/rules --- pyrad-1.1/debian/rules +++ pyrad-1.1/debian/rules @@ -7,4 +7,5 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/python-distutils.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk diff -u pyrad-1.1/debian/changelog pyrad-1.1/debian/changelog only in patch2: unchanged: --- pyrad-1.1.orig/debian/patches/01-python26_deprecation_warnings.patch +++ pyrad-1.1/debian/patches/01-python26_deprecation_warnings.patch @@ -0,0 +1,72 @@ +diff -Nur -x '*.orig' -x '*~' pyrad-1.1/pyrad/packet.py pyrad-1.1.new/pyrad/packet.py +--- pyrad-1.1/pyrad/packet.py 2007-09-30 12:03:48.000000000 +0200 ++++ pyrad-1.1.new/pyrad/packet.py 2009-06-12 08:01:05.911534696 +0200 +@@ -11,7 +11,7 @@ + + __docformat__ = "epytext en" + +-import md5, struct, types, random, UserDict ++import hashlib, struct, types, random, UserDict + from pyrad import tools + + # Packet codes +@@ -249,7 +249,7 @@ + attr=self._PktEncodeAttributes() + header=struct.pack("!BBH", self.code, self.id, (20+len(attr))) + +- authenticator=md5.new(header[0:4] + self.authenticator ++ authenticator=hashlib.md5(header[0:4] + self.authenticator + + attr + self.secret).digest() + + return header + authenticator + attr +@@ -262,7 +262,7 @@ + if rawreply is None: + rawreply=reply.ReplyPacket() + +- hash=md5.new(rawreply[0:4] + self.authenticator + ++ hash=hashlib.md5(rawreply[0:4] + self.authenticator + + rawreply[20:] + self.secret).digest() + + if hash!=rawreply[4:20]: +@@ -413,7 +413,7 @@ + + last=self.authenticator + while buf: +- hash=md5.new(self.secret+last).digest() ++ hash=hashlib.md5(self.secret+last).digest() + for i in range(16): + pw+=chr(ord(hash[i]) ^ ord(buf[i])) + +@@ -447,12 +447,12 @@ + if len(password)%16!=0: + buf+="\x00" * (16-(len(password)%16)) + +- hash=md5.new(self.secret+self.authenticator).digest() ++ hash=hashlib.md5(self.secret+self.authenticator).digest() + result="" + + last=self.authenticator + while buf: +- hash=md5.new(self.secret+last).digest() ++ hash=hashlib.md5(self.secret+last).digest() + for i in range(16): + result+=chr(ord(hash[i]) ^ ord(buf[i])) + +@@ -494,7 +494,7 @@ + @rtype: boolean + """ + assert(self.raw_packet) +- hash=md5.new(self.raw_packet[0:4] + 16*"\x00" + ++ hash=hashlib.md5(self.raw_packet[0:4] + 16*"\x00" + + self.raw_packet[20:] + self.secret).digest() + + return hash==self.authenticator +@@ -517,7 +517,7 @@ + + header=struct.pack("!BBH", self.code, self.id, (20+len(attr))) + +- self.authenticator=md5.new(header[0:4] + 16 * "\x00" + attr ++ self.authenticator=hashlib.md5(header[0:4] + 16 * "\x00" + attr + + self.secret).digest() + + return header + self.authenticator + attr