Bug 292129 - net-im/py-matrix-synapse: Update to 1.144.0
Summary: net-im/py-matrix-synapse: Update to 1.144.0
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL: https://github.com/element-hq/synapse...
Keywords:
Depends on:
Blocks: 289988 290877
  Show dependency treegraph
 
Reported: 2026-01-02 11:02 UTC by Sascha Biberhofer
Modified: 2026-03-04 20:19 UTC (History)
6 users (show)

See Also:


Attachments
net-im/py-matrix-synapse: Update to 1.144.0 (81.68 KB, patch)
2026-01-02 11:02 UTC, Sascha Biberhofer
no flags Details | Diff
net-im/py-matrix-synapse: Update to 1.147.1 (56.85 KB, patch)
2026-02-16 12:07 UTC, Herbert J. Skuhra
no flags Details | Diff
net-im/py-matrix-synapse: Update to 1.147.1 (57.00 KB, patch)
2026-02-25 07:06 UTC, Herbert J. Skuhra
no flags Details | Diff
net-im/py-matrix-synapse: Update to 1.148.0 (57.00 KB, patch)
2026-02-26 09:12 UTC, Herbert J. Skuhra
no flags Details | Diff
net-im/py-matrix-synapse: Update to 1.148.0 v2 (59.09 KB, patch)
2026-03-03 22:40 UTC, Sascha Biberhofer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Biberhofer 2026-01-02 11:02:26 UTC
Created attachment 266750 [details]
net-im/py-matrix-synapse: Update to 1.144.0

This updates net-im/py-matrix-synapse to 1.144.0. While this is nominally just a version bump with regular dependency upgrades, the patch itself is slightly more involved because it fixes an issue present in the 1.144.0 release that relates to our version of zope.interface:

* We remove the defensive upper version bounds on poetry-core and setuptools_rust present in pyproject.toml
* We fix the license declaration in pyproject.toml, which seems incompatible with the version of setuptools we currently use (I think).
* We apply commit df24e0f from upstream (see [1]) to fix an issue with zope.interface versions <6.2 (as described in upstream pr 19274, see [2]).
* While there, I've added the NETWORKING requirement to the rc-script as reported in bug #290877 and fixed the upgrade notes as reported in bug #289988.


Tests pass as usual:

Ran 4479 tests in 264.047s, PASSED (skips=169, successes=4310)

The resulting package builds fine and hasn't cought on fire while running on my server for the past 24 hours, which I'd count as a clear win.


Cheers,
Sascha

[1] https://github.com/element-hq/synapse/commit/df24e0f30244b1c423f4130d64c6008be341d0b7
[2] https://github.com/element-hq/synapse/pull/19274
Comment 1 László Károlyi 2026-02-15 00:29:16 UTC
Is there a reason why this is held back?

Meanwhile, synapse is at 1.147.1.
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-15 12:21:28 UTC
Apparently there are no committers willing to work on the port with rust.
Comment 3 Herbert J. Skuhra 2026-02-15 12:47:18 UTC
(In reply to Vladimir Druzenko from comment #2)
Submitter = maintainer. Why not simply commit this diff? It will not break other ports. Why should a maintainer submit another update if patches are rotting here?
Sorry, no offense.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2026-02-15 13:53:14 UTC
(In reply to Herbert J. Skuhra from comment #3)
Before committing, the committer must build the port at least once in the poudriere with at least one of the supported FreeBSD versions.
Comment 5 Herbert J. Skuhra 2026-02-16 12:07:55 UTC
Created attachment 268096 [details]
net-im/py-matrix-synapse: Update to 1.147.1

This patch tries to update net-im/py-matrix-synapse to version 1.147.1. It builds with poudriere (releng150 pkgbase amd64). Maybe someone wants to test it. :-)
Comment 6 russian 2026-02-24 07:29:41 UTC
(In reply to Herbert J. Skuhra from comment #5)

Build ok.
Got error on startup:
Synapse 1.147.1 needs pyparsing, but it is not installed
Synapse 1.147.1 needs pyrsistent, but it is not installed
Missing Requirements: "pyparsing", "pyrsistent"

Fixed with:
--- ./Makefile.orig	2026-02-24 10:28:07.657481000 +0300
+++ ./Makefile	2026-02-24 10:11:27.479250000 +0300
@@ -45,6 +45,8 @@
 		${PYTHON_PKGNAMEPREFIX}pydantic2>=2.8.0:devel/py-pydantic2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pysaml2>=4.5.0:security/py-pysaml2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}python-multipart>=0.0.9:www/py-python-multipart@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyparsing>=3.0.0:devel/py-pyparsing@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyrsistent>=0.18.0:devel/py-pyrsistent@${PY_FLAVOR} \
 		${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
 TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}virtualenv>=15.0:devel/py-virtualenv@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}tox>=2.3.1:devel/py-tox@${PY_FLAVOR} \
Comment 7 Herbert J. Skuhra 2026-02-25 07:06:50 UTC
Created attachment 268339 [details]
net-im/py-matrix-synapse: Update to 1.147.1

Thanks. I've updated the patch to add missing run depends. Poudriere build OK (releng/15.0 amd64).
Comment 8 Herbert J. Skuhra 2026-02-26 09:12:08 UTC
Created attachment 268368 [details]
net-im/py-matrix-synapse: Update to 1.148.0

Synapse 1.148.0 is out:

https://github.com/element-hq/synapse/releases/tag/v1.148.0

Poudriere build OK (releng/15.0 amd64)
Comment 9 russian 2026-03-02 08:05:13 UTC
(In reply to Herbert J. Skuhra from comment #8)

1.148.0:
build ok
run ok
14.3
Comment 10 László Károlyi 2026-03-03 17:27:17 UTC
I too can confirm that the 1.148.0 patch works.

What the hell is the maintainer waiting for ?!
Comment 11 Sascha Biberhofer 2026-03-03 22:37:19 UTC
As to "what the hell is the maintainer waiting for": The maintaner is waiting for some free time to magically materialize to meaningfully review the proposed patch, which simply wasn't the case in the last few weeks. The maintainer is also fully aware that there's a process in place in case he times out and trusts in that process.

That being said, let me actually provide some meaningful feedback here. First of all, thank you Herbert for putting in the work to update the port!

From a quick glance at the diff, a few version requirements seem to be at odds with the changes in upstream's pyproject.toml:

* maturin requirements should be between 1.0 and <2.0, I think. I'm not sure where the 0.14 lower bound comes from. :D
* A few transitive dependnecies have been added with higher version requirements, and not all of them seem to be reflected in the port.

While none of these things are critical in any sense (and we may in fact even discuss if pining transitive dependencies should be a thing at all), I think I would prefer the keep the port's dependencies in sync with upstream's pyproject.toml to minimize mental overhead in maintaining this list. And since the proposed patch already pinned a few of these transitive dependencies, I guess we may as well go all in.

I'll submit an updated patch in a bit, however I haven't had the time to properly test it. It also seems as if `make test` is failing two tests related to saml2, but I'm not entirely sure if that's only an issue on my machine. :/
Comment 12 Sascha Biberhofer 2026-03-03 22:40:18 UTC
Created attachment 268516 [details]
net-im/py-matrix-synapse: Update to 1.148.0 v2

Here's the aforementioned diff. I'd really appreciate if someone could give this a spin and perhaps run the tests. I hope I'll be able to do so on the weekend myself so we can get this update on the way.

Cheers,
Sascha
Comment 13 László Károlyi 2026-03-03 22:56:08 UTC
Sascha,

make the last few weeks "a last few months". I was intentionally provoking an emotional response to see you're still alive and listening.

If you don't have the time to test and/or commit the changes, you can add me as an additional package maintainer, I use this package actively and so I have a vested interest in having the latest working version.

Not updating synapse was especially awkward because since the last freebsd release (10 versions ago!) they updated it to contain a background task that might reduce a bloated postgresql table by removing unnecessary records, thus saving often hundreds of gigabytes. Many people have this issue.

With that said, I can reproduce the failing tests on my FreeBSD 14.3 box:

tests.storage.test_user_directory.UserDirectoryStoreTestCase.test_search_user_dir_dotted_dotless_i_case_insensitivity
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/twisted/trial/runner.py", line 711, in loadByName
    return self.suiteFactory([self.findByName(name, recurse=recurse)])
  File "/usr/local/lib/python3.11/site-packages/twisted/trial/runner.py", line 474, in findByName
    obj = reflect.namedModule(searchName)
  File "/usr/local/lib/python3.11/site-packages/twisted/python/reflect.py", line 156, in namedModule
    topLevel = __import__(name)
  File "/usr/ports/net-im/py-matrix-synapse/work-py311/matrix_synapse-1.148.0/tests/handlers/test_saml.py", line 39, in <module>
    import saml2.config
  File "/usr/local/lib/python3.11/site-packages/saml2/config.py", line 19, in <module>
    from saml2.mdstore import MetadataStore
  File "/usr/local/lib/python3.11/site-packages/saml2/mdstore.py", line 44, in <module>
    from saml2.httpbase import HTTPBase
  File "/usr/local/lib/python3.11/site-packages/saml2/httpbase.py", line 15, in <module>
    from saml2.pack import make_soap_enveloped_saml_thingy
  File "/usr/local/lib/python3.11/site-packages/saml2/pack.py", line 22, in <module>
    from saml2.sigver import REQ_ORDER
  File "/usr/local/lib/python3.11/site-packages/saml2/sigver.py", line 42, in <module>
    from saml2.xml.schema import XMLSchemaError
  File "/usr/local/lib/python3.11/site-packages/saml2/xml/schema/__init__.py", line 57, in <module>
    _schema_validator_default = _create_xml_schema_validator()
  File "/usr/local/lib/python3.11/site-packages/saml2/xml/schema/__init__.py", line 54, in _create_xml_schema_validator
    return _XMLSchema(source, **kwargs)
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/schemas.py", line 376, in __init__
    self.maps = XsdGlobals(self, parent=self.meta_schema, settings=settings)
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/xsd_globals.py", line 153, in __init__
    ancestor.maps.build()
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/xsd_globals.py", line 550, in build
    self.clear()
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/xsd_globals.py", line 521, in clear
    schema.clear()
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/schemas.py", line 840, in clear
    for attr in self._cached_properties():
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/xsdbase.py", line 75, in _cached_properties
    if isinstance(getattr(cls, k), cached_property):
builtins.AttributeError: __provides__

tests.handlers.test_saml
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/twisted/trial/runner.py", line 711, in loadByName
    return self.suiteFactory([self.findByName(name, recurse=recurse)])
  File "/usr/local/lib/python3.11/site-packages/twisted/trial/runner.py", line 474, in findByName
    obj = reflect.namedModule(searchName)
  File "/usr/local/lib/python3.11/site-packages/twisted/python/reflect.py", line 156, in namedModule
    topLevel = __import__(name)
  File "/usr/ports/net-im/py-matrix-synapse/work-py311/matrix_synapse-1.148.0/tests/rest/client/test_login.py", line 54, in <module>
    from tests.handlers.test_saml import has_saml2
  File "/usr/ports/net-im/py-matrix-synapse/work-py311/matrix_synapse-1.148.0/tests/handlers/test_saml.py", line 39, in <module>
    import saml2.config
  File "/usr/local/lib/python3.11/site-packages/saml2/config.py", line 19, in <module>
    from saml2.mdstore import MetadataStore
  File "/usr/local/lib/python3.11/site-packages/saml2/mdstore.py", line 44, in <module>
    from saml2.httpbase import HTTPBase
  File "/usr/local/lib/python3.11/site-packages/saml2/httpbase.py", line 15, in <module>
    from saml2.pack import make_soap_enveloped_saml_thingy
  File "/usr/local/lib/python3.11/site-packages/saml2/pack.py", line 22, in <module>
    from saml2.sigver import REQ_ORDER
  File "/usr/local/lib/python3.11/site-packages/saml2/sigver.py", line 42, in <module>
    from saml2.xml.schema import XMLSchemaError
  File "/usr/local/lib/python3.11/site-packages/saml2/xml/schema/__init__.py", line 57, in <module>
    _schema_validator_default = _create_xml_schema_validator()
  File "/usr/local/lib/python3.11/site-packages/saml2/xml/schema/__init__.py", line 54, in _create_xml_schema_validator
    return _XMLSchema(source, **kwargs)
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/schemas.py", line 376, in __init__
    self.maps = XsdGlobals(self, parent=self.meta_schema, settings=settings)
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/xsd_globals.py", line 153, in __init__
    ancestor.maps.build()
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/xsd_globals.py", line 550, in build
    self.clear()
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/xsd_globals.py", line 521, in clear
    schema.clear()
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/schemas.py", line 840, in clear
    for attr in self._cached_properties():
  File "/usr/local/lib/python3.11/site-packages/xmlschema/validators/xsdbase.py", line 75, in _cached_properties
    if isinstance(getattr(cls, k), cached_property):
builtins.AttributeError: __provides__

tests.rest.client.test_login
-------------------------------------------------------------------------------
Ran 4473 tests in 220.868s

Looks like an xmlschema package related problem that originates from saml. Not sure if it matters, I use the package flawlessly now.

--
László
Comment 14 Vidar Karlsen 2026-03-04 20:19:40 UTC
(In reply to Sascha Biberhofer from comment #12)

Thank you for your work on this port, I appreciate it!

I'm running 1.148.0 from attachment 268516 [details] (v2), and it seems to be working fine.

The only issue I have, and have had for a while, also prior to upgrading to this version, is that it doesn't terminate when sent a TERM signal:

# service synapse restart
Stopping synapse.
Waiting for PIDS: 47015

Meanwhile, truss says:
47015: <thread 101388 exited>

And nothing more happens until I kill -3 47015.
Then service commences:
Starting synapse.

But this problem existed already in 1.138.0 after I upgraded to FreeBSD 15.0.