From 07fe9e2c22fc7131d039e3d4cf207705f14fce5f Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 7 Sep 2024 13:14:01 +0200 Subject: [PATCH] Fix and update MariaDB installation The download URL has changed, and since MariaDB 10.3.22 is a very old relases, we update to MariaDB 10.5.26 (which is the lowest still supported branch) right away. Since newer MariaDB apparently require to run mariadb-install-db.exe to properly set up the databases, we do this, if that executable is available. --- lib/php/libsdk/SDK/Build/PGO/Server/MariaDB.php | 4 +++- pgo/tpl/mariadb/phpsdk_pgo.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/php/libsdk/SDK/Build/PGO/Server/MariaDB.php b/lib/php/libsdk/SDK/Build/PGO/Server/MariaDB.php index c59aba0..bd09682 100644 --- a/lib/php/libsdk/SDK/Build/PGO/Server/MariaDB.php +++ b/lib/php/libsdk/SDK/Build/PGO/Server/MariaDB.php @@ -30,7 +30,9 @@ public function __construct(PGOConfig $conf) /** @return void */ protected function setupDist() { - /* pass */ + if (file_exists("$this->base/bin/mariadb-install-db.exe")) { + exec("$this->base/bin/mariadb-install-db.exe"); + } } public function prepareInit(PackageWorkman $pw, bool $force = false) : void diff --git a/pgo/tpl/mariadb/phpsdk_pgo.json b/pgo/tpl/mariadb/phpsdk_pgo.json index 6487df0..8368b66 100644 --- a/pgo/tpl/mariadb/phpsdk_pgo.json +++ b/pgo/tpl/mariadb/phpsdk_pgo.json @@ -1,5 +1,5 @@ { - "pkg_url": "https://downloads.mariadb.com/MariaDB/mariadb-10.3.22/win32-packages/mariadb-10.3.22-win32.zip", + "pkg_url": "https://downloads.mariadb.org/rest-api/mariadb/10.5.26/mariadb-10.5.26-winx64.zip", "host": "localhost", "port": 3307, "user": "root",