Use upstream arch-toolbox:latest as the Toolbx default (D-099)

This commit is contained in:
Pavel Isaev 2026-11-10 00:24:22 +03:00
parent 8a0ad520ae
commit d546e44949

View file

@ -191,12 +191,12 @@ runuser -u coretest -- env XDG_RUNTIME_DIR=/run/user/$uid toolbox list
runuser -u coretest -- env XDG_RUNTIME_DIR=/run/user/$uid toolbox create --assumeyes
python3 - <<'PY'
import json, pwd, subprocess, tomllib
with open('/etc/containers/registries.conf.d/60-archipelago-toolbox.conf', 'rb') as stream:
rule = tomllib.load(stream)['registry'][0]
with open('/etc/containers/toolbox.conf', 'rb') as stream:
image_ref = tomllib.load(stream)['general']['image']
uid = pwd.getpwnam('coretest').pw_uid
image = json.loads(subprocess.check_output(['runuser', '-u', 'coretest', '--', 'env',
f'XDG_RUNTIME_DIR=/run/user/{uid}', 'podman', 'image', 'inspect', rule['prefix']], text=True))[0]
assert rule['location'] in image['RepoDigests'], 'Toolbx default did not resolve to the pinned OCI manifest'
f'XDG_RUNTIME_DIR=/run/user/{uid}', 'podman', 'image', 'inspect', image_ref], text=True))[0]
assert any(d.startswith('quay.io/toolbx/arch-toolbox@sha256:') for d in image['RepoDigests']), 'Toolbx default did not resolve to the upstream Arch image'
PY
runuser -u coretest -- env XDG_RUNTIME_DIR=/run/user/$uid toolbox run sh -ec 'test "$(id -u)" != 0; test -w "$HOME"; . /etc/os-release; test "$ID" = arch; printf "toolbox-persistence\\n" > "$HOME/.archipelago-toolbox-persistence"'
''', timeout=1800)