From 8edabcada7b12fabc1cedf7de9fe5ffdff91cc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 4 Nov 2022 21:14:56 +0100 Subject: [PATCH 01/77] v2 --- conf/nginx.conf | 2 +- manifest.toml | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ scripts/backup | 12 +++++----- scripts/install | 46 ++++++++++++++++++------------------- scripts/remove | 16 ++++++------- scripts/restore | 26 ++++++++++----------- scripts/upgrade | 40 ++++++++++++++++----------------- 7 files changed, 131 insertions(+), 71 deletions(-) create mode 100644 manifest.toml diff --git a/conf/nginx.conf b/conf/nginx.conf index b5f38e3..58bbde2 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,7 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - alias __FINALPATH__/; + alias __INSTALL_DIR__/; index index.html; diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..6d2ebe2 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,60 @@ +packaging_format = 2 + +id = "element" +name = "Element" +description.en = "Web client for Matrix" +description.fr = "Client web pour Matrix" + +version = "1.11.13~ynh1" + +maintainers = ["Josué Tille"] + +[upstream] +license = "Apache-2.0" +website = "https://element.io" +demo = "https://app.element.io/" +admindoc = "https://element.io/help" +code = "https://github.com/vector-im/element-web/" +cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) +fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. + +[integration] +yunohost = ">= 4.3.0" +architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64/armel), for example: ["amd64", "i386"] +multi_instance = true +ldap = "?" # FIXME: replace with true, false, or "not_relevant" +sso = "?" # FIXME: replace with true, false, or "not_relevant" +disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... +ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... + +[install] + [install.domain] + # this is a generic question - ask strings are automatically handled by Yunohost's core + type = "domain" + + [install.path] + # this is a generic question - ask strings are automatically handled by Yunohost's core + type = "path" + default = "/element" + + [install.default_home_server] + ask.en = "Choose a default home server" + ask.fr = "Choisissez un serveur par défault" + type = "string" + example = "my-own-homeserver.tld" + default = "matrix.org" + + [install.init_main_permission] + help.en = "A public application means that anyone can access it. Note that this application provides just files (html, javascript, images, etc.)" + help.fr = "Une application publique signifie que n'importe qui peut y accéder. Notez que cette application ne fournit que des fichiers (html, javascript, images, etc.)" + type = "group" + default = false + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" diff --git a/scripts/backup b/scripts/backup index 6201eec..0355f43 100644 --- a/scripts/backup +++ b/scripts/backup @@ -15,17 +15,17 @@ source /usr/share/yunohost/helpers #================================================= # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +#REMOVEME? ynh_print_info --message="Loading installation settings..." -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -36,7 +36,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/install b/scripts/install index f0f8dc9..0db8d96 100644 --- a/scripts/install +++ b/scripts/install @@ -14,59 +14,59 @@ source /usr/share/yunohost/helpers #================================================= # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= # Retrieve arguments -domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH -is_public=$YNH_APP_ARG_IS_PUBLIC -default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER +#REMOVEME? domain=$YNH_APP_ARG_DOMAIN +#REMOVEME? path=$YNH_APP_ARG_PATH +#REMOVEME? is_public=$YNH_APP_ARG_IS_PUBLIC +#REMOVEME? default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME login_for_welcome=true #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." --weight=1 +#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1 -final_path=/var/www/$app -test ! -e "$final_path" || ynh_die --message="This path already contains a folder" +#REMOVEME? install_dir=/var/www/$app +#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" # Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url +#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Storing installation settings..." --weight=1 -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url +#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain +#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=1 # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=4 -ynh_app_setting_set --app=$app --key=final_path --value=$final_path +#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" +ynh_setup_source --dest_dir="$install_dir" #================================================= # NGINX CONFIGURATION @@ -81,20 +81,20 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/config.json" --destination="$final_path/config.json" +ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 +#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary -if [ $is_public -eq 1 ] +#REMOVEME? if [ $is_public -eq 1 ] then - ynh_permission_update --permission="main" --add="visitors" +#REMOVEME? ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/remove b/scripts/remove index e2bc3c1..c2a44db 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,20 +12,20 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=1 +#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely -ynh_secure_remove --file="$final_path" +#REMOVEME? ynh_secure_remove --file="$install_dir" #================================================= # REMOVE NGINX CONFIGURATION @@ -40,10 +40,10 @@ ynh_remove_nginx_config #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1 # Delete a system user -ynh_system_user_delete --username=$app +#REMOVEME? ynh_system_user_delete --username=$app #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 0958a88..f1d1d13 100644 --- a/scripts/restore +++ b/scripts/restore @@ -15,25 +15,25 @@ source /usr/share/yunohost/helpers #================================================= # Stop script if errors -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -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) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=1 +#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +#REMOVEME? test ! -d $install_dir || ynh_die --message="There is already a directory: $install_dir " #================================================= # STANDARD RESTORATION STEPS @@ -47,20 +47,20 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 +#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." --weight=1 -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index c259066..e1c0c8f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,16 +12,16 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 -app=$YNH_APP_INSTANCE_NAME +#REMOVEME? app=$YNH_APP_INSTANCE_NAME -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) -default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) +#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) +#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) +#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) +#REMOVEME? default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) -login_for_welcome=$(ynh_app_setting_get --app=$app --key=login_for_welcome) +#REMOVEME? login_for_welcome=$(ynh_app_setting_get --app=$app --key=login_for_welcome) #================================================= # CHECK VERSION @@ -32,16 +32,16 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 +#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 # Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { +#REMOVEME? ynh_backup_before_upgrade +#REMOVEME? ynh_clean_setup () { # Restore it if the upgrade fails - ynh_restore_upgradebackup +#REMOVEME? ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script -ynh_abort_if_errors +#REMOVEME? ynh_abort_if_errors #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -60,8 +60,8 @@ if [ -z "$login_for_welcome" ]; then fi # Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all +#REMOVEME? if ynh_legacy_permissions_exists; then +#REMOVEME? ynh_legacy_permissions_delete_all ynh_app_setting_delete --app=$app --key=is_public fi @@ -69,10 +69,10 @@ fi #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 +#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" +#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -83,7 +83,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$install_dir" fi #================================================= @@ -91,10 +91,10 @@ fi #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/config.json" --destination="$final_path/config.json" +ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # NGINX CONFIGURATION From 214a3e6429243ccf43b08f619668d5b7a8d72eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 4 Nov 2022 21:25:34 +0100 Subject: [PATCH 02/77] v2 --- manifest.json | 63 ---------------------------------------------- manifest.toml | 11 ++++---- scripts/backup | 17 ------------- scripts/change_url | 8 ------ scripts/install | 50 ++---------------------------------- scripts/remove | 28 --------------------- scripts/restore | 33 ------------------------ scripts/upgrade | 41 +++--------------------------- 8 files changed, 10 insertions(+), 241 deletions(-) delete mode 100644 manifest.json diff --git a/manifest.json b/manifest.json deleted file mode 100644 index f921d60..0000000 --- a/manifest.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "Element", - "id": "element", - "packaging_format": 1, - "description": { - "en": "Web client for Matrix", - "fr": "Client web pour Matrix" - }, - "version": "1.11.13~ynh1", - "url": "https://element.io", - "upstream": { - "license": "Apache-2.0", - "website": "https://element.io", - "demo": "https://app.element.io/", - "admindoc": "https://element.io/help", - "code": "https://github.com/vector-im/element-web/" - }, - "license": "Apache-2.0", - "maintainer": { - "name": "Josué Tille", - "email": "josue@tille.ch" - }, - "requirements": { - "yunohost": ">= 4.3.0" - }, - "multi_instance": true, - "services": [ - "nginx" - ], - "arguments": { - "install" : [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "path", - "type": "path", - "example": "/element", - "default": "/element" - }, - { - "name": "default_home_server", - "type": "string", - "ask": { - "en": "Choose a default home server", - "fr": "Choisissez un serveur par défault" - }, - "example": "my-own-homeserver.tld", - "default": "matrix.org" - }, - { - "name": "is_public", - "type": "boolean", - "help": { - "en": "A public application means that anyone can access it. Note that this application provides just files (html, javascript, images, etc.)", - "fr": "Une application publique signifie que n'importe qui peut y accéder. Notez que cette application ne fournit que des fichiers (html, javascript, images, etc.)" - }, - "default": false - } - ] - } -} diff --git a/manifest.toml b/manifest.toml index 6d2ebe2..ef0c3d2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -15,15 +15,14 @@ website = "https://element.io" demo = "https://app.element.io/" admindoc = "https://element.io/help" code = "https://github.com/vector-im/element-web/" -cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) -fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. +cpe = "cpe:2.3:a:matrix:element" [integration] -yunohost = ">= 4.3.0" -architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64/armel), for example: ["amd64", "i386"] +yunohost = ">= 11.1.0" +architectures = "all" multi_instance = true -ldap = "?" # FIXME: replace with true, false, or "not_relevant" -sso = "?" # FIXME: replace with true, false, or "not_relevant" +ldap = "not_relevant" +sso = "not_relevant" disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... diff --git a/scripts/backup b/scripts/backup index 0355f43..52eea5b 100644 --- a/scripts/backup +++ b/scripts/backup @@ -10,23 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_print_info --message="Loading installation settings..." - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= diff --git a/scripts/change_url b/scripts/change_url index 4d5a344..ac2aeb6 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -21,14 +21,6 @@ new_path=$YNH_APP_NEW_PATH app=$YNH_APP_INSTANCE_NAME -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= diff --git a/scripts/install b/scripts/install index 0db8d96..8575319 100644 --- a/scripts/install +++ b/scripts/install @@ -9,62 +9,27 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= # Retrieve arguments -#REMOVEME? domain=$YNH_APP_ARG_DOMAIN -#REMOVEME? path=$YNH_APP_ARG_PATH -#REMOVEME? is_public=$YNH_APP_ARG_IS_PUBLIC -#REMOVEME? default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - +default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER login_for_welcome=true -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -#REMOVEME? ynh_script_progression --message="Validating installation parameters..." --weight=1 - -#REMOVEME? install_dir=/var/www/$app -#REMOVEME? test ! -e "$install_dir" || ynh_die --message="This path already contains a folder" - -# Register (book) web path -#REMOVEME? ynh_webpath_register --app=$app --domain=$domain --path=$path - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -#REMOVEME? ynh_script_progression --message="Storing installation settings..." --weight=1 +ynh_script_progression --message="Storing installation settings..." --weight=1 -#REMOVEME? ynh_app_setting_set --app=$app --key=domain --value=$domain -#REMOVEME? ynh_app_setting_set --app=$app --key=path --value=$path ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=4 -#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" @@ -86,17 +51,6 @@ ynh_add_config --template="../conf/config.json" --destination="$install_dir/conf chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# SETUP SSOWAT -#================================================= -#REMOVEME? ynh_script_progression --message="Configuring permissions..." --weight=1 - -# Make app public if necessary -#REMOVEME? if [ $is_public -eq 1 ] -then -#REMOVEME? ynh_permission_update --permission="main" --add="visitors" -fi - #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/remove b/scripts/remove index c2a44db..e7f44d8 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,24 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) - -#================================================= -# REMOVE APP MAIN DIR -#================================================= -#REMOVEME? ynh_script_progression --message="Removing app main directory..." --weight=1 - -# Remove the app directory securely -#REMOVEME? ynh_secure_remove --file="$install_dir" - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -35,16 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Removing the dedicated system user..." --weight=1 - -# Delete a system user -#REMOVEME? ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index f1d1d13..38c3995 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,31 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Stop script if errors -#REMOVEME? ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 - -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -#REMOVEME? ynh_script_progression --message="Validating restoration parameters..." --weight=1 - -#REMOVEME? test ! -d $install_dir || ynh_die --message="There is already a directory: $install_dir " - #================================================= # STANDARD RESTORATION STEPS #================================================= @@ -44,14 +19,6 @@ ynh_script_progression --message="Restoring the NGINX configuration..." --weight ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # RESTORE THE APP MAIN DIR #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e1c0c8f..f1901b5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,16 +12,10 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -#REMOVEME? ynh_script_progression --message="Loading installation settings..." --weight=1 +ynh_script_progression --message="Loading installation settings..." --weight=1 -#REMOVEME? app=$YNH_APP_INSTANCE_NAME - -#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=domain) -#REMOVEME? path=$(ynh_app_setting_get --app=$app --key=path) -#REMOVEME? #REMOVEME? install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) -#REMOVEME? default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) - -#REMOVEME? login_for_welcome=$(ynh_app_setting_get --app=$app --key=login_for_welcome) +default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) +login_for_welcome=$(ynh_app_setting_get --app=$app --key=login_for_welcome) #================================================= # CHECK VERSION @@ -29,20 +23,6 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -#REMOVEME? ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 - -# Backup the current version of the app -#REMOVEME? ynh_backup_before_upgrade -#REMOVEME? ynh_clean_setup () { - # Restore it if the upgrade fails -#REMOVEME? ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -#REMOVEME? ynh_abort_if_errors - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -59,21 +39,6 @@ if [ -z "$login_for_welcome" ]; then ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome fi -# Cleaning legacy permissions -#REMOVEME? if ynh_legacy_permissions_exists; then -#REMOVEME? ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -#================================================= -# CREATE DEDICATED USER -#================================================= -#REMOVEME? ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -#REMOVEME? ynh_system_user_create --username=$app --home_dir="$install_dir" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= From b087a41eb4c20b5b69299d1481f91091f6b89de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Nov 2022 19:07:03 +0100 Subject: [PATCH 03/77] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index ef0c3d2..b0fc1f9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -48,7 +48,7 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen help.en = "A public application means that anyone can access it. Note that this application provides just files (html, javascript, images, etc.)" help.fr = "Une application publique signifie que n'importe qui peut y accéder. Notez que cette application ne fournit que des fichiers (html, javascript, images, etc.)" type = "group" - default = false + default = "visitors" [resources] [resources.system_user] From 73b7837b1b08347bf183239711e3ce46813bf6e3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 24 Jan 2023 08:57:49 +0000 Subject: [PATCH 04/77] 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 4b0c2b6..2ddb2ec 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Element for YunoHost -[![Integration level](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Working status](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Working status](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) [![Install Element with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=element) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 98ea357..4070b49 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Element pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) [![Installer Element avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=element) *[Read this readme in english.](./README.md)* From 30364a1b4a88c8038f100884a80064dc5d247689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 31 Jan 2023 12:26:39 +0100 Subject: [PATCH 05/77] 1.11.21 --- 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 0631668..acd1d47 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.20/element-v1.11.20.tar.gz -SOURCE_SUM=a856e854d404f5bfd69cf344b5ea7c77a93ac7d37554af2c00f6cb383abac77f +SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.21/element-v1.11.21.tar.gz +SOURCE_SUM=996571e2a7b37ef7044926f672b134b23c7cb5d6a6e4aefb1ad62c61e29b9538 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 0f2baf3..3a382eb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web client for Matrix", "fr": "Client web pour Matrix" }, - "version": "1.11.20~ynh1", + "version": "1.11.21~ynh1", "url": "https://element.io", "upstream": { "license": "Apache-2.0", From 9374850623aee52b238432701f415888dd413e73 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 31 Jan 2023 11:26:43 +0000 Subject: [PATCH 06/77] 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 2ddb2ec..1839cca 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 Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.11.20~ynh1 +**Shipped version:** 1.11.21~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index 4070b49..cdc981a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.11.20~ynh1 +**Version incluse :** 1.11.21~ynh1 **Démo :** https://app.element.io/ From 869fe27f3bfd0b01a38384e9494c914424eac90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 31 Jan 2023 16:07:05 +0100 Subject: [PATCH 07/77] Fix --- 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 acd1d47..7d301dd 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.21/element-v1.11.21.tar.gz -SOURCE_SUM=996571e2a7b37ef7044926f672b134b23c7cb5d6a6e4aefb1ad62c61e29b9538 +SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.22/element-v1.11.22.tar.gz +SOURCE_SUM=026746e75d84854d1729baee6c8c70826be5e59f85917f9055b24be1027fae00 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 3a382eb..a948edf 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web client for Matrix", "fr": "Client web pour Matrix" }, - "version": "1.11.21~ynh1", + "version": "1.11.22~ynh1", "url": "https://element.io", "upstream": { "license": "Apache-2.0", From 476f4818844d7c71a6628bd2de10feff555237a5 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 31 Jan 2023 15:07:10 +0000 Subject: [PATCH 08/77] 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 1839cca..19f1a15 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 Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.11.21~ynh1 +**Shipped version:** 1.11.22~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index cdc981a..f3eb8a5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.11.21~ynh1 +**Version incluse :** 1.11.22~ynh1 **Démo :** https://app.element.io/ From f6e5741bc912a1a1e396308f36324b20cc8f81e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 09:26:48 +0100 Subject: [PATCH 09/77] Fix --- manifest.toml | 8 +++----- tests.toml | 0 2 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 tests.toml diff --git a/manifest.toml b/manifest.toml index b0fc1f9..b9d31b5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -23,17 +23,15 @@ architectures = "all" multi_instance = true ldap = "not_relevant" sso = "not_relevant" -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +disk = "50M" +ram.build = "50M" +ram.runtime = "50M" [install] [install.domain] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "domain" [install.path] - # this is a generic question - ask strings are automatically handled by Yunohost's core type = "path" default = "/element" diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..e69de29 From 4d8e8e282383cb012cbeced9ff50b988b782b001 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 3 Feb 2023 08:26:53 +0000 Subject: [PATCH 10/77] Auto-update README --- README.md | 2 +- README_fr.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4b4184e..23e3eaf 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Element for YunoHost -[![Integration level](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Working status](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Working status](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) [![Install Element with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=element) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 1c69643..fd2f6f7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,15 @@ It shall NOT be edited by hand. # Element pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) [![Installer Element avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=element) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Element rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Element rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. @@ -21,9 +21,9 @@ Element est un nouveau type d'application de messagerie. Vous choisissez où vos **Démo :** https://app.element.io/ -## Captures d'écran +## Captures d’écran -![Capture d'écran de Element](./doc/screenshots/homepage-all-platforms-1_1.png) +![Capture d’écran de Element](./doc/screenshots/homepage-all-platforms-1_1.png) ## Avertissements / informations importantes @@ -49,9 +49,9 @@ https://github.com/vector-im/riot-web/issues/1977 pour plus de détails. ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -67,4 +67,4 @@ ou sudo yunohost app upgrade element -u https://github.com/YunoHost-Apps/element_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From 0a7805f764723e83cc80e169373f014a25f82aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 09:27:51 +0100 Subject: [PATCH 11/77] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index b9d31b5..5b9e57f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -21,8 +21,8 @@ cpe = "cpe:2.3:a:matrix:element" yunohost = ">= 11.1.0" architectures = "all" multi_instance = true -ldap = "not_relevant" -sso = "not_relevant" +ldap = false +sso = true disk = "50M" ram.build = "50M" ram.runtime = "50M" From 3471b9c160044139471bb7b97750cf9227e83d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 09:30:57 +0100 Subject: [PATCH 12/77] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 5b9e57f..e752f91 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Element" description.en = "Web client for Matrix" description.fr = "Client web pour Matrix" -version = "1.11.13~ynh1" +version = "1.11.22~ynh1" maintainers = ["Josué Tille"] From b8052810ef33bcfd34138713047f15acf5689eaf Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 3 Feb 2023 08:31:03 +0000 Subject: [PATCH 13/77] 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 23e3eaf..19f1a15 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 Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.11.13~ynh1 +**Shipped version:** 1.11.22~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index fd2f6f7..f3eb8a5 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.11.13~ynh1 +**Version incluse :** 1.11.22~ynh1 **Démo :** https://app.element.io/ From 196fb973f882d124090695509257e66fa53bfa8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 09:32:18 +0100 Subject: [PATCH 14/77] Fix --- doc/DISCLAIMER.md | 19 ------------------- doc/DISCLAIMER_fr.md | 19 ------------------- tests.toml | 9 +++++++++ 3 files changed, 9 insertions(+), 38 deletions(-) delete mode 100644 doc/DISCLAIMER.md delete mode 100644 doc/DISCLAIMER_fr.md diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index 22d6e95..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,19 +0,0 @@ -## YunoHost specific features - -### Multi-users support - -This application support the SSO. If you want to use the SSO, you need to define the path to the default homeserver as your homeserver witch is installed on your YunoHost instance. - -## Additional informations - -### Important Security Note - -We do not recommend running Element from the same domain name as your Matrix -homeserver (Synapse). The reason is the risk of XSS (cross-site-scripting) -vulnerabilities that could occur if someone caused Element to load and render -malicious user generated content from a Matrix API which then had trusted -access to Element (or other apps) due to sharing the same domain. - -We have put some coarse mitigations into place to try to protect against this -situation, but it's still not good practice to do it in the first place. See -https://github.com/vector-im/riot-web/issues/1977 for more details. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md deleted file mode 100644 index 0ac8dd8..0000000 --- a/doc/DISCLAIMER_fr.md +++ /dev/null @@ -1,19 +0,0 @@ -## Fonctionnalités spécifiques à YunoHost - -### Prise en charge multi-utilisateurs - -Cette application prend en charge le SSO. Si vous souhaitez utiliser le SSO, vous devez définir le chemin d'accès au serveur domestique par défaut car votre serveur domestique est installé sur votre instance YunoHost. - -## Informations supplémentaires - -### Note de sécurité importante - -Nous vous déconseillons d'exécuter Element à partir du même nom de domaine que votre Matrix -serveur domestique (Synapse). La raison en est le risque de XSS (cross-site-scripting) -vulnérabilités qui pourraient survenir si quelqu'un provoquait le chargement et le rendu d'Element -un utilisateur malveillant a généré du contenu à partir d'une API Matrix qui avait alors fait confiance -accès à Element (ou à d'autres applications) en raison du partage du même domaine. - -Nous avons mis en place des mesures d'atténuation grossières pour essayer de nous protéger contre ce -situation, mais ce n'est toujours pas une bonne pratique de le faire en premier lieu. Voir -https://github.com/vector-im/riot-web/issues/1977 pour plus de détails. diff --git a/tests.toml b/tests.toml index e69de29..cfb7391 100644 --- a/tests.toml +++ b/tests.toml @@ -0,0 +1,9 @@ +test_format = 1.0 + +[default] + + exclude = [ + "install.nourl" + ] + + test_upgrade_from.d653976.name = "Upgrade from 23.01" From f7c370f8d93f9356624a555f495186d423430e75 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 3 Feb 2023 08:32:28 +0000 Subject: [PATCH 15/77] Auto-update README --- README.md | 22 ---------------------- README_fr.md | 22 ---------------------- 2 files changed, 44 deletions(-) diff --git a/README.md b/README.md index 19f1a15..6388529 100644 --- a/README.md +++ b/README.md @@ -25,28 +25,6 @@ Element is a new type of messaging app. You choose where your messages are store ![Screenshot of Element](./doc/screenshots/homepage-all-platforms-1_1.png) -## Disclaimers / important information - -## YunoHost specific features - -### Multi-users support - -This application support the SSO. If you want to use the SSO, you need to define the path to the default homeserver as your homeserver witch is installed on your YunoHost instance. - -## Additional informations - -### Important Security Note - -We do not recommend running Element from the same domain name as your Matrix -homeserver (Synapse). The reason is the risk of XSS (cross-site-scripting) -vulnerabilities that could occur if someone caused Element to load and render -malicious user generated content from a Matrix API which then had trusted -access to Element (or other apps) due to sharing the same domain. - -We have put some coarse mitigations into place to try to protect against this -situation, but it's still not good practice to do it in the first place. See -https://github.com/vector-im/riot-web/issues/1977 for more details. - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index f3eb8a5..cc3a4b1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,28 +25,6 @@ Element est un nouveau type d'application de messagerie. Vous choisissez où vos ![Capture d’écran de Element](./doc/screenshots/homepage-all-platforms-1_1.png) -## Avertissements / informations importantes - -## Fonctionnalités spécifiques à YunoHost - -### Prise en charge multi-utilisateurs - -Cette application prend en charge le SSO. Si vous souhaitez utiliser le SSO, vous devez définir le chemin d'accès au serveur domestique par défaut car votre serveur domestique est installé sur votre instance YunoHost. - -## Informations supplémentaires - -### Note de sécurité importante - -Nous vous déconseillons d'exécuter Element à partir du même nom de domaine que votre Matrix -serveur domestique (Synapse). La raison en est le risque de XSS (cross-site-scripting) -vulnérabilités qui pourraient survenir si quelqu'un provoquait le chargement et le rendu d'Element -un utilisateur malveillant a généré du contenu à partir d'une API Matrix qui avait alors fait confiance -accès à Element (ou à d'autres applications) en raison du partage du même domaine. - -Nous avons mis en place des mesures d'atténuation grossières pour essayer de nous protéger contre ce -situation, mais ce n'est toujours pas une bonne pratique de le faire en premier lieu. Voir -https://github.com/vector-im/riot-web/issues/1977 pour plus de détails. - ## Documentations et ressources * Site officiel de l’app : From 1fffe6052efdef30a0a3a5c4a465b42c62226ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 09:39:39 +0100 Subject: [PATCH 16/77] Fix --- check_process | 24 ------------------------ scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- tests.toml | 18 +++++++++++++++--- 4 files changed, 19 insertions(+), 31 deletions(-) delete mode 100644 check_process diff --git a/check_process b/check_process deleted file mode 100644 index ec0f0de..0000000 --- a/check_process +++ /dev/null @@ -1,24 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - default_home_server="matrix.org" - is_public=1 - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - upgrade=1 from_commit=34d457d13e526997fddb8348650674a7db2247be - backup_restore=1 - multi_instance=1 - change_url=1 -;;; Upgrade options - ; commit=Sep 13, 2021 - name=34d457d13e526997fddb8348650674a7db2247be - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& - - \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 38c3995..d1d9a3e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,8 +26,8 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +#chmod -R o-rwx "$install_dir" +#chown -R $app:www-data "$install_dir" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index f1901b5..0f37167 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,8 +58,8 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +#chmod -R o-rwx "$install_dir" +#chown -R $app:www-data "$install_dir" #================================================= # NGINX CONFIGURATION diff --git a/tests.toml b/tests.toml index cfb7391..276998c 100644 --- a/tests.toml +++ b/tests.toml @@ -2,8 +2,20 @@ test_format = 1.0 [default] - exclude = [ - "install.nourl" - ] + # ------------ + # Tests to run + # ------------ + + exclude ="install.nourl" + + # ------------------------------- + # Default args to use for install + # ------------------------------- + + default_home_server="matrix.org" + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- test_upgrade_from.d653976.name = "Upgrade from 23.01" From c84aa6388b2331c28731901eb5700df38b4d2372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 10:13:11 +0100 Subject: [PATCH 17/77] Fix linter --- scripts/install | 7 ------- scripts/upgrade | 7 ------- 2 files changed, 14 deletions(-) diff --git a/scripts/install b/scripts/install index 8575319..6c61422 100644 --- a/scripts/install +++ b/scripts/install @@ -51,13 +51,6 @@ ynh_add_config --template="../conf/config.json" --destination="$install_dir/conf chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0f37167..297e885 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -69,13 +69,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= From 0049d5f68e4702c7ef0f82d1208ce953885cb512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 10:14:06 +0100 Subject: [PATCH 18/77] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 6c61422..f42fe7d 100644 --- a/scripts/install +++ b/scripts/install @@ -48,8 +48,8 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +#chmod -R o-rwx "$install_dir" +#chown -R $app:www-data "$install_dir" #================================================= # END OF SCRIPT From 4faa40f4c435c1255ee808f004dbf85b195e9fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 10:16:49 +0100 Subject: [PATCH 19/77] Fix --- .kateproject | 4 ---- conf/config.json | 2 +- manifest.toml | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 .kateproject diff --git a/.kateproject b/.kateproject deleted file mode 100644 index d945148..0000000 --- a/.kateproject +++ /dev/null @@ -1,4 +0,0 @@ -{ -"name": "Element_ynh" -, "files": [ { "git": 1 } ] -} diff --git a/conf/config.json b/conf/config.json index f76fdf8..a1c1ad3 100644 --- a/conf/config.json +++ b/conf/config.json @@ -17,6 +17,6 @@ "https://matrix-client.matrix.org": false }, "embedded_pages": { - "login_for_welcome": __LOGIN_FOR_WELCOME__ + "login_for_welcome": "__LOGIN_FOR_WELCOME__" } } diff --git a/manifest.toml b/manifest.toml index e752f91..38bd3a3 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ code = "https://github.com/vector-im/element-web/" cpe = "cpe:2.3:a:matrix:element" [integration] -yunohost = ">= 11.1.0" +yunohost = ">= 11.1.5" architectures = "all" multi_instance = true ldap = false From cb5ec1d5e9716ec5c193f9460e5740a19270a19d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 10:26:40 +0100 Subject: [PATCH 20/77] Fix --- scripts/install | 5 +++-- scripts/restore | 5 +++-- scripts/upgrade | 13 +++++++------ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index f42fe7d..b6205b1 100644 --- a/scripts/install +++ b/scripts/install @@ -48,8 +48,9 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -#chmod -R o-rwx "$install_dir" -#chown -R $app:www-data "$install_dir" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index d1d9a3e..fbc70ff 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,8 +26,9 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -#chmod -R o-rwx "$install_dir" -#chown -R $app:www-data "$install_dir" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 297e885..42e2d25 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,18 +48,19 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" + ynh_setup_source --dest_dir="$install_dir" --keep="config.json" fi +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +#ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" - -#chmod -R o-rwx "$install_dir" -#chown -R $app:www-data "$install_dir" +#ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" #================================================= # NGINX CONFIGURATION From 3ad629160f5deb832b3c5864d5a955087f767817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 10:30:10 +0100 Subject: [PATCH 21/77] Update change_url --- scripts/change_url | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/change_url b/scripts/change_url index ac2aeb6..4ac066b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -82,6 +82,7 @@ then # Store file checksum for the new config file location ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi + #================================================= # RELOAD NGINX #================================================= From c8e6e71186b35e2179ed328ae3c78bdcd64c759d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 13:03:41 +0100 Subject: [PATCH 22/77] Fix --- scripts/install | 6 +++++- scripts/restore | 12 ++++++++---- scripts/upgrade | 12 ++++++++---- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index b6205b1..3c653cc 100644 --- a/scripts/install +++ b/scripts/install @@ -48,7 +48,11 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -chmod 750 "$install_dir" +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions to app files chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" diff --git a/scripts/restore b/scripts/restore index fbc70ff..ed2f094 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,10 +26,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # GENERIC FINALIZATION #================================================= @@ -39,6 +35,14 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 42e2d25..24b1307 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,10 +51,6 @@ then ynh_setup_source --dest_dir="$install_dir" --keep="config.json" fi -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # ADD A CONFIGURATION #================================================= @@ -70,6 +66,14 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # END OF SCRIPT #================================================= From 9d1e7203a2ca3085a7b9332ab10a7c3ff4c00c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:42:37 +0100 Subject: [PATCH 23/77] Update tests.toml --- tests.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index 276998c..b8493de 100644 --- a/tests.toml +++ b/tests.toml @@ -12,7 +12,7 @@ test_format = 1.0 # Default args to use for install # ------------------------------- - default_home_server="matrix.org" + args.default_home_server="matrix.org" # ------------------------------- # Commits to test upgrade from From 308d25c7ccdb63a25c897aeea9eca8ada991dcc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 4 Feb 2023 13:56:54 +0100 Subject: [PATCH 24/77] Update config_panel.toml --- config_panel.toml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 80cb82f..c60f78f 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -1,15 +1,19 @@ version = "1.0" [main] -name = "Element configuration" +name.en = "Element configuration" +name.fr = "Configuration d'Element" [main.config] - name = "Configuration Options" + name.en = "Configuration Options" + name.fr = "Options de configuration" [main.config.login_for_welcome] - ask = "Display login as welcome page" + ask.en = "Display login as welcome page" + ask.fr = "Afficher la connexion comme page d'accueil" type = "boolean" yes = true no = false - help = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality." + help.en = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality." + help.fr = "Lorsque la valeur est 'oui', l'application utilisera le formulaire de connexion comme page d'accueil au lieu de la page d'accueil elle-même. Cela désactive l'utilisation de 'welcome_url' et de toutes les fonctionnalités de la page d'accueil." bind = "login_for_welcome:/var/www/__APP__/config.json" From b4745fda8ed1bb49631a6141de2997e01640a550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 5 Feb 2023 20:45:09 +0100 Subject: [PATCH 25/77] Update upgrade --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 24b1307..d5f20e9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,15 +48,15 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config.json" + ynh_setup_source --dest_dir="$install_dir" #--keep="config.json" fi #================================================= # ADD A CONFIGURATION #================================================= -#ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 -#ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" +ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" #================================================= # NGINX CONFIGURATION From 302dfec05052d448cdd97dc30b84050669255d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 5 Feb 2023 20:53:53 +0100 Subject: [PATCH 26/77] Update config_panel.toml --- config_panel.toml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index c60f78f..0e63f57 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -5,15 +5,19 @@ name.en = "Element configuration" name.fr = "Configuration d'Element" [main.config] - name.en = "Configuration Options" - name.fr = "Options de configuration" + name = "Configuration Options" + + [main.config.default_home_server] + ask = "Default Home Server" + type = "string" + default = "matrix.org" + help = "Define the Default Home Server." + bind = "default_home_server:/var/www/__APP__/config.json" [main.config.login_for_welcome] - ask.en = "Display login as welcome page" - ask.fr = "Afficher la connexion comme page d'accueil" + ask = "Display login as welcome page" type = "boolean" yes = true no = false - help.en = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality." - help.fr = "Lorsque la valeur est 'oui', l'application utilisera le formulaire de connexion comme page d'accueil au lieu de la page d'accueil elle-même. Cela désactive l'utilisation de 'welcome_url' et de toutes les fonctionnalités de la page d'accueil." + help = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality." bind = "login_for_welcome:/var/www/__APP__/config.json" From 2ed4b0e26afcb7892e99f717d5984f3d2385b5bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 5 Feb 2023 21:14:05 +0100 Subject: [PATCH 27/77] Update config_panel.toml --- config_panel.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 0e63f57..ac5a59e 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -1,8 +1,7 @@ version = "1.0" [main] -name.en = "Element configuration" -name.fr = "Configuration d'Element" +name = "Element configuration" [main.config] name = "Configuration Options" From 51b3be266600a49a79bf5d3a6d3a5f8fe5425366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 5 Feb 2023 21:18:41 +0100 Subject: [PATCH 28/77] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index ac5a59e..b1b6bd9 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -11,7 +11,7 @@ name = "Element configuration" type = "string" default = "matrix.org" help = "Define the Default Home Server." - bind = "default_home_server:/var/www/__APP__/config.json" + bind = "base_url:/var/www/__APP__/config.json" [main.config.login_for_welcome] ask = "Display login as welcome page" From 14104234d4a2f0fbe284d880b544b99843683e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 5 Feb 2023 21:23:53 +0100 Subject: [PATCH 29/77] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index b1b6bd9..e1bd81e 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -11,7 +11,7 @@ name = "Element configuration" type = "string" default = "matrix.org" help = "Define the Default Home Server." - bind = "base_url:/var/www/__APP__/config.json" + bind = ":/var/www/__APP__/config.json" [main.config.login_for_welcome] ask = "Display login as welcome page" From aab0aff985e7997413ced5d3bf51c910e285c613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 5 Feb 2023 22:06:06 +0100 Subject: [PATCH 30/77] fix --- conf/config.json | 8 ++++++-- config_panel.toml | 7 ------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/conf/config.json b/conf/config.json index a1c1ad3..0d2955f 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,7 +1,11 @@ { "default_server_config": { - "m.homeserver": { "base_url": "https://__DEFAULT_HOME_SERVER__" }, - "m.identity_server": {"base_url": "https://vector.im"} + "m.homeserver": { + "base_url": "https://__DEFAULT_HOME_SERVER__" + }, + "m.identity_server": { + "base_url": "https://vector.im" + } }, "brand": "Element", "integrations_ui_url": "https://scalar.vector.im/", diff --git a/config_panel.toml b/config_panel.toml index e1bd81e..80cb82f 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -6,13 +6,6 @@ name = "Element configuration" [main.config] name = "Configuration Options" - [main.config.default_home_server] - ask = "Default Home Server" - type = "string" - default = "matrix.org" - help = "Define the Default Home Server." - bind = ":/var/www/__APP__/config.json" - [main.config.login_for_welcome] ask = "Display login as welcome page" type = "boolean" From d04f5d66c55acf4b2dbbdc2c973d1285c38ccb2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 11:05:05 +0100 Subject: [PATCH 31/77] Update upgrade --- scripts/upgrade | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d5f20e9..90bfe7f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,10 +12,10 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +#ynh_script_progression --message="Loading installation settings..." --weight=1 -default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) -login_for_welcome=$(ynh_app_setting_get --app=$app --key=login_for_welcome) +#default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) +#login_for_welcome=$(ynh_app_setting_get --app=$app --key=login_for_welcome) #================================================= # CHECK VERSION @@ -29,12 +29,12 @@ upgrade_type=$(ynh_check_app_version_changed) ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If default_home_server doesn't exist, create it -if [ -z "$default_home_server" ]; then +if [ -z "${default_home_server:-}" ]; then default_home_server="matrix.org" ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server fi -if [ -z "$login_for_welcome" ]; then +if [ -z "${login_for_welcome:-}" ]; then login_for_welcome=true ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome fi From bf02f365d7b4befca37ae6d6a8ed38e0b32f56ab Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 14 Feb 2023 10:05:10 +0000 Subject: [PATCH 32/77] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 6388529..0dceab3 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Element for YunoHost [![Integration level](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Working status](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) + [![Install Element with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=element) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index cc3a4b1..8353745 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Element pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) + [![Installer Element avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=element) *[Read this readme in english.](./README.md)* From 5c6e4ca40f65e0963865c31c6fe889af7618a494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 11:30:58 +0100 Subject: [PATCH 33/77] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 38bd3a3..b977ccc 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ code = "https://github.com/vector-im/element-web/" cpe = "cpe:2.3:a:matrix:element" [integration] -yunohost = ">= 11.1.5" +yunohost = ">= 11.1.6" architectures = "all" multi_instance = true ldap = false From 43a6aa2979b826bfa3e7e57c4836deb4ddc49cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 12:01:25 +0100 Subject: [PATCH 34/77] 1.11.23 --- conf/app.src | 4 ++-- manifest.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 7d301dd..0eb1f74 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.22/element-v1.11.22.tar.gz -SOURCE_SUM=026746e75d84854d1729baee6c8c70826be5e59f85917f9055b24be1027fae00 +SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.23/element-v1.11.23.tar.gz +SOURCE_SUM=d8b6e81531e975e9f581fd582f679b1052b432336fd5e4ffb702502e71d0a24d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.toml b/manifest.toml index b977ccc..3d425ea 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Element" description.en = "Web client for Matrix" description.fr = "Client web pour Matrix" -version = "1.11.22~ynh1" +version = "1.11.23~ynh1" maintainers = ["Josué Tille"] From f0ec0d7ae176329423945d45505d0203dc9167a7 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 14 Feb 2023 11:01:33 +0000 Subject: [PATCH 35/77] 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 0dceab3..9ed865d 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.11.22~ynh1 +**Shipped version:** 1.11.23~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index 8353745..86a4d5e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.11.22~ynh1 +**Version incluse :** 1.11.23~ynh1 **Démo :** https://app.element.io/ From ce14062f8f5c4f6e3536d2052162eea07dfb383d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 13:53:45 +0100 Subject: [PATCH 36/77] reorder permissions --- scripts/install | 13 ++++++------- scripts/upgrade | 23 +++++++---------------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/scripts/install b/scripts/install index 3c653cc..224a035 100644 --- a/scripts/install +++ b/scripts/install @@ -33,6 +33,10 @@ ynh_script_progression --message="Setting up source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # NGINX CONFIGURATION #================================================= @@ -48,13 +52,8 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chmod 400 "$install_dir/config.json" +chown $app:$app "$install_dir/config.json" #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 90bfe7f..03722f0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,14 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -#ynh_script_progression --message="Loading installation settings..." --weight=1 - -#default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server) -#login_for_welcome=$(ynh_app_setting_get --app=$app --key=login_for_welcome) - #================================================= # CHECK VERSION #================================================= @@ -51,6 +43,10 @@ then ynh_setup_source --dest_dir="$install_dir" #--keep="config.json" fi +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # ADD A CONFIGURATION #================================================= @@ -58,6 +54,9 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" +chmod 400 "$install_dir/config.json" +chown $app:$app "$install_dir/config.json" + #================================================= # NGINX CONFIGURATION #================================================= @@ -66,14 +65,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # END OF SCRIPT #================================================= From d376487506de40a485b6ec563376e0d395b2ba75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 13:55:32 +0100 Subject: [PATCH 37/77] Update tests.toml --- tests.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index b8493de..835cba6 100644 --- a/tests.toml +++ b/tests.toml @@ -18,4 +18,4 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.d653976.name = "Upgrade from 23.01" + test_upgrade_from.4e764b96.name = "Upgrade from 1.11.22" From 1c3219cf16383f9fa533af69a45728cbc649f187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 14:01:22 +0100 Subject: [PATCH 38/77] reorder --- manifest.toml | 4 ++-- scripts/restore | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/manifest.toml b/manifest.toml index 3d425ea..a64f28c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -43,8 +43,8 @@ ram.runtime = "50M" default = "matrix.org" [install.init_main_permission] - help.en = "A public application means that anyone can access it. Note that this application provides just files (html, javascript, images, etc.)" - help.fr = "Une application publique signifie que n'importe qui peut y accéder. Notez que cette application ne fournit que des fichiers (html, javascript, images, etc.)" + help.en = "'visitors' permission means that anyone can access it." + help.fr = "Autoriser les 'Visiteurs' signifie que n'importe qui peut y accéder." type = "group" default = "visitors" diff --git a/scripts/restore b/scripts/restore index ed2f094..4777bc4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,6 +26,10 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" +# Set permissions to app files +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # GENERIC FINALIZATION #================================================= @@ -35,14 +39,6 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # END OF SCRIPT #================================================= From 360ba1bb67ee5f62b06cfc10312e88281daf9ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 14:50:03 +0100 Subject: [PATCH 39/77] Update config.json --- conf/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.json b/conf/config.json index 0d2955f..33b0920 100644 --- a/conf/config.json +++ b/conf/config.json @@ -21,6 +21,6 @@ "https://matrix-client.matrix.org": false }, "embedded_pages": { - "login_for_welcome": "__LOGIN_FOR_WELCOME__" + "login_for_welcome": __LOGIN_FOR_WELCOME__ } } From 34b4defeecc1ab2ef410218802f34b27e5d5ef61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 14:50:22 +0100 Subject: [PATCH 40/77] Update tests.toml --- tests.toml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests.toml b/tests.toml index 835cba6..4a815fe 100644 --- a/tests.toml +++ b/tests.toml @@ -2,12 +2,6 @@ test_format = 1.0 [default] - # ------------ - # Tests to run - # ------------ - - exclude ="install.nourl" - # ------------------------------- # Default args to use for install # ------------------------------- From 6ae5488eff8ca42b78a1dea3cf3c8a9a7107797e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 15:24:49 +0100 Subject: [PATCH 41/77] Fix --- scripts/install | 2 -- scripts/restore | 2 ++ tests.toml | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index 224a035..9bdcc9f 100644 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers #================================================= # Retrieve arguments -default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER login_for_welcome=true #================================================= @@ -22,7 +21,6 @@ login_for_welcome=true #================================================= ynh_script_progression --message="Storing installation settings..." --weight=1 -ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome #================================================= diff --git a/scripts/restore b/scripts/restore index 4777bc4..8c46058 100644 --- a/scripts/restore +++ b/scripts/restore @@ -29,6 +29,8 @@ ynh_restore_file --origin_path="$install_dir" # Set permissions to app files chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +chmod 400 "$install_dir/config.json" +chown $app:$app "$install_dir/config.json" #================================================= # GENERIC FINALIZATION diff --git a/tests.toml b/tests.toml index 4a815fe..34427d2 100644 --- a/tests.toml +++ b/tests.toml @@ -2,12 +2,6 @@ test_format = 1.0 [default] - # ------------------------------- - # Default args to use for install - # ------------------------------- - - args.default_home_server="matrix.org" - # ------------------------------- # Commits to test upgrade from # ------------------------------- From b98079ae9b04e9a625e9a6f203d8d25501029200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 17:07:03 +0100 Subject: [PATCH 42/77] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index a64f28c..7e1d1f8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -36,8 +36,8 @@ ram.runtime = "50M" default = "/element" [install.default_home_server] - ask.en = "Choose a default home server" - ask.fr = "Choisissez un serveur par défault" + ask.en = "Choose a default Matrix server" + ask.fr = "Choisissez un serveur Matrix par défault" type = "string" example = "my-own-homeserver.tld" default = "matrix.org" From 9d4a923e1c7bee81abeb48257e11ec2901187239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 17:30:25 +0100 Subject: [PATCH 43/77] Update tests.toml Co-authored-by: Alexandre Aubin --- tests.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests.toml b/tests.toml index 34427d2..130a523 100644 --- a/tests.toml +++ b/tests.toml @@ -7,3 +7,4 @@ test_format = 1.0 # ------------------------------- test_upgrade_from.4e764b96.name = "Upgrade from 1.11.22" + test_upgrade_from.4e764b96.args.is_public = true From d4f734d1eb61a1fa0df3b4d1dd36010040c70417 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 14 Feb 2023 22:04:51 +0000 Subject: [PATCH 44/77] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 19f1a15..d7fd675 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Element for YunoHost [![Integration level](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Working status](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) + [![Install Element with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=element) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index f3eb8a5..8276ec7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Element pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/element.svg)](https://dash.yunohost.org/appci/app/element) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/element.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/element.maintain.svg) + [![Installer Element avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=element) *[Read this readme in english.](./README.md)* From 366e832d0958f112c582095a06ad6677e994054a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 23:05:21 +0100 Subject: [PATCH 45/77] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index a948edf..b0238e6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web client for Matrix", "fr": "Client web pour Matrix" }, - "version": "1.11.22~ynh1", + "version": "1.11.23~ynh1", "url": "https://element.io", "upstream": { "license": "Apache-2.0", From cd9d514e991d9cecda84b2e756824202308025a8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 14 Feb 2023 22:05:26 +0000 Subject: [PATCH 46/77] 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 d7fd675..b1286ac 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.11.22~ynh1 +**Shipped version:** 1.11.23~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index 8276ec7..94fcb2b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.11.22~ynh1 +**Version incluse :** 1.11.23~ynh1 **Démo :** https://app.element.io/ From f6756bc6b8a71f1232ef4f330064ba772dc151fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 14 Feb 2023 23:06:50 +0100 Subject: [PATCH 47/77] 1.11.23 --- conf/app.src | 4 ++-- conf/nginx.conf | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conf/app.src b/conf/app.src index 7d301dd..0eb1f74 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.22/element-v1.11.22.tar.gz -SOURCE_SUM=026746e75d84854d1729baee6c8c70826be5e59f85917f9055b24be1027fae00 +SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.23/element-v1.11.23.tar.gz +SOURCE_SUM=d8b6e81531e975e9f581fd582f679b1052b432336fd5e4ffb702502e71d0a24d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index b5f38e3..e5891cf 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,6 +5,8 @@ location __PATH__/ { index index.html; + more_set_headers "Content-Security-Policy: frame-ancestors 'self'"; + # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } From ec68d12bfe97b301c3df22175a779e6518800f6b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 15 Feb 2023 07:39:25 +0100 Subject: [PATCH 48/77] fix --- doc/ADMIN.md | 5 +++++ doc/ADMIN_fr.md | 0 scripts/upgrade | 10 +++++----- 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 doc/ADMIN.md create mode 100644 doc/ADMIN_fr.md diff --git a/doc/ADMIN.md b/doc/ADMIN.md new file mode 100644 index 0000000..5b718a3 --- /dev/null +++ b/doc/ADMIN.md @@ -0,0 +1,5 @@ +Important Security Note + +We do not recommend running Element from the same domain name as your Matrix homeserver (Synapse). The reason is the risk of XSS (cross-site-scripting) vulnerabilities that could occur if someone caused Element to load and render malicious user generated content from a Matrix API which then had trusted access to Element (or other apps) due to sharing the same domain. + +We have put some coarse mitigations into place to try to protect against this situation, but it's still not good practice to do it in the first place. See vector-im/element-web#1977 for more details. \ No newline at end of file diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md new file mode 100644 index 0000000..e69de29 diff --git a/scripts/upgrade b/scripts/upgrade index 03722f0..8ae8200 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,7 +40,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" #--keep="config.json" + ynh_setup_source --dest_dir="$install_dir" --keep="config.json" fi # Set permissions to app files @@ -50,12 +50,12 @@ chown -R $app:www-data "$install_dir" #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +#ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" +#ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -chmod 400 "$install_dir/config.json" -chown $app:$app "$install_dir/config.json" +#chmod 400 "$install_dir/config.json" +#chown $app:$app "$install_dir/config.json" #================================================= # NGINX CONFIGURATION From 63c8872c6384c76353f881fd9f897460d9d870ba Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 15 Feb 2023 07:41:31 +0100 Subject: [PATCH 49/77] Update ADMIN.md --- doc/ADMIN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 5b718a3..43567df 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,5 +1,5 @@ -Important Security Note +### Important Security Note We do not recommend running Element from the same domain name as your Matrix homeserver (Synapse). The reason is the risk of XSS (cross-site-scripting) vulnerabilities that could occur if someone caused Element to load and render malicious user generated content from a Matrix API which then had trusted access to Element (or other apps) due to sharing the same domain. -We have put some coarse mitigations into place to try to protect against this situation, but it's still not good practice to do it in the first place. See vector-im/element-web#1977 for more details. \ No newline at end of file +We have put some coarse mitigations into place to try to protect against this situation, but it's still not good practice to do it in the first place. See https://github.com/vector-im/riot-web/issues/1977 for more details. \ No newline at end of file From 2823dccbb519ecf802bd64fc5f11faee05d27c50 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 15 Feb 2023 07:44:08 +0100 Subject: [PATCH 50/77] Update ADMIN_fr.md --- doc/ADMIN_fr.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index e69de29..7cded3a 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -0,0 +1,5 @@ +### Note de sécurité importante + +Nous vous déconseillons d'exécuter Element à partir du même nom de domaine que votre Matrix serveur domestique (Synapse). La raison en est le risque de XSS (cross-site-scripting) vulnérabilités qui pourraient survenir si quelqu'un provoquait le chargement et le rendu d'Element un utilisateur malveillant a généré du contenu à partir d'une API Matrix qui avait alors fait confiance accès à Element (ou à d'autres applications) en raison du partage du même domaine. + +Nous avons mis en place des mesures d'atténuation grossières pour essayer de nous protéger contre ce situation, mais ce n'est toujours pas une bonne pratique de le faire en premier lieu. Voir https://github.com/vector-im/riot-web/issues/1977 pour plus de détails. From a9548be56986f54016bdf8d2b1de1efef224f74f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 15 Feb 2023 07:44:14 +0100 Subject: [PATCH 51/77] Update nginx.conf --- conf/nginx.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 58bbde2..6cd2808 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,6 +4,8 @@ location __PATH__/ { alias __INSTALL_DIR__/; index index.html; + + more_set_headers "Content-Security-Policy: frame-ancestors 'self'"; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; From 49c7dc180fb270ea2cb8d1144b6ba3698775d443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 Feb 2023 21:21:00 +0100 Subject: [PATCH 52/77] Update change_url --- scripts/change_url | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 4ac066b..8222f09 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -19,8 +19,6 @@ old_path=$YNH_APP_OLD_PATH new_domain=$YNH_APP_NEW_DOMAIN new_path=$YNH_APP_NEW_PATH -app=$YNH_APP_INSTANCE_NAME - #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= From 16bb2e82435fcb16621529e16e037cdbb48cb2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 18 Feb 2023 16:35:04 +0100 Subject: [PATCH 53/77] Fix --- conf/nginx.conf | 2 -- manifest.toml | 4 ++-- scripts/install | 7 ++----- scripts/remove | 4 ++-- scripts/restore | 7 ++----- scripts/upgrade | 5 ++--- tests.toml | 6 ++++++ 7 files changed, 16 insertions(+), 19 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9e0e94b..6cd2808 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,8 +7,6 @@ location __PATH__/ { more_set_headers "Content-Security-Policy: frame-ancestors 'self'"; - more_set_headers "Content-Security-Policy: frame-ancestors 'self'"; - # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } diff --git a/manifest.toml b/manifest.toml index 7e1d1f8..0ffcbb8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,11 +18,11 @@ code = "https://github.com/vector-im/element-web/" cpe = "cpe:2.3:a:matrix:element" [integration] -yunohost = ">= 11.1.6" +yunohost = ">= 11.1.7" architectures = "all" multi_instance = true ldap = false -sso = true +sso = false disk = "50M" ram.build = "50M" ram.runtime = "50M" diff --git a/scripts/install b/scripts/install index 9bdcc9f..64880c8 100644 --- a/scripts/install +++ b/scripts/install @@ -13,13 +13,11 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -# Retrieve arguments login_for_welcome=true #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome @@ -32,13 +30,12 @@ ynh_script_progression --message="Setting up source files..." --weight=4 ynh_setup_source --dest_dir="$install_dir" # Set permissions to app files -chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 +ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/remove b/scripts/remove index e7f44d8..b41853e 100755 --- a/scripts/remove +++ b/scripts/remove @@ -10,9 +10,9 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# REMOVE NGINX CONFIGURATION +# REMOVE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the dedicated NGINX config ynh_remove_nginx_config diff --git a/scripts/restore b/scripts/restore index 8c46058..e840b8e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,17 +27,14 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" # Set permissions to app files -chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" chmod 400 "$install_dir/config.json" chown $app:$app "$install_dir/config.json" #================================================= -# GENERIC FINALIZATION +# RESTORE SYSTEM CONFIGURATIONS #================================================= -# RELOAD NGINX AND PHP-FPM -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 8ae8200..b465a99 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -44,7 +44,6 @@ then fi # Set permissions to app files -chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= @@ -58,9 +57,9 @@ chown -R $app:www-data "$install_dir" #chown $app:$app "$install_dir/config.json" #================================================= -# NGINX CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/tests.toml b/tests.toml index 130a523..1d33b64 100644 --- a/tests.toml +++ b/tests.toml @@ -2,6 +2,12 @@ test_format = 1.0 [default] + # ------------------------------- + # Default args to use for install + # ------------------------------- + + args.default_home_server = "matrix.org" + # ------------------------------- # Commits to test upgrade from # ------------------------------- From db333693b3d81e9630b81d866090d4a6e527ef62 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Feb 2023 09:42:05 +0100 Subject: [PATCH 54/77] Cleaning --- config_panel.toml | 4 ++++ doc/ADMIN_fr.md | 2 +- manifest.toml | 4 ++-- scripts/install | 5 ----- scripts/restore | 16 +++++++--------- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 80cb82f..b386fcc 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -2,14 +2,18 @@ version = "1.0" [main] name = "Element configuration" +name.fr = "Configuration d'Element" [main.config] name = "Configuration Options" + name.fr = "Options de configuration" [main.config.login_for_welcome] ask = "Display login as welcome page" + ask.fr = "Afficher la connexion comme page d'accueil" type = "boolean" yes = true no = false help = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality." + help.fr = "Quand l'option est sélectionnée, l'application utilisera le formulaire de connexion comme page d'accueil au lieu de la page d'accueil elle-même. Cela désactive l'utilisation de welcome_url et de toutes les fonctionnalités de la page d'accueil." bind = "login_for_welcome:/var/www/__APP__/config.json" diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 7cded3a..c5516e9 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,5 +1,5 @@ ### Note de sécurité importante -Nous vous déconseillons d'exécuter Element à partir du même nom de domaine que votre Matrix serveur domestique (Synapse). La raison en est le risque de XSS (cross-site-scripting) vulnérabilités qui pourraient survenir si quelqu'un provoquait le chargement et le rendu d'Element un utilisateur malveillant a généré du contenu à partir d'une API Matrix qui avait alors fait confiance accès à Element (ou à d'autres applications) en raison du partage du même domaine. +Il n'est pas recommandé d'exécuter Element à partir du même nom de domaine que votre serveur domestique Matrix (Synapse). La raison en est le risque de vulnérabilités XSS (cross-site-scripting) qui pourraient survenir si quelqu'un amenait Element à charger et à afficher un contenu généré par un utilisateur malveillant à partir d'une API Matrix qui a ensuite rendu l'accès de confiance à Element (ou à d'autres applications) dû partager le même domaine. Nous avons mis en place des mesures d'atténuation grossières pour essayer de nous protéger contre ce situation, mais ce n'est toujours pas une bonne pratique de le faire en premier lieu. Voir https://github.com/vector-im/riot-web/issues/1977 pour plus de détails. diff --git a/manifest.toml b/manifest.toml index 0ffcbb8..15e2b44 100644 --- a/manifest.toml +++ b/manifest.toml @@ -43,8 +43,8 @@ ram.runtime = "50M" default = "matrix.org" [install.init_main_permission] - help.en = "'visitors' permission means that anyone can access it." - help.fr = "Autoriser les 'Visiteurs' signifie que n'importe qui peut y accéder." + help.en = "'visitors' permission means that anyone can access the Matrix server." + help.fr = "Autoriser les 'Visiteurs' signifie que n'importe qui peut accéder au server Matrix." type = "group" default = "visitors" diff --git a/scripts/install b/scripts/install index 64880c8..1311b2a 100644 --- a/scripts/install +++ b/scripts/install @@ -14,11 +14,6 @@ source /usr/share/yunohost/helpers #================================================= login_for_welcome=true - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= - ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome #================================================= diff --git a/scripts/restore b/scripts/restore index e840b8e..ddd7edf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,15 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -31,6 +22,13 @@ chown -R $app:www-data "$install_dir" chmod 400 "$install_dir/config.json" chown $app:$app "$install_dir/config.json" +#================================================= +# RESTORE SYSTEM CONFIGURATIONS +#================================================= +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=2 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= From bdadfa777699eb15a49d91039b7796b05ae7c301 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 19 Feb 2023 10:50:43 +0100 Subject: [PATCH 55/77] fix --- scripts/install | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/install b/scripts/install index 1311b2a..e70f43e 100644 --- a/scripts/install +++ b/scripts/install @@ -13,8 +13,15 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER login_for_welcome=true + +#================================================= +# STORE SETTINGS FROM MANIFEST +#================================================= + ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome +ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE From 8b7c7a230e9f8b2c985b3374d379e854c5eb04c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 19 Feb 2023 11:21:27 +0100 Subject: [PATCH 56/77] Fix --- conf/config.json | 18 ++++-------------- scripts/install | 3 ++- scripts/restore | 4 ++-- scripts/upgrade | 3 ++- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/conf/config.json b/conf/config.json index 33b0920..74c4490 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,26 +1,16 @@ { "default_server_config": { - "m.homeserver": { - "base_url": "https://__DEFAULT_HOME_SERVER__" - }, - "m.identity_server": { - "base_url": "https://vector.im" - } + "m.homeserver": {"base_url": "https://__DEFAULT_HOME_SERVER__"}, + "m.identity_server": {"base_url": "https://vector.im"} }, "brand": "Element", "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", "showLabsSettings": false, - "roomDirectory": { - "servers": [ - "matrix.org" - ] - }, + "roomDirectory": {"servers": ["matrix.org"]}, "enable_presence_by_hs_url": { "https://matrix.org": false, "https://matrix-client.matrix.org": false }, - "embedded_pages": { - "login_for_welcome": __LOGIN_FOR_WELCOME__ - } + "embedded_pages": {"login_for_welcome": __LOGIN_FOR_WELCOME__} } diff --git a/scripts/install b/scripts/install index e70f43e..4ef12fd 100644 --- a/scripts/install +++ b/scripts/install @@ -31,7 +31,8 @@ ynh_script_progression --message="Setting up source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -# Set permissions to app files +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" chown -R $app:www-data "$install_dir" #================================================= diff --git a/scripts/restore b/scripts/restore index ddd7edf..c891943 100644 --- a/scripts/restore +++ b/scripts/restore @@ -17,8 +17,8 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -# Set permissions to app files -chown -R $app:www-data "$install_dir" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" chmod 400 "$install_dir/config.json" chown $app:$app "$install_dir/config.json" diff --git a/scripts/upgrade b/scripts/upgrade index b465a99..4f159d5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,7 +43,8 @@ then ynh_setup_source --dest_dir="$install_dir" --keep="config.json" fi -# Set permissions to app files +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" chown -R $app:www-data "$install_dir" #================================================= From 6fad184112146a27b8ede8203cf04e9b61c603f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 19 Feb 2023 11:26:38 +0100 Subject: [PATCH 57/77] fix --- scripts/install | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 4ef12fd..0323aca 100644 --- a/scripts/install +++ b/scripts/install @@ -31,8 +31,8 @@ ynh_script_progression --message="Setting up source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= diff --git a/scripts/restore b/scripts/restore index c891943..458d845 100644 --- a/scripts/restore +++ b/scripts/restore @@ -17,8 +17,8 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" chmod 400 "$install_dir/config.json" chown $app:$app "$install_dir/config.json" diff --git a/scripts/upgrade b/scripts/upgrade index 4f159d5..7290c12 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,8 +43,8 @@ then ynh_setup_source --dest_dir="$install_dir" --keep="config.json" fi -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= From 9c610ee95e328dfc6d2c20f0bce0084a08144ddd Mon Sep 17 00:00:00 2001 From: tituspijean Date: Thu, 23 Feb 2023 23:37:11 +0100 Subject: [PATCH 58/77] [autopatch] Upgrade auto-updater --- .github/workflows/updater.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index fb72ba0..a56d7cb 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Fetch the source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Run the updater script @@ -33,7 +33,7 @@ jobs: - name: Create Pull Request id: cpr if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Update to version ${{ env.VERSION }} From b7d59b067039304348636591eaa6ee29dd2b9d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 1 Mar 2023 19:16:06 +0100 Subject: [PATCH 59/77] Update config.json --- conf/config.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/conf/config.json b/conf/config.json index f76fdf8..33b0920 100644 --- a/conf/config.json +++ b/conf/config.json @@ -1,7 +1,11 @@ { "default_server_config": { - "m.homeserver": { "base_url": "https://__DEFAULT_HOME_SERVER__" }, - "m.identity_server": {"base_url": "https://vector.im"} + "m.homeserver": { + "base_url": "https://__DEFAULT_HOME_SERVER__" + }, + "m.identity_server": { + "base_url": "https://vector.im" + } }, "brand": "Element", "integrations_ui_url": "https://scalar.vector.im/", From 76700b25db698aa253aebdc6bb2d1c1c96e8d6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 1 Mar 2023 19:17:35 +0100 Subject: [PATCH 60/77] 1.11.24 --- 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 0eb1f74..4b88ac1 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.23/element-v1.11.23.tar.gz -SOURCE_SUM=d8b6e81531e975e9f581fd582f679b1052b432336fd5e4ffb702502e71d0a24d +SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.24/element-v1.11.24.tar.gz +SOURCE_SUM=2671281dde4c577e20c3c1bce24caa519a574b848e63f968d0f76a43455936c1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index b0238e6..70c15b7 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web client for Matrix", "fr": "Client web pour Matrix" }, - "version": "1.11.23~ynh1", + "version": "1.11.24~ynh1", "url": "https://element.io", "upstream": { "license": "Apache-2.0", From 98682f6811a845a36e64b571d140201c1c1f696a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 1 Mar 2023 18:17:40 +0000 Subject: [PATCH 61/77] 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 b1286ac..60077ba 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.11.23~ynh1 +**Shipped version:** 1.11.24~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index 94fcb2b..06642db 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.11.23~ynh1 +**Version incluse :** 1.11.24~ynh1 **Démo :** https://app.element.io/ From f24cf808af27694a495da5c83f31f86f270e561d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 1 Mar 2023 19:21:43 +0100 Subject: [PATCH 62/77] Fix --- conf/app.src | 4 +-- manifest.toml | 4 +-- scripts/change_url | 75 +--------------------------------------------- scripts/install | 6 ++-- scripts/restore | 11 +++---- scripts/upgrade | 2 -- 6 files changed, 13 insertions(+), 89 deletions(-) diff --git a/conf/app.src b/conf/app.src index 0eb1f74..4b88ac1 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.23/element-v1.11.23.tar.gz -SOURCE_SUM=d8b6e81531e975e9f581fd582f679b1052b432336fd5e4ffb702502e71d0a24d +SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.24/element-v1.11.24.tar.gz +SOURCE_SUM=2671281dde4c577e20c3c1bce24caa519a574b848e63f968d0f76a43455936c1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.toml b/manifest.toml index 15e2b44..ed424cf 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Element" description.en = "Web client for Matrix" description.fr = "Client web pour Matrix" -version = "1.11.23~ynh1" +version = "1.11.24~ynh1" maintainers = ["Josué Tille"] @@ -18,7 +18,7 @@ code = "https://github.com/vector-im/element-web/" cpe = "cpe:2.3:a:matrix:element" [integration] -yunohost = ">= 11.1.7" +yunohost = ">= 11.1.12" architectures = "all" multi_instance = true ldap = false diff --git a/scripts/change_url b/scripts/change_url index 8222f09..ab2d658 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -6,87 +6,14 @@ # IMPORT GENERIC HELPERS #================================================= -source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH - -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - -change_path=0 -if [ "$old_path" != "$new_path" ] -then - change_path=1 -fi - #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" - # Create a dedicated NGINX config - ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload +ynh_change_url_nginx_config #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 0323aca..c15fbc4 100644 --- a/scripts/install +++ b/scripts/install @@ -13,7 +13,7 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER +#default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER login_for_welcome=true #================================================= @@ -21,7 +21,7 @@ login_for_welcome=true #================================================= ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome -ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server +#ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -31,8 +31,6 @@ ynh_script_progression --message="Setting up source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= diff --git a/scripts/restore b/scripts/restore index 458d845..cf6f4b0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -17,22 +17,23 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" chmod 400 "$install_dir/config.json" chown $app:$app "$install_dir/config.json" #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring system configurations related to $app..." --weight=2 +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= -# RESTORE SYSTEM CONFIGURATIONS +# GENERIC FINALIZATION #================================================= -ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE +#================================================= +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 7290c12..26bc2c0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,8 +43,6 @@ then ynh_setup_source --dest_dir="$install_dir" --keep="config.json" fi -chmod 750 "$install_dir" -chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= From e9fd1eeabb0049daeaf7e585606ca3e877187210 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 1 Mar 2023 18:21:48 +0000 Subject: [PATCH 63/77] 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 9ed865d..4dd1eaf 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.11.23~ynh1 +**Shipped version:** 1.11.24~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index 86a4d5e..8bfc214 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.11.23~ynh1 +**Version incluse :** 1.11.24~ynh1 **Démo :** https://app.element.io/ From 35cfd0fedf2d3833419402dda10720760fbe6e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 09:49:39 +0100 Subject: [PATCH 64/77] Update config.json --- conf/config.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/conf/config.json b/conf/config.json index 5d1bddf..d61641b 100644 --- a/conf/config.json +++ b/conf/config.json @@ -11,10 +11,14 @@ "integrations_ui_url": "https://scalar.vector.im/", "integrations_rest_url": "https://scalar.vector.im/api", "showLabsSettings": false, - "roomDirectory": {"servers": ["matrix.org"]}, + "roomDirectory": { + "servers": ["matrix.org"] + }, "enable_presence_by_hs_url": { "https://matrix.org": false, "https://matrix-client.matrix.org": false }, - "embedded_pages": {"login_for_welcome": __LOGIN_FOR_WELCOME__} + "embedded_pages": { + "login_for_welcome": __LOGIN_FOR_WELCOME__ + } } From 3ec8a7eaa9d6091a21d0526bea96733288d5fb4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 09:55:09 +0100 Subject: [PATCH 65/77] Update nginx.conf --- conf/nginx.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 6cd2808..858d281 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,8 +5,11 @@ location __PATH__/ { index index.html; + more_set_headers "X-Frame-Options: SAMEORIGIN"; + more_set_headers "X-Content-Type-Options: nosniff"; + more_set_headers "X-XSS-Protection: '1; mode=block'"; more_set_headers "Content-Security-Policy: frame-ancestors 'self'"; - + # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } From 4eeed606ce212197b6dda1da7db6503792a938a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 09:56:04 +0100 Subject: [PATCH 66/77] Update install --- scripts/install | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/install b/scripts/install index c15fbc4..2131ce4 100644 --- a/scripts/install +++ b/scripts/install @@ -13,15 +13,8 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -#default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER login_for_welcome=true - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= - ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome -#ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE From 922ee0eb507c7039577f13d506930d8c60ec0ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:01:04 +0100 Subject: [PATCH 67/77] Update config_panel.toml --- config_panel.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index b386fcc..eba8b5f 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -5,15 +5,15 @@ name = "Element configuration" name.fr = "Configuration d'Element" [main.config] - name = "Configuration Options" + name.en = "Configuration Options" name.fr = "Options de configuration" [main.config.login_for_welcome] - ask = "Display login as welcome page" + ask.en = "Display login as welcome page" ask.fr = "Afficher la connexion comme page d'accueil" type = "boolean" yes = true no = false - help = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality." + help.en = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality." help.fr = "Quand l'option est sélectionnée, l'application utilisera le formulaire de connexion comme page d'accueil au lieu de la page d'accueil elle-même. Cela désactive l'utilisation de welcome_url et de toutes les fonctionnalités de la page d'accueil." - bind = "login_for_welcome:/var/www/__APP__/config.json" + bind = "login_for_welcome:__INSTALL_DIR__/config.json" From 45cc99ca86a571c03da06149101cd1c1dc478d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:01:48 +0100 Subject: [PATCH 68/77] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 2131ce4..1c191f1 100644 --- a/scripts/install +++ b/scripts/install @@ -29,7 +29,7 @@ chown -R $app:www-data "$install_dir" #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Adding system configurations related to $app ..." --weight=1 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config From d6432a9a93e30c6f14d3f46a74e17a3145242bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:08:54 +0100 Subject: [PATCH 69/77] Update config_panel.toml --- config_panel.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index eba8b5f..00c2e1e 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -1,7 +1,7 @@ version = "1.0" [main] -name = "Element configuration" +name.en = "Element configuration" name.fr = "Configuration d'Element" [main.config] From 7fe9ce0d9de1ded43a2dfb8644b138a19154d5f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 4 Mar 2023 15:05:15 +0100 Subject: [PATCH 70/77] fix --- doc/{ADMIN.md => PRE_INSTALL.md} | 0 doc/{ADMIN_fr.md => PRE_INSTALL_fr.md} | 0 manifest.toml | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename doc/{ADMIN.md => PRE_INSTALL.md} (100%) rename doc/{ADMIN_fr.md => PRE_INSTALL_fr.md} (100%) diff --git a/doc/ADMIN.md b/doc/PRE_INSTALL.md similarity index 100% rename from doc/ADMIN.md rename to doc/PRE_INSTALL.md diff --git a/doc/ADMIN_fr.md b/doc/PRE_INSTALL_fr.md similarity index 100% rename from doc/ADMIN_fr.md rename to doc/PRE_INSTALL_fr.md diff --git a/manifest.toml b/manifest.toml index ed424cf..bc6db09 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ code = "https://github.com/vector-im/element-web/" cpe = "cpe:2.3:a:matrix:element" [integration] -yunohost = ">= 11.1.12" +yunohost = ">= 11.1.13" architectures = "all" multi_instance = true ldap = false From b1383625987ed6b8e8cdbfb68aaf33f222835564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 15 Mar 2023 14:13:48 +0100 Subject: [PATCH 71/77] 1.11.25 --- 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 4b88ac1..f32dd80 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.24/element-v1.11.24.tar.gz -SOURCE_SUM=2671281dde4c577e20c3c1bce24caa519a574b848e63f968d0f76a43455936c1 +SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.25/element-v1.11.25.tar.gz +SOURCE_SUM=974877e5d8dc3f8919cd5101fc6f36fcd2145628bb917b48a6863213cee30ba6 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 70c15b7..b70459b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web client for Matrix", "fr": "Client web pour Matrix" }, - "version": "1.11.24~ynh1", + "version": "1.11.25~ynh1", "url": "https://element.io", "upstream": { "license": "Apache-2.0", From 75b5eb08b8952667adb91df0bdc41ff0a569d486 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 15 Mar 2023 13:13:54 +0000 Subject: [PATCH 72/77] 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 60077ba..edde047 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.11.24~ynh1 +**Shipped version:** 1.11.25~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index 06642db..24992f4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.11.24~ynh1 +**Version incluse :** 1.11.25~ynh1 **Démo :** https://app.element.io/ From b18536a9c02e835241e0703d3de77223bc054047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 15 Mar 2023 14:15:40 +0100 Subject: [PATCH 73/77] 1.11.25 --- conf/app.src | 5 ----- manifest.toml | 12 ++++++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 conf/app.src diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index 4b88ac1..0000000 --- a/conf/app.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/vector-im/element-web/releases/download/v1.11.24/element-v1.11.24.tar.gz -SOURCE_SUM=2671281dde4c577e20c3c1bce24caa519a574b848e63f968d0f76a43455936c1 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true diff --git a/manifest.toml b/manifest.toml index bc6db09..bd6c198 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Element" description.en = "Web client for Matrix" description.fr = "Client web pour Matrix" -version = "1.11.24~ynh1" +version = "1.11.25~ynh1" maintainers = ["Josué Tille"] @@ -18,7 +18,7 @@ code = "https://github.com/vector-im/element-web/" cpe = "cpe:2.3:a:matrix:element" [integration] -yunohost = ">= 11.1.13" +yunohost = ">= 11.1.15" architectures = "all" multi_instance = true ldap = false @@ -49,6 +49,14 @@ ram.runtime = "50M" default = "visitors" [resources] + + + [resources.sources] + + [resources.sources.main] + url = "https://github.com/vector-im/element-web/releases/download/v1.11.25/element-v1.11.25.tar.gz" + sha256 = "974877e5d8dc3f8919cd5101fc6f36fcd2145628bb917b48a6863213cee30ba6" + [resources.system_user] [resources.install_dir] From e23ee4f5e6c9a9b02f29a76b5f58831d9a3ea40d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 15 Mar 2023 13:15:45 +0000 Subject: [PATCH 74/77] 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 4dd1eaf..b228744 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Element is a new type of messaging app. You choose where your messages are stored, putting you in control of your data. It gives you access to the Matrix open network, so you can talk to anyone. Element provides a new level of security, adding cross-signed device verification to default end-to-end encryption. -**Shipped version:** 1.11.24~ynh1 +**Shipped version:** 1.11.25~ynh1 **Demo:** https://app.element.io/ diff --git a/README_fr.md b/README_fr.md index 8bfc214..73d6c9f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Element est un nouveau type d'application de messagerie. Vous choisissez où vos messages sont stockés, ce qui vous donne le contrôle de vos données. Il vous donne accès au réseau ouvert Matrix, vous pouvez donc parler à n'importe qui. Element offre un nouveau niveau de sécurité, en ajoutant la vérification des appareils par signature croisée au chiffrement de bout en bout par défaut. -**Version incluse :** 1.11.24~ynh1 +**Version incluse :** 1.11.25~ynh1 **Démo :** https://app.element.io/ From 6062460600779c98fe3c2659d5f7bb5fefec4084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 15 Mar 2023 14:17:04 +0100 Subject: [PATCH 75/77] Update restore --- scripts/restore | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index cf6f4b0..299eaca 100644 --- a/scripts/restore +++ b/scripts/restore @@ -18,8 +18,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" chown -R $app:www-data "$install_dir" -chmod 400 "$install_dir/config.json" -chown $app:$app "$install_dir/config.json" #================================================= # RESTORE SYSTEM CONFIGURATIONS From 9b2b670840ca3053575a2f909a82227b6caebd74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Mar 2023 08:41:00 +0100 Subject: [PATCH 76/77] fix --- scripts/install | 6 ++---- scripts/upgrade | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 1c191f1..9edc574 100644 --- a/scripts/install +++ b/scripts/install @@ -24,8 +24,6 @@ ynh_script_progression --message="Setting up source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$install_dir" -chown -R $app:www-data "$install_dir" - #================================================= # SYSTEM CONFIGURATION #================================================= @@ -41,8 +39,8 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -chmod 400 "$install_dir/config.json" -chown $app:$app "$install_dir/config.json" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 26bc2c0..3583ab8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,6 +43,7 @@ then ynh_setup_source --dest_dir="$install_dir" --keep="config.json" fi +chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= @@ -52,8 +53,8 @@ chown -R $app:www-data "$install_dir" #ynh_add_config --template="../conf/config.json" --destination="$install_dir/config.json" -#chmod 400 "$install_dir/config.json" -#chown $app:$app "$install_dir/config.json" +#chmod -R o-rwx "$install_dir" +#chown -R $app:www-data "$install_dir" #================================================= # REAPPLY SYSTEM CONFIGURATIONS From 7dd9b70d4eac83aa2ef788e3ff83b19a5a8b1634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Mar 2023 15:27:02 +0100 Subject: [PATCH 77/77] Update config_panel.toml --- config_panel.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index 00c2e1e..7b8b5de 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -1,19 +1,19 @@ version = "1.0" [main] -name.en = "Element configuration" -name.fr = "Configuration d'Element" +name = "Element configuration" +#name.fr = "Configuration d'Element" [main.config] - name.en = "Configuration Options" - name.fr = "Options de configuration" + name = "Configuration Options" + #name.fr = "Options de configuration" [main.config.login_for_welcome] - ask.en = "Display login as welcome page" - ask.fr = "Afficher la connexion comme page d'accueil" + ask = "Display login as welcome page" + #ask.fr = "Afficher la connexion comme page d'accueil" type = "boolean" yes = true no = false - help.en = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality." - help.fr = "Quand l'option est sélectionnée, l'application utilisera le formulaire de connexion comme page d'accueil au lieu de la page d'accueil elle-même. Cela désactive l'utilisation de welcome_url et de toutes les fonctionnalités de la page d'accueil." + help = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality." + #help.fr = "Quand l'option est sélectionnée, l'application utilisera le formulaire de connexion comme page d'accueil au lieu de la page d'accueil elle-même. Cela désactive l'utilisation de welcome_url et de toutes les fonctionnalités de la page d'accueil." bind = "login_for_welcome:__INSTALL_DIR__/config.json"