diff --git a/manifest.toml b/manifest.toml index 9e4e6ba..373328a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Tiki" description.en = "Wiki-based, content management system" description.fr = "Système de gestion de contenu basé sur Wiki" -version = "26.2~ynh1" +version = "26.2~ynh2" maintainers = [] @@ -17,7 +17,7 @@ admindoc = "https://doc.tiki.org" code = "https://gitlab.com/tikiwiki/tiki/" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/backup b/scripts/backup index ba7792d..4588c64 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -19,15 +18,11 @@ ynh_backup "$install_dir" ynh_backup "$data_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" #================================================= diff --git a/scripts/install b/scripts/install index e22a097..fc58c78 100755 --- a/scripts/install +++ b/scripts/install @@ -5,18 +5,6 @@ source /usr/share/yunohost/helpers ynh_app_setting_set --key=php_upload_max_filesize --value=256M -#REMOVEME? Everything about fpm_footprint is removed in helpers2.1... | fpm_footprint="low" -#REMOVEME? Everything about fpm_free_footprint is removed in helpers2.1... | fpm_free_footprint=0 -#REMOVEME? Everything about fpm_usage is removed in helpers2.1... | fpm_usage="low" - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= - -#REMOVEME? Everything about fpm_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_footprint --value=$fpm_footprint -#REMOVEME? Everything about fpm_free_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_free_footprint --value=$fpm_free_footprint -#REMOVEME? Everything about fpm_usage is removed in helpers2.1... | ynh_app_setting_set --key=fpm_usage --value=$fpm_usage - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -31,17 +19,13 @@ fi ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id_to_use" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= -# NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression "Configuring NGINX web server..." +ynh_script_progression "Adding system configurations related to $app..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm #================================================= diff --git a/scripts/remove b/scripts/remove index dc7ebbf..9f3b139 100755 --- a/scripts/remove +++ b/scripts/remove @@ -8,13 +8,10 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Removing system configurations related to $app..." -# Remove the app-specific logrotate config ynh_config_remove_logrotate -# Remove the dedicated NGINX config ynh_config_remove_nginx -# Remove the dedicated PHP-FPM config ynh_config_remove_phpfpm #================================================= diff --git a/scripts/restore b/scripts/restore index 6fcb778..ff177f0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -11,8 +10,6 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= @@ -32,8 +29,6 @@ ynh_mysql_db_shell < ./db.sql #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression "Restoring system configurations related to $app..." ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index a74985c..5818915 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -10,64 +10,31 @@ ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M #================================================= ynh_script_progression "Ensuring downward compatibility..." -# If fpm_footprint doesn't exist, create it -if [ -z "${fpm_footprint:-}" ]; then - fpm_footprint=low -#REMOVEME? Everything about fpm_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_footprint --value=$fpm_footprint -fi - -# If fpm_free_footprint doesn't exist, create it -if [ -z "${fpm_free_footprint:-}" ]; then - fpm_free_footprint=0 -#REMOVEME? Everything about fpm_free_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_free_footprint --value=$fpm_free_footprint -fi - -# If fpm_usage doesn't exist, create it -if [ -z "${fpm_usage:-}" ]; then - fpm_usage=low -#REMOVEME? Everything about fpm_usage is removed in helpers2.1... | ynh_app_setting_set --key=fpm_usage --value=$fpm_usage -fi - -# If release_cycle doesn't exist, create it -# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=release_cycle --value=longterm -if [ -z "${release_cycle:-}" ]; then - release_cycle=longterm - ynh_app_setting_set --key=release_cycle --value=$release_cycle -fi +ynh_app_setting_set_default --key=release_cycle --value=longterm #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression "Upgrading source files..." -# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed -if ynh_app_upstream_version_changed +source_id_to_use="main" +if [[ "$release_cycle" == "longterm" ]] then - ynh_script_progression "Upgrading source files..." - - # Download, check integrity, uncompress and patch the source from app.src - source_id_to_use="main" - if [[ "$release_cycle" == "longterm" ]] - then - source_id_to_use="lts" - fi - - ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id_to_use" + source_id_to_use="lts" fi -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" +ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id_to_use" + # Update database (cd "$install_dir" && ynh_exec_as_app php${php_version} --define apc.enable_cli=1 console.php database:update) #================================================= -# NGINX CONFIGURATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression "Upgrading NGINX web server configuration..." +ynh_script_progression "Upgrading system configurations related to $app..." -# Create a dedicated NGINX config ynh_config_add_nginx -# Create a dedicated PHP-FPM config ynh_config_add_phpfpm #=================================================