guix-devel
[Top][All Lists]
Advanced

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

Re: core-updates freeze


From: Timothy Sample
Subject: Re: core-updates freeze
Date: Tue, 16 Jul 2019 23:24:42 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Hi Marius,

Marius Bakke <address@hidden> writes:

> Timothy Sample <address@hidden> writes:
>
>> From ad931895edae97e2d6d77542fcbe8dc793f193f0 Mon Sep 17 00:00:00 2001
>> From: Timothy Sample <address@hidden>
>> Date: Tue, 16 Jul 2019 10:04:58 -0400
>> Subject: [PATCH] system: Write the timezone to /etc/timezone.
>>
>> * gnu/system.scm (operating-system-etc-service): Write the operating
>> system timezone to /etc/timezone.
>>
>> Fixes <https://bugs.gnu.org/35746>.
>> ---
>>  gnu/system.scm | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/gnu/system.scm b/gnu/system.scm
>> index 01be1243fe..75ac0632bb 100644
>> --- a/gnu/system.scm
>> +++ b/gnu/system.scm
>> @@ -716,6 +716,7 @@ fi\n")))
>>         ;; to certain networks.  Some discussion at
>>         ;; https://lists.gnu.org/archive/html/help-guix/2017-09/msg00037.html
>>         ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
>> +       ("timezone" ,(plain-file "timezone" (operating-system-timezone os)))
>>         ("localtime" ,(file-append tzdata "/share/zoneinfo/"
>>                                    (operating-system-timezone os)))
>>         ("sudoers" ,(operating-system-sudoers-file os))))))
>> -- 
>> 2.22.0
>>
>>
>> Thoughts?
>
> Looks good to me.  Perhaps leave a comment that Glib uses this file to
> figure out the current timezone?

Pushed with a comment about GLib that references this discussion.

> Though I notice Debian 10 creates /etc/timezone too, so maybe we just
> missed a FHS update somewhere.

I looked at FHS 3.0, which is the latest one I could find, and it didn’t
say anything.  Searching around, the file has been around for a long
time.  It used to be mentioned in the systemd documentation, but now the
docs talk about /etc/localtime being a symlink instead [1].  According
to a Qt comment [2], Debian used to do what we are doing now until
Jessie, then it made /etc/localtime a symlink (I presume they kept
/etc/timezone for compatibility).  All in all, it looks like a lot of
other projects are moving away from /etc/timezone, so maybe we bet on
the wrong horse, so to speak.  It looks like Flatpack has started using
it recently, though [3].  Either way, it should be easy enough to adapt
if projects drop support for /etc/timezone.

[1] 
https://github.com/systemd/systemd/commit/608da9e9b56be83ac394ea7a19cbdacab94f6642
[2] 
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=110e49c9cecca34dfacad33d19e04612cc2671b2
[3] https://github.com/flatpak/flatpak/issues/2190

-- Tim



reply via email to

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