Correct Flatpak import signature verification arguments
This commit is contained in:
parent
9fd4ec308a
commit
48cf5d43c1
1 changed files with 9 additions and 1 deletions
|
|
@ -16,9 +16,10 @@ trap 'rm -f "$config"' EXIT
|
|||
printf '[Installation "%s"]\nPath=%s\nDisplayName=Archipelago installation target\n' "$name" "$destination" > "$config"
|
||||
chmod 0600 "$config"
|
||||
# Namespace isolation makes this a local-media import, not a network fallback.
|
||||
unshare --net /bin/bash -euo pipefail -s -- "$name" "$seed" <<'IMPORT'
|
||||
unshare --net /bin/bash -euo pipefail -s -- "$name" "$seed" "$destination" <<'IMPORT'
|
||||
name=$1
|
||||
seed=$2
|
||||
destination=$3
|
||||
flatpak --installation="$name" remote-add flathub "$seed/flathub.flatpakrepo"
|
||||
flatpak --installation="$name" remote-modify --collection-id=org.flathub.Stable flathub
|
||||
flatpak --installation="$name" config --set languages '*'
|
||||
|
|
@ -34,4 +35,11 @@ PY
|
|||
test "${#apps[@]}" -gt 0
|
||||
flatpak --installation="$name" install --noninteractive --assumeyes --sideload-repo="$seed/.ostree/repo" flathub "${apps[@]}"
|
||||
for ref in "${apps[@]}"; do flatpak --installation="$name" info "$ref"; done
|
||||
# Do not accept an import that retained commit bytes but lost detached signatures.
|
||||
# This also covers auto-installed runtime extensions rather than apps alone.
|
||||
mapfile -t imported < <(ostree --repo="$destination/repo" refs | grep -E '^flathub:(app|runtime)/')
|
||||
test "${#imported[@]}" -gt 0
|
||||
for ref in "${imported[@]}"; do
|
||||
ostree --repo="$destination/repo" show --gpg-verify-remote=flathub "$ref" >/dev/null
|
||||
done
|
||||
IMPORT
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue