guix home: Create /tmp in container if needed.

Previously 'guix home container' would create a container without /tmp,
which would prevent 'least-authority-wrapper' programs from starting,
for example.

* guix/scripts/home.scm (spawn-home-container): Create /tmp if it
doesn't exist yet.
This commit is contained in:
Ludovic Courtès 2023-08-16 19:45:28 +02:00
parent 45ca59da5e
commit bb7369ba8a
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -330,6 +330,10 @@ immediately. Return the exit status of the process in the container."
(display "127.0.0.1 localhost\n" port)
(chmod port #o444))))
;; Create /tmp; bits of code expect it, such as
;; 'least-authority-wrapper'.
(mkdir-p "/tmp")
;; Set PATH for things that the activation script might expect, such
;; as "env".
(load-profile #$system-profile)