From b99c46e3f8c8172ae3005b019b341f7670d0119d Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Thu, 18 Jan 2024 20:05:04 +0800 Subject: [PATCH] [build] Add gpg keys for sonic-slave-bullseye in arm64 cross build on amd64. (#17182) (#17828) Fix #16204 Microsoft ADO (number only): 25746782 How I did it multiarch/debian-debootstrap:arm64-bullseye is too old. It needs to add some gpg keys before 'apt-get update' --- sonic-slave-bullseye/Dockerfile.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sonic-slave-bullseye/Dockerfile.j2 b/sonic-slave-bullseye/Dockerfile.j2 index 9b01bc8cedeb..b2d1531b51a6 100644 --- a/sonic-slave-bullseye/Dockerfile.j2 +++ b/sonic-slave-bullseye/Dockerfile.j2 @@ -80,6 +80,13 @@ RUN PATH=/python_virtualenv/env3/bin/:$PATH python3 -m pip uninstall -y enum34 RUN PATH=/python_virtualenv/env3/bin/:$PATH pip3 install --force-reinstall --no-cache-dir coverage {%- endif %} +{%- if CONFIGURED_ARCH == "arm64" and MULTIARCH_QEMU_ENVIRON == "y" %} +# multiarch/debian-debootstrap:arm64-bullseye is too old. It needs to install keys +RUN apt-get update || apt-get install -y gnupg +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6ED0E7B82643E131 +{%- endif %} + RUN apt-get update && apt-get install -y \ apt-utils \ default-jre-headless \