From f08c33e83482d6cd92cfad6c6e69355a62d6e1e9 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 8 May 2015 13:29:00 +0100 Subject: [PATCH 1/7] Fix port_from_sqlite_to_postgres after changes to storage layer. --- scripts/port_from_sqlite_to_postgres.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/port_from_sqlite_to_postgres.py b/scripts/port_from_sqlite_to_postgres.py index f98342db51..da25113093 100755 --- a/scripts/port_from_sqlite_to_postgres.py +++ b/scripts/port_from_sqlite_to_postgres.py @@ -106,7 +106,7 @@ class Store(object): try: txn = conn.cursor() return func( - LoggingTransaction(txn, desc, self.database_engine), + LoggingTransaction(txn, desc, self.database_engine, []), *args, **kwargs ) except self.database_engine.module.DatabaseError as e: @@ -378,9 +378,7 @@ class Porter(object): for i, row in enumerate(rows): rows[i] = tuple( - self.postgres_store.database_engine.encode_parameter( - conv(j, col) - ) + conv(j, col) for j, col in enumerate(row) if j > 0 ) From 126d562576ae41945ae3607238c88ecbcb527b9d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 8 May 2015 13:29:37 +0100 Subject: [PATCH 2/7] Bump version --- synapse/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/__init__.py b/synapse/__init__.py index c89f444f4e..18b8ff7759 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -16,4 +16,4 @@ """ This is a reference implementation of a Matrix home server. """ -__version__ = "0.9.0" +__version__ = "0.9.0-r1" From 9a9386226a8d522f105c8c3965e8e17304e03f60 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 8 May 2015 13:37:54 +0100 Subject: [PATCH 3/7] Mention Ivan Shapovalov contrib/systemd --- AUTHORS.rst | 3 +++ CHANGES.rst | 2 ++ 2 files changed, 5 insertions(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 8396e535e8..3a457cd9fc 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -35,3 +35,6 @@ Turned to Dust Brabo * Installation instruction fixes + +Ivan Shapovalov + * contrib/systemd: a sample systemd unit file and a logger configuration diff --git a/CHANGES.rst b/CHANGES.rst index f0bb973dcf..65970a89c7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,8 @@ General: * Fix race in caches that occasionally caused some presence updates to be dropped - SYN-369. * Check server name has not changed on restart. +* Add a sample systemd unit file and a logger configuration in + contrib/systemd. Contributed Ivan Shapovalov. Federation: From 326121aec4b48d04f894a2abc567fffc1014a732 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 8 May 2015 13:38:29 +0100 Subject: [PATCH 4/7] UPGRADES: s/v0.x.x/v0.9.0 --- UPGRADE.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE.rst b/UPGRADE.rst index ab327a8136..d98460f643 100644 --- a/UPGRADE.rst +++ b/UPGRADE.rst @@ -1,4 +1,4 @@ -Upgrading to v0.x.x +Upgrading to v0.9.0 =================== Application services have had a breaking API change in this version. From 4fa0f53521546c5be48a3a94815203aff84c2639 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 8 May 2015 13:45:58 +0100 Subject: [PATCH 5/7] Support reading directly from a config --- scripts/port_from_sqlite_to_postgres.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/port_from_sqlite_to_postgres.py b/scripts/port_from_sqlite_to_postgres.py index da25113093..e7ed4c309b 100755 --- a/scripts/port_from_sqlite_to_postgres.py +++ b/scripts/port_from_sqlite_to_postgres.py @@ -723,6 +723,9 @@ if __name__ == "__main__": postgres_config = yaml.safe_load(args.postgres_config) + if "database" in postgres_config: + postgres_config = postgres_config["database"] + if "name" not in postgres_config: sys.stderr.write("Malformed database config: no 'name'") sys.exit(2) From 3a42f32134c305c1ba7947c53c23839f5dc3985f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 8 May 2015 13:47:48 +0100 Subject: [PATCH 6/7] Reword port script usage --- docs/postgres.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/postgres.rst b/docs/postgres.rst index 2dcc3caf9e..76a76cbb54 100644 --- a/docs/postgres.rst +++ b/docs/postgres.rst @@ -82,8 +82,8 @@ complete, restart synapse. For instance:: cp homeserver.db homeserver.db.snapshot ./synctl start -Assuming your database config file (as described in the section *Synapse -config*) is named ``database_config.yaml`` and the SQLite snapshot is at +Assuming your new config file (as described in the section *Synapse config*) +is named ``homeserver-postgres.yaml`` and the SQLite snapshot is at ``homeserver.db.snapshot`` then simply run:: python scripts/port_from_sqlite_to_postgres.py \ From 22a7ba8b22082503f2521c135168e1fb644efa60 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 8 May 2015 13:50:03 +0100 Subject: [PATCH 7/7] Actually rename all isntances --- docs/postgres.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/postgres.rst b/docs/postgres.rst index 76a76cbb54..19d8391115 100644 --- a/docs/postgres.rst +++ b/docs/postgres.rst @@ -88,7 +88,7 @@ is named ``homeserver-postgres.yaml`` and the SQLite snapshot is at python scripts/port_from_sqlite_to_postgres.py \ --sqlite-database homeserver.db.snapshot \ - --postgres-config database_config.yaml + --postgres-config homeserver-postgres.yaml The flag ``--curses`` displays a coloured curses progress UI.