Bug 22511 - univention-ipcalc ablösen
univention-ipcalc ablösen
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Network
UCS 5.0
Other Linux
: P5 enhancement (vote)
: UCS 5.0-0-errata
Assigned To: Philipp Hahn
Florian Best
:
: 2782 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-13 07:19 CEST by Stefan Gohmann
Modified: 2021-09-29 17:10 CEST (History)
6 users (show)

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): Cleanup
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2011-05-13 07:19:13 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.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2011-07-14 17:28:58 CEST
In univention-dependency-dummy wurde ein "Provides: univention-ipcalc" aufgenommen, um vorab den DVD-Build zu ermöglichen.
Comment 2 Stefan Gohmann univentionstaff 2011-08-01 13:36:57 CEST
*** Bug 2782 has been marked as a duplicate of this bug. ***
Comment 3 Stefan Gohmann univentionstaff 2011-08-01 13:55:08 CEST
Ich habe zunächst die alte Version übernommen, damit der Installer bzw. die Joinskripte wieder funktionieren.
Comment 4 Janek Walkenhorst univentionstaff 2011-08-01 15:03:38 CEST
Es gibt in UCS 3.0 das Paket python-ipaddr, welches das Python-Modul "ipaddr" zum verarbeiten von IP-Adressen bereitstellt.
Comment 5 Stefan Gohmann univentionstaff 2011-10-17 10:28:21 CEST
Derzeit funktioniert das Tool, für IPv6 gibt es einen separaten Bug.
Comment 6 Janis Meybohm univentionstaff 2012-08-07 08:36:56 CEST
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
Comment 7 Philipp Hahn univentionstaff 2012-08-07 13:16:23 CEST
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)
Comment 8 Philipp Hahn univentionstaff 2012-08-07 13:19:16 CEST
(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)
Comment 9 Philipp Hahn univentionstaff 2012-08-14 19:30:27 CEST
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
Comment 10 Florian Best univentionstaff 2017-02-09 17:41:26 CET
Does it still exists? Should it be removed?
Comment 11 Philipp Hahn univentionstaff 2017-02-09 17:48:35 CET
(In reply to Florian Best from comment #10)
> Does it still exists? Should it be removed?

Still exists and should be removed.
Comment 13 Philipp Hahn univentionstaff 2021-09-26 13:47:54 CEST
[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(-)
Comment 14 Florian Best univentionstaff 2021-09-27 10:45:08 CEST
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
Comment 15 Florian Best univentionstaff 2021-09-27 10:49:35 CEST
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
Comment 16 Philipp Hahn univentionstaff 2021-09-27 12:38:08 CEST
(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.)