mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
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.
This commit is contained in:
parent
fe90a6e08b
commit
b36e06c2b0
1 changed files with 13 additions and 0 deletions
|
@ -78,6 +78,19 @@ (define builder
|
||||||
(use-modules (gnu build linux-initrd))
|
(use-modules (gnu build linux-initrd))
|
||||||
|
|
||||||
(mkdir #$output)
|
(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")
|
(build-initrd (string-append #$output "/initrd")
|
||||||
#:guile #$guile
|
#:guile #$guile
|
||||||
#:init #$init
|
#:init #$init
|
||||||
|
|
Loading…
Reference in a new issue