From 5a66bef36cd41ca1a6c23fb9a77dff5f199e9f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 13:13:37 +0100 Subject: [PATCH 1/8] Add dummies --- doc/ADMIN.md | 3 +++ doc/ADMIN_fr.md | 3 +++ doc/DESCRIPTION.md | 10 +--------- doc/DESCRIPTION_fr.md | 1 + doc/DISCLAIMER.md | 12 ------------ doc/notifications/POST_INSTALL.md | 7 +++++++ doc/notifications/POST_UPGRADE.md | 1 + doc/notifications/PRE_INSTALL.md | 1 + doc/notifications/PRE_INSTALL_fr.md | 1 + doc/notifications/PRE_UPGRADE.md | 1 + manifest.toml | 2 +- 11 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 doc/ADMIN.md create mode 100644 doc/ADMIN_fr.md create mode 100644 doc/DESCRIPTION_fr.md delete mode 100644 doc/DISCLAIMER.md create mode 100644 doc/notifications/POST_INSTALL.md create mode 100644 doc/notifications/POST_UPGRADE.md create mode 100644 doc/notifications/PRE_INSTALL.md create mode 100644 doc/notifications/PRE_INSTALL_fr.md create mode 100644 doc/notifications/PRE_UPGRADE.md diff --git a/doc/ADMIN.md b/doc/ADMIN.md new file mode 100644 index 0000000..0fd9c1e --- /dev/null +++ b/doc/ADMIN.md @@ -0,0 +1,3 @@ +This is a dummy admin doc for this app + +The app install dir is __INSTALL_DIR__ diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md new file mode 100644 index 0000000..fc1701f --- /dev/null +++ b/doc/ADMIN_fr.md @@ -0,0 +1,3 @@ +Ceci est une fausse doc d'admin pour cette app + +Le dossier d'install de l'app est __INSTALL_DIR__ diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 0685205..3f2e57a 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,9 +1 @@ -Some long and extensive description of what the app is and does, lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - -### Features - -- Ut enim ad minim veniam, quis nostrud exercitation ullamco ; -- Laboris nisi ut aliquip ex ea commodo consequat ; -- Duis aute irure dolor in reprehenderit in voluptate ; -- Velit esse cillum dolore eu fugiat nulla pariatur ; -- Excepteur sint occaecat cupidatat non proident, sunt in culpa." +This is a dummy description of this app features diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..13f4b64 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +Ceci est une fausse description des fonctionalités de l'app diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index aded581..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,12 +0,0 @@ -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain ? - * architectures not supported ? - * not-working single-sign on or LDAP integration ? - * the app requires an important amount of RAM / disk / .. to install or to work properly - * etc... - -* Other infos that people should be aware of, such as: - * any specific step to perform after installing (such as manually finishing the install, specific admin credentials, ...) - * how to configure / administrate the application if it ain't obvious - * upgrade process / specificities / things to be aware of ? - * security considerations ? diff --git a/doc/notifications/POST_INSTALL.md b/doc/notifications/POST_INSTALL.md new file mode 100644 index 0000000..ba7212e --- /dev/null +++ b/doc/notifications/POST_INSTALL.md @@ -0,0 +1,7 @@ +This is a dummy disclaimer to display after the install + +The app url is __DOMAIN____PATH__ + +The app install dir is __INSTALL_DIR__ + +The app id is __ID__ diff --git a/doc/notifications/POST_UPGRADE.md b/doc/notifications/POST_UPGRADE.md new file mode 100644 index 0000000..a58e2ae --- /dev/null +++ b/doc/notifications/POST_UPGRADE.md @@ -0,0 +1 @@ +This is a dummy disclaimer to display after upgrades diff --git a/doc/notifications/PRE_INSTALL.md b/doc/notifications/PRE_INSTALL.md new file mode 100644 index 0000000..eb3ab3a --- /dev/null +++ b/doc/notifications/PRE_INSTALL.md @@ -0,0 +1 @@ +This is a dummy disclaimer to display prior to the install diff --git a/doc/notifications/PRE_INSTALL_fr.md b/doc/notifications/PRE_INSTALL_fr.md new file mode 100644 index 0000000..4a02cd5 --- /dev/null +++ b/doc/notifications/PRE_INSTALL_fr.md @@ -0,0 +1 @@ +Ceci est un faux disclaimer à présenter avant l'installation diff --git a/doc/notifications/PRE_UPGRADE.md b/doc/notifications/PRE_UPGRADE.md new file mode 100644 index 0000000..780fc15 --- /dev/null +++ b/doc/notifications/PRE_UPGRADE.md @@ -0,0 +1 @@ +This is a dummy disclaimer to display prior to any upgrade diff --git a/manifest.toml b/manifest.toml index 310b1c3..7146a92 100644 --- a/manifest.toml +++ b/manifest.toml @@ -23,7 +23,7 @@ cpe = "???" fund = "???" [integration] -yunohost = ">= 11.0.0" +yunohost = ">= 11.1.0" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] architectures = "all" multi_instance = true From 6a9dcfa797ee599369a36ae36034ba38fd7aec50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 7 Feb 2023 10:08:03 +0100 Subject: [PATCH 2/8] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 7146a92..ee425e2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -23,7 +23,7 @@ cpe = "???" fund = "???" [integration] -yunohost = ">= 11.1.0" +yunohost = ">= 11.1.6" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] architectures = "all" multi_instance = true From 0bf624bb9222e174199271daa94085a5c6772c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 7 Feb 2023 10:09:33 +0100 Subject: [PATCH 3/8] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index ee425e2..ec46b73 100644 --- a/manifest.toml +++ b/manifest.toml @@ -31,7 +31,7 @@ multi_instance = true ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. sso = "?" -# FIXME: replace with an **estimate** minimum disk and RAM requirements. e.g. 20M, 400M, 1G, ... +# FIXME: replace with an **estimate** minimum disk and RAM requirements. e.g. 20M, 400M, 1G... disk = "50M" ram.build = "50M" ram.runtime = "50M" From c9d4c3b084c058e089669c1b3f8622b725a63b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 7 Feb 2023 10:13:09 +0100 Subject: [PATCH 4/8] cleaning --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- doc/notifications/POST_INSTALL.md | 6 +++--- scripts/install | 1 - scripts/upgrade | 1 - 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 0fd9c1e..c9b5225 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,3 +1,3 @@ This is a dummy admin doc for this app -The app install dir is __INSTALL_DIR__ +The app install dir is `__INSTALL_DIR__` diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index fc1701f..a138028 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,3 +1,3 @@ Ceci est une fausse doc d'admin pour cette app -Le dossier d'install de l'app est __INSTALL_DIR__ +Le dossier d'install de l'app est `__INSTALL_DIR__` diff --git a/doc/notifications/POST_INSTALL.md b/doc/notifications/POST_INSTALL.md index ba7212e..f367b62 100644 --- a/doc/notifications/POST_INSTALL.md +++ b/doc/notifications/POST_INSTALL.md @@ -1,7 +1,7 @@ This is a dummy disclaimer to display after the install -The app url is __DOMAIN____PATH__ +The app url is `__DOMAIN____PATH__` -The app install dir is __INSTALL_DIR__ +The app install dir is `__INSTALL_DIR__` -The app id is __ID__ +The app id is `__ID__` diff --git a/scripts/install b/scripts/install index 506f874..4ffc34e 100755 --- a/scripts/install +++ b/scripts/install @@ -49,7 +49,6 @@ ynh_setup_source --dest_dir="$install_dir" # ownership to all files such as after the ynh_setup_source step chown -R $app:www-data "$install_dir" - #================================================= # SYSTEM CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 754d0c1..f7d372f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -81,7 +81,6 @@ fi # ownership to all files such as after the ynh_setup_source step chown -R $app:www-data "$install_dir" - #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= From 4f7cb2b2947de944c8b069b86d29cb755295d899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 7 Feb 2023 10:16:26 +0100 Subject: [PATCH 5/8] Update config --- scripts/config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/config b/scripts/config index b9e79f8..dca69fb 100644 --- a/scripts/config +++ b/scripts/config @@ -22,7 +22,7 @@ ynh_abort_if_errors # RETRIEVE ARGUMENTS #================================================= -final_path=$(ynh_app_setting_get $app final_path) +install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) #================================================= # SPECIFIC GETTERS FOR TOML SHORT KEY @@ -52,7 +52,7 @@ EOF } 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/')" + local prices = "$(grep "DONATION\['" "$install_dir/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. @@ -85,9 +85,9 @@ set__prices() { 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" + sed "d/DONATION\['$frequency'\]\['$currency'\]" "$install_dir/settings.py" - echo "DONATION['$frequency']['$currency'] = '$price_id'" >> "$final_path/settings.py" + echo "DONATION['$frequency']['$currency'] = '$price_id'" >> "$install_dir/settings.py" done #--------------------------------------------- From 1a94c706ced3ede33d182cf20b8876c133d3bc14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 7 Feb 2023 10:17:04 +0100 Subject: [PATCH 6/8] Update config_panel.toml.example --- config_panel.toml.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_panel.toml.example b/config_panel.toml.example index c6bccd8..3b89740 100644 --- a/config_panel.toml.example +++ b/config_panel.toml.example @@ -246,14 +246,14 @@ services = ["__APP__"] type = "file" accept = ".png" help = "Fill with an already resized logo" - bind = "__FINALPATH__/img/logo.png" + bind = "__INSTALL_DIR__/img/logo.png" [main.customization.favicon] ask = "Favicon" type = "file" accept = ".png" help = "Fill with an already sized favicon" - bind = "__FINALPATH__/img/favicon.png" + bind = "__INSTALL_DIR__/img/favicon.png" [main.stripe] From 47d1847c0895803742e40201a7f4ce7cb8d40a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 7 Feb 2023 10:18:15 +0100 Subject: [PATCH 7/8] Update upgrade --- scripts/upgrade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f7d372f..7018949 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,7 +35,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -#ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 +#ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # # N.B. : the followings setting migrations snippets are provided as *EXAMPLES* @@ -100,7 +100,6 @@ ynh_use_logrotate --non-append ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" - #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS, ...) #================================================= From c038efee77d69df5df2e2725e461e344aa8e7d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 7 Feb 2023 19:43:37 +0100 Subject: [PATCH 8/8] Free doc tree --- doc/{notifications => }/POST_INSTALL.md | 0 doc/{notifications => }/POST_UPGRADE.md | 0 doc/{notifications => }/PRE_INSTALL.md | 0 doc/{notifications => }/PRE_INSTALL_fr.md | 0 doc/{notifications => }/PRE_UPGRADE.md | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename doc/{notifications => }/POST_INSTALL.md (100%) rename doc/{notifications => }/POST_UPGRADE.md (100%) rename doc/{notifications => }/PRE_INSTALL.md (100%) rename doc/{notifications => }/PRE_INSTALL_fr.md (100%) rename doc/{notifications => }/PRE_UPGRADE.md (100%) diff --git a/doc/notifications/POST_INSTALL.md b/doc/POST_INSTALL.md similarity index 100% rename from doc/notifications/POST_INSTALL.md rename to doc/POST_INSTALL.md diff --git a/doc/notifications/POST_UPGRADE.md b/doc/POST_UPGRADE.md similarity index 100% rename from doc/notifications/POST_UPGRADE.md rename to doc/POST_UPGRADE.md diff --git a/doc/notifications/PRE_INSTALL.md b/doc/PRE_INSTALL.md similarity index 100% rename from doc/notifications/PRE_INSTALL.md rename to doc/PRE_INSTALL.md diff --git a/doc/notifications/PRE_INSTALL_fr.md b/doc/PRE_INSTALL_fr.md similarity index 100% rename from doc/notifications/PRE_INSTALL_fr.md rename to doc/PRE_INSTALL_fr.md diff --git a/doc/notifications/PRE_UPGRADE.md b/doc/PRE_UPGRADE.md similarity index 100% rename from doc/notifications/PRE_UPGRADE.md rename to doc/PRE_UPGRADE.md