From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: bug#25242: Cannot build source derivations with a custom TMPDIR Date: Wed, 21 Dec 2016 03:54:21 -0500 Message-ID: <20161221085421.GA32042@jasmine> References: <20161221082240.GA30326@jasmine> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJcfx-0006Pn-CC for bug-guix@gnu.org; Wed, 21 Dec 2016 03:55:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJcfu-0004yE-Ah for bug-guix@gnu.org; Wed, 21 Dec 2016 03:55:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:34262) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cJcfu-0004y9-79 for bug-guix@gnu.org; Wed, 21 Dec 2016 03:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cJcfu-000282-0D for bug-guix@gnu.org; Wed, 21 Dec 2016 03:55:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJcfM-0006OL-RE for bug-guix@gnu.org; Wed, 21 Dec 2016 03:54:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJcfJ-0004m0-QA for bug-guix@gnu.org; Wed, 21 Dec 2016 03:54:28 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:49845) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cJcfJ-0004lY-75 for bug-guix@gnu.org; Wed, 21 Dec 2016 03:54:25 -0500 Received: from localhost (c-73-188-17-148.hsd1.pa.comcast.net [73.188.17.148]) by mail.messagingengine.com (Postfix) with ESMTPA id 190917EA0A for ; Wed, 21 Dec 2016 03:54:22 -0500 (EST) Content-Disposition: inline In-Reply-To: <20161221082240.GA30326@jasmine> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 25242@debbugs.gnu.org --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: >=20 > 15337 [pid 30675] mkdir("/home/leo/tmp/guix-build/guix-build-nmap-7.40.ta= r.bz2.drv-0", 0700) =3D 0 > 15338 [pid 30675] getegid() =3D 0 > 15339 [pid 30675] chown("/home/leo/tmp/guix-build/guix-build-nmap-7.40.ta= r.bz2.drv-0", -1, 0) =3D 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") =3D -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()) =3D=3D -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. --9amGYk9869ThD9tj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlhaQzkACgkQJkb6MLrK fwgBhQ//bpuTzwBXINTSHvE3lgZxh+PblNqpImnVYru6XyOe1+e7g8Mh6EHx9WbG ml+I4qkeweROsftz0bknVjVKTXoalHNWhy93zdAbAFNVPMqnm9aQSGwgs+4TX9XW qvJ1hhWzQPWJVa9dx/hJY12PvYfh6+crolDPYgGIj9yW+cP0hntyMRxrulkW4QPZ /lea8xbDhGyzvhRSAKol24EKbNRO9Xhfvml4tkIc1BvkBGQaApEeh3vDyJl+dL3H eZH3yZspV5//xO5173R52EJAJQBLS1Nv6ghb8WDsX7bmx+itWXSTtpIH/KqCppiI JNEps0YUpEZPSXBdGonWxsm51bjntATZ5ZNXCmghMGMei/Jnzd0TkzgCsa3bipk4 svRWl5N4zrr5rutF6JbzNcV9ALR3AjorpaxlIbtoYuUiaJ1EcTyt4AxdV0Qe+PzP N0uIdj8Qdi2OilNbs9cQV7lr3/5JqKeKdtJsGsnvYT+5X7l9JsZWlZWJZ20I4g5Z gZ3nBZvE52kZJKRUPz0aBrEQikTATzxLM3Z20MiyY+kLCLjDlRg6WhebuUbAsFON 62FJFkVQ/VjdhFZcuKFG+GJKNTY7gKxxyoNe0rYR87b9Uw2kXGhZPi3pM/1y11iK TXeUXnsBFvGoGPIYxVWa0FGtahDXUqd0pW438Murx/xdoKAL0MM= =WWrv -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--