From 058213c87f19920f687eb0f813fc59902cabfc6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 12 Jan 2022 22:04:24 +0100 Subject: [PATCH 01/46] 1.6.8 (#25) * 1.6.8 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 5 ----- manifest.json | 4 ++-- scripts/_common.sh | 2 +- scripts/install | 9 ++++++++- scripts/remove | 8 ++++++++ scripts/restore | 13 ++++++++++--- scripts/upgrade | 7 +++++++ 10 files changed, 40 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e152106..7e0626d 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 Open source to-do list script -**Shipped version:** 1.6.7~ynh1 +**Shipped version:** 1.6.8~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index b791ec0..33d4eea 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Gestionnaire de todo list -**Version incluse :** 1.6.7~ynh1 +**Version incluse :** 1.6.8~ynh1 **Démo :** https://www.mytinytodo.net/demo/ diff --git a/conf/app.src b/conf/app.src index 30ac527..adb312a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.6.7/mytinytodo-v1.6.7.zip -SOURCE_SUM=1e1bc65a4ba27eecdff71a85c8e292ef54185cdc9108e1e9507f7243df1a0157 +SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.6.8/mytinytodo-v1.6.8.zip +SOURCE_SUM=5970a55045b2a589a72c1afcf0636d06d070f7e97c1afc8254669d5767641679 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index cfdefca..179ee75 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; try_files $uri $uri/ index.php; diff --git a/manifest.json b/manifest.json index 8f66925..db17966 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source to-do list script", "fr": "Gestionnaire de todo list" }, - "version": "1.6.7~ynh1", + "version": "1.6.8~ynh1", "url": "http://www.mytinytodo.net/", "upstream": { "license": "GPL-2.0", @@ -21,7 +21,7 @@ "email": "pierre.levasseur@free.fr" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index fa5e714..bfd0e68 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-pdo" +pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-pdo" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index b34d461..89132ce 100644 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,13 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=language --value=$language +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE A MYSQL DATABASE #================================================= @@ -96,7 +103,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/remove b/scripts/remove index 71e6329..886445d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -55,6 +55,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 62d4203..d48cdbf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -35,8 +35,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -79,7 +78,15 @@ chmod 775 $final_path/tmp/sessions ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config + +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index fbbdf0e..f1e2b46 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -103,6 +103,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # PHP-FPM CONFIGURATION #================================================= From 5778ba32bf2638647702c1d6e951c056749d6483 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 13 Jan 2022 08:36:29 +0100 Subject: [PATCH 02/46] Update updater.sh --- .github/workflows/updater.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index dfd5950..2515af4 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -8,6 +8,7 @@ # The YunoHost-Apps organisation offers a template Action to run this script periodically # Since each app is different, maintainers can adapt its contents so as to perform # automatic actions when a new upstream release is detected. +exit 1 #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS From a9d8e2f025b37583a39b783805cdeaeb19d67e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 26 Feb 2022 14:23:25 +0100 Subject: [PATCH 03/46] Config panel (#30) --- README.md | 22 +++++- README_fr.md | 22 +++++- conf/config.php | 9 ++- config_panel.toml | 19 +++++ doc/DESCRIPTION.md | 14 ++++ manifest.json | 24 +++++- scripts/_common.sh | 2 +- scripts/config | 102 +++++++++++++++++++++++++ scripts/install | 30 +++++--- scripts/restore | 21 ++--- scripts/upgrade | 50 ++++++------ sources/ajouts/lang/ar.php | 139 --------------------------------- sources/ajouts/lang/de.php | 138 --------------------------------- sources/ajouts/lang/en.php | 140 ---------------------------------- sources/ajouts/lang/fr.php | 137 --------------------------------- sources/ajouts/lang/ru.php | 138 --------------------------------- sources/ajouts/lang/zh-cn.php | 137 --------------------------------- 17 files changed, 254 insertions(+), 890 deletions(-) create mode 100644 config_panel.toml create mode 100644 doc/DESCRIPTION.md create mode 100644 scripts/config delete mode 100644 sources/ajouts/lang/ar.php delete mode 100644 sources/ajouts/lang/de.php delete mode 100644 sources/ajouts/lang/en.php delete mode 100644 sources/ajouts/lang/fr.php delete mode 100644 sources/ajouts/lang/ru.php delete mode 100644 sources/ajouts/lang/zh-cn.php diff --git a/README.md b/README.md index 7e0626d..cf23465 100644 --- a/README.md +++ b/README.md @@ -3,19 +3,33 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app It shall NOT be edited by hand. --> -# myTinyTodo for YunoHost +# MyTinyTodo for YunoHost [![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) -[![Install myTinyTodo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) +[![Install MyTinyTodo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install myTinyTodo quickly and simply on a YunoHost server. +> *This package allows you to install MyTinyTodo quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Open source to-do list script +### Features + +- Multiple lists +- Task notes +- Tags (and tag cloud) +- Due dates +- Priority (-1, 0, +1, +2) +- Different sortings including sort by drag-and-drop +- Search +- Password protection +- Smart syntax improves creation of tasks + (usage: /priority/ Task /tags/) +- Print-friendly CSS +- tyle for mobiles devices + **Shipped version:** 1.6.8~ynh1 diff --git a/README_fr.md b/README_fr.md index 33d4eea..33e12d0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,17 +1,31 @@ -# myTinyTodo pour YunoHost +# MyTinyTodo pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) -[![Installer myTinyTodo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) +[![Installer MyTinyTodo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) *[Read this readme in english.](./README.md)* *[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer myTinyTodo rapidement et simplement sur un serveur YunoHost. +> *Ce package vous permet d'installer MyTinyTodo 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 -Gestionnaire de todo list +### Features + +- Multiple lists +- Task notes +- Tags (and tag cloud) +- Due dates +- Priority (-1, 0, +1, +2) +- Different sortings including sort by drag-and-drop +- Search +- Password protection +- Smart syntax improves creation of tasks + (usage: /priority/ Task /tags/) +- Print-friendly CSS +- tyle for mobiles devices + **Version incluse :** 1.6.8~ynh1 diff --git a/conf/config.php b/conf/config.php index fd82888..2edfefa 100755 --- a/conf/config.php +++ b/conf/config.php @@ -3,13 +3,16 @@ # Configuration goes here $config = array(); +# Set a title for MyTinyTodo +$config['title'] = '__TITLE__'; + # Database type: sqlite or mysql $config['db'] = 'mysql'; # Specify these settings if you selected above to use Mysql $config['mysql.host'] = "localhost"; $config['mysql.db'] = "__DB_NAME__"; -$config['mysql.user'] = "__DB_NAME__"; +$config['mysql.user'] = "__DB_USER__"; $config['mysql.password'] = "__DB_PWD__"; # Tables prefix @@ -26,13 +29,13 @@ $config['lang'] = "__LANGUAGE__"; # Specify password here to protect your tasks from modification, # or leave empty that everyone could read/write todolist -$config['password'] = ""; +$config['password'] = "__SET_PASSWORD__"; # To disable smart syntax uncomment the line below #$config['smartsyntax'] = 0; # Default Time zone -$config['timezone'] = 'UTC'; +$config['timezone'] = '__TIMEZONE__'; # To disable auto adding selected tag comment out the line below or set value to 0 $config['autotag'] = 1; diff --git a/config_panel.toml b/config_panel.toml new file mode 100644 index 0000000..49830b4 --- /dev/null +++ b/config_panel.toml @@ -0,0 +1,19 @@ +version = "1.0" + +[main] +name = "MyTinyTodo configuration" + + [main.config] + name = "Configuration Options" + + [main.config.title] + ask = "Set title" + type = "string" + help = "Specify a title for your todolist." + bind = "title:__FINALPATH__/db/config.php" + + [main.config.set_password] + ask = "Set password" + type = "password" + help = "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist." + bind = "password:__FINALPATH__/db/config.php" diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..3c5ac00 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,14 @@ +### Features + +- Multiple lists +- Task notes +- Tags (and tag cloud) +- Due dates +- Priority (-1, 0, +1, +2) +- Different sortings including sort by drag-and-drop +- Search +- Password protection +- Smart syntax improves creation of tasks + (usage: /priority/ Task /tags/) +- Print-friendly CSS +- tyle for mobiles devices diff --git a/manifest.json b/manifest.json index db17966..be97954 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name": "myTinyTodo", + "name": "MyTinyTodo", "id": "mytinytodo", "packaging_format": 1, "description": { @@ -26,7 +26,7 @@ "multi_instance": false, "services": [ "nginx", - "php7.3-fpm", + "php8.0-fpm", "mysql" ], "arguments": { @@ -41,6 +41,24 @@ "example": "/mytinytodo", "default": "/mytinytodo" }, + { + "name": "title", + "type": "string", + "ask": { + "en": "Choose a title for your todo list", + "fr": "Choisissez le titre pour votre liste de tâches" + }, + "default": "myTinyTodo" + }, + { + "name": "set_password", + "type": "password", + "optional": true, + "ask": { + "en": "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist", + "fr": "Spécifiez le mot de passe ici pour protéger vos tâches, ou laissez vide pour que tout le monde puisse lire/écrire votre liste de tâche." + } + }, { "name": "is_public", "type": "boolean", @@ -57,7 +75,7 @@ "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["ar", "de", "en", "fr", "ru", "zh-cn"], + "choices": ["ar", "de", "en", "fr", "it", "nl", "pt-pt", "ru", "uk", "zh-cn"], "default": "fr" } ] diff --git a/scripts/_common.sh b/scripts/_common.sh index bfd0e68..2271984 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-pdo" diff --git a/scripts/config b/scripts/config new file mode 100644 index 0000000..b9e79f8 --- /dev/null +++ b/scripts/config @@ -0,0 +1,102 @@ +#!/bin/bash +# In simple cases, you don't need a config script. + +# With a simple config_panel.toml, you can write in the app settings, in the +# upstream config file or replace complete files (logo ...) and restart services. + +# The config scripts allows you to go further, to handle specific cases +# (validation of several interdependent fields, specific getter/setter for a value, +# display dynamic informations or choices, pre-loading of config type .cube... ). + +#================================================= +# GENERIC STARTING +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source /usr/share/yunohost/helpers + +ynh_abort_if_errors + +#================================================= +# RETRIEVE ARGUMENTS +#================================================= + +final_path=$(ynh_app_setting_get $app final_path) + +#================================================= +# SPECIFIC GETTERS FOR TOML SHORT KEY +#================================================= + +get__amount() { + # Here we can imagine to have an API call to stripe to know the amount of donation during a month + local amount = 200 + + # It's possible to change some properties of the question by overriding it: + if [ $amount -gt 100 ] + then + cat << EOF +style: success +value: $amount +ask: + en: A lot of donation this month: **$amount €** +EOF + else + cat << EOF +style: danger +value: $amount +ask: + en: Not so much donation this month: $amount € +EOF + fi +} + +get__prices() { + local prices = "$(grep "DONATION\['" "$final_path/settings.py" | sed -r "s@^DONATION\['([^']*)'\]\['([^']*)'\] = '([^']*)'@\1/\2/\3@g" | sed -z 's/\n/,/g;s/,$/\n/')" + if [ "$prices" == "," ]; + then + # Return YNH_NULL if you prefer to not return a value at all. + echo YNH_NULL + else + echo $prices + fi +} + + +#================================================= +# SPECIFIC VALIDATORS FOR TOML SHORT KEYS +#================================================= +validate__publishable_key() { + + # We can imagine here we test if the key is really a publisheable key + (is_secret_key $publishable_key) && + echo 'This key seems to be a secret key' +} + +#================================================= +# SPECIFIC SETTERS FOR TOML SHORT KEYS +#================================================= +set__prices() { + + #--------------------------------------------- + # IMPORTANT: setter are trigger only if a change is detected + #--------------------------------------------- + for price in $(echo $prices | sed "s/,/ /"); do + frequency=$(echo $price | cut -d/ -f1) + currency=$(echo $price | cut -d/ -f2) + price_id=$(echo $price | cut -d/ -f3) + sed "d/DONATION\['$frequency'\]\['$currency'\]" "$final_path/settings.py" + + echo "DONATION['$frequency']['$currency'] = '$price_id'" >> "$final_path/settings.py" + done + + #--------------------------------------------- + # IMPORTANT: to be able to upgrade properly, you have to saved the value in settings too + #--------------------------------------------- + ynh_app_setting_set $app prices $prices +} + +#================================================= +# GENERIC FINALIZATION +#================================================= +ynh_app_config_run $1 diff --git a/scripts/install b/scripts/install index 89132ce..d03dc9d 100644 --- a/scripts/install +++ b/scripts/install @@ -24,9 +24,14 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE +timezone="$(cat /etc/timezone)" +phpversion=$YNH_PHP_VERSION +title=$YNH_APP_ARG_TITLE app=$YNH_APP_INSTANCE_NAME +set_password="$YNH_APP_ARG_SET_PASSWORD" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -46,6 +51,8 @@ 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 ynh_app_setting_set --app=$app --key=language --value=$language +ynh_app_setting_set --app=$app --key=set_password --value="$set_password" +ynh_app_setting_set --app=$app --key=title --value=$title #================================================= # INSTALL DEPENDENCIES @@ -64,9 +71,8 @@ db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name -# # # Charge les commandes sql communes à tous les scripts. -# # # mysql --debug-check -u $db_user -p$db_pwd $db_user < ../conf/sql/common.sql -ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ../conf/sql/mytinytodo.sql +# Charge les commandes sql communes à tous les scripts. +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ../conf/sql/mytinytodo.sql #================================================= # CREATE DEDICATED USER @@ -104,25 +110,25 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # MODIFY A CONFIG FILE #================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/config.php" --destination="$final_path/db/config.php" +chmod 600 "$final_path/db/config.php" +chown $app:$app "$final_path/db/config.php" +chmod 775 "$final_path/tmp/sessions" + +#================================================= +# REMOVE UNWANTED FILES +#================================================= + ynh_secure_remove --file="$final_path/setup.php" ynh_secure_remove --file="$final_path/db/todolist.db" -# #================================================= -# # SECURE FILES AND DIRECTORIES -# #================================================= - -# # Set permissions to app files -chmod 775 $final_path/db/config.php -chmod 775 $final_path/tmp/sessions - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/restore b/scripts/restore index d48cdbf..b7b95f9 100644 --- a/scripts/restore +++ b/scripts/restore @@ -28,7 +28,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +phpversion=$YNH_PHP_VERSION #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -71,15 +71,6 @@ chown -R $app:www-data "$final_path" chmod 775 $final_path/db/config.php chmod 775 $final_path/tmp/sessions -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - -# Recreate a dedicated PHP-FPM config -ynh_add_fpm_config - #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -88,6 +79,16 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=2 + +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" + +# Recreate a dedicated php-fpm config +ynh_add_fpm_config + #================================================= # RESTORE THE MYSQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f1e2b46..4c26f63 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,12 @@ language=$(ynh_app_setting_get --app=$app --key=language) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +phpversion=$YNH_PHP_VERSION +timezone="$(cat /etc/timezone)" + +set_password=$(ynh_app_setting_get --app=$app --key=set_password) +title=$(ynh_app_setting_get --app=$app --key=title) #================================================= # CHECK VERSION @@ -49,6 +54,22 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +if [ -z "$set_password" ]; then + set_password="" + ynh_app_setting_set --app=$app --key=set_password --value=$set_password +fi + +if [ -z "$title" ]; then + title="MytinyTodo" + ynh_app_setting_set --app=$app --key=title --value=$title +fi + +# If fpm_footprint doesn't exist, create it +if [ -z "$timezone" ]; then + timezone="$(cat /etc/timezone)" + ynh_app_setting_set --app=$app --key=timezone --value=$timezone +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -72,23 +93,15 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=2 - # Create a temporary directory - tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir - cp -ar "$final_path/db" "$tmpdir/db" - # Remove the app directory securely ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" - - # Copy the admin saved settings from tmp directory to final path - cp -ar "$tmpdir/db" "$final_path/db" + ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/db/config.php" # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" + #nh_secure_remove --file="$tmpdir" + ynh_exec_warn_less ynh_add_config --template="../conf/config.php" --destination="$final_path/db/config.php" fi chmod 750 "$final_path" @@ -118,17 +131,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config -#================================================= -# RESTORE OF THE SQL BDD -#================================================= - -# db_pwd=$(ynh_app_setting_get $app mysqlpwd) -# # il ne faut recreer la base, c'est une maj -# #ynh_mysql_create_db $db_name $db_name $db_pwd - -# # il faut prendre le script de mise a jour -# ynh_mysql_connect_as $db_name $db_pwd $db_name < $final_path/db/update.sql - #================================================= # RESTORE USER RIGHTS #================================================= @@ -136,7 +138,7 @@ ynh_add_fpm_config ynh_secure_remove --file="$final_path/setup.php" ynh_secure_remove --file="$final_path/db/todolist.db" -chmod 775 $final_path/db/config.php +chmod 600 $final_path/db/config.php chmod 755 $final_path/tmp/sessions #================================================= diff --git a/sources/ajouts/lang/ar.php b/sources/ajouts/lang/ar.php deleted file mode 100644 index c910ec3..0000000 --- a/sources/ajouts/lang/ar.php +++ /dev/null @@ -1,139 +0,0 @@ - 'هل أنت متأكد أنك تود حذف المهمة؟', - 'confirmLeave' => 'قد تود بيانات لم تُحفظ. هل تود المغادرة حقًا؟', - 'actionNoteSave' => 'احفظ', - 'actionNoteCancel' => 'ألغِ', - 'error' => 'حدث خطأ ما (انقر لمشاهدة التفاصيل)', - 'denied' => 'لم يُسمح بالنفاذ', - 'invalidpass' => 'كلمة السر خاطئة', - 'tagfilter' => 'الوسم:', - 'addList' => 'أنشئ قائمة جديدة', - 'renameList' => 'غيِّر اسم القائمة', - 'deleteList' => 'ستُحذف القائمة الحالية وكل ما بها من مهمات.\\nهل أنت متأكد أنك تود فعل ذلك؟', - 'clearCompleted' => 'ستُحذف كل المهمات المكتملة في القائمة.\\nهل أنت متأكد أنك تود فعل ذلك؟', - 'settingsSaved' => 'حُفظت الإعدادات. يعيد التحميل...', - ); - - var $inc = array - ( - 'htab_newtask' => 'مهمة جديدة', - 'htab_search' => 'بحث', - 'btn_add' => 'أضِف', - 'btn_search' => 'ابحث', - 'advanced_add' => 'متقدم', - 'searching' => 'يبحث عن', - 'tasks' => 'المهمات', - 'taskdate_inline_created' => 'أنشئت في %s', - 'taskdate_inline_completed' => 'اكتملت في %s', - 'taskdate_inline_duedate' => 'تنتهي في %s', - 'taskdate_created' => 'أنشئت', - 'taskdate_completed' => 'اكتملت', - 'go_back' => '>> خلف', - 'edit_task' => 'حرِّر المهمة', - 'add_task' => 'مهمة جديدة', - 'priority' => 'الأولوية', - 'task' => 'المهمة', - 'note' => 'الملاحظة', - 'tags' => 'الوسوم', - 'save' => 'احفظ', - 'cancel' => 'ألغِ', - 'password' => 'كلمة السر', - 'btn_login' => 'لُج', - 'a_login' => 'لُج', - 'a_logout' => 'اخرج', - 'public_tasks' => 'المهمات العامة', - 'tagcloud' => 'الوسوم', - 'tagfilter_cancel' => 'ألغِ المرشح', - 'sortByHand' => 'رتِّب يدويًا', - 'sortByPriority' => 'رتِّب حسب الأولوية', - 'sortByDueDate' => 'رتِّب حسب تاريخ الانتهاء', - 'sortByDateCreated' => 'رتِّب حسب تاريخ الإنشاء', - 'sortByDateModified' => 'رتِّب حسب تاريخ التعديل', - 'due' => 'تنتهي', - 'daysago' => 'منذ %d أيام', - 'indays' => 'خلال %d أيام', - 'months_short' => array('ينا','فبر','مار','أبر','ماي','يون','يول','أغس','سبت','أكت','نوف','ديس'), - 'months_long' => array('يناير','فبراير','مارس','أبريل','مايو','يونيو','يوليو','أغسطس','سبتمبر','أكتوبر','نوفمبر','ديسمبر'), - 'days_min' => array('أحد','إثنين','ثلاثاء','أربعاء','خميس','جمعة','سبت'), - 'days_long' => array('الأحد','الإثنين','الثلاثاء','الأربعاء','الخميس','الجمعة','السبت'), - 'today' => 'اليوم', - 'yesterday' => 'أمس', - 'tomorrow' => 'غدًا', - 'f_past' => 'متأخر', - 'f_today' => 'اليوم وغدًا', - 'f_soon' => 'قريبًا', - 'action_edit' => 'حرِّر', - 'action_note' => 'حرِّر الملاحظة', - 'action_delete' => 'احذف', - 'action_priority' => 'الأولوية', - 'action_move' => 'انقل إلى', - 'notes' => 'الملاحظات:', - 'notes_show' => 'أظهر', - 'notes_hide' => 'أخفِ', - 'list_new' => 'قائمة جديدة', - 'list_rename' => 'غيِّر اسم القائمة', - 'list_delete' => 'احذف القائمة', - 'list_publish' => 'انشر القائمة', - 'list_showcompleted' => 'أظهر المهمات المكتملة', - 'list_clearcompleted' => 'امحُ المهمات المكتملة', - 'list_select' => 'اختر القائمة', - 'list_export' => 'صدِّر', - 'list_export_csv' => 'CSV', - 'list_export_ical' => 'iCalendar', - 'list_rssfeed' => 'تلقيم آر‌إس‌إس', - 'alltags' => 'كل الوسوم:', - 'alltags_show' => 'أظهر الكل', - 'alltags_hide' => 'أخفِ الكل', - 'a_settings' => 'الإعدادات', - 'rss_feed' => 'تلقيم آر‌إس‌إس', - 'feed_title' => '%s', - 'feed_completed_tasks' => 'المهمات المكتملة', - 'feed_modified_tasks' => 'المهمات المعدلة', - 'feed_new_tasks' => 'المهمات الجديدة', - 'alltasks' => 'كل المهمات', - 'set_header' => 'الإعدادات', - 'set_title' => 'العنوان', - 'set_title_descr' => '(حدِّد ما إذا أردت تغيير العنوان المبدئي)', - 'set_language' => 'اللغة', - 'set_protection' => 'الحماية بكلمة سر', - 'set_enabled' => 'مفعلة', - 'set_disabled' => 'معطلة', - 'set_newpass' => 'كلمة السر الجديدة', - 'set_newpass_descr' => '(اتركها فارغة إذا لم تكن ترغب بتغيير كلمة السر الحالية)', - 'set_smartsyntax' => 'الصياغة الذكية', - 'set_smartsyntax_descr' => '(/الأولوية/ المهمة /الوسوم/)', - 'set_timezone' => 'المنطقة الزمنية', - 'set_autotag' => 'الوسوم الآلية', - 'set_autotag_descr' => '(يضيف الوسوم الموجودة في مرشّح الوسوم إلى المهمات الجديدة)', - 'set_sessions' => 'طريقة التعامل مع الجلسات', - 'set_sessions_php' => 'بي‌إتش‌بي', - 'set_sessions_files' => 'ملفات', - 'set_firstdayofweek' => 'أول أيام الأسبوع', - 'set_custom' => 'مخصصة', - 'set_date' => 'صيغة التواريخ', - 'set_date2' => 'الصيغة القصيرة للتواريخ', - 'set_shortdate' => 'الصيغة القصيرة لتواريخ السنة الجارية', - 'set_clock' => 'صيغة الوقت', - 'set_12hour' => '12 ساعة', - 'set_24hour' => '24 ساعة', - 'set_submit' => 'أرسل التغييرات', - 'set_cancel' => 'ألغِ', - 'set_showdate' => 'تواريخ المهمات تظهر في القائمة', - ); -} diff --git a/sources/ajouts/lang/de.php b/sources/ajouts/lang/de.php deleted file mode 100644 index 5ed8cbc..0000000 --- a/sources/ajouts/lang/de.php +++ /dev/null @@ -1,138 +0,0 @@ - 'Willst Du die Aufgabe wirklich löschen?', - 'confirmLeave' => 'Einige Daten wurden noch nicht gespeichert. Willst du die Seite wirklich verlassen?', - 'actionNoteSave' => 'speichern', - 'actionNoteCancel' => 'abbrechen', - 'error' => 'Fehler aufgetreten (für Details klicken)', - 'denied' => 'Zugriff verweigert', - 'invalidpass' => 'Falsches Passwort', - 'tagfilter' => 'Schlagwort:', - 'addList' => 'Neue Liste anlegen', - 'renameList' => 'Liste umbenennen', - 'deleteList' => 'Die Liste wird mit allen Aufgaben gelöscht.\\nBist Du sicher?', - 'clearCompleted' => 'Alle abgeschlossenen Aufgaben dieser Liste werden gelöscht.\\nBist Du sicher?', - 'settingsSaved' => 'Einstellungen gespeichert. Aktualisierung...', - ); - - var $inc = array - ( - 'htab_newtask' => 'Neue Aufgabe', - 'htab_search' => 'Suche', - 'btn_add' => 'Hinzufügen', - 'btn_search' => 'Suche', - 'advanced_add' => 'Erweitert', - 'searching' => 'Suche nach', - 'tasks' => 'Aufgabe', - 'taskdate_inline_created' => 'hinzugefügt am %s', - 'taskdate_inline_completed' => 'Erledigt am %s', - 'taskdate_inline_duedate' => 'Fällig am %s', - 'taskdate_created' => 'Erstellt', - 'taskdate_completed' => 'Erledigt', - 'go_back' => '<< Zurück', - 'edit_task' => 'Aufgabe bearbeiten', - 'add_task' => 'Neue Aufgabe', - 'priority' => 'Priorität', - 'task' => 'Aufgabe', - 'note' => 'Notiz', - 'tags' => 'Schlagwörter', - 'save' => 'Speichern', - 'cancel' => 'Abbrechen', - 'password' => 'Passwort', - 'btn_login' => 'Login', - 'a_login' => 'Login', - 'a_logout' => 'Logout', - 'public_tasks' => 'Öffentliche Aufgabe', - 'tagcloud' => 'Tags', - 'tagfilter_cancel' => 'Filter aufheben', - 'sortByHand' => 'Manuell sortieren', - 'sortByPriority' => 'Nach Priorität sortieren', - 'sortByDueDate' => 'Nach Fälligkeitsdatum sortieren', - 'sortByDateCreated' => 'Nach Erstelldatum sortieren', - 'sortByDateModified' => 'Nach Änderungsdatum sortieren', - 'due' => 'Fällig', - 'daysago' => 'vor %d Tagen', - 'indays' => 'in %d Tagen', - 'months_short' => array('Jan','Feb','Mrz','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'), - 'months_long' => array('Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'), - 'days_min' => array('So','Mo','Di','Mi','Do','Fr','Sa'), - 'days_long' => array('Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'), - 'today' => 'heute', - 'yesterday' => 'gestern', - 'tomorrow' => 'morgen', - 'f_past' => 'Überfällig', - 'f_today' => 'Heute und morgen', - 'f_soon' => 'Bald', - 'action_edit' => 'Bearbeiten', - 'action_note' => 'Notiz bearbeiten', - 'action_delete' => 'Löschen', - 'action_priority' => 'Priorität', - 'action_move' => 'Verschieben nach', - 'notes' => 'Notizen:', - 'notes_show' => 'Anzeigen', - 'notes_hide' => 'Verbergen', - 'list_new' => 'Neue Liste', - 'list_rename' => 'Liste umbenennen', - 'list_delete' => 'Liste löschen', - 'list_publish' => 'Liste veröffentlichen', - 'list_showcompleted' => 'Abgeschlossene Aufgaben anzeigen', - 'list_clearcompleted' => 'Abgeschlossene Aufgaben löschen', - 'list_select' => 'Liste auswählen', - 'list_export' => 'Export', - 'list_export_csv' => 'CSV', - 'list_export_ical' => 'iCalendar', - 'list_rssfeed' => 'RSS Feed', - 'alltags' => 'Alle Schlagwörter:', - 'alltags_show' => 'Alle anzeigen', - 'alltags_hide' => 'Alle verbergen', - 'a_settings' => 'Einstellungen', - 'rss_feed' => 'RSS Feed', - 'feed_title' => '%s', - 'feed_completed_tasks' => 'Abgeschlossene Aufgabe', - 'feed_modified_tasks' => 'Geänderte Aufgaben', - 'feed_new_tasks' => 'Neue Aufgaben', - 'alltasks' => 'Alle Aufgaben', - 'set_header' => 'Einstellungen', - 'set_title' => 'Titel', - 'set_title_descr' => '(angeben, um Standardtitel zu ändern)', - 'set_language' => 'Sprache', - 'set_protection' => 'Passwortschutz', - 'set_enabled' => 'Aktiviert', - 'set_disabled' => 'Deaktiviert', - 'set_newpass' => 'Neues Passwort', - 'set_newpass_descr' => '(leer lassen, um aktuelles Passwort nicht zu ändern)', - 'set_smartsyntax' => 'Smartsyntax', - 'set_smartsyntax_descr' => '(/Priorität/ Aufgabe /Schlagwörter/)', - 'set_timezone' => 'Zeitzone', - 'set_autotag' => 'Automatische Schlagwörter', - 'set_autotag_descr' => '(fügt Schlagwort des aktuellen Filters automatisch der neu erstellten Aufgabe hinzu)', - 'set_sessions' => 'Sessionhandling-Mechanismus', - 'set_sessions_php' => 'PHP', - 'set_sessions_files' => 'Dateien', - 'set_firstdayofweek' => 'Erster Tag der Woche', - 'set_custom' => 'benutzerdefiniert', - 'set_date' => 'Datumsformat', - 'set_date2' => 'Kurzes Datumsformat', - 'set_shortdate' => 'Kurzes Datumsformat (aktuelles Jahr)', - 'set_clock' => 'Zeitformat', - 'set_12hour' => '12 Stunden', - 'set_24hour' => '24 Stunden', - 'set_submit' => 'Änderungen speichern', - 'set_cancel' => 'Abbrechen', - 'set_showdate' => 'Aufgabendatum in Liste anzeigen', - ); -} diff --git a/sources/ajouts/lang/en.php b/sources/ajouts/lang/en.php deleted file mode 100644 index d840aae..0000000 --- a/sources/ajouts/lang/en.php +++ /dev/null @@ -1,140 +0,0 @@ - "Are you sure you want to delete the task?", - 'confirmLeave' => "There can be unsaved data. Do you really want to leave?", - 'actionNoteSave' => "save", - 'actionNoteCancel' => "cancel", - 'error' => "Some error occurred (click for details)", - 'denied' => "Access denied", - 'invalidpass' => "Wrong password", - 'tagfilter' => "Tag:", - 'addList' => "Create new list", - 'renameList' => "Rename list", - 'deleteList' => "This will delete current list with all tasks in it.\\nAre you sure?", - 'clearCompleted' => "This will delete all completed tasks in the list.\\nAre you sure?", - 'settingsSaved' => "Settings saved. Reloading...", - ); - - var $inc = array - ( - 'htab_newtask' => "New task", - 'htab_search' => "Search", - 'btn_add' => "Add", - 'btn_search' => "Search", - 'advanced_add' => "Advanced", - 'searching' => "Searching for", - 'tasks' => "Tasks", - 'taskdate_inline_created' => "created at %s", - 'taskdate_inline_completed' => "Completed at %s", - 'taskdate_inline_duedate' => "Due %s", - 'taskdate_created' => "Created", - 'taskdate_completed' => "Completed", - 'go_back' => "<< Back", - 'edit_task' => "Edit Task", - 'add_task' => "New Task", - 'priority' => "Priority", - 'task' => "Task", - 'note' => "Note", - 'tags' => "Tags", - 'save' => "Save", - 'cancel' => "Cancel", - 'password' => "Password", - 'btn_login' => "Login", - 'a_login' => "Login", - 'a_logout' => "Logout", - 'public_tasks' => "Public Tasks", - 'tagcloud' => "Tags", - 'tagfilter_cancel' => "cancel filter", - 'sortByHand' => "Sort by hand", - 'sortByPriority' => "Sort by priority", - 'sortByDueDate' => "Sort by due date", - 'sortByDateCreated' => "Sort by date created", - 'sortByDateModified' => "Sort by date modified", - 'due' => "Due", - 'daysago' => "%d days ago", - 'indays' => "in %d days", - 'months_short' => array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"), - 'months_long' => array("January","February","March","April","May","June","July","August","September","October","November","December"), - 'days_min' => array("Su","Mo","Tu","We","Th","Fr","Sa"), - 'days_long' => array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"), - 'today' => "today", - 'yesterday' => "yesterday", - 'tomorrow' => "tomorrow", - 'f_past' => "Overdue", - 'f_today' => "Today and tomorrow", - 'f_soon' => "Soon", - 'action_edit' => "Edit", - 'action_note' => "Edit Note", - 'action_delete' => "Delete", - 'action_priority' => "Priority", - 'action_move' => "Move to", - 'notes' => "Notes:", - 'notes_show' => "Show", - 'notes_hide' => "Hide", - 'list_new' => "New list", - 'list_rename' => "Rename list", - 'list_delete' => "Delete list", - 'list_publish' => "Publish list", - 'list_showcompleted' => "Show completed tasks", - 'list_clearcompleted' => "Clear completed tasks", - 'list_select' => "Select list", - 'list_export' => "Export", - 'list_export_csv' => "CSV", - 'list_export_ical' => "iCalendar", - 'list_rssfeed' => "RSS Feed", - 'alltags' => "All tags:", - 'alltags_show' => "Show all", - 'alltags_hide' => "Hide all", - 'a_settings' => "Settings", - 'rss_feed' => "RSS Feed", - 'feed_title' => "%s", - 'feed_completed_tasks' => "Completed tasks", - 'feed_modified_tasks' => "Modified tasks", - 'feed_new_tasks' => "New tasks", - 'alltasks' => "All tasks", - - /* Settings */ - 'set_header' => "Settings", - 'set_title' => "Title", - 'set_title_descr' => "(specify if you want to change default title)", - 'set_language' => "Language", - 'set_protection' => "Password protection", - 'set_enabled' => "Enabled", - 'set_disabled' => "Disabled", - 'set_newpass' => "New password", - 'set_newpass_descr' => "(leave blank if won't change current password)", - 'set_smartsyntax' => "Smart syntax", - 'set_smartsyntax_descr' => "(/priority/ task /tags/)", - 'set_timezone' => "Time zone", - 'set_autotag' => "Autotagging", - 'set_autotag_descr' => "(automatically adds tag of current tag filter to newly created task)", - 'set_sessions' => "Session handling mechanism", - 'set_sessions_php' => "PHP", - 'set_sessions_files' => "Files", - 'set_firstdayofweek' => "First day of week", - 'set_custom' => "Custom", - 'set_date' => "Date format", - 'set_date2' => "Short Date format", - 'set_shortdate' => "Short Date (current year)", - 'set_clock' => "Clock format", - 'set_12hour' => "12-hour", - 'set_24hour' => "24-hour", - 'set_submit' => "Submit changes", - 'set_cancel' => "Cancel", - 'set_showdate' => "Show task date in list", - ); -} diff --git a/sources/ajouts/lang/fr.php b/sources/ajouts/lang/fr.php deleted file mode 100644 index 5854317..0000000 --- a/sources/ajouts/lang/fr.php +++ /dev/null @@ -1,137 +0,0 @@ - 'Êtes-vous sûr de vouloir supprimer la tâche ?', - 'confirmLeave' => 'Il peut y avoir des données non enregistrées. Voulez-vous vraiment quitter ?', - 'actionNoteSave' => 'sauvegarder', - 'actionNoteCancel' => 'annuler', - 'error' => 'Il y a eu des erreurs (cliquez pour plus de détails)', - 'denied' => 'Accès refusé', - 'invalidpass' => 'Mauvais mot de passe', - 'tagfilter' => 'Mots-clefs:', - 'addList' => 'Créer une nouvelle liste', - 'renameList' => 'Renommer la liste', - 'deleteList' => 'Cela supprimera la liste actuelle avec toutes les tâches qu’elle contient.\\nÊtes-vous sûr ?', - 'clearCompleted' => 'Cela supprimera toutes les tâches achevées de la liste.\\nÊtes-vous sûr ?', - 'settingsSaved' => 'Réglages sauvegardés. Chargement...', - ); - - var $inc = array - ( - 'htab_newtask' => 'Nouvelle tâche', - 'htab_search' => 'Recherche', - 'btn_add' => 'Ajouter', - 'btn_search' => 'Rechercher', - 'advanced_add' => 'Avancé', - 'searching' => 'Recherche de', - 'tasks' => 'Tâches', - 'taskdate_inline_created' => 'créée le %s', - 'taskdate_inline_completed' => 'Achevée le %s', - 'taskdate_inline_duedate' => 'Échéance %s', - 'taskdate_created' => 'Créée', - 'taskdate_completed' => 'Achevée', - 'go_back' => '<< Retour', - 'edit_task' => 'Éditer la tâche', - 'add_task' => 'Nouvelle tâche', - 'priority' => 'Priorité', - 'task' => 'Tâche', - 'note' => 'Note', - 'save' => 'Sauvegarder', - 'cancel' => 'Annuler', - 'password' => 'Mot de passe', - 'btn_login' => 'Connexion', - 'a_login' => 'Connexion', - 'a_logout' => 'Déconnexion', - 'public_tasks' => 'Tâches publiques', - 'tags' => 'Mots-clefs', - 'tagfilter_cancel' => 'Annuler le filtre', - 'sortByHand' => 'Trier manuellement', - 'sortByPriority' => 'Trier par priorité', - 'sortByDueDate' => 'Trier par date d’échéance', - 'sortByDateCreated' => 'Trier par date de création', - 'sortByDateModified' => 'Trier par date de modification', - 'due' => 'Échéance', - 'daysago' => 'il y a %d jours', - 'indays' => 'dans %d jours', - 'months_short' => array('Jan','Fév','Mar','Avr','Mai','Juin','Juil','Août','Sep','Oct','Nov','Déc'), - 'months_long' => array('Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'), - 'days_min' => array('Dim','Lun','Mar','Mer','Jeu','Ven','Sam'), - 'days_long' => array('Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'), - 'today' => 'aujourd’hui', - 'yesterday' => 'hier', - 'tomorrow' => 'demain', - 'f_past' => 'En retard', - 'f_today' => 'Aujourd’hui et demain', - 'f_soon' => 'Bientôt', - 'action_edit' => 'Éditer', - 'action_note' => 'Éditer la note', - 'action_delete' => 'Supprimer', - 'action_priority' => 'Priorité', - 'action_move' => 'Envoyer vers', - 'notes' => 'Notes:', - 'notes_show' => 'Montrer', - 'notes_hide' => 'Cacher', - 'list_new' => 'Nouvelle liste', - 'list_rename' => 'Renommer la liste', - 'list_delete' => 'Supprimer la liste', - 'list_publish' => 'Publier la liste', - 'list_showcompleted' => 'Montrer les tâches achevées', - 'list_clearcompleted' => 'Effacer les tâches achevées', - 'list_select' => 'Sélectionner la liste', - 'list_export' => 'Exporter', - 'list_export_csv' => 'CSV', - 'list_export_ical' => 'iCalendar', - 'list_rssfeed' => 'Flux RSS', - 'alltags' => 'Tous les mots-clefs:', - 'alltags_show' => 'Tout montrer', - 'alltags_hide' => 'Tout cacher', - 'a_settings' => 'Configuration', - 'rss_feed' => 'Flux RSS', - 'feed_title' => '%s', - 'feed_completed_tasks' => 'Tâches achevées', - 'feed_modified_tasks' => 'Tâches modifiées', - 'feed_new_tasks' => 'Nouvelles tâches', - 'alltasks' => 'Toutes les tâches', - 'set_header' => 'Configuration', - 'set_title' => 'Titre', - 'set_title_descr' => '(Spécifiez si vous souhaitez changer le titre par défaut)', - 'set_language' => 'Langue', - 'set_protection' => 'Protection par mot de passe', - 'set_enabled' => 'Activé', - 'set_disabled' => 'Désactivé', - 'set_newpass' => 'Nouveau mot de passe', - 'set_newpass_descr' => '(laissez blanc pour ne pas modifier le mot de passe actuel)', - 'set_smartsyntax' => 'Syntaxe rapide', - 'set_smartsyntax_descr' => '(/priorité/ tâche /mots-clefs/)', - 'set_timezone' => 'Fuseaux horaires', - 'set_autotag' => 'Mots-clefs automatiques', - 'set_autotag_descr' => '(ajoute automatiquement les mots-clefs aux nouvelles tâches parmis ceux que vous avez déjà définis)', - 'set_sessions' => 'Mécanisme de session', - 'set_sessions_php' => 'PHP', - 'set_sessions_files' => 'Fichiers', - 'set_firstdayofweek' => 'Premier jour de la semaine', - 'set_custom' => 'Personnalisé', - 'set_date' => 'Format de date', - 'set_date2' => 'Format de date court', - 'set_shortdate' => 'Date courte (année actuelle)', - 'set_clock' => 'Format de l’heure', - 'set_12hour' => '12 heures', - 'set_24hour' => '24 heures', - 'set_submit' => 'Sauvegarder la configuration', - 'set_cancel' => 'Annuler', - 'set_showdate' => 'Afficher la date dans la liste', - ); -} diff --git a/sources/ajouts/lang/ru.php b/sources/ajouts/lang/ru.php deleted file mode 100644 index 92fe399..0000000 --- a/sources/ajouts/lang/ru.php +++ /dev/null @@ -1,138 +0,0 @@ - 'Вы действительно хотите удалить задачу?', - 'confirmLeave' => 'На странице могут быть несохраненные данные. Вы действительно хотите закрыть страницу?', - 'actionNoteSave' => 'сохранить', - 'actionNoteCancel' => 'отмена', - 'error' => 'Ошибка', - 'denied' => 'Доступ запрещен', - 'invalidpass' => 'Неверный пароль', - 'tagfilter' => 'Тег:', - 'addList' => 'Новый список', - 'renameList' => 'Переименовать список', - 'deleteList' => 'Вы действительно хотите удалить этот список со всеми задачами?', - 'clearCompleted' => 'Удалить все выполненные задачи из списка?', - 'settingsSaved' => 'Настройки сохранены. Перезагрузка...', - ); - - var $inc = array - ( - 'htab_newtask' => 'Новая задача', - 'htab_search' => 'Поиск', - 'btn_add' => 'Добавить', - 'btn_search' => 'Искать', - 'advanced_add' => 'Расширенная форма', - 'searching' => 'Поиск', - 'tasks' => 'Задачи', - 'taskdate_inline_created' => 'добавлена %s', - 'taskdate_inline_completed' => 'Завершена %s', - 'taskdate_inline_duedate' => 'В срок %s', - 'taskdate_created' => 'Дата создания', - 'taskdate_completed' => 'Дата завершения', - 'go_back' => '<< Назад', - 'edit_task' => 'Редактирование задачи', - 'add_task' => 'Новая задача', - 'priority' => 'Приоритет', - 'task' => 'Задача', - 'note' => 'Заметка', - 'tags' => 'Теги', - 'save' => 'Сохранить', - 'cancel' => 'Отмена', - 'password' => 'Пароль', - 'btn_login' => 'Войти', - 'a_login' => 'Вход', - 'a_logout' => 'Выйти', - 'public_tasks' => 'Опубликованные задачи', - 'tagcloud' => 'Теги', - 'tagfilter_cancel' => 'отменить фильтр по тегу', - 'sortByHand' => 'Сортировка вручную', - 'sortByPriority' => 'Сортировка по приоритету', - 'sortByDueDate' => 'Сортировка по сроку', - 'sortByDateCreated' => 'Сортировка по дате добавления', - 'sortByDateModified' => 'Сортировка по дате изменения', - 'due' => 'Срок', - 'daysago' => '%d дн. назад', - 'indays' => 'через %d дн.', - 'months_short' => array('Янв','Фев','Мар','Апр','Май','Июн','Июл','Авг','Сен','Окт','Ноя','Дек'), - 'months_long' => array('Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'), - 'days_min' => array('Вс','Пн','Вт','Ср','Чт','Пт','Сб'), - 'days_long' => array('Воскресенье','Понедельник','Вторник','Среда','Четверг','Пятница','Суббота'), - 'today' => 'сегодня', - 'yesterday' => 'вчера', - 'tomorrow' => 'завтра', - 'f_past' => 'Просроченные', - 'f_today' => 'Сегодня и завтра', - 'f_soon' => 'Скоро', - 'action_edit' => 'Редактировать', - 'action_note' => 'Заметка', - 'action_delete' => 'Удалить', - 'action_priority' => 'Приоритет', - 'action_move' => 'Переместить в', - 'notes' => 'Заметки:', - 'notes_show' => 'Показать', - 'notes_hide' => 'Скрыть', - 'list_new' => 'Новый список', - 'list_rename' => 'Переименовать список', - 'list_delete' => 'Удалить список', - 'list_publish' => 'Опубликовать список', - 'list_showcompleted' => 'Показать завершенные задачи', - 'list_clearcompleted' => 'Удалить завершенные задачи', - 'list_select' => 'Выбрать список', - 'list_export' => 'Экспортировать', - 'list_export_csv' => 'CSV', - 'list_export_ical' => 'iCalendar', - 'list_rssfeed' => 'RSS-лента', - 'alltags' => 'Все теги:', - 'alltags_show' => 'Показать все', - 'alltags_hide' => 'Скрыть все', - 'a_settings' => 'Настройки', - 'rss_feed' => 'RSS-лента', - 'feed_title' => '%s', - 'feed_completed_tasks' => 'Завершенные задачи', - 'feed_modified_tasks' => 'Изменившиеся задачи', - 'feed_new_tasks' => 'Новые задачи', - 'alltasks' => 'Все задачи', - 'set_header' => 'Настройки', - 'set_title' => 'Заголовок страницы', - 'set_title_descr' => '(если поле не заполнено, будет использован заголовок по-умолчанию)', - 'set_language' => 'Язык (Language)', - 'set_protection' => 'Парольная защита', - 'set_enabled' => 'Включено', - 'set_disabled' => 'Выключено', - 'set_newpass' => 'Новый пароль', - 'set_newpass_descr' => '(не заполняйте поле если не хотите менять текущий пароль)', - 'set_smartsyntax' => 'Smart syntax', - 'set_smartsyntax_descr' => '(возможность использовать синтаксис: /приоритет/ задача /теги/)', - 'set_timezone' => 'Часовой пояс', - 'set_autotag' => 'Autotagging', - 'set_autotag_descr' => '(автодобавление текущего тега из фильтра в новую задачу)', - 'set_sessions' => 'Хранилище сессий', - 'set_sessions_php' => 'PHP', - 'set_sessions_files' => 'Файлы', - 'set_firstdayofweek' => 'Первый день недели', - 'set_custom' => 'другой', - 'set_date' => 'Формат даты', - 'set_date2' => 'Формат короткой даты', - 'set_shortdate' => 'Короткая дата (в текущем году)', - 'set_clock' => 'Формат часов', - 'set_12hour' => '12-часовой', - 'set_24hour' => '24-часовой', - 'set_submit' => 'Сохранить изменения', - 'set_cancel' => 'Отмена', - 'set_showdate' => 'Показывать дату создания задачи', - ); -} diff --git a/sources/ajouts/lang/zh-cn.php b/sources/ajouts/lang/zh-cn.php deleted file mode 100644 index f8b6aa5..0000000 --- a/sources/ajouts/lang/zh-cn.php +++ /dev/null @@ -1,137 +0,0 @@ - '您确认要删除此任务吗?', - 'confirmLeave' => '存在未保存的数据,确认丢弃吗?', - 'actionNoteSave' => '保存', - 'actionNoteCancel' => '取消', - 'error' => '发生错误!(点击查看详情)', - 'denied' => '拒绝访问', - 'invalidpass' => '密码错误', - 'tagfilter' => '标签:', - 'addList' => '新建任务列表', - 'renameList' => '重命名列表', - 'deleteList' => '将会删除该列表中的全部任务\\n确认删除吗?', - 'clearCompleted' => '将会删除列表中所有已完成的项目\\n确认删除吗?', - 'settingsSaved' => '设置已保存,正在重新加载……', - ); - - var $inc = array - ( - 'htab_newtask' => '新建任务', - 'htab_search' => '搜索', - 'btn_add' => '新建', - 'btn_search' => '搜索', - 'advanced_add' => '高级', - 'searching' => '查找', - 'tasks' => '任务', - 'taskdate_inline_created' => '创建于 %s', - 'taskdate_inline_completed' => '完成于 %s', - 'taskdate_inline_duedate' => '%s 到期', - 'taskdate_created' => '已创建', - 'taskdate_completed' => '已完成', - 'go_back' => '<< 后退', - 'edit_task' => '编辑任务', - 'add_task' => '新建任务', - 'priority' => '优先级', - 'task' => '任务', - 'note' => '说明', - 'save' => '保存', - 'cancel' => '取消', - 'password' => '密码', - 'btn_login' => '登录', - 'a_login' => '登录', - 'a_logout' => '退出', - 'public_tasks' => '公共任务', - 'tags' => '标签', - 'tagfilter_cancel' => '取消筛选', - 'sortByHand' => '自行排序', - 'sortByPriority' => '按优先级排序', - 'sortByDueDate' => '按过期时间排序', - 'sortByDateCreated' => '按创建时间排序', - 'sortByDateModified' => '按修改时间排序', - 'due' => '过期时间', - 'daysago' => '%d 天前', - 'indays' => '在 %d 天内', - 'months_short' => array('一','二','三','四','五','六','七','八','九','十','十一','十二'), - 'months_long' => array('一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'), - 'days_min' => array('日','一','二','三','四','五','六'), - 'days_long' => array('周日','周一','周二','周三','周四','周五','周六'), - 'today' => '今日', - 'yesterday' => '昨日', - 'tomorrow' => '明日', - 'f_past' => '已过期', - 'f_today' => '最近两天', - 'f_soon' => '即将到期', - 'action_edit' => '编辑', - 'action_note' => '编辑说明', - 'action_delete' => '删除', - 'action_priority' => '优先级', - 'action_move' => '移动至', - 'notes' => '说明:', - 'notes_show' => '显示', - 'notes_hide' => '隐藏', - 'list_new' => '新建列表', - 'list_rename' => '重命名列表', - 'list_delete' => '删除列表', - 'list_publish' => '发布列表', - 'list_showcompleted' => '显示完整的任务', - 'list_clearcompleted' => '清空已完成的任务', - 'list_select' => '选择列表', - 'list_export' => '导出', - 'list_export_csv' => 'CSV', - 'list_export_ical' => 'iCalendar', - 'list_rssfeed' => 'RSS输出', - 'alltags' => '所有标签:', - 'alltags_show' => '显示全部', - 'alltags_hide' => '隐藏全部', - 'a_settings' => '设置', - 'rss_feed' => 'RSS输出', - 'feed_title' => '%s', - 'feed_completed_tasks' => '已完成的任务', - 'feed_modified_tasks' => '编辑过的任务', - 'feed_new_tasks' => '新任务', - 'alltasks' => '所有任务', - 'set_header' => '设置', - 'set_title' => '标题', - 'set_title_descr' => '(如果你想要修改标题)', - 'set_language' => '语言', - 'set_protection' => '密码保护', - 'set_enabled' => '开启', - 'set_disabled' => '关闭', - 'set_newpass' => '新密码', - 'set_newpass_descr' => '(若无需修改密码请留空)', - 'set_smartsyntax' => '智能编辑', - 'set_smartsyntax_descr' => '(新建任务时使用拓展语法 /priority/ task /tags/)', - 'set_timezone' => '时区', - 'set_autotag' => '自动标签化', - 'set_autotag_descr' => '(添加任务时,自动添加目前标签筛选器中的标签)', - 'set_sessions' => '会话模式', - 'set_sessions_php' => 'PHP', - 'set_sessions_files' => '文件', - 'set_firstdayofweek' => '一周的第一天', - 'set_custom' => 'Custom', - 'set_date' => '日期格式', - 'set_date2' => '短日期格式', - 'set_shortdate' => '短日期', - 'set_clock' => '时间格式', - 'set_12hour' => '12小时', - 'set_24hour' => '24小时', - 'set_submit' => '保存修改', - 'set_cancel' => '取消', - 'set_showdate' => '在任务列表中显示时间', - ); -} From 3385c9ba091de19fe7e01a251fbc89538054a249 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 8 Apr 2022 17:28:41 +0200 Subject: [PATCH 04/46] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index be97954..db60943 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name": "MyTinyTodo", + "name": "myTinyTodo", "id": "mytinytodo", "packaging_format": 1, "description": { From 06d2d67d27a977db201bf680076bd2d1fdf5644f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 8 Apr 2022 15:28:49 +0000 Subject: [PATCH 05/46] Auto-update README --- README.md | 6 +++--- README_fr.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cf23465..c18acba 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ N.B.: This README was automatically generated by https://github.com/YunoHost/app It shall NOT be edited by hand. --> -# MyTinyTodo for YunoHost +# myTinyTodo for YunoHost [![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) -[![Install MyTinyTodo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) +[![Install myTinyTodo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install MyTinyTodo quickly and simply on a YunoHost server. +> *This package allows you to install myTinyTodo quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview diff --git a/README_fr.md b/README_fr.md index 33e12d0..2947311 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,12 +1,12 @@ -# MyTinyTodo pour YunoHost +# myTinyTodo pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) -[![Installer MyTinyTodo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) +[![Installer myTinyTodo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) *[Read this readme in english.](./README.md)* *[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer MyTinyTodo rapidement et simplement sur un serveur YunoHost. +> *Ce package vous permet d'installer myTinyTodo 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 From 52e7d4b6cb0bdc775e1dbbea3b7ac6be565cbadd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 8 Apr 2022 17:29:28 +0200 Subject: [PATCH 06/46] 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 49830b4..8b968bd 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -1,7 +1,7 @@ version = "1.0" [main] -name = "MyTinyTodo configuration" +name = "myTinyTodo configuration" [main.config] name = "Configuration Options" From bc0dc882d9e00a7d95df0d9ad0dc03e4da2dea92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 18 May 2022 10:48:00 +0200 Subject: [PATCH 07/46] 1.6.10 (#33) * 1.6.10 * Auto-update README Co-authored-by: yunohost-bot --- .github/workflows/updater.sh | 2 +- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 2515af4..7b78d38 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -8,7 +8,7 @@ # The YunoHost-Apps organisation offers a template Action to run this script periodically # Since each app is different, maintainers can adapt its contents so as to perform # automatic actions when a new upstream release is detected. -exit 1 +#exit 1 #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS diff --git a/README.md b/README.md index c18acba..15934bd 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in - tyle for mobiles devices -**Shipped version:** 1.6.8~ynh1 +**Shipped version:** 1.6.10~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 2947311..bd62adb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour - tyle for mobiles devices -**Version incluse :** 1.6.8~ynh1 +**Version incluse :** 1.6.10~ynh1 **Démo :** https://www.mytinytodo.net/demo/ diff --git a/conf/app.src b/conf/app.src index adb312a..deb1e2a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.6.8/mytinytodo-v1.6.8.zip -SOURCE_SUM=5970a55045b2a589a72c1afcf0636d06d070f7e97c1afc8254669d5767641679 +SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.6.10/mytinytodo-v1.6.10.zip +SOURCE_SUM=70c7c623718b2735f5422379098a3457888b231990a4f447232490021d43a1e4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index db60943..331b967 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source to-do list script", "fr": "Gestionnaire de todo list" }, - "version": "1.6.8~ynh1", + "version": "1.6.10~ynh1", "url": "http://www.mytinytodo.net/", "upstream": { "license": "GPL-2.0", From 00e30f2c1733172a74fce1a40a75e4bd3dd843b2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 12 Aug 2022 13:16:12 +0000 Subject: [PATCH 08/46] Auto-update README --- README.md | 20 +++++++++++--------- README_fr.md | 28 +++++++++++++++++----------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 15934bd..5658b74 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # myTinyTodo for YunoHost -[![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Working status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) [![Install myTinyTodo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) *[Lire ce readme en français.](./README_fr.md)* @@ -33,29 +33,31 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in **Shipped version:** 1.6.10~ynh1 + **Demo:** https://www.mytinytodo.net/demo/ ## Screenshots -![](./doc/screenshots/shot-v14b1.png) +![Screenshot of myTinyTodo](./doc/screenshots/shot-v14b1.png) ## Documentation and resources -* Official app website: http://www.mytinytodo.net/ -* Official admin documentation: https://www.mytinytodo.net/faq.php -* Upstream app code repository: https://github.com/maxpozdeev/mytinytodo -* YunoHost documentation for this app: https://yunohost.org/app_mytinytodo -* Report a bug: https://github.com/YunoHost-Apps/mytinytodo_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug or sudo yunohost app upgrade mytinytodo -u https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index bd62adb..37af265 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # myTinyTodo pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) [![Installer myTinyTodo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer myTinyTodo 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.* @@ -27,31 +31,33 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour - tyle for mobiles devices -**Version incluse :** 1.6.10~ynh1 +**Version incluse :** 1.6.10~ynh1 + **Démo :** https://www.mytinytodo.net/demo/ ## Captures d'écran -![](./doc/screenshots/shot-v14b1.png) +![Capture d'écran de myTinyTodo](./doc/screenshots/shot-v14b1.png) ## Documentations et ressources -* Site officiel de l'app : http://www.mytinytodo.net/ -* Documentation officielle de l'admin : https://www.mytinytodo.net/faq.php -* Dépôt de code officiel de l'app : https://github.com/maxpozdeev/mytinytodo -* Documentation YunoHost pour cette app : https://yunohost.org/app_mytinytodo -* Signaler un bug : https://github.com/YunoHost-Apps/mytinytodo_ynh/issues +* 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 : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug ou sudo yunohost app upgrade mytinytodo -u https://github.com/YunoHost-Apps/mytinytodo_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 63ce091eb0c9822dabf9da286da750ee7e21b39a Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Tue, 16 Aug 2022 07:50:13 +0200 Subject: [PATCH 09/46] =?UTF-8?q?[autopatch]=20Add=20Common=20Platform?= =?UTF-8?q?=C2=A0Enumeration=20id=20to=20`manifest.json`=20(#35)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yunohost-Bot <> --- manifest.json | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/manifest.json b/manifest.json index 331b967..f0dca72 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,8 @@ "website": "http://www.mytinytodo.net/", "demo": "https://www.mytinytodo.net/demo/", "admindoc": "https://www.mytinytodo.net/faq.php", - "code": "https://github.com/maxpozdeev/mytinytodo" + "code": "https://github.com/maxpozdeev/mytinytodo", + "cpe": "cpe:2.3:a:mytinytodo:mytinytodo" }, "license": "GPL-2.0", "maintainer": { @@ -30,7 +31,7 @@ "mysql" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" @@ -45,8 +46,8 @@ "name": "title", "type": "string", "ask": { - "en": "Choose a title for your todo list", - "fr": "Choisissez le titre pour votre liste de tâches" + "en": "Choose a title for your todo list", + "fr": "Choisissez le titre pour votre liste de tâches" }, "default": "myTinyTodo" }, @@ -55,8 +56,8 @@ "type": "password", "optional": true, "ask": { - "en": "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist", - "fr": "Spécifiez le mot de passe ici pour protéger vos tâches, ou laissez vide pour que tout le monde puisse lire/écrire votre liste de tâche." + "en": "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist", + "fr": "Spécifiez le mot de passe ici pour protéger vos tâches, ou laissez vide pour que tout le monde puisse lire/écrire votre liste de tâche." } }, { @@ -66,18 +67,29 @@ "en": "If enabled, myTinyTodo will be accessible by people who do not have an account. This can be changed later via the webadmin.", "fr": "Si cette case est cochée, myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." }, - "default": true + "default": true }, { "name": "language", "type": "string", "ask": { - "en": "Choose the application language", - "fr": "Choisissez la langue de l'application" + "en": "Choose the application language", + "fr": "Choisissez la langue de l'application" }, - "choices": ["ar", "de", "en", "fr", "it", "nl", "pt-pt", "ru", "uk", "zh-cn"], + "choices": [ + "ar", + "de", + "en", + "fr", + "it", + "nl", + "pt-pt", + "ru", + "uk", + "zh-cn" + ], "default": "fr" } ] } -} +} \ No newline at end of file From 95e4e8613c03e5fec0fd38e42e6571e5ec151948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 16 Aug 2022 07:50:30 +0200 Subject: [PATCH 10/46] set relative path for --keep opt (#36) --- manifest.json | 2 +- scripts/upgrade | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/manifest.json b/manifest.json index f0dca72..ee985fc 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "pierre.levasseur@free.fr" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": false, "services": [ diff --git a/scripts/upgrade b/scripts/upgrade index 4c26f63..6a6febe 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,15 +93,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=2 - # Remove the app directory securely - ynh_secure_remove --file="$final_path" - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/db/config.php" - - # Remove the tmp directory securely - #nh_secure_remove --file="$tmpdir" - ynh_exec_warn_less ynh_add_config --template="../conf/config.php" --destination="$final_path/db/config.php" + ynh_setup_source --dest_dir="$final_path" --keep="db/config.php" fi chmod 750 "$final_path" From af6aaad464fd0026b80fff8539356cb0dc780ba2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Aug 2022 07:52:43 +0200 Subject: [PATCH 11/46] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index ee985fc..d821a54 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source to-do list script", "fr": "Gestionnaire de todo list" }, - "version": "1.6.10~ynh1", + "version": "1.6.10~ynh2", "url": "http://www.mytinytodo.net/", "upstream": { "license": "GPL-2.0", From 34c36943e71a2d7a64c61af2295890006e5a9395 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 16 Aug 2022 05:52:48 +0000 Subject: [PATCH 12/46] 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 5658b74..adcca8d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in - tyle for mobiles devices -**Shipped version:** 1.6.10~ynh1 +**Shipped version:** 1.6.10~ynh2 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 37af265..73eb49b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour - tyle for mobiles devices -**Version incluse :** 1.6.10~ynh1 +**Version incluse :** 1.6.10~ynh2 **Démo :** https://www.mytinytodo.net/demo/ From 49339f8dee3d53339222ea96631a27d41554caee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 26 Aug 2022 22:22:49 +0200 Subject: [PATCH 13/46] Fix scripts order --- scripts/install | 16 ++++++++-------- scripts/restore | 24 +++++++++--------------- scripts/upgrade | 18 +++++++++--------- 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/scripts/install b/scripts/install index d03dc9d..7924dda 100644 --- a/scripts/install +++ b/scripts/install @@ -95,14 +95,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -111,6 +103,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # MODIFY A CONFIG FILE #================================================= diff --git a/scripts/restore b/scripts/restore index b7b95f9..a9f38ea 100644 --- a/scripts/restore +++ b/scripts/restore @@ -28,23 +28,18 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name -phpversion=$YNH_PHP_VERSION +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -63,11 +58,6 @@ ynh_restore_file --origin_path="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" - -#================================================= -# RESTORE USER RIGHTS -#================================================= - chmod 775 $final_path/db/config.php chmod 775 $final_path/tmp/sessions @@ -86,8 +76,12 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=2 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -# Recreate a dedicated php-fpm config -ynh_add_fpm_config +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 6a6febe..edfffff 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -phpversion=$YNH_PHP_VERSION +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) timezone="$(cat /etc/timezone)" set_password=$(ynh_app_setting_get --app=$app --key=set_password) @@ -101,14 +101,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -124,6 +116,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # RESTORE USER RIGHTS #================================================= From 1f6d96ea2c551538f15973f25a7bcc154109c9a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 22 Nov 2022 21:37:54 +0100 Subject: [PATCH 14/46] 1.7.2 (#38) * 1.7.0 * Auto-update README * Update install * fix * Update install * Update mytinytodo.sql * Fix * Update install * Update restore * Update upgrade * Fix * 1.7.1 * Auto-update README * Fix * Fix * 1.7.2 * Update upgrade * Auto-update README * Update upgrade * Update upgrade Co-authored-by: yunohost-bot --- README.md | 3 +- README_fr.md | 3 +- conf/app.src | 6 +- conf/config.php | 67 ++---- conf/sql/mytinytodo.sql | 214 ++++++++++++++++-- ...ig_panel.toml => config_panel.toml.example | 4 +- manifest.json | 41 +--- scripts/_common.sh | 2 +- scripts/backup | 1 - scripts/install | 21 +- scripts/restore | 4 +- scripts/upgrade | 33 +-- 12 files changed, 223 insertions(+), 176 deletions(-) rename config_panel.toml => config_panel.toml.example (81%) diff --git a/README.md b/README.md index adcca8d..8586f5b 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in - tyle for mobiles devices -**Shipped version:** 1.6.10~ynh2 - +**Shipped version:** 1.7.2~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 73eb49b..f40f982 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,8 +31,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour - tyle for mobiles devices -**Version incluse :** 1.6.10~ynh2 - +**Version incluse :** 1.7.2~ynh1 **Démo :** https://www.mytinytodo.net/demo/ diff --git a/conf/app.src b/conf/app.src index deb1e2a..3a7844a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.6.10/mytinytodo-v1.6.10.zip -SOURCE_SUM=70c7c623718b2735f5422379098a3457888b231990a4f447232490021d43a1e4 +SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.2/mytinytodo-v1.7.2.tar.gz +SOURCE_SUM=a48b4aae8e3d6a4ce9f8e81a97068d2b398243d0cccaa6dbc819e66101c25ca6 SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip +SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_EXTRACT=true diff --git a/conf/config.php b/conf/config.php index 2edfefa..60ba8c5 100755 --- a/conf/config.php +++ b/conf/config.php @@ -1,63 +1,24 @@ y-m-d (default), 2 => m/d/y, 3 => d.m.y -$config['duedateformat'] = 1; - -# First day of week: 0-Sunday, 1-Monday, 2-Tuesday, .. 6-Saturday -$config['firstdayofweek'] = 1; - -# select session handling mechanism: files or default (php default) -$config['session'] = 'files'; - -# Date/time formats -$config['clock'] = 24; -$config['dateformat'] = 'j M Y'; -$config['dateformatshort'] = 'j M'; - -# Show task date in list -$config['showdate'] = 0; - -# Autodetect mobile devices and switch theme -$config['detectmobile'] = 1; - -?> +define("MTT_SALT", "__SALT__"); diff --git a/conf/sql/mytinytodo.sql b/conf/sql/mytinytodo.sql index a13fc37..c48049d 100644 --- a/conf/sql/mytinytodo.sql +++ b/conf/sql/mytinytodo.sql @@ -1,13 +1,14 @@ -- phpMyAdmin SQL Dump --- version 4.6.6 +-- version 5.1.3 -- https://www.phpmyadmin.net/ -- --- Client : localhost --- Généré le : Mar 21 Mars 2017 à 06:57 --- Version du serveur : 10.0.30-MariaDB-0+deb8u1 --- Version de PHP : 5.6.30-0+deb8u1 +-- Hôte : localhost +-- Généré le : dim. 23 oct. 2022 à 09:54 +-- Version du serveur : 10.5.15-MariaDB-0+deb11u1 +-- Version de PHP : 7.4.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; SET time_zone = "+00:00"; @@ -17,11 +18,37 @@ SET time_zone = "+00:00"; /*!40101 SET NAMES utf8mb4 */; -- --- Base de données : `mytinytodo` +-- Base de données : `mytinytodo` -- -- -------------------------------------------------------- +-- +-- Structure de la table `lists` +-- + +CREATE TABLE `lists` ( + `id` int(10) UNSIGNED NOT NULL, + `uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `ow` int(11) NOT NULL DEFAULT 0, + `name` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `d_created` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_edited` int(10) UNSIGNED NOT NULL DEFAULT 0, + `sorting` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `published` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `taskview` int(10) UNSIGNED NOT NULL DEFAULT 0, + `extra` text COLLATE utf8mb4_unicode_ci DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- +-- Déchargement des données de la table `lists` +-- + +INSERT INTO `lists` (`id`, `uuid`, `ow`, `name`, `d_created`, `d_edited`, `sorting`, `published`, `taskview`, `extra`) VALUES +(1, 'efb9dc53-2b93-46e7-9b26-bee35291b52e', 0, 'Todo', 1666511484, 0, 0, 0, 1, NULL); + +-- -------------------------------------------------------- + -- -- Structure de la table `mtt_lists` -- @@ -29,17 +56,17 @@ SET time_zone = "+00:00"; CREATE TABLE `mtt_lists` ( `id` int(10) UNSIGNED NOT NULL, `uuid` char(36) NOT NULL DEFAULT '', - `ow` int(11) NOT NULL DEFAULT '0', + `ow` int(11) NOT NULL DEFAULT 0, `name` varchar(50) NOT NULL DEFAULT '', - `d_created` int(10) UNSIGNED NOT NULL DEFAULT '0', - `d_edited` int(10) UNSIGNED NOT NULL DEFAULT '0', - `sorting` tinyint(3) UNSIGNED NOT NULL DEFAULT '0', - `published` tinyint(3) UNSIGNED NOT NULL DEFAULT '0', - `taskview` int(10) UNSIGNED NOT NULL DEFAULT '0' + `d_created` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_edited` int(10) UNSIGNED NOT NULL DEFAULT 0, + `sorting` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `published` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `taskview` int(10) UNSIGNED NOT NULL DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- --- Contenu de la table `mtt_lists` +-- Déchargement des données de la table `mtt_lists` -- INSERT INTO `mtt_lists` (`id`, `uuid`, `ow`, `name`, `d_created`, `d_edited`, `sorting`, `published`, `taskview`) VALUES @@ -77,24 +104,108 @@ CREATE TABLE `mtt_tags` ( CREATE TABLE `mtt_todolist` ( `id` int(10) UNSIGNED NOT NULL, `uuid` char(36) NOT NULL DEFAULT '', - `list_id` int(10) UNSIGNED NOT NULL DEFAULT '0', - `d_created` int(10) UNSIGNED NOT NULL DEFAULT '0', - `d_completed` int(10) UNSIGNED NOT NULL DEFAULT '0', - `d_edited` int(10) UNSIGNED NOT NULL DEFAULT '0', - `compl` tinyint(3) UNSIGNED NOT NULL DEFAULT '0', + `list_id` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_created` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_completed` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_edited` int(10) UNSIGNED NOT NULL DEFAULT 0, + `compl` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, `title` varchar(250) NOT NULL, - `note` text, - `prio` tinyint(4) NOT NULL DEFAULT '0', - `ow` int(11) NOT NULL DEFAULT '0', + `note` text DEFAULT NULL, + `prio` tinyint(4) NOT NULL DEFAULT 0, + `ow` int(11) NOT NULL DEFAULT 0, `tags` varchar(600) NOT NULL DEFAULT '', `tags_ids` varchar(250) NOT NULL DEFAULT '', `duedate` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- -------------------------------------------------------- + -- --- Index pour les tables exportées +-- Structure de la table `sessions` -- +CREATE TABLE `sessions` ( + `id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `data` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `last_access` int(10) UNSIGNED NOT NULL DEFAULT 0, + `expires` int(10) UNSIGNED NOT NULL DEFAULT 0 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Structure de la table `settings` +-- + +CREATE TABLE `settings` ( + `param_key` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `param_value` text COLLATE utf8mb4_unicode_ci DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- +-- Déchargement des données de la table `settings` +-- + +INSERT INTO `settings` (`param_key`, `param_value`) VALUES +('config.json', '{\n \"url\": \"\",\n \"mtt_url\": \"\",\n \"title\": \"\",\n \"lang\": \"en\",\n \"password\": \"\",\n \"smartsyntax\": 1,\n \"timezone\": \"UTC\",\n \"autotag\": 1,\n \"duedateformat\": 1,\n \"firstdayofweek\": 1,\n \"clock\": 24,\n \"dateformat\": \"j M Y\",\n \"dateformat2\": \"n\\/j\\/y\",\n \"dateformatshort\": \"j M\",\n \"showdate\": 0,\n \"showtime\": 0,\n \"markup\": \"markdown\",\n \"appearance\": \"system\",\n \"extensions\": []\n}'); + +-- -------------------------------------------------------- + +-- +-- Structure de la table `tag2task` +-- + +CREATE TABLE `tag2task` ( + `tag_id` int(10) UNSIGNED NOT NULL, + `task_id` int(10) UNSIGNED NOT NULL, + `list_id` int(10) UNSIGNED NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Structure de la table `tags` +-- + +CREATE TABLE `tags` ( + `id` int(10) UNSIGNED NOT NULL, + `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Structure de la table `todolist` +-- + +CREATE TABLE `todolist` ( + `id` int(10) UNSIGNED NOT NULL, + `uuid` char(36) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `list_id` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_created` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_completed` int(10) UNSIGNED NOT NULL DEFAULT 0, + `d_edited` int(10) UNSIGNED NOT NULL DEFAULT 0, + `compl` tinyint(3) UNSIGNED NOT NULL DEFAULT 0, + `title` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL, + `note` text COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `prio` tinyint(4) NOT NULL DEFAULT 0, + `ow` int(11) NOT NULL DEFAULT 0, + `tags` varchar(600) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `tags_ids` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', + `duedate` date DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- +-- Index pour les tables déchargées +-- + +-- +-- Index pour la table `lists` +-- +ALTER TABLE `lists` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `uuid` (`uuid`); + -- -- Index pour la table `mtt_lists` -- @@ -126,24 +237,81 @@ ALTER TABLE `mtt_todolist` ADD KEY `list_id` (`list_id`); -- --- AUTO_INCREMENT pour les tables exportées +-- Index pour la table `sessions` -- +ALTER TABLE `sessions` + ADD UNIQUE KEY `id` (`id`); + +-- +-- Index pour la table `settings` +-- +ALTER TABLE `settings` + ADD UNIQUE KEY `param_key` (`param_key`); + +-- +-- Index pour la table `tag2task` +-- +ALTER TABLE `tag2task` + ADD KEY `tag_id` (`tag_id`), + ADD KEY `task_id` (`task_id`), + ADD KEY `list_id` (`list_id`); + +-- +-- Index pour la table `tags` +-- +ALTER TABLE `tags` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `name` (`name`); + +-- +-- Index pour la table `todolist` +-- +ALTER TABLE `todolist` + ADD PRIMARY KEY (`id`), + ADD UNIQUE KEY `uuid` (`uuid`), + ADD KEY `list_id` (`list_id`); + +-- +-- AUTO_INCREMENT pour les tables déchargées +-- + +-- +-- AUTO_INCREMENT pour la table `lists` +-- +ALTER TABLE `lists` + MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT pour la table `mtt_lists` -- ALTER TABLE `mtt_lists` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; + -- -- AUTO_INCREMENT pour la table `mtt_tags` -- ALTER TABLE `mtt_tags` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; + -- -- AUTO_INCREMENT pour la table `mtt_todolist` -- ALTER TABLE `mtt_todolist` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT pour la table `tags` +-- +ALTER TABLE `tags` + MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; + +-- +-- AUTO_INCREMENT pour la table `todolist` +-- +ALTER TABLE `todolist` + MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; +COMMIT; + /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/config_panel.toml b/config_panel.toml.example similarity index 81% rename from config_panel.toml rename to config_panel.toml.example index 8b968bd..c2c6ecd 100644 --- a/config_panel.toml +++ b/config_panel.toml.example @@ -10,10 +10,10 @@ name = "myTinyTodo configuration" ask = "Set title" type = "string" help = "Specify a title for your todolist." - bind = "title:__FINALPATH__/db/config.php" + bind = "title:__FINALPATH__/config.php" [main.config.set_password] ask = "Set password" type = "password" help = "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist." - bind = "password:__FINALPATH__/db/config.php" + bind = "password:__FINALPATH__/config.php" diff --git a/manifest.json b/manifest.json index d821a54..dee4fc8 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source to-do list script", "fr": "Gestionnaire de todo list" }, - "version": "1.6.10~ynh2", + "version": "1.7.2~ynh1", "url": "http://www.mytinytodo.net/", "upstream": { "license": "GPL-2.0", @@ -42,24 +42,6 @@ "example": "/mytinytodo", "default": "/mytinytodo" }, - { - "name": "title", - "type": "string", - "ask": { - "en": "Choose a title for your todo list", - "fr": "Choisissez le titre pour votre liste de tâches" - }, - "default": "myTinyTodo" - }, - { - "name": "set_password", - "type": "password", - "optional": true, - "ask": { - "en": "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist", - "fr": "Spécifiez le mot de passe ici pour protéger vos tâches, ou laissez vide pour que tout le monde puisse lire/écrire votre liste de tâche." - } - }, { "name": "is_public", "type": "boolean", @@ -68,27 +50,6 @@ "fr": "Si cette case est cochée, myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." }, "default": true - }, - { - "name": "language", - "type": "string", - "ask": { - "en": "Choose the application language", - "fr": "Choisissez la langue de l'application" - }, - "choices": [ - "ar", - "de", - "en", - "fr", - "it", - "nl", - "pt-pt", - "ru", - "uk", - "zh-cn" - ], - "default": "fr" } ] } diff --git a/scripts/_common.sh b/scripts/_common.sh index 2271984..cc18e69 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="8.0" -pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-pdo" +pkg_dependencies="php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-pdo" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 28f03b5..aa4f7b3 100644 --- a/scripts/backup +++ b/scripts/backup @@ -26,7 +26,6 @@ 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) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/install b/scripts/install index 7924dda..8015fcf 100644 --- a/scripts/install +++ b/scripts/install @@ -23,15 +23,10 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -language=$YNH_APP_ARG_LANGUAGE -timezone="$(cat /etc/timezone)" -phpversion=$YNH_PHP_VERSION -title=$YNH_APP_ARG_TITLE +salt=$(ynh_string_random --length=16) app=$YNH_APP_INSTANCE_NAME -set_password="$YNH_APP_ARG_SET_PASSWORD" - #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -50,9 +45,6 @@ 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 -ynh_app_setting_set --app=$app --key=language --value=$language -ynh_app_setting_set --app=$app --key=set_password --value="$set_password" -ynh_app_setting_set --app=$app --key=title --value=$title #================================================= # INSTALL DEPENDENCIES @@ -71,7 +63,7 @@ db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name -# Charge les commandes sql communes à tous les scripts. +# Charge les commandes SQL communes à tous les scripts. ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ../conf/sql/mytinytodo.sql #================================================= @@ -102,6 +94,7 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION @@ -116,18 +109,16 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/config.php" --destination="$final_path/db/config.php" +ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" -chmod 600 "$final_path/db/config.php" -chown $app:$app "$final_path/db/config.php" -chmod 775 "$final_path/tmp/sessions" +chmod 640 "$final_path/config.php" +chown $app:$app "$final_path/config.php" #================================================= # REMOVE UNWANTED FILES #================================================= ynh_secure_remove --file="$final_path/setup.php" -ynh_secure_remove --file="$final_path/db/todolist.db" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index a9f38ea..5e77fd1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -58,8 +58,8 @@ ynh_restore_file --origin_path="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -chmod 775 $final_path/db/config.php -chmod 775 $final_path/tmp/sessions +#chmod 775 $final_path/config.php +#chmod 775 $final_path/tmp/sessions #================================================= # REINSTALL DEPENDENCIES diff --git a/scripts/upgrade b/scripts/upgrade index edfffff..aef7238 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,16 +18,11 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -language=$(ynh_app_setting_get --app=$app --key=language) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -timezone="$(cat /etc/timezone)" - -set_password=$(ynh_app_setting_get --app=$app --key=set_password) -title=$(ynh_app_setting_get --app=$app --key=title) #================================================= # CHECK VERSION @@ -54,22 +49,6 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -if [ -z "$set_password" ]; then - set_password="" - ynh_app_setting_set --app=$app --key=set_password --value=$set_password -fi - -if [ -z "$title" ]; then - title="MytinyTodo" - ynh_app_setting_set --app=$app --key=title --value=$title -fi - -# If fpm_footprint doesn't exist, create it -if [ -z "$timezone" ]; then - timezone="$(cat /etc/timezone)" - ynh_app_setting_set --app=$app --key=timezone --value=$timezone -fi - # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -94,7 +73,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=2 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="db/config.php" + ynh_setup_source --dest_dir="$final_path" --keep="db config.php" fi chmod 750 "$final_path" @@ -124,16 +103,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# RESTORE USER RIGHTS -#================================================= - -ynh_secure_remove --file="$final_path/setup.php" -ynh_secure_remove --file="$final_path/db/todolist.db" - -chmod 600 $final_path/db/config.php -chmod 755 $final_path/tmp/sessions - #================================================= # RELOAD NGINX #================================================= From f7db0f64af684bc391dc6a0a20ef52d3a3daadbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 30 Nov 2022 21:33:01 +0100 Subject: [PATCH 15/46] 1.7.3 --- 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 3a7844a..bf2345b 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.2/mytinytodo-v1.7.2.tar.gz -SOURCE_SUM=a48b4aae8e3d6a4ce9f8e81a97068d2b398243d0cccaa6dbc819e66101c25ca6 +SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.3/mytinytodo-v1.7.3.tar.gz +SOURCE_SUM=7ba7b4c78cf12cb56c70bbc3768e22d4e9de871d09dd5c25126b9d9e3e0cdec9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index dee4fc8..629964e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source to-do list script", "fr": "Gestionnaire de todo list" }, - "version": "1.7.2~ynh1", + "version": "1.7.3~ynh1", "url": "http://www.mytinytodo.net/", "upstream": { "license": "GPL-2.0", From 2afe99f129cd0217d4d5b575f13e1c582e814a46 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 30 Nov 2022 20:33:09 +0000 Subject: [PATCH 16/46] 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 8586f5b..c1cde77 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in - tyle for mobiles devices -**Shipped version:** 1.7.2~ynh1 +**Shipped version:** 1.7.3~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index f40f982..6230105 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour - tyle for mobiles devices -**Version incluse :** 1.7.2~ynh1 +**Version incluse :** 1.7.3~ynh1 **Démo :** https://www.mytinytodo.net/demo/ From 09a0bc01b4fb021e0e511a2ed3cd52701be8c6af Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Tue, 7 Mar 2023 19:02:20 +0100 Subject: [PATCH 17/46] Upgrade auto-updater (#46) * [autopatch] Upgrade auto-updater * Auto-update README --------- Co-authored-by: tituspijean --- .github/workflows/updater.yml | 4 ++-- README.md | 3 ++- README_fr.md | 21 +++++++++++---------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index fd6ed60..609c284 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 }} diff --git a/README.md b/README.md index c1cde77..781a71c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ It shall NOT be edited by hand. # myTinyTodo for YunoHost -[![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Working status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Working status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) + [![Install myTinyTodo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 6230105..1c0c2ff 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,16 @@ It shall NOT be edited by hand. # myTinyTodo pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/mytinytodo.svg)](https://dash.yunohost.org/appci/app/mytinytodo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mytinytodo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mytinytodo.maintain.svg) + [![Installer myTinyTodo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mytinytodo) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer myTinyTodo 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 myTinyTodo 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 ### Features @@ -35,15 +36,15 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour **Démo :** https://www.mytinytodo.net/demo/ -## Captures d'écran +## Captures d’écran -![Capture d'écran de myTinyTodo](./doc/screenshots/shot-v14b1.png) +![Capture d’écran de myTinyTodo](./doc/screenshots/shot-v14b1.png) ## 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 : @@ -59,4 +60,4 @@ ou sudo yunohost app upgrade mytinytodo -u https://github.com/YunoHost-Apps/mytinytodo_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 74ca8f269f5becf90dcf7dbd98afca43b0e21df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 7 Mar 2023 22:34:15 +0100 Subject: [PATCH 18/46] Version 2 (#47) * v2 * Auto-update README * v2 * Update restore --------- Co-authored-by: yunohost-bot --- conf/extra_php-fpm.conf | 4 + conf/nginx.conf | 5 +- conf/php-fpm.conf | 430 ---------------------------------------- manifest.json | 56 ------ manifest.toml | 55 +++++ scripts/_common.sh | 4 - scripts/backup | 21 +- scripts/change_url | 85 +------- scripts/install | 108 +--------- scripts/remove | 48 ----- scripts/restore | 58 +----- scripts/upgrade | 72 +------ tests.toml | 9 + 13 files changed, 89 insertions(+), 866 deletions(-) create mode 100644 conf/extra_php-fpm.conf delete mode 100644 conf/php-fpm.conf delete mode 100644 manifest.json create mode 100644 manifest.toml create mode 100644 tests.toml diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf new file mode 100644 index 0000000..14c8d27 --- /dev/null +++ b/conf/extra_php-fpm.conf @@ -0,0 +1,4 @@ +; Additional php.ini defines, specific to this pool of workers. + +php_admin_value[upload_max_filesize] = 50M +php_admin_value[post_max_size] = 50M \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index 179ee75..e5f74d4 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,10 +2,13 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/ ; + alias __INSTALL_DIR__/; index index.php; + # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file + client_max_body_size 50M; + try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf deleted file mode 100644 index ab1a471..0000000 --- a/conf/php-fpm.conf +++ /dev/null @@ -1,430 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can be used in any directive and will be replaced by the -; pool name ('www' here) -[__NAMETOCHANGE__] - -; Per pool prefix -; It only applies on the following directives: -; - 'access.log' -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = __USER__ -group = __USER__ - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on -; a specific port; -; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on -; a specific port; -; 'port' - to listen on a TCP socket to all addresses -; (IPv6 and IPv4-mapped) on a specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock - -; Set listen(2) backlog. -; Default Value: 511 (-1 on FreeBSD and OpenBSD) -;listen.backlog = 511 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0660 -listen.owner = www-data -listen.group = www-data -;listen.mode = 0660 -; When POSIX Access Control Lists are supported you can set them using -; these options, value is a comma separated list of user/group names. -; When set, listen.owner and listen.group are ignored -;listen.acl_users = -;listen.acl_groups = - -; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 127.0.0.1 - -; Specify the nice(2) priority to apply to the pool processes (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool processes will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; process.priority = -19 - -; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user -; or group is differrent than the master process user. It allows to create process -; core dump and ptrace the process for the pool user. -; Default Value: no -; process.dumpable = yes - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = 5 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 2 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 1 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 3 - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -;pm.process_idle_timeout = 10s; - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in µs of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: /usr/share/php/7.0/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The access log file -; Default: not set -;access.log = log/$pool.access.log - -; The access log format. -; The following syntax is allowed -; %%: the '%' character -; %C: %CPU used by the request -; it can accept the following format: -; - %{user}C for user CPU only -; - %{system}C for system CPU only -; - %{total}C for user + system CPU (default) -; %d: time taken to serve the request -; it can accept the following format: -; - %{seconds}d (default) -; - %{miliseconds}d -; - %{mili}d -; - %{microseconds}d -; - %{micro}d -; %e: an environment variable (same as $_ENV or $_SERVER) -; it must be associated with embraces to specify the name of the env -; variable. Some exemples: -; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e -; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e -; %f: script filename -; %l: content-length of the request (for POST request only) -; %m: request method -; %M: peak of memory allocated by PHP -; it can accept the following format: -; - %{bytes}M (default) -; - %{kilobytes}M -; - %{kilo}M -; - %{megabytes}M -; - %{mega}M -; %n: pool name -; %o: output header -; it must be associated with embraces to specify the name of the header: -; - %{Content-Type}o -; - %{X-Powered-By}o -; - %{Transfert-Encoding}o -; - .... -; %p: PID of the child that serviced the request -; %P: PID of the parent of the child that serviced the request -; %q: the query string -; %Q: the '?' character if query string exists -; %r: the request URI (without the query string, see %q and %Q) -; %R: remote IP address -; %s: status (response code) -; %t: server time the request was received -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; The strftime(3) format must be encapsuled in a %{}t tag -; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t -; %T: time the log has been written (the request has finished) -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; The strftime(3) format must be encapsuled in a %{}t tag -; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t -; %u: remote user -; -; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -request_terminate_timeout = 1d - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = __FINALPATH__ - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -;catch_workers_output = yes - -; Clear environment in FPM workers -; Prevents arbitrary environment variables from reaching FPM worker processes -; by clearing the environment in workers before env vars specified in this -; pool configuration are added. -; Setting to "no" will make all environment variables available to PHP code -; via getenv(), $_ENV and $_SERVER. -; Default Value: yes -;clear_env = no - -; Limits the extensions of the main script FPM will allow to parse. This can -; prevent configuration mistakes on the web server side. You should only limit -; FPM to .php extensions to prevent malicious users to use other extensions to -; execute php code. -; Note: set an empty value to allow all extensions. -; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 .php7 - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M - -; Common values to change to increase file upload limit -; php_admin_value[upload_max_filesize] = 50M -; php_admin_value[post_max_size] = 50M -; php_admin_flag[mail.add_x_header] = Off - -; Other common parameters -; php_admin_value[max_execution_time] = 600 -; php_admin_value[max_input_time] = 300 -; php_admin_value[memory_limit] = 256M -; php_admin_flag[short_open_tag] = On diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 629964e..0000000 --- a/manifest.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "myTinyTodo", - "id": "mytinytodo", - "packaging_format": 1, - "description": { - "en": "Open source to-do list script", - "fr": "Gestionnaire de todo list" - }, - "version": "1.7.3~ynh1", - "url": "http://www.mytinytodo.net/", - "upstream": { - "license": "GPL-2.0", - "website": "http://www.mytinytodo.net/", - "demo": "https://www.mytinytodo.net/demo/", - "admindoc": "https://www.mytinytodo.net/faq.php", - "code": "https://github.com/maxpozdeev/mytinytodo", - "cpe": "cpe:2.3:a:mytinytodo:mytinytodo" - }, - "license": "GPL-2.0", - "maintainer": { - "name": "plabuse", - "email": "pierre.levasseur@free.fr" - }, - "requirements": { - "yunohost": ">= 11.0.9" - }, - "multi_instance": false, - "services": [ - "nginx", - "php8.0-fpm", - "mysql" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "path", - "type": "path", - "example": "/mytinytodo", - "default": "/mytinytodo" - }, - { - "name": "is_public", - "type": "boolean", - "help": { - "en": "If enabled, myTinyTodo will be accessible by people who do not have an account. This can be changed later via the webadmin.", - "fr": "Si cette case est cochée, myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." - }, - "default": true - } - ] - } -} \ No newline at end of file diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..282c535 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,55 @@ +packaging_format = 2 + +id = "mytinytodo" +name = "myTinyTodo" +description.en = "Open source to-do list script" +description.fr = "Gestionnaire de todo list" + +version = "1.7.3~ynh1" + +maintainers = ["plabuse"] + +[upstream] +license = "GPL-2.0" +website = "http://www.mytinytodo.net/" +demo = "https://www.mytinytodo.net/demo/" +admindoc = "https://www.mytinytodo.net/faq.php" +code = "https://github.com/maxpozdeev/mytinytodo" + +[integration] +yunohost = ">= 11.1.13" +architectures = "all" +multi_instance = false +ldap = false +sso = false +disk = "50M" +ram.build = "50M" +ram.runtime = "50M" + +[install] + [install.domain] + type = "domain" + + [install.path] + type = "path" + default = "/mytinytodo" + + [install.init_main_permission] + help.en = "If enabled, myTinyTodo will be accessible by people who do not have an account. This can be changed later via the webadmin." + help.fr = "Si cette case est cochée, myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + type = "group" + default = "visitors" + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" + + [resources.apt] + packages = "mariadb-server php8.0-mysqli php8.0-pdo" + + [resources.database] + type = "mysql" diff --git a/scripts/_common.sh b/scripts/_common.sh index cc18e69..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,10 +4,6 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="8.0" - -pkg_dependencies="php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-pdo" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index aa4f7b3..b787593 100644 --- a/scripts/backup +++ b/scripts/backup @@ -9,25 +9,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 -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_print_info --message="Loading installation settings..." - -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) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= @@ -37,7 +18,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP OF THE MAIN DIR OF THE APP #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP OF THE NGINX CONFIGURATION diff --git a/scripts/change_url b/scripts/change_url index 6c0d39c..7ecec61 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -6,97 +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 - -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 UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=2 - -# 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=2 -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 bc74c58..35366d7 100644 --- a/scripts/install +++ b/scripts/install @@ -9,83 +9,23 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH -is_public=$YNH_APP_ARG_IS_PUBLIC -salt=$(ynh_string_random --length=16) - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -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" - -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -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 - -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Installing dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # CREATE A MYSQL DATABASE #================================================= ynh_script_progression --message="Creating a MySQL database..." --weight=2 -db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name -ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name - -# Charge les commandes SQL communes à tous les scripts. ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ../conf/sql/mytinytodo.sql -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=3 -ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" +ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$final_path" -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" #================================================= # PHP-FPM CONFIGURATION @@ -93,16 +33,7 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config +ynh_add_fpm_config --usage=low --footprint=low #================================================= # NGINX CONFIGURATION @@ -117,34 +48,11 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" +salt=$(ynh_string_random --length=16) +ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php" -chmod 640 "$final_path/config.php" -chown $app:$app "$final_path/config.php" - -#================================================= -# REMOVE UNWANTED FILES -#================================================= - -ynh_secure_remove --file="$final_path/setup.php" - -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 - -# Make app public if necessary or protect it -if [ $is_public -eq 1 ] -then - ynh_permission_update --permission="main" --add="visitors" -fi - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload +chmod 640 "$install_dir/config.php" +chown $app:$app "$install_dir/config.php" #================================================= # END OF SCRIPT diff --git a/scripts/remove b/scripts/remove index 886445d..79cb058 100644 --- a/scripts/remove +++ b/scripts/remove @@ -9,36 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -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) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name - -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Removing the MySQL database..." --weight=1 - -# Remove a database if it exists, along with the associated user -ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name - -#================================================= -# REMOVE APP MAIN DIR -#================================================= -ynh_script_progression --message="Removing app main directory..." --weight=2 - -# Remove the app directory securely -ynh_secure_remove --file="$final_path" - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -55,24 +25,6 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 - -# Delete a system user -ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 5e77fd1..3099bef 100644 --- a/scripts/restore +++ b/scripts/restore @@ -9,65 +9,15 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -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) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=2 - -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " - -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=3 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" - #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." --weight=2 -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" -#chmod 775 $final_path/config.php -#chmod 775 $final_path/tmp/sessions - -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 - -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE PHP-FPM CONFIGURATION @@ -88,8 +38,6 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= ynh_script_progression --message="Restoring the MySQL database..." --weight=5 -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index aef7238..98feb66 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,61 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -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) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # CHECK VERSION #================================================= 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=3 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -#================================================= -# CREATE DEDICATED USER -#================================================= -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" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -73,19 +24,11 @@ then ynh_script_progression --message="Upgrading source files..." --weight=2 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="db config.php" + ynh_setup_source --dest_dir="$install_dir" --keep="db config.php" fi -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # PHP-FPM CONFIGURATION @@ -93,7 +36,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_add_fpm_config --usage=low --footprint=low #================================================= # NGINX CONFIGURATION @@ -103,13 +46,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 #================================================= diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..5d1d525 --- /dev/null +++ b/tests.toml @@ -0,0 +1,9 @@ +test_format = 1.0 + +[default] + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + + test_upgrade_from.b598d723.name = "Upgrade from 1.6.4" \ No newline at end of file From 8b9f02b9bb9bc98eb94e9e729f7b20a55f5b0c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 7 Mar 2023 22:35:43 +0100 Subject: [PATCH 19/46] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 282c535..6f64fab 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "myTinyTodo" description.en = "Open source to-do list script" description.fr = "Gestionnaire de todo list" -version = "1.7.3~ynh1" +version = "1.7.3~ynh2" maintainers = ["plabuse"] From 0fab643b6bb463eed31e9da33e028ca34c0d74cc Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 7 Mar 2023 21:35:47 +0000 Subject: [PATCH 20/46] 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 781a71c..cc490ee 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in - tyle for mobiles devices -**Shipped version:** 1.7.3~ynh1 +**Shipped version:** 1.7.3~ynh2 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 1c0c2ff..410f0d0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,7 +32,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po - tyle for mobiles devices -**Version incluse :** 1.7.3~ynh1 +**Version incluse :** 1.7.3~ynh2 **Démo :** https://www.mytinytodo.net/demo/ From 007f3c4656955b08299099cbfb9c6f5e6167a947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 Mar 2023 15:54:53 +0100 Subject: [PATCH 21/46] cleaning --- conf/app.src | 6 ------ manifest.toml | 8 +++++++- scripts/upgrade | 5 ----- 3 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 conf/app.src diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index bf2345b..0000000 --- a/conf/app.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.3/mytinytodo-v1.7.3.tar.gz -SOURCE_SUM=7ba7b4c78cf12cb56c70bbc3768e22d4e9de871d09dd5c25126b9d9e3e0cdec9 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_EXTRACT=true diff --git a/manifest.toml b/manifest.toml index 6f64fab..06f0f66 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://www.mytinytodo.net/faq.php" code = "https://github.com/maxpozdeev/mytinytodo" [integration] -yunohost = ">= 11.1.13" +yunohost = ">= 11.1.15" architectures = "all" multi_instance = false ldap = false @@ -41,6 +41,12 @@ ram.runtime = "50M" default = "visitors" [resources] + [resources.sources] + + [resources.sources.main] + url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.3/mytinytodo-v1.7.3.tar.gz" + sha256 = "7ba7b4c78cf12cb56c70bbc3768e22d4e9de871d09dd5c25126b9d9e3e0cdec9" + [resources.system_user] [resources.install_dir] diff --git a/scripts/upgrade b/scripts/upgrade index 98feb66..502b030 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,11 +38,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=low -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - # Create a dedicated NGINX config ynh_add_nginx_config From df3c78bb0ac7504097bda5ac3779ee9ad6b367f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:43:17 +0100 Subject: [PATCH 22/46] cleaning --- scripts/install | 5 ----- scripts/remove | 5 ----- scripts/restore | 10 ---------- 3 files changed, 20 deletions(-) diff --git a/scripts/install b/scripts/install index 35366d7..f711c91 100644 --- a/scripts/install +++ b/scripts/install @@ -35,11 +35,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=low -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 - # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/remove b/scripts/remove index 79cb058..61db822 100644 --- a/scripts/remove +++ b/scripts/remove @@ -17,11 +17,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config diff --git a/scripts/restore b/scripts/restore index 3099bef..df14dba 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,18 +26,8 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=2 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Restoring the MySQL database..." --weight=5 - ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql #================================================= From eca9a594edeb32f720ee5ac9d41e3d4f33ba8b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 Apr 2023 15:39:58 +0200 Subject: [PATCH 23/46] Update manifest.toml --- manifest.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 06f0f66..2183b94 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://www.mytinytodo.net/faq.php" code = "https://github.com/maxpozdeev/mytinytodo" [integration] -yunohost = ">= 11.1.15" +yunohost = ">= 11.1.17" architectures = "all" multi_instance = false ldap = false @@ -46,6 +46,7 @@ ram.runtime = "50M" [resources.sources.main] url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.3/mytinytodo-v1.7.3.tar.gz" sha256 = "7ba7b4c78cf12cb56c70bbc3768e22d4e9de871d09dd5c25126b9d9e3e0cdec9" + autoupdate.strategy = "latest_github_tag" [resources.system_user] From eae663dcc88f95d218659b83e1c03ccfd6a27790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 Apr 2023 15:40:31 +0200 Subject: [PATCH 24/46] cleaning --- .github/workflows/updater.sh | 146 ---------------------------------- .github/workflows/updater.yml | 49 ------------ 2 files changed, 195 deletions(-) delete mode 100644 .github/workflows/updater.sh delete mode 100644 .github/workflows/updater.yml diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh deleted file mode 100644 index 7b78d38..0000000 --- a/.github/workflows/updater.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/bash - -#================================================= -# PACKAGE UPDATING HELPER -#================================================= - -# This script is meant to be run by GitHub Actions -# The YunoHost-Apps organisation offers a template Action to run this script periodically -# Since each app is different, maintainers can adapt its contents so as to perform -# automatic actions when a new upstream release is detected. -#exit 1 - -#================================================= -# FETCHING LATEST RELEASE AND ITS ASSETS -#================================================= - -# Fetching information -current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') -repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') -# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) -version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) -assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) - -admin_repo="TryGhost/Admin" -assets+=("https://api.github.com/repos/TryGhost/Admin/zipball/$version") - -# Later down the script, we assume the version has only digits and dots -# Sometimes the release name starts with a "v", so let's filter it out. -# You may need more tweaks here if the upstream repository has different naming conventions. -if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then - version=${version:1} -fi - -# Setting up the environment variables -echo "Current version: $current_version" -echo "Latest release from upstream: $version" -echo "VERSION=$version" >> $GITHUB_ENV -# For the time being, let's assume the script will fail -echo "PROCEED=false" >> $GITHUB_ENV - -# Proceed only if the retrieved version is greater than the current one -if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then - echo "::warning ::No new version available" - exit 0 -# Proceed only if a PR for this new version does not already exist -elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then - echo "::warning ::A branch already exists for this update" - exit 0 -fi - -# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) -echo "${#assets[@]} available asset(s)" - -#================================================= -# UPDATE SOURCE FILES -#================================================= - -# Here we use the $assets variable to get the resources published in the upstream release. - -count=0 - -# Let's loop over the array of assets URLs -for asset_url in ${assets[@]}; do - -echo "Handling asset at $asset_url" - -# Assign the asset to a source file in conf/ directory -# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) -# Leave $src empty to ignore the asset -case $asset_url in - *"mytinytodo-"*".zip") - src="app" - ;; - *"/Admin/"*) - src="app" - ;; - *) - src="" - ;; -esac - -# If $src is not empty, let's process the asset -if [ ! -z "$src" ]; then - -# Create the temporary directory -tempdir="$(mktemp -d)" - -# Download sources and calculate checksum -filename=${asset_url##*/} -curl --silent -4 -L $asset_url -o "$tempdir/$filename" -checksum=$(sha256sum "$tempdir/$filename" | head -c 64) - -# Delete temporary directory -rm -rf $tempdir - -# Get extension -if [[ $filename == *.tar.gz ]]; then - extension=tar.gz -else - extension=${filename##*.} -fi - -# Rewrite source file -cat < conf/$src.src -SOURCE_URL=$asset_url -SOURCE_SUM=$checksum -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=$extension -SOURCE_IN_SUBDIR=true -SOURCE_EXTRACT=true -EOT -echo "... conf/$src.src updated" - -count=$((count+1)) - -else -echo "... asset ignored" -fi - -done - -if [ $count == 0 ]; then - echo "::warning ::None of the assets were processed." - exit 0 -fi - -#================================================= -# SPECIFIC UPDATE STEPS -#================================================= - -# Any action on the app's source code can be done. -# The GitHub Action workflow takes care of committing all changes after this script ends. - -#================================================= -# GENERIC FINALIZATION -#================================================= - -# Replace new version in manifest -echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json - -# No need to update the README, yunohost-bot takes care of it - -# The Action will proceed only if the PROCEED environment variable is set to true -echo "PROCEED=true" >> $GITHUB_ENV -exit 0 - diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml deleted file mode 100644 index 609c284..0000000 --- a/.github/workflows/updater.yml +++ /dev/null @@ -1,49 +0,0 @@ -# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected. -# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization. -# This file should be enough by itself, but feel free to tune it to your needs. -# It calls updater.sh, which is where you should put the app-specific update steps. -name: Check for new upstream releases -on: - # Allow to manually trigger the workflow - workflow_dispatch: - # Run it every day at 6:00 UTC - schedule: - - cron: '0 6 * * *' -jobs: - updater: - runs-on: ubuntu-latest - steps: - - name: Fetch the source code - uses: actions/checkout@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Run the updater script - id: run_updater - run: | - # Setting up Git user - git config --global user.name 'yunohost-bot' - git config --global user.email 'yunohost-bot@users.noreply.github.com' - # Run the updater script - /bin/bash .github/workflows/updater.sh - - name: Commit changes - id: commit - if: ${{ env.PROCEED == 'true' }} - run: | - git commit -am "Upgrade to v$VERSION" - - name: Create Pull Request - id: cpr - if: ${{ env.PROCEED == 'true' }} - uses: peter-evans/create-pull-request@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update to version ${{ env.VERSION }} - committer: 'yunohost-bot ' - author: 'yunohost-bot ' - signoff: false - branch: ci-auto-update-v${{ env.VERSION }} - base: testing - delete-branch: true - title: 'Upgrade to version ${{ env.VERSION }}' - body: | - Upgrade to v${{ env.VERSION }} - draft: false From e3dd5321486b32e0be6ce06086c2f3db8ef8f304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 Apr 2023 15:41:25 +0200 Subject: [PATCH 25/46] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 2183b94..f971ce8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "myTinyTodo" description.en = "Open source to-do list script" description.fr = "Gestionnaire de todo list" -version = "1.7.3~ynh2" +version = "1.7.3~ynh3" maintainers = ["plabuse"] From 1d2467bc8ade00aaf03dd293e136cb915f2a4d3e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 7 Apr 2023 13:41:32 +0000 Subject: [PATCH 26/46] 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 cc490ee..c9715c8 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in - tyle for mobiles devices -**Shipped version:** 1.7.3~ynh2 +**Shipped version:** 1.7.3~ynh3 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 410f0d0..b32bee6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,7 +32,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po - tyle for mobiles devices -**Version incluse :** 1.7.3~ynh2 +**Version incluse :** 1.7.3~ynh3 **Démo :** https://www.mytinytodo.net/demo/ From 0befbaec8ed60ceb83dd660151444694fbf08b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 12 May 2023 16:13:09 +0200 Subject: [PATCH 27/46] Cleaning --- check_process | 25 ------------------------- config_panel.toml.example | 4 ++-- doc/DESCRIPTION.md | 2 ++ manifest.toml | 2 +- 4 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 check_process diff --git a/check_process b/check_process deleted file mode 100644 index 2bdf7ce..0000000 --- a/check_process +++ /dev/null @@ -1,25 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - language="fr" - 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=b598d7235944070a438db49710d141b7ece25669 - backup_restore=1 - multi_instance=0 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=b598d7235944070a438db49710d141b7ece25669 - name= Upgrade to version 1.6.4 (#14) - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/config_panel.toml.example b/config_panel.toml.example index c2c6ecd..28b6445 100644 --- a/config_panel.toml.example +++ b/config_panel.toml.example @@ -10,10 +10,10 @@ name = "myTinyTodo configuration" ask = "Set title" type = "string" help = "Specify a title for your todolist." - bind = "title:__FINALPATH__/config.php" + bind = "title:__INSTALL_DIR__/config.php" [main.config.set_password] ask = "Set password" type = "password" help = "Specify password here to protect your tasks from modification, or leave empty that everyone could read/write todolist." - bind = "password:__FINALPATH__/config.php" + bind = "password:__INSTALL_DIR__/config.php" diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 3c5ac00..0236edf 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,3 +1,5 @@ +Simple way to manage your todo lists. + ### Features - Multiple lists diff --git a/manifest.toml b/manifest.toml index f971ce8..f6a2da6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://www.mytinytodo.net/faq.php" code = "https://github.com/maxpozdeev/mytinytodo" [integration] -yunohost = ">= 11.1.17" +yunohost = ">= 11.1.19" architectures = "all" multi_instance = false ldap = false From 889d376f5c78921f8fef4f50b7cd8d1031026b8c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 12 May 2023 14:13:14 +0000 Subject: [PATCH 28/46] Auto-update README --- README.md | 2 ++ README_fr.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index c9715c8..8f38def 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview +Simple way to manage your todo lists. + ### Features - Multiple lists diff --git a/README_fr.md b/README_fr.md index b32bee6..f5b2c11 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,6 +16,8 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble +Simple way to manage your todo lists. + ### Features - Multiple lists From beb862773b7ae712c77bd6d2f8ebd79f0dc4fdce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 5 Jun 2023 13:31:09 +0200 Subject: [PATCH 29/46] cleaning --- doc/DESCRIPTION.md | 2 +- manifest.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 0236edf..a932b34 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -13,4 +13,4 @@ Simple way to manage your todo lists. - Smart syntax improves creation of tasks (usage: /priority/ Task /tags/) - Print-friendly CSS -- tyle for mobiles devices +- Style for mobiles devices diff --git a/manifest.toml b/manifest.toml index f6a2da6..2f31ce9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -56,7 +56,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server php8.0-mysqli php8.0-pdo" + packages = "mariadb-server php8.2-mysqli php8.2-pdo" [resources.database] type = "mysql" From c4a0840c82e52efee11f4ca89b48940738504657 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 5 Jun 2023 11:31:13 +0000 Subject: [PATCH 30/46] 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 8f38def..39d2024 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Simple way to manage your todo lists. - Smart syntax improves creation of tasks (usage: /priority/ Task /tags/) - Print-friendly CSS -- tyle for mobiles devices +- Style for mobiles devices **Shipped version:** 1.7.3~ynh3 diff --git a/README_fr.md b/README_fr.md index f5b2c11..686a0ef 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Simple way to manage your todo lists. - Smart syntax improves creation of tasks (usage: /priority/ Task /tags/) - Print-friendly CSS -- tyle for mobiles devices +- Style for mobiles devices **Version incluse :** 1.7.3~ynh3 From 80814df8301c78df7f832dbeb553cfead91b7ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 5 Jul 2023 10:10:15 +0200 Subject: [PATCH 31/46] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 2f31ce9..1fcc134 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://www.mytinytodo.net/faq.php" code = "https://github.com/maxpozdeev/mytinytodo" [integration] -yunohost = ">= 11.1.19" +yunohost = ">= 11.1.21" architectures = "all" multi_instance = false ldap = false From a935e348af02ff276afc94ed375fa813f5a122b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:30:19 +0200 Subject: [PATCH 32/46] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 1fcc134..0900521 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://www.mytinytodo.net/faq.php" code = "https://github.com/maxpozdeev/mytinytodo" [integration] -yunohost = ">= 11.1.21" +yunohost = ">= 11.2" architectures = "all" multi_instance = false ldap = false @@ -44,8 +44,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.3/mytinytodo-v1.7.3.tar.gz" - sha256 = "7ba7b4c78cf12cb56c70bbc3768e22d4e9de871d09dd5c25126b9d9e3e0cdec9" + url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.4/mytinytodo-v1.7.4.tar.gz" + sha256 = "3eee5792a1d73292edd7137c68e219caba5a28601e376216267935e8b1b22864" autoupdate.strategy = "latest_github_tag" [resources.system_user] From cb760d5fa95fbf9464962d4116f25c5682a75e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:30:47 +0200 Subject: [PATCH 33/46] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 0900521..a918d12 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "myTinyTodo" description.en = "Open source to-do list script" description.fr = "Gestionnaire de todo list" -version = "1.7.3~ynh3" +version = "1.7.4~ynh1" maintainers = ["plabuse"] From d84b2059394ed37d67a7b9118a87e76d5969f476 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 6 Aug 2023 14:30:52 +0000 Subject: [PATCH 34/46] 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 39d2024..e2c359b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Simple way to manage your todo lists. - Style for mobiles devices -**Shipped version:** 1.7.3~ynh3 +**Shipped version:** 1.7.4~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 686a0ef..4b6d83e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -34,7 +34,7 @@ Simple way to manage your todo lists. - Style for mobiles devices -**Version incluse :** 1.7.3~ynh3 +**Version incluse :** 1.7.4~ynh1 **Démo :** https://www.mytinytodo.net/demo/ From c361035f176950aa0b120dc55d09aef3cc3a4c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:17:21 +0200 Subject: [PATCH 35/46] cleaning --- doc/DESCRIPTION.md | 4 ---- doc/DESCRIPTION_fr.md | 11 +++++++++++ manifest.toml | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 doc/DESCRIPTION_fr.md diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index a932b34..1174a16 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -10,7 +10,3 @@ Simple way to manage your todo lists. - Different sortings including sort by drag-and-drop - Search - Password protection -- Smart syntax improves creation of tasks - (usage: /priority/ Task /tags/) -- Print-friendly CSS -- Style for mobiles devices diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..85410ec --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,11 @@ +myTinyTodo permet de Gérer efficacement vos listes de tâches. +### Caractéristiques + +- Plusieurs listes +- Notes de tâches +- Tags (et nuage de tags) +- Les dates d'échéance +- Priorité (-1, 0, +1, +2) +- Différents tris dont le tri par glisser-déposer +- Recherche +- Mot de passe de protection diff --git a/manifest.toml b/manifest.toml index a918d12..f910f62 100644 --- a/manifest.toml +++ b/manifest.toml @@ -35,8 +35,8 @@ ram.runtime = "50M" default = "/mytinytodo" [install.init_main_permission] - help.en = "If enabled, myTinyTodo will be accessible by people who do not have an account. This can be changed later via the webadmin." - help.fr = "Si cette case est cochée, myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + help.en = "If set to visitors, myTinyTodo will be accessible by people who do not have an account. This can be changed later via the webadmin." + help.fr = "Si défini sur visiteurs, myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." type = "group" default = "visitors" @@ -56,7 +56,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server php8.2-mysqli php8.2-pdo" + packages = "mariadb-server, php8.2-mysqli, php8.2-pdo" [resources.database] type = "mysql" From 633cdf54443e3d5d05bda695a3c2f20f9f055b4b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 7 Sep 2023 08:17:26 +0000 Subject: [PATCH 36/46] Auto-update README --- README.md | 4 ---- README_fr.md | 25 ++++++++++--------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index e2c359b..cd91520 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,6 @@ Simple way to manage your todo lists. - Different sortings including sort by drag-and-drop - Search - Password protection -- Smart syntax improves creation of tasks - (usage: /priority/ Task /tags/) -- Print-friendly CSS -- Style for mobiles devices **Shipped version:** 1.7.4~ynh1 diff --git a/README_fr.md b/README_fr.md index 4b6d83e..5da73dc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,22 +16,17 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Simple way to manage your todo lists. +myTinyTodo permet de Gérer efficacement vos listes de tâches. +### Caractéristiques -### Features - -- Multiple lists -- Task notes -- Tags (and tag cloud) -- Due dates -- Priority (-1, 0, +1, +2) -- Different sortings including sort by drag-and-drop -- Search -- Password protection -- Smart syntax improves creation of tasks - (usage: /priority/ Task /tags/) -- Print-friendly CSS -- Style for mobiles devices +- Plusieurs listes +- Notes de tâches +- Tags (et nuage de tags) +- Les dates d'échéance +- Priorité (-1, 0, +1, +2) +- Différents tris dont le tri par glisser-déposer +- Recherche +- Mot de passe de protection **Version incluse :** 1.7.4~ynh1 From e1de5d01cfca1e611c654744eeae0428fe3952e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 12 Sep 2023 10:13:11 +0200 Subject: [PATCH 37/46] cleaning --- manifest.toml | 10 +++++----- scripts/install | 2 +- scripts/upgrade | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/manifest.toml b/manifest.toml index f910f62..a25abc7 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "myTinyTodo" description.en = "Open source to-do list script" description.fr = "Gestionnaire de todo list" -version = "1.7.4~ynh1" +version = "1.7.5~ynh1" maintainers = ["plabuse"] @@ -35,8 +35,8 @@ ram.runtime = "50M" default = "/mytinytodo" [install.init_main_permission] - help.en = "If set to visitors, myTinyTodo will be accessible by people who do not have an account. This can be changed later via the webadmin." - help.fr = "Si défini sur visiteurs, myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + help.en = "If set to 'visitors', myTinyTodo will be accessible by people who do not have an account. This can be changed later via the webadmin." + help.fr = "Si défini sur 'visiteurs', myTinyTodo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." type = "group" default = "visitors" @@ -44,8 +44,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.4/mytinytodo-v1.7.4.tar.gz" - sha256 = "3eee5792a1d73292edd7137c68e219caba5a28601e376216267935e8b1b22864" + url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.5/mytinytodo-v1.7.5.tar.gz" + sha256 = "6a6926a13d7a66b68cf8ff4ebde40f3a8d5c046302e39005ab96b76c67c11882" autoupdate.strategy = "latest_github_tag" [resources.system_user] diff --git a/scripts/install b/scripts/install index f711c91..898f0e4 100644 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/upgrade b/scripts/upgrade index 502b030..7a20787 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,7 +36,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config # Create a dedicated NGINX config ynh_add_nginx_config From cfd3f608c10d63679906bdac72ba870f9d110d38 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 12 Sep 2023 08:13:17 +0000 Subject: [PATCH 38/46] 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 cd91520..ff79441 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Simple way to manage your todo lists. - Password protection -**Shipped version:** 1.7.4~ynh1 +**Shipped version:** 1.7.5~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 5da73dc..33b86eb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ myTinyTodo permet de Gérer efficacement vos listes de tâches. - Mot de passe de protection -**Version incluse :** 1.7.4~ynh1 +**Version incluse :** 1.7.5~ynh1 **Démo :** https://www.mytinytodo.net/demo/ From 1eb12f6ab8dae439c3d715280c4ab4e4d4b0be11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 14 Sep 2023 12:54:43 +0200 Subject: [PATCH 39/46] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index a25abc7..648f123 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "myTinyTodo" description.en = "Open source to-do list script" description.fr = "Gestionnaire de todo list" -version = "1.7.5~ynh1" +version = "1.7.6~ynh1" maintainers = ["plabuse"] @@ -44,8 +44,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.5/mytinytodo-v1.7.5.tar.gz" - sha256 = "6a6926a13d7a66b68cf8ff4ebde40f3a8d5c046302e39005ab96b76c67c11882" + url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.6/mytinytodo-v1.7.6.tar.gz" + sha256 = "8edde5469118a751744af37b4323e06c19a21d8d5b0a8bffe092e1f0155d8599" autoupdate.strategy = "latest_github_tag" [resources.system_user] From b3270913ece2c709da21af1f842cc12552350ba8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 14 Sep 2023 10:54:48 +0000 Subject: [PATCH 40/46] 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 ff79441..e581343 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Simple way to manage your todo lists. - Password protection -**Shipped version:** 1.7.5~ynh1 +**Shipped version:** 1.7.6~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 33b86eb..6cf0652 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ myTinyTodo permet de Gérer efficacement vos listes de tâches. - Mot de passe de protection -**Version incluse :** 1.7.5~ynh1 +**Version incluse :** 1.7.6~ynh1 **Démo :** https://www.mytinytodo.net/demo/ From 463204a711ec9f40b4102ad5f99e1e225b77b612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 12 Nov 2023 17:04:38 +0100 Subject: [PATCH 41/46] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 898f0e4..17bb11f 100644 --- a/scripts/install +++ b/scripts/install @@ -44,7 +44,7 @@ ynh_add_nginx_config ynh_script_progression --message="Adding a configuration file..." --weight=1 salt=$(ynh_string_random --length=16) -ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php" +ynh_add_config --template="config.php" --destination="$install_dir/config.php" chmod 640 "$install_dir/config.php" chown $app:$app "$install_dir/config.php" From be2cb5e1be26c7b5db684fcc1023a82c35439efb Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 12 Nov 2023 16:04:43 +0000 Subject: [PATCH 42/46] 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 e581343..6722520 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Simple way to manage your todo lists. * Official app website: * Official admin documentation: * Upstream app code repository: -* YunoHost documentation for this app: +* YunoHost Store: * Report a bug: ## Developer info diff --git a/README_fr.md b/README_fr.md index 6cf0652..8c4aa85 100644 --- a/README_fr.md +++ b/README_fr.md @@ -42,7 +42,7 @@ myTinyTodo permet de Gérer efficacement vos listes de tâches. * Site officiel de l’app : * Documentation officielle de l’admin : * Dépôt de code officiel de l’app : -* Documentation YunoHost pour cette app : +* YunoHost Store: * Signaler un bug : ## Informations pour les développeurs From 6cdb8add306d35e53f1bd670f4fdebf6cf32b1d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:39:13 +0100 Subject: [PATCH 43/46] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 648f123..5c3ac95 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "myTinyTodo" description.en = "Open source to-do list script" description.fr = "Gestionnaire de todo list" -version = "1.7.6~ynh1" +version = "1.8.0~ynh1" maintainers = ["plabuse"] @@ -44,8 +44,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.7.6/mytinytodo-v1.7.6.tar.gz" - sha256 = "8edde5469118a751744af37b4323e06c19a21d8d5b0a8bffe092e1f0155d8599" + url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.8.0/mytinytodo-v1.8.0.tar.gz" + sha256 = "6343bf1c60664a896ad3f111639386113fd31904ca63a41480dacf61672e918c" autoupdate.strategy = "latest_github_tag" [resources.system_user] From 6dd117de260c2428cdb78a746f6855f8f146e027 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 30 Nov 2023 15:39:18 +0000 Subject: [PATCH 44/46] 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 6722520..a39956d 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Simple way to manage your todo lists. - Password protection -**Shipped version:** 1.7.6~ynh1 +**Shipped version:** 1.8.0~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index 8c4aa85..c32f998 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ myTinyTodo permet de Gérer efficacement vos listes de tâches. - Mot de passe de protection -**Version incluse :** 1.7.6~ynh1 +**Version incluse :** 1.8.0~ynh1 **Démo :** https://www.mytinytodo.net/demo/ From be20944738c2cef3158eb150a76725316d0bef56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 30 Nov 2023 16:39:23 +0100 Subject: [PATCH 45/46] Update manifest.toml --- manifest.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manifest.toml b/manifest.toml index 5c3ac95..f3b9610 100644 --- a/manifest.toml +++ b/manifest.toml @@ -20,8 +20,11 @@ code = "https://github.com/maxpozdeev/mytinytodo" yunohost = ">= 11.2" architectures = "all" multi_instance = false + ldap = false + sso = false + disk = "50M" ram.build = "50M" ram.runtime = "50M" From 1077192c52004e92a374b71a5da14de32d93ac43 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sun, 4 Feb 2024 09:53:44 +0100 Subject: [PATCH 46/46] Upgrade to v1.8.1 (#56) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Upgrade to v1.8.1 * Auto-update README * Update manifest.toml --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> --- README.md | 2 +- README_fr.md | 2 +- manifest.toml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a39956d..302e889 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Simple way to manage your todo lists. - Password protection -**Shipped version:** 1.8.0~ynh1 +**Shipped version:** 1.8.1~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index c32f998..7c55da4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ myTinyTodo permet de Gérer efficacement vos listes de tâches. - Mot de passe de protection -**Version incluse :** 1.8.0~ynh1 +**Version incluse :** 1.8.1~ynh1 **Démo :** https://www.mytinytodo.net/demo/ diff --git a/manifest.toml b/manifest.toml index f3b9610..4c5d270 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "myTinyTodo" description.en = "Open source to-do list script" description.fr = "Gestionnaire de todo list" -version = "1.8.0~ynh1" +version = "1.8.1~ynh1" maintainers = ["plabuse"] @@ -47,8 +47,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.8.0/mytinytodo-v1.8.0.tar.gz" - sha256 = "6343bf1c60664a896ad3f111639386113fd31904ca63a41480dacf61672e918c" + url = "https://github.com/maxpozdeev/mytinytodo/releases/download/v1.8.1/mytinytodo-v1.8.1.tar.gz" + sha256 = "1add8ea5ca3d43ec7b8d6c6c73689b620534e4fbacb270333c61117350d258b3" autoupdate.strategy = "latest_github_tag" [resources.system_user]