Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 857999

Summary: net-im/synapse: missing runtime dependency on dev-python/psycopg:2
Product: Gentoo Linux Reporter: Kenton Groombridge <concord>
Component: Current packagesAssignee: Petr Vaněk <arkamar>
Status: RESOLVED FIXED    
Severity: normal CC: proxy-maint
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/26486
Whiteboard:
Package list:
Runtime testing required: ---

Description Kenton Groombridge gentoo-dev 2022-07-14 18:34:21 UTC
Synapse is missing a runtime dependency on dev-python/psycopg:2 and will fail to start if synapse is configured to use postgres as the backend database:

RuntimeError: Cannot create PostgresEngine -- psycopg2 module is not installed
Comment 1 Petr Vaněk gentoo-dev 2022-07-15 13:26:06 UTC
psycopg2 is optional dependency, I didn't integrate it yet because synapse needs

   postgres = ["psycopg2", "psycopg2cffi", "psycopg2cffi-compat"]

according to a pyproject.toml, but psycopg2cffi and psycopg2cffi-compat are not present in ::gentoo.
Comment 2 Kenton Groombridge gentoo-dev 2022-07-15 13:42:38 UTC
Interestingly on my system I don't have either psycopg2cffi or psycopg2cffi-compat installed and yet Synapse seems to not care.

I know there was some upstream work to port Synapse's postgres backend to psycopg3 but I'm not sure what the status of that is.
Comment 3 Petr Vaněk gentoo-dev 2022-07-15 13:46:48 UTC
Ah, I see, psycopg2cffi and psycopg2cffi-compat are used when "platform_python_implementation == 'PyPy'" and psycopg2 otherwise. I will extend the ebuild with USE=postgres.
Comment 4 Kenton Groombridge gentoo-dev 2022-07-15 13:53:02 UTC
Ah that explains it. Looking forward to the patch. Thank you for your work! :)
Comment 5 Larry the Git Cow gentoo-dev 2022-07-29 03:16:45 UTC
The bug has been closed via the following commit(s):

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

commit e715058e518723fe8a9000539578483d8bbab060
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2022-07-20 13:31:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-29 03:14:31 +0000

    net-im/synapse: add 1.63.1
    
    Closes: https://bugs.gentoo.org/857996
    Closes: https://bugs.gentoo.org/857999
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Closes: https://github.com/gentoo/gentoo/pull/26486
    Signed-off-by: Sam James <sam@gentoo.org>

 net-im/synapse/Manifest              |   1 +
 net-im/synapse/files/synapse.service |  22 ++++++++
 net-im/synapse/synapse-1.63.1.ebuild | 104 +++++++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+)