minimal-bootstrap: point bootstrap sources to tarballs.nixos.org#232576
minimal-bootstrap: point bootstrap sources to tarballs.nixos.org#232576emilytrau wants to merge 1 commit intoNixOS:masterfrom
Conversation
pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix
Outdated
Show resolved
Hide resolved
pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix
Outdated
Show resolved
Hide resolved
|
Hi @emilytrau! Thrilled to see this work progress :) Could you take a look at the format used here to request tarball uploads? #183487 If you could make a comment in that shape, it'd help me a lot in uploading this quickly Thanks! |
01a5127 to
cede8c0
Compare
|
@lovesegfault thanks so much! |
|
(Might take a couple of days, I'm travelling and didn't bring my upload keys) |
|
(I am back and close to conquering my backlog) Quick glance LGTM; will do a closer review this weekend if this hasn't been merged by then. |
|
Is this undrafted because the tarballs are uploaded now? |
|
|
||
| # | ||
| # Files came from this Hydra build: | ||
| # | ||
| # https://hydra.nixos.org/build/<placeholder> | ||
| # | ||
| # Which used nixpkgs revision <placeholder> | ||
| # to instantiate: | ||
| # | ||
| # /nix/store/<placeholder>.drv | ||
| # | ||
| # and then built: | ||
| # | ||
| # /nix/store/<placeholder> | ||
| # |
There was a problem hiding this comment.
| # | |
| # Files came from this Hydra build: | |
| # | |
| # https://hydra.nixos.org/build/<placeholder> | |
| # | |
| # Which used nixpkgs revision <placeholder> | |
| # to instantiate: | |
| # | |
| # /nix/store/<placeholder>.drv | |
| # | |
| # and then built: | |
| # | |
| # /nix/store/<placeholder> | |
| # |
| inherit (stdenv) buildPlatform hostPlatform; | ||
| inherit lib config; | ||
| }); | ||
| minimal-bootstrap-sources = callPackage ../os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix { }; |
There was a problem hiding this comment.
There are no Hydra builds of minimal-bootstrap-sources yet.
In order to get a Hydra build you need to:
- merge a PR that has the line above
- wait for Hydra to build it
- then submit a separate PR which references that Hydra build.
The second PR is the one that should use the template @lovesegfault referenced.
Also, the provenance of builds on tarballs.nixos.org is a big deal. You should delete the fetchurl of https://github.com/emilytrau/bootstrap-tools-nar-mirror/ so it isn't anywhere in the nixpkgs repo at the commit from which Hydra builds the narball. Otherwise it's going to raise circularity suspicions.
| src = import <nix/fetchurl.nix> { | ||
| inherit name; |
There was a problem hiding this comment.
| src = import <nix/fetchurl.nix> { | |
| inherit name; |
| url = "https://github.com/emilytrau/bootstrap-tools-nar-mirror/releases/download/2023-05-18/${name}.nar.xz"; | ||
| hash = "sha256-FpMp7z+B3cR3LkQ+PooH/b1/NlxH8NHVJNWifaPWt4U="; | ||
| unpack = true; | ||
| }; | ||
| } |
There was a problem hiding this comment.
| url = "https://github.com/emilytrau/bootstrap-tools-nar-mirror/releases/download/2023-05-18/${name}.nar.xz"; | |
| hash = "sha256-FpMp7z+B3cR3LkQ+PooH/b1/NlxH8NHVJNWifaPWt4U="; | |
| unpack = true; | |
| }; | |
| } |
Please delete this, wait for Hydra to do the build, then re-add it using the tarballs.nixos.org url. That way there won't be any doubts raised about the commit at which Hydra does the build having access to this narball of questionable provenance.
| # To build: | ||
| # | ||
| # nix-build pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix | ||
| # nix-build . -A minimal-bootstrap-sources |
There was a problem hiding this comment.
| # nix-build . -A minimal-bootstrap-sources | |
| # nix-build '<nixpkgs>' -A minimal-bootstrap-sources |
|
I have to say it is kind of a bummer that we still end up embedding a "magic hash" of some Hydra build. I was kinda hoping the minimal-bootstrap would let us avoid doing that. Of course, it's less-bad since that Hydra build contains no binaries, but still... |
This comment was marked as outdated.
This comment was marked as outdated.
|
@amjoseph-nixpkgs iirc Also I suppose now that I think of it again, the purpose of uploading this source tarball to Maybe persuading upstream to publish release tarballs in |
This comment was marked as outdated.
This comment was marked as outdated.
|
@amjoseph-nixpkgs another suggestion might be to move the tarball hosting repo to |
|
Ah yes, now I remember why my scheme is doomed to fail: It isn't documented in the manual, but There is no In fact, there is no "cheat-code" that lets you access any of the That became a problem for NixOS's channels, so another "cheat-code" was added for that use case: So yeah, we have to put a Anyways, the split-it-into-two-PRs part of my review still stands; if you could please address that I'll approve this, we can merge it, and start waiting for Hydra to do the build. |
Or have somebody run a streaming HTTP GET tarball-to-narball converter and point curl -o stage0-posix.nar \
http://nixos.org/tar2nar/https://github.com/oriansj/stage0-posix/archive/3189b5f325b7ef8b88e3edec7c1cde4fce73c76c.tar |
|
I am not knowledgeable about this Hydra policy tarball stuff, and @amjoseph-nixpkgs is, so I defer to him. |
|
#238357 does make sense to me though. Does it make sense to you @emilytrau as a replacement? |
|
#238357 makes a lot of sense to me as well :) |
This commit adjusts NixOS#232576 to break the fetchurl<->minimal-bootstrap-sources dependency cycle without needing an upload to tarballs.nixos.org. It does this by appending the low-level FOD attributes onto the `runCommand` derivation. https://nixos.org/manual/nix/unstable/language/advanced-attributes.html#adv-attr-outputHash
Description of changes
The purpose of this PR is to move the initial source tarball to an official location as discussed in #227914 (comment). To facilitate I have exposed the packaging steps as the
minimal-bootstrap-sourcespackage.Related #227914
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)