shepherd: Include /etc/localtime in service containers.

Fixes a bug whereby Tor (for example) would emit syslog messages with a
UTC timestamp instead of local time.

* gnu/build/shepherd.scm (default-mounts): Add /etc/localtime to
MAPPINGS.
This commit is contained in:
Ludovic Courtès 2019-05-03 17:12:09 +02:00
parent c8bb86f51c
commit 78d6d5e8d9
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -81,6 +81,14 @@
(not (memq 'user namespaces))) (not (memq 'user namespaces)))
accounts accounts
'()) '())
;; Tell the process what timezone we're in. This
;; makes sure that, for instance, its syslog
;; messages have the correct timestamp.
,(file-system-mapping
(source "/etc/localtime")
(target source))
,%store-mapping))) ;XXX: coarse-grain ,%store-mapping))) ;XXX: coarse-grain
(map file-system-mapping->bind-mount (map file-system-mapping->bind-mount
(filter (lambda (mapping) (filter (lambda (mapping)