unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Bengt Richter <bokr@bokr.com>
To: Mark H Weaver <mhw@netris.org>
Cc: 36870@debbugs.gnu.org
Subject: bug#36870: was: date bug -> locale inconvenience -> suggestion :)
Date: Tue, 6 Aug 2019 16:31:48 +0000	[thread overview]
Message-ID: <20190806163148.GA7621@PhantoNv4ArchGx.localdomain> (raw)
In-Reply-To: <871rxyokbd.fsf@netris.org>

On +2019-08-06 02:54:03 -0400, Mark H Weaver wrote:
> Hi Bengt,
> 
> I'm sorry that I didn't have time to fully read your messages, but if I
> understand correctly from my quick skimming, the 'date' command from
> Guix is failing to access the zoneinfo.  I think I see your problem.
> 
> Bengt Richter <bokr@bokr.com> writes:
> > $ strace -y date|& egrep 'America|^write'|sed -e 's:,:,\n    :g'
> > openat(AT_FDCWD,
> >      "/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/share/zoneinfo/America/Los_Angeles",
> >      O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> 
> The file name above suggests that your TZDIR variable is not set
> correctly to allow Guix-built binaries to find the zoneinfo files.
> 
> On Guix systems, /etc/environment includes an entry that sets TZDIR to
> the equivalent of "$(guix build tzdata)/share/zoneinfo".
> 
> When using Guix on top of another distro, an alternative choice might be
> to set TZDIR to "/usr/share/zoneinfo".  I'm not sure which setting is
> preferable on non-Guix systems.
> 
> Can you try setting TZDIR and see if that solves the problem for you?
> 
>      Regards,
>        Mark

Thanks, that works using either /usr/... or /gnu/...

but I am thinking everything guix should be accessed via
some profile if it's configurable?

There is already a suggestion to source like this:

GUIX_PROFILE="$HOME/.guix-profile"
. "$GUIX_PROFILE/etc/profile"

I think it would be nice if that were the only ~/.bash_profile
mod a foreign-system user would have to make to tie into the
guix packages such user installs with guix install.

So what about having that GUIX_PROFILE profile -- at its end --
source ~/.guixrc if it exists, and then when some installation wants
to suggest some environment settings, just automatically
append commented-out code to ~/.guixrc.

Then the friendly hints at then end of an install could suggest:

    ┌──────────────────────────────────────────────┐
    │ "Consider uncommenting some of the new       │
    │ lines we just added at the end of ~/.guixrc" │
    └──────────────────────────────────────────────┘

(sorry if utf8 box-drawing characters are a nono here -- are they? ;-/ )

I had noticed the TZDIR name looking with "guix edit tzdata",
and was trying to figure out why installing had not hinted
that I might need to do what you suggest above :)

Thanks again.

Regards,
Bengt Richter

  reply	other threads:[~2019-08-06 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31  6:20 bug#36870: date bug Bengt Richter
2019-08-06  2:38 ` bug#36870: was: date bug -- really locale bug or ?? Bengt Richter
2019-08-06  6:54   ` Mark H Weaver
2019-08-06 16:31     ` Bengt Richter [this message]
2019-08-26 10:11       ` bug#36870: Ludovic Courtès

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=20190806163148.GA7621@PhantoNv4ArchGx.localdomain \
    --to=bokr@bokr.com \
    --cc=36870@debbugs.gnu.org \
    --cc=mhw@netris.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.
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).