version bump. python3 friendlyness as per #313479. Homepage/URL move as per bug ...
authorDaniel Black <dragonheart@gentoo.org>
Sun, 18 Jul 2010 08:47:09 +0000 (08:47 +0000)
committerDaniel Black <dragonheart@gentoo.org>
Sun, 18 Jul 2010 08:47:09 +0000 (08:47 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

mail-filter/pypolicyd-spf/ChangeLog
mail-filter/pypolicyd-spf/Manifest
mail-filter/pypolicyd-spf/files/0.7.3-2to3.patch [new file with mode: 0644]
mail-filter/pypolicyd-spf/files/0.8.0-2to3.patch [new file with mode: 0644]
mail-filter/pypolicyd-spf/pypolicyd-spf-0.7.3.ebuild [new file with mode: 0644]
mail-filter/pypolicyd-spf/pypolicyd-spf-0.7.ebuild [deleted file]
mail-filter/pypolicyd-spf/pypolicyd-spf-0.8.0.ebuild [new file with mode: 0644]

index b9c8de114e4728ea672499b129406c8bbeb41f73..7a1b36ce33c5c141cce6044ed7a95a832b5b2da7 100644 (file)
@@ -1,6 +1,16 @@
 # ChangeLog for mail-filter/pypolicyd-spf
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/pypolicyd-spf/ChangeLog,v 1.9 2009/11/19 16:18:54 maekke Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/pypolicyd-spf/ChangeLog,v 1.10 2010/07/18 08:47:07 dragonheart Exp $
+
+*pypolicyd-spf-0.8.0 (18 Jul 2010)
+*pypolicyd-spf-0.7.3 (18 Jul 2010)
+
+  18 Jul 2010; Daniel Black <dragonheart@gentoo.org>
+  -pypolicyd-spf-0.7.ebuild, +pypolicyd-spf-0.7.3.ebuild,
+  +pypolicyd-spf-0.8.0.ebuild, +files/0.7.3-2to3.patch,
+  +files/0.8.0-2to3.patch:
+  version bump. python3 friendlyness as per #313479. Homepage/URL move as
+  per bug #312457 thanks Matthias Dahl
 
   19 Nov 2009; Markus Meier <maekke@gentoo.org> pypolicyd-spf-0.7.1.ebuild:
   amd64/x86 stable, bug #293032
index ed3c4cd1f13bbd808c8c01d605877e14a9403785..e116619b109184e837027a9cac587d5697944a7d 100644 (file)
@@ -1,16 +1,10 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
+AUX 0.7.3-2to3.patch 2692 RMD160 ba64abfbd06bbf6baf0627d5bf1ce7e24da376fb SHA1 eaed49ec0b20170d97d9b0c85252d866cac8c24f SHA256 54d5d949abcc06dd2a055831bacef973579feefe6c90e6c436ca8e496e5933bf
+AUX 0.8.0-2to3.patch 3968 RMD160 9792681cfa5587924c3c8cc980fbc4894e8be9dd SHA1 ab71d0378d5a2ab8e8a7b439b2c7744d5c874ac8 SHA256 dcf2d3fa9b30b60534743c5b245251bd96823d1e7ad4cd7f8b1794b6f634635b
 DIST pypolicyd-spf-0.7.1.tar.gz 25217 RMD160 63cc686735a130d552b535db3bd5f21612f76625 SHA1 21dcc089e633cf275f845cf67fcf33ac7b7d323b SHA256 40b9d846a93e4fd87b63e4b9a540b4eeafd40808d19595efa37f62b91c8aad5e
-DIST pypolicyd-spf-0.7.tar.gz 25183 RMD160 296d9bc149aa9556fe3a53068f4b9137f9189ef9 SHA1 6c030e02a81c31c97ed5e9bef45a312dfd4a04d4 SHA256 cfd0916d62073eda1198c50e0ad2b9ab13648e0f4614eeb1f689bcf254574d38
+DIST pypolicyd-spf-0.7.3.tar.gz 29845 RMD160 33696b7171184d7f7aa95d8ecf60146bb1e9d542 SHA1 58c0359f1efdd84d1bd3f282b38543521a95bd8d SHA256 0104c24d0cde02eb69f496370d326234615439fd1a649e3ddb02f90b52d7749b
+DIST pypolicyd-spf-0.8.0.tar.gz 32097 RMD160 d04f07536c44c0c37a19cf442541811255926ce4 SHA1 8fd6e14b7b18d4cb38a0e05f1ef980a1aed6c985 SHA256 fbfe3fd6979d21304f3e102ad8bdd58e9fe8389cae69113746756f07d15de78b
 EBUILD pypolicyd-spf-0.7.1.ebuild 511 RMD160 386a179473290bd10ede97bcdac918df8e8be10a SHA1 f9ac5a0840e23404def85ac1f9a4d4dc834d81e3 SHA256 d67bda747ba8df244acab7261763921b02c613500b675df22b201e81373730c0
-EBUILD pypolicyd-spf-0.7.ebuild 516 RMD160 1767c57bbc5f342edf780947596514cf87655f2f SHA1 f2be304de714d9a5ad087cbe00a8d2c397207f1c SHA256 9fa77acab052ef8967ca0072f8cf4acd392d92fb492ca2c8975608ed6439e7d2
-MISC ChangeLog 1795 RMD160 5b9969efa6d0b3a97c02eb352e81d73aa87a4072 SHA1 0a4969c2e201e755be87035c4eddb5c150dba175 SHA256 2a20c9879d9f47c08255dad4d50dfc6dc5e0a4a90e482adde6b634aa25d58d08
+EBUILD pypolicyd-spf-0.7.3.ebuild 805 RMD160 70c4550c0b9d256a7a2189ed60063755b3d6426a SHA1 3bff4d88a7766f49e82cf4fb0a3334d1b240ece2 SHA256 ceccf4698e665cf391321a0f4b12a33cc8b8a1524f0f150f464bed50593c84b5
+EBUILD pypolicyd-spf-0.8.0.ebuild 821 RMD160 f4caf12b2198d18080acc1f4517b7e3ba1202550 SHA1 488d3a704cb0e23f6b6199c15d40e628e31c5e71 SHA256 fb07373c2f97b7318601750671d529c560e937184ee591d9fbd471ed14defd55
+MISC ChangeLog 2180 RMD160 068368c35cbc9c2a1395ad5596943e8ec88f1c82 SHA1 4e1ce029c642558303fdf93972b79cd0a2d329bd SHA256 791055553c0634e0489aa7ac3663465558fb6f99cd23e9f15dfe73fd54994e32
 MISC metadata.xml 374 RMD160 36c7b587b04bba133b9b106083dd7b485d9d2e45 SHA1 1d33c3e413603911ecb01f7a6ac8bb89c544562b SHA256 4638653661df3aa277ddfab4579d87598d17211e8b4d10114d4eeba5ddf2b7f1
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
-
-iEYEARECAAYFAksFb/4ACgkQkKaRLQcq0GKWRgCgnmmkSxQYwRSvtzlA3bQfrly/
-+s8An2KTpHmV8MqLhMJ2E4f/Vz/xUcOo
-=+00N
------END PGP SIGNATURE-----
diff --git a/mail-filter/pypolicyd-spf/files/0.7.3-2to3.patch b/mail-filter/pypolicyd-spf/files/0.7.3-2to3.patch
new file mode 100644 (file)
index 0000000..68ce615
--- /dev/null
@@ -0,0 +1,85 @@
+--- ./policydspfsupp.py (original)
++++ ./policydspfsupp.py (refactored)
+@@ -24,7 +24,7 @@
+ import sys
+ import string
+ import re
+-import urllib
++import urllib.request, urllib.parse, urllib.error
+ import stat
+ 
+ 
+@@ -57,7 +57,7 @@
+     if filename != None:
+         try:
+             readConfigFile(filename, config)
+-        except Exception, e:
++        except Exception as e:
+             if useSyslog:
+                 syslog.syslog(e.args[0])
+             if useStderr:
+@@ -75,7 +75,7 @@
+    def __call__(self, etype, evalue, etb):
+       import traceback
+       tb = traceback.format_exception(*(etype, evalue, etb))
+-      tb = map(string.rstrip, tb)
++      tb = list(map(string.rstrip, tb))
+       tb = string.join(tb, '\n')
+       for line in string.split(tb, '\n'):
+          if self.useSyslog:
+@@ -95,7 +95,7 @@
+     Address can either be a domain name, or local part.
+     Returns the quoted address.'''
+ 
+-    s = urllib.quote(s, '@_-+')
++    s = urllib.parse.quote(s, '@_-+')
+     if len(s) > 0 and s[0] == '.': s = '%2e' + s[1:]
+     return(s)
+ 
+@@ -104,7 +104,7 @@
+ def unquoteAddress(s):
+     '''Undo the quoting of an address.  Returns the unquoted address.'''
+ 
+-    return(urllib.unquote(s))
++    return(urllib.parse.unquote(s))
+ 
+ 
+ ###############################################################
+@@ -137,7 +137,7 @@
+     #  check to see if it's a file
+     try:
+         mode = os.stat(path)[0]
+-    except OSError, e:
++    except OSError as e:
+         syslog.syslog('ERROR stating "%s": %s' % ( path, e.strerror ))
+         return(configData)
+     if not stat.S_ISREG(mode):
+@@ -153,7 +153,7 @@
+         #  parse line
+         line = string.strip(string.split(line, '#', 1)[0])
+         if not line: continue
+-        data = map(string.strip, string.split(line, '=', 1))
++        data = list(map(string.strip, string.split(line, '=', 1)))
+         if len(data) != 2:
+             if len(data) == 1:
+                 if debugLevel >= 1:
+--- policyd-spf (original)
++++ policyd-spf (refactored)
+@@ -273,7 +273,7 @@
+         instance = str(int(random.random()*100000))
+     # This is to prevent multiple headers being prepended
+     # for multi-recipient mail.
+-    found_instance = instance_dict.has_key(instance)
++    found_instance = instance in instance_dict
+     '''Data structure for results is a list of:
+         [0] SPF result 
+         [1] SPF reason
+@@ -400,7 +400,7 @@
+ configFile = '/etc/python-policyd-spf/policyd-spf.conf'
+ if len(sys.argv) > 1:
+     if sys.argv[1] in ( '-?', '--help', '-h' ):
+-        print 'usage: policyd-spf [<configfilename>]'
++        print('usage: policyd-spf [<configfilename>]')
+         sys.exit(1)
+     configFile = sys.argv[1]
+ 
diff --git a/mail-filter/pypolicyd-spf/files/0.8.0-2to3.patch b/mail-filter/pypolicyd-spf/files/0.8.0-2to3.patch
new file mode 100644 (file)
index 0000000..f842e03
--- /dev/null
@@ -0,0 +1,114 @@
+--- ./policydspfsupp.py (original)
++++ ./policydspfsupp.py (refactored)
+@@ -24,7 +24,7 @@
+ import sys
+ import string
+ import re
+-import urllib
++import urllib.request, urllib.parse, urllib.error
+ import stat
+ 
+ 
+@@ -57,7 +57,7 @@
+     if filename != None:
+         try:
+             readConfigFile(filename, config)
+-        except Exception, e:
++        except Exception as e:
+             if useSyslog:
+                 syslog.syslog(e.args[0])
+             if useStderr:
+@@ -75,7 +75,7 @@
+    def __call__(self, etype, evalue, etb):
+       import traceback
+       tb = traceback.format_exception(*(etype, evalue, etb))
+-      tb = map(string.rstrip, tb)
++      tb = list(map(string.rstrip, tb))
+       tb = string.join(tb, '\n')
+       for line in string.split(tb, '\n'):
+          if self.useSyslog:
+@@ -122,7 +122,7 @@
+     #  check to see if it's a file
+     try:
+         mode = os.stat(path)[0]
+-    except OSError, e:
++    except OSError as e:
+         syslog.syslog('ERROR stating "%s": %s' % ( path, e.strerror ))
+         return(configData)
+     if not stat.S_ISREG(mode):
+@@ -138,7 +138,7 @@
+         #  parse line
+         line = string.strip(string.split(line, '#', 1)[0])
+         if not line: continue
+-        data = map(string.strip, string.split(line, '=', 1))
++        data = list(map(string.strip, string.split(line, '=', 1)))
+         if len(data) != 2:
+             if len(data) == 1:
+                 if debugLevel >= 1:
+--- ./policydspfuser.py (original)
++++ ./policydspfuser.py (refactored)
+@@ -52,7 +52,7 @@
+     #  check to see if it's a file
+     try:
+         mode = os.stat(path)[0]
+-    except OSError, e:
++    except OSError as e:
+         syslog.syslog('ERROR stating "%s": %s' % ( path, e.strerror ))
+         return(configData)
+ 
+@@ -65,7 +65,7 @@
+         #  parse line
+         line = string.strip(string.split(line, '#', 1)[0])
+         if not line: continue
+-        data = map(string.strip, string.split(line, ',', 1))
++        data = list(map(string.strip, string.split(line, ',', 1)))
+         user, value = data
+         if user != recipient:
+             peruser = False
+@@ -75,7 +75,7 @@
+         for valuepair in valuelist:
+             key, item = string.split(valuepair, '=')
+             values[key] = item
+-        for config in values.iteritems():
++        for config in values.items():
+             #  check validity of name
+             conversion = nameConversion.get(config[0])
+             name, value = config
+--- policyd-spf (original)
++++ policyd-spf (refactored)
+@@ -241,7 +241,7 @@
+                 else:
+                     # Reverse lookup didn't find any records, so don't continue with the check
+                     rDNSName = None
+-            except spf.TempError, e:
++            except spf.TempError as e:
+                 # DNS timeout - continue with the base SPF check.
+                 rDNSName = None
+             if (rDNSName is not None):
+@@ -275,7 +275,7 @@
+         instance = str(int(random.random()*100000))
+     # This is to prevent multiple headers being prepended
+     # for multi-recipient mail.
+-    if instance_dict.has_key(instance):
++    if instance in instance_dict:
+         found_instance = instance_dict[instance]
+     else:
+         found_instance = []
+@@ -570,7 +570,7 @@
+ configFile = '/etc/python-policyd-spf/policyd-spf.conf'
+ if len(sys.argv) > 1:
+     if sys.argv[1] in ( '-?', '--help', '-h' ):
+-        print 'usage: policyd-spf [<configfilename>]'
++        print('usage: policyd-spf [<configfilename>]')
+         sys.exit(1)
+     configFile = sys.argv[1]
+ 
+@@ -593,7 +593,7 @@
+     if not line:
+         peruser = False
+         if debugLevel >= 4: syslog.syslog('Found the end of entry')
+-        configData = dict(configGlobal.items())
++        configData = dict(list(configGlobal.items()))
+         if configData.get('Per_User'):
+             import policydspfuser
+             configData, peruser = policydspfuser.datacheck(configData, data.get('recipient'))
diff --git a/mail-filter/pypolicyd-spf/pypolicyd-spf-0.7.3.ebuild b/mail-filter/pypolicyd-spf/pypolicyd-spf-0.7.3.ebuild
new file mode 100644 (file)
index 0000000..a1117a7
--- /dev/null
@@ -0,0 +1,29 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/pypolicyd-spf/pypolicyd-spf-0.7.3.ebuild,v 1.1 2010/07/18 08:47:07 dragonheart Exp $
+
+
+EAPI="3"
+#PYTHON_DEPEND="*"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit distutils eutils versionator
+
+DESCRIPTION="Python based policy daemon for Postfix SPF checking"
+SRC_URI="http://launchpad.net/pypolicyd-spf/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz"
+HOMEPAGE="https://launchpad.net/pypolicyd-spf"
+
+IUSE=""
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=dev-python/pyspf-2.0.3"
+
+
+src_prepare() {
+       sed -i -e 's/[\xc2\xa9]//g' policydspfsupp.py policydspfuser.py policyd-spf
+       epatch "${FILESDIR}"/${PV}-2to3.patch
+       distutils_src_prepare
+}
+
diff --git a/mail-filter/pypolicyd-spf/pypolicyd-spf-0.7.ebuild b/mail-filter/pypolicyd-spf/pypolicyd-spf-0.7.ebuild
deleted file mode 100644 (file)
index 678757e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 1999-2008 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/pypolicyd-spf/pypolicyd-spf-0.7.ebuild,v 1.1 2008/06/26 08:36:04 dragonheart Exp $
-
-inherit distutils eutils
-
-DESCRIPTION="Python based policy daemon for Postfix SPF checking"
-SRC_URI="http://www.openspf.org/blobs/${P}.tar.gz"
-HOMEPAGE="http://www.openspf.org/Software"
-
-IUSE=""
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~x86"
-
-DEPEND=">=dev-python/pyspf-2.0.3"
diff --git a/mail-filter/pypolicyd-spf/pypolicyd-spf-0.8.0.ebuild b/mail-filter/pypolicyd-spf/pypolicyd-spf-0.8.0.ebuild
new file mode 100644 (file)
index 0000000..0e8a9fa
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/pypolicyd-spf/pypolicyd-spf-0.8.0.ebuild,v 1.1 2010/07/18 08:47:08 dragonheart Exp $
+
+
+EAPI="3"
+#PYTHON_DEPEND="*"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit distutils eutils versionator
+
+DESCRIPTION="Python based policy daemon for Postfix SPF checking"
+SRC_URI="http://launchpad.net/pypolicyd-spf/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz"
+HOMEPAGE="https://launchpad.net/pypolicyd-spf"
+
+IUSE=""
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=">=dev-python/pyspf-2.0.3"
+
+
+src_prepare() {
+       sed -i -e 's/[\xc2\xa9]//g' -e 's/FL/F/g'  policydspfsupp.py policydspfuser.py policyd-spf
+       epatch "${FILESDIR}"/0.8.0-2to3.patch
+       distutils_src_prepare
+
+}
+