From c35374765ff7542d17b27ea219ae24ad5680adec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 2 Oct 2023 18:56:30 +0200 Subject: [PATCH] Fix bookworm by adding dependency on php7.4 and using $phpversion --- manifest.toml | 20 +++++++++++++++----- scripts/install | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/manifest.toml b/manifest.toml index 946c14c..118e749 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 = "cachet" @@ -49,10 +51,10 @@ ram.runtime = "50M" optional = true [resources] - [resources.sources.main] - url = "https://github.com/CachetHQ/Cachet/archive/f40da226670a92934170c1adcfff3d1c40a6096b.tar.gz" - sha256 = "65bc27e040d963fdeea20f48bbe086f05598fdb9b8934916b6bf47a28a3d2dd8" - autoupdate.strategy = "latest_github_commit" + [resources.sources.main] + url = "https://github.com/CachetHQ/Cachet/archive/f40da226670a92934170c1adcfff3d1c40a6096b.tar.gz" + sha256 = "65bc27e040d963fdeea20f48bbe086f05598fdb9b8934916b6bf47a28a3d2dd8" + autoupdate.strategy = "latest_github_commit" [resources.system_user] @@ -62,7 +64,15 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server php7.4-gd php7.4-mbstring php7.4-xml php7.4-mysql php7.4-sqlite3" + packages = [ + "mariadb-server", + "php7.4", + "php7.4-gd", + "php7.4-mbstring", + "php7.4-xml", + "php7.4-mysql", + "php7.4-sqlite3" + ] [resources.database] type = "mysql" diff --git a/scripts/install b/scripts/install index 794c0e2..152d5c5 100644 --- a/scripts/install +++ b/scripts/install @@ -67,7 +67,7 @@ exec_artisan "cachet:install" #================================================= ynh_script_progression --message="Finalizing Cachet configuration..." -password_hash="$(cd $install_dir ; php$YNH_PHP_VERSION artisan tinker -q --no-ansi <<< "echo Hash::make('$password');" |head -n 1)" +password_hash="$(cd $install_dir ; php$phpversion artisan tinker -q --no-ansi <<< "echo Hash::make('$password');" |head -n 1)" password_pash="${password_hash::-1}" # Remove last character # Populate MySQL database