Use the Heads name for a package when it differs from the primary
source. E.g. musl-cross-make's archive is just <hash>.tar.gz, which
makes little sense out of context. musl-cross-<hash>.tar.gz makes
more sense for a mirror.
Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Try to download dependency source packages from mirrors if the primary
source fails or the archive has changed.
Move the download and verify logic to bin/fetch_source_archive.sh. The
mirror list is here, currently only
https://storage.puri.sm/heads-packages/, but others can be added. The
mirror list is randomized to load each mirror equally.
The verify logic is moved to this script too so it can fail over to a
mirror (or another mirror) if a mismatched archive is served, not just
for a failure. Makefile no longer needs to verify separately and there
are no separate .*-_verify files any more, the archive is only moved to
its final place once verified.
Add `packages` target to just fetch all needed packages for a board,
facilitates seeding a mirror.
Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
flashrom doesn't work in qemu, so the firmware isn't able to update its
keyring. Adding an already-provisioned key ahead of time works though.
Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>