From 99bbcf2f47ec22b4ee22b36aa0a846603532141c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 25 Oct 2017 14:11:58 +0200 Subject: [PATCH] Update to 0.24.1 --- manifest.json | 2 +- scripts/_common.sh | 3 ++- scripts/upgrade | 14 +++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/manifest.json b/manifest.json index ff65e82..e9902c5 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "en": "Instant messaging server who use matrix", "fr": "Un serveur de messagerie instantané basé sur matrix" }, - "version": "0.23.0", + "version": "0.24.1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 12eb686..0c32a99 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -31,7 +31,8 @@ install_source() { pip install --upgrade cffi ndg-httpsclient setuptools pip install --upgrade https://github.com/matrix-org/synapse/tarball/master pip install --upgrade psycopg2 lxml - + deactivate + # Set permission chown $synapse_user:root -R $final_path chown $synapse_user:root -R /var/lib/matrix-synapse diff --git a/scripts/upgrade b/scripts/upgrade index 8e310c8..d99ecd2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,6 +36,7 @@ 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 ]] then + systemctl start matrix-synapse.service ynh_die "Update from this synapse version is not available now. You need to wait for the next update." fi @@ -64,7 +65,8 @@ then install_dependances # Create directory Install synapse in virtualenv - install_from_source + setup_dir || true # If the dir aready exist, but to be sure that all dir exist. + install_source # Open access to server without a button the home cp ../conf/add_sso_conf.py $final_path @@ -109,11 +111,16 @@ then # We get the last version of the synapse_port_db script because an old version could be buggy. cp ../sources/synapse_port_db /opt/yunohost/matrix-synapse/bin/synapse_port_db - # Migrate database + # Migrate database (in virtualenv) + source $final_path/bin/activate /opt/yunohost/matrix-synapse/bin/synapse_port_db --sqlite-database /var/lib/matrix-synapse/homeserver.db \ --postgres-config /etc/matrix-synapse/homeserver.yaml + deactivate fi +# Upgrade manually Synapse +install_source + # Update nginx config config_nginx @@ -126,9 +133,6 @@ set_certificat_access # Configure Coturn config_coturn -# Upgrade manually Synapse -install_source - # Set new settings ynh_app_setting_set $app synapse_version $synapse_version