guix-commits
[Top][All Lists]
Advanced

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

03/06: gnu: When building in a VM, share a temporary directory.


From: Chris Marusich
Subject: 03/06: gnu: When building in a VM, share a temporary directory.
Date: Fri, 23 Mar 2018 22:04:28 -0400 (EDT)

marusich pushed a commit to branch master
in repository guix.

commit 8c9bf2946a1cb58c5b7b941db3a37830ece80708
Author: Chris Marusich <address@hidden>
Date:   Thu Mar 15 05:09:12 2018 +0100

    gnu: When building in a VM, share a temporary directory.
    
    * gnu/build/vm.scm (load-in-linux-vm): Make a shared temporary directory
      available in the VM.
    * gnu/system/vm.scm (%linux-vm-file-systems): Add a corresponding entry.
---
 gnu/build/vm.scm  |  7 +++++++
 gnu/system/vm.scm | 12 ++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 4268ad1..527b4c4 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -126,6 +126,7 @@ the #:references-graphs parameter of 'derivation'."
              (number->string disk-image-size)))
 
   (mkdir "xchg")
+  (mkdir "tmp")
 
   (match references-graphs
     ((graph-files ...)
@@ -146,6 +147,12 @@ the #:references-graphs parameter of 'derivation'."
          "-virtfs"
          (string-append "local,id=xchg_dev,path=xchg"
                         ",security_model=none,mount_tag=xchg")
+         "-virtfs"
+         ;; Some programs require more space in /tmp than is normally
+         ;; available in the guest.  Accommodate such programs by sharing a
+         ;; temporary directory.
+         (string-append "local,id=tmp_dev,path=tmp"
+                        ",security_model=none,mount_tag=tmp")
          "-kernel" linux
          "-initrd" initrd
          (append
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 594ba66..9d9eafc 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016, 2017 Leo Famulari <address@hidden>
 ;;; Copyright © 2017 Mathieu Othacehe <address@hidden>
 ;;; Copyright © 2017 Marius Bakke <address@hidden>
+;;; Copyright © 2018 Chris Marusich <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -87,8 +88,8 @@
 ;;; Code:
 
 (define %linux-vm-file-systems
-  ;; File systems mounted for 'derivation-in-linux-vm'.  The store and /xchg
-  ;; directory are shared with the host over 9p.
+  ;; File systems mounted for 'derivation-in-linux-vm'.  These are shared with
+  ;; the host over 9p.
   (list (file-system
           (mount-point (%store-prefix))
           (device "store")
@@ -102,6 +103,13 @@
           (type "9p")
           (needed-for-boot? #t)
           (options "trans=virtio")
+          (check? #f))
+        (file-system
+          (mount-point "/tmp")
+          (device "tmp")
+          (type "9p")
+          (needed-for-boot? #t)
+          (options "trans=virtio")
           (check? #f))))
 
 (define* (expression->derivation-in-linux-vm name exp



reply via email to

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