From f7258d5268d8263ab5394c31299e13bd3ecfd569 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Sun, 5 Apr 2026 18:35:51 +0200 Subject: [PATCH] fix(fleet,mysql): switch Fleet to MariaDB, add mysql case to manage_tool_repository - fleet: use setup_mariadb instead of setup_mysql (MariaDB works fine for Fleet and avoids MySQL repo complexity on trixie) - tools.func: add missing mysql) case block to manage_tool_repository (was causing 'Unknown tool repository: mysql' error) --- install/fleet-install.sh | 2 +- misc/tools.func | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/install/fleet-install.sh b/install/fleet-install.sh index 9a9543f4..5937d32e 100644 --- a/install/fleet-install.sh +++ b/install/fleet-install.sh @@ -13,7 +13,7 @@ setting_up_container network_check update_os -setup_mysql +setup_mariadb msg_info "Setting up Database" FLEET_DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c 13) diff --git a/misc/tools.func b/misc/tools.func index b0fa9fc2..4741c5ae 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -894,6 +894,41 @@ Suites: $distro_codename-pgdg Components: main Architectures: $(dpkg --print-architecture) Signed-By: /etc/apt/keyrings/postgresql.gpg +EOF + return 0 + ;; + + mysql) + if [[ -z "$repo_url" || -z "$gpg_key_url" ]]; then + msg_error "MySQL repository requires repo_url and gpg_key_url" + return 1 + fi + + cleanup_old_repo_files "mysql" + + if ! download_gpg_key "$gpg_key_url" "/etc/apt/keyrings/mysql.gpg" "dearmor"; then + msg_error "Failed to import MySQL GPG key" + return 1 + fi + + local distro_codename + distro_codename=$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release) + + local mysql_suite="$distro_codename" + if [[ "$distro_id" == "debian" ]]; then + case "$distro_codename" in + trixie | bookworm | bullseye) mysql_suite="$distro_codename" ;; + *) mysql_suite="bookworm" ;; + esac + fi + + cat </etc/apt/sources.list.d/mysql.sources +Types: deb +URIs: $repo_url +Suites: $mysql_suite +Components: mysql-$version mysql-tools +Architectures: $(dpkg --print-architecture) +Signed-By: /etc/apt/keyrings/mysql.gpg EOF return 0 ;; @@ -4464,7 +4499,7 @@ function setup_hwaccel() { msg_info "Configuring: ${gpu_name}" case "$gpu_type" in - # ───────────────────────────────────────────────────────────────────────── + # ──────────��────────────────────────────────────────────────────────────── # Intel Arc GPUs (DG1, DG2, Arc A-series) # ───────────────────────────────────────────────────────────────────────── INTEL_ARC)