From 47357e8bb618b10a8a5dde00c296f49610919088 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Wed, 11 Oct 2017 21:30:57 +0200 Subject: [PATCH 1/5] Allow upgrade from synapse 0.23 --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 69d28d3..9054140 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,7 +34,7 @@ ynh_abort_if_errors if [[ -z $synapse_old_version ]] then # To be sure that the migration is sucessfull we check that the old synapse version is compatible with the synapse_port_db script. - if [[ $(dpkg -l | grep -c -E "ii.*matrix-synapse.*0.22") != 1 ]] + if [[ $(dpkg -l | grep -c -E "ii.*matrix-synapse.*0.23") != 1 ]] || [[ $(dpkg -l | grep -c -E "ii.*matrix-synapse.*0.22") != 1 ]] then ynh_die "Update from this synapse version is not available now. You need to wait for the next update." fi From ca478666ba4ed45447ceb05f9efd6363cfa5637e Mon Sep 17 00:00:00 2001 From: Josue-T Date: Thu, 12 Oct 2017 14:52:05 +0200 Subject: [PATCH 2/5] Fix upgrade from old version condition --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9054140..21f78f0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,7 +34,7 @@ ynh_abort_if_errors if [[ -z $synapse_old_version ]] then # To be sure that the migration is sucessfull we check that the old synapse version is compatible with the synapse_port_db script. - if [[ $(dpkg -l | grep -c -E "ii.*matrix-synapse.*0.23") != 1 ]] || [[ $(dpkg -l | grep -c -E "ii.*matrix-synapse.*0.22") != 1 ]] + if [[ $(dpkg -l | grep -c -E "ii.*matrix-synapse.*0.23") != 1 ]] && [[ $(dpkg -l | grep -c -E "ii.*matrix-synapse.*0.22") != 1 ]] then ynh_die "Update from this synapse version is not available now. You need to wait for the next update." fi From 15454074ad6ccdf38f80f0ef03f9ab057e054923 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Thu, 12 Oct 2017 22:28:30 +0200 Subject: [PATCH 3/5] Install python cffi and ndg-httpsclient in virtualenv --- scripts/_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 86183a1..47562a9 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -10,8 +10,6 @@ synapse_version="0.22.0" install_dependances() { ynh_install_app_dependencies coturn build-essential python2.7-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libpq-dev postgresql pip install --upgrade pip - pip install --upgrade cffi - pip install --upgrade ndg-httpsclient pip install --upgrade virtualenv } @@ -28,6 +26,8 @@ install_from_source() { cp ../conf/virtualenv_activate $final_path/bin/activate source $final_path/bin/activate pip install --upgrade pip + pip install --upgrade cffi + pip install --upgrade ndg-httpsclient pip install --upgrade setuptools pip install https://github.com/matrix-org/synapse/tarball/master pip install psycopg2 From ff7ed0436f43b54709ea6091f6af81f75c3bba92 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Fri, 13 Oct 2017 14:57:26 +0200 Subject: [PATCH 4/5] Add licence comment --- README.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9271a3d..a98ae90 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,14 @@ Synapse for YunoHost -================== +==================== Yunohost chattroom with matrix : [https://riot.im/app/#/room/#yunohost:matrix.org](https://riot.im/app/#/room/#yunohost:matrix.org) [Yunohost project](https://yunohost.org/#/) -## For ARM arch (or slow arch) +Setup +----- + +### Install for ARM arch (or slow arch) If you don't have a dh.pem file in `/etc/yunohost/certs/YOUR DOMAIN/dh.pem` you should built it befor to install the app because it could take a long time. You could built it by this cmd : `sudo openssl dhparam -out /etc/yunohost/certs/YOUR DOMAIN/dh.pem 2048 > /dev/null` @@ -13,15 +16,15 @@ After that you can install it without problem. The install use the python virtualenvironement. Everything is built on the install and some package a compiled so it could take a long time if the processor is slow. -## Package update package +### Package update package -sudo yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh +`sudo yunohost app upgrade synapse -u https://github.com/YunoHost-Apps/synapse_ynh` -## Web client +### Web client If you want a web client you can also install riot with this package : https://github.com/YunoHost-Apps/riot_ynh . But -## Access by federation +### Access by federation To be accessible by the federation you need to put this following line in the dns configuration : @@ -32,13 +35,7 @@ for example ``` _matrix._tcp.example.com. 3600 IN SRV 10 0 8448 synapse.example.com. ``` - -## About debian package - -It's important to know that this package use the debian backport repos. So this app will enable the debian backport repos it will install some package from this repos. If you remove this app you could keep some package form backport on your server. - -Important Security Note -======================= +### Important Security Note We do not recommend running Riot from the same domain name as your Matrix homeserver (synapse). The reason is the risk of XSS (cross-site-scripting) @@ -50,17 +47,20 @@ We have put some coarse mitigations into place to try to protect against this situation, but it's still not good practice to do it in the first place. See https://github.com/vector-im/riot-web/issues/1977 for more details. -## To do +License +------- + +Synapse is published under the Apache License : https://github.com/matrix-org/synapse/blob/master/LICENSE + +To do +----- - Doc (issue about domain) - Test arm - Riot doc - Test production -Todo for official App -====================== +### Todo for official App - Improve the upgrade from old version (all feedback is welcome) - Improve documentation - - From be17ebe766cbac34eacf2eb92c7c22f00e2069f4 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Fri, 13 Oct 2017 15:12:54 +0200 Subject: [PATCH 5/5] Update Licence in manifest --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index caf5fba..ff65e82 100644 --- a/manifest.json +++ b/manifest.json @@ -11,7 +11,7 @@ }, "version": "0.23.0", "url": "http://matrix.org", - "license": "free", + "license": "Apache-2.0", "maintainer": { "name": "Josué Tille", "email": "josue@tille.ch"