1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/civicrm_drupal7_ynh.git synced 2024-09-03 18:16:19 +02:00

Merge pull request #37 from YunoHost-Apps/upgrade

Upgrade to 5.52.2
This commit is contained in:
yalh76 2022-08-15 14:29:11 +02:00 committed by GitHub
commit 9c53bf73a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 93 additions and 115 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# CiviCRM on Drupal 7 for YunoHost
[![Integration level](https://dash.yunohost.org/integration/civicrm_drupal7.svg)](https://dash.yunohost.org/appci/app/civicrm_drupal7) ![](https://ci-apps.yunohost.org/ci/badges/civicrm_drupal7.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/civicrm_drupal7.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/civicrm_drupal7.svg)](https://dash.yunohost.org/appci/app/civicrm_drupal7) ![Working status](https://ci-apps.yunohost.org/ci/badges/civicrm_drupal7.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/civicrm_drupal7.maintain.svg)
[![Install CiviCRM on Drupal 7 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=civicrm_drupal7)
*[Lire ce readme en français.](./README_fr.md)*
@ -18,13 +18,14 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Open source constituent relationship management (CRM) for non-profits, NGOs and advocacy organizations.
**Shipped version:** 5.44.0.7.0~ynh1
**Shipped version:** 5.52.2~ynh1
**Demo:** https://civicrm.org/demo
## Screenshots
![](./doc/screenshots/screenshot.png)
![Screenshot of CiviCRM on Drupal 7](./doc/screenshots/screenshot.png)
## Disclaimers / important information
@ -32,21 +33,22 @@ Open source constituent relationship management (CRM) for non-profits, NGOs and
## Documentation and resources
* Official app website: https://civicrm.org/
* Official admin documentation: https://docs.civicrm.org/
* Upstream app code repository: https://github.com/civicrm/civicrm-drupal
* YunoHost documentation for this app: https://yunohost.org/app_civicrm_drupal7
* Report a bug: https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/issues
* Official app website: <https://civicrm.org/>
* Official admin documentation: <https://docs.civicrm.org/>
* Upstream app code repository: <https://github.com/civicrm/civicrm-drupal>
* YunoHost documentation for this app: <https://yunohost.org/app_civicrm_drupal7>
* Report a bug: <https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/issues>
## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/tree/testing --debug
or
sudo yunohost app upgrade civicrm_drupal7 -u https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,10 +1,14 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# CiviCRM on Drupal 7 pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/civicrm_drupal7.svg)](https://dash.yunohost.org/appci/app/civicrm_drupal7) ![](https://ci-apps.yunohost.org/ci/badges/civicrm_drupal7.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/civicrm_drupal7.maintain.svg)
[![Niveau d'intégration](https://dash.yunohost.org/integration/civicrm_drupal7.svg)](https://dash.yunohost.org/appci/app/civicrm_drupal7) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/civicrm_drupal7.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/civicrm_drupal7.maintain.svg)
[![Installer CiviCRM on Drupal 7 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=civicrm_drupal7)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer CiviCRM on Drupal 7 rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
@ -14,13 +18,14 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Gestion des relations avec les constituants (GRC/CRM) pour les organisations à but non lucratif, les ONG et les organisations de défense des droits.
**Version incluse :** 5.44.0.7.0~ynh1
**Version incluse :** 5.52.2~ynh1
**Démo :** https://civicrm.org/demo
## Captures d'écran
![](./doc/screenshots/screenshot.png)
![Capture d'écran de CiviCRM on Drupal 7](./doc/screenshots/screenshot.png)
## Avertissements / informations importantes
@ -28,21 +33,22 @@ Gestion des relations avec les constituants (GRC/CRM) pour les organisations à
## Documentations et ressources
* Site officiel de l'app : https://civicrm.org/
* Documentation officielle de l'admin : https://docs.civicrm.org/
* Dépôt de code officiel de l'app : https://github.com/civicrm/civicrm-drupal
* Documentation YunoHost pour cette app : https://yunohost.org/app_civicrm_drupal7
* Signaler un bug : https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/issues
* Site officiel de l'app : <https://civicrm.org/>
* Documentation officielle de l'admin : <https://docs.civicrm.org/>
* Dépôt de code officiel de l'app : <https://github.com/civicrm/civicrm-drupal>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_civicrm_drupal7>
* Signaler un bug : <https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/issues>
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/tree/testing --debug
ou
sudo yunohost app upgrade civicrm_drupal7 -u https://github.com/YunoHost-Apps/civicrm_drupal7_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -2,10 +2,10 @@
; Manifest
domain="domain.tld"
path="/path"
admin="john"
language="fr"
is_public=1
password="pass"
language="fr"
admin="john"
password="1Strong-Password"
install_profil="minimal"
; Checks
pkg_linter=1

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://storage.googleapis.com/civicrm/civicrm-stable/5.44.0/civicrm-5.44.0-drupal.tar.gz
SOURCE_SUM=133428fad1b2ea32553c795adb55ae65d9f8df3a1d4f78dbc64d4addc5db6fd4
SOURCE_URL=https://storage.googleapis.com/civicrm/civicrm-stable/5.52.2/civicrm-5.52.2-drupal.tar.gz
SOURCE_SUM=39be21dcbde98b51a05b04c753477f9ea74eb30e3c45f73a00f5e6b3988ab1b8
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://storage.googleapis.com/civicrm/civicrm-stable/5.44.0/civicrm-5.44.0-l10n.tar.gz
SOURCE_SUM=c996ab7e347996ea519f20cc74c94ace9aeb04f1ab738df55721ae6f16b2e495
SOURCE_URL=https://storage.googleapis.com/civicrm/civicrm-stable/5.52.2/civicrm-5.52.2-l10n.tar.gz
SOURCE_SUM=b857dfd08e30153a8485cefd3650e3c72769de093d0f691bb873007cf65bd1ec
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -1,10 +0,0 @@
#!/bin/bash
action=$1
pending_dir=$4
mysqlconf="${pending_dir}/../mysql/etc/mysql/my.cnf"
[[ "$action" == "pre" ]] || exit 0
[[ -e "$mysqlconf" ]] || exit 0
sed --in-place "s@thread_stack = 128K@thread_stack = 192K@g" "${mysqlconf}"

View file

@ -6,7 +6,7 @@
"en": "CRM for non-profits, NGOs and advocacy organizations",
"fr": "CRM pour organisations à but non lucratif et ONG"
},
"version": "5.44.0.7.0~ynh1",
"version": "5.52.2~ynh1",
"url": "https://civicrm.org",
"upstream": {
"license": "AGPL-3.0-or-later",
@ -20,7 +20,7 @@
"name": "yalh76"
},
"requirements": {
"yunohost": ">= 4.2.0"
"yunohost": ">= 11.0"
},
"multi_instance": true,
"services": [
@ -29,7 +29,7 @@
"mysql"
],
"arguments": {
"install" : [
"install": [
{
"name": "domain",
"type": "domain"
@ -40,10 +40,6 @@
"example": "/drupal7",
"default": "/drupal7"
},
{
"name": "admin",
"type": "user"
},
{
"name": "is_public",
"type": "boolean",
@ -59,6 +55,10 @@
"choices": ["fr", "en"],
"default": "en"
},
{
"name": "admin",
"type": "user"
},
{
"name": "password",
"type": "password"

View file

@ -3,11 +3,13 @@
#=================================================
# COMMON VARIABLES
#=================================================
# PHP APP SPECIFIC
#=================================================
YNH_PHP_VERSION="7.3"
php_dependencies="php$YNH_DEFAULT_PHP_VERSION-fpm php$YNH_DEFAULT_PHP_VERSION-cli php$YNH_DEFAULT_PHP_VERSION-gd php$YNH_DEFAULT_PHP_VERSION-mysql php$YNH_DEFAULT_PHP_VERSION-xml php$YNH_DEFAULT_PHP_VERSION-ldap php$YNH_DEFAULT_PHP_VERSION-mbstring php$YNH_DEFAULT_PHP_VERSION-curl php$YNH_DEFAULT_PHP_VERSION-soap"
# dependencies used by the app
pkg_dependencies="curl libzip-dev php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-soap"
# dependencies used by the app (must be on a single line)
pkg_dependencies="curl libzip-dev $php_dependencies"
#=================================================
# PERSONAL HELPERS

View file

@ -63,8 +63,6 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_backup --src_path="/etc/cron.d/$app"
ynh_backup --src_path="/usr/share/yunohost/hooks/conf_regen/34-mysql_$app"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================

View file

@ -25,16 +25,16 @@ 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
language=$YNH_APP_ARG_LANGUAGE
admin=$YNH_APP_ARG_ADMIN
password=$YNH_APP_ARG_PASSWORD
install_profil=$YNH_APP_ARG_INSTALL_PROFIL
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
phpversion=$YNH_PHP_VERSION
app=$YNH_APP_INSTANCE_NAME
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
@ -53,10 +53,9 @@ ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=language --value=$language
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=install_profil --value=$install_profil
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
#=================================================
# STANDARD MODIFICATIONS
@ -73,7 +72,7 @@ ynh_install_app_dependencies $pkg_dependencies
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app --home_dir=$final_path
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# CREATE A MYSQL DATABASE
@ -97,6 +96,15 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -105,24 +113,8 @@ ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
#=================================================
# SPECIFIC SETUP
#=================================================
# UPGRADE THREAD_STACK
#=================================================
ynh_script_progression --message="Upgrading thread_stack..."
cp -R ../conf/mysql_hook_regen_conf /usr/share/yunohost/hooks/conf_regen/34-mysql_$app
yunohost tools regen-conf mysql --force
#=================================================
# CREATE DRUSH ALIAS
#=================================================
@ -141,7 +133,7 @@ mkdir -p "$final_path/.composer"
ynh_add_config --template="../conf/composer.json" --destination="$final_path/.composer/composer.json"
ynh_install_composer --phpversion="$phpversion" --workdir="$final_path/.composer"
ynh_install_composer --workdir="$final_path/.composer"
export PATH="$final_path/.composer/vendor/bin:$PATH"

View file

@ -73,10 +73,6 @@ ynh_script_progression --message="Removing various files..."
# Remove a cron file
ynh_secure_remove --file="/etc/cron.d/$app"
# Remove MySQL Hook
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/34-mysql_$app"
yunohost tools regen-conf mysql --force
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -44,20 +44,13 @@ test ! -d $final_path \
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..."
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
@ -70,13 +63,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# SPECIFIC RESTORATION
#=================================================
@ -87,6 +73,20 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
@ -103,9 +103,6 @@ ynh_script_progression --message="Restoring various files..."
ynh_restore_file --origin_path="/etc/cron.d/$app"
ynh_restore_file --origin_path="/usr/share/yunohost/hooks/conf_regen/34-mysql_$app"
yunohost tools regen-conf mysql --force
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -18,9 +18,9 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
language=$(ynh_app_setting_get --app=$app --key=language)
admin=$(ynh_app_setting_get --app=$app --key=admin)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
language=$(ynh_app_setting_get --app=$app --key=language)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
@ -59,13 +59,16 @@ if ynh_legacy_permissions_exists; then
ynh_app_setting_delete --app=$app --key=is_public
fi
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/34-mysql_$app"
yunohost tools regen-conf mysql --force
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..."
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -85,14 +88,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
@ -106,18 +101,18 @@ ynh_install_app_dependencies $pkg_dependencies
ynh_script_progression --message="Upgrading PHP-FPM configuration..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low
ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# SPECIFIC UPGRADE
#=================================================
# UPGRADE THREAD_STACK
#=================================================
ynh_script_progression --message="Upgrading thread_stack..."
cp -R ../conf/mysql_hook_regen_conf /usr/share/yunohost/hooks/conf_regen/34-mysql_$app
yunohost tools regen-conf mysql --force
#=================================================
# SETUP THE CRON FILE
#=================================================
@ -130,7 +125,7 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#=================================================
ynh_script_progression --message="Upgrading Composer..."
ynh_install_composer --phpversion="$phpversion" --workdir="$final_path/.composer"
ynh_install_composer --workdir="$final_path/.composer"
export PATH="$final_path/.composer/vendor/bin:$PATH"