unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Timothy Sample <samplet@ngyro.com>, Kei Kebreau <kkebreau@posteo.net>
Cc: guix-devel@gnu.org
Subject: Re: core-updates freeze
Date: Tue, 16 Jul 2019 18:36:52 +0200	[thread overview]
Message-ID: <87r26q542j.fsf@devup.no> (raw)
In-Reply-To: <87o91udpty.fsf@ngyro.com>

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

Timothy Sample <samplet@ngyro.com> writes:

> 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:
>
> 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
>
>
> Thoughts?

Looks good to me.  Perhaps leave a comment that Glib uses this file to
figure out the current timezone?

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2019-07-16 16:36 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
2019-07-16 16:36           ` Marius Bakke [this message]
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=87r26q542j.fsf@devup.no \
    --to=mbakke@fastmail.com \
    --cc=guix-devel@gnu.org \
    --cc=kkebreau@posteo.net \
    --cc=samplet@ngyro.com \
    /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).