Bug 53359 - Migrate univention-apache to Python 3
Migrate univention-apache to Python 3
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Apache
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-0-errata
Assigned To: Eduardo Ruiz Moreno
Florian Best
: python3-migration
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-31 11:37 CEST by Florian Best
Modified: 2021-11-03 17:01 CET (History)
0 users

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2021-05-31 11:37:37 CEST
univention-apache should be migrated to be Python 3 compatible.

services/univention-apache/univention-add-vhost
Comment 2 Florian Best univentionstaff 2021-09-28 10:49:24 CEST
Please change the "def ucr():"  into "from univention.config_registry import ucr" (which is automatically a singleton which is invoked only on first use)
Comment 3 Eduardo Ruiz Moreno univentionstaff 2021-10-22 13:07:35 CEST
The package has been migrated to Python 3.
Changed ucr function with univention.config_registry
Comment 4 Florian Best univentionstaff 2021-10-24 09:38:26 CEST
Traceback (most recent call last):
  File "/usr/sbin/univention-add-vhost", line 355, in <module>
    main()
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/sbin/univention-add-vhost", line 135, in main
    needs_dns_reload |= create_dns_entry(udm, host)
  File "/usr/sbin/univention-add-vhost", line 253, in create_dns_entry
    superordinate = superordinate_of_fqdn(udm, fqdn)
  File "/usr/sbin/univention-add-vhost", line 232, in superordinate_of_fqdn
    known_zones = forward_zones(udm)
  File "/usr/sbin/univention-add-vhost", line 226, in forward_zones
    reverse=True
TypeError: 'cmp' is an invalid keyword argument for sort()
Comment 5 Florian Best univentionstaff 2021-10-26 18:08:56 CEST
univention-apache (12.0.0-3)
ed453acebfe9 | Bug #53359: version bump
fd546470152d | fixup! Bug #53359: Migrate univention-apache to Python 3
Comment 6 Florian Best univentionstaff 2021-11-03 12:41:45 CET
OK: cmp() replacement.