From 0bafe70cf54773fb4e043d9bc655a71e433bf225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Oct 2022 20:24:43 +0200 Subject: [PATCH] Testing (#22) * 4.8.1 (#15) * 4.8.1 * Add template * Auto-update README * Only admin (#17) * Fix * Update install * Fix * fix * Update install * Fix * Update upgrade * fix * Update upgrade * Update upgrade * Update upgrade * Update upgrade * cleaning up * Update upgrade * Update check_process * 4.3 * Update upgrade * Update upgrade * cleaning up * Bump manifest version * Auto-update README * Add config * Auto-update README * Update manifest.json * Auto-update README * Auto-update README * Upgrade package (#21) * set client_max_body_size * Auto-update README Co-authored-by: yunohost-bot Co-authored-by: Yunohost-Bot <> Co-authored-by: Alexandre Aubin Co-authored-by: yunohost-bot --- README.md | 19 ++++++++++--------- README_fr.md | 25 +++++++++++++++---------- conf/nginx.conf | 2 +- conf/php-fpm.conf | 4 ++-- manifest.json | 6 +++--- scripts/_common.sh | 2 +- scripts/install | 17 +++++++++-------- scripts/restore | 33 ++++++++++++++------------------- scripts/upgrade | 16 ++++++++-------- 9 files changed, 63 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index dab9a31..e1dcbea 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Adminer for YunoHost -[![Integration level](https://dash.yunohost.org/integration/adminer.svg)](https://dash.yunohost.org/appci/app/adminer) ![](https://ci-apps.yunohost.org/ci/badges/adminer.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/adminer.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/adminer.svg)](https://dash.yunohost.org/appci/app/adminer) ![Working status](https://ci-apps.yunohost.org/ci/badges/adminer.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/adminer.maintain.svg) [![Install Adminer with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=adminer) *[Lire ce readme en français.](./README_fr.md)* @@ -17,13 +17,13 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. Adminer is available for MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Elasticsearch, MongoDB and others via plugin. -**Shipped version:** 4.8.1~ynh3 +**Shipped version:** 4.8.1~ynh4 **Demo:** https://demo.adminer.org/adminer.php?username= ## Screenshots -![](./doc/screenshots/screenshot.png) +![Screenshot of Adminer](./doc/screenshots/screenshot.png) ## Disclaimers / important information @@ -35,20 +35,21 @@ If you have problems with drivers see here: https://www.adminer.org/en/drivers. ## Documentation and resources -* Official app website: https://www.adminer.org/ -* Upstream app code repository: https://github.com/vrana/adminer/ -* YunoHost documentation for this app: https://yunohost.org/app_adminer -* Report a bug: https://github.com/YunoHost-Apps/adminer_ynh/issues +* Official app website: +* 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/adminer_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/adminer_ynh/tree/testing --debug or sudo yunohost app upgrade adminer -u https://github.com/YunoHost-Apps/adminer_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 4e687fe..1a090ab 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Adminer pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/adminer.svg)](https://dash.yunohost.org/appci/app/adminer) ![](https://ci-apps.yunohost.org/ci/badges/adminer.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/adminer.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/adminer.svg)](https://dash.yunohost.org/appci/app/adminer) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/adminer.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/adminer.maintain.svg) [![Installer Adminer avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=adminer) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Adminer 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,13 +17,13 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Adminer (anciennement phpMinAdmin) est un outil de gestion de base de données complet écrit en PHP. À l'inverse de phpMyAdmin, il se compose d'un seul fichier prêt à être déployé sur le serveur cible. Adminer est disponible pour MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Elasticsearch, MongoDB et autres via un plugin. -**Version incluse :** 4.8.1~ynh3 +**Version incluse :** 4.8.1~ynh4 **Démo :** https://demo.adminer.org/adminer.php?username= ## Captures d'écran -![](./doc/screenshots/screenshot.png) +![Capture d'écran de Adminer](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -31,20 +35,21 @@ Si vous rencontrez des problèmes avec les pilotes, consultez : https://www.admi ## Documentations et ressources -* Site officiel de l'app : https://www.adminer.org/ -* Dépôt de code officiel de l'app : https://github.com/vrana/adminer/ -* Documentation YunoHost pour cette app : https://yunohost.org/app_adminer -* Signaler un bug : https://github.com/YunoHost-Apps/adminer_ynh/issues +* Site officiel de l'app : +* 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/adminer_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/adminer_ynh/tree/testing --debug ou sudo yunohost app upgrade adminer -u https://github.com/YunoHost-Apps/adminer_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 :** diff --git a/conf/nginx.conf b/conf/nginx.conf index 8b721d2..993e426 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,7 +7,7 @@ location __PATH__/ { index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - #client_max_body_size 50M; + client_max_body_size 50M; try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index ab1a471..b4c2372 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -419,8 +419,8 @@ chdir = __FINALPATH__ ;php_admin_value[memory_limit] = 32M ; Common values to change to increase file upload limit -; php_admin_value[upload_max_filesize] = 50M -; php_admin_value[post_max_size] = 50M +php_admin_value[upload_max_filesize] = 50M +php_admin_value[post_max_size] = 50M ; php_admin_flag[mail.add_x_header] = Off ; Other common parameters diff --git a/manifest.json b/manifest.json index 3521226..afe8cc4 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Gestionnaire de base de données" }, - "version": "4.8.1~ynh3", + "version": "4.8.1~ynh4", "url": "https://www.adminer.org/", "upstream": { "license": "Apache-2.0", @@ -27,12 +27,12 @@ "url": "https://github.com/jesuisfol/adminer_ynh" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ "nginx", - "php7.3-fpm" + "php8.0-fpm" ], "arguments": { "install" : [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 9a8943f..742287b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" # dependencies used by the app pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-pgsql" diff --git a/scripts/install b/scripts/install index c627b15..3b8be1c 100644 --- a/scripts/install +++ b/scripts/install @@ -76,14 +76,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=3 - -# Create a dedicated nginx config -ynh_add_nginx_config - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -91,6 +83,15 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated php-fpm config ynh_add_fpm_config --usage=low --footprint=low +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring NGINX web server..." --weight=3 + +# Create a dedicated nginx config +ynh_add_nginx_config #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index da9a51d..6968fc1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -36,16 +36,11 @@ fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $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 #================================================= @@ -65,6 +60,14 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# 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 #================================================= @@ -73,23 +76,15 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=5 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion +ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint #================================================= -# REINSTALL DEPENDENCIES +# RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 +ynh_script_progression --message="Restoring the NGINX web server configuration..." -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 - -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index e4eecb5..8fd49a9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -101,14 +101,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=1 - -# Create a dedicated nginx config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -124,6 +116,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 + +# Create a dedicated nginx config +ynh_add_nginx_config + #================================================= # RELOAD NGINX #=================================================