From b1204dbd3d53d5aef7e193b7d22249c090deef47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 10 Jun 2023 23:08:26 +0200 Subject: [PATCH] Fix linter warnings --- check_process | 25 ------------------------- manifest.toml | 2 +- scripts/install | 10 +++++----- tests.toml | 5 +++++ 4 files changed, 11 insertions(+), 31 deletions(-) delete mode 100644 check_process create mode 100644 tests.toml diff --git a/check_process b/check_process deleted file mode 100644 index 97b4294..0000000 --- a/check_process +++ /dev/null @@ -1,25 +0,0 @@ -;; Full test - ; Manifest - domain="domain.tld" - path="/path" - is_public=1 - password="1Strong-Password" - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - # Before refactoring yunohost package - #upgrade=1 from_commit=0f904d99367cfec27ec5fe303941fbf1124a7571 - # 4.1.5~ynh3 - upgrade=1 from_commit=17bde85b095eddeeb279ef96f5697f92a59380db - backup_restore=1 - multi_instance=1 - port_already_use=0 - change_url=1 -;;; Options -Email= -Notification=none diff --git a/manifest.toml b/manifest.toml index 6acf583..0f177b4 100644 --- a/manifest.toml +++ b/manifest.toml @@ -54,7 +54,7 @@ ram.runtime = "?" # FIXME: replace with an **estimate** minimum ram requirement. main.url = "/" [resources.apt] - packages = "python3-dev, python3-venv, libffi-dev, libssl-dev" + packages = "mariadb-server, python3-dev, python3-venv, libffi-dev, libssl-dev" [resources.database] type = "mysql" diff --git a/scripts/install b/scripts/install index a4fbb06..761ec72 100755 --- a/scripts/install +++ b/scripts/install @@ -9,10 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -# Secret key for cookies encryption. -secret_key=$(ynh_string_random --length=32) -ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key - #================================================= # SPECIFIC SETUP #================================================= @@ -41,6 +37,10 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." +# Secret key for cookies encryption. +secret_key=$(ynh_string_random --length=32) +ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key + #run source in a 'sub shell' ( set +o nounset @@ -49,7 +49,7 @@ ynh_script_progression --message="Adding a configuration file..." python3 ../conf/hash_generator.py $password > ${install_dir}/key.txt ) -hashed_password=$(cat $install_dir/key.txt) +hashed_password=$(cat "$install_dir/key.txt") ynh_secure_remove --file="$install_dir/key.txt" ynh_app_setting_set --app=$app --key=hashed_password --value=$hashed_password diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..2b83ba0 --- /dev/null +++ b/tests.toml @@ -0,0 +1,5 @@ +test_format = 1.0 + +[default] + + test_upgrade_from.17bde85b095eddeeb279ef96f5697f92a59380db.name = "Upgrade from 5.4"