From 8a6633e5a3643f4b76cc6a229ee6ac97ed6bf2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Wed, 5 Jun 2024 14:53:37 +0200 Subject: [PATCH 1/3] Add toml schemas --- manifest.toml | 2 ++ tests.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/manifest.toml b/manifest.toml index 10c8352..18d6e09 100644 --- a/manifest.toml +++ b/manifest.toml @@ -1,3 +1,5 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json + packaging_format = 2 id = "calibreweb" diff --git a/tests.toml b/tests.toml index 4f87a21..fd4b2c5 100644 --- a/tests.toml +++ b/tests.toml @@ -1,3 +1,5 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json + test_format = 1.0 [default] From f5a173962e7fbd987ad675b7211c0b8615e983c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 8 Dec 2023 21:28:11 +0100 Subject: [PATCH 2/3] cd install_dir before running pip --- scripts/restore | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/restore b/scripts/restore index 078c8f3..0b788fd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -40,7 +40,7 @@ chmod 740 $install_dir #Use venv to install pip requirements - Inspired from https://github.com/YunoHost-Apps/pyinventory_ynh/blob/master/scripts/install ynh_script_progression --message="Reinstalling pip requirements..." --weight=70 # Always recreate everything fresh with current python version -# When reinstalling on a new yunohost, this is required +# When reinstalling on a new yunohost, this is required if [ -d "${install_dir}/venv" ] ; then ynh_secure_remove "${install_dir}/venv" fi @@ -51,13 +51,14 @@ chown -R "$app:" "$install_dir" #run source in a 'sub shell' ( + cd "$install_dir" set +o nounset - source "${install_dir}/venv/bin/activate" + source "venv/bin/activate" set -o nounset - ynh_exec_as $app $install_dir/venv/bin/python3 -m ensurepip - ynh_exec_as $app $install_dir/venv/bin/pip3 install --upgrade wheel pip setuptools - ynh_exec_as $app $install_dir/venv/bin/pip3 install --no-cache-dir --upgrade -r "$install_dir/requirements.txt" - ynh_exec_as $app $install_dir/venv/bin/pip3 install --no-cache-dir --upgrade -r "$install_dir/optional-requirements.txt" + ynh_exec_as $app venv/bin/python3 -m ensurepip + ynh_exec_as $app venv/bin/pip3 install --upgrade wheel pip setuptools + ynh_exec_as $app venv/bin/pip3 install --no-cache-dir --upgrade -r "$install_dir/requirements.txt" + ynh_exec_as $app venv/bin/pip3 install --no-cache-dir --upgrade -r "$install_dir/optional-requirements.txt" ) #================================================= @@ -167,4 +168,3 @@ ynh_script_progression --message="Restoration completed for $app" --last # WARNING FOR READ ACCESS #================================================= ynh_print_warn "Please, give required access to $app user to the $calibre_dir folder." - From 71cfba49c496ef151bd325c56da41e5c561ce484 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sun, 23 Jun 2024 02:26:28 +0200 Subject: [PATCH 3/3] [autopatch] Do not delete logs on app removal --- scripts/remove | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index a1944a7..74f51b0 100755 --- a/scripts/remove +++ b/scripts/remove @@ -91,7 +91,6 @@ if [ -z /etc/ImageMagick-6/policy.xml ]; then --target_file="/etc/ImageMagick-6/policy.xml" fi -# Remove the log files ynh_script_progression --message="Removing log file..." --weight=1 ynh_secure_remove "$log_file" ynh_secure_remove "$access_log_file"