It can now be invoked via `python -m msys2_autobuild` or
by installing it, which adds a "msys2-autobuild" script.
This is a first step towards splitting up the code.
The HTTP cache is now stored in the working directory
instead of the source directory.
The timeout on a self-hosted runner is much larger (72 hours, though
there seemed to be a different limit related to the token hit before
reaching that).
See https://github.com/msys2/msys2-autobuild/issues/69
Building source packages requires git etc to be installed, but
ideally we wouldn't pollute the builder with extra packages that
it doesn't explicitly require.
To avoid this build msys and mingw source packages in a separate job.
This wasn't complete as it would only ignore broken builds
for direct deps and not indirect ones, but kinda worked in ignoring
some arm64 errors.
But it also causes problems if an error is ignored and the other arches
get uploaded. Then it's hard to roll back the update because lots of
packages with the new version are already in the repo.
With the new autobuild controller we can also restart flaky builds instead
of ignoring them and waiting for jeremy to fix them later.
Let's try removing that special case.
This is meant for the invoker (ie, msys2-autobuild-controller) to
provide additional information to be logged with the job (specifically,
what user requested it).
Up until now we created a backup of pacman.conf and restored it after
the build was done. This can leave the environment in an undefined state
if something crashes inbetween.
Instead create a temporary pacman.conf and use that during building.
In theory pacman allows setting a custom config via "--config", but
makepkg doesn't expose this, so that's not working. Luckily makepkg
allows overriding the pacman path via the PACMAN env var, so we create
a temporary script which just forwards everything to pacman and always
sets the temporary config.
They could inject commands that way. Instead assign them
to an env var and then use that env var in the powershell scripts.
We want to open those controls up to more people, so we need to make
sure they can only change the values and not extract tokens etc.
Fixes#60
instead of adding from scratch. Once the commented-out section was
added, the grep would match that and no longer run the sed to add it.
Also remove line adding clang32 section because that was added to
default pacman.conf (and was thus a no-op).
In case the job stops because it has reached the time limit it would
not update the build status and just quit. Move the timeout check
a bit later to acoid that.