From 754fbecd4a20f815fab96524551243cde4da2020 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 3 Dec 2023 17:19:11 +0100 Subject: [PATCH 01/10] version 1.3.4 --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 1f40862..76e32fb 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ SOURCE_URL=https://github.com/maniackcrudelis/archivist/archive/refs/tags/v1.3.3.tar.gz -SOURCE_SUM=30fc33e5091f7e388004324da5f43b067ccb69e522a12ca298a2d969688094ee +SOURCE_SUM=97df967d79ee2acd0bfae929a9feccea4df0f5943f14101a20a066470142fe89 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true From 5ae052792fd01c10ad7fa353ffb78e8b420861e0 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 30 Dec 2023 09:40:47 +0100 Subject: [PATCH 02/10] use right version name --- conf/app.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index 76e32fb..7f451f6 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,4 +1,4 @@ -SOURCE_URL=https://github.com/maniackcrudelis/archivist/archive/refs/tags/v1.3.3.tar.gz +SOURCE_URL=https://github.com/maniackcrudelis/archivist/archive/refs/tags/v1.3.4.tar.gz SOURCE_SUM=97df967d79ee2acd0bfae929a9feccea4df0f5943f14101a20a066470142fe89 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz From 2a8c75bd343753ce3ec162c701161f55566cddf9 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 30 Dec 2023 09:43:29 +0100 Subject: [PATCH 03/10] fix linter warnings --- scripts/install | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 5d822cd..e7c4a0f 100755 --- a/scripts/install +++ b/scripts/install @@ -181,8 +181,7 @@ ynh_use_logrotate # PRINT INFORMATION #================================================= -Informations=" -To add recipients or to modify the files or apps to backup, +Informations="To add recipients or to modify the files or apps to backup,\ please have a look to the config file $config_file" ynh_print_info --message="$Informations" @@ -192,10 +191,7 @@ ynh_print_info --message="$Informations" if [ "$encrypt" = "true" ] then - encrypt_message="Your password for encryption is '$encryption_pwd' - -" - + encrypt_message="Your password for encryption is '$encryption_pwd'" else encrypt_message="" fi From 98dfd4a1e45e28f1d4f7fd08a5e8530496ecab79 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 31 Dec 2023 12:14:27 +0100 Subject: [PATCH 04/10] bump version + YNH version --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 9259c95..cc9fb77 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Automatic backups", "fr": "Sauvegardes automatiques" }, - "version": "1.3.3~ynh1", + "version": "1.3.4~ynh1", "url": "https://github.com/maniackcrudelis/archivist", "upstream": { "license": "GPL-3.0", @@ -22,7 +22,7 @@ "email": "maniackc_dev@crudelis.fr" }], "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.2.9" }, "multi_instance": true, "services": [], From 2760718d6287b20436ed6b38510ac400cfffd148 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 31 Dec 2023 12:52:55 +0100 Subject: [PATCH 05/10] use boolean value --- scripts/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/config b/scripts/config index 97f4dff..97a69e2 100644 --- a/scripts/config +++ b/scripts/config @@ -124,7 +124,7 @@ apply_config() { #================================================= # Change the password if needed - if [ "$encrypt" = "1" ] + if [ "$encrypt" ] then ynh_print_OFF test -n "$encrypt_password" || ynh_die --message="The password for encryption can't be empty if you choose to enable encryption." From ce0ea695d4a4cff09b77bd2cb3438904012f7280 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 31 Dec 2023 11:52:59 +0000 Subject: [PATCH 06/10] 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 bc28408..f425656 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Archivist is automatically launched periodicaly to update your backups and send -**Shipped version:** 1.3.3~ynh1 +**Shipped version:** 1.3.4~ynh1 ## Disclaimers / important information ## Configuration diff --git a/README_fr.md b/README_fr.md index 3951bb1..bf61768 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ Vos sauvegardes peuvent être envoyées à de nombreux autres endroits, locaux o Archivist est automatiquement lancé périodiquement pour mettre à jour vos sauvegardes et envoyer les modifications aux autres emplacements. -**Version incluse :** 1.3.3~ynh1 +**Version incluse :** 1.3.4~ynh1 ## Avertissements / informations importantes ## Configuration From 44821c57380d2a72e79307af29738c2fc2036b46 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 31 Dec 2023 12:58:53 +0100 Subject: [PATCH 07/10] use boolean instead of 0/1 --- scripts/config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/config b/scripts/config index 97a69e2..046aa67 100644 --- a/scripts/config +++ b/scripts/config @@ -66,9 +66,9 @@ ynh_core_backup="${YNH_CONFIG_MAIN_BACKUP_TYPES_CORE_BACKUP:-$old_ynh_core_backu # ynh_app_backup if [ -n "$(get_config_value ynh_app_backup)" ] then - old_ynh_app_backup="1" + old_ynh_app_backup=true else - old_ynh_app_backup="0" + old_ynh_app_backup=false fi ynh_app_backup="${YNH_CONFIG_MAIN_BACKUP_TYPES_APPS_BACKUP:-$old_ynh_app_backup}" @@ -182,7 +182,7 @@ apply_config() { ynh_replace_string --match_string="^ynh_core_backup=.*" --replace_string="ynh_core_backup=$ynh_core_backup" --target_file="$config_file" # Change ynh_app_backup in the config file - if [ "$ynh_app_backup" = "1" ] && [ "$old_ynh_app_backup" = "0" ] + if [ "$ynh_app_backup" = true ] && [ "$old_ynh_app_backup" = false ] then # If ynh_app_backup changed from false to true. # Add all current applications to the backup @@ -191,7 +191,7 @@ apply_config() { ynh_print_info --message="Add a backup for the app $backup_app." ynh_replace_string --match_string="^ynh_app_backup=$" --replace_string="ynh_app_backup=$backup_app\n&" --target_file="$config_file" done <<< "$(yunohost app list -i | grep id: | sed 's/.*id: //')" - elif [ "$ynh_app_backup" = "0" ] && [ "$old_ynh_app_backup" = "1" ] + elif [ "$ynh_app_backup" = false ] && [ "$old_ynh_app_backup" = true ] then # Remove all app currently backup # By deleting all line starting by 'ynh_app_backup=' and having something after '=' From 44a9131835dbf3edc63213d330d2933a8620a3ba Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 31 Dec 2023 12:59:38 +0100 Subject: [PATCH 08/10] use booleans --- check_process | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index e0909d3..6d66784 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - encrypt=1 + encrypt=true encryption_pwd="password" - core_backup=1 - apps_backup=1 + core_backup=true + apps_backup=true frequency="Weekly" ; Checks pkg_linter=1 From 229b868f55a2f54b44a53fa3acd8f6a35fd79e35 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 31 Dec 2023 16:38:02 +0100 Subject: [PATCH 09/10] remove extra name key --- config_panel.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/config_panel.toml b/config_panel.toml index f6a516d..50b66c9 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -1,5 +1,4 @@ version = "1.0" -name = "Archivist configuration panel" [main] name = "Archivist configuration" From 7e1621c0dd519db7a7808cf55778e62124daeb71 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sun, 14 Jan 2024 10:00:55 +0100 Subject: [PATCH 10/10] Delete config_panel.toml https://github.com/YunoHost-Apps/archivist_ynh/pull/55#issuecomment-1890890277 #58 should fix this in the future --- config_panel.toml | 77 ----------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 config_panel.toml diff --git a/config_panel.toml b/config_panel.toml deleted file mode 100644 index 50b66c9..0000000 --- a/config_panel.toml +++ /dev/null @@ -1,77 +0,0 @@ -version = "1.0" - -[main] -name = "Archivist configuration" - - [main.encryption] - name = "Encryption" - - [main.encryption.encrypt] - ask = "Do you want to encrypt your backups ?" - type = "boolean" - default = true - - [main.encryption.encryption_pwd] - ask = "Set the password for encryption" - type = "password" - optional = true - help = "A password is needed if encryption is activated." - - [main.compression] - name = "Compression algorithm" - - [main.compression.ynh] - ask = "Choose the compression algorithm for YunoHost backups" - choices = ["gzip", "lzop", "zstd", "bzip2", "lzma", "lzip", "xz", "No compression"] - default = "gzip" - - [main.compression.files] - ask = "Choose the compression algorithm for files and directories backups" - choices = ["gzip", "lzop", "zstd", "bzip2", "lzma", "lzip", "xz", "No compression"] - default = "gzip" - - [main.backup_types] - name = "Backup" - - [main.backup_types.core_backup] - ask = "Would you like to backup your YunoHost core ?" - type = "boolean" - default = true - - [main.backup_types.apps_backup] - ask = "Would you like to backup your apps ?" - type = "boolean" - default = true - help = "WARNING: Changing this value will either remove backup for all apps or add all current apps to the backup." - - [main.backup_options] - name = "Backup options" - - [main.backup_options.frequency] - ask = "Choose the frequency of your backups ?" - choices = ["Daily", "Each 3 days", "Weekly", "Biweekly", "Monthly"] - default = "Weekly" - - [main.backup_options.max_size] - ask = "Max size for each backup in Mb" - type = "number" - default = 500 - help = "Specify the max size of each backup for the following option file_to_backup.
This option is a soft limit, that means the script will try to limit each backup to this max size if it can.
But there's 2 limitations, for a single directory, it can't makes more than one backup file, even if the files in this directory exceed this maximum size.
And, if there's some files in a directory, next to subdirectories, it'll make only one backup for this files.
So this limit will be applied to split the backup by its subdirectories to avoid to have only one big backup." - - [main.overwrite_files] - name = "Overwriting config files" - - [main.overwrite_files.overwrite_cron] - ask = "Overwrite the cron file during the upgrade ?" - type = "boolean" - default = true - help = "If the file is overwritten, a backup will be created." - - [main.global_config] - name = "Global configuration" - - [main.global_config.email_type] - ask = "Send HTML email to admin ?" - type = "boolean" - default = true - help = "Allow app scripts to send HTML mails instead of plain text."