!CcTBuBritXGywOEGWJ:matrix.org

NixOS Binary Cache Self-Hosting

158 Members
About how to host a very large-scale binary cache and more54 Servers

Load older messages


SenderMessageTime
24 Aug 2023
@linus:schreibt.jetzt@linus:schreibt.jetzt might work if you pass --store file:///... 15:13:18
@linus:schreibt.jetzt@linus:schreibt.jetzt(or s3:/// or whatever, as appropriate)15:13:27
@brian:bmcgee.ie@brian:bmcgee.ieThat means copying from that store into your local. I'm looking at updating a remote cache after i've signed something again locally15:13:55
@linus:schreibt.jetzt@linus:schreibt.jetzt no, --store is the "destination" store 15:14:19
@brian:bmcgee.ie@brian:bmcgee.ieWell I don't have a use case, just wanted to confirm that uploading a narinfo is a one and done action. You have to remove it remotely in order to upload again15:14:20
@linus:schreibt.jetzt@linus:schreibt.jetzt--substituter is where it's copied from15:14:33
@brian:bmcgee.ie@brian:bmcgee.ieimage.png
Download image.png
15:14:40
@linus:schreibt.jetzt@linus:schreibt.jetzt to be clear, I'm not sure if it actually works, but using --store should be the right way to express what you want 15:15:39
@brian:bmcgee.ie@brian:bmcgee.iejust playing around with it to see15:15:52
@brian:bmcgee.ie@brian:bmcgee.ie nix store copy-sigs -s http://localhost:3000 nixpkgs#hello --refresh --debug is showing the following 15:17:23
@brian:bmcgee.ie@brian:bmcgee.ie
downloading 'http://localhost:3000/ibpsas4imhv84qmdk5ffh51y0ayrqa94.narinfo'...
starting download of http://localhost:3000/ibpsas4imhv84qmdk5ffh51y0ayrqa94.narinfo
finished download of 'http://localhost:3000/ibpsas4imhv84qmdk5ffh51y0ayrqa94.narinfo'; curl status = 0, HTTP status = 200, body = 1344 bytes
imported 0 signatures
download thread shutting down
15:17:35
@linus:schreibt.jetzt@linus:schreibt.jetzt --store, not --substituter 15:17:42
@linus:schreibt.jetzt@linus:schreibt.jetzt -s is --substituter 15:17:50
@brian:bmcgee.ie@brian:bmcgee.ieah ... fuck me15:17:51
@brian:bmcgee.ie@brian:bmcgee.ie nix sign-paths --store <store> -k <private key> <path> from the first issue was the one that worked. Copy didn't seem to 15:22:11
@linus:schreibt.jetzt@linus:schreibt.jetzt yeah, I'm not surprised at nix copy not changing the narinfo 15:23:53
@brian:bmcgee.ie@brian:bmcgee.ie It seems to be fetching the narinfo from the remote, adding the signature and doing a PUT back. Slight window for issues there but I imagine it's a small one 15:24:02
@brian:bmcgee.ie@brian:bmcgee.ieunlikely to be adding 2 signatures at once from different sources15:24:22
@linus:schreibt.jetzt@linus:schreibt.jetztyeah I'm not sure it's possible to improve that, at least with the HTTP API15:24:53
@linus:schreibt.jetzt@linus:schreibt.jetztwait no15:24:58
@linus:schreibt.jetzt@linus:schreibt.jetztthere are headers for conditional update, aren't there?15:25:10
@brian:bmcgee.ie@brian:bmcgee.iei was just about to check for that :)15:25:18
@brian:bmcgee.ie@brian:bmcgee.ieI remember e-tags but it's been a while since i looked into this15:25:42
@brian:bmcgee.ie@brian:bmcgee.ieGonna capture what nix is doing to see if it's setting anything 15:25:52
@linus:schreibt.jetzt@linus:schreibt.jetztat the same time, I think it's fair enough to just not implement it15:25:55
@brian:bmcgee.ie@brian:bmcgee.ieCan confirm, Nix isn't setting anything special on the request15:26:58
@brian:bmcgee.ie@brian:bmcgee.ie A PATCH would technically be the 'correct' way to do this I guess 15:27:29
@brian:bmcgee.ie@brian:bmcgee.ieOr it looks like ETag and If-Match is how you can prevent this https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag#avoiding_mid-air_collisions15:28:56
@brian:bmcgee.ie@brian:bmcgee.ieNix client would refresh and try again 15:29:34
@linus:schreibt.jetzt@linus:schreibt.jetztI think generally something like attic is a better approach to a binary cache anyway15:29:51

Show newer messages


Back to Room ListRoom Version: 10