Skip to content

Commit

Permalink
Fix build break for jessie apt key expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
xumia committed Apr 6, 2023
1 parent 737a50e commit f71cdcf
Show file tree
Hide file tree
Showing 28 changed files with 38 additions and 30 deletions.
3 changes: 2 additions & 1 deletion Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ FAKETIME := rm -rf faketime_0.9.7-2_amd64.deb libfaketime_0.9.7-2_amd64.deb; \
curl "https://sonicstoragepublic.blob.core.windows.net/packages/libfaketime_0.9.7-2_amd64.deb?sp=r&st=2022-12-05T06:39:44Z&se=2032-12-05T14:39:44Z&spr=https&sv=2021-06-08&sr=b&sig=SDqUC7DtESpNHTc1Dsh%2B9%2Finxfo4OwNiXGw762OV2tM%3D" -o libfaketime_0.9.7-2_amd64.deb; \
curl "https://sonicstoragepublic.blob.core.windows.net/packages/faketime_0.9.7-2_amd64.deb?sp=r&st=2022-12-05T04:50:15Z&se=2033-12-06T12:50:15Z&spr=https&sv=2021-06-08&sr=b&sig=7l4dm4tyO73RwwAbRM6zNEglkOjs8bLV%2BJe9coiEHxo%3D" -o faketime_0.9.7-2_amd64.deb; \
cp faketime_0.9.7-2_amd64.deb libfaketime_0.9.7-2_amd64.deb dockers/docker-base/; \
cp faketime_0.9.7-2_amd64.deb libfaketime_0.9.7-2_amd64.deb sonic-slave/
cp faketime_0.9.7-2_amd64.deb libfaketime_0.9.7-2_amd64.deb sonic-slave/; \
cp faketime_0.9.7-2_amd64.deb libfaketime_0.9.7-2_amd64.deb dockers/docker-ptf/

%::
@$(OVERLAY_MODULE_CHECK)
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-database/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
ENV DEBIAN_FRONTEND=noninteractive

# Update apt's cache of available packages
RUN apt-get update
RUN faketime "2022-11-01" apt-get update

{% if docker_database_debs.strip() -%}
# Copy locally-built Debian package dependencies
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-dhcp-relay/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
ENV DEBIAN_FRONTEND=noninteractive

# Update apt's cache of available packages
RUN apt-get update
RUN faketime "2022-11-01" apt-get update

{% if docker_dhcp_relay_debs.strip() -%}
# Copy built Debian packages
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-fpm-frr/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
ENV DEBIAN_FRONTEND=noninteractive

# Update apt's cache of available packages
RUN apt-get update
RUN faketime "2022-11-01" apt-get update

# Install required packages
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute libpython2.7
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-fpm-gobgp/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM docker-fpm-quagga
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY \
{% for deb in docker_fpm_gobgp_debs.split(' ') -%}
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-lldp-sv2/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
ENV DEBIAN_FRONTEND=noninteractive

# Update apt's cache of available packages
RUN apt-get update
RUN faketime "2022-11-01" apt-get update

# Install dependencies
RUN apt-get install -y python-pip libbsd0 libevent-2.0-5 libjansson4 libwrap0 libxml2 libpci3 libperl5.20 libpython2.7
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

RUN apt-get install -f -y ifupdown arping libdbus-1-3 libdaemon0 libjansson4 libpython2.7 pciutils

Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-platform-monitor/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
ENV DEBIAN_FRONTEND=noninteractive

# Update apt's cache of available packages
RUN apt-get update
RUN faketime "2022-11-01" apt-get update

# Install required packages
RUN apt-get install -y python-pip libpython2.7 sensord fancontrol ipmitool
Expand Down
9 changes: 6 additions & 3 deletions dockers/docker-ptf/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ FROM debian:jessie

MAINTAINER Pavel Shirshov

## Remove retired jessie-updates repo
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
COPY ["sources.list", "/etc/apt/sources.list"]
COPY ["faketime_0.9.7-2_amd64.deb", "/root"]
COPY ["libfaketime_0.9.7-2_amd64.deb","/root"]
RUN dpkg -i /root/faketime_0.9.7-2_amd64.deb /root/libfaketime_0.9.7-2_amd64.deb
RUN rm /root/faketime_0.9.7-2_amd64.deb /root/libfaketime_0.9.7-2_amd64.deb
RUN faketime "2022-11-01" apt-get update

## Copy dependencies
COPY \
Expand All @@ -17,7 +21,6 @@ ENV DEBIAN_FRONTEND=noninteractive

## 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 \
&& apt-get upgrade -y \
&& apt-get dist-upgrade -y \
&& apt-get install -y \
Expand Down
1 change: 1 addition & 0 deletions dockers/docker-ptf/sources.list
2 changes: 1 addition & 1 deletion dockers/docker-router-advertiser/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
ENV DEBIAN_FRONTEND=noninteractive

# Update apt's cache of available packages
RUN apt-get update
RUN faketime "2022-11-01" apt-get update

{% if docker_router_advertiser_debs.strip() -%}
# Copy built Debian packages
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-snmp-sv2/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ENV PYTHONOPTIMIZE 1
ENV DEBIAN_FRONTEND=noninteractive

# Update apt's cache of available packages
RUN apt-get update
RUN faketime "2022-11-01" apt-get update

# Install curl so we can download and install pip later
# Also install major root CA certificates for curl to reference
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-sonic-telemetry/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

RUN apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4

Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-teamd/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

RUN apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4 libpython2.7

Expand Down
2 changes: 1 addition & 1 deletion platform/barefoot/docker-saiserver-bfn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM docker-base
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY ["deps/applibs_*.deb", "/deps/applibs-dev_*.deb", "/deps/sx-complib_*.deb", "/deps/sxd-libs_*.deb", "/deps/sx-scew_*.deb", "/deps/sx-examples_*.deb", "/deps/sx-gen-utils_*.deb", "/deps/python-sdk-api_*.deb", "/deps/iproute2_*.deb", "/deps/mlnx-sai_*.deb", "/deps/libthrift-0.9.3_*.deb", "/deps/libnl-3-200_*.deb", "/deps/libnl-genl-3-200_*.deb", "/deps/libnl-route-3-200_*.deb", "/deps/"]

Expand Down
2 changes: 1 addition & 1 deletion platform/barefoot/docker-syncd-bfn-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dpkg_apt debs/{{ deb }}{{'; '}}
{%- endfor %}

## Pre-install the fundamental packages
RUN apt-get update \
RUN faketime "2022-11-01" apt-get update \
&& apt-get -y install \
net-tools \
python-pip \
Expand Down
2 changes: 1 addition & 1 deletion platform/barefoot/docker-syncd-bfn/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM docker-config-engine
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY \
{% for deb in docker_syncd_bfn_debs.split(' ') -%}
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/docker-saiserver-brcm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY \
{% for deb in docker_saiserver_brcm_debs.split(' ') -%}
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dpkg_apt debs/{{ deb }}{{'; '}}
{%- endfor %}

## Pre-install the fundamental packages
RUN apt-get update \
RUN faketime "2022-11-01" apt-get update \
&& apt-get -y install \
net-tools \
python-pip \
Expand Down
2 changes: 1 addition & 1 deletion platform/broadcom/docker-syncd-brcm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY \
{% for deb in docker_syncd_brcm_debs.split(' ') -%}
Expand Down
2 changes: 1 addition & 1 deletion platform/innovium/docker-syncd-invm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM docker-config-engine
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY \
{% for deb in docker_syncd_invm_debs.split(' ') -%}
Expand Down
2 changes: 1 addition & 1 deletion platform/marvell/docker-syncd-mrvl/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY \
{% for deb in docker_syncd_mrvl_debs.split(' ') -%}
Expand Down
2 changes: 1 addition & 1 deletion platform/mellanox/docker-saiserver-mlnx/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY \
{% for deb in docker_saiserver_mlnx_debs.split(' ') -%}
Expand Down
2 changes: 1 addition & 1 deletion platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dpkg_apt debs/{{ deb }}{{'; '}}
{%- endfor %}

## Pre-install the fundamental packages
RUN apt-get update \
RUN faketime "2022-11-01" apt-get update \
&& apt-get -y install \
net-tools \
python-pip \
Expand Down
2 changes: 1 addition & 1 deletion platform/mellanox/docker-syncd-mlnx/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY \
{% for deb in docker_syncd_mlnx_debs.split(' ') -%}
Expand Down
7 changes: 5 additions & 2 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ENV DEBIAN_FRONTEND=noninteractive
COPY ["sonic-dev.gpg.key", "/etc/apt/"]
RUN apt-key add /etc/apt/sonic-dev.gpg.key
RUN echo "deb http://packages.microsoft.com/repos/sonic-dev/ jessie main" >> /etc/apt/sources.list
RUN apt-get update
RUN faketime "2022-11-01" apt-get update

RUN apt-get install -y net-tools \
arping \
Expand All @@ -36,7 +36,6 @@ RUN apt-get install -y net-tools \
iproute \
libpython2.7 \
grub2-common \
python-click-default-group \
python-click \
python-natsort \
python-tabulate \
Expand All @@ -55,6 +54,10 @@ RUN pip install six
RUN pip install pyroute2==0.5.3 netifaces==0.10.7
RUN pip install monotonic==1.5

# Fix the python-click-default-group not found issue
RUN pip install --upgrade 'pip<21'
RUN pip install click-default-group
{% if docker_sonic_vs_debs.strip() -%}
# Copy locally-built Debian package dependencies
{%- for deb in docker_sonic_vs_debs.split(' ') %}
Expand Down
2 changes: 1 addition & 1 deletion platform/vs/docker-syncd-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update
RUN faketime "2022-11-01" apt-get update

COPY \
{% for deb in docker_syncd_vs_debs.split(' ') -%}
Expand Down
2 changes: 1 addition & 1 deletion sonic-slave/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ RUN apt-get install -y \
gnupg2 \
software-properties-common
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
RUN echo "deb [arch={{ CONFIGURED_ARCH }}] https://download.docker.com/linux/debian $(lsb_release -cs) stable" >> /etc/apt/sources.list.d/docker.list
RUN echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" >> /etc/apt/sources.list.d/docker.list

RUN apt-get update -o Dir::Etc::sourcelist="sources.list.d/docker.list"
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
Expand Down

0 comments on commit f71cdcf

Please sign in to comment.