guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bootstrap binaries


From: Stefan
Subject: Bootstrap binaries
Date: Sat, 21 Dec 2024 23:11:53 +0100
User-agent: Mozilla Thunderbird

Hi!

I'm playing around with the bootstrapping of Guix.  I figured out that at the 
very beginning executables for bash, mkdir, xz, tar, get downloaded into the 
store, which is done by some Guile, I think it is (default-guile).  Then a 
guile-*.tar.xz file is downloaded and extracted into the store by a crafted 
shell script using the former bash as shebang and the other executables for 
creation of the directory in the store and extraction.  This way we get the 
%bootstrap-guile and this is all in (gnu packages bootstrap).

Then the story continues in (gnu packages commencement), which uses 
%bootstrap-guile to build bootar, gash-boot, gash-utils-boot and stage0-posix.  
The surprising part is that stage0-posix contains a kaem-optional-seed per 
architecture, which is a minimal shell implementation as another binary 
executable!

So up to this point these seven binary blobs are needed: (default-guile), bash, 
mkdir, xz, tar, %bootstrap-guile, kaem-optional-seed.

And up to this point three shell implementations are in use: bash, gash, 
kaem-optional-seed.

While playing around with all this I found a possibility to avoid five of these 
binary blobs, but it comes at the cost of using (default-guile) twice on the 
build-side.

• Build bootar-dirty with (default-guile), make use of #:allowed-references (list 
(default-guile) "out").
• Build %bootstrap-guile with (default-guile) and bootar-dirty, make use of 
#:allowed-references '().
• Build another bootar with %bootstrap-guile, make use of #:allowed-references (list 
%bootstrap-guile "out").

From here on only %bootstrap-guile and bootar will be used.

• Build gash-boot.
• Build gash-utils-boot.
• Build STAGE0-POSIX-bootstrap, but deleting kaem-optional-seed and using 
gash-boot instead.

So at the cost of using (default-guile) twice on the build-side, the only 
remaining binary blobs are (default-guile) and guile-*.tar.xz.  The only shell 
implementation in use is gash.

Is this a possible and welcome alternative?

What are the implications of using (default-guile) on the build side?  Is this 
a bad idea?  Won't it (or some other Guile) be used anyway in future, if the 
guix-daemon is rewritten in Guile?

Is there a better Guile than (default-guile) to use?  Which is the Guile used 
by Guix itself?

Finally, I'm not clear about the advantage of trusting %bootstrap-guile 
alongside (default-guile).  Why should it be better to trust both than only one 
of them?  Well, the hash of %bootstrap-guile is checked.  But it is checked by 
(default-guile).


Bye

Stefan















reply via email to

[Prev in Thread] Current Thread [Next in Thread]