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

Fix build break for jessie apt key expiration. #13328

Merged
merged 2 commits into from
Jan 30, 2023
Merged
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
6 changes: 6 additions & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ SONIC_BUILD_INSTRUCTION := make \
.PHONY: sonic-slave-build sonic-slave-bash init reset

.DEFAULT_GOAL := all
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-jessie/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can use dget as this pr? 9a0bf56


%::
ifneq (,$(filter $(CONFIGURED_ARCH), armhf arm64))
Expand All @@ -205,6 +210,7 @@ ifneq ($(BLDENV), )
endif
endif
@$(OVERLAY_MODULE_CHECK)
@$(FAKETIME)

@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
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 @@ -89,7 +89,7 @@ RUN apt-get -y purge \
{%- endif %}

# Add support for supervisord to handle startup dependencies
RUN pip install supervisord-dependent-startup==1.4.0
RUN pip install supervisord-dependent-startup==1.4.0 'toposort<=1.7'

# Clean up apt
# Remove /var/lib/apt/lists/*, could be obsoleted for derived images
Expand Down
7 changes: 6 additions & 1 deletion dockers/docker-base/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"]
COPY ["sources.list", "/etc/apt/sources.list"]
{% endif %}
COPY ["no_install_recommend_suggest", "/etc/apt/apt.conf.d"]
RUN apt-get update

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

# Pre-install fundamental packages
RUN apt-get -y install \
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-basic_router/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MAINTAINER Xudong Wu
ENV DEBIAN_FRONTEND=noninteractive

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

COPY deps /deps

Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-config-engine/Dockerfile.j2
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

# Dependencies for sonic-cfggen
RUN apt-get install -y python-lxml python-yaml python-bitarray python-pip python-dev python-natsort
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-fpm-quagga/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 libdbus-1-3 libdaemon0 libjansson4 libpython2.7
Expand Down
13 changes: 9 additions & 4 deletions sonic-slave-jessie/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ RUN echo "deb [arch=arm64] http://archive.debian.org/debian jessie main contrib
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
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 && apt-get install -y \
apt-utils \
default-jre-headless \
openssh-server \
Expand Down Expand Up @@ -346,7 +351,7 @@ RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /
ENV PATH /usr/share/depot_tools:$PATH

# Install docker engine 17.03.2~ce-0 inside docker and enable experimental feature
RUN apt-get update
RUN faketime "2022-11-01" apt-get update
RUN apt-get install -y \
apt-transport-https \
ca-certificates \
Expand All @@ -358,7 +363,7 @@ RUN add-apt-repository \
"deb [arch={{ CONFIGURED_ARCH }}] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
RUN apt-get update
RUN faketime "2022-11-01" apt-get update
{%- if CONFIGURED_ARCH == "amd64" %}
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
{%- else %}
Expand All @@ -368,5 +373,5 @@ RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/d

# For jenkins slave
RUN echo "deb [arch={{ CONFIGURED_ARCH }}] http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update
RUN faketime "2022-11-01" apt-get -o Acquire::Check-Valid-Until=false update
RUN apt-get -y -o Acquire::Check-Valid-Until=false install ca-certificates-java=20161107~bpo8+1 openjdk-8-jdk