From 814b1a2dda1f3e1059da97d8ed557f62dbb4089e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 26 Jun 2022 14:53:49 +0200 Subject: [PATCH 1/4] Fix missing $database during upgrade --- manifest.json | 2 +- scripts/backup | 2 +- scripts/install | 16 ++++++++-------- scripts/restore | 32 ++++++++++++++++---------------- scripts/upgrade | 36 +++++++++++++++++++++--------------- 5 files changed, 47 insertions(+), 41 deletions(-) diff --git a/manifest.json b/manifest.json index 6b5c43f..9f2fc2d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Membership management web application for non profit organizations", "fr": "Outil de gestion d'adhĂ©rents et de cotisation en ligne pour associations" }, - "version": "0.9.5.2~ynh2", + "version": "0.9.5.2~ynh3", "url": "https://www.galette.eu", "upstream": { "license": "GPL-3.0-or-later", diff --git a/scripts/backup b/scripts/backup index 9da531e..aac0a86 100644 --- a/scripts/backup +++ b/scripts/backup @@ -71,7 +71,7 @@ then ynh_psql_dump_db --database="$db_name" > db.sql else ynh_print_info --message="Backing up the MySQL database..." -ynh_mysql_dump_db --database="$db_name" > db.sql + ynh_mysql_dump_db --database="$db_name" > db.sql fi #================================================= diff --git a/scripts/install b/scripts/install index 9c37ecc..12cfc9c 100644 --- a/scripts/install +++ b/scripts/install @@ -105,14 +105,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -122,6 +114,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC SETUP #================================================= diff --git a/scripts/restore b/scripts/restore index c9e78bf..d6408f8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -43,13 +43,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -69,15 +62,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..." --weight=1 - -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -91,6 +75,22 @@ fi ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_add_fpm_config +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE THE SQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 3af57ab..040f700 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -54,6 +54,13 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=2 +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid "$app") @@ -72,11 +79,10 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public +# If database doesn't exist, create it +if [ -z "$database" ]; then + database="pgsql" + ynh_app_setting_set --app=$app --key=database --value=$database fi #================================================= @@ -98,13 +104,13 @@ then # Download, check integrity, uncompress and patch the source from app.src mv "$final_path" "$final_path.old" - ynh_setup_source "$final_path" - #ynh_secure_remove "$final_path"/tests + ynh_setup_source --dest_dir="$final_path" # when running automatic tests, there is no config.inc.php if [ -e "$final_path.old/galette/config/config.inc.php" ]; then cp "$final_path.old/galette/config/config.inc.php" "$final_path/galette/config/config.inc.php" cp -r "$final_path.old/galette/data" "$final_path/galette/data" + cp -r "$final_path.old/galette/plugins" "$final_path/galette/plugins" fi # delete temp directory @@ -115,14 +121,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..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -143,6 +141,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC UPGRADE #================================================= From 14526bf5e6b817a79ce070e6fc968ed09b1289bf Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 26 Jun 2022 14:56:07 +0200 Subject: [PATCH 2/4] Update DESCRIPTION_fr.md --- doc/DESCRIPTION_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index 5efbd75..f9c5fe5 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -1 +1 @@ -Outil de gestion d'adhérents et de cotisation en ligne pour associations +Outil de gestion d'adhĂ©rents et de cotisation en ligne pour associations From 6e3bbaef1fb7f95e9c8152fb1a5deec447b7f49a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 26 Jun 2022 12:56:11 +0000 Subject: [PATCH 3/4] Auto-update README --- README.md | 31 +++++++++++++------------------ README_fr.md | 35 +++++++++++++++++------------------ 2 files changed, 30 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 0e4de72..42b4c23 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Galette for YunoHost -[![Integration level](https://dash.yunohost.org/integration/galette.svg)](https://dash.yunohost.org/appci/app/galette) ![](https://ci-apps.yunohost.org/ci/badges/galette.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/galette.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/galette.svg)](https://dash.yunohost.org/appci/app/galette) ![Working status](https://ci-apps.yunohost.org/ci/badges/galette.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/galette.maintain.svg) [![Install Galette with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galette) *[Lire ce readme en français.](./README_fr.md)* @@ -15,40 +15,35 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Membership management web application for non profit organizations +Galette is a membership management web application towards non profit organizations. -**Shipped version:** 0.9.5.2~ynh1 + +**Shipped version:** 0.9.5.2~ynh3 **Demo:** https://demo.galette.eu/login ## Screenshots -![](./doc/screenshots/edit_member.png) - -## Disclaimers / important information - -## Configuration - -1. The app will require to complete the registration process after the instllation is complete by visiting the domain on which Galette is installed. -1. The Postgresql database credentials will be sent to the admin mail. Fill these details while doing the registration process. +![Screenshot of Galette](./doc/screenshots/edit_member.png) ## Documentation and resources -* Official app website: https://www.galette.eu -* Official admin documentation: https://doc.galette.eu/fr/master/ -* Upstream app code repository: https://github.com/galette/galette -* YunoHost documentation for this app: https://yunohost.org/app_galette -* Report a bug: https://github.com/YunoHost-Apps/galette_ynh/issues +* Official app website: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/galette_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/galette_ynh/tree/testing --debug or sudo yunohost app upgrade galette -u https://github.com/YunoHost-Apps/galette_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index ed5505e..fd4970a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Galette pour YunoHost -[![Niveau d'intĂ©gration](https://dash.yunohost.org/integration/galette.svg)](https://dash.yunohost.org/appci/app/galette) ![](https://ci-apps.yunohost.org/ci/badges/galette.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/galette.maintain.svg) +[![Niveau d'intĂ©gration](https://dash.yunohost.org/integration/galette.svg)](https://dash.yunohost.org/appci/app/galette) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/galette.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/galette.maintain.svg) [![Installer Galette avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=galette) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Galette 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.* @@ -13,38 +17,33 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Outil de gestion d'adhĂ©rents et de cotisation en ligne pour associations -**Version incluse :** 0.9.5.2~ynh1 + +**Version incluse :** 0.9.5.2~ynh3 **DĂ©mo :** https://demo.galette.eu/login ## Captures d'Ă©cran -![](./doc/screenshots/edit_member.png) - -## Avertissements / informations importantes - -## Configuration - -1. Une fois l'installation terminĂ©e, l'application devra terminer le processus d'enregistrement en **visitant le domaine** sur lequel Galette est installĂ©. -1. Les informations d'identification de la base de donnĂ©es Postgresql seront envoyĂ©es Ă  **l'email admin**. Remplissez ces dĂ©tails lors du processus d'inscription. +![Capture d'Ă©cran de Galette](./doc/screenshots/edit_member.png) ## Documentations et ressources -* Site officiel de l'app : https://www.galette.eu -* Documentation officielle de l'admin : https://doc.galette.eu/fr/master/ -* DĂ©pĂ´t de code officiel de l'app : https://github.com/galette/galette -* Documentation YunoHost pour cette app : https://yunohost.org/app_galette -* Signaler un bug : https://github.com/YunoHost-Apps/galette_ynh/issues +* Site officiel de l'app : +* Documentation officielle de l'admin : +* DĂ©pĂ´t de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les dĂ©veloppeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/galette_ynh/tree/testing). Pour essayer la branche testing, procĂ©dez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/galette_ynh/tree/testing --debug ou sudo yunohost app upgrade galette -u https://github.com/YunoHost-Apps/galette_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 5541dbeb453c4f8dcbc24aaae5006625d9c011ab Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 26 Jun 2022 14:57:44 +0200 Subject: [PATCH 4/4] Update check_process --- check_process | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/check_process b/check_process index 8fa2649..c5402df 100644 --- a/check_process +++ b/check_process @@ -14,6 +14,7 @@ setup_private=1 setup_public=1 upgrade=1 + # 0.9.5~ynh1 upgrade=1 from_commit=d05248ceeffca8401dea6ac14bf7af7096345cbe # 0.9.5.2~ynh1 upgrade=1 from_commit=3c3d7d56540e12245f45dc7c3b9334285ac475ca @@ -44,7 +45,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=d05248ceeffca8401dea6ac14bf7af7096345cbe - name=Merge pull request #14 - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1