From 679d0f6ba91a002ec23e6ab5ed8a068cc74ad072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Mon, 8 Jun 2026 11:39:23 +0200 Subject: [PATCH] devstack: Add signed-by to MongoDB 8.0 apt source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The MongoDB 8.0 apt repository configuration for Ubuntu 24.04 downloads the GPG key into /usr/share/keyrings/mongodb-server-8.0.gpg but the deb source line does not reference it via signed-by. On standard Ubuntu 24.04 systems, apt treats unsigned repositories as a hard error, causing stack.sh to fail with exit code 100. Add signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg to the deb line in both devstack/plugin.sh and tools/test-setup.sh, matching the pattern already used for Debian 12/13 in test-setup.sh. Closes-Bug: #2155845 Change-Id: I89a6fa87c4156aff1896aedc67080d637df62fae Signed-off-by: Martin André --- devstack/plugin.sh | 2 +- tools/test-setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index cc9ef0e45..cb77e86b4 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -165,7 +165,7 @@ function configure_mongodb { curl -fsSL https://pgp.mongodb.com/server-8.0.asc | \ sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \ --dearmor - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list + echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list sudo apt update install_package mongodb-org restart_service mongod diff --git a/tools/test-setup.sh b/tools/test-setup.sh index be6704dba..1aa79c715 100755 --- a/tools/test-setup.sh +++ b/tools/test-setup.sh @@ -41,7 +41,7 @@ if [[ $ubuntu_version == '24.04' ]]; then curl -fsSL https://pgp.mongodb.com/server-8.0.asc | \ sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \ --dearmor - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list + echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list sudo apt update sudo apt install -y mongodb-org sudo systemctl restart mongod