-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minimal-bootstrap: point bootstrap sources to tarballs.nixos.org #232576
Conversation
pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix
Show resolved
Hide resolved
pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/make-bootstrap-sources.nix
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be done in two separately-merged PRs, with a Hydra build occurring after the first but before the second. See below. Yeah, it's annoying, I know, I went through it four or five times.
|
||
# | ||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# | |
# 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> | |
# |
@@ -27102,6 +27102,7 @@ with pkgs; | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -9,23 +8,30 @@ | |||
# | |||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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-sources
package.Related #227914
Things done
sandbox = true
set 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/
)