From: Stefan <stefan-guix@vodafonemail.de>
To: guix-devel@gnu.org, janneke@gnu.org,
Ekaitz Zarraga <ekaitz@elenq.tech>,
Efraim Flashner <efraim@flashner.co.il>
Subject: Bootstrap binaries
Date: Sat, 21 Dec 2024 23:11:53 +0100 [thread overview]
Message-ID: <c5b84b0e-8133-42a0-b394-aa5d25bfbe8e@vodafonemail.de> (raw)
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
next reply other threads:[~2024-12-21 22:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-21 22:11 Stefan [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-02-08 10:45 GSoC ideas Tomáš Čech
2016-02-08 17:24 ` Christopher Allan Webber
2016-02-08 18:45 ` Thompson, David
2016-02-08 19:47 ` Christopher Allan Webber
2016-02-08 20:43 ` Pjotr Prins
2016-02-23 23:00 ` Diane Trout
2016-02-23 23:52 ` Guix on Debian (was: GSoC ideas) Christopher Allan Webber
2016-02-24 0:02 ` Leo Famulari
2016-02-24 9:03 ` Ricardo Wurmus
2016-02-24 9:16 ` Efraim Flashner
2016-02-24 9:36 ` Jookia
2016-02-25 18:15 ` Bootstrap binaries Ludovic Courtès
2016-02-25 20:26 ` Christopher Allan Webber
2016-02-26 23:19 ` Ludovic Courtès
2016-02-28 10:51 ` Jookia
2016-02-28 15:08 ` Ludovic Courtès
2016-02-28 15:10 ` Jookia
2016-02-29 5:22 ` Christopher Allan Webber
2016-02-29 10:01 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c5b84b0e-8133-42a0-b394-aa5d25bfbe8e@vodafonemail.de \
--to=stefan-guix@vodafonemail.de \
--cc=efraim@flashner.co.il \
--cc=ekaitz@elenq.tech \
--cc=guix-devel@gnu.org \
--cc=janneke@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.