[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: linux-initrd: Ensure that the guile used in the initrd is referen
From: |
Christopher Baines |
Subject: |
01/02: linux-initrd: Ensure that the guile used in the initrd is referenced. |
Date: |
Sun, 8 Oct 2017 12:32:11 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit b36e06c2b0889f1d0f939465589d36887ff24d33
Author: Christopher Baines <address@hidden>
Date: Sun Oct 8 09:52:24 2017 +0100
linux-initrd: Ensure that the guile used in the initrd is referenced.
By referencing guile from the initrd output explicitly, it will be present
in
the store when this initrd is used. If the exact guile used within the
initrd
isn't present in the store, then after root is switched during the boot
process, loading modules (such as (ice-9 popen)) won't work.
This fixes guix-patches bug #28399, "Fix mysql activation, and add a basic
test".
* gnu/system/linux-initrd.scm (expression->initrd)[builder]: Write out a
file
called references in to the initrd output, which includes the store path
for
guile.
---
gnu/system/linux-initrd.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 5a7aec5..969a892 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -78,6 +78,19 @@ the derivations referenced by EXP are automatically copied
to the initrd."
(use-modules (gnu build linux-initrd))
(mkdir #$output)
+
+ ;; The guile used in the initrd must be present in the store, so
+ ;; that module loading works once the root is switched.
+ ;;
+ ;; To ensure that is the case, add an explicit reference to the
+ ;; guile package used in the initrd to the output.
+ ;;
+ ;; This fixes guix-patches bug #28399, "Fix mysql activation, and
+ ;; add a basic test".
+ (call-with-output-file (string-append #$ output "/references")
+ (lambda (port)
+ (simple-format port "~A\n" #$guile)))
+
(build-initrd (string-append #$output "/initrd")
#:guile #$guile
#:init #$init