guix-commits
[Top][All Lists]
Advanced

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

04/04: mapped-devices: luks: Specify modules needed at the top-level.


From: guix-commits
Subject: 04/04: mapped-devices: luks: Specify modules needed at the top-level.
Date: Sun, 7 Apr 2024 18:27:53 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 49f82fca4130ffcfb16aa0cf89750ab56fb99ad7
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Apr 8 00:15:39 2024 +0200

    mapped-devices: luks: Specify modules needed at the top-level.
    
    Fixes <https://issues.guix.gnu.org/70266>.
    
    * gnu/system/mapped-devices.scm (luks-device-mapping)[modules]: New
    field.
    (open-luks-device): Remove non-top-level ‘use-modules’ form.
    * gnu/system/linux-initrd.scm (raw-initrd): Remove modules that were
    added specifically for ‘luks-device-mapping’.
    
    Change-Id: I4253c3dd5e3cbcee41ec84fd57227abd428d1bd6
---
 gnu/system/linux-initrd.scm   |  7 -------
 gnu/system/mapped-devices.scm | 11 ++++-------
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 7868ff5723..561cfe2fd0 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -252,13 +252,6 @@ upon error."
                       (srfi srfi-1)           ;for lvm-device-mapping
                       (srfi srfi-26)
 
-                      ;; FIXME: The following modules are for
-                      ;; LUKS-DEVICE-MAPPING.  We should instead propagate
-                      ;; this info via gexps.
-                      ((gnu build file-systems)
-                       #:select (find-partition-by-luks-uuid))
-                      (rnrs bytevectors))
-
                       ;; Load extra modules needed by the mapped device code.
                       #$@(append-map (compose mapped-device-kind-modules
                                               mapped-device-type)
diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm
index 4e135772a9..e56ead9e5e 100644
--- a/gnu/system/mapped-devices.scm
+++ b/gnu/system/mapped-devices.scm
@@ -206,12 +206,6 @@ option of @command{guix system}.\n")
                              (uuid-bytevector source)
                              source))
                (keyfile #$key-file))
-           ;; XXX: 'use-modules' should be at the top level.
-           (use-modules (rnrs bytevectors) ;bytevector?
-                        ((gnu build file-systems)
-                         #:select (find-partition-by-luks-uuid
-                                   system*/tty))
-                        ((guix build utils) #:select (mkdir-p)))
 
            ;; Create '/run/cryptsetup/' if it does not exist, as device locking
            ;; is mandatory for LUKS2.
@@ -287,7 +281,10 @@ option of @command{guix system}.\n")
   (mapped-device-kind
    (open open-luks-device)
    (close close-luks-device)
-   (check check-luks-device)))
+   (check check-luks-device)
+   (modules '((rnrs bytevectors)                  ;bytevector?
+              ((gnu build file-systems)
+               #:select (find-partition-by-luks-uuid system*/tty))))))
 
 (define* (luks-device-mapping-with-options #:key key-file)
   "Return a luks-device-mapping object with open modified to pass the arguments



reply via email to

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