From a38983ac4c93d6c58ef8d2ddf4cf2a3dfd199de5 Mon Sep 17 00:00:00 2001 From: Robert Church Date: Tue, 1 Feb 2022 23:56:12 -0500 Subject: [PATCH] debian: Use Debian Global CDN Mirror Remove country specific Debian mirror locations in favor of one backed by a global CDN. This should, in general, provide better response times for debian mirror access. Test Plan: - PASS: Rebuild containers - PASS: Download artifacts - PASS: Build all packages - PASS: Build ISO - Observed faster download an build times. Change-Id: Ic77533d2796cb7aadd85ed0c29554af33d6f5b95 Story: 2008846 Task: 44397 Signed-off-by: Robert Church --- debian-mirror-tools/config/debian/common/base-bullseye.yaml | 2 +- .../config/debian/common/base-initramfs-bullseye.yaml | 4 ++-- stx/dockerfiles/stx-builder.Dockerfile | 2 +- stx/dockerfiles/stx-lat-tool.Dockerfile | 3 +++ stx/dockerfiles/stx-pkgbuilder.Dockerfile | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/debian-mirror-tools/config/debian/common/base-bullseye.yaml b/debian-mirror-tools/config/debian/common/base-bullseye.yaml index e9e3bc9e5..f225996e0 100644 --- a/debian-mirror-tools/config/debian/common/base-bullseye.yaml +++ b/debian-mirror-tools/config/debian/common/base-bullseye.yaml @@ -5,7 +5,7 @@ image_type: - iso - ostree-repo - ustart -debootstrap-mirror: http://ftp.cn.debian.org/debian +debootstrap-mirror: http://deb.debian.org/debian package_feeds: [] package_type: external-debian wic: diff --git a/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml b/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml index 8c3ec66df..48e09906a 100644 --- a/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml +++ b/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml @@ -3,9 +3,9 @@ name: debian-initramfs-ostree-image machine: intel-x86-64 image_type: - initramfs -debootstrap-mirror: http://ftp.cn.debian.org/debian +debootstrap-mirror: http://deb.debian.org/debian package_feeds: -- deb http://ftp.cn.debian.org/debian bullseye main contrib +- deb http://deb.debian.org/debian bullseye main contrib package_type: external-debian gpg: gpg_path: /tmp/.lat_gnupg_root diff --git a/stx/dockerfiles/stx-builder.Dockerfile b/stx/dockerfiles/stx-builder.Dockerfile index 66c0fbbbb..1d08aff76 100644 --- a/stx/dockerfiles/stx-builder.Dockerfile +++ b/stx/dockerfiles/stx-builder.Dockerfile @@ -19,7 +19,7 @@ ENV container=docker \ RUN echo "deb-src http://deb.debian.org/debian bullseye main" >> /etc/apt/sources.list && \ echo "deb-src http://deb.debian.org/debian buster main" >> /etc/apt/sources.list && \ - echo "deb http://ftp.de.debian.org/debian bullseye main contrib" >> /etc/apt/sources.list + echo "deb http://deb.debian.org/debian bullseye main contrib" >> /etc/apt/sources.list # Download required dependencies by mirror/build processes. RUN apt-get update && apt-get install --no-install-recommends -y \ diff --git a/stx/dockerfiles/stx-lat-tool.Dockerfile b/stx/dockerfiles/stx-lat-tool.Dockerfile index 292809b07..b87aa7a23 100644 --- a/stx/dockerfiles/stx-lat-tool.Dockerfile +++ b/stx/dockerfiles/stx-lat-tool.Dockerfile @@ -44,5 +44,8 @@ RUN /opt/LAT/AppSDK.sh -d /opt/LAT/SDK -y RUN sed -i -e 's#--no-check-gpg#--variant=minbase --no-check-gpg#g' \ /opt/LAT/SDK/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python3.10/site-packages/genimage/package_manager/deb/__init__.py +# Fix: Use Debian CDN address for geo-frendly servers +RUN sed -i 's/ftp.cn.debian.org/deb.debian.org/g' /opt/LAT/SDK/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python3.10/site-packages/genimage/debian_constant.py + ENTRYPOINT ["/usr/bin/tini", "--"] CMD ["/opt/LAT/lat/latd"] diff --git a/stx/dockerfiles/stx-pkgbuilder.Dockerfile b/stx/dockerfiles/stx-pkgbuilder.Dockerfile index 13a18e8a0..ce62eaaf3 100644 --- a/stx/dockerfiles/stx-pkgbuilder.Dockerfile +++ b/stx/dockerfiles/stx-pkgbuilder.Dockerfile @@ -47,7 +47,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968927 RUN cd /tmp && \ wget \ - http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.126+nmu1_all.deb && \ + http://deb.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.126+nmu1_all.deb && \ dpkg -i debootstrap_1.0.126+nmu1_all.deb RUN groupadd crontab