From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 46782@debbugs.gnu.org
Subject: bug#46782: guix environment --expose options cannot be layered onto $PWD
Date: Thu, 25 Feb 2021 16:12:34 -0500 [thread overview]
Message-ID: <87blc797i5.fsf@gmail.com> (raw)
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
next reply other threads:[~2021-02-25 21:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 21:12 Maxim Cournoyer [this message]
2022-11-23 14:24 ` bug#46782: bbb ee
2023-01-27 16:19 ` bug#46782: guix environment --expose options cannot be layered onto $PWD Maxim Cournoyer
2023-01-27 17:31 ` Simon Tournier
2023-02-06 21:54 ` Maxim Cournoyer
2023-02-07 1:24 ` bokr
2023-02-13 21:17 ` Josselin Poiret via Bug reports for GNU Guix
2023-02-13 21:31 ` bug#46782: [PATCH] scripts: environment: Mount cwd before user specified --expose Josselin Poiret via Bug reports for GNU Guix
2023-03-07 2:23 ` bug#46782: guix environment --expose options cannot be layered onto $PWD Maxim Cournoyer
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=87blc797i5.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=46782@debbugs.gnu.org \
/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).