Skip to content

Commit

Permalink
[201803] Modify Debian apt repos to reflect changes made by maintaine…
Browse files Browse the repository at this point in the history
…rs (#2709)

* [201803][apt] Point to archive.debian.org for jessie-backports; remove jessie-updates

* Add no-check-valid-until for apt in base image

* Add no-check-valid-until for apt in docker-base

* [sonic-slave] Remove jessie-backports, as it is unused in the slave container
  • Loading branch information
jleveque authored and yxieca committed Mar 27, 2019
1 parent 09f4132 commit 99ed954
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions dockers/docker-base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions dockers/docker-base/no-check-valid-until
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Acquire::Check-Valid-Until "false";
2 changes: 1 addition & 1 deletion dockers/docker-base/sources.list
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions dockers/docker-ptf/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions files/apt/apt.conf.d/no-check-valid-until
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Acquire::Check-Valid-Until "false";
2 changes: 1 addition & 1 deletion files/apt/sources.list
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions sonic-slave/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ FROM debian:jessie

MAINTAINER [email protected]

# 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
Expand Down

0 comments on commit 99ed954

Please sign in to comment.