| 20 Sep 2024 |
Mic92 | cleverca22: https://github.com/NixOS/hydra/pull/1413/files#diff-99bd8eee901b9b16f07b535be184e0d630739e79cb8678b8465e82ed54f2543aR42 | 10:14:28 |
cleverca22 | yeah, thats a more portable solution | 10:14:54 |
Mic92 | again relying on you for testing. Currently working on something else | 10:15:05 |
Mic92 | ok ci fails again. | 10:21:43 |
Mic92 | I might need to run this locally. | 10:21:48 |
Mic92 | ok. linter error | 10:23:25 |
Mic92 | My perl got very rusty.... I learned in the early 2000s | 10:25:14 |
Mic92 | cleverca22: so CI is green | 10:42:03 |
cleverca22 | Caught exception in Hydra::View::NARInfo->process "Undefined subroutine &Hydra::View::NARInfo::signString called at /nix/store/vrph94x32fi58pjr00z4inx1yb69ql8f-hydra-0.1.20240920.1a2d201/libexec/hydra/lib/Hydra/View/NARInfo.pm line 42." | 10:42:42 |
cleverca22 | when i fix the readFile a different way | 10:42:48 |
cleverca22 | thats from Nix/Store.pm | 10:43:41 |
cleverca22 | use Nix::Store; was removed in the same commit that broke utils | 10:44:08 |
cleverca22 | commit e499509595859d670432c0d98162119ecd552666 | 10:44:34 |
cleverca22 | so basically, i'm just reverting 2 parts of this | 10:44:45 |
Mic92 | ah, so something like this is needed: https://github.com/edolstra/nix-serve/commit/06c1e229ac647cf9733af509e83a8407c6141006 | 10:53:59 |
Mic92 | So something like this is missing: https://github.com/NixOS/hydra/pull/1388/commits/e499509595859d670432c0d98162119ecd552666 | 10:54:33 |
Mic92 | That's a bigger pull request. | 10:54:47 |
cleverca22 | commit 045a62ca8ba8fe68c5da1d15b5f97ceb4b91c4c1 (HEAD -> fix-binary-cache, clever/fix-binary-cache)
Author: Michael Bishop <cleverca22@gmail.com>
Date: Fri Sep 20 05:49:41 2024 -0300
fix narinfo signature generation
diff --git a/src/lib/Hydra/View/NARInfo.pm b/src/lib/Hydra/View/NARInfo.pm
index bf8711a4..5f40b48f 100644
--- a/src/lib/Hydra/View/NARInfo.pm
+++ b/src/lib/Hydra/View/NARInfo.pm
@@ -7,6 +7,8 @@ use Hydra::Helper::CatalystUtils;
use MIME::Base64;
use Nix::Manifest;
use Hydra::Helper::Nix;
+use Nix::Store;
+use Nix::Utils;
use base qw/Catalyst::View/;
sub process {
@@ -36,7 +38,7 @@ sub process {
# Optionally, sign the NAR info file we just created.
my $secretKeyFile = $c->config->{binary_cache_secret_key_file};
if (defined $secretKeyFile) {
- my $secretKey = readFile $secretKeyFile;
+ my $secretKey = readFile($secretKeyFile);
my $fingerprint = fingerprintPath($storePath, $narHash, $narSize, $refs);
my $sig = signString($secretKey, $fingerprint);
$info .= "Sig: $sig\n";
| 10:57:43 |
cleverca22 | Mic92: with just these 2 lines restored, it works again | 10:57:52 |
cleverca22 | the parens are likely redundant | 10:58:03 |
Mic92 | cleverca22: ok, but these imports are already in master | 10:59:15 |
Mic92 | what version are you on? | 10:59:20 |
cleverca22 | In reply to @Ericson2314:matrix.org cleverca22: it would be nice if you could PR it to the nix-2.21 branch ah, i forked off this branch, because i was fixing a different error, in the nar endpoint | 10:59:59 |
Mic92 | ok. I am getting confused with all these branches | 11:00:46 |
cleverca22 | i'm also a bit confused about the history of that 2.21 branch | 11:01:01 |
Mic92 | John Ericson: can you explain how these branches in hydra are supposed to be used? | 11:02:16 |
cleverca22 | In reply to @joerg:thalheim.io cleverca22: ok, but these imports are already in master https://github.com/NixOS/hydra/pull/1405 ah yep, somebody else already found and fixed it in master | 11:03:10 |
Mic92 | I even merged it... | 11:03:27 |
cleverca22 | heh | 11:03:38 |
cleverca22 | i'll just cherry-pick that into my upcoming PR on the 2.21 branch | 11:03:50 |