From a05b4909c3db20662dd1e9a9303fcf321c07c2f5 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Sun, 13 Sep 2020 20:23:55 +0200 Subject: [PATCH 01/11] add app-service registration folder --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 48983e8..9696f53 100644 --- a/scripts/install +++ b/scripts/install @@ -175,6 +175,7 @@ ynh_script_progression --message="Setting up source files..." --weight=50 mkdir -p /var/lib/matrix-$app mkdir -p /var/log/matrix-$app mkdir -p /etc/matrix-$app/conf.d +mkdir -p /etc/matrix-$app/app-service # Install synapse in virtualenv install_sources From 2ea61a0e34a6f45fe4f66acc4ab12d3b3ad94be7 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Sun, 13 Sep 2020 20:59:30 +0200 Subject: [PATCH 02/11] fix set_admin_user using @user_name:server_name user namer in the synapse postgre database is @user_name:server_name and not @user_name:domain --- actions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions.toml b/actions.toml index 42932d4..6224bd9 100644 --- a/actions.toml +++ b/actions.toml @@ -21,10 +21,10 @@ description = "Close the ports range 49153:49193 with TCP and UDP. (Undo \"Open [set_admin_user] name = "Set a user as admin" -command = "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME domain)'\")\" == 'UPDATE 1' ]]" +command = "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME server_name)'\")\" == 'UPDATE 1' ]]" user = "root" accepted_return_codes = [0] -description = "Set a synapse user as admin in the synapse server. It probably usefull only to manage the community function." +description = "Set a synapse user as admin in the synapse postgreSQL database. It is mainly required to manage the community function." [set_admin_user.arguments] [set_admin_user.arguments.username] From 2711bd643aa295e35950067c8e5b08d674621cb0 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Tue, 15 Sep 2020 22:44:09 +0200 Subject: [PATCH 03/11] upgrade ensures app-service folder exists --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index d1a6b80..0cdd835 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -385,6 +385,9 @@ cp ../sources/update_synapse_for_appservice.sh $final_path/ ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/update_synapse_for_appservice.sh" +# Ensure app-service folder has exists (Migration) +mkdir -p /etc/matrix-synapse/app-service + #================================================= # ADVERTISE SERVICE IN ADMIN PANEL #================================================= From 51e4a27875a2c0f217c6e8c2c73e562b1338c843 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Fri, 18 Sep 2020 22:17:22 +0200 Subject: [PATCH 04/11] Update scripts/upgrade Co-authored-by: Josue-T --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0cdd835..fddceec 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -386,7 +386,7 @@ ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$ ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/update_synapse_for_appservice.sh" # Ensure app-service folder has exists (Migration) -mkdir -p /etc/matrix-synapse/app-service +mkdir -p /etc/matrix-$app/app-service #================================================= # ADVERTISE SERVICE IN ADMIN PANEL From 49c430850ea4a631ba2f36a16d451cef344f97a5 Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Fri, 18 Sep 2020 22:17:31 +0200 Subject: [PATCH 05/11] Update actions.toml Co-authored-by: Josue-T --- actions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions.toml b/actions.toml index 6224bd9..d6721fc 100644 --- a/actions.toml +++ b/actions.toml @@ -24,7 +24,7 @@ name = "Set a user as admin" command = "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME server_name)'\")\" == 'UPDATE 1' ]]" user = "root" accepted_return_codes = [0] -description = "Set a synapse user as admin in the synapse postgreSQL database. It is mainly required to manage the community function." +description = "Set a synapse user as admin in the synapse server. It is mainly required to manage the community function." [set_admin_user.arguments] [set_admin_user.arguments.username] From cf5e62a105bca72193589d6e1ad57d4fd9d72d4d Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Sun, 20 Sep 2020 13:58:22 +0200 Subject: [PATCH 06/11] create /etc/matrix-$app/app-service when restoring --- scripts/restore | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/restore b/scripts/restore index 3b3815d..60ada9d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -77,6 +77,7 @@ ynh_install_app_dependencies $dependances ynh_script_progression --message="Restoring directory and configuration..." --weight=10 ynh_restore +mkdir -p /etc/matrix-$app/app-service # Check that the good python version is installed # If not upgrade the source From 4c68195030758f1e6e68de70e4f4e77c1ac153e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 22 Sep 2020 22:55:30 +0000 Subject: [PATCH 07/11] Upgrade synapse to 1.20.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 112e0ec..c4ecae9 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.19.3 +**Shipped version:** 1.20.0 ## Configuration diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index f791800..9a92abd 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.19.3/matrix-synapse_1.19.3-buster-bin1_armv7l.tar.gz -SOURCE_SUM=34738e934c99aeb784682190a8852ad42698c72554a5249093a3110c221bbb73 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.20.0/matrix-synapse_1.20.0-buster-bin1_armv7l.tar.gz +SOURCE_SUM=2835887791b3a83979fc8542472db90b3fedc2fec77efce6a9d62af8afd6df2c # (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 02aa362..5086251 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.19.3/matrix-synapse_1.19.3-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=35b16127fe402aa0f069e01038f1f30bbf6ee9b81c666a91d7d272259b69c3b3 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.20.0/matrix-synapse_1.20.0-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=3b4f9943a1bed3655f6ecc2173034406f7155dff49c6ceef3a779a49d73b88d1 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index 5594952..02e1755 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.19.3~ynh1", + "version": "1.20.0~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { From c5ef944076f5465098654229fb88eb125c42b119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 24 Sep 2020 00:23:26 +0200 Subject: [PATCH 08/11] Fix well-known client configuration --- conf/server_name.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/server_name.conf b/conf/server_name.conf index fdf553e..4555203 100644 --- a/conf/server_name.conf +++ b/conf/server_name.conf @@ -5,8 +5,9 @@ location /.well-known/matrix/server { } location /.well-known/matrix/client { - return 200 '{"im.vector.riot.jitsi": - {"preferredDomain": "__JITSI_SERVER_ADDR__"} + return 200 '{ + "m.homeserver": { "base_url": "https://__DOMAIN__" }, + "im.vector.riot.jitsi": {"preferredDomain": "__JITSI_SERVER_ADDR__"} }'; add_header Content-Type application/json; add_header Access-Control-Allow-Origin '*'; From 53865af2e52c1ca14534d8381c4d4a12983f9e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Fri, 25 Sep 2020 22:49:25 +0000 Subject: [PATCH 09/11] Upgrade synapse to 1.20.1 --- 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 c4ecae9..d37938a 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.20.0 +**Shipped version:** 1.20.1 ## Configuration diff --git a/conf/armv7_buster.src b/conf/armv7_buster.src index 9a92abd..80a6e37 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.20.0/matrix-synapse_1.20.0-buster-bin1_armv7l.tar.gz -SOURCE_SUM=2835887791b3a83979fc8542472db90b3fedc2fec77efce6a9d62af8afd6df2c +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.20.1/matrix-synapse_1.20.1-buster-bin1_armv7l.tar.gz +SOURCE_SUM=89a895a4aace87f3a7782aff0589dbc61a6dd8beb08f7d72715e3e4670e28a97 # (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 5086251..aeebf67 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.20.0/matrix-synapse_1.20.0-stretch-bin1_armv7l.tar.gz -SOURCE_SUM=3b4f9943a1bed3655f6ecc2173034406f7155dff49c6ceef3a779a49d73b88d1 +SOURCE_URL=https://github.com/YunoHost-Apps/synapse_python_build/releases/download/v1.20.1/matrix-synapse_1.20.1-stretch-bin1_armv7l.tar.gz +SOURCE_SUM=c6bb1e8f29aeaca836eccf56067a26835db7881a767d99775e572393438d4cc7 # (Optional) Program to check the integrity (sha256sum, md5sum...) # default: sha256 SOURCE_SUM_PRG=sha256sum diff --git a/manifest.json b/manifest.json index 02e1755..eb70a1f 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.20.0~ynh1", + "version": "1.20.1~ynh1", "url": "http://matrix.org", "license": "Apache-2.0", "maintainer": { From 42a60c24c0473d8c648aa411c8001f84b2836b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 26 Sep 2020 16:40:24 +0200 Subject: [PATCH 10/11] Backup nginx config if edited --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index fddceec..98d9957 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -323,6 +323,7 @@ ynh_add_fpm_config # Create .well-known redirection for access by federation if yunohost --output-as plain domain list | grep -q "^$server_name$" then + ynh_backup_if_checksum_is_different --file="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf" cp ../conf/server_name.conf /etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf ynh_replace_string --match_string=__DOMAIN__ --replace_string=$domain --target_file="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf" ynh_replace_string --match_string=__PORT__ --replace_string=$synapse_tls_port --target_file="/etc/nginx/conf.d/${server_name}.d/${app}_server_name.conf" From f6d3da2317418e05dc6b4f9756ebc90eb759aa13 Mon Sep 17 00:00:00 2001 From: utzer Date: Tue, 6 Oct 2020 20:41:23 +0200 Subject: [PATCH 11/11] Riot was renamed to element Change the link from riot to element. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d37938a..d5f50c4 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ The script to build the binary is also available. ### Web client -If you want a web client you can also install riot with this package: https://github.com/YunoHost-Apps/riot_ynh . +If you want a web client you can also install riot with this package: https://github.com/YunoHost-Apps/element_ynh . ### Access by federation