[Python-modules-commits] r4913 - in packages/pyspf/trunk/debian (5 files)

kitterma-guest at users.alioth.debian.org kitterma-guest at users.alioth.debian.org
Mon Mar 24 21:57:52 UTC 2008


    Date: Monday, March 24, 2008 @ 21:57:51
  Author: kitterma-guest
Revision: 4913

  * Add tcp-fallback.patch so that truncated UDP DNS replies are retried
    in TCP and either a complete result is fetched or a TempError is raised
  * Add trap-command-line-errors.patch so DNS errors don't cause a crash
    when pyspf is used from the command line
  * Properly escape hyphens in debian/spfquery.pyspf.1 and
    debian/pyspf-type99.1

Added:
  packages/pyspf/trunk/debian/patches/tcp-fallback.patch
  packages/pyspf/trunk/debian/patches/trap-command-line-errors.patch
Modified:
  packages/pyspf/trunk/debian/changelog
  packages/pyspf/trunk/debian/pyspf-type99.1
  packages/pyspf/trunk/debian/spfquery.pyspf.1

Modified: packages/pyspf/trunk/debian/changelog
===================================================================
--- packages/pyspf/trunk/debian/changelog	2008-03-24 17:01:53 UTC (rev 4912)
+++ packages/pyspf/trunk/debian/changelog	2008-03-24 21:57:51 UTC (rev 4913)
@@ -1,10 +1,19 @@
-pyspf (2.0.4-3) UNRELEASED; urgency=low
+pyspf (2.0.4-3) unstable; urgency=low
 
+  [ Sandro Tosi ]
   * debian/control
     - added Vcs-Browser
 
- -- Sandro Tosi <matrixhasu at gmail.com>  Wed, 02 Jan 2008 12:21:03 +0100
+  [ Scott Kitterman ]
+  * Add tcp-fallback.patch so that truncated UDP DNS replies are retried
+    in TCP and either a complete result is fetched or a TempError is raised
+  * Add trap-command-line-errors.patch so DNS errors don't cause a crash
+    when pyspf is used from the command line
+  * Properly escape hyphens in debian/spfquery.pyspf.1 and
+    debian/pyspf-type99.1
 
+ -- Scott Kitterman <scott at kitterman.com>  Mon, 24 Mar 2008 17:38:03 -0400
+
 pyspf (2.0.4-2) unstable; urgency=low
 
   [ Scott Kitterman ]

Added: packages/pyspf/trunk/debian/patches/tcp-fallback.patch
===================================================================
--- packages/pyspf/trunk/debian/patches/tcp-fallback.patch	                        (rev 0)
+++ packages/pyspf/trunk/debian/patches/tcp-fallback.patch	2008-03-24 21:57:51 UTC (rev 4913)
@@ -0,0 +1,19 @@
+diff -Nur pyspf-2.0.4/spf.py pyspf-2.0.4.new/spf.py
+--- pyspf-2.0.4/spf.py	2008-03-24 16:47:46.000000000 -0400
++++ pyspf-2.0.4.new/spf.py	2008-03-24 16:48:53.000000000 -0400
+@@ -98,6 +98,15 @@
+         # FIXME: pydns returns AAAA RR as 16 byte binary string, but
+         # A RR as dotted quad.  For consistency, this driver should
+         # return both as binary string.
++        if resp.header['tc'] ==1:
++            if strict != 2:
++                try:
++                    req = DNS.DnsRequest(name, qtype=qtype, protocol='tcp')
++                    resp = req.req()
++                except DNS.DNSError, x:
++                    raise TempError, 'DNS: TCP Fallback error: ' + str(x)
++            else:
++                raise TempError, 'DNS: Truncated UDP Reply, not retrying TCP'
+         return [((a['name'], a['typename']), a['data']) for a in resp.answers]
+     except IOError, x:
+         raise TempError, 'DNS ' + str(x)

Added: packages/pyspf/trunk/debian/patches/trap-command-line-errors.patch
===================================================================
--- packages/pyspf/trunk/debian/patches/trap-command-line-errors.patch	                        (rev 0)
+++ packages/pyspf/trunk/debian/patches/trap-command-line-errors.patch	2008-03-24 21:57:51 UTC (rev 4913)
@@ -0,0 +1,21 @@
+diff -Nur pyspf-2.0.4/spf.py pyspf-2.0.4.new/spf.py
+--- pyspf-2.0.4/spf.py	2008-03-24 16:52:17.000000000 -0400
++++ pyspf-2.0.4.new/spf.py	2008-03-24 16:54:37.000000000 -0400
+@@ -1625,9 +1625,14 @@
+         print USAGE
+         _test()
+     elif len(sys.argv) == 2:
+-        q = query(i='127.0.0.1', s='localhost', h='unknown',
+-            receiver=socket.gethostname())
+-        print q.dns_spf(sys.argv[1])
++        try:
++            q = query(i='127.0.0.1', s='localhost', h='unknown',
++                receiver=socket.gethostname())
++            print q.dns_spf(sys.argv[1])
++        except TempError, x:
++            print "Temporary DNS error: ", x
++        except PermError, x:
++            print "PermError: ", x
+     elif len(sys.argv) == 4:
+         print check(i=sys.argv[1], s=sys.argv[2], h=sys.argv[3],
+             receiver=socket.gethostname())

Modified: packages/pyspf/trunk/debian/pyspf-type99.1
===================================================================
--- packages/pyspf/trunk/debian/pyspf-type99.1	2008-03-24 17:01:53 UTC (rev 4912)
+++ packages/pyspf/trunk/debian/pyspf-type99.1	2008-03-24 21:57:51 UTC (rev 4913)
@@ -146,9 +146,9 @@
 
 The type99 script is called from the command line as follows:
 
-python type99 "v=spf1 -all" {Note: Use your desired SPF record instead.}
+python type99 "v=spf1 \-all" {Note: Use your desired SPF record instead.}
 
-\\# 12 0b763d73706631202d616c6c {This is the correct result for "v=spf1 -all"}
+\\# 12 0b763d73706631202d616c6c {This is the correct result for "v=spf1 \-all"}
 
 or 
 

Modified: packages/pyspf/trunk/debian/spfquery.pyspf.1
===================================================================
--- packages/pyspf/trunk/debian/spfquery.pyspf.1	2008-03-24 17:01:53 UTC (rev 4912)
+++ packages/pyspf/trunk/debian/spfquery.pyspf.1	2008-03-24 21:57:51 UTC (rev 4913)
@@ -148,31 +148,31 @@
 either use standard '-' prefix or be PERL style long options, '--'.  Supported
 options are:
 
- "--file" or "-file" {filename}: Read the query (or queries) from the designated 
+ "\-\-file" or "\-file" {filename}: Read the query (or queries) from the designated 
     file.  If {filename} is '0', then query inputs are read from STDIN.
 
- "--ip" or "-ip" {address}: Client IP address to use for SPF check.
+ "\-\-ip" or "\-ip" {address}: Client IP address to use for SPF check.
 
 
- "--sender" or "-sender" {Mail From address}: Envelope sender from which mail was
+ "\-\-sender" or "\-sender" {Mail From address}: Envelope sender from which mail was
     received.
 
- "--helo" or "-helo" {client hostname}: HELO/EHLO name used by SMTP client.
+ "\-\-helo" or "\-helo" {client hostname}: HELO/EHLO name used by SMTP client.
 
- "--local" or "-local" {local policy SPF string}: Additional SPF mechanisms to be
+ "\-\-local" or "\-local" {local policy SPF string}: Additional SPF mechanisms to be
     checked on the basis of local policy.  Note that local policy matches are 
     not strictly SPF results.  Local policy processing is not defined in RFC 
     4408.  Result may vary among SPF implementations.
 
- "--rcpt-to" or "rcpt-to" {rcpt-to address - if available}: Receipt to address is
+ "\-\-rcpt-to" or "rcpt\-to" {rcpt-to address - if available}: Receipt to address is
     not used for actual SPF processing, but if available it can be useful for 
     logging, spf-received header construction, and providing useful rejection
     messages when messages are rejected due to SPF.
 
- "--default-explanation" or "-default-explanation" {explanation string}: Default
+ "\-\-default\-explanation" or "\-default-explanation" {explanation string}: Default
     Fail explanation string to be used.
 
- "--sanitize" or "-sanitize" and "--debug" or "-debug": These options are no-op
+ "\-\-sanitize" or "\-sanitize" and "\-\-debug" or "\-debug": These options are no\-op
     in the Python implementation, but are valid inputs to provide compatibliity
     with input files developed to work with the original PERL and C spfquery
     implementations.
@@ -180,7 +180,7 @@
 .SH "EXAMPLE"
 .IX Header "EXAMPLE"
 
- spfquery --sender scott at example.com --ip 192.0.2.0 [other options ...]
+ spfquery \-\-sender scott at example.com \-\-ip 192.0.2.0 [other options ...]
 
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"




More information about the Python-modules-commits mailing list