diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-03-26 18:07:58 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-03-26 18:11:52 +0100 |
commit | 952afb6f8c209692e52f9561965ee39e143e1d88 (patch) | |
tree | 21325fb90568cc4d7bec5ce8e05ebf8969f389d4 /tests/guix-environment-container.sh | |
parent | 8a9922bdee875b3b5e1d928fc8e2121ffa99663a (diff) |
environment: Create /etc/group in containers.
Reported by Pierre Neidhardt <mail@ambrevar.xyz>.
* guix/scripts/environment.scm (launch-environment/container): Create
GROUPS and call 'write-group'.
* tests/guix-environment-container.sh: Test it.
Diffstat (limited to 'tests/guix-environment-container.sh')
-rw-r--r-- | tests/guix-environment-container.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh index 059c4d9213..f2221af95b 100644 --- a/tests/guix-environment-container.sh +++ b/tests/guix-environment-container.sh @@ -46,9 +46,15 @@ fi if test "x$USER" = "x"; then USER="`id -un`"; fi -# Check whether /etc/passwd is valid. +# Check whether /etc/passwd and /etc/group are valid. guix environment -C --ad-hoc --bootstrap guile-bootstrap \ -- guile -c "(exit (string=? \"$USER\" (passwd:name (getpwuid (getuid)))))" +guix environment -C --ad-hoc --bootstrap guile-bootstrap \ + -- guile -c '(exit (string? (group:name (getgrgid (getgid)))))' +guix environment -C --ad-hoc --bootstrap guile-bootstrap \ + -- guile -c '(use-modules (srfi srfi-1)) + (exit (every group:name + (map getgrgid (vector->list (getgroups)))))' # Make sure file-not-found errors in mounts are reported. if guix environment --container --ad-hoc --bootstrap guile-bootstrap \ |