From 067b75c53e17503503de33df15270cf5d594ce55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 20 Mar 2021 15:33:35 +0100 Subject: [PATCH] Upgrade to 0.05.13 (#55) --- README.md | 4 ++-- README_fr.md | 4 ++-- check_process | 3 +-- conf/app.src | 4 ++-- manifest.json | 16 ++-------------- pull_request_template.md | 4 +--- scripts/install | 15 +++++++-------- scripts/upgrade | 20 ++++++++++---------- 8 files changed, 27 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 6dd478c..908b417 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The administrator of the Lufi instance you use will not be able to see what is i The encryption key part of the URL is a anchor (Cf. [Fragment Identifier](https://en.wikipedia.org/wiki/Fragment_identifier)), that means this part is only processed client-side and does not reach the server. :-) -**Shipped version:** 0.05.12 +**Shipped version:** 0.05.13 ## Screenshots @@ -33,7 +33,7 @@ The encryption key part of the URL is a anchor (Cf. [Fragment Identifier](https: ## Documentation * Official documentation: https://framagit.org/luc/lufi/wikis/home - * YunoHost documentation: https://yunohost.org/#/app_lufi + * YunoHost documentation: https://yunohost.org/en/app_lufi ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 30b3733..eea48f0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,7 +15,7 @@ Est-ce tout ? Non. Tous les fichiers sont chiffrés par le navigateur ! L'admini La clé de déchiffrement est une ancre (voir [Fragment Identifier](https://en.wikipedia.org/wiki/Fragment_identifier)), ce qui signifie que cette partie n'est traitée que par le client et n'atteint pas le serveur. :-) -**Version incluse:** 0.05.12 +**Version incluse:** 0.05.13 ## Captures d'écran @@ -32,7 +32,7 @@ La clé de déchiffrement est une ancre (voir [Fragment Identifier](https://en.w ## Documentation * Documentation officielle : https://framagit.org/luc/lufi/wikis/home - * Documentation YunoHost : https://yunohost.org/#/app_lufi_fr + * Documentation YunoHost : https://yunohost.org/fr/app_lufi ## Caractéristiques spécifiques YunoHost diff --git a/check_process b/check_process index ba56559..1986361 100644 --- a/check_process +++ b/check_process @@ -4,7 +4,7 @@ domain="domain.tld" (DOMAIN) path="/path" (PATH) max_file_size=100 - is_public="Yes" (PUBLIC|public=Yes|private=No) + is_public=1 (PUBLIC|public=1|private=0) admin="john" (USER) ; Checks pkg_linter=1 @@ -18,7 +18,6 @@ upgrade=1 from_commit=23e84578464b1fa09f79c98b6a9b5f19bbcf83f3 backup_restore=1 multi_instance=1 - port_already_use=1 (8095) change_url=1 ;;; Upgrade options ; commit=23e84578464b1fa09f79c98b6a9b5f19bbcf83f3 diff --git a/conf/app.src b/conf/app.src index 06c8bdc..f6e8c70 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lufi/-/archive/0.05.12/lufi-0.05.12.tar.gz -SOURCE_SUM=e51fac06a79e4b38527a9a5c9d8caddbad75f26d7e2b95f81543065969f0679e +SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lufi/-/archive/0.05.13/lufi-0.05.13.tar.gz +SOURCE_SUM=c43c19c9901bb4b0d103980a61c3b1d9458a54f23b0b1c2b42c9706073df4d5a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index e67bcd6..f82f919 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self hosting files and sharing anonymous application", "fr": "Application d'hébergement et de partage de fichiers anonyme" }, - "version": "0.05.12~ynh1", + "version": "0.05.13~ynh1", "url": "https://git.framasoft.org/luc/lufi", "license": "AGPL-3.0-or-later", "maintainer": { @@ -14,7 +14,7 @@ "email": "win10@tutanota.com, cyp@rouquin.me" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ @@ -25,19 +25,11 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Lufi", - "fr": "Choisissez un nom de domaine pour Lufi" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Lufi", - "fr": "Choisissez un chemin pour Lufi" - }, "example": "/lufi", "default": "/lufi" }, @@ -54,10 +46,6 @@ { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": true } ] diff --git a/pull_request_template.md b/pull_request_template.md index 93994e7..6c28fc5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -13,6 +13,4 @@ ## Package_check results --- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* - -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/lufi_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/lufi_ynh%20PR-NUM-%20(USERNAME)/) +* 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 1400b24..bea93a0 100644 --- a/scripts/install +++ b/scripts/install @@ -44,8 +44,6 @@ if ! [[ $max_file_size =~ "^[\-0-9]+$" ]] && [ $max_file_size -lt 0 ]; then ynh_die --message="Max file must be a number positive or zero" fi -# Check web path availability -ynh_webpath_available --domain=$domain --path_url=$path_url # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -56,7 +54,6 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=max_file_size --value=$max_file_size ynh_app_setting_set --app=$app --key=secret --value=$secret @@ -160,9 +157,10 @@ popd #================================================= ynh_script_progression --message="Setuping a cron..." -cp ../conf/cron_lufi /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="__USER__" --replace_string="$app" --target_file="/etc/cron.d/$app" +# cp ../conf/cron_lufi /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="__USER__" --replace_string="$app" --target_file="/etc/cron.d/$app" +ynh_add_config --template="../conf/cron_lufi" --destination="/etc/cron.d/$app" chmod +x $final_path/script/lufi #================================================= @@ -209,9 +207,10 @@ ynh_systemd_action --service_name=$app --action="start" --line_match="Creating p #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." +ynh_script_progression --message="Configuring permissions..." + +ynh_permission_update --permission="main" --add="visitors" -ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" if [ $is_public -eq 0 ] then if [ "$path_url" == "/" ]; then diff --git a/scripts/upgrade b/scripts/upgrade index 69d6b20..64d2333 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,15 +39,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# 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 @@ -66,6 +57,14 @@ if [ -z "$max_file_size" ]; then ynh_app_setting_set --app=$app --key=max_file_size --value=$max_file_size fi +# Make app public if necessary +if [ $is_public -eq 1 ] +then + # Everyone can access the app. + # The "main" permission is automatically created before the install script. + ynh_permission_update --permission="main" --add="visitors" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -244,7 +243,8 @@ chown -R $app: $final_path #================================================= ynh_script_progression --message="Upgrading SSOwat configuration..." -ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" +ynh_permission_update --permission="main" --add="visitors" + if [ $is_public -eq 0 ] then if [ "$path_url" == "/" ]; then