From 476be913c1238e07f1f4004638ee76dadb177cd5 Mon Sep 17 00:00:00 2001 From: lguohan Date: Tue, 31 Dec 2019 16:30:10 -0800 Subject: [PATCH] [docker-base-stretch]: Do not check expire for stretch-backports repo (#3958) * [docker-base-stretch]: Do not check expire for stretch-backports repo Signed-off-by: Guohan Lu --- build_debian.sh | 2 +- dockers/docker-base-stretch/Dockerfile.j2 | 1 + dockers/docker-base-stretch/aptconf_archive_expired_release | 3 +++ files/apt/apt.conf.d/no-check-valid-until | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 dockers/docker-base-stretch/aptconf_archive_expired_release create mode 100644 files/apt/apt.conf.d/no-check-valid-until diff --git a/build_debian.sh b/build_debian.sh index 335dab8ba89f..39b984edec4e 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -107,7 +107,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT mount proc /proc -t proc ## Pointing apt to public apt mirrors and getting latest packages, needed for latest security updates sudo cp files/apt/sources.list.$CONFIGURED_ARCH $FILESYSTEM_ROOT/etc/apt/sources.list -sudo cp files/apt/apt.conf.d/{81norecommends,apt-{clean,gzip-indexes,no-languages}} $FILESYSTEM_ROOT/etc/apt/apt.conf.d/ +sudo cp files/apt/apt.conf.d/{81norecommends,apt-{clean,gzip-indexes,no-languages},no-check-valid-until} $FILESYSTEM_ROOT/etc/apt/apt.conf.d/ sudo LANG=C chroot $FILESYSTEM_ROOT bash -c 'apt-mark auto `apt-mark showmanual`' ## Note: set lang to prevent locale warnings in your chroot diff --git a/dockers/docker-base-stretch/Dockerfile.j2 b/dockers/docker-base-stretch/Dockerfile.j2 index 3b3ede376d12..d8188a06afd6 100644 --- a/dockers/docker-base-stretch/Dockerfile.j2 +++ b/dockers/docker-base-stretch/Dockerfile.j2 @@ -34,6 +34,7 @@ COPY ["sources.list.arm64", "/etc/apt/sources.list"] COPY ["sources.list", "/etc/apt/sources.list"] {% endif %} COPY ["no_install_recommend_suggest", "/etc/apt/apt.conf.d"] +COPY ["aptconf_archive_expired_release", "/etc/apt/apt.conf.d"] # Update apt cache and # pre-install fundamental packages diff --git a/dockers/docker-base-stretch/aptconf_archive_expired_release b/dockers/docker-base-stretch/aptconf_archive_expired_release new file mode 100644 index 000000000000..67bc409b2174 --- /dev/null +++ b/dockers/docker-base-stretch/aptconf_archive_expired_release @@ -0,0 +1,3 @@ +# Instruct apt-get to override expired releases repo list for jessie archives + +Acquire::Check-Valid-Until "0"; diff --git a/files/apt/apt.conf.d/no-check-valid-until b/files/apt/apt.conf.d/no-check-valid-until new file mode 100644 index 000000000000..97b9c9005181 --- /dev/null +++ b/files/apt/apt.conf.d/no-check-valid-until @@ -0,0 +1 @@ +Acquire::Check-Valid-Until "false";