From 9d43237307f19be08611b6d571abfab2ab8f1c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 2 Apr 2025 14:12:39 +0200 Subject: [PATCH] Replace usage of deprecated apt-key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Paweł Gronowski --- install-containerd-helpers | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install-containerd-helpers b/install-containerd-helpers index e38c613990..d40ad7e370 100644 --- a/install-containerd-helpers +++ b/install-containerd-helpers @@ -65,7 +65,9 @@ function install_debian_containerd() { # Make sure ca-certificates are up-to-date update-ca-certificates -f - curl -fsSL "${REPO_URL}/gpg" | apt-key add - + install -m 0755 -d /etc/apt/keyrings + curl -fsSL "${REPO_URL}/gpg" | tee /etc/apt/keyrings/docker.asc + chmod a+r /etc/apt/keyrings/docker.asc if [ "${DIST_VERSION}" = "sid" ]; then echo 'Debian sid ("unstable") cannot be used for packaging: replace with the actual codename' @@ -77,7 +79,7 @@ function install_debian_containerd() { # Once a containerd package becomes stable it will also be available in the test channel, # so this logic works for both cases. # (See also same logic in install_rpm_containerd) - echo "deb [arch=${ARCH}] ${REPO_URL} ${DIST_VERSION} test" > /etc/apt/sources.list.d/docker.list + echo "deb [arch=${ARCH} signed-by=/etc/apt/keyrings/docker.asc] ${REPO_URL} ${DIST_VERSION} test" > /etc/apt/sources.list.d/docker.list apt-get update }