From 399df7785d3371b904f534fb650bb636c55dcc85 Mon Sep 17 00:00:00 2001 From: Xianghong Gu Date: Tue, 14 Nov 2023 07:30:51 +0000 Subject: [PATCH] [arm64] Fix qemu arm64 compile failing with NO_PUBKEY in march bullseye slave docker Signed-off-by: Xianghong Gu --- dockers/docker-base-bullseye/Dockerfile.j2 | 4 ++++ sonic-slave-bullseye/Dockerfile.j2 | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dockers/docker-base-bullseye/Dockerfile.j2 b/dockers/docker-base-bullseye/Dockerfile.j2 index 1fa7196ea67c..e47bc761a57e 100644 --- a/dockers/docker-base-bullseye/Dockerfile.j2 +++ b/dockers/docker-base-bullseye/Dockerfile.j2 @@ -32,6 +32,10 @@ COPY ["no_install_recommend_suggest", "/etc/apt/apt.conf.d"] COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"] COPY ["apt-multiple-retries", "/etc/apt/apt.conf.d"] +{%- if CONFIGURED_ARCH == "arm64" and MULTIARCH_QEMU_ENVIRON == "y" %} +RUN SKIP_BUILD_HOOK="y" wget -O debian-archive-keyring.deb 'http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2021.1.1+deb11u1_all.deb' && dpkg -i debian-archive-keyring.deb && rm debian-archive-keyring.deb && SKIP_BUILD_HOOK="n" +{%- endif %} + # Update apt cache and # pre-install fundamental packages RUN apt-get update && \ diff --git a/sonic-slave-bullseye/Dockerfile.j2 b/sonic-slave-bullseye/Dockerfile.j2 index 19e1babc3952..bdc7dda80305 100644 --- a/sonic-slave-bullseye/Dockerfile.j2 +++ b/sonic-slave-bullseye/Dockerfile.j2 @@ -55,6 +55,10 @@ ARG CROSS_CXX=${gcc_arch}-g++ ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive +{%- if CONFIGURED_ARCH == "arm64" and MULTIARCH_QEMU_ENVIRON == "y" %} +RUN SKIP_BUILD_HOOK="y" wget -O debian-archive-keyring.deb 'http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2021.1.1+deb11u1_all.deb' && dpkg -i debian-archive-keyring.deb && rm debian-archive-keyring.deb && SKIP_BUILD_HOOK="n" +{%- endif %} + {%- if CROSS_BUILD_ENVIRON == "y" %} RUN eatmydata apt-get install -y python3 python3-pip RUN apt-get install -y python3-minimal:$arch python3.9:$arch python3:$arch python3-dev:$arch python3-setuptools:$arch