git: 7f987072052d - main - devel/codeville: Fix build with setuptools 58.0.0+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Mar 2022 13:49:48 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=7f987072052d27f6f0066dc116c39cbcbb562197
commit 7f987072052d27f6f0066dc116c39cbcbb562197
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-03-25 13:32:09 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-03-25 13:38:06 +0000
devel/codeville: Fix build with setuptools 58.0.0+
- While I'm here, add USE_PYTHON=noflavors
With hat: python
---
devel/codeville/Makefile | 2 +-
devel/codeville/files/patch-indent | 75 ++++++++++++++++++++++++++++++++++++++
2 files changed, 76 insertions(+), 1 deletion(-)
diff --git a/devel/codeville/Makefile b/devel/codeville/Makefile
index d6c764a19c05..c2e6ee70ba5e 100644
--- a/devel/codeville/Makefile
+++ b/devel/codeville/Makefile
@@ -15,7 +15,7 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR}
USES= python:3.7+ tar:txz
-USE_PYTHON= distutils autoplist
+USE_PYTHON= distutils autoplist noflavors
NO_ARCH= yes
PORTEXAMPLES= cdvserver.conf.sample
diff --git a/devel/codeville/files/patch-indent b/devel/codeville/files/patch-indent
new file mode 100644
index 000000000000..78679d8335c5
--- /dev/null
+++ b/devel/codeville/files/patch-indent
@@ -0,0 +1,75 @@
+--- Codeville/SRP.py.orig 2020-12-15 07:22:56 UTC
++++ Codeville/SRP.py
+@@ -34,7 +34,7 @@ class ImproperKeyValue(Exception): pass
+ def hash(s):
+ """Hash a value with some hashing algorithm."""
+ if type(s) != type(''):
+- s = long_to_string(s)
++ s = long_to_string(s)
+
+ return sha.new(s).digest()
+
+@@ -85,7 +85,7 @@ def client_key(user, passphrase, s, B, u, keys, key_fu
+ # We don't trust the host. Perhaps the host is being spoofed.
+
+ if B <= 0 or n <= B:
+- raise ImproperKeyValue
++ raise ImproperKeyValue
+
+ # Calculate the shared, secret session key.
+
+@@ -93,7 +93,7 @@ def client_key(user, passphrase, s, B, u, keys, key_fu
+ v = 3 * pow(g, x, n)
+ t = B
+ if t < v:
+- t = t + n
++ t = t + n
+ S = pow(t - v, a + u * x, n)
+ K = hash(S)
+
+@@ -118,21 +118,21 @@ def host_begin(user, A, s, v):
+ # order to break the protocol.
+
+ if A <= 0 or n <= A:
+- raise ImproperKeyValue
++ raise ImproperKeyValue
+
+ # Pick our random public keys.
+
+ B = 0
+ while B == 0:
+- b = random_long(ablen)
+- B = ((3*v) + pow(g, b, n)) % n
++ b = random_long(ablen)
++ B = ((3*v) + pow(g, b, n)) % n
+ u = pow(g, random_long(tlen), n)
+
+ # Calculate the (private, shared secret) session key.
+
+ t = (A * pow(v, u, n)) % n
+ if t <= 1 or t + 1 == n:
+- raise ImproperKeyValue # WeakKeyValue -- could be our fault so retry
++ raise ImproperKeyValue # WeakKeyValue -- could be our fault so retry
+ S = pow(t, b, n)
+ K = hash(S)
+
+--- Codeville/entropy.py.orig 2020-12-15 07:23:19 UTC
++++ Codeville/entropy.py
+@@ -31,14 +31,14 @@ def string_to_long(s):
+ """Convert a string of bytes into a long integer."""
+ r = 0
+ for c in s:
+- r = (r << 8) + ord(c)
++ r = (r << 8) + ord(c)
+ return r
+
+ def long_to_string(i, length=0):
+ """Convert a long integer into a string of bytes."""
+ s = ''
+ while i > 0:
+- s = chr(i & 255) + s
+- i = i >> 8
++ s = chr(i & 255) + s
++ i = i >> 8
+ s = '\x00' * (length - len(s)) + s
+ return s