From f888df6083627e84e3764762aa235b367120fb56 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 7 Jun 2020 19:24:38 +0200 Subject: [PATCH 1/7] Upgrade to upstream version 5.0.2 / Use PHP 7.3 --- conf/app.src | 4 ++-- conf/nginx.conf | 2 +- conf/php-fpm.conf | 2 +- manifest.json | 4 ++-- scripts/_common.sh | 31 ++++++++++++++++++++++--------- scripts/backup | 4 ++-- scripts/install | 2 +- scripts/restore | 13 +++++++++---- scripts/upgrade | 34 +++++++++++++++++----------------- 9 files changed, 57 insertions(+), 39 deletions(-) diff --git a/conf/app.src b/conf/app.src index f46f64f..d7cd70d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://files.phpmyadmin.net/phpMyAdmin/4.9.5/phpMyAdmin-4.9.5-all-languages.tar.gz -SOURCE_SUM=d1ab98cde370c39dafdaa13ce02fa35cecaaa6d33553fde092604b99660e8835 +SOURCE_URL=https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.tar.gz +SOURCE_SUM=8d5cb67de154262b6e51e6ac6967d0931d28ef39cdc7fbec44011d374eb432ae SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 4796506..303eb96 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -16,7 +16,7 @@ location __PATH__/ { try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 88b5479..e871971 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -33,7 +33,7 @@ group = __USER__ ; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock +listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock ; Set listen(2) backlog. ; Default Value: 511 (-1 on FreeBSD and OpenBSD) diff --git a/manifest.json b/manifest.json index 2c9feac..d835e35 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": "4.9.5~ynh1", + "version": "5.0.2~ynh1", "url": "http://www.phpmyadmin.net", "license": "GPL-2.0-only", "maintainer": { @@ -14,7 +14,7 @@ "email": "julien.malik@paraiso.me" }, "requirements": { - "yunohost": ">= 3.5.0" + "yunohost": ">= 3.8.1" }, "multi_instance": false, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 0f122b9..46ce7fb 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,12 +1,20 @@ #!/bin/bash +#================================================= +# COMMON VARIABLES +#================================================= + +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" + + #================================================= # EXPERIMENTAL HELPERS #================================================= # Execute a command as another user # usage: exec_as USER COMMAND [ARG ...] -exec_as() { +ynh_exec_as() { local USER=$1 shift 1 @@ -19,7 +27,8 @@ exec_as() { # Execute a command with Composer # -# usage: ynh_composer_exec --phpversion=phpversion [--workdir=$final_path] --commands="commands" +# usage: ynh_composer_exec [--phpversion=phpversion] [--workdir=$final_path] --commands="commands" +# | arg: -v, --phpversion - PHP version to use with composer # | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. # | arg: -c, --commands - Commands to execute. ynh_composer_exec () { @@ -32,7 +41,7 @@ ynh_composer_exec () { # Manage arguments with getopts ynh_handle_getopts_args "$@" workdir="${workdir:-$final_path}" - phpversion="${phpversion:-7.0}" + phpversion="${phpversion:-$YNH_PHP_VERSION}" COMPOSER_HOME="$workdir/.composer" \ php${phpversion} "$workdir/composer.phar" $commands \ @@ -41,18 +50,22 @@ ynh_composer_exec () { # Install and initialize Composer in the given directory # -# usage: ynh_install_composer --phpversion=phpversion [--workdir=$final_path] +# usage: ynh_install_composer [--phpversion=phpversion] [--workdir=$final_path] [--install_args="--optimize-autoloader"] +# | arg: -v, --phpversion - PHP version to use with composer # | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. +# | arg: -a, --install_args - Additional arguments provided to the composer install. Argument --no-dev already include ynh_install_composer () { # Declare an array to define the options of this helper. - local legacy_args=vw - declare -Ar args_array=( [v]=phpversion= [w]=workdir= ) + local legacy_args=vwa + declare -Ar args_array=( [v]=phpversion= [w]=workdir= [a]=install_args=) local phpversion local workdir + local install_args # Manage arguments with getopts ynh_handle_getopts_args "$@" workdir="${workdir:-$final_path}" - phpversion="${phpversion:-7.0}" + phpversion="${phpversion:-$YNH_PHP_VERSION}" + install_args="${install_args:-}" curl -sS https://getcomposer.org/installer \ | COMPOSER_HOME="$workdir/.composer" \ @@ -60,6 +73,6 @@ ynh_install_composer () { || ynh_die "Unable to install Composer." # update dependencies to create composer.lock - ynh_composer_exec --phpversion="${phpversion}" --workdir="$workdir" --commands="install --no-dev" \ + ynh_composer_exec --phpversion="${phpversion}" --workdir="$workdir" --commands="install --no-dev $install_args" \ || ynh_die "Unable to update core dependencies with Composer." -} +} \ No newline at end of file diff --git a/scripts/backup b/scripts/backup index fa7b254..5a32a67 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -# source ../settings/scripts/_common.sh +source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= @@ -48,7 +48,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= ynh_script_progression --message="Backing up php-fpm configuration..." -ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf" +ynh_backup --src_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE diff --git a/scripts/install b/scripts/install index 5ea0771..5e88457 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Configuring php-fpm..." --weight=2 # Create a dedicated php-fpm config -ynh_add_fpm_config +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= # SPECIFIC SETUP diff --git a/scripts/restore b/scripts/restore index 3e2fccb..e9e5d20 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -# source ../settings/scripts/_common.sh +source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= @@ -95,16 +95,21 @@ chown $app: $final_path/tmp # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf" +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 --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= # GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server and php-fpm..." +ynh_script_progression --message="Reloading nginx web server..." -ynh_systemd_action --service_name=php7.0-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7bcb21a..7353cec 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,7 +128,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=4 # Create a dedicated php-fpm config -ynh_add_fpm_config +ynh_add_fpm_config --phpversion="$YNH_PHP_VERSION" --package="$extra_php_dependencies" #================================================= # SPECIFIC UPGRADE @@ -176,22 +176,6 @@ cp ../conf/config.inc.php $final_path # Recalculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$final_path/config.inc.php" -#================================================= -# INSTALL DEPENDENCIES -#================================================= - -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - - ynh_script_progression --message="Upgrading dependencies with Composer..." --weight=19 - - # Install composer - ynh_install_composer - - # Install dependencies - ynh_exec_warn_less ynh_composer_exec --commands=\"update --no-dev\" -fi - #================================================= # GENERIC FINALIZATION #================================================= @@ -207,6 +191,22 @@ chmod 640 $final_path/config.inc.php mkdir -p $final_path/tmp chown -R $app: $final_path/tmp + +#================================================= +# INSTALL DEPENDENCIES +#================================================= + +if [ "$upgrade_type" == "UPGRADE_APP" ] +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\" + # Install dependencies + ynh_exec_warn_less ynh_composer_exec --commands=\"update --no-dev\" +fi + #================================================= # SETUP SSOWAT #================================================= From 8e1db8acf05b29111900c08b9f6f3d0ae4362629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 17 Jul 2020 14:31:15 +0200 Subject: [PATCH 2/7] Update README.md - *Change version number* - *phpMyAdmin cap* --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b2ec09c..2f32fa4 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# Phpmyadmin for YunoHost +# phpMyAdmin for YunoHost [![Integration level](https://dash.yunohost.org/integration/phpmyadmin.svg)](https://dash.yunohost.org/appci/app/phpmyadmin) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.maintain.svg) -[![Install Phpmyadmin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=phpmyadmin) +[![Install phpMyAdmin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=phpmyadmin) -> *This package allow you to install Phpmyadmin quickly and simply on a YunoHost server. +> *This package allow you to install phpMyAdmin quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* ## Overview phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement. -**Shipped version:** 4.9.5 +**Shipped version:** 5.0.2 ## Screenshots @@ -34,9 +34,8 @@ phpMyAdmin is a free software tool written in PHP, intended to handle the admini #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/phpmyadmin%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/phpmyadmin/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/phpmyadmin%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/phpmyadmin/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/phpmyadmin%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/phpmyadmin/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/phpmyadmin%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/phpmyadmin/) ## Limitations @@ -45,8 +44,8 @@ phpMyAdmin is a free software tool written in PHP, intended to handle the admini ## Links * Report a bug: https://github.com/YunoHost-Apps/phpmyadmin_ynh/issues - * Phpmyadmin website: https://www.phpmyadmin.net/ - * Phpmyadmin repository: https://github.com/phpmyadmin/phpmyadmin + * phpMyAdmin website: https://www.phpmyadmin.net/ + * phpMyAdmin repository: https://github.com/phpmyadmin/phpmyadmin * YunoHost website: https://yunohost.org/ --- From a1b94a7d426d32f6d32571bf646aa376c74c79f8 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Sep 2020 13:31:10 +0200 Subject: [PATCH 3/7] Add README_fr --- README.md | 5 ++-- README_fr.md | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 README_fr.md diff --git a/README.md b/README.md index 2f32fa4..ff557b9 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ [![Integration level](https://dash.yunohost.org/integration/phpmyadmin.svg)](https://dash.yunohost.org/appci/app/phpmyadmin) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.maintain.svg) [![Install phpMyAdmin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=phpmyadmin) +*[Read this readme in english.](./README.md)* + > *This package allow you to install phpMyAdmin quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* @@ -50,8 +52,7 @@ phpMyAdmin is a free software tool written in PHP, intended to handle the admini --- -Developers infos ----------------- +## Developers infos Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/phpmyadmin_ynh/tree/testing). diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..a46956a --- /dev/null +++ b/README_fr.md @@ -0,0 +1,64 @@ +# phpMyAdmin avec YunoHost + +[![Integration level](https://dash.yunohost.org/integration/phpmyadmin.svg)](https://dash.yunohost.org/appci/app/phpmyadmin) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.maintain.svg) +[![Installer phpMyAdmin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=phpmyadmin) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d'installer phpMyAdmin rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* + +## Vue d'ensemble + +phpMyAdmin est un outil logiciel libre écrit en PHP, destiné à gérer l'administration de MySQL sur le Web. phpMyAdmin prend en charge un large éventail d'opérations sur MySQL et MariaDB. Les opérations fréquemment utilisées (gestion des bases de données, des tables, des colonnes, des relations, des index, des utilisateurs, des autorisations, etc.) peuvent être effectuées via l'interface utilisateur, tandis que vous avez toujours la possibilité d'exécuter directement les instructions SQL. + +**Version incluse :** 5.0.2 + +## Captures d'écran + +![](https://www.phpmyadmin.net/static/images/screenshots/structure.png) + +## Démo + +* [Démo YunoHost](https://demo.yunohost.org/phpmyadmin/) +* [Démo officielle](https://demo.phpmyadmin.net/master-config/) + +## Configuration + +## Documentation + + * Documentation officielle : https://www.phpmyadmin.net/docs/ + * Documentation YunoHost : If specific documentation is needed, feel free to contribute. + +## Caractéristiques spécifiques YunoHost + +#### Support multi-utilisateur + +#### Architectures supportées + +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/phpmyadmin%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/phpmyadmin/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/phpmyadmin%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/phpmyadmin/) + +## Limitations + +## Informations additionnelles + +## Liens + + * Signaler un bug : https://github.com/YunoHost-Apps/phpmyadmin_ynh/issues + * Site de l'application : https://www.phpmyadmin.net/ + * Dépôt de l'application principale : https://github.com/phpmyadmin/phpmyadmin + * Site web YunoHost : https://yunohost.org/ + +--- + +## Developers infos + +Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/phpmyadmin_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/phpmyadmin_ynh/tree/testing --debug +or +sudo yunohost app upgrade phpmyadmin -u https://github.com/YunoHost-Apps/phpmyadmin_ynh/tree/testing --debug +``` From 272b2d66160261d8584578f22fb6eef5adad459a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 24 Sep 2020 13:44:38 +0200 Subject: [PATCH 4/7] Small typos --- README.md | 2 +- README_fr.md | 2 +- scripts/backup | 12 ++++++------ scripts/change_url | 14 +++++++------- scripts/install | 14 +++++++------- scripts/remove | 8 ++++---- scripts/restore | 4 ++-- scripts/upgrade | 12 ++++++------ 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index ff557b9..48afed9 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ phpMyAdmin is a free software tool written in PHP, intended to handle the admini ## Documentation * Official documentation: https://www.phpmyadmin.net/docs/ - * YunoHost documentation: If specific documentation is needed, feel free to contribute. + * YunoHost documentation: https://yunohost.org/#/app_phpmyadmin ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index a46956a..4e75674 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ phpMyAdmin est un outil logiciel libre écrit en PHP, destiné à gérer l'admin ## Documentation * Documentation officielle : https://www.phpmyadmin.net/docs/ - * Documentation YunoHost : If specific documentation is needed, feel free to contribute. + * Documentation YunoHost : https://yunohost.org/#/app_phpmyadmin_fr ## Caractéristiques spécifiques YunoHost diff --git a/scripts/backup b/scripts/backup index 5a32a67..573db89 100644 --- a/scripts/backup +++ b/scripts/backup @@ -28,32 +28,32 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_script_progression --message="Backing up the main app directory..." ynh_backup --src_path="$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Backing up php-fpm configuration..." ynh_backup --src_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= -ynh_script_progression --message="Backing up the MySQL database..." +ynh_print_info --message="Backing up the MySQL database..." ynh_mysql_dump_db --database="$db_name" > db.sql @@ -61,4 +61,4 @@ ynh_mysql_dump_db --database="$db_name" > db.sql # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 14c221d..58c7fa5 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -50,23 +50,23 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location @@ -81,7 +81,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index 5e88457..3ce2385 100644 --- a/scripts/install +++ b/scripts/install @@ -82,9 +82,9 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=3 +ynh_script_progression --message="Configuring NGINX web server..." --weight=3 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -98,9 +98,9 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring php-fpm..." --weight=2 +ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 -# Create a dedicated php-fpm config +# Create a dedicated PHP-FPM config ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" #================================================= @@ -120,7 +120,7 @@ ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name #================================================= # CONFIGURE PHPMYADMIN #================================================= -ynh_script_progression --message="Configuring phpmyadmin..." +ynh_script_progression --message="Configuring phpMyAdmin..." ynh_replace_string --match_string="__YNH_PMA_ADMIN_USER__" --replace_string="$db_admin_user" --target_file=../conf/config.inc.php ynh_replace_string --match_string="__YNH_PMA_ADMIN_PASSWORD__" --replace_string="$db_admin_pwd" --target_file=../conf/config.inc.php @@ -137,7 +137,7 @@ ynh_store_file_checksum --file="$final_path/config.inc.php" #================================================= ynh_script_progression --message="Installing dependencies with Composer..." --weight=60 -# Install composer +# Install Composer ynh_install_composer # Install dependencies @@ -170,7 +170,7 @@ yunohost app addaccess --users=$admin $app #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=2 +ynh_script_progression --message="Reloading NGINX web server..." --weight=2 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 5ba3715..181cf59 100644 --- a/scripts/remove +++ b/scripts/remove @@ -45,17 +45,17 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration" +ynh_script_progression --message="Removing NGINX web server configuration" -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Removing php-fpm configuration" --weight=2 +ynh_script_progression --message="Removing PHP-FPM configuration" --weight=2 -# Remove the dedicated php-fpm config +# Remove the dedicated PHP-FPM config ynh_remove_fpm_config #================================================= diff --git a/scripts/restore b/scripts/restore index e9e5d20..fe8363f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -95,7 +95,7 @@ chown $app: $final_path/tmp # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Reconfiguring php-fpm..." --weight=6 +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" @@ -108,7 +108,7 @@ ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependenc #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 7353cec..8b2a4d2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,9 +109,9 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=3 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=3 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -125,9 +125,9 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=4 +ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4 -# Create a dedicated php-fpm config +# Create a dedicated PHP-FPM config ynh_add_fpm_config --phpversion="$YNH_PHP_VERSION" --package="$extra_php_dependencies" #================================================= @@ -161,7 +161,7 @@ fi #================================================= # CONFIGURE PHPMYADMIN #================================================= -ynh_script_progression --message="Reconfiguring phpmyadmin..." +ynh_script_progression --message="Reconfiguring phpMyAdmin..." # Verify the checksum and backup the file if it's different ynh_backup_if_checksum_is_different --file="$final_path/config.inc.php" @@ -218,7 +218,7 @@ yunohost app addaccess --users=$admin $app #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=2 +ynh_script_progression --message="Reloading NGINX web server..." --weight=2 ynh_systemd_action --service_name=nginx --action=reload From a813e8c2aaf57f4b3e0a9c73929be43949e8ecac Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 4 Oct 2020 09:58:12 +0200 Subject: [PATCH 5/7] Small typos --- scripts/change_url | 2 +- scripts/install | 2 +- scripts/remove | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 5 ++--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 58c7fa5..dd32bb0 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -89,4 +89,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression --message="Change of URL completed for phpMyAdmin" --last diff --git a/scripts/install b/scripts/install index 3ce2385..deb7975 100644 --- a/scripts/install +++ b/scripts/install @@ -178,4 +178,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of phpMyAdmin completed" --last diff --git a/scripts/remove b/scripts/remove index 181cf59..47fc652 100644 --- a/scripts/remove +++ b/scripts/remove @@ -37,7 +37,7 @@ ynh_mysql_drop_user $db_admin_user #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory" +ynh_script_progression --message="Removing phpMyAdmin main directory" # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -72,4 +72,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression --message="Removal of phpMyAdmin completed" --last diff --git a/scripts/restore b/scripts/restore index fe8363f..6ee3164 100644 --- a/scripts/restore +++ b/scripts/restore @@ -50,7 +50,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression --message="Restoring phpMyAdmin main directory..." ynh_restore_file --origin_path="$final_path" @@ -116,4 +116,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression --message="Restoration completed for phpMyAdmin" --last diff --git a/scripts/upgrade b/scripts/upgrade index 8b2a4d2..d89e35c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,7 +74,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=15 +ynh_script_progression --message="Backing up phpMyAdmin before upgrading (may take a while)..." --weight=15 # Backup the current version of the app ynh_backup_before_upgrade @@ -191,7 +191,6 @@ chmod 640 $final_path/config.inc.php mkdir -p $final_path/tmp chown -R $app: $final_path/tmp - #================================================= # INSTALL DEPENDENCIES #================================================= @@ -226,4 +225,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression --message="Upgrade of phpMyAdmin completed" --last From 08dc310646ad23d152763be7660f5f130185a185 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 4 Oct 2020 10:09:14 +0200 Subject: [PATCH 6/7] Small typos --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 48afed9..6793911 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Integration level](https://dash.yunohost.org/integration/phpmyadmin.svg)](https://dash.yunohost.org/appci/app/phpmyadmin) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.maintain.svg) [![Install phpMyAdmin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=phpmyadmin) -*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* > *This package allow you to install phpMyAdmin quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* diff --git a/README_fr.md b/README_fr.md index 4e75674..fb3b300 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,6 +1,6 @@ # phpMyAdmin avec YunoHost -[![Integration level](https://dash.yunohost.org/integration/phpmyadmin.svg)](https://dash.yunohost.org/appci/app/phpmyadmin) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/phpmyadmin.svg)](https://dash.yunohost.org/appci/app/phpmyadmin) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/phpmyadmin.maintain.svg) [![Installer phpMyAdmin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=phpmyadmin) *[Read this readme in english.](./README.md)* From f53662fb181377876bb0b47dfc57405c63069b96 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 4 Oct 2020 12:28:18 +0200 Subject: [PATCH 7/7] Update backup --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 573db89..0a9e6c8 100644 --- a/scripts/backup +++ b/scripts/backup @@ -19,7 +19,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=2 +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME