From 247899a13935970993014aa656797222a9123c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 28 Jan 2021 00:36:38 +0000 Subject: [PATCH 1/5] Upgrade synapse to 1.26.0 --- README.md | 2 +- conf/armv7_buster.src | 4 ++-- conf/armv7_stretch.src | 4 ++-- manifest.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 92e7d98..2d2c4a4 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.26.0 ## Configuration diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index f9bdc2b..081162c 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.26.0/matrix-synapse_1.26.0-buster-bin1_armv7l.tar.gz +SOURCE_SUM=64dd0b0796ab45bae43165e8e668b1a23e47a37dfb5834df089ac44ebbc35761 # (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..6993dac 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.26.0/matrix-synapse_1.26.0-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=ad4c9a3bb9e5c8151fbac32fd3bb561c79a08ecfe572a6e0569bb97196d735ef # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index 3b48db4..723ed6e 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.26.0~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { From ce034fb750e76493c4a298c1bc7affd88f8dd84b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 13 Feb 2021 12:01:26 +0100 Subject: [PATCH 2/5] Install rust to fix cryptography build --- scripts/_common.sh | 19 ++++++++++++++++++- scripts/restore | 22 ++++++++++------------ 2 files changed, 28 insertions(+), 13 deletions(-) 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 #================================================= From 1f1993c4225da11a5a4f98a57d000bda529c5857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 15 Feb 2021 15:25:07 +0100 Subject: [PATCH 3/5] Udate old commit for check_process --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index c475b1c..74fda3f 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,7 @@ setup_private=0 setup_public=1 upgrade=1 - upgrade=1 from_commit=fcbe10716aa2f9edbfc681093ca0d1f70903774b + upgrade=1 from_commit=4b5741700a9f776b6563c5e58969b9fd77de3239 upgrade=1 from_commit=5006cf1536f33d065aade2caa9b88120e0d1a381 backup_restore=1 multi_instance=1 @@ -22,7 +22,7 @@ ;;; Levels Level 5=auto ;;; Upgrade options - ; commit=fcbe10716aa2f9edbfc681093ca0d1f70903774b + ; commit=4b5741700a9f776b6563c5e58969b9fd77de3239 name=Fix postgresql helper from old_version_for_CI_2 branch ; commit=5006cf1536f33d065aade2caa9b88120e0d1a381 name=Migrate from self signed certificate to cert managed by Yunohost from old_version_for_CI_3 branch From a88acd864e7b0012960783721c5ff588341dd5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 15 Feb 2021 15:45:07 +0100 Subject: [PATCH 4/5] Udate old commit for check_process --- check_process | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check_process b/check_process index 74fda3f..a48abb4 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,8 @@ setup_private=0 setup_public=1 upgrade=1 - upgrade=1 from_commit=4b5741700a9f776b6563c5e58969b9fd77de3239 - 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=4b5741700a9f776b6563c5e58969b9fd77de3239 + ; 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 From f434fe842bd339a549787118935f32026eb4ea39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 18 Feb 2021 10:10:00 +0000 Subject: [PATCH 5/5] Upgrade synapse to 1.27.0 --- README.md | 2 +- conf/armv7_buster.src | 4 ++-- conf/armv7_stretch.src | 4 ++-- manifest.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2d2c4a4..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.26.0 +**Shipped version:** 1.27.0 ## Configuration diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index 081162c..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.26.0/matrix-synapse_1.26.0-buster-bin1_armv7l.tar.gz -SOURCE_SUM=64dd0b0796ab45bae43165e8e668b1a23e47a37dfb5834df089ac44ebbc35761 +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 6993dac..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.26.0/matrix-synapse_1.26.0-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=ad4c9a3bb9e5c8151fbac32fd3bb561c79a08ecfe572a6e0569bb97196d735ef +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 723ed6e..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.26.0~ynh1", + "version": "1.27.0~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": {