From 372eb97e88566fd4fa94544d6ab4c7b24c8a1b5d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 13 Nov 2021 17:23:38 +0100 Subject: [PATCH 1/7] Fix ynh_composer_exec syntax --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 38435b5..97bef41 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -181,9 +181,9 @@ then ynh_script_progression --message="Upgrading dependencies with Composer..." --weight=19 # Force dependency to the used PHP version - ynh_exec_warn_less ynh_composer_exec --commands=\"config -g platform.php $YNH_PHP_VERSION\" + ynh_exec_warn_less ynh_composer_exec --commands="config -g platform.php $YNH_PHP_VERSION" # Install dependencies - ynh_exec_warn_less ynh_composer_exec --commands=\"update --no-dev\" + ynh_exec_warn_less ynh_composer_exec --commands="update --no-dev" fi #================================================= From 985e4ab6b446c5d6893bc7c48f1c14b5cdb27615 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 13 Nov 2021 17:24:23 +0100 Subject: [PATCH 2/7] Bump yunohost requirement to 4.3 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 2795400..a0e4aca 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "email": "julien.malik@paraiso.me" }, "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ From bb96a0934d6495e65a685b06dd3be52873c0c898 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 13 Nov 2021 17:24:43 +0100 Subject: [PATCH 3/7] Bump package version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index a0e4aca..8d57e91 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage MySQL databases over the web", "fr": "Application web de gestion des bases de données MySQL" }, - "version": "5.1.1~ynh1", + "version": "5.1.1~ynh2", "url": "http://www.phpmyadmin.net", "upstream": { "license": "GPL-2.0-only", From 753a9027bc1c4bbdeacc6e2842a846853243904e Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 13 Nov 2021 16:25:12 +0000 Subject: [PATCH 4/7] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 79f86b1..02aa1ef 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 Manage MySQL databases over the web -**Shipped version:** 5.1.1~ynh1 +**Shipped version:** 5.1.1~ynh2 **Demo:** https://demo.phpmyadmin.net/master-config diff --git a/README_fr.md b/README_fr.md index 56e9cda..a7fb1e1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Application web de gestion des bases de données MySQL -**Version incluse :** 5.1.1~ynh1 +**Version incluse :** 5.1.1~ynh2 **Démo :** https://demo.phpmyadmin.net/master-config From 870c5cc5b457925599ce5544fa28a777b9c50155 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Nov 2021 09:55:32 +0100 Subject: [PATCH 5/7] Fix linter warnings --- manifest.json | 7 ++----- scripts/restore | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/manifest.json b/manifest.json index 8d57e91..2fcb724 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,6 @@ "website": "http://www.phpmyadmin.net", "demo": "https://demo.phpmyadmin.net/master-config", "admindoc": "https://www.phpmyadmin.net/docs/", - "userdoc": "https://yunohost.org/en/app_phpmyadmin", "code": "https://github.com/phpmyadmin/phpmyadmin" }, "license": "GPL-2.0-only", @@ -34,8 +33,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "domain.org" + "type": "domain" }, { "name": "path", @@ -45,8 +43,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" } ] } diff --git a/scripts/restore b/scripts/restore index 4a7311d..3505835 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,8 +34,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " From 9c3c72edcab1616975141c89719ae636ce0225fe Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sun, 14 Nov 2021 08:55:41 +0000 Subject: [PATCH 6/7] Auto-update README --- README.md | 1 - README_fr.md | 1 - 2 files changed, 2 deletions(-) diff --git a/README.md b/README.md index 02aa1ef..2e88dce 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ phpMyAdmin is a free software tool written in PHP, intended to handle the admini ## Documentation and resources * Official app website: http://www.phpmyadmin.net -* Official user documentation: https://yunohost.org/en/app_phpmyadmin * Official admin documentation: https://www.phpmyadmin.net/docs/ * Upstream app code repository: https://github.com/phpmyadmin/phpmyadmin * YunoHost documentation for this app: https://yunohost.org/app_phpmyadmin diff --git a/README_fr.md b/README_fr.md index a7fb1e1..e62f40a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,6 @@ phpMyAdmin est un outil logiciel libre écrit en PHP, destiné à gérer l'admin ## Documentations et ressources * Site officiel de l'app : http://www.phpmyadmin.net -* Documentation officielle utilisateur : https://yunohost.org/en/app_phpmyadmin * Documentation officielle de l'admin : https://www.phpmyadmin.net/docs/ * Dépôt de code officiel de l'app : https://github.com/phpmyadmin/phpmyadmin * Documentation YunoHost pour cette app : https://yunohost.org/app_phpmyadmin From 98a26b7a16c09b3d38e011773194c103475931b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 14 Nov 2021 11:46:43 +0100 Subject: [PATCH 7/7] Fix linter (#117) * Fix linter warnings --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/install | 9 ++++++++- scripts/remove | 8 ++++++++ scripts/restore | 11 +++++++++-- scripts/upgrade | 9 ++++++++- 8 files changed, 37 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2e88dce..66e54bc 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 Manage MySQL databases over the web -**Shipped version:** 5.1.1~ynh2 +**Shipped version:** 5.1.1~ynh3 **Demo:** https://demo.phpmyadmin.net/master-config diff --git a/README_fr.md b/README_fr.md index e62f40a..60729e7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Application web de gestion des bases de données MySQL -**Version incluse :** 5.1.1~ynh2 +**Version incluse :** 5.1.1~ynh3 **Démo :** https://demo.phpmyadmin.net/master-config diff --git a/manifest.json b/manifest.json index 2fcb724..b80069a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage MySQL databases over the web", "fr": "Application web de gestion des bases de données MySQL" }, - "version": "5.1.1~ynh2", + "version": "5.1.1~ynh3", "url": "http://www.phpmyadmin.net", "upstream": { "license": "GPL-2.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index 45d51fa..e07fa79 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-mbstring" +pkg_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-mbstring" YNH_COMPOSER_VERSION=2.0.14 diff --git a/scripts/install b/scripts/install index 809b57e..e2d78d8 100644 --- a/scripts/install +++ b/scripts/install @@ -46,6 +46,13 @@ 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 +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # STANDARD MODIFICATIONS #================================================= @@ -106,7 +113,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config #================================================= # SPECIFIC SETUP diff --git a/scripts/remove b/scripts/remove index d95d4fd..2c3895a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -34,6 +34,14 @@ ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name # Remove phpmyadmin MySQL admin user ynh_mysql_drop_user $db_admin_user +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index 3505835..32c669d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -93,14 +93,21 @@ chown $app: $final_path/tmp #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= - ynh_script_progression --message="Reconfiguring PHP-FPM.." --weight=6 # Restore the file first, so it can have a backup if different ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" # Recreate a dedicated php-fpm config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config + +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 97bef41..425d2f1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,13 +125,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # PHP-FPM CONFIGURATION #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config #================================================= # SPECIFIC UPGRADE