me
/
guix
Archived
1
0
Fork 0

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.
master
Ludovic Courtès 2016-08-02 12:25:03 +02:00
parent d26e2b9f30
commit dfe06f6e7f
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 6 additions and 8 deletions

View File

@ -81,14 +81,7 @@
(documentation "Map a device node using Linux's device mapper.")
(start #~(lambda () #$(open source target)))
(stop #~(lambda _ (not #$(close source target))))
(respawn? #f)
;; Add the modules needed by LUKS-DEVICE-MAPPING.
;; FIXME: This info should be propagated via gexps.
(modules `((rnrs bytevectors) ;bytevector?
((gnu build file-systems)
#:select (find-partition-by-luks-uuid))
,@%default-modules)))))))
(respawn? #f))))))
(define (device-mapping-service mapped-device)
"Return a service that sets up @var{mapped-device}."
@ -105,6 +98,11 @@
(with-imported-modules '((gnu build file-systems)
(guix build bournish))
#~(let ((source #$source))
;; XXX: 'use-modules' should be at the top level.
(use-modules (rnrs bytevectors) ;bytevector?
((gnu build file-systems)
#:select (find-partition-by-luks-uuid)))
(zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup")
"open" "--type" "luks"