From 3cc058c642c061d4518e7ad2587f301be55cfab9 Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Tue, 21 Apr 2026 15:11:09 +0200 Subject: [PATCH] use bespoke mirror gives us better control over what and when to sync --- bootstrap.sh | 10 +++++----- build.sh | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 834f144..8a79324 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -45,14 +45,14 @@ EOF cat /etc/pacman.conf.nolinux >> /etc/pacman.conf # Ensure the packages repo and the base image do not go out of sync -# by using the same snapshot date from build_date.txt for both +# by using the same snapshot date from BUILD_REPO.txt for both # WARNING: code copy in build.sh -BUILD_DATE=$(curl --fail --silent https://storage.kde.org/kde-linux-packages/testing/repo/build_date.txt) -if [ -z "$BUILD_DATE" ]; then - echo "ERROR: Could not fetch build_date.txt — refusing to build out-of-sync image." >&2 +BUILD_REPO=$(curl --fail --silent https://storage.kde.org/kde-linux-packages/testing/repo/build_repo.txt) +if [ -z "$BUILD_REPO" ]; then + echo "ERROR: Could not fetch build_repo.txt — refusing to build out-of-sync image." >&2 exit 1 fi -echo "Server = https://archive.archlinux.org/repos/${BUILD_DATE}/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist +echo "Server = ${BUILD_REPO}/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist # ParallelDownloads is enabled by default since pacman 7.0.0.r6.gc685ae6-2, # so no need to uncomment or manually set it unless we want to change the value. diff --git a/build.sh b/build.sh index d0c390d..07e2743 100755 --- a/build.sh +++ b/build.sh @@ -77,14 +77,14 @@ EOF mkdir --parents mkosi.sandbox/etc/pacman.d # Ensure the packages repo and the base image do not go out of sync -# by using the same snapshot date from build_date.txt for both +# by using the same snapshot date from BUILD_REPO.txt for both # WARNING: code copy in bootstrap.sh -BUILD_DATE=$(curl --fail --silent https://storage.kde.org/kde-linux-packages/testing/repo/build_date.txt) -if [ -z "$BUILD_DATE" ]; then - echo "ERROR: Could not fetch build_date.txt — refusing to build out-of-sync image." >&2 +BUILD_REPO=$(curl --fail --silent https://storage.kde.org/kde-linux-packages/testing/repo/build_repo.txt) +if [ -z "$BUILD_REPO" ]; then + echo "ERROR: Could not fetch build_repo.txt — refusing to build out-of-sync image." >&2 exit 1 fi -echo "Server = https://archive.archlinux.org/repos/${BUILD_DATE}/\$repo/os/\$arch" > mkosi.sandbox/etc/pacman.d/mirrorlist +echo "Server = ${BUILD_REPO}/\$repo/os/\$arch" > mkosi.sandbox/etc/pacman.d/mirrorlist # ... and make sure our cache is up to date. Second --refresh forces a refresh. pacman --sync --refresh --refresh --noconfirm