Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/ms…
Browse files Browse the repository at this point in the history
…c_1813
  • Loading branch information
erikjohnston committed Jan 25, 2019
2 parents 26f4416 + edc1e21 commit 62514bb
Show file tree
Hide file tree
Showing 63 changed files with 1,459 additions and 1,025 deletions.
6 changes: 1 addition & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
[run]
branch = True
parallel = True
source = synapse

[paths]
source=
coverage
include = synapse/*

[report]
precision = 2
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ homeserver*.pid
*.tls.dh
*.tls.key

.coverage
.coverage.*
!.coverage.rc
.coverage*
coverage.*
!.coveragerc
htmlcov

demo/*/*.db
Expand Down
1 change: 1 addition & 0 deletions changelog.d/4306.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+ and SQLite 3.24+.
1 change: 1 addition & 0 deletions changelog.d/4384.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Synapse can now automatically provision TLS certificates via ACME (the protocol used by CAs like Let's Encrypt).
1 change: 1 addition & 0 deletions changelog.d/4405.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug when rejecting remote invites
1 change: 1 addition & 0 deletions changelog.d/4428.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move SRV logic into the Agent layer
1 change: 1 addition & 0 deletions changelog.d/4432.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Apply a unique index to the user_ips table, preventing duplicates.
1 change: 1 addition & 0 deletions changelog.d/4433.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian package: symlink to explicit python version
1 change: 1 addition & 0 deletions changelog.d/4435.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix None guard in calling config.server.is_threepid_reserved
2 changes: 1 addition & 1 deletion changelog.d/4437.misc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Add support for persisting event format versions in the database
Add infrastructure to support different event formats
1 change: 1 addition & 0 deletions changelog.d/4444.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Generate the debian config during build
1 change: 1 addition & 0 deletions changelog.d/4445.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a metric for tracking event stream position of the user directory.
1 change: 1 addition & 0 deletions changelog.d/4448.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add infrastructure to support different event formats
1 change: 1 addition & 0 deletions changelog.d/4452.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Don't send IP addresses as SNI
1 change: 1 addition & 0 deletions changelog.d/4458.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify documentation for the `public_baseurl` config param
1 change: 1 addition & 0 deletions changelog.d/4459.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Synapse will now take advantage of native UPSERT functionality in PostgreSQL 9.5+ and SQLite 3.24+.
1 change: 1 addition & 0 deletions changelog.d/4460.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix UnboundLocalError in post_urlencoded_get_json
1 change: 1 addition & 0 deletions changelog.d/4461.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a timeout to filtered room directory queries.
1 change: 1 addition & 0 deletions changelog.d/4464.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Move SRV logic into the Agent layer
49 changes: 46 additions & 3 deletions debian/build_virtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@
set -e

export DH_VIRTUALENV_INSTALL_ROOT=/opt/venvs
SNAKE=/usr/bin/python3

# make sure that the virtualenv links to the specific version of python, by
# dereferencing the python3 symlink.
#
# Otherwise, if somebody tries to install (say) the stretch package on buster,
# they will get a confusing error about "No module named 'synapse'", because
# python won't look in the right directory. At least this way, the error will
# be a *bit* more obvious.
#
SNAKE=`readlink -e /usr/bin/python3`

# try to set the CFLAGS so any compiled C extensions are compiled with the most
# generic as possible x64 instructions, so that compiling it on a new Intel chip
Expand Down Expand Up @@ -36,6 +45,10 @@ dh_virtualenv \
--extra-pip-arg="--compile" \
--extras="all"

PACKAGE_BUILD_DIR="debian/matrix-synapse-py3"
VIRTUALENV_DIR="${PACKAGE_BUILD_DIR}${DH_VIRTUALENV_INSTALL_ROOT}/matrix-synapse"
TARGET_PYTHON="${VIRTUALENV_DIR}/bin/python"

# we copy the tests to a temporary directory so that we can put them on the
# PYTHONPATH without putting the uninstalled synapse on the pythonpath.
tmpdir=`mktemp -d`
Expand All @@ -44,5 +57,35 @@ trap "rm -r $tmpdir" EXIT
cp -r tests "$tmpdir"

PYTHONPATH="$tmpdir" \
debian/matrix-synapse-py3/opt/venvs/matrix-synapse/bin/python \
-B -m twisted.trial --reporter=text -j2 tests
"${TARGET_PYTHON}" -B -m twisted.trial --reporter=text -j2 tests

# build the config file
"${TARGET_PYTHON}" -B "${VIRTUALENV_DIR}/bin/generate_config" \
--config-dir="/etc/matrix-synapse" \
--data-dir="/var/lib/matrix-synapse" |
perl -pe '
# tweak the paths to the tls certs and signing keys
/^tls_.*_path:/ and s/SERVERNAME/homeserver/;
/^signing_key_path:/ and s/SERVERNAME/homeserver/;
# tweak the pid file location
/^pid_file:/ and s#:.*#: "/var/run/matrix-synapse.pid"#;
# tweak the path to the log config
/^log_config:/ and s/SERVERNAME\.log\.config/log.yaml/;
# tweak the path to the media store
/^media_store_path:/ and s#/media_store#/media#;
# remove the server_name setting, which is set in a separate file
/^server_name:/ and $_ = "#\n# This is set in /etc/matrix-synapse/conf.d/server_name.yaml for Debian installations.\n# $_";
# remove the report_stats setting, which is set in a separate file
/^# report_stats:/ and $_ = "";
' > "${PACKAGE_BUILD_DIR}/etc/matrix-synapse/homeserver.yaml"


# add a dependency on the right version of python to substvars.
PYPKG=`basename $SNAKE`
echo "synapse:pydepends=$PYPKG" >> debian/matrix-synapse-py3.substvars
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Depends:
adduser,
debconf,
python3-distutils|libpython3-stdlib (<< 3.6),
python3,
${misc:Depends},
${synapse:pydepends},
# some of our scripts use perl, but none of them are important,
# so we put perl:Depends in Suggests rather than Depends.
Suggests:
Expand Down
Loading

0 comments on commit 62514bb

Please sign in to comment.