From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sLZDFOgSOGAcagAA0tVLHw (envelope-from ) for ; Thu, 25 Feb 2021 21:13:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4HUmEOgSOGAcYwAA1q6Kng (envelope-from ) for ; Thu, 25 Feb 2021 21:13:12 +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 7C55F214D4 for ; Thu, 25 Feb 2021 22:13:11 +0100 (CET) Received: from localhost ([::1]:47812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFNwc-0003To-3Y for larch@yhetil.org; Thu, 25 Feb 2021 16:13:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFNwU-0003QP-B3 for bug-guix@gnu.org; Thu, 25 Feb 2021 16:13:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56164) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFNwU-0008Nu-2c for bug-guix@gnu.org; Thu, 25 Feb 2021 16:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lFNwT-0006xT-Uv for bug-guix@gnu.org; Thu, 25 Feb 2021 16:13:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#46782: guix environment --expose options cannot be layered onto $PWD Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 25 Feb 2021 21:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46782 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 46782@debbugs.gnu.org X-Debbugs-Original-To: bug-guix Received: via spool by submit@debbugs.gnu.org id=B.161428756126714 (code B ref -1); Thu, 25 Feb 2021 21:13:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Feb 2021 21:12:41 +0000 Received: from localhost ([127.0.0.1]:39477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFNw9-0006wo-CO for submit@debbugs.gnu.org; Thu, 25 Feb 2021 16:12:41 -0500 Received: from lists.gnu.org ([209.51.188.17]:48966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFNw6-0006wg-Ez for submit@debbugs.gnu.org; Thu, 25 Feb 2021 16:12:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFNw6-0003G7-9X for bug-guix@gnu.org; Thu, 25 Feb 2021 16:12:38 -0500 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]:45105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFNw4-0008DQ-IW for bug-guix@gnu.org; Thu, 25 Feb 2021 16:12:38 -0500 Received: by mail-qv1-xf33.google.com with SMTP id dg2so3527669qvb.12 for ; Thu, 25 Feb 2021 13:12:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=eQn94TngJpCp+5pmWa7S8S4kSDQFzrJW/7RI2XNpKG8=; b=nUDceCNVJqne7YVCfTcWsObfL9MVXuA+yD1bwwK7kU2XtBo6+62loa8HCLxP768vDk xOUs7FbKqCp0aVm8+bGKnG5/QzmENasyZrVfP6SAJPr3BT+pBCMv/Kl/Kx9tfBXppDqA Xmd5nlsj/90/LTfHd/Vs6iziw3lusMEgKtth4X1YMSXHWaGZTPHPKixMDj+scLBOZp2i avij3wV5PDPYY4J3+fv6ZIlouO4jEXGi7PwiVn+yQVt0XYp9FUeLm9IXcE9BKPpW14IT 9NTfvd/QC+ZLEvSOafNL5feR66BCmlfOgyvg8Rz+ty/c7zxyxlmVLBD1dFn7vK6v51pm w7Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=eQn94TngJpCp+5pmWa7S8S4kSDQFzrJW/7RI2XNpKG8=; b=aGfWvNG2sucCl3XdRjKyjEAiS06myjhhJYQLP905fUfHt77TOx+ymowB+ujKdA1THB YHjyFR+/nJv4M0X/6eiHbDl8pdXAtIdJdAxUWpmKqYJSqWUcMrbDtk3e0o1lqPOpRjfy luxUFoJbg9q19uZMmDHlPmX7goQ8lFve05jzJ7pRXVTyh2M4CrvMxX5ST+vuSVT3sMnJ +Rwpo24e4bVZ4yym1cz5VsehIoVVOp2MZ7ib4W2j37lxkKAR+nIT5BeSRdzM52r6MYn+ TWUcLoWH6/zop+819Y1VwhepYCLh1JgeoVq+uocPjT4wpLt+kvoDtmC5AdntMsBHA8JF Guqg== X-Gm-Message-State: AOAM533cEO60smfI19Sy8lVuJETHSJQfLXRBA+mqqlhgxSCXim2v1svO 88vXBl/8cyecOwQEm1ab4m5QhoVs+Q/k3w== X-Google-Smtp-Source: ABdhPJwiVFuySm1GyRU746WpZVwo4mV4gHZGb2YmqR6X2HSZgnEGzUVKnojOor883apB64w3lNO77A== X-Received: by 2002:a05:6214:1110:: with SMTP id e16mr4765223qvs.62.1614287555448; Thu, 25 Feb 2021 13:12:35 -0800 (PST) Received: from hurd (dsl-10-130-102.b2b2c.ca. [72.10.130.102]) by smtp.gmail.com with ESMTPSA id v187sm4966847qkd.50.2021.02.25.13.12.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 13:12:35 -0800 (PST) From: Maxim Cournoyer Date: Thu, 25 Feb 2021 16:12:34 -0500 Message-ID: <87blc797i5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::f33; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf33.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.27 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=nUDceCNV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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: 7C55F214D4 X-Spam-Score: -0.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: DJc5MvVJPTby Hello Guix! I noticed, while trying to expose the SSL environment variable inside a container and doing things such as: --8<---------------cut here---------------start------------->8--- guix environment --container --network -E SSL --expose=$SSL_CERT_FILE \ --expose=$SSL_CERT_DIR --ad-hoc [...] --8<---------------cut here---------------end--------------->8--- that it wasn't possible to expose things onto the implicitly mounted current working directory. No error message would be shown, yet the --expose arguments wouldn't go through unless using --no-cwd. Here's a minimal example: --8<---------------cut here---------------start------------->8--- $ guix environment -C --expose=/tmp=$PWD/tmp \ --ad-hoc bash coreutils -- bash -c 'stat $PWD/tmp' stat: cannot statx '/var/lib/jenkins/tmp': No such file or directory --8<---------------cut here---------------end--------------->8--- but, --8<---------------cut here---------------start------------->8--- $ guix environment --no-cwd -C --expose=/tmp=$PWD/tmp \ --ad-hoc bash coreutils -- bash -c 'stat $PWD/tmp' File: /var/lib/jenkins/tmp Size: 73728 Blocks: 152 IO Block: 4096 directory Device: fd00h/64768d Inode: 1966081 Links: 397 Access: (1777/drwxrwxrwt) Uid: (65534/ UNKNOWN) Gid: (65534/overflow) Access: 2021-02-25 20:40:08.534757708 +0000 Modify: 2021-02-25 21:10:49.205636074 +0000 Change: 2021-02-25 21:10:49.205636074 +0000 Birth: 2016-12-07 20:43:16.029221570 +0000 --8<---------------cut here---------------end--------------->8--- succeeds. I can't think of a technical reason why layering bind mounts wouldn't work; in fact it already appear to work for multiple --expose options touching the same hierarchy of files. If there's a technical reason this cannot/shouldn't happen, we should warn the user about it. Thanks, Maxim