Drop zlib-1.2.7-z-block-flush.patch

This brings unnecessary upstream incompatibility and API change
(it changes priority of different flush types in some cases).

The original reason for this patch was rhbz#844791, which has been
later worked-around in tigervnc anyways (b5822f32ab5043b4e).

Zlib upstream fixed the original issue by commit
c661c374e8df43365738daa09f4390d61bc57f08, which is for some time
available in Fedora's zlib (1.2.7.1+).

Version: 1.2.11-1
Resolves: rhbz#1417355
This commit is contained in:
Pavel Raiskup 2017-01-31 11:13:44 +01:00
parent fbdf14cdf0
commit 4871b1554b
2 changed files with 3 additions and 49 deletions

View File

@ -1,45 +0,0 @@
From f1b8edadc3c733990f8a8de4d643f968e571ae85 Mon Sep 17 00:00:00 2001
From: Adam Tkac <atkac@redhat.com>
Date: Fri, 17 Aug 2012 15:13:48 +0200
Subject: [PATCH] Rank Z_BLOCK flush below Z_PARTIAL_FLUSH only when last
flush was Z_BLOCK.
This fixes regression introduced by f1ebdd6a9c495a5db9a22aa80dd7d54ae7db42e9
(Permit stronger flushes after Z_BLOCK flushes.). Now this code is valid
again:
deflate(stream, Z_SYNC_FLUSH);
deflateParams(stream, newLevel, Z_DEFAULT_STRATEGY);
Signed-off-by: Adam Tkac <atkac@redhat.com>
---
deflate.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/deflate.c b/deflate.c
index 9e4c2cb..3422f72 100644
--- a/deflate.c
+++ b/deflate.c
@@ -882,9 +882,16 @@ int ZEXPORT deflate (strm, flush)
* flushes. For repeated and useless calls with Z_FINISH, we keep
* returning Z_STREAM_END instead of Z_BUF_ERROR.
*/
- } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) &&
- flush != Z_FINISH) {
- ERR_RETURN(strm, Z_BUF_ERROR);
+ } else if (strm->avail_in == 0 && flush != Z_FINISH) {
+ char err;
+
+ /* Degrade Z_BLOCK only when last flush was Z_BLOCK */
+ err = (old_flush == Z_BLOCK) ?
+ RANK(flush) <= RANK(old_flush) : flush <= old_flush;
+
+ if (err) {
+ ERR_RETURN(strm, Z_BUF_ERROR);
+ }
}
/* User must not provide more input after the first FINISH: */
--
1.7.11.4

View File

@ -12,8 +12,6 @@ Source: http://www.zlib.net/zlib-%{version}.tar.xz
Patch0: zlib-1.2.5-minizip-fixuncrypt.patch Patch0: zlib-1.2.5-minizip-fixuncrypt.patch
# resolves: #805113 # resolves: #805113
Patch1: zlib-1.2.7-optimized-s390.patch Patch1: zlib-1.2.7-optimized-s390.patch
# resolves: #844791
Patch2: zlib-1.2.7-z-block-flush.patch
BuildRequires: automake, autoconf, libtool BuildRequires: automake, autoconf, libtool
@ -66,7 +64,7 @@ developing applications which use minizip.
%ifarch s390 s390x %ifarch s390 s390x
%patch1 -p1 -b .optimized-deflate %patch1 -p1 -b .optimized-deflate
%endif %endif
%patch2 -p1 -b .z-flush
iconv -f iso-8859-2 -t utf-8 < ChangeLog > ChangeLog.tmp iconv -f iso-8859-2 -t utf-8 < ChangeLog > ChangeLog.tmp
mv ChangeLog.tmp ChangeLog mv ChangeLog.tmp ChangeLog
@ -140,11 +138,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{_libdir}/pkgconfig/minizip.pc %{_libdir}/pkgconfig/minizip.pc
%changelog %changelog
* Thu Jan 26 2017 Pavel Raiskup <praiskup@redhat.com> - 1.2.11-1 * Mon Jan 30 2017 Pavel Raiskup <praiskup@redhat.com> - 1.2.11-1
- latest upstream release (rhbz#1409372) - latest upstream release (rhbz#1409372)
- cleanup rpmlint - cleanup rpmlint
- revert fix for rhbz#985344 - revert fix for rhbz#985344
- requires with %%_isa tag - requires with %%_isa tag
- drop zlib Z_BLOCK flush patch (rhbz#1417355)
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-10 * Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild