From nobody Fri Mar 25 13:50:55 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1435E1A34996; Fri, 25 Mar 2022 13:50:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KQ3QS6pQwz3h7m; Fri, 25 Mar 2022 13:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IiLQYlx5I4b9CXOESL+t/7Lu7DTQrTu5ZvrLqYyDEmU=; b=RdSJ60EeK0Qx+2hhkks6Gs4GQzDACnycK2h+X+RttoZ0/P4+2SABaoHhwbgaYAmXRxSyrl uAAdAwx/JOZ+Pr1hJAMeDHukkjc5QzaBeSJB58Ia4QIMxKheSFCaK6Sfs9oMV6Un0MYJ9e mbSHdq9vtVb9QTgYp29QgiafTr8zTEpVzfkWaoYLoSZDf4MksXtisTvblW2V5Q4UVOesij 5KExMEDpPCK8G7prLSjJNy2/jV5NMz0huIgj1uLDRgT80w3sJo2WTQ3EHWCQeAhM4QGi1o XzxGXLIA/0F1a1BlwN6QWAkg8/f8CKVTQkBXFoW3zxW8TQnkzwA3RaVU16qMEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3DB35AF9; Fri, 25 Mar 2022 13:50:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22PDotxo037591; Fri, 25 Mar 2022 13:50:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22PDotEc037590; Fri, 25 Mar 2022 13:50:55 GMT (envelope-from git) Date: Fri, 25 Mar 2022 13:50:55 GMT Message-Id: <202203251350.22PDotEc037590@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 61b16e7cd058 - main - security/py-pyaxo: Fix build with setuptools 58.0.0+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61b16e7cd0585661242e414c5ed6ab205d3d16b4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648216257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IiLQYlx5I4b9CXOESL+t/7Lu7DTQrTu5ZvrLqYyDEmU=; b=ozM3rcgbMJqpdfFlLRZXXBmIHoZG7TZLEPWsx7+QHwrj1bkF5V4hm29jU6TS06BxBHxrhs oBmY08J9EIGQ/Uef+Fb/bPWS7MtL8j956lA2HBXMywqVajiemp/yIxiH+JAzv5CHrQRxoK E83IHFaHFke+hyBydPagTnOJsVT2Sw5I8bPZ9zHyW0R/L22+Q+0C0I08CEr4V74oxhmS3i RvUWw8tEyt/K6bvFlfxBVwYCKXi8r+YskBr7D29Y7lG/XK4EnEIXdcwDumCZII6MXfbBX0 ilPr40nz1Gtcuiuz/n9E7wLX9YAfl6MjMqU5xednYHhy5ug9q4gekHM2nguaqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648216257; a=rsa-sha256; cv=none; b=N8wLM3joutM9CFb9UAeSOrtNv6tWfQTz0PxaLQjpz5EK5Kl62Ky5nro4Eioyp4yvB0WuRI t6QAZ6FO9aCnKjiAQN1ahaVx2rulXHQ/hHYrfQmlhzo9siLYqncUnkwLyQhnmB5uRZhIau SXysF6b/+a5QPjAc3ax00I+P8WNvTx71M1yuQS8GYlhDSyqv1Iog2xeS2ecuRW1749LxGE awlkE6Smrow/EvxYmTZx733dwe319fE7lSTcAPZ42GmvGuaaNj1jHr14Xut6PrLf5Vcmi6 f5HPusgpS7O2B84Hr6iKNvcsrhcyZ1vOXNn+RDm/W/1pYgTtD4jIO4hnkgZDKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=61b16e7cd0585661242e414c5ed6ab205d3d16b4 commit 61b16e7cd0585661242e414c5ed6ab205d3d16b4 Author: Po-Chuan Hsieh AuthorDate: 2022-03-25 13:34:05 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-25 13:38:21 +0000 security/py-pyaxo: Fix build with setuptools 58.0.0+ With hat: python --- security/py-pyaxo/files/patch-2to3 | 173 +++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) diff --git a/security/py-pyaxo/files/patch-2to3 b/security/py-pyaxo/files/patch-2to3 new file mode 100644 index 000000000000..5cfdb57c6c44 --- /dev/null +++ b/security/py-pyaxo/files/patch-2to3 @@ -0,0 +1,173 @@ +--- pyaxo.py.orig 2017-09-15 21:50:29 UTC ++++ pyaxo.py +@@ -124,18 +124,18 @@ class Axolotl(object): + def initState(self, other_name, other_identityKey, other_handshakeKey, + other_ratchetKey, verify=True): + if verify: +- print 'Confirm ' + other_name + ' has identity key fingerprint:\n' ++ print('Confirm ' + other_name + ' has identity key fingerprint:\n') + fingerprint = hash_(other_identityKey).encode('hex').upper() + fprint = '' + for i in range(0, len(fingerprint), 4): + fprint += fingerprint[i:i+2] + ':' +- print fprint[:-1] + '\n' +- print 'Be sure to verify this fingerprint with ' + other_name + \ +- ' by some out-of-band method!' +- print 'Otherwise, you may be subject to a Man-in-the-middle attack!\n' +- ans = raw_input('Confirm? y/N: ').strip() ++ print(fprint[:-1] + '\n') ++ print('Be sure to verify this fingerprint with ' + other_name + \ ++ ' by some out-of-band method!') ++ print('Otherwise, you may be subject to a Man-in-the-middle attack!\n') ++ ans = input('Confirm? y/N: ').strip() + if ans != 'y': +- print 'Key fingerprint not confirmed - exiting...' ++ print('Key fingerprint not confirmed - exiting...') + sys.exit() + + self.conversation = self.init_conversation(other_name, +@@ -386,7 +386,7 @@ class AxolotlConversation: + def _try_skipped_mk(self, msg, pad_length): + msg1 = msg[:HEADER_LEN-pad_length] + msg2 = msg[HEADER_LEN:] +- for skipped_mk in self.staged_hk_mk.values(): ++ for skipped_mk in list(self.staged_hk_mk.values()): + try: + decrypt_symmetric(skipped_mk.hk, msg1) + body = decrypt_symmetric(skipped_mk.mk, msg2) +@@ -456,7 +456,7 @@ class AxolotlConversation: + try: + body = decrypt_symmetric(mk, msg[HEADER_LEN:]) + except CryptoError: +- print 'Undecipherable message' ++ print('Undecipherable message') + sys.exit(1) + else: + try: +@@ -464,7 +464,7 @@ class AxolotlConversation: + except CryptoError: + pass + if self.ratchet_flag or not header or header == '': +- print 'Undecipherable message' ++ print('Undecipherable message') + sys.exit(1) + Np = struct.unpack('>I', header[:HEADER_COUNT_NUM_LEN])[0] + PNp = struct.unpack('>I', header[HEADER_COUNT_NUM_LEN:HEADER_COUNT_NUM_LEN*2])[0] +@@ -481,7 +481,7 @@ class AxolotlConversation: + except CryptoError: + pass + if not body or body == '': +- print 'Undecipherable message' ++ print('Undecipherable message') + sys.exit(1) + self.keys['RK'] = RKp + self.keys['HKr'] = HKp +@@ -499,7 +499,7 @@ class AxolotlConversation: + plaintext = f.read() + ciphertext = b2a(self.encrypt(plaintext)) + '\n' + with open(filename+'.asc', 'w') as f: +- lines = [ciphertext[i:i+64] for i in xrange(0, len(ciphertext), 64)] ++ lines = [ciphertext[i:i+64] for i in range(0, len(ciphertext), 64)] + for line in lines: + f.write(line+'\n') + +@@ -507,7 +507,7 @@ class AxolotlConversation: + with open(filename, 'r') as f: + ciphertext = a2b(f.read()) + plaintext = self.decrypt(ciphertext) +- print plaintext ++ print(plaintext) + + def encrypt_pipe(self): + plaintext = sys.stdin.read() +@@ -528,46 +528,46 @@ class AxolotlConversation: + self._axolotl.delete_conversation(self) + + def print_keys(self): +- print 'Your Identity key is:\n' + b2a(self.keys['DHIs']) + '\n' ++ print('Your Identity key is:\n' + b2a(self.keys['DHIs']) + '\n') + fingerprint = hash_(self.keys['DHIs']).encode('hex').upper() + fprint = '' + for i in range(0, len(fingerprint), 4): + fprint += fingerprint[i:i+2] + ':' +- print 'Your identity key fingerprint is: ' +- print fprint[:-1] + '\n' +- print 'Your Ratchet key is:\n' + b2a(self.keys['DHRs']) + '\n' ++ print('Your identity key fingerprint is: ') ++ print(fprint[:-1] + '\n') ++ print('Your Ratchet key is:\n' + b2a(self.keys['DHRs']) + '\n') + if self.handshake_key: +- print 'Your Handshake key is:\n' + b2a(self.handshake_pkey) ++ print('Your Handshake key is:\n' + b2a(self.handshake_pkey)) + else: +- print 'Your Handshake key is not available' ++ print('Your Handshake key is not available') + + def print_state(self): +- print +- print 'Warning: saving this data to disk is insecure!' +- print ++ print() ++ print('Warning: saving this data to disk is insecure!') ++ print() + for key in sorted(self.keys): + if 'priv' in key: + pass + else: + if self.keys[key] is None: +- print key + ': None' ++ print(key + ': None') + elif type(self.keys[key]) is bool: + if self.keys[key]: +- print key + ': True' ++ print(key + ': True') + else: +- print key + ': False' ++ print(key + ': False') + elif type(self.keys[key]) is str: + try: + self.keys[key].decode('ascii') +- print key + ': ' + self.keys[key] ++ print(key + ': ' + self.keys[key]) + except UnicodeDecodeError: +- print key + ': ' + b2a(self.keys[key]) ++ print(key + ': ' + b2a(self.keys[key])) + else: +- print key + ': ' + str(self.keys[key]) ++ print(key + ': ' + str(self.keys[key])) + if self.mode is ALICE_MODE: +- print 'Mode: Alice' ++ print('Mode: Alice') + else: +- print 'Mode: Bob' ++ print('Mode: Bob') + + + class SkippedMessageKey: +@@ -601,7 +601,7 @@ class SqlitePersistence(object): + sql = decrypt_symmetric(self.dbpassphrase, + crypt_sql) + except CryptoError: +- print 'Bad passphrase!' ++ print('Bad passphrase!') + sys.exit(1) + else: + db.cursor().executescript(sql) +@@ -611,7 +611,7 @@ class SqlitePersistence(object): + try: + db.cursor().executescript(sql) + except sqlite3.OperationalError: +- print 'Bad sql! Password problem - cannot create the database.' ++ print('Bad sql! Password problem - cannot create the database.') + sys.exit(1) + except IOError as e: + if e.errno == errno.ENOENT: +@@ -687,7 +687,7 @@ class SqlitePersistence(object): + to_identity = ?''', ( + conversation.name, + conversation.other_name)) +- for skipped_mk in conversation.staged_hk_mk.values(): ++ for skipped_mk in list(conversation.staged_hk_mk.values()): + db.execute(''' + INSERT INTO + skipped_mk (