From c23f698bb60b41e6649d5a2c3de2dd2497a70961 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 5 Sep 2023 22:54:30 +0200 Subject: [PATCH 01/45] Update manifest.toml version 1.2.11 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 54a57ad..41b5e53 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paheko" description.en = "Software to manage association" description.fr = "Logiciel libre de gestion d'association" -version = "1.3.0~ynh5" +version = "1.2.11~ynh1" maintainers = ["rodinux"] @@ -42,8 +42,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://fossil.kd2.org/paheko/uv/paheko-1.3.0-rc7.tar.gz" - sha256 = "c0ef2bb160d6164cf43ead5d10f805b95db3841ce114f72316dcd9d41c1ddc54" + url = "https://fossil.kd2.org/paheko/uv/paheko-1.2.11.tar.gz" + sha256 = "9d8a505d9165c38ee0d262316ba636536ebddf0a6127b2e731bc231fe053f28d" autoupdate.strategy = "latest_github_tag" [resources.system_user] From c6e233621768af0bf456295dae231bef498b76a3 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 5 Sep 2023 20:54:33 +0000 Subject: [PATCH 02/45] 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 3e24bda..809a714 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Paheko (we chose the name Paheko, a word from the Māori language meaning "to co It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc.. -**Shipped version:** 1.3.0~ynh5 +**Shipped version:** 1.2.11~ynh1 **Demo:** https://paheko.cloud/essai/ diff --git a/README_fr.md b/README_fr.md index 56f8dcf..d48058e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ Paheko (Nous avons choisi le nom Paheko, un mot de la langue Māori qui signifie ![Logo Paheko](https://master.garradin.eu/garradin-devient-paheko/logo_v3_small-fs8.png) -**Version incluse :** 1.3.0~ynh5 +**Version incluse :** 1.2.11~ynh1 **Démo :** https://paheko.cloud/essai/ From 5f9ab05dc6ff5ba58da15ee4362884c637018e36 Mon Sep 17 00:00:00 2001 From: rodinux Date: Tue, 5 Sep 2023 23:47:38 +0200 Subject: [PATCH 03/45] keep namespace Garradin until next relaease 1.3 --- conf/config.local.user.php | 2 +- conf/config.local.yunohost.php | 2 +- doc/PRE_UPGRADE.d/1.3.0.md | 1 - doc/PRE_UPGRADE.d/1.3.0_fr.md | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 doc/PRE_UPGRADE.d/1.3.0.md delete mode 100644 doc/PRE_UPGRADE.d/1.3.0_fr.md diff --git a/conf/config.local.user.php b/conf/config.local.user.php index 62a146d..04b8d27 100644 --- a/conf/config.local.user.php +++ b/conf/config.local.user.php @@ -10,4 +10,4 @@ */ // Nécessaire pour situer les constantes dans le bon namespace -namespace Paheko; +namespace Garradin; diff --git a/conf/config.local.yunohost.php b/conf/config.local.yunohost.php index a03c16f..41849cf 100644 --- a/conf/config.local.yunohost.php +++ b/conf/config.local.yunohost.php @@ -10,7 +10,7 @@ */ // Nécessaire pour situer les constantes dans le bon namespace -namespace Paheko; +namespace Garradin; /** * Clé secrète, doit être unique à chaque instance de Garradin diff --git a/doc/PRE_UPGRADE.d/1.3.0.md b/doc/PRE_UPGRADE.d/1.3.0.md deleted file mode 100644 index 1225343..0000000 --- a/doc/PRE_UPGRADE.d/1.3.0.md +++ /dev/null @@ -1 +0,0 @@ -We should encourage people to have a look at the Changelog: https://fossil.kd2.org/paheko/wiki?name=Changelog/1.3 when upgrading to this version because there are major changes. If you have installed some plugins, not all will be compatibles. diff --git a/doc/PRE_UPGRADE.d/1.3.0_fr.md b/doc/PRE_UPGRADE.d/1.3.0_fr.md deleted file mode 100644 index 0a3914b..0000000 --- a/doc/PRE_UPGRADE.d/1.3.0_fr.md +++ /dev/null @@ -1 +0,0 @@ -Nous vous encourageons à consulter le Journal des modifications: https://fossil.kd2.org/paheko/wiki?name=Changelog/1.3 avant de passer à cette version, car il y a des changements majeurs. Si vous avez installé des extensions, elles ne seront pas toutes compatibles. From d6a26a5fb4cf89afe7b4af9e0dc2a5b2e784f8a4 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Fri, 8 Sep 2023 04:37:00 +0200 Subject: [PATCH 04/45] Update ADMIN.md --- doc/ADMIN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 3d98559..7b6bf2e 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,5 +1,5 @@ ## Custom configurations -If you wish, you can add personal costum configurations by editing the `/var/www/paheko/config.local.user.php` file. To see the possibilities, you can read the `/var/www/paheko/config.dist.php` file first. +If you wish, you can add personal costum configurations by editing the `__INSTALL_DIR__/config.local.user.php` file. To see the possibilities, you can read the `__INSTALL_DIR__/config.dist.php` file first. From a81a848a253805fefd6d0689153674d199b7eaf4 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Fri, 8 Sep 2023 04:37:24 +0200 Subject: [PATCH 05/45] Update ADMIN_fr.md --- doc/ADMIN_fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 91f7512..e6e0e37 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,4 +1,4 @@ ## Configurations personnelles -Vous pouvez si vous le souhaitez ajouter des configurations personnelles en éditant le fichier `/var/www/paheko/config.local.user.php`. -Pour voir les possibilités vous pouvez lire auparavant le fichier `/var/www/paheko/config.dist.php`. +Vous pouvez si vous le souhaitez ajouter des configurations personnelles en éditant le fichier `__INSTALL_DIR__/config.local.user.php`. +Pour voir les possibilités vous pouvez lire auparavant le fichier `__INSTALL_DIR__/config.dist.php`. From f57f1284b4521f69a801abcb4f59d28829445eb3 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Fri, 8 Sep 2023 09:22:57 +0200 Subject: [PATCH 06/45] Update upgrade naamespace keep with Garradin until 1.3 release changes --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9a35983..94a536b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,7 +71,7 @@ if ynh_compare_current_package_version --comparison lt --version 1.1.15~ynh1; th chmod 750 "$install_dir/config.local.user.php" ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.user.php" fi -if ynh_compare_current_package_version --comparison le --version 1.2.9~ynh1; then +if ynh_compare_current_package_version --comparison le --version 1.2.12~ynh1; then ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$install_dir/config.local.user.php" fi ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" From 66ca9dd00b2baa7da4e760a5682ecf198e2fc783 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Sat, 9 Sep 2023 16:19:43 +0200 Subject: [PATCH 07/45] Update manifest.toml repo not hosted on github Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com> --- manifest.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 41b5e53..d07b556 100644 --- a/manifest.toml +++ b/manifest.toml @@ -44,7 +44,6 @@ ram.runtime = "50M" [resources.sources.main] url = "https://fossil.kd2.org/paheko/uv/paheko-1.2.11.tar.gz" sha256 = "9d8a505d9165c38ee0d262316ba636536ebddf0a6127b2e731bc231fe053f28d" - autoupdate.strategy = "latest_github_tag" [resources.system_user] From 1f8723b36124eacf94a5415e9f3df8b0c9da3e2a Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sat, 9 Sep 2023 16:24:07 +0200 Subject: [PATCH 08/45] Update doc/ADMIN.md Co-authored-by: Alexandre Aubin --- doc/ADMIN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 7b6bf2e..1984b74 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,5 +1,5 @@ ## Custom configurations -If you wish, you can add personal costum configurations by editing the `__INSTALL_DIR__/config.local.user.php` file. To see the possibilities, you can read the `__INSTALL_DIR__/config.dist.php` file first. +If you wish, you can add personal custom configurations by editing the `__INSTALL_DIR__/config.local.user.php` file. To see the possibilities, you can read the `__INSTALL_DIR__/config.dist.php` file first. From 7b3856db2dd75895e4fd21b936231d05e27167e6 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 18:20:16 +0200 Subject: [PATCH 09/45] Update upgrade keep namespace Garradin in this 1.2 version --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 94a536b..737c00d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,7 +71,7 @@ if ynh_compare_current_package_version --comparison lt --version 1.1.15~ynh1; th chmod 750 "$install_dir/config.local.user.php" ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.user.php" fi -if ynh_compare_current_package_version --comparison le --version 1.2.12~ynh1; then +if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh1; then ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$install_dir/config.local.user.php" fi ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" From c46b42e05d0d7289356b6e2c51df599c0f586d2e Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 18:21:17 +0200 Subject: [PATCH 10/45] Update manifest.toml Keep namesapce Garradin on this 1.2 version --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index d07b556..a41f0ed 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paheko" description.en = "Software to manage association" description.fr = "Logiciel libre de gestion d'association" -version = "1.2.11~ynh1" +version = "1.2.11~ynh2" maintainers = ["rodinux"] From f243e3424d4f2ae1ea4a7eb63e4eb68e533fde5e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 12 Sep 2023 16:21:22 +0000 Subject: [PATCH 11/45] 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 809a714..6e81c17 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Paheko (we chose the name Paheko, a word from the Māori language meaning "to co It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc.. -**Shipped version:** 1.2.11~ynh1 +**Shipped version:** 1.2.11~ynh2 **Demo:** https://paheko.cloud/essai/ diff --git a/README_fr.md b/README_fr.md index d48058e..0413e11 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ Paheko (Nous avons choisi le nom Paheko, un mot de la langue Māori qui signifie ![Logo Paheko](https://master.garradin.eu/garradin-devient-paheko/logo_v3_small-fs8.png) -**Version incluse :** 1.2.11~ynh1 +**Version incluse :** 1.2.11~ynh2 **Démo :** https://paheko.cloud/essai/ From a978d619b8e2d27e0df8754d6d23fa592340315d Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 18:39:51 +0200 Subject: [PATCH 12/45] Update upgrade keep namespace Garradin; --- scripts/upgrade | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 737c00d..2e9d63c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,12 +71,11 @@ if ynh_compare_current_package_version --comparison lt --version 1.1.15~ynh1; th chmod 750 "$install_dir/config.local.user.php" ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.user.php" fi -if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh1; then +if ynh_compare_current_package_version --comparison ge --version 1.3.0~ynh1; then ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$install_dir/config.local.user.php" fi -ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" -ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php" # NOTE: Don't overwrite config.local.user.php +ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" # Permissions on files and directories chmod -R o-rwx "$install_dir" From b0c31f30f6e145a7b2cbe8e04f0875f3ec22075c Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 18:54:05 +0200 Subject: [PATCH 13/45] Update upgrade need keep this file --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 2e9d63c..ecb1f5f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,6 +76,7 @@ if ynh_compare_current_package_version --comparison ge --version 1.3.0~ynh1; the fi # NOTE: Don't overwrite config.local.user.php ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" +ynh_add_config --template="config.user.local.php" --destination="$install_dir/config.local.php" # Permissions on files and directories chmod -R o-rwx "$install_dir" From f607f88650a4fefc53f5e9a71382e9c92165c78d Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 19:02:13 +0200 Subject: [PATCH 14/45] Update upgrade we nned keep these files --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 2e9d63c..0c6071e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,6 +76,7 @@ if ynh_compare_current_package_version --comparison ge --version 1.3.0~ynh1; the fi # NOTE: Don't overwrite config.local.user.php ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" +ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.user.php" # Permissions on files and directories chmod -R o-rwx "$install_dir" From d080f445e52d541da6002e94d76661adebe98b71 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 19:23:49 +0200 Subject: [PATCH 15/45] Update upgrade fix update --- scripts/upgrade | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ecb1f5f..10950a4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -71,9 +71,7 @@ if ynh_compare_current_package_version --comparison lt --version 1.1.15~ynh1; th chmod 750 "$install_dir/config.local.user.php" ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.user.php" fi -if ynh_compare_current_package_version --comparison ge --version 1.3.0~ynh1; then - ynh_replace_string --match_string="namespace Garradin;" --replace_string="namespace Paheko;" --target_file="$install_dir/config.local.user.php" -fi + # NOTE: Don't overwrite config.local.user.php ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" ynh_add_config --template="config.user.local.php" --destination="$install_dir/config.local.php" From 5d9c822f67fc029b91017f4b0231d5217c0fd9eb Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 19:24:45 +0200 Subject: [PATCH 16/45] Update manifest.toml fix update --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index a41f0ed..32f4396 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paheko" description.en = "Software to manage association" description.fr = "Logiciel libre de gestion d'association" -version = "1.2.11~ynh2" +version = "1.2.11~ynh3" maintainers = ["rodinux"] From 4b496fd510d90638aa2e4202ae715505268b460b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 12 Sep 2023 17:24:49 +0000 Subject: [PATCH 17/45] 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 6e81c17..4c6b308 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Paheko (we chose the name Paheko, a word from the Māori language meaning "to co It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc.. -**Shipped version:** 1.2.11~ynh2 +**Shipped version:** 1.2.11~ynh3 **Demo:** https://paheko.cloud/essai/ diff --git a/README_fr.md b/README_fr.md index 0413e11..f5c11f9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ Paheko (Nous avons choisi le nom Paheko, un mot de la langue Māori qui signifie ![Logo Paheko](https://master.garradin.eu/garradin-devient-paheko/logo_v3_small-fs8.png) -**Version incluse :** 1.2.11~ynh2 +**Version incluse :** 1.2.11~ynh3 **Démo :** https://paheko.cloud/essai/ From 0a338c35fdf1bde6bffba35a3841cf64e0fef48d Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 19:27:57 +0200 Subject: [PATCH 18/45] Update upgrade correct name template --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 10950a4..15f320d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,7 +74,7 @@ fi # NOTE: Don't overwrite config.local.user.php ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" -ynh_add_config --template="config.user.local.php" --destination="$install_dir/config.local.php" +ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.php" # Permissions on files and directories chmod -R o-rwx "$install_dir" From 391e3fbb6df748efb9383d7c31fa789c5090f136 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 19:55:10 +0200 Subject: [PATCH 19/45] Update upgrade add good template --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 15f320d..f48915c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,7 +74,7 @@ fi # NOTE: Don't overwrite config.local.user.php ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" -ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.php" +ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.yunohost.php" # Permissions on files and directories chmod -R o-rwx "$install_dir" From 2160f9d7784ea247f8af726f330b3ad3d21e1e25 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 19:56:38 +0200 Subject: [PATCH 20/45] Update upgrade good template to keep --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0c6071e..0973a0a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,7 +76,7 @@ if ynh_compare_current_package_version --comparison ge --version 1.3.0~ynh1; the fi # NOTE: Don't overwrite config.local.user.php ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" -ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.user.php" +ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php" # Permissions on files and directories chmod -R o-rwx "$install_dir" From 3c548ed22175a9a9b9c67df3976c8f6ee3fe96b0 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 20:18:18 +0200 Subject: [PATCH 21/45] Update upgrade try a --full_replace=1 --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index f48915c..8293fd8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,7 +38,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="association.sqlite squelettes/ data/ skel-dist/ config.local.user.php" + ynh_setup_source --dest_dir="$install_dir" --keep="association.sqlite squelettes data skel-dist config.local.user.php" --full_replace=1 fi chmod -R o-rwx "$install_dir" From 2aaa7c9320599384c603d45d1b23be451052adb3 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 12 Sep 2023 22:17:21 +0200 Subject: [PATCH 22/45] Update upgrade syntax error --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 8293fd8..fefd537 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,7 +74,7 @@ fi # NOTE: Don't overwrite config.local.user.php ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" -ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.yunohost.php" +ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php" # Permissions on files and directories chmod -R o-rwx "$install_dir" From b3081bac7c906ac17b3171e75c88913e6b3929c5 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Wed, 13 Sep 2023 22:09:26 +0200 Subject: [PATCH 23/45] Update upgrade squelettes don't exist anymore since 1.1 --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index fefd537..6f3e934 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,7 +38,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="association.sqlite squelettes data skel-dist config.local.user.php" --full_replace=1 + ynh_setup_source --dest_dir="$install_dir" --keep="association.sqlite data config.local.user.php" --full_replace=1 fi chmod -R o-rwx "$install_dir" From 9ac23b6e6c281432921f88062ab1dc0e765e79f9 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Wed, 13 Sep 2023 22:23:26 +0200 Subject: [PATCH 24/45] Update upgrade --- scripts/upgrade | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 6f3e934..35af4c2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,6 +29,15 @@ if [[ -z "${secret_key:-}" ]]; then ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key fi +#================================================= +# BACKUP SQLITE DATABASE +#================================================= +ynh_script_progression --message="Backup of the DB in temporary file...." --weight=5 + +if [ -f "$install_dir/data/association.sqlite" ];then +cp -a $install_dir/data/association.sqlite /tmp/ +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -76,6 +85,11 @@ fi ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php" +# Restore the sqlite DB +if [ -f "/tmp/association.sqlite" ];then +mv /tmp/association.sqlite $install_dir/data +fi + # Permissions on files and directories chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" From d69d90d0c754c867722834d9738de46cb003e45d Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Wed, 13 Sep 2023 22:45:58 +0200 Subject: [PATCH 25/45] Update manifest.toml correct backup bdd and data --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 32f4396..0264ed4 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paheko" description.en = "Software to manage association" description.fr = "Logiciel libre de gestion d'association" -version = "1.2.11~ynh3" +version = "1.2.11~ynh4" maintainers = ["rodinux"] From 9628452513e493f31e3e4b431c57dede19e85429 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 13 Sep 2023 20:46:02 +0000 Subject: [PATCH 26/45] 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 4c6b308..e741c83 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Paheko (we chose the name Paheko, a word from the Māori language meaning "to co It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc.. -**Shipped version:** 1.2.11~ynh3 +**Shipped version:** 1.2.11~ynh4 **Demo:** https://paheko.cloud/essai/ diff --git a/README_fr.md b/README_fr.md index f5c11f9..4595c62 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ Paheko (Nous avons choisi le nom Paheko, un mot de la langue Māori qui signifie ![Logo Paheko](https://master.garradin.eu/garradin-devient-paheko/logo_v3_small-fs8.png) -**Version incluse :** 1.2.11~ynh3 +**Version incluse :** 1.2.11~ynh4 **Démo :** https://paheko.cloud/essai/ From 218805413f2cd00a6b532bfea6b4c141e44da84a Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Sat, 16 Sep 2023 09:41:20 +0200 Subject: [PATCH 27/45] Clean backup data upgrade --- scripts/upgrade | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 35af4c2..2c2a21e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,9 +34,8 @@ fi #================================================= ynh_script_progression --message="Backup of the DB in temporary file...." --weight=5 -if [ -f "$install_dir/data/association.sqlite" ];then -cp -a $install_dir/data/association.sqlite /tmp/ -fi +# copy data directory bacckup +cp -a $install_dir/data /tmp/data #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -85,10 +84,8 @@ fi ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php" -# Restore the sqlite DB -if [ -f "/tmp/association.sqlite" ];then -mv /tmp/association.sqlite $install_dir/data -fi +# Sync data directory backup +rsync -R /tmp/data/ $install_dir/data/ # Permissions on files and directories chmod -R o-rwx "$install_dir" @@ -115,6 +112,6 @@ sleep 5 # END OF SCRIPT #================================================= # remove directory duplicated -ynh_secure_remove --file="$install_dir/data/data" +ynh_secure_remove --file="/tmp/data" ynh_script_progression --message="Upgrade of $app completed" --last From c8d6fbdbe8e901ff2cd3661d291fb911ddca40bf Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Sat, 16 Sep 2023 09:52:34 +0200 Subject: [PATCH 28/45] cleaning code upgrade --- scripts/upgrade | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2c2a21e..614bab4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,11 +30,11 @@ if [[ -z "${secret_key:-}" ]]; then fi #================================================= -# BACKUP SQLITE DATABASE +# BACKUP SQLITE DATABASE AND DATAS #================================================= ynh_script_progression --message="Backup of the DB in temporary file...." --weight=5 -# copy data directory bacckup +# copy data directory backup cp -a $install_dir/data /tmp/data #================================================= @@ -84,9 +84,19 @@ fi ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php" +#================================================= +# RESTORE BACKUP SQLITE DATABASE AND DATAS +#================================================= +ynh_script_progression --message="Restore datas..." --weight=5 + # Sync data directory backup rsync -R /tmp/data/ $install_dir/data/ +#================================================= +# FIX PERMISSIONS +#================================================= +ynh_script_progression --message="Fix permissions..." --weight=2 + # Permissions on files and directories chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -108,10 +118,11 @@ sleep 5 ynh_local_curl "/index.php" sleep 5 -#================================================= -# END OF SCRIPT -#================================================= # remove directory duplicated ynh_secure_remove --file="/tmp/data" +#================================================= +# END OF SCRIPT +#================================================= + ynh_script_progression --message="Upgrade of $app completed" --last From c22540cb1c84395b6ac79e3bc497d347d3c7d032 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Sat, 16 Sep 2023 09:53:44 +0200 Subject: [PATCH 29/45] Update manifest.toml fix this version for upgrade --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 0264ed4..7fa5c73 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Paheko" description.en = "Software to manage association" description.fr = "Logiciel libre de gestion d'association" -version = "1.2.11~ynh4" +version = "1.2.11~ynh5" maintainers = ["rodinux"] From 38f13283f3a4524d79bb9f69505f6ccc6d1a2a4d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 16 Sep 2023 07:53:47 +0000 Subject: [PATCH 30/45] 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 e741c83..6ff18f5 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Paheko (we chose the name Paheko, a word from the Māori language meaning "to co It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc.. -**Shipped version:** 1.2.11~ynh4 +**Shipped version:** 1.2.11~ynh5 **Demo:** https://paheko.cloud/essai/ diff --git a/README_fr.md b/README_fr.md index 4595c62..f0ee807 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ Paheko (Nous avons choisi le nom Paheko, un mot de la langue Māori qui signifie ![Logo Paheko](https://master.garradin.eu/garradin-devient-paheko/logo_v3_small-fs8.png) -**Version incluse :** 1.2.11~ynh4 +**Version incluse :** 1.2.11~ynh5 **Démo :** https://paheko.cloud/essai/ From 74cd032fef6d926bc3621895d89eb3985115aef0 Mon Sep 17 00:00:00 2001 From: rodinux Date: Mon, 18 Sep 2023 14:33:58 +0200 Subject: [PATCH 31/45] secure temporary directory for data --- scripts/upgrade | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 614bab4..840dfb3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,7 +35,8 @@ fi ynh_script_progression --message="Backup of the DB in temporary file...." --weight=5 # copy data directory backup -cp -a $install_dir/data /tmp/data +file=$(mktemp -d $app_dataXXX --suffix=BKP) +cp -a $install_dir/data /var/www/$file #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -90,7 +91,7 @@ ynh_add_config --template="config.local.yunohost.php" --destination="$install_di ynh_script_progression --message="Restore datas..." --weight=5 # Sync data directory backup -rsync -R /tmp/data/ $install_dir/data/ +rsync -R /var/www/$file/ $install_dir/data/ #================================================= # FIX PERMISSIONS @@ -119,7 +120,7 @@ ynh_local_curl "/index.php" sleep 5 # remove directory duplicated -ynh_secure_remove --file="/tmp/data" +ynh_secure_remove --file="/var/www/$file" #================================================= # END OF SCRIPT From 454a3de4ba0ef8791a1d23cd85935822ecfea9ac Mon Sep 17 00:00:00 2001 From: rodinux Date: Mon, 18 Sep 2023 20:30:41 +0200 Subject: [PATCH 32/45] fix secure temporally file for backup data folder --- scripts/upgrade | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 840dfb3..08ae68e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,8 +35,8 @@ fi ynh_script_progression --message="Backup of the DB in temporary file...." --weight=5 # copy data directory backup -file=$(mktemp -d $app_dataXXX --suffix=BKP) -cp -a $install_dir/data /var/www/$file +tmp_data_backup=$(mktemp -d) +rsync -a $install_dir/data/ $tmp_data_backup/ #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -91,7 +91,7 @@ ynh_add_config --template="config.local.yunohost.php" --destination="$install_di ynh_script_progression --message="Restore datas..." --weight=5 # Sync data directory backup -rsync -R /var/www/$file/ $install_dir/data/ +rsync -a $tmp_data_backup/ $install_dir/data/ #================================================= # FIX PERMISSIONS @@ -119,8 +119,8 @@ sleep 5 ynh_local_curl "/index.php" sleep 5 -# remove directory duplicated -ynh_secure_remove --file="/var/www/$file" +# remove data directory backup +ynh_secure_remove --file="$tmp_data_backup" #================================================= # END OF SCRIPT From 5fb2427c9315f0bb72c65872c86835709bdbe67c Mon Sep 17 00:00:00 2001 From: rodinux Date: Mon, 18 Sep 2023 20:44:46 +0200 Subject: [PATCH 33/45] keep only the file for config.local.user.php --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 08ae68e..4b99aab 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,7 +47,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="association.sqlite data config.local.user.php" --full_replace=1 + ynh_setup_source --dest_dir="$install_dir" --keep="config.local.user.php" --full_replace=1 fi chmod -R o-rwx "$install_dir" From 01d57e29832e49baa7bdb4632322ed59ac85c9df Mon Sep 17 00:00:00 2001 From: rodinux Date: Mon, 18 Sep 2023 22:09:52 +0200 Subject: [PATCH 34/45] try also keep the file config.local.user.php --- conf/config.local.php | 2 +- conf/config.local.yunohost.php | 2 +- scripts/install | 4 ++-- scripts/restore | 5 +++++ scripts/upgrade | 13 +++++++++---- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/conf/config.local.php b/conf/config.local.php index 0080731..11a00bf 100644 --- a/conf/config.local.php +++ b/conf/config.local.php @@ -6,4 +6,4 @@ * Pour ajouter vos configurations personnalisées, rendez-vous dans le fichier config.local.user.php */ require '__INSTALL_DIR__/config.local.yunohost.php'; -require '__INSTALL_DIR__/config.local.user.php'; +require '__INSTALL_DIR__/data/config.local.user.php'; diff --git a/conf/config.local.yunohost.php b/conf/config.local.yunohost.php index 41849cf..3cd4e76 100644 --- a/conf/config.local.yunohost.php +++ b/conf/config.local.yunohost.php @@ -5,7 +5,7 @@ * * Ce fichier sera mis à jour à chaque nouvelle version de Yunohost * - * Pour ajouter vos configurations personnalisées, rendez-vous dans le fichier config.local.user.php + * Pour ajouter vos configurations personnalisées, rendez-vous dans le fichier data/config.local.user.php * */ diff --git a/scripts/install b/scripts/install index d76907c..eaf582e 100644 --- a/scripts/install +++ b/scripts/install @@ -50,7 +50,7 @@ ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key # Install configuration files ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" ynh_add_config --template="config.local.yunohost.php" --destination="$install_dir/config.local.yunohost.php" -ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.user.php" +ynh_add_config --template="config.local.user.php" --destination="$install_dir/data/config.local.user.php" # Permissions on files and directories chmod -R o-rwx "$install_dir" @@ -61,7 +61,7 @@ find "$install_dir/data" -type d -exec chmod 770 {} + find "$install_dir/data" -type f -exec chmod 660 {} + chmod 440 "$install_dir/config.local.php" chmod 440 "$install_dir/config.local.yunohost.php" -chmod 660 "$install_dir/config.local.user.php" +chmod 660 "$install_dir/data/config.local.user.php" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index c1ab315..dc0c5de 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,7 +26,12 @@ find "$install_dir/data" -type d -exec chmod 770 {} + find "$install_dir/data" -type f -exec chmod 660 {} + chmod 440 "$install_dir/config.local.php" chmod 440 "$install_dir/config.local.yunohost.php" + +if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh4; then chmod 660 "$install_dir/config.local.user.php" +else +chmod 660 "$install_dir/data/config.local.user.php" +fi #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 4b99aab..417f46d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,14 +30,19 @@ if [[ -z "${secret_key:-}" ]]; then fi #================================================= -# BACKUP SQLITE DATABASE AND DATAS +# BACKUP DATABASE, DATAS AND CONFIG LOCAL USER #================================================= ynh_script_progression --message="Backup of the DB in temporary file...." --weight=5 + # copy data directory backup tmp_data_backup=$(mktemp -d) rsync -a $install_dir/data/ $tmp_data_backup/ +if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh4; then + mv $install_dir/config.local.user.php $tmp_data_backup/ +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -47,7 +52,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=5 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config.local.user.php" --full_replace=1 + ynh_setup_source --dest_dir="$install_dir" --full_replace=1 fi chmod -R o-rwx "$install_dir" @@ -78,7 +83,7 @@ ynh_script_progression --message="Updating a configuration file..." --weight=5 if ynh_compare_current_package_version --comparison lt --version 1.1.15~ynh1; then chmod 750 "$install_dir/config.local.user.php" - ynh_add_config --template="config.local.user.php" --destination="$install_dir/config.local.user.php" + ynh_add_config --template="config.local.user.php" --destination="$install_dir/data/config.local.user.php" fi # NOTE: Don't overwrite config.local.user.php @@ -107,7 +112,7 @@ find "$install_dir/data" -type d -exec chmod 770 {} + find "$install_dir/data" -type f -exec chmod 660 {} + chmod 440 "$install_dir/config.local.php" chmod 440 "$install_dir/config.local.yunohost.php" -chmod 660 "$install_dir/config.local.user.php" +chmod 660 "$install_dir/data/config.local.user.php" #================================================= # FINALISE UPGRADE From dc90c24f609f79c70404c335636ea8d937b5d8a4 Mon Sep 17 00:00:00 2001 From: rodinux Date: Tue, 19 Sep 2023 09:14:43 +0200 Subject: [PATCH 35/45] ready to merge --- conf/config.local.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/config.local.php b/conf/config.local.php index 11a00bf..8fb3a75 100644 --- a/conf/config.local.php +++ b/conf/config.local.php @@ -3,7 +3,7 @@ /** * NE PAS MODIFIER CE FICHIER. Il est regénéré automatiquement à chaque mise à jour de Yunohost * - * Pour ajouter vos configurations personnalisées, rendez-vous dans le fichier config.local.user.php + * Pour ajouter vos configurations personnalisées, rendez-vous dans le fichier data/config.local.user.php */ require '__INSTALL_DIR__/config.local.yunohost.php'; require '__INSTALL_DIR__/data/config.local.user.php'; From 95e251271c2d4b7678bc30930c63447f3d1554d0 Mon Sep 17 00:00:00 2001 From: rodinux Date: Tue, 19 Sep 2023 10:03:52 +0200 Subject: [PATCH 36/45] correct varaible for YNH_APP_CURRENT_VERSION --- scripts/restore | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index dc0c5de..f1954e1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,7 +27,7 @@ find "$install_dir/data" -type f -exec chmod 660 {} + chmod 440 "$install_dir/config.local.php" chmod 440 "$install_dir/config.local.yunohost.php" -if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh4; then +if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh1; then chmod 660 "$install_dir/config.local.user.php" else chmod 660 "$install_dir/data/config.local.user.php" diff --git a/scripts/upgrade b/scripts/upgrade index 417f46d..dcf2bf2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ ynh_script_progression --message="Backup of the DB in temporary file...." --weig tmp_data_backup=$(mktemp -d) rsync -a $install_dir/data/ $tmp_data_backup/ -if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh4; then +if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh1; then mv $install_dir/config.local.user.php $tmp_data_backup/ fi From 01de0e7c06324c540f58a5c48af7290e8dfb7f8b Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 19 Sep 2023 17:58:07 +0200 Subject: [PATCH 37/45] version for comparison --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index f1954e1..dc0c5de 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,7 +27,7 @@ find "$install_dir/data" -type f -exec chmod 660 {} + chmod 440 "$install_dir/config.local.php" chmod 440 "$install_dir/config.local.yunohost.php" -if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh1; then +if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh4; then chmod 660 "$install_dir/config.local.user.php" else chmod 660 "$install_dir/data/config.local.user.php" From 17d68b59bba19705973fd8c30a0556c6d99fe92a Mon Sep 17 00:00:00 2001 From: rodinux Date: Tue, 19 Sep 2023 18:01:14 +0200 Subject: [PATCH 38/45] try fix comparison version existing --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index dcf2bf2..417f46d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ ynh_script_progression --message="Backup of the DB in temporary file...." --weig tmp_data_backup=$(mktemp -d) rsync -a $install_dir/data/ $tmp_data_backup/ -if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh1; then +if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh4; then mv $install_dir/config.local.user.php $tmp_data_backup/ fi From b616fa00463110f52de3666d0363fab8b71f0670 Mon Sep 17 00:00:00 2001 From: rodinux Date: Tue, 19 Sep 2023 18:27:06 +0200 Subject: [PATCH 39/45] mv when needed config.local.user.php --- scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/restore b/scripts/restore index dc0c5de..bf5d4cf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,8 +27,8 @@ find "$install_dir/data" -type f -exec chmod 660 {} + chmod 440 "$install_dir/config.local.php" chmod 440 "$install_dir/config.local.yunohost.php" -if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh4; then -chmod 660 "$install_dir/config.local.user.php" +if [[ $install_dir/config.local.user.php -f ]]; then +chmod 660 $install_dir/config.local.user.php else chmod 660 "$install_dir/data/config.local.user.php" fi diff --git a/scripts/upgrade b/scripts/upgrade index 417f46d..761d225 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,8 +39,8 @@ ynh_script_progression --message="Backup of the DB in temporary file...." --weig tmp_data_backup=$(mktemp -d) rsync -a $install_dir/data/ $tmp_data_backup/ -if ynh_compare_current_package_version --comparison le --version 1.2.11~ynh4; then - mv $install_dir/config.local.user.php $tmp_data_backup/ +if [[ $install_dir/config.local.user.php -f ]]; then + cp -a $install_dir/config.local.user.php $tmp_data_backup/ fi #================================================= From 7e1f23973b29398311b2222c0bd0cb7686141478 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Tue, 19 Sep 2023 18:33:08 +0200 Subject: [PATCH 40/45] add quotes --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index bf5d4cf..95a920e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -28,7 +28,7 @@ chmod 440 "$install_dir/config.local.php" chmod 440 "$install_dir/config.local.yunohost.php" if [[ $install_dir/config.local.user.php -f ]]; then -chmod 660 $install_dir/config.local.user.php +chmod 660 "$install_dir/config.local.user.php" else chmod 660 "$install_dir/data/config.local.user.php" fi From db2c97fbccbcdaea586a8189d8f82a3b2f4d5df5 Mon Sep 17 00:00:00 2001 From: rodinux Date: Tue, 19 Sep 2023 19:45:33 +0200 Subject: [PATCH 41/45] mfix needed config.local.user.php change place --- scripts/restore | 4 +--- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/restore b/scripts/restore index 95a920e..be63aa6 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,10 +27,8 @@ find "$install_dir/data" -type f -exec chmod 660 {} + chmod 440 "$install_dir/config.local.php" chmod 440 "$install_dir/config.local.yunohost.php" -if [[ $install_dir/config.local.user.php -f ]]; then +if [ -f "$install_dir/config.local.user.php" ]; then chmod 660 "$install_dir/config.local.user.php" -else -chmod 660 "$install_dir/data/config.local.user.php" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 761d225..d5035cc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ ynh_script_progression --message="Backup of the DB in temporary file...." --weig tmp_data_backup=$(mktemp -d) rsync -a $install_dir/data/ $tmp_data_backup/ -if [[ $install_dir/config.local.user.php -f ]]; then +if [ -f "$install_dir/config.local.user.php" ]; then cp -a $install_dir/config.local.user.php $tmp_data_backup/ fi From f443760a510b468b2b92abfa307987e04afe59ad Mon Sep 17 00:00:00 2001 From: rodinux Date: Wed, 20 Sep 2023 00:03:36 +0200 Subject: [PATCH 42/45] remove old duplicated files unused --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index d5035cc..73600b3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -127,6 +127,11 @@ sleep 5 # remove data directory backup ynh_secure_remove --file="$tmp_data_backup" +# clean duplicate folder if exist +if [ -d "$install_dir/data/data" ] + ynh_secure_remove --file="$install_dir/data/data" +fi + #================================================= # END OF SCRIPT #================================================= From 71abb097aa0ed5e0faec1fed3a58b42fd2d3ae30 Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Wed, 20 Sep 2023 14:50:20 +0200 Subject: [PATCH 43/45] Update upgrade if need then --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 73600b3..ee93427 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,7 +128,7 @@ sleep 5 ynh_secure_remove --file="$tmp_data_backup" # clean duplicate folder if exist -if [ -d "$install_dir/data/data" ] +if [ -d "$install_dir/data/data" ], then ynh_secure_remove --file="$install_dir/data/data" fi From fa6808021a9121c451e328f9723c870c97d9294a Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Wed, 20 Sep 2023 14:51:09 +0200 Subject: [PATCH 44/45] Update upgrade if need then, bash conditions --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ee93427..534cee4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,7 +128,7 @@ sleep 5 ynh_secure_remove --file="$tmp_data_backup" # clean duplicate folder if exist -if [ -d "$install_dir/data/data" ], then +if [ -d "$install_dir/data/data" ]; then ynh_secure_remove --file="$install_dir/data/data" fi From eaf06241c49355991b1e9c4d6636d5db60b1741e Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Wed, 20 Sep 2023 19:33:30 +0200 Subject: [PATCH 45/45] Update upgrade remove file unused if exist --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 534cee4..1708bd2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,6 +132,11 @@ if [ -d "$install_dir/data/data" ]; then ynh_secure_remove --file="$install_dir/data/data" fi +# clean unused file if exist +if [[ -f "$install_dir/config.local.user.php" ]]; then + ynh_secure_remove --file="$install_dir/config.local.user.php" +fi + #================================================= # END OF SCRIPT #=================================================