From e51a7345e9d06c01d8227f6bd48561b91e85d60e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 22 Nov 2021 07:34:00 +0100 Subject: [PATCH 1/7] 4.3 --- manifest.json | 3 +-- scripts/_common.sh | 4 +--- scripts/install | 3 ++- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/manifest.json b/manifest.json index 40c596b..cc0ab02 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,6 @@ "website": "https://firefly-iii.org/", "demo": "https://demo.firefly-iii.org/login", "admindoc": "https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/introduction/", - "userdoc": "https://yunohost.org/apps", "code": "https://github.com/firefly-iii/firefly-iii" }, "license": "GPL-3.0-or-later", @@ -23,7 +22,7 @@ "url": "https://datamol.org" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index cfd7a85..e70716c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,14 +9,12 @@ latest_tag=$(curl -s https://api.github.com/repos/firefly-iii/firefly-iii/releases/latest | grep 'tag_name' | cut -d\" -f4) tag="5.5.11" -pkg_dependencies="redis-server" - YNH_PHP_VERSION="7.4" # Composer version YNH_COMPOSER_VERSION="2.0.13" -extra_php_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-ldap" +pkg_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-ldap" # Composer version YNH_COMPOSER_VERSION="2.0.13" diff --git a/scripts/install b/scripts/install index 7d6ed38..b48416f 100755 --- a/scripts/install +++ b/scripts/install @@ -27,6 +27,7 @@ is_public=$YNH_APP_ARG_IS_PUBLIC random_key=$(ynh_string_random --length=32) email=$(ynh_user_get_info --username=$admin --key=mail) update=1 + app=$YNH_APP_INSTANCE_NAME #================================================= @@ -112,7 +113,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=low --footprint=low phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/restore b/scripts/restore index 2a7dc07..fe501ad 100755 --- a/scripts/restore +++ b/scripts/restore @@ -75,7 +75,7 @@ ynh_script_progression --message="Restoring PHP-FPM configuration..." ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=low --footprint=low #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index dfebe20..05f5d7c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -165,7 +165,7 @@ ynh_install_app_dependencies "$pkg_dependencies" ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated php-fpm config -ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=low --footprint=low phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= From 79bba50dc8d39103189218dcc653437ee05de84c Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 22 Nov 2021 06:34:06 +0000 Subject: [PATCH 2/7] Auto-update README --- README.md | 1 - README_fr.md | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index 81a2a18..86d4ca9 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ Self-hosted financial manager ## Documentation and resources * Official app website: https://firefly-iii.org/ -* Official user documentation: https://yunohost.org/apps * Official admin documentation: https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/introduction/ * Upstream app code repository: https://github.com/firefly-iii/firefly-iii * YunoHost documentation for this app: https://yunohost.org/app_firefly-iii diff --git a/README_fr.md b/README_fr.md index 2ed3e32..8928282 100644 --- a/README_fr.md +++ b/README_fr.md @@ -25,7 +25,6 @@ Gestionnaire de finances personnelles ## Documentations et ressources * Site officiel de l'app : https://firefly-iii.org/ -* Documentation officielle utilisateur : https://yunohost.org/apps * Documentation officielle de l'admin : https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/introduction/ * Dépôt de code officiel de l'app : https://github.com/firefly-iii/firefly-iii * Documentation YunoHost pour cette app : https://yunohost.org/app_firefly-iii From 1a6a089897686706e9fc2dfc5b578acaed945ee8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 29 Nov 2021 10:34:02 +0100 Subject: [PATCH 3/7] Fix --- conf/.env | 2 +- conf/nginx.conf | 5 ----- scripts/_common.sh | 3 --- scripts/install | 3 ++- scripts/restore | 3 +-- scripts/upgrade | 3 +-- 6 files changed, 5 insertions(+), 14 deletions(-) diff --git a/conf/.env b/conf/.env index 23d51b3..5cd1104 100644 --- a/conf/.env +++ b/conf/.env @@ -7,7 +7,7 @@ APP_DEBUG=false # This should be your email address. # If you use Docker or similar, you can set this variable from a file by using SITE_OWNER_FILE -SITE_OWNER=mail@example.com +SITE_OWNER=__EMAIL__ # The encryption key for your sessions. Keep this very secure. # Change it to a string of exactly 32 chars or use something like `php artisan key:generate` to generate it. diff --git a/conf/nginx.conf b/conf/nginx.conf index 40ff3ab..98b151f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/public/; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; if (!-e $request_filename) { diff --git a/scripts/_common.sh b/scripts/_common.sh index e70716c..d3170e4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -16,9 +16,6 @@ YNH_COMPOSER_VERSION="2.0.13" pkg_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-ldap" -# Composer version -YNH_COMPOSER_VERSION="2.0.13" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index b48416f..9beb585 100755 --- a/scripts/install +++ b/scripts/install @@ -26,6 +26,7 @@ admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC random_key=$(ynh_string_random --length=32) email=$(ynh_user_get_info --username=$admin --key=mail) +phpversion=$YNH_PHP_VERSION update=1 app=$YNH_APP_INSTANCE_NAME @@ -51,6 +52,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=random_key --value=$random_key ynh_app_setting_set --app=$app --key=update --value=$update +ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion #================================================= # INSTALL DEPENDENCIES @@ -114,7 +116,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=low -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC SETUP diff --git a/scripts/restore b/scripts/restore index fe501ad..79f4e8c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -36,8 +36,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." -test ! -d $final_path \ -|| ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS diff --git a/scripts/upgrade b/scripts/upgrade index 05f5d7c..a9f6ad2 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,11 +25,11 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) random_key=$(ynh_app_setting_get --app=$app --key=random_key) email=$(ynh_user_get_info --username=$admin --key=mail) update=$(ynh_app_setting_get --app=$app --key=update) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -166,7 +166,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated php-fpm config ynh_add_fpm_config --usage=low --footprint=low -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC UPGRADE From 3fb6bc7ad5e84e11f29aa6b943cb4b75f3613123 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 29 Nov 2021 12:44:54 +0100 Subject: [PATCH 4/7] --quiet --- scripts/install | 2 +- scripts/upgrade | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 9beb585..d30a0fe 100755 --- a/scripts/install +++ b/scripts/install @@ -94,7 +94,7 @@ ynh_script_progression --message="Cloning Firefly-iii..." ynh_app_setting_set --app=$app --key=final_path --value=$final_path -git clone -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path +git clone -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path --quiet chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index a9f6ad2..c9ac4fd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -92,11 +92,11 @@ then pushd "$final_path" if [ $update -eq 1 ] then - git fetch origin tag $latest_tag --no-tags - git checkout $latest_tag + git fetch --quiet origin tag $latest_tag --no-tags + git checkout --quiet $latest_tag else - git fetch origin tag $tag --no-tags - git checkout $tag + git fetch --quiet origin tag $tag --no-tags + git checkout --quiet $tag --quiet fi ynh_secure_remove bootstrap/cache/* ynh_secure_remove vendor/ @@ -120,10 +120,10 @@ then if [ $update -eq 1 ] then - git clone -b $latest_tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path + git clone --quiet -b $latest_tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path else - git clone -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path + git clone --quiet -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path fi From f9175cb1960b3540052c0bb8e1cba1c8e1d3b757 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 29 Nov 2021 12:47:02 +0100 Subject: [PATCH 5/7] remove logrotate --- scripts/backup | 8 -------- scripts/install | 8 -------- scripts/remove | 8 -------- scripts/restore | 7 ------- scripts/upgrade | 8 -------- 5 files changed, 39 deletions(-) diff --git a/scripts/backup b/scripts/backup index 4650867..81b0f6d 100755 --- a/scripts/backup +++ b/scripts/backup @@ -52,14 +52,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - -ynh_backup --src_path="/etc/logrotate.d/$app" - #================================================= # BACKUP A CRON FILE #================================================= diff --git a/scripts/install b/scripts/install index d30a0fe..57e731f 100755 --- a/scripts/install +++ b/scripts/install @@ -155,14 +155,6 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Configuring log rotation..." - -# Use logrotate to manage application logfile(s) -ynh_use_logrotate - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/remove b/scripts/remove index 0f5539b..836eed0 100755 --- a/scripts/remove +++ b/scripts/remove @@ -73,14 +73,6 @@ ynh_script_progression --message="Removing the cron file..." # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" -#================================================= -# REMOVE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Removing logrotate configuration..." - -# Remove the app-specific logrotate config -ynh_remove_logrotate - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 79f4e8c..47af4d6 100755 --- a/scripts/restore +++ b/scripts/restore @@ -102,13 +102,6 @@ ynh_script_progression --message="Restoring the cron file..." ynh_restore_file --origin_path="/etc/cron.d/$app" -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c9ac4fd..95977ad 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -201,14 +201,6 @@ pushd "$final_path" php$phpversion artisan cache:clear popd -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_script_progression --message="Upgrading logrotate configuration..." - -# Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate --non-append - #================================================= # SETUP A CRON #================================================= From 99a8cc35feeb9972284c25fe11949158fe2c1b63 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 29 Nov 2021 13:24:41 +0100 Subject: [PATCH 6/7] Fix --- scripts/restore | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 47af4d6..a19396b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -29,7 +29,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) db_user=$db_name -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +phpversion=$YNH_PHP_VERSION #================================================= # CHECK IF THE APP CAN BE RESTORED diff --git a/scripts/upgrade b/scripts/upgrade index 95977ad..4ae1e97 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,7 +25,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) random_key=$(ynh_app_setting_get --app=$app --key=random_key) email=$(ynh_user_get_info --username=$admin --key=mail) update=$(ynh_app_setting_get --app=$app --key=update) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +phpversion=$YNH_PHP_VERSION #================================================= # CHECK VERSION From 8c3e0f29f62c2916bae6a59e4a52ef910d932d60 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 29 Nov 2021 13:30:26 +0100 Subject: [PATCH 7/7] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 57e731f..fbeb2e3 100755 --- a/scripts/install +++ b/scripts/install @@ -94,7 +94,7 @@ ynh_script_progression --message="Cloning Firefly-iii..." ynh_app_setting_set --app=$app --key=final_path --value=$final_path -git clone -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path --quiet +git clone --quiet -b $tag --depth 1 https://github.com/firefly-iii/firefly-iii.git $final_path chmod 750 "$final_path" chmod -R o-rwx "$final_path"