diff --git a/README.md b/README.md index 0410d8b..a45afa4 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,18 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Kanban project management software +Kanboard is a free and open source Kanban project management software. -**Shipped version:** 1.2.21~ynh4 +### Features + +- Visualize your work +- Limit your work in progress to focus on your goal +- Drag and drop tasks to manage your project +- Self-hosted +- Super simple installation + + +**Shipped version:** 1.2.22~ynh1 **Demo:** https://demo.yunohost.org/kanboard/ diff --git a/README_fr.md b/README_fr.md index 9c245ea..dbe147d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,9 +15,17 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Logiciel de gestion de projet Kanban +Kanboard est un logiciel de gestion de projet Kanban gratuit et open source. -**Version incluse :** 1.2.21~ynh4 +### Fonctionnalités + +- Visualisez votre travail +- Limitez votre travail en cours pour vous concentrer sur votre objectif +- Glisser et déposez des tâches pour gérer votre projet +- Auto-hébergé + + +**Version incluse :** 1.2.22~ynh1 **Démo :** https://demo.yunohost.org/kanboard/ diff --git a/check_process b/check_process index 82cfcb1..5ca5d45 100644 --- a/check_process +++ b/check_process @@ -12,11 +12,12 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=c20bdd69644de72736cdc4438a36faab9ab24c72 + #1.2.21~ynh3 + upgrade=1 from_commit=b667e4d5fd9cc860f706ad7e4e41208cf1d04f2a backup_restore=1 multi_instance=1 change_url=1 ;;; Upgrade options - ; commit=c20bdd69644de72736cdc4438a36faab9ab24c72 - name=Merge pull request #114 from YunoHost-Apps/testing + ; commit=b667e4d5fd9cc860f706ad7e4e41208cf1d04f2a + name=Merge pull request #133 from YunoHost-Apps/testing manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=Yes& diff --git a/conf/app.src b/conf/app.src index 754d316..6e82cd9 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/kanboard/kanboard/archive/refs/tags/v1.2.21.tar.gz -SOURCE_SUM=5ae2dc9591b7223eba5b83e4ae8855a806b6be3c7b78bb92093632f2e6572f97 +SOURCE_URL=https://github.com/kanboard/kanboard/archive/refs/tags/v1.2.22.tar.gz +SOURCE_SUM=f609a23eb6e755297fee1b534b43ba8a913baaf60ece31840786b788cba2e641 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/config.php b/conf/config.php index 2a097d3..1060ce3 100644 --- a/conf/config.php +++ b/conf/config.php @@ -1,24 +1,32 @@ /dev/null diff --git a/conf/cron_kanboard b/conf/cron_kanboard deleted file mode 100644 index 9d2d511..0000000 --- a/conf/cron_kanboard +++ /dev/null @@ -1,2 +0,0 @@ -# Execute the daily cronjob at 8am -0 8 * * * __APP__ cd "__FINALPATH__" && PHP__PHPVERSION__ ./cli cronjob >/dev/null 2>&1 diff --git a/conf/nginx.conf b/conf/nginx.conf index 4731a80..63d1f6b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -6,7 +6,7 @@ location __PATH__/ { index index.php; client_max_body_size 50M; - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ __PATH__/index.php; # Override CSP header to make SSOWAT user panel compatible with kanboard more_set_headers "Content-Security-Policy: default-src 'self' 'unsafe-eval' data:; style-src 'self' 'unsafe-inline'"; diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..f5d50c7 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,9 @@ +Kanboard is a free and open source Kanban project management software. + +### Features + +- Visualize your work +- Limit your work in progress to focus on your goal +- Drag and drop tasks to manage your project +- Self-hosted +- Super simple installation diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..9f3a2a6 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,8 @@ +Kanboard est un logiciel de gestion de projet Kanban gratuit et open source. + +### Fonctionnalités + +- Visualisez votre travail +- Limitez votre travail en cours pour vous concentrer sur votre objectif +- Glisser et déposez des tâches pour gérer votre projet +- Auto-hébergé diff --git a/manifest.json b/manifest.json index e7c1445..187388e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Kanban project management software", "fr": "Logiciel de gestion de projet Kanban" }, - "version": "1.2.21~ynh4", + "version": "1.2.22~ynh1", "url": "https://kanboard.net", "upstream": { "license": "MIT", @@ -34,7 +34,7 @@ "multi_instance": true, "services": [ "nginx", - "php7.3-fpm", + "php8.0-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 6eb3532..168ac6c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,9 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" -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" +pkg_dependencies="php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-opcache php${YNH_PHP_VERSION}-curl 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 php${YNH_PHP_VERSION}-ldap" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index 4ddf7a7..cdeb5d9 100644 --- a/scripts/backup +++ b/scripts/backup @@ -74,4 +74,4 @@ ynh_mysql_dump_db --database="$db_name" > db.sql # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for Kanboard. (YunoHost will then actually copy those files to the archive)." +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 6d24ff0..32a4874 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -127,4 +127,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for Kanboard" --last +ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index e306a83..cb74c22 100644 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,11 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ### Remove this function if there's nothing to clean before calling the remove script. + true +} +# Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= @@ -21,16 +26,17 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH -admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN email=$(ynh_user_get_info --username=$admin --key=mail) +phpversion=$YNH_PHP_VERSION app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." +ynh_script_progression --message="Validating installation parameters..." --weight=1 # Check destination directory final_path=/var/www/$app @@ -42,10 +48,10 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." +ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=adminusername --value=$admin +ynh_app_setting_set --app=$app --key=admin --value=$admin #================================================= # INSTALL DEPENDENCIES @@ -62,8 +68,9 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Creating a MySQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) +db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name #================================================= # CREATE DEDICATED USER @@ -90,14 +97,6 @@ chmod -R 700 $final_path/sessions chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 - -# Create a dedicated nginx config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -107,12 +106,20 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=16 ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 + +# Create a dedicated nginx config +ynh_add_nginx_config + #================================================= # SPECIFIC SETUP #================================================= # CREATE CONFIG.PHP #================================================= -ynh_script_progression --message="Configuring Kanboard..." +ynh_script_progression --message="Configuring the app..." dir="__DIR__" ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" @@ -125,7 +132,7 @@ chown $app "$final_path/config.php" #================================================= ynh_script_progression --message="Initializing database..." --weight=7 -ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" < "${final_path}/app/Schema/Sql/mysql.sql" +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "$final_path/app/Schema/Sql/mysql.sql" pushd $final_path # Launch database migration @@ -144,23 +151,23 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-error.log" --failregex #================================================= ynh_script_progression --message="Setuping a cron..." --weight=1 -ynh_add_config --template="../conf/cron_kanboard" --destination="/etc/cron.d/$app" - +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=2 +ynh_script_progression --message="Configuring permissions..." --weight=2 # Make app public or private if [ $is_public -eq 1 ] then ynh_permission_update --permission="main" --add="visitors" - ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php" ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php" + ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php" else ynh_app_setting_set --app=$app --key=unprotected_uris --value="/jsonrpc.php" fi @@ -179,4 +186,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of Kanboard completed" --last +ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 2284ff9..0ea5c65 100644 --- a/scripts/remove +++ b/scripts/remove @@ -19,6 +19,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) 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 #================================================= # STANDARD REMOVE @@ -36,12 +37,12 @@ ynh_remove_app_dependencies ynh_script_progression --message="Removing the MySQL database..." --weight=4 # Remove a database if it exists, along with the associated user -ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name +ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing Kanboard main directory..." +ynh_script_progression --message="Removing the app main directory..." # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -99,4 +100,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of Kanboard completed" --last +ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore index fa63911..925e75f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,6 +26,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) +db_user=$db_name phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -33,16 +34,11 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -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 -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -54,7 +50,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring Kanboard main directory..." --weight=5 +ynh_script_progression --message="Restoring the app main directory..." --weight=5 ynh_restore_file --origin_path="$final_path" @@ -66,13 +62,16 @@ chown -R $app $final_path/{data,plugins,sessions} #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6 +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=5 -# Restore the file first, so it can have a backup if different ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -# Recreate a dedicated PHP-FPM config -ynh_add_fpm_config +#================================================= +# 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" #================================================= # SPECIFIC RESTORATION @@ -82,8 +81,8 @@ ynh_add_fpm_config ynh_script_progression --message="Restoring the MySQL database..." --weight=3 db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd -ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= # RESTORE FAIL2BAN CONFIGURATION @@ -108,6 +107,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Restoring the cron file..." --weight=2 ynh_restore_file --origin_path="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" #================================================= @@ -124,4 +124,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for Kanboard" --last +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 676f89d..e8c7d16 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,13 +18,10 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -admin=$(ynh_app_setting_get --app=$app --key=adminusername) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) +admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -email=$(ynh_user_get_info --username=$admin --key=mail) +phpversion=$YNH_PHP_VERSION #================================================= # CHECK VERSION @@ -35,7 +32,7 @@ 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 +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=5 # Backup the current version of the app ynh_backup_before_upgrade @@ -89,7 +86,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/config.php" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/data $final_path/config.php" fi mkdir -p $final_path/sessions/ @@ -100,13 +97,6 @@ chmod -R 700 $final_path/sessions chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES @@ -123,10 +113,18 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # UPGRADE KANBOARD #================================================= -ynh_script_progression --message="Upgrading Kanboard..." --weight=2 +ynh_script_progression --message="Upgrading the app..." --weight=2 pushd $final_path # Launch database migration @@ -145,29 +143,12 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-error.log" --failregex #================================================= # SETUP CRON #================================================= -ynh_script_progression --message="Setuping a cron..." - -ynh_add_config --template="../conf/cron_kanboard" --destination="/etc/cron.d/$app" +ynh_script_progression --message="Setuping a cron..." --weight=2 +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=2 - -# Make app public or private -if [ $is_public -eq 1 ] -then - ynh_permission_update --permission="main" --add="visitors" - ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$final_path/config.php" - ynh_replace_string --match_string="define('DISABLE_LOGOUT'.*$" --replace_string="define('DISABLE_LOGOUT', false);" --target_file="$final_path/config.php" -else - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/jsonrpc.php" -fi - #================================================= # RELOAD NGINX #================================================= @@ -179,4 +160,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of Kanboard completed" --last +ynh_script_progression --message="Installation of $app completed" --last