Cache checksum-pinned KDE sources and bound download retries

This commit is contained in:
Pavel Isaev 2026-11-07 04:38:26 +03:00
parent 36102e034c
commit e06f083874
2 changed files with 30 additions and 2 deletions

View file

@ -53,6 +53,13 @@ build too (`/usr/lib/plasma-discover`, confirmed in the Arch package). QMP input
now allows focus delivery and slower keystrokes; a candidate replay action profile
is retained. Full replay, primary-session checks and publication remain pending.
Cycle `20261107T011209Z` passed Discover loader validation with the installed
`/usr/lib/plasma-discover/libDiscoverCommon.so`. It stopped while downloading the
unchanged Plasma Setup source (curl timeout), before image builds. The adapter now
keeps both pinned KDE source archives in the worker desktop-sources cache, verifies
their SHA256 on every use, and bounds/retries new downloads. Existing archived
source bytes may seed this cache only after the same checksum verification.
The daily timer on terra has now been disabled and stopped: `inactive`, `disabled`,
no next elapsed time. Manual cycles remain available. The accepted replacement is
the 15th/30th at 00:00 UTC, snapshot-first, with terra infrastructure migrated to

View file

@ -6,17 +6,37 @@ tools=$2
cache=$3
output=$4
mkdir -p "$output"
sources="$(dirname "$cache")/desktop-sources"
mkdir -p "$sources"
systemd-nspawn --quiet --ephemeral --settings=no --register=no \
--machine="archipelago-discover-build-$$" -D "$tools" \
--bind-ro="$source_root/system/integrations/discover:/adapter" \
--bind-ro="$source_root/builder/packages/plasma-setup:/setup-recipe" \
--bind="$sources:/sources" \
--bind="$cache:/var/cache/pacman/pkg" --bind="$output:/output" \
/bin/bash -euo pipefail -c '
pacman-key --init
pacman-key --populate archlinux
pacman -Syu --needed --noconfirm base-devel cmake ninja extra-cmake-modules discover qt6-tools kitemmodels curl
test "$(pacman -Q discover)" = "discover 6.8.2-1"
curl --fail --location --max-time 300 https://download.kde.org/stable/plasma/6.8.2/discover-6.8.2.tar.xz -o /output/discover-6.8.2.tar.xz
exec 9>/sources/download.lock
flock 9
fetch_source() {
local name=$1 hash=$2
if [[ -f /sources/$name ]]; then
printf "%s %s\n" "$hash" "/sources/$name" | sha256sum -c -
else
curl --fail --location --silent --show-error --connect-timeout 20 --max-time 180 \
--retry 2 --retry-max-time 600 --retry-all-errors \
"https://download.kde.org/stable/plasma/6.8.2/$name" -o "/sources/$name.partial"
printf "%s %s\n" "$hash" "/sources/$name.partial" | sha256sum -c -
mv "/sources/$name.partial" "/sources/$name"
fi
cp "/sources/$name" "/output/$name"
}
fetch_source discover-6.8.2.tar.xz 2bc7280155adb003498a3b31817be8815673cc665b424b98b8250cc97dff5bc6
fetch_source plasma-setup-6.8.2.tar.xz d10c2d766e2b1a3afaa70c2995f0abc8eb9ff2da19c9a4e794ae9e89859758d7
flock -u 9
printf "%s %s\n" 2bc7280155adb003498a3b31817be8815673cc665b424b98b8250cc97dff5bc6 /output/discover-6.8.2.tar.xz | sha256sum -c -
mkdir /tmp/discover-build
tar -xf /output/discover-6.8.2.tar.xz -C /tmp/discover-build
@ -42,7 +62,8 @@ pacman -S --needed --noconfirm "${depends[@]}" "${makedepends[@]}"
useradd -m package-builder
install -d -o package-builder -g package-builder /tmp/plasma-setup-build
cp /setup-recipe/PKGBUILD /tmp/plasma-setup-build/
chown package-builder:package-builder /tmp/plasma-setup-build/PKGBUILD
cp /output/plasma-setup-6.8.2.tar.xz /tmp/plasma-setup-build/
chown -R package-builder:package-builder /tmp/plasma-setup-build
runuser -u package-builder -- env SOURCE_DATE_EPOCH=1793145600 bash -ec "cd /tmp/plasma-setup-build; makepkg --noconfirm"
install -m644 /tmp/plasma-setup-build/plasma-setup-6.8.2-1-x86_64.pkg.tar.zst /output/
cp /setup-recipe/PKGBUILD /output/plasma-setup.PKGBUILD