#!/bin/bash # The sshpass password below is the disposable test guest's throwaway root # password (scripts/testing/archsetup-test.conf), reachable only on loopback. # It is not a credential for anything real. # Build the repo's gnome-keyring package in the guest with makepkg, install it # with pacman, and run the regression through the installed daemon. set -uo pipefail here="$(cd "$(dirname "$0")" && pwd)" ssho=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -o LogLevel=ERROR -o PreferredAuthentications=password -o PubkeyAuthentication=no) g() { sshpass -p archsetup ssh "${ssho[@]}" -p 2237 root@127.0.0.1 "$@"; } gcp() { sshpass -p archsetup scp "${ssho[@]}" -P 2237 "$@"; } echo "=== package build $(date -Is)" g 'rm -rf /home/keyring-test/pkgbuild; mkdir -p /home/keyring-test/pkgbuild' gcp -r "$here/../../packages/gnome-keyring/." root@127.0.0.1:/home/keyring-test/pkgbuild/ >/dev/null # the tarball is already on the guest; makepkg verifies its checksum anyway g 'cp /root/gnome-keyring-51.1.tar.xz /home/keyring-test/pkgbuild/; chown -R keyring-test: /home/keyring-test/pkgbuild pacman -S --noconfirm --needed base-devel docbook-xsl git glib2-devel meson p11-kit python >/tmp/deps.log 2>&1 || { echo "DEPS FAILED"; tail -5 /tmp/deps.log; exit 1; } cd /home/keyring-test/pkgbuild && runuser -u keyring-test -- makepkg --noconfirm --skippgpcheck >/tmp/makepkg.log 2>&1 || { echo "MAKEPKG FAILED"; tail -30 /tmp/makepkg.log; exit 1; } ls -la /home/keyring-test/pkgbuild/*.pkg.tar.zst grep -E "^(Ok|Fail|Timeout|Expected Fail|Unexpected Pass|Skipped):" /tmp/makepkg.log | tr "\n" " "; echo pacman -U --noconfirm /home/keyring-test/pkgbuild/gnome-keyring-1:51.1-1.1-x86_64.pkg.tar.zst >/tmp/pacman-u.log 2>&1 || { echo "PACMAN -U FAILED"; tail -5 /tmp/pacman-u.log; exit 1; } pacman -Q gnome-keyring; sha256sum /usr/bin/gnome-keyring-daemon' echo "=== regression via installed daemon" "$here/run-regression.sh" installed /usr/bin/gnome-keyring-daemon