Commit afa0c505 authored by Andrej Shadura's avatar Andrej Shadura

Merge remote-tracking branch 'matrix/debian' into debian/master

parents ffe56462 b02a1c6e
......@@ -5,3 +5,5 @@ demo/etc
tox.ini
.git/*
.tox/*
debian/matrix-synapse/
debian/matrix-synapse-*/
......@@ -18,7 +18,7 @@ homeserver*.db
homeserver*.log
homeserver*.log.*
homeserver*.pid
homeserver*.yaml
/homeserver*.yaml
*.signing.key
*.tls.crt
......@@ -26,6 +26,8 @@ homeserver*.yaml
*.tls.key
.coverage
.coverage.*
!.coverage.rc
htmlcov
demo/*/*.db
......@@ -57,3 +59,7 @@ env/
.vscode/
.ropeproject/
*.deb
/debs
Synapse 0.34.0rc2 (2018-12-11)
==============================
Features
--------
- Add a welcome page for the client API port. Credit to @krombel! ([\#4289](https://github.com/matrix-org/synapse/issues/4289))
- Remove Matrix console from the default distribution ([\#4290](https://github.com/matrix-org/synapse/issues/4290))
Internal Changes
----------------
- Disable pager when running git-show in CI ([\#4291](https://github.com/matrix-org/synapse/issues/4291))
Synapse 0.34.0 (2018-12-20)
===========================
Synapse 0.34.0 is the first release to fully support Python 3. Synapse will now
run on Python versions 3.5 or 3.6 (as well as 2.7). Support for Python 3.7
remains experimental.
Synapse 0.34.0rc1 (2018-12-04)
==============================
Synapse 0.34 is the first release to fully support Python 3. We recommend
upgrading to Python 3, but make sure to read the
[upgrade notes](UPGRADE.rst#upgrading-to-v0340) when doing so.
We recommend upgrading to Python 3, but make sure to read the [upgrade
notes](UPGRADE.rst#upgrading-to-v0340) when doing so.
Features
--------
- Add 'sandbox' to CSP for media reprository ([\#4284](https://github.com/matrix-org/synapse/issues/4284))
- Make the new landing page prettier. ([\#4294](https://github.com/matrix-org/synapse/issues/4294))
- Fix deleting E2E room keys when using old SQLite versions. ([\#4295](https://github.com/matrix-org/synapse/issues/4295))
- Add a welcome page for the client API port. Credit to @krombel! ([\#4289](https://github.com/matrix-org/synapse/issues/4289))
- Remove Matrix console from the default distribution ([\#4290](https://github.com/matrix-org/synapse/issues/4290))
- Add option to track MAU stats (but not limit people) ([\#3830](https://github.com/matrix-org/synapse/issues/3830))
- Add an option to enable recording IPs for appservice users ([\#3831](https://github.com/matrix-org/synapse/issues/3831))
- Rename login type m.login.cas to m.login.sso ([\#4220](https://github.com/matrix-org/synapse/issues/4220))
- Rename login type `m.login.cas` to `m.login.sso` ([\#4220](https://github.com/matrix-org/synapse/issues/4220))
- Add an option to disable search for homeservers that may not be interested in it. ([\#4230](https://github.com/matrix-org/synapse/issues/4230))
......@@ -49,15 +41,17 @@ Bugfixes
Internal Changes
----------------
- A coveragerc file, as well as the py36-coverage tox target, have been added. ([\#4180](https://github.com/matrix-org/synapse/issues/4180))
- Debian packages utilising a virtualenv with bundled dependencies can now be built. ([\#4212](https://github.com/matrix-org/synapse/issues/4212))
- Disable pager when running git-show in CI ([\#4291](https://github.com/matrix-org/synapse/issues/4291))
- A coveragerc file has been added. ([\#4180](https://github.com/matrix-org/synapse/issues/4180))
- Add a GitHub pull request template and add multiple issue templates ([\#4182](https://github.com/matrix-org/synapse/issues/4182))
- Update README to reflect the fact that #1491 is fixed ([\#4188](https://github.com/matrix-org/synapse/issues/4188))
- Update README to reflect the fact that [\#1491](https://github.com/matrix-org/synapse/issues/1491) is fixed ([\#4188](https://github.com/matrix-org/synapse/issues/4188))
- Run the AS senders as background processes to fix warnings ([\#4189](https://github.com/matrix-org/synapse/issues/4189))
- Add some diagnostics to the tests to detect logcontext problems ([\#4190](https://github.com/matrix-org/synapse/issues/4190))
- Add missing `jpeg` package prerequisite for OpenBSD in README. ([\#4193](https://github.com/matrix-org/synapse/issues/4193))
- Add a note saying you need to manually reclaim disk space after using the Purge History API ([\#4200](https://github.com/matrix-org/synapse/issues/4200))
- More logcontext checking in unittests ([\#4205](https://github.com/matrix-org/synapse/issues/4205))
- Ignore __pycache__ directories in the database schema folder ([\#4214](https://github.com/matrix-org/synapse/issues/4214))
- Ignore `__pycache__` directories in the database schema folder ([\#4214](https://github.com/matrix-org/synapse/issues/4214))
- Add note to UPGRADE.rst about removing riot.im from list of trusted identity servers ([\#4224](https://github.com/matrix-org/synapse/issues/4224))
- Added automated coverage reporting to CI. ([\#4225](https://github.com/matrix-org/synapse/issues/4225))
- Garbage-collect after each unit test to fix logcontext leaks ([\#4227](https://github.com/matrix-org/synapse/issues/4227))
......
......@@ -36,6 +36,7 @@ prune demo/etc
prune docker
prune .circleci
prune .coveragerc
prune debian
exclude jenkins*
recursive-exclude jenkins *.sh
......@@ -51,8 +51,9 @@ returned by the Client-Server API:
Upgrading to v0.34.0
====================
1. This release is the first to fully support Python 3. We recommend switching
to Python 3, as it has been shown to give performance improvements.
1. This release is the first to fully support Python 3. Synapse will now run on
Python versions 3.5, or 3.6 (as well as 2.7). We recommend switching to
Python 3, as it has been shown to give performance improvements.
For users who have installed Synapse into a virtualenv, we recommend doing
this by creating a new virtualenv. For example::
......@@ -68,7 +69,7 @@ Upgrading to v0.34.0
synctl start
Users who have installed from distribution packages should see the relevant
package documentation.
package documentation. See below for notes on Debian packages.
* When upgrading to Python 3, you **must** make sure that your log files are
configured as UTF-8, by adding ``encoding: utf8`` to the
......@@ -107,6 +108,13 @@ Upgrading to v0.34.0
There is no need to revert this change if downgrading to Python 2.
We are also making available Debian packages which will run Synapse on
Python 3. You can switch to these packages with ``apt-get install
matrix-synapse-py3``, however, please read `debian/NEWS
<https://github.com/matrix-org/synapse/blob/release-v0.34.0/debian/NEWS>`_
before doing so. The existing ``matrix-synapse`` packages will continue to
use Python 2 for the time being.
2. This release removes the ``riot.im`` from the default list of trusted
identity servers.
......
matrix-synapse (0.34.0-1) UNRELEASED; urgency=medium
* New upstream release.
-- Andrej Shadura <andrewsh@debian.org> Fri, 21 Dec 2018 13:22:01 +0100
matrix-synapse (0.34.0~rc2-1) unstable; urgency=medium
* New upstream version 0.34.0~rc2.
......
From: Erik Johnston <erikj@matrix.org>
Date: Fri, 10 Jun 2016 13:24:51 +0100
Subject: Honour config.web_client
---
synapse/app/homeserver.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -95,7 +95,7 @@
for res in listener_config["resources"]:
for name in res["names"]:
resources.update(self._configure_named_resource(
- name, res.get("compress", False),
+ config, name, res.get("compress", False),
))
additional_resources = listener_config.get("additional_resources", {})
@@ -145,7 +145,7 @@
)
logger.info("Synapse now listening on port %d", port)
- def _configure_named_resource(self, name, compress=False):
+ def _configure_named_resource(self, config, name, compress=False):
"""Build a resource map for a named resource
Args:
@@ -209,7 +209,7 @@
if name in ["keys", "federation"]:
resources[SERVER_KEY_V2_PREFIX] = KeyApiV2Resource(self)
- if name == "webclient":
+ if name == "webclient" and config.web_client:
webclient_path = self.get_config().web_client_location
if webclient_path is None:
0002-change_instructions.patch
0005-Honour-config.web_client.patch
0006-Avoid-pip-install.patch
# A dockerfile which builds a docker image for building a debian package for
# synapse. The distro to build for is passed as a docker build var.
#
# The default entrypoint expects the synapse source to be mounted as a
# (read-only) volume at /synapse/source, and an output directory at /debs.
#
# A pair of environment variables (TARGET_USERID and TARGET_GROUPID) can be
# passed to the docker container; if these are set, the build script will chown
# the build products accordingly, to avoid ending up with things owned by root
# in the host filesystem.
# Get the distro we want to pull from as a dynamic build variable
ARG distro=""
FROM ${distro}
# Install the build dependencies
RUN apt-get update -qq -o Acquire::Languages=none \
&& env DEBIAN_FRONTEND=noninteractive apt-get install \
-yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \
build-essential \
debhelper \
devscripts \
dh-systemd \
dh-virtualenv \
equivs \
lsb-release \
python3-dev \
python3-pip \
python3-setuptools \
python3-venv \
sqlite3 \
wget
WORKDIR /synapse/source
ENTRYPOINT ["bash","/synapse/source/docker/build_debian.sh"]
#!/bin/bash
# The script to build the Debian package, as ran inside the Docker image.
set -ex
DIST=`lsb_release -c -s`
# We need to build a newer dh_virtualenv on older OSes like Xenial.
if [ "$DIST" = 'xenial' ]; then
mkdir -p /tmp/dhvenv
cd /tmp/dhvenv
wget https://github.com/spotify/dh-virtualenv/archive/1.1.tar.gz
tar xvf 1.1.tar.gz
cd dh-virtualenv-1.1/
env DEBIAN_FRONTEND=noninteractive mk-build-deps -ri -t "apt-get -yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io"
dpkg-buildpackage -us -uc -b
cd /tmp/dhvenv
apt-get install -yqq ./dh-virtualenv_1.1-1_all.deb
fi
# we get a read-only copy of the source: make a writeable copy
cp -aT /synapse/source /synapse/build
cd /synapse/build
# add an entry to the changelog for this distribution
dch -M -l "+$DIST" "build for $DIST"
dch -M -r "" --force-distribution --distribution "$DIST"
dpkg-buildpackage -us -uc
ls -l ..
# copy the build results out, setting perms if necessary
shopt -s nullglob
for i in ../*.deb ../*.dsc ../*.tar.xz ../*.changes ../*.buildinfo; do
[ -z "$TARGET_USERID" ] || chown "$TARGET_USERID" "$i"
[ -z "$TARGET_GROUPID" ] || chgrp "$TARGET_GROUPID" "$i"
mv "$i" /debs
done
#!/bin/bash
# Build the Debian packages using Docker images.
#
# This script builds the Docker images and then executes them sequentially, each
# one building a Debian package for the targeted operating system. It is
# designed to be a "single command" to produce all the images.
#
# By default, builds for all known distributions, but a list of distributions
# can be passed on the commandline for debugging.
set -ex
cd `dirname $0`
if [ $# -lt 1 ]; then
DISTS=(debian:stretch debian:sid ubuntu:xenial ubuntu:bionic ubuntu:cosmic)
else
DISTS=("$@")
fi
# Make the dir where the debs will live.
#
# Note that we deliberately put this outside the source tree, otherwise we tend
# to get source packages which are full of debs. (We could hack around that
# with more magic in the build_debian.sh script, but that doesn't solve the
# problem for natively-run dpkg-buildpakage).
mkdir -p ../../debs
# Build each OS image;
for i in "${DISTS[@]}"; do
TAG=$(echo ${i} | cut -d ":" -f 2)
docker build --tag dh-venv-builder:${TAG} --build-arg distro=${i} -f Dockerfile-dhvirtualenv .
docker run -it --rm --volume=$(pwd)/../\:/synapse/source:ro --volume=$(pwd)/../../debs:/debs \
-e TARGET_USERID=$(id -u) \
-e TARGET_GROUPID=$(id -g) \
dh-venv-builder:${TAG}
done
......@@ -27,4 +27,4 @@ try:
except ImportError:
pass
__version__ = "0.34.0rc2"
__version__ = "0.34.0"
......@@ -78,7 +78,7 @@ CONDITIONAL_REQUIREMENTS = {
},
"postgres": {
"psycopg2>=2.6": ["psycopg2"]
}
},
}
......
......@@ -48,7 +48,8 @@ class DownloadResource(Resource):
set_cors_headers(request)
request.setHeader(
b"Content-Security-Policy",
b"default-src 'none';"
b"sandbox;"
b" default-src 'none';"
b" script-src 'none';"
b" plugin-types application/pdf;"
b" style-src 'unsafe-inline';"
......
This diff is collapsed.
......@@ -182,7 +182,7 @@ class EndToEndRoomKeyStore(SQLBaseStore):
keyvalues = {
"user_id": user_id,
"version": version,
"version": int(version),
}
if room_id:
keyvalues['room_id'] = room_id
......
......@@ -119,6 +119,7 @@ setenv =
[testenv:packaging]
skip_install=True
deps =
check-manifest
commands =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment