aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/linux-boot.scm5
-rw-r--r--gnu/build/linux-initrd.scm4
-rw-r--r--gnu/build/shepherd.scm6
3 files changed, 8 insertions, 7 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index f273957d78..84a5447977 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -359,8 +359,9 @@ the last argument of `mknod'."
(define* (mount-root-file-system root type
#:key volatile-root?)
"Mount the root file system of type TYPE at device ROOT. If VOLATILE-ROOT?
-is true, mount ROOT read-only and make it a overlay with a writable tmpfs
-using the kernel build-in overlayfs."
+is true, mount ROOT read-only and make it an overlay with a writable tmpfs
+using the kernel built-in overlayfs."
+
(if volatile-root?
(begin
(mkdir-p "/real-root")
diff --git a/gnu/build/linux-initrd.scm b/gnu/build/linux-initrd.scm
index 3aaa06d3a0..ea7de58553 100644
--- a/gnu/build/linux-initrd.scm
+++ b/gnu/build/linux-initrd.scm
@@ -71,8 +71,7 @@ COMPRESS? is true, compress it using GZIP. On success, return OUTPUT."
(cpio:write-cpio-archive files port
#:file->header cpio:file->cpio-header*)))
- (or (not compress?)
-
+ (if compress?
;; Gzip insists on adding a '.gz' suffix and does nothing if the input
;; file already has that suffix. Shuffle files around to placate it.
(let* ((gz-suffix? (string-suffix? ".gz" output))
@@ -88,7 +87,6 @@ COMPRESS? is true, compress it using GZIP. On success, return OUTPUT."
(unless gz-suffix?
(rename-file (string-append output ".gz") output))
output)))
-
output))
(define (cache-compiled-file-name file)
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index b32765ed5e..14bdf4edb8 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -150,14 +150,16 @@ namespace, in addition to essential bind-mounts such /proc."
(when log-file
;; Create LOG-FILE so we can map it in the container.
(unless (file-exists? log-file)
- (call-with-output-file log-file (const #t))))
+ (call-with-output-file log-file (const #t))
+ (when user
+ (let ((pw (getpwnam user)))
+ (chown log-file (passwd:uid pw) (passwd:gid pw))))))
(let ((pid (run-container container-directory
mounts namespaces 1
(lambda ()
(mkdir-p "/var/run")
(clean-up pid-file)
- (clean-up log-file)
(exec-command command
#:user user