2.072 bump
This commit is contained in:
parent
0fd60c634a
commit
7c7c5aa891
@ -1,94 +0,0 @@
|
|||||||
From b42f5c088158f473116d3aca2d050d4efb95b021 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
||||||
Date: Tue, 7 Feb 2017 14:44:48 +0100
|
|
||||||
Subject: [PATCH] Adapt tests to zlib 1.2.11
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Since zlib-1.2.9 it's not safe to invoke deflateParams() when not all
|
|
||||||
input was consumed by deflate(). deflateParams() could return
|
|
||||||
Z_BUF_ERROR in some cases:
|
|
||||||
|
|
||||||
commit 7161ad76e2d0ac7de2a6235fcad3b9dfc99e9140
|
|
||||||
Author: Mark Adler <madler@alumni.caltech.edu>
|
|
||||||
Date: Tue Nov 22 23:29:19 2016 -0800
|
|
||||||
|
|
||||||
Assure that deflateParams() will not switch functions mid-block.
|
|
||||||
|
|
||||||
This alters the specification in zlib.h, so that deflateParams()
|
|
||||||
will not change any parameters if there is not enough output space
|
|
||||||
in the event that a block is emitted in order to allow switching
|
|
||||||
the compression function.
|
|
||||||
|
|
||||||
zlib documentation recommends two fixes:
|
|
||||||
|
|
||||||
To retry deflateParams() as it processes a piece of input underneath
|
|
||||||
until something else than Z_BUF_ERROR is returned. However this does
|
|
||||||
not work for me because then the compressed stream gets corrupted
|
|
||||||
and the subsequent inflate() returns a failure.
|
|
||||||
|
|
||||||
Another fix is to flush the deflated stream with Z_BLOCK just before
|
|
||||||
any deflateParams() call that follows unifinished deflate(). This
|
|
||||||
assures the new deflate options will be applied immediatelly on next
|
|
||||||
deflate() call. This fix works for me. Thus I implemented it in the
|
|
||||||
tests.
|
|
||||||
|
|
||||||
The new tests pass with zlib 1.2.8 as well as 1.2.11. 1.2.9 and 1.2.10
|
|
||||||
seems broken changing the deflate options was fixed in 1.2.11.
|
|
||||||
|
|
||||||
CPAN RT#119762
|
|
||||||
|
|
||||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
||||||
---
|
|
||||||
t/02zlib.t | 9 ++++++---
|
|
||||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/t/02zlib.t b/t/02zlib.t
|
|
||||||
index 2c9aad6..50f6a82 100644
|
|
||||||
--- a/t/02zlib.t
|
|
||||||
+++ b/t/02zlib.t
|
|
||||||
@@ -24,13 +24,13 @@ BEGIN
|
|
||||||
|
|
||||||
my $count = 0 ;
|
|
||||||
if ($] < 5.005) {
|
|
||||||
- $count = 232 ;
|
|
||||||
+ $count = 236 ;
|
|
||||||
}
|
|
||||||
elsif ($] >= 5.006) {
|
|
||||||
- $count = 317 ;
|
|
||||||
+ $count = 320 ;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
- $count = 275 ;
|
|
||||||
+ $count = 278 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
plan tests => $count + $extra;
|
|
||||||
@@ -537,6 +537,7 @@ SKIP:
|
|
||||||
|
|
||||||
$status = $x->deflate($hello, $Answer) ;
|
|
||||||
cmp_ok $status, '==', Z_OK ;
|
|
||||||
+ cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ;
|
|
||||||
$input .= $hello;
|
|
||||||
|
|
||||||
# error cases
|
|
||||||
@@ -561,6 +562,7 @@ SKIP:
|
|
||||||
|
|
||||||
$status = $x->deflate($goodbye, $Answer) ;
|
|
||||||
cmp_ok $status, '==', Z_OK ;
|
|
||||||
+ cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ;
|
|
||||||
$input .= $goodbye;
|
|
||||||
|
|
||||||
# change only Level
|
|
||||||
@@ -572,6 +574,7 @@ SKIP:
|
|
||||||
|
|
||||||
$status = $x->deflate($goodbye, $Answer) ;
|
|
||||||
cmp_ok $status, '==', Z_OK ;
|
|
||||||
+ cmp_ok $x->flush($Answer, Z_BLOCK), '==', Z_OK ;
|
|
||||||
$input .= $goodbye;
|
|
||||||
|
|
||||||
# change only Strategy
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: perl-Compress-Raw-Zlib
|
Name: perl-Compress-Raw-Zlib
|
||||||
Version: 2.071
|
Version: 2.072
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Low-level interface to the zlib compression library
|
Summary: Low-level interface to the zlib compression library
|
||||||
# Zlib.xs: (GPL+ or Artistic) and zlib
|
# Zlib.xs: (GPL+ or Artistic) and zlib
|
||||||
# Others: GPL+ or Artistic
|
# Others: GPL+ or Artistic
|
||||||
@ -10,8 +10,6 @@ License: (GPL+ or Artistic) and zlib
|
|||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
URL: http://search.cpan.org/dist/Compress-Raw-Zlib/
|
URL: http://search.cpan.org/dist/Compress-Raw-Zlib/
|
||||||
Source0: http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/Compress-Raw-Zlib-%{version}.tar.gz
|
Source0: http://search.cpan.org/CPAN/authors/id/P/PM/PMQS/Compress-Raw-Zlib-%{version}.tar.gz
|
||||||
# Adapt tests to zlib-1.2.11, bug #1419841, CPAN RT#119762
|
|
||||||
Patch0: Compress-Raw-Zlib-2.071-Adapt-tests-to-zlib-1.2.11.patch
|
|
||||||
# Module Build
|
# Module Build
|
||||||
BuildRequires: coreutils
|
BuildRequires: coreutils
|
||||||
BuildRequires: findutils
|
BuildRequires: findutils
|
||||||
@ -26,6 +24,7 @@ BuildRequires: perl(ExtUtils::Install)
|
|||||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 5.16
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 5.16
|
||||||
BuildRequires: perl(File::Copy)
|
BuildRequires: perl(File::Copy)
|
||||||
BuildRequires: perl(File::Spec::Functions)
|
BuildRequires: perl(File::Spec::Functions)
|
||||||
|
BuildRequires: perl(lib)
|
||||||
BuildRequires: perl(vars)
|
BuildRequires: perl(vars)
|
||||||
BuildRequires: sed
|
BuildRequires: sed
|
||||||
BuildRequires: zlib-devel >= 1.2.1
|
BuildRequires: zlib-devel >= 1.2.1
|
||||||
@ -40,7 +39,6 @@ BuildRequires: perl(XSLoader)
|
|||||||
# Test Suite
|
# Test Suite
|
||||||
BuildRequires: perl(File::Path)
|
BuildRequires: perl(File::Path)
|
||||||
BuildRequires: perl(File::Temp)
|
BuildRequires: perl(File::Temp)
|
||||||
BuildRequires: perl(lib)
|
|
||||||
BuildRequires: perl(overload)
|
BuildRequires: perl(overload)
|
||||||
# Dual-lived module needs rebuilding early in the boot process
|
# Dual-lived module needs rebuilding early in the boot process
|
||||||
%if !%{defined perl_bootstrap}
|
%if !%{defined perl_bootstrap}
|
||||||
@ -61,7 +59,6 @@ compression library, which is used by IO::Compress::Zlib.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n Compress-Raw-Zlib-%{version}
|
%setup -q -n Compress-Raw-Zlib-%{version}
|
||||||
%patch0 -p1
|
|
||||||
# Remove bundled zlib
|
# Remove bundled zlib
|
||||||
rm -rf zlib-src
|
rm -rf zlib-src
|
||||||
sed -i -e '/^zlib-src\//d' MANIFEST
|
sed -i -e '/^zlib-src\//d' MANIFEST
|
||||||
@ -91,6 +88,9 @@ make test COMPRESS_ZLIB_RUN_MOST=1
|
|||||||
%{_mandir}/man3/Compress::Raw::Zlib.3*
|
%{_mandir}/man3/Compress::Raw::Zlib.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 13 2017 Jitka Plesnikova <jplesnik@redhat.com> - 2.072-1
|
||||||
|
- 2.072 bump
|
||||||
|
|
||||||
* Tue Feb 07 2017 Petr Pisar <ppisar@redhat.com> - 2.071-2
|
* Tue Feb 07 2017 Petr Pisar <ppisar@redhat.com> - 2.071-2
|
||||||
- Adapt tests to zlib-1.2.11 (bug #1419841)
|
- Adapt tests to zlib-1.2.11 (bug #1419841)
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (Compress-Raw-Zlib-2.071.tar.gz) = 3acfca63def1c7875a5ac35f3ef8e99da427e617cff92c073bcba90670aecde5904a3ce57b0b3301f1112eaa8425a75ce582fe1e64545ec048fa76e982715b79
|
SHA512 (Compress-Raw-Zlib-2.072.tar.gz) = 20dfe051a94824a4490b96f3e534a1c47e1d2cba86887b4b5ca739d7644553b76260a0e4b8bb363fa46c5b5439194a36a394ddecd09e31650f1c95dc2412b0f7
|
||||||
|
Loading…
Reference in New Issue
Block a user