debian/0000755000000000000000000000000012062730125007164 5ustar debian/rules0000755000000000000000000000063012062730125010243 0ustar #!/usr/bin/make -f PKG:=$(shell dh_listpackages) TMP:=$(CURDIR)/debian/$(PKG) EG:=$(TMP)/usr/share/doc/$(PKG)/examples %: dh $@ override_dh_install: dh_install rm -rf $(TMP)/usr/bin override_dh_installexamples: dh_installexamples sed -i -e'1s|#!perl|#!/usr/bin/perl|' $(EG)/ip* override_dh_auto_test: mkdir $(CURDIR)/testout dh_auto_test override_dh_clean: dh_clean rm -rf $(CURDIR)/testout debian/control0000644000000000000000000000200212062730125010561 0ustar Source: libnet-ip-perl Maintainer: Debian Perl Group Uploaders: Nicholas Bamber , Xavier Guimard Section: perl Priority: optional Build-Depends: debhelper (>= 8) Build-Depends-Indep: perl Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libnet-ip-perl.git Vcs-Git: git://git.debian.org/pkg-perl/packages/libnet-ip-perl.git Homepage: http://search.cpan.org/dist/Net-IP/ Package: libnet-ip-perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends} Description: Perl extension for manipulating IPv4/IPv6 addresses Net::IP provides functions to deal with IPv4/IPv6 addresses. The module can be used as a class, allowing the user to instantiate IP objects, which can be single IP addresses, prefixes, or ranges of addresses. There is also a procedural way of accessing most of the functions. Most subroutines can take either IPv4 or IPv6 addresses transparently. debian/source/0000755000000000000000000000000012062730125010464 5ustar debian/source/format0000644000000000000000000000001412062730125011672 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000453312062730125011043 0ustar libnet-ip-perl (1.26-1) unstable; urgency=low [ Ansgar Burchardt ] * debian/control: Convert Vcs-* fields to Git. [ Xavier Guimard ] * Imported Upstream version 1.26 * Bump Standards-Version to 3.9.4 * Use debhelper 8 * Update debian/copyright format to 1.0 * Update patches offsets * Add pod-error.patch (missing lines) -- Xavier Guimard Fri, 14 Dec 2012 23:15:49 +0100 libnet-ip-perl (1.25-3) unstable; urgency=low * Took package over for the Debian Perl Group (Closes: #625260) * Reviewed long description * Raised standards versions to 3.9.2 * Raised debhelper version and compat level to 7 * Removed version in perl dependency * Removed README file * Refreshed debian/rules and add debian/source/format * Added Homepage field to debian/control * Added rules to fix shebang in example scripts * Refreshed copyright * Added patch to fix spelling errors and reviewed ipcount patch * Added patch to fix issue with ip_reverse (Closes: #623681) * Standardized watch file -- Nicholas Bamber Wed, 11 May 2011 22:21:02 +0100 libnet-ip-perl (1.25-2) unstable; urgency=medium * Correct a bug in the ipcount script which prevents the use of option -d; thanks to Thomas Parmelan for reporting the bug and providing a patch (Closes: Bug#397941) * Urgency medium to fix an annoying bug in time for Etch. * Upload sponsored thanks to Anibal Monsalve Salazar -- Frederic Schutz Fri, 10 Nov 2006 20:20:26 +0100 libnet-ip-perl (1.25-1) unstable; urgency=low * New upstream release (Closes: Bug#381247) * Updated to standards 3.7.2 (nothing to change) -- Frederic Schutz Sat, 5 Aug 2006 00:57:25 +0200 libnet-ip-perl (1.24-1) unstable; urgency=low * New upstream release (Closes: Bug#329604) * Misc cleanups, thanks to Florian Ernst * Updated to standards 3.6.2 (nothing to change) -- Frederic Schutz Tue, 15 Nov 2005 20:46:47 +0100 libnet-ip-perl (1.20-2) unstable; urgency=low * Updated the documentation to remove inconsistencies with the code closes: Bug#224835 -- Frederic Schutz Wed, 4 Aug 2004 01:59:49 +1000 libnet-ip-perl (1.20-1) unstable; urgency=low * Initial Release, closes: Bug#209349 -- Frederic Schutz Tue, 9 Sep 2003 22:08:59 +1000 debian/compat0000644000000000000000000000000212062730125010362 0ustar 8 debian/README.Debian0000644000000000000000000000102212062730125011220 0ustar libnet-ip-perl for Debian ------------------------- The original program provides 2 Perl scripts called ipcount and iptab. In the Debian package, they are provided as examples on the use of the Net::IP module, and can be found in directory /usr/share/doc/libnet-ip-perl/examples. If you believe that these scripts could be useful to a wider audience (i.e. not only as an example), feel free to submit a wishlist bug and I'll put them in /usr/bin instead. -- Frederic Schutz Sun, 7 Sep 2003 13:34:55 +1000 debian/patches/0000755000000000000000000000000012062730125010613 5ustar debian/patches/spelling.patch0000644000000000000000000000256012062730125013454 0ustar Author: Nicholas Bamber Subject: spelling mistakes Bug: https://rt.cpan.org/Ticket/Display.html?id=81988 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=81988 Reviewed-By: Xavier Guimard Last-Update: 2012-12-14 --- a/IP.pm +++ b/IP.pm @@ -1233,7 +1233,7 @@ # Purpose : Split a prefix into IP and prefix length # Comments : If it was passed a simple IP, it just returns it # Params : Prefix -# Returns : IP, optionnaly length of prefix +# Returns : IP, optionally length of prefix sub ip_splitprefix { my $prefix = shift; @@ -2086,7 +2086,7 @@ Return the current object error string. The error string is set whenever one of the methods produces an error. Also, a global, class-wide B -function is avaliable. +function is available. Cerror());> @@ -2409,7 +2409,7 @@ If it was passed a simple IP, it just returns it. Params : Prefix - Returns : IP, optionnaly length of prefix + Returns : IP, optionally length of prefix C<($ip,$len) = ip_splitprefix ($prefix)> @@ -2658,7 +2658,7 @@ The Math::BigInt library is needed for functions that use integers. These are ip_inttobin, ip_bintoint, and the size method. In a next version, -Math::BigInt will become optionnal. +Math::BigInt will become optional. =head1 AUTHORS debian/patches/pod-error.patch0000644000000000000000000000060512062730125013546 0ustar Description: Fix little POD error Author: Xavier Guimard Bug: https://rt.cpan.org/Ticket/Display.html?id=81988 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=81988 Last-Update: 2012-12-14 --- a/IP.pm +++ b/IP.pm @@ -2005,7 +2005,9 @@ sub ip_auth { 1; __END__ + =encoding utf8 + =head1 NAME Net::IP - Perl extension for manipulating IPv4/IPv6 addresses debian/patches/series0000644000000000000000000000007612062730125012033 0ustar spelling.patch ipcount.patch ip_reverse.patch pod-error.patch debian/patches/ip_reverse.patch0000644000000000000000000000317312062730125014003 0ustar Author: Nicholas Bamber Bug: http://rt.cpan.org/Public/Bug/Display.html?d=42793 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623681 Subject: ip_reverse() for IPv4 ignores prefixlen parameter The problem particularly occurs where there are a lot of zeros in the less significant quads. You can use a /number to force retention of those quads in the reversed address but the code was ignoring that instruction. There is some ambiguity over what should happen when the number of bits specified does not fall on a boundary. I have tested with Net::IP::XS and tried to follow what they do. Last-Update: 2011-05-11 --- /dev/null +++ b/t/reverse_ip.t @@ -0,0 +1,13 @@ +use Test::More tests=>4; +use Net::IP; + +my $obj = Net::IP->new('10.10.0.0/31'); +is($obj->reverse_ip, '0.10.10.in-addr.arpa.', 'reverse_ip'); +$obj->set('192.168.0.0/24'); +is($obj->reverse_ip, '0.168.192.in-addr.arpa.', 'reverse_ip'); +$obj->set('192.0.0.0/24'); +is($obj->reverse_ip, '0.0.192.in-addr.arpa.', 'reverse_ip'); +$obj->set('192.0.0.0/32'); +is($obj->reverse_ip, '0.0.0.192.in-addr.arpa.', 'reverse_ip'); + + --- a/IP.pm +++ b/IP.pm @@ -1843,12 +1843,13 @@ if ($ip_version == 4) { my @quads = split /\./, $ip; - my $no_quads = ($len / 8); + my $no_quads = 4 - int($len / 8); my @reverse_quads = reverse @quads; - while (@reverse_quads and $reverse_quads[0] == 0) { + while (@reverse_quads and $reverse_quads[0] == 0 and $no_quads > 0) { shift(@reverse_quads); + --$no_quads; } return join '.', @reverse_quads, 'in-addr', 'arpa.'; debian/patches/ipcount.patch0000644000000000000000000000137612062730125013324 0ustar Author: Thomas Parmelan Subject: -d option causes fatal error Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=397941 Bug: http://rt.cpan.org/Ticket/Display.html?id=19759 Last-Update: 2011-05-03 Reviewed-by: Nicholas Bamber --- a/ipcount +++ b/ipcount @@ -77,7 +77,7 @@ while ($current->bincomp ('lt', $last)) { - $new_ip->set($current->last_ip.'+'.$size) or die (Error()); + $new_ip->set($current->last_ip.' + '.$size) or die (Error()); print $new_ip->print,"\n"; if ($opts{r}) @@ -85,7 +85,7 @@ print $new_ip->reverse_ip,"\n"; } - $current->set($new_ip->last_ip .'+ 1') or die (Error()); + $current->set($new_ip->last_ip .' + 1') or die (Error()); $count++; } debian/copyright0000644000000000000000000000421212062730125011116 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Net-IP Source: http://search.cpan.org/dist/Net-IP/ Upstream-Contact: Manuel Valente Files: * Copyright: 1999-2000, RIPE NCC License: Artistic or GPL-1+ Files: ipcount Copyright: 2000, RIPE NCC License: MIT Files: IP.pm Copyright: 1999-2002, RIPE NCC License: MIT Files: debian/* Copyright: 2003-2006, Frederic Schutz 2011, Nicholas Bamber 2012, Xavier Guimard License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. License: MIT All Rights Reserved . Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. . THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. debian/watch0000644000000000000000000000015012062730125010211 0ustar version=3 http://search.cpan.org/dist/Net-IP/ .*/Net-IP-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian/libnet-ip-perl.examples0000644000000000000000000000001612062730125013544 0ustar ipcount iptab