From 067923c98c6800b4bd1b808865f719dd99ef2de1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Jan 2021 14:09:35 +0100 Subject: [PATCH 1/8] Fix --- conf/nginx.conf | 2 +- scripts/backup | 3 ++- scripts/change_url | 2 +- scripts/install | 16 +++++++--------- scripts/restore | 6 +++--- scripts/upgrade | 38 ++++++-------------------------------- 6 files changed, 20 insertions(+), 47 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 3e2f651..dc9ee4f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -24,7 +24,7 @@ location __PATH__/ { fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_read_timeout 600; + fastcgi_read_timeout 600; } # Include SSOWAT user panel. diff --git a/scripts/backup b/scripts/backup index 35d1b03..ae210e7 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) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -52,7 +53,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= ynh_print_info --message="Backing up php-fpm configuration..." -ynh_backup --src_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" +ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # SPECIFIC BACKUP diff --git a/scripts/change_url b/scripts/change_url index ced769b..9c78c4e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -32,7 +32,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." --weight=1 +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 # Backup the current version of the app ynh_backup_before_upgrade diff --git a/scripts/install b/scripts/install index f5286fa..cb1f84a 100644 --- a/scripts/install +++ b/scripts/install @@ -26,7 +26,6 @@ admin=$YNH_APP_ARG_ADMIN member=$YNH_APP_ARG_MEMBER is_public=0 - app=$YNH_APP_INSTANCE_NAME #================================================= @@ -100,7 +99,7 @@ ynh_system_user_create --username=$app 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" +ynh_add_fpm_config --usage=medium --footprint=medium --package="$extra_php_dependencies" #================================================= # SPECIFIC SETUP @@ -139,11 +138,10 @@ chown -R $app: "$final_path" # Set the app as temporarily public for curl call ynh_script_progression --message="Configuring SSOwat..." --weight=1 -ynh_app_setting_set --app=$app --key=skipped_uris --value="/" -# Reload SSOwat config -yunohost app ssowatconf +# Set the app as temporarily public for cURL call +ynh_permission_update --permission "main" --add "visitors" -# Reload Nginx +# Reload NGINX ynh_systemd_action --service_name=nginx --action=reload # Installation with curl @@ -251,10 +249,10 @@ ynh_use_logrotate --logfile="$final_path/documents/dolibarr.log" #================================================= ynh_script_progression --message="Configuring SSOwat..." --weight=1 -# Make app public if necessary -if [ $is_public -eq 1 ] +# Make app public if necessary or protect it +if [ $is_public -eq 0 ] then - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission "main" --remove "visitors" fi ynh_permission_create --permission "public access" --url "/public/" --allowed "visitors" diff --git a/scripts/restore b/scripts/restore index d7cfd4d..e3c3f42 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,6 +33,7 @@ datadir=$final_path/documents/ fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) +phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -81,8 +82,7 @@ ynh_print_info --message="Reconfiguring PHP-FPM..." ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" - +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies" #================================================= # SPECIFIC RESTORATION @@ -119,7 +119,7 @@ chmod go-w $datadir #================================================= ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=1 -ynh_systemd_action --service_name=php$YNH_PHP_VERSION-fpm --action=reload +ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 18177d7..a075097 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,6 +29,7 @@ datadir=$final_path/documents/ fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) +phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) #================================================= # CHECK VERSION @@ -91,18 +92,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -# N.B. : this is for app installations before YunoHost 2.7 -# where this value might be something like /foo/ or foo/ -# instead of /foo .... -# If nobody installed your app before 2.7, then you may -# safely remove this line -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -123,7 +112,7 @@ fi ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1 # Create a dedicated nginx config -ynh_add_nginx_config YNH_PHP_VERSION +ynh_add_nginx_config #================================================= # CREATE DEDICATED USER @@ -145,8 +134,7 @@ if [ -f "/etc/php/$old_php_version/fpm/pool.d/$app.conf" ]; then fi # Create a dedicated php-fpm config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" - +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies" #================================================= # SPECIFIC UPGRADE @@ -171,17 +159,17 @@ then # Upgrade with CURL pushd $final_path/htdocs/install/ - if php upgrade.php $current_version $update_version > /var/log/$app/upgrade.html; then + if php$phpversion upgrade.php $current_version $update_version > /var/log/$app/upgrade.html; then ynh_print_info --message="Step 1 upgrading ended successfully" else ynh_print_warn --message="Step 1 upgrading ended with error" fi - if php upgrade2.php $current_version $update_version > /var/log/$app/upgrade2.html; then + if php$phpversion upgrade2.php $current_version $update_version > /var/log/$app/upgrade2.html; then ynh_print_info --message="Step 2 upgrading ended successfully" else ynh_print_warn --message="Step 2 upgrading ended with error" fi - if php step5.php $current_version $update_version > /var/log/$app/upgrade3.html; then + if php$phpversion step5.php $current_version $update_version > /var/log/$app/upgrade3.html; then ynh_print_info --message="Step 3 upgrading ended successfully" else ynh_print_warn --message="Step 3 upgrading ended with error" @@ -221,20 +209,6 @@ mkdir -p "$datadir" chown -R $app: "$datadir" chmod go-w $datadir -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # unprotected_uris allows SSO credentials to be passed anyway - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" -fi - -ynh_permission_create --permission "public access" --url "/public/" --allowed "visitors" - #================================================= # RELOAD NGINX #================================================= From cf23849f300634b3dc70999673c0433e3247eaaf Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Jan 2021 14:24:42 +0100 Subject: [PATCH 2/8] Fix --- README.md | 5 ++--- README_fr.md | 5 ++--- check_process | 3 --- manifest.json | 8 ++++---- pull_request.md | 22 +++++++++++++--------- scripts/_common.sh | 1 - scripts/backup | 4 ++-- scripts/change_url | 4 ++-- scripts/install | 18 ++++++++---------- scripts/remove | 4 ++-- scripts/restore | 2 +- scripts/upgrade | 6 +++--- 12 files changed, 39 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 1beac67..c00327a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Dolibarr for YunoHost [![Integration level](https://dash.yunohost.org/integration/dolibarr.svg)](https://dash.yunohost.org/appci/app/dolibarr) ![](https://ci-apps.yunohost.org/ci/badges/dolibarr.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/dolibarr.maintain.svg) -[![Install Dolibarr with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=dolibarr) +[![Install Dolibarr with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=dolibarr) *[Lire ce readme en français.](./README_fr.md)* @@ -57,8 +57,7 @@ Use the admin panel of your dolibarr to configure this app. --- -Developers info ----------------- +## Developers info Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/dolibarr_ynh/tree/testing). diff --git a/README_fr.md b/README_fr.md index c385e42..64fb8fd 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # Dolibarr pour YunoHost [![Integration level](https://dash.yunohost.org/integration/dolibarr.svg)](https://dash.yunohost.org/appci/app/dolibarr) ![](https://ci-apps.yunohost.org/ci/badges/dolibarr.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/dolibarr.maintain.svg) -[![Installer Dolibarr avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=dolibarr) +[![Installer Dolibarr avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=dolibarr) *[Read this readme in english.](./README.md)* @@ -57,8 +57,7 @@ Utilisez le panneau d'administration de votre Dolibarr pour configurer cette app --- -Informations pour les développeurs ----------------- +## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/dolibarr_ynh/tree/testing). diff --git a/check_process b/check_process index 08f0ddd..6eb9922 100644 --- a/check_process +++ b/check_process @@ -28,8 +28,6 @@ setup_root=1 upgrade=1 backup_restore=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=none @@ -37,4 +35,3 @@ Notification=none ; commit=CommitHash name=5 Jul 2019 manifest_arg=domain=DOMAIN&path=PATH&admin=USER& - diff --git a/manifest.json b/manifest.json index 84c7340..779599e 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "dolibarr", "packaging_format": 1, "description": { - "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...)." + "en": "Manage the various aspects of your business or association.", + "fr": "Gérez les différents aspects de votre activité pro ou associative." }, "version": "12.0.3~ynh2", "url": "https://www.dolibarr.org/", @@ -14,12 +14,12 @@ "url": "https://github.com/mastereur" }, "requirements": { - "yunohost": ">= 3.8.0" + "yunohost": ">= 3.8.1" }, "multi_instance": true, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { diff --git a/pull_request.md b/pull_request.md index 7617707..0287f9f 100644 --- a/pull_request.md +++ b/pull_request.md @@ -1,14 +1,18 @@ ## Problem -- *Normalization from example_ynh and some rework* +- *Description of why you made this PR* ## Solution -- *easier yunohost integration* +- *And how do you fix that problem* ## PR Status -- [X] Code finished. -- [X] Tested with Package_check. -- [X] Fix or enhancement tested. -- [X] Upgrade from last version tested. -- [X] Can be reviewed and tested. -- [X] Upgrade php version -- [X] Update dependancies +- [ ] Code finished. +- [ ] Tested with Package_check. +- [ ] Fix or enhancement tested. +- [ ] Upgrade from last version tested. +- [ ] Can be reviewed and tested. + +## Package_check results +--- +*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* + +[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/REPLACEBYYOURAPP_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/REPLACEBYYOURAPP_ynh%20PR-NUM-%20(USERNAME)/) diff --git a/scripts/_common.sh b/scripts/_common.sh index 5de49a8..b191aff 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -18,7 +18,6 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-mysql \ php${YNH_PHP_VERSION}-xml \ php${YNH_PHP_VERSION}-fileinfo" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index ae210e7..67c8479 100755 --- a/scripts/backup +++ b/scripts/backup @@ -44,14 +44,14 @@ ynh_backup --src_path="$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_print_info --message="Backing up nginx web server configuration..." +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..." +ynh_print_info --message="Backing up PHP-FPM configuration..." ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" diff --git a/scripts/change_url b/scripts/change_url index 9c78c4e..8927180 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -67,7 +67,7 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --weight=1 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -106,7 +106,7 @@ ynh_replace_string --match_string="$old_domain$old_path" --replace_string="$new_ #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index cb1f84a..41b6ab4 100644 --- a/scripts/install +++ b/scripts/install @@ -80,7 +80,7 @@ touch $final_path/htdocs/conf/conf.php #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=1 +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config @@ -96,7 +96,7 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring php-fpm and install dependencies..." --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 --package="$extra_php_dependencies" @@ -127,7 +127,6 @@ ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_fil ynh_replace_string --match_string="__MEMBER__" --replace_string="$member" --target_file="$fhook" ynh_replace_string --match_string="__SRCPATH__" --replace_string="$final_path" --target_file="$fhook" - #================================================= # SETUP APPLICATION WITH CURL #================================================= @@ -135,7 +134,6 @@ ynh_replace_string --match_string="__SRCPATH__" --replace_string="$final_path" - # Set right permissions for curl install chown -R $app: "$final_path" - # Set the app as temporarily public for curl call ynh_script_progression --message="Configuring SSOwat..." --weight=1 # Set the app as temporarily public for cURL call @@ -176,7 +174,7 @@ ynh_local_curl "/install/step5.php" \ "pass=$password" \ "pass_verif=$password" -ynh_script_progression --message="configuring ldap" --weight=1 +ynh_script_progression --message="configuring LDAP" --weight=1 # Populate the LDAP parameters ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ../conf/sql/ldap.sql @@ -185,9 +183,9 @@ ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < .. ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ../conf/sql/ldap_user.sql if php $final_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y; then - ynh_print_info --message="ldap user update ok" + ynh_print_info --message="LDAP user update ok" else - ynh_print_warn --message="ldap user update ended with error" + ynh_print_warn --message="LDAP user update ended with error" fi # If YNH users should be members, populate the database accordingly, create the member list, and sync members @@ -196,9 +194,9 @@ then ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ../conf/sql/ldap_member.sql if php $final_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y; then - ynh_print_info --message="ldap member update ok" + ynh_print_info --message="LDAP member update ok" else - ynh_print_warn --message="ldap member update ended with error" + ynh_print_warn --message="LDAP member update ended with error" fi fi @@ -260,7 +258,7 @@ ynh_permission_create --permission "public access" --url "/public/" --allowed "v #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 17cbdd6..fb9a1fe 100644 --- a/scripts/remove +++ b/scripts/remove @@ -43,7 +43,7 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." --weight=1 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 # Remove the dedicated nginx config ynh_remove_nginx_config @@ -51,7 +51,7 @@ ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Removing php-fpm configuration..." --weight=1 +ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 # Remove the dedicated php-fpm config ynh_remove_fpm_config diff --git a/scripts/restore b/scripts/restore index e3c3f42..21ee012 100755 --- a/scripts/restore +++ b/scripts/restore @@ -117,7 +117,7 @@ chmod go-w $datadir #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server and php-fpm..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index a075097..7d0d1ab 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,7 +109,7 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=1 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config @@ -125,7 +125,7 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=2 +ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Delete old static pool.d conf old_php_version=7.0 @@ -212,7 +212,7 @@ chmod go-w $datadir #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload From 1492ad778de31964dc9ab6cef6b8966ae3373864 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Jan 2021 14:28:46 +0100 Subject: [PATCH 3/8] set member to 1 --- check_process | 4 ++-- manifest.json | 2 +- pull_request.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/check_process b/check_process index 6eb9922..80ad717 100644 --- a/check_process +++ b/check_process @@ -3,7 +3,7 @@ domain="domain.tld" (DOMAIN) path="/path" (PATH) admin="john" (USER) - member=0 + member=1 ; Checks pkg_linter=1 setup_sub_dir=1 @@ -22,7 +22,7 @@ domain="domain.tld" (DOMAIN) path="/path" (PATH) admin="john" (USER) - member=0 + member=1 ; Checks setup_sub_dir=1 setup_root=1 diff --git a/manifest.json b/manifest.json index 779599e..3b548f4 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage the various aspects of your business or association.", "fr": "Gérez les différents aspects de votre activité pro ou associative." }, - "version": "12.0.3~ynh2", + "version": "12.0.3~ynh3", "url": "https://www.dolibarr.org/", "license": "GPL-3.0-or-later", "maintainer": { diff --git a/pull_request.md b/pull_request.md index 0287f9f..c7f125a 100644 --- a/pull_request.md +++ b/pull_request.md @@ -15,4 +15,4 @@ --- *If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/REPLACEBYYOURAPP_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/REPLACEBYYOURAPP_ynh%20PR-NUM-%20(USERNAME)/) +[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/dolibarr_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/dolibarr_ynh%20PR-NUM-%20(USERNAME)/) From 754f71338d47ba0a796e8543c2cda5b4010069ef Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 7 Jan 2021 14:46:44 +0100 Subject: [PATCH 4/8] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 80ad717..52fc9a3 100644 --- a/check_process +++ b/check_process @@ -3,7 +3,7 @@ domain="domain.tld" (DOMAIN) path="/path" (PATH) admin="john" (USER) - member=1 + member=0 ; Checks pkg_linter=1 setup_sub_dir=1 From 57d61bc9932a4f9535c51794b9b43d3fbcff9718 Mon Sep 17 00:00:00 2001 From: mastereur <22839524+mastereur@users.noreply.github.com> Date: Tue, 9 Feb 2021 15:25:19 +0100 Subject: [PATCH 5/8] Update nginx.conf fix indent --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index dc9ee4f..8c3211e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -24,7 +24,7 @@ location __PATH__/ { fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_read_timeout 600; + fastcgi_read_timeout 600; } # Include SSOWAT user panel. From 9c2a17f06f30e276046f5c00cfa7a927ff791a38 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 9 Feb 2021 17:19:21 +0100 Subject: [PATCH 6/8] Upgrade to 13.0.0 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- manifest.json | 4 ++-- pull_request.md | 4 +--- scripts/backup | 4 ---- scripts/install | 14 ++++---------- 7 files changed, 11 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index c00327a..e61507a 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.3 +**Shipped version:** 13.0.0 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 64fb8fd..9b7488e 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.3 +**Version incluse :** 13.0.0 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index bca29dc..eccb8c8 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/12.0.3.tar.gz -SOURCE_SUM=672783519becbdd0d0fcbd43469d5d06f4d40d519317104e60cf29093402f700 +SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/13.0.0.tar.gz +SOURCE_SUM=87b136a936fca8c50de4c41478b26f79ce42b89091ca90b95c9589eba1ded64b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 3b548f4..5f40d9d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage the various aspects of your business or association.", "fr": "Gérez les différents aspects de votre activité pro ou associative." }, - "version": "12.0.3~ynh3", + "version": "13.0.0~ynh1", "url": "https://www.dolibarr.org/", "license": "GPL-3.0-or-later", "maintainer": { @@ -14,7 +14,7 @@ "url": "https://github.com/mastereur" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.0.0" }, "multi_instance": true, "services": [ diff --git a/pull_request.md b/pull_request.md index c7f125a..6c28fc5 100644 --- a/pull_request.md +++ b/pull_request.md @@ -13,6 +13,4 @@ ## Package_check results --- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* - -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/dolibarr_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/dolibarr_ynh%20PR-NUM-%20(USERNAME)/) +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/backup b/scripts/backup index 67c8479..94a664e 100755 --- a/scripts/backup +++ b/scripts/backup @@ -37,21 +37,18 @@ 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..." ynh_backup --src_path="$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -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..." ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" @@ -60,7 +57,6 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # BACKUP LOGROTATE #================================================= -ynh_print_info --message="Backing up logrotate configuration..." ynh_backup --src_path="/etc/logrotate.d/$app" diff --git a/scripts/install b/scripts/install index 41b6ab4..1c32a25 100644 --- a/scripts/install +++ b/scripts/install @@ -135,9 +135,9 @@ ynh_replace_string --match_string="__SRCPATH__" --replace_string="$final_path" - chown -R $app: "$final_path" # Set the app as temporarily public for curl call -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Set the app as temporarily public for cURL call -ynh_permission_update --permission "main" --add "visitors" +ynh_permission_update --permission="main" --add="visitors" # Reload NGINX ynh_systemd_action --service_name=nginx --action=reload @@ -200,12 +200,6 @@ then fi fi -# Remove the public access -if [ $is_public -eq 0 ] -then - ynh_app_setting_delete --app=$app --key=skipped_uris -fi - #================================================= # MODIFY A CONFIG FILE #================================================= @@ -245,12 +239,12 @@ ynh_use_logrotate --logfile="$final_path/documents/dolibarr.log" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary or protect it if [ $is_public -eq 0 ] then - ynh_permission_update --permission "main" --remove "visitors" + ynh_permission_update --permission="main" --remove="visitors" fi ynh_permission_create --permission "public access" --url "/public/" --allowed "visitors" From 3dae6016137ec2893248d8c2ed0de12cc50d6584 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 9 Feb 2021 18:22:54 +0100 Subject: [PATCH 7/8] Set permissions --- scripts/install | 2 +- scripts/upgrade | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1c32a25..cc195a5 100644 --- a/scripts/install +++ b/scripts/install @@ -247,7 +247,7 @@ then ynh_permission_update --permission="main" --remove="visitors" fi -ynh_permission_create --permission "public access" --url "/public/" --allowed "visitors" +ynh_permission_create --permission "public_space" --url "/public/" --allowed "visitors" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 7d0d1ab..a4ee33b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -78,6 +78,10 @@ if [ -z "$fpm_usage" ]; then ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi +if ! ynh_permission_exists --permission "public_space"; then + ynh_permission_create --permission "public_space" --url "/public/" --allowed "visitors" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= From 4f9dd0672ccde916402febf436ab2c6ae09d00be Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 9 Feb 2021 18:27:46 +0100 Subject: [PATCH 8/8] Update restore --- scripts/restore | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/restore b/scripts/restore index 21ee012..72c9780 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,7 +33,7 @@ datadir=$final_path/documents/ fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) -phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -68,19 +68,12 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei # Create the dedicated user (if not existing) ynh_system_user_create --username=$app -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Restore permissions on app files -chown -R root: $final_path - #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= ynh_print_info --message="Reconfiguring PHP-FPM..." -ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"