From a6f6a77ac117b1f6fa984ea0fd8831f3d8850916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 29 Jul 2023 11:58:16 +0100 Subject: [PATCH] Testing (#107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 4.4.0 (#94) * 4.4.0 * Auto-update README * Apply example_ynh * Auto-update README * Update manifest.json * [autopatch] Add Common Platform Enumeration id to `manifest.json` (#99) * Upgrade (#98) * 4.4.0 (#94) * 4.4.0 * Auto-update README * Apply example_ynh * Auto-update README * Update manifest.json Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot * [autopatch] Add Common Platform Enumeration id to `manifest.json` Co-authored-by: yalh76 Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> * Auto-update README * Bullseye (#100) * Auto-update README * PHP shouldn't allow `array(foobar)` to work if foobar is undefined... * Upgrade to bullseye * Auto-update README * Auto-update README * Fix Co-authored-by: yunohost-bot Co-authored-by: Alexandre Aubin * set relative path for --keep opt * 4.5.0 * Auto-update README * Auto-update README * Fix PHP * Version 2 (#105) * v2 * Auto-update README * v2 * Auto-update README * Update upgrade --------- Co-authored-by: yunohost-bot * add crypt (#106) * add crypt * Update manifest.toml * Update install * cleaning * Auto-update README --------- Co-authored-by: yalh76 Co-authored-by: yunohost-bot Co-authored-by: YunoHost Bot Co-authored-by: Alexandre Aubin --- README.md | 2 +- README_fr.md | 2 +- conf/config.local.php | 2 +- config_panel.toml | 11 +++++++++++ doc/ADMIN.md | 4 +--- doc/ADMIN_fr.md | 4 +--- manifest.toml | 2 +- scripts/install | 3 +++ scripts/upgrade | 6 ++++++ 9 files changed, 26 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 96a47d5..126dcf5 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Jirafeau offers the possibility to host and share your files with ease. Choose a file, Jirafeau will provide you with a link with many options. It is possible to protect your links with a password as well as to choose how long the file will be kept on the server. The file and the link will self-destruct after this time. Downloads of transmitted files can be limited to a certain date, and each file can self-destruct after the first download. Jirafeau allows you to configure maximum retention times and maximum size per file. Encryption is available as an option. -**Shipped version:** 4.5.0~ynh1 +**Shipped version:** 4.5.0~ynh2 **Demo:** https://demo.yunohost.org/jirafeau/ diff --git a/README_fr.md b/README_fr.md index 61c9d4e..0515a78 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Jirafeau offre la possibilité d'héberger et de partager vos fichiers, le tout en toute simplicité. Choisissez un fichier, Jirafeau vous fournira un lien avec beaucoup d'options. Il est possible de protéger vos liens avec mot de passe ainsi que de choisir la durée de rétention du fichier sur le serveur. Le fichier et le lien s'autodétruiront passé ce délai. Les téléchargements des fichiers transmis peuvent être limités à une certaine date, et chaque fichier peut s'autodétruire après le premier téléchargement. Jirafeau permet de configurer les temps maximum de rétention ainsi que la taille maximale par fichier. Le chiffrement est disponible en option. -**Version incluse :** 4.5.0~ynh1 +**Version incluse :** 4.5.0~ynh2 **Démo :** https://demo.yunohost.org/jirafeau/ diff --git a/conf/config.local.php b/conf/config.local.php index 5d9833f..038428c 100644 --- a/conf/config.local.php +++ b/conf/config.local.php @@ -62,7 +62,7 @@ $cfg['preview'] = true; /* Enable the encryption feature * By enabling it, file-level deduplication won't work anymore. See FAQ. */ -$cfg['enable_crypt'] = false; +$cfg['enable_crypt'] = __ENABLE_CRYPT__; /* Length of link reference */ diff --git a/config_panel.toml b/config_panel.toml index 76063aa..165603d 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -3,6 +3,17 @@ version = "1.0" [main] name = "Jirafeau configuration" + [main.encrypt] + name = "Encryption feature" + + [main.encrypt.enable_crypt] + ask = "Enable the encryption feature" + type = "boolean" + yes = true + no = false + help = "By enabling encryption feature, file-level deduplication won't work anymore." + bind = "ENABLE_CRYPT:__INSTALL_DIR__/lib/config.local.php" + [main.php_fpm_config] name = "PHP-FPM configuration" diff --git a/doc/ADMIN.md b/doc/ADMIN.md index e05b4dc..ae32d51 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,9 +1,7 @@ -## Configuration - ### Changing the conditions of use of the service The license text on the "Terms of Service" page, which is shipped with the default installation, is "based on the Open Source Initiative Terms of Service". To change this text simply copy the file `/lib/tos.original.txt`, rename it to `/lib/tos.local.txt` and adapt it to your own needs. If you update the installation, then only the `tos.original.txt` file may change eventually, not your `tos.local.txt file`. -## Administration +### Administration To administer the files within Jirafeau it is enough to go to the address `__DOMAIN__/admin.php`. \ No newline at end of file diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index 69070fb..29e7548 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,9 +1,7 @@ -## Configuration - ### Changer les conditions d'utilisation du service Le texte de la licence sur la page "Conditions d'utilisation du service", qui est livrée avec l'installation par défaut, est basé sur les "Conditions d'utilisation du service de l'Initiative Open Source". Pour modifier ce texte, il suffit de copier le fichier `/lib/tos.original.txt`, de le renommer en `/lib/tos.local.txt` et de l'adapter à vos propres besoins. Si vous mettez à jour l'installation, alors seul le fichier `tos.original.txt` peut changer éventuellement, et non votre fichier `tos.local.txt`. -## Administration +### Administration Pour administrer les fichiers présents au sein de Jirafeau il suffit de se rendre à l'adresse `__DOMAIN__/admin.php`. \ No newline at end of file diff --git a/manifest.toml b/manifest.toml index c8925a6..7a35066 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Jirafeau" description.en = "Upload a file in a simple way and give a unique link to it" description.fr = "Hébergez simplement un fichier et partagez-le avec un lien unique" -version = "4.5.0~ynh1" +version = "4.5.0~ynh2" maintainers = [] diff --git a/scripts/install b/scripts/install index a128137..5b23b68 100755 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,8 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +enable_crypt="false" + fpm_footprint="low" fpm_free_footprint=0 fpm_usage="low" @@ -21,6 +23,7 @@ fpm_usage="low" # STORE SETTINGS FROM MANIFEST #================================================= +ynh_app_setting_set --app=$app --key=enable_crypt --value=$enable_crypt ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage diff --git a/scripts/upgrade b/scripts/upgrade index ce0cdae..854cc85 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,6 +22,12 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +# If enable_crypt doesn't exist, create it +if [ -z "${enable_crypt:-}" ]; then + enable_crypt=false + ynh_app_setting_set --app=$app --key=enable_crypt --value=$enable_crypt +fi + # If fpm_footprint doesn't exist, create it if [ -z "${fpm_footprint:-}" ]; then fpm_footprint=low