From nobody Sat Dec 31 01:13:48 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 4NkPK82KCTz2l05S; Sat, 31 Dec 2022 01:13:48 +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 4NkPK81pNnz46GW; Sat, 31 Dec 2022 01:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672449228; 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=9lqktZLvkTBwpIRCZPj79bfPiN6kZVS3AA+Ou8cTr20=; b=dFGtFAFHh6s/KYRja3djvvpKhSBxYgg8zNwxG1jJ4Z8BWvDuyLm+dZlQXkhBYh6GogC0eo 0ysnwx5tCnnnUBT6prJgUOwn/+m/ecExIyen9cLFNG+qbx4VwtjCF/0Xb3oxzV6IItvzi8 fhWEFQ63LIu5wFRThE26Nj6QT0lB3QuSOn9HuaZTYMVbjYvYABOsNKUoRAgQqx2/sj/Uqc 9oAQdyQ1ZMNjaN1WdLEDnBQjAu5VwlTB4mfavoJUl6Iu4nOdugDmupNQoJtPQ7uyQ96YOE Ir1tmAsg7YlAtf2b/lJ4KX5JUEWzdw6Dh55EuSVpJF61u000OhCnKSDXFRv6Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672449228; 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=9lqktZLvkTBwpIRCZPj79bfPiN6kZVS3AA+Ou8cTr20=; b=dKQ2AdFsdWb0ICE8kc2+i/fYpLSRzF2L+GVSmXOc+YS6W+nGs0SdY2AyR6Ns4Pwr9xlv3P ixSSFve4fyKdH4D66PFpEYloOS9cDg9WufTUsMuSuhrrel3ewsRozQgXnfY6hTrayGrP8Y atCOC5PMGeYyyxzPq+F3fHqFG4nAaqj67P9Y+cTUnSXGuH+9LMnj3SbsApL1ACcxX6KKVH Zb4YWFPGmuR1H6p9mn3xrAu5BOgo8RTsEEXj4EzrptcOiISFXsyVTnvTab1VtvRlacbX1L zc8i4FSYeg1BG7k7xMIV6ulAwhLYdbisvkL7bwByMSGSmEfO1X2+vx3L0Gc1Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672449228; a=rsa-sha256; cv=none; b=APnA9nwXFrCXriAsmNNDk+q0kZC/T594tPxbUEHJtxJcvz81RC9Wq+nceTe4ojpDqv2DBV jzFCywjHwuPKV+r6lqUIevyUJm/Zri5sfOF5gTwEA6e7GK6PRquT/l4srttbvMqwLNdWAU S41UCeA+focDC93rS0SDLnYWKCxoF5gSNO0vKXXckaxMAt3A+0nXaN5Tm1uVW9x/fWdwmi KVZWRPNdzl53j7MNmrU0qxOrfOkTuv7UoAjekvM2Xk96Q+FQHS2/hX6qJdPt3pP9vYc4ya s9/S6HtV7LMfuFWAtKtLF01NH9fYRbrUsj20U0zmY+TRgxetxrQmW6Yf+KhRQw== 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 4NkPK80scrzVT4; Sat, 31 Dec 2022 01:13:48 +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 2BV1DmHT004753; Sat, 31 Dec 2022 01:13:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BV1Dmrk004752; Sat, 31 Dec 2022 01:13:48 GMT (envelope-from git) Date: Sat, 31 Dec 2022 01:13:48 GMT Message-Id: <202212310113.2BV1Dmrk004752@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 9f7867340232 - main - devel/py-rauth: Add Cryptodome support 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: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f786734023235ec6cff1af08ff0d9c03c31e496 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=9f786734023235ec6cff1af08ff0d9c03c31e496 commit 9f786734023235ec6cff1af08ff0d9c03c31e496 Author: Muhammad Moinur Rahman AuthorDate: 2022-12-31 01:08:34 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2022-12-31 01:13:26 +0000 devel/py-rauth: Add Cryptodome support PR: 248307 Reported by: john@saltant.com --- devel/py-rauth/Makefile | 1 + devel/py-rauth/files/patch-rauth__oauth.py | 29 +++++++++++++++++++++++++++++ devel/py-rauth/files/patch-setup.py | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/devel/py-rauth/Makefile b/devel/py-rauth/Makefile index 6272c472192a..4f9afe90e48b 100644 --- a/devel/py-rauth/Makefile +++ b/devel/py-rauth/Makefile @@ -1,5 +1,6 @@ PORTNAME= rauth PORTVERSION= 0.7.2 +PORTREVISION= 1 CATEGORIES= devel www python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/devel/py-rauth/files/patch-rauth__oauth.py b/devel/py-rauth/files/patch-rauth__oauth.py new file mode 100644 index 000000000000..9a829f92bf22 --- /dev/null +++ b/devel/py-rauth/files/patch-rauth__oauth.py @@ -0,0 +1,29 @@ +commit 7fb3b7bf1a1869a52cf59ee3eb607d318e97265c +Author: John W. O'Brien +Date: Mon Jul 27 14:56:02 2020 -0400 + + Support PyCryptodome as alternative to PyCrypto + +--- rauth/oauth.py.orig 2015-11-05 16:01:31 UTC ++++ rauth/oauth.py +@@ -171,7 +171,8 @@ class RsaSha1Signature(SignatureMethod): + from Crypto.Signature import PKCS1_v1_5 as p + self.RSA, self.SHA, self.PKCS1_v1_5 = r, s, p + except ImportError: # pragma: no cover +- raise NotImplementedError('PyCrypto is required for ' + self.NAME) ++ raise NotImplementedError('PyCrypto(dome) is required for ' ++ + self.NAME) + + def sign(self, + consumer_secret, +@@ -208,7 +209,9 @@ class RsaSha1Signature(SignatureMethod): + # resolve the key + if is_basestring(consumer_secret): + consumer_secret = self.RSA.importKey(consumer_secret) +- if not isinstance(consumer_secret, self.RSA._RSAobj): ++ valid_cls = (getattr(self.RSA, '_RSAobj', False) ++ or getattr(self.RSA, 'RsaKey', False)) ++ if not (valid_cls and isinstance(consumer_secret, valid_cls)): + raise ValueError('invalid consumer_secret') + + # hash the string with RSA-SHA1 diff --git a/devel/py-rauth/files/patch-setup.py b/devel/py-rauth/files/patch-setup.py index ec3c9a39b67d..6594fc1996a5 100644 --- a/devel/py-rauth/files/patch-setup.py +++ b/devel/py-rauth/files/patch-setup.py @@ -14,7 +14,7 @@ +tests_require = [ + 'nose', + 'mock', -+ 'pycrypto', ++ 'pycryptodome', +] + if sys.version_info[0] == 2 and sys.version_info[1] < 7: