Bug 1132483
| Summary: | publican-4.1.3-2.fc22 FTBFS: Cannot determine local time zone | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Petr Pisar <ppisar> |
| Component: | publican | Assignee: | Ruediger Landmann <rlandman> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | jfearn, me, rlandman |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://koji.fedoraproject.org/koji/taskinfo?taskID=7434942 | ||
| Whiteboard: | |||
| Fixed In Version: | perl-DateTime-TimeZone-1.74-2.fc22 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-09-03 06:35:28 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1135981 | ||
| Bug Blocks: | |||
|
Description
Petr Pisar
2014-08-21 12:30:59 UTC
Looks like the tz update broke perl-DateTime-TimeZone?
I'm betting this generates the same error if run in the build root:
perl -MDateTime -e 'print DateTime->now( time_zone => "local" )->strftime("%Y-%m-%d %H:%M%z")'
perl-DateTime-TimeZone does not use system tzdata at all. Actually it uses it as a one method to determine the localtime zone. However this looks like the default mock build root does not have set localtime. Or the DateTime::TimeZone::Local::Unix class does not return "UTC" time zone as the default value if no local time zone is (In reply to Jeff Fearn from comment #1) > Looks like the tz update broke perl-DateTime-TimeZone? > > I'm betting this generates the same error if run in the build root: > > perl -MDateTime -e 'print DateTime->now( time_zone => "local" > )->strftime("%Y-%m-%d %H:%M%z")' On my local system I had: $ perl -MDateTime -e 'print DateTime->now( time_zone => "local" )->strftime("%Y-%m-%d %H:%M%z")' Cannot determine local time zone $ timedatectl Local time: Thu 2014-08-28 15:31:25 EST Universal time: Thu 2014-08-28 05:31:25 UTC Timezone: n/a (EST, +1000) NTP enabled: no NTP synchronized: no RTC in local TZ: no DST active: n/a Which seemed odd, so I updated the system Time and Date settings and ran it again. This time, I got: $ timedatectl Local time: Thu 2014-08-28 15:33:47 AEST Universal time: Thu 2014-08-28 05:33:47 UTC Timezone: n/a (AEST, +1000) NTP enabled: no NTP synchronized: no RTC in local TZ: no DST active: n/a and: $ perl -MDateTime -e 'print DateTime->now( time_zone => "local" )->strftime("%Y-%m-%d %H:%M%z")' 2014-08-28 15:33+1000 I can build Publican fine now! :) t/920.WebSite.t ............... ok All tests successful. Files=10, Tests=69, 142 wallclock secs ( 0.22 usr 0.05 sys + 125.53 cusr 4.12 csys = 129.92 CPU) Result: PASS Australia has changed time zone abbreviation identifiers <http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html>. I don't know how timedatectl works, maybe the /etc/localtime symlink was dangling after updating tzdata, so you had to reconfigure it to reflect the change. There is shorter reproducer: # perl -MDateTime::TimeZone::Locae::TimeZone::Local->TimeZone' Cannot determine local time zone It happens when /etc/localtime file does has its copy under /usr/share/zoneinfo. I think the issue with koji is that the file is copied from mock's hosts and then newer tzdata package installed into the mock environment, so the copy copy does not match anymore. The DateTime::TimeZone::Local::Unix reads: Some systems just copy the relevant file to F</etc/localtime> instead of making a symlink. In this case, we look in F</usr/share/zoneinfo> for a file that has the same size and content as F</etc/localtime> to determine the local time zone. This should be fixed by perl-DateTime-TimeZone-1.74-2.fc22. |