From: Ethan Blanton via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 56076@debbugs.gnu.org
Subject: bug#56076: guix shell -P behavior is surprising with persistent home
Date: Sat, 18 Jun 2022 17:41:46 -0400 [thread overview]
Message-ID: <Yq5GmheRwHRPgJgD@colt.lan> (raw)
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
next reply other threads:[~2022-06-18 21:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-18 21:41 Ethan Blanton via Bug reports for GNU Guix [this message]
2022-06-24 21:10 ` bug#56076: guix shell -P behavior is surprising with persistent home Ludovic Courtès
2022-06-24 21:18 ` Maxime Devos
2022-06-27 7:55 ` Ludovic Courtès
2022-06-27 8:37 ` Maxime Devos
2022-06-28 7:43 ` Ludovic Courtès
2022-06-28 10:50 ` Maxime Devos
2022-06-28 12:08 ` Maxime Devos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yq5GmheRwHRPgJgD@colt.lan \
--to=bug-guix@gnu.org \
--cc=56076@debbugs.gnu.org \
--cc=elb@kb8ojh.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).