pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/chat/matrix-synapse



Module Name:    pkgsrc
Committed By:   js
Date:           Sun Nov 24 13:57:45 UTC 2024

Modified Files:
        pkgsrc/chat/matrix-synapse: Makefile distinfo
Added Files:
        pkgsrc/chat/matrix-synapse/patches: patch-synapse_http_proxy.py

Log Message:
Fix chat/matrix-synapse with newer Twisted


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 pkgsrc/chat/matrix-synapse/Makefile
cvs rdiff -u -r1.71 -r1.72 pkgsrc/chat/matrix-synapse/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/chat/matrix-synapse/patches/patch-synapse_http_proxy.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/chat/matrix-synapse/Makefile
diff -u pkgsrc/chat/matrix-synapse/Makefile:1.101 pkgsrc/chat/matrix-synapse/Makefile:1.102
--- pkgsrc/chat/matrix-synapse/Makefile:1.101   Sat Sep 14 20:28:31 2024
+++ pkgsrc/chat/matrix-synapse/Makefile Sun Nov 24 13:57:45 2024
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.101 2024/09/14 20:28:31 js Exp $
+# $NetBSD: Makefile,v 1.102 2024/11/24 13:57:45 js Exp $
 
 DISTNAME=      matrix-synapse-1.114.0
+PKGREVISION=   1
 CATEGORIES=    chat
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=element-hq/}
 GITHUB_PROJECT=        synapse
@@ -106,8 +107,8 @@ SUBST_VARS.pl=                      SYNAPSE_DEFAULT_CREATOR
 BUILD_DEFS+=                   SYNAPSE_DEFAULT_CREATOR_PL
 
 post-patch:
-       # Otherwise, this file is installed and pollutes PLIST.
-       rm ${WRKSRC}/synapse/handlers/room.py.orig
+       # Otherwise, these files are installed and pollute the PLIST.
+       cd ${WRKSRC} && find . -name '*.orig' | xargs rm
 
 post-install:
        ${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}

Index: pkgsrc/chat/matrix-synapse/distinfo
diff -u pkgsrc/chat/matrix-synapse/distinfo:1.71 pkgsrc/chat/matrix-synapse/distinfo:1.72
--- pkgsrc/chat/matrix-synapse/distinfo:1.71    Sat Sep 14 20:28:31 2024
+++ pkgsrc/chat/matrix-synapse/distinfo Sun Nov 24 13:57:45 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.71 2024/09/14 20:28:31 js Exp $
+$NetBSD: distinfo,v 1.72 2024/11/24 13:57:45 js Exp $
 
 BLAKE2s (aho-corasick-1.1.3.crate) = 36150b5dacb72fa7cd0d33aee15e14857914224878f0af76eabcb9daa68e3ae0
 SHA512 (aho-corasick-1.1.3.crate) = ba422a54688c4678fcf16e34fdf3ed06c333e6e3fc8b75af9272a215add494d43ebaef319021134b61327fd5d3572aec0dc655b714ffb3bc71ba3c265c9ebb69
@@ -262,3 +262,4 @@ BLAKE2s (windows_x86_64_msvc-0.52.5.crat
 SHA512 (windows_x86_64_msvc-0.52.5.crate) = 81176090dc725d7fe3867e6322fdc4a4065168580847b35e6f8da345f685c4f66a81e35cd1880dbaabdd4cdc82446dde9d6a0e583cf0b7fe47dda8bc8002f1c6
 Size (windows_x86_64_msvc-0.52.5.crate) = 827905 bytes
 SHA1 (patch-synapse_handlers_room.py) = f39e6f679a95f7830ba27c007e097c573d953b21
+SHA1 (patch-synapse_http_proxy.py) = ee878d1353b1d83f548861989b5d58aaacd3477d

Added files:

Index: pkgsrc/chat/matrix-synapse/patches/patch-synapse_http_proxy.py
diff -u /dev/null pkgsrc/chat/matrix-synapse/patches/patch-synapse_http_proxy.py:1.1
--- /dev/null   Sun Nov 24 13:57:45 2024
+++ pkgsrc/chat/matrix-synapse/patches/patch-synapse_http_proxy.py      Sun Nov 24 13:57:45 2024
@@ -0,0 +1,27 @@
+$NetBSD: patch-synapse_http_proxy.py,v 1.1 2024/11/24 13:57:45 js Exp $
+
+Upstream thinks private Twisted functions are for them to use. And to
+absolutely nobody's surprise, this of course broke when Twised was updated.
+
+--- synapse/http/proxy.py.orig 2024-11-24 13:33:04.649198671 +0000
++++ synapse/http/proxy.py
+@@ -62,14 +62,11 @@ HOP_BY_HOP_HEADERS = {
+     "Upgrade",
+ }
+ 
+-if hasattr(Headers, "_canonicalNameCaps"):
+-    # Twisted < 24.7.0rc1
+-    _canonicalHeaderName = Headers()._canonicalNameCaps  # type: ignore[attr-defined]
+-else:
+-    # Twisted >= 24.7.0rc1
+-    # But note that `_encodeName` still exists on prior versions,
+-    # it just encodes differently
+-    _canonicalHeaderName = Headers()._encodeName
++
++def _canonicalHeaderName(name):
++    if isinstance(name, unicode):
++        return name.lower().encode('iso-8859-1')
++    return name.lower()
+ 
+ 
+ def parse_connection_header_value(



Home | Main Index | Thread Index | Old Index