commit perl-NetAddr-IP for openSUSE:Factory
Hello community, here is the log from the commit of package perl-NetAddr-IP for openSUSE:Factory checked in at 2013-11-27 15:31:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-NetAddr-IP (Old) and /work/SRC/openSUSE:Factory/.perl-NetAddr-IP.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-NetAddr-IP" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-NetAddr-IP/perl-NetAddr-IP.changes 2013-06-13 18:16:44.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-NetAddr-IP.new/perl-NetAddr-IP.changes 2013-11-27 15:31:05.000000000 +0100 @@ -1,0 +2,8 @@ +Fri Oct 4 09:11:17 UTC 2013 - coolo@suse.com + +- updated to 4.071 + add method "canon" by request from <tom.jones@bccx.com> + nth documention error fixed. thanks to Anton tobez@tobez.org + Lite v1.51, add new6FFFF, RFC4291 compliant ipv4->ipV6 new + +------------------------------------------------------------------- Old: ---- NetAddr-IP-4.069.tar.gz New: ---- NetAddr-IP-4.071.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-NetAddr-IP.spec ++++++ --- /var/tmp/diff_new_pack.0PBCpH/_old 2013-11-27 15:31:07.000000000 +0100 +++ /var/tmp/diff_new_pack.0PBCpH/_new 2013-11-27 15:31:07.000000000 +0100 @@ -17,11 +17,11 @@ Name: perl-NetAddr-IP -Version: 4.069 +Version: 4.071 Release: 0 %define cpan_name NetAddr-IP Summary: Manages IPv4 and IPv6 addresses and subnets -License: GPL-2.0+ or ClArtistic +License: GPL-2.0+ or Artistic-1.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/NetAddr-IP/ Source: http://www.cpan.org/authors/id/M/MI/MIKER/%{cpan_name}-%{version}.tar.gz @@ -30,8 +30,8 @@ BuildRequires: perl-macros #BuildRequires: perl(NetAddr::IP) #BuildRequires: perl(NetAddr::IP::InetBase) -#BuildRequires: perl(NetAddr::IP::Lite) >= 1.41 -#BuildRequires: perl(NetAddr::IP::Util) >= 1.46 +#BuildRequires: perl(NetAddr::IP::Lite) >= 1.51 +#BuildRequires: perl(NetAddr::IP::Util) >= 1.50 #BuildRequires: perl(NetAddr::IP::Util_IS) #BuildRequires: perl(NetAddr::IP::UtilPP) #BuildRequires: perl(Socket6) @@ -39,9 +39,9 @@ %description This module provides an object-oriented abstraction on top of IP addresses -or IP subnets, that allows for easy manipulations. Version 4.xx of -NetAdder::IP will work with older versions of Perl and is compatible -with Math::BigInt. +or IP subnets that allows for easy manipulations. Version 4.xx of +NetAddr::IP will work with older versions of Perl and is compatible with +Math::BigInt. The internal representation of all IP objects is in 128 bit IPv6 notation. IPv4 and IPv6 objects may be freely mixed. @@ -64,6 +64,6 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc Artistic Changes Copying TODO +%doc About-NetAddr-IP.txt Artistic Changes Copying TODO %changelog ++++++ NetAddr-IP-4.069.tar.gz -> NetAddr-IP-4.071.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/Changes new/NetAddr-IP-4.071/Changes --- old/NetAddr-IP-4.069/Changes 2013-05-26 00:21:02.000000000 +0200 +++ new/NetAddr-IP-4.071/Changes 2013-09-30 22:41:32.000000000 +0200 @@ -1,5 +1,13 @@ Revision history for Perl extension NetAddr::IP +4.071 Mon Sep 30 13:41:03 PDT 2013 + add method "canon" by request from <tom.jones@bccx.com> + +4.070 Thu Sep 12 12:54:22 PDT 2013 + nth documention error fixed. thanks to Anton tobez@tobez.org + + Lite v1.51, add new6FFFF, RFC4291 compliant ipv4->ipV6 new + 4.069 Sat May 25 15:10:45 PDT 2013 IN Lite.pm v1.50, add =encoding UTF-8 In Util.pm v1.50 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/IP.pm new/NetAddr-IP-4.071/IP.pm --- old/NetAddr-IP-4.069/IP.pm 2013-04-09 21:09:18.000000000 +0200 +++ new/NetAddr-IP-4.071/IP.pm 2013-09-30 22:40:41.000000000 +0200 @@ -5,8 +5,8 @@ use strict; #use diagnostics; use Carp; -use NetAddr::IP::Lite 1.48 qw(Zero Zeros Ones V4mask V4net); -use NetAddr::IP::Util 1.49 qw( +use NetAddr::IP::Lite 1.51 qw(Zero Zeros Ones V4mask V4net); +use NetAddr::IP::Util 1.50 qw( sub128 inet_aton inet_any2n @@ -37,7 +37,7 @@ @ISA = qw(Exporter NetAddr::IP::Lite); -$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.69 $ =~ /\d+/g) }; +$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.71 $ =~ /\d+/g) }; $rfc3021 = 0; @@ -848,6 +848,20 @@ return _compV6($addr); } +=item C<-E<gt>canon()> + +Returns the address part in canonical notation as a string. For +ipV4, this is dotted quad, and is the same as the return value from +"->addr()". For ipV6 it is as per RFC5952, and is the same as the LOWER CASE value +returned by "->short()". + +=cut + +sub canon($) { + my $addr = $_[0]->addr; + return $_[0]->{isv6} ? lc _compV6($addr) : $addr; +} + =item C<-E<gt>full()> Returns the address part in FULL notation for @@ -1322,8 +1336,8 @@ new behavior: NetAddr::IP->new('10/32')->nth(0) == 10.0.0.0/32 NetAddr::IP->new('10.1/32'->nth(0) == 10.0.0.1/32 - NetAddr::IP->new('10/31')->nth(0) == 10.0.0.0/32 - NetAddr::IP->new('10/31')->nth(1) == 10.0.0.1/32 + NetAddr::IP->new('10/31')->nth(0) == 10.0.0.0/31 + NetAddr::IP->new('10/31')->nth(1) == 10.0.0.1/31 NetAddr::IP->new('10/30')->nth(0) == 10.0.0.1/30 NetAddr::IP->new('10/30')->nth(1) == 10.0.0.2/30 NetAddr::IP->new('10/30')->nth(2) == undef diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/Lite/Changes new/NetAddr-IP-4.071/Lite/Changes --- old/NetAddr-IP-4.069/Lite/Changes 2013-05-26 00:19:27.000000000 +0200 +++ new/NetAddr-IP-4.071/Lite/Changes 2013-09-12 21:55:24.000000000 +0200 @@ -1,5 +1,8 @@ Revision history for Perl extension NetAddr::IP::Lite +1.51 Thu Sep 12 12:54:22 PDT 2013 + add new6FFFF, RFC4291 compliant ipv4->ipV6 new + 1.50 Sat May 25 15:10:45 PDT 2013 add =encoding UTF-8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/Lite/Lite.pm new/NetAddr-IP-4.071/Lite/Lite.pm --- old/NetAddr-IP-4.069/Lite/Lite.pm 2013-05-26 00:10:23.000000000 +0200 +++ new/NetAddr-IP-4.071/Lite/Lite.pm 2013-09-12 21:51:53.000000000 +0200 @@ -32,7 +32,7 @@ use vars qw(@ISA @EXPORT_OK $VERSION $Accept_Binary_IP $Old_nth $AUTOLOAD *Zero); -$VERSION = do { my @r = (q$Revision: 1.50 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$VERSION = do { my @r = (q$Revision: 1.51 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; require Exporter; @@ -199,6 +199,7 @@ my $_ones = ~$_zero; my $_v4mask = pack('L4',0xffffffff,0xffffffff,0xffffffff,0); my $_v4net = ~ $_v4mask; +my $_ipv4FFFF = pack('N4',0,0,0xffff,0); sub Zeros() { return $_zero; @@ -508,6 +509,8 @@ =item C<-E<gt>new6([$addr, [ $mask]])> +=item C<-E<gt>new6FFFF([$addr, [ $mask]])> + =item C<-E<gt>new_no([$addr, [ $mask]])> =item C<-E<gt>new_from_aton($netaddr)> @@ -518,9 +521,14 @@ =item C<-E<gt>new_cis6("$addr $mask)> -The first two methods create a new address with the supplied address in +The first three methods create a new address with the supplied address in C<$addr> and an optional netmask C<$mask>, which can be omitted to get -a /32 or /128 netmask for IPv4 / IPv6 addresses respectively. +a /32 or /128 netmask for IPv4 / IPv6 addresses respectively. + +new6FFFF specifically returns an IPv4 address in IPv6 format according to RFC4291 + + new6 ::xxxx:xxxx + new6FFFF ::FFFF:xxxx:xxxx The third method C<new_no> is exclusively for IPv4 addresses and filters improperly formatted @@ -703,6 +711,12 @@ goto &_xnew; } +sub new6FFFF($;$$) { + my $ip = _xnew(1,@_); + $ip->{addr} |= $_ipv4FFFF; + return $ip; +} + sub new_cis($;$$) { my @in = @_; if ( $in[1] && $in[1] =~ m!^(.+)\s+(.+)$! ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/Lite/MANIFEST new/NetAddr-IP-4.071/Lite/MANIFEST --- old/NetAddr-IP-4.069/Lite/MANIFEST 2013-04-09 21:06:02.000000000 +0200 +++ new/NetAddr-IP-4.071/Lite/MANIFEST 2013-09-12 21:57:42.000000000 +0200 @@ -19,6 +19,7 @@ t/contains.t t/copy.t t/firstlast.t +t/ipv4FFFF.t t/lemasklen.t t/loops.t t/lower.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/Lite/README new/NetAddr-IP-4.071/Lite/README --- old/NetAddr-IP-4.069/Lite/README 2013-05-26 00:15:24.000000000 +0200 +++ new/NetAddr-IP-4.071/Lite/README 2013-09-12 21:51:58.000000000 +0200 @@ -187,14 +187,22 @@ "->new([$addr, [ $mask|IPv6 ]])" "->new6([$addr, [ $mask]])" + "->new6FFFF([$addr, [ $mask]])" "->new_no([$addr, [ $mask]])" "->new_from_aton($netaddr)" new_cis and new_cis6 are DEPRECATED "->new_cis("$addr $mask)" "->new_cis6("$addr $mask)" - The first two methods create a new address with the supplied address - in "$addr" and an optional netmask "$mask", which can be omitted to - get a /32 or /128 netmask for IPv4 / IPv6 addresses respectively. + The first three methods create a new address with the supplied + address in "$addr" and an optional netmask "$mask", which can be + omitted to get a /32 or /128 netmask for IPv4 / IPv6 addresses + respectively. + + new6FFFF specifically returns an IPv4 address in IPv6 format + according to RFC4291 + + new6 ::xxxx:xxxx + new6FFFF ::FFFF:xxxx:xxxx The third method "new_no" is exclusively for IPv4 addresses and filters improperly formatted dot quad strings for leading 0's that diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/Lite/t/ipv4FFFF.t new/NetAddr-IP-4.071/Lite/t/ipv4FFFF.t --- old/NetAddr-IP-4.069/Lite/t/ipv4FFFF.t 1970-01-01 01:00:00.000000000 +0100 +++ new/NetAddr-IP-4.071/Lite/t/ipv4FFFF.t 2013-09-12 21:53:40.000000000 +0200 @@ -0,0 +1,18 @@ + +#use diagnostics; +use NetAddr::IP::Lite; + +$| = 1; + +print "1..1\n"; + +my $test = 1; +sub ok() { + print 'ok ',$test++,"\n"; +} + +my $ip = new6FFFF NetAddr::IP::Lite('127.0.0.1'); +my $exp = '0:0:0:0:0:FFFF:7F00:1/128'; +print "got: $ip\nexp: $exp\nnot " + unless "$ip" eq $exp; +&ok; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/MANIFEST new/NetAddr-IP-4.071/MANIFEST --- old/NetAddr-IP-4.069/MANIFEST 2013-05-26 00:24:11.000000000 +0200 +++ new/NetAddr-IP-4.071/MANIFEST 2013-09-30 22:43:32.000000000 +0200 @@ -8,6 +8,7 @@ Makefile.PL TODO docs/rfc1884.txt +t/canon.t t/constants.t t/full.t t/full6.t @@ -59,6 +60,7 @@ Lite/t/contains.t Lite/t/copy.t Lite/t/firstlast.t +Lite/t/ipv4FFFF.t Lite/t/lemasklen.t Lite/t/loops.t Lite/t/lower.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/META.yml new/NetAddr-IP-4.071/META.yml --- old/NetAddr-IP-4.069/META.yml 2013-05-26 00:24:11.000000000 +0200 +++ new/NetAddr-IP-4.071/META.yml 2013-09-30 22:43:32.000000000 +0200 @@ -1,6 +1,6 @@ --- #YAML:1.0 name: NetAddr-IP -version: 4.069 +version: 4.071 abstract: Manages IPv4 and IPv6 addresses and subnets license: ~ author: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NetAddr-IP-4.069/t/canon.t new/NetAddr-IP-4.071/t/canon.t --- old/NetAddr-IP-4.069/t/canon.t 1970-01-01 01:00:00.000000000 +0100 +++ new/NetAddr-IP-4.071/t/canon.t 2013-09-30 22:22:31.000000000 +0200 @@ -0,0 +1,23 @@ +use Test::More; + +my %cases = +( + '127.1' => '127.0.0.1', + 'DEAD:BEEF::1' => 'dead:beef::1', + + '1234:5678:90AB:CDEF:0123:4567:890A:BCDE' + => '1234:5678:90ab:cdef:123:4567:890a:bcde', +); + +my $tests = keys %cases; +plan tests => 1 + $tests; + +SKIP: { + use_ok('NetAddr::IP') or skip "Failed to load NetAddr::IP", $tests; + for my $c (sort keys %cases) + { + my $ip = new NetAddr::IP $c; + my $rv = $ip->canon; + is($rv, $cases{$c}, "canon($c ) returns $rv"); + } +} -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de