NixOS / hydra

Hydra, the Nix-based continuous build system
http://nixos.org/hydra
GNU General Public License v3.0
1.17k stars 300 forks source link

Use Nix::Store and Nix::Utils in NARInfo.pm #1405

Closed hacker1024 closed 1 month ago

hacker1024 commented 1 month ago

These are required for some subroutines used when signing NARs. They were erroneously removed in #1359.

Without this change, and with binary_cache_secret_key_file defined, when requesting a .narinfo:

Caught exception in Hydra::View::NARInfo->process "Can't locate object method "readFile" via package "/path/to/secret-key" (perhaps you forgot to load "/path/to/secret-key"?) at /nix/store/j1j3fyxwlbgkxczm6kr62nhkxw21xjnp-hydra-2024-07-09/libexec/hydra/lib/Hydra/View/NARInfo.pm line 39."
Caught exception in Hydra::View::NARInfo->process "Undefined subroutine &Hydra::View::NARInfo::signString called at /nix/store/g5w3py1ik48lgjql0fw45pvs3yi55g1h-hydra-2024-07-09/libexec/hydra/lib/Hydra/View/NARInfo.pm line 42."