From 91e633f0430c8c26e6915f79365a49d8a4327c96 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 16 Jul 2019 18:09:38 +0900 Subject: build: initrd: Fix "write-cpio-archive" return value. * gnu/build/linux-initrd.scm (write-cpio-archive): Really return OUTPUT on success, even when compression is disabled. --- gnu/build/linux-initrd.scm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gnu/build') 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) -- cgit 1.4.1 From 41e03c4beefb4d14ca1f8f9d8739a582c9430893 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 18 Jul 2019 07:23:48 +0900 Subject: linux-boot: Fix typo. * gnu/build/linux-boot.scm (mount-root-file-system): Fix typo. --- gnu/build/linux-boot.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/build') 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") -- cgit 1.4.1 From 0d3a4fc867100651af8b27cdf66b1bca1c8ba663 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 26 Sep 2019 17:06:33 +0200 Subject: shepherd: 'make-forkexec-constructor/container' keeps the log file. * gnu/build/shepherd.scm (make-forkexec-constructor/container): Don't call 'clean-up' on LOG-FILE. This mirrors Shepherd commit 6892f638c78a14fedd075f664432757bc015c140. --- gnu/build/shepherd.scm | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/build') diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm index b32765ed5e..461feb06ef 100644 --- a/gnu/build/shepherd.scm +++ b/gnu/build/shepherd.scm @@ -157,7 +157,6 @@ namespace, in addition to essential bind-mounts such /proc." (lambda () (mkdir-p "/var/run") (clean-up pid-file) - (clean-up log-file) (exec-command command #:user user -- cgit 1.4.1 From 464caf72f9ff7600bd49e2df07e19cd9af28a930 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 26 Sep 2019 17:07:55 +0200 Subject: shepherd: Ensure the log file has correct ownership. * gnu/build/shepherd.scm (make-forkexec-constructor/container): Ensure LOG-FILE has correct ownership. --- gnu/build/shepherd.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gnu/build') diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm index 461feb06ef..14bdf4edb8 100644 --- a/gnu/build/shepherd.scm +++ b/gnu/build/shepherd.scm @@ -150,7 +150,10 @@ 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 -- cgit 1.4.1