Live bootstrap to guix#578
Conversation
…ied sha256 and wire it before elfutils
…hs, and disable unused-but-set-variable as error
…compress, and debuginfod client
…mpile via rpath-link and explicit LIBS
feat(steps-guix): add libgcrypt-1.12.1 default build with gcc-detected host and pkg-config path feat(steps-guix): add guile-gcrypt-0.5.0 with dynamic libgcrypt prefix and ld library path
…and end with shared after
… out-of-tree build
…IR for libgcrypt lookup
…IB_SRCDIR and no-git
…refix and checksum
…e-gnutls flow with no-so patch
|
During the ISO build, I got an error complaining about a missing aux-files/logo.txt file. It's in gnu/installer in the tarball & channel repo, so before building the ISO, one needs to |
|
In the "build-native-utils-earlier" patch, the procedure It might also be necessary to change the target in the guix pull script to x86_64-linux, to avoid running the Guix bootstrap twice. EDIT: Oops... |
|
And... bitrot strikes. Guix tries to download 0001-unordered-fix-copy-assign.patch from boost.org, and then check it against a specific hash. But Boost decided to "clean up" their copy of this patch, removing trailing whitespace - breaking the hash. The original one with the right hash can still be found @ https://cdn.jsdelivr.net/npm/@openziti/ziti-sdk-nodejs@0.14.2/vcpkg/ports/boost-unordered/0001-unordered-fix-copy-assign.patch - manually copying it to /gnu/store/chzch29xi2gzdxbzk77sb432klkddra1-boost-0001-unordered-fix-copy-assign.patch seems to work (EDIT: it doesn't). |
Should we patch Guix to fix this problem? Just like the bootstrap binary, use a local web server to serve this file |
|
A local web server is probably a good idea, yes. |
|
Wait a minute, what do you mean by "it doesn't", you mean, the file didn't match or we can't copy it to |
|
Copying to the store directly didn't work. Modifying the package definition to use the alternative URL did. But now, I'm facing a new problem, where one of the "module-import-compiled" packages fails to build, apparently because contents of the host Guile (3.0.11) leak into the Guix environment, where the local Guile (3.0.9) can't execute them. I'm still working on solving this. |
What's the status of this issue? One thing that puzzles me is, aren't all Guix builds supposed to run in a chroot or namespace environment? |
is it something like this? |
|
No, it was a different issue. Sourcing the Guix profile ( I did encounter the issue you describe - I solved it differently, by making the 2nd copy operation conditional on the i686 and x86_64 bootstrap guile paths being different. Now, I'm facing another issue, where tests fail for the "guix-1.5.0rc1.drv" derivation. The cause seems to be that it's trying to download the official bootstrap binaries to run the tests with, but is failing to do so. IMO the right way to fix this is to inject the patches we use when building our Guix into this derivation, so it too uses the locally built bootstrap binaries instead. |
Where I am doing is to copy the original Bootstrap Guile directory, then add
Where is the definition file for this? And another question: Do you think we should make the generated ISO to be installed offline? (Because the default ISO image downloads external substitutes during the installation process, which undermines our assumption of a fully source-code-based build.) |
|
The definition file is gnu/packages/package-management.scm - I've attached the patch I used for the double-bootstrap-guile bug. The issue where tests fail due to trying to access the official binaries is also in the same package definition. IMO we should keep the ISO's ability to use substitutes, but have it default to using the bootstrap machine as its sole substitute source. The packages there are properly bootstrapped, and therefore fine to use as substitutes. |
|
Currently running a bare metal test with this diff on top of the latest commit: $ git diff
diff --git a/steps-guix/improve/guix-daemon-and-pull.sh b/steps-guix/improve/guix-daemon-and-pull.sh
index c7625474..f61b5d9f 100644
--- a/steps-guix/improve/guix-daemon-and-pull.sh
+++ b/steps-guix/improve/guix-daemon-and-pull.sh
@@ -218,6 +218,9 @@ mkdir -p /proc /sys /dev "${guix_localstate_dir}/daemon-socket" /var/lib/guix /r
mount | grep ' on /proc ' >/dev/null 2>&1 || mount -t proc proc /proc
mount | grep ' on /sys ' >/dev/null 2>&1 || mount -t sysfs sysfs /sys
mount | grep ' on /dev ' >/dev/null 2>&1 || mount -t devtmpfs devtmpfs /dev
+# tmpfs must be unmounted to avoid overfilling memory
+mount | grep ' on /tmp ' >/dev/null 2>&1 && umount /tmp
+test -f /swapfile && swapon /swapfile
if ! mount | grep ' on /dev/pts ' >/dev/null 2>&1; then
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
diff --git a/steps-guix/jump/linux64.sh b/steps-guix/jump/linux64.sh
index 1bb6ba93..f942c2a1 100644
--- a/steps-guix/jump/linux64.sh
+++ b/steps-guix/jump/linux64.sh
@@ -37,4 +37,8 @@ else
--append="console=ttyS0 root=/dev/sda1 init=/init rw rootwait consoleblank=0"
fi
quiesce_filesystem_for_kexec
-kexec -e
+if [ "${BARE_METAL}" = True ]; then
+ echo b > /proc/sysrq-trigger || true
+else
+ kexec -e
+fiI disabled kexec for bare metal, because I couldn't get the framebuffer to work reliably after kexecing from 32-bit 4.14-openela to 64-bit 6.12-gnu. The other change activates the swapfile, and unmounts /tmp before starting the Guix bootstrap - this was needed to avoid going OOM on my 8GiB RAM bootstrap rig. |
|
I’m also thinking about running a bare-metal setup. Is using Coreboot + SeaBIOS on a modern motherboard a viable option? |
|
If you can run Coreboot on your board, it should be, especially since qemu's default BIOS implementation is SeaBIOS. Note that I had to edit that patch in that previous comment, as I got Bash's conditional syntax wrong (it's if...fi, not if...endif). |
|
Great, I’ll add the patch shortly. |
|
There is currently no reliable method for including Closure in an ISO image and performing a guided installation. |
|
The new patch is malformed: With that fixed, I had a test failure in wmin69qfszbjz0mflj2sya8sm2r5c7bs-glib-2.83.3.drv (GLib 2.83.3), that went away on retry. Maybe we should disable tests for it? |
|
OK, after lots of wrangling... I have an ISO.More to come tomorrow. I've just came home, and am quite tired. And it did took quite some wrangling to get here. |
No description provided.