unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Edouard Klein <edou@rdklein.fr>
Cc: help-guix@gnu.org
Subject: Re: Setting TZDIR (was Re: A single reference to installed non-binaries)
Date: Tue, 17 Aug 2021 16:20:35 -0400	[thread overview]
Message-ID: <YRwaEwcvNz27trLl@jasmine.lan> (raw)
In-Reply-To: <87mtpf3o08.fsf@rdklein.fr>

On Tue, Aug 17, 2021 at 08:49:27PM +0200, Edouard Klein wrote:
> It does, thanks, but I'm in a bit of a pickle there because this
> packagge needs, for reasons outside of my control, to be deployable on
> a multitude of host (non-GuixSD) linux distributions, and as a docker
> container. In those cases, I can't expect the timezone data to be up to
> date or to be there at all.
> 
> Even if I list tzdata as a dependency, the host system's TZDIR will not
> point to it.

You wouldn't list tzdata as a dependency at all. It's the responsibility
of the host operating system to provide the correct and current time
zone database, and applications should look it up at run-time via TZDIR.

If you are deploying to systems without a time zone database, then you
could indeed consider "baking" the reference into your package while
building, or consider if you need to care about having correct local
time at all.

> I understand that if I regularly guix pull and guix package -u, then the
> tzdata package will be kept up to date. Is that correct ?

Yes. But, installed packages should not need to be rebuilt to display
the correct time. To elaborate, if you hardcode a store reference to
tzdata in your package definitions, then old generations of installed
packages will eventually display incorrect local time, because time
zones are frequently changed by local governments. And that failure mode
is not okay for packages included in GNU Guix.

This is one of the rare cases in Guix packaging where dynamic lookup of
dependencies is preferred.


      reply	other threads:[~2021-08-17 20:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 11:31 A single reference to installed non-binaries Phil Beadling
2021-08-17 14:01 ` Edouard Klein
2021-08-17 15:45   ` Phil
2021-08-17 18:42     ` Edouard Klein
2021-08-17 20:42       ` Phil
2021-08-17 17:55   ` Leo Famulari
2021-08-17 18:49     ` Setting TZDIR (was Re: A single reference to installed non-binaries) Edouard Klein
2021-08-17 20:20       ` Leo Famulari [this message]

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=YRwaEwcvNz27trLl@jasmine.lan \
    --to=leo@famulari.name \
    --cc=edou@rdklein.fr \
    --cc=help-guix@gnu.org \
    /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.
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).