Bug 270737 - net-im/py-matrix-synapse: 1.80.0 fails to start with devel/py-canonicaljson 2.0.0
Summary: net-im/py-matrix-synapse: 1.80.0 fails to start with devel/py-canonicaljson 2...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Li-Wen Hsu
URL:
Keywords: patch-ready, regression
Depends on:
Blocks:
 
Reported: 2023-04-10 10:59 UTC by kaltheat
Modified: 2023-04-29 20:22 UTC (History)
8 users (show)

See Also:
lwhsu: maintainer-feedback? (ports)


Attachments
v1 (10.94 KB, patch)
2023-04-22 11:09 UTC, Li-Wen Hsu
no flags Details | Diff
v2 (13.75 KB, patch)
2023-04-24 02:03 UTC, Li-Wen Hsu
no flags Details | Diff
v3 (13.92 KB, patch)
2023-04-24 20:39 UTC, Li-Wen Hsu
no flags Details | Diff
v4 (13.92 KB, patch)
2023-04-26 09:27 UTC, Li-Wen Hsu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kaltheat 2023-04-10 10:59:50 UTC
Hi,

with devel/py-canonicaljson 2.0.0 (which was updated 5 days ago[1]) I get:

# /usr/local/etc/rc.d/synapse start
Starting synapse.
ERROR:root:Synapse 1.80.0 needs canonicaljson<2.0.0,>=1.5.0, but got canonicaljson==2.0.0
Missing Requirements: "canonicaljson"
To install run:
    pip install --upgrade --force "canonicaljson"
/usr/local/etc/rc.d/synapse: WARNING: failed to start synapse


Maybe this version-dependency is obsolete since in pyproject.toml[2] and poetry.lock[3] version 2.0.0 is mentioned explicitely?

Regards,
kaltheat

[1] https://cgit.freebsd.org/ports/commit/devel/py-canonicaljson?id=d619c996005f45bf2427e69e5e9e75c3e68239e6
[1] https://github.com/matrix-org/synapse/blob/develop/pyproject.toml
[2] https://github.com/matrix-org/synapse/blob/develop/poetry.lock
Comment 1 x0r+freebsd 2023-04-12 17:05:04 UTC
Hi,

I’ve just stumbled upon the same problem.

(There’s a typo in the subject: it says “1.8.0” where it should say “1.80.0”.)

It seems that version 1.80.0 absolutely requires py-canonicaljson version 1.5.0 and will not work with version 2.0.0, as can be seen in that version’s pyproject.toml [1]. However, the latest version 1.81.0, that has just been released, requires py-canonicaljson version >=2.0.0 and <3.0.0, as the latest version’s pyproject.toml [2] shows.

So it seems to me that the fix consists of basically upgrading to the latest version (and ensuring that, in the port, the version requirement for devel/py-canonicaljson is bumped to 2.0.0). :-)

Regards,

x0r

[1]: https://github.com/matrix-org/synapse/blob/v1.80.0/pyproject.toml#L162
[2]: https://github.com/matrix-org/synapse/blob/v1.81.0/pyproject.toml#L161
Comment 2 Li-Wen Hsu freebsd_committer freebsd_triage 2023-04-22 11:09:08 UTC
Created attachment 241651 [details]
v1

I have this patch to update to 1.81.0 to pass poudriere but haven't done the run test. Please help test this. Thanks.
Comment 3 Li-Wen Hsu freebsd_committer freebsd_triage 2023-04-22 15:09:30 UTC
doing the tests, 1.81.0 needs a new dependency: py-immutabledict which I have a WIP: https://gist.github.com/lwhsu/e9edfde5f157f3253f57b1cce7ed11ca

So we need to modify and cleanup the dependency list.
Comment 4 Li-Wen Hsu freebsd_committer freebsd_triage 2023-04-24 02:03:30 UTC
Created attachment 241692 [details]
v2

Dependency updated.
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2023-04-24 11:53:33 UTC
(In reply to x0r+freebsd from comment #1)

According to [1], matrix-synapse 1.80.0 allows canonicaljson >=1.5.0<2.0.0 which is not shown in RUN_DEPENDS. Therefore, when I updated py-canonicaljson to 2.0.0, it satisfied requirement of all dependent ports.

[1] https://github.com/matrix-org/synapse/blob/v1.80.0/pyproject.toml#L164

(In reply to Li-Wen Hsu from comment #4)

canonicaljson = "^2.0.0" means ">=2.0.0<3.0.0". Please add the upper bound in case it breaks unnoticed again when py-canonicaljson updated to 3.* some day.
Comment 6 Li-Wen Hsu freebsd_committer freebsd_triage 2023-04-24 20:39:32 UTC
Created attachment 241715 [details]
v3

More dependency version check.
Comment 7 Li-Wen Hsu freebsd_committer freebsd_triage 2023-04-26 09:27:20 UTC
Created attachment 241754 [details]
v4

Update to 1.82.0
Comment 8 Li-Wen Hsu freebsd_committer freebsd_triage 2023-04-26 09:28:15 UTC
(In reply to Li-Wen Hsu from comment #7)
I plan to commit this soon as it has passe maintainer timeout.
Comment 9 commit-hook freebsd_committer freebsd_triage 2023-04-27 18:26:09 UTC
A commit in branch main references this bug:

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

commit f1f155eea12c242e6670c7b0f80b25f280b207a9
Author:     Li-Wen Hsu <lwhsu@FreeBSD.org>
AuthorDate: 2023-04-27 18:24:28 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2023-04-27 18:24:28 +0000

    net-im/py-matrix-synapse: Update to 1.82.0

    PR:             270737
    Approved by:    maintainer timeout

 net-im/py-matrix-synapse/Makefile                  | 72 +++-------------------
 net-im/py-matrix-synapse/Makefile.crates (new)     | 55 +++++++++++++++++
 net-im/py-matrix-synapse/distinfo                  | 30 ++++-----
 .../py-matrix-synapse/files/patch-pyproject.toml   | 40 ++----------
 net-im/py-matrix-synapse/files/patch-setup.py      | 13 +---
 5 files changed, 85 insertions(+), 125 deletions(-)
Comment 10 x0r+freebsd 2023-04-29 20:22:03 UTC
I can confirm that net-im/py-matrix-synapse version 1.82.0 works fine on my setup. Thanks for working on it!