[Python-modules-commits] r2331 - in /packages/python-dns/trunk/debian: ./ patches/

kitterma-guest at users.alioth.debian.org kitterma-guest at users.alioth.debian.org
Fri May 11 21:40:17 UTC 2007


Author: kitterma-guest
Date: Fri May 11 21:40:16 2007
New Revision: 2331

URL: http://svn.debian.org/wsvn/python-modules/?sc=1&rev=2331
Log:
Add patches 01 - 08, update debian/changelog, adjust debian/control, add debian/pycompat

Added:
    packages/python-dns/trunk/debian/patches/
    packages/python-dns/trunk/debian/patches/01resolv-conf-parse.patch
    packages/python-dns/trunk/debian/patches/02utf-8.patch
    packages/python-dns/trunk/debian/patches/03socket-error-trap.patch
    packages/python-dns/trunk/debian/patches/04lazy-init.patch
    packages/python-dns/trunk/debian/patches/05addr2bin2addr.patch
    packages/python-dns/trunk/debian/patches/06win32-fix.patch
    packages/python-dns/trunk/debian/patches/07unpacker.patch
    packages/python-dns/trunk/debian/patches/08import-lib.patch
    packages/python-dns/trunk/debian/pycompat
Modified:
    packages/python-dns/trunk/debian/changelog
    packages/python-dns/trunk/debian/control

Modified: packages/python-dns/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/changelog?rev=2331&op=diff
==============================================================================
--- packages/python-dns/trunk/debian/changelog (original)
+++ packages/python-dns/trunk/debian/changelog Fri May 11 21:40:16 2007
@@ -2,16 +2,28 @@
 
   * New maintainer
   * Acknowledge NMU, thanks Raphael Hertzog; (closes: #373528).
+    - NMU also provided Python 2.4 packages (closes: #326155).
   * debian/control:
     - Add Debian Python Modules Team as uploader 
     - Update standards version to 3.7.2
     - Update python-support build-depends to version (>= 0.3) and move from 
       Indep to build-depends
     - Add XS-Vcs-Svn
-  * debian/pyversions added
+    - Removed XS-Python-Version and XB-Python-Version
+  * debian/pyversions and debian/pycompat added
   * Add simple-patchsys.mk to debian/rules
   * Bump compat to 5
-  * TODO: Add patches for fixes
+  * BTS Patches:
+    - 01resolv-conf-parse patch, thanks to Arnaud Fontaine <arnaud at andesi.org> 
+      (closes: #378991)
+  * Changes from Ubuntu (SF = Sourceforge project bug #) (closes: #411138):
+    - 02utf-8 patch for files with UTF-8 content
+    - 03socket-error-trap patch, Added DNSError trap for socket.error.
+    - 04lazy-init SF 1563723 lazy should initilize defaults['server']
+    - 05addr2bin2addr SF 863364 Mac OS X, Win2000 DHCP, addr2bin and bin2addr.
+    - 06win32-fix SF 1180344 win32dns.py fails on windows server 2003
+    - 07unpacker SF 954095 Bug in DNS.Lib.Unpacker.getbyte()
+    - 08import-lib SF 658601 Missing "import Lib"; for TCP protocol
 
  -- Scott Kitterman <scott at kitterman.com>  Fri, 11 May 2007 10:29:03 -0400
 

Modified: packages/python-dns/trunk/debian/control
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/control?rev=2331&op=diff
==============================================================================
--- packages/python-dns/trunk/debian/control (original)
+++ packages/python-dns/trunk/debian/control Fri May 11 21:40:16 2007
@@ -4,14 +4,12 @@
 Maintainer: Scott Kitterman <scott at kitterman.com>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>, Joerg Wendland <joergland at debian.org>
 Build-Depends: debhelper (>= 5.0.37.1), python-dev, cdbs (>= 0.4.41), python-support (>= 0.3)
-XS-Python-Version: all
 XS-Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-dns/trunk
 Standards-Version: 3.7.2
 
 Package: python-dns
 Architecture: all
 Depends: ${python:Depends}
-XB-Python-Version: ${python:Versions}
 Description: pydns - DNS client module for Python
  This Python module provides an DNS API for looking up
  DNS entries with Python applications.

Added: packages/python-dns/trunk/debian/patches/01resolv-conf-parse.patch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/patches/01resolv-conf-parse.patch?rev=2331&op=file
==============================================================================
--- packages/python-dns/trunk/debian/patches/01resolv-conf-parse.patch (added)
+++ packages/python-dns/trunk/debian/patches/01resolv-conf-parse.patch Fri May 11 21:40:16 2007
@@ -1,0 +1,12 @@
+diff -Nur python-dns-2.3.0/DNS/Base.py python-dns-2.3.0.new/DNS/Base.py
+--- python-dns-2.3.0/DNS/Base.py	2002-04-23 02:04:27.000000000 -0400
++++ python-dns-2.3.0.new/DNS/Base.py	2007-05-11 16:40:52.000000000 -0400
+@@ -29,7 +29,7 @@
+         if not line or line[0]==';' or line[0]=='#':
+             continue
+         fields=string.split(line)
+-        if len(fields) == 0: 
++        if len(fields) < 2: 
+             continue
+         if fields[0]=='domain':
+             defaults['domain']=fields[1]

Added: packages/python-dns/trunk/debian/patches/02utf-8.patch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/patches/02utf-8.patch?rev=2331&op=file
==============================================================================
--- packages/python-dns/trunk/debian/patches/02utf-8.patch (added)
+++ packages/python-dns/trunk/debian/patches/02utf-8.patch Fri May 11 21:40:16 2007
@@ -1,0 +1,16 @@
+diff -Nur python-dns-2.3.0/DNS/Lib.py python-dns-2.3.0.new/DNS/Lib.py
+--- python-dns-2.3.0/DNS/Lib.py	2002-04-05 08:15:16.000000000 -0500
++++ python-dns-2.3.0.new/DNS/Lib.py	2007-05-11 16:50:54.000000000 -0400
+@@ -1,3 +1,4 @@
++# -*- encoding: utf-8 -*-
+ """
+  $Id: Lib.py,v 1.11 2002/03/19 13:05:02 anthonybaxter Exp $
+ 
+diff -Nur python-dns-2.3.0/DNS/Type.py python-dns-2.3.0.new/DNS/Type.py
+--- python-dns-2.3.0/DNS/Type.py	2002-04-05 08:15:17.000000000 -0500
++++ python-dns-2.3.0.new/DNS/Type.py	2007-05-11 16:50:05.000000000 -0400
+@@ -1,3 +1,4 @@
++# -*- encoding: utf-8 -*-
+ """
+  $Id: Type.py,v 1.6 2002/03/19 12:41:33 anthonybaxter Exp $
+ 

Added: packages/python-dns/trunk/debian/patches/03socket-error-trap.patch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/patches/03socket-error-trap.patch?rev=2331&op=file
==============================================================================
--- packages/python-dns/trunk/debian/patches/03socket-error-trap.patch (added)
+++ packages/python-dns/trunk/debian/patches/03socket-error-trap.patch Fri May 11 21:40:16 2007
@@ -1,0 +1,21 @@
+diff -Nur python-dns-2.3.0/DNS/Base.py python-dns-2.3.0.new/DNS/Base.py
+--- python-dns-2.3.0/DNS/Base.py	2007-05-11 16:53:00.000000000 -0400
++++ python-dns-2.3.0.new/DNS/Base.py	2007-05-11 16:56:40.000000000 -0400
+@@ -169,10 +169,13 @@
+               1, 0, 0, 0)
+         m.addQuestion(qname, qtype, Class.IN)
+         self.request = m.getbuf()
+-        if protocol == 'udp':
+-            self.sendUDPRequest(server)
+-        else:
+-            self.sendTCPRequest(server)
++        try:
++            if protocol == 'udp':
++                self.sendUDPRequest(server)
++            else:
++                self.sendTCPRequest(server)
++        except socket.error, reason:
++            raise DNSError, reason
+         if self.async:
+             return None
+         else:

Added: packages/python-dns/trunk/debian/patches/04lazy-init.patch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/patches/04lazy-init.patch?rev=2331&op=file
==============================================================================
--- packages/python-dns/trunk/debian/patches/04lazy-init.patch (added)
+++ packages/python-dns/trunk/debian/patches/04lazy-init.patch Fri May 11 21:40:16 2007
@@ -1,0 +1,19 @@
+diff -Nur python-dns-2.3.0/DNS/lazy.py python-dns-2.3.0.new/DNS/lazy.py
+--- python-dns-2.3.0/DNS/lazy.py	2002-05-06 02:14:38.000000000 -0400
++++ python-dns-2.3.0.new/DNS/lazy.py	2007-05-11 17:04:10.000000000 -0400
+@@ -12,6 +12,7 @@
+ 
+ def revlookup(name):
+     "convenience routine for doing a reverse lookup of an address"
++    if Base.defaults['server'] == []: Base.DiscoverNameServers()
+     a = string.split(name, '.')
+     a.reverse()
+     b = string.join(a, '.')+'.in-addr.arpa'
+@@ -23,6 +24,7 @@
+     convenience routine for doing an MX lookup of a name. returns a
+     sorted list of (preference, mail exchanger) records
+     """
++    if Base.defaults['server'] == []: Base.DiscoverNameServers()
+     a = Base.DnsRequest(name, qtype = 'mx').req().answers
+     l = map(lambda x:x['data'], a)
+     l.sort()

Added: packages/python-dns/trunk/debian/patches/05addr2bin2addr.patch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/patches/05addr2bin2addr.patch?rev=2331&op=file
==============================================================================
--- packages/python-dns/trunk/debian/patches/05addr2bin2addr.patch (added)
+++ packages/python-dns/trunk/debian/patches/05addr2bin2addr.patch Fri May 11 21:40:16 2007
@@ -1,0 +1,88 @@
+diff -Nur python-dns-2.3.0/DNS/Base.py python-dns-2.3.0.new/DNS/Base.py
+--- python-dns-2.3.0/DNS/Base.py	2007-05-11 17:06:00.000000000 -0400
++++ python-dns-2.3.0.new/DNS/Base.py	2007-05-11 17:08:44.000000000 -0400
+@@ -31,7 +31,7 @@
+         fields=string.split(line)
+         if len(fields) < 2: 
+             continue
+-        if fields[0]=='domain':
++        if fields[0]=='domain' and len(fields) > 1:
+             defaults['domain']=fields[1]
+         if fields[0]=='search':
+             pass
+diff -Nur python-dns-2.3.0/DNS/Lib.py python-dns-2.3.0.new/DNS/Lib.py
+--- python-dns-2.3.0/DNS/Lib.py	2007-05-11 17:06:00.000000000 -0400
++++ python-dns-2.3.0.new/DNS/Lib.py	2007-05-11 17:11:46.000000000 -0400
+@@ -39,6 +39,7 @@
+ 
+ from struct import pack as struct_pack
+ from struct import unpack as struct_unpack
++from socket import inet_ntoa, inet_aton
+ 
+ def pack16bit(n):
+     return struct_pack('!H', n)
+@@ -53,17 +54,10 @@
+     return struct_unpack('!L', s)[0]
+ 
+ def addr2bin(addr):
+-    if type(addr) == type(0): return addr
+-    bytes = addr.split('.')
+-    if len(bytes) != 4: raise ValueError, 'bad IP address'
+-    n = 0
+-    for byte in bytes: n = n<<8 | int(byte)
+-    return n
++    return struct_unpack('!l', inet_aton(addr))[0]
+ 
+ def bin2addr(n):
+-    return '%d.%d.%d.%d' % ((n>>24)&0xFF, (n>>16)&0xFF,
+-                  (n>>8)&0xFF, n&0xFF)
+-
++    return inet_ntoa(struct_pack('!L', n))
+ 
+ # Packing class
+ 
+diff -Nur python-dns-2.3.0/tests/test2.py python-dns-2.3.0.new/tests/test2.py
+--- python-dns-2.3.0/tests/test2.py	2002-04-05 08:15:18.000000000 -0500
++++ python-dns-2.3.0.new/tests/test2.py	2007-05-11 17:12:38.000000000 -0400
+@@ -1,4 +1,4 @@
+-#!/opt/python/bin/python1.5
++#!/usr/bin/python
+ 
+ import sys ; sys.path.insert(0, '..')
+ import DNS
+diff -Nur python-dns-2.3.0/tests/test4.py python-dns-2.3.0.new/tests/test4.py
+--- python-dns-2.3.0/tests/test4.py	2002-04-05 08:15:18.000000000 -0500
++++ python-dns-2.3.0.new/tests/test4.py	2007-05-11 17:12:56.000000000 -0400
+@@ -1,4 +1,4 @@
+-#!/opt/python/bin/python
++#!/usr/bin/python
+ 
+ import sys ; sys.path.insert(0, '..')
+ 
+diff -Nur python-dns-2.3.0/tests/test5.py python-dns-2.3.0.new/tests/test5.py
+--- python-dns-2.3.0/tests/test5.py	2002-04-05 08:15:18.000000000 -0500
++++ python-dns-2.3.0.new/tests/test5.py	2007-05-11 17:13:46.000000000 -0400
+@@ -1,4 +1,4 @@
+-#!/opt/python/bin/python
++#!/usr/bin/python/
+ 
+ import sys ; sys.path.insert(0, '..')
+ 
+diff -Nur python-dns-2.3.0/tests/test.py python-dns-2.3.0.new/tests/test.py
+--- python-dns-2.3.0/tests/test.py	2002-04-05 08:15:18.000000000 -0500
++++ python-dns-2.3.0.new/tests/test.py	2007-05-11 17:14:30.000000000 -0400
+@@ -1,4 +1,4 @@
+-#!/opt/python/bin/python1.5
++#!/usr/bin/python
+ 
+ import sys ; sys.path.insert(0, '..')
+ 
+diff -Nur python-dns-2.3.0/tests/testsrv.py python-dns-2.3.0.new/tests/testsrv.py
+--- python-dns-2.3.0/tests/testsrv.py	2002-04-05 08:15:18.000000000 -0500
++++ python-dns-2.3.0.new/tests/testsrv.py	2007-05-11 17:14:47.000000000 -0400
+@@ -1,4 +1,4 @@
+-#!/opt/python/bin/python1.5
++#!usr/bin/python
+ 
+ import sys ; sys.path.insert(0, '..')
+ 

Added: packages/python-dns/trunk/debian/patches/06win32-fix.patch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/patches/06win32-fix.patch?rev=2331&op=file
==============================================================================
--- packages/python-dns/trunk/debian/patches/06win32-fix.patch (added)
+++ packages/python-dns/trunk/debian/patches/06win32-fix.patch Fri May 11 21:40:16 2007
@@ -1,0 +1,20 @@
+diff -Nur python-dns-2.3.0/DNS/win32dns.py python-dns-2.3.0.new/DNS/win32dns.py
+--- python-dns-2.3.0/DNS/win32dns.py	2002-05-06 02:15:31.000000000 -0400
++++ python-dns-2.3.0.new/DNS/win32dns.py	2007-05-11 17:18:41.000000000 -0400
+@@ -60,10 +60,13 @@
+         except EnvironmentError:
+             pass
+         return nameservers # no idea
+-
+-    nameserver = _winreg.QueryValueEx(y,"NameServer")[0]
++    try:
++        nameserver = _winreg.QueryValueEx(y, "DhcpNameServer")[0].split()
++    except:
++        nameserver = _winreg.QueryValueEx(y, "NameServer")[0].split()
+     if nameserver:
+-        nameservers=[nameserver]
++        nameservers=nameserver
++    nameserver = _winreg.QueryValueEx(y,"NameServer")[0]
+     _winreg.CloseKey(y)
+     try: # for win2000
+         y= _winreg.OpenKey(x,

Added: packages/python-dns/trunk/debian/patches/07unpacker.patch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/patches/07unpacker.patch?rev=2331&op=file
==============================================================================
--- packages/python-dns/trunk/debian/patches/07unpacker.patch (added)
+++ packages/python-dns/trunk/debian/patches/07unpacker.patch Fri May 11 21:40:16 2007
@@ -1,0 +1,12 @@
+diff -Nur python-dns-2.3.0/DNS/Lib.py python-dns-2.3.0.new/DNS/Lib.py
+--- python-dns-2.3.0/DNS/Lib.py	2007-05-11 17:20:34.000000000 -0400
++++ python-dns-2.3.0.new/DNS/Lib.py	2007-05-11 17:22:14.000000000 -0400
+@@ -160,7 +160,7 @@
+         self.buf = buf
+         self.offset = 0
+     def getbyte(self):
+-        if self.offset > len(self.buf):
++        if self.offset >= len(self.buf):
+             raise UnpackError, "Ran off end of data"
+         c = self.buf[self.offset]
+         self.offset = self.offset + 1

Added: packages/python-dns/trunk/debian/patches/08import-lib.patch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/patches/08import-lib.patch?rev=2331&op=file
==============================================================================
--- packages/python-dns/trunk/debian/patches/08import-lib.patch (added)
+++ packages/python-dns/trunk/debian/patches/08import-lib.patch Fri May 11 21:40:16 2007
@@ -1,0 +1,11 @@
+diff -Nur python-dns-2.3.0/DNS/Base.py python-dns-2.3.0.new/DNS/Base.py
+--- python-dns-2.3.0/DNS/Base.py	2007-05-11 17:23:44.000000000 -0400
++++ python-dns-2.3.0.new/DNS/Base.py	2007-05-11 17:27:23.000000000 -0400
+@@ -204,6 +204,7 @@
+ 
+     def sendTCPRequest(self, server):
+         " do the work of sending a TCP request "
++        import time, Lib
+         self.response=None
+         for self.ns in server:
+             try:

Added: packages/python-dns/trunk/debian/pycompat
URL: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/debian/pycompat?rev=2331&op=file
==============================================================================
--- packages/python-dns/trunk/debian/pycompat (added)
+++ packages/python-dns/trunk/debian/pycompat Fri May 11 21:40:16 2007
@@ -1,0 +1,1 @@
+2




More information about the Python-modules-commits mailing list