ara icon indicating copy to clipboard operation
ara copied to clipboard

Fedora packaging: tzlocal too old for ara 1.6

Open dmsimard opened this issue 1 year ago • 6 comments

What is the issue ?

There are various timezone-related fixes in ara 1.6.0 (from 1.5.8) that come with a bump of tzlocal from 2.x to 4.x: https://github.com/ansible-community/ara/commit/07e7cd153896a6ae2266f9ce47adedc7541f047b

However the version of tzlocal in Fedora is still 2.x: https://koji.fedoraproject.org/koji/packageinfo?packageID=19353

+ /usr/bin/python3 manage.py test ara
[ara] Server's LOGGING configuration has a 'root' logger which is deprecated after version 1.5.8 due to conflicts. Please update your settings.yaml or generate a new one by removing it from ara's configuration folder
Traceback (most recent call last):
  File "/builddir/build/BUILD/ara-1.6.0.0rc1/manage.py", line 8, in <module>
    main()
  File "/builddir/build/BUILD/ara-1.6.0.0rc1/ara/server/__main__.py", line 27, in main
    if not os.path.exists(settings.ARA_SETTINGS):
                          ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/django/conf/__init__.py", line 84, in __getattr__
    self._setup(name)
  File "/usr/lib/python3.11/site-packages/django/conf/__init__.py", line 71, in _setup
    self._wrapped = Settings(settings_module)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/django/conf/__init__.py", line 179, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILD/ara-1.6.0.0rc1/ara/server/settings.py", line 200, in <module>
    LOCAL_TIME_ZONE = tzlocal.get_localzone_name()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'tzlocal' has no attribute 'get_localzone_name'. Did you mean: 'get_localzone'?
error: Bad exit status from /var/tmp/rpm-tmp.S24rGn (%check)
    Bad exit status from /var/tmp/rpm-tmp.S24rGn (%check)

RPM build errors:
Finish: rpmbuild ara-1.6.0.0rc1-1.fc36.src.rpm
Finish: build phase for ara-1.6.0.0rc1-1.fc36.src.rpm
ERROR: Exception(/home/dmsimard/rpmbuild/SRPMS/ara-1.6.0.0rc1-1.fc36.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 57 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result

What should be happening ?

It may take a while for the version of tzlocal to be bumped in Fedora, we could consider making our call to get the timezone temporarily support tzlocal 2.x and 4.x.

dmsimard avatar Oct 16 '22 23:10 dmsimard