install: 'cow-store' now bind-mounts the target's /tmp.
authorLudovic Courtès <ludo@gnu.org>
Tue, 31 May 2016 20:51:07 +0000 (22:51 +0200)
committerLudovic Courtès <ludo@gnu.org>
Tue, 31 May 2016 21:38:51 +0000 (23:38 +0200)
Reported by Matthew Jordan <matthewjordandevops@yandex.com>
at <https://lists.gnu.org/archive/html/guix-devel/2016-05/msg00967.html>.

* gnu/system/install.scm (make-cow-store): Bind-mount TARGET's /tmp
on /tmp.

gnu/system/install.scm

index 07ad3cb..a72613e 100644 (file)
@@ -145,6 +145,11 @@ current store is on a RAM disk."
         (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))
+
       (unless (file-exists? "/.ro-store")
         (mkdir "/.ro-store")
         (mount #$(%store-prefix) "/.ro-store" "none"