From 5b46ce579ba9a198546ff9e19f743eb91a126422 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 19 Nov 2014 18:00:57 +0000 Subject: [PATCH 1/3] Bump version, changelog and upgrade.rst --- CHANGES.rst | 24 ++++++++++++++++++++++++ UPGRADE.rst | 30 ++++++++++++++++++++++++++++++ VERSION | 2 +- database-prepare-for-0.5.0.sh | 21 +++++++++++++++++++++ synapse/__init__.py | 2 +- synapse/storage/__init__.py | 2 +- 6 files changed, 78 insertions(+), 3 deletions(-) create mode 100755 database-prepare-for-0.5.0.sh diff --git a/CHANGES.rst b/CHANGES.rst index 78c178bafd..5a284c3853 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,27 @@ +Changes in synapse 0.5.0 (2014-11-19) +===================================== +This release includes changes to the federation protocol and client-server API +that is not backwards compatible. + +This release also changes the internal database schemas and so requires servers to +drop their current history. See UPGRADES.rst for details. + +Homeserver: + * Add authentication and authorization to the federation protocol. Events are + now signed by their originating homeservers. + * Implement the new authorization model for rooms. + * Split out web client into a seperate repository: matrix-angular-sdk. + * Change the structure of PDUs. + * Fix bug where user could not join rooms via an alias containing 4-byte + UTF-8 characters. + * Merge concept of PDUs and Events internally. + * Improve logging by adding request ids to log lines. + * Implement a very basic room initial sync API. + * Implement the new invite/join federation APIs. + +Webclient: + * The webclient has been moved to a seperate repository. + Changes in synapse 0.4.2 (2014-10-31) ===================================== diff --git a/UPGRADE.rst b/UPGRADE.rst index 99ce1a2d3d..2229470c3f 100644 --- a/UPGRADE.rst +++ b/UPGRADE.rst @@ -1,3 +1,33 @@ +Upgrading to v0.5.0 +=================== + +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 +resutling 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.: + + ./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 =================== diff --git a/VERSION b/VERSION index 2b7c5ae018..8f0916f768 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.2 +0.5.0 diff --git a/database-prepare-for-0.5.0.sh b/database-prepare-for-0.5.0.sh new file mode 100755 index 0000000000..e824cb583e --- /dev/null +++ b/database-prepare-for-0.5.0.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# This is will prepare a synapse database for running with v0.5.0 of synapse. +# It will store all the user information, but will *delete* all messages and +# room data. + +set -e + +cp "$1" "$1.bak" + +DUMP=$(sqlite3 "$1" << 'EOF' +.dump users +.dump access_tokens +.dump presence +.dump profiles +EOF +) + +rm "$1" + +sqlite3 "$1" <<< "$DUMP" diff --git a/synapse/__init__.py b/synapse/__init__.py index 23ae5f003f..14564e735e 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -16,4 +16,4 @@ """ This is a reference implementation of a synapse home server. """ -__version__ = "0.4.2" +__version__ = "0.5.0" diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index c36d938d96..330d3b793f 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -67,7 +67,7 @@ SCHEMAS = [ # Remember to update this number every time an incompatible change is made to # database schema files, so the users will be informed on server restarts. -SCHEMA_VERSION = 6 +SCHEMA_VERSION = 7 class _RollbackButIsFineException(Exception): From bf7940d7ff4d38298904b1b747631500632133c0 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 19 Nov 2014 20:07:21 +0000 Subject: [PATCH 2/3] Add note about rerunning setup.py develop --- UPGRADE.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPGRADE.rst b/UPGRADE.rst index 2229470c3f..8c70ae2765 100644 --- a/UPGRADE.rst +++ b/UPGRADE.rst @@ -1,6 +1,12 @@ 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. From 25fd4d9f2c7f99b0932ae9468c1141669e1999cc Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 19 Nov 2014 15:25:23 -0800 Subject: [PATCH 3/3] typoe --- UPGRADE.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE.rst b/UPGRADE.rst index 8c70ae2765..961f4da31c 100644 --- a/UPGRADE.rst +++ b/UPGRADE.rst @@ -18,7 +18,7 @@ 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 -resutling conflicts during the upgrade process. +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.: