summaryrefslogtreecommitdiff
path: root/security/mixminion
diff options
context:
space:
mode:
authorjoerg <joerg>2010-02-15 15:57:44 +0000
committerjoerg <joerg>2010-02-15 15:57:44 +0000
commitc422737ffe63e5a64b17448079dce5aaf1d3a627 (patch)
treec639147fe96b9594d97405b9cd0902444c596037 /security/mixminion
parent4952037b4369fd6873da8137e92d623862d8d275 (diff)
downloadpkgsrc-c422737ffe63e5a64b17448079dce5aaf1d3a627.tar.gz
"as" is a reserved word in Python 2.6+, so don't use it as variable.
Fix a Python interpreter path while here.
Diffstat (limited to 'security/mixminion')
-rw-r--r--security/mixminion/Makefile4
-rw-r--r--security/mixminion/distinfo4
-rw-r--r--security/mixminion/patches/patch-ab77
-rw-r--r--security/mixminion/patches/patch-ac86
4 files changed, 169 insertions, 2 deletions
diff --git a/security/mixminion/Makefile b/security/mixminion/Makefile
index 6afbcd1ce36..b2836700d84 100644
--- a/security/mixminion/Makefile
+++ b/security/mixminion/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2010/02/10 19:17:45 joerg Exp $
+# $NetBSD: Makefile,v 1.16 2010/02/15 15:57:44 joerg Exp $
#
DISTNAME= Mixminion-0.0.8alpha3
@@ -14,10 +14,12 @@ LICENSE= mit
PKG_DESTDIR_SUPPORT= user-destdir
+REPLACE_PYTHON= lib/mixminion/Main.py
PYDISTUTILSPKG= yes
TEST_TARGET= test
+.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/security/mixminion/distinfo b/security/mixminion/distinfo
index 1164ffae7c3..0b39f7e25b2 100644
--- a/security/mixminion/distinfo
+++ b/security/mixminion/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.5 2009/08/14 14:09:28 joerg Exp $
+$NetBSD: distinfo,v 1.6 2010/02/15 15:57:44 joerg Exp $
SHA1 (Mixminion-0.0.8alpha3.tar.gz) = 543235e96ccde34e2db20fe79aad32412db3ccac
RMD160 (Mixminion-0.0.8alpha3.tar.gz) = d321c45f86a363f29f92d3130e38b1608be27459
Size (Mixminion-0.0.8alpha3.tar.gz) = 483281 bytes
SHA1 (patch-aa) = 3b9a4ab8bd12f69cb03c28ea1be25b4a807391cd
+SHA1 (patch-ab) = fbad0097f4eed0b377dc30e765674e2135830d44
+SHA1 (patch-ac) = 66a356002fded22d1b8fdb67676c13f84e61dd58
diff --git a/security/mixminion/patches/patch-ab b/security/mixminion/patches/patch-ab
new file mode 100644
index 00000000000..8faf7131b9e
--- /dev/null
+++ b/security/mixminion/patches/patch-ab
@@ -0,0 +1,77 @@
+$NetBSD: patch-ab,v 1.4 2010/02/15 15:57:44 joerg Exp $
+
+--- lib/mixminion/server/ServerQueue.py.orig 2010-02-15 15:46:36.000000000 +0000
++++ lib/mixminion/server/ServerQueue.py
+@@ -617,16 +617,16 @@ class PerAddressDeliveryQueue(DeliveryQu
+ try:
+ for ds in self.store._metadata_cache.values():
+ if not self.addressStateDB.has_key(str(ds.address)):
+- as = _AddressState(ds.address)
+- self.addressStateDB[str(ds.address)] = as
++ as_ = _AddressState(ds.address)
++ self.addressStateDB[str(ds.address)] = as_
+ if not self.retrySchedule:
+ rs = [3600]
+ self.totalLifetime = 3600
+ else:
+ rs = self.retrySchedule
+ self.totalLifetime = reduce(operator.add,self.retrySchedule,0)
+- for as in self.addressStateDB.values():
+- as.setNextAttempt(rs, now)
++ for as_ in self.addressStateDB.values():
++ as_.setNextAttempt(rs, now)
+ self._repOK()
+ finally:
+ self._lock.release()
+@@ -643,10 +643,10 @@ class PerAddressDeliveryQueue(DeliveryQu
+ else:
+ have[ds.address]=1
+
+- for k, as in self.addressStateDB.items():
+- if have.has_key(as.address):
++ for k, as_ in self.addressStateDB.items():
++ if have.has_key(as_.address):
+ continue
+- lastActivity = as.getLastActivity()
++ lastActivity = as_.getLastActivity()
+ if lastActivity and (
+ lastActivity + self.totalLifetime < now):
+ del self.addressStateDB[k]
+@@ -655,11 +655,11 @@ class PerAddressDeliveryQueue(DeliveryQu
+
+ def _getAddressState(self, address, now=None):
+ try:
+- as = self.addressStateDB[str(address)]
++ as_ = self.addressStateDB[str(address)]
+ except KeyError:
+- as = self.addressStateDB[str(address)] = _AddressState(address)
+- as.setNextAttempt(self.retrySchedule, now)
+- return as
++ as_ = self.addressStateDB[str(address)] = _AddressState(address)
++ as_.setNextAttempt(self.retrySchedule, now)
++ return as_
+
+ def queueDeliveryMessage(self, msg, address, now=None):
+ self._getAddressState(address, now=now)
+@@ -767,8 +767,8 @@ class PerAddressDeliveryQueue(DeliveryQu
+ self._repOK()
+ o = self.store.getObject(handle)
+ ds = self.store.getMetadata(handle)
+- as = self._getAddressState(ds.address)
+- return (o, ds, as)
++ as_ = self._getAddressState(ds.address)
++ return (o, ds, as_)
+
+ def _repOK(self):
+ """Raise an assertion error if the internal state of this object is
+@@ -780,8 +780,8 @@ class PerAddressDeliveryQueue(DeliveryQu
+ DeliveryQueue._repOK(self)
+ for h in self.store._metadata_cache.keys():
+ ds = self.store._metadata_cache[h]
+- as = self._getAddressState(ds.address)
+- assert as.address == ds.address
++ as_ = self._getAddressState(ds.address)
++ assert as_.address == ds.address
+ finally:
+ self._lock.release()
+
diff --git a/security/mixminion/patches/patch-ac b/security/mixminion/patches/patch-ac
new file mode 100644
index 00000000000..26dea510631
--- /dev/null
+++ b/security/mixminion/patches/patch-ac
@@ -0,0 +1,86 @@
+$NetBSD: patch-ac,v 1.3 2010/02/15 15:57:45 joerg Exp $
+
+--- lib/mixminion/test.py.orig 2010-02-15 15:50:06.000000000 +0000
++++ lib/mixminion/test.py
+@@ -3444,15 +3444,15 @@ class QueueTests(FStoreTestBase):
+ h3 = q.queueDeliveryMessage("Message number three", A1, start)
+ q._repOK()
+
+- m, ds, as = q._inspect(h1)
++ m, ds, as_ = q._inspect(h1)
+ self.assertEquals(m, "Message number one")
+ self.assertEquals(ds.address, A1)
+- self.assertEquals(as.address, A1)
++ self.assertEquals(as_.address, A1)
+ self.assert_(not ds.isPending())
+ self.assertEquals(ds.lastAttempt, None)
+- self.assertEquals(as.lastSuccess, None)
+- self.assertEquals(as.lastFailure, None)
+- self.assertEquals(as.firstFailure, None)
++ self.assertEquals(as_.lastSuccess, None)
++ self.assertEquals(as_.lastFailure, None)
++ self.assertEquals(as_.firstFailure, None)
+ q.removeExpiredMessages(start)
+ self.assertEquals(q.store.count(), 3)
+
+@@ -3470,16 +3470,16 @@ class QueueTests(FStoreTestBase):
+ msgs[h3].failed(now=start+40, retriable=1)
+ self.assert_(not q._inspect(h3)[1].isPending())
+
+- as = q.addressStateDB[str(A1)]
+- self.assertIEquals(as.lastSuccess-start, 30)
+- self.assertIEquals(as.firstFailure-start, 10)
+- self.assertIEquals(as.lastFailure-start, 10)
+- self.assertIEquals(as.nextAttempt-start, 10+HOUR)
+- as = q.addressStateDB[str(A2)]
+- self.assertIEquals(as.lastSuccess-start, 20)
+- self.assertEquals(as.firstFailure, None)
+- self.assertEquals(as.lastFailure, None)
+- self.assertIEquals(as.nextAttempt-start, 20)
++ as_ = q.addressStateDB[str(A1)]
++ self.assertIEquals(as_.lastSuccess-start, 30)
++ self.assertIEquals(as_.firstFailure-start, 10)
++ self.assertIEquals(as_.lastFailure-start, 10)
++ self.assertIEquals(as_.nextAttempt-start, 10+HOUR)
++ as_ = q.addressStateDB[str(A2)]
++ self.assertIEquals(as_.lastSuccess-start, 20)
++ self.assertEquals(as_.firstFailure, None)
++ self.assertEquals(as_.lastFailure, None)
++ self.assertIEquals(as_.nextAttempt-start, 20)
+
+ # Queue two more messages; the one on A2 gets tried; the ones on
+ # A1 doesn't get tried for a while.
+@@ -3495,13 +3495,13 @@ class QueueTests(FStoreTestBase):
+ q.sendReadyMessages(start+HOUR+MIN)
+ msgs = self._pendingMsgDict(q._msgs)
+ self.assertUnorderedEq(msgs.keys(), [h3, h4])
+- as = q.addressStateDB[str(A1)]
++ as_ = q.addressStateDB[str(A1)]
+ msgs[h3].failed(now=start+HOUR+MIN+5, retriable=1)
+ msgs[h4].failed(now=start+HOUR+MIN+5, retriable=1)
+
+- self.assertIEquals(as.firstFailure-start, 10)
+- self.assertIEquals(as.lastFailure-start, HOUR+MIN)
+- self.assertIEquals(as.nextAttempt-start, 10+2*HOUR)
++ self.assertIEquals(as_.firstFailure-start, 10)
++ self.assertIEquals(as_.lastFailure-start, HOUR+MIN)
++ self.assertIEquals(as_.nextAttempt-start, 10+2*HOUR)
+
+ h6 = q.queueDeliveryMessage("The sixth message", A1,
+ now=start+HOUR*17-MIN)
+@@ -3525,13 +3525,13 @@ class QueueTests(FStoreTestBase):
+ self.assertUnorderedEq(q.addressStateDB.keys(), [str(A1)])
+
+ # Make sure that messages keep getting retried...
+- as = q.addressStateDB[str(A1)]
++ as_ = q.addressStateDB[str(A1)]
+ # (Reset nextDelivery on A1, since not all the delivery attempts
+ # have really happened.)
+ q.sendReadyMessages(now=start+HOUR*17+MIN*15)
+ msgs = self._pendingMsgDict(q._msgs)
+ msgs[h6].failed(now=start+HOUR*17+MIN*16, retriable=0)
+- self.assertEquals(as.nextAttempt - start, 25*HOUR+10)
++ self.assertEquals(as_.nextAttempt - start, 25*HOUR+10)
+ self.assertEquals([], q.store.getAllMessages())
+
+ # Test reloading.