diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2016-08-02 12:25:03 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2016-08-02 13:53:25 +0200 |
| commit | dfe06f6e7f486eb42a2b71e9d0ae52dfe8e3bb26 (patch) | |
| tree | f4eb8106829411fdc426b2cd8a109c0af2788916 /gnu/system | |
| parent | d26e2b9f306a1170d46f7c860c81840d9d600161 (diff) | |
mapped-devices: Do not always use (gnu build file-systems).
Fixes <http://bugs.gnu.org/24129>.
Reported by myglc2 <myglc2@gmail.com>.
* gnu/system/mapped-devices.scm (device-mapping-service-type): Remove
'modules' field from 'shepherd-service' form.
(open-luks-device): Add 'use-modules' form.
Diffstat (limited to 'gnu/system')
| -rw-r--r-- | gnu/system/mapped-devices.scm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index d0a9f0288f8..1cfd6492787 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm | |||
| @@ -81,14 +81,7 @@ | |||
| 81 | (documentation "Map a device node using Linux's device mapper.") | 81 | (documentation "Map a device node using Linux's device mapper.") |
| 82 | (start #~(lambda () #$(open source target))) | 82 | (start #~(lambda () #$(open source target))) |
| 83 | (stop #~(lambda _ (not #$(close source target)))) | 83 | (stop #~(lambda _ (not #$(close source target)))) |
| 84 | (respawn? #f) | 84 | (respawn? #f)))))) |
| 85 | |||
| 86 | ;; Add the modules needed by LUKS-DEVICE-MAPPING. | ||
| 87 | ;; FIXME: This info should be propagated via gexps. | ||
| 88 | (modules `((rnrs bytevectors) ;bytevector? | ||
| 89 | ((gnu build file-systems) | ||
| 90 | #:select (find-partition-by-luks-uuid)) | ||
| 91 | ,@%default-modules))))))) | ||
| 92 | 85 | ||
| 93 | (define (device-mapping-service mapped-device) | 86 | (define (device-mapping-service mapped-device) |
| 94 | "Return a service that sets up @var{mapped-device}." | 87 | "Return a service that sets up @var{mapped-device}." |
| @@ -105,6 +98,11 @@ | |||
| 105 | (with-imported-modules '((gnu build file-systems) | 98 | (with-imported-modules '((gnu build file-systems) |
| 106 | (guix build bournish)) | 99 | (guix build bournish)) |
| 107 | #~(let ((source #$source)) | 100 | #~(let ((source #$source)) |
| 101 | ;; XXX: 'use-modules' should be at the top level. | ||
| 102 | (use-modules (rnrs bytevectors) ;bytevector? | ||
| 103 | ((gnu build file-systems) | ||
| 104 | #:select (find-partition-by-luks-uuid))) | ||
| 105 | |||
| 108 | (zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup") | 106 | (zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup") |
| 109 | "open" "--type" "luks" | 107 | "open" "--type" "luks" |
| 110 | 108 | ||
