unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46782: guix environment --expose options cannot be layered onto $PWD
@ 2021-02-25 21:12 Maxim Cournoyer
  2022-11-23 14:24 ` bug#46782: bbb ee
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Cournoyer @ 2021-02-25 21:12 UTC (permalink / raw)
  To: 46782

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#46782:
  2021-02-25 21:12 bug#46782: guix environment --expose options cannot be layered onto $PWD Maxim Cournoyer
@ 2022-11-23 14:24 ` bbb ee
  0 siblings, 0 replies; 2+ messages in thread
From: bbb ee @ 2022-11-23 14:24 UTC (permalink / raw)
  To: 46782

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

There is a similar issue that is solved: https://issues.guix.gnu.org/59425

[-- Attachment #2: Type: text/html, Size: 144 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-23 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25 21:12 bug#46782: guix environment --expose options cannot be layered onto $PWD Maxim Cournoyer
2022-11-23 14:24 ` bug#46782: bbb ee

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).