From 57ed7018dd95b7ff5c8aefb7310f3dea005661dd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 5 Feb 2022 23:08:00 +0100 Subject: [PATCH 01/13] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 852de38..03b75a3 100644 --- a/check_process +++ b/check_process @@ -6,7 +6,7 @@ is_public=1 ; Checks pkg_linter=1 - setup_sub_dir=1 + setup_sub_dir=0 setup_root=1 setup_nourl=0 setup_private=1 From 9be76c1b185c0cf0669a8be4c54fe8c49bdf0b73 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 21 Feb 2022 13:59:39 +0100 Subject: [PATCH 02/13] Fix --- check_process | 1 + conf/.env | 2 +- manifest.json | 12 +++++++++++- scripts/change_url | 2 +- scripts/install | 17 +++-------------- scripts/upgrade | 14 ++++++-------- 6 files changed, 23 insertions(+), 25 deletions(-) diff --git a/check_process b/check_process index 03b75a3..9ec9afe 100644 --- a/check_process +++ b/check_process @@ -1,6 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" + synapse_domain="synapse.domain.tld" path="/path" admin="john" is_public=1 diff --git a/conf/.env b/conf/.env index 8c774b2..3be4fc3 100644 --- a/conf/.env +++ b/conf/.env @@ -2,7 +2,7 @@ # If you set this setting, the user will not be able to select # the server and have to use synapse-admin with this server. -REACT_APP_SERVER=https://__DOMAIN__ +REACT_APP_SERVER=https://__SYNAPSE_DOMAIN__ #Define the port to avoid collisions on port 3000 PORT=__PORT__ diff --git a/manifest.json b/manifest.json index 2e95c53..3c477ef 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Admin UI for Synapse", "fr": "Admin UI pour Synapse" }, - "version": "0.8.3~ynh1", + "version": "0.8.3~ynh2", "url": "https://github.com/Awesome-Technologies/synapse-admin", "upstream": { "license": "Apache-2.0", @@ -30,6 +30,16 @@ "name": "domain", "type": "domain" }, + { + "name": "synapse_domain", + "type": "domain", + "ask": { + "en": "The domain of your Synapse server", + "fr": "Le domain de votre serveur Synapse" + }, + "example": "matrix.example.com", + "default": "" + }, { "name": "is_public", "type": "boolean", diff --git a/scripts/change_url b/scripts/change_url index 9d6c716..18ec2f6 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -70,7 +70,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=stop --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF diff --git a/scripts/install b/scripts/install index c3b0557..dec0259 100644 --- a/scripts/install +++ b/scripts/install @@ -23,7 +23,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC -#synapse_domain=$(yunohost app setting synapse domain) +synapse_domain=$YNH_APP_ARG_SYNAPSE_DOMAIN + app=$YNH_APP_INSTANCE_NAME #================================================= @@ -44,6 +45,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=synapse_domain --value=$synapse_domain #================================================= # STANDARD MODIFICATIONS @@ -84,12 +86,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir=$final_path -#git clone --quiet https://github.com/Awesome-Technologies/synapse-admin.git -b master "$final_path" -# Reset branch to the level of update we needed -#pushd "$final_path" -# git reset --hard --quiet $version_commit -#popd - chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" @@ -102,13 +98,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# ADD A CONFIGURATION -#================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 - -ynh_add_config --template="../conf/.env" --destination="$final_path/.env" - #================================================= # SPECIFIC SETUP #============================================== diff --git a/scripts/upgrade b/scripts/upgrade index a186602..3028825 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) +synapse_domain=$(ynh_app_setting_get --app=$app --key=synapse_domain) #================================================= # CHECK VERSION @@ -46,6 +47,10 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +if ynh_compare_current_package_version --comparison le --version 0.8.3~ynh2 +then + ynh_die --message="Upgrade from version 0.8.3 is not possible. You must uninstall and reinstall Synapse-admin package manually" +fi # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -78,14 +83,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=160 - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env" - - #pushd "$final_path" - # git fetch --quiet - # git checkout master --quiet - # git pull --quiet - # git reset --hard $version_commit --quiet - #popd + ynh_setup_source --dest_dir="$final_path" fi chmod 750 "$final_path" From dde0fb13574c6475dbdd5ae1f8afd0a963891a55 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 21 Feb 2022 12:59:43 +0000 Subject: [PATCH 03/13] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cc5282a..511ccbd 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Admin UI for Synapse -**Shipped version:** 0.8.3~ynh1 +**Shipped version:** 0.8.3~ynh2 diff --git a/README_fr.md b/README_fr.md index ae2daa9..af09806 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Admin UI pour Synapse -**Version incluse :** 0.8.3~ynh1 +**Version incluse :** 0.8.3~ynh2 From 16e8fa023c41e88327b7061a9442df71137ad1fc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 21 Feb 2022 14:01:29 +0100 Subject: [PATCH 04/13] Fix --- check_process | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 9ec9afe..51aecc3 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" - synapse_domain="synapse.domain.tld" + synapse_domain="synapse.example.com" path="/path" admin="john" is_public=1 diff --git a/manifest.json b/manifest.json index 3c477ef..efc1d81 100644 --- a/manifest.json +++ b/manifest.json @@ -37,7 +37,7 @@ "en": "The domain of your Synapse server", "fr": "Le domain de votre serveur Synapse" }, - "example": "matrix.example.com", + "example": "synapse.example.com", "default": "" }, { From b18fa74b8610e86f0fddec2dbac7b667625cb42b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 21 Feb 2022 14:40:30 +0100 Subject: [PATCH 05/13] Update nginx.conf --- conf/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 67627c3..db7a0f1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,11 +17,11 @@ location / { } location /.well-known/matrix/server { - return 200 '{ "m.server": "__DOMAIN__:443" }'; + return 200 '{ "m.server": "__SYNAPSE_DOMAIN__:443" }'; } location /.well-known/matrix/client { - return 200 '{ "m.homeserver": { "base_url": "https://__DOMAIN__" } }'; + return 200 '{ "m.homeserver": { "base_url": "https://__SYNAPSE_DOMAIN__" } }'; } location /_matrix { From 43525199c0e8cc2fabdfa0bfa435248bc197272f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 21 Feb 2022 15:18:35 +0100 Subject: [PATCH 06/13] Update nginx.conf --- conf/nginx.conf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index db7a0f1..5be9ffb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -16,6 +16,10 @@ location / { include conf.d/yunohost_panel.conf.inc; } +location /.well-known/acme-challenge { + proxy_pass http://127.0.0.1:8009; +} + location /.well-known/matrix/server { return 200 '{ "m.server": "__SYNAPSE_DOMAIN__:443" }'; } @@ -25,15 +29,15 @@ location /.well-known/matrix/client { } location /_matrix { - proxy_pass http://localhost:8008; + proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_read_timeout 600; client_max_body_size 100M; } -location /_synapse/admin { - proxy_pass http://localhost:8008; +location /_synapse { + proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_read_timeout 600; From ce17cd7bf808a9752ee17e60554bc5c29335dd99 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 21 Feb 2022 15:24:53 +0100 Subject: [PATCH 07/13] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 5be9ffb..79b2fd8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -36,7 +36,7 @@ location /_matrix { client_max_body_size 100M; } -location /_synapse { +location /_synapse/admin { proxy_pass http://127.0.0.1:8008; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; From 0e87284530b953ef390cc230914626ef56f37899 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 21 Feb 2022 15:26:33 +0100 Subject: [PATCH 08/13] 0.8.5 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index d210988..3670edf 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Awesome-Technologies/synapse-admin/archive/refs/tags/0.8.4.tar.gz -SOURCE_SUM=5c49b539587bb58ccddf0aa102215dfb963b848cab9e8078f1ad5d626ffda98f +SOURCE_URL=https://github.com/Awesome-Technologies/synapse-admin/archive/refs/tags/0.8.5.tar.gz +SOURCE_SUM=9d3a3fd8f110e937061e37ebf2298f824f171020df8933a229f2ec40684394a8 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true \ No newline at end of file diff --git a/manifest.json b/manifest.json index efc1d81..d11f7ad 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Admin UI for Synapse", "fr": "Admin UI pour Synapse" }, - "version": "0.8.3~ynh2", + "version": "0.8.5~ynh2", "url": "https://github.com/Awesome-Technologies/synapse-admin", "upstream": { "license": "Apache-2.0", From 817481d9f8b03b193261820acc01f9b4a368dab1 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 21 Feb 2022 14:26:37 +0000 Subject: [PATCH 09/13] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 511ccbd..68850d2 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Admin UI for Synapse -**Shipped version:** 0.8.3~ynh2 +**Shipped version:** 0.8.5~ynh2 diff --git a/README_fr.md b/README_fr.md index af09806..33f47ba 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Admin UI pour Synapse -**Version incluse :** 0.8.3~ynh2 +**Version incluse :** 0.8.5~ynh2 From b16eb89e5dd93b3d506f3c864a82f58a054716c3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 21 Feb 2022 15:29:25 +0100 Subject: [PATCH 10/13] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 51aecc3..6a1ee96 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" - synapse_domain="synapse.example.com" + synapse_domain="synapse.tld" path="/path" admin="john" is_public=1 From b482bdb8a9a01f65b55f3dc8909aaf31160975ec Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 21 Feb 2022 15:30:02 +0100 Subject: [PATCH 11/13] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 6a1ee96..86ae03c 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Test complet ; Manifest domain="domain.tld" - synapse_domain="synapse.tld" + synapse_domain="sub.domain.tld" path="/path" admin="john" is_public=1 From d8df6fb3b92cf82befa753b3652bd3f442794750 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 21 Feb 2022 15:50:36 +0100 Subject: [PATCH 12/13] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d11f7ad..92c9e6f 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Admin UI for Synapse", "fr": "Admin UI pour Synapse" }, - "version": "0.8.5~ynh2", + "version": "0.8.5~ynh1", "url": "https://github.com/Awesome-Technologies/synapse-admin", "upstream": { "license": "Apache-2.0", From a9f65bf7a2ccd882840adcebf8437905c935e6ea Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 21 Feb 2022 14:50:41 +0000 Subject: [PATCH 13/13] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 68850d2..ee4bf8e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Admin UI for Synapse -**Shipped version:** 0.8.5~ynh2 +**Shipped version:** 0.8.5~ynh1 diff --git a/README_fr.md b/README_fr.md index 33f47ba..7d7c422 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Admin UI pour Synapse -**Version incluse :** 0.8.5~ynh2 +**Version incluse :** 0.8.5~ynh1