Univention Bugzilla – Bug 22511
univention-ipcalc ablösen
Last modified: 2021-09-29 17:10:20 CEST
Spätestens mit der Einführung von IPv6 reicht univention-ipcalc nicht mehr aus. Da gibt es bestimmt ein fertiges Python Modul. Alle Stellen in denen univention-ipcalc verwendet wird, müssen dann entsprechend angepasst werden.
In univention-dependency-dummy wurde ein "Provides: univention-ipcalc" aufgenommen, um vorab den DVD-Build zu ermöglichen.
*** Bug 2782 has been marked as a duplicate of this bug. ***
Ich habe zunächst die alte Version übernommen, damit der Installer bzw. die Joinskripte wieder funktionieren.
Es gibt in UCS 3.0 das Paket python-ipaddr, welches das Python-Modul "ipaddr" zum verarbeiten von IP-Adressen bereitstellt.
Derzeit funktioniert das Tool, für IPv6 gibt es einen separaten Bug.
Irgendwie ist (zumindest in meinen Augen) die parallele Verwendung und Pflege von univention-ipcalc6 und univention-ipcalc nicht optimal. Beide Scripte haben eigene und evtl. sich überschneidende Bugs und müssten gefixed werden. Ggf. ist es einfacher und besser zu durchschauen wenn die Scripte zu einem zusammengeführt werden. bug28143, bug25626
univention-ipcalc{,6} --calcdns is used to create DNS reverse zones in UDM. This is often done indirectly via /usr/share/univention-directory-manager-tools/univention-dnsedit UDM expects the network name as "subnet" in forward notation (1.2, 0000:1111:2222:3333) and internally converts that to the backward notation as used in DNS (2.1.in-addr.arpa, 3.3.3.3.2.2.2.2.1.1.1.1.0.0.0.0.ip6.arpa) --output network Network address in forward notation. IPv4: 0-4 octets IPv6: 0-32 nibbles --output reverse Network address in forward notation suitable for DNS. IPv4: 1-3 octets IPV6: 1-31 nibbles --output pointer Host address in reverse notation. IPv1: 3-1 octets IPv6: 31-1 nibbles base/univention-system-setup/usr/lib/univention-system-setup/scripts/net/10interfaces base/univention-system-setup/usr/lib/univention-system-setup/scripts/net/11ipv6interfaces ipcalc{,6} {reverse,pointer} using univention-dnsedit to create reverse zone and ptr entry within. management/univention-join/univention-server-join ipcalc network using udm to create ptr entry for host BUG: this is the last user of the old tool BUG: "--output network" is wrong for an /32 IPv4 subnet management/univention-ldap/10univention-ldap-server.inst ipcalc6 reverse using univention-dnsedit to create reverse zone services/univention-bind/05univention-bind.inst ipcalc6 {reverse,pointer} using univention-dnsedit to create reverse zone and ptr entry within. Therefore univention-server-join is the last user of the old univention-ipcalc, and where it is used wrong: "--output network" is wrong for an /32 IPv4 networks. (Bug #17413, Bug #28143)
(In reply to comment #6) > Irgendwie ist (zumindest in meinen Augen) die parallele Verwendung und Pflege > von univention-ipcalc6 und univention-ipcalc nicht optimal. univention-ipcal6 verwendet das python-ipaddr-Modul. Da es im Installer aufgerufen wird wollte man vermutlich nicht das Modul auch noch dem Installer hinzufügen? Bug-Kompatibel sind beide Versionen eh nicht. univention-ipcalc hat auch noch einen nicht-"--dnscalc"-Modus, der die Adressen auf Bit-Ebene statt auf Octet-Ebene berechnet (IPv6 kann univention-ipcaclc nicht; da sind es dann Nibbles)
univention-server-join hat als letztes univention-join benutzt und wurde im Rahmen von svn34832 univention-ipcalc6 umgestellt. Ein member-server konnte mit Netmask /8, /16, /24 und /32 erfolgreich gejoint werden; ebenso ein IPv6 Member-Server
Does it still exists? Should it be removed?
(In reply to Florian Best from comment #10) > Does it still exists? Should it be removed? Still exists and should be removed.
https://git.knut.univention.de/univention/ucs/-/merge_requests/129
[5.0-0] 0b4579eccd refactor[ipcalc]: Remove univention-ipcalc base/univention-ipcalc/README.md | 2 +- base/univention-ipcalc/debian/changelog | 10 +- base/univention-ipcalc/debian/univention-ipcalc.install | 1 - base/univention-ipcalc/tests/test-all.sh | 12 +- base/univention-ipcalc/tests/test-univention-ipcalc.sh | 38 +++--- base/univention-ipcalc/univention-ipcalc | 227 ------------------------------------ doc/errata/staging/univention-ipcalc.yml | 10 ++ 7 files changed, 39 insertions(+), 261 deletions(-) [5.0-0] 2720971801 fix[uss] Fix dependency on python-univention-ipcalc base/univention-system-setup/debian/changelog | 6 ++++++ base/univention-system-setup/debian/control | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) Package: univention-system-setup Version: 13.0.3-35A~5.0.0.202109261332 Branch: ucs_5.0-0 Scope: errata5.0-0 Package: univention-ipcalc Version: 11.0.0-2A~5.0.0.202109261339 Branch: ucs_5.0-0 Scope: errata5.0-0 [5.0-0] bd2ddb22f0 Bug #22511: univention-ipcalc 11.0.0-2A~5.0.0.202109261339 doc/errata/staging/{univention-ipcalc.yml => univention-ipcalc.yaml} | 2 +- doc/errata/staging/univention-system-setup.yaml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
FYI: UCS@school still used it: ucs-test-ucsschool/modules/univention/testing/ucsschool/importnetworks.py: "/usr/bin/univention-ipcalc", I fixed it via: ucs-test-ucsschool (7.3.4) 87d42d5292cb | Bug #22511: use univention-ipcalc6
I find the name strange: univention-ipcalc6 is also for IPv4 addresses. Why not renaming everything to univention-ipcalc? But not so important for me. OK: removal of univention-ipcalc
(In reply to Florian Best from comment #15) > I find the name strange: univention-ipcalc6 is also for IPv4 addresses. Why > not renaming everything to univention-ipcalc? 1. univention-ipcalc was the old tool *only* supporting IPv4 2. univention-ipcalc6 was added to support IPv6 in addition 3. All other code was changed to use univention-ipcalc6 (Think of the `6` as meaning IPv6 *capable*) Changing the name would require changing all callers, e.g. univention-join univention-ldap univention-management-console-module-adtakeover univention-bind ucs-test Too much work for too little gain. (Better remove univention-ipcalc completely and use Py3:ipaddress directly.)
<https://errata.software-univention.de/#/?erratum=5.0x108>