[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is there any way to change what /bin/sh is inside `guix shell [--contain
Is there any way to change what /bin/sh is inside `guix shell [--container]` ?
Mon, 13 Mar 2023 16:16:41 -0400
I'm doing experiments with using `guix shell --container` for isolated,
reproducible build environments. I've noticed that no matter how I set up the
container, `/bin/sh` points to a full-fat bash, even if the full bash package
was not included in the container profile. For instance
guix shell --container bash-minimal coreutils -- sh -c 'ls -l $(command -v sh)
lrwxrwxrwx 1 zack users 61 Mar 13 20:07 /bin/sh ->
lrwxrwxrwx 1 65534 overflow 69 Jan 1 1970
$ guix shell --container busybox -- sh -c 'ls -l $(command -v sh) /bin/sh'
lrwxrwxrwx 1 65534 overflow 7 Jan 1 1970
/gnu/store/96l76flyg617l23c5p32ysjbc72ywjgd-profile/bin/sh -> busybox
lrwxrwxrwx 1 zack users 61 Mar 13 20:05 /bin/sh ->
Is there any way to change or override this behavior? What I want is for
/bin/sh inside the container to be the same as $GUIX_ENVIRONMENT/bin/sh inside
(If you're about to ask me, "but what if the container profile doesn't include
a shell at all?", my response will be "in that case /bin/sh should not exist!"
I can think of several reasons why I might do that on purpose. Yes, I realize
that system(3) won't work in such an environment -- that may in fact be (one of
- Is there any way to change what /bin/sh is inside `guix shell [--container]` ?,
Zack Weinberg <=