I've add "/var/tmp" into the chroot directories inside nix/libstore/build.cc 
with the attached patch (based on v0.14.0 tag) and the installation of gettext 
and the other dependencies not yet installed seem to finished correctly.


Is there someone who could validate than this patch is correct and is the 
correct way to solve this problem before i try to submit my the patch mailing 
list ? :)


Thanks,


Best regards,
From d879d9fae405131a605860260f034d0d4dcc86e8 Mon Sep 17 00:00:00 2001
From: RockAndSka <yoann_mac_don...@hotmail.com>
Date: Sun, 11 Mar 2018 20:48:34 +0100
Subject: [PATCH] Add writable /var/tmp to chroot

---
 nix/libstore/build.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index d68e8b2..ad08b3a 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -1849,6 +1849,11 @@ void DerivationGoal::startBuilder()
         createDirs(chrootTmpDir);
         chmod_(chrootTmpDir, 01777);
 
+        /* Create a writable /var/tmp in the chroot. */
+        Path chrootVarTmpDir = chrootRootDir + "/var/tmp";
+        createDirs(chrootVarTmpDir);
+        chmod_(chrootVarTmpDir, 01777);
+
         /* Create a /etc/passwd with entries for the build user and the
            nobody account.  The latter is kind of a hack to support
            Samba-in-QEMU. */
-- 
2.7.4

Reply via email to