1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-07-07 05:14:05 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Ludovic Courtès c5b76579e8 scripts/environment: Do not attempt to map GID 0.
* guix/scripts/environment.scm (launch-environment/container): Do not attempt
to map GID 0.

Fixes: #4234
Change-Id: If196430de5f09932e5dd736a55b75bbcda8cd7be
2025-12-09 15:55:14 +09:00
Maxim Cournoyer 99b0b7aa1f shell: Create cached profile directory once connected to the daemon.
* gnu/tests/base.scm (guix-daemon-test-cases)
<"containerized guix shell">
<"containerized guix shell, unprivileged user">: New tests.

Relates-to: guix/guix#126
Change-Id: I782461c80c254467108c6b8d676d269866795746
2025-12-09 15:45:34 +09:00
2 changed files with 20 additions and 1 deletions
+15
View File
@@ -1168,6 +1168,21 @@ to supplementary group ~a...~%" other)
hello))
#$marionette))
;; Check that guix-daemon is up and running and that the build
;; environment is properly set up (build users, etc.).
(test-equal "containerized guix shell"
0
(marionette-eval
'(system "guix shell --no-cwd --bootstrap -C hello -- hello")
#$marionette))
(test-equal "containerized guix shell, unprivileged user"
0
(marionette-eval
'(system "su - user -c 'guix shell --bootstrap -C hello -- hello'")
#$marionette))
(test-equal "guix build hello"
0
;; Check that guix-daemon is up and running and that the build
+5 -1
View File
@@ -828,7 +828,11 @@ WHILE-LIST."
(let* ((cwd (getcwd))
(home (getenv "HOME"))
(uid (if user 1000 (getuid)))
(gid (if user 1000 (getgid)))
(gid (if user
1000
(match (getgid)
(0 1000)
(gid gid))))
;; On a foreign distro, the name service switch might be
;; dysfunctional and 'getpwuid' throws. Don't let that hamper