feat: extract archive source switch script for EOL Debian builds

Create switch_archive_sources.sh that rewrites /etc/apt/sources.list
from deb.debian.org to archive.debian.org (with backports) for EOL
Debian releases (buster, bullseye).  Both docker/Dockerfile.deps and
the CI install-test step use this script instead of inline fallback
logic.

Also record the pullsrc-on-host strategy in AGENTS.md.
This commit is contained in:
boypt
2026-09-01 09:16:19 +08:00
parent ba154124c6
commit beb09df438
4 changed files with 47 additions and 1 deletions

View File

@@ -4,7 +4,12 @@ ARG BASE_IMAGE
FROM ${BASE_IMAGE}
COPY --chmod=755 install_deps.sh /tmp/install_deps.sh
COPY --chmod=755 switch_archive_sources.sh /tmp/switch_archive_sources.sh
COPY builddep/ /tmp/builddep/
# EOL Debian releases (e.g. buster) no longer exist on deb.debian.org;
# switch to the official archive source before installing build deps.
RUN /tmp/switch_archive_sources.sh && rm /tmp/switch_archive_sources.sh
RUN cd /tmp && ./install_deps.sh \
&& rm -rf /tmp/install_deps.sh /tmp/builddep