unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Timothy Sample <samplet@ngyro.com>
To: Kei Kebreau <kkebreau@posteo.net>
Cc: guix-devel@gnu.org
Subject: Re: core-updates freeze
Date: Tue, 16 Jul 2019 10:19:37 -0400	[thread overview]
Message-ID: <87o91udpty.fsf@ngyro.com> (raw)
In-Reply-To: <87ftna9gkg.fsf@posteo.net> (Kei Kebreau's message of "Sat, 13 Jul 2019 10:04:15 -0400")

[-- Attachment #1: Type: text/plain, Size: 1005 bytes --]

Hi,

Kei Kebreau <kkebreau@posteo.net> writes:

> Marius Bakke <mbakke@fastmail.com> writes:
>
>> I'm not sure what we should do about it.  Thoughts?
>>
>> Kei: Does it work if you 'echo Your/Timezone > /etc/timezone' ?
>> Alternatively, you could make /etc/localtime a symbolic link to
>> $tzdata/share/zoneinfo/Your/Timezone, though that will not persist a
>> reboot.
>
> I can confirm that both of these methods work, so crude work-arounds
> include
>
>   1.  Setting the system's configured time zone in /etc/timezone

This is my vote for two reasons.  First, it seems more elegant.  If I
want to know the timezone name, I should look it up directly, and not
chase symlinks around looking for some canonical timezone file.  I think
this is the closest thing to a “standard way to get the name of the
system timezone” <https://issues.guix.gnu.org/issue/35746#9> (here,
“standard” means “well, I guess at least Gentoo does it”).  Second, it
is a one-liner for us:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: the patch --]
[-- Type: text/x-patch, Size: 1050 bytes --]

From ad931895edae97e2d6d77542fcbe8dc793f193f0 Mon Sep 17 00:00:00 2001
From: Timothy Sample <samplet@ngyro.com>
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


[-- Attachment #3: Type: text/plain, Size: 20 bytes --]


Thoughts?


-- Tim

  parent reply	other threads:[~2019-07-16 14:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 17:11 core-updates freeze Marius Bakke
2019-07-11 15:26 ` Ludovic Courtès
2019-07-11 19:11   ` Kei Kebreau
2019-07-12 15:20     ` Marius Bakke
2019-07-13 14:04       ` Kei Kebreau
2019-07-13 21:04         ` Kei Kebreau
2019-07-16 14:19         ` Timothy Sample [this message]
2019-07-16 16:36           ` Marius Bakke
2019-07-17  3:24             ` Timothy Sample
2019-07-11 19:00 ` core-updates frozen! Marius Bakke
2019-07-11 21:06   ` Ludovic Courtès
2019-07-11 23:27     ` Marius Bakke
2019-07-13 22:17   ` Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o91udpty.fsf@ngyro.com \
    --to=samplet@ngyro.com \
    --cc=guix-devel@gnu.org \
    --cc=kkebreau@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).