GNU bug report logs -
#30254
[PATCH 0/3] guix environment --user, --link-profile, --no-cwd
Previous Next
Reported by: Mike Gerwitz <mtg <at> gnu.org>
Date: Fri, 26 Jan 2018 03:31:01 UTC
Severity: normal
Tags: moreinfo, patch
Merged with 30256
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30254 in the body.
You can then email your comments to 30254 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#30254
; Package
guix-patches
.
(Fri, 26 Jan 2018 03:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mike Gerwitz <mtg <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 26 Jan 2018 03:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On help-guix I initiated a conversation on using IceCat within a container
(<87vag2wopo.fsf <at> gnu.org>). This covers some of the lower-level concepts I
was thinking off. Specifically:
0. The ability to hide the user (and home directory) from procsses within the
container. This includes rewritting mapped paths;
1. Suppressing the behavior of automatically sharing cwd; and
2. Linking $GUIX_ENVIRONMENT to ~/.guix-profile.
The first two are for privacy (#1 is for conveinence, since creating an empty
dir just to cd into it is a bit klugy as a workaround). #2 was motivated by
my needs with font-config, but I can imaging that it'd be useful elsewhere
as well. It only really makes sense if you're not sharing your home
directory.
Mike Gerwitz (3):
scripts: environment: Add --link-profile.
scripts: environment: Add --user.
scripts: environment: Add --no-cwd.
doc/guix.texi | 59 +++++++++++++-
guix/scripts/environment.scm | 178 +++++++++++++++++++++++++++++++++++--------
tests/guix-environment.sh | 30 ++++++++
3 files changed, 233 insertions(+), 34 deletions(-)
--
2.15.1
[signature.asc (application/pgp-signature, inline)]
Merged 30254 30256.
Request was from
ludo <at> gnu.org (Ludovic Courtès)
to
control <at> debbugs.gnu.org
.
(Sat, 03 Mar 2018 21:23:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#30254
; Package
guix-patches
.
(Wed, 17 Oct 2018 12:20:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 30254 <at> debbugs.gnu.org (full text, mbox):
Hello Mike,
There’s this last patch from the series you submitted a while back
that’s ready modulo an issue with the test. Could you take a look?
TIA,
Ludo’.
ludo <at> gnu.org (Ludovic Courtès) skribis:
> Mike Gerwitz <mtg <at> gnu.org> skribis:
>
>> * doc/guix.texi (Invoking guix environment): Add --no-cwd.
>> * guix/scripts/environment.scm (show-help, %options): Add --no-cwd.
>> (launch-environment/container): Add 'map-cwd?' param; only add mapping for cwd
>> if #t. Only change to cwd within container if #t, otherwise home.
>> (guix-environment): Error if --no-cwd without --container. Provide '(not
>> no-cwd?)' to launch-environment/container as 'map-cwd?'.
>> * tests/guix-environment.sh: Add test for no-cwd.
>
> This one LGTM as well (with the test moved to
> guix-environment-container.sh). There’s just a minor issue:
>
>> --- a/tests/guix-environment.sh
>> +++ b/tests/guix-environment.sh
>> @@ -84,6 +84,14 @@ HOME="$tmpdir" guix environment --bootstrap --container --user=foognu \
>> --share="$tmpdir/umock" \
>> -- guile -c "$usertest"
>>
>> +# if not sharing CWD, chdir home
>> +(
>> + cd "$tmpdir" \
>> + && guix environment --bootstrap --container --no-cwd --user=foo \
>> + --ad-hoc guile-bootstrap --pure \
>> + -- /bin/sh -c 'test $(pwd) == "/home/foo" -a ! -d '"$tmpdir"
>> +)
>> +
>
> This test would fail for me because my test store is at
> ~ludo/src/guix/test-tmp/store and my CWD is ~/src/guix. So when using
> both --user and --no-cwd, the effect is that
> ~ludo/src/guix/test-tmp/store is not available at all within the
> container, and thus execve("/bin/sh") fails with ENOENT:
>
> $ ./test-env guix environment --bootstrap --container --no-cwd --user=foo --ad-hoc guile-bootstrap
> accepted connection from pid 29684, user ludo
> accepted connection from pid 29695, user ludo
> ./test-env: line 1: 29683 Terminated "/home/ludo/src/guix/pre-inst-env" "/home/ludo/src/guix/guix-daemon" --disable-chroot --substitute-urls="$GUIX_BINARY_SUBSTITUTE_URL"
> $ echo $?
> 1
>
> Thoughts?
>
> TIA,
> Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#30254
; Package
guix-patches
.
(Thu, 08 Nov 2018 01:58:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 30254 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludo:
On Wed, Oct 17, 2018 at 15:19:33 +0200, Ludovic Courtès wrote:
> There’s this last patch from the series you submitted a while back
> that’s ready modulo an issue with the test. Could you take a look?
I'm not ignoring this; I'll have time to look over the next couple of
weeks. I'll need to research the issue.
--
Mike Gerwitz
[signature.asc (application/pgp-signature, inline)]
Added tag(s) moreinfo.
Request was from
Ricardo Wurmus <rekado <at> elephly.net>
to
control <at> debbugs.gnu.org
.
(Mon, 04 Feb 2019 17:16:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#30254
; Package
guix-patches
.
(Sun, 07 Jul 2019 13:19:01 GMT)
Full text and
rfc822 format available.
Message #18 received at 30254 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Carl,
Carl Dong <contact <at> carldong.me> skribis:
> I believe I've found a solution to the problem that Ludo was encountering. The
> reason why Ludo was having trouble was because when a user specifies `--user`,
> we rewrite the targets of our filesystem mappings so that every instance of
> `$HOME` (as seen ouside the container) becomes `/home/$USER`. Since this applied
> to all filesystem mappings, it included our filesystem mappings for inputs too.
> However, our symlinks were not updated.
>
> My change makes it so that we _only_ update the mappings that are either
> user-specified, or cwd (if applicable). This solves Ludo's problems.
>
> Here's the patch, let me know if it looks good:
> https://github.com/dongcarl/guix/compare/8e92d5465fc154fed5d06f7e4a64d7dcccded74d...2019-06-env-no-cwd-fix.patch
Good catch! The patches LGTM. (Note: you can use the ‘Co-authored-by’
tag for the second patch, I think it’s a more or less common
convention.)
Speaking of which, could you create an account on Savannah? That way we
could grant you commit access to make it more convenient for you and so
you can review and apply other people’s patches in your areas of expertise.
Please let me know what your account is, and reply with a message signed
by the key you’ll use to sign commits. Also please read the ‘HACKING’
file for info on the commit “rules”.
Thanks!
Ludo’.
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Wed, 14 Jul 2021 13:19:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mike Gerwitz <mtg <at> gnu.org>
:
bug acknowledged by developer.
(Wed, 14 Jul 2021 13:19:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 30254-done <at> debbugs.gnu.org (full text, mbox):
Hello,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hello!
>
> Carl Dong <contact <at> carldong.me> skribis:
>
>>> Good catch! The patches LGTM. (Note: you can use the ‘Co-authored-by’ tag for
>>> the second patch, I think it’s a more or less common convention.)
>>
>> Done! Updated at the same link as last time:
>> https://github.com/dongcarl/guix/compare/8e92d5465fc154fed5d06f7e4a64d7dcccded74d...2019-06-env-no-cwd-fix.patch
>
> Alright!
>
>>> Speaking of which, could you create an account on Savannah? That way we could
>>> grant you commit access to make it more convenient for you and so you can
>>> review and apply other people’s patches in your areas of expertise.
[...]
> Cool, I’ve added you to the Savannah group. You can now push these two
> patches to test it.
Seems the patches have indeed been pushed :-).
Closing.
Maxim
Reply sent
to
Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
:
You have taken responsibility.
(Wed, 14 Jul 2021 13:19:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mike Gerwitz <mtg <at> gnu.org>
:
bug acknowledged by developer.
(Wed, 14 Jul 2021 13:19:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 12 Aug 2021 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.