Revert "Build the GSConnect package inside the release cycle"

This reverts commit a448a65a92.
This commit is contained in:
Archipelago 2026-11-21 12:20:59 +03:00
parent a448a65a92
commit 3f7cfc9d64
4 changed files with 1 additions and 156 deletions

View file

@ -1,35 +1,6 @@
# Infrastructure implementation status
Updated 2026-11-21. Architectural acceptance is separate from implementation.
## Phone integration in both Desktops (2026-11-21)
D-121 adds `kdeconnect` to the KDE Purpose from the pinned repositories. GNOME
gets `gnome-shell-extension-gsconnect`, which Arch does not ship: the new
`infrastructure/pipeline/build-gnome-extension.sh` builds the reviewed recipe
`builder/packages/gsconnect/PKGBUILD` (v74, pinned sha256) inside the isolated
adapter root, installs the declared dependencies from the same snapshot,
rejects an extension that does not declare the snapshot's `gnome-shell` major,
and caches the result by recipe checksum. `release-cycle.py` runs it when GNOME
is part of the cycle and passes `ARCHIPELAGO_GS_CONNECT_PACKAGE` to the build;
`build-iso.sh` records the archive checksum, and `package.sh` now admits local
packages through one `add_local_package` path (name, `.PKGINFO` version, arch)
instead of a plasma-setup-only block, signing the extension into the same local
repository.
The GNOME package step ships
`/usr/share/glib-2.0/schemas/60-archipelago-gnome.gschema.override` with
`org.gnome.shell enabled-extensions=['gsconnect@andyholmes.github.io']`, and the
finalizer verifies the compiled default with
`GSETTINGS_BACKEND=memory gsettings get` after `glib-compile-schemas`, so a
missing package or override fails the build instead of shipping a desktop that
silently lacks the extension. `python-nautilus` is absent from the pinned
repositories, so Nautilus integration is installed but inert.
Verified: the adapter build produced
`gnome-shell-extension-gsconnect-74-1-any.pkg.tar.zst` (413 KB, `.PKGINFO` arch
`any`, dependency `gnome-shell`) against `gnome-shell 51.1-1`; builder/contracts/
composer Rust tests (39) and `control_portal`/`cycle-recovery` checks pass.
Updated 2026-11-20. Architectural acceptance is separate from implementation.
## Snapshot retention detaches mounted snapshots (2026-11-20)

View file

@ -1,100 +0,0 @@
#!/bin/bash
# Build the GSConnect extension package in isolation. The Arch repositories ship
# no binary package for it, so Archipelago builds the pinned upstream tag itself
# and hands the archive to the Core package step, which adds it to the local
# signed repository every Purpose installs from.
set -euo pipefail
source_root=$1
tools=$2
cache=$3
output=$4
mirror=${ARCHIPELAGO_MIRROR_URL:-'https://mirror.nw-sys.ru/archlinux/$repo/os/$arch'}
mkdir -p "$output"
sources="$(dirname "$cache")/desktop-sources"
mkdir -p "$sources"
key=$( { sha256sum < "$0"; printf '%s\n' "$mirror";
( cd "$source_root" && find builder/packages/gsconnect -type f -print0 |
LC_ALL=C sort -z | xargs -0 sha256sum ); } | sha256sum | cut -d' ' -f1 )
cached=$(dirname "$cache")/adapters/gnome-extension-$key
if [[ -f $cached/SHA256SUMS ]]; then
cp -a "$cached"/. "$output"/
printf 'gnome extension cache hit %s\n' "$key"
exit 0
fi
root=$(dirname "$cache")/adapter-tools/gnome-extension/root.x86_64
if [[ ! -d $root ]]; then
mkdir -p "$(dirname "$root")"
cp -a --reflink=auto "$tools" "$root"
fi
printf 'Server = %s\n' "$mirror" > "$root/etc/pacman.d/mirrorlist"
systemd-nspawn --quiet --settings=no --register=no \
--machine="archipelago-gnome-extension-build-$$" -D "$root" \
--bind-ro="$source_root/builder/packages/gsconnect:/recipe" \
--bind="$sources:/sources" \
--bind="$cache:/var/cache/pacman/pkg" --bind="$output:/output" \
/bin/bash -euo pipefail -c '
export LC_ALL=C
pacman-key --init
pacman-key --populate archlinux
pacman -Syu --needed --noconfirm base-devel meson ninja gettext
pkgname=gnome-shell-extension-gsconnect
# Read the pinned identity from the reviewed recipe itself; nothing here may
# invent a version or a checksum at build time.
recipe=/recipe/PKGBUILD
source "$recipe"
[[ $pkgname == gnome-shell-extension-gsconnect ]] || { echo "Unexpected recipe name: $pkgname" >&2; exit 1; }
version=$pkgver
checksum=${sha256sums[0]}
[[ $version =~ ^[0-9]+$ ]] || { echo "Invalid GSConnect version: $version" >&2; exit 1; }
[[ $checksum =~ ^[0-9a-f]{64}$ ]] || { echo "Invalid GSConnect checksum: $checksum" >&2; exit 1; }
exec 9>/sources/download.lock
flock 9
tarball="v$version.tar.gz"
if [[ -f /sources/$tarball ]]; then
printf "%s %s\n" "$checksum" "/sources/$tarball" | 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://github.com/GSConnect/$pkgname/archive/$tarball" -o "/sources/$tarball.partial"
printf "%s %s\n" "$checksum" "/sources/$tarball.partial" | sha256sum -c -
mv "/sources/$tarball.partial" "/sources/$tarball"
fi
flock -u 9
mkdir -p /tmp/gsconnect-build
useradd -m package-builder 2>/dev/null || true
install -d -o package-builder -g package-builder /tmp/gsconnect-build
cp "$recipe" /tmp/gsconnect-build/PKGBUILD
cp "/sources/$tarball" /tmp/gsconnect-build/
# Runtime and build dependencies come from the pinned snapshot, exactly like
# makepkg would resolve them; the installed gnome-shell then states which shell
# major this image really has.
pacman -S --needed --noconfirm "${depends[@]}" "${makedepends[@]}"
shell_version=$(pacman -Q gnome-shell | awk "{print \$2}")
shell_version=${shell_version#*:}
shell_major=${shell_version%%.*}
[[ $shell_major =~ ^[0-9]+$ ]] || { echo "Cannot resolve gnome-shell from the snapshot" >&2; exit 1; }
printf "%s\n" "$shell_version" > /output/gnome-shell-version.txt
chown -R package-builder:package-builder /tmp/gsconnect-build
runuser -u package-builder -- env SOURCE_DATE_EPOCH=1793145600 bash -ec "cd /tmp/gsconnect-build; makepkg --noconfirm"
archive=$(find /tmp/gsconnect-build -maxdepth 1 -type f -name "$pkgname-$version-1-any.pkg.tar.zst")
[[ -n $archive && -f $archive ]] || { echo "makepkg produced no package" >&2; exit 1; }
metadata=$(bsdtar -xOf "$archive" "usr/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/metadata.json")
printf "%s\n" "$metadata" > /output/gsconnect-metadata.json
if ! printf "%s\n" "$metadata" | grep -q "\"$shell_major\""; then
echo "GSConnect $version does not declare gnome-shell $shell_major support" >&2
exit 1
fi
install -m644 "$archive" /output/
cp /tmp/gsconnect-build/PKGBUILD /output/gsconnect.PKGBUILD
cp "/sources/$tarball" /output/
sha256sum /output/gsconnect* /output/"$pkgname-$version-1-any.pkg.tar.zst" > /output/SHA256SUMS
pacman -Q > /output/packages.txt
'
mkdir -p "$(dirname "$cached")"
test -f "$output/SHA256SUMS"
cp -a "$output" "$cached"
printf 'gnome extension built %s\n' "$key"

View file

@ -414,29 +414,11 @@ find {remote_root}/probes -type f -name '*.py' -exec sha256sum {{}} + >> {remote
call(['rsync', '-a', f'{worker}:{remote_root}/discover-adapter/', str(run / 'discover-adapter') + '/'])
discover_version = ((run / 'discover-adapter' / 'discover-version.txt').read_text().strip()
if 'kde' in desktops else None)
# GSConnect is not in the Arch repositories, so the GNOME cycle builds the
# pinned upstream tag and the Core package step adds it to the local
# signed repository every Purpose installs from (D-121).
if 'gnome' in desktops:
if not config.get('flatpak_cache'):
raise ValueError('GSConnect build requires the prepared tools root from flatpak_cache')
phase('building-gnome-extension')
remote(shlex.join(['bash', remote_root + '/source/src/infrastructure/pipeline/build-gnome-extension.sh',
remote_root + '/source/src', config['flatpak_cache'] + '/tools/root.x86_64',
config['build_environment']['ARCHIPELAGO_PACKAGE_CACHE'], remote_root + '/gnome-extension']) +
' > ' + shlex.quote(remote_root + '/gnome-extension.log') + ' 2>&1', 7200)
call(['rsync', '-a', f'{worker}:{remote_root}/gnome-extension/', str(run / 'gnome-extension') + '/'])
builds = {v: remote_root + '/' + v + '/build' for v in build_variants}
build_env = dict(config['build_environment'], ARCHIPELAGO_SOFTWARE_PLUGIN=remote_root + '/software-adapter/libgs_plugin_archipelago.so',
ARCHIPELAGO_MIRROR_URL=snapshot_url,
ARCHIPELAGO_BUILD_OUTPUT=mode,
ARCHIPELAGO_LOG_DIR=remote_root + '/cli-logs')
if 'gnome' in desktops:
packages = sorted(Path(remote_root + '/gnome-extension').glob('gnome-shell-extension-gsconnect-*.pkg.tar.zst'))
if len(packages) != 1:
raise RuntimeError('expected exactly one GSConnect package in gnome-extension, found '
+ str(len(packages)))
build_env['ARCHIPELAGO_GS_CONNECT_PACKAGE'] = str(packages[0])
if 'kde' in desktops:
packages = sorted(Path(remote_root + '/discover-adapter').glob('plasma-setup-*.pkg.tar.zst'))
if len(packages) != 1:
@ -498,7 +480,6 @@ rm -rf {builds['core']}/iso-work {builds['core']}/profile {builds['core']}/extra
container_env = dict(build_env)
container_env.pop('ARCHIPELAGO_SOFTWARE_PLUGIN', None)
container_env.pop('ARCHIPELAGO_PLASMA_SETUP_PACKAGE', None)
container_env.pop('ARCHIPELAGO_GS_CONNECT_PACKAGE', None)
container_env.pop('ARCHIPELAGO_DISCOVER_VERSION', None)
container_command = shlex.join(['env', *[k + '=' + v for k, v in container_env.items()],
'ARCHIPELAGO_CORE_BUILD=' + builds['core'], remote_root + '/archipelago',

View file

@ -103,11 +103,4 @@ assert 'software-adapter/libgs_plugin_archipelago.so' in probe
assert 'discover-adapter' not in probe
kde_probe = cycle.adapter_probe('/work/20260101T000000Z', ['gnome', 'kde'])
assert 'discover-adapter' in kde_probe and 'plasma-setup-' in kde_probe
# D-121: the GNOME cycle builds GSConnect from the pinned recipe and hands the
# archive to the Core package step, so every resumed run must rebuild or reuse it.
driver = (Path(__file__).parents[1] / 'pipeline/release-cycle.py').read_text()
assert 'build-gnome-extension.sh' in driver
assert 'ARCHIPELAGO_GS_CONNECT_PACKAGE' in driver
assert 'gnome-shell-extension-gsconnect-*.pkg.tar.zst' in driver
print('CYCLE_RECOVERY_ORDER_AND_OWNERSHIP_PASS')