all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: bug#30572 <30572@debbugs.gnu.org>
Cc: Chris Marusich <cmmarusich@gmail.com>
Subject: [bug#30572] [PATCH 4/7] gnu: When building in a VM, share a temporary directory.
Date: Thu, 15 Mar 2018 05:09:12 +0100	[thread overview]
Message-ID: <20180315040915.5556-5-cmmarusich@gmail.com> (raw)
In-Reply-To: <20180315040915.5556-1-cmmarusich@gmail.com>

* 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 6380df0a1..806744a64 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -128,6 +128,7 @@ the #:references-graphs parameter of 'derivation'."
       (error "qemu-img failed")))
 
   (mkdir "xchg")
+  (mkdir "tmp")
 
   (match references-graphs
     ((graph-files ...)
@@ -149,6 +150,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" (string-append "console=ttyS0 --load="
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index ae8780d2e..d239fa56a 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
 ;;;
 ;;; 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
-- 
2.15.1

  parent reply	other threads:[~2018-03-15  4:11 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 10:29 [bug#30572] [PATCH 0/7] Add "guix system docker-image" command Chris Marusich
2018-03-15  4:09 ` [bug#30572] [PATCH 0/7] Add "guix system docker-image" command (v2) Chris Marusich
2018-03-15  4:09   ` [bug#30572] [PATCH 1/7] gnu: bootstrap: Add trivial packages for bash, mkdir, tar, and xz Chris Marusich
2018-03-16 22:16     ` Danny Milosavljevic
2018-03-20  3:13       ` Chris Marusich
2018-03-20 10:09         ` Danny Milosavljevic
2018-03-21  4:19           ` Chris Marusich
2018-03-21  9:17             ` Danny Milosavljevic
2018-03-17 21:58     ` Ludovic Courtès
2018-03-21  4:22       ` Chris Marusich
2018-03-21 20:54         ` Ludovic Courtès
2018-03-22  4:37           ` Chris Marusich
2018-03-15  4:09   ` [bug#30572] [PATCH 2/7] tests: Add tests for "guix pack" Chris Marusich
2018-03-16 21:07     ` Danny Milosavljevic
2018-03-17 18:23       ` Ludovic Courtès
2018-03-21  4:00         ` Chris Marusich
2018-03-21  4:28           ` Chris Marusich
2018-03-22  4:41             ` Chris Marusich
2018-03-22  9:22               ` Ludovic Courtès
2018-03-24  2:05                 ` bug#30572: " Chris Marusich
2018-03-24 17:15                   ` [bug#30572] " Ludovic Courtès
2018-03-15  4:09   ` [bug#30572] [PATCH 3/7] vm: Allow control of deduplication in root-partition-initializer Chris Marusich
2018-03-16 20:47     ` Danny Milosavljevic
2018-03-17 18:21     ` Ludovic Courtès
2018-03-15  4:09   ` Chris Marusich [this message]
2018-03-16 22:00     ` [bug#30572] [PATCH 4/7] gnu: When building in a VM, share a temporary directory Danny Milosavljevic
2018-03-20  3:20       ` Chris Marusich
2018-03-15  4:09   ` [bug#30572] [PATCH 5/7] guix: Rewrite build-docker-image to allow more paths Chris Marusich
2018-03-16 22:29     ` Danny Milosavljevic
2018-03-20  3:26       ` Chris Marusich
2018-03-15  4:09   ` [bug#30572] [PATCH 6/7] system: Add "guix system docker-image" command Chris Marusich
2018-03-16 22:11     ` Danny Milosavljevic
2018-03-17 21:56     ` Ludovic Courtès
2018-03-21  3:58       ` Chris Marusich
2018-03-21  4:25         ` Chris Marusich
2018-03-21 20:50         ` Ludovic Courtès
2018-03-15  4:09   ` [bug#30572] [PATCH 7/7] tests: Add tests for "guix system disk-image" et al Chris Marusich
2018-03-16 22:04     ` Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180315040915.5556-5-cmmarusich@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=30572@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.