diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-09-27 19:11:27 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-09-27 19:11:27 +0200 |
commit | e7f62a41b245ca30404c54f3f77930336627c2f7 (patch) | |
tree | 4b2a24dcc84f137b92ca581dba96cf7abac70439 /gnu/build | |
parent | 1fdab9d3b3e78b0c90b52567be5535a861a7273d (diff) | |
parent | b48eb1e934f1d457ff6a0fec1c572bb12ed15fab (diff) | |
download | patches-e7f62a41b245ca30404c54f3f77930336627c2f7.tar patches-e7f62a41b245ca30404c54f3f77930336627c2f7.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/build')
-rw-r--r-- | gnu/build/linux-boot.scm | 5 | ||||
-rw-r--r-- | gnu/build/linux-initrd.scm | 4 | ||||
-rw-r--r-- | gnu/build/shepherd.scm | 6 |
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 |