From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 OFC7NHAotmKIAQEAbAwnHQ (envelope-from ) for ; Fri, 24 Jun 2022 23:11:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UAuxNHAotmLjZQAA9RJhRA (envelope-from ) for ; Fri, 24 Jun 2022 23:11:12 +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 4470C37C49 for ; Fri, 24 Jun 2022 23:11:12 +0200 (CEST) Received: from localhost ([::1]:41140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4qa7-0004IE-3H for larch@yhetil.org; Fri, 24 Jun 2022 17:11:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4qZz-0004I5-D9 for bug-guix@gnu.org; Fri, 24 Jun 2022 17:11:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4qZx-0001k2-Sv for bug-guix@gnu.org; Fri, 24 Jun 2022 17:11:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4qZx-0000Em-K4 for bug-guix@gnu.org; Fri, 24 Jun 2022 17:11:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56076: guix shell -P behavior is surprising with persistent home Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 24 Jun 2022 21:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56076 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ethan Blanton Cc: 56076@debbugs.gnu.org Received: via spool by 56076-submit@debbugs.gnu.org id=B56076.1656105042883 (code B ref 56076); Fri, 24 Jun 2022 21:11:01 +0000 Received: (at 56076) by debbugs.gnu.org; 24 Jun 2022 21:10:42 +0000 Received: from localhost ([127.0.0.1]:43670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4qZU-0000Dw-Vp for submit@debbugs.gnu.org; Fri, 24 Jun 2022 17:10:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4qZR-0000Dj-Qi for 56076@debbugs.gnu.org; Fri, 24 Jun 2022 17:10:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4qZM-0001fG-9x; Fri, 24 Jun 2022 17:10:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=YSTIBsNyt0UbCSKZZ3/5Y/F2JjLDPfT4jIC/BbuSUL8=; b=qRCXFDoIQpOW4VAYd0+M MWlZMTSjGmY8ZLEvloWWK9pi0K1OnLvIJsibJXsTJIIV+UQg9MG3/DlZORXeNQdbCiU5cRA1ZPGe9 2FsD15i3+IEuyo/A9Rm8mSLl2XJsl8Wt/aQ0KEE5NSFuSLRJ/jGpMqlnpdY3OHsl/LG9xcbOXb0Dx tpNi5leKsmVMoeLS1WwTeiAT0b6crz+AjpwP/oQKEsPGu624jClXBcwRRHf+kxbXfKJlofQqmTsBH 3l5m1Q4FMry+dk3X8aGlMmmmel9GSJwKZLfWMMlBMzN7BYSxfsgWFYgT2lFVQvM99KdzznhJVNWIY R4P4GqNo2oq/sg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:53502 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4qZL-0008Ci-Cw; Fri, 24 Jun 2022 17:10:24 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Fri, 24 Jun 2022 23:10:21 +0200 In-Reply-To: (Ethan Blanton's message of "Sat, 18 Jun 2022 17:41:46 -0400") Message-ID: <87letlu5s2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-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=1656105072; 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: content-transfer-encoding:content-transfer-encoding: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=YSTIBsNyt0UbCSKZZ3/5Y/F2JjLDPfT4jIC/BbuSUL8=; b=e1YF5bT7cVv8KpPNNI92eB/7Us20oG+16Ey7pdVOWOFLr/uXQNMT+2sifcXWYwLiNH9yxN KWBSmeWKx/WSfwKfl7xptc9r+0+BTAFTFpSOhM6Z/BSWEwV/ZB7BJE5RMAteZK7k9OcbJH kqIHP3jYZ8JTmco4Ts27P50q5ewMXyVROkOwr76qG6kLixsNyj3kVxLoqk2SpEARSAngX5 TTCx2uVKv5Z8n4pJAdpe84Rh68rIwrDW7z6cHDZ4sIvqk9WffdSSYUMWp/IhcwvDKu+z0U TKN1e+H9KsWkdie4Tfuv5d7nFPnTVnH82bDronbrhqyMNp3zoPwFqAz8RKJrZg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656105072; a=rsa-sha256; cv=none; b=noLmKlsfKi+Z6hyOvfkaoajn2O0jakGPoRz0/MSx5kmviAItQYF5SMIdFW84T/xSr6d85d VdCPO1dkuGvZLSSeg9Yx83P6EZ1stX+2xkSXXAj9QsACP0Df94CA0DnWGBOW7gH1ZddRwt jVN5I386ppa37bLgBBz6Nck4lKjoGf+nTId61EyzD/mupG14lvT4fMkWXo9rRQW4B4U59L Ib1Q0Ua/ZIW6lN5fzUhCZGNWUdLWKkG+gNvUub03b6pDxx0ZwkYW07ltRGVZrdZlUupSB4 3Dw8JTtycZPr/VOG5qpv/v2iiQV3Sa6pb7J6ti/iK61E9tYbh0HEDW9KduS/pQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qRCXFDoI; 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: -4.48 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qRCXFDoI; 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: 4470C37C49 X-Spam-Score: -4.48 X-Migadu-Scanner: scn1.migadu.com X-TUID: DZbqsOd0xloz Hi Ethan, Ethan Blanton skribis: > 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=3D/path/to/persistent/home > MANIFEST=3D/path/to/manifest.scm > > guix shell --container --network --no-cwd -P \ > --share=3D$CONTAINER_HOME=3D/home/elb -- \ > /bin/sh -c 'SSL_CERT_DIR=3D"$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. I guess it=E2=80=99s confusing because =E2=80=98-P=E2=80=99 and =E2=80=98--= share=E2=80=99 kind of step on each other=E2=80=99s toes: they both want to control /home/elb. > 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. Yeah, I=E2=80=99m not sure how to better handle that; the two options are conflicting. That said, for this particular use case, you could do: guix shell syncthing nss-certs openssl -- syncthing Adding =E2=80=98openssl=E2=80=99 to the mix is a trick to ensure that SSL_C= ERT_DIR is defined, thanks to the search path mechanism: https://guix.gnu.org/manual/devel/en/html_node/Search-Paths.html Thoughts? Ludo=E2=80=99.