Refresh persistent Flatpak installation using verified cached seed

This commit is contained in:
Pavel Isaev 2026-11-06 14:32:15 +03:00
parent afd24bfc52
commit 41623ed737
3 changed files with 19 additions and 6 deletions

View file

@ -3,8 +3,11 @@
**Reinstated by latest user direction:** default independent GNOME applications
ship as preinstalled Flatpaks delivered on the ISO; future KDE follows the same
rule. Shell, GDM, Settings, Software, Files, terminal and system integration remain
native. The interim native-app candidate was stopped. Builder is now
`root@tall-bridge`; terra stores, signs and publishes artifacts.
native. The latest instruction returns all builds, Flatpak preparation and VM
acceptance to `root@yabloko`; terra stores, signs and publishes artifacts.
The persistent Flatpak cache is refreshed each build, with a verified matching
previous export available on refresh failure. See infrastructure's
`deploy/RELEASE-CYCLE.md` for the bounded operational policy.
`enabled: false` in the seed policy disables the legacy online first-login seeder;
`delivery: installation-media` identifies the installer-owned application set.

View file

@ -40,9 +40,9 @@ Real GNOME composition/ISO acceptance is still required.
## Operational rules and failure handling
Build execution is on `root@tall-bridge`; terra remains the artifact storage,
Build execution is on `root@yabloko`; terra remains the artifact storage,
signing and publication host. `ARCHIPELAGO_MIRROR_URL` selects build transport
(currently xTom Estonia), not the installed OS mirror. Core payload, Purpose
(currently nw-sys), not a change to the installed OS mirror. Core payload, Purpose
payload and live ISO must retain `https://mirror.nw-sys.ru/archlinux/$repo/os/$arch`.
Purpose restores the Core mirrorlist before capture. Target sync databases remain
the frozen Core inputs regardless of transport.

View file

@ -9,7 +9,11 @@ exec > >(tee -a /seed/evidence/prepare.log) 2>&1
pacman -S --needed --noconfirm flatpak python
date --utc --iso-8601=seconds > /seed/evidence/started
pacman -Q > /seed/evidence/builder-packages.txt
curl --fail --location --max-time 120 https://dl.flathub.org/repo/flathub.flatpakrepo -o /seed/flathub.flatpakrepo
if [[ -f /cached-seed/flathub.flatpakrepo ]]; then
cp /cached-seed/flathub.flatpakrepo /seed/flathub.flatpakrepo
else
curl --fail --location --max-time 120 https://dl.flathub.org/repo/flathub.flatpakrepo -o /seed/flathub.flatpakrepo
fi
printf '%s %s\n' 3371dd250e61d9e1633630073fefda153cd4426f72f4afa0c3373ae2e8fea03a /seed/flathub.flatpakrepo | sha256sum -c -
flatpak remote-add --system --if-not-exists flathub /seed/flathub.flatpakrepo
flatpak remote-modify --system --collection-id=org.flathub.Stable flathub
@ -27,7 +31,13 @@ for ref in policy['applications']:
PY
mapfile -t apps < /seed/apps.txt
test "${#apps[@]}" -gt 0
if [[ -f /cached-seed/policy.json ]] && cmp -s /policy.json /cached-seed/policy.json; then
# Bootstrap from the previously verified export without redownloading apps.
unshare --net flatpak install --system --noninteractive --assumeyes \
--sideload-repo=/cached-seed/.ostree/repo flathub "${apps[@]}"
fi
flatpak install --system --noninteractive --assumeyes flathub "${apps[@]}"
flatpak update --system --noninteractive --assumeyes
flatpak list --system --columns=ref,origin,active > /seed/evidence/refs.tsv
flatpak remotes --system --show-details > /seed/evidence/remotes.txt
test ! -e /seed/export
@ -39,4 +49,4 @@ cp /policy.json /seed/export/policy.json
cp /seed/evidence/refs.tsv /seed/export/refs.tsv
(cd /seed/export; find . -type f ! -name SHA256SUMS -print0 | sort -z | xargs -0 sha256sum > SHA256SUMS)
date --utc --iso-8601=seconds > /seed/evidence/export-complete
echo 'SEED_EXPORT_COMPLETE: offline import and clock-skew acceptance still required'
echo 'SEED_EXPORT_COMPLETE: installed-VM delivery acceptance still required'