[201811][apt] Instruct apt-get to NOT check the "Valid Until" date in Release files (#3975)

This commit is contained in:
Joe LeVeque 2020-01-08 08:34:45 -08:00 committed by lguohan
parent dd0447c7c2
commit 0eab6a4c25
7 changed files with 20 additions and 1 deletions

View File

@ -93,7 +93,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 ## Pointing apt to public apt mirrors and getting latest packages, needed for latest security updates
sudo cp files/apt/sources.list $FILESYSTEM_ROOT/etc/apt/ sudo cp files/apt/sources.list $FILESYSTEM_ROOT/etc/apt/
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`' sudo LANG=C chroot $FILESYSTEM_ROOT bash -c 'apt-mark auto `apt-mark showmanual`'
## Note: set lang to prevent locale warnings in your chroot ## Note: set lang to prevent locale warnings in your chroot

View File

@ -1 +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"; Acquire::Check-Valid-Until "false";

View File

@ -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";

View File

@ -2,6 +2,8 @@ FROM debian:stretch
MAINTAINER gulv@microsoft.com MAINTAINER gulv@microsoft.com
COPY ["no-check-valid-until", "/etc/apt/apt.conf.d/"]
RUN echo "deb http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-free" >> /etc/apt/sources.list && \ RUN echo "deb http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-free" >> /etc/apt/sources.list && \
echo "deb-src http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-free" >> /etc/apt/sources.list && \ echo "deb-src http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \ echo "deb http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \

View File

@ -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";

View File

@ -2,6 +2,8 @@ FROM debian:jessie
MAINTAINER johnar@microsoft.com MAINTAINER johnar@microsoft.com
COPY ["no-check-valid-until", "/etc/apt/apt.conf.d/"]
## Remove retired jessie-updates repo ## Remove retired jessie-updates repo
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list

View File

@ -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";