mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
support/docker: make the image reproducible again
The Debian 12 Bookworm snapshot we use, 20250203, uses the new deb822
format [0] for source list files; it carries a source list file that
points to the current repository, not to the snapshot.
Even though we do inject an old-style source list that points to the
snapshot repository, the packages in the current repository are more
recent than the one in the snapshot, so when we install our packages,
they get retrieved mostly from the current repository rather than from
the snapshot. The image is not reproducible.
Switch to using the new deb822-style source list file.
Note: we do not need to carry the "Latest just before" trick: the
snapshot repository will use the most recent actual snapshot before the
requested dated, so we can just use the date of the image we use (stuck
at midnight because we don't have better).
Since the snapshot repository can be really slow, while at the same time
the remote http server not dropping connections, it can take a very long
while to build the image; add a timeout so that stale connections are
detected and re-attemped early-ish (the timeout applies to both the
connect and the actual download, so it should be large enough to
accomodate slowish network connections).
Fixes: c95d5b8e1e (support/docker: move to current bookworm (Debian
12) snapshot)
[0] https://manpages.debian.org/trixie/apt/sources.list.5.en.html#DEB822-STYLE_FORMAT
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
committed by
Romain Naour
parent
b8d6e76897
commit
3460675872
@@ -24,7 +24,7 @@ ARG TAR_VERSION="1.35"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# This repository can be a bit slow at times. Don't panic...
|
||||
COPY apt-sources.list /etc/apt/sources.list
|
||||
COPY debian.sources /etc/apt/sources.list.d/debian.sources
|
||||
|
||||
# Install 32bit variant on x86_64 image.
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||
@@ -32,15 +32,18 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||
fi
|
||||
|
||||
# The container has no package lists, so need to update first
|
||||
RUN apt-get -o APT::Retries=3 update -y
|
||||
RUN apt-get -o APT::Retries=3 -o APT::Acquire::http::Timeout=60 \
|
||||
update -y
|
||||
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||
apt-get -o APT::Retries=3 install -y --no-install-recommends \
|
||||
apt-get -o APT::Retries=3 -o APT::Acquire::http::Timeout=60 \
|
||||
install -y --no-install-recommends \
|
||||
g++-multilib \
|
||||
libc6:i386; \
|
||||
fi
|
||||
|
||||
RUN apt-get -o APT::Retries=3 install -y --no-install-recommends \
|
||||
RUN apt-get -o APT::Retries=3 -o APT::Acquire::http::Timeout=60 \
|
||||
install -y --no-install-recommends \
|
||||
bc \
|
||||
build-essential \
|
||||
bzr \
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Latest just before 20250218211000Z:
|
||||
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20250218T144938Z/ bookworm main
|
||||
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20250218T144938Z/ bookworm-security main
|
||||
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20250218T144938Z/ bookworm-updates main
|
||||
13
support/docker/debian.sources
Normal file
13
support/docker/debian.sources
Normal file
@@ -0,0 +1,13 @@
|
||||
Types: deb
|
||||
URIs: http://snapshot.debian.org/archive/debian/20250203T000000Z
|
||||
Suites: bookworm bookworm-updates
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
Check-Valid-Until: no
|
||||
|
||||
Types: deb
|
||||
URIs: http://snapshot.debian.org/archive/debian-security/20250203T000000Z
|
||||
Suites: bookworm-security
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
Check-Valid-Until: no
|
||||
Reference in New Issue
Block a user