From dee815a7bd5d4d429da4cc38de959a07f8862640 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 39ad3053..c2b8baff 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From 252f3dcb9b3b40746ba95ed30f28b7af6dbc9bb7 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 1ab5593c..14052a92 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -29,6 +29,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -43,6 +48,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 7d8253bf57361547c05b49475ca9d930106b01c8 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 7817b0cd..97d0e803 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -34,7 +34,7 @@ REQUIREMENTS = { "pydenticon": ["pydenticon"], "ujson": ["ujson"], "blist": ["blist"], - "pysaml2>=3.0.0,<4.0.0": ["saml2>=3.0.0,<4.0.0"], + "pysaml2>=3.0.0,<4.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], } -- cgit v1.2.3 From b3e1f164d3c7f6de3dd3019196f04806a4e758d1 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index e0b87468..9fd17475 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -23,7 +23,7 @@ import sys from synapse.config._base import ConfigError from synapse.python_dependencies import ( - check_requirements, DEPENDENCY_LINKS + check_requirements ) from synapse.rest import ClientRestResource @@ -85,12 +85,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt-get, run:\n\n" + " apt-get install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": DEPENDENCY_LINKS["matrix-angular-sdk"]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From bec0631e9ed98d9f102c1d0e529a5d02fc764b52 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 9fd17475..b544e67b 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 7cdff55241eb338a3bd8c4977547678b2f86dd00 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 97d0e803..88e9188c 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -22,7 +22,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.0.0": ["canonicaljson>=1.0.0"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl==0.3.0": ["nacl==0.3.0", "nacl.bindings"], + "pynacl==0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], "pyopenssl>=0.14": ["OpenSSL>=0.14"], -- cgit v1.2.3 From 00a2a8e8d4a67639ded98a4c715e812401839c87 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Sun, 12 Feb 2017 09:54:56 +0100 Subject: Use signedjson.sign instead of syutil.crypto.jsonsign Functions from syutil.crypto.jsonsign are now available in signedjson, so use that instead of depending on syutil. Forwarded: yes -- Gbp-Pq: Name 0007-use-signedjson.patch --- contrib/cmdclient/console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/cmdclient/console.py b/contrib/cmdclient/console.py index 8bb03ce6..4918fa1a 100755 --- a/contrib/cmdclient/console.py +++ b/contrib/cmdclient/console.py @@ -32,7 +32,7 @@ import urlparse import nacl.signing import nacl.encoding -from syutil.crypto.jsonsign import verify_signed_json, SignatureVerifyException +from signedjson.sign import verify_signed_json, SignatureVerifyException CONFIG_JSON = "cmdclient_config.json" -- cgit v1.2.3 From 2e88ba35f733c003c157da7366b4efbced210fad Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From d0773c8ac7b24a55b121b415c3418d8b4df2b073 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 39ad3053..c2b8baff 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From c038cf6fa6b38f4f2670b2498e9d5370a8e0c754 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 1ab5593c..14052a92 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -29,6 +29,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -43,6 +48,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From d3bc13084dbafe321bfa90b89c22ae2051316c29 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 7817b0cd..97d0e803 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -34,7 +34,7 @@ REQUIREMENTS = { "pydenticon": ["pydenticon"], "ujson": ["ujson"], "blist": ["blist"], - "pysaml2>=3.0.0,<4.0.0": ["saml2>=3.0.0,<4.0.0"], + "pysaml2>=3.0.0,<4.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], } -- cgit v1.2.3 From d2af57b066984e2d890cabd37b9d1422bb9d8db3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index e0b87468..9fd17475 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -23,7 +23,7 @@ import sys from synapse.config._base import ConfigError from synapse.python_dependencies import ( - check_requirements, DEPENDENCY_LINKS + check_requirements ) from synapse.rest import ClientRestResource @@ -85,12 +85,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt-get, run:\n\n" + " apt-get install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": DEPENDENCY_LINKS["matrix-angular-sdk"]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From e0356047984daed74bd011b181b53f276441618c Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 9fd17475..b544e67b 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 7a9a9e788c239b37991c78cc03de8a95ca47df36 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 97d0e803..88e9188c 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -22,7 +22,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.0.0": ["canonicaljson>=1.0.0"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl==0.3.0": ["nacl==0.3.0", "nacl.bindings"], + "pynacl==0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], "pyopenssl>=0.14": ["OpenSSL>=0.14"], -- cgit v1.2.3 From ee55537f53f2cc29db71cd7515d014ed3fa57c7b Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Sun, 12 Feb 2017 09:54:56 +0100 Subject: Use signedjson.sign instead of syutil.crypto.jsonsign Functions from syutil.crypto.jsonsign are now available in signedjson, so use that instead of depending on syutil. Forwarded: yes -- Gbp-Pq: Name 0007-use-signedjson.patch --- contrib/cmdclient/console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/cmdclient/console.py b/contrib/cmdclient/console.py index 8bb03ce6..4918fa1a 100755 --- a/contrib/cmdclient/console.py +++ b/contrib/cmdclient/console.py @@ -32,7 +32,7 @@ import urlparse import nacl.signing import nacl.encoding -from syutil.crypto.jsonsign import verify_signed_json, SignatureVerifyException +from signedjson.sign import verify_signed_json, SignatureVerifyException CONFIG_JSON = "cmdclient_config.json" -- cgit v1.2.3 From 10c2c0fa06f972c46dee64730aa2cc70c2f1fa47 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From b492c87550f03d37ed27c0d9ccbdb5758d000b05 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 39ad3053..c2b8baff 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From 47fbf77fe9555e0ce132d501aa302b2d9c458aa1 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 1ab5593c..14052a92 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -29,6 +29,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -43,6 +48,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 9decc49831a0d1e97c27147d11aa0024a8683595 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 7817b0cd..97d0e803 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -34,7 +34,7 @@ REQUIREMENTS = { "pydenticon": ["pydenticon"], "ujson": ["ujson"], "blist": ["blist"], - "pysaml2>=3.0.0,<4.0.0": ["saml2>=3.0.0,<4.0.0"], + "pysaml2>=3.0.0,<4.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], } -- cgit v1.2.3 From 7ab9d1180d30a4c4b1b55efdb84cdbab6bb9818c Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index e0b87468..9fd17475 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -23,7 +23,7 @@ import sys from synapse.config._base import ConfigError from synapse.python_dependencies import ( - check_requirements, DEPENDENCY_LINKS + check_requirements ) from synapse.rest import ClientRestResource @@ -85,12 +85,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt-get, run:\n\n" + " apt-get install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": DEPENDENCY_LINKS["matrix-angular-sdk"]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From f60cf802a3ebffabfd26d7b30ba8a861f15254cc Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 9fd17475..b544e67b 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 1fc4ef23427caefaa41a5d9ff6212298e4ffb119 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 97d0e803..88e9188c 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -22,7 +22,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.0.0": ["canonicaljson>=1.0.0"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl==0.3.0": ["nacl==0.3.0", "nacl.bindings"], + "pynacl==0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], "pyopenssl>=0.14": ["OpenSSL>=0.14"], -- cgit v1.2.3 From 71ae4d974f000fe5e4f90953b82f48c02542911d Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Sun, 12 Feb 2017 09:54:56 +0100 Subject: Use signedjson.sign instead of syutil.crypto.jsonsign Functions from syutil.crypto.jsonsign are now available in signedjson, so use that instead of depending on syutil. Forwarded: yes -- Gbp-Pq: Name 0007-use-signedjson.patch --- contrib/cmdclient/console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/cmdclient/console.py b/contrib/cmdclient/console.py index 8bb03ce6..4918fa1a 100755 --- a/contrib/cmdclient/console.py +++ b/contrib/cmdclient/console.py @@ -32,7 +32,7 @@ import urlparse import nacl.signing import nacl.encoding -from syutil.crypto.jsonsign import verify_signed_json, SignatureVerifyException +from signedjson.sign import verify_signed_json, SignatureVerifyException CONFIG_JSON = "cmdclient_config.json" -- cgit v1.2.3 From cddb66c9534e5f44846694d7f8561e8d772f4805 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 66cfdca3a5d11bbf543d7ef4a2de4905fdb35337 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 39ad3053..c2b8baff 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From 3675c1665a400c13f55e77ffd9e110505d71f34a Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 1ab5593c..14052a92 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -29,6 +29,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -43,6 +48,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 01b6832fe916e83042a1cd7cabe4236941ff6b80 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 7817b0cd..97d0e803 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -34,7 +34,7 @@ REQUIREMENTS = { "pydenticon": ["pydenticon"], "ujson": ["ujson"], "blist": ["blist"], - "pysaml2>=3.0.0,<4.0.0": ["saml2>=3.0.0,<4.0.0"], + "pysaml2>=3.0.0,<4.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], } -- cgit v1.2.3 From 367840b85e4730c5bb32a1821a28b92165ad3824 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index e0b87468..9fd17475 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -23,7 +23,7 @@ import sys from synapse.config._base import ConfigError from synapse.python_dependencies import ( - check_requirements, DEPENDENCY_LINKS + check_requirements ) from synapse.rest import ClientRestResource @@ -85,12 +85,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt-get, run:\n\n" + " apt-get install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": DEPENDENCY_LINKS["matrix-angular-sdk"]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From b132cd7e9fd23e0144666d6fafb7750b4a78675b Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 9fd17475..b544e67b 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From f34b2dcc55688154932afc1501aa02a3b8050d83 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 97d0e803..88e9188c 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -22,7 +22,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.0.0": ["canonicaljson>=1.0.0"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl==0.3.0": ["nacl==0.3.0", "nacl.bindings"], + "pynacl==0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], "pyopenssl>=0.14": ["OpenSSL>=0.14"], -- cgit v1.2.3 From df023cec9d96ce1a44d446f51cc14f3ce5749dfe Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Sun, 12 Feb 2017 09:54:56 +0100 Subject: Use signedjson.sign instead of syutil.crypto.jsonsign Functions from syutil.crypto.jsonsign are now available in signedjson, so use that instead of depending on syutil. Forwarded: yes -- Gbp-Pq: Name 0007-use-signedjson.patch --- contrib/cmdclient/console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/cmdclient/console.py b/contrib/cmdclient/console.py index 8bb03ce6..4918fa1a 100755 --- a/contrib/cmdclient/console.py +++ b/contrib/cmdclient/console.py @@ -32,7 +32,7 @@ import urlparse import nacl.signing import nacl.encoding -from syutil.crypto.jsonsign import verify_signed_json, SignatureVerifyException +from signedjson.sign import verify_signed_json, SignatureVerifyException CONFIG_JSON = "cmdclient_config.json" -- cgit v1.2.3 From 53435464d0097343cd0ede3c846d8dcf525952b1 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 6a92b2d437f5deffa3ae70747a5a82a8695f180b Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index f408defc..4a40b2a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From cb00b48f0e45f4e52bccd4ca72f8fa3d0fd2fe13 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index fa105bce..cf55a200 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -29,6 +29,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -43,6 +48,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From d2fc859782594d1ebf2c2ef57a45e186676ddeba Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 7052333c..93381e05 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -36,7 +36,7 @@ REQUIREMENTS = { "pydenticon": ["pydenticon"], "ujson": ["ujson"], "blist": ["blist"], - "pysaml2>=3.0.0,<4.0.0": ["saml2>=3.0.0,<4.0.0"], + "pysaml2>=3.0.0,<4.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], "phonenumbers>=8.2.0": ["phonenumbers"], -- cgit v1.2.3 From 7cea9200c57dc5cab6c2298b501175f64bd17b4f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 3adf72e1..61f6f469 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -34,7 +34,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import register_memory_metrics from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ +from synapse.python_dependencies import \ check_requirements from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory from synapse.rest import ClientRestResource @@ -75,12 +75,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From dfcfd7ffb2f45d866dbb44e85e68dd70f474e879 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 61f6f469..d21e9f7f 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -147,7 +147,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From e71a7d3aba43a0167b5297d59969ea280705356d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 93381e05..004ddcfd 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -24,7 +24,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.0.0": ["canonicaljson>=1.0.0"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl==0.3.0": ["nacl==0.3.0", "nacl.bindings"], + "pynacl==0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], "pyopenssl>=0.14": ["OpenSSL>=0.14"], -- cgit v1.2.3 From 9f74e5f6c1a25d8eaf502f59299abc31dc75eff3 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From aa5ca54c134906c72356d41fff543ede0fce4352 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 24 Oct 2017 15:05:33 +0100 Subject: Try to not require phonenumbers yet. Gbp-Pq: Name 0009-drop-phonenumbers-dep.patch --- synapse/python_dependencies.py | 1 - synapse/util/msisdn.py | 11 +++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 004ddcfd..da287c9a 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -39,7 +39,6 @@ REQUIREMENTS = { "pysaml2>=3.0.0,<4.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], - "phonenumbers>=8.2.0": ["phonenumbers"], } CONDITIONAL_REQUIREMENTS = { "web_client": { diff --git a/synapse/util/msisdn.py b/synapse/util/msisdn.py index 607161e7..e76c4b99 100644 --- a/synapse/util/msisdn.py +++ b/synapse/util/msisdn.py @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import phonenumbers +# import phonenumbers +import re from synapse.api.errors import SynapseError @@ -31,10 +32,4 @@ def phone_number_to_msisdn(country, number): Raises: SynapseError if the number could not be parsed. """ - try: - phoneNumber = phonenumbers.parse(number, country) - except phonenumbers.NumberParseException: - raise SynapseError(400, "Unable to parse phone number") - return phonenumbers.format_number( - phoneNumber, phonenumbers.PhoneNumberFormat.E164 - )[1:] + return re.sub('^00', '', re.sub(' ', '', number)) -- cgit v1.2.3 From e75f33fdaf98ccff89c7be66a6a0f5ac48245b3f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index f408defc..4a40b2a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From c7b99c639e617276f231dec66132c98ef2bd8d6b Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index fa105bce..cf55a200 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -29,6 +29,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -43,6 +48,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 55126d407a90ad599b09f90bfe480c42af1ae3eb Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 91179ce5..c8ace894 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -36,7 +36,7 @@ REQUIREMENTS = { "pydenticon": ["pydenticon"], "ujson": ["ujson"], "blist": ["blist"], - "pysaml2>=3.0.0": ["saml2>=3.0.0"], + "pysaml2>=3.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], "phonenumbers>=8.2.0": ["phonenumbers"], -- cgit v1.2.3 From 9c3c0e6a68d2551873243c18a0c71d4316c73478 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index e477c7ce..4c6ef083 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,7 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import register_memory_metrics from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ +from synapse.python_dependencies import \ check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory @@ -78,12 +78,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 0cd5be2278f3e7aa4e110a6339a914a44adba52e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 4c6ef083..98867b27 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -110,7 +110,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -155,7 +155,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -213,7 +213,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From f41a430a2d08ce9645302f8a199b12e6193e9bba Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index c8ace894..24e2cbbf 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -24,7 +24,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.0.0": ["canonicaljson>=1.0.0"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl>=1.2.1": ["nacl>=1.2.1", "nacl.bindings"], + "pynacl>=0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], "pyopenssl>=0.14": ["OpenSSL>=0.14"], -- cgit v1.2.3 From ec8f2a42212a73774b0278356f0abe8e038a6fb1 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 4013e64aaada01411a36809e6d78cb7baeb4f72e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index f408defc..4a40b2a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From d6dbf119e79d9eba74fab80e0f43e0caeee8df8c Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 32b439d2..c16cd3d4 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 6eda590563a6165fa7e47d0ee4b1440f61c54f29 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 5cabf7da..d074c8da 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -35,7 +35,7 @@ REQUIREMENTS = { "pillow": ["PIL"], "pydenticon": ["pydenticon"], "blist": ["blist"], - "pysaml2>=3.0.0": ["saml2>=3.0.0"], + "pysaml2>=3.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], "phonenumbers>=8.2.0": ["phonenumbers"], -- cgit v1.2.3 From 3f54f1971f5f633aea5cc7f0fa77cdd0c0b8c4d2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index a0e465d6..10da056a 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,7 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import register_memory_metrics from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ +from synapse.python_dependencies import \ check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory @@ -79,12 +79,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 0fe3b5bd310f1adae77c313da8a9333bf68f58dc Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 10da056a..c31f2eae 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -111,7 +111,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -156,7 +156,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -214,7 +214,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 116e8c5d641508b7e6f6d3cd58e59cb343fa3f38 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index d074c8da..ad3e5bae 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -24,7 +24,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.1.3": ["canonicaljson>=1.1.3"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl>=1.2.1": ["nacl>=1.2.1", "nacl.bindings"], + "pynacl>=0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], "pyopenssl>=0.14": ["OpenSSL>=0.14"], -- cgit v1.2.3 From ffb73e5a6e666ba78f562db3f85272d989831155 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From d8828751dd621dd3fd5cf4227fcdb078526092c2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index f408defc..4a40b2a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From 9ab1a9a2ef7f3134ca2a4513bc9e8ea36c7519ea Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 32b439d2..c16cd3d4 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 59f691fe8697e400c25cbdae75622f3bcb84797a Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 5cabf7da..d074c8da 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -35,7 +35,7 @@ REQUIREMENTS = { "pillow": ["PIL"], "pydenticon": ["pydenticon"], "blist": ["blist"], - "pysaml2>=3.0.0": ["saml2>=3.0.0"], + "pysaml2>=3.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], "phonenumbers>=8.2.0": ["phonenumbers"], -- cgit v1.2.3 From 2bcd99d75633b62ad649416a431903ffe1a9568f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index a0e465d6..10da056a 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,7 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import register_memory_metrics from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ +from synapse.python_dependencies import \ check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory @@ -79,12 +79,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 850656a7b893e11b0efd727cbe8b93309c842b08 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 10da056a..c31f2eae 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -111,7 +111,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -156,7 +156,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -214,7 +214,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 277c0ee975de82aaa7803a1a22874de8c493ab10 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index d074c8da..ad3e5bae 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -24,7 +24,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.1.3": ["canonicaljson>=1.1.3"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl>=1.2.1": ["nacl>=1.2.1", "nacl.bindings"], + "pynacl>=0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], "pyopenssl>=0.14": ["OpenSSL>=0.14"], -- cgit v1.2.3 From 1e207f8a2e48434fd831f5a519107463677e6a26 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 8c34978098c595e7a2c7614a7e2ec39838d3d4c2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index f408defc..4a40b2a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From f860585a2bdecd35a427134986e237510aa975c7 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 32b439d2..c16cd3d4 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 3839ccdc11e4cc984df1308c2778195ea38502d2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 711cbb6c..13dbbc79 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -52,7 +52,7 @@ REQUIREMENTS = { "pillow": ["PIL"], "pydenticon": ["pydenticon"], "blist": ["blist"], - "pysaml2>=3.0.0": ["saml2>=3.0.0"], + "pysaml2>=3.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], "phonenumbers>=8.2.0": ["phonenumbers"], -- cgit v1.2.3 From e236d84daa46cc256874b5b8dd7348fd4a73de55 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index a0e465d6..10da056a 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,7 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import register_memory_metrics from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ +from synapse.python_dependencies import \ check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory @@ -79,12 +79,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From e87e86a682cb6a37f0c77683edf68564efd2a3fc Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 10da056a..c31f2eae 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -111,7 +111,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -156,7 +156,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -214,7 +214,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 2638b1b922add09f3a46a7b37e560b1b44dd8e08 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 13dbbc79..fc891824 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -37,7 +37,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.1.3": ["canonicaljson>=1.1.3"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl>=1.2.1": ["nacl>=1.2.1", "nacl.bindings"], + "pynacl>=0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], # we break under Twisted 18.4 -- cgit v1.2.3 From aaf2a13e4286064a78f73737e550f5cfe3bd0418 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 2b519603d7fd42a3d839b47082a92f13d3a04e2b Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 89ca6d7a..04c7638b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From dc7287ce2cf99d047bd344b056890166aeaf1dfe Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index b748ed2b..9c9cbe46 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 2ce8d779ad26dff6459bf131227ae5693d5b1481 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 216db4d1..d2e89423 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -51,7 +51,7 @@ REQUIREMENTS = { "pillow": ["PIL"], "pydenticon": ["pydenticon"], "blist": ["blist"], - "pysaml2>=3.0.0": ["saml2>=3.0.0"], + "pysaml2>=3.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], "phonenumbers>=8.2.0": ["phonenumbers"], -- cgit v1.2.3 From 6001df8741e073089d6426f2401817430b9a3c64 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 75f40fd5..6eac3591 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,7 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import register_memory_metrics from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ +from synapse.python_dependencies import \ check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory @@ -79,12 +79,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From f18facfd694a7716e4a66e7329e081633cf51aea Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 6eac3591..967a6330 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -111,7 +111,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -158,7 +158,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -216,7 +216,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 48b2bf70f6f463db4214d0567f850451914f4762 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index d2e89423..e037e4af 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -37,7 +37,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.1.3": ["canonicaljson>=1.1.3"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl>=1.2.1": ["nacl>=1.2.1", "nacl.bindings"], + "pynacl>=0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], -- cgit v1.2.3 From b3e0a15e39f5db8bcb6f7d0d332452c07ccdc0c8 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 64f43fa1133039cb73b3b4d267ce31c86d7eb367 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 89ca6d7a..04c7638b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From 40f08bf2598606bf5cc4218c94625992db109384 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index b748ed2b..9c9cbe46 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From ca0bc324a8a8f4f675e1f1a929c1668945ff0b36 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 216db4d1..d2e89423 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -51,7 +51,7 @@ REQUIREMENTS = { "pillow": ["PIL"], "pydenticon": ["pydenticon"], "blist": ["blist"], - "pysaml2>=3.0.0": ["saml2>=3.0.0"], + "pysaml2>=3.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], "phonenumbers>=8.2.0": ["phonenumbers"], -- cgit v1.2.3 From 69739001311c6ffb4edb45576d711ce17d7ab991 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index caccbaa8..f7c51406 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,7 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import register_memory_metrics from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ +from synapse.python_dependencies import \ check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory @@ -79,12 +79,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 8572ebd9c63cbe5fe2fa9b3a0f4ee722df532277 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index f7c51406..f36eefd6 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -111,7 +111,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -158,7 +158,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -225,7 +225,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 9334572b90dd389d1b0d2ef292dbb719b508117c Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index d2e89423..e037e4af 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -37,7 +37,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.1.3": ["canonicaljson>=1.1.3"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl>=1.2.1": ["nacl>=1.2.1", "nacl.bindings"], + "pynacl>=0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], -- cgit v1.2.3 From bb93806246bbdc3950f70b7ed8491992990e644f Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 57bb02d20e84f74393a2643d5c3cddc0687e9df9 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 99b35f39..23a90982 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From a1aaa7c9d8a61c405984dde2278e97bacd946a50 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index b748ed2b..9c9cbe46 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 13284275d8fc2a5d30c0e91664c74b5508944a19 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: saml2 Gbp-Pq: Name 0003-saml2.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 478c4977..9af121ee 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -51,7 +51,7 @@ REQUIREMENTS = { "pillow": ["PIL"], "pydenticon": ["pydenticon"], "blist": ["blist"], - "pysaml2>=3.0.0": ["saml2>=3.0.0"], + "pysaml2>=3.0.0": ["saml2"], "pymacaroons-pynacl": ["pymacaroons"], "msgpack-python>=0.3.0": ["msgpack"], "phonenumbers>=8.2.0": ["phonenumbers"], -- cgit v1.2.3 From 10d387ec38a5b61a687f745012af3e91b04b2798 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 714f98a3..5dc3287d 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,8 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import RegistryProxy from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ - check_requirements +from synapse.python_dependencies import check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory from synapse.rest import ClientRestResource @@ -79,12 +78,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 22a33e1587b1d69f7c67997c6f936a9ac1dd9bdd Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 5dc3287d..0caef4ff 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -110,7 +110,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -224,7 +224,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 39006fb7b74bf51925dd786ce818250acb2d13e4 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 20 Jun 2016 13:20:37 +0100 Subject: Don't require strict nacl==0.3.0 requirement Gbp-Pq: Name 0006-Don-t-require-strict-nacl-0.3.0-requirement.patch --- synapse/python_dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 9af121ee..cfa23194 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -37,7 +37,7 @@ REQUIREMENTS = { "unpaddedbase64>=1.1.0": ["unpaddedbase64>=1.1.0"], "canonicaljson>=1.1.3": ["canonicaljson>=1.1.3"], "signedjson>=1.0.0": ["signedjson>=1.0.0"], - "pynacl>=1.2.1": ["nacl>=1.2.1", "nacl.bindings"], + "pynacl>=0.3.0": ["nacl>=0.3.0", "nacl.bindings"], "service_identity>=1.0.0": ["service_identity>=1.0.0"], "Twisted>=16.0.0": ["twisted>=16.0.0"], -- cgit v1.2.3 From 8875b61ebb97b7b1e9c3135b14a03c539fb086bb Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 9823855a88fbb9316ab56bdef258685592f7b52d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 99b35f39..23a90982 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From 0f97750bf5bce2ec3662a2e8ec43bad5363b2a66 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index b748ed2b..9c9cbe46 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 007aa5dc1379d5e5e6482d6b7874d2cee3d379cf Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 714f98a3..5dc3287d 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,8 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import RegistryProxy from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ - check_requirements +from synapse.python_dependencies import check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory from synapse.rest import ClientRestResource @@ -79,12 +78,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 07ecae494f72dcce1063aee3b16712196601c44e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 5dc3287d..0caef4ff 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -110,7 +110,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -224,7 +224,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From b8646d28bae1232374fdf4f13632b87e17e082bf Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 4de271fe61e63ac918730dbaf08acdc1cb357bf6 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 99b35f39..23a90982 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From b53b65b3b3c951ef152b5cb885cf2da54071cbae Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index b748ed2b..9c9cbe46 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 07b6c8ecd76eac55158a671abf519837ab66e1d5 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 714f98a3..5dc3287d 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,8 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import RegistryProxy from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ - check_requirements +from synapse.python_dependencies import check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory from synapse.rest import ClientRestResource @@ -79,12 +78,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 6781c85b5984ba17e169e5c951a228b8e6369da9 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 5dc3287d..0caef4ff 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -110,7 +110,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -224,7 +224,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 086ecee5a2791ee634a0201f613ae2416a28048b Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 2c98154e5570a10f3aebfa2aa710849637dedf22 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 99b35f39..23a90982 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From dce7db4407518a318b7c380963dbd3152fc4e8c4 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index b748ed2b..9c9cbe46 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 478fd759b688a3f10af97bf9e0bf5ff9d2115336 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 714f98a3..5dc3287d 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,8 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import RegistryProxy from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ - check_requirements +from synapse.python_dependencies import check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory from synapse.rest import ClientRestResource @@ -79,12 +78,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 26c027af281758034e212b1113d68614a533c7e5 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 5dc3287d..0caef4ff 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -110,7 +110,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -224,7 +224,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 81daf8904b1a36cc6bfd170a5c1c6d3b357f3189 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From bb46389b4670b42dc0c4a80a36d2aedc92a433f1 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 99b35f39..23a90982 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From aeaee29e7b523cbb71eb6c238c40cb22b700a340 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index b748ed2b..9c9cbe46 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From c3bff9b1c5d9c389a3f4d2a0557efbeadb54e539 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 714f98a3..5dc3287d 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,8 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import RegistryProxy from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ - check_requirements +from synapse.python_dependencies import check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory from synapse.rest import ClientRestResource @@ -79,12 +78,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 1e8ecf35ba9ce14d71fdb9eb32b4b75f6f2c0c27 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 5dc3287d..0caef4ff 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -110,7 +110,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -224,7 +224,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 9be77e16867f3a6d7e8ed5e57e7e9e712dbe78a7 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 7ee80cecb2b1e1e1717bf422cbb9a1ab0afc1f6d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 61a20a10..50a2d164 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8 +sitepackages = True [testenv] deps = -- cgit v1.2.3 From aa9447fe28231621200f4411d6754ebb29cdde4a Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index b748ed2b..9c9cbe46 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -31,6 +31,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -45,6 +50,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From a793738be4f763267dffa5206941d590e657cfac Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index ae5fc751..70637853 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,8 +36,7 @@ from synapse.http.server import RootRedirect from synapse.http.site import SynapseSite from synapse.metrics import RegistryProxy from synapse.metrics.resource import METRICS_PREFIX, MetricsResource -from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ - check_requirements +from synapse.python_dependencies import check_requirements from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory from synapse.rest import ClientRestResource @@ -79,12 +78,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From d815718e34a6702e462192801aaf43ce57a813d2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 70637853..7dc1cf12 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -110,7 +110,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -157,7 +157,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -224,7 +224,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From b2a16e13692870a02382da506c01b72d2504a9d1 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 4ee479e56181da4f5abc57eec297a4ecb676a126 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index ed26644b..64b09fda 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8, check_isort +sitepackages = True [testenv] deps = -- cgit v1.2.3 From 5e5513de2a9dc6f1e0517e4dc67ee138963ee60e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 3d2e90dd..2d103487 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -32,6 +32,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -46,6 +51,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 59f20331283da456f55aadbb4eda1da342cd46b2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 14e6dca5..737cb018 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -86,12 +86,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From c8c330f19391fa167b3dcee82d077876efa2feef Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 737cb018..4e596430 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -118,7 +118,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -165,7 +165,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -232,7 +232,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From ceb533b34ece2e60d4b6686bf14101625ed2d1be Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 5ddc5701f4a277ab79cae73b3b4fe6f43d129f33 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index ed26644b..64b09fda 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8, check_isort +sitepackages = True [testenv] deps = -- cgit v1.2.3 From f3d8fa66f40962d9048b815f7ec254eb8467182f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 3d2e90dd..2d103487 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -32,6 +32,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -46,6 +51,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From a8b21c826e287349516459d1478b603af7c1597c Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 14e6dca5..737cb018 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -86,12 +86,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 9474930b3140bd90881dba40ab95456c3b71e43f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 737cb018..4e596430 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -118,7 +118,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -165,7 +165,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -232,7 +232,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From c18ad4ba7f33e75e1b3fb795626489c055564e60 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From d5bec7190d44b4f74b37a350b6112229f66c62e2 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index ed26644b..64b09fda 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8, check_isort +sitepackages = True [testenv] deps = -- cgit v1.2.3 From dabbd89f3a682dd0d71c91a900c326389478abbb Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 3d2e90dd..2d103487 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -32,6 +32,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -46,6 +51,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From c8deb8b0becd3a284b5acd82d6283bb06e88aaf4 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index fba51c26..dfcc7b12 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -91,12 +91,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From dad870836cd4a1662e56c9f754cb0a53fb531b52 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index dfcc7b12..e7bf7d67 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -123,7 +123,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -170,7 +170,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -237,7 +237,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 6e4dc4da3f8df9a430a29dc5db5978cad1f77752 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 845622abe3d216b73092a823aa451d51604a3449 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index ed26644b..64b09fda 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8, check_isort +sitepackages = True [testenv] deps = -- cgit v1.2.3 From 9701622c6cf9f49632d3e669b867bba540c5f093 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 3d2e90dd..2d103487 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -32,6 +32,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -46,6 +51,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From fb461a92dda5ddc2a76f3d3c66e9ca9148274923 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index fba51c26..dfcc7b12 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -91,12 +91,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From f4ef643c7dd50c86a3a7b1cba1bf10acc0c2a47f Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index dfcc7b12..e7bf7d67 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -123,7 +123,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -170,7 +170,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -237,7 +237,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From a73e1d588a89dfc08b25a31bc167d58f3c4bbacd Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From b426e496ae2da1d66d1674556b94cd20fa0c3dc3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index ed26644b..64b09fda 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8, check_isort +sitepackages = True [testenv] deps = -- cgit v1.2.3 From 7dc8e408315b9ec9ee64a65a1e7531b5dd35d8f7 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 3d2e90dd..2d103487 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -32,6 +32,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -46,6 +51,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From cf1501bf9a75581f983f3081f55c8e63f4c08589 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index fba51c26..dfcc7b12 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -91,12 +91,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 0c83a0067e6425c6c2a5b53f956b4d6953f4260e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index dfcc7b12..e7bf7d67 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -123,7 +123,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -170,7 +170,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -237,7 +237,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3 From 05e573385b9dd6e39a4b867044d07242ee8bafd3 Mon Sep 17 00:00:00 2001 From: Andrew Shadura Date: Tue, 21 Feb 2017 17:28:35 +0100 Subject: We don't ship recaptcha, don't try to load it. Gbp-Pq: Name 0008-dont-ship-recaptcha.patch --- synapse/static/client/register/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/static/client/register/index.html b/synapse/static/client/register/index.html index 600b3ee4..b4db179a 100644 --- a/synapse/static/client/register/index.html +++ b/synapse/static/client/register/index.html @@ -4,7 +4,7 @@ - + -- cgit v1.2.3 From 94158f3f7d49ee0c3f9190231767de5d1c2a81a3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: tox Gbp-Pq: Name 0001-tox.patch --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 085f4389..470737f0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = packaging, py27, py36, pep8, check_isort +sitepackages = True [base] deps = -- cgit v1.2.3 From ab12dba69945b4136739a6643995b6c38c5468c8 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: change_instructions Gbp-Pq: Name 0002-change_instructions.patch --- synapse/config/_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synapse/config/_base.py b/synapse/config/_base.py index 3d2e90dd..2d103487 100644 --- a/synapse/config/_base.py +++ b/synapse/config/_base.py @@ -32,6 +32,11 @@ class ConfigError(Exception): MISSING_REPORT_STATS_CONFIG_INSTRUCTIONS = """\ Please opt in or out of reporting anonymized homeserver usage statistics, by setting the `report_stats` key in your config file to either True or False. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ MISSING_REPORT_STATS_SPIEL = """\ @@ -46,6 +51,11 @@ Thank you. MISSING_SERVER_NAME = """\ Missing mandatory `server_name` config option. + +To set it run: + + dpkg-reconfigure matrix-synapse + """ -- cgit v1.2.3 From 2067c1a0556fb765f893fa65d669b4c22054ba74 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 10:57:07 +0100 Subject: webclient-instructions Gbp-Pq: Name 0004-webclient-instructions.patch --- synapse/app/homeserver.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 005921dc..264d060a 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -91,12 +91,11 @@ def build_resource_for_web_client(hs): "Please either install the matrix-angular-sdk or configure\n" "the location of the source to serve via the configuration\n" "option `web_client_location`\n\n" - "To install the `matrix-angular-sdk` via pip, run:\n\n" - " pip install '%(dep)s'\n" + "To install the `matrix-angular-sdk` via apt, run:\n\n" + " apt install matrix-synapse-angular-client\n" "\n" "You can also disable hosting of the webclient via the\n" "configuration option `web_client`\n" - % {"dep": CONDITIONAL_REQUIREMENTS["web_client"].keys()[0]} ) syweb_path = os.path.dirname(syweb.__file__) webclient_path = os.path.join(syweb_path, "webclient") -- cgit v1.2.3 From 53c56e6cd84bc887b1e4f40a7e24b9b6e01b80ac Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 10 Jun 2016 13:24:51 +0100 Subject: Honour config.web_client Gbp-Pq: Name 0005-Honour-config.web_client.patch --- synapse/app/homeserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 264d060a..fd6429fb 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -123,7 +123,7 @@ class SynapseHomeServer(HomeServer): 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", {}) @@ -170,7 +170,7 @@ class SynapseHomeServer(HomeServer): ) 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: @@ -237,7 +237,7 @@ class SynapseHomeServer(HomeServer): SERVER_KEY_V2_PREFIX: KeyApiV2Resource(self), }) - if name == "webclient": + if name == "webclient" and config.web_client: resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self) if name == "metrics" and self.get_config().enable_metrics: -- cgit v1.2.3