From 3088fec9f645e83a3675beb68793cf37289879df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 30 Apr 2026 12:23:27 +0200 Subject: [PATCH] tools.func: Manage minor versions for MongoDB 8.x --- misc/tools.func | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index 8c2139c4c..da0f954a3 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -5964,14 +5964,14 @@ function setup_mariadb_db() { } # ------------------------------------------------------------------------------ -# Installs or updates MongoDB to specified major version. +# Installs or updates MongoDB to specified version. # # Description: # - Preserves data across installations # - Adds official MongoDB repo # # Variables: -# MONGO_VERSION - MongoDB major version to install (e.g. 7.0, 8.0) +# MONGO_VERSION - MongoDB version to install (e.g. 7.0, 8.2) # ------------------------------------------------------------------------------ function setup_mongodb() { @@ -6044,8 +6044,11 @@ function setup_mongodb() { } # Setup repository + # MongoDB 8.x versions beyond 8.0 reuse the server-8.0.asc PGP key + local MONGO_KEY_VERSION="${MONGO_VERSION}" + [[ "${MONGO_VERSION}" == 8.[1-9]* ]] && MONGO_KEY_VERSION="8.0" manage_tool_repository "mongodb" "$MONGO_VERSION" "$MONGO_BASE_URL" \ - "https://www.mongodb.org/static/pgp/server-${MONGO_VERSION}.asc" || { + "https://www.mongodb.org/static/pgp/server-${MONGO_KEY_VERSION}.asc" || { msg_error "Failed to setup MongoDB repository" return 100 }