diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2024-01-16 16:11:23 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2024-01-16 16:11:23 +0000 |
commit | 2927008e48ecb6ea5d24e622d7b2fffe94c45c44 (patch) | |
tree | 2bb081f43a6105f926cb99c10a6ce1674d08f9cb /contrib | |
parent | Revert changes to README (diff) | |
parent | Fix text and add second link (diff) | |
download | synapse-2927008e48ecb6ea5d24e622d7b2fffe94c45c44.tar.xz |
Merge branch 'release-v1.99'
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/cmdclient/console.py | 26 | ||||
-rw-r--r-- | contrib/cmdclient/http.py | 26 | ||||
-rw-r--r-- | contrib/docker/docker-compose.yml | 6 | ||||
-rw-r--r-- | contrib/docker_compose_workers/README.md | 4 | ||||
-rw-r--r-- | contrib/grafana/README.md | 2 | ||||
-rw-r--r-- | contrib/grafana/synapse.json | 4 | ||||
-rw-r--r-- | contrib/graph/graph.py | 26 | ||||
-rw-r--r-- | contrib/graph/graph2.py | 26 | ||||
-rw-r--r-- | contrib/graph/graph3.py | 26 | ||||
-rw-r--r-- | contrib/lnav/README.md | 10 | ||||
-rw-r--r-- | contrib/prometheus/README.md | 2 | ||||
-rw-r--r-- | contrib/purge_api/README.md | 6 | ||||
-rw-r--r-- | contrib/purge_api/purge_history.sh | 14 | ||||
-rw-r--r-- | contrib/systemd-with-workers/README.md | 2 | ||||
-rw-r--r-- | contrib/systemd/README.md | 10 | ||||
-rw-r--r-- | contrib/workers-bash-scripts/create-multiple-stream-writers.md | 14 |
16 files changed, 117 insertions, 87 deletions
diff --git a/contrib/cmdclient/console.py b/contrib/cmdclient/console.py index 710fe25699..a0c89a7de4 100755 --- a/contrib/cmdclient/console.py +++ b/contrib/cmdclient/console.py @@ -1,18 +1,24 @@ #!/usr/bin/env python -# Copyright 2014-2016 OpenMarket Ltd # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# This file is licensed under the Affero General Public License (AGPL) version 3. +# +# Copyright (C) 2023 New Vector, Ltd +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# See the GNU Affero General Public License for more details: +# <https://www.gnu.org/licenses/agpl-3.0.html>. +# +# Originally licensed under the Apache License, Version 2.0: +# <http://www.apache.org/licenses/LICENSE-2.0>. +# +# [This file includes modifications made by New Vector Limited] # -# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. """ Starts a synapse client console. """ import argparse diff --git a/contrib/cmdclient/http.py b/contrib/cmdclient/http.py index 508de5dcbd..d46b540181 100644 --- a/contrib/cmdclient/http.py +++ b/contrib/cmdclient/http.py @@ -1,16 +1,22 @@ -# Copyright 2014-2016 OpenMarket Ltd # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# This file is licensed under the Affero General Public License (AGPL) version 3. +# +# Copyright (C) 2023 New Vector, Ltd +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# See the GNU Affero General Public License for more details: +# <https://www.gnu.org/licenses/agpl-3.0.html>. +# +# Originally licensed under the Apache License, Version 2.0: +# <http://www.apache.org/licenses/LICENSE-2.0>. +# +# [This file includes modifications made by New Vector Limited] # -# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. import json import urllib diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml index 5ac41139e3..36d5fd5309 100644 --- a/contrib/docker/docker-compose.yml +++ b/contrib/docker/docker-compose.yml @@ -7,8 +7,8 @@ services: synapse: build: - context: ../.. - dockerfile: docker/Dockerfile + context: ../.. + dockerfile: docker/Dockerfile image: docker.io/matrixdotorg/synapse:latest # Since synapse does not retry to connect to the database, restart upon # failure @@ -57,7 +57,7 @@ services: - POSTGRES_USER=synapse - POSTGRES_PASSWORD=changeme # ensure the database gets created correctly - # https://matrix-org.github.io/synapse/latest/postgres.html#set-up-database + # https://element-hq.github.io/synapse/latest/postgres.html#set-up-database - POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C volumes: # You may store the database tables in a local folder.. diff --git a/contrib/docker_compose_workers/README.md b/contrib/docker_compose_workers/README.md index ebb225fba6..81518f6ba1 100644 --- a/contrib/docker_compose_workers/README.md +++ b/contrib/docker_compose_workers/README.md @@ -69,7 +69,7 @@ redis: host: redis port: 6379 # dbid: <redis_logical_db_id> - # password: <secret_password> + # password: <secret_password> # use_tls: True # certificate_file: <path_to_certificate> # private_key_file: <path_to_private_key> @@ -113,4 +113,4 @@ federation_sender_instances: ## Other Worker types -Using the concepts shown here it is possible to create other worker types in Docker Compose. See the [Workers](https://matrix-org.github.io/synapse/latest/workers.html#available-worker-applications) documentation for a list of available workers. +Using the concepts shown here it is possible to create other worker types in Docker Compose. See the [Workers](https://element-hq.github.io/synapse/latest/workers.html#available-worker-applications) documentation for a list of available workers. diff --git a/contrib/grafana/README.md b/contrib/grafana/README.md index 0d4e1b59b2..0bbd57439e 100644 --- a/contrib/grafana/README.md +++ b/contrib/grafana/README.md @@ -1,6 +1,6 @@ # Using the Synapse Grafana dashboard 0. Set up Prometheus and Grafana. Out of scope for this readme. Useful documentation about using Grafana with Prometheus: http://docs.grafana.org/features/datasources/prometheus/ -1. Have your Prometheus scrape your Synapse. https://matrix-org.github.io/synapse/latest/metrics-howto.html +1. Have your Prometheus scrape your Synapse. https://element-hq.github.io/synapse/latest/metrics-howto.html 2. Import dashboard into Grafana. Download `synapse.json`. Import it to Grafana and select the correct Prometheus datasource. http://docs.grafana.org/reference/export_import/ 3. Set up required recording rules. [contrib/prometheus](../prometheus) diff --git a/contrib/grafana/synapse.json b/contrib/grafana/synapse.json index 188597c8dd..30d6d87500 100644 --- a/contrib/grafana/synapse.json +++ b/contrib/grafana/synapse.json @@ -4253,7 +4253,7 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "Triangular growth may indicate a problem with federation sending from the remote host --- but it may also be the case that everyone is asleep and no messages are being sent.\n\nSee https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#federation_metrics_domains", + "description": "Triangular growth may indicate a problem with federation sending from the remote host --- but it may also be the case that everyone is asleep and no messages are being sent.\n\nSee https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#federation_metrics_domains", "fieldConfig": { "defaults": { "color": { @@ -4375,7 +4375,7 @@ "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "Triangular growth may indicate a problem with federation senders on the monitored instance---but it may also be the case that everyone is asleep and no messages are being sent.\n\nSee https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#federation_metrics_domains", + "description": "Triangular growth may indicate a problem with federation senders on the monitored instance---but it may also be the case that everyone is asleep and no messages are being sent.\n\nSee https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#federation_metrics_domains", "fieldConfig": { "defaults": { "color": { diff --git a/contrib/graph/graph.py b/contrib/graph/graph.py index 3c4f47dbd2..a9d39386fd 100644 --- a/contrib/graph/graph.py +++ b/contrib/graph/graph.py @@ -1,16 +1,22 @@ -# Copyright 2014-2016 OpenMarket Ltd # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# This file is licensed under the Affero General Public License (AGPL) version 3. +# +# Copyright (C) 2023 New Vector, Ltd +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# See the GNU Affero General Public License for more details: +# <https://www.gnu.org/licenses/agpl-3.0.html>. +# +# Originally licensed under the Apache License, Version 2.0: +# <http://www.apache.org/licenses/LICENSE-2.0>. +# +# [This file includes modifications made by New Vector Limited] # -# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. import argparse import cgi diff --git a/contrib/graph/graph2.py b/contrib/graph/graph2.py index b46094ce0a..4008622c9a 100644 --- a/contrib/graph/graph2.py +++ b/contrib/graph/graph2.py @@ -1,16 +1,22 @@ -# Copyright 2014-2016 OpenMarket Ltd # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# This file is licensed under the Affero General Public License (AGPL) version 3. +# +# Copyright (C) 2023 New Vector, Ltd +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# See the GNU Affero General Public License for more details: +# <https://www.gnu.org/licenses/agpl-3.0.html>. +# +# Originally licensed under the Apache License, Version 2.0: +# <http://www.apache.org/licenses/LICENSE-2.0>. +# +# [This file includes modifications made by New Vector Limited] # -# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. import argparse diff --git a/contrib/graph/graph3.py b/contrib/graph/graph3.py index a28a1594c7..d59890dce0 100644 --- a/contrib/graph/graph3.py +++ b/contrib/graph/graph3.py @@ -1,16 +1,22 @@ -# Copyright 2016 OpenMarket Ltd # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# This file is licensed under the Affero General Public License (AGPL) version 3. +# +# Copyright (C) 2023 New Vector, Ltd +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# See the GNU Affero General Public License for more details: +# <https://www.gnu.org/licenses/agpl-3.0.html>. +# +# Originally licensed under the Apache License, Version 2.0: +# <http://www.apache.org/licenses/LICENSE-2.0>. +# +# [This file includes modifications made by New Vector Limited] # -# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. import argparse import datetime diff --git a/contrib/lnav/README.md b/contrib/lnav/README.md index 5230a191d2..2624b0ddf5 100644 --- a/contrib/lnav/README.md +++ b/contrib/lnav/README.md @@ -1,6 +1,6 @@ # `lnav` config for Synapse logs -[lnav](https://lnav.org/) is a log-viewing tool. It is particularly useful when +[lnav](https://lnav.org/) is a log-viewing tool. It is particularly useful when you need to interleave multiple log files, or for exploring a large log file with regex filters. The downside is that it is not as ubiquitous as tools like `less`, `grep`, etc. @@ -9,7 +9,7 @@ This directory contains an `lnav` [log format definition]( https://docs.lnav.org/en/v0.10.1/formats.html#defining-a-new-format ) for Synapse logs as emitted by Synapse with the default [logging configuration]( - https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#log_config + https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#log_config ). It supports lnav 0.10.1 because that's what's packaged by my distribution. This should allow lnav: @@ -36,12 +36,12 @@ Within lnav itself: - `?` for help within lnav itself. - `q` to quit. -- `/` to search a-la `less` and `vim`, then `n` and `N` to continue searching +- `/` to search a-la `less` and `vim`, then `n` and `N` to continue searching down and up. - Use `o` and `O` to skip through logs based on the request ID (`POST-1234`, or else the value of the [`request_id_header`]( - https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html?highlight=request_id_header#listeners - ) header). This may get confused if the same request ID is repeated among + https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html?highlight=request_id_header#listeners + ) header). This may get confused if the same request ID is repeated among multiple files or process restarts. - ??? - Profit diff --git a/contrib/prometheus/README.md b/contrib/prometheus/README.md index 4dbf648df8..dc1927f2ab 100644 --- a/contrib/prometheus/README.md +++ b/contrib/prometheus/README.md @@ -34,7 +34,7 @@ Add a new job to the main prometheus.yml file: ``` An example of a Prometheus configuration with workers can be found in -[metrics-howto.md](https://matrix-org.github.io/synapse/latest/metrics-howto.html). +[metrics-howto.md](https://element-hq.github.io/synapse/latest/metrics-howto.html). To use `synapse.rules` add diff --git a/contrib/purge_api/README.md b/contrib/purge_api/README.md index 2f2e5c58cd..5c5b1bcb53 100644 --- a/contrib/purge_api/README.md +++ b/contrib/purge_api/README.md @@ -4,8 +4,8 @@ Purge history API examples # `purge_history.sh` A bash file, that uses the -[purge history API](https://matrix-org.github.io/synapse/latest/admin_api/purge_history_api.html) -to purge all messages in a list of rooms up to a certain event. You can select a +[purge history API](https://element-hq.github.io/synapse/latest/admin_api/purge_history_api.html) +to purge all messages in a list of rooms up to a certain event. You can select a timeframe or a number of messages that you want to keep in the room. Just configure the variables DOMAIN, ADMIN, ROOMS_ARRAY and TIME at the top of @@ -14,5 +14,5 @@ the script. # `purge_remote_media.sh` A bash file, that uses the -[purge history API](https://matrix-org.github.io/synapse/latest/admin_api/purge_history_api.html) +[purge history API](https://element-hq.github.io/synapse/latest/admin_api/purge_history_api.html) to purge all old cached remote media. diff --git a/contrib/purge_api/purge_history.sh b/contrib/purge_api/purge_history.sh index de58dcdbb7..9092f2e670 100644 --- a/contrib/purge_api/purge_history.sh +++ b/contrib/purge_api/purge_history.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash # this script will use the api: -# https://matrix-org.github.io/synapse/latest/admin_api/purge_history_api.html -# +# https://element-hq.github.io/synapse/latest/admin_api/purge_history_api.html +# # It will purge all messages in a list of rooms up to a cetrain event ################################################################################################### @@ -77,9 +77,9 @@ TOKEN=$(sql "SELECT token FROM access_tokens WHERE user_id='$ADMIN' ORDER BY id AUTH="Authorization: Bearer $TOKEN" ################################################################################################### -# check, if your TOKEN works. For example this works: +# check, if your TOKEN works. For example this works: ################################################################################################### -# $ curl --header "$AUTH" "$API_URL/rooms/$ROOM/state/m.room.power_levels" +# $ curl --header "$AUTH" "$API_URL/rooms/$ROOM/state/m.room.power_levels" ################################################################################################### # finally start pruning the room: @@ -117,13 +117,13 @@ for ROOM in "${ROOMS_ARRAY[@]}"; do sleep $SLEEP STATUS=$(curl --header "$AUTH" -s GET "$API_URL/admin/purge_history_status/$PURGE_ID" |grep status|cut -d'"' -f4) : "$ROOM --> Status: $STATUS" - [[ "$STATUS" == "active" ]] || break + [[ "$STATUS" == "active" ]] || break SLEEP=$((SLEEP + 1)) - done + done fi set +x sleep 1 - fi + fi done diff --git a/contrib/systemd-with-workers/README.md b/contrib/systemd-with-workers/README.md index 9b19b042e9..717a8f5db6 100644 --- a/contrib/systemd-with-workers/README.md +++ b/contrib/systemd-with-workers/README.md @@ -1,3 +1,3 @@ The documentation for using systemd to manage synapse workers is now part of the main synapse distribution. See -[docs/systemd-with-workers](https://matrix-org.github.io/synapse/latest/systemd-with-workers/index.html). +[docs/systemd-with-workers](https://element-hq.github.io/synapse/latest/systemd-with-workers/index.html). diff --git a/contrib/systemd/README.md b/contrib/systemd/README.md index 2844cbc8e0..d12d8ec37b 100644 --- a/contrib/systemd/README.md +++ b/contrib/systemd/README.md @@ -1,13 +1,13 @@ # Setup Synapse with Systemd -This is a setup for managing synapse with a user contributed systemd unit -file. It provides a `matrix-synapse` systemd unit file that should be tailored -to accommodate your installation in accordance with the installation +This is a setup for managing synapse with a user contributed systemd unit +file. It provides a `matrix-synapse` systemd unit file that should be tailored +to accommodate your installation in accordance with the installation instructions provided in -[installation instructions](https://matrix-org.github.io/synapse/latest/setup/installation.html). +[installation instructions](https://element-hq.github.io/synapse/latest/setup/installation.html). ## Setup 1. Under the service section, ensure the `User` variable matches which user -you installed synapse under and wish to run it as. +you installed synapse under and wish to run it as. 2. Under the service section, ensure the `WorkingDirectory` variable matches where you have installed synapse. 3. Under the service section, ensure the `ExecStart` variable matches the diff --git a/contrib/workers-bash-scripts/create-multiple-stream-writers.md b/contrib/workers-bash-scripts/create-multiple-stream-writers.md index efa5dea305..2004e03dbd 100644 --- a/contrib/workers-bash-scripts/create-multiple-stream-writers.md +++ b/contrib/workers-bash-scripts/create-multiple-stream-writers.md @@ -1,6 +1,6 @@ # Creating multiple stream writers with a bash script -This script creates multiple [stream writer](https://github.com/matrix-org/synapse/blob/develop/docs/workers.md#stream-writers) workers. +This script creates multiple [stream writer](https://github.com/element-hq/synapse/blob/develop/docs/workers.md#stream-writers) workers. Stream writers require both replication and HTTP listeners. @@ -8,7 +8,7 @@ It also prints out the example lines for Synapse main configuration file. Remember to route necessary endpoints directly to a worker associated with it. -If you run the script as-is, it will create workers with the replication listener starting from port 8034 and another, regular http listener starting from 8044. If you don't need all of the stream writers listed in the script, just remove them from the ```STREAM_WRITERS``` array. +If you run the script as-is, it will create workers with the replication listener starting from port 8034 and another, regular http listener starting from 8044. If you don't need all of the stream writers listed in the script, just remove them from the ```STREAM_WRITERS``` array. Hint: Note that `worker_pid_file` is required if `worker_daemonize` is `true`. Uncomment and/or modify the line if needed. @@ -71,7 +71,7 @@ cat << EXAMPLECONFIG # Don't forget to configure your reverse proxy and # necessary endpoints to their respective worker. -# See https://github.com/matrix-org/synapse/blob/develop/docs/workers.md +# See https://github.com/element-hq/synapse/blob/develop/docs/workers.md # for more information. # Remember: Under NO circumstances should the replication @@ -102,7 +102,7 @@ You should receive an output similar to the following: # Don't forget to configure your reverse proxy and # necessary endpoints to their respective worker. -# See https://github.com/matrix-org/synapse/blob/develop/docs/workers.md +# See https://github.com/element-hq/synapse/blob/develop/docs/workers.md # for more information # Remember: Under NO circumstances should the replication @@ -138,14 +138,14 @@ Simply copy-and-paste the output to an appropriate place in your Synapse main co ## Write directly to Synapse configuration file -You could also write the output directly to homeserver main configuration file. **This, however, is not recommended** as even a small typo (such as replacing >> with >) can erase the entire ```homeserver.yaml```. +You could also write the output directly to homeserver main configuration file. **This, however, is not recommended** as even a small typo (such as replacing >> with >) can erase the entire ```homeserver.yaml```. If you do this, back up your original configuration file first: ```console # Back up homeserver.yaml first -cp /etc/matrix-synapse/homeserver.yaml /etc/matrix-synapse/homeserver.yaml.bak +cp /etc/matrix-synapse/homeserver.yaml /etc/matrix-synapse/homeserver.yaml.bak # Create workers and write output to your homeserver.yaml -./create_stream_writers.sh >> /etc/matrix-synapse/homeserver.yaml +./create_stream_writers.sh >> /etc/matrix-synapse/homeserver.yaml ``` |