Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[apt] Instruct apt-get to NOT check the "Valid Until" date in Release files #2609

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
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/* $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
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-base-stretch/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ENV DEBIAN_FRONTEND=noninteractive
# Configure data sources for apt/dpkg
COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"]
COPY ["sources.list", "/etc/apt/sources.list"]
COPY ["no_install_recommend_suggest", "/etc/apt/apt.conf.d"]
COPY ["no-check-valid-until", "no-install-recommend-suggest", "/etc/apt/apt.conf.d/"]
RUN apt-get update

# Pre-install fundamental packages
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-base-stretch/no-check-valid-until
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Instruct apt-get to NOT check the "Valid Until" date in Release files

Acquire::Check-Valid-Until "0";
2 changes: 1 addition & 1 deletion dockers/docker-base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ENV DEBIAN_FRONTEND=noninteractive
# Configure data sources for apt/dpkg
COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"]
COPY ["sources.list", "/etc/apt/sources.list"]
COPY ["no_install_recommend_suggest", "/etc/apt/apt.conf.d"]
COPY ["no-check-valid-until", "no-install-recommend-suggest", "/etc/apt/apt.conf.d/"]
RUN apt-get update

# Pre-install fundamental packages
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-base/no-check-valid-until
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Instruct apt-get to NOT check the "Valid Until" date in Release files

Acquire::Check-Valid-Until "0";
3 changes: 3 additions & 0 deletions files/apt/apt.conf.d/no-check-valid-until
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Instruct apt-get to NOT check the "Valid Until" date in Release files

Acquire::Check-Valid-Until "0";
1 change: 1 addition & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ sudo chroot $FILESYSTEM_ROOT service docker start
# Apply apt configuration files
sudo cp $IMAGE_CONFIGS/apt/sources.list $FILESYSTEM_ROOT/etc/apt/
sudo cp -R $IMAGE_CONFIGS/apt/sources.list.d/ $FILESYSTEM_ROOT/etc/apt/
sudo cp $IMAGE_CONFIGS/apt/apt.conf.d/no-check-valid-until $FILESYSTEM_ROOT/etc/apt/apt.conf.d/
cat $IMAGE_CONFIGS/apt/sonic-dev.gpg.key | sudo LANG=C chroot $FILESYSTEM_ROOT apt-key add -

# Update apt's snapshot of its repos
Expand Down
3 changes: 3 additions & 0 deletions files/image_config/apt/apt.conf.d/no-check-valid-until
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Instruct apt-get to NOT check the "Valid Until" date in Release files

Acquire::Check-Valid-Until "0";
2 changes: 2 additions & 0 deletions sonic-slave-stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM debian:stretch

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 && \
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 && \
Expand Down
3 changes: 3 additions & 0 deletions sonic-slave-stretch/no-check-valid-until
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Instruct apt-get to NOT check the "Valid Until" date in Release files

Acquire::Check-Valid-Until "0";
2 changes: 2 additions & 0 deletions sonic-slave/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM debian:jessie

MAINTAINER johnar@microsoft.com

COPY ["no-check-valid-until", "/etc/apt/apt.conf.d/"]

RUN echo "deb http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free" >> /etc/apt/sources.list && \
echo "deb-src http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list && \
Expand Down
3 changes: 3 additions & 0 deletions sonic-slave/no-check-valid-until
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Instruct apt-get to NOT check the "Valid Until" date in Release files

Acquire::Check-Valid-Until "0";