Skip to content

Commit

Permalink
net-im/synapse: add 1.94.0
Browse files Browse the repository at this point in the history
The <dev-python/pydantic-2 restriction was removed as this version
supports new releases as well [1].

[1] matrix-org/synapse#16332

Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
  • Loading branch information
arkamar committed Oct 10, 2023
1 parent 4c2dfae commit 501bfe8
Show file tree
Hide file tree
Showing 2 changed files with 212 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net-im/synapse/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ DIST redox_syscall-0.2.16.crate 24012 BLAKE2B 9497a52044458b1435ea16e86ee072e379
DIST regex-1.9.3.crate 252676 BLAKE2B dd419b02b7dbd28a71e14c90bc538e98a63c0b9cc2ea01e7d8f6a0075c723c42c3d7bcbb45391431dec3008e6709e9d1d396d8e505f7f8d5d3a629ededf74b4d SHA512 ef5ece7d2b80a136d437ac42c5395cb01f6d357dcc490c8f6c89657f3f97af6befcc699008535c27583d7354e979418d1d933e36e8774ff2bb62750b9009d5d6
DIST regex-1.9.4.crate 253112 BLAKE2B 434a56ab97d988d0121407f4b49825807c639cbd9c498249da9fdd186a40340157adfeadfb8b0f442fbd63968f4c9fb36c487d9472cacacd1fdba9c357bb9218 SHA512 4c7c478c74dd6a470ff89320a6944ea301967543a5ab281341cb4c8abf1dbbf909f329e73082ff5157db8108eb61b7a1a8b1e88555f848a876bcc5072d23e894
DIST regex-1.9.5.crate 253883 BLAKE2B aeb05371251aaa0fd11dce1f22ea095345b3b1e68d9d5e083b4b8b0b938d0d901b3bade66015bec830db3ee71d0d2ccac09b842ff9919e08b0e98112ea1897be SHA512 79b921edc977dc98bd07e89dc17873c8a1088473ddf941504973259bb8c46ad11bbe3818fb88a7ed07b86841206c322a9555033d0a5dfebb18fcae45e07ea53e
DIST regex-1.9.6.crate 254981 BLAKE2B e0341184d93703a32734f1081d8962723873ef558f4db764b1996dfa9eeb359ac530f7dd93f4d32947e91c056b8bdc51dde99b890c14f959b02763dc22bd996c SHA512 e0da225eeeb9d02b83992959889fa9360b9c549905e4ae4982e61743fccce6d721eb0283a5d2f3e9323193bd5c839a2d0da603849bf6ec5f8ad2b7ffc81c59ab
DIST regex-automata-0.3.6.crate 607174 BLAKE2B 6d02512501b45b0e87d8746c894009ec669fbfdeb742966e8ba8960ebf692f3b2c3df44ce5ee03e7d5320136709ad83b532dbc322a779e3c21ff0f65768c0d0e SHA512 ab3da2e63ff2c6a4da2c149dd34e565303f961f38547db7b34fbe984cf90aac107d4ec116111c765c9b71c4bf26022742151e1d4c5d01a6beac0a8a0887e30ce
DIST regex-automata-0.3.7.crate 607421 BLAKE2B ed040e37e24979118edfe37ddd25443986cab4ab96e6391f9a6f70c6ac308678d5773a14bc2d10e809d7bd26d2725bc45d01493efaaef7e6038152de6fc7fc08 SHA512 967f5d0b452ba782b7e5edcb3e7f1e730407cd65f072eecf9d28d1e4c2cec9954a891a3fb4d69310d299a287a5c6afd22f71f7403dc65e07b7be207a2eac83d9
DIST regex-automata-0.3.8.crate 610113 BLAKE2B 1aebbca26e76e85b42b035fa9ba02f98425b75fdeeec0f12c1c08e8f4a320c64d36c129c692e622256d7f8772052041c47df1aff165d8337d55d61770963a777 SHA512 47ad01be2c51fd510576e14f399b7f30d379a2cce2dbef3af4ee3e609859451082885132ae703c810e2b19bb3716976356e057a1a592ed507146aff9e7138dac
DIST regex-automata-0.3.9.crate 610489 BLAKE2B 6eccdf930979ff4e8657cdb8fc67feebe18d16f6deefda7e1692c6cb6f311bd3c360d9dc091938bdaba061669b003ff7689d7717489326aba70aee563a4f0e20 SHA512 c404677bf470f913c1ca70385a1b9694ec4c048d306380c23001bb746803ff70999c7e215efdf02c6bf03cd9a922e98a6ecb3be588fd4f05c1f57836dbe54c0f
DIST regex-syntax-0.7.4.crate 343365 BLAKE2B b50c01f02e08729496e8bcf023949d088463bf62348b4a1043fe5205650da37863b2ca51f683662a4df33bd56085e0501e50410106c9c471a0daec4c71dfe945 SHA512 b33713c71f6f753820ca6405e8415e5eeed457efd01e81b0b720e48c135b9bb0973962269587ddca31350233aec6d3f598596cb48310db0633bf67f8970f0e18
DIST regex-syntax-0.7.5.crate 343366 BLAKE2B af07596e45e3525ffd253d6070ddad08dffc8f0409ea14843a135646da8b37a7a568c12ede809d9fa47eec2329f68da7a3b3c0e0cabfa200de64affe6ecefee3 SHA512 6388dbf68c8c86d8a5bd8cfb13a86e9ab2da1a339fd607c1a16848f85dd21c85d744d694c7b918954ea27eeefc90b589926c9da464343fb78ab639a5e2925efd
DIST ryu-1.0.11.crate 47007 BLAKE2B d03e8df69c3b21c1b2e4ffa91ece794f141e9f9bce4e9ed1ebf394b1cb0f796147b86189885f0734df8f431b2d166d8f6ed6a261be398d6d088fd56046a85c2e SHA512 dd2642aab2d3017c31432436226d5350b894c8b88a09395eb7de6350964b3cc48451a829ce78b04a9e4e0480076fe1bddd0604f4e57700faa2d60cac6e361408
Expand All @@ -58,6 +60,7 @@ DIST syn-2.0.28.crate 241635 BLAKE2B 5784468a0dd04eb298821ae5a3facf72c5fe5907cc4
DIST synapse-1.90.0.gh.tar.gz 8346382 BLAKE2B 1bb6f6e33a0cf3527b59c7a05e5a1fc1aa088b470c893223376ed274421086efb872c4ecbe25cefe7022765ed5ba728125be3e4fb201b3c21518fbc187cc3d99 SHA512 3772a885ed69f17e3ccc4f9e42d4101b996502ab2c9d73c6acc858021c36a7c315f4c1837fb3b948dccfcf4c4adcc389288a1af877afcd7a39fa34d507be428a
DIST synapse-1.92.2.gh.tar.gz 8371367 BLAKE2B 33c7dff28d360ecfd4b03de39281acefaaf28bade11d3cf4ddf594272a82c90177d96cf80e8563047d44fb5996e5b89ff6facfd1524c64285ebff5c17f61900e SHA512 b44c06960ffb1f17398d0be74e7ed0b0dd701762a470c46f5408294bb2a6781c18e202b35843f435aef7ea96f8a2942f1a3936927f9498c14c539c52b9ae0e07
DIST synapse-1.93.0.gh.tar.gz 8382894 BLAKE2B 8fa62d9b2582c9a637b29764dd8cebd2e90355d2cdc53b953bab3be1e3d6f35ec9fa8d6fd067b3c7de523ce1f8875f43bdef5c79239ab51d8c298498fd15ef66 SHA512 2f613d973f43c9c3ac2d569ac910f69b65cd2980fb1a463a80f3dac8ed75dacff6de0543b6c13230326db879b377bcd7c3f88c961b64ae90af02737cd6b369df
DIST synapse-1.94.0.gh.tar.gz 8397651 BLAKE2B ec30fef5aaf579aa2adca3892dad0c537e3f8fc90db110e58226bce6b12348fc4d5473cbfe4bccc1d984f44028ce8ef8c732a61045928cc914108fa761069be6 SHA512 5e2f62c6ca74dbb2950309e1c0850f70ecdb999d94aa558fcdae951d44ebb853077c10fad5e24db247772547e7e9e65ea471060955d111051d47b29aa859cb0d
DIST target-lexicon-0.12.4.crate 23020 BLAKE2B ad9780b9478b00b4fdcb07bd016d83216695413090ac29cca06388c3790e2832c978b1c7e69f6d34bb6fc9adc39c0a0b6b6636e50a9715a9f5f16445dba22d19 SHA512 194fe1946ad8d9fdb383bf8a65374e24d216382c1ed5379dabc98d58842512624c32838b8d6d0658d866f6559d37f1343a30c5809e8914dd85790399252b3e06
DIST typenum-1.15.0.crate 40741 BLAKE2B 5752d80396d0a37b0069b98ace9efe96d94ccaf41b33b8149c8b8c6a767537dbffe64251bbf61f3812465ecbc8cb45544f177dc97ac9735d84454282e4d1ed66 SHA512 a3c1ceac85e1aed98d0829449c35f4f36db860218b955b4e5f8f01da1d27ee6213f3c60e2b25c3745dcd67369049da5de737a9473fa9402db99cf7cddeb42288
DIST unicode-ident-1.0.5.crate 35455 BLAKE2B 7e14ce97ac53a88ccec015dea690918a673dc5b49e44de7fdcb5421871da35c4f514c6db9a363d6f4bfcf2e9a61a50a593d345d0b6f388ea882b17a00cd0335d SHA512 d355370daac356d900cd4c0a792d6c0eff114524c4bffce4d7e74469fe2117883ee00bf0e27d950b72e88739473f2045d5f83440a0aedfede97b4d9163b64a6c
Expand Down
209 changes: 209 additions & 0 deletions net-im/synapse/synapse-1.94.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=poetry
PYTHON_COMPAT=( python3_{10..12} )

CRATES="
aho-corasick@1.0.2
anyhow@1.0.75
arc-swap@1.5.1
autocfg@1.1.0
bitflags@1.3.2
blake2@0.10.6
block-buffer@0.10.3
cfg-if@1.0.0
crypto-common@0.1.6
digest@0.10.5
generic-array@0.14.6
hex@0.4.3
indoc@1.0.7
itoa@1.0.4
lazy_static@1.4.0
libc@0.2.135
lock_api@0.4.9
log@0.4.20
memchr@2.6.3
memoffset@0.6.5
once_cell@1.15.0
parking_lot@0.12.1
parking_lot_core@0.9.3
proc-macro2@1.0.64
pyo3-build-config@0.17.3
pyo3-ffi@0.17.3
pyo3-log@0.8.3
pyo3-macros-backend@0.17.3
pyo3-macros@0.17.3
pyo3@0.17.3
pythonize@0.17.0
quote@1.0.29
redox_syscall@0.2.16
regex-automata@0.3.9
regex-syntax@0.7.5
regex@1.9.6
ryu@1.0.11
scopeguard@1.1.0
serde@1.0.188
serde_derive@1.0.188
serde_json@1.0.107
smallvec@1.10.0
subtle@2.4.1
syn@1.0.104
syn@2.0.28
target-lexicon@0.12.4
typenum@1.15.0
unicode-ident@1.0.5
unindent@0.1.10
version_check@0.9.4
windows-sys@0.36.1
windows_aarch64_msvc@0.36.1
windows_i686_gnu@0.36.1
windows_i686_msvc@0.36.1
windows_x86_64_gnu@0.36.1
windows_x86_64_msvc@0.36.1
"

inherit cargo distutils-r1 multiprocessing optfeature systemd

DESCRIPTION="Reference implementation of Matrix homeserver"
HOMEPAGE="
https://matrix.org/
https://github.com/matrix-org/synapse/
"
SRC_URI="
https://github.com/matrix-org/${PN}/archive/v${PV}.tar.gz
-> ${P}.gh.tar.gz
${CARGO_CRATE_URIS}
"

LICENSE="Apache-2.0"
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-DFS-2016
"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"
IUSE="postgres systemd test"
RESTRICT="!test? ( test )"

DEPEND="
acct-user/synapse
acct-group/synapse
"
RDEPEND="
${DEPEND}
dev-python/attrs[${PYTHON_USEDEP}]
dev-python/bcrypt[${PYTHON_USEDEP}]
dev-python/bleach[${PYTHON_USEDEP}]
>=dev-python/canonicaljson-2[${PYTHON_USEDEP}]
dev-python/cryptography[${PYTHON_USEDEP}]
dev-python/ijson[${PYTHON_USEDEP}]
dev-python/immutabledict[${PYTHON_USEDEP}]
>=dev-python/jinja-3.0[${PYTHON_USEDEP}]
dev-python/jsonschema[${PYTHON_USEDEP}]
>=dev-python/matrix-common-1.3.0[${PYTHON_USEDEP}]
dev-python/msgpack[${PYTHON_USEDEP}]
dev-python/netaddr[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/phonenumbers[${PYTHON_USEDEP}]
>=dev-python/pillow-10.0.1[${PYTHON_USEDEP},webp]
dev-python/prometheus-client[${PYTHON_USEDEP}]
dev-python/pyasn1-modules[${PYTHON_USEDEP}]
dev-python/pyasn1[${PYTHON_USEDEP}]
dev-python/pydantic[${PYTHON_USEDEP}]
dev-python/pymacaroons[${PYTHON_USEDEP}]
dev-python/pyopenssl[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/service-identity[${PYTHON_USEDEP}]
dev-python/signedjson[${PYTHON_USEDEP}]
dev-python/sortedcontainers[${PYTHON_USEDEP}]
dev-python/treq[${PYTHON_USEDEP}]
dev-python/twisted[${PYTHON_USEDEP}]
dev-python/typing-extensions[${PYTHON_USEDEP}]
dev-python/unpaddedbase64[${PYTHON_USEDEP}]
postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] )
systemd? ( dev-python/python-systemd[${PYTHON_USEDEP}] )
"
BDEPEND="
dev-python/setuptools-rust[${PYTHON_USEDEP}]
test? (
dev-python/hiredis[${PYTHON_USEDEP}]
dev-python/idna[${PYTHON_USEDEP}]
dev-python/parameterized[${PYTHON_USEDEP}]
dev-python/pyicu[${PYTHON_USEDEP}]
dev-python/txredisapi[${PYTHON_USEDEP}]
postgres? ( dev-db/postgresql[server] )
)
"

# Rust extension
QA_FLAGS_IGNORED="usr/lib/python3.*/site-packages/synapse/synapse_rust.abi3.so"

src_test() {
if use postgres; then
einfo "Preparing postgres test instance"
initdb --pgdata="${T}/pgsql" || die
pg_ctl --wait --pgdata="${T}/pgsql" start \
--options="-h '' -k '${T}'" || die
createdb --host="${T}" synapse_test || die

# See https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#running-tests-under-postgresql
local -x SYNAPSE_POSTGRES=1
local -x SYNAPSE_POSTGRES_HOST="${T}"
fi

# This remove is necessary otherwise python is not able to locate
# synapse_rust.abi3.so.
rm -rf synapse || die

nonfatal distutils-r1_src_test
local ret=${?}

if use postgres; then
einfo "Stopping postgres test instance"
pg_ctl --wait --pgdata="${T}/pgsql" stop || die
fi

[[ ${ret} -ne 0 ]] && die
}

python_test() {
"${EPYTHON}" -m twisted.trial -j "$(makeopts_jobs)" tests
}

src_install() {
distutils-r1_src_install
keepdir /var/{lib,log}/synapse /etc/synapse
fowners synapse:synapse /var/{lib,log}/synapse /etc/synapse
fperms 0750 /var/{lib,log}/synapse /etc/synapse
newinitd "${FILESDIR}/${PN}.initd-r1" "${PN}"
systemd_dounit "${FILESDIR}/synapse.service"
}

pkg_postinst() {
optfeature "Improve user search for international display names" dev-python/pyicu
optfeature "Redis support" dev-python/txredisapi
optfeature "VoIP relaying on your homeserver with turn" net-im/coturn

if [[ -z "${REPLACING_VERSIONS}" ]]; then
einfo
elog "In order to generate initial configuration run:"
elog "sudo -u synapse synapse_homeserver \\"
elog " --server-name matrix.domain.tld \\"
elog " --config-path /etc/synapse/homeserver.yaml \\"
elog " --generate-config \\"
elog " --data-directory /var/lib/synapse \\"
elog " --report-stats=no"
einfo
else
einfo
elog "Please refer to upgrade notes if any special steps are required"
elog "to upgrade from the version you currently have installed:"
elog
elog " https://github.com/matrix-org/synapse/blob/develop/docs/upgrade.md"
einfo
fi
}

0 comments on commit 501bfe8

Please sign in to comment.