#1013745 matrix-synapse: fails to start due to newer matrix-common

Package:
matrix-synapse
Source:
matrix-synapse
Description:
Matrix reference homeserver
Submitter:
Phil Morrell
Date:
2022-06-25 10:39:03 UTC
Severity:
grave
Tags:
#1013745#5
Date:
2022-06-25 10:00:24 UTC
From:
To:
Hi andrewsh, I believe you're aware of the problem, but yesterday's -2
upload does not fix it so I've included full details anyway. Patch is:

    diff --git i/pyproject.toml w/pyproject.toml
    index 8b21bdc8..3c64e248 100644
    --- i/pyproject.toml
    +++ w/pyproject.toml
    @@ -150,7 +150,7 @@ typing-extensions = ">=3.10.0.1"
     cryptography = ">=3.4.7"
     # ijson 3.1.4 fixes a bug with "." in property names
     ijson = ">=3.1.4"
    -matrix-common = "~=1.1.0"
    +matrix-common = "~=1.2.1"
     # We need packaging.requirements.Requirement, added in 16.1.
     packaging = ">=16.1"
     # At the time of writing, we only use functions from the version `importlib.metadata`


Since the upload of python-matrix-common 1.2.1 (16th in sid, 22nd in
testing and bullseye-backports) the next matrix-synapse server restart
after upgrading fails to start with the following runtime check:

    Synapse 1.57.1 needs matrix-common~=1.1.0, but got matrix-common==1.2.1

I assume here that the `~=` dep is merely too strict, and note this
isn't an apt error but python module versioning so the package installs
successfully and (see debconf below) doesn't even need a working
homeserver config. The emergency fix to be up and running again was:

    sudo sed -i '/common/s/~=/>=/' /usr/lib/python3/dist-packages/matrix_synapse-1.57.1.dist-info/METADATA

The old synapse version is what Freedombox is on until [#2230] is fixed
and rolled out, but I've checked it still affects the latest upload:

    $ grep common /usr/lib/python3/dist-packages/matrix_synapse-*.dist-info/METADATA
    Requires-Dist: matrix-common (>=1.1.0,<1.2.0)

This has been discussed in [Matrix on Debian], [FreedomBox] and
[Freedombox Dev] channels. I also found upstream has [merged a fix] in
develop, so this patch is only needed until the next version upload.


[#2230]: https://salsa.debian.org/freedombox-team/freedombox/-/issues/2230
[Matrix on Debian]: https://view.matrix.org/room/!tfCIguhhYiGiAlZqQS:matrix.org/?offset=-29&anchor=$NbsC6BU-TUe1n_vyWGOac8FaLzh9fn8Prz0-fs1GbIQ
[FreedomBox]: https://view.matrix.org/room/!jrrfdpcKPllUsyVuBf:matrix.org/?offset=-29&anchor=$165596373446454OHKvP:matrix.org
[FreedomBox Dev]: https://matrix.to/#/#freedombox-dev:synapse.sds-ip.de
[merged a fix]: https://github.com/matrix-org/synapse/commit/f30bcbd84a651de59777b2a749850f6ca56ce3f0

#1013745#12
Date:
2022-06-25 10:34:20 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
matrix-synapse, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1013745@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrej Shadura <andrewsh@debian.org> (supplier of updated matrix-synapse package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 25 Jun 2022 12:19:57 +0200
Source: matrix-synapse
Architecture: source
Version: 1.61.0-3
Distribution: unstable
Urgency: medium
Maintainer: Matrix Packaging Team <pkg-matrix-maintainers@lists.alioth.debian.org>
Changed-By: Andrej Shadura <andrewsh@debian.org>
Closes: 1013745
Changes:
 matrix-synapse (1.61.0-3) unstable; urgency=medium
 .
   * Use execute_after_*.
   * Patch the matrix-common dependency to >= (Closes: #1013745).
Checksums-Sha1:
 93799c57938a4abd780dc3f619fea72e713dddf6 2601 matrix-synapse_1.61.0-3.dsc
 4acfebae61e6b8ba82a2514aaa5d37f71ee53bc3 109732 matrix-synapse_1.61.0-3.debian.tar.xz
Checksums-Sha256:
 ec594319c64011358591e40103bf6a77eb6b1eeaadbb72efc736d29094076a9e 2601 matrix-synapse_1.61.0-3.dsc
 3854bf6d6d3ca8429b1d11638016c649f575e20eac97203d9016e674aac27aee 109732 matrix-synapse_1.61.0-3.debian.tar.xz
Files:
 d6039984d18550672c61d85c1a885d82 2601 net optional matrix-synapse_1.61.0-3.dsc
 41eee47c9043a86caff7e553b0ffd411 109732 net optional matrix-synapse_1.61.0-3.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQSD3NF/RLIsyDZW7aHoRGtKyMdyYQUCYrbhdwAKCRDoRGtKyMdy
YRxiAQCzLLNTfw+bvSeE2IQsu+ZgTZyczuRJ23DspRbRdfZW9wEA7PTg4txTH+7b
WIdxkxPuL6ahgEk54APwMu7DONKrwA0=
=ykQW
-----END PGP SIGNATURE-----