Commit Graph

144 Commits

Author SHA1 Message Date
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
Robert Scheck
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
Igor Gnatenko
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
Fedora Release Engineering
3cc7d30a3b - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 04:07:56 +00:00
Adam Jackson
f16bb8d805 Link with -z now for full RELRO 2015-08-14 12:26:23 -04:00