This is a Rust port of the original Perl script, legacy cruft is removed
and it focuses on a modern Hydra deployment.
Nonetheless, it knows how to perform migrations based on the channel
versions.
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
For every file "lib/debug/.build-id/<build-id>.debug" in every store
path ending in -debug in a release, this command creates an S3 key
"debuginfo/<build-id>" specifying the location of the NAR that
contains the debug info file for that build ID. Thus,
https://cache.nixos.org/debuginfo allows debug info files to be looked
up by build ID. This allows debug info files to be fetched
automatically by dwarffs [1].
One minor issue is that in theory, multiple store paths could provide
debug info files for a particular build ID. So then when we garbage
collect a store path from the binary cache, we migth invalidate a
debug info link even though there are non-GC'ed store paths that
provide the file. Ah well.
I could have used HTTP redirects, but they're kind of a pain to
configure with S3.
[1] https://github.com/edolstra/dwarffs