Univention Bugzilla – Bug 51318
base/univention-system-setup: migrate to python3
Last modified: 2022-09-01 09:55:17 CEST
The UMC module of base/univention-system-setup has to be python3-compatible.
We should replace `obj.info[property] = value` with `obj[property] = value`. Otherwise syntax checks, etc. aren't done. base/univention-system-setup/umc/python/setup/netconf/modules/LdapDhcp.py: subnet.info["subnet"] = str(ipv4.network) base/univention-system-setup/umc/python/setup/netconf/modules/LdapDhcp.py: subnet.info["subnetmask"] = str(ipv4.prefixlen) base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py: network.info["name"] = "default" base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py: network.info["network"] = str(ipv4.network) base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py: network.info["netmask"] = str(ipv4.netmask) base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py: network.info["dnsEntryZoneForward"] = forward_zone base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py: network.info["dnsEntryZoneReverse"] = reverse_zone base/univention-system-setup/umc/python/setup/netconf/modules/LdapNetwork.py: network.info["dhcpEntryZone"] = dhcp_service base/univention-system-setup/umc/python/setup/netconf/modules/LdapReferences.py: obj.info[udm_property] = new_values base/univention-system-setup/umc/python/setup/netconf/modules/LdapSSO.py: obj.info["a"] = list(new_values) base/univention-system-setup/umc/python/setup/netconf/modules/LdapSamba.py: obj.info["a"] = list(new_values) base/univention-system-setup/umc/python/setup/netconf/modules/LdapSelf.py: computer.info["ip"] = list(set(all_addr)) base/univention-system-setup/umc/python/setup/netconf/modules/LdapSelf.py: computer.info["dnsEntryZoneReverse"] = [ base/univention-system-setup/umc/python/setup/netconf/modules/LdapSelf.py: computer.info["mac"] = list(macs)
Patch available in git:fbest/51318-python3-univention-system-setup
Univention System Setup has been migrated to Python 3. I did functional test of every UMC module. I did basic functional tests of the DVD by installing a DC master role. comment 1 has been respected as well. univention-system-setup.yaml 75842f616365 | Bug #51318: migrate univention-system-setup to Python 3 univention-system-setup (13.0.3-36) 75842f616365 | Bug #51318: migrate univention-system-setup to Python 3 58e334109215 | Bug #51318: remove UCRv system/setup/boot/legacyfrontend dafb09bf90ab | Bug #51318: replace python with dash e88d93fe8620 | Bug #51318: [univention-system-setup]: apply isort e9ba24071a08 | Bug #51318: [univention-system-setup]: use ip instead of ifconfig 66cc245bc479 | Bug #51318: [univention-system-setup]: fix UDM usage 75804fe09fd9 | Bug #51318: [univention-system-setup]: migrate to Python 3 OLD changes: univention-system-setup (13.0.0-1) 2bd09f9e2356 | Bug #51318 USS: Python 3: with_metaclass 112329dfb94e | Bug #51318 USS: migrate ipaddr → ipaddress 59dfbe7ef7c8 | Bug #51318 USS: Convert __cmp__ to rich comparison univention-system-setup (12.0.2-26) c8cad1727625 | Bug #51318 USS: Add unit test for comparison
Some more changes: univention-system-setup (13.0.3-36) 5b8c1d43db55 | fixup! fixup! Bug #51318: [univention-system-setup]: use ip instead of ifconfig 98c181100c0f | fixup! Bug #51318: [univention-system-setup]: use ip instead of ifconfig b4d1806caf37 | Revert "Bug #51318: temporarily execute UMC module with Python 2 again" 649dd20b492b | Bug #51318: readd Python 2.7 compatibility cc3e711effff | Bug #51318: add missing dependency 71477963ce4d | Bug #51318: temporarily execute UMC module with Python 2 again 6e31fa1d7622 | Bug #51318: [univention-system-setup]: decode() subprocess output 8ae3b4dea318 | fixup! Bug #51318: [univention-system-setup]: migrate to Python 3 dd1a2a28bfc3 | refactor[uss]: Use argument parser
OK: apt install univention-system-setup -t apt OK: dpkg-query -W univention-system-setup # 13.0.3-36A~5.0.0.202204211120 OK: change IPv4 OK: add IPv6 OK: git log --grep Bug\ \#51318 origin/5.0-0..5.0-1 OK: https://univention-dist-jenkins.k8s.knut.univention.de/job/UCS-5.0/job/UCS-5.0-1/job/Installation%20Tests/mode=master-german/58/console OK: isotests/ucs_5.0-1-latest-amd64.iso OK: univention-system-setup.yaml OK: errata-announce -V --only univention-system-setup.yaml FYI: https://www.kernel.org/doc/html/latest/networking/alias.html
Forgot to add the discussed removal of Python 2 support: Done in: univention-system-setup (13.0.3-36) 4e02924e0190 | Bug #51318: [univention-system-setup]: drop Python 2 packages/dependencies
OK: git:4e02924e0190 OK: errata-announce -V --only univention-system-setup.yaml OK: apt install univention-system-setup -t apt OK: dpkg-query -W univention-system-setup # 13.0.3-36A~5.0.0.202205021118 OK: libpython2.7 python-ipaddr python-lxml python-univention-ipcalc OK: gpi lxml OK: gpi ipaddr OK: gpi univention.ipcalc OK: change IPv4 OK: add IPv6 OK: https://univention-dist-jenkins.k8s.knut.univention.de/job/UCS-5.0/job/UCS-5.0-1/job/Installation%20Tests/mode=master-german/lastBuild/console
<https://errata.software-univention.de/#/?erratum=5.0x301>