From e038071adba0a3746b25dc4ecdaf7e907a224fc1 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Mon, 13 Mar 2023 11:13:21 +0800 Subject: [PATCH] [Build] Fix the mirror gpg key expired issue (#14206) Why I did it [Build] Fix the mirror gpg key expired issue See vs build: https://dev.azure.com/mssonic/build/_build/results?buildId=231680&view=logs&j=cef3d8a9-152e-5193-620b-567dc18af272&t=cf595088-5c84-5cf1-9d7e-03331f31d795 How I did it Add the apt option not to check the valid until, the option is set to the SONiC docker base image, docker ptf missing the option. Acquire::Check-Valid-Until "false"; How to verify it The build of docker-ptf is succeeded after fixed. 2023-03-11T17:26:35.1801999Z [ building ] [ target/docker-ptf.gz ] 2023-03-11T17:38:10.1608536Z [ finished ] [ target/docker-ptf.gz ] --- dockers/docker-ptf/Dockerfile.j2 | 1 + dockers/docker-ptf/no-check-valid-until | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 dockers/docker-ptf/no-check-valid-until diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index ce9b91c1cecf..903fe56a0ae1 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -10,6 +10,7 @@ FROM {{ prefix }}debian:buster MAINTAINER Pavel Shirshov COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"] +COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"] ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive diff --git a/dockers/docker-ptf/no-check-valid-until b/dockers/docker-ptf/no-check-valid-until new file mode 100644 index 000000000000..c7c25d017f7f --- /dev/null +++ b/dockers/docker-ptf/no-check-valid-until @@ -0,0 +1,4 @@ +# Instruct apt-get to NOT check the "Valid Until" date in Release files +# Once the Debian team archives a repo, they stop updating this date + +Acquire::Check-Valid-Until "false";