Refresh Flatpak seeds only on ISO cycles (D-098 amendment)
This commit is contained in:
parent
f98f9b23af
commit
16aaed726e
2 changed files with 26 additions and 1 deletions
18
pipeline/prepare-flatpak-tools.sh
Normal file
18
pipeline/prepare-flatpak-tools.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# Ensure the Arch bootstrap used to compile the GNOME Software adapter exists.
|
||||
# D-098: Flatpak seeds are refreshed only on ISO cycles, so an OSTree-only cycle
|
||||
# must be able to reuse the tools root left by the previous monthly run.
|
||||
set -euo pipefail
|
||||
cache=$1
|
||||
bootstrap=$2
|
||||
if [[ -d $cache/tools/root.x86_64 ]]; then exit 0; fi
|
||||
printf '%s %s\n' 655bc99849b80859173fa39338a6c910185e952173f6a1a61526cfa34ab8339c "$bootstrap" | sha256sum -c -
|
||||
mkdir -p "$cache/extractor" "$cache/tools"
|
||||
tar --zstd -xpf "$bootstrap" -C "$cache/extractor"
|
||||
systemd-nspawn --quiet --register=no --settings=no --private-network \
|
||||
-D "$cache/extractor/root.x86_64" --bind-ro="$bootstrap:/bootstrap.tar.zst" \
|
||||
--bind="$cache/tools:/output" bsdtar --xattrs --acls -xpf /bootstrap.tar.zst -C /output
|
||||
rm -rf "$cache/extractor"
|
||||
printf 'Server = https://mirror.nw-sys.ru/archlinux/$repo/os/$arch\n' > "$cache/tools/root.x86_64/etc/pacman.d/mirrorlist"
|
||||
grep -q '^DisableSandbox' "$cache/tools/root.x86_64/etc/pacman.conf" || \
|
||||
sed -i '/\[options\]/a DisableSandbox' "$cache/tools/root.x86_64/etc/pacman.conf"
|
||||
|
|
@ -178,7 +178,10 @@ sha256sum {remote_root}/source.tar >> {remote_root}/inputs.sha256
|
|||
find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote_root}/inputs.sha256''')
|
||||
call(['rsync', '-a', f'{worker}:{remote_root}/service-contract-checks.log', str(run / 'service-contract-checks.log')])
|
||||
call(['rsync', '-a', f'{worker}:{remote_root}/control-portal-checks.log', str(run / 'control-portal-checks.log')])
|
||||
if config.get('flatpak_cache'):
|
||||
# D-098 amendment (2026-11-10): Flatpak seeds change only with the monthly
|
||||
# ISO. Three-day OSTree cycles reuse the last verified seed instead of
|
||||
# spending hours on a refresh whose result is only shipped in ISO media.
|
||||
if mode == 'iso' and config.get('flatpak_cache'):
|
||||
remote(f'test "$(df -PB1 {remote_root} | awk \'NR==2 {{print $4}}\')" -ge {config.get("minimum_build_free_bytes", 60000000000)}')
|
||||
phase('updating-flatpak-cache')
|
||||
refresh = int(config.get('flatpak_refresh_seconds', 14400))
|
||||
|
|
@ -206,6 +209,10 @@ find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote
|
|||
call(['rsync', '-a', f'{worker}:{kde_cache}/status.json', str(run / 'flatpak-kde-status.json')])
|
||||
state['flatpak_kde'] = json.loads((run / 'flatpak-kde-status.json').read_text())
|
||||
phase('building-software-adapter')
|
||||
if config.get('flatpak_cache'):
|
||||
remote(shlex.join(['bash', remote_root + '/source/src/infrastructure/pipeline/prepare-flatpak-tools.sh',
|
||||
config['flatpak_cache'], config['bootstrap']]) +
|
||||
' > ' + shlex.quote(remote_root + '/flatpak-tools.log') + ' 2>&1', 14400)
|
||||
remote(shlex.join(['bash', remote_root + '/source/src/infrastructure/pipeline/build-software-adapter.sh',
|
||||
remote_root + '/source/src', config['flatpak_cache'] + '/tools/root.x86_64',
|
||||
config['build_environment']['ARCHIPELAGO_PACKAGE_CACHE'], remote_root + '/software-adapter']) +
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue