From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mPV2N1xJrmLI3QAAbAwnHQ (envelope-from ) for ; Sat, 18 Jun 2022 23:53:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 9CmMN1xJrmJgdQAAauVa8A (envelope-from ) for ; Sat, 18 Jun 2022 23:53:32 +0200 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 C5A5A12805 for ; Sat, 18 Jun 2022 23:53:31 +0200 (CEST) Received: from localhost ([::1]:41692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2gNm-00084B-8x for larch@yhetil.org; Sat, 18 Jun 2022 17:53:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2gEc-0006xH-8C for bug-guix@gnu.org; Sat, 18 Jun 2022 17:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2gEc-0000GA-0R for bug-guix@gnu.org; Sat, 18 Jun 2022 17:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2gEb-0004fS-R9 for bug-guix@gnu.org; Sat, 18 Jun 2022 17:44:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56076: guix shell -P behavior is surprising with persistent home Resent-From: Ethan Blanton Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 18 Jun 2022 21:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56076 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 56076@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165558862817905 (code B ref -1); Sat, 18 Jun 2022 21:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jun 2022 21:43:48 +0000 Received: from localhost ([127.0.0.1]:50303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2gEO-0004ej-4R for submit@debbugs.gnu.org; Sat, 18 Jun 2022 17:43:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:47926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2gCU-0004au-KH for submit@debbugs.gnu.org; Sat, 18 Jun 2022 17:41:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2gCU-0006Tk-8P for bug-guix@gnu.org; Sat, 18 Jun 2022 17:41:50 -0400 Received: from cathode.kb8ojh.net ([162.243.72.198]:58032) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2gCS-0007gA-HO for bug-guix@gnu.org; Sat, 18 Jun 2022 17:41:49 -0400 Received: from anode.kb8ojh.net (cpe-74-77-94-120.buffalo.res.rr.com [74.77.94.120]) by cathode.kb8ojh.net (Postfix) with ESMTPSA id 113024046B for ; Sat, 18 Jun 2022 21:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kb8ojh.net; s=cathode; t=1655588507; bh=r8XyKdGFfkV3HUdLP6WjR2FtJeD22FcyA3TOt44hM2o=; h=Date:From:To:Subject:From; b=NBV02ZXM8/VLIh8V90bUDE7u0CvG4Z9stu1e5VlLuj70vHDeyn+1b6zE7YB1rO5jf qWhLaqf4ybQlmsNTj99AUUD8RB7DbMwa2Ncyalr87FL4aFVaQVhfgd35NVS0SfCOhF 816MzbL4rLCFUtAFkEAbX+3AuNv7rp9wm7Pl0Uwk= Received: by anode.kb8ojh.net (Postfix, from userid 1000) id 918C1418F4; Sat, 18 Jun 2022 17:41:46 -0400 (EDT) Date: Sat, 18 Jun 2022 17:41:46 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GnuPG-Fingerprint: 2A9A 7752 8B91 6586 6289 FD3D 6CA9 2AC6 A1A8 AD0E Received-SPF: pass client-ip=162.243.72.198; envelope-from=elb@kb8ojh.net; helo=cathode.kb8ojh.net 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 18 Jun 2022 17:43:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sat, 18 Jun 2022 17:53:03 -0400 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" Reply-to: Ethan Blanton From: Ethan Blanton via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655589212; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=BVfJBAt4+yMRnGdgzdqPhhs1vXGMpuu3NSIWTiuRrsk=; b=RBrP7E/FMSWcwwiJVgpV8Cy3ibhH5cJLrZ+4MRac0VuJuHDeplrJIkwIiLq9Rn5WR9+nO3 DivOy2a2HwXTEfEid44w5GjMPaWjE2eENnWJ65odSjDT42QIr+k7DYgQY53pHmYrVHQ0Ie juBjjhoViTk4rVB/P6rcaJHtTZn+rOtpWJdZWhtXZfAk0AFM6bdSMGwUsXueesiG8MTjaT gj4MmhdA3AUTiy+YdUczYzJE7VJHT5XJufrXbSX963iNvv0O0Yqirz/k78+Etyd8WjMzCd CzLSf/bMVXMxI4ZwTCaodBGdyh/uuDY2aQYKv6yf/ctfq5WMMIP3CnsB39ipMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655589212; a=rsa-sha256; cv=none; b=srCbJNWJFiTse76UrGwuKxudfS1EQVMGJXSPzenio8zNvbwLlZiZ5VsnuUa8NT3NBiSG6T hmTp8ePdBUHndo4ITfxCjbbjUetmwJeKq/MgxrwDySYb/UoCAl3IA17yViA+TRoo1Dq7ep eDuyp0myv2kt1xBQgWzb35FRlqiAbyYBqu38ja1IlybAd2FwRt6ttm6N/jtZShBiBEJlwK TCH/qCzXiILqg+wf7Cw5Nb4x5DcBe6T15/i8jg6ZrmC5RPhaoBO7U/cd/l17HEvUslk6PA TBwZll+ix9buHC2BTEPJGiZX90ns1Gk77cuVaQ3fwo7LPj3hkU8EynESmlJBdg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kb8ojh.net header.s=cathode header.b=NBV02ZXM; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -3.69 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=kb8ojh.net header.s=cathode header.b=NBV02ZXM; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: C5A5A12805 X-Spam-Score: -3.69 X-Migadu-Scanner: scn1.migadu.com X-TUID: rLhLnJkRkcrQ I am using guix shell to create an isolated container, but using a persistent home directory to preserve configuration and state for the program in the container. Specifically, I am using (lightly simplified; note that the user is elb and the manifest contains ONLY syncthing): CONTAINER_HOME=/path/to/persistent/home MANIFEST=/path/to/manifest.scm guix shell --container --network --no-cwd -P \ --share=$CONTAINER_HOME=/home/elb -- \ /bin/sh -c 'SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs" syncthing' Because syncthing requires a certificate store, the easiest way to configure that seemed to be through the profile /etc dir, which meant using -P. The above command works, and works correctly, but only the first time the profile is started. On subsequent starts, guix complains that: guix shell: error: cannot link profile: '/home/elb/.guix-profile' already exists within container This is easily worked around by removing .guix-profile from the --share-bound home directory before invoking guix shell. It is not clear to me that this is a bug, but it was surprising. It was also surprising that there was not an obvious way to simply declare a persistent home directory for a container, although now that I understand the `guix shell` command better, I find this less surprising than I did when I was first exploring. Ethan