Compare commits

...
Sign in to create a new pull request.

68 commits

Author SHA1 Message Date
Lukas Javorsky
21593df55f Zlib has been obsoleted by zlib-ng, more in https://fedoraproject.org/wiki/Changes/ZlibNGTransition 2024-01-24 10:17:38 +00:00
Lukas Javorsky
1edfcf16da Fix integer overflow in zipOpenNewFileInZip4_6
Resolves: CVE-2023-45853
2023-10-17 10:13:09 +00:00
Lukas Javorsky
eb01ebe050 Fix the deprecated %patch macros 2023-08-22 10:18:18 +00:00
Fedora Release Engineering
d1d9a0b305 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 19:44:56 +00:00
Lukas Javorsky
e9f4684532 Filter-out the tests that are not suitable for Gating
Excluded: https://pkgs.devel.redhat.com/cgit/tests/zlib/tree/Regression/bz1659433-IBM-8-2-FEAT-zlib-compression-improvements
2023-06-14 10:08:56 +00:00
Lukas Javorsky
66bfff65fa Add distribution and file tests that were part of baseos.ci tests 2023-06-14 10:08:50 +00:00
Lukas Javorsky
3a5a0e0d05 Separate public and private tests and update gating accordingly
Gating also covers Fedora, so the gating.yaml files are the same

Resolves: RHELPLAN-155186
2023-06-14 10:08:00 +00:00
Lukas Javorsky
94fb3f6768 Add private CI for the RHEL distro
Resolves: RHELPLAN-155186
2023-06-14 10:05:45 +00:00
Lukas Javorsky
956bec8433 migrated to SPDX license 2023-03-17 14:55:13 +00:00
Fedora Release Engineering
f8022d5b74 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 08:18:27 +00:00
Lukas Javorsky
73adb24ba0 Fix for the libxml2 and lxml on s390x
Resolves: #2155328
2023-01-11 11:15:11 +00:00
Lukas Javorsky
d7912252c7 Rebase to version 1.2.13
Patches 21,24,25 has been upstreamed

Resolves: #2134894
2022-11-24 16:44:27 +00:00
Lukas Javorsky
de5caa002f Fix heap-based buffer over-read or buffer overflow in inflate.c
Upstream patch: ec3df00224

Resolves: CVE-2022-37434
2022-08-10 08:13:53 +00:00
Fedora Release Engineering
6e982b7c51 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 13:57:52 +00:00
Lukas Javorsky
59c603eb22 Correct incorrect inputs provided to the CRC functions
This issue was reported to us by ruby package: https://github.com/ruby/spec/issues/932

Patch source: ec3df00224
2022-07-08 08:29:44 +00:00
Lukas Javorsky
7a6d1b10bf Fix covscan patch that caused compiler warnings 2022-06-28 17:04:46 +00:00
Lukas Javorsky
872735211a [6/6] Cleanup old patches and use the new ones 2022-06-23 19:02:54 +00:00
Lukas Javorsky
37728e12c3 [5/6] Rebase patches on new 1.2.12 release 2022-06-23 19:02:11 +00:00
Lukas Javorsky
4e76ca623c [4/6] Fix configure file
Source: https://github.com/madler/zlib/pull/607
2022-06-23 19:02:11 +00:00
Lukas Javorsky
bddff11ae1 [3/6] Unify Power optimization patch
Source: https://github.com/mscastanho/zlib/commits/power-optimizations-1.2.12
2022-06-23 19:01:52 +00:00
Lukas Javorsky
410c955f9f [2/6] Unify IBM-Z-hw-accelerated patch
Source: https://github.com/madler/zlib/pull/410
2022-06-22 17:42:26 +00:00
Lukas Javorsky
63d5e2b83d [1/6] Rebase to 1.2.12
Resolves: CVE-2018-25032, BZ#2069002
2022-06-22 17:42:16 +00:00
Jakub Heger
e6d794cc6e Add CI to the zlib package
This should automatically test zlib when a new PR is created
2022-03-10 10:55:03 +00:00
Ilya Leoshkevich
531848943b Fix for IBM Z compressBound()
Source from https://gitlab.com/redhat/centos-stream/rpms/zlib/-/merge_requests/9
Resolves: #2057484
2022-03-03 13:16:39 +00:00
Fedora Release Engineering
19c758b4d8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 05:53:58 +00:00
Dan Horák
c739e57fe8 - Fix for IBM CRC32 optimalization rhbz#1959423 2021-07-29 12:30:59 +02:00
Fedora Release Engineering
daa1e929c7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 22:20:22 +00:00
Ondrej Dubaj
8cb4e2d6cc Add IBM CRC32 optimalization patch for s390x 2021-07-15 09:17:35 +02:00
Ondrej Dubaj
18d1f95995 Enabled Z hardware-accelerated deflate for compression levels 1 through 6 (#1972057) 2021-07-15 09:13:57 +02:00
Ondrej Dubaj
59fb3beffd Fixed covscan issues for rhel-9 (#1938901) 2021-03-31 15:37:41 +02:00
Ondrej Dubaj
c95d3d1e73 drop aarch64 optimalizations due to breakage of ABI compatibility in openjdk (#1936823) 2021-03-17 11:12:21 +01:00
Michal Schorm
3ba936014f Remove the ancient PPC64 hack
The package should honor the global build flags
2021-02-12 12:07:27 +01:00
Fedora Release Engineering
fab772edf6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-28 00:44:11 +00:00
b8fe7056de Spec file cleanup 2021-01-13 22:31:56 +00:00
Tom Stellard
d8376b10d0 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-09 01:55:26 +00:00
Ondrej Dubaj
c440ac9c20 backport IBM Z updates to fedora 2020-11-18 11:18:50 +01:00
Fedora Release Engineering
4838139649 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 15:25:32 +00:00
Fedora Release Engineering
5eb9d92f5a - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-31 05:21:50 +00:00
Ondrej Dubaj
5025177931 Added bugzilla bug number to changelog 2019-11-04 14:40:54 +01:00
Ondrej Dubaj
700aa10337 Added -DDFLTCC parameter to configure to enable Z hardware-accelerated deflate for s390x architectures 2019-10-29 13:30:42 +01:00
Ondrej Dubaj
c917e2413d - Re-added IBM CRC32 optimalization for POWER 8+ architectures
- Fixed firefox crash duer to zlib (#1741266)
- Added test case for IBM CRC32 optimalization
2019-09-05 09:52:39 +02:00
Ondrej Dubaj
55d2f82c6c reverted CRC32 optimalization for POWER 8+ architectures 2019-08-15 09:15:37 +02:00
Ondrej Dubaj
fca6f29cc9 Optimized CRC32 for POWER 8+ architectures. 2019-08-01 12:18:36 +02:00
Ondrej Dubaj
fabbdc87f0 Add support for IBM Z hardware-accelerated deflate
Future versions of IBM Z mainframes will provide DFLTCC instruction,
which implements deflate algorithm in hardware with estimated
compression and decompression performance orders of magnitude faster
than the current zlib and ratio comparable with that of level 1.

This patch adds DFLTCC support to zlib. In order to enable it, the
following build commands should be used:

    $ CFLAGS=-DDFLTCC ./configure
    $ make OBJA=dfltcc.o PIC_OBJA=dfltcc.lo

When built like this, zlib would compress in hardware on level 1, and in
software on all other levels. Decompression will always happen in
hardware. In order to enable DFLTCC compression for levels 1-6 (i.e. to
make it used by default) one could either add -DDFLTCC_LEVEL_MASK=0x7e
at compile time, or set the environment variable DFLTCC_LEVEL_MASK to
0x7e at run time.

Two DFLTCC compression calls produce the same results only when they
both are made on machines of the same generation, and when the
respective buffers have the same offset relative to the start of the
page. Therefore care should be taken when using hardware compression
when reproducible results are desired. One such use case - reproducible
software builds - is handled explicitly: when SOURCE_DATE_EPOCH
environment variable is set, the hardware compression is disabled.

DFLTCC does not support every single zlib feature, in particular:

    * inflate(Z_BLOCK) and inflate(Z_TREES)
    * inflateMark()
    * inflatePrime()
    * deflateParams() after the first deflate() call

When used, these functions will either switch to software, or, in case
this is not possible, gracefully fail.

This patch tries to add DFLTCC support in a least intrusive way.
All SystemZ-specific code was placed into a separate file, but
unfortunately there is still a noticeable amount of changes in the
main zlib code. Below is the summary of those changes.

DFLTCC takes as arguments a parameter block, an input buffer, an output
buffer and a window. Since DFLTCC requires parameter block to be
doubleword-aligned, and it's reasonable to allocate it alongside
deflate and inflate states, ZALLOC_STATE, ZFREE_STATE and ZCOPY_STATE
macros were introduced in order to encapsulate the allocation details.
The same is true for window, for which ZALLOC_WINDOW and
TRY_FREE_WINDOW macros were introduced.

While for inflate software and hardware window formats match, this is
not the case for deflate. Therefore, deflateSetDictionary and
deflateGetDictionary need special handling, which is triggered using the
new DEFLATE_SET_DICTIONARY_HOOK and DEFLATE_GET_DICTIONARY_HOOK macros.

deflateResetKeep() and inflateResetKeep() now update the DFLTCC
parameter block, which is allocated alongside zlib state, using
the new DEFLATE_RESET_KEEP_HOOK and INFLATE_RESET_KEEP_HOOK macros.

In order to make unsupported deflateParams(), inflatePrime() and
inflateMark() calls to fail gracefully, the new DEFLATE_PARAMS_HOOK,
INFLATE_PRIME_HOOK and INFLATE_MARK_HOOK macros were introduced.

The algorithm implemented in hardware has different compression ratio
than the one implemented in software. In order for deflateBound() to
return the correct results for the hardware implementation, the new
DEFLATE_BOUND_ADJUST_COMPLEN and DEFLATE_NEED_CONSERVATIVE_BOUND macros
were introduced.

Actual compression and decompression are handled by the new DEFLATE_HOOK
and INFLATE_TYPEDO_HOOK macros. Since inflation with DFLTCC manages the
window on its own, calling updatewindow() is suppressed using the new
INFLATE_NEED_UPDATEWINDOW() macro.

In addition to compression, DFLTCC computes CRC-32 and Adler-32
checksums, therefore, whenever it's used, software checksumming needs to
be suppressed using the new DEFLATE_NEED_CHECKSUM and
INFLATE_NEED_CHECKSUM macros.

DFLTCC will refuse to write an End-of-block Symbol if there is no input
data, thus in some cases it is necessary to do this manually. In order
to achieve this, send_bits, bi_reverse, bi_windup and flush_pending
were promoted from local to ZLIB_INTERNAL. Furthermore, since block and
stream termination must be handled in software as well, block_state enum
was moved to deflate.h.

Since the first call to dfltcc_inflate already needs the window, and it
might be not allocated yet, inflate_ensure_window was factored out of
updatewindow and made ZLIB_INTERNAL.
2019-08-01 09:39:04 +02:00
Fedora Release Engineering
02d5250396 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 05:03:12 +00:00
Fedora Release Engineering
beb1c056fc - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 13:13:25 +00:00
Peter Robinson
df15b8a553 bump build 2018-10-02 12:33:23 +01:00
Peter Robinson
b2a39f7175 Revert aarch64 neon inflate optimisation 2018-09-18 22:11:51 +01:00
Jeremy Linton
71a74f9c86 Revert aarch64 neon inflate patches until the buffer poison issues are solved
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
2018-09-18 13:11:17 -05:00
Patrik Novotný
58764fc84f Rename minizip(-devel) to minizip-compat(-devel)
BZ#1615381
2018-08-30 15:28:37 +02:00
Patrik Novotný
6fff8aed07 Adds provides minizip-compat
minizip and minizip-devel provides minizip-compat and
minizip-compat-devel for easier transition

BZ#1615381
2018-08-23 12:10:49 +02:00
Pavel Raiskup
0fda98744b Add %bcond for minizip and do some cleanup
We should drop the minizip subpackage one day since that's totally
unsupported upstream, have a look e.g. at [1].  Nowadays there are
forks like [2] that could replace subpackage.  I contacted both
original minizip authors (per zlib upstream), and both redirected
me to [2].

[1] https://github.com/madler/zlib/pulls/praiskup
[2] https://github.com/nmoinvaz/minizip

Related: rhbz#1609830
Version: 1.2.11-10
2018-08-03 18:02:28 +02:00
Fedora Release Engineering
03637265b0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 09:52:00 +00:00
Peter Robinson
3c07ec7814 Optimisations for aarch64, Minor spec cleanups 2018-04-30 17:27:26 +01:00
Jeremy Linton
25e9802713 aarch64 optimizations 2018-04-30 17:15:44 +01:00
Pavel Raiskup
4d2785ec31 don't mask /usr/include/crypt.h with minizip's internal header
Resolves: rhbz#1556438
Version: 1.2.11-7
2018-03-15 16:12:19 +01:00
Fedora Release Engineering
d0b1c3d509 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 22:30:19 +00:00
d7f8407543
Switch to %ldconfig_scriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-02 11:17:54 +01:00
Fedora Release Engineering
2bc4b0a6ef - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 11:12:35 +00:00
Fedora Release Engineering
ebca41253b - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 22:44:42 +00:00
Pavel Raiskup
9f014e3002 spec: simplify -O3 hack for ppc64
Version: 1.2.11-2
2017-02-09 15:03:46 +01:00
Pavel Raiskup
890498eba0 fix FTBFS on s390(x)
Version: 1.2.11-2
2017-02-09 15:01:10 +01:00
Pavel Raiskup
4871b1554b 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
2017-01-31 11:19:12 +01:00
Pavel Raiskup
fbdf14cdf0 spec: use %_isa macro for Requires:
Version: 1.2.11-1
2017-01-26 20:25:01 +01:00
Pavel Raiskup
737073327a minizip: don't include zconf.h in crypt.h
Related: rhbz#985344
Version: 1.2.11-1
2017-01-24 07:15:40 +01:00
Pavel Raiskup
e5ba4cc42a spec: cleanup rpmlint
Version: 1.2.11-1
2017-01-24 07:14:10 +01:00
Pavel Raiskup
afe9e15b20 rebase
Version: 1.2.11-1
2017-01-16 09:49:47 +01:00
Pavel Raiskup
8e261bcdaa Version: 1.2.10-1 2017-01-05 08:34:51 +01:00
9 changed files with 1 additions and 621 deletions

1
.gitignore vendored
View file

@ -1 +0,0 @@
/zlib-1.2.8.tar.xz

View file

@ -1,13 +0,0 @@
srpm zlib
mcd $BUILDDIR/t-zlib
rsync -av $SRC/zlib-*/ ./
if [ "$SUFFIX" = "64" ]
then
ARGS="--libdir=/usr/lib64"
fi
CHOST=${TARGET} \
prefix=/usr \
./configure $ARGS
make
make $J install DESTDIR=${ROOTFS}
fix_la zlib

1
dead.package Normal file
View file

@ -0,0 +1 @@
Zlib has been obsoleted by zlib-ng, more in https://fedoraproject.org/wiki/Changes/ZlibNGTransition

View file

@ -1 +0,0 @@
28f1205d8dd2001f26fec1e8c2cebe37 zlib-1.2.8.tar.xz

View file

@ -1,14 +0,0 @@
diff -up zlib-1.2.5/contrib/minizip/unzip.c.fixuncrypt zlib-1.2.5/contrib/minizip/unzip.c
--- zlib-1.2.5/contrib/minizip/unzip.c.fixuncrypt 2011-11-11 12:13:56.335867758 -0500
+++ zlib-1.2.5/contrib/minizip/unzip.c 2011-11-11 12:14:01.747799372 -0500
@@ -68,10 +68,6 @@
#include <stdlib.h>
#include <string.h>
-#ifndef NOUNCRYPT
- #define NOUNCRYPT
-#endif
-
#include "zlib.h"
#include "unzip.h"

View file

@ -1,40 +0,0 @@
diff -upr zlib-1.2.7.orig/deflate.c zlib-1.2.7/deflate.c
--- zlib-1.2.7.orig/deflate.c 2012-10-04 12:18:50.750427902 +0200
+++ zlib-1.2.7/deflate.c 2012-10-04 12:20:04.222190460 +0200
@@ -1150,15 +1150,16 @@ local void lm_init (s)
/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
* match.S. The code will be functionally equivalent.
*/
-local uInt longest_match(s, cur_match)
+local uInt longest_match(s, pcur_match)
deflate_state *s;
- IPos cur_match; /* current match */
+ IPos pcur_match; /* current match */
{
+ ptrdiff_t cur_match = pcur_match; /* extend to pointer width */
unsigned chain_length = s->max_chain_length;/* max hash chain length */
register Bytef *scan = s->window + s->strstart; /* current string */
register Bytef *match; /* matched string */
register int len; /* length of current match */
- int best_len = s->prev_length; /* best match length so far */
+ ptrdiff_t best_len = s->prev_length; /* best match length so far */
int nice_match = s->nice_match; /* stop if match long enough */
IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
s->strstart - (IPos)MAX_DIST(s) : NIL;
@@ -1173,12 +1174,12 @@ local uInt longest_match(s, cur_match)
* Try with and without -DUNALIGNED_OK to check.
*/
register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
- register ush scan_start = *(ushf*)scan;
- register ush scan_end = *(ushf*)(scan+best_len-1);
+ register uInt scan_start = *(ushf*)scan;
+ register uInt scan_end = *(ushf*)(scan+best_len-1);
#else
register Bytef *strend = s->window + s->strstart + MAX_MATCH;
- register Byte scan_end1 = scan[best_len-1];
- register Byte scan_end = scan[best_len];
+ register uInt scan_end1 = scan[best_len-1];
+ register uInt scan_end = scan[best_len];
#endif
/* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.

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

@ -1,27 +0,0 @@
From 790c73ad93732d31ec6ae5ba4d7116d7f8fb46a2 Mon Sep 17 00:00:00 2001
From: Kalev Lember <kalevlember@gmail.com>
Date: Sat, 10 Aug 2013 14:54:04 +0200
Subject: [PATCH] minizip: Add missing include
Include zconf.h for z_crc_t, fixes a regression from commit
63ba7582b80eb81b126c2931e485481c35596aab.
---
contrib/minizip/crypt.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/minizip/crypt.h b/contrib/minizip/crypt.h
index 1e9e820..835a2ba 100644
--- a/contrib/minizip/crypt.h
+++ b/contrib/minizip/crypt.h
@@ -27,6 +27,8 @@
Encryption is not supported.
*/
+#include "zconf.h"
+
#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
/***********************************************************************
--
1.8.3.1

480
zlib.spec
View file

@ -1,480 +0,0 @@
Summary: The compression and decompression library
Name: zlib
Version: 1.2.8
Release: 10%{?dist}
# /contrib/dotzlib/ have Boost license
License: zlib and Boost
Group: System Environment/Libraries
URL: http://www.zlib.net/
Source: http://www.zlib.net/zlib-%{version}.tar.xz
Patch0: zlib-1.2.5-minizip-fixuncrypt.patch
# resolves: #805113
Patch1: zlib-1.2.7-optimized-s390.patch
# resolves: #844791
Patch2: zlib-1.2.7-z-block-flush.patch
# resolves: #985344
# http://mail.madler.net/pipermail/zlib-devel_madler.net/2013-August/003081.html
Patch3: zlib-1.2.8-minizip-include.patch
BuildRequires: automake, autoconf, libtool
%description
Zlib is a general-purpose, patent-free, lossless data compression
library which is used by many different programs.
%package devel
Summary: Header files and libraries for Zlib development
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The zlib-devel package contains the header files and libraries needed
to develop programs that use the zlib compression and decompression
library.
%package static
Summary: Static libraries for Zlib development
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
The zlib-static package includes static libraries needed
to develop programs that use the zlib compression and
decompression library.
%package -n minizip
Summary: Library for manipulation with .zip archives
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description -n minizip
Minizip is a library for manipulation with files from .zip archives.
%package -n minizip-devel
Summary: Development files for the minizip library
Group: Development/Libraries
Requires: minizip = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
Requires: pkgconfig
%description -n minizip-devel
This package contains the libraries and header files needed for
developing applications which use minizip.
%prep
%setup -q
%patch0 -p1 -b .fixuncrypt
%ifarch s390 s390x
%patch1 -p1 -b .optimized-deflate
%endif
%patch2 -p1 -b .z-flush
%patch3 -p1 -b .minizip_include
iconv -f iso-8859-2 -t utf-8 < ChangeLog > ChangeLog.tmp
mv ChangeLog.tmp ChangeLog
%build
%if 0%{?rhel} >= 7
%ifarch ppc64
export CFLAGS="$RPM_OPT_FLAGS -O3"
%else
export CFLAGS="$RPM_OPT_FLAGS"
%endif
%else
export CFLAGS="$RPM_OPT_FLAGS"
%endif
export LDFLAGS="$LDFLAGS -Wl,-z,relro -Wl,-z,now"
./configure --libdir=%{_libdir} --includedir=%{_includedir} --prefix=%{_prefix}
make %{?_smp_mflags}
cd contrib/minizip
autoreconf --install
%configure --enable-static=no
make %{?_smp_mflags}
%check
make test
%install
make install DESTDIR=$RPM_BUILD_ROOT
cd contrib/minizip
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n minizip -p /sbin/ldconfig
%postun -n minizip -p /sbin/ldconfig
%files
%{!?_licensedir:%global license %%doc}
%license README
%doc ChangeLog FAQ
%{_libdir}/libz.so.*
%files devel
%{!?_licensedir:%global license %%doc}
%license README
%doc doc/algorithm.txt test/example.c
%{_libdir}/libz.so
%{_libdir}/pkgconfig/zlib.pc
%{_includedir}/zlib.h
%{_includedir}/zconf.h
%{_mandir}/man3/zlib.3*
%files static
%{!?_licensedir:%global license %%doc}
%license README
%{_libdir}/libz.a
%files -n minizip
%doc contrib/minizip/MiniZip64_info.txt contrib/minizip/MiniZip64_Changes.txt
%{_libdir}/libminizip.so.*
%files -n minizip-devel
%dir %{_includedir}/minizip
%{_includedir}/minizip/*.h
%{_libdir}/libminizip.so
%{_libdir}/pkgconfig/minizip.pc
%changelog
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.8-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Aug 14 2015 Adam Jackson <ajax@redhat.com> 1.2.8-9
- Link with -z now for full RELRO
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Wed Aug 6 2014 Tom Callaway <spot@fedoraproject.org> - 1.2.8-6
- fix license handling
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed Feb 12 2014 jchaloup <jchaloup@redhat.com> - 1.2.8-4
- resolves: #1064213
recompiled with -O3 flag for ppc64 arch
* Sat Aug 10 2013 Kalev Lember <kalevlember@gmail.com> - 1.2.8-3
- resolves: #985344
add a patch to fix missing minizip include
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Jun 7 2013 Peter Schiffer <pschiffe@redhat.com> - 1.2.8-1
- resolves: #957680
updated to 1.2.8
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Oct 4 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.7-9
- updated patch optimizing deflate on s390(x) architectures
* Wed Aug 29 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.7-8
- related: #832545
reverted changes for this bug, static libraries shouldn't be compiled with
-fPIC flag
* Mon Aug 27 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.7-7
- resolves: #844791
rank Z_BLOCK flush below Z_PARTIAL_FLUSH only when last flush was Z_BLOCK
- done some minor .spec file cleanup
* Mon Aug 13 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.7-6
- added patch from IBM which optimizes deflate on s390(x) architectures
* Thu Aug 02 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.7-5
- resolves: #832545
recompiled with -fPIC flag
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Mon Jun 11 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.7-3
- moved /lib* to /usr/lib*
* Mon Jun 11 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.7-2
- recompiled with -Wl,-z,relro flags
* Thu May 10 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.7-1
- resolves: #785726
- resolves: #805874
update to 1.2.7
* Tue Jan 10 2012 Peter Schiffer <pschiffe@redhat.com> - 1.2.5-6
- resolves: #719139
Zlib fails to read zip64 files on 64-bit system
* Fri Nov 11 2011 Tom Callaway <spot@fedoraproject.org> - 1.2.5-5
- fix minizip to permit uncrypt when NOUNCRYPT is not defined
* Wed Apr 6 2011 Ivana Hutarova Varekova <varekova@redhat.com> - 1.2.5-4
- Resolves: #678603
zlib from minizip allowed NULL pointer parameter of function unzGetCurrentFileInfo
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Jun 16 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 1.2.5-2
- Resolves: #591317
pdfedit fails to compile on i686 with zlib.h errors
* Thu Apr 22 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 1.2.5-1
- update to 1.2.5
* Mon Mar 29 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 1.2.4-1
- update to 1.2.4
use the upstream make/configure files for zlib,
change additional makefile/configure file to be used only to minizip
add pkgconfig to zlib
* Mon Mar 8 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 1.2.3-25
- add Boost license
* Tue Aug 11 2009 Ville Skyttä <ville.skytta@iki.fi> - 1.2.3-24
- Use bzipped upstream tarball.
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Mar 18 2009 Stepan Kasal <skasal@redhat.com> - 1.2.3-22
- fix the libz.so symlink
* Tue Mar 17 2009 Stepan Kasal <skasal@redhat.com> - 1.2.3-21
- consolidate the autoconfiscation patches into one and clean it up
- consequently, clean up the %%build and %%install sections
- zconf.h includes unistd.h again (#479133)
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Mon Dec 1 2008 Ivana Varekova <varekova@redhat.com> - 1.2.3-19
- fix 473490 - unchecked malloc
* Wed Feb 13 2008 Ivana Varekova <varekova@redhat.com> - 1.2.3-18
- change license tag (226671#c29)
* Mon Feb 11 2008 Ivana Varekova <varekova@redhat.com> - 1.2.3-17
- spec file changes
* Fri Nov 23 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-16
- remove minizip headers to minizip-devel
- spec file cleanup
- fix minizip.pc file
* Wed Nov 14 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-15
- separate static subpackage
* Wed Aug 15 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-14
- create minizip subpackage
* Mon May 21 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-13
- remove .so,.a
* Mon May 21 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-12
- Resolves #240277
Move libz to /lib(64)
* Mon Apr 23 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-11
- Resolves: 237295
fix Summary tag
* Fri Mar 23 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-10
- remove zlib .so.* packages to /lib
* Fri Mar 9 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-9
- incorporate package review feedback
* Tue Feb 21 2007 Adam Tkac <atkac redhat com> - 1.2.3-8
- fixed broken version of libz
* Tue Feb 20 2007 Adam Tkac <atkac redhat com> - 1.2.3-7
- building is now automatized
- specfile cleanup
* Tue Feb 20 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-6
- remove the compilation part to build section
some minor changes
* Mon Feb 19 2007 Ivana Varekova <varekova@redhat.com> - 1.2.3-5
- incorporate package review feedback
* Mon Oct 23 2006 Ivana Varekova <varekova@redhat.com> - 1.2.3-4
- fix #209424 - fix libz.a permissions
* Wed Jul 19 2006 Ivana Varekova <varekova@redhat.com> - 1.2.3-3
- add cflags (#199379)
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.2.3-2
- rebuild
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.2.3-1.2.1
- bump again for double-long bug on ppc(64)
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.2.3-1.2
- rebuilt for new gcc4.1 snapshot and glibc changes
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Wed Aug 24 2005 Florian La Roche <laroche@redhat.com>
- update to 1.2.3
* Fri Jul 22 2005 Ivana Varekova <varekova@redhat.com> 1.2.2.2-5
- fix bug 163038 - CAN-2005-1849 - zlib buffer overflow
* Thu Jul 7 2005 Ivana Varekova <varekova@redhat.com> 1.2.2.2-4
- fix bug 162392 - CAN-2005-2096
* Wed Mar 30 2005 Ivana Varekova <varekova@redhat.com> 1.2.2.2-3
- fix bug 122408 - zlib build process runs configure twice
* Fri Mar 4 2005 Jeff Johnson <jbj@redhat.com> 1.2.2.2-2
- rebuild with gcc4.
* Sat Jan 1 2005 Jeff Johnson <jbj@jbj.org> 1.2.2.2-1
- upgrade to 1.2.2.2.
* Fri Nov 12 2004 Jeff Johnson <jbj@jbj.org> 1.2.2.1-1
- upgrade to 1.2.2.1.
* Sun Sep 12 2004 Jeff Johnson <jbj@redhat.com> 1.2.1.2-1
- update to 1.2.1.2 to fix 2 DoS problems (#131385).
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Sun Jan 18 2004 Jeff Johnson <jbj@jbj.org> 1.2.1.1-1
- upgrade to zlib-1.2.1.1.
* Sun Nov 30 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- update to 1.2.1 release
* Mon Oct 13 2003 Jeff Johnson <jbj@jbj.org> 1.2.0.7-3
- unrevert zlib.h include constants (#106291), rejected upstream.
* Wed Oct 8 2003 Jeff Johnson <jbj@jbj.org> 1.2.0.7-2
- fix: gzeof not set when reading compressed file (#106424).
- fix: revert zlib.h include constants for now (#106291).
* Tue Sep 23 2003 Jeff Johnson <jbj@redhat.com> 1.2.0.7-1
- update to 1.2.0.7, penultimate 1.2.1 release candidate.
* Tue Jul 22 2003 Jeff Johnson <jbj@redhat.com> 1.2.0.3-0.1
- update to release candidate.
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Mon May 19 2003 Jeff Johnson <jbj@redhat.com> 1.1.4-9
- rebuild, revert from 1.2.0.1.
* Mon Feb 24 2003 Jeff Johnson <jbj@redhat.com> 1.1.4-8
- fix gzprintf buffer overrun (#84961).
* Wed Jan 22 2003 Tim Powers <timp@redhat.com> 1.1.4-7
- rebuilt
* Thu Nov 21 2002 Elliot Lee <sopwith@redhat.com> 1.1.4-6
- Make ./configure use $CC to ease cross-compilation
* Tue Nov 12 2002 Jeff Johnson <jbj@redhat.com> 1.1.4-5
- rebuild from cvs.
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Fri Apr 26 2002 Jakub Jelinek <jakub@redhat.com> 1.1.4-2
- remove glibc patch, it is no longer needed (zlib uses gcc -shared
as it should)
- run tests and only build the package if they succeed
* Thu Apr 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.1.4-1
- 1.1.4
* Wed Jan 30 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.1.3-25.7
- Fix double free
* Sun Aug 26 2001 Trond Eivind Glomsrød <teg@redhat.com> 1.1.3-24
- Add example.c and minigzip.c to the doc files, as
they are listed as examples in the README (#52574)
* Mon Jun 18 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Updated URL
- Add version dependency for zlib-devel
- s/Copyright/License/
* Wed Feb 14 2001 Trond Eivind Glomsrød <teg@redhat.com>
- bumped version number - this is the old version without the performance enhancements
* Fri Sep 15 2000 Florian La Roche <Florian.LaRoche@redhat.de>
- add -fPIC for shared libs (patch by Fritz Elfert)
* Thu Sep 7 2000 Jeff Johnson <jbj@redhat.com>
- on 64bit systems, make sure libraries are located correctly.
* Thu Aug 17 2000 Jeff Johnson <jbj@redhat.com>
- summaries from specspo.
* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild
* Sun Jul 02 2000 Trond Eivind Glomsrød <teg@redhat.com>
- rebuild
* Tue Jun 13 2000 Jeff Johnson <jbj@redhat.com>
- FHS packaging to build on solaris2.5.1.
* Wed Jun 07 2000 Trond Eivind Glomsrød <teg@redhat.com>
- use %%{_mandir} and %%{_tmppath}
* Fri May 12 2000 Trond Eivind Glomsrød <teg@redhat.com>
- updated URL and source location
- moved README to main package
* Mon Feb 7 2000 Jeff Johnson <jbj@redhat.com>
- compress man page.
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 5)
* Wed Sep 09 1998 Cristian Gafton <gafton@redhat.com>
- link against glibc
* Mon Jul 27 1998 Jeff Johnson <jbj@redhat.com>
- upgrade to 1.1.3
* Fri May 08 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr
* Wed Apr 08 1998 Cristian Gafton <gafton@redhat.com>
- upgraded to 1.1.2
- buildroot
* Tue Oct 07 1997 Donnie Barnes <djb@redhat.com>
- added URL tag (down at the moment so it may not be correct)
- made zlib-devel require zlib
* Thu Jun 19 1997 Erik Troan <ewt@redhat.com>
- built against glibc