This test is flaky and relies on a file hosted remotely, which can be
unreachable. Ideally there should a way to have this file served from
the test suite itself, but this might be challenging to do without
adding dependencies.
Installing a build key requires root permissions, something that is not
possible in all cases, most notably on the builders.
Instead of generating a key each time, which results in many keys being
generated each test suite run, check whether a key is already present by
using `abuild-sign --installed`, and only generate a key when that
returns false.
Remove the SUDO environment variable, as it depends on what's installed
and configured on the host what implementation should be used.
It would not suffice to add sudo or doas as a makedepend, as it would
also need to be configured to allow abuild-keygen -ain to be executed
without password.
abuild and abump call a few helpers that are expected to be available in
PATH. As abuild is not installed yet, they are not in the default PATH
locations.
Add the project root dir to $PATH to make sure these helpers can be found.
If `APORTSDIR` is not set, abuild tries to find it. One way it does this
is by trying to look at the url for the git remote 'origin'. This fails
either if there is no git repository, or the git repository has no
remote called 'origin'.
Instead of having abuild guess the location, provide it by exporting
APORTSDIR.