diff --git a/build_debian.sh b/build_debian.sh index 10d1539381b1..ea060249a1b3 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -91,7 +91,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 diff --git a/dockers/docker-base/Dockerfile.j2 b/dockers/docker-base/Dockerfile.j2 index 43ae42a11e69..15d3faf57c81 100644 --- a/dockers/docker-base/Dockerfile.j2 +++ b/dockers/docker-base/Dockerfile.j2 @@ -17,9 +17,13 @@ RUN rm -rf \ # Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive +# Remove retired jessie-updates repo +RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list + # Configure data sources for apt/dpkg COPY ["sources.list", "/etc/apt/sources.list"] COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"] +COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"] RUN apt-get update # Pre-install fundamental packages diff --git a/dockers/docker-base/no-check-valid-until b/dockers/docker-base/no-check-valid-until new file mode 100644 index 000000000000..97b9c9005181 --- /dev/null +++ b/dockers/docker-base/no-check-valid-until @@ -0,0 +1 @@ +Acquire::Check-Valid-Until "false"; diff --git a/dockers/docker-base/sources.list b/dockers/docker-base/sources.list index 7121d6fd8c2d..45a508420a89 100644 --- a/dockers/docker-base/sources.list +++ b/dockers/docker-base/sources.list @@ -5,4 +5,4 @@ deb http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-fre deb-src http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free deb http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free deb-src http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free -deb http://debian-archive.trafficmanager.net/debian/ jessie-backports main contrib non-free +deb http://archive.debian.org/debian/ jessie-backports main contrib non-free diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index 2d9b1544d95a..6b7537b6fdf7 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -12,6 +12,9 @@ debs/ ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive +# Remove retired jessie-updates repo +RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list + ## Set the apt source, update package cache and install necessary packages RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' /etc/apt/sources.list \ && apt-get update \ 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"; diff --git a/files/apt/sources.list b/files/apt/sources.list index 7121d6fd8c2d..45a508420a89 100644 --- a/files/apt/sources.list +++ b/files/apt/sources.list @@ -5,4 +5,4 @@ deb http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-fre deb-src http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free deb http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free deb-src http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free -deb http://debian-archive.trafficmanager.net/debian/ jessie-backports main contrib non-free +deb http://archive.debian.org/debian/ jessie-backports main contrib non-free diff --git a/files/image_config/apt/sources.list.d/debian_archive_trafficmanager_net_debian.list b/files/image_config/apt/sources.list.d/debian_archive_trafficmanager_net_debian.list index 4daa3ccba677..e32bc63d14c8 100644 --- a/files/image_config/apt/sources.list.d/debian_archive_trafficmanager_net_debian.list +++ b/files/image_config/apt/sources.list.d/debian_archive_trafficmanager_net_debian.list @@ -1,3 +1,3 @@ deb http://debian-archive.trafficmanager.net/debian/ jessie main contrib non-free deb http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free -deb http://debian-archive.trafficmanager.net/debian/ jessie-backports main contrib non-free +deb http://archive.debian.org/debian/ jessie-backports main contrib non-free diff --git a/sonic-slave/Dockerfile b/sonic-slave/Dockerfile index 35e73e3e308a..0b51df14ea19 100644 --- a/sonic-slave/Dockerfile +++ b/sonic-slave/Dockerfile @@ -2,11 +2,13 @@ FROM debian:jessie MAINTAINER johnar@microsoft.com +# Remove retired jessie-updates repo +RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list + 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 && \ - echo "deb-src http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list && \ - echo "deb http://debian-archive.trafficmanager.net/debian/ jessie-backports main contrib non-free" >> /etc/apt/sources.list + echo "deb-src http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive