From 2ac28893fc2b73a6e429b2b6ae9f9c3c441fe0ca Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 21 Sep 2020 15:58:32 +0200 Subject: [PATCH 1/9] 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 #================================================= From 72bddbb2e456ef781b88098537fb79ef4403187e Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 21 Sep 2020 16:06:52 +0200 Subject: [PATCH 2/9] add install dependencies --- scripts/install | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/install b/scripts/install index d4b709b..fe1f49e 100644 --- a/scripts/install +++ b/scripts/install @@ -52,6 +52,13 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=version --value=$(ynh_app_upstream_version "../manifest.json") +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # STANDARD MODIFICATIONS #================================================= From ee1277e0d48e61d8693128aacac9f019aabcb740 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 21 Sep 2020 16:11:17 +0200 Subject: [PATCH 3/9] add install dependencies --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 8bb75d1..7224e84 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -10,7 +10,7 @@ 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" +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 php${YNH_PHP_VERSION}-mbstring" #================================================= # EXPERIMENTAL HELPERS From 4a3ebfc0d410df772c3d269e943c7739567ffdfd Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 28 Sep 2020 11:17:52 +0200 Subject: [PATCH 4/9] upgrade to 12.0.3 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 2 +- pull_request.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0627cc4..1beac67 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:** 12.0.2 +**Shipped version:** 12.0.3 ## Screenshots diff --git a/README_fr.md b/README_fr.md index c97dea6..c385e42 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 :** 12.0.2 +**Version incluse :** 12.0.3 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index d5a39c9..bca29dc 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/12.0.2.tar.gz -SOURCE_SUM=81c3c01f2b9ef60b1944c0fff93d41589ef6f48b176ad3dee7f208d512c6d3a0 +SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/12.0.3.tar.gz +SOURCE_SUM=672783519becbdd0d0fcbd43469d5d06f4d40d519317104e60cf29093402f700 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index d5b582d..4d876b5 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": "12.0.2~ynh1", + "version": "12.0.3~ynh1", "url": "https://www.dolibarr.org/", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/pull_request.md b/pull_request.md index 1049911..eca9267 100644 --- a/pull_request.md +++ b/pull_request.md @@ -7,7 +7,7 @@ ## PR Status - [X] Code finished. - [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. +- [X] Fix or enhancement tested. - [X] Upgrade from last version tested. - [X] Can be reviewed and tested. - [X] Upgrade php version From 54aea268646255fa9187bf5d7497024cb82613a8 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 28 Sep 2020 11:37:02 +0200 Subject: [PATCH 5/9] last upgrade --- conf/php-fpm.conf | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 conf/php-fpm.conf diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf deleted file mode 100644 index e69de29..0000000 From 44d3996b64cb3e592bfb409adb24df5bf1e35b10 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 29 Sep 2020 11:12:18 +0200 Subject: [PATCH 6/9] check with masterteur update --- scripts/_common.sh | 4 ---- scripts/install | 9 +-------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 674964e..5de49a8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -23,10 +23,6 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-mysql \ # 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 php${YNH_PHP_VERSION}-mbstring" - #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index b4637e3..5558e7a 100644 --- a/scripts/install +++ b/scripts/install @@ -51,13 +51,6 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=version --value=$(ynh_app_upstream_version "../manifest.json") -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Installing dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -104,7 +97,7 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring php-fpm..." --weight=2 +ynh_script_progression --message="Configuring php-fpm and install dependencies..." --weight=2 # Create a dedicated php-fpm config ynh_add_fpm_config --usage=medium --footprint=medium --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" From 9d84289ace7c285b61d623382284f7a5f72db6b4 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 29 Sep 2020 11:18:47 +0200 Subject: [PATCH 7/9] done check with package_linter --- pull_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pull_request.md b/pull_request.md index eca9267..7617707 100644 --- a/pull_request.md +++ b/pull_request.md @@ -6,7 +6,7 @@ ## PR Status - [X] Code finished. -- [ ] Tested with Package_check. +- [X] Tested with Package_check. - [X] Fix or enhancement tested. - [X] Upgrade from last version tested. - [X] Can be reviewed and tested. From 5bff4ef9a796cefa28ebc0f7923e03d5bbae25b3 Mon Sep 17 00:00:00 2001 From: mastereur <22839524+mastereur@users.noreply.github.com> Date: Tue, 29 Sep 2020 11:56:11 +0200 Subject: [PATCH 8/9] Remove unused argument --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index f2b5234..368ff0b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -77,7 +77,7 @@ chown -R root: $final_path #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_print_info --message="Reconfiguring PHP-FPM..." --weight=50 +ynh_print_info --message="Reconfiguring PHP-FPM..." ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" From 0bc48f1b742a9b2ae8d9a04578bbc38898094a9c Mon Sep 17 00:00:00 2001 From: mastereur <22839524+mastereur@users.noreply.github.com> Date: Tue, 29 Sep 2020 11:57:53 +0200 Subject: [PATCH 9/9] Remove unused argument --- scripts/backup | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/backup b/scripts/backup index 732ba88..35d1b03 100755 --- a/scripts/backup +++ b/scripts/backup @@ -36,21 +36,21 @@ ynh_print_info --message="Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_print_info --message="Backing up the main app directory..." --weight=1 +ynh_print_info --message="Backing up the main app directory..." ynh_backup --src_path="$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_print_info --message="Backing up nginx web server configuration..." --weight=1 +ynh_print_info --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE PHP-FPM CONFIGURATION #================================================= -ynh_print_info --message="Backing up php-fpm configuration..." --weight=1 +ynh_print_info --message="Backing up php-fpm configuration..." ynh_backup --src_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" @@ -59,7 +59,7 @@ ynh_backup --src_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" #================================================= # BACKUP LOGROTATE #================================================= -ynh_print_info --message="Backing up logrotate configuration..." --weight=1 +ynh_print_info --message="Backing up logrotate configuration..." ynh_backup --src_path="/etc/logrotate.d/$app"