diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2025-08-29 11:13:05 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-09-17 11:55:13 +0200 |
| commit | c52a9cee53db1e16df0c23ec10e352248e5372f8 (patch) | |
| tree | f4e642b3cad3d3d69c4bcc1abaa286053d76fad5 /gnu/build | |
| parent | 6d242496db2827653b1243418bba747288eeba37 (diff) | |
linux-container: Export ‘%writable-/tmp’ and use it.
Fixes guix/guix#1994.
* gnu/build/linux-container.scm (%writable-/tmp): New variable.
* guix/scripts/environment.scm (launch-environment/container): Remove ‘tmpfs’
and use it. Adjust ‘file-system’ declaration for /run/user/$UID.
* guix/scripts/home.scm (spawn-home-container): Likewise.
Reported-by: Romain GARBAGE <romain.garbage@inria.fr>
Change-Id: Ia8289fb5386971738caf2ccc1e815daa6ac28459
Diffstat (limited to 'gnu/build')
| -rw-r--r-- | gnu/build/linux-container.scm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm index 3e5158c2fd7..b6f8563f7d0 100644 --- a/gnu/build/linux-container.scm +++ b/gnu/build/linux-container.scm @@ -30,6 +30,7 @@ unprivileged-user-namespace-supported? setgroups-supported? %namespaces + %writable-/tmp run-container call-with-container container-excursion @@ -387,6 +388,16 @@ if there are no child processes left." (+ 128 (or (status:term-sig status) (status:stop-sig status))))) +(define %writable-/tmp + ;; Writable and volatile /tmp. + (file-system + (device "none") + (mount-point "/tmp") + (type "tmpfs") + (flags '(no-suid no-dev)) + (options "mode=755,size=10%") + (check? #f))) + (define* (call-with-container mounts thunk #:key (namespaces %namespaces) (host-uids 1) (guest-uid 0) (guest-gid 0) (lock-mounts? #t) |
