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
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.
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.
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.
Ah that explains it. Looking forward to the patch. Thank you for your work! :)
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(+)