From 35ac3ec21685fb901f43ca336a5b779941261994 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sun, 14 Jul 2024 03:55:36 +0200 Subject: [PATCH 1/4] Upgrade to v1.21.2 (#32) --- README.md | 4 ++-- README_es.md | 4 ++-- README_eu.md | 4 ++-- README_fr.md | 4 ++-- README_gl.md | 4 ++-- README_zh_Hans.md | 4 ++-- manifest.toml | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 7736739..c62bd2f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Fluffychat for YunoHost -[![Integration level](https://dash.yunohost.org/integration/fluffychat.svg)](https://dash.yunohost.org/appci/app/fluffychat) ![Working status](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/fluffychat.svg)](https://ci-apps.yunohost.org/ci/apps/fluffychat/) ![Working status](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) [![Install Fluffychat with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fluffychat) @@ -20,7 +20,7 @@ FluffyChat is an open source, nonprofit and cute [[matrix](https://matrix.org)] The goal of the app is to create an easy to use instant messenger which is open source and accessible for everyone. -**Shipped version:** 1.21.1~ynh1 +**Shipped version:** 1.21.2~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index 0621c64..eaf4a01 100644 --- a/README_es.md +++ b/README_es.md @@ -5,7 +5,7 @@ No se debe editar a mano. # Fluffychat para Yunohost -[![Nivel de integración](https://dash.yunohost.org/integration/fluffychat.svg)](https://dash.yunohost.org/appci/app/fluffychat) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/fluffychat.svg)](https://ci-apps.yunohost.org/ci/apps/fluffychat/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) [![Instalar Fluffychat con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fluffychat) @@ -20,7 +20,7 @@ FluffyChat is an open source, nonprofit and cute [[matrix](https://matrix.org)] The goal of the app is to create an easy to use instant messenger which is open source and accessible for everyone. -**Versión actual:** 1.21.1~ynh1 +**Versión actual:** 1.21.2~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 7d64e46..01db27a 100644 --- a/README_eu.md +++ b/README_eu.md @@ -5,7 +5,7 @@ EZ editatu eskuz. # Fluffychat YunoHost-erako -[![Integrazio maila](https://dash.yunohost.org/integration/fluffychat.svg)](https://dash.yunohost.org/appci/app/fluffychat) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) +[![Integrazio maila](https://dash.yunohost.org/integration/fluffychat.svg)](https://ci-apps.yunohost.org/ci/apps/fluffychat/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) [![Instalatu Fluffychat YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fluffychat) @@ -20,7 +20,7 @@ FluffyChat is an open source, nonprofit and cute [[matrix](https://matrix.org)] The goal of the app is to create an easy to use instant messenger which is open source and accessible for everyone. -**Paketatutako bertsioa:** 1.21.1~ynh1 +**Paketatutako bertsioa:** 1.21.2~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index cf2769d..2ca1c71 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main. # Fluffychat pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/fluffychat.svg)](https://dash.yunohost.org/appci/app/fluffychat) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/fluffychat.svg)](https://ci-apps.yunohost.org/ci/apps/fluffychat/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) [![Installer Fluffychat avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fluffychat) @@ -20,7 +20,7 @@ FluffyChat est un client [[matrix](https://matrix.org)] open-source, à but non Le but de cette app est de créer un client de messagerie instantannée facile d'utilisation, open-source et accessible pour tout le monde. -**Version incluse :** 1.21.1~ynh1 +**Version incluse :** 1.21.2~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index c3eeb40..768f1df 100644 --- a/README_gl.md +++ b/README_gl.md @@ -5,7 +5,7 @@ NON debe editarse manualmente. # Fluffychat para YunoHost -[![Nivel de integración](https://dash.yunohost.org/integration/fluffychat.svg)](https://dash.yunohost.org/appci/app/fluffychat) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/fluffychat.svg)](https://ci-apps.yunohost.org/ci/apps/fluffychat/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) [![Instalar Fluffychat con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fluffychat) @@ -20,7 +20,7 @@ FluffyChat is an open source, nonprofit and cute [[matrix](https://matrix.org)] The goal of the app is to create an easy to use instant messenger which is open source and accessible for everyone. -**Versión proporcionada:** 1.21.1~ynh1 +**Versión proporcionada:** 1.21.2~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index f44b7af..8caaf97 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -5,7 +5,7 @@ # YunoHost 上的 Fluffychat -[![集成程度](https://dash.yunohost.org/integration/fluffychat.svg)](https://dash.yunohost.org/appci/app/fluffychat) ![工作状态](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) +[![集成程度](https://dash.yunohost.org/integration/fluffychat.svg)](https://ci-apps.yunohost.org/ci/apps/fluffychat/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/fluffychat.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/fluffychat.maintain.svg) [![使用 YunoHost 安装 Fluffychat](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fluffychat) @@ -20,7 +20,7 @@ FluffyChat is an open source, nonprofit and cute [[matrix](https://matrix.org)] The goal of the app is to create an easy to use instant messenger which is open source and accessible for everyone. -**分发版本:** 1.21.1~ynh1 +**分发版本:** 1.21.2~ynh1 **演示:** diff --git a/manifest.toml b/manifest.toml index 5bc7c0f..ff5fb68 100644 --- a/manifest.toml +++ b/manifest.toml @@ -9,7 +9,7 @@ description.gl = "Cliente para mensaxería Matrix" description.ca = "Client de missatgeria Matrix" description.fr = "Client de messagerie Matrix" -version = "1.21.1~ynh1" +version = "1.21.2~ynh1" maintainers = [ "OniriCorpe" ] @@ -63,8 +63,8 @@ ram.runtime = "50M" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/krille-chan/fluffychat/releases/download/v1.21.1/fluffychat-web.tar.gz" - sha256 = "8ba1a1e1f380e2a34baed7f3c0ddc5bf98cda86831a0aafcc03ac9e1135b8bc7" + url = "https://github.com/krille-chan/fluffychat/releases/download/v1.21.2/fluffychat-web.tar.gz" + sha256 = "2b0d93151829e48df3793d950fec162e2af17964c55f7b19a36131db94626c46" in_subdir = 2 autoupdate.asset = "fluffychat-web.tar.gz" From 246f7232fb4d982fbe7f5ad6b01f33b8e183a39a Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 30 Aug 2024 22:55:10 +0200 Subject: [PATCH 2/4] [autopatch] Automatic patch attempt for helpers 2.1 --- .gitignore | 1 + doc/.DS_Store | Bin 6148 -> 0 bytes manifest.toml | 4 +++- scripts/_common.sh | 14 +------------ scripts/backup | 17 ++++------------ scripts/change_url | 14 ++++--------- scripts/config | 12 +++++------ scripts/install | 23 ++++++++------------- scripts/remove | 12 +++-------- scripts/restore | 25 ++++++++--------------- scripts/upgrade | 31 +++++++++++------------------ sources/extra_files/app/.gitignore | 2 -- sources/patches/.gitignore | 2 -- 13 files changed, 49 insertions(+), 108 deletions(-) delete mode 100644 doc/.DS_Store delete mode 100644 sources/extra_files/app/.gitignore delete mode 100644 sources/patches/.gitignore diff --git a/.gitignore b/.gitignore index 783a4ae..8f144f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ *.sw[op] +.DS_Store diff --git a/doc/.DS_Store b/doc/.DS_Store deleted file mode 100644 index b5e9f0085dbef67b8e881ecebc38d1c00cec3684..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!Ab)$5S`SjyA-hpL65n3>!GDpPr_2`!JDw62Nm6Q7rRh5(%o9LR`xgakNg6E z$C)IplL;C(lJyV@Jw^;EWY7f# z`CK$R{v!jlcNN^T8|Xuf>pjqmp0C`SQs?vAoR>Qj-6T97mCoc zqhIQ95S~G" --replace_string="" --target_file="$install_dir/index.html" +ynh_replace --match="" --replace="" --file="$install_dir/index.html" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression "Change of URL completed for $app" diff --git a/scripts/config b/scripts/config index b3fd972..0d81cba 100644 --- a/scripts/config +++ b/scripts/config @@ -6,13 +6,13 @@ source /usr/share/yunohost/helpers -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS #================================================= -install_dir=$(ynh_app_setting_get --app="$app" --key=install_dir) +install_dir=$(ynh_app_setting_get --key=install_dir) #================================================= # SPECIFIC GETTERS @@ -20,7 +20,7 @@ install_dir=$(ynh_app_setting_get --app="$app" --key=install_dir) get__default_matrix_server() { - default_matrix_server=$(ynh_app_setting_get --app="$app" --key=default_matrix_server) + default_matrix_server=$(ynh_app_setting_get --key=default_matrix_server) echo "$default_matrix_server" } @@ -34,12 +34,10 @@ set__default_matrix_server() { old_value=${old[default_matrix_server]} # patching main.dart.js to replace the default matrix server - ynh_replace_string --match_string="=\"$old_value\"" --replace_string="=\"$default_matrix_server\"" --target_file="$install_dir/main.dart.js" + ynh_replace --match="=\"$old_value\"" --replace="=\"$default_matrix_server\"" --file="$install_dir/main.dart.js" - ynh_app_setting_set --app="$app" --key=default_matrix_server --value="$default_matrix_server" + ynh_app_setting_set --key=default_matrix_server --value="$default_matrix_server" } -#================================================= -# GENERIC FINALIZATION #================================================= ynh_app_config_run "$1" diff --git a/scripts/install b/scripts/install index 4980e9f..7f9e3a1 100755 --- a/scripts/install +++ b/scripts/install @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers @@ -17,36 +11,35 @@ source /usr/share/yunohost/helpers default_matrix_server=${default_matrix_server#*://} # remove any trailing slash default_matrix_server=${default_matrix_server%/} -ynh_app_setting_set --app="$app" --key=default_matrix_server --value="$default_matrix_server" +ynh_app_setting_set --key=default_matrix_server --value="$default_matrix_server" #================================================= # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=1 +ynh_script_progression "Setting up source files..." # Download, check integrity, uncompress and patch the source from manifest.toml ynh_setup_source --dest_dir="$install_dir" # remove potential trailing slash to avoid double slashes path_without_trailing_slash=${path%/} -ynh_replace_string --match_string="" --replace_string="" --target_file="$install_dir/index.html" +ynh_replace --match="" --replace="" --file="$install_dir/index.html" # patching main.dart.js to replace the default matrix server -ynh_replace_string --match_string="=\"matrix.org\"" --replace_string="=\"$default_matrix_server\"" --target_file="$install_dir/main.dart.js" - -chown -R "www-data:www-data" "$install_dir" +ynh_replace --match="=\"matrix.org\"" --replace="=\"$default_matrix_server\"" --file="$install_dir/main.dart.js" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "www-data:www-data" "$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 +ynh_script_progression "Adding system configurations related to $app..." # Create a dedicated NGINX config using the conf/nginx.conf template -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression "Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index ad629d0..33f9552 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,23 +1,17 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 +ynh_script_progression "Removing system configurations related to $app..." -ynh_remove_nginx_config +ynh_config_remove_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index cd7a2ea..bfe5eae 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -13,30 +7,27 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=1 +ynh_script_progression "Restoring the app main directory..." -ynh_restore_file --origin_path="$install_dir" - -chown -R "www-data:www-data" "$install_dir" +ynh_restore "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "www-data:www-data" "$install_dir" #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 +ynh_script_progression "Restoring system configurations related to $app..." -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +ynh_script_progression "Reloading NGINX web server..." -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemctl --service=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index 442dc95..fe315ea 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,20 +1,13 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -upgrade_type=$(ynh_check_app_version_changed) - # if we update from a version prior to the config panel, create new setting +# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=default_matrix_server --value="matrix.org" if [ -z "${default_matrix_server:-}" ]; then default_matrix_server="matrix.org" - ynh_app_setting_set --app="$app" --key=default_matrix_server --value="$default_matrix_server" + ynh_app_setting_set --key=default_matrix_server --value="$default_matrix_server" fi #================================================= @@ -23,32 +16,32 @@ fi # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] +# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed +if ynh_app_upstream_version_changed then - ynh_script_progression --message="Upgrading source files..." --weight=1 + ynh_script_progression "Upgrading source files..." # Download, check integrity, uncompress and patch the source from manifest.toml - ynh_setup_source --dest_dir="$install_dir" --full_replace=1 + ynh_setup_source --dest_dir="$install_dir" --full_replace # remove potential trailing slash to avoid double slashes path_without_trailing_slash=${path%/} - ynh_replace_string --match_string="" --replace_string="" --target_file="$install_dir/index.html" + ynh_replace --match="" --replace="" --file="$install_dir/index.html" # patching main.dart.js to replace the default matrix server - ynh_replace_string --match_string="=\"matrix.org\"" --replace_string="=\"$default_matrix_server\"" --target_file="$install_dir/main.dart.js" + ynh_replace --match="=\"matrix.org\"" --replace="=\"$default_matrix_server\"" --file="$install_dir/main.dart.js" fi -chown -R "www-data:www-data" "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "www-data:www-data" "$install_dir" #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 +ynh_script_progression "Upgrading system configurations related to $app..." -ynh_add_nginx_config +ynh_config_add_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression "Upgrade of $app completed" diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/extra_files/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/patches/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] From 3eede2c0aec4c0fc7beb61719bde6185c2f1135a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 1 Sep 2024 18:04:55 +0200 Subject: [PATCH 3/4] cleaning --- manifest.toml | 2 +- scripts/backup | 1 - scripts/change_url | 1 - scripts/config | 2 -- scripts/install | 5 ----- scripts/restore | 2 -- scripts/upgrade | 29 ++++++++--------------------- 7 files changed, 9 insertions(+), 33 deletions(-) diff --git a/manifest.toml b/manifest.toml index 10a8efe..bd7c0f0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -22,7 +22,7 @@ code = "https://github.com/krille-chan/fluffychat" fund = "https://ko-fi.com/krille" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/backup b/scripts/backup index af443d9..5d6d43d 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/change_url b/scripts/change_url index f78cea0..fcaacb6 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -14,7 +14,6 @@ ynh_config_change_url_nginx # SPECIFIC MODIFICATIONS #================================================= -# remove potential trailing slash to avoid double slashes path_without_trailing_slash=${path%/} ynh_replace --match="" --replace="" --file="$install_dir/index.html" diff --git a/scripts/config b/scripts/config index 0d81cba..4f7153c 100644 --- a/scripts/config +++ b/scripts/config @@ -6,8 +6,6 @@ source /usr/share/yunohost/helpers -#REMOVEME? ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS #================================================= diff --git a/scripts/install b/scripts/install index 7f9e3a1..65d5d40 100755 --- a/scripts/install +++ b/scripts/install @@ -13,14 +13,11 @@ default_matrix_server=${default_matrix_server#*://} default_matrix_server=${default_matrix_server%/} ynh_app_setting_set --key=default_matrix_server --value="$default_matrix_server" -#================================================= -# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression "Setting up source files..." -# Download, check integrity, uncompress and patch the source from manifest.toml ynh_setup_source --dest_dir="$install_dir" # remove potential trailing slash to avoid double slashes @@ -30,13 +27,11 @@ ynh_replace --match="" --replace="" --replace="" --file="$install_dir/index.html" - # remove potential trailing slash to avoid double slashes - path_without_trailing_slash=${path%/} - ynh_replace --match="" --replace="" --file="$install_dir/index.html" +# patching main.dart.js to replace the default matrix server +ynh_replace --match="=\"matrix.org\"" --replace="=\"$default_matrix_server\"" --file="$install_dir/main.dart.js" - # patching main.dart.js to replace the default matrix server - ynh_replace --match="=\"matrix.org\"" --replace="=\"$default_matrix_server\"" --file="$install_dir/main.dart.js" -fi - -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "www-data:www-data" "$install_dir" #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= From b12d9bb72fb3a50e198133f4324e3f211ed60378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 1 Sep 2024 22:35:06 +0200 Subject: [PATCH 4/4] Update manifest.toml --- manifest.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index bd7c0f0..2bba7bf 100644 --- a/manifest.toml +++ b/manifest.toml @@ -74,7 +74,6 @@ ram.runtime = "50M" [resources.install_dir] group = "www-data:r-x" owner = "www-data:rx" -group = "www-data:rx" [resources.permissions] main.url = "/"