From bf1ca8bcb9a773bc208b83cd9e7527e960db3985 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 2 Oct 2020 19:27:04 +0200 Subject: [PATCH 1/6] [fix] Chromium net::ERR_HTTP2_PROTOCOL_ERROR 200 --- conf/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4feb38f..cd91a43 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -13,8 +13,8 @@ location __PATH__/ { client_max_body_size __MAX_FILE_SIZE__M; if ($request_uri ~* ^/(img|css|font|js)/) { - more_set_headers Expires "Thu, 31 Dec 2037 23:55:55 GMT"; - more_set_headers Cache-Control "public, max-age=315360000"; + #more_set_headers Expires "Thu, 31 Dec 2037 23:55:55 GMT"; + #more_set_headers Cache-Control "public, max-age=315360000"; } proxy_pass http://127.0.0.1:__PORT____PATH__; From c0930e6caf6a2bc50f5719c5a335c1602ea8e7a1 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Sat, 3 Oct 2020 18:03:42 +0200 Subject: [PATCH 2/6] [fix] Explain why those lines are commented --- conf/nginx.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index cd91a43..9520b19 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -13,6 +13,8 @@ location __PATH__/ { client_max_body_size __MAX_FILE_SIZE__M; if ($request_uri ~* ^/(img|css|font|js)/) { + # If uncommented, it triggers some net::ERR_HTTP2_PROTOCOL_ERROR + # with chromium #more_set_headers Expires "Thu, 31 Dec 2037 23:55:55 GMT"; #more_set_headers Cache-Control "public, max-age=315360000"; } From 278b5ca383b288a9fafb8de48673633880501caa Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 1 Nov 2020 18:24:02 +0100 Subject: [PATCH 3/6] Upgrade to 0.05.7 --- README.md | 10 +++------- README_fr.md | 11 +++++------ conf/app.src | 6 ++++-- issue_template.md | 6 +++--- manifest.json | 4 ++-- scripts/change_url | 16 ++++++++-------- scripts/install | 13 +++---------- scripts/remove | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 4 ++-- 10 files changed, 34 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 974b158..ffae519 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.03.5 +**Shipped version:** 0.05.7 ## Screenshots @@ -28,7 +28,7 @@ The encryption key part of the URL is a anchor (Cf. [Fragment Identifier](https: ## Configuration -How to configure this app: a plain file at `/var/www/lufi/lufi.conf` with SSH. +* How to configure this app: a plain file at `/var/www/lufi/lufi.conf` with SSH. ## Documentation @@ -46,9 +46,6 @@ Can the app be used by multiple users? **Yes** * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/lufi/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/lufi%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/lufi/) -**More info on the documentation page:** -https://yunohost.org/packaging_apps - ## Links * Report a bug: https://github.com/YunoHost-Apps/lufi_ynh/issues @@ -57,8 +54,7 @@ https://yunohost.org/packaging_apps --- -Developer info ----------------- +## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/lufi_ynh/tree/testing). diff --git a/README_fr.md b/README_fr.md index 4ffbae5..6922ef9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,11 +11,11 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Vue d'ensemble Il stocke vos fichiers et vous permet de les télécharger. -Est-ce tout? Non. Tous les fichiers sont chiffrés par le navigateur! L'administrateur de l'instance Lufi ne pourra pas voir quel est votre administrateur réseau ou votre FAI. +Est-ce tout ? Non. Tous les fichiers sont chiffrés par le navigateur ! L'administrateur de l'instance Lufi ne pourra pas voir quel est votre administrateur réseau ou votre FAI. 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.03.5 +**Version incluse:** 0.05.7 ## Captures d'écran @@ -27,11 +27,11 @@ La clé de déchiffrement est une ancre (voir [Fragment Identifier](https://en.w ## Configuration -Comment configurer cette application: un fichier brut en SSH. +* Comment configurer cette application: un fichier brut `/var/www/lufi/lufi.conf` en SSH. ## Documentation - * Documentation officielle: https://framagit.org/luc/lufi/wikis/home + * Documentation officielle : https://framagit.org/luc/lufi/wikis/home ## Caractéristiques spécifiques YunoHost @@ -53,8 +53,7 @@ Comment configurer cette application: un fichier brut en SSH. --- -Informations pour les développeurs ----------------- +## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/lufi_ynh/tree/testing). diff --git a/conf/app.src b/conf/app.src index 3b1e0b7..91e43b2 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,8 @@ -SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lufi/-/archive/0.03.5/lufi-0.03.5.tar.gz -SOURCE_SUM=aeb4bb4e7b4d5a7a12a7b8a49578e98c4ef8b6cb606b266b4531767a6ea6debe +SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lufi/-/archive/0.05.7/lufi-0.05.7.tar.gz +SOURCE_SUM=a1f60ce84584e642a19bec9aaccf764c8b704f2be4dcf1068535414054bf5326 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_FILENAME= + + diff --git a/issue_template.md b/issue_template.md index 79a0944..f49c8bf 100644 --- a/issue_template.md +++ b/issue_template.md @@ -7,7 +7,7 @@ about: Create a report to help us debug, it would be nice to fill the template a **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!* + - *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 lufi itself. Refer to its documentation or repository for help.* - *If you have a doubt, post here, we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* @@ -34,8 +34,8 @@ about: Create a report to help us debug, it would be nice to fill the template a - *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 '....'* + 2. *Click on '...'* + 3. *Scroll down to '...'* 4. *See error* **Expected behavior** diff --git a/manifest.json b/manifest.json index 707e8a3..299fe03 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.03.5~ynh2", + "version": "0.05.7~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": ">= 3.5" + "yunohost": ">= 3.8.1" }, "multi_instance": true, "services": [ diff --git a/scripts/change_url b/scripts/change_url index 9b72f3f..d228ada 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -41,7 +41,7 @@ max_file_size=$(ynh_app_setting_get --app=$app --key=max_file_size) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade @@ -83,23 +83,23 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="$final_path/l #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." +ynh_script_progression --message="Updating NGINX web server configuration..." nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config max_file_size fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location @@ -170,7 +170,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/ #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index 9680758..7a82166 100644 --- a/scripts/install +++ b/scripts/install @@ -74,13 +74,6 @@ ynh_script_progression --message="Configuring firewall..." port=$(ynh_find_port --port=8095) ynh_app_setting_set --app=$app --key=port --value=$port -# Optional: Expose this port publicly -# (N.B. : you only need to do this if the app actually needs to expose the port publicly. -# If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !) - -# Open the port -# ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port - #================================================= # INSTALL DEPENDENCIES #================================================= @@ -116,9 +109,9 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." +ynh_script_progression --message="Configuring NGINX web server..." -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config max_file_size #================================================= @@ -239,7 +232,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 9a16cb2..72de306 100644 --- a/scripts/remove +++ b/scripts/remove @@ -70,9 +70,9 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." +ynh_script_progression --message="Removing NGINX web server configuration..." -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index bc340ba..4b88ceb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -49,7 +49,7 @@ test ! -d $final_path \ #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the nginx configuration..." +ynh_script_progression --message="Restoring NGINX configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -139,7 +139,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index aff997c..ec3e3b5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,7 +105,7 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config max_file_size @@ -266,7 +266,7 @@ ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_pat #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload From 25186f30d31e58e59c5481f80baf7c73e6a9f662 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 5 Nov 2020 09:53:03 +0100 Subject: [PATCH 4/6] Set upgrade in package_check --- README.md | 1 + README_fr.md | 1 + check_process | 12 +++--------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ffae519..8043dbd 100644 --- a/README.md +++ b/README.md @@ -33,6 +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 specific features diff --git a/README_fr.md b/README_fr.md index 6922ef9..7824094 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,6 +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 ## Caractéristiques spécifiques YunoHost diff --git a/check_process b/check_process index 6a2fb26..52c00de 100644 --- a/check_process +++ b/check_process @@ -14,21 +14,15 @@ setup_private=1 setup_public=1 upgrade=1 - # 0.01 - upgrade=1 from_commit=1d53901957efcf8861b10efc8d3f081cadd2ba9e # 0.03.5 - upgrade=1 from_commit=6e05053ee90370e659d16abd9dcd9220e9e497f5 + upgrade=1 from_commit=64a53051c3cd12840ca32b2fdaf0c3063e0158bf backup_restore=1 multi_instance=1 - # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. - # incorrect_path=1 port_already_use=1 (8095) change_url=1 ;;; Levels # If the level 5 (Package linter) is forced to 1. Please add justifications here. Level 5=auto ;;; Upgrade options - ; commit=1d53901957efcf8861b10efc8d3f081cadd2ba9e - name=0.01 - ; commit=6e05053ee90370e659d16abd9dcd9220e9e497f5 - name=0.03.5 + ; commit=64a53051c3cd12840ca32b2fdaf0c3063e0158bf + name=Merge pull request #42 from YunoHost-Apps/testing From 3cadd2b9974a7b418586c658dac19ffd3d1caeac Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 14 Nov 2020 08:31:09 +0100 Subject: [PATCH 5/6] Small typos --- manifest.json | 2 +- scripts/install | 4 ++-- scripts/remove | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 299fe03..3b79ccc 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "win10@tutanota.com, cyp@rouquin.me" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.0.0" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index 7a82166..844d6ce 100644 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,7 @@ ynh_system_user_create --username=$app #================================================= # CONFIGURE LUFI #================================================= -ynh_script_progression --message="Configuring lufi..." +ynh_script_progression --message="Configuring $app..." config=${final_path}/lufi.conf cp ../conf/lufi.conf.template "$config" @@ -155,7 +155,7 @@ ynh_store_file_checksum --file="$config" #================================================= # INSTALL LUFI #================================================= -ynh_script_progression --message="Installing lufi..." +ynh_script_progression --message="Installing $app..." pushd $final_path carton install --deployment --without=sqlite --without=mysql --without=htpasswd --without=test diff --git a/scripts/remove b/scripts/remove index 72de306..7640fa9 100644 --- a/scripts/remove +++ b/scripts/remove @@ -28,7 +28,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service..." From 2e1695c9f4de31b5457786c3ac8d3230863649e4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 14 Nov 2020 15:00:47 +0100 Subject: [PATCH 6/6] Update nginx.conf --- conf/nginx.conf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9520b19..58a3d19 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,23 +5,22 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } - # This is important for user's privacy ! + # This is important for user's privacy! access_log off; error_log /var/log/nginx/lufi.error.log; - # This is important ! Make it OK with your Lutim configuration + # This is important! Make it OK with your Lutim configuration client_max_body_size __MAX_FILE_SIZE__M; if ($request_uri ~* ^/(img|css|font|js)/) { - # If uncommented, it triggers some net::ERR_HTTP2_PROTOCOL_ERROR - # with chromium + # If uncommented, it triggers some net::ERR_HTTP2_PROTOCOL_ERROR with chromium #more_set_headers Expires "Thu, 31 Dec 2037 23:55:55 GMT"; #more_set_headers Cache-Control "public, max-age=315360000"; } proxy_pass http://127.0.0.1:__PORT____PATH__; - # Really important ! Lufi uses WebSocket, it won't work without this + # Really important! Lufi uses WebSocket, it won't work without this proxy_set_header Upgrade $http_upgrade ; proxy_set_header Connection "upgrade" ;