fix(fleet): downgrade version from 13 to 12 in configuration files and scripts

fix(invidious): correct indentation in version retrieval
fix(fleet-install): switch from MariaDB to MySQL setup and update database creation logic
fix(tools): add MySQL repository handling in helper functions
This commit is contained in:
MickLesk
2026-05-18 14:27:58 +02:00
parent d73ac9566f
commit dd0b3c6538
5 changed files with 66 additions and 10 deletions

View File

@@ -894,6 +894,55 @@ 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 65
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 7
fi
chmod 644 "/etc/apt/keyrings/mysql.gpg"
local distro_codename
distro_codename=$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)
if [[ "$distro_id" == "debian" ]]; then
case "$distro_codename" in
bookworm | bullseye) suite="$distro_codename" ;;
*) suite="bookworm" ;;
esac
elif [[ "$distro_id" == "ubuntu" ]]; then
case "$distro_codename" in
noble | jammy) suite="$distro_codename" ;;
*) suite="noble" ;;
esac
else
suite=$(get_fallback_suite "$distro_id" "$distro_codename" "$repo_url")
fi
local component
if [[ "$version" == "8.4" ]]; then
component="mysql-8.4-lts"
else
component="mysql-${version}"
fi
cat >/etc/apt/sources.list.d/mysql.sources <<EOF
Types: deb
URIs: ${repo_url}/
Suites: ${suite}
Components: ${component}
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/mysql.gpg
EOF
return 0
;;