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

Commit e8a7a85

Browse files
committed
Merge branch 'release-v1.13.0' of github.com:matrix-org/synapse into dinsic-release-v1.14.x
* 'release-v1.13.0' of github.com:matrix-org/synapse: (257 commits) Update changelog based on feedback. Move warnings in the changelog and re-iterate changes to branches. 1.13.0 update dh-virtualenv (#7526) 1.13.0rc3 Hash passwords earlier in the registration process (#7523) 1.13.0rc2 1.13.0rc2 Stop `get_joined_users` corruption from custom statuses (#7376) Do not validate that the client dict is stable during UI Auth. (#7483) Fix new flake8 errors (#7489) Don't UPGRADE database rows RST indenting Put rollback instructions in upgrade notes Fix changelog typo Oh yeah, RST Absolute URL it is then Fix upgrade notes link Provide summary of upgrade issues in changelog. Fix ) Move next version notes from changelog to upgrade notes ...
2 parents 0aa9449 + 45c8b1c commit e8a7a85

File tree

255 files changed

+11988
-5119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+11988
-5119
lines changed

.buildkite/worker-blacklist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ Message history can be paginated
55

66
Can re-join room if re-invited
77

8-
/upgrade creates a new room
9-
108
The only membership state included in an initial sync is for all the senders in the timeline
119

1210
Local device key changes get to remote servers

CHANGES.md

Lines changed: 213 additions & 8 deletions
Large diffs are not rendered by default.

INSTALL.md

Lines changed: 44 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
- [Installing Synapse](#installing-synapse)
33
- [Installing from source](#installing-from-source)
44
- [Platform-Specific Instructions](#platform-specific-instructions)
5-
- [Troubleshooting Installation](#troubleshooting-installation)
65
- [Prebuilt packages](#prebuilt-packages)
76
- [Setting up Synapse](#setting-up-synapse)
87
- [TLS certificates](#tls-certificates)
98
- [Email](#email)
109
- [Registering a user](#registering-a-user)
1110
- [Setting up a TURN server](#setting-up-a-turn-server)
1211
- [URL previews](#url-previews)
12+
- [Troubleshooting Installation](#troubleshooting-installation)
1313

1414
# Choosing your server name
1515

@@ -36,7 +36,7 @@ that your email address is probably `user@example.com` rather than
3636
System requirements:
3737

3838
- POSIX-compliant system (tested on Linux & OS X)
39-
- Python 3.5, 3.6, 3.7 or 3.8.
39+
- Python 3.5.2 or later, up to Python 3.8.
4040
- At least 1GB of free RAM if you want to join large public rooms like #matrix:matrix.org
4141

4242
Synapse is written in Python but some of the libraries it uses are written in
@@ -70,7 +70,7 @@ pip install -U matrix-synapse
7070
```
7171

7272
Before you can start Synapse, you will need to generate a configuration
73-
file. To do this, run (in your virtualenv, as before)::
73+
file. To do this, run (in your virtualenv, as before):
7474

7575
```
7676
cd ~/synapse
@@ -84,22 +84,24 @@ python -m synapse.app.homeserver \
8484
... substituting an appropriate value for `--server-name`.
8585

8686
This command will generate you a config file that you can then customise, but it will
87-
also generate a set of keys for you. These keys will allow your Home Server to
88-
identify itself to other Home Servers, so don't lose or delete them. It would be
87+
also generate a set of keys for you. These keys will allow your homeserver to
88+
identify itself to other homeserver, so don't lose or delete them. It would be
8989
wise to back them up somewhere safe. (If, for whatever reason, you do need to
90-
change your Home Server's keys, you may find that other Home Servers have the
90+
change your homeserver's keys, you may find that other homeserver have the
9191
old key cached. If you update the signing key, you should change the name of the
9292
key in the `<server name>.signing.key` file (the second word) to something
9393
different. See the
9494
[spec](https://matrix.org/docs/spec/server_server/latest.html#retrieving-server-keys)
95-
for more information on key management.)
95+
for more information on key management).
9696

9797
To actually run your new homeserver, pick a working directory for Synapse to
98-
run (e.g. `~/synapse`), and::
98+
run (e.g. `~/synapse`), and:
9999

100-
cd ~/synapse
101-
source env/bin/activate
102-
synctl start
100+
```
101+
cd ~/synapse
102+
source env/bin/activate
103+
synctl start
104+
```
103105

104106
### Platform-Specific Instructions
105107

@@ -110,7 +112,7 @@ Installing prerequisites on Ubuntu or Debian:
110112
```
111113
sudo apt-get install build-essential python3-dev libffi-dev \
112114
python3-pip python3-setuptools sqlite3 \
113-
libssl-dev python3-virtualenv libjpeg-dev libxslt1-dev
115+
libssl-dev virtualenv libjpeg-dev libxslt1-dev
114116
```
115117

116118
#### ArchLinux
@@ -188,15 +190,15 @@ doas pkg_add python libffi py-pip py-setuptools sqlite3 py-virtualenv \
188190
There is currently no port for OpenBSD. Additionally, OpenBSD's security
189191
settings require a slightly more difficult installation process.
190192

191-
XXX: I suspect this is out of date.
193+
(XXX: I suspect this is out of date)
192194

193195
1. Create a new directory in `/usr/local` called `_synapse`. Also, create a
194196
new user called `_synapse` and set that directory as the new user's home.
195197
This is required because, by default, OpenBSD only allows binaries which need
196198
write and execute permissions on the same memory space to be run from
197199
`/usr/local`.
198200
2. `su` to the new `_synapse` user and change to their home directory.
199-
3. Create a new virtualenv: `virtualenv -p python2.7 ~/.synapse`
201+
3. Create a new virtualenv: `virtualenv -p python3 ~/.synapse`
200202
4. Source the virtualenv configuration located at
201203
`/usr/local/_synapse/.synapse/bin/activate`. This is done in `ksh` by
202204
using the `.` command, rather than `bash`'s `source`.
@@ -217,45 +219,6 @@ be found at https://docs.microsoft.com/en-us/windows/wsl/install-win10 for
217219
Windows 10 and https://docs.microsoft.com/en-us/windows/wsl/install-on-server
218220
for Windows Server.
219221

220-
### Troubleshooting Installation
221-
222-
XXX a bunch of this is no longer relevant.
223-
224-
Synapse requires pip 8 or later, so if your OS provides too old a version you
225-
may need to manually upgrade it::
226-
227-
sudo pip install --upgrade pip
228-
229-
Installing may fail with `Could not find any downloads that satisfy the requirement pymacaroons-pynacl (from matrix-synapse==0.12.0)`.
230-
You can fix this by manually upgrading pip and virtualenv::
231-
232-
sudo pip install --upgrade virtualenv
233-
234-
You can next rerun `virtualenv -p python3 synapse` to update the virtual env.
235-
236-
Installing may fail during installing virtualenv with `InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.`
237-
You can fix this by manually installing ndg-httpsclient::
238-
239-
pip install --upgrade ndg-httpsclient
240-
241-
Installing may fail with `mock requires setuptools>=17.1. Aborting installation`.
242-
You can fix this by upgrading setuptools::
243-
244-
pip install --upgrade setuptools
245-
246-
If pip crashes mid-installation for reason (e.g. lost terminal), pip may
247-
refuse to run until you remove the temporary installation directory it
248-
created. To reset the installation::
249-
250-
rm -rf /tmp/pip_install_matrix
251-
252-
pip seems to leak *lots* of memory during installation. For instance, a Linux
253-
host with 512MB of RAM may run out of memory whilst installing Twisted. If this
254-
happens, you will have to individually install the dependencies which are
255-
failing, e.g.::
256-
257-
pip install twisted
258-
259222
## Prebuilt packages
260223

261224
As an alternative to installing from source, prebuilt packages are available
@@ -314,7 +277,7 @@ For `buster` and `sid`, Synapse is available in the Debian repositories and
314277
it should be possible to install it with simply:
315278

316279
```
317-
sudo apt install matrix-synapse
280+
sudo apt install matrix-synapse
318281
```
319282

320283
There is also a version of `matrix-synapse` in `stretch-backports`. Please see
@@ -375,15 +338,17 @@ sudo pip install py-bcrypt
375338

376339
Synapse can be found in the void repositories as 'synapse':
377340

378-
xbps-install -Su
379-
xbps-install -S synapse
341+
```
342+
xbps-install -Su
343+
xbps-install -S synapse
344+
```
380345

381346
### FreeBSD
382347

383348
Synapse can be installed via FreeBSD Ports or Packages contributed by Brendan Molloy from:
384349

385350
- Ports: `cd /usr/ports/net-im/py-matrix-synapse && make install clean`
386-
- Packages: `pkg install py27-matrix-synapse`
351+
- Packages: `pkg install py37-matrix-synapse`
387352

388353

389354
### NixOS
@@ -420,22 +385,23 @@ so, you will need to edit `homeserver.yaml`, as follows:
420385
resources:
421386
- names: [client, federation]
422387
```
388+
423389
* You will also need to uncomment the `tls_certificate_path` and
424390
`tls_private_key_path` lines under the `TLS` section. You can either
425391
point these settings at an existing certificate and key, or you can
426392
enable Synapse's built-in ACME (Let's Encrypt) support. Instructions
427393
for having Synapse automatically provision and renew federation
428394
certificates through ACME can be found at [ACME.md](docs/ACME.md).
429395
Note that, as pointed out in that document, this feature will not
430-
work with installs set up after November 2019.
431-
396+
work with installs set up after November 2019.
397+
432398
If you are using your own certificate, be sure to use a `.pem` file that
433399
includes the full certificate chain including any intermediate certificates
434400
(for instance, if using certbot, use `fullchain.pem` as your certificate, not
435401
`cert.pem`).
436402

437403
For a more detailed guide to configuring your server for federation, see
438-
[federate.md](docs/federate.md)
404+
[federate.md](docs/federate.md).
439405

440406

441407
## Email
@@ -482,7 +448,7 @@ on your server even if `enable_registration` is `false`.
482448
## Setting up a TURN server
483449

484450
For reliable VoIP calls to be routed via this homeserver, you MUST configure
485-
a TURN server. See [docs/turn-howto.md](docs/turn-howto.md) for details.
451+
a TURN server. See [docs/turn-howto.md](docs/turn-howto.md) for details.
486452

487453
## URL previews
488454

@@ -491,10 +457,24 @@ turn it on you must enable the `url_preview_enabled: True` config parameter
491457
and explicitly specify the IP ranges that Synapse is not allowed to spider for
492458
previewing in the `url_preview_ip_range_blacklist` configuration parameter.
493459
This is critical from a security perspective to stop arbitrary Matrix users
494-
spidering 'internal' URLs on your network. At the very least we recommend that
460+
spidering 'internal' URLs on your network. At the very least we recommend that
495461
your loopback and RFC1918 IP addresses are blacklisted.
496462

497-
This also requires the optional lxml and netaddr python dependencies to be
498-
installed. This in turn requires the libxml2 library to be available - on
463+
This also requires the optional `lxml` and `netaddr` python dependencies to be
464+
installed. This in turn requires the `libxml2` library to be available - on
499465
Debian/Ubuntu this means `apt-get install libxml2-dev`, or equivalent for
500466
your OS.
467+
468+
# Troubleshooting Installation
469+
470+
`pip` seems to leak *lots* of memory during installation. For instance, a Linux
471+
host with 512MB of RAM may run out of memory whilst installing Twisted. If this
472+
happens, you will have to individually install the dependencies which are
473+
failing, e.g.:
474+
475+
```
476+
pip install twisted
477+
```
478+
479+
If you have any other problems, feel free to ask in
480+
[#synapse:matrix.org](https://matrix.to/#/#synapse:matrix.org).

MANIFEST.in

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,25 @@ recursive-include synapse/static *.gif
3131
recursive-include synapse/static *.html
3232
recursive-include synapse/static *.js
3333

34-
exclude Dockerfile
34+
exclude .codecov.yml
35+
exclude .coveragerc
3536
exclude .dockerignore
36-
exclude test_postgresql.sh
3737
exclude .editorconfig
38+
exclude Dockerfile
39+
exclude mypy.ini
3840
exclude sytest-blacklist
41+
exclude test_postgresql.sh
3942

4043
include pyproject.toml
4144
recursive-include changelog.d *
4245

4346
prune .buildkite
4447
prune .circleci
45-
prune .codecov.yml
46-
prune .coveragerc
4748
prune .github
49+
prune contrib
4850
prune debian
4951
prune demo/etc
5052
prune docker
51-
prune mypy.ini
5253
prune snap
5354
prune stubs
5455

0 commit comments

Comments
 (0)