guix-commits
[Top][All Lists]
Advanced

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

12/12: system: Add trailing newline to /etc/timezone.


From: guix-commits
Subject: 12/12: system: Add trailing newline to /etc/timezone.
Date: Tue, 14 Sep 2021 05:53:06 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 580984f2417853379d98ea927fd95c0f0fbe2c97
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Sep 14 11:35:54 2021 +0200

    system: Add trailing newline to /etc/timezone.
    
    Fixes <https://issues.guix.gnu.org/50523>.
    Reported by meedstrom@teknik.io.
    
    * gnu/system.scm (operating-system-etc-service): Add trailing newline
    to "timezone" contents.
---
 gnu/system.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index 98aeda0..2b919d8 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -969,7 +969,12 @@ fi\n")))
        ;; Some programs (e.g., GLib) look at /etc/timezone to find the
        ;; name of the current timezone.  For details, see
        ;; https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00166.html
-       ("timezone" ,(plain-file "timezone" (operating-system-timezone os)))
+       ;; Some programs expect a terminating newline.
+       ("timezone" ,(plain-file "timezone"
+                                (string-append
+                                 (string-trim-both
+                                  (operating-system-timezone os))
+                                 "\n")))
        ("localtime" ,(file-append tzdata "/share/zoneinfo/"
                                   (operating-system-timezone os)))
        ,@(if sudoers



reply via email to

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