From ea470b1a1cc9aef7799c412d9956300bf03bb210 Mon Sep 17 00:00:00 2001 From: Thomas Rogeat Date: Wed, 25 Nov 2020 20:00:40 +0100 Subject: [PATCH 01/17] fix regexp for change_url script regexp was not working, needed to escape squared brackets. --- scripts/change_url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/change_url b/scripts/change_url index 18f18ff..126b57c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -80,7 +80,7 @@ fi #================================================= # Change domain name in parameters.yml -ynh_replace_string --match_string="\$cfg['web_root'] = .*" --replace_string="\$cfg['web_root'] = 'https://' . '$new_domain' . '${new_path%/}' . '/';" --target_file="$final_path/lib/config.local.php" +ynh_replace_string --match_string="\$cfg\['web_root'\] = .*" --replace_string="\$cfg['web_root'] = 'https://' . '$new_domain' . '${new_path%/}' . '/';" --target_file="$final_path/lib/config.local.php" #================================================= # GENERIC FINALISATION From 99262c9402fc33df5d52a9b88d8d1d52b3a9882c Mon Sep 17 00:00:00 2001 From: Kayou Date: Fri, 27 Nov 2020 18:03:32 +0100 Subject: [PATCH 02/17] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 4cfacff..b13a67d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Upload a file in a simple way and give a unique link to it", "fr": "Hébergez simplement un fichier et partagez-le avec un lien unique" }, - "version": "4.1.1~ynh3", + "version": "4.1.1~ynh4", "url": "https://gitlab.com/mojo42/Jirafeau", "license": "AGPL-3.0-only", "maintainer": { From 2ebad116353bd84471cf2688306968decf4f1a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 7 Dec 2020 18:26:18 +0100 Subject: [PATCH 03/17] Upgrade to version 4.2.0 (#80) * Upgrade to version 4.2.0 --- README.md | 2 +- README_fr.md | 4 ++-- check_process | 2 -- conf/app.src | 6 +++--- manifest.json | 2 +- scripts/upgrade | 7 ------- 6 files changed, 7 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 61815e9..24cd609 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to Jirafeau is a web site permitting to upload a file in a simple way and give an unique link to it. -**Shipped version:** 4.1.1 +**Shipped version:** 4.2.0 ## Screenshots diff --git a/README_fr.md b/README_fr.md index e5294d9..5dce478 100644 --- a/README_fr.md +++ b/README_fr.md @@ -12,7 +12,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Jirafeau est un site web permettant d'héberger et de partager des fichiers de manière simple en leur donnant un lien unique. -**Version incluse :** 4.1.1 +**Version incluse :** 4.2.0 ## Captures d'écran @@ -56,6 +56,6 @@ Merci de faire vos pull request sur la [branche testing](https://github.com/Yuno Pour essayer la branche testing, procédez comme suit. ``` sudo yunohost app install https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing --debug -or +ou sudo yunohost app upgrade jirafeau -u https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing --debug ``` diff --git a/check_process b/check_process index 3ba88e3..46b5c5f 100644 --- a/check_process +++ b/check_process @@ -19,8 +19,6 @@ incorrect_path=1 port_already_use=0 change_url=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=none diff --git a/conf/app.src b/conf/app.src index 3d97ab1..8de9343 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://gitlab.com/mojo42/Jirafeau/repository/4.1.1/archive.tar.gz -SOURCE_SUM=37f1754dfa3e8fc1ed81904a3dc33752 -SOURCE_SUM_PRG=md5sum +SOURCE_URL=https://gitlab.com/mojo42/Jirafeau/repository/4.2.0/archive.tar.gz +SOURCE_SUM=8ee7cb509c5e55c569514d9a168af819c93bd9bf48ee417d66aecdcdac49974e +SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_FILENAME= diff --git a/manifest.json b/manifest.json index b13a67d..8daa75c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Upload a file in a simple way and give a unique link to it", "fr": "Hébergez simplement un fichier et partagez-le avec un lien unique" }, - "version": "4.1.1~ynh4", + "version": "4.2.0~ynh1", "url": "https://gitlab.com/mojo42/Jirafeau", "license": "AGPL-3.0-only", "maintainer": { diff --git a/scripts/upgrade b/scripts/upgrade index 360e2ab..9b6b335 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -127,13 +127,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # STANDARD UPGRADE STEPS #================================================= From e3cb92d1397435eb5914078288e12101e61a50f9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 18 Dec 2020 10:05:52 +0100 Subject: [PATCH 04/17] Set badge to use svg --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 24cd609..1c78a7a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Jirafeau for YunoHost [![Integration level](https://dash.yunohost.org/integration/jirafeau.svg)](https://dash.yunohost.org/appci/app/jirafeau) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.maintain.svg) -[![Install Jirafeau with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jirafeau) +[![Install Jirafeau with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=jirafeau) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 5dce478..459c6ea 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # Jirafeau pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/jirafeau.svg)](https://dash.yunohost.org/appci/app/jirafeau) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.maintain.svg) -[![Installer Jirafeau avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jirafeau) +[![Installer Jirafeau avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=jirafeau) *[Read this readme in english.](./README.md)* From 19cfc9f46b1c8632c65b863f2fae6fdf082308ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 14 Feb 2021 11:27:24 +0100 Subject: [PATCH 05/17] Upgrade to 4.3.0 (#82) --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 1 - manifest.json | 4 ++-- pull_request_template.md | 12 ++---------- scripts/install | 5 +++-- scripts/upgrade | 5 +++-- 8 files changed, 14 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 1c78a7a..c42f7a1 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to Jirafeau is a web site permitting to upload a file in a simple way and give an unique link to it. -**Shipped version:** 4.2.0 +**Shipped version:** 4.3.0 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 459c6ea..4c8919d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -12,7 +12,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Jirafeau est un site web permettant d'héberger et de partager des fichiers de manière simple en leur donnant un lien unique. -**Version incluse :** 4.2.0 +**Version incluse :** 4.3.0 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 8de9343..e5786d4 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://gitlab.com/mojo42/Jirafeau/repository/4.2.0/archive.tar.gz -SOURCE_SUM=8ee7cb509c5e55c569514d9a168af819c93bd9bf48ee417d66aecdcdac49974e +SOURCE_URL=https://gitlab.com/mojo42/Jirafeau/repository/4.3.0/archive.tar.gz +SOURCE_SUM=435675a2b19d70155c5c3b1ee192582668f17696a040d8051bcdf9eea24dc1da SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index e5b517e..ecb2372 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -32,7 +32,6 @@ location __PATH__/ { deny all; } - location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; diff --git a/manifest.json b/manifest.json index 8daa75c..3581bff 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Upload a file in a simple way and give a unique link to it", "fr": "Hébergez simplement un fichier et partagez-le avec un lien unique" }, - "version": "4.2.0~ynh1", + "version": "4.3.0~ynh1", "url": "https://gitlab.com/mojo42/Jirafeau", "license": "AGPL-3.0-only", "maintainer": { @@ -19,7 +19,7 @@ "multi_instance": false, "services": [ "nginx", - "php7.0-fpm" + "php7.3-fpm" ], "arguments": { "install" : [ diff --git a/pull_request_template.md b/pull_request_template.md index c651d32..0a198cf 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -11,14 +11,6 @@ - [ ] Upgrade from last version tested. - [ ] Can be reviewed and tested. -## Validation +## Package_check results --- -*Minor decision* -- **Upgrade previous version** : -- [ ] **Code review** : -- [ ] **Approval (LGTM)** : -- [ ] **Approval (LGTM)** : -- **CI succeeded** : -[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/jirafeau_ynh%20PR-NUM-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/jirafeau_ynh%20PR-NUM-/) -*Please replace '-NUM-' in this link by the PR number.* -When the PR is marked as ready to merge, you have to wait for 3 days before really merging it. +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/install b/scripts/install index 19bde6f..aa9a32f 100755 --- a/scripts/install +++ b/scripts/install @@ -156,9 +156,10 @@ chmod -R 700 $var_root #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=2 +ynh_script_progression --message="Configuring permissions..." --weight=2 + +ynh_permission_update --permission="main" --add="visitors" -ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" if [ $is_public -eq 0 ] then domain_regex=$(echo "$domain" | sed 's@-@.@g') diff --git a/scripts/upgrade b/scripts/upgrade index 9b6b335..2709197 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -237,9 +237,10 @@ chmod -R 700 $var_root #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=2 +ynh_script_progression --message="Configuring permissions..." --weight=2 + +ynh_permission_update --permission="main" --add="visitors" -ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" if [ $is_public -eq 0 ] then domain_regex=$(echo "$domain" | sed 's@-@.@g') From 59eda9d9ea610cc50e888fa5d0d9734ee02bba22 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Feb 2021 22:48:45 +0100 Subject: [PATCH 06/17] Update check_process --- check_process | 1 - 1 file changed, 1 deletion(-) diff --git a/check_process b/check_process index 46b5c5f..6d53de5 100644 --- a/check_process +++ b/check_process @@ -16,7 +16,6 @@ upgrade=1 from_commit=48ed2dc5b80ed7f1ddd39a46917f993a8c4207d5 backup_restore=1 multi_instance=0 - incorrect_path=1 port_already_use=0 change_url=1 ;;; Options From bdea04f7a837fb19b702b2bd1f3d32d90446ffe2 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 26 Mar 2021 15:54:56 +0100 Subject: [PATCH 07/17] Fix tests --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 6d53de5..29e0b0d 100644 --- a/check_process +++ b/check_process @@ -2,7 +2,7 @@ ; Manifest domain="domain.tld" (DOMAIN) path="/path" (PATH) - admin_user="john" (USER) + admin_user="package_checker" (USER) upload_password="supersecretpassword" is_public=1 (PUBLIC|public=1|private=0) ; Checks @@ -25,4 +25,4 @@ Notification=none ; commit=48ed2dc5b80ed7f1ddd39a46917f993a8c4207d5 name=Refactoring and upgrade 3.3.0 manifest_arg=domain=DOMAIN&path=PATH&admin_user=USER&upload_password=supersecretpassword&is_public=1& - \ No newline at end of file + From 8fb4a61177e10cacbde0a134a8602e49efd23be7 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Fri, 26 Mar 2021 23:12:27 +0100 Subject: [PATCH 08/17] [autopatch] Missing ynh_abort_if_errors in change_url scripts (#84) * Update change_url --- scripts/change_url | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 126b57c..03c62f8 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,6 +28,23 @@ ynh_script_progression --message="Loading installation settings..." 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=1 + +# 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 #================================================= From 2632a202063f0a5e62ba9ed7617aa715411d23fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 11 Apr 2021 18:58:39 +0200 Subject: [PATCH 09/17] Patch (#86) * Update app.src --- README.md | 6 +++--- README_fr.md | 6 +++--- check_process | 6 ++---- conf/app.src | 4 ++-- conf/config.local.php | 8 ++++---- manifest.json | 16 ++-------------- scripts/install | 19 ++++++++----------- scripts/upgrade | 19 ++++++++----------- 8 files changed, 32 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index c42f7a1..d4e22b3 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,14 @@ Jirafeau is a web site permitting to upload a file in a simple way and give an u ## Documentation * Official documentation: - * YunoHost documentation: https://yunohost.org/#/app_jirafeau + * YunoHost documentation: https://yunohost.org/en/app_jirafeau ## YunoHost specific features #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) ## Limitations diff --git a/README_fr.md b/README_fr.md index 4c8919d..5c7d08b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,14 +27,14 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m ## Documentation * Documentation officielle : - * Documentation YunoHost : https://yunohost.org/#/app_jirafeau_fr + * Documentation YunoHost : https://yunohost.org/fr/app_jirafeau ## Caractéristiques spécifiques YunoHost #### Architectures supportées -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) ## Limitations diff --git a/check_process b/check_process index 29e0b0d..f518524 100644 --- a/check_process +++ b/check_process @@ -13,16 +13,14 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=48ed2dc5b80ed7f1ddd39a46917f993a8c4207d5 backup_restore=1 multi_instance=0 - port_already_use=0 change_url=1 ;;; Options Email= Notification=none ;;; Upgrade options - ; commit=48ed2dc5b80ed7f1ddd39a46917f993a8c4207d5 - name=Refactoring and upgrade 3.3.0 + ; commit= + name= manifest_arg=domain=DOMAIN&path=PATH&admin_user=USER&upload_password=supersecretpassword&is_public=1& diff --git a/conf/app.src b/conf/app.src index e5786d4..5a7af15 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://gitlab.com/mojo42/Jirafeau/repository/4.3.0/archive.tar.gz -SOURCE_SUM=435675a2b19d70155c5c3b1ee192582668f17696a040d8051bcdf9eea24dc1da +SOURCE_URL=https://gitlab.com/mojo42/Jirafeau/-/archive/4.3.0/Jirafeau-4.3.0.tar.gz +SOURCE_SUM=77bd4b69cb822ac8cac9df6890f17a673c978b10d8dd6fce46b60c763b859f74 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/config.local.php b/conf/config.local.php index 44d4f11..fd209dd 100644 --- a/conf/config.local.php +++ b/conf/config.local.php @@ -27,11 +27,11 @@ /* URL of installation, with traling slash (eg. »https://exmaple.com/jirafeau/«) */ -$cfg['web_root'] = 'https://' . '__YNH_DOMAIN__' . '__YNH_WWW_PATH__' . '/'; +$cfg['web_root'] = 'https://' . '__DOMAIN__' . '__PATH__' . '/'; /* Path to data directory, with trailing slash (eg. »/var/www/data/var_314159265358979323846264« */ -$cfg['var_root'] = '__YNH_VAR_ROOT__' . '/'; +$cfg['var_root'] = '__VAR_ROOT__' . '/'; /* Language - choice between 'auto' or any language located in the /lib/locales/ folder. * The mode »auto« will cause the script to detect the user's browser information @@ -74,7 +74,7 @@ $cfg['link_name_length'] = 8; * $cfg['upload_password'] = array('psw1'); // One password * $cfg['upload_password'] = array('psw1', 'psw2'); // Two passwords */ -$cfg['upload_password'] = array(__YNH_UPLOAD_PASSWORD__); +$cfg['upload_password'] = array(__UPLOAD_PASSWORD__); /* List of IP allowed to upload a file. * If the list is empty, then there is no upload restriction based on IP. @@ -96,7 +96,7 @@ $cfg['admin_password'] = ''; * that the provided user is logged in. * If »admin_password« parameter is set, then the »admin_password« is ignored. */ -$cfg['admin_http_auth_user'] = '__YNH_ADMIN_USER__'; +$cfg['admin_http_auth_user'] = '__ADMIN_USER__'; /* Allow user to select different options for file expiration time. * Possible values in array: diff --git a/manifest.json b/manifest.json index 3581bff..b736cd7 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Upload a file in a simple way and give a unique link to it", "fr": "Hébergez simplement un fichier et partagez-le avec un lien unique" }, - "version": "4.3.0~ynh1", + "version": "4.3.0~ynh2", "url": "https://gitlab.com/mojo42/Jirafeau", "license": "AGPL-3.0-only", "maintainer": { @@ -14,7 +14,7 @@ "email": "julien.malik@paraiso.me" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": false, "services": [ @@ -26,19 +26,11 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Jirafeau", - "fr": "Choisissez un domaine pour Jirafeau" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Jirafeau", - "fr": "Choisissez un chemin pour Jirafeau" - }, "example": "/jirafeau", "default": "/jirafeau" }, @@ -64,10 +56,6 @@ { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public Jirafeau site?", - "fr": "Est-ce un site public ?" - }, "default": true } ] diff --git a/scripts/install b/scripts/install index aa9a32f..cec41ff 100755 --- a/scripts/install +++ b/scripts/install @@ -100,10 +100,10 @@ cp "../conf/config.local.php" "$jirafeauconfigfile" ynh_print_OFF if [ -z "$upload_password" ] then - ynh_replace_string --match_string="__YNH_UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile" + ynh_replace_string --match_string="__UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile" ynh_app_setting_set --app=$app --key=upload_password --value="" else - ynh_replace_special_string --match_string="__YNH_UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile" + ynh_replace_special_string --match_string="__UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile" ynh_app_setting_set --app=$app --key=upload_password --value="$upload_password" fi ynh_print_ON @@ -115,15 +115,15 @@ ynh_script_progression --message="Configuring Jirafeau..." --weight=2 var_root=/home/yunohost.app/$app -ynh_replace_string --match_string="__YNH_DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile" +ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile" if [ "$path_url" = "/" ] then - ynh_replace_string --match_string="__YNH_WWW_PATH__" --replace_string="" --target_file="$jirafeauconfigfile" + ynh_replace_string --match_string="__PATH__" --replace_string="" --target_file="$jirafeauconfigfile" else - ynh_replace_string --match_string="__YNH_WWW_PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile" + ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile" fi -ynh_replace_string --match_string="__YNH_VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile" -ynh_replace_string --match_string="__YNH_ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile" +ynh_replace_string --match_string="__VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile" +ynh_replace_string --match_string="__ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile" # Calculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$jirafeauconfigfile" @@ -136,10 +136,7 @@ ynh_secure_remove --file=$final_path/install.php #================================================= ynh_script_progression --message="Configuring the cron file..." --weight=2 -cp ../conf/cron /etc/cron.d/$app -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app -ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=/etc/cron.d/$app -ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file=/etc/cron.d/$app +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" #================================================= # GENERIC FINALISATION diff --git a/scripts/upgrade b/scripts/upgrade index 2709197..b80e9be 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -181,10 +181,10 @@ cp "../conf/config.local.php" "$final_path/lib/config.local.php" ynh_print_OFF if [ -z "$upload_password" ] then - ynh_replace_string --match_string="__YNH_UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile" + ynh_replace_string --match_string="__UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile" ynh_app_setting_set --app=$app --key=upload_password --value="" else - ynh_replace_special_string --match_string="__YNH_UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile" + ynh_replace_special_string --match_string="__UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile" ynh_app_setting_set --app=$app --key=upload_password --value="$upload_password" fi ynh_print_ON @@ -196,15 +196,15 @@ ynh_script_progression --message="Upgrading Jirafeau configuration..." --weight= var_root=/home/yunohost.app/$app -ynh_replace_string --match_string="__YNH_DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile" +ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile" if [ "$path_url" = "/" ] then - ynh_replace_string --match_string="__YNH_WWW_PATH__" --replace_string="" --target_file="$jirafeauconfigfile" + ynh_replace_string --match_string="__PATH__" --replace_string="" --target_file="$jirafeauconfigfile" else - ynh_replace_string --match_string="__YNH_WWW_PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile" + ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile" fi -ynh_replace_string --match_string="__YNH_VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile" -ynh_replace_string --match_string="__YNH_ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile" +ynh_replace_string --match_string="__VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile" +ynh_replace_string --match_string="__ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$jirafeauconfigfile" @@ -217,10 +217,7 @@ ynh_secure_remove --file=$final_path/install.php #================================================= ynh_script_progression --message="Configuring the cron file..." --weight=1 -cp ../conf/cron /etc/cron.d/$app -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app -ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=/etc/cron.d/$app -ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file=/etc/cron.d/$app +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" #================================================= # GENERIC FINALISATION From 31a29d4278f98b060b1b50f3e7e07dbadff7cbad Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Tue, 11 May 2021 07:31:20 +0200 Subject: [PATCH 10/17] [autopatch] Update issue and PR templates (#88) Co-authored-by: Yunohost-Bot <> --- pull_request_template.md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 pull_request_template.md diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 0a198cf..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how you fix that* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* From 886d7e1f6e7a2a1453c8a23764f3df1554693bc5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 11 May 2021 11:04:36 +0200 Subject: [PATCH 11/17] Add templates --- .github/ISSUE_TEMPLATE.md | 55 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) From 9986ba4c04f921f3861e37da65b6f664683366c7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 2 Jun 2021 23:13:02 +0200 Subject: [PATCH 12/17] Update check_process --- check_process | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check_process b/check_process index f518524..f0f98f2 100644 --- a/check_process +++ b/check_process @@ -1,10 +1,10 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin_user="package_checker" (USER) + domain="domain.tld" + path="/path" + admin_user="package_checker" upload_password="supersecretpassword" - is_public=1 (PUBLIC|public=1|private=0) + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 From bdc4f95f3357ad5aea6fdc168c2bdd93910bf62b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 10 Sep 2021 21:33:49 +0200 Subject: [PATCH 13/17] Update restore --- scripts/restore | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 89783b5..e65b939 100644 --- a/scripts/restore +++ b/scripts/restore @@ -32,8 +32,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " From 82756153651cdb72f29ab898efcc3e8d0fb7f634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 4 Nov 2021 20:15:49 +0100 Subject: [PATCH 14/17] Add rights (#90) --- README.md | 57 +++++++++++------------ README_fr.md | 49 +++++++++----------- conf/config.local.php | 2 +- doc/DESCRIPTION.md | 1 + doc/DESCRIPTION_fr.md | 1 + doc/DISCLAIMER.md | 9 ++++ doc/DISCLAIMER_fr.md | 9 ++++ doc/screenshots/TPjh48P.png | Bin 0 -> 18507 bytes manifest.json | 21 +++++---- scripts/backup | 3 +- scripts/install | 59 ++++++++++++----------- scripts/remove | 7 +-- scripts/restore | 60 ++++++++++++------------ scripts/upgrade | 90 +++++++++++++++--------------------- 14 files changed, 187 insertions(+), 181 deletions(-) create mode 100644 doc/DESCRIPTION.md create mode 100644 doc/DESCRIPTION_fr.md create mode 100644 doc/DISCLAIMER.md create mode 100644 doc/DISCLAIMER_fr.md create mode 100644 doc/screenshots/TPjh48P.png diff --git a/README.md b/README.md index d4e22b3..f93a843 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + + # Jirafeau for YunoHost [![Integration level](https://dash.yunohost.org/integration/jirafeau.svg)](https://dash.yunohost.org/appci/app/jirafeau) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.maintain.svg) @@ -5,53 +10,43 @@ *[Lire ce readme en français.](./README_fr.md)* -> *This package allow you to install Jirafeau quickly and simply on a YunoHost server. -If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* +> *This package allows you to install Jirafeau 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 -Jirafeau is a web site permitting to upload a file in a simple way and give an unique link to it. +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.3.0 + +**Shipped version:** 4.3.0~ynh2 + +**Demo:** https://demo.yunohost.org/jirafeau/ ## Screenshots -![](http://i.imgur.com/TPjh48P.png) +![](./doc/screenshots/TPjh48P.png) -## Demo - -* [YunoHost demo](https://demo.yunohost.org/jirafeau/) +## Disclaimers / important information ## Configuration -## Documentation +### Changing the conditions of use of the service - * Official documentation: - * YunoHost documentation: https://yunohost.org/en/app_jirafeau +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`. -## YunoHost specific features +## Administration -#### Supported architectures +To administer the files within Jirafeau it is enough to go to the address `jirafeau.domaine.tld/admin.php`. +## Documentation and resources -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) +* Official app website: https://gitlab.com/mojo42/Jirafeau +* Upstream app code repository: https://gitlab.com/mojo42/Jirafeau +* YunoHost documentation for this app: https://yunohost.org/app_jirafeau +* Report a bug: https://github.com/YunoHost-Apps/jirafeau_ynh/issues -## Limitations +## Developer info -## Additional information - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/jirafeau_ynh/issues - * Jirafeau website: https://gitlab.com/mojo42/Jirafeau - * Upstream app repository: https://gitlab.com/mojo42/Jirafeau - * YunoHost website: https://yunohost.org/ - ---- - -## Developers info - -Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing). To try the testing branch, please proceed like that. ``` @@ -59,3 +54,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/jirafeau_ynh/tree/tes or sudo yunohost app upgrade jirafeau -u https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 5c7d08b..6788b55 100644 --- a/README_fr.md +++ b/README_fr.md @@ -3,51 +3,42 @@ [![Niveau d'intégration](https://dash.yunohost.org/integration/jirafeau.svg)](https://dash.yunohost.org/appci/app/jirafeau) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.maintain.svg) [![Installer Jirafeau avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=jirafeau) -*[Read this readme in english.](./README.md)* +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer Jirafeau rapidement et simplement sur un serveur YunoHost. +> *Ce package vous permet d'installer Jirafeau 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 -Jirafeau est un site web permettant d'héberger et de partager des fichiers de manière simple en leur donnant un lien unique. +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.3.0 + +**Version incluse :** 4.3.0~ynh2 + +**Démo :** https://demo.yunohost.org/jirafeau/ ## Captures d'écran -![](http://i.imgur.com/TPjh48P.png) +![](./doc/screenshots/TPjh48P.png) -## Démo - -* [Démo officielle](https://demo.yunohost.org/jirafeau/) +## Avertissements / informations importantes ## Configuration -## Documentation +### Changer les conditions d'utilisation du service - * Documentation officielle : - * Documentation YunoHost : https://yunohost.org/fr/app_jirafeau +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`. -## Caractéristiques spécifiques YunoHost +## Administration -#### Architectures supportées +Pour administrer les fichiers présents au sein de Jirafeau il suffit de se rendre à l'adresse `jirafeau.domaine.tld/admin.php`. +## Documentations et ressources -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) - -## Limitations - -## Informations additionnelles - -## Liens - - * Signaler un bug : https://github.com/YunoHost-Apps/jirafeau_ynh/issues - * Site de l'application : https://gitlab.com/mojo42/Jirafeau - * Dépôt de l'application principale : https://gitlab.com/mojo42/Jirafeau - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : https://gitlab.com/mojo42/Jirafeau +* Dépôt de code officiel de l'app : https://gitlab.com/mojo42/Jirafeau +* Documentation YunoHost pour cette app : https://yunohost.org/app_jirafeau +* Signaler un bug : https://github.com/YunoHost-Apps/jirafeau_ynh/issues ## Informations pour les développeurs @@ -59,3 +50,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/jirafeau_ynh/tree/tes ou sudo yunohost app upgrade jirafeau -u https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/conf/config.local.php b/conf/config.local.php index fd209dd..80ba5c6 100644 --- a/conf/config.local.php +++ b/conf/config.local.php @@ -31,7 +31,7 @@ $cfg['web_root'] = 'https://' . '__DOMAIN__' . '__PATH__' . '/'; /* Path to data directory, with trailing slash (eg. »/var/www/data/var_314159265358979323846264« */ -$cfg['var_root'] = '__VAR_ROOT__' . '/'; +$cfg['var_root'] = '__DATADIR__' . '/'; /* Language - choice between 'auto' or any language located in the /lib/locales/ folder. * The mode »auto« will cause the script to detect the user's browser information diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..6a49aff --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +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. diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..b3f5a7b --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1 @@ +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. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..e2c3b48 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,9 @@ +## 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 + +To administer the files within Jirafeau it is enough to go to the address `jirafeau.domaine.tld/admin.php`. \ No newline at end of file diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..1e3e5db --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,9 @@ +## 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 + +Pour administrer les fichiers présents au sein de Jirafeau il suffit de se rendre à l'adresse `jirafeau.domaine.tld/admin.php`. \ No newline at end of file diff --git a/doc/screenshots/TPjh48P.png b/doc/screenshots/TPjh48P.png new file mode 100644 index 0000000000000000000000000000000000000000..0c7605da74bb2095d65e65a6972d22795e564b53 GIT binary patch literal 18507 zcmcJ%1yq#nyDknYqNIV+V1jga3L?_o4BatwH!3Kpq;z+TfG`pRDAJuH-CY7h$DC)r z@As|$+Goev`+wG1u6N-KZ#;3wbzk@O@=;k)nh=iy4+{&6Q0C1mRV*y*MJ%jq$+vD| zzNzFW1wU?@$VtD#LSz1AA_`)`H@6+%=(u2E;orv`*jUM_WZ+9&R~ZE<+}Ue551$e} zC3}LolG<8b+f~xR-rgMQ3O-_CNjjSwyPBIl^00QbdL%8Qplrr!j*Er$2utSGOLfnQ zt!Xb`jpZQpoju!6x=1WC3){v#=hS=z5INma>~W!e&y7Z?+h%FtyADQ-KWo` z4>5ZnyeiP|^rEM?h!hKJjVFo(8w=|l$KS`J2y86Ofn`ka_i@V<3k!3IlU@Jo!1@WM zi#hJJ{e1+o-^9Wk|L0o_RLhfK4`j0Q$)QiWDeD|J3Y~}gR39NUBpo>!_&Igonzq{> zEiCWv<7X=y9aG`CxNI=oM0rRz&g3^Wob47DzbIh0`;Zb^uyZwN)2f*I(zv-%NrK@T z%EOvL`tURZdH)yhnyk)8QU7y|ygaHrb};6nt>&X9hVyH^Lp6-_+oeSQryMxgKgqrx z)B60bDLp87apO)~ph&%A7@e|SVw>nSV}jrCx(N!rAV2Vn|M3K$f(aT0T>BYfbriE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85hwt;M4nG4W$s0WTQ8W5wO6E2(e*H7vlGda;^!HA@6J9wlJe4l^(4Plc_Otx{ z*{?SwmmzVlUAqq_G?CW{YmmOmJJ7ou!-5SFN7}<9zwItvD&r_=7@IVE3r_`NBue$r zHRsjz+Aq2l4GW@?KdZ$?q`{VVYbg;CddKK7!ZQ_98w{pO;hF)35c~y7cuU6Nziv0_NElaa`T`B z@~C1Itt(^d7V8{I?O~%Y$Fs~`D>9XF%*+@JZAw)j>i(}Mlk-{+`)}{QzusHOTwiD| zZPVc2(05_)NX-ae;TZ){3o%jd^QIvrv}u;Pr))|TY=`Hv2aO!uL+jK_Io3V`5<9C%Qlqi4@vT zhY~>zQ+6dcHJ{}84MUc1*|dGdUX0~txkxHeFvP|WD72nO5C7g8AIMrQ8;$G@j4iOq z9m(e9;N+Hb5Upw0L$F!5dU90Rwg<9MBQ#Pp*GyCproG14k35^9Y8Q{|<6(=Iu z9LB0f!W4}XYT!~VMOlk|)pP?PGw`RSFRFm`A6hJW<1p(Nf9}=8E7vRW8}db%EuX=4 zUP~T8B}2-BBBd#CCgKB0H70)#vq zg4s#lW1|G#YOK6jC+NgG+WFK)%{+TUQ?qZ5%sqSVmhKIe`yZ6p#eNEyCqLW0Cwg+t zgM7i}yy2pTYN`9!)}J`7|5Pv~z3;P35~RN%#WYh7(%x6%rfnu^=i@!aWqh5~c!W^D zS*ftd+IB3kXq3j3ka=6|1-p)o%|zuBlI6$0aw)#DdA;DP)$w&4*Lu7Y<>r^1gnPln v!-EweuRw^&l^|sU0E;Ob|ML&mYp-)xLHoMz>b%4JO&=L4#aHDLM#29J2q#_2 literal 0 HcmV?d00001 diff --git a/manifest.json b/manifest.json index b736cd7..65d47dd 100644 --- a/manifest.json +++ b/manifest.json @@ -8,13 +8,19 @@ }, "version": "4.3.0~ynh2", "url": "https://gitlab.com/mojo42/Jirafeau", + "upstream": { + "license": "AGPL-3.0-only", + "website": "https://gitlab.com/mojo42/Jirafeau", + "demo": "https://demo.yunohost.org/jirafeau/", + "code": "https://gitlab.com/mojo42/Jirafeau" + }, "license": "AGPL-3.0-only", "maintainer": { "name": "julien", "email": "julien.malik@paraiso.me" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": false, "services": [ @@ -25,8 +31,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "domain.org" + "type": "domain" }, { "name": "path", @@ -40,18 +45,16 @@ "ask": { "en": "Choose an admin user (will be able to access admin.php page)", "fr": "Choisissez l'administrateur (seul autorisé à accéder à la page admin.php)" - }, - "example": "johndoe" + } }, { "name": "upload_password", "type": "password", "optional": true, "ask": { - "en": "Set the password granting upload permissions (leave empty to allow anybody to upload)", - "fr": "Définissez le mot de passe permettant l'accès à l'envoi de fichiers (laissez vide pour autoriser tout le monde)" - }, - "example": "supersecretpassword" + "en": "Set the password granting upload permissions (leave empty to allow anybody to upload). Please avoid using ' (quotes) in the password as it will fail the app...", + "fr": "Définissez le mot de passe permettant l'accès à l'envoi de fichiers (laissez vide pour autoriser tout le monde). Veuillez éviter d'utiliser ' (guillemets) dans le mot de passe car cela fera échouer l'application..." + } }, { "name": "is_public", diff --git a/scripts/backup b/scripts/backup index b4e5a99..91246d8 100644 --- a/scripts/backup +++ b/scripts/backup @@ -24,6 +24,7 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -40,7 +41,7 @@ ynh_backup --src_path="$final_path" # BACKUP OF THE DATA DIR #================================================= -ynh_backup --src_path="/home/yunohost.app/$app" --is_big +ynh_backup --src_path="$datadir" --is_big #================================================= # BACKUP OF THE NGINX CONFIGURATION diff --git a/scripts/install b/scripts/install index cec41ff..9891e2e 100755 --- a/scripts/install +++ b/scripts/install @@ -23,9 +23,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH admin_user=$YNH_APP_ARG_ADMIN_USER -ynh_print_OFF upload_password=$YNH_APP_ARG_UPLOAD_PASSWORD -ynh_print_ON is_public=$YNH_APP_ARG_IS_PUBLIC app=$YNH_APP_INSTANCE_NAME @@ -51,6 +49,14 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin_user ynh_app_setting_set --app=$app --key=is_public --value=$is_public +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=2 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # STANDARD MODIFICATIONS #================================================= @@ -62,6 +68,10 @@ 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" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -70,14 +80,6 @@ ynh_script_progression --message="Configuring NGINX web server..." # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=2 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -97,7 +99,6 @@ jirafeauconfigfile="$final_path/lib/config.local.php" cp "../conf/config.local.php" "$jirafeauconfigfile" # Set and save upload password, allowing an empty one -ynh_print_OFF if [ -z "$upload_password" ] then ynh_replace_string --match_string="__UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile" @@ -106,15 +107,26 @@ else ynh_replace_special_string --match_string="__UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile" ynh_app_setting_set --app=$app --key=upload_password --value="$upload_password" fi -ynh_print_ON + +#================================================= +# CREATE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Creating a data directory..." --weight=1 + +datadir=/home/yunohost.app/$app +ynh_app_setting_set --app=$app --key=datadir --value=$datadir + +mkdir -p $datadir/{files,links,async,block} + +chmod 750 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" #================================================= # CONFIGURE JIRAFEAU #================================================= ynh_script_progression --message="Configuring Jirafeau..." --weight=2 -var_root=/home/yunohost.app/$app - ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile" if [ "$path_url" = "/" ] then @@ -122,7 +134,7 @@ then else ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile" fi -ynh_replace_string --match_string="__VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile" +ynh_replace_string --match_string="__DATADIR__" --replace_string="$datadir" --target_file="$jirafeauconfigfile" ynh_replace_string --match_string="__ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile" # Calculate and store the config file checksum into the app settings @@ -131,24 +143,17 @@ ynh_store_file_checksum --file="$jirafeauconfigfile" # Remove the install.php ynh_secure_remove --file=$final_path/install.php +chmod 400 "$jirafeauconfigfile" +chown $app:$app "$jirafeauconfigfile" + #================================================= # SET THE CRON FILE #================================================= ynh_script_progression --message="Configuring the cron file..." --weight=2 ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" - -#================================================= -# GENERIC FINALISATION -#================================================= -# SECURING FILES AND DIRECTORIES -#================================================= - -chown -R root: $final_path - -mkdir -p $var_root/{files,links,async,block} -chown -R $app:root $var_root -chmod -R 700 $var_root +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" #================================================= # SETUP SSOWAT diff --git a/scripts/remove b/scripts/remove index 9e6c2bc..1e7f07f 100755 --- a/scripts/remove +++ b/scripts/remove @@ -18,13 +18,14 @@ 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) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # STANDARD REMOVE #================================================= # REMOVE THE MAIN DIR OF THE APP #================================================= -ynh_script_progression --message="Removing Jirafeau main directory..." --weight=2 +ynh_script_progression --message="Removing app main directory..." --weight=2 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -59,7 +60,7 @@ ynh_secure_remove --file="/etc/cron.d/$app" #================================================= ynh_script_progression --message="Removing data directory..." --weight=1 -ynh_secure_remove --file="/home/yunohost.app/$app" +ynh_secure_remove --file="$datadir" #================================================= # GENERIC FINALISATION @@ -75,4 +76,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of Jirafeau completed" --last +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index e65b939..9c38fa6 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,6 +26,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) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -40,27 +41,46 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE APP MAIN DIR -#================================================= -ynh_script_progression --message="Restoring Jirafeau main directory..." --weight=2 - -ynh_restore_file --origin_path="$final_path" - #================================================= # RECREATE THE DEDICATED USER #================================================= ynh_script_progression --message="Recreating the dedicated system user..." --weight=2 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" + +#================================================= +# RESTORE THE APP MAIN DIR +#================================================= +ynh_script_progression --message="Restoring $app main directory..." --weight=2 + +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 THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Restoring the data directory..." --weight=1 + +ynh_restore_file --origin_path="$datadir" --not_mandatory + +mkdir -p "$datadir/{files,links,async,block}" + +chmod 750 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" @@ -72,26 +92,8 @@ ynh_add_fpm_config ynh_script_progression --message="Restoring the cron file..." --weight=1 ynh_restore_file --origin_path="/etc/cron.d/$app" - -#================================================= -# SPECIFIC RESTORE -#================================================= -# RESTORE THE DATA OF JIRAFEAU -#================================================= -ynh_script_progression --message="Restoring the data directory..." --weight=2 - -datadir="/home/yunohost.app/$app" - -# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup. -ynh_restore_file --origin_path="$datadir" --not_mandatory - -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Create app folders -mkdir -p "$datadir"/{files,links,async,block} -chown -R $app:root /home/yunohost.app/$app +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" #================================================= # GENERIC FINALISATION @@ -107,4 +109,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for Jirafeau" --last +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index b80e9be..4fd4e8f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,10 +21,9 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) admin_user=$(ynh_app_setting_get --app=$app --key=admin) is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -ynh_print_OFF upload_password=$(ynh_app_setting_get --app=$app --key=upload_password) -ynh_print_ON phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK VERSION @@ -32,26 +31,37 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up Jirafeau 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 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/var/www/$app ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# If datadir doesn't exist, create it +if [ -z "$datadir" ]; then + datadir=/home/yunohost.app/$app + ynh_app_setting_set --app=$app --key=datadir --value=$datadir +fi + # Migrate files from 3.4.1 to 4.1.1 current_version="$(ynh_app_upstream_version --manifest="/etc/yunohost/apps/$app/manifest.json")" update_version="$(ynh_app_upstream_version)" @@ -60,8 +70,6 @@ if [ ${current_version:0:1} -le 3 ] && [ ${update_version:0:1} -ge 4 ] then ynh_script_progression --message="Migrating files..." --weight=5 - var_root=/home/yunohost.app/$app - # Migrate files and links to the new directory structure for type in files links do @@ -78,7 +86,7 @@ then # Split the file name every 8 characters split=0 - full_path="$var_root/$type" + full_path="$datadir/$type" while [ $split -le ${#file} ] do part_dir="${file:$split:8}" @@ -94,7 +102,7 @@ then if [ "$type" = "files" ]; then mv "${full_file}_count" "$full_path" fi - done <<< "$(find "$var_root/$type" -type f)" # List all files, without directories + done <<< "$(find "$datadir/$type" -type f)" # List all files, without directories done # And clean the old directories @@ -109,23 +117,17 @@ then then ynh_secure_remove --file="$file" fi - done <<< "$(find "$var_root/$type" -maxdepth 1 -mindepth 1 -type d)" # List all first level directories + done <<< "$(find "$datadir/$type" -maxdepth 1 -mindepth 1 -type d)" # List all first level directories done fi #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Backing up Jirafeau before upgrading (may take a while)..." --weight=3 +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 -# 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 +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # STANDARD UPGRADE STEPS @@ -141,6 +143,10 @@ then ynh_setup_source --dest_dir="$final_path" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # NGINX CONFIGURATION #================================================= @@ -149,14 +155,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# 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 - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -178,7 +176,6 @@ ynh_backup_if_checksum_is_different --file="$final_path/lib/config.local.php" cp "../conf/config.local.php" "$final_path/lib/config.local.php" # Set and save upload password, allowing an empty one -ynh_print_OFF if [ -z "$upload_password" ] then ynh_replace_string --match_string="__UPLOAD_PASSWORD__" --replace_string="" --target_file="$jirafeauconfigfile" @@ -187,14 +184,11 @@ else ynh_replace_special_string --match_string="__UPLOAD_PASSWORD__" --replace_string="'$upload_password'" --target_file="$jirafeauconfigfile" ynh_app_setting_set --app=$app --key=upload_password --value="$upload_password" fi -ynh_print_ON #================================================= # CONFIGURE JIRAFEAU #================================================= -ynh_script_progression --message="Upgrading Jirafeau configuration..." --weight=2 - -var_root=/home/yunohost.app/$app +ynh_script_progression --message="Upgrading $app configuration..." --weight=2 ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$jirafeauconfigfile" if [ "$path_url" = "/" ] @@ -203,7 +197,7 @@ then else ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file="$jirafeauconfigfile" fi -ynh_replace_string --match_string="__VAR_ROOT__" --replace_string="$var_root" --target_file="$jirafeauconfigfile" +ynh_replace_string --match_string="__DATADIR__" --replace_string="$datadir" --target_file="$jirafeauconfigfile" ynh_replace_string --match_string="__ADMIN_USER__" --replace_string="$admin_user" --target_file="$jirafeauconfigfile" # Recalculate and store the checksum of the file for the next upgrade. @@ -218,18 +212,8 @@ ynh_secure_remove --file=$final_path/install.php ynh_script_progression --message="Configuring the cron file..." --weight=1 ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" - -#================================================= -# GENERIC FINALISATION -#================================================= -# SECURING FILES AND DIRECTORIES -#================================================= - -chown -R root: $final_path - -mkdir -p $var_root/{files,links,async,block} -chown -R $app:root $var_root -chmod -R 700 $var_root +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" #================================================= # SETUP SSOWAT @@ -256,4 +240,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of Jirafeau completed" --last +ynh_script_progression --message="Upgrade of $app completed" --last From 61876c8206404eb0ce07fbcc13e7491fcfa861b4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Nov 2021 13:48:31 +0100 Subject: [PATCH 15/17] Add --purge option --- conf/app.src | 1 - conf/nginx.conf | 5 ----- manifest.json | 2 +- scripts/remove | 20 +++++++++++--------- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/conf/app.src b/conf/app.src index 5a7af15..16a8307 100644 --- a/conf/app.src +++ b/conf/app.src @@ -3,4 +3,3 @@ SOURCE_SUM=77bd4b69cb822ac8cac9df6890f17a673c978b10d8dd6fce46b60c763b859f74 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= diff --git a/conf/nginx.conf b/conf/nginx.conf index ecb2372..c92f5a3 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; - } - client_max_body_size 10G; client_body_timeout 30m; proxy_read_timeout 30m; diff --git a/manifest.json b/manifest.json index 65d47dd..66a5e31 100644 --- a/manifest.json +++ b/manifest.json @@ -20,7 +20,7 @@ "email": "julien.malik@paraiso.me" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ diff --git a/scripts/remove b/scripts/remove index 1e7f07f..f7a2c97 100755 --- a/scripts/remove +++ b/scripts/remove @@ -30,6 +30,17 @@ ynh_script_progression --message="Removing app main directory..." --weight=2 # Remove the app directory securely ynh_secure_remove --file="$final_path" +#================================================= +# REMOVE DATA DIR +#================================================= + +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_script_progression --message="Removing app data directory..." --weight=1 + ynh_secure_remove --file="$datadir" +fi + #================================================= # REMOVE THE NGINX CONFIGURATION #================================================= @@ -53,15 +64,6 @@ ynh_script_progression --message="Removing the cron file..." --weight=1 ynh_secure_remove --file="/etc/cron.d/$app" -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE THE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Removing data directory..." --weight=1 - -ynh_secure_remove --file="$datadir" - #================================================= # GENERIC FINALISATION #================================================= From f321239fdaf26157e484a6e39c980549b575920d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Nov 2021 13:48:48 +0100 Subject: [PATCH 16/17] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 66a5e31..f520de8 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Upload a file in a simple way and give a unique link to it", "fr": "Hébergez simplement un fichier et partagez-le avec un lien unique" }, - "version": "4.3.0~ynh2", + "version": "4.3.0~ynh3", "url": "https://gitlab.com/mojo42/Jirafeau", "upstream": { "license": "AGPL-3.0-only", From 7f625dc594007ea9012159c88e299be2b8c1fc5d Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 22 Nov 2021 12:48:55 +0000 Subject: [PATCH 17/17] 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 f93a843..5d3fb23 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,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.3.0~ynh2 +**Shipped version:** 4.3.0~ynh3 **Demo:** https://demo.yunohost.org/jirafeau/ diff --git a/README_fr.md b/README_fr.md index 6788b55..982f6ad 100644 --- a/README_fr.md +++ b/README_fr.md @@ -14,7 +14,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour 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.3.0~ynh2 +**Version incluse :** 4.3.0~ynh3 **Démo :** https://demo.yunohost.org/jirafeau/