From bb0084980ed6d488930403b6716a3993128a0744 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 12 Aug 2022 11:09:29 +0000 Subject: [PATCH 1/9] Auto-update README --- README.md | 1 + README_fr.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 222aaeb..3a686e7 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo **Shipped version:** 3.3.2~ynh1 + **Demo:** https://demo.2fauth.app/login ## Screenshots diff --git a/README_fr.md b/README_fr.md index 90a72cd..4930acb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,8 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Version incluse :** 3.3.2~ynh1 +**Version incluse :** 3.3.2~ynh1 + **Démo :** https://demo.2fauth.app/login From 5d350a25a13850136e452a9960a7b030f71b3f4a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Aug 2022 11:11:32 +0200 Subject: [PATCH 2/9] Upgrade to 11 --- manifest.json | 2 +- scripts/install | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index cb40b8c..98afe3f 100644 --- a/manifest.json +++ b/manifest.json @@ -20,7 +20,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index ed1fc44..78e399f 100755 --- a/scripts/install +++ b/scripts/install @@ -29,10 +29,11 @@ path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC phpversion=$YNH_PHP_VERSION admin=$YNH_APP_ARG_ADMIN -email=$(ynh_user_get_info --username=$admin --key=mail) app=$YNH_APP_INSTANCE_NAME +email=$(ynh_user_get_info --username=$admin --key=mail) + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= From df47d15a8a4172c88f868ecc13d37c100bc8ba06 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Aug 2022 17:46:21 +0200 Subject: [PATCH 3/9] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index c0c24a0..2ac3d2e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -84,7 +84,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=3 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env $final_path/storage" + ynh_setup_source --dest_dir="$final_path" --keep=".env storage" fi chmod 750 "$final_path" From 3a0a55da9d2c238347785bac2839ab95041033b2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Aug 2022 12:03:30 +0200 Subject: [PATCH 4/9] 3.3.3 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 7ab7721..d577be0 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.3.2.tar.gz -SOURCE_SUM=4c81b4323d7496753253ee34bfac5cbdfac1f7b772bd1b8061e4c78ade9a406e +SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.3.3.tar.gz +SOURCE_SUM=d6611ae920922a9064509450c70256e68a6539ecaa0f641569913077abd71a30 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 98afe3f..d8805f8 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "self-hosted alternative to One Time Passcode", "fr": "Alternative auto-hébergée a One Time Passcode" }, - "version": "3.3.2~ynh1", + "version": "3.3.3~ynh1", "url": "https://github.com/Bubka/2FAuth", "upstream": { "license": "AGPL-3.0", From 1c03828830f0d89e54b88d80c880565c777728ac Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 16 Aug 2022 10:03:36 +0000 Subject: [PATCH 5/9] 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 3a686e7..e4029d9 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Shipped version:** 3.3.2~ynh1 +**Shipped version:** 3.3.3~ynh1 **Demo:** https://demo.2fauth.app/login diff --git a/README_fr.md b/README_fr.md index 4930acb..893cac7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Version incluse :** 3.3.2~ynh1 +**Version incluse :** 3.3.3~ynh1 **Démo :** https://demo.2fauth.app/login From 993af6c6d3e1a213e75b33460f292e467266cf10 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Aug 2022 12:05:54 +0200 Subject: [PATCH 6/9] Fix order --- scripts/restore | 14 +++++++------- scripts/upgrade | 34 +++++++++++++++++----------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/scripts/restore b/scripts/restore index c97b681..f362880 100755 --- a/scripts/restore +++ b/scripts/restore @@ -45,13 +45,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -86,6 +79,13 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE THE MYSQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2ac3d2e..bcb7b74 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) 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_PHP_VERSION +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION @@ -60,13 +60,6 @@ if ! ynh_permission_exists --permission="api"; then ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" fi -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=6 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # CREATE DEDICATED USER #================================================= @@ -91,6 +84,21 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=6 + +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 + +# Create a dedicated PHP-FPM config +ynh_add_fpm_config + #================================================= # NGINX CONFIGURATION #================================================= @@ -100,15 +108,7 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - ynh_add_nginx_config #================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 - -# Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$phpversion - -#================================================= -# INSTALL LYCHEE WITH COMPOSER +# INSTALL 2FAUTH WITH COMPOSER #================================================= ynh_script_progression --message="Installing $app with Composer..." --weight=15 From 08715dffcd8a7f074eb39e80ec703c705282f926 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 20 Oct 2022 10:19:31 +0200 Subject: [PATCH 7/9] Upgrade --- conf/app.src | 4 ++-- manifest.json | 4 ++-- scripts/_common.sh | 2 +- scripts/install | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/conf/app.src b/conf/app.src index d577be0..fbe5786 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.3.3.tar.gz -SOURCE_SUM=d6611ae920922a9064509450c70256e68a6539ecaa0f641569913077abd71a30 +SOURCE_URL=https://github.com/Bubka/2FAuth/archive/refs/tags/v3.4.0.tar.gz +SOURCE_SUM=3262de96b5a1525b6b51dc679d655dd602d0cd523b8901dfbb0e25dd844a069d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index d8805f8..0b9af36 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "self-hosted alternative to One Time Passcode", "fr": "Alternative auto-hébergée a One Time Passcode" }, - "version": "3.3.3~ynh1", + "version": "3.4.0~ynh1", "url": "https://github.com/Bubka/2FAuth", "upstream": { "license": "AGPL-3.0", @@ -25,7 +25,7 @@ "multi_instance": true, "services": [ "nginx", - "php8.0-fpm", + "php8.1-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 3b24e4d..0ea39f5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="8.0" +YNH_PHP_VERSION="8.1" # Composer version YNH_COMPOSER_VERSION="2.3.5" diff --git a/scripts/install b/scripts/install index 78e399f..47c0c27 100755 --- a/scripts/install +++ b/scripts/install @@ -92,14 +92,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -108,6 +100,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # INSTALL 2FAUTH WITH COMPOSER #================================================= From 1a26960fc55299d7bfd5aec26f68252e5a23c258 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 20 Oct 2022 08:19:36 +0000 Subject: [PATCH 8/9] Auto-update README --- README.md | 3 +-- README_fr.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e4029d9..3b9ee25 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Shipped version:** 3.3.3~ynh1 - +**Shipped version:** 3.4.0~ynh1 **Demo:** https://demo.2fauth.app/login diff --git a/README_fr.md b/README_fr.md index 893cac7..9b8eae8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,8 +27,7 @@ It aims to ease you perform your 2FA authentication steps whatever the device yo - Edit accounts, even the imported ones - Generate TOTP and HOTP security codes -**Version incluse :** 3.3.3~ynh1 - +**Version incluse :** 3.4.0~ynh1 **Démo :** https://demo.2fauth.app/login From dd8a4d28c807aa92f04562b94e37f16e47873b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 20 Nov 2022 22:38:22 +0100 Subject: [PATCH 9/9] Fix --- conf/nginx.conf | 3 ++- scripts/_common.sh | 2 +- scripts/upgrade | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1033459..a10ee52 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,5 @@ -location / { +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { # Path to source root __FINALPATH__/public/; diff --git a/scripts/_common.sh b/scripts/_common.sh index 0ea39f5..fa08dce 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ YNH_PHP_VERSION="8.1" # Composer version -YNH_COMPOSER_VERSION="2.3.5" +YNH_COMPOSER_VERSION="2.4.4" pkg_dependencies="php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql" diff --git a/scripts/upgrade b/scripts/upgrade index bcb7b74..b04ed31 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,7 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) 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) +phpversion=$YNH_PHP_VERSION #================================================= # CHECK VERSION