diff --git a/README.md b/README.md index 45d673f..6b40b3e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Kanban project management software -**Shipped version:** 1.2.20~ynh4 +**Shipped version:** 1.2.21~ynh1 **Demo:** https://demo.yunohost.org/kanboard/ @@ -44,7 +44,6 @@ This is due to a Kanboard limitation. ## Documentation and resources * Official app website: https://kanboard.net -* Official user documentation: https://yunohost.org/#/app_kanboard * Official admin documentation: https://docs.kanboard.org/en/latest/ * Upstream app code repository: https://github.com/kanboard/kanboard * YunoHost documentation for this app: https://yunohost.org/app_kanboard diff --git a/README_fr.md b/README_fr.md index 8e58e28..8222b52 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Logiciel de gestion de projet Kanban -**Version incluse :** 1.2.20~ynh4 +**Version incluse :** 1.2.21~ynh1 **Démo :** https://demo.yunohost.org/kanboard/ @@ -40,7 +40,6 @@ Cela est dû à une limitation de Kanboard. ## Documentations et ressources * Site officiel de l'app : https://kanboard.net -* Documentation officielle utilisateur : https://yunohost.org/#/app_kanboard * Documentation officielle de l'admin : https://docs.kanboard.org/en/latest/ * Dépôt de code officiel de l'app : https://github.com/kanboard/kanboard * Documentation YunoHost pour cette app : https://yunohost.org/app_kanboard diff --git a/conf/app.src b/conf/app.src index df08d81..cdd8441 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,5 @@ -SOURCE_URL=https://github.com/kanboard/kanboard/archive/refs/tags/v1.2.20.tar.gz -SOURCE_SUM=e94c8b75b34a1346f2a5ef7faf8c2300fb05b37a850723d9b92b1d4f0f7d9665 +SOURCE_URL=https://github.com/kanboard/kanboard/archive/refs/tags/v1.2.21.tar.gz +SOURCE_SUM=95b542d63f7cafcc79d76493d184e4f65110fb6294816fa1550a4b34ae65da0b 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 f1689fc..352dcd4 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,17 +4,12 @@ location __PATH__/ { # Path to source alias __FINALPATH__/; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; client_max_body_size 50M; try_files $uri $uri/ /index.php?$args; # Override CSP header to make SSOWAT user panel compatible with kanboard - more_set_headers Content-Security-Policy "default-src 'self' 'unsafe-eval' data:;"; + more_set_headers "Content-Security-Policy default-src 'self' 'unsafe-eval' data:;"; location __PATH__/(?:kanboard|config.php|config.default.php) { deny all; diff --git a/manifest.json b/manifest.json index fa9d880..10190ff 100644 --- a/manifest.json +++ b/manifest.json @@ -6,14 +6,13 @@ "en": "Kanban project management software", "fr": "Logiciel de gestion de projet Kanban" }, - "version": "1.2.20~ynh4", + "version": "1.2.21~ynh1", "url": "https://kanboard.net", "upstream": { "license": "MIT", "website": "https://kanboard.net", "demo": "https://demo.yunohost.org/kanboard/", "admindoc": "https://docs.kanboard.org/en/latest/", - "userdoc": "https://yunohost.org/#/app_kanboard", "code": "https://github.com/kanboard/kanboard" }, "license": "MIT", @@ -22,7 +21,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "previous_maintainers": [{ "name": "mbugeia", @@ -42,8 +41,7 @@ "install": [ { "name": "domain", - "type": "domain", - "example": "domain.org" + "type": "domain" }, { "name": "path", @@ -53,8 +51,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/_common.sh b/scripts/_common.sh index cea4e7d..6eb3532 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysql" +pkg_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-mysql" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 90eb570..e306a83 100644 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,13 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=adminusername --value=$admin +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=3 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # STANDARD MODIFICATIONS #================================================= @@ -97,7 +104,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=16 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/remove b/scripts/remove index 80922e1..2284ff9 100644 --- a/scripts/remove +++ b/scripts/remove @@ -62,6 +62,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 3ca47c6..fa63911 100644 --- a/scripts/restore +++ b/scripts/restore @@ -33,10 +33,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -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 " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -75,7 +72,7 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config #================================================= # SPECIFIC RESTORATION @@ -97,6 +94,14 @@ ynh_restore_file "/etc/fail2ban/jail.d/$app.conf" ynh_restore_file "/etc/fail2ban/filter.d/$app.conf" ynh_systemd_action --action=restart --service_name=fail2ban +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=3 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE CRON FILE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 815fbec..676f89d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -32,6 +32,20 @@ email=$(ynh_user_get_info --username=$admin --key=mail) upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up Kanboard before upgrading (may take a while)..." --weight=5 + +# 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 #================================================= @@ -56,20 +70,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up Kanboard before upgrading (may take a while)..." --weight=5 - -# 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 DEDICATED USER #================================================= @@ -108,13 +108,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=3 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # PHP-FPM CONFIGURATION #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config #================================================= # UPGRADE KANBOARD