git: c4501a503083 - main - net-im/py-matrix-synapse: Update to 1.61.1

From: Ashish SHUKLA <ashish_at_FreeBSD.org>
Date: Wed, 29 Jun 2022 04:29:11 UTC
The branch main has been updated by ashish:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c4501a503083e9de1d8cfd936cfb244642884434

commit c4501a503083e9de1d8cfd936cfb244642884434
Author:     Sascha Biberhofer <sascha.biberhofer@skyforge.at>
AuthorDate: 2022-06-28 19:31:14 +0000
Commit:     Ashish SHUKLA <ashish@FreeBSD.org>
CommitDate: 2022-06-29 04:14:17 +0000

    net-im/py-matrix-synapse: Update to 1.61.1
    
    This minor update contains a security fix for GHSA-22p3-qrh9-cx32 /
    CVE-2022-31052.
    
    While we're at it, switch to pypi as package source. This not only
    follows general python port guidelines but also eliminates the
    need for poetry2setup, hopefully fixing #264178[0].
    
    Changes: https://github.com/matrix-org/synapse/releases/tag/v1.61.1
    
    Signed-off-by: Sascha Biberhofer <sascha.biberhofer@skyforge.at>
    PR:             264178
    MFH:            2022Q2
    Security:       07c0d782-f758-11ec-acaa-901b0e9408dc
    Security:       CVE-2022-31052
---
 net-im/py-matrix-synapse/Makefile                   | 13 +++----------
 net-im/py-matrix-synapse/distinfo                   |  6 +++---
 net-im/py-matrix-synapse/files/patch-pyproject.toml |  6 +++---
 net-im/py-matrix-synapse/files/patch-setup.py       | 11 +++++++++++
 4 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/net-im/py-matrix-synapse/Makefile b/net-im/py-matrix-synapse/Makefile
index 23022e00f29b..7eb0f06b23d4 100644
--- a/net-im/py-matrix-synapse/Makefile
+++ b/net-im/py-matrix-synapse/Makefile
@@ -1,9 +1,9 @@
 # Created by: Brendan Molloy <brendan+freebsd@bbqsrc.net>
 
 PORTNAME=	matrix-synapse
-DISTVERSIONPREFIX=	v
-DISTVERSION=	1.61.0
+DISTVERSION=	1.61.1
 CATEGORIES=	net-im python
+MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	ports@skyforge.at
@@ -12,8 +12,7 @@ COMMENT=	Matrix protocol reference homeserver
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}poetry2setup>=1.0.0:devel/py-poetry2setup@${PY_FLAVOR}
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
 
 # Keep the RUN_DEPENDS layout similar to the master/synapse/python_dependencies.py file
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}jsonschema>=3.0.0:devel/py-jsonschema@${PY_FLAVOR} \
@@ -55,9 +54,6 @@ TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}virtualenv>=15.0:devel/py-virtualenv@${PY_F
 		${PYTHON_PKGNAMEPREFIX}idna>=2.5:dns/py-idna@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_GITHUB=	yes
-GH_ACCOUNT=	matrix-org
-GH_PROJECT=	synapse
 USE_PYTHON=	autoplist distutils
 USE_RC_SUBR=	synapse
 
@@ -100,9 +96,6 @@ URLPREVIEW_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}lxml>=4.2.0:devel/py-lxml@${PY_FL
 RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}importlib-metadata>=1.4:devel/py-importlib-metadata@${PY_FLAVOR}
 .endif
 
-pre-configure:
-	cd ${WRKSRC} && poetry2setup > setup.py
-
 post-install:
 	${MKDIR} ${STAGEDIR}${ETCDIR}
 	${INSTALL_DATA} ${WRKDIR}/log.config ${STAGEDIR}${ETCDIR}/log.config.sample
diff --git a/net-im/py-matrix-synapse/distinfo b/net-im/py-matrix-synapse/distinfo
index 501c3b5da815..562f51c4e70a 100644
--- a/net-im/py-matrix-synapse/distinfo
+++ b/net-im/py-matrix-synapse/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1655316825
-SHA256 (matrix-org-synapse-v1.61.0_GH0.tar.gz) = 3602b4a01688edae8365973877220a0511cb3970ff4e32eec759ca070066a684
-SIZE (matrix-org-synapse-v1.61.0_GH0.tar.gz) = 7879924
+TIMESTAMP = 1656433422
+SHA256 (matrix-synapse-1.61.1.tar.gz) = 201ed822a996209331655156205e878205608e4092a24dd860cca457bda9e2eb
+SIZE (matrix-synapse-1.61.1.tar.gz) = 2868292
diff --git a/net-im/py-matrix-synapse/files/patch-pyproject.toml b/net-im/py-matrix-synapse/files/patch-pyproject.toml
index 903aba718c30..2d5031502396 100644
--- a/net-im/py-matrix-synapse/files/patch-pyproject.toml
+++ b/net-im/py-matrix-synapse/files/patch-pyproject.toml
@@ -1,7 +1,7 @@
---- pyproject.toml.orig	2022-05-07 18:29:37 UTC
+--- pyproject.toml.orig	2022-06-28 16:27:14 UTC
 +++ pyproject.toml
-@@ -146,7 +146,7 @@ bleach = ">=1.4.3"
- typing-extensions = ">=3.10.0"
+@@ -147,7 +147,7 @@ bleach = ">=1.4.3"
+ typing-extensions = ">=3.10.0.1"
  # We enforce that we have a `cryptography` version that bundles an `openssl`
  # with the latest security patches.
 -cryptography = ">=3.4.7"
diff --git a/net-im/py-matrix-synapse/files/patch-setup.py b/net-im/py-matrix-synapse/files/patch-setup.py
new file mode 100644
index 000000000000..13c102222d1b
--- /dev/null
+++ b/net-im/py-matrix-synapse/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig	2022-06-28 16:27:08 UTC
++++ setup.py
+@@ -147,7 +147,7 @@ install_requires = \
+  'bcrypt>=3.1.0',
+  'bleach>=1.4.3',
+  'canonicaljson>=1.4.0',
+- 'cryptography>=3.4.7',
++ 'cryptography',
+  'frozendict>=1,!=2.1.2',
+  'ijson>=3.1.4',
+  'jsonschema>=3.0.0',