synapse: update to 1.51.0.

- Switch to python3-pytest for running tests (@paper42)

- remove logging process. By default synapse only logs to stderr when
there is a problem with configuration.  For this we don't need a process
running that won't do anything for 99% of the time.  Logging to runsvdir
should be enough.
- make service configurable. That way one can set desired locale and path
to config file.
- remove patches to sample config.
- create directory for config.
Improvements contributed by David Flatz <david@upcs.at>.
This commit is contained in:
Joel Beckmeyer 2021-12-31 09:45:03 +01:00 committed by paper
parent 52d0817efb
commit b30e92c6e5
5 changed files with 8 additions and 112 deletions

View file

@ -1 +0,0 @@
/usr/bin/vlogger

View file

@ -1,4 +1,4 @@
#!/bin/sh
[ -r ./conf ] && . ./conf
cd /var/lib/synapse
exec 2>&1
exec chpst -u synapse:synapse synapse_homeserver -c /etc/synapse/homeserver.yaml
exec chpst -u synapse:synapse synapse_homeserver -c ${CONFIG_FILE:-/etc/synapse/homeserver.yaml}

View file

@ -1,88 +0,0 @@
diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml
index 6696ed5d1..f17661fff 100644
--- a/docs/sample_config.yaml
+++ b/docs/sample_config.yaml
@@ -68,11 +68,11 @@ modules:
# lowercase and may contain an explicit port.
# Examples: matrix.org, localhost:8080
#
-server_name: "SERVERNAME"
+#server_name: "SERVERNAME"
# When running as a daemon, the file to store the pid in
#
-pid_file: DATADIR/homeserver.pid
+#pid_file: /var/lib/synapse/homeserver.pid
# The absolute URL to the web client which /_matrix/client will redirect
# to if 'webclient' is configured under the 'listeners' configuration.
@@ -370,8 +370,8 @@ manhole_settings:
# If these are left unset, then hardcoded and non-secret keys are used,
# which could allow traffic to be intercepted if sent over a public network.
#
- #ssh_priv_key_path: CONFDIR/id_rsa
- #ssh_pub_key_path: CONFDIR/id_rsa.pub
+ #ssh_priv_key_path: /etc/synapse/id_rsa
+ #ssh_pub_key_path: /etc/synapse/id_rsa.pub
# Forward extremities can build up in a room due to networking delays between
# homeservers. Once this happens in a large room, calculation of the state of
@@ -614,11 +614,11 @@ retention:
# any intermediate certificates (for instance, if using certbot, use
# `fullchain.pem` as your certificate, not `cert.pem`).
#
-#tls_certificate_path: "CONFDIR/SERVERNAME.tls.crt"
+#tls_certificate_path: "/etc/synapse/SERVERNAME.tls.crt"
# PEM-encoded private key for TLS
#
-#tls_private_key_path: "CONFDIR/SERVERNAME.tls.key"
+#tls_private_key_path: "/etc/synapse/SERVERNAME.tls.key"
# Whether to verify TLS server certificates for outbound federation requests.
#
@@ -808,7 +808,7 @@ caches:
database:
name: sqlite3
args:
- database: DATADIR/homeserver.db
+ database: /var/lib/synapse/homeserver.db
## Logging ##
@@ -816,7 +816,7 @@ database:
# A yaml python logging config file as described by
# https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
#
-log_config: "CONFDIR/SERVERNAME.log.config"
+log_config: "/etc/synapse/log.yaml"
## Ratelimiting ##
@@ -942,7 +942,7 @@ log_config: "CONFDIR/SERVERNAME.log.config"
# Directory where uploaded images and attachments are stored.
#
-media_store_path: "DATADIR/media_store"
+media_store_path: "/var/lib/synapse/media_store"
# Media storage providers allow media to be stored in different
# locations.
@@ -1531,7 +1531,7 @@ room_prejoin_state:
# Path to the signing key to sign messages with
#
-signing_key_path: "CONFDIR/SERVERNAME.signing.key"
+signing_key_path: "/etc/synapse/SERVERNAME.signing.key"
# The keys that the server used to sign messages with but won't use
# to sign new messages.
@@ -1710,7 +1710,7 @@ saml2_config:
# Instead of putting the config inline as above, you can specify a
# separate pysaml2 configuration file:
#
- #config_path: "CONFDIR/sp_conf.py"
+ #config_path: "/etc/synapse/sp_conf.py"
# The lifetime of a SAML session. This defines how long a user has to
# complete the authentication process, if allow_unsolicited is unset.

View file

@ -1,13 +0,0 @@
diff --git a/docs/sample_log_config.yaml b/docs/sample_log_config.yaml
index 2485ad25e..71465726b 100644
--- a/docs/sample_log_config.yaml
+++ b/docs/sample_log_config.yaml
@@ -19,7 +19,7 @@ handlers:
file:
class: logging.handlers.TimedRotatingFileHandler
formatter: precise
- filename: /var/log/matrix-synapse/homeserver.log
+ filename: /var/log/synapse/homeserver.log
when: midnight
backupCount: 3 # Does not include the current log file.
encoding: utf8

View file

@ -1,8 +1,9 @@
# Template file for 'synapse'
pkgname=synapse
version=1.49.2
version=1.51.0
revision=1
build_style=python3-module
make_check_target=tests
hostmakedepends="python3-setuptools"
depends="python3-jsonschema python3-frozendict python3-canonicaljson
python3-signedjson python3-pynacl python3-service_identity python3-Twisted
@ -11,27 +12,24 @@ depends="python3-jsonschema python3-frozendict python3-canonicaljson
python3-phonenumbers python3-prometheus_client python3-attrs python3-netaddr
python3-setuptools python3-bleach python3-Jinja2 python3-psycopg2 python3-lxml
python3-saml2 python3-treq python3-macaroons python3-sortedcontainers
python3-typing_extensions python3-ijson"
checkdepends="$depends python3-parameterized python3-mock"
python3-typing_extensions python3-ijson python3-matrix-common"
checkdepends="$depends python3-parameterized python3-pytest"
short_desc="Matrix reference homeserver"
maintainer="Joel Beckmeyer <joel@beckmeyer.us>"
license="Apache-2.0"
homepage="https://github.com/matrix-org/synapse"
changelog="https://raw.githubusercontent.com/matrix-org/synapse/develop/CHANGES.md"
distfiles="https://github.com/matrix-org/synapse/archive/v${version}.tar.gz"
checksum=f5b0017e9d77db94fac853fbefbcb4538d879cb80f404b02003930c76f5cafab
checksum=acb587b9d4a92f15bc5f6e1f5b598ee1e1a7c3a298c923ff73ffd505de779353
system_accounts="synapse"
synapse_homedir="/var/lib/synapse"
make_dirs="
/var/lib/synapse 0700 synapse synapse
/etc/synapse 755 synapse synapse
/var/log/synapse 0755 synapse synapse"
do_check() {
PYTHONPATH="." trial3 ${makejobs} tests
}
post_install() {
vsv synapse