aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/pack.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2019-08-27 11:27:02 +0200
committerLudovic Courtès <ludo@gnu.org>2019-08-27 12:20:44 +0200
commit7979a287f8eb84cbbfa44629951572408939a756 (patch)
treeb72f53ded5b000c90323be5306978648021264b5 /guix/scripts/pack.scm
parent2b7c89f4fcc5e1607e153939d54d32aeaf494ca9 (diff)
downloadguix-7979a287f8eb84cbbfa44629951572408939a756.tar
guix-7979a287f8eb84cbbfa44629951572408939a756.tar.gz
pack: Create /tmp in Docker images.
Fixes <https://bugs.gnu.org/37161>. * guix/scripts/pack.scm (docker-image)[build]: Add a 'directory' entry for "/tmp" to DIRECTIVES. * tests/pack.scm ("docker-image + localstatedir"): Test the presence of /tmp. * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]: Test the presence and permission bits of "/tmp".
Diffstat (limited to 'guix/scripts/pack.scm')
-rw-r--r--guix/scripts/pack.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index a15530ad70..dd91a24284 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -511,8 +511,10 @@ the image."
(,source -> ,target))))))
(define directives
- ;; Fully-qualified symlinks.
- (append-map symlink->directives '#$symlinks))
+ ;; Create a /tmp directory, as some programs expect it, and
+ ;; create SYMLINKS.
+ `((directory "/tmp" ,(getuid) ,(getgid) #o1777)
+ ,@(append-map symlink->directives '#$symlinks)))
(setenv "PATH" (string-append #$archiver "/bin"))