From: Leo Famulari <leo@famulari.name>
To: 25242@debbugs.gnu.org
Subject: bug#25242: Cannot build source derivations with a custom TMPDIR
Date: Wed, 21 Dec 2016 03:54:21 -0500 [thread overview]
Message-ID: <20161221085421.GA32042@jasmine> (raw)
In-Reply-To: <20161221082240.GA30326@jasmine>
[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]
On Wed, Dec 21, 2016 at 03:22:40AM -0500, Leo Famulari wrote:
> I ran the guix-daemon with strace, and I see these relevant lines:
>
> 15337 [pid 30675] mkdir("/home/leo/tmp/guix-build/guix-build-nmap-7.40.tar.bz2.drv-0", 0700) = 0
> 15338 [pid 30675] getegid() = 0
> 15339 [pid 30675] chown("/home/leo/tmp/guix-build/guix-build-nmap-7.40.tar.bz2.drv-0", -1, 0) = 0
I believe this corresponds to the use of createTempDir() at
nix/libstore/build.cc:1718. The path of the new directory is saved in
the tmpDir variable.
> 15438 [pid 30693] chdir("/tmp/guix-build-nmap-7.40.tar.bz2.drv-0") = -1 ENOENT (No such file or directory)
And then later, at nix/libstore/build.cc:2204, we do this:
2204 if (chdir(tmpDirInSandbox.c_str()) == -1)
2205 throw SysError(format("changing into `%1%'") % tmpDir);
It tries to change to the wrong directory (the new "out of band"
downloader doesn't use a chroot, IIUC), and then prints a misleading
error message. This explains the discrepancy between what we see in
strace and on stderr.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2016-12-21 8:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 8:22 bug#25242: Cannot build source derivations with a custom TMPDIR Leo Famulari
2016-12-21 8:54 ` Leo Famulari [this message]
2016-12-21 9:20 ` Ludovic Courtès
2016-12-21 16:41 ` Leo Famulari
2016-12-21 21:29 ` Ludovic Courtès
2016-12-23 0:11 ` Leo Famulari
2016-12-29 17:23 ` Ludovic Courtès
2016-12-29 17:28 ` Leo Famulari
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161221085421.GA32042@jasmine \
--to=leo@famulari.name \
--cc=25242@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).