Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 893244 - net-im/synapse-1.75.0 ModuleNotFoundError: No module named 'synapse.synapse_rust'
Summary: net-im/synapse-1.75.0 ModuleNotFoundError: No module named 'synapse.synapse_r...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Petr Vaněk
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-02-04 20:13 UTC by ZappeL
Modified: 2023-02-17 05:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ZappeL 2023-02-04 20:13:56 UTC
Service start fails with synapse.synapse_rust module not found - emerge runs fine.

$ /usr/bin/synctl --no-daemonize start /etc/synapse/homeserver.yaml
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.10/synctl", line 5, in <module>
    from synapse._scripts.synctl import main
  File "/usr/lib/python3.10/site-packages/synapse/__init__.py", line 23, in <module>
    from synapse.util.rust import check_rust_lib_up_to_date
  File "/usr/lib/python3.10/site-packages/synapse/util/rust.py", line 20, in <module>
    from synapse.synapse_rust import get_rust_file_digest
ModuleNotFoundError: No module named 'synapse.synapse_rust'
Comment 1 ZappeL 2023-02-05 13:04:39 UTC
Update:

AUR had the same issue some days ago, see: https://github.com/matrix-org/synapse/issues/14966#issuecomment-1413564417

It currently looks to me, like cargo build is never triggerd and therefore the libsynapse.so (synapse_rust.abi3.so) is missing in the install image.

Btw. net-im/synapse-1.74.0 has the same issue.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-05 13:31:20 UTC
Yep, they're using the undocumented `build` key that apparently doesn't work (or doesn't work anymore).
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-05 13:40:04 UTC
Honestly, looking at upstream's response on that bug, I don't think we should cling to this package.
Comment 4 ZappeL 2023-02-05 13:44:02 UTC
Sad story..

What annoys me is that I had the matrix-synapse ebuilds for a while maintained in my repo and now this.. (after I removed it from my repo as I was happy to see it upstream)

Is there anything we can do, or is this now the point where synapse drops of gentoo upstream?
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-05 14:06:12 UTC
Give Petr a chance to look at it. While it's frustrating, he's capable.
Comment 6 ZappeL 2023-02-05 14:25:00 UTC
(In reply to Sam James from comment #5)
> Give Petr a chance to look at it. While it's frustrating, he's capable.

For sure! (I just want to support)


Just to sum it up, the problem it the "build" section which calls the "build_rust.py" inside pyproject.toml. Which is never executed by the "DISTUTILS_USE_PEP517=poetry" hook. Is that correct?
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-05 14:31:23 UTC
Actually, it's a problem in poetry-core-1.5.0.  FWICS, 1.4.0 still executes the build hook but 1.5.0 does not.  I don't see anything in the changelog, so maybe it's a bug.  I'm going to try to figure it out.
Comment 8 ZappeL 2023-02-05 14:38:31 UTC
(In reply to Michał Górny from comment #7)
> Actually, it's a problem in poetry-core-1.5.0.  FWICS, 1.4.0 still executes
> the build hook but 1.5.0 does not.  I don't see anything in the changelog,
> so maybe it's a bug.  I'm going to try to figure it out.

WOW! You made my day!

I've just added "<dev-python/poetry-core-1.5.0" to the BDEPS and now it's working again.

As a temporary solution this works for the moment. But it would be nice if we can find out what exaclty caused that.

many thanks for your investigations!
Comment 9 Larry the Git Cow gentoo-dev 2023-02-05 15:44:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a72fce1c207345e654b893f37ce10253278e3191

commit a72fce1c207345e654b893f37ce10253278e3191
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2023-02-05 15:26:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-05 15:44:21 +0000

    net-im/synapse: limit poetry-core to <1.5.0
    
    Synapse has frequent releases, we can limit poetry-core to <1.5.0 now
    and wait for the next version where the issue will be solved.
    
    Bug: https://bugs.gentoo.org/893244
    See-also: https://github.com/matrix-org/synapse/pull/14949
    See-also: https://github.com/python-poetry/poetry/issues/7470
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Closes: https://github.com/gentoo/gentoo/pull/29379
    Signed-off-by: Sam James <sam@gentoo.org>

 net-im/synapse/{synapse-1.74.0.ebuild => synapse-1.74.0-r1.ebuild} | 1 +
 net-im/synapse/{synapse-1.75.0.ebuild => synapse-1.75.0-r1.ebuild} | 1 +
 net-im/synapse/synapse-1.76.0.ebuild                               | 1 +
 3 files changed, 3 insertions(+)
Comment 10 Larry the Git Cow gentoo-dev 2023-02-17 05:29:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d8c984d6bc3841d474a327288ee2834c403bf3e

commit 5d8c984d6bc3841d474a327288ee2834c403bf3e
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2023-02-14 15:23:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-17 05:20:08 +0000

    net-im/synapse: add 1.77.0
    
    Upstream fixed the issue with poetry-core-1.5.0 in this version.
    
    Closes: https://bugs.gentoo.org/893244
    See-also: https://github.com/matrix-org/synapse/pull/14949
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Closes: https://github.com/gentoo/gentoo/pull/29579
    Signed-off-by: Sam James <sam@gentoo.org>

 net-im/synapse/Manifest              |   3 +
 net-im/synapse/synapse-1.77.0.ebuild | 199 +++++++++++++++++++++++++++++++++++
 2 files changed, 202 insertions(+)