From fc866e8adf9e7c0697f95f6eb71882af2eb3655a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 23 Mar 2020 21:54:18 +0000 Subject: [PATCH 1/9] Upgrade synapse to 1.12.0 --- README.md | 2 +- conf/armv7_stretch.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c700288..d9b38a9 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.11.1 +**Shipped version:** 1.12.0 ## Configuration diff --git a/conf/armv7_stretch.src b/conf/armv7_stretch.src index 6bcd6d3..dd63921 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.11.1/matrix-synapse_1.11.1-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=d793d49c561898330ce62bc7c1620b71467d611c375c41b697d2fd3064ddbee4 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.12.0/matrix-synapse_1.12.0-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=52eb33ef58dcee3ee2ccb7e24dd3f8191c717a5e8f5462052c864cfb425453bc # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index cd6b819..7fe4b1f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Instant messaging server who use matrix", "fr": "Un serveur de messagerie instantané basé sur matrix" }, - "version": "1.11.1~ynh1", + "version": "1.12.0~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { From 48d0e3a6e7ec19227aef84e00336f9e287387676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 25 Mar 2020 14:17:54 +0100 Subject: [PATCH 2/9] Use pipupgrade to update all python package --- scripts/upgrade | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 25f57ea..c98faeb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,6 +136,13 @@ then if [ -n "$(uname -m | grep arm)" ] then + # Fix multi-instance support + for f in $(ls $final_path/bin); do + if ! [[ $f =~ "__" ]]; then + ynh_replace_special_string --match_string='#!/opt/yunohost/matrix-synapse' --replace_string='#!'$final_path --target_file=$final_path/bin/* + fi + done + # Clean old file, sometimes it could make some big issues if we don't do this!! ynh_secure_remove --file=$final_path/bin ynh_secure_remove --file=$final_path/lib @@ -152,8 +159,17 @@ then # We set all necessary environement variable to create a python virtualenvironnement. source $final_path/bin/activate - pip3 install --upgrade setuptools wheel + pip3 install --upgrade setuptools wheel pipupgrade pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2 + + # Some pip package could be outdated and pip wont upgrade it automatically. + # This could be a security issue when some package have a vulnerability. + # It was by example the case with Twisted. + # Actually there are no official way to upgrade all package + # This problem is documented here : https://github.com/pypa/pip/issues/4551 + # One best way is actually to use pipupgrade + pipupgrade --yes --pip-path /tmp/matrix-synapse/bin/pip + pip3 install --upgrade 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 From 2496cea11bcf733807d7c092e5065b0353d7038e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 3 Apr 2020 10:14:50 +0000 Subject: [PATCH 3/9] Upgrade synapse to 1.12.2 --- README.md | 2 +- conf/armv7_stretch.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d9b38a9..1760e30 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.12.0 +**Shipped version:** 1.12.2 ## Configuration diff --git a/conf/armv7_stretch.src b/conf/armv7_stretch.src index dd63921..63449f5 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.12.0/matrix-synapse_1.12.0-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=52eb33ef58dcee3ee2ccb7e24dd3f8191c717a5e8f5462052c864cfb425453bc +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.12.2/matrix-synapse_1.12.2-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=e0ed0e3c058b7b8ddb2be10b55b1f421bef76a60f8b478004ca619d673125a79 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index a9afe4c..e005489 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Instant messaging server who use matrix", "fr": "Un serveur de messagerie instantané basé sur matrix" }, - "version": "1.12.0~ynh1", + "version": "1.12.2~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { From d2a48d9146797d25425e98d8f195b55e2a4e9dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 3 Apr 2020 15:26:18 +0200 Subject: [PATCH 4/9] Fix install - upgrade on arm --- scripts/install | 7 +++++++ scripts/upgrade | 15 ++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index cae73e0..58285fe 100644 --- a/scripts/install +++ b/scripts/install @@ -182,6 +182,13 @@ mkdir -p $final_path if [ -n "$(uname -m | grep arm)" ] then ynh_setup_source --dest_dir=$final_path/ --source_id="armv7_$(lsb_release --codename --short)" + + # Fix multi-instance support + for f in $(ls $final_path/bin); do + if ! [[ $f =~ "__" ]]; then + ynh_replace_special_string --match_string='#!/opt/yunohost/matrix-synapse' --replace_string='#!'$final_path --target_file=$final_path/bin/$f + fi + done else # Install virtualenv if it don't exist test -e $final_path/bin/python3 || python3 -m venv $final_path diff --git a/scripts/upgrade b/scripts/upgrade index f5fc528..b4b88a1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,19 +137,20 @@ then if [ -n "$(uname -m | grep arm)" ] then - # Fix multi-instance support - for f in $(ls $final_path/bin); do - if ! [[ $f =~ "__" ]]; then - ynh_replace_special_string --match_string='#!/opt/yunohost/matrix-synapse' --replace_string='#!'$final_path --target_file=$final_path/bin/* - fi - done - # Clean old file, sometimes it could make some big issues if we don't do this!! ynh_secure_remove --file=$final_path/bin ynh_secure_remove --file=$final_path/lib ynh_secure_remove --file=$final_path/include ynh_secure_remove --file=$final_path/share + ynh_setup_source --dest_dir=$final_path/ --source_id="armv7_$(lsb_release --codename --short)" + + # Fix multi-instance support + for f in $(ls $final_path/bin); do + if ! [[ $f =~ "__" ]]; then + ynh_replace_special_string --match_string='#!/opt/yunohost/matrix-synapse' --replace_string='#!'$final_path --target_file=$final_path/bin/$f + fi + done else # Install virtualenv if it don't exist test -e $final_path/bin/python3 || python3 -m venv $final_path From 4dc7d88f06af458e44caaf27b0a833e45e1332f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 3 Apr 2020 20:57:21 +0000 Subject: [PATCH 5/9] Upgrade synapse to 1.12.3 --- README.md | 2 +- conf/armv7_stretch.src | 4 ++-- manifest.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1760e30..683e7f2 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.12.2 +**Shipped version:** 1.12.3 ## Configuration diff --git a/conf/armv7_stretch.src b/conf/armv7_stretch.src index 63449f5..e203c65 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.12.2/matrix-synapse_1.12.2-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=e0ed0e3c058b7b8ddb2be10b55b1f421bef76a60f8b478004ca619d673125a79 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.12.3/matrix-synapse_1.12.3-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=b18e314d312ccd69fa7aec295374515cd669d62041bf7ee1a304bc77105f9eda # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index e005489..6632ca6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Instant messaging server who use matrix", "fr": "Un serveur de messagerie instantané basé sur matrix" }, - "version": "1.12.2~ynh1", + "version": "1.12.3~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { From 8caa135d57970e084faf32a3322b1dc7b31f6704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Mon, 6 Apr 2020 09:51:07 +0200 Subject: [PATCH 6/9] Fix pipupgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b4b88a1..ec2c04f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -170,7 +170,7 @@ then # Actually there are no official way to upgrade all package # This problem is documented here : https://github.com/pypa/pip/issues/4551 # One best way is actually to use pipupgrade - pipupgrade --yes --pip-path /tmp/matrix-synapse/bin/pip + pipupgrade --yes --pip-path $final_path/bin/pip pip3 install --upgrade matrix-synapse==$upstream_version matrix-synapse-ldap3 From df50418e765c483a4e67013af5eccb473f056007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 11 Apr 2020 14:07:00 +0200 Subject: [PATCH 7/9] Update commit for upgrade in checkprocess --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 2c18177..700a255 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,7 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=db374d2bff981d2660ebdac52ee77c684383c00d - upgrade=1 from_commit=0b8f2d4423bc48a1509dc0be4e231f02a0046eca + upgrade=1 from_commit=d7a17a24e73b1ae87802663461f477334b53d231 backup_restore=1 multi_instance=1 incorrect_path=0 @@ -24,5 +24,5 @@ ;;; Upgrade options ; commit=db374d2bff981d2660ebdac52ee77c684383c00d name=Fix postgresql helper from old_version_for_CI_2 branch - ; commit=0b8f2d4423bc48a1509dc0be4e231f02a0046eca + ; commit=d7a17a24e73b1ae87802663461f477334b53d231 name=Migrate from self signed certificate to cert managed by Yunohost From 669be06eaa62fecba1b341cb4e28690e653c6f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 21 Apr 2020 21:03:15 +0200 Subject: [PATCH 8/9] Don't use pipupgrade for now --- scripts/upgrade | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ec2c04f..cf4ba14 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -161,18 +161,9 @@ then # We set all necessary environement variable to create a python virtualenvironnement. source $final_path/bin/activate - pip3 install --upgrade setuptools wheel pipupgrade + pip3 install --upgrade setuptools wheel pip3 install --upgrade cffi ndg-httpsclient psycopg2 lxml jinja2 - - # Some pip package could be outdated and pip wont upgrade it automatically. - # This could be a security issue when some package have a vulnerability. - # It was by example the case with Twisted. - # Actually there are no official way to upgrade all package - # This problem is documented here : https://github.com/pypa/pip/issues/4551 - # One best way is actually to use pipupgrade - pipupgrade --yes --pip-path $final_path/bin/pip - - pip3 install --upgrade 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 deactivate From 0eb4cd7ace3abaa843ea287ba48fb61a35d1cdfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 22 Apr 2020 16:25:42 +0200 Subject: [PATCH 9/9] Fix check_process --- check_process | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index 700a255..03fa32f 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,7 @@ setup_public=1 upgrade=1 upgrade=1 from_commit=db374d2bff981d2660ebdac52ee77c684383c00d - upgrade=1 from_commit=d7a17a24e73b1ae87802663461f477334b53d231 + upgrade=1 from_commit=0571cc85334408a98f6766881b580a040fa6398a backup_restore=1 multi_instance=1 incorrect_path=0 @@ -24,5 +24,5 @@ ;;; Upgrade options ; commit=db374d2bff981d2660ebdac52ee77c684383c00d name=Fix postgresql helper from old_version_for_CI_2 branch - ; commit=d7a17a24e73b1ae87802663461f477334b53d231 - name=Migrate from self signed certificate to cert managed by Yunohost + ; commit=0571cc85334408a98f6766881b580a040fa6398a + name=Migrate from self signed certificate to cert managed by Yunohost from old_version_for_CI_3 branch