[Python-modules-commits] r5934 - in packages/python-dns/trunk/debian (6 files)

kitterma-guest at users.alioth.debian.org kitterma-guest at users.alioth.debian.org
Fri Jul 11 05:42:34 UTC 2008


    Date: Friday, July 11, 2008 @ 05:42:32
  Author: kitterma-guest
Revision: 5934

* Add patch to provide random TID in most cases 
* Switch to python-central
* Packaging cleanups

Added:
  packages/python-dns/trunk/debian/README.source
  packages/python-dns/trunk/debian/patches/
  packages/python-dns/trunk/debian/patches/tid-random.patch
Modified:
  packages/python-dns/trunk/debian/changelog
  packages/python-dns/trunk/debian/control
  packages/python-dns/trunk/debian/rules

Added: packages/python-dns/trunk/debian/README.source
===================================================================
--- packages/python-dns/trunk/debian/README.source	                        (rev 0)
+++ packages/python-dns/trunk/debian/README.source	2008-07-11 05:42:32 UTC (rev 5934)
@@ -0,0 +1,4 @@
+This package uses CDBS simple patchsys.  dpkg-source -x does produce source
+ready for building with dpkg-buildpackage.  It does not procude source ready
+for editing.  To edit or update a patch, use cdbs-edit-patch.  See man
+cdbs-edit-patch for details.

Modified: packages/python-dns/trunk/debian/changelog
===================================================================
--- packages/python-dns/trunk/debian/changelog	2008-07-10 18:09:55 UTC (rev 5933)
+++ packages/python-dns/trunk/debian/changelog	2008-07-11 05:42:32 UTC (rev 5934)
@@ -1,5 +1,25 @@
-python-dns (2.3.1-3) UNRELEASED; urgency=low
+python-dns (2.3.1-4) unstable; urgency=low
 
+  * Add simple-patchsys.mk to debian/rules
+    - Add README.source
+  * Remove custom clean rule no longer needed
+  * Switch to python-central (debian/rules and control)
+    - Update DEB_PYTHON_SYSTEM
+    - Update build-depends
+    - Add XS/XB-Python-Versions
+    - Remove pyversions
+  * Update standards version to 3.8.0.1
+    - Add Homepage: to debian/control
+  * Add debian/patches/tid-random.patch to partially address #490217
+    - Randomize TID for new DNS packets, but not for retries
+    - Depend on kernel for port randomization (2.6.24 i386 does this)
+  * Add DEB_COMPRESS_EXCLUDE := .py so sample scripts don't get compressed
+  * Change build dep on python-dev to python
+
+ -- Scott Kitterman <scott at kitterman.com>  Fri, 11 Jul 2008 00:54:16 -0400
+
+python-dns (2.3.1-3) unstable; urgency=low
+
   [ Piotr Ożarowski ]
   * Rename XS-Vcs-* fields to Vcs-* (dpkg supports them now)
 

Modified: packages/python-dns/trunk/debian/control
===================================================================
--- packages/python-dns/trunk/debian/control	2008-07-10 18:09:55 UTC (rev 5933)
+++ packages/python-dns/trunk/debian/control	2008-07-11 05:42:32 UTC (rev 5934)
@@ -3,15 +3,17 @@
 Priority: optional
 Maintainer: Scott Kitterman <scott at kitterman.com>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 5.0.37.1), python-dev, cdbs (>= 0.4.41), python-support (>= 0.3)
+Build-Depends: debhelper (>= 5.0.37.1), python, cdbs (>= 0.4.41), python-central (>= 0.6~)
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-dns/trunk
 Vcs-Browser: http://svn.debian.org/wsvn/python-modules/packages/python-dns/trunk/?op=log
-Standards-Version: 3.7.2
+Standards-Version: 3.8.0.1
+Homepage: http://sourceforge.net/projects/pydns/
+XS-Python-Version: all
 XS-DM-Upload-Allowed: yes
-Homepage: http://pydns.sf.net
 
 Package: python-dns
 Architecture: all
+XB-Python-Version: all
 Depends: ${python:Depends}
 Description: pydns - DNS client module for Python
  This Python module provides an DNS API for looking up

Added: packages/python-dns/trunk/debian/patches/tid-random.patch
===================================================================
--- packages/python-dns/trunk/debian/patches/tid-random.patch	                        (rev 0)
+++ packages/python-dns/trunk/debian/patches/tid-random.patch	2008-07-11 05:42:32 UTC (rev 5934)
@@ -0,0 +1,88 @@
+diff -Nur -x '*.orig' -x '*~' python-dns-2.3.1/DNS/Base.py python-dns-2.3.1.new/DNS/Base.py
+--- python-dns-2.3.1/DNS/Base.py	2007-05-22 16:28:31.000000000 -0400
++++ python-dns-2.3.1.new/DNS/Base.py	2008-07-11 00:33:12.000000000 -0400
+@@ -1,5 +1,5 @@
+ """
+-$Id: Base.py,v 1.12.2.4 2007/05/22 20:28:31 customdesigned Exp $
++$Id: Base.py,v 1.14 2008/07/11 03:41:42 customdesigned Exp $
+ 
+ This file is part of the pydns project.
+ Homepage: http://pydns.sourceforge.net
+@@ -12,6 +12,11 @@
+ import socket, string, types, time
+ import Type,Class,Opcode
+ import asyncore
++try:
++  from random import SystemRandom
++  random = SystemRandom()
++except:
++  import random
+ 
+ class DNSError(Exception): pass
+ 
+@@ -58,6 +63,7 @@
+         self.defaults = {}
+         self.argparse(name,args)
+         self.defaults = self.args
++        self.tid = 0
+ 
+     def argparse(self,name,args):
+         if not name and self.defaults.has_key('name'):
+@@ -144,6 +150,7 @@
+         #    raise DNSError,'reinitialize request before reuse'
+         protocol = self.args['protocol']
+         self.port = self.args['port']
++        self.tid = random.randint(0,65535)
+         opcode = self.args['opcode']
+         rd = self.args['rd']
+         server=self.args['server']
+@@ -164,7 +171,7 @@
+         #print 'QTYPE %d(%s)' % (qtype, Type.typestr(qtype))
+         m = Lib.Mpacker()
+         # jesus. keywords and default args would be good. TODO.
+-        m.addHeader(0,
++        m.addHeader(self.tid,
+               0, opcode, 0, 0, rd, 0, 0, 0,
+               1, 0, 0, 0)
+         m.addQuestion(qname, qtype, Class.IN)
+@@ -193,7 +200,11 @@
+                 self.time_start=time.time()
+                 if not self.async:
+                     self.s.send(self.request)
+-                    self.response=self.processUDPReply()
++                    r=self.processUDPReply()
++                    while r.header['id'] != self.tid:
++                      r=self.processUDPReply()
++                    self.response = r
++                    # FIXME: check waiting async queries
+             #except socket.error:
+             except None:
+                 continue
+@@ -211,9 +222,11 @@
+                 self.socketInit(socket.AF_INET, socket.SOCK_STREAM)
+                 self.time_start=time.time()
+                 self.conn()
+-                self.s.send(Lib.pack16bit(len(self.request))+self.request)
+-                self.s.shutdown(1)
+-                self.response=self.processTCPReply()
++                self.s.sendall(Lib.pack16bit(len(self.request))+self.request)
++                self.s.shutdown(socket.SHUT_WR)
++                r=self.processTCPReply()
++                if r.header['id'] != self.tid: continue
++                self.response = r
+             except socket.error:
+                 continue
+             break
+@@ -256,6 +269,12 @@
+ 
+ #
+ # $Log: Base.py,v $
++# Revision 1.14  2008/07/11 03:41:42  customdesigned
++# New TID for each req.
++#
++# Revision 1.13  2008/05/05 04:35:24  customdesigned
++# Use random tid in requests and check for matching response.
++#
+ # Revision 1.12.2.4  2007/05/22 20:28:31  customdesigned
+ # Missing import Lib
+ #

Modified: packages/python-dns/trunk/debian/rules
===================================================================
--- packages/python-dns/trunk/debian/rules	2008-07-10 18:09:55 UTC (rev 5933)
+++ packages/python-dns/trunk/debian/rules	2008-07-11 05:42:32 UTC (rev 5934)
@@ -1,9 +1,11 @@
 #!/usr/bin/make -f
 
-DEB_PYTHON_SYSTEM=pysupport
+DEB_PYTHON_SYSTEM=pycentral
+DEB_COMPRESS_EXCLUDE := .py
 
 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
 
 clean::
 	rm -f DNS/*.pyc




More information about the Python-modules-commits mailing list