Hallo,
i replaced the code of gnu/system/install.scm(make-cow-store target) [1]
with the code below. Now when running this code (which is triggered by
"herd start cow-store /mnt" in the installation-os)|I get this error:
|
herd: exception caught while executing 'start' on service 'cow-store':
ERROR: Unbound variable: gexp
What is wrong with this code? (Parentheses are matching, of course :-)
[1]
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/install.scm#n70
(define (make-cow-store target)
"Return a gexp that makes the store copy-on-write, using TARGET as the
backing store. This is useful when TARGET is on a hard disk, whereas the
current store is on a RAM disk."
(define (set-store-permissions directory)
;; Set the right perms on DIRECTORY to use it as the store.
#~(begin
(chown #$directory 0 30000) ;use the fixed
'guixbuild' GID
(chmod #$directory #o1775)))
#~(begin
;; Bind-mount TARGET's /tmp in case we need space to build things.
(let ((tmpdir (string-append #$target "/tmp")))
(mkdir-p tmpdir)
(mount tmpdir "/tmp" "none" MS_BIND))
(let* ((rw-dir (string-append target #$%backing-directory))
;; FIXME: calculate work-dir from backing-directory:
;; normpath(backing-directory + "../.overlayfs-workdir")
(work-dir (string-append target "/tmp/.overlayfs-workdir")))
(mkdir-p rw-dir)
(mkdir-p work-dir)
(mkdir-p "/.rw-store")
#$(set-store-permissions #~rw-dir)
#$(set-store-permissions "/.rw-store")
;; Mount the overlay, then atomically make it the store.
(mount "none" "/.rw-store" "overlay"
(string-append "lowerdir=" #$(%store-prefix)
"upperdir=" #~rw-dir ","
"workdir=" #~work-dir))
(mount "/.rw-store" #$(%store-prefix) "" MS_MOVE)
(rmdir "/.rw-store"))))