From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6O14JIuo4WN7YQEAbAwnHQ (envelope-from ) for ; Tue, 07 Feb 2023 02:25:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qLM+JIuo4WOSPwEAauVa8A (envelope-from ) for ; Tue, 07 Feb 2023 02:25:31 +0100 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 531B02E28 for ; Tue, 7 Feb 2023 02:25:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPCjI-0003pJ-Jo; Mon, 06 Feb 2023 20:25:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPCjH-0003p1-7d for bug-guix@gnu.org; Mon, 06 Feb 2023 20:25:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPCjG-0008QA-Kj for bug-guix@gnu.org; Mon, 06 Feb 2023 20:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPCjG-0003iL-4t for bug-guix@gnu.org; Mon, 06 Feb 2023 20:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#46782: guix environment --expose options cannot be layered onto $PWD Resent-From: bokr@bokr.com Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 07 Feb 2023 01:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46782 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: 46782@debbugs.gnu.org, bbb ee , Simon Tournier Received: via spool by 46782-submit@debbugs.gnu.org id=B46782.167573307214233 (code B ref 46782); Tue, 07 Feb 2023 01:25:02 +0000 Received: (at 46782) by debbugs.gnu.org; 7 Feb 2023 01:24:32 +0000 Received: from localhost ([127.0.0.1]:50488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPCil-0003hV-Ua for submit@debbugs.gnu.org; Mon, 06 Feb 2023 20:24:32 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:60174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPCig-0003hB-66 for 46782@debbugs.gnu.org; Mon, 06 Feb 2023 20:24:30 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 933D968BEA; Tue, 7 Feb 2023 01:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail; t=1675733059; bh=V0G8z4mJmimcCfnuk6WwTvEOIdeL8O4hiCCUGbSYN4w=; h=From:Date:To:Cc:Subject:References:In-Reply-To:From; b=MD5A7DJdX9nVopejs4e39N/aGx7kafhFjb7Qzd0F69mOI1DIn1Q55RaTLeoULw4oU mt5det+l/S9vzIrd1uBITaZNn3E+N7DwzioPkRQn6pCV5kV7AoeZYDwqS9oR+iObY2 AInRWp8RAa4BxrWKfOaKXL909DTpDO2UNBY4fUlma4EDmDe2oJtMHA/PN3KQrtt5dQ j5cOpAyj2PnwKY7hxy1Ejl6NGfhqjB5QWlvd7ipLt5mqMroDMvlUaVczqaorgcq0xF 4tfH1W+DpE2Pl6bv2uNDnb3Z2pPcus9DuyfpgSkIc9v2oj6YyhaKbzzcZmY05xde0l VL9GnnBPX6fyQ== X-Virus-Scanned: Debian amavisd-new at emo07-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo07-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id goV5tFQJWB1M; Tue, 7 Feb 2023 01:24:19 +0000 (UTC) Received: from localhost (m37-199-129-58.cust.tele2.se [37.199.129.58]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 95E3468BCA; Tue, 7 Feb 2023 01:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bokr.com; s=easymail; t=1675733059; bh=V0G8z4mJmimcCfnuk6WwTvEOIdeL8O4hiCCUGbSYN4w=; h=From:Date:To:Cc:Subject:References:In-Reply-To:From; b=MD5A7DJdX9nVopejs4e39N/aGx7kafhFjb7Qzd0F69mOI1DIn1Q55RaTLeoULw4oU mt5det+l/S9vzIrd1uBITaZNn3E+N7DwzioPkRQn6pCV5kV7AoeZYDwqS9oR+iObY2 AInRWp8RAa4BxrWKfOaKXL909DTpDO2UNBY4fUlma4EDmDe2oJtMHA/PN3KQrtt5dQ j5cOpAyj2PnwKY7hxy1Ejl6NGfhqjB5QWlvd7ipLt5mqMroDMvlUaVczqaorgcq0xF 4tfH1W+DpE2Pl6bv2uNDnb3Z2pPcus9DuyfpgSkIc9v2oj6YyhaKbzzcZmY05xde0l VL9GnnBPX6fyQ== From: bokr@bokr.com Date: Tue, 7 Feb 2023 02:24:04 +0100 Message-ID: <20230207012404.GA3706@LionPure> References: <87blc797i5.fsf@gmail.com> <877cx8x84p.fsf_-_@gmail.com> <87pmazopdx.fsf@gmail.com> <87r0v2lasz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87r0v2lasz.fsf@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=bokr.com header.s=easymail header.b=MD5A7DJd; dkim=fail ("headers rsa verify failed") header.d=bokr.com header.s=easymail header.b=MD5A7DJd; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675733131; a=rsa-sha256; cv=none; b=b08EpJ9uVC6XWr8iDWxkzC5qZwtXtcAMaIntOcph9mAnFQqmTUshlK5oUP4/Q4mcnCrvfo +69CM3CCcRmB7Yqvi1o9qEraGhIrKx54bExPbhr0iY2nrKMuGApy57EqqcWKh17uXG8lvy QBh+QVDEwqTmVG/UCJ1BShOI/2cFAsGrOz+bp8TdKKuRlwuG0wn+TtVOprmWSmlh1kkV21 CNoQWkSh5tGxvLmKea6fM1yYnQoJpc38Vu9vxSxWWnBSP2BuuJsQa5jObHWWA0ZQto3N9n u86SEN6H493DfEanH4JcIFB5GRVZiuGUsKZtQadEDQI3hP1JCI81qAoSb/kPMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675733131; 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=DkKT2a2XlHqORAqmFF/43R+6B8YGigHzOJpa+UCsuko=; b=GMrvME8S+aj/Oear0H0JjrcH7P99F/s4MobstEhMLrTYEpjQHID6R+TbEIcWa6ua3OdulI iCqHkNqQkeksdGiGXEUtTIDlG7uQj6wS5Oev0ITov2jGRbY0yuFEtaLv6bw+cjPTx6SKoU ATd45OPNYSURK42R/WxEhRHXuqFAEje8jVodtL/Zq80t796+YRecFo1mkKuOSKJzrJ7IlW 5xcAH/tUoCy6CydbIgGuOBkprnlQzSxcPBY8RJxnv9DjfYi9f++1PzG3zZ8mvoD83G3YwM l76ZZmjXbiEOkzN+kmCN/wx09h7OEsXixb4dpQANL61xHzXLt2pRZuuGnbEFBw== X-Migadu-Queue-Id: 531B02E28 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=bokr.com header.s=easymail header.b=MD5A7DJd; dkim=fail ("headers rsa verify failed") header.d=bokr.com header.s=easymail header.b=MD5A7DJd; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Spam-Score: -1.39 X-Spam-Score: -1.39 X-TUID: p3oV3jMcDvG3 Hi, On +2023-02-06 16:54:20 -0500, Maxim Cournoyer wrote: > Hi, > > Simon Tournier writes: > > > Hi Maxim, > > > > A naive question since it works when using the --no-cwd option. > > > > On ven., 27 janv. 2023 at 11:19, Maxim Cournoyer wrote: > > > >> --8<---------------cut here---------------start------------->8--- > >> guix environment -C --expose=/tmp=$PWD/tmp --ad-hoc bash coreutils \ > >> -- bash -c 'stat $PWD/tmp' > >> --8<---------------cut here---------------end--------------->8--- > > > > Is $PWD referring to the same thing? Because one is outside and the > > other is inside. > > Yes! See: > > --8<---------------cut here---------------start------------->8--- > maxim@hurd ~$ echo $PWD/tmp && guix environment \ > -C --expose=/tmp=$PWD/tmp --ad-hoc bash coreutils -- bash -c 'echo $PWD/tmp' > /home/maxim/tmp > /home/maxim/tmp > --8<---------------cut here---------------end--------------->8--- > > -- > Thanks, > Maxim > I imagine the created environment is COW[1] [1] Then your output above, --8<---------------cut here---------------start------------->8--- > /home/maxim/tmp > /home/maxim/tmp --8<---------------cut here---------------end--------------->8--- looks the same, but IIUC they have different '/' root dirs, the one in the container being like an initrd separate file system. Or is --expose meant to be a shared rw reference to the caller's memory (directory content or regular file etc) from the start? That would seem hard to keep safe, so I doubt that's the design. How do the two tmp's stat? (Before and after writing content like $PWD/tmp/foo ? And foo doesn't appear in the caller $PWD/tmp/* right? What is your use case goal for --expose=/tmp=$PWD/tmp ? SFTN if this is useless distraction. -- Regards, Bengt Richter