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

Commit

Permalink
Merge tag 'v0.34.1rc1' into matrix-org-hotfixes
Browse files Browse the repository at this point in the history
Synapse 0.34.1rc1 (2019-01-08)
==============================

Features
--------

- Special-case a support user for use in verifying behaviour of a given server. The support user does not appear in user directory or monthly active user counts. ([\#4141](#4141), [\#4344](#4344))
- Support for serving .well-known files ([\#4262](#4262))
- Rework SAML2 authentication ([\#4265](#4265), [\#4267](#4267))
- SAML2 authentication: Initialise user display name from SAML2 data ([\#4272](#4272))
- Synapse can now have its conditional/extra dependencies installed by pip. This functionality can be used by using `pip install matrix-synapse[feature]`, where feature is a comma separated list with the possible values `email.enable_notifs`, `matrix-synapse-ldap3`, `postgres`, `resources.consent`, `saml2`, `url_preview`, and `test`. If you want to install all optional dependencies, you can use "all" instead. ([\#4298](#4298), [\#4325](#4325), [\#4327](#4327))
- Add routes for reading account data. ([\#4303](#4303))
- Add opt-in support for v2 rooms ([\#4307](#4307))
- Add a script to generate a clean config file ([\#4315](#4315))
- Return server data in /login response ([\#4319](#4319))

Bugfixes
--------

- Fix contains_url check to be consistent with other instances in code-base and check that value is an instance of string. ([\#3405](#3405))
- Fix CAS login when username is not valid in an MXID ([\#4264](#4264))
- Send CORS headers for /media/config ([\#4279](#4279))
- Add 'sandbox' to CSP for media reprository ([\#4284](#4284))
- Make the new landing page prettier. ([\#4294](#4294))
- Fix deleting E2E room keys when using old SQLite versions. ([\#4295](#4295))
- The metric synapse_admin_mau:current previously did not update when config.mau_stats_only was set to True ([\#4305](#4305))
- Fixed per-room account data filters ([\#4309](#4309))
- Fix indentation in default config ([\#4313](#4313))
- Fix synapse:latest docker upload ([\#4316](#4316))
- Fix test_metric.py compatibility with prometheus_client 0.5. Contributed by Maarten de Vries <[email protected]>. ([\#4317](#4317))
- Avoid packaging _trial_temp directory in -py3 debian packages ([\#4326](#4326))
- Check jinja version for consent resource ([\#4327](#4327))
- fix NPE in /messages by checking if all events were filtered out ([\#4330](#4330))
- Fix `python -m synapse.config` on Python 3. ([\#4356](#4356))

Deprecations and Removals
-------------------------

- Remove the deprecated v1/register API on Python 2. It was never ported to Python 3. ([\#4334](#4334))

Internal Changes
----------------

- Getting URL previews of IP addresses no longer fails on Python 3. ([\#4215](#4215))
- drop undocumented dependency on dateutil ([\#4266](#4266))
- Update the example systemd config to use a virtualenv ([\#4273](#4273))
- Update link to kernel DCO guide ([\#4274](#4274))
- Make isort tox check print diff when it fails ([\#4283](#4283))
- Log room_id in Unknown room errors ([\#4297](#4297))
- Documentation improvements for coturn setup. Contributed by Krithin Sitaram. ([\#4333](#4333))
- Update pull request template to use absolute links ([\#4341](#4341))
- Update README to not lie about required restart when updating TLS certificates ([\#4343](#4343))
- Update debian packaging for compatibility with transitional package ([\#4349](#4349))
- Fix command hint to generate a config file when trying to start without a config file ([\#4353](#4353))
- Add better logging for unexpected errors while sending transactions ([\#4358](#4358))
  • Loading branch information
richvdh committed Jan 8, 2019
2 parents 4c238a9 + 32172f2 commit 1d63046
Show file tree
Hide file tree
Showing 126 changed files with 4,855 additions and 1,507 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
machine: true
steps:
- checkout
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_SHA1} .
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:${CIRCLE_SHA1}-py3 --build-arg PYTHON_VERSION=3.6 .
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest .
- run: docker build -f docker/Dockerfile --label gitsha1=${CIRCLE_SHA1} -t matrixdotorg/synapse:latest-py3 --build-arg PYTHON_VERSION=3.6 .
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
- run: docker push matrixdotorg/synapse:latest
- run: docker push matrixdotorg/synapse:latest-py3
Expand Down
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ source=

[report]
precision = 2
ignore_errors = True
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ demo/etc
tox.ini
.git/*
.tox/*
debian/matrix-synapse/
debian/matrix-synapse-*/
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<!-- Please read CONTRIBUTING.rst before submitting your pull request -->

* [ ] Pull request is based on the develop branch
* [ ] Pull request includes a [changelog file](CONTRIBUTING.rst#changelog)
* [ ] Pull request includes a [sign off](CONTRIBUTING.rst#sign-off)
* [ ] Pull request includes a [changelog file](https:/matrix-org/synapse/blob/master/CONTRIBUTING.rst#changelog)
* [ ] Pull request includes a [sign off](https:/matrix-org/synapse/blob/master/CONTRIBUTING.rst#sign-off)
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ homeserver*.db
homeserver*.log
homeserver*.log.*
homeserver*.pid
homeserver*.yaml
/homeserver*.yaml

*.signing.key
*.tls.crt
*.tls.dh
*.tls.key

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

demo/*/*.db
Expand Down Expand Up @@ -57,3 +59,5 @@ env/

.vscode/
.ropeproject/
*.deb
/debs
5 changes: 4 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@ Pierre Jaury <pierre at jaury.eu>
* Docker packaging

Serban Constantin <serban.constantin at gmail dot com>
* Small bug fix
* Small bug fix

Jason Robinson <jasonr at matrix.org>
* Minor fixes
82 changes: 68 additions & 14 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,84 @@
Synapse 0.34.0rc2 (2018-12-11)
Synapse 0.34.1rc1 (2019-01-08)
==============================

Features
--------

- Add a welcome page for the client API port. Credit to @krombel! ([\#4289](https:/matrix-org/synapse/issues/4289))
- Remove Matrix console from the default distribution ([\#4290](https:/matrix-org/synapse/issues/4290))
- Special-case a support user for use in verifying behaviour of a given server. The support user does not appear in user directory or monthly active user counts. ([\#4141](https:/matrix-org/synapse/issues/4141), [\#4344](https:/matrix-org/synapse/issues/4344))
- Support for serving .well-known files ([\#4262](https:/matrix-org/synapse/issues/4262))
- Rework SAML2 authentication ([\#4265](https:/matrix-org/synapse/issues/4265), [\#4267](https:/matrix-org/synapse/issues/4267))
- SAML2 authentication: Initialise user display name from SAML2 data ([\#4272](https:/matrix-org/synapse/issues/4272))
- Synapse can now have its conditional/extra dependencies installed by pip. This functionality can be used by using `pip install matrix-synapse[feature]`, where feature is a comma separated list with the possible values `email.enable_notifs`, `matrix-synapse-ldap3`, `postgres`, `resources.consent`, `saml2`, `url_preview`, and `test`. If you want to install all optional dependencies, you can use "all" instead. ([\#4298](https:/matrix-org/synapse/issues/4298), [\#4325](https:/matrix-org/synapse/issues/4325), [\#4327](https:/matrix-org/synapse/issues/4327))
- Add routes for reading account data. ([\#4303](https:/matrix-org/synapse/issues/4303))
- Add opt-in support for v2 rooms ([\#4307](https:/matrix-org/synapse/issues/4307))
- Add a script to generate a clean config file ([\#4315](https:/matrix-org/synapse/issues/4315))
- Return server data in /login response ([\#4319](https:/matrix-org/synapse/issues/4319))


Bugfixes
--------

- Fix contains_url check to be consistent with other instances in code-base and check that value is an instance of string. ([\#3405](https:/matrix-org/synapse/issues/3405))
- Fix CAS login when username is not valid in an MXID ([\#4264](https:/matrix-org/synapse/issues/4264))
- Send CORS headers for /media/config ([\#4279](https:/matrix-org/synapse/issues/4279))
- Add 'sandbox' to CSP for media reprository ([\#4284](https:/matrix-org/synapse/issues/4284))
- Make the new landing page prettier. ([\#4294](https:/matrix-org/synapse/issues/4294))
- Fix deleting E2E room keys when using old SQLite versions. ([\#4295](https:/matrix-org/synapse/issues/4295))
- The metric synapse_admin_mau:current previously did not update when config.mau_stats_only was set to True ([\#4305](https:/matrix-org/synapse/issues/4305))
- Fixed per-room account data filters ([\#4309](https:/matrix-org/synapse/issues/4309))
- Fix indentation in default config ([\#4313](https:/matrix-org/synapse/issues/4313))
- Fix synapse:latest docker upload ([\#4316](https:/matrix-org/synapse/issues/4316))
- Fix test_metric.py compatibility with prometheus_client 0.5. Contributed by Maarten de Vries <[email protected]>. ([\#4317](https:/matrix-org/synapse/issues/4317))
- Avoid packaging _trial_temp directory in -py3 debian packages ([\#4326](https:/matrix-org/synapse/issues/4326))
- Check jinja version for consent resource ([\#4327](https:/matrix-org/synapse/issues/4327))
- fix NPE in /messages by checking if all events were filtered out ([\#4330](https:/matrix-org/synapse/issues/4330))
- Fix `python -m synapse.config` on Python 3. ([\#4356](https:/matrix-org/synapse/issues/4356))


Deprecations and Removals
-------------------------

- Remove the deprecated v1/register API on Python 2. It was never ported to Python 3. ([\#4334](https:/matrix-org/synapse/issues/4334))


Internal Changes
----------------

- Disable pager when running git-show in CI ([\#4291](https:/matrix-org/synapse/issues/4291))
- Getting URL previews of IP addresses no longer fails on Python 3. ([\#4215](https:/matrix-org/synapse/issues/4215))
- drop undocumented dependency on dateutil ([\#4266](https:/matrix-org/synapse/issues/4266))
- Update the example systemd config to use a virtualenv ([\#4273](https:/matrix-org/synapse/issues/4273))
- Update link to kernel DCO guide ([\#4274](https:/matrix-org/synapse/issues/4274))
- Make isort tox check print diff when it fails ([\#4283](https:/matrix-org/synapse/issues/4283))
- Log room_id in Unknown room errors ([\#4297](https:/matrix-org/synapse/issues/4297))
- Documentation improvements for coturn setup. Contributed by Krithin Sitaram. ([\#4333](https:/matrix-org/synapse/issues/4333))
- Update pull request template to use absolute links ([\#4341](https:/matrix-org/synapse/issues/4341))
- Update README to not lie about required restart when updating TLS certificates ([\#4343](https:/matrix-org/synapse/issues/4343))
- Update debian packaging for compatibility with transitional package ([\#4349](https:/matrix-org/synapse/issues/4349))
- Fix command hint to generate a config file when trying to start without a config file ([\#4353](https:/matrix-org/synapse/issues/4353))
- Add better logging for unexpected errors while sending transactions ([\#4358](https:/matrix-org/synapse/issues/4358))


Synapse 0.34.0 (2018-12-20)
===========================

Synapse 0.34.0 is the first release to fully support Python 3. Synapse will now
run on Python versions 3.5 or 3.6 (as well as 2.7). Support for Python 3.7
remains experimental.

Synapse 0.34.0rc1 (2018-12-04)
==============================

Synapse 0.34 is the first release to fully support Python 3. We recommend
upgrading to Python 3, but make sure to read the
[upgrade notes](UPGRADE.rst#upgrading-to-v0340) when doing so.
We recommend upgrading to Python 3, but make sure to read the [upgrade
notes](UPGRADE.rst#upgrading-to-v0340) when doing so.

Features
--------

- Add 'sandbox' to CSP for media reprository ([\#4284](https:/matrix-org/synapse/issues/4284))
- Make the new landing page prettier. ([\#4294](https:/matrix-org/synapse/issues/4294))
- Fix deleting E2E room keys when using old SQLite versions. ([\#4295](https:/matrix-org/synapse/issues/4295))
- Add a welcome page for the client API port. Credit to @krombel! ([\#4289](https:/matrix-org/synapse/issues/4289))
- Remove Matrix console from the default distribution ([\#4290](https:/matrix-org/synapse/issues/4290))
- Add option to track MAU stats (but not limit people) ([\#3830](https:/matrix-org/synapse/issues/3830))
- Add an option to enable recording IPs for appservice users ([\#3831](https:/matrix-org/synapse/issues/3831))
- Rename login type m.login.cas to m.login.sso ([\#4220](https:/matrix-org/synapse/issues/4220))
- Rename login type `m.login.cas` to `m.login.sso` ([\#4220](https:/matrix-org/synapse/issues/4220))
- Add an option to disable search for homeservers that may not be interested in it. ([\#4230](https:/matrix-org/synapse/issues/4230))


Expand All @@ -49,15 +101,17 @@ Bugfixes
Internal Changes
----------------

- A coveragerc file, as well as the py36-coverage tox target, have been added. ([\#4180](https:/matrix-org/synapse/issues/4180))
- Debian packages utilising a virtualenv with bundled dependencies can now be built. ([\#4212](https:/matrix-org/synapse/issues/4212))
- Disable pager when running git-show in CI ([\#4291](https:/matrix-org/synapse/issues/4291))
- A coveragerc file has been added. ([\#4180](https:/matrix-org/synapse/issues/4180))
- Add a GitHub pull request template and add multiple issue templates ([\#4182](https:/matrix-org/synapse/issues/4182))
- Update README to reflect the fact that #1491 is fixed ([\#4188](https:/matrix-org/synapse/issues/4188))
- Update README to reflect the fact that [\#1491](https:/matrix-org/synapse/issues/1491) is fixed ([\#4188](https:/matrix-org/synapse/issues/4188))
- Run the AS senders as background processes to fix warnings ([\#4189](https:/matrix-org/synapse/issues/4189))
- Add some diagnostics to the tests to detect logcontext problems ([\#4190](https:/matrix-org/synapse/issues/4190))
- Add missing `jpeg` package prerequisite for OpenBSD in README. ([\#4193](https:/matrix-org/synapse/issues/4193))
- Add a note saying you need to manually reclaim disk space after using the Purge History API ([\#4200](https:/matrix-org/synapse/issues/4200))
- More logcontext checking in unittests ([\#4205](https:/matrix-org/synapse/issues/4205))
- Ignore __pycache__ directories in the database schema folder ([\#4214](https:/matrix-org/synapse/issues/4214))
- Ignore `__pycache__` directories in the database schema folder ([\#4214](https:/matrix-org/synapse/issues/4214))
- Add note to UPGRADE.rst about removing riot.im from list of trusted identity servers ([\#4224](https:/matrix-org/synapse/issues/4224))
- Added automated coverage reporting to CI. ([\#4225](https:/matrix-org/synapse/issues/4225))
- Garbage-collect after each unit test to fix logcontext leaks ([\#4227](https:/matrix-org/synapse/issues/4227))
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Sign off
In order to have a concrete record that your contribution is intentional
and you agree to license it under the same terms as the project's license, we've adopted the
same lightweight approach that the Linux Kernel
(https://www.kernel.org/doc/Documentation/SubmittingPatches), Docker
`submitting patches process <https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin>`_, Docker
(https:/docker/docker/blob/master/CONTRIBUTING.md), and many other
projects use: the DCO (Developer Certificate of Origin:
http://developercertificate.org/). This is a simple declaration that you wrote
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ prune demo/etc
prune docker
prune .circleci
prune .coveragerc
prune debian

exclude jenkins*
recursive-exclude jenkins *.sh
15 changes: 7 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Synapse is the reference Python/Twisted Matrix homeserver implementation.
System requirements:

- POSIX-compliant system (tested on Linux & OS X)
- Python 3.5, 3.6, or 2.7
- Python 3.5, 3.6, 3.7, or 2.7
- At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org

Installing from source
Expand Down Expand Up @@ -148,7 +148,7 @@ To install the Synapse homeserver run::
source ~/synapse/env/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install matrix-synapse
pip install matrix-synapse[all]

This installs Synapse, along with the libraries it uses, into a virtual
environment under ``~/synapse/env``. Feel free to pick a different directory
Expand All @@ -158,7 +158,7 @@ This Synapse installation can then be later upgraded by using pip again with the
update flag::

source ~/synapse/env/bin/activate
pip install -U matrix-synapse
pip install -U matrix-synapse[all]

In case of problems, please see the _`Troubleshooting` section below.

Expand Down Expand Up @@ -725,8 +725,8 @@ caveats, you will need to do the following:
tell other servers how to find you. See `Setting up Federation`_.

When updating the SSL certificate, just update the file pointed to by
``tls_certificate_path``: there is no need to restart synapse. (You may like to
use a symbolic link to help make this process atomic.)
``tls_certificate_path`` and then restart Synapse. (You may like to use a symbolic link
to help make this process atomic.)

The most common mistake when setting up federation is not to tell Synapse about
your SSL certificate. To check it, you can visit
Expand Down Expand Up @@ -826,16 +826,15 @@ to install using pip and a virtualenv::

virtualenv -p python2.7 env
source env/bin/activate
python -m synapse.python_dependencies | xargs pip install
pip install lxml mock
python -m pip install -e .[all]

This will run a process of downloading and installing all the needed
dependencies into a virtual env.

Once this is done, you may wish to run Synapse's unit tests, to
check that everything is installed as it should be::

PYTHONPATH="." trial tests
python -m twisted.trial tests

This should end with a 'PASSED' result::

Expand Down
14 changes: 11 additions & 3 deletions UPGRADE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ returned by the Client-Server API:
Upgrading to v0.34.0
====================

1. This release is the first to fully support Python 3. We recommend switching
to Python 3, as it has been shown to give performance improvements.
1. This release is the first to fully support Python 3. Synapse will now run on
Python versions 3.5, or 3.6 (as well as 2.7). We recommend switching to
Python 3, as it has been shown to give performance improvements.

For users who have installed Synapse into a virtualenv, we recommend doing
this by creating a new virtualenv. For example::
Expand All @@ -68,7 +69,7 @@ Upgrading to v0.34.0
synctl start

Users who have installed from distribution packages should see the relevant
package documentation.
package documentation. See below for notes on Debian packages.

* When upgrading to Python 3, you **must** make sure that your log files are
configured as UTF-8, by adding ``encoding: utf8`` to the
Expand Down Expand Up @@ -107,6 +108,13 @@ Upgrading to v0.34.0

There is no need to revert this change if downgrading to Python 2.

We are also making available Debian packages which will run Synapse on
Python 3. You can switch to these packages with ``apt-get install
matrix-synapse-py3``, however, please read `debian/NEWS
<https:/matrix-org/synapse/blob/release-v0.34.0/debian/NEWS>`_
before doing so. The existing ``matrix-synapse`` packages will continue to
use Python 2 for the time being.

2. This release removes the ``riot.im`` from the default list of trusted
identity servers.

Expand Down
1 change: 0 additions & 1 deletion changelog.d/4294.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/4295.bugfix

This file was deleted.

2 changes: 1 addition & 1 deletion contrib/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:my.matrix.Host
- traefik.port=8448
- traefik.port=8008

db:
image: docker.io/postgres:10-alpine
Expand Down
31 changes: 31 additions & 0 deletions contrib/systemd/matrix-synapse.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Example systemd configuration file for synapse. Copy into
# /etc/systemd/system/, update the paths if necessary, then:
#
# systemctl enable matrix-synapse
# systemctl start matrix-synapse
#
# This assumes that Synapse has been installed in a virtualenv in
# /opt/synapse/env.
#
# **NOTE:** This is an example service file that may change in the future. If you
# wish to use this please copy rather than symlink it.

[Unit]
Description=Synapse Matrix homeserver

[Service]
Type=simple
Restart=on-abort

User=synapse
Group=nogroup

WorkingDirectory=/opt/synapse
ExecStart=/opt/synapse/env/bin/python -m synapse.app.homeserver --config-path=/opt/synapse/homeserver.yaml

# adjust the cache factor if necessary
# Environment=SYNAPSE_CACHE_FACTOR=2.0

[Install]
WantedBy=multi-user.target

22 changes: 0 additions & 22 deletions contrib/systemd/synapse.service

This file was deleted.

7 changes: 7 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/matrix-synapse-py3.*.debhelper
/matrix-synapse-py3.debhelper.log
/matrix-synapse-py3.substvars
/matrix-synapse-*/
/files
/debhelper-build-stamp
/.debhelper
Loading

0 comments on commit 1d63046

Please sign in to comment.