Hello community, here is the log from the commit of package perl-File-Tail for openSUSE:Factory checked in at 2015-04-23 08:04:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-File-Tail (Old) and /work/SRC/openSUSE:Factory/.perl-File-Tail.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-File-Tail" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-File-Tail/perl-File-Tail.changes 2015-04-21 10:52:41.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-File-Tail.new/perl-File-Tail.changes 2015-04-23 08:04:16.000000000 +0200 @@ -1,0 +2,11 @@ +Wed Apr 22 06:13:58 UTC 2015 - co...@suse.com + +- updated to 1.2 + see /usr/share/doc/packages/perl-File-Tail/Changes + + + 1.2 Break the infinite loop that can result when the average length of lines + causes the attempt to fill the tail buffer to fill with the exact same + or even smaller number of lines. + +------------------------------------------------------------------- Old: ---- File-Tail-1.1.tar.gz New: ---- File-Tail-1.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-File-Tail.spec ++++++ --- /var/tmp/diff_new_pack.Sst5fT/_old 2015-04-23 08:04:16.000000000 +0200 +++ /var/tmp/diff_new_pack.Sst5fT/_new 2015-04-23 08:04:16.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-File-Tail -Version: 1.1 +Version: 1.2 Release: 0 %define cpan_name File-Tail Summary: Perl extension for reading from continously updated files ++++++ File-Tail-1.1.tar.gz -> File-Tail-1.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Tail-1.1/Changes new/File-Tail-1.2/Changes --- old/File-Tail-1.1/Changes 2015-04-16 16:51:03.000000000 +0200 +++ new/File-Tail-1.2/Changes 2015-04-21 14:57:29.000000000 +0200 @@ -115,3 +115,7 @@ move files around that are opened. (Steffen Mueller) Due to using sysread and friends, there were newline problems on win32. That should be fixed now. (Steffen Mueller) + +1.2 Break the infinite loop that can result when the average length of lines + causes the attempt to fill the tail buffer to fill with the exact same + or even smaller number of lines. \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Tail-1.1/META.json new/File-Tail-1.2/META.json --- old/File-Tail-1.1/META.json 2015-04-18 20:58:17.000000000 +0200 +++ new/File-Tail-1.2/META.json 2015-04-21 16:05:24.000000000 +0200 @@ -40,5 +40,5 @@ } }, "release_status" : "stable", - "version" : "1.1" + "version" : "1.2" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Tail-1.1/META.yml new/File-Tail-1.2/META.yml --- old/File-Tail-1.1/META.yml 2015-04-18 20:58:16.000000000 +0200 +++ new/File-Tail-1.2/META.yml 2015-04-21 16:05:24.000000000 +0200 @@ -22,4 +22,4 @@ FileHandle: '0' IO::Seekable: '0' Time::HiRes: '1.12' -version: '1.1' +version: '1.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Tail-1.1/Tail.pm new/File-Tail-1.2/Tail.pm --- old/File-Tail-1.1/Tail.pm 2015-04-18 20:57:01.000000000 +0200 +++ new/File-Tail-1.2/Tail.pm 2015-04-21 16:05:24.000000000 +0200 @@ -11,7 +11,7 @@ # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. -$VERSION = '1.1'; +$VERSION = '1.2'; # Preloaded methods go here. @@ -287,44 +287,44 @@ # Sets {tail} to value of {reset_tail}; effect is that first call # uses {tail} and subsequent calls use {reset_tail}. sub position { - my $object=shift; - $object->{"endpos"}=sysseek($object->{handle},0,SEEK_END); - unless ($object->{"tail"}) { - $object->{endpos}=$object->{curpos}= - sysseek($object->{handle},0,SEEK_END); - } elsif ($object->{"tail"}<0) { - $object->{endpos}=sysseek($object->{handle},0,SEEK_END); - $object->{curpos}=sysseek($object->{handle},0,SEEK_SET); - } else { - my $crs=0; - my $maxlen=sysseek($object->{handle},0,SEEK_END); - while ($crs<$object->{"tail"}+1) { - my $avlen=length($object->{"buffer"})/($crs+1); - $avlen=80 unless $avlen; - my $calclen=$avlen*$object->{"tail"}; - $calclen+=1024 if $calclen<=length($object->{"buffer"}); - $calclen=$maxlen if $calclen>$maxlen; - $object->{curpos}=sysseek($object->{handle},-$calclen,SEEK_END); - sysread($object->{handle},$object->{"buffer"}, - $calclen); - $object->{"buffer"} =~ s/\015\012/\n/g if $Is_Win32; - $object->{curpos}=sysseek($object->{handle},0,SEEK_CUR); - $crs=$object->{"buffer"}=~tr/\n//; - last if ($calclen>=$maxlen); - } - $object->{curpos}=sysseek($object->{handle},0,SEEK_CUR); - $object->{endpos}=sysseek($object->{handle},0,SEEK_END); - if ($crs>$object->{"tail"}) { - my $toskip=$crs-$object->{"tail"}; - my $pos; - $pos=index($object->{"buffer"},"\n"); - while (--$toskip) { - $pos=index($object->{"buffer"},"\n",$pos+1); - } - $object->{"buffer"}=substr($object->{"buffer"},$pos+1); - } + my $object=shift; + $object->{"endpos"}=sysseek($object->{handle},0,SEEK_END); + unless ($object->{"tail"}) { + $object->{endpos}=$object->{curpos}= + sysseek($object->{handle},0,SEEK_END); + } elsif ($object->{"tail"}<0) { + $object->{endpos}=sysseek($object->{handle},0,SEEK_END); + $object->{curpos}=sysseek($object->{handle},0,SEEK_SET); + } else { + my $crs=0; + my $maxlen=sysseek($object->{handle},0,SEEK_END); + while ($crs<$object->{"tail"}+1) { + my $avlen=length($object->{"buffer"})/($crs+1); + $avlen=80 unless $avlen; + my $calclen=$avlen*$object->{"tail"}; + $calclen=length($object->{tail})+1024 if $calclen<=length($object->{"tail"}); + $calclen=$maxlen if $calclen>$maxlen; + $object->{curpos}=sysseek($object->{handle},-$calclen,SEEK_END); + sysread($object->{handle},$object->{"buffer"}, + $calclen); + $object->{"buffer"} =~ s/\015\012/\n/g if $Is_Win32; + $object->{curpos}=sysseek($object->{handle},0,SEEK_CUR); + $crs=$object->{"buffer"}=~tr/\n//; + last if ($calclen>=$maxlen); + } + $object->{curpos}=sysseek($object->{handle},0,SEEK_CUR); + $object->{endpos}=sysseek($object->{handle},0,SEEK_END); + if ($crs>$object->{"tail"}) { + my $toskip=$crs-$object->{"tail"}; + my $pos; + $pos=index($object->{"buffer"},"\n"); + while (--$toskip) { + $pos=index($object->{"buffer"},"\n",$pos+1); + } + $object->{"buffer"}=substr($object->{"buffer"},$pos+1); } - $object->{"tail"}=$object->{"reset_tail"}; + } + $object->{"tail"}=$object->{"reset_tail"}; } # Tries to open or reopen the file; failure is an error unless diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/File-Tail-1.1/Tail.pm.debug new/File-Tail-1.2/Tail.pm.debug --- old/File-Tail-1.1/Tail.pm.debug 2015-04-16 17:12:50.000000000 +0200 +++ new/File-Tail-1.2/Tail.pm.debug 2015-04-21 16:05:13.000000000 +0200 @@ -11,7 +11,7 @@ # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. -$VERSION = '1.1'; +$VERSION = '1.2'; # Preloaded methods go here. @@ -287,47 +287,47 @@ # Sets {tail} to value of {reset_tail}; effect is that first call # uses {tail} and subsequent calls use {reset_tail}. sub position { - my $object=shift; - $object->{"endpos"}=sysseek($object->{handle},0,SEEK_END); - unless ($object->{"tail"}) { - $object->logit("Start reading at end of file"); - $object->{endpos}=$object->{curpos}= - sysseek($object->{handle},0,SEEK_END); - } elsif ($object->{"tail"}<0) { - $object->logit(" Start reading at start of file"); - $object->{endpos}=sysseek($object->{handle},0,SEEK_END); - $object->{curpos}=sysseek($object->{handle},0,SEEK_SET); - } else { - $object->logit(" Return ".$object->{"tail"}." lines."); - my $crs=0; - my $maxlen=sysseek($object->{handle},0,SEEK_END); - while ($crs<$object->{"tail"}+1) { - my $avlen=length($object->{"buffer"})/($crs+1); - $avlen=80 unless $avlen; - my $calclen=$avlen*$object->{"tail"}; - $calclen+=1024 if $calclen<=length($object->{"buffer"}); - $calclen=$maxlen if $calclen>$maxlen; - $object->{curpos}=sysseek($object->{handle},-$calclen,SEEK_END); - sysread($object->{handle},$object->{"buffer"}, - $calclen); - $object->{"buffer"} =~ s/\015\012/\n/g if $Is_Win32; - $object->{curpos}=sysseek($object->{handle},0,SEEK_CUR); - $crs=$object->{"buffer"}=~tr/\n//; - last if ($calclen>=$maxlen); - } - $object->{curpos}=sysseek($object->{handle},0,SEEK_CUR); - $object->{endpos}=sysseek($object->{handle},0,SEEK_END); - if ($crs>$object->{"tail"}) { - my $toskip=$crs-$object->{"tail"}; - my $pos; - $pos=index($object->{"buffer"},"\n"); - while (--$toskip) { - $pos=index($object->{"buffer"},"\n",$pos+1); - } - $object->{"buffer"}=substr($object->{"buffer"},$pos+1); - } + my $object=shift; + $object->{"endpos"}=sysseek($object->{handle},0,SEEK_END); + unless ($object->{"tail"}) { + $object->logit("Start reading at end of file"); + $object->{endpos}=$object->{curpos}= + sysseek($object->{handle},0,SEEK_END); + } elsif ($object->{"tail"}<0) { + $object->logit(" Start reading at start of file"); + $object->{endpos}=sysseek($object->{handle},0,SEEK_END); + $object->{curpos}=sysseek($object->{handle},0,SEEK_SET); + } else { + $object->logit(" Return ".$object->{"tail"}." lines."); + my $crs=0; + my $maxlen=sysseek($object->{handle},0,SEEK_END); + while ($crs<$object->{"tail"}+1) { + my $avlen=length($object->{"buffer"})/($crs+1); + $avlen=80 unless $avlen; + my $calclen=$avlen*$object->{"tail"}; + $calclen=length($object->{tail})+1024 if $calclen<=length($object->{"tail"}); + $calclen=$maxlen if $calclen>$maxlen; + $object->{curpos}=sysseek($object->{handle},-$calclen,SEEK_END); + sysread($object->{handle},$object->{"buffer"}, + $calclen); + $object->{"buffer"} =~ s/\015\012/\n/g if $Is_Win32; + $object->{curpos}=sysseek($object->{handle},0,SEEK_CUR); + $crs=$object->{"buffer"}=~tr/\n//; + last if ($calclen>=$maxlen); + } + $object->{curpos}=sysseek($object->{handle},0,SEEK_CUR); + $object->{endpos}=sysseek($object->{handle},0,SEEK_END); + if ($crs>$object->{"tail"}) { + my $toskip=$crs-$object->{"tail"}; + my $pos; + $pos=index($object->{"buffer"},"\n"); + while (--$toskip) { + $pos=index($object->{"buffer"},"\n",$pos+1); + } + $object->{"buffer"}=substr($object->{"buffer"},$pos+1); } - $object->{"tail"}=$object->{"reset_tail"}; + } + $object->{"tail"}=$object->{"reset_tail"}; } # Tries to open or reopen the file; failure is an error unless