On Tue, 8 Sep 2020 at 04:52, Petr Pisar <ppisar(a)redhat.com> wrote:
On Tue, Sep 08, 2020 at 04:00:14AM -0400, Elliott Sales de Andrade wrote:
> I'm debugging an issue in a FTBFS, which appears caused by unexpected
> warnings during a build [1]. These warnings come from R and complain
> that /etc/localtime is not a symlink.
>
> According to `man 5 localtime` [2], /etc/localtime cannot be a normal
> file or hard link.
> Is this something wrong in koji, or its builders?
>
> [1]
https://koji.fedoraproject.org/koji/taskinfo?taskID=50987042
> [2]
https://www.freedesktop.org/software/systemd/man/localtime.html
I hit this issue many years ago and tzdata maintainer claimed
<
https://bugzilla.redhat.com/show_bug.cgi?id=1136219> that it was a fault
of a mock tool. (Mock tool is used when building a package in Koji). I asked
a maintainer of mock to fix it
<
https://bugzilla.redhat.com/show_bug.cgi?id=1136040> and he "fixed" it
by not
creating /etc/localtime at all. In the mean time I implemented a work around
in one of mine affected packages and has not seen any issue like that. (Except
of a user who complained that the Fedora package survives longer before
reporting an error than an upstream's code.)
What's your issue now? Is /etc/localtime a normal file again, or is the error
message wrong and the file is missing completely?
I debugged it a little with ls -l/cat /etc/localtime, and it
definitely exists, but is a regular file. Confusingly, this only
causes a problem on koji, not in local mock, even though manually
running similar code as the test appears to trigger the same warning
as on koji.
Looking at the R source code for Sys.timezone(), I've found that it
checks the TZ envvar before timedatectl & /etc/localtime, so setting
TZ works around the problem for me (and also silences timedatectl's
warnings.)
Since I have a workaround now and it doesn't reproduce on local mock,
I won't bother spamming koji with debug attempts.
-- Petr
--
Elliott