Compare commits
9 Commits
develop
...
bwindels/r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5e1de677d | ||
|
|
a776ccd8f5 | ||
|
|
48957d2c8c | ||
|
|
bd37c4a444 | ||
|
|
77f1de141d | ||
|
|
81b56f8078 | ||
|
|
d4c389f0e4 | ||
|
|
4311f861a3 | ||
|
|
ceec6ce5f4 |
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -xeu
|
|
||||||
|
|
||||||
# On 32-bit Linux platforms, we need libatomic1 to use rustup
|
|
||||||
if command -v yum &> /dev/null; then
|
|
||||||
yum install -y libatomic
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install a Rust toolchain
|
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y --profile minimal
|
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
{{- /*gotype: github.com/haveyoudebuggedit/gotestfmt/parser.Package*/ -}}
|
|
||||||
{{- /*
|
|
||||||
This template contains the format for an individual package. GitHub actions does not currently support nested groups so
|
|
||||||
we are creating a stylized header for each package.
|
|
||||||
|
|
||||||
This template is based on https://github.com/haveyoudebuggedit/gotestfmt/blob/f179b0e462a9dcf7101515d87eec4e4d7e58b92a/.gotestfmt/github/package.gotpl
|
|
||||||
which is under the Unlicense licence.
|
|
||||||
*/ -}}
|
|
||||||
{{- $settings := .Settings -}}
|
|
||||||
{{- if and (or (not $settings.HideSuccessfulPackages) (ne .Result "PASS")) (or (not $settings.HideEmptyPackages) (ne .Result "SKIP") (ne (len .TestCases) 0)) -}}
|
|
||||||
{{- if eq .Result "PASS" -}}
|
|
||||||
{{ "\033" }}[0;32m
|
|
||||||
{{- else if eq .Result "SKIP" -}}
|
|
||||||
{{ "\033" }}[0;33m
|
|
||||||
{{- else -}}
|
|
||||||
{{ "\033" }}[0;31m
|
|
||||||
{{- end -}}
|
|
||||||
📦 {{ .Name }}{{- "\033" }}[0m
|
|
||||||
{{- with .Coverage -}}
|
|
||||||
{{- "\033" -}}[0;37m ({{ . }}% coverage){{- "\033" -}}[0m
|
|
||||||
{{- end -}}
|
|
||||||
{{- "\n" -}}
|
|
||||||
{{- with .Reason -}}
|
|
||||||
{{- " " -}}🛑 {{ . -}}{{- "\n" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- with .Output -}}
|
|
||||||
{{- . -}}{{- "\n" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- with .TestCases -}}
|
|
||||||
{{- /* Passing tests are first */ -}}
|
|
||||||
{{- range . -}}
|
|
||||||
{{- if eq .Result "PASS" -}}
|
|
||||||
::group::{{ "\033" }}[0;32m✅{{ " " }}{{- .Name -}}
|
|
||||||
{{- "\033" -}}[0;37m ({{if $settings.ShowTestStatus}}{{.Result}}; {{end}}{{ .Duration -}}
|
|
||||||
{{- with .Coverage -}}
|
|
||||||
, coverage: {{ . }}%
|
|
||||||
{{- end -}})
|
|
||||||
{{- "\033" -}}[0m
|
|
||||||
{{- "\n" -}}
|
|
||||||
|
|
||||||
{{- with .Output -}}
|
|
||||||
{{- formatTestOutput . $settings -}}
|
|
||||||
{{- "\n" -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
::endgroup::{{- "\n" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- /* Then skipped tests are second */ -}}
|
|
||||||
{{- range . -}}
|
|
||||||
{{- if eq .Result "SKIP" -}}
|
|
||||||
::group::{{ "\033" }}[0;33m🚧{{ " " }}{{- .Name -}}
|
|
||||||
{{- "\033" -}}[0;37m ({{if $settings.ShowTestStatus}}{{.Result}}; {{end}}{{ .Duration -}}
|
|
||||||
{{- with .Coverage -}}
|
|
||||||
, coverage: {{ . }}%
|
|
||||||
{{- end -}})
|
|
||||||
{{- "\033" -}}[0m
|
|
||||||
{{- "\n" -}}
|
|
||||||
|
|
||||||
{{- with .Output -}}
|
|
||||||
{{- formatTestOutput . $settings -}}
|
|
||||||
{{- "\n" -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
::endgroup::{{- "\n" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- /* and failing tests are last */ -}}
|
|
||||||
{{- range . -}}
|
|
||||||
{{- if and (ne .Result "PASS") (ne .Result "SKIP") -}}
|
|
||||||
::group::{{ "\033" }}[0;31m❌{{ " " }}{{- .Name -}}
|
|
||||||
{{- "\033" -}}[0;37m ({{if $settings.ShowTestStatus}}{{.Result}}; {{end}}{{ .Duration -}}
|
|
||||||
{{- with .Coverage -}}
|
|
||||||
, coverage: {{ . }}%
|
|
||||||
{{- end -}})
|
|
||||||
{{- "\033" -}}[0m
|
|
||||||
{{- "\n" -}}
|
|
||||||
|
|
||||||
{{- with .Output -}}
|
|
||||||
{{- formatTestOutput . $settings -}}
|
|
||||||
{{- "\n" -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
::endgroup::{{- "\n" -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- "\n" -}}
|
|
||||||
{{- end -}}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
title: CI run against latest deps is failing
|
|
||||||
---
|
|
||||||
See https://github.com/{{env.GITHUB_REPOSITORY}}/actions/runs/{{env.GITHUB_RUN_ID}}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Configuration file used for testing the 'synapse_port_db' script.
|
|
||||||
# Tells the script to connect to the postgresql database that will be available in the
|
|
||||||
# CI's Docker setup at the point where this file is considered.
|
|
||||||
server_name: "localhost:8800"
|
|
||||||
|
|
||||||
signing_key_path: ".ci/test.signing.key"
|
|
||||||
|
|
||||||
report_stats: false
|
|
||||||
|
|
||||||
database:
|
|
||||||
name: "psycopg2"
|
|
||||||
args:
|
|
||||||
user: postgres
|
|
||||||
host: localhost
|
|
||||||
password: postgres
|
|
||||||
database: synapse
|
|
||||||
|
|
||||||
# Suppress the key server warning.
|
|
||||||
trusted_key_servers: []
|
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
#
|
|
||||||
# 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]
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
# Calculate the trial jobs to run based on if we're in a PR or not.
|
|
||||||
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
def set_output(key: str, value: str):
|
|
||||||
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
|
|
||||||
with open(os.environ["GITHUB_OUTPUT"], "at") as f:
|
|
||||||
print(f"{key}={value}", file=f)
|
|
||||||
|
|
||||||
|
|
||||||
IS_PR = os.environ["GITHUB_REF"].startswith("refs/pull/")
|
|
||||||
|
|
||||||
# First calculate the various trial jobs.
|
|
||||||
#
|
|
||||||
# For PRs, we only run each type of test with the oldest and newest Python
|
|
||||||
# version that's supported. The oldest version ensures we don't accidentally
|
|
||||||
# introduce syntax or code that's too new, and the newest ensures we don't use
|
|
||||||
# code that's been dropped in the latest supported Python version.
|
|
||||||
|
|
||||||
trial_sqlite_tests = [
|
|
||||||
{
|
|
||||||
"python-version": "3.10",
|
|
||||||
"database": "sqlite",
|
|
||||||
"extras": "all",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"python-version": "3.14",
|
|
||||||
"database": "sqlite",
|
|
||||||
"extras": "all",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
if not IS_PR:
|
|
||||||
# Otherwise, check all supported Python versions.
|
|
||||||
#
|
|
||||||
# Avoiding running all of these versions on every PR saves on CI time.
|
|
||||||
trial_sqlite_tests.extend(
|
|
||||||
{
|
|
||||||
"python-version": version,
|
|
||||||
"database": "sqlite",
|
|
||||||
"extras": "all",
|
|
||||||
}
|
|
||||||
for version in ("3.11", "3.12", "3.13")
|
|
||||||
)
|
|
||||||
|
|
||||||
# Only test postgres against the earliest and latest Python versions that we
|
|
||||||
# support in order to save on CI time.
|
|
||||||
trial_postgres_tests = [
|
|
||||||
{
|
|
||||||
"python-version": "3.10",
|
|
||||||
"database": "postgres",
|
|
||||||
"postgres-version": "14",
|
|
||||||
"extras": "all",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"python-version": "3.14",
|
|
||||||
"database": "postgres",
|
|
||||||
"postgres-version": "17",
|
|
||||||
"extras": "all",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
# Ensure that Synapse passes unit tests even with no extra dependencies installed.
|
|
||||||
trial_no_extra_tests = [
|
|
||||||
{
|
|
||||||
"python-version": "3.10",
|
|
||||||
"database": "sqlite",
|
|
||||||
"extras": "",
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
print("::group::Calculated trial jobs")
|
|
||||||
print(
|
|
||||||
json.dumps(
|
|
||||||
trial_sqlite_tests + trial_postgres_tests + trial_no_extra_tests, indent=4
|
|
||||||
)
|
|
||||||
)
|
|
||||||
print("::endgroup::")
|
|
||||||
|
|
||||||
test_matrix = json.dumps(
|
|
||||||
trial_sqlite_tests + trial_postgres_tests + trial_no_extra_tests
|
|
||||||
)
|
|
||||||
set_output("trial_test_matrix", test_matrix)
|
|
||||||
|
|
||||||
|
|
||||||
# First calculate the various sytest jobs.
|
|
||||||
#
|
|
||||||
# For each type of test we only run on bookworm on PRs
|
|
||||||
|
|
||||||
|
|
||||||
sytest_tests = [
|
|
||||||
{
|
|
||||||
"sytest-tag": "bookworm",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sytest-tag": "bookworm",
|
|
||||||
"postgres": "postgres",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sytest-tag": "bookworm",
|
|
||||||
"postgres": "multi-postgres",
|
|
||||||
"workers": "workers",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sytest-tag": "bookworm",
|
|
||||||
"postgres": "multi-postgres",
|
|
||||||
"workers": "workers",
|
|
||||||
"reactor": "asyncio",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
if not IS_PR:
|
|
||||||
sytest_tests.extend(
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"sytest-tag": "bookworm",
|
|
||||||
"reactor": "asyncio",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sytest-tag": "bookworm",
|
|
||||||
"postgres": "postgres",
|
|
||||||
"reactor": "asyncio",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"sytest-tag": "testing",
|
|
||||||
"postgres": "postgres",
|
|
||||||
},
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
print("::group::Calculated sytest jobs")
|
|
||||||
print(json.dumps(sytest_tests, indent=4))
|
|
||||||
print("::endgroup::")
|
|
||||||
|
|
||||||
test_matrix = json.dumps(sytest_tests)
|
|
||||||
set_output("sytest_test_matrix", test_matrix)
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#! /usr/bin/env python
|
|
||||||
import sys
|
|
||||||
|
|
||||||
if sys.version_info < (3, 11):
|
|
||||||
raise RuntimeError("Requires at least Python 3.11, to import tomllib")
|
|
||||||
|
|
||||||
import tomllib
|
|
||||||
|
|
||||||
with open("poetry.lock", "rb") as f:
|
|
||||||
lockfile = tomllib.load(f)
|
|
||||||
|
|
||||||
try:
|
|
||||||
lock_version = lockfile["metadata"]["lock-version"]
|
|
||||||
assert lock_version == "2.1"
|
|
||||||
except Exception:
|
|
||||||
print(
|
|
||||||
"""\
|
|
||||||
Lockfile is not version 2.1. You probably need to upgrade poetry on your local box
|
|
||||||
and re-run `poetry lock`. See the Poetry cheat sheet at
|
|
||||||
https://element-hq.github.io/synapse/develop/development/dependencies.html
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
raise
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Fetches a version of complement which best matches the current build.
|
|
||||||
#
|
|
||||||
# The tarball is unpacked into `./complement`.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
mkdir -p complement
|
|
||||||
|
|
||||||
# Pick an appropriate version of complement. Depending on whether this is a PR or release,
|
|
||||||
# etc. we need to use different fallbacks:
|
|
||||||
#
|
|
||||||
# 1. First check if there's a similarly named branch (GITHUB_HEAD_REF
|
|
||||||
# for pull requests, otherwise GITHUB_REF).
|
|
||||||
# 2. Attempt to use the base branch, e.g. when merging into release-vX.Y
|
|
||||||
# (GITHUB_BASE_REF for pull requests).
|
|
||||||
# 3. Use the default complement branch ("HEAD").
|
|
||||||
for BRANCH_NAME in "$GITHUB_HEAD_REF" "$GITHUB_BASE_REF" "${GITHUB_REF#refs/heads/}" "HEAD"; do
|
|
||||||
# Skip empty branch names and merge commits.
|
|
||||||
if [[ -z "$BRANCH_NAME" || $BRANCH_NAME =~ ^refs/pull/.* ]]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
(wget -O - "https://github.com/matrix-org/complement/archive/$BRANCH_NAME.tar.gz" | tar -xz --strip-components=1 -C complement) && break
|
|
||||||
done
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# wraps `gotestfmt`, hiding output from successful packages unless
|
|
||||||
# all tests passed.
|
|
||||||
|
|
||||||
set -o pipefail
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# tee the test results to a log, whilst also piping them into gotestfmt,
|
|
||||||
# telling it to hide successful results, so that we can clearly see
|
|
||||||
# unsuccessful results.
|
|
||||||
tee complement.log | gotestfmt -hide successful-packages
|
|
||||||
|
|
||||||
# gotestfmt will exit non-zero if there were any failures, so if we got to this
|
|
||||||
# point, we must have had a successful result.
|
|
||||||
echo "All tests successful; showing all test results"
|
|
||||||
|
|
||||||
# Pipe the test results back through gotestfmt, showing all results.
|
|
||||||
# The log file consists of JSON lines giving the test results, interspersed
|
|
||||||
# with regular stdout lines (including reports of downloaded packages).
|
|
||||||
grep '^{"Time":' complement.log | gotestfmt
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Common commands to set up Complement's prerequisites in a GitHub Actions CI run.
|
|
||||||
#
|
|
||||||
# Must be called after Synapse has been checked out to `synapse/`.
|
|
||||||
#
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
alias block='{ set +x; } 2>/dev/null; func() { echo "::group::$*"; set -x; }; func'
|
|
||||||
alias endblock='{ set +x; } 2>/dev/null; func() { echo "::endgroup::"; set -x; }; func'
|
|
||||||
|
|
||||||
block Install Complement Dependencies
|
|
||||||
sudo apt-get -qq update && sudo apt-get install -qqy libolm3 libolm-dev
|
|
||||||
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
|
|
||||||
endblock
|
|
||||||
|
|
||||||
block Install custom gotestfmt template
|
|
||||||
mkdir .gotestfmt/github -p
|
|
||||||
cp synapse/.ci/complement_package.gotpl .gotestfmt/github/package.gotpl
|
|
||||||
endblock
|
|
||||||
|
|
||||||
block Check out Complement
|
|
||||||
# Attempt to check out the same branch of Complement as the PR. If it
|
|
||||||
# doesn't exist, fallback to HEAD.
|
|
||||||
synapse/.ci/scripts/checkout_complement.sh
|
|
||||||
endblock
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Test for the export-data admin command against sqlite and postgres
|
|
||||||
|
|
||||||
# Expects Synapse to have been already installed with `poetry install --extras postgres`.
|
|
||||||
# Expects `poetry` to be available on the `PATH`.
|
|
||||||
|
|
||||||
set -xe
|
|
||||||
cd "$(dirname "$0")/../.."
|
|
||||||
|
|
||||||
echo "--- Generate the signing key"
|
|
||||||
|
|
||||||
# Generate the server's signing key.
|
|
||||||
poetry run synapse_homeserver --generate-keys -c .ci/sqlite-config.yaml
|
|
||||||
|
|
||||||
echo "--- Prepare test database"
|
|
||||||
|
|
||||||
# Make sure the SQLite3 database is using the latest schema and has no pending background update.
|
|
||||||
poetry run update_synapse_database --database-config .ci/sqlite-config.yaml --run-background-updates
|
|
||||||
|
|
||||||
# Run the export-data command on the sqlite test database
|
|
||||||
poetry run python -m synapse.app.admin_cmd -c .ci/sqlite-config.yaml export-data @anon-20191002_181700-832:localhost:8800 \
|
|
||||||
--output-directory /tmp/export_data
|
|
||||||
|
|
||||||
# Test that the output directory exists and contains the rooms directory
|
|
||||||
dir_r="/tmp/export_data/rooms"
|
|
||||||
dir_u="/tmp/export_data/user_data"
|
|
||||||
if [ -d "$dir_r" ] && [ -d "$dir_u" ]; then
|
|
||||||
echo "Command successful, this test passes"
|
|
||||||
else
|
|
||||||
echo "No output directories found, the command fails against a sqlite database."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the PostgreSQL database.
|
|
||||||
psql -c "CREATE DATABASE synapse"
|
|
||||||
|
|
||||||
# Port the SQLite databse to postgres so we can check command works against postgres
|
|
||||||
echo "+++ Port SQLite3 databse to postgres"
|
|
||||||
poetry run synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml
|
|
||||||
|
|
||||||
# Run the export-data command on postgres database
|
|
||||||
poetry run python -m synapse.app.admin_cmd -c .ci/postgres-config.yaml export-data @anon-20191002_181700-832:localhost:8800 \
|
|
||||||
--output-directory /tmp/export_data2
|
|
||||||
|
|
||||||
# Test that the output directory exists and contains the rooms directory
|
|
||||||
dir_r2="/tmp/export_data2/rooms"
|
|
||||||
dir_u2="/tmp/export_data2/user_data"
|
|
||||||
if [ -d "$dir_r2" ] && [ -d "$dir_u2" ]; then
|
|
||||||
echo "Command successful, this test passes"
|
|
||||||
else
|
|
||||||
echo "No output directories found, the command fails against a postgres database."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Test script for 'synapse_port_db'.
|
|
||||||
# - configures synapse and a postgres server.
|
|
||||||
# - runs the port script on a prepopulated test sqlite db. Checks that the
|
|
||||||
# return code is zero.
|
|
||||||
# - reruns the port script on the same sqlite db, targetting the same postgres db.
|
|
||||||
# Checks that the return code is zero.
|
|
||||||
# - runs the port script against a new sqlite db. Checks the return code is zero.
|
|
||||||
#
|
|
||||||
# Expects Synapse to have been already installed with `poetry install --extras postgres`.
|
|
||||||
# Expects `poetry` to be available on the `PATH`.
|
|
||||||
|
|
||||||
set -xe -o pipefail
|
|
||||||
cd "$(dirname "$0")/../.."
|
|
||||||
|
|
||||||
echo "--- Generate the signing key"
|
|
||||||
poetry run synapse_homeserver --generate-keys -c .ci/sqlite-config.yaml
|
|
||||||
|
|
||||||
echo "--- Prepare test database"
|
|
||||||
# Make sure the SQLite3 database is using the latest schema and has no pending background updates.
|
|
||||||
poetry run update_synapse_database --database-config .ci/sqlite-config.yaml --run-background-updates
|
|
||||||
|
|
||||||
# Create the PostgreSQL database.
|
|
||||||
psql -c "CREATE DATABASE synapse"
|
|
||||||
|
|
||||||
echo "+++ Run synapse_port_db against test database"
|
|
||||||
# TODO: this invocation of synapse_port_db (and others below) used to be prepended with `coverage run`,
|
|
||||||
# but coverage seems unable to find the entrypoints installed by `pip install -e .`.
|
|
||||||
poetry run synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml
|
|
||||||
|
|
||||||
# We should be able to run twice against the same database.
|
|
||||||
echo "+++ Run synapse_port_db a second time"
|
|
||||||
poetry run synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml
|
|
||||||
|
|
||||||
#####
|
|
||||||
|
|
||||||
# Now do the same again, on an empty database.
|
|
||||||
|
|
||||||
echo "--- Prepare empty SQLite database"
|
|
||||||
|
|
||||||
# we do this by deleting the sqlite db, and then doing the same again.
|
|
||||||
rm .ci/test_db.db
|
|
||||||
|
|
||||||
poetry run update_synapse_database --database-config .ci/sqlite-config.yaml --run-background-updates
|
|
||||||
|
|
||||||
# re-create the PostgreSQL database.
|
|
||||||
psql \
|
|
||||||
-c "DROP DATABASE synapse" \
|
|
||||||
-c "CREATE DATABASE synapse"
|
|
||||||
|
|
||||||
echo "+++ Run synapse_port_db against empty database"
|
|
||||||
poetry run synapse_port_db --sqlite-database .ci/test_db.db --postgres-config .ci/postgres-config.yaml
|
|
||||||
|
|
||||||
echo "--- Create a brand new postgres database from schema"
|
|
||||||
cp .ci/postgres-config.yaml .ci/postgres-config-unported.yaml
|
|
||||||
sed -i -e 's/database: synapse/database: synapse_unported/' .ci/postgres-config-unported.yaml
|
|
||||||
psql -c "CREATE DATABASE synapse_unported"
|
|
||||||
poetry run update_synapse_database --database-config .ci/postgres-config-unported.yaml --run-background-updates
|
|
||||||
|
|
||||||
echo "+++ Comparing ported schema with unported schema"
|
|
||||||
# Ignore the tables that portdb creates. (Should it tidy them up when the porting is completed?)
|
|
||||||
psql synapse -c "DROP TABLE port_from_sqlite3;"
|
|
||||||
pg_dump --format=plain --schema-only --no-tablespaces --no-acl --no-owner --restrict-key=TESTING synapse_unported > unported.sql
|
|
||||||
pg_dump --format=plain --schema-only --no-tablespaces --no-acl --no-owner --restrict-key=TESTING synapse > ported.sql
|
|
||||||
# By default, `diff` returns zero if there are no changes and nonzero otherwise
|
|
||||||
diff -u unported.sql ported.sql | tee schema_diff
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# 1) Resolve project ID.
|
|
||||||
PROJECT_ID=$(gh project view "$PROJECT_NUMBER" --owner "$PROJECT_OWNER" --format json | jq -r '.id')
|
|
||||||
|
|
||||||
# 2) Find existing item (project card) for this issue.
|
|
||||||
ITEM_ID=$(
|
|
||||||
gh project item-list "$PROJECT_NUMBER" --owner "$PROJECT_OWNER" --format json \
|
|
||||||
| jq -r --arg url "$ISSUE_URL" '.items[] | select(.content.url==$url) | .id' | head -n1
|
|
||||||
)
|
|
||||||
|
|
||||||
# 3) If one doesn't exist, add this issue to the project.
|
|
||||||
if [ -z "${ITEM_ID:-}" ]; then
|
|
||||||
ITEM_ID=$(gh project item-add "$PROJECT_NUMBER" --owner "$PROJECT_OWNER" --url "$ISSUE_URL" --format json | jq -r '.id')
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 4) Get Status field id + the option id for TARGET_STATUS.
|
|
||||||
FIELDS_JSON=$(gh project field-list "$PROJECT_NUMBER" --owner "$PROJECT_OWNER" --format json)
|
|
||||||
STATUS_FIELD=$(echo "$FIELDS_JSON" | jq -r '.fields[] | select(.name=="Status")')
|
|
||||||
STATUS_FIELD_ID=$(echo "$STATUS_FIELD" | jq -r '.id')
|
|
||||||
OPTION_ID=$(echo "$STATUS_FIELD" | jq -r --arg name "$TARGET_STATUS" '.options[] | select(.name==$name) | .id')
|
|
||||||
|
|
||||||
if [ -z "${OPTION_ID:-}" ]; then
|
|
||||||
echo "No Status option named \"$TARGET_STATUS\" found"; exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 5) Set Status (moves item to the matching column in the board view).
|
|
||||||
gh project item-edit --id "$ITEM_ID" --project-id "$PROJECT_ID" --field-id "$STATUS_FIELD_ID" --single-select-option-id "$OPTION_ID"
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# Configuration file used for testing the 'synapse_port_db' script.
|
|
||||||
# Tells the 'update_database' script to connect to the test SQLite database to upgrade its
|
|
||||||
# schema and run background updates on it.
|
|
||||||
server_name: "localhost:8800"
|
|
||||||
|
|
||||||
signing_key_path: ".ci/test.signing.key"
|
|
||||||
|
|
||||||
report_stats: false
|
|
||||||
|
|
||||||
database:
|
|
||||||
name: "sqlite3"
|
|
||||||
args:
|
|
||||||
database: ".ci/test_db.db"
|
|
||||||
|
|
||||||
# Suppress the key server warning.
|
|
||||||
trusted_key_servers: []
|
|
||||||
BIN
.ci/test_db.db
BIN
.ci/test_db.db
Binary file not shown.
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
title: CI run against Twisted trunk is failing
|
|
||||||
---
|
|
||||||
See https://github.com/{{env.GITHUB_REPOSITORY}}/actions/runs/{{env.GITHUB_RUN_ID}}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# This file serves as a blacklist for SyTest tests that we expect will fail in
|
|
||||||
# Synapse when run under worker mode. For more details, see sytest-blacklist.
|
|
||||||
159
.circleci/config.yml
Normal file
159
.circleci/config.yml
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
dockerhubuploadrelease:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: docker build -f docker/Dockerfile -t matrixdotorg/synapse:$CIRCLE_TAG .
|
||||||
|
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||||
|
- run: docker push matrixdotorg/synapse:$CIRCLE_TAG
|
||||||
|
dockerhubuploadlatest:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: docker build -f docker/Dockerfile -t matrixdotorg/synapse:$CIRCLE_SHA1 .
|
||||||
|
- run: docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||||
|
- run: docker tag matrixdotorg/synapse:$CIRCLE_SHA1 matrixdotorg/synapse:latest
|
||||||
|
- run: docker push matrixdotorg/synapse:$CIRCLE_SHA1
|
||||||
|
- run: docker push matrixdotorg/synapse:latest
|
||||||
|
sytestpy2:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: docker pull matrixdotorg/sytest-synapsepy2
|
||||||
|
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy2
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/project/logs
|
||||||
|
destination: logs
|
||||||
|
- store_test_results:
|
||||||
|
path: logs
|
||||||
|
sytestpy2postgres:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: docker pull matrixdotorg/sytest-synapsepy2
|
||||||
|
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy2
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/project/logs
|
||||||
|
destination: logs
|
||||||
|
- store_test_results:
|
||||||
|
path: logs
|
||||||
|
sytestpy2merged:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: bash .circleci/merge_base_branch.sh
|
||||||
|
- run: docker pull matrixdotorg/sytest-synapsepy2
|
||||||
|
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy2
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/project/logs
|
||||||
|
destination: logs
|
||||||
|
- store_test_results:
|
||||||
|
path: logs
|
||||||
|
|
||||||
|
sytestpy2postgresmerged:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: bash .circleci/merge_base_branch.sh
|
||||||
|
- run: docker pull matrixdotorg/sytest-synapsepy2
|
||||||
|
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy2
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/project/logs
|
||||||
|
destination: logs
|
||||||
|
- store_test_results:
|
||||||
|
path: logs
|
||||||
|
|
||||||
|
sytestpy3:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: docker pull matrixdotorg/sytest-synapsepy3
|
||||||
|
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy3
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/project/logs
|
||||||
|
destination: logs
|
||||||
|
- store_test_results:
|
||||||
|
path: logs
|
||||||
|
sytestpy3postgres:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: docker pull matrixdotorg/sytest-synapsepy3
|
||||||
|
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy3
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/project/logs
|
||||||
|
destination: logs
|
||||||
|
- store_test_results:
|
||||||
|
path: logs
|
||||||
|
sytestpy3merged:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: bash .circleci/merge_base_branch.sh
|
||||||
|
- run: docker pull matrixdotorg/sytest-synapsepy3
|
||||||
|
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs matrixdotorg/sytest-synapsepy3
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/project/logs
|
||||||
|
destination: logs
|
||||||
|
- store_test_results:
|
||||||
|
path: logs
|
||||||
|
sytestpy3postgresmerged:
|
||||||
|
machine: true
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: bash .circleci/merge_base_branch.sh
|
||||||
|
- run: docker pull matrixdotorg/sytest-synapsepy3
|
||||||
|
- run: docker run --rm -it -v $(pwd)\:/src -v $(pwd)/logs\:/logs -e POSTGRES=1 matrixdotorg/sytest-synapsepy3
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/project/logs
|
||||||
|
destination: logs
|
||||||
|
- store_test_results:
|
||||||
|
path: logs
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build:
|
||||||
|
jobs:
|
||||||
|
- sytestpy2:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: /develop|master|release-.*/
|
||||||
|
- sytestpy2postgres:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: /develop|master|release-.*/
|
||||||
|
- sytestpy3:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: /develop|master|release-.*/
|
||||||
|
- sytestpy3postgres:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: /develop|master|release-.*/
|
||||||
|
- sytestpy2merged:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore: /develop|master|release-.*/
|
||||||
|
- sytestpy2postgresmerged:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore: /develop|master|release-.*/
|
||||||
|
- sytestpy3merged:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore: /develop|master|release-.*/
|
||||||
|
- sytestpy3postgresmerged:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
ignore: /develop|master|release-.*/
|
||||||
|
- dockerhubuploadrelease:
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /^v[0-9].[0-9]+.[0-9]+(.[0-9]+)?/
|
||||||
|
branches:
|
||||||
|
ignore: /.*/
|
||||||
|
- dockerhubuploadlatest:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: master
|
||||||
31
.circleci/merge_base_branch.sh
Executable file
31
.circleci/merge_base_branch.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# CircleCI doesn't give CIRCLE_PR_NUMBER in the environment for non-forked PRs. Wonderful.
|
||||||
|
# In this case, we just need to do some ~shell magic~ to strip it out of the PULL_REQUEST URL.
|
||||||
|
echo 'export CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"' >> $BASH_ENV
|
||||||
|
source $BASH_ENV
|
||||||
|
|
||||||
|
if [[ -z "${CIRCLE_PR_NUMBER}" ]]
|
||||||
|
then
|
||||||
|
echo "Can't figure out what the PR number is!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get the reference, using the GitHub API
|
||||||
|
GITBASE=`curl -q https://api.github.com/repos/matrix-org/synapse/pulls/${CIRCLE_PR_NUMBER} | jq -r '.base.ref'`
|
||||||
|
|
||||||
|
# Show what we are before
|
||||||
|
git show -s
|
||||||
|
|
||||||
|
# Set up username so it can do a merge
|
||||||
|
git config --global user.email bot@matrix.org
|
||||||
|
git config --global user.name "A robot"
|
||||||
|
|
||||||
|
# Fetch and merge. If it doesn't work, it will raise due to set -e.
|
||||||
|
git fetch -u origin $GITBASE
|
||||||
|
git merge --no-edit origin/$GITBASE
|
||||||
|
|
||||||
|
# Show what we are after.
|
||||||
|
git show -s
|
||||||
14
.codecov.yml
14
.codecov.yml
@@ -1,14 +0,0 @@
|
|||||||
comment: off
|
|
||||||
|
|
||||||
coverage:
|
|
||||||
status:
|
|
||||||
project:
|
|
||||||
default:
|
|
||||||
target: 0 # Target % coverage, can be auto. Turned off for now
|
|
||||||
threshold: null
|
|
||||||
base: auto
|
|
||||||
patch:
|
|
||||||
default:
|
|
||||||
target: 0
|
|
||||||
threshold: null
|
|
||||||
base: auto
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[run]
|
|
||||||
branch = True
|
|
||||||
parallel = True
|
|
||||||
include=$TOP/synapse/*
|
|
||||||
data_file = $TOP/.coverage
|
|
||||||
|
|
||||||
[report]
|
|
||||||
precision = 2
|
|
||||||
@@ -1,18 +1,7 @@
|
|||||||
# ignore everything by default
|
Dockerfile
|
||||||
*
|
.travis.yml
|
||||||
|
.gitignore
|
||||||
# things to include
|
demo/etc
|
||||||
!docker
|
tox.ini
|
||||||
!synapse
|
.git/*
|
||||||
!rust
|
.tox/*
|
||||||
!README.rst
|
|
||||||
!pyproject.toml
|
|
||||||
!poetry.lock
|
|
||||||
!Cargo.lock
|
|
||||||
!Cargo.toml
|
|
||||||
!build_rust.py
|
|
||||||
|
|
||||||
rust/target
|
|
||||||
synapse/*.so
|
|
||||||
|
|
||||||
**/__pycache__
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
# EditorConfig https://EditorConfig.org
|
|
||||||
|
|
||||||
# top-most EditorConfig file
|
|
||||||
root = true
|
|
||||||
|
|
||||||
# 4 space indentation
|
|
||||||
[*.{py,pyi}]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 4
|
|
||||||
max_line_length = 88
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
# Commits in this file will be removed from GitHub blame results.
|
|
||||||
#
|
|
||||||
# To use this file locally, use:
|
|
||||||
# git blame --ignore-revs-file="path/to/.git-blame-ignore-revs" <files>
|
|
||||||
#
|
|
||||||
# or configure the `blame.ignoreRevsFile` option in your git config.
|
|
||||||
#
|
|
||||||
# If ignoring a pull request that was not squash merged, only the merge
|
|
||||||
# commit needs to be put here. Child commits will be resolved from it.
|
|
||||||
|
|
||||||
# Run black (https://github.com/matrix-org/synapse/pull/3679).
|
|
||||||
8b3d9b6b199abb87246f982d5db356f1966db925
|
|
||||||
|
|
||||||
# Black reformatting (https://github.com/matrix-org/synapse/pull/5482).
|
|
||||||
32e7c9e7f20b57dd081023ac42d6931a8da9b3a3
|
|
||||||
|
|
||||||
# Target Python 3.5 with black (https://github.com/matrix-org/synapse/pull/8664).
|
|
||||||
aff1eb7c671b0a3813407321d2702ec46c71fa56
|
|
||||||
|
|
||||||
# Update black to 20.8b1 (https://github.com/matrix-org/synapse/pull/9381).
|
|
||||||
0a00b7ff14890987f09112a2ae696c61001e6cf1
|
|
||||||
|
|
||||||
# Convert tests/rest/admin/test_room.py to unix file endings (https://github.com/matrix-org/synapse/pull/7953).
|
|
||||||
c4268e3da64f1abb5b31deaeb5769adb6510c0a7
|
|
||||||
|
|
||||||
# Update black to 23.1.0 (https://github.com/matrix-org/synapse/pull/15103)
|
|
||||||
9bb2eac71962970d02842bca441f4bcdbbf93a11
|
|
||||||
|
|
||||||
# Use type hinting generics in standard collections (https://github.com/element-hq/synapse/pull/19046)
|
|
||||||
fc244bb592aa481faf28214a2e2ce3bb4e95d990
|
|
||||||
|
|
||||||
# Write union types as X | Y where possible (https://github.com/element-hq/synapse/pull/19111)
|
|
||||||
fcac7e0282b074d4bd3414d1c9c181e9701875d9
|
|
||||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +0,0 @@
|
|||||||
.github/workflows/* merge=ours
|
|
||||||
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -1,2 +0,0 @@
|
|||||||
# Automatically request reviews from the synapse-core team when a pull request comes in.
|
|
||||||
* @element-hq/synapse-core
|
|
||||||
51
.github/ISSUE_TEMPLATE.md
vendored
51
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,5 +1,48 @@
|
|||||||
**If you are looking for support** please ask in **#synapse:matrix.org**
|
<!--
|
||||||
(using a matrix.org account if necessary). We do not use GitHub issues for
|
|
||||||
support.
|
|
||||||
|
|
||||||
**If you want to report a security issue** please see https://element.io/security/security-disclosure-policy
|
**IF YOU HAVE SUPPORT QUESTIONS ABOUT RUNNING OR CONFIGURING YOUR OWN HOME SERVER**:
|
||||||
|
You will likely get better support more quickly if you ask in ** #matrix:matrix.org ** ;)
|
||||||
|
|
||||||
|
|
||||||
|
This is a bug report template. By following the instructions below and
|
||||||
|
filling out the sections with your information, you will help the us to get all
|
||||||
|
the necessary data to fix your issue.
|
||||||
|
|
||||||
|
You can also preview your report before submitting it. You may remove sections
|
||||||
|
that aren't relevant to your particular case.
|
||||||
|
|
||||||
|
Text between <!-- and --> marks will be invisible in the report.
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Description
|
||||||
|
|
||||||
|
Describe here the problem that you are experiencing, or the feature you are requesting.
|
||||||
|
|
||||||
|
### Steps to reproduce
|
||||||
|
|
||||||
|
- For bugs, list the steps
|
||||||
|
- that reproduce the bug
|
||||||
|
- using hyphens as bullet points
|
||||||
|
|
||||||
|
Describe how what happens differs from what you expected.
|
||||||
|
|
||||||
|
<!-- If you can identify any relevant log snippets from _homeserver.log_, please include
|
||||||
|
those (please be careful to remove any personal or private data). Please surround them with
|
||||||
|
``` (three backticks, on a line on their own), so that they are formatted legibly. -->
|
||||||
|
|
||||||
|
### Version information
|
||||||
|
|
||||||
|
<!-- IMPORTANT: please answer the following questions, to help us narrow down the problem -->
|
||||||
|
|
||||||
|
- **Homeserver**: Was this issue identified on matrix.org or another homeserver?
|
||||||
|
|
||||||
|
If not matrix.org:
|
||||||
|
- **Version**: What version of Synapse is running? <!--
|
||||||
|
You can find the Synapse version by inspecting the server headers (replace matrix.org with
|
||||||
|
your own homeserver domain):
|
||||||
|
$ curl -v https://matrix.org/_matrix/client/versions 2>&1 | grep "Server:"
|
||||||
|
-->
|
||||||
|
- **Install method**: package manager/git clone/pip
|
||||||
|
- **Platform**: Tell us about the environment in which your homeserver is operating
|
||||||
|
- distro, hardware, if it's running in a vm/container, etc.
|
||||||
|
|||||||
144
.github/ISSUE_TEMPLATE/BUG_REPORT.yml
vendored
144
.github/ISSUE_TEMPLATE/BUG_REPORT.yml
vendored
@@ -1,144 +0,0 @@
|
|||||||
name: Bug report
|
|
||||||
description: Create a report to help us improve
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
**THIS IS NOT A SUPPORT CHANNEL!**
|
|
||||||
**IF YOU HAVE SUPPORT QUESTIONS ABOUT RUNNING OR CONFIGURING YOUR OWN HOME SERVER**, please ask in **[#synapse:matrix.org](https://matrix.to/#/#synapse:matrix.org)** (using a matrix.org account if necessary).
|
|
||||||
|
|
||||||
If you want to report a security issue, please see https://element.io/security/security-disclosure-policy
|
|
||||||
|
|
||||||
This is a bug report form. By following the instructions below and completing the sections with your information, you will help the us to get all the necessary data to fix your issue.
|
|
||||||
|
|
||||||
You can also preview your report before submitting it.
|
|
||||||
- type: textarea
|
|
||||||
id: description
|
|
||||||
attributes:
|
|
||||||
label: Description
|
|
||||||
description: Describe the problem that you are experiencing
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: reproduction_steps
|
|
||||||
attributes:
|
|
||||||
label: Steps to reproduce
|
|
||||||
description: |
|
|
||||||
Describe the series of steps that leads you to the problem.
|
|
||||||
|
|
||||||
Describe how what happens differs from what you expected.
|
|
||||||
placeholder: Tell us what you see!
|
|
||||||
value: |
|
|
||||||
- list the steps
|
|
||||||
- that reproduce the bug
|
|
||||||
- using hyphens as bullet points
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
---
|
|
||||||
|
|
||||||
**IMPORTANT**: please answer the following questions, to help us narrow down the problem.
|
|
||||||
- type: input
|
|
||||||
id: homeserver
|
|
||||||
attributes:
|
|
||||||
label: Homeserver
|
|
||||||
description: Which homeserver was this issue identified on? (matrix.org, another homeserver, etc)
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
id: version
|
|
||||||
attributes:
|
|
||||||
label: Synapse Version
|
|
||||||
description: |
|
|
||||||
What version of Synapse is this homeserver running?
|
|
||||||
|
|
||||||
You can find the Synapse version by visiting https://yourserver.example.com/_matrix/federation/v1/version
|
|
||||||
|
|
||||||
or with this command:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ curl http://localhost:8008/_synapse/admin/v1/server_version
|
|
||||||
```
|
|
||||||
|
|
||||||
(You may need to replace `localhost:8008` if Synapse is not configured to listen on that port.)
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
id: install_method
|
|
||||||
attributes:
|
|
||||||
label: Installation Method
|
|
||||||
options:
|
|
||||||
- Docker (matrixdotorg/synapse)
|
|
||||||
- Debian packages from packages.matrix.org
|
|
||||||
- pip (from PyPI)
|
|
||||||
- Other (please mention below)
|
|
||||||
- I don't know
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: input
|
|
||||||
id: database
|
|
||||||
attributes:
|
|
||||||
label: Database
|
|
||||||
description: |
|
|
||||||
Are you using SQLite or PostgreSQL? What's the version of your database?
|
|
||||||
|
|
||||||
If PostgreSQL, please also answer the following:
|
|
||||||
- are you using a single PostgreSQL server
|
|
||||||
or [separate servers for `main` and `state`](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#databases)?
|
|
||||||
- have you previously ported from SQLite using the Synapse "portdb" script?
|
|
||||||
- have you previously restored from a backup?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: dropdown
|
|
||||||
id: workers
|
|
||||||
attributes:
|
|
||||||
label: Workers
|
|
||||||
description: |
|
|
||||||
Are you running a single Synapse process, or are you running
|
|
||||||
[2 or more workers](https://element-hq.github.io/synapse/latest/workers.html)?
|
|
||||||
options:
|
|
||||||
- Single process
|
|
||||||
- Multiple workers
|
|
||||||
- I don't know
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: platform
|
|
||||||
attributes:
|
|
||||||
label: Platform
|
|
||||||
description: |
|
|
||||||
Tell us about the environment in which your homeserver is operating...
|
|
||||||
e.g. distro, hardware, if it's running in a vm/container, etc.
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: config
|
|
||||||
attributes:
|
|
||||||
label: Configuration
|
|
||||||
description: |
|
|
||||||
Do you have any unusual config options turned on? If so, please provide details.
|
|
||||||
|
|
||||||
- Experimental or undocumented features
|
|
||||||
- [Presence](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#presence)
|
|
||||||
- [Message retention](https://element-hq.github.io/synapse/latest/message_retention_policies.html)
|
|
||||||
- [Synapse modules](https://element-hq.github.io/synapse/latest/modules/index.html)
|
|
||||||
- type: textarea
|
|
||||||
id: logs
|
|
||||||
attributes:
|
|
||||||
label: Relevant log output
|
|
||||||
description: |
|
|
||||||
Please copy and paste any relevant log output as text (not images), ideally at INFO or DEBUG log level.
|
|
||||||
This will be automatically formatted into code, so there is no need for backticks (`\``).
|
|
||||||
|
|
||||||
Please be careful to remove any personal or private data.
|
|
||||||
|
|
||||||
**Bug reports are usually impossible to diagnose without logging.**
|
|
||||||
render: shell
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
id: anything_else
|
|
||||||
attributes:
|
|
||||||
label: Anything else that would be useful to know?
|
|
||||||
9
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
9
.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
vendored
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Description:**
|
|
||||||
|
|
||||||
<!-- Describe here the feature you are requesting. -->
|
|
||||||
10
.github/ISSUE_TEMPLATE/SUPPORT_REQUEST.md
vendored
10
.github/ISSUE_TEMPLATE/SUPPORT_REQUEST.md
vendored
@@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
name: Support request
|
|
||||||
about: I need support for Synapse
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Please don't file github issues asking for support.
|
|
||||||
|
|
||||||
Instead, please join [`#synapse:matrix.org`](https://matrix.to/#/#synapse:matrix.org)
|
|
||||||
(from a matrix.org account if necessary), and ask there.
|
|
||||||
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,12 +0,0 @@
|
|||||||
### Pull Request Checklist
|
|
||||||
|
|
||||||
<!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request -->
|
|
||||||
|
|
||||||
* [ ] Pull request is based on the develop branch
|
|
||||||
* [ ] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should:
|
|
||||||
- Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
|
|
||||||
- Use markdown where necessary, mostly for `code blocks`.
|
|
||||||
- End with either a period (.) or an exclamation mark (!).
|
|
||||||
- Start with a capital letter.
|
|
||||||
- Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
|
|
||||||
* [ ] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
|
|
||||||
3
.github/SUPPORT.md
vendored
3
.github/SUPPORT.md
vendored
@@ -1,3 +0,0 @@
|
|||||||
[**#synapse:matrix.org**](https://matrix.to/#/#synapse:matrix.org) is the official support room for
|
|
||||||
Synapse, and can be accessed by any client from https://matrix.org/docs/projects/try-matrix-now.html.
|
|
||||||
Please ask for support there, rather than filing github issues.
|
|
||||||
92
.github/dependabot.yml
vendored
92
.github/dependabot.yml
vendored
@@ -1,92 +0,0 @@
|
|||||||
version: 2
|
|
||||||
# As dependabot is currently only run on a weekly basis, we raise the
|
|
||||||
# open-pull-requests-limit to 10 (from the default of 5) to better ensure we
|
|
||||||
# don't continuously grow a backlog of updates.
|
|
||||||
updates:
|
|
||||||
- # "pip" is the correct setting for poetry, per https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
|
|
||||||
package-ecosystem: "pip"
|
|
||||||
directory: "/"
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
# Group patch updates to packages together into a single PR, as they rarely
|
|
||||||
# if ever contain breaking changes that need to be reviewed separately.
|
|
||||||
#
|
|
||||||
# Less PRs means a streamlined review process.
|
|
||||||
#
|
|
||||||
# Python packages follow semantic versioning, and tend to only introduce
|
|
||||||
# breaking changes in major version bumps. Thus, we'll group minor and patch
|
|
||||||
# versions together.
|
|
||||||
groups:
|
|
||||||
minor-and-patches:
|
|
||||||
applies-to: version-updates
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
# Prevent pulling packages that were recently updated to help mitigate
|
|
||||||
# supply chain attacks. 14 days was taken from the recommendation at
|
|
||||||
# https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns
|
|
||||||
# where the author noted that 9/10 attacks would have been mitigated by a
|
|
||||||
# two week cooldown.
|
|
||||||
#
|
|
||||||
# The cooldown only applies to general updates; security updates will still
|
|
||||||
# be pulled in as soon as possible.
|
|
||||||
cooldown:
|
|
||||||
default-days: 14
|
|
||||||
|
|
||||||
- package-ecosystem: "docker"
|
|
||||||
directory: "/docker"
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
# For container versions, breaking changes are also typically only introduced in major
|
|
||||||
# package bumps.
|
|
||||||
groups:
|
|
||||||
minor-and-patches:
|
|
||||||
applies-to: version-updates
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
cooldown:
|
|
||||||
default-days: 14
|
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
# Similarly for GitHub Actions, breaking changes are typically only introduced in major
|
|
||||||
# package bumps.
|
|
||||||
groups:
|
|
||||||
minor-and-patches:
|
|
||||||
applies-to: version-updates
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
||||||
update-types:
|
|
||||||
- "minor"
|
|
||||||
- "patch"
|
|
||||||
cooldown:
|
|
||||||
default-days: 14
|
|
||||||
|
|
||||||
- package-ecosystem: "cargo"
|
|
||||||
directory: "/"
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
versioning-strategy: "lockfile-only"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
# The Rust ecosystem is special in that breaking changes are often introduced
|
|
||||||
# in minor version bumps, as packages typically stay pre-1.0 for a long time.
|
|
||||||
# Thus we specifically keep minor version bumps separate in their own PRs.
|
|
||||||
groups:
|
|
||||||
patches:
|
|
||||||
applies-to: version-updates
|
|
||||||
patterns:
|
|
||||||
- "*"
|
|
||||||
update-types:
|
|
||||||
- "patch"
|
|
||||||
cooldown:
|
|
||||||
default-days: 14
|
|
||||||
110
.gitignore
vendored
110
.gitignore
vendored
@@ -1,81 +1,59 @@
|
|||||||
# filename patterns
|
*.pyc
|
||||||
*~
|
|
||||||
.*.swp
|
.*.swp
|
||||||
.#*
|
*~
|
||||||
*.deb
|
|
||||||
*.egg
|
|
||||||
*.egg-info
|
|
||||||
*.lock
|
*.lock
|
||||||
*.py[cod]
|
|
||||||
*.snap
|
.DS_Store
|
||||||
*.tac
|
|
||||||
_trial_temp/
|
_trial_temp/
|
||||||
_trial_temp*/
|
_trial_temp*/
|
||||||
/out
|
logs/
|
||||||
.DS_Store
|
dbs/
|
||||||
__pycache__/
|
*.egg
|
||||||
|
dist/
|
||||||
|
docs/build/
|
||||||
|
*.egg-info
|
||||||
|
|
||||||
# We do want poetry, cargo and flake lockfiles.
|
cmdclient_config.json
|
||||||
!poetry.lock
|
homeserver*.db
|
||||||
!Cargo.lock
|
homeserver*.log
|
||||||
!flake.lock
|
homeserver*.log.*
|
||||||
|
homeserver*.pid
|
||||||
|
homeserver*.yaml
|
||||||
|
|
||||||
# stuff that is likely to exist when you run a server locally
|
*.signing.key
|
||||||
/*.db
|
*.tls.crt
|
||||||
/*.log
|
*.tls.dh
|
||||||
/*.log.*
|
*.tls.key
|
||||||
/*.log.config
|
|
||||||
/*.pid
|
|
||||||
/.python-version
|
|
||||||
/*.signing.key
|
|
||||||
/env/
|
|
||||||
/.venv*/
|
|
||||||
/homeserver*.yaml
|
|
||||||
/logs
|
|
||||||
/media_store/
|
|
||||||
/uploads
|
|
||||||
/homeserver-config-overrides.d
|
|
||||||
|
|
||||||
# For direnv users
|
.coverage
|
||||||
/.envrc
|
htmlcov
|
||||||
.direnv/
|
|
||||||
|
|
||||||
# For nix/devenv users
|
demo/*/*.db
|
||||||
.devenv/
|
demo/*/*.log
|
||||||
|
demo/*/*.log.*
|
||||||
|
demo/*/*.pid
|
||||||
|
demo/media_store.*
|
||||||
|
demo/etc
|
||||||
|
|
||||||
# IDEs
|
uploads
|
||||||
/.idea/
|
cache
|
||||||
/.ropeproject/
|
|
||||||
/.vscode/
|
|
||||||
/.zed/
|
|
||||||
|
|
||||||
# build products
|
.idea/
|
||||||
!/.coveragerc
|
media_store/
|
||||||
/.coverage*
|
|
||||||
/.mypy_cache/
|
|
||||||
/.tox
|
|
||||||
/.tox-pg-container
|
|
||||||
/build/
|
|
||||||
/coverage.*
|
|
||||||
/dist/
|
|
||||||
/docs/build/
|
|
||||||
/dev-docs/_build/
|
|
||||||
/htmlcov
|
|
||||||
/pip-wheel-metadata/
|
|
||||||
|
|
||||||
# docs
|
*.tac
|
||||||
book/
|
|
||||||
|
|
||||||
# complement
|
build/
|
||||||
/complement-*
|
venv/
|
||||||
/main.tar.gz
|
venv*/
|
||||||
|
*venv/
|
||||||
|
|
||||||
# rust
|
localhost-800*/
|
||||||
/target/
|
static/client/register/register_config.js
|
||||||
/synapse/*.so
|
.tox
|
||||||
|
|
||||||
# Poetry will create a setup.py, which we don't want to include.
|
env/
|
||||||
/setup.py
|
*.config
|
||||||
|
|
||||||
# Don't include users' poetry configs
|
.vscode/
|
||||||
/poetry.toml
|
.ropeproject/
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# Unstable options are only available on a nightly toolchain and must be opted into
|
|
||||||
unstable_features = true
|
|
||||||
|
|
||||||
# `group_imports` is an unstable option that requires nightly Rust toolchain. Tracked by
|
|
||||||
# https://github.com/rust-lang/rustfmt/issues/5083
|
|
||||||
group_imports = "StdExternalCrate"
|
|
||||||
52
.travis.yml
Normal file
52
.travis.yml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
sudo: false
|
||||||
|
language: python
|
||||||
|
|
||||||
|
# tell travis to cache ~/.cache/pip
|
||||||
|
cache: pip
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- git remote set-branches --add origin develop
|
||||||
|
- git fetch origin develop
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
include:
|
||||||
|
- python: 2.7
|
||||||
|
env: TOX_ENV=packaging
|
||||||
|
|
||||||
|
- python: 2.7
|
||||||
|
env: TOX_ENV=pep8
|
||||||
|
|
||||||
|
- python: 2.7
|
||||||
|
env: TOX_ENV=py27
|
||||||
|
|
||||||
|
- python: 2.7
|
||||||
|
env: TOX_ENV=py27-old
|
||||||
|
|
||||||
|
- python: 2.7
|
||||||
|
env: TOX_ENV=py27-postgres TRIAL_FLAGS="-j 4"
|
||||||
|
services:
|
||||||
|
- postgresql
|
||||||
|
|
||||||
|
- python: 3.5
|
||||||
|
env: TOX_ENV=py35
|
||||||
|
|
||||||
|
- python: 3.6
|
||||||
|
env: TOX_ENV=py36
|
||||||
|
|
||||||
|
- python: 3.6
|
||||||
|
env: TOX_ENV=py36-postgres TRIAL_FLAGS="-j 4"
|
||||||
|
services:
|
||||||
|
- postgresql
|
||||||
|
|
||||||
|
- python: 3.6
|
||||||
|
env: TOX_ENV=check_isort
|
||||||
|
|
||||||
|
- python: 3.6
|
||||||
|
env: TOX_ENV=check-newsfragment
|
||||||
|
|
||||||
|
install:
|
||||||
|
- pip install tox
|
||||||
|
|
||||||
|
script:
|
||||||
|
- tox -e $TOX_ENV
|
||||||
47
AUTHORS.rst
47
AUTHORS.rst
@@ -1,8 +1,34 @@
|
|||||||
The following is an incomplete list of people outside the core team who have
|
Erik Johnston <erik at matrix.org>
|
||||||
contributed to Synapse. It is no longer maintained: more recent contributions
|
* HS core
|
||||||
are listed in the `changelog <CHANGES.md>`_.
|
* Federation API impl
|
||||||
|
|
||||||
----
|
Mark Haines <mark at matrix.org>
|
||||||
|
* HS core
|
||||||
|
* Crypto
|
||||||
|
* Content repository
|
||||||
|
* CS v2 API impl
|
||||||
|
|
||||||
|
Kegan Dougal <kegan at matrix.org>
|
||||||
|
* HS core
|
||||||
|
* CS v1 API impl
|
||||||
|
* AS API impl
|
||||||
|
|
||||||
|
Paul "LeoNerd" Evans <paul at matrix.org>
|
||||||
|
* HS core
|
||||||
|
* Presence
|
||||||
|
* Typing Notifications
|
||||||
|
* Performance metrics and caching layer
|
||||||
|
|
||||||
|
Dave Baker <dave at matrix.org>
|
||||||
|
* Push notifications
|
||||||
|
* Auth CS v2 impl
|
||||||
|
|
||||||
|
Matthew Hodgson <matthew at matrix.org>
|
||||||
|
* General doc & housekeeping
|
||||||
|
* Vertobot/vertobridge matrix<->verto PoC
|
||||||
|
|
||||||
|
Emmanuel Rohee <manu at matrix.org>
|
||||||
|
* Supporting iOS clients (testability and fallback registration)
|
||||||
|
|
||||||
Turned to Dust <dwinslow86 at gmail.com>
|
Turned to Dust <dwinslow86 at gmail.com>
|
||||||
* ArchLinux installation instructions
|
* ArchLinux installation instructions
|
||||||
@@ -36,16 +62,7 @@ Christoph Witzany <christoph at web.crofting.com>
|
|||||||
* Add LDAP support for authentication
|
* Add LDAP support for authentication
|
||||||
|
|
||||||
Pierre Jaury <pierre at jaury.eu>
|
Pierre Jaury <pierre at jaury.eu>
|
||||||
* Docker packaging
|
* Docker packaging
|
||||||
|
|
||||||
Serban Constantin <serban.constantin at gmail dot com>
|
Serban Constantin <serban.constantin at gmail dot com>
|
||||||
* Small bug fix
|
* Small bug fix
|
||||||
|
|
||||||
Joseph Weston <joseph at weston.cloud>
|
|
||||||
* Add admin API for querying HS version
|
|
||||||
|
|
||||||
Benjamin Saunders <ben.e.saunders at gmail dot com>
|
|
||||||
* Documentation improvements
|
|
||||||
|
|
||||||
Werner Sembach <werner.sembach at fau dot de>
|
|
||||||
* Automatically remove a group/community when it is empty
|
|
||||||
3245
CHANGES.md
3245
CHANGES.md
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
|||||||
# Welcome to Synapse
|
|
||||||
|
|
||||||
Please see the [contributors' guide](https://element-hq.github.io/synapse/latest/development/contributing_guide.html) in our rendered documentation.
|
|
||||||
169
CONTRIBUTING.rst
Normal file
169
CONTRIBUTING.rst
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
Contributing code to Matrix
|
||||||
|
===========================
|
||||||
|
|
||||||
|
Everyone is welcome to contribute code to Matrix
|
||||||
|
(https://github.com/matrix-org), provided that they are willing to license
|
||||||
|
their contributions under the same license as the project itself. We follow a
|
||||||
|
simple 'inbound=outbound' model for contributions: the act of submitting an
|
||||||
|
'inbound' contribution means that the contributor agrees to license the code
|
||||||
|
under the same terms as the project's overall 'outbound' license - in our
|
||||||
|
case, this is almost always Apache Software License v2 (see LICENSE).
|
||||||
|
|
||||||
|
How to contribute
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The preferred and easiest way to contribute changes to Matrix is to fork the
|
||||||
|
relevant project on github, and then create a pull request to ask us to pull
|
||||||
|
your changes into our repo
|
||||||
|
(https://help.github.com/articles/using-pull-requests/)
|
||||||
|
|
||||||
|
**The single biggest thing you need to know is: please base your changes on
|
||||||
|
the develop branch - /not/ master.**
|
||||||
|
|
||||||
|
We use the master branch to track the most recent release, so that folks who
|
||||||
|
blindly clone the repo and automatically check out master get something that
|
||||||
|
works. Develop is the unstable branch where all the development actually
|
||||||
|
happens: the workflow is that contributors should fork the develop branch to
|
||||||
|
make a 'feature' branch for a particular contribution, and then make a pull
|
||||||
|
request to merge this back into the matrix.org 'official' develop branch. We
|
||||||
|
use github's pull request workflow to review the contribution, and either ask
|
||||||
|
you to make any refinements needed or merge it and make them ourselves. The
|
||||||
|
changes will then land on master when we next do a release.
|
||||||
|
|
||||||
|
We use `CircleCI <https://circleci.com/gh/matrix-org>`_ and `Travis CI
|
||||||
|
<https://travis-ci.org/matrix-org/synapse>`_ for continuous integration. All
|
||||||
|
pull requests to synapse get automatically tested by Travis and CircleCI.
|
||||||
|
If your change breaks the build, this will be shown in GitHub, so please
|
||||||
|
keep an eye on the pull request for feedback.
|
||||||
|
|
||||||
|
To run unit tests in a local development environment, you can use:
|
||||||
|
|
||||||
|
- ``tox -e py27`` (requires tox to be installed by ``pip install tox``) for
|
||||||
|
SQLite-backed Synapse on Python 2.7.
|
||||||
|
- ``tox -e py35`` for SQLite-backed Synapse on Python 3.5.
|
||||||
|
- ``tox -e py36`` for SQLite-backed Synapse on Python 3.6.
|
||||||
|
- ``tox -e py27-postgres`` for PostgreSQL-backed Synapse on Python 2.7
|
||||||
|
(requires a running local PostgreSQL with access to create databases).
|
||||||
|
- ``./test_postgresql.sh`` for PostgreSQL-backed Synapse on Python 2.7
|
||||||
|
(requires Docker). Entirely self-contained, recommended if you don't want to
|
||||||
|
set up PostgreSQL yourself.
|
||||||
|
|
||||||
|
Docker images are available for running the integration tests (SyTest) locally,
|
||||||
|
see the `documentation in the SyTest repo
|
||||||
|
<https://github.com/matrix-org/sytest/blob/develop/docker/README.md>`_ for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
Code style
|
||||||
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
All Matrix projects have a well-defined code-style - and sometimes we've even
|
||||||
|
got as far as documenting it... For instance, synapse's code style doc lives
|
||||||
|
at https://github.com/matrix-org/synapse/tree/master/docs/code_style.rst.
|
||||||
|
|
||||||
|
Please ensure your changes match the cosmetic style of the existing project,
|
||||||
|
and **never** mix cosmetic and functional changes in the same commit, as it
|
||||||
|
makes it horribly hard to review otherwise.
|
||||||
|
|
||||||
|
Changelog
|
||||||
|
~~~~~~~~~
|
||||||
|
|
||||||
|
All changes, even minor ones, need a corresponding changelog / newsfragment
|
||||||
|
entry. These are managed by Towncrier
|
||||||
|
(https://github.com/hawkowl/towncrier).
|
||||||
|
|
||||||
|
To create a changelog entry, make a new file in the ``changelog.d``
|
||||||
|
file named in the format of ``PRnumber.type``. The type can be
|
||||||
|
one of ``feature``, ``bugfix``, ``removal`` (also used for
|
||||||
|
deprecations), or ``misc`` (for internal-only changes). The content of
|
||||||
|
the file is your changelog entry, which can contain Markdown
|
||||||
|
formatting. Adding credits to the changelog is encouraged, we value
|
||||||
|
your contributions and would like to have you shouted out in the
|
||||||
|
release notes!
|
||||||
|
|
||||||
|
For example, a fix in PR #1234 would have its changelog entry in
|
||||||
|
``changelog.d/1234.bugfix``, and contain content like "The security levels of
|
||||||
|
Florbs are now validated when recieved over federation. Contributed by Jane
|
||||||
|
Matrix".
|
||||||
|
|
||||||
|
Attribution
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
Everyone who contributes anything to Matrix is welcome to be listed in the
|
||||||
|
AUTHORS.rst file for the project in question. Please feel free to include a
|
||||||
|
change to AUTHORS.rst in your pull request to list yourself and a short
|
||||||
|
description of the area(s) you've worked on. Also, we sometimes have swag to
|
||||||
|
give away to contributors - if you feel that Matrix-branded apparel is missing
|
||||||
|
from your life, please mail us your shipping address to matrix at matrix.org and
|
||||||
|
we'll try to fix it :)
|
||||||
|
|
||||||
|
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
|
||||||
|
(https://github.com/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
|
||||||
|
the contribution or otherwise have the right to contribute it to Matrix::
|
||||||
|
|
||||||
|
Developer Certificate of Origin
|
||||||
|
Version 1.1
|
||||||
|
|
||||||
|
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
||||||
|
660 York Street, Suite 102,
|
||||||
|
San Francisco, CA 94110 USA
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this
|
||||||
|
license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Developer's Certificate of Origin 1.1
|
||||||
|
|
||||||
|
By making a contribution to this project, I certify that:
|
||||||
|
|
||||||
|
(a) The contribution was created in whole or in part by me and I
|
||||||
|
have the right to submit it under the open source license
|
||||||
|
indicated in the file; or
|
||||||
|
|
||||||
|
(b) The contribution is based upon previous work that, to the best
|
||||||
|
of my knowledge, is covered under an appropriate open source
|
||||||
|
license and I have the right under that license to submit that
|
||||||
|
work with modifications, whether created in whole or in part
|
||||||
|
by me, under the same open source license (unless I am
|
||||||
|
permitted to submit under a different license), as indicated
|
||||||
|
in the file; or
|
||||||
|
|
||||||
|
(c) The contribution was provided directly to me by some other
|
||||||
|
person who certified (a), (b) or (c) and I have not modified
|
||||||
|
it.
|
||||||
|
|
||||||
|
(d) I understand and agree that this project and the contribution
|
||||||
|
are public and that a record of the contribution (including all
|
||||||
|
personal information I submit with it, including my sign-off) is
|
||||||
|
maintained indefinitely and may be redistributed consistent with
|
||||||
|
this project or the open source license(s) involved.
|
||||||
|
|
||||||
|
If you agree to this for your contribution, then all that's needed is to
|
||||||
|
include the line in your commit or pull request comment::
|
||||||
|
|
||||||
|
Signed-off-by: Your Name <your@email.example.org>
|
||||||
|
|
||||||
|
We accept contributions under a legally identifiable name, such as
|
||||||
|
your name on government documentation or common-law names (names
|
||||||
|
claimed by legitimate usage or repute). Unfortunately, we cannot
|
||||||
|
accept anonymous contributions at this time.
|
||||||
|
|
||||||
|
Git allows you to add this signoff automatically when using the ``-s``
|
||||||
|
flag to ``git commit``, which uses the name and email set in your
|
||||||
|
``user.name`` and ``user.email`` git configs.
|
||||||
|
|
||||||
|
Conclusion
|
||||||
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
That's it! Matrix is a very open and collaborative project as you might expect
|
||||||
|
given our obsession with open communication. If we're going to successfully
|
||||||
|
matrix together all the fragmented communication technologies out there we are
|
||||||
|
reliant on contributions and collaboration from the community to do so. So
|
||||||
|
please get involved - and we hope you have as much fun hacking on Matrix as we
|
||||||
|
do!
|
||||||
1923
Cargo.lock
generated
1923
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
|||||||
# We make the whole Synapse folder a workspace so that we can run `cargo`
|
|
||||||
# commands from the root (rather than having to cd into rust/).
|
|
||||||
|
|
||||||
[workspace]
|
|
||||||
members = ["rust"]
|
|
||||||
resolver = "2"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# Installation Instructions
|
|
||||||
|
|
||||||
This document has moved to the
|
|
||||||
[Synapse documentation website](https://element-hq.github.io/synapse/latest/setup/installation.html).
|
|
||||||
Please update your links.
|
|
||||||
|
|
||||||
The markdown source is available in [docs/setup/installation.md](docs/setup/installation.md).
|
|
||||||
177
LICENSE
Normal file
177
LICENSE
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
661
LICENSE-AGPL-3.0
661
LICENSE-AGPL-3.0
@@ -1,661 +0,0 @@
|
|||||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 19 November 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU Affero General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works, specifically designed to ensure
|
|
||||||
cooperation with the community in the case of network server software.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
our General Public Licenses are intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
Developers that use our General Public Licenses protect your rights
|
|
||||||
with two steps: (1) assert copyright on the software, and (2) offer
|
|
||||||
you this License which gives you legal permission to copy, distribute
|
|
||||||
and/or modify the software.
|
|
||||||
|
|
||||||
A secondary benefit of defending all users' freedom is that
|
|
||||||
improvements made in alternate versions of the program, if they
|
|
||||||
receive widespread use, become available for other developers to
|
|
||||||
incorporate. Many developers of free software are heartened and
|
|
||||||
encouraged by the resulting cooperation. However, in the case of
|
|
||||||
software used on network servers, this result may fail to come about.
|
|
||||||
The GNU General Public License permits making a modified version and
|
|
||||||
letting the public access it on a server without ever releasing its
|
|
||||||
source code to the public.
|
|
||||||
|
|
||||||
The GNU Affero General Public License is designed specifically to
|
|
||||||
ensure that, in such cases, the modified source code becomes available
|
|
||||||
to the community. It requires the operator of a network server to
|
|
||||||
provide the source code of the modified version running there to the
|
|
||||||
users of that server. Therefore, public use of a modified version, on
|
|
||||||
a publicly accessible server, gives the public access to the source
|
|
||||||
code of the modified version.
|
|
||||||
|
|
||||||
An older license, called the Affero General Public License and
|
|
||||||
published by Affero, was designed to accomplish similar goals. This is
|
|
||||||
a different license, not a version of the Affero GPL, but Affero has
|
|
||||||
released a new version of the Affero GPL which permits relicensing under
|
|
||||||
this license.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, if you modify the
|
|
||||||
Program, your modified version must prominently offer all users
|
|
||||||
interacting with it remotely through a computer network (if your version
|
|
||||||
supports such interaction) an opportunity to receive the Corresponding
|
|
||||||
Source of your version by providing access to the Corresponding Source
|
|
||||||
from a network server at no charge, through some standard or customary
|
|
||||||
means of facilitating copying of software. This Corresponding Source
|
|
||||||
shall include the Corresponding Source for any work covered by version 3
|
|
||||||
of the GNU General Public License that is incorporated pursuant to the
|
|
||||||
following paragraph.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the work with which it is combined will remain governed by version
|
|
||||||
3 of the GNU General Public License.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU Affero General Public License from time to time. Such new versions
|
|
||||||
will be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU Affero General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU Affero General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU Affero General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If your software can interact with users remotely through a computer
|
|
||||||
network, you should also make sure that it provides a way for users to
|
|
||||||
get its source. For example, if your program is a web application, its
|
|
||||||
interface could display a "Source" link that leads users to an archive
|
|
||||||
of the code. There are many ways you could offer source, and different
|
|
||||||
solutions will be better for different programs; see section 13 for the
|
|
||||||
specific requirements.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
Licensees holding a valid commercial license with Element may use this
|
|
||||||
software in accordance with the terms contained in a written agreement
|
|
||||||
between you and Element.
|
|
||||||
|
|
||||||
To purchase a commercial license please contact our sales team at
|
|
||||||
licensing@element.io
|
|
||||||
40
MANIFEST.in
Normal file
40
MANIFEST.in
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
include synctl
|
||||||
|
include LICENSE
|
||||||
|
include VERSION
|
||||||
|
include *.rst
|
||||||
|
include *.md
|
||||||
|
include demo/README
|
||||||
|
include demo/demo.tls.dh
|
||||||
|
include demo/*.py
|
||||||
|
include demo/*.sh
|
||||||
|
|
||||||
|
recursive-include synapse/storage/schema *.sql
|
||||||
|
recursive-include synapse/storage/schema *.py
|
||||||
|
|
||||||
|
recursive-include docs *
|
||||||
|
recursive-include res *
|
||||||
|
recursive-include scripts *
|
||||||
|
recursive-include scripts-dev *
|
||||||
|
recursive-include synapse *.pyi
|
||||||
|
recursive-include tests *.py
|
||||||
|
|
||||||
|
recursive-include synapse/static *.css
|
||||||
|
recursive-include synapse/static *.gif
|
||||||
|
recursive-include synapse/static *.html
|
||||||
|
recursive-include synapse/static *.js
|
||||||
|
|
||||||
|
exclude jenkins.sh
|
||||||
|
exclude jenkins*.sh
|
||||||
|
exclude jenkins*
|
||||||
|
exclude Dockerfile
|
||||||
|
exclude .dockerignore
|
||||||
|
exclude test_postgresql.sh
|
||||||
|
recursive-exclude jenkins *.sh
|
||||||
|
|
||||||
|
include pyproject.toml
|
||||||
|
recursive-include changelog.d *
|
||||||
|
|
||||||
|
prune .github
|
||||||
|
prune demo/etc
|
||||||
|
prune docker
|
||||||
|
prune .circleci
|
||||||
35
MAP.rst
Normal file
35
MAP.rst
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
Directory Structure
|
||||||
|
===================
|
||||||
|
|
||||||
|
Warning: this may be a bit stale...
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
.
|
||||||
|
├── cmdclient Basic CLI python Matrix client
|
||||||
|
├── demo Scripts for running standalone Matrix demos
|
||||||
|
├── docs All doc, including the draft Matrix API spec
|
||||||
|
│ ├── client-server The client-server Matrix API spec
|
||||||
|
│ ├── model Domain-specific elements of the Matrix API spec
|
||||||
|
│ ├── server-server The server-server model of the Matrix API spec
|
||||||
|
│ └── sphinx The internal API doc of the Synapse homeserver
|
||||||
|
├── experiments Early experiments of using Synapse's internal APIs
|
||||||
|
├── graph Visualisation of Matrix's distributed message store
|
||||||
|
├── synapse The reference Matrix homeserver implementation
|
||||||
|
│ ├── api Common building blocks for the APIs
|
||||||
|
│ │ ├── events Definition of state representation Events
|
||||||
|
│ │ └── streams Definition of streamable Event objects
|
||||||
|
│ ├── app The __main__ entry point for the homeserver
|
||||||
|
│ ├── crypto The PKI client/server used for secure federation
|
||||||
|
│ │ └── resource PKI helper objects (e.g. keys)
|
||||||
|
│ ├── federation Server-server state replication logic
|
||||||
|
│ ├── handlers The main business logic of the homeserver
|
||||||
|
│ ├── http Wrappers around Twisted's HTTP server & client
|
||||||
|
│ ├── rest Servlet-style RESTful API
|
||||||
|
│ ├── storage Persistence subsystem (currently only sqlite3)
|
||||||
|
│ │ └── schema sqlite persistence schema
|
||||||
|
│ └── util Synapse-specific utilities
|
||||||
|
├── tests Unit tests for the Synapse homeserver
|
||||||
|
└── webclient Basic AngularJS Matrix web client
|
||||||
|
|
||||||
|
|
||||||
1022
README.rst
1022
README.rst
File diff suppressed because it is too large
Load Diff
305
UPGRADE.rst
305
UPGRADE.rst
@@ -1,7 +1,306 @@
|
|||||||
Upgrading Synapse
|
Upgrading Synapse
|
||||||
=================
|
=================
|
||||||
|
|
||||||
This document has moved to the `Synapse documentation website <https://element-hq.github.io/synapse/latest/upgrade>`_.
|
Before upgrading check if any special steps are required to upgrade from the
|
||||||
Please update your links.
|
what you currently have installed to current version of synapse. The extra
|
||||||
|
instructions that may be required are listed later in this document.
|
||||||
|
|
||||||
The markdown source is available in `docs/upgrade.md <docs/upgrade.md>`_.
|
1. If synapse was installed in a virtualenv then active that virtualenv before
|
||||||
|
upgrading. If synapse is installed in a virtualenv in ``~/.synapse/`` then
|
||||||
|
run:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
source ~/.synapse/bin/activate
|
||||||
|
|
||||||
|
2. If synapse was installed using pip then upgrade to the latest version by
|
||||||
|
running:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
pip install --upgrade --process-dependency-links https://github.com/matrix-org/synapse/tarball/master
|
||||||
|
|
||||||
|
# restart synapse
|
||||||
|
synctl restart
|
||||||
|
|
||||||
|
|
||||||
|
If synapse was installed using git then upgrade to the latest version by
|
||||||
|
running:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
# Pull the latest version of the master branch.
|
||||||
|
git pull
|
||||||
|
# Update the versions of synapse's python dependencies.
|
||||||
|
python synapse/python_dependencies.py | xargs pip install --upgrade
|
||||||
|
|
||||||
|
# restart synapse
|
||||||
|
./synctl restart
|
||||||
|
|
||||||
|
|
||||||
|
To check whether your update was sucessful, you can check the Server header
|
||||||
|
returned by the Client-Server API:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
# replace <host.name> with the hostname of your synapse homeserver.
|
||||||
|
# You may need to specify a port (eg, :8448) if your server is not
|
||||||
|
# configured on port 443.
|
||||||
|
curl -kv https://<host.name>/_matrix/client/versions 2>&1 | grep "Server:"
|
||||||
|
|
||||||
|
Upgrading to $NEXT_VERSION
|
||||||
|
====================
|
||||||
|
|
||||||
|
This release expands the anonymous usage stats sent if the opt-in
|
||||||
|
``report_stats`` configuration is set to ``true``. We now capture RSS memory
|
||||||
|
and cpu use at a very coarse level. This requires administrators to install
|
||||||
|
the optional ``psutil`` python module.
|
||||||
|
|
||||||
|
We would appreciate it if you could assist by ensuring this module is available
|
||||||
|
and ``report_stats`` is enabled. This will let us see if performance changes to
|
||||||
|
synapse are having an impact to the general community.
|
||||||
|
|
||||||
|
Upgrading to v0.15.0
|
||||||
|
====================
|
||||||
|
|
||||||
|
If you want to use the new URL previewing API (/_matrix/media/r0/preview_url)
|
||||||
|
then you have to explicitly enable it in the config and update your dependencies
|
||||||
|
dependencies. See README.rst for details.
|
||||||
|
|
||||||
|
|
||||||
|
Upgrading to v0.11.0
|
||||||
|
====================
|
||||||
|
|
||||||
|
This release includes the option to send anonymous usage stats to matrix.org,
|
||||||
|
and requires that administrators explictly opt in or out by setting the
|
||||||
|
``report_stats`` option to either ``true`` or ``false``.
|
||||||
|
|
||||||
|
We would really appreciate it if you could help our project out by reporting
|
||||||
|
anonymized usage statistics from your homeserver. Only very basic aggregate
|
||||||
|
data (e.g. number of users) will be reported, but it helps us to track the
|
||||||
|
growth of the Matrix community, and helps us to make Matrix a success, as well
|
||||||
|
as to convince other networks that they should peer with us.
|
||||||
|
|
||||||
|
|
||||||
|
Upgrading to v0.9.0
|
||||||
|
===================
|
||||||
|
|
||||||
|
Application services have had a breaking API change in this version.
|
||||||
|
|
||||||
|
They can no longer register themselves with a home server using the AS HTTP API. This
|
||||||
|
decision was made because a compromised application service with free reign to register
|
||||||
|
any regex in effect grants full read/write access to the home server if a regex of ``.*``
|
||||||
|
is used. An attack where a compromised AS re-registers itself with ``.*`` was deemed too
|
||||||
|
big of a security risk to ignore, and so the ability to register with the HS remotely has
|
||||||
|
been removed.
|
||||||
|
|
||||||
|
It has been replaced by specifying a list of application service registrations in
|
||||||
|
``homeserver.yaml``::
|
||||||
|
|
||||||
|
app_service_config_files: ["registration-01.yaml", "registration-02.yaml"]
|
||||||
|
|
||||||
|
Where ``registration-01.yaml`` looks like::
|
||||||
|
|
||||||
|
url: <String> # e.g. "https://my.application.service.com"
|
||||||
|
as_token: <String>
|
||||||
|
hs_token: <String>
|
||||||
|
sender_localpart: <String> # This is a new field which denotes the user_id localpart when using the AS token
|
||||||
|
namespaces:
|
||||||
|
users:
|
||||||
|
- exclusive: <Boolean>
|
||||||
|
regex: <String> # e.g. "@prefix_.*"
|
||||||
|
aliases:
|
||||||
|
- exclusive: <Boolean>
|
||||||
|
regex: <String>
|
||||||
|
rooms:
|
||||||
|
- exclusive: <Boolean>
|
||||||
|
regex: <String>
|
||||||
|
|
||||||
|
Upgrading to v0.8.0
|
||||||
|
===================
|
||||||
|
|
||||||
|
Servers which use captchas will need to add their public key to::
|
||||||
|
|
||||||
|
static/client/register/register_config.js
|
||||||
|
|
||||||
|
window.matrixRegistrationConfig = {
|
||||||
|
recaptcha_public_key: "YOUR_PUBLIC_KEY"
|
||||||
|
};
|
||||||
|
|
||||||
|
This is required in order to support registration fallback (typically used on
|
||||||
|
mobile devices).
|
||||||
|
|
||||||
|
|
||||||
|
Upgrading to v0.7.0
|
||||||
|
===================
|
||||||
|
|
||||||
|
New dependencies are:
|
||||||
|
|
||||||
|
- pydenticon
|
||||||
|
- simplejson
|
||||||
|
- syutil
|
||||||
|
- matrix-angular-sdk
|
||||||
|
|
||||||
|
To pull in these dependencies in a virtual env, run::
|
||||||
|
|
||||||
|
python synapse/python_dependencies.py | xargs -n 1 pip install
|
||||||
|
|
||||||
|
Upgrading to v0.6.0
|
||||||
|
===================
|
||||||
|
|
||||||
|
To pull in new dependencies, run::
|
||||||
|
|
||||||
|
python setup.py develop --user
|
||||||
|
|
||||||
|
This update includes a change to the database schema. To upgrade you first need
|
||||||
|
to upgrade the database by running::
|
||||||
|
|
||||||
|
python scripts/upgrade_db_to_v0.6.0.py <db> <server_name> <signing_key>
|
||||||
|
|
||||||
|
Where `<db>` is the location of the database, `<server_name>` is the
|
||||||
|
server name as specified in the synapse configuration, and `<signing_key>` is
|
||||||
|
the location of the signing key as specified in the synapse configuration.
|
||||||
|
|
||||||
|
This may take some time to complete. Failures of signatures and content hashes
|
||||||
|
can safely be ignored.
|
||||||
|
|
||||||
|
|
||||||
|
Upgrading to v0.5.1
|
||||||
|
===================
|
||||||
|
|
||||||
|
Depending on precisely when you installed v0.5.0 you may have ended up with
|
||||||
|
a stale release of the reference matrix webclient installed as a python module.
|
||||||
|
To uninstall it and ensure you are depending on the latest module, please run::
|
||||||
|
|
||||||
|
$ pip uninstall syweb
|
||||||
|
|
||||||
|
Upgrading to v0.5.0
|
||||||
|
===================
|
||||||
|
|
||||||
|
The webclient has been split out into a seperate repository/pacakage in this
|
||||||
|
release. Before you restart your homeserver you will need to pull in the
|
||||||
|
webclient package by running::
|
||||||
|
|
||||||
|
python setup.py develop --user
|
||||||
|
|
||||||
|
This release completely changes the database schema and so requires upgrading
|
||||||
|
it before starting the new version of the homeserver.
|
||||||
|
|
||||||
|
The script "database-prepare-for-0.5.0.sh" should be used to upgrade the
|
||||||
|
database. This will save all user information, such as logins and profiles,
|
||||||
|
but will otherwise purge the database. This includes messages, which
|
||||||
|
rooms the home server was a member of and room alias mappings.
|
||||||
|
|
||||||
|
If you would like to keep your history, please take a copy of your database
|
||||||
|
file and ask for help in #matrix:matrix.org. The upgrade process is,
|
||||||
|
unfortunately, non trivial and requires human intervention to resolve any
|
||||||
|
resulting conflicts during the upgrade process.
|
||||||
|
|
||||||
|
Before running the command the homeserver should be first completely
|
||||||
|
shutdown. To run it, simply specify the location of the database, e.g.:
|
||||||
|
|
||||||
|
./scripts/database-prepare-for-0.5.0.sh "homeserver.db"
|
||||||
|
|
||||||
|
Once this has successfully completed it will be safe to restart the
|
||||||
|
homeserver. You may notice that the homeserver takes a few seconds longer to
|
||||||
|
restart than usual as it reinitializes the database.
|
||||||
|
|
||||||
|
On startup of the new version, users can either rejoin remote rooms using room
|
||||||
|
aliases or by being reinvited. Alternatively, if any other homeserver sends a
|
||||||
|
message to a room that the homeserver was previously in the local HS will
|
||||||
|
automatically rejoin the room.
|
||||||
|
|
||||||
|
Upgrading to v0.4.0
|
||||||
|
===================
|
||||||
|
|
||||||
|
This release needs an updated syutil version. Run::
|
||||||
|
|
||||||
|
python setup.py develop
|
||||||
|
|
||||||
|
You will also need to upgrade your configuration as the signing key format has
|
||||||
|
changed. Run::
|
||||||
|
|
||||||
|
python -m synapse.app.homeserver --config-path <CONFIG> --generate-config
|
||||||
|
|
||||||
|
|
||||||
|
Upgrading to v0.3.0
|
||||||
|
===================
|
||||||
|
|
||||||
|
This registration API now closely matches the login API. This introduces a bit
|
||||||
|
more backwards and forwards between the HS and the client, but this improves
|
||||||
|
the overall flexibility of the API. You can now GET on /register to retrieve a list
|
||||||
|
of valid registration flows. Upon choosing one, they are submitted in the same
|
||||||
|
way as login, e.g::
|
||||||
|
|
||||||
|
{
|
||||||
|
type: m.login.password,
|
||||||
|
user: foo,
|
||||||
|
password: bar
|
||||||
|
}
|
||||||
|
|
||||||
|
The default HS supports 2 flows, with and without Identity Server email
|
||||||
|
authentication. Enabling captcha on the HS will add in an extra step to all
|
||||||
|
flows: ``m.login.recaptcha`` which must be completed before you can transition
|
||||||
|
to the next stage. There is a new login type: ``m.login.email.identity`` which
|
||||||
|
contains the ``threepidCreds`` key which were previously sent in the original
|
||||||
|
register request. For more information on this, see the specification.
|
||||||
|
|
||||||
|
Web Client
|
||||||
|
----------
|
||||||
|
|
||||||
|
The VoIP specification has changed between v0.2.0 and v0.3.0. Users should
|
||||||
|
refresh any browser tabs to get the latest web client code. Users on
|
||||||
|
v0.2.0 of the web client will not be able to call those on v0.3.0 and
|
||||||
|
vice versa.
|
||||||
|
|
||||||
|
|
||||||
|
Upgrading to v0.2.0
|
||||||
|
===================
|
||||||
|
|
||||||
|
The home server now requires setting up of SSL config before it can run. To
|
||||||
|
automatically generate default config use::
|
||||||
|
|
||||||
|
$ python synapse/app/homeserver.py \
|
||||||
|
--server-name machine.my.domain.name \
|
||||||
|
--bind-port 8448 \
|
||||||
|
--config-path homeserver.config \
|
||||||
|
--generate-config
|
||||||
|
|
||||||
|
This config can be edited if desired, for example to specify a different SSL
|
||||||
|
certificate to use. Once done you can run the home server using::
|
||||||
|
|
||||||
|
$ python synapse/app/homeserver.py --config-path homeserver.config
|
||||||
|
|
||||||
|
See the README.rst for more information.
|
||||||
|
|
||||||
|
Also note that some config options have been renamed, including:
|
||||||
|
|
||||||
|
- "host" to "server-name"
|
||||||
|
- "database" to "database-path"
|
||||||
|
- "port" to "bind-port" and "unsecure-port"
|
||||||
|
|
||||||
|
|
||||||
|
Upgrading to v0.0.1
|
||||||
|
===================
|
||||||
|
|
||||||
|
This release completely changes the database schema and so requires upgrading
|
||||||
|
it before starting the new version of the homeserver.
|
||||||
|
|
||||||
|
The script "database-prepare-for-0.0.1.sh" should be used to upgrade the
|
||||||
|
database. This will save all user information, such as logins and profiles,
|
||||||
|
but will otherwise purge the database. This includes messages, which
|
||||||
|
rooms the home server was a member of and room alias mappings.
|
||||||
|
|
||||||
|
Before running the command the homeserver should be first completely
|
||||||
|
shutdown. To run it, simply specify the location of the database, e.g.:
|
||||||
|
|
||||||
|
./scripts/database-prepare-for-0.0.1.sh "homeserver.db"
|
||||||
|
|
||||||
|
Once this has successfully completed it will be safe to restart the
|
||||||
|
homeserver. You may notice that the homeserver takes a few seconds longer to
|
||||||
|
restart than usual as it reinitializes the database.
|
||||||
|
|
||||||
|
On startup of the new version, users can either rejoin remote rooms using room
|
||||||
|
aliases or by being reinvited. Alternatively, if any other homeserver sends a
|
||||||
|
message to a room that the homeserver was previously in the local HS will
|
||||||
|
automatically rejoin the room.
|
||||||
|
|||||||
47
book.toml
47
book.toml
@@ -1,47 +0,0 @@
|
|||||||
# Documentation for possible options in this file is at
|
|
||||||
# https://rust-lang.github.io/mdBook/format/config.html
|
|
||||||
[book]
|
|
||||||
title = "Synapse"
|
|
||||||
authors = ["The Matrix.org Foundation C.I.C."]
|
|
||||||
language = "en"
|
|
||||||
multilingual = false
|
|
||||||
|
|
||||||
# The directory that documentation files are stored in
|
|
||||||
src = "docs"
|
|
||||||
|
|
||||||
[build]
|
|
||||||
# Prevent markdown pages from being automatically generated when they're
|
|
||||||
# linked to in SUMMARY.md
|
|
||||||
create-missing = false
|
|
||||||
|
|
||||||
[output.html]
|
|
||||||
# The URL visitors will be directed to when they try to edit a page
|
|
||||||
edit-url-template = "https://github.com/element-hq/synapse/edit/develop/{path}"
|
|
||||||
|
|
||||||
# Remove the numbers that appear before each item in the sidebar, as they can
|
|
||||||
# get quite messy as we nest deeper
|
|
||||||
no-section-label = true
|
|
||||||
|
|
||||||
# The source code URL of the repository
|
|
||||||
git-repository-url = "https://github.com/element-hq/synapse"
|
|
||||||
|
|
||||||
# The path that the docs are hosted on
|
|
||||||
site-url = "/synapse/"
|
|
||||||
|
|
||||||
# Additional HTML, JS, CSS that's injected into each page of the book.
|
|
||||||
# More information available in docs/website_files/README.md
|
|
||||||
additional-css = [
|
|
||||||
"docs/website_files/table-of-contents.css",
|
|
||||||
"docs/website_files/remove-nav-buttons.css",
|
|
||||||
"docs/website_files/indent-section-headers.css",
|
|
||||||
"docs/website_files/version-picker.css",
|
|
||||||
]
|
|
||||||
additional-js = [
|
|
||||||
"docs/website_files/table-of-contents.js",
|
|
||||||
"docs/website_files/version-picker.js",
|
|
||||||
"docs/website_files/version.js",
|
|
||||||
]
|
|
||||||
theme = "docs/website_files/theme"
|
|
||||||
|
|
||||||
[preprocessor.schema_versions]
|
|
||||||
command = "./scripts-dev/schema_versions.py"
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
# A build script for poetry that adds the rust extension.
|
|
||||||
|
|
||||||
import itertools
|
|
||||||
import os
|
|
||||||
from typing import Any
|
|
||||||
|
|
||||||
from packaging.specifiers import SpecifierSet
|
|
||||||
from setuptools_rust import Binding, RustExtension
|
|
||||||
|
|
||||||
|
|
||||||
def build(setup_kwargs: dict[str, Any]) -> None:
|
|
||||||
original_project_dir = os.path.dirname(os.path.realpath(__file__))
|
|
||||||
cargo_toml_path = os.path.join(original_project_dir, "rust", "Cargo.toml")
|
|
||||||
|
|
||||||
extension = RustExtension(
|
|
||||||
target="synapse.synapse_rust",
|
|
||||||
path=cargo_toml_path,
|
|
||||||
binding=Binding.PyO3,
|
|
||||||
# This flag is a no-op in the latest versions. Instead, we need to
|
|
||||||
# specify this in the `bdist_wheel` config below.
|
|
||||||
py_limited_api=True,
|
|
||||||
# We always build in release mode, as we can't distinguish
|
|
||||||
# between using `poetry` in development vs production.
|
|
||||||
debug=False,
|
|
||||||
)
|
|
||||||
setup_kwargs.setdefault("rust_extensions", []).append(extension)
|
|
||||||
setup_kwargs["zip_safe"] = False
|
|
||||||
|
|
||||||
# We look up the minimum supported Python version with
|
|
||||||
# `python_requires` (e.g. ">=3.10.0,<4.0.0") and finding the first Python
|
|
||||||
# version that matches. We then convert that into the `py_limited_api` form,
|
|
||||||
# e.g. cp310 for Python 3.10.
|
|
||||||
py_limited_api: str
|
|
||||||
python_bounds = SpecifierSet(setup_kwargs["python_requires"])
|
|
||||||
for minor_version in itertools.count(start=10):
|
|
||||||
if f"3.{minor_version}.0" in python_bounds:
|
|
||||||
py_limited_api = f"cp3{minor_version}"
|
|
||||||
break
|
|
||||||
|
|
||||||
setup_kwargs.setdefault("options", {}).setdefault("bdist_wheel", {})[
|
|
||||||
"py_limited_api"
|
|
||||||
] = py_limited_api
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Group together dependabot update PRs to reduce the review load.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix `HomeServer.shutdown()` failing if the homeserver hasn't been setup yet.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix sliding sync performance slow down for long lived connections.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Respond with useful error codes with `Content-Length` header/s are invalid.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix a bug where Mastodon posts (and possibly other embeds) have the wrong description for URL previews.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix `HomeServer.shutdown()` failing if the homeserver failed to `start`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Switch the build backend from `poetry-core` to `maturin`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Raise the limit for concurrently-open non-security @dependabot PRs from 5 to 10.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Remove the "Updates to locked dependencies" section from the changelog due to lack of use and the maintenance burden.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Require 14 days to pass before pulling in general dependency updates to help mitigate upstream supply chain attacks.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add `memberships` endpoint to the admin API. This is useful for forensics and T&S purpose.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Drop the broken netlify documentation workflow until a new one is implemented.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix bug where `Duration` was logged incorrectly.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Add an admin API for retrieving a paginated list of quarantined media.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Document the importance of `public_baseurl` when configuring OpenID Connect authentication.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fix bug introduced in 1.143.0 that broke support for versions of `zope-interface` older than 6.2.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Server admins can bypass the quarantine media check when downloading media by setting the `admin_unsafely_bypass_quarantine` query parameter to `true` on Client-Server API media download requests.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Don't include debug logs in `Clock` unless explicitly enabled.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Implemented pagination for the [MSC2666](https://github.com/matrix-org/matrix-spec-proposals/pull/2666) mutual rooms endpoint. Contributed by @tulir @ Beeper.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Admin API: add worker support to `GET /_synapse/admin/v2/users/<user_id>`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Use `uv` to test olddeps to ensure all transitive dependencies use minimum versions.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Log the original bind exception when encountering `Failed to listen on 0.0.0.0, continuing because listening on [::]`.
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Improve proxy support for the `federation_client.py` dev script. Contributed by Denis Kasak (@dkasak).
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Unpin the version of Rust we use to build Synapse wheels (was 1.82.0) now that MacOS support has been dropped.
|
|
||||||
1
changelog.d/3578.bugfix
Normal file
1
changelog.d/3578.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix problem when playing media from Chrome using direct URL (thanks @remjey!)
|
||||||
2
changelog.d/3699.misc
Normal file
2
changelog.d/3699.misc
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Unit tests can now be run under PostgreSQL in Docker using
|
||||||
|
``test_postgresql.sh``.
|
||||||
1
changelog.d/3794.misc
Normal file
1
changelog.d/3794.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Speed up calculation of typing updates for replication
|
||||||
1
changelog.d/3836.bugfix
Normal file
1
changelog.d/3836.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
support registering regular users non-interactively with register_new_matrix_user script
|
||||||
1
changelog.d/3868.bugfix
Normal file
1
changelog.d/3868.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix broken invite email links for self hosted riots
|
||||||
2
changelog.d/3873.misc
Normal file
2
changelog.d/3873.misc
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Remove documentation regarding installation on Cygwin, the use of WSL is
|
||||||
|
recommended instead.
|
||||||
1
changelog.d/3879.bugfix
Normal file
1
changelog.d/3879.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Don't ratelimit autojoins
|
||||||
1
changelog.d/3883.feature
Normal file
1
changelog.d/3883.feature
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Adding the ability to change MAX_UPLOAD_SIZE for the docker container variables.
|
||||||
1
changelog.d/3889.bugfix
Normal file
1
changelog.d/3889.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix 500 error when deleting unknown room alias
|
||||||
1
changelog.d/3892.bugfix
Normal file
1
changelog.d/3892.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix some b'abcd' noise in logs and metrics
|
||||||
1
changelog.d/3894.feature
Normal file
1
changelog.d/3894.feature
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Report "python_version" in the phone home stats
|
||||||
1
changelog.d/3895.bugfix
Normal file
1
changelog.d/3895.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix some b'abcd' noise in logs and metrics
|
||||||
1
changelog.d/3897.misc
Normal file
1
changelog.d/3897.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix typo in README, synaspse -> synapse
|
||||||
1
changelog.d/3899.bugfix
Normal file
1
changelog.d/3899.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
When we join a room, always try the server we used for the alias lookup first, to avoid unresponsive and out-of-date servers.
|
||||||
1
changelog.d/3903.misc
Normal file
1
changelog.d/3903.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Increase the timeout when filling missing events in federation requests
|
||||||
1
changelog.d/3904.misc
Normal file
1
changelog.d/3904.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Improve the logging when handling a federation transaction
|
||||||
1
changelog.d/3906.misc
Normal file
1
changelog.d/3906.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Improve logging of outbound federation requests
|
||||||
1
changelog.d/3907.bugfix
Normal file
1
changelog.d/3907.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix incorrect server-name indication for outgoing federation requests
|
||||||
1
changelog.d/3908.bugfix
Normal file
1
changelog.d/3908.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix adding client IPs to the database failing on Python 3.
|
||||||
1
changelog.d/3909.misc
Normal file
1
changelog.d/3909.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Improve logging of outbound federation requests
|
||||||
1
changelog.d/3910.bugfix
Normal file
1
changelog.d/3910.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix bug where things occaisonally were not being timed out correctly.
|
||||||
1
changelog.d/3911.misc
Normal file
1
changelog.d/3911.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix the docker image building on python 3
|
||||||
1
changelog.d/3912.misc
Normal file
1
changelog.d/3912.misc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Add a regression test for logging failed HTTP requests on Python 3.
|
||||||
1
changelog.d/3914.bugfix
Normal file
1
changelog.d/3914.bugfix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Fix bug where outbound federation would stop talking to some servers when using workers
|
||||||
1
changelog.d/3916.feature
Normal file
1
changelog.d/3916.feature
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Always LL ourselves if we're in a room
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user