From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6PGhJJruNmHdYAAAgWs5BA (envelope-from ) for ; Tue, 07 Sep 2021 06:46:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cCx1IJruNmG0TAAA1q6Kng (envelope-from ) for ; Tue, 07 Sep 2021 04:46:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9D33224837 for ; Tue, 7 Sep 2021 06:46:17 +0200 (CEST) Received: from localhost ([::1]:41332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNSzw-0008AM-O2 for larch@yhetil.org; Tue, 07 Sep 2021 00:46:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNSzh-000886-Ur for bug-guix@gnu.org; Tue, 07 Sep 2021 00:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNSzh-0006rc-ND for bug-guix@gnu.org; Tue, 07 Sep 2021 00:46:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNSzh-0001mu-KM for bug-guix@gnu.org; Tue, 07 Sep 2021 00:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#50441: Wrong build directory number shown in environment-variables file Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 07 Sep 2021 04:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50441 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Christine Lemmer-Webber Received: via spool by 50441-submit@debbugs.gnu.org id=B50441.16309899066794 (code B ref 50441); Tue, 07 Sep 2021 04:46:01 +0000 Received: (at 50441) by debbugs.gnu.org; 7 Sep 2021 04:45:06 +0000 Received: from localhost ([127.0.0.1]:55066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNSyo-0001lU-76 for submit@debbugs.gnu.org; Tue, 07 Sep 2021 00:45:06 -0400 Received: from out2.migadu.com ([188.165.223.204]:40624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNSyl-0001lJ-Vn for 50441@debbugs.gnu.org; Tue, 07 Sep 2021 00:45:05 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1630989902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=P79gVnaRVT7Bjt8UwiMyPNMeoFLLBsGxpV+ccPHlsBg=; b=KosAfTfLLML8ylqmZnrva0muKJc5QqdtHvtzhyEN5OqpIU4YnKtWUlp0nwRV2OFevATiFd 29/KOyxPl425B+ky9RgLvMZtSp2GeUAkHbVZj3oZHwmhVqaLsVJYUuJ7nWMMM+qChjkN0p 5pj5YgDIyhEP0jafDmG8L+3EJCcQQU8= From: Sarah Morgensen References: <87a6kpcs85.fsf@dustycloud.org> Date: Mon, 06 Sep 2021 21:44:59 -0700 In-Reply-To: <87a6kpcs85.fsf@dustycloud.org> (Christine Lemmer-Webber's message of "Mon, 06 Sep 2021 17:22:55 -0400 (7 hours, 5 minutes, 7 seconds ago)") Message-ID: <86eea1hu44.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: iskarian@mgsn.dev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 50441@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630989977; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=P79gVnaRVT7Bjt8UwiMyPNMeoFLLBsGxpV+ccPHlsBg=; b=SsUFdyjnYMA+UgCBzTGxcTYI2Bz6r8+s3xCrv9TXuZV+rnQtyuGvsJDqw2R6g4IGgN0b01 s634S6PdaB7oMlT9yrw7qRg82+GX8Heh3asFjduVx4sxUbRTQaVhbtBjBrsaoQgzYXtkr+ SlUKKy404E+2VafMyYIBUfXSWU7bKvsWlR7qZ5XDmmROv99CPDBy9I8jeAaS9wrAy48Ldn vyEGOq2HKWGrU1SxFCOA2/G4LtIt21aaZbVhiwe2pNB+cxTIHLQ4mXiP/T2NucnGIdJMHK syEO1U8rkLhX3dUvkEt79uiCSWvSOjiV9JdggzwoOLcVsMVLwLoP4qiKqFjn4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630989977; a=rsa-sha256; cv=none; b=pMwQVIp96OAGSBnI4rmVx/NP29I41Jp6OvTxuL2h9PJqbYMccJ0QIXrpbOjPaTjy2sQk6N G6natbBp9E7mhfdXGt6V2u3KHU9ni2QZh/K+RX9U0m6PsEK73hzSfjooNpfSMb0+/QbnGV 4S+3IJNQBrDkOgPABYEyU+UEaEQXMLPq0tL4H+XQ1zvjHJ/9HoPo+cXjg/s+tqb3K17mO3 zDsWJsrSlQSZSh1GxdFomrR+abnxWb7zQXv96TnuLOA8G49Neto8gJTT2Qcpl+C8ZfQ4fG j6OlJaa4qBRUrjAOwa4KDGU0DK2s2bCbe21IDJ/Zs6m2e87BNjLIPKVZQrKkeA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=KosAfTfL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: 0.19 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=KosAfTfL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 9D33224837 X-Spam-Score: 0.19 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7tPF7zmPyT8L Hello Christine, Christine Lemmer-Webber writes: > I was doing guix build with "--keep-missing" and looking around in a few > of the output directories. I was peeking in: > > /tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-4 > > But wait... the "environment-variables" file says: > > #+BEGIN_SRC sh > export TEMP=\ > "/tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-0" > export TEMPDIR=\ > "/tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-0" > export TMP=\ > "/tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-0" > export TMPDIR=\ > "/tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-0" > #+END_SRC > > Now wait a minute. Look at that last number. What the hell is going on > here? Is this a bug in Guix? Why is it pointing at -0 in the -4 build > directory? > > Does this point at a more serious issue? What's going on? I've definitely noticed this before as well, and had to work around it (I needed to inspect temp caches). Thanks for actually sending a bug report :) I'm not at all familiar with the nix code, but it looks like this might be related: nix/libstore/build.cc:1654 --8<---------------cut here---------------start------------->8--- /* In a sandbox, for determinism, always use the same temporary directory. */ tmpDirInSandbox = useChroot ? canonPath("/tmp", true) + "/guix-build-" + drvName + "-0" : tmpDir; /* For convenience, set an environment pointing to the top build directory. */ env["NIX_BUILD_TOP"] = tmpDirInSandbox; /* Also set TMPDIR and variants to point to this directory. */ env["TMPDIR"] = env["TEMPDIR"] = env["TMP"] = env["TEMP"] = tmpDirInSandbox; /* Explicitly set PWD to prevent problems with chroot builds. In particular, dietlibc cannot figure out the cwd because the inode of the current directory doesn't appear in .. (because getdents returns the inode of the mount point). */ env["PWD"] = tmpDirInSandbox; --8<---------------cut here---------------end--------------->8--- I'm not entirely sure what's going on. I think we build in chroot by default, which would explain why the temp vars get set to "-0" even though everything else seems to work okay. -- Sarah