[Python-modules-commits] r2181 - in /packages/twistedsnmp/trunk/debian: ./ patches/

zack at users.alioth.debian.org zack at users.alioth.debian.org
Thu Apr 26 14:59:21 UTC 2007


Author: zack
Date: Thu Apr 26 14:59:20 2007
New Revision: 2181

URL: http://svn.debian.org/wsvn/python-modules/?sc=1&rev=2181
Log:
added various patches from zenoss

Added:
    packages/twistedsnmp/trunk/debian/patches/faster_decoding-zenoss_patch05.dpatch   (with props)
    packages/twistedsnmp/trunk/debian/patches/like_v1_no_obj-zenoss_patch03.dpatch   (with props)
    packages/twistedsnmp/trunk/debian/patches/pkt_id_correlate-zenoss_patch02.dpatch   (with props)
    packages/twistedsnmp/trunk/debian/patches/timeout_leak-zenoss_patch04.dpatch   (with props)
    packages/twistedsnmp/trunk/debian/patches/unique_id-zenoss_patch01.dpatch   (with props)
Modified:
    packages/twistedsnmp/trunk/debian/changelog
    packages/twistedsnmp/trunk/debian/patches/00list

Modified: packages/twistedsnmp/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/python-modules/packages/twistedsnmp/trunk/debian/changelog?rev=2181&op=diff
==============================================================================
--- packages/twistedsnmp/trunk/debian/changelog (original)
+++ packages/twistedsnmp/trunk/debian/changelog Thu Apr 26 14:59:20 2007
@@ -1,3 +1,13 @@
+twistedsnmp (0.3.13-3) unstable; urgency=low
+
+  * debian/patches/*
+    - added the following patches with various improvements from zenoss:
+      unique_id-zenoss_patch01, pkt_id_correlate-zenoss_patch02,
+      like_v1_no_obj-zenoss_patch03, timeout_leak-zenoss_patch04,
+      faster_decoding-zenoss_patch05 (Closes: #420962)
+
+ -- Stefano Zacchiroli <zack at debian.org>  Thu, 26 Apr 2007 16:54:06 +0200
+
 twistedsnmp (0.3.13-2) unstable; urgency=low
 
   * Uploading to unstable.

Modified: packages/twistedsnmp/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/python-modules/packages/twistedsnmp/trunk/debian/patches/00list?rev=2181&op=diff
==============================================================================
--- packages/twistedsnmp/trunk/debian/patches/00list (original)
+++ packages/twistedsnmp/trunk/debian/patches/00list Thu Apr 26 14:59:20 2007
@@ -1,1 +1,6 @@
+unique_id-zenoss_patch01.dpatch
+pkt_id_correlate-zenoss_patch02.dpatch
+like_v1_no_obj-zenoss_patch03.dpatch
+timeout_leak-zenoss_patch04.dpatch
+faster_decoding-zenoss_patch05.dpatch
 force_pysnmp-se.dpatch

Added: packages/twistedsnmp/trunk/debian/patches/faster_decoding-zenoss_patch05.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/twistedsnmp/trunk/debian/patches/faster_decoding-zenoss_patch05.dpatch?rev=2181&op=file
==============================================================================
--- packages/twistedsnmp/trunk/debian/patches/faster_decoding-zenoss_patch05.dpatch (added)
+++ packages/twistedsnmp/trunk/debian/patches/faster_decoding-zenoss_patch05.dpatch Thu Apr 26 14:59:20 2007
@@ -1,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## faster_decoding-zenoss_patch05.dpatch by Stefano Zacchiroli <zack at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: patch to make twistedsnmp go faster
+## DP: See http://dev.zenoss.org/trac/browser/trunk/inst/externallibs/TwistedSNMP-0.3.13.patch05
+
+ at DPATCH@
+--- snmpprotocol.py	2006-03-23 16:54:51.000000000 -0500
++++ snmpprotocol.py.new	2007-02-20 07:32:06.000000000 -0500
+@@ -31,6 +31,7 @@
+ 		"""
+ 		self.port = port
+ 		self.requests = {}
++		self.decoders = (v1.GetResponse(), v2c.GetResponse())
+ 		
+ 	# Twisted entry points...
+ 	def datagramReceived(self, datagram, address):
+@@ -150,10 +151,9 @@
+ 
+ 	def decode( self, message ):
+ 		"""Decode a datagram message"""
+-		for implementation in v2c, v1:
++		for decoder in self.decoders:
+ 			try:
+-				response = implementation.GetResponse()
+-				response.decode( message )
++				decoder.decode( message )
+ 				return response
+ 			except Exception, err:
+ 				pass

Propchange: packages/twistedsnmp/trunk/debian/patches/faster_decoding-zenoss_patch05.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/twistedsnmp/trunk/debian/patches/like_v1_no_obj-zenoss_patch03.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/twistedsnmp/trunk/debian/patches/like_v1_no_obj-zenoss_patch03.dpatch?rev=2181&op=file
==============================================================================
--- packages/twistedsnmp/trunk/debian/patches/like_v1_no_obj-zenoss_patch03.dpatch (added)
+++ packages/twistedsnmp/trunk/debian/patches/like_v1_no_obj-zenoss_patch03.dpatch Thu Apr 26 14:59:20 2007
@@ -1,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## like_v1_no_obj-zenoss_patch03.dpatch by Stefano Zacchiroli <zack at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: make v2c behave more like v1 when the object doesn't exist
+## DP: See http://dev.zenoss.org/trac/browser/trunk/inst/externallibs/TwistedSNMP-0.3.13.patch03
+
+ at DPATCH@
+--- v3/agentproxy.py	2006-08-08 09:39:11.000000000 -0400
++++ v3/agentproxy.py	2006-08-15 14:57:34.000000000 -0400
+@@ -328,7 +328,8 @@
+ 			return [
+ 				(OID(a),b.getTerminal().get())
+ 				for a,b in answer
+-				if not isinstance( b, v2c.EndOfMibView)
++				if not isinstance( b, (v2c.EndOfMibView,
++                                                       v2c.NoSuchObject))
+ 			]
+ 		return []
+ 	def _timeout(self, key, df, oids, timeout, retryCount):

Propchange: packages/twistedsnmp/trunk/debian/patches/like_v1_no_obj-zenoss_patch03.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/twistedsnmp/trunk/debian/patches/pkt_id_correlate-zenoss_patch02.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/twistedsnmp/trunk/debian/patches/pkt_id_correlate-zenoss_patch02.dpatch?rev=2181&op=file
==============================================================================
--- packages/twistedsnmp/trunk/debian/patches/pkt_id_correlate-zenoss_patch02.dpatch (added)
+++ packages/twistedsnmp/trunk/debian/patches/pkt_id_correlate-zenoss_patch02.dpatch Thu Apr 26 14:59:20 2007
@@ -1,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## pkt_id_correlate-zenoss_patch02.dpatch by Stefano Zacchiroli <zack at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: sometimes packets come back from a different IP address than we
+## DP: requested, so only use the packet request id for correlating requests
+## DP: and responses
+## DP: See http://dev.zenoss.org/trac/browser/trunk/inst/externallibs/TwistedSNMP-0.3.13.patch02
+
+ at DPATCH@
+--- v3/agentproxy.py.~2~	2006-05-03 09:23:26.000000000 -0400
++++ v3/agentproxy.py	2006-05-15 10:36:21.000000000 -0400
+@@ -284,9 +284,8 @@
+ 			if request is not None:
+ 				# this is hacky, initialValue is the incrementer for the global value
+ 				pdu = request['pdu'][pduKey]
+-				#current = pdu['request_id'].get()
+-				pdu['request_id'].inc(1)
+-				#assert pdu['request_id'].get() == current + 1, (pdu['request_id'].get(),current+1)
++				pdu['request_id'].initialValue()
++				# print pdu['request_id'].get()
+ 				return request
+ 		implementation = self.getImplementation()
+ 		if bulk:

Propchange: packages/twistedsnmp/trunk/debian/patches/pkt_id_correlate-zenoss_patch02.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/twistedsnmp/trunk/debian/patches/timeout_leak-zenoss_patch04.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/twistedsnmp/trunk/debian/patches/timeout_leak-zenoss_patch04.dpatch?rev=2181&op=file
==============================================================================
--- packages/twistedsnmp/trunk/debian/patches/timeout_leak-zenoss_patch04.dpatch (added)
+++ packages/twistedsnmp/trunk/debian/patches/timeout_leak-zenoss_patch04.dpatch Thu Apr 26 14:59:20 2007
@@ -1,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## timeout_leak-zenoss_patch04.dpatch by Stefano Zacchiroli <zack at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix memory "leak" on timeout errors
+## DP: See http://dev.zenoss.org/trac/browser/trunk/inst/externallibs/TwistedSNMP-0.3.13.patch04
+
+ at DPATCH@
+--- tableretriever.py	2006-03-23 17:38:00.000000000 -0500
++++ tableretriever.py.new	2007-02-13 10:42:10.000000000 -0500
+@@ -246,12 +246,12 @@
+ 		"""
+ 		if not df.called:
+ 			try:
++				try:
++					if self.proxy.protocol.requests[key][0] is df:
++						del self.proxy.protocol.requests[ key ]
++				except KeyError:
++					pass
+ 				if retryCount > 0:
+-					try:
+-						if self.proxy.protocol.requests[key][0] is df:
+-							del self.proxy.protocol.requests[ key ]
+-					except KeyError:
+-						pass
+ 					return self.getTable( oids, roots, includeStart, retryCount-1, delay*1.5 )
+ 				try:
+ 					if not self.finished and getattr(self,'df',None):

Propchange: packages/twistedsnmp/trunk/debian/patches/timeout_leak-zenoss_patch04.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/twistedsnmp/trunk/debian/patches/unique_id-zenoss_patch01.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/twistedsnmp/trunk/debian/patches/unique_id-zenoss_patch01.dpatch?rev=2181&op=file
==============================================================================
--- packages/twistedsnmp/trunk/debian/patches/unique_id-zenoss_patch01.dpatch (added)
+++ packages/twistedsnmp/trunk/debian/patches/unique_id-zenoss_patch01.dpatch Thu Apr 26 14:59:20 2007
@@ -1,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## unique_id-zenoss_patch01.dpatch by Stefano Zacchiroli <zack at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: we have to grab another globally unique request id for each request
+## DP: See http://dev.zenoss.org/trac/browser/trunk/inst/externallibs/TwistedSNMP-0.3.13.patch01
+
+ at DPATCH@
+--- snmpprotocol.py.~1~	2006-03-23 16:54:51.000000000 -0500
++++ snmpprotocol.py	2006-05-15 10:34:58.000000000 -0400
+@@ -145,7 +145,7 @@
+ 					key, log.getException(err),
+ 				)
+ 			else:
+-				return target, ID.get()
++				return ID.get()
+ 		raise KeyError( """Unable to get a request key id from %s for target %s"""%( request, target))
+ 
+ 	def decode( self, message ):

Propchange: packages/twistedsnmp/trunk/debian/patches/unique_id-zenoss_patch01.dpatch
------------------------------------------------------------------------------
    svn:executable = *




More information about the Python-modules-commits mailing list