forked from the-distro/channel-scripts
74c917454c
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 |
||
---|---|---|
default.nix | ||
delete-binary-cache-garbage.pl | ||
delete-old-releases.sh | ||
file-cache.hh | ||
find-binary-cache-garbage.pl | ||
generate-programs-index.cc | ||
index-debuginfo.cc | ||
mirror-channel.pl | ||
mirror-nixos-branch.pl | ||
print-dead-files.pl | ||
README.md | ||
sign-binary-cache.pl |
Building
$ nix-build
Running
$ ./result/bin/mirror-nixos-branch nixos-16.03-small https://hydra.nixos.org/job/nixos/release-16.03-small/tested/latest-finished
$ ./result/bin/mirror-nixos-branch nixos-unstable-small https://hydra.nixos.org/job/nixos/unstable-small/tested/latest-finished
$ ./result/bin/generate-programs-index /data/releases/nixos-files.sqlite ./programs.sqlite http://nix-cache.s3.amazonaws.com/ /data/releases/nixos/unstable-small/nixos-16.09pre89017.9db1990-tmp/store-paths /data/releases/nixos/unstable-small/nixos-16.09pre89017.9db1990-tmp/unpack/nixos-16.09pre89017.9db1990/nixpkgs