Bug 1295709 - python-tzlocal in EPEL 7 does not work with systemd, please update to version 1.2
python-tzlocal in EPEL 7 does not work with systemd, please update to version...
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: python-tzlocal (Show other bugs)
epel7
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Piotr Popieluch
Piotr Popieluch
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-05 05:21 EST by Ralph Angenendt
Modified: 2016-01-23 20:05 EST (History)
3 users (show)

See Also:
Fixed In Version: python-tzlocal-1.2-2.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-23 20:05:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ralph Angenendt 2016-01-05 05:21:27 EST
Description of problem:

The version of python-tzlocal in EPEL 7 does not work with systemd, rendering it useless on RHEL 7 or CentOS 7.

This has been fixed in upstream, with version 1.2:

1.2 (2015-06-14)
----------------

- Systemd stores no time zone name, forcing us to look at the name of the file
  that localtime symlinks to. (cameris)

So please update python-tzlocal in EPEL to this version. 

Version-Release number of selected component (if applicable):

1.1.2-4

How reproducible:

Use python-tzlocal on RHEL 7

Steps to Reproduce:
Python 2.7.5 (default, Nov 20 2015, 02:00:19)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tzlocal import get_localzone
>>> tz = get_localzone()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/tzlocal/unix.py", line 108, in get_localzone
    _cache_tz = _get_localzone()
  File "/usr/lib/python2.7/site-packages/tzlocal/unix.py", line 100, in _get_localzone
    return pytz.tzfile.build_tzinfo('local', tzfile)
  File "/usr/lib/python2.7/site-packages/pytz/tzfile.py", line 30, in build_tzinfo
    typecnt, charcnt) =  unpack(head_fmt, fp.read(head_size))
struct.error: unpack requires a string argument of length 44


Actual results:

python throws a stack trace.

Expected results:

As on RHEL 6:
Python 2.6.6 (r266:84292, Jul 22 2015, 16:47:47)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tzlocal import get_localzone
>>> tz = get_localzone()
>>> print tz
Europe/Berlin
>>>

Additional info:

This has been fixed in upstream version 1.2:

1.2 (2015-06-14)
----------------

- Systemd stores no time zone name, forcing us to look at the name of the file
  that localtime symlinks to. (cameris)
Comment 1 Piotr Popieluch 2016-01-05 06:35:48 EST
Thank you for reporting
Comment 2 Fedora Update System 2016-01-05 06:37:40 EST
python-tzlocal-1.2-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-8434cdd00f
Comment 3 Fedora Update System 2016-01-05 06:41:19 EST
python-tzlocal-1.2-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8b4c6e8833
Comment 4 Fedora Update System 2016-01-05 18:26:24 EST
python-tzlocal-1.2-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-8434cdd00f
Comment 5 Fedora Update System 2016-01-05 19:24:46 EST
python-tzlocal-1.2-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8b4c6e8833
Comment 6 Fedora Update System 2016-01-14 04:49:29 EST
python-tzlocal-1.2-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2016-01-23 20:05:51 EST
python-tzlocal-1.2-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.