From d89234fb1617b0e912be9401e858bc404832c39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 27 Aug 2022 19:20:47 +0200 Subject: [PATCH 1/3] Update manifest.json --- manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 7ef7759..ba58d8d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,12 +6,11 @@ "en": "Simple, Fast, Secure, Flat-File CMS", "fr": "CMS simple, rapide, sécurisé et à fichier plat" }, - "version": "3.13.1~ynh6", + "version": "3.13.1~ynh7", "url": "www.bludit.com", "upstream": { "license": "MIT", "website": "www.bludit.com", - "demo": "https://demo.example.com", "admindoc": "https://docs.bludit.com/en/", "code": "https://github.com/bludit/bludit" }, From 265039fb8128e7ee50bd38b45d8cfe1a7c1f99ab Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 27 Aug 2022 17:20:52 +0000 Subject: [PATCH 2/3] Auto-update README --- README.md | 22 +++++++++++----------- README_fr.md | 28 ++++++++++++++++------------ 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4ae226f..d618a52 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Bludit for YunoHost -[![Integration level](https://dash.yunohost.org/integration/bludit.svg)](https://dash.yunohost.org/appci/app/bludit) ![](https://ci-apps.yunohost.org/ci/badges/bludit.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/bludit.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/bludit.svg)](https://dash.yunohost.org/appci/app/bludit) ![Working status](https://ci-apps.yunohost.org/ci/badges/bludit.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/bludit.maintain.svg) [![Install Bludit with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bludit) *[Lire ce readme en français.](./README_fr.md)* @@ -17,31 +17,31 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Simple, Fast, Secure, Flat-File CMS -**Shipped version:** 3.13.1~ynh6 +**Shipped version:** 3.13.1~ynh7 -**Demo:** https://demo.example.com ## Screenshots -![](./doc/screenshots/bludit_1_en.png) +![Screenshot of Bludit](./doc/screenshots/bludit_1_en.png) ## Documentation and resources -* Official app website: www.bludit.com -* Official admin documentation: https://docs.bludit.com/en/ -* Upstream app code repository: https://github.com/bludit/bludit -* YunoHost documentation for this app: https://yunohost.org/app_bludit -* Report a bug: https://github.com/YunoHost-Apps/bludit_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/bludit_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/bludit_ynh/tree/testing --debug or sudo yunohost app upgrade bludit -u https://github.com/YunoHost-Apps/bludit_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 a0a9e37..5010969 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Bludit pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/bludit.svg)](https://dash.yunohost.org/appci/app/bludit) ![](https://ci-apps.yunohost.org/ci/badges/bludit.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/bludit.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/bludit.svg)](https://dash.yunohost.org/appci/app/bludit) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/bludit.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/bludit.maintain.svg) [![Installer Bludit avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bludit) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Bludit 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,31 +17,31 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour CMS simple, rapide, sécurisé et à fichier plat -**Version incluse :** 3.13.1~ynh6 +**Version incluse :** 3.13.1~ynh7 -**Démo :** https://demo.example.com ## Captures d'écran -![](./doc/screenshots/bludit_1_en.png) +![Capture d'écran de Bludit](./doc/screenshots/bludit_1_en.png) ## Documentations et ressources -* Site officiel de l'app : www.bludit.com -* Documentation officielle de l'admin : https://docs.bludit.com/en/ -* Dépôt de code officiel de l'app : https://github.com/bludit/bludit -* Documentation YunoHost pour cette app : https://yunohost.org/app_bludit -* Signaler un bug : https://github.com/YunoHost-Apps/bludit_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/bludit_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/bludit_ynh/tree/testing --debug ou sudo yunohost app upgrade bludit -u https://github.com/YunoHost-Apps/bludit_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 b7e945e7c80fa46b20974169b02def97053d7fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 6 Sep 2022 09:11:30 +0200 Subject: [PATCH 3/3] 3.14.0 (#24) * 3.14.0 * Auto-update README * Fix * Update nginx.conf Co-authored-by: yunohost-bot --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 5 ----- manifest.json | 6 +++--- scripts/_common.sh | 4 ++-- scripts/install | 25 ++++++++++++++++--------- scripts/remove | 8 ++++++++ scripts/restore | 24 ++++++++++++++++-------- scripts/upgrade | 31 +++++++++++++++++++------------ 10 files changed, 68 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index d618a52..b15f1e1 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Simple, Fast, Secure, Flat-File CMS -**Shipped version:** 3.13.1~ynh7 +**Shipped version:** 3.14.0~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 5010969..3ee9f53 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour CMS simple, rapide, sécurisé et à fichier plat -**Version incluse :** 3.13.1~ynh7 +**Version incluse :** 3.14.0~ynh1 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 2754174..b3265d2 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/bludit/bludit/archive/3.13.1.tar.gz -SOURCE_SUM=ec0f262335d371d9123110c55866b562b7e0238a20db2ac9f6b284d2ac3426ed +SOURCE_URL=https://github.com/bludit/bludit/archive/3.14.0.tar.gz +SOURCE_SUM=4a411cdcd9d3412a87cc89f9f1067bef51533b8c9303f1bc34452e30ad5b586c SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 769b154..c02ebe4 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; client_max_body_size 10M; diff --git a/manifest.json b/manifest.json index ba58d8d..fb879d2 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Simple, Fast, Secure, Flat-File CMS", "fr": "CMS simple, rapide, sécurisé et à fichier plat" }, - "version": "3.13.1~ynh7", + "version": "3.14.0~ynh1", "url": "www.bludit.com", "upstream": { "license": "MIT", @@ -20,12 +20,12 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ "nginx", - "php7.3-fpm" + "php7.4-fpm" ], "arguments": { "install" : [ diff --git a/scripts/_common.sh b/scripts/_common.sh index a3e80ec..c9c6ad2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,9 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="7.4" -extra_php_dependencies="php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom" +pkg_dependencies="php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index f8af543..a32ba47 100644 --- a/scripts/install +++ b/scripts/install @@ -45,6 +45,13 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #================================================= @@ -66,6 +73,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..." --weight=2 + +# Create a dedicated PHP-FPM config +ynh_add_fpm_config +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + #================================================= # NGINX CONFIGURATION #================================================= @@ -74,15 +90,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 - -# Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/remove b/scripts/remove index f10acda..abd4725 100644 --- a/scripts/remove +++ b/scripts/remove @@ -44,6 +44,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE DEDICATED USER #================================================= diff --git a/scripts/restore b/scripts/restore index 9f67c71..bcef493 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,12 +37,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -62,14 +56,28 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# SPECIFIC RESTORATION +#================================================= +# REINSTALL DEPENDENCIES +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=6 +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 --package="$extra_php_dependencies" +#================================================= +# 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" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index c1da157..0f348d7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,14 +59,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # CREATE DEDICATED USER #================================================= @@ -97,11 +89,11 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" #================================================= -# RELOAD NGINX +# UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=2 +ynh_script_progression --message="Upgrading dependencies..." --weight=1 -ynh_systemd_action --service_name=nginx --action=reload +ynh_install_app_dependencies $pkg_dependencies #================================================= # PHP-FPM CONFIGURATION @@ -109,7 +101,22 @@ ynh_systemd_action --service_name=nginx --action=reload ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +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 + +#================================================= +# RELOAD NGINX +#================================================= +ynh_script_progression --message="Reloading NGINX web server..." --weight=2 + +ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT