Hello community,

here is the log from the commit of package perl-Compress-Bzip2 for 
openSUSE:Factory checked in at 2015-04-18 10:40:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Compress-Bzip2 (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Compress-Bzip2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Compress-Bzip2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Compress-Bzip2/perl-Compress-Bzip2.changes  
2015-02-10 20:21:31.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-Compress-Bzip2.new/perl-Compress-Bzip2.changes 
    2015-04-18 10:40:37.000000000 +0200
@@ -1,0 +2,17 @@
+Thu Apr 16 21:31:43 UTC 2015 - [email protected]
+
+- updated to 2.22
+   see /usr/share/doc/packages/perl-Compress-Bzip2/Changes
+
+  
+  2.21 2015-02-17 rurban
+     - Add leaktrace test
+     - Add .gitignore
+  
+  2.22 2015-02-17 rurban
+     - Fixed huge decompress memory leak, leaking every single XS outbut 
buffer.
+     - Better memory leak testcase with Memory::Dump, t/090-memory-usage.pl
+       (RT #102211 by Nick Koston)
+     - clarify docs that deflate = compress, inflate = uncompress
+
+-------------------------------------------------------------------

Old:
----
  Compress-Bzip2-2.20.tar.gz

New:
----
  Compress-Bzip2-2.22.tar.gz
  cpanspec.yml

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Compress-Bzip2.spec ++++++
--- /var/tmp/diff_new_pack.tntGZI/_old  2015-04-18 10:40:37.000000000 +0200
+++ /var/tmp/diff_new_pack.tntGZI/_new  2015-04-18 10:40:37.000000000 +0200
@@ -17,14 +17,15 @@
 
 
 Name:           perl-Compress-Bzip2
-Version:        2.20
+Version:        2.22
 Release:        0
 %define cpan_name Compress-Bzip2
 Summary:        Interface to Bzip2 compression library
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Compress-Bzip2/
-Source:         
http://www.cpan.org/authors/id/R/RU/RURBAN/%{cpan_name}-%{version}.tar.gz
+Source0:        
http://www.cpan.org/authors/id/R/RU/RURBAN/%{cpan_name}-%{version}.tar.gz
+Source1:        cpanspec.yml
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
@@ -32,9 +33,10 @@
 Recommends:     perl(Compress::Zlib) >= 1.19
 Recommends:     perl(IO::Compress::Bzip2) >= 2.060
 %{perl_requires}
-# MANUAL
+# MANUAL BEGIN
 BuildRequires:  libbz2-devel
 Requires:       bzip2
+# MANUAL END
 
 %description
 The _Compress::Bzip2_ module provides a Perl interface to the *bzip2*

++++++ Compress-Bzip2-2.20.tar.gz -> Compress-Bzip2-2.22.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/.gitignore 
new/Compress-Bzip2-2.22/.gitignore
--- old/Compress-Bzip2-2.20/.gitignore  1970-01-01 01:00:00.000000000 +0100
+++ new/Compress-Bzip2-2.22/.gitignore  2015-02-19 10:55:51.000000000 +0100
@@ -0,0 +1,45 @@
+/.gdbinit
+*~
+.bash_history
+Bzip2.bs
+Bzip2.c
+Bzip2.o
+Compress-Bzip2-*.tar.gz
+Debian_CPANTS.txt
+MANIFEST.files
+META.yml
+MYMETA.json
+MYMETA.yml
+Makefile
+Makefile.old
+blib/
+bzlib-src/Makefile.old
+const-c.inc
+const-xs.inc
+/log.*
+pm_to_blib
+show_bzversion
+t/011-tmp-sample.bz2
+t/020-tmp-sample.bz2
+t/021-tmp-sample.bz2
+t/022-tmp-sample.bz2
+t/023-tmp-sample.bz2
+t/024-tmp-reference.bz2
+t/024-tmp-sample.bz2
+t/025-tmp-reference.bz2
+t/025-tmp-sample.bz2
+t/026-tmp-reference.bz2
+t/026-tmp-sample.bz2
+t/030-tmp-sample.txt
+t/031-tmp-sample.txt
+t/032-tmp-sample.txt
+t/033-tmp-sample.txt
+t/034-tmp-reference.bz2
+t/034-tmp-reference.txt
+t/034-tmp-sample.txt
+t/035-tmp-sample.txt
+t/041-tmp-protected.bz2
+t/050-tmp-out.bz2
+t/051-tmp-out.bz2
+t/051-tmp-reference-out-bunzip2.txt
+t/060-tmp-out.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/Bzip2.xs 
new/Compress-Bzip2-2.22/Bzip2.xs
--- old/Compress-Bzip2-2.20/Bzip2.xs    2013-03-26 20:48:59.000000000 +0100
+++ new/Compress-Bzip2-2.22/Bzip2.xs    2015-02-19 10:54:20.000000000 +0100
@@ -2033,7 +2033,7 @@
          XPUSHs(sv_2mortal(newSVpv("",0)));
       }
       else
-        XPUSHs(outbuf);
+        XPUSHs(sv_2mortal(outbuf));
 
       if (GIMME == G_ARRAY) 
         XPUSHs(sv_2mortal(newSViv(global_bzip_errno)));
@@ -2096,7 +2096,7 @@
       if (outbuf==NULL)
        XPUSHs(sv_newmortal());
       else
-       XPUSHs(outbuf);
+       XPUSHs(sv_2mortal(outbuf));
 
       if (GIMME == G_ARRAY) 
        XPUSHs(sv_2mortal(newSViv(global_bzip_errno)));
@@ -2440,7 +2440,7 @@
        XPUSHs(sv_2mortal(newSVpv("",0)));
     }
     else
-      XPUSHs(outbuf);
+      XPUSHs(sv_2mortal(outbuf));
 
     if (GIMME == G_ARRAY) 
       XPUSHs(sv_2mortal(newSViv(global_bzip_errno)));
@@ -2479,7 +2479,6 @@
 
     perlobj = newSV(0);
     sv_setref_iv( perlobj, "Compress::Bzip2", PTR2IV(obj) );
-    sv_2mortal(perlobj);
 
     for (i=0; i < items; i+=2) {
       param = (char*) SvPV( ST(i), lnparam );
@@ -2487,7 +2486,7 @@
       bzfile_setparams( obj, param, setting );
     }
 
-    XPUSHs(perlobj);
+    XPUSHs(sv_2mortal(perlobj));
     if (GIMME == G_ARRAY) 
       XPUSHs(sv_2mortal(newSViv(global_bzip_errno)));
   }
@@ -2547,7 +2546,7 @@
        XPUSHs(sv_2mortal(newSVpv("",0)));
     }
     else
-      XPUSHs(outbuf);
+      XPUSHs(sv_2mortal(outbuf));
 
     if (GIMME == G_ARRAY) 
       XPUSHs(sv_2mortal(newSViv(global_bzip_errno)));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/Changes 
new/Compress-Bzip2-2.22/Changes
--- old/Compress-Bzip2-2.20/Changes     2015-01-15 10:44:41.000000000 +0100
+++ new/Compress-Bzip2-2.22/Changes     2015-02-19 10:54:29.000000000 +0100
@@ -167,3 +167,13 @@
 2.20 2015-01-15 rurban
    - Convert README to markdown, mention the preferred IO::Compress::Bzip2 in
      the docs (done by Pattarawat Chormai, GH PR #2)
+
+2.21 2015-02-17 rurban
+   - Add leaktrace test
+   - Add .gitignore
+
+2.22 2015-02-17 rurban
+   - Fixed huge decompress memory leak, leaking every single XS outbut buffer.
+   - Better memory leak testcase with Memory::Dump, t/090-memory-usage.pl
+     (RT #102211 by Nick Koston)
+   - clarify docs that deflate = compress, inflate = uncompress
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/MANIFEST 
new/Compress-Bzip2-2.22/MANIFEST
--- old/Compress-Bzip2-2.20/MANIFEST    2015-01-15 10:46:24.000000000 +0100
+++ new/Compress-Bzip2-2.22/MANIFEST    2015-02-19 10:56:24.000000000 +0100
@@ -1,3 +1,4 @@
+.gitignore
 README.md
 Changes
 MANIFEST
@@ -41,6 +42,7 @@
 t/080-version.t
 t/081-basic.t
 t/082-stream.t
+t/090-memory-usage.pl
 bzlib-src/blocksort.c
 bzlib-src/bz-common.xsl
 bzlib-src/bzdiff
@@ -103,6 +105,7 @@
 bzlib-src/t/01-baseline.t
 bzlib-src/t/lib.pl
 t/900_kwalitee.t
+t/900_leaktrace.t
 t/900_meta.t
 t/900_perl_minimum_version.t
 t/900_pod-coverage.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/META.json 
new/Compress-Bzip2-2.22/META.json
--- old/Compress-Bzip2-2.20/META.json   2015-01-15 10:46:23.000000000 +0100
+++ new/Compress-Bzip2-2.22/META.json   2015-02-19 10:56:24.000000000 +0100
@@ -57,5 +57,5 @@
          "url" : "https://github.com/rurban/Compress-Bzip2";
       }
    },
-   "version" : "2.20"
+   "version" : "2.22"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/META.yml 
new/Compress-Bzip2-2.22/META.yml
--- old/Compress-Bzip2-2.20/META.yml    2015-01-15 10:46:23.000000000 +0100
+++ new/Compress-Bzip2-2.22/META.yml    2015-02-19 10:56:24.000000000 +0100
@@ -33,4 +33,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: https://github.com/rurban/Compress-Bzip2
-version: '2.20'
+version: '2.22'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/SIGNATURE 
new/Compress-Bzip2-2.22/SIGNATURE
--- old/Compress-Bzip2-2.20/SIGNATURE   2015-01-15 10:46:27.000000000 +0100
+++ new/Compress-Bzip2-2.22/SIGNATURE   2015-02-19 10:56:27.000000000 +0100
@@ -14,14 +14,15 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
+SHA1 5fefc9642a4998a5d73d0ed2faa02a30aee2d623 .gitignore
 SHA1 321030dcade0d87dba537aff99fcba66230971d0 ANNOUNCE
-SHA1 d8094d7a2ccce1ff3a3fc69a76c73dd15291cc65 Bzip2.xs
+SHA1 9dc701d0dcdd70d36b6709b0b7674f82e032ba6f Bzip2.xs
 SHA1 ff8688f52f05aa77ac2522c7970e6ab23bf77d0e COPYING
-SHA1 3a222be72665a3e8fe654dd2e7b38ce6c2bd8dae Changes
+SHA1 6d50308131c0d0ab2426cd01157123727eef06b9 Changes
 SHA1 06186a4d62ebec3ffac9a4f5457458436d7302c5 INSTALL
-SHA1 f90f22c21711a4fbcc955998aa47179aac5a32b2 MANIFEST
-SHA1 9f26400242189eaa6c9a0cd003033aae44c0f321 META.json
-SHA1 4d08319df67e788b3fd37063e8d91f2df3928c89 META.yml
+SHA1 942a82ca0fe099fe66ffbd1e8e1967d1097f5a65 MANIFEST
+SHA1 94a04518755eec6c7a876fdcbd99496745278aaf META.json
+SHA1 9b3aa715c02bd11703c3d850d363fa2f14fccf9d META.yml
 SHA1 3711bef030207705a281125394be7eb9627a79a3 Makefile.PL
 SHA1 01ca12f980ac0675ebc82d84c432bbf3be80c74c NEWS
 SHA1 8343eaf8bfc7836c110d55b878ce13b9b56dd468 README.md
@@ -89,7 +90,7 @@
 SHA1 7dfc2194e9b344251a52ae5b6399fb1650342905 config.in
 SHA1 f51e8905cd4c7ac9abe672ead1f8a52b82fbbad5 fallback/const-c.inc
 SHA1 340a622d47ec2642d9631c79432f1c234a6c8c84 fallback/const-xs.inc
-SHA1 02639505d77fbc88e0f0bec7dbb2e52acf1db01b lib/Compress/Bzip2.pm
+SHA1 90d0f9a890ce9cc38477019767918a398da91dd0 lib/Compress/Bzip2.pm
 SHA1 fb7154b5f5ab3dd33064a2a1ac704f596dc6449a ppport.h
 SHA1 f5620dc7bc334bd571a5bceb7012cc11114cccff show_bzversion.c
 SHA1 4dd4bbbd10e755857ed1ca2beabfa6410c8ef2ca t/010-useability.t
@@ -118,7 +119,9 @@
 SHA1 51c2260d728eb8feac05fc2dad13ac45f9c5f1db t/080-version.t
 SHA1 59a46cac15f6e1e05b4fa719f7944b8b1b83f0a6 t/081-basic.t
 SHA1 5b6cd3c144afeb67a6b6c61389fb273d55a1ac1a t/082-stream.t
+SHA1 71c2712364069b5c6d86a3fa108d83fd487d950c t/090-memory-usage.pl
 SHA1 a68085c94808f024eb2ed76ce73ea439f0ed6d48 t/900_kwalitee.t
+SHA1 dfae3df9042df2eb88963438414a82207f9e5e1c t/900_leaktrace.t
 SHA1 993b3cef8c06a70d99829facf76140864eb57240 t/900_meta.t
 SHA1 1ce51bd4ebcb568ddd166c32d5dbb57ff2d0b515 t/900_perl_minimum_version.t
 SHA1 5d64c28fbb2d9eb5e649ac42f594d7bde8ef31e7 t/900_pod-coverage.t
@@ -128,7 +131,7 @@
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
-iEYEARECAAYFAlS3jHAACgkQmm2SYo/9yUKNDQCeIhPLl83XTBmtcArVzJJDVTFs
-gPkAn3sUL7kHqGFYL8OHhqB9iMH0+hUz
-=z9XC
+iEYEARECAAYFAlTls0gACgkQmm2SYo/9yUJuQQCgjwSyY09t1V1NCrRM/hzwFtUq
+Tx4AniHaobv114Uwxui/QVn+U4kLLLcr
+=5vD2
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/lib/Compress/Bzip2.pm 
new/Compress-Bzip2-2.22/lib/Compress/Bzip2.pm
--- old/Compress-Bzip2-2.20/lib/Compress/Bzip2.pm       2015-01-15 
10:44:57.000000000 +0100
+++ new/Compress-Bzip2-2.22/lib/Compress/Bzip2.pm       2015-02-19 
10:54:20.000000000 +0100
@@ -1,8 +1,8 @@
 # File    : Bzip2.pm
 # Author   : Rob Janes
 # Created  : 14 April 2005
-# Modified : 2015-01-15 rurban
-# Version  : 2.20
+# Modified : 2015-02-19 rurban
+# Version  : 2.22
 #
 #     Copyright (c) 2005 Rob Janes. All rights reserved.
 #     This program is free software; you can redistribute it and/or
@@ -12,7 +12,7 @@
 package Compress::Bzip2;
 
 use 5.006;
-our $VERSION = "2.20";
+our $VERSION = "2.22";
 use strict;
 use warnings;
 
@@ -682,11 +682,11 @@
 
     use Compress::Bzip2 qw(:all :constant :utilities :gzip);
 
-    ($bz, $status) = bzdeflateInit( [PARAMS] ) ;
-    ($out, $status) = $bz->bzdeflate($buffer) ;
+    ($bz, $status) = bzdeflateInit( [PARAMS] );
+    ($out, $status) = $bz->bzdeflate($buffer) ; # compress
 
-    ($bz, $status) = bzinflateInit( [PARAMS] ) ;
-    ($out, $status) = $bz->bzinflate($buffer) ;
+    ($bz, $status) = bzinflateInit( [PARAMS] );
+    ($out, $status) = $bz->bzinflate($buffer);  # uncompress
 
     ($out, $status) = $bz->bzflush() ;
     ($out, $status) = $bz->bzclose() ;
@@ -1162,7 +1162,7 @@
 contents of the buffer parameter are destroyed after calling this
 function.
 
-=head1 STREAM DEFLATE
+=head1 STREAM DEFLATE (= COMPRESS)
 
 The Perl interface will I<always> consume the complete input buffer
 before returning. Also the output buffer returned will be
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/t/090-memory-usage.pl 
new/Compress-Bzip2-2.22/t/090-memory-usage.pl
--- old/Compress-Bzip2-2.20/t/090-memory-usage.pl       1970-01-01 
01:00:00.000000000 +0100
+++ new/Compress-Bzip2-2.22/t/090-memory-usage.pl       2015-02-19 
10:54:20.000000000 +0100
@@ -0,0 +1,59 @@
+#! perl
+use strict;
+use 5.006002;
+use Compress::Bzip2;
+use File::Spec;
+use Memory::Usage;
+# Note that Test::LeakTrace does not find the XS leaks here. Always use 
Memory::Usage also.
+
+use constant MAX   => 5; # MAX times all files in t => 125MB with 75, 15MB 
with 5, 43MB with 25
+use constant MAX_5 => MAX >= 5 ? MAX / 5 : 1;
+my $bigfile = File::Spec->catfile('t', '090-tmp-bigfile.bz2');
+
+sub t_compress {
+  warn "Creating $bigfile ...\n";
+  my $buf;
+  my $mu = Memory::Usage->new();
+  $mu->record("Before bzopen");
+  my $bz = Compress::Bzip2::bzopen($bigfile, "w");
+  for (0 .. MAX) {
+    $mu->record("Before bzwrite: $_") unless $_ % MAX_5;
+    for my $infile (glob "t/*") {
+      next if $infile eq $bigfile;
+      open(my $fh, "<", $infile);
+      while ( read( $fh, $buf, 65335 ) ) {
+        $bz->bzwrite( $buf );
+      }
+      close $fh;
+    }
+    $mu->record("After bzwrite: $_") unless $_ % MAX_5;
+  }
+  $bz->bzclose;
+  $mu->record("After bzclose");
+  $mu->dump();
+  system("bunzip2", "-tv", $bigfile);
+  warn("  size: ", -s $bigfile, "\n");
+}
+
+sub t_uncompress {
+  warn "Uncompressing $bigfile 5x ...\n";
+  my $buf;
+  my $mu = Memory::Usage->new();
+  for ( 1 .. 5 ) {
+    my $bz = Compress::Bzip2::bzinflateInit( -verbosity => 0 );
+    $mu->record("Before bunzip: $_");
+    open( my $fh, '<', $bigfile );
+    while ( read( $fh, $buf, 65335 ) ) {
+        my ( $output, $status ) = $bz->bzinflate( $buf );
+    }
+    close($fh);
+    $bz->bzclose();
+    $mu->record("After bunzip: $_");
+  }
+  $mu->dump();
+}
+
+t_compress() unless -f $bigfile;
+t_uncompress();
+
+unlink $bigfile;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Compress-Bzip2-2.20/t/900_leaktrace.t 
new/Compress-Bzip2-2.22/t/900_leaktrace.t
--- old/Compress-Bzip2-2.20/t/900_leaktrace.t   1970-01-01 01:00:00.000000000 
+0100
+++ new/Compress-Bzip2-2.22/t/900_leaktrace.t   2015-02-17 12:56:23.000000000 
+0100
@@ -0,0 +1,31 @@
+#!perl -w
+
+use strict;
+use constant HAS_LEAKTRACE => eval{ require Test::LeakTrace };
+use Test::More HAS_LEAKTRACE ? (tests => 2) : (skip_all => 'require 
Test::LeakTrace');
+use Test::LeakTrace;
+
+use Compress::Bzip2;
+my $string = q/
+Twas brillig and the slithy toves
+did gire and gimble in the wabe
+All mimsey were the borogroves
+and the Momewrathes outgrabe
+    / x 20;
+
+leaks_cmp_ok{
+  my $compress = memBzip( $string );
+  my $uncompress = memBunzip( $compress );
+} '<', 1;
+
+do 't/lib.pl';
+
+leaks_cmp_ok{
+  my $INFILE = catfile( qw(bzlib-src sample0.bz2) );
+  local $/ = undef;
+  open( IN, "< $INFILE" ) or die "$INFILE: $!";
+  binmode IN;
+  my $sample0 = <IN>;
+  close( IN );
+  my $uncompress = memBunzip( $sample0 );
+} '<', 1;

++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#no_testing: broken upstream
#sources:
#  - source1
#  - source2
#patches:
#  foo.patch: -p1
#  bar.patch:
preamble: |-
 BuildRequires:  libbz2-devel
 Requires:       bzip2
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s,  *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL 
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: -
#./Build build flags=%{?_smp_mflags} --myflag

Reply via email to