!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

334 Members
100 Servers

Load older messages


SenderMessageTime
16 May 2023
@Ericson2314:matrix.orgJohn Ericson j-k: there is some fetchurl in there already? 19:44:03
@Ericson2314:matrix.orgJohn Ericsonthe fetchurl boot?19:44:07
@j-k:matrix.orgj-kno fetchurl of the whole of live-bootstrap or individual files from live-bootstrap if that's what you mean19:51:48
@Ericson2314:matrix.orgJohn Ericson j-k: I think you could just fetchurl boot a single file from github? 20:03:29
@Ericson2314:matrix.orgJohn Ericsonno compression or archiving to worry about then20:03:42
@emilytrau:matrix.orgemilytrau j-k: this is my "sandbox" branch https://github.com/emilytrau/nixpkgs/tree/trusting-trust-next 22:13:48
@j-k:matrix.orgj-kah very nice. i'm working on a shell script where we can hopefully build out the sha256s for all the files such as these ones to make maintenance easier: https://github.com/NixOS/nixpkgs/blob/d6cee7f2d3ef7b5c55a1b1347dbcad7ff660560d/pkgs/os-specific/linux/minimal-bootstrap/gnutar/default.nix#L16-L3722:16:15
@j-k:matrix.orgj-k

I tried a bunch of stuff that all felt awful to use but this is what I've ended up with:

# This file is generated by ./gen-sources.sh.
# Do not edit!
{
  targetCommit = "1bc4296091c51f53a5598050c8956d16e945b0f5";
  files = {
    "sysa/gzip-1.2.4/files/stat_override.c" = "1216xn1536mfjyx9j1b6128ynb3mfdmy68h7y0n656sk9p5rpf75";
    "sysa/gzip-1.2.4/mk/main.mk" = "06c9xl13ym41i2q7rb370kc7affwxbbm6lyqpgbpj6q83bv4dhkq";
  };
}

& a default.nix that mapAttrs that into fetched files to be used like
cp ${live-bootstrap-files."sysa/gzip-1.2.4/mk/main.mk"} Makefile
or
cp ${live-bootstrap-files."sysa/${pname}-${version}/mk/main.mk"} Makefile

I'll clean it up and put it on a branch in the morning but any initial thoughts on the UX?

I considered trimming off the "sysa" part but in theory there could be collisions with stuff "sysc"

22:44:31
@emilytrau:matrix.orgemilytrau i feel there is a benefit to versioning patches separately, you wouldn't have to track breaking updates to livebootstrap for individual package patches 23:46:12
@emilytrau:matrix.orgemilytraubut am i missing something or could you fetchurl a release tarball and use ungz and untar from mescc-tools-extra?23:47:44
17 May 2023
@emilytrau:matrix.orgemilytrau j-k John Ericson I'm adding a minimal-bootstrap maintainers team for PR review pings. Can I start with your names? and anyone else who'd be able to review ofc 00:13:31
@emilytrau:matrix.orgemilytrauhttps://github.com/NixOS/nixpkgs/pull/23232000:30:19
@j-k:matrix.orgj-k
In reply to @emilytrau:matrix.org
but am i missing something or could you fetchurl a release tarball and use ungz and untar from mescc-tools-extra?

I tried pulling the whole repo but it was upset by the symlinks.
I'm guessing after gnutar and gnuzip we can do that but we need a couple files for those exact packages 😅

also pulling the whole of live-bootstrap is quite a big source where we'll only use a handful of files hopefully. IDK if the priority will be less bytes pulled in or less total separate derivations.
One nice thing about the separate files is it's very clear exactly which subset of files from live-bootstrap are inherited

I made some other ux changes to get a trimmed subset of files so you can do

lbf = live-bootstrap-files.getSubsetOfFiles "sysa/${pname}-${version}/";
# ...
cp ${lbf."mk/main.mk"} Makefile
cp ${lbf."files/stat_override.c"} some/place/file.c
08:47:02
@emilytrau:matrix.orgemilytrau top tip: untar has --non-strict for ignoring symlinks! j-k 08:49:04
@emilytrau:matrix.orgemilytraui've found untar can get you surprisingly far before you need to reach for the gnu tools 😼08:50:02
@j-k:matrix.orgj-koh yeah, so I guess we can pick between a big single drv and many tiny drvs. we could probably still have some kind of prefix helper or just have 1 prefix variable like you've got on your branch08:50:12
@emilytrau:matrix.orgemilytraupersonally my goal isn't to track the live-bootstrap path exactly. as live-bootstrap evolves i'm ok with diverging if it doesn't fit as well into nixpkgs. was also shows this 3rd bootstrap project and blending in ideas/scripts/patches from there as well https://github.com/schierlm/FullSourceBootstrapFromGit08:53:50
@emilytrau:matrix.orgemilytrau* personally my goal isn't to track the live-bootstrap path exactly. as live-bootstrap evolves i'm ok with diverging if it doesn't fit as well into nixpkgs. was also shown this 3rd bootstrap project and blending in ideas/scripts/patches from there as well https://github.com/schierlm/FullSourceBootstrapFromGit08:54:13
@emilytrau:matrix.orgemilytrauwill be putting up a PR for coreutils today once that maintainers PR is merged =)08:55:27
@j-k:matrix.orgj-k that repo looks nice & it's easier to follow than diving through run.kaem -> after.kaem -> after2.kaem -> after-fxiw.kaem -> run.sh etc or whatever it is 😅 it actually has the parts & packages clearly documented in the readme 09:07:40
@j-k:matrix.orgj-k

It grabs live-bootstrap but then deletes most files

https://github.com/schierlm/FullSourceBootstrapFromGit/blob/main/part01.sh#L27-L28

specifically in this folder we see it uses config.h & mescc.scm which we just make ourselves so that's covered

09:09:38
@j-k:matrix.orgj-klooks like a couple of makefiles & a couple of patches are the bits they've decided to copy as-is. https://sourcegraph.com/search?q=context%3Aglobal+repo%3A%5Egithub%5C.com%2Fschierlm%2FFullSourceBootstrapFromGit%24%40main+live-bootstrap&patternType=standard&sm=1&groupBy=path there's also these c files for gnutar and gnuzip that fix reproducibility which we'll want to keep, I guess this repo hasn't been updated since those were added to live-bootstrap09:12:42
@j-k:matrix.orgj-k

pushed a copy. I noticed some of the files for coreutils come from a different commit so having some capability for multiple target commits would be good

https://github.com/06kellyjac/nixpkgs/commit/a106f98d9fb82a5640413289dd9c7f2dd7f5b6db

I might permanently move the files source of truth to nix & only fetch hashes for items that are empty e.g. "somefile.txt" = ""; and maybe look to parallelise it although I don't think we want to pull many many files that'd make that worth it

12:15:48
@j-k:matrix.orgj-kI might actually try the untar --non-strict method for a bit but maybe unpack it into different grouped pieces. many files into 1 drv looks pretty nasty in the graphs 😅12:23:08
@j-k:matrix.orgj-kRedacted or Malformed Event12:23:10
@j-k:matrix.orgj-k👀13:16:43
@j-k:matrix.orgj-k * 👀 ahh it's because we delete all images in matrix ATM https://matrix.to/#/!GsmxjHfeAYLsTEQmjS:nixos.org/$KCXuLtBQe1aym2KRdEQ4fuorkb374ijgbFK3rph4fWw?via=nixos.org&via=matrix.org&via=nixos.dev13:33:36
@Ericson2314:matrix.orgJohn Ericson emilytrau: happy to be on that team! 13:58:53
@Ericson2314:matrix.orgJohn Ericsonwe should ~~nerd snipe~~ involve amjoseph (not on matrix) too, I think :)13:59:23
@emilytrau:matrix.orgemilytrau John Ericson: something is up with the pname/version that gets exposed. any theories? https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=minimal-bootstrap 14:29:53

Show newer messages


Back to Room ListRoom Version: 6