guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: shepherd: Include /etc/localtime in service containers.


From: guix-commits
Subject: 01/04: shepherd: Include /etc/localtime in service containers.
Date: Fri, 3 May 2019 11:47:37 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 78d6d5e8d9b10affb4a97dfe869ae4646b3c3c98
Author: Ludovic Courtès <address@hidden>
Date:   Fri May 3 17:12:09 2019 +0200

    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.
---
 gnu/build/shepherd.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index f383259..cf68f21 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018 Ludovic Courtès <address@hidden>
+;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -81,6 +81,14 @@
                                        (not (memq 'user namespaces)))
                                   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
             (map file-system-mapping->bind-mount
                  (filter (lambda (mapping)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]