diff --git a/README.md b/README.md index 92e7d98..94aa48b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Instant messaging server matrix network. Yunohost chatroom with matrix : [https://riot.im/app/#/room/#yunohost:matrix.org](https://riot.im/app/#/room/#yunohost:matrix.org) -**Shipped version:** 1.25.0 +**Shipped version:** 1.27.0 ## Configuration diff --git a/check_process b/check_process index c475b1c..a48abb4 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,8 @@ setup_private=0 setup_public=1 upgrade=1 - upgrade=1 from_commit=fcbe10716aa2f9edbfc681093ca0d1f70903774b - upgrade=1 from_commit=5006cf1536f33d065aade2caa9b88120e0d1a381 + upgrade=1 from_commit=0705f4ffb4f7538a1aa33a801f95766ee23367db + upgrade=1 from_commit=35774cc0eabb82b03230210689fa060d5f2b0bd8 backup_restore=1 multi_instance=1 incorrect_path=0 @@ -22,7 +22,7 @@ ;;; Levels Level 5=auto ;;; Upgrade options - ; commit=fcbe10716aa2f9edbfc681093ca0d1f70903774b + ; commit=0705f4ffb4f7538a1aa33a801f95766ee23367db name=Fix postgresql helper from old_version_for_CI_2 branch - ; commit=5006cf1536f33d065aade2caa9b88120e0d1a381 + ; commit=35774cc0eabb82b03230210689fa060d5f2b0bd8 name=Migrate from self signed certificate to cert managed by Yunohost from old_version_for_CI_3 branch diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index f9bdc2b..069a597 100644 --- a/conf/armv7_buster.src +++ b/conf/armv7_buster.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.25.0/matrix-synapse_1.25.0-buster-bin1_armv7l.tar.gz -SOURCE_SUM=5742a0ef8f890dfcdfdfd2acc68e9d73fd539eda621c5d1089ab2501b38ce807 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.27.0/matrix-synapse_1.27.0-buster-bin1_armv7l.tar.gz +SOURCE_SUM=0af00cc1e00041a3e1e93b50e12a1fd645fc4d42f29cc09a708b4750db526524 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/conf/armv7_stretch.src b/conf/armv7_stretch.src index 708db91..a316e18 100644 --- a/conf/armv7_stretch.src +++ b/conf/armv7_stretch.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.25.0/matrix-synapse_1.25.0-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=44ed0f855ed5917f7358a19a71d62fcfee7224b882aab9bc59d919e184e4235a +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.27.0/matrix-synapse_1.27.0-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=195542f205489dff7c8c5838f39421e4b215ce71592da85d0fd22bdd80c37a8b # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index 3b48db4..1fa2b8a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Instant messaging server which uses Matrix", "fr": "Un serveur de messagerie instantané basé sur Matrix" }, - "version": "1.25.0~ynh1", + "version": "1.27.0~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { diff --git a/scripts/_common.sh b/scripts/_common.sh index f983ca9..22b933d 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -10,6 +10,8 @@ install_sources() { fi mkdir -p $final_path + chown $synapse_user:root -R $final_path + chown $synapse_user:root -R $data_path if [ -n "$(uname -m | grep arm)" ] then @@ -28,6 +30,19 @@ install_sources() { fi done else + # Install rustup is not already installed + # We need this to be able to install cryptgraphy + export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin" + if [ -e $final_path/.rustup ]; then + sudo -u "$synapse_user" env PATH=$PATH rustup update + else + sudo -u "$synapse_user" bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain=stable' + mv $data_path/.cargo $final_path/ + mv $data_path/.rustup $final_path/ + ln -s $final_path/.cargo $data_path/.cargo + ln -s $final_path/.rustup $data_path/.rustup + fi + # Install virtualenv if it don't exist test -e $final_path/bin/python3 || python3 -m venv $final_path @@ -39,8 +54,10 @@ install_sources() { source $final_path/bin/activate set -u; pip3 install --upgrade setuptools wheel + chown $synapse_user:root -R $final_path + sudo -u $synapse_user env PATH=$PATH pip3 install --upgrade 'cryptography>=3.3' pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2 - pip3 install --upgrade 'Twisted>=20.3.0' 'cryptography>=3.3' matrix-synapse==$upstream_version matrix-synapse-ldap3 + pip3 install --upgrade 'Twisted>=20.3.0' matrix-synapse==$upstream_version matrix-synapse-ldap3 # This function was defined when we called "source $final_path/bin/activate". With this function we undo what "$final_path/bin/activate" does set +u; diff --git a/scripts/restore b/scripts/restore index 9b27ca4..46bcb99 100644 --- a/scripts/restore +++ b/scripts/restore @@ -72,6 +72,16 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=70 # For any update do it in all files ynh_install_app_dependencies $dependances +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$synapse_user --home_dir=$data_path +adduser $synapse_user ssl-cert +adduser turnserver ssl-cert + #================================================= # RESTORE ALL CONFIG AND DATA #================================================= @@ -92,18 +102,6 @@ install_sources ynh_script_progression --message="Reload fail2ban..." --weight=6 ynh_systemd_action --action=restart --service_name=fail2ban -#================================================= -# SPECIFIC RESTORATION -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$synapse_user --home_dir=$data_path -adduser $synapse_user ssl-cert -adduser turnserver ssl-cert - #================================================= # RESTORE THE POSTGRESQL DATABASE #=================================================