From 2ac28893fc2b73a6e429b2b6ae9f9c3c441fe0ca Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 21 Sep 2020 15:58:32 +0200 Subject: [PATCH] upgrade dlibharr version, add required php extension dependancies, set it to php7.3 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 2 +- conf/php-fpm.conf | 2 +- manifest.json | 2 +- pull_request.md | 8 +++++--- scripts/_common.sh | 4 ++++ scripts/backup | 3 ++- scripts/restore | 5 +++-- 10 files changed, 21 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fec1578..0627cc4 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to ## Overview Dolibarr ERP & CRM is a modern software for managing your professional or associative activity (contacts, invoices, orders, stocks, agenda, etc.). -**Shipped version:** 11.0.5 +**Shipped version:** 12.0.2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 2e62528..c97dea6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble Dolibarr ERP & CRM est un logiciel moderne de gestion de votre activité professionnelle ou associative (contacts, factures, commandes, stocks, agenda, etc.). -**Version incluse :** 11.0.5 +**Version incluse :** 12.0.2 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index bf98f7d..d5a39c9 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/11.0.5.tar.gz -SOURCE_SUM=6f51435a4ffe576e836bf6449d900de9a56016f09591322cb2ba47a07c97679d +SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/12.0.2.tar.gz +SOURCE_SUM=81c3c01f2b9ef60b1944c0fff93d41589ef6f48b176ad3dee7f208d512c6d3a0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index d57e5af..4e954e5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,7 +17,7 @@ location __PATH__/ { try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 47aac58..5767f77 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -33,7 +33,7 @@ group = __USER__ ; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock +listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock ; Set listen(2) backlog. ; Default Value: 511 (-1 on FreeBSD and OpenBSD) diff --git a/manifest.json b/manifest.json index a8471a6..d5b582d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage the various aspects of your business or association (contacts, invoices, orders, stocks, agenda, etc...).", "fr": "Gérez les différents aspects de votre activité pro ou associative (contacts, factures, commandes, stocks, agenda, etc...)." }, - "version": "11.0.5~ynh1", + "version": "12.0.2~ynh1", "url": "https://www.dolibarr.org/", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/pull_request.md b/pull_request.md index 6a22559..1049911 100644 --- a/pull_request.md +++ b/pull_request.md @@ -5,8 +5,10 @@ - *easier yunohost integration* ## PR Status -- [ ] Code finished. +- [X] Code finished. - [ ] Tested with Package_check. - [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. +- [X] Upgrade from last version tested. +- [X] Can be reviewed and tested. +- [X] Upgrade php version +- [X] Update dependancies diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..8bb75d1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,10 @@ # PERSONAL HELPERS #================================================= +YNH_PHP_VERSION="7.3" + +pkg_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-intl" + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index 56f3788..1dbf4c3 100755 --- a/scripts/backup +++ b/scripts/backup @@ -27,6 +27,7 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # STANDARD BACKUP STEPS @@ -49,7 +50,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= ynh_script_progression --message="Backing up php-fpm configuration..." --weight=1 -ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf" +ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE diff --git a/scripts/restore b/scripts/restore index 9ba1062..4a1fb6e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -29,6 +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) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -74,7 +75,7 @@ chown -R root: $final_path # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf" +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= @@ -101,7 +102,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=1 -ynh_systemd_action --service_name=php7.0-fpm --action=reload +ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload #=================================================