From a46ee42d3a980b932d1c4f7d889c31d86ed6437d Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Wed, 1 Nov 2023 23:12:33 +0100 Subject: [PATCH] Fixed linter errors. --- manifest.toml | 19 ++++++++++--------- scripts/install | 6 +----- scripts/restore | 3 +-- scripts/upgrade | 3 +-- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/manifest.toml b/manifest.toml index e35f8fa..a13f6a0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,18 +17,18 @@ website = "http://www.phpmyadmin.net" demo = "https://demo.phpmyadmin.net/master-config" admindoc = "https://www.phpmyadmin.net/docs/" code = "https://github.com/phpmyadmin/phpmyadmin" -cpe = "???" # FIXME: optional but recommended if relevant, this is meant to contain the Common Platform Enumeration, which is sort of a standard id for applications defined by the NIST. In particular, Yunohost may use this is in the future to easily track CVE (=security reports) related to apps. The CPE may be obtained by searching here: https://nvd.nist.gov/products/cpe/search. For example, for Nextcloud, the CPE is 'cpe:2.3:a:nextcloud:nextcloud' (no need to include the version number) -fund = "???" # FIXME: optional but recommended (or remove if irrelevant / not applicable). This is meant to be an URL where people can financially support this app, especially when its development is based on volunteers and/or financed by its community. YunoHost may later advertise it in the webadmin. +cpe = "cpe:2.3:a:phpmyadmin:phpmyadmin" +fund = "https://www.phpmyadmin.net/donate/" [integration] yunohost = ">= 11.0.9" -architectures = "all" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] +architectures = "all" multi_instance = false -ldap = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "sso" key : the "ldap" key corresponds to wether or not a user *can* login on the app using its YunoHost credentials. -sso = "?" # FIXME: replace with true, false, or "not_relevant". Not to confuse with the "ldap" key : the "sso" key corresponds to wether or not a user is *automatically logged-in* on the app when logged-in on the YunoHost portal. -disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... -ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... -ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ldap = true +sso = true +disk = "100M" +ram.build = "50M" +ram.runtime = "50M" [install] [install.domain] @@ -56,9 +56,10 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen [resources.permissions] main.url = "/" + main.allowed = "admins" [resources.apt] - packages = "php7.4-xml, php7.4-curl, php7.4-zip, php7.4-mysql, php7.4-mbstring" + packages = "mariadb-server php8.2-xml, php8.2-curl, php8.2-zip, php8.2-mysql, php8.2-mbstring" [resources.database] type = "mysql" diff --git a/scripts/install b/scripts/install index 75c88ed..e6f730a 100644 --- a/scripts/install +++ b/scripts/install @@ -24,8 +24,7 @@ ynh_app_setting_set --app=$app --key=db_admin_pwd --value=$db_admin_pwd if ! ynh_mysql_user_exists --user=$db_admin_user then ynh_mysql_create_user $db_admin_user "$db_admin_pwd" - ynh_mysql_execute_as_root --sql="GRANT ALL PRIVILEGES ON *.* TO '$db_admin_user'@'localhost' IDENTIFIED BY '$db_admin_pwd' WITH GRANT OPTION; - FLUSH PRIVILEGES;" --database=mysql + ynh_mysql_execute_as_root --sql="GRANT ALL PRIVILEGES ON *.* TO '$db_admin_user'@'localhost' IDENTIFIED BY '$db_admin_pwd' WITH GRANT OPTION; FLUSH PRIVILEGES;" --database=mysql fi #================================================= @@ -63,9 +62,6 @@ ynh_add_fpm_config #================================================= ynh_script_progression --message="Filling database..." --weight=3 -ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file=../conf/create_db.sql -ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" \ - < ../conf/create_db.sql ynh_replace_string --match_string="phpmyadmin" --replace_string="$db_name" --target_file=$install_dir/sql/create_tables.sql ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name" \ < $install_dir/sql/create_tables.sql diff --git a/scripts/restore b/scripts/restore index 9454fd3..beb23a4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -39,8 +39,7 @@ ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./ if ! ynh_mysql_user_exists --user=$db_admin_user then ynh_mysql_create_user "$db_admin_user" "$db_admin_pwd" - ynh_mysql_execute_as_root --sql="GRANT ALL PRIVILEGES ON *.* TO '$db_admin_user'@'localhost' IDENTIFIED BY '$db_admin_pwd' WITH GRANT OPTION; - FLUSH PRIVILEGES;" --database=mysql + ynh_mysql_execute_as_root --sql="GRANT ALL PRIVILEGES ON *.* TO '$db_admin_user'@'localhost' IDENTIFIED BY '$db_admin_pwd' WITH GRANT OPTION; FLUSH PRIVILEGES;" --database=mysql fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1b32869..6f38759 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,8 +38,7 @@ if [ -z "$db_admin_user" ]; then if ! ynh_mysql_user_exists --user=$db_admin_user then ynh_mysql_create_user $db_admin_user "$db_admin_pwd" - ynh_mysql_execute_as_root --sql="GRANT ALL PRIVILEGES ON *.* TO '$db_admin_user'@'localhost' IDENTIFIED BY '$db_admin_pwd' WITH GRANT OPTION; - FLUSH PRIVILEGES;" --database=mysql + ynh_mysql_execute_as_root --sql="GRANT ALL PRIVILEGES ON *.* TO '$db_admin_user'@'localhost' IDENTIFIED BY '$db_admin_pwd' WITH GRANT OPTION; FLUSH PRIVILEGES;" --database=mysql fi fi