1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
Name: zlib
Version: 1.3
Release: 1
Summary: A lossless data-compression library
License: zlib and Boost
URL: http://www.zlib.net
Source0: http://www.zlib.net/zlib-%{version}.tar.xz
# Patch0 get from fedora
Patch6000: backport-zlib-1.2.5-minizip-fixuncrypt.patch
Patch6001: backport-fix-undefined-buffer-detected-by-oss-fuzz.patch
Patch9000: zlib-Optimize-CRC32.patch
Patch9001: zlib-1.3-SIMD.patch
BuildRequires: automake, autoconf, libtool
%description
Zlib is a free, general-purpose, not covered by any patents, lossless data-compression
library for use on virtually any computer hardware and operating system. The zlib data
format is itself portable across platforms.
%package devel
Summary: Header files and libraries for Zlib development
Requires: %{name} = %{version}-%{release}
Provides: zlib-static
Obsoletes: zlib-static
%description devel
This package contains the static library, the header files, the tests user case and other
development content.
%package help
Summary: Help documentation related to zlib
BuildArch: noarch
%description help
This package includes help documentation and manuals related to zlib.
%package -n minizip
Summary: Encapsulates the operations related to zip files
Requires: %{name} = %{version}-%{release}
%description -n minizip
Minizip is the upper library of zlib, which encapsulates the operations related to zip files.
%package -n minizip-devel
Summary: The development-related content related to minizip
Requires: minizip = %{version}-%{release}
Requires: %{name}-devel = %{version}-%{release}
%description -n minizip-devel
This package contains the development-related content related to minizip.
%prep
%setup -qn %{name}-%{version}
%autosetup -b 0 -n %{name}-%{version} -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
%ifarch aarch64
CFLAGS+=" -march=armv8-a+crc"
%endif
./configure --libdir=%{_libdir} --includedir=%{_includedir} --prefix=%{_prefix}
%make_build LDFLAGS="$LDFLAGS -Wl,-z,relro -Wl,-z,now"
cd contrib/minizip
autoreconf --install
%configure --enable-static=no
%make_build
%install
%make_install
%make_install -C contrib/minizip
rm -f $RPM_BUILD_ROOT%_includedir/minizip/crypt.h
%check
%make_build test
%files
%license LICENSE
%doc README ChangeLog FAQ
%{_libdir}/libz.so.*
%files devel
%doc doc/algorithm.txt test/example.c
%{_includedir}/zlib.h
%{_includedir}/zconf.h
%{_libdir}/libz.so
%{_libdir}/pkgconfig/zlib.pc
%{_libdir}/libz.a
%files help
%{_mandir}/man3/zlib.3*
%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
* Sat Aug 19 2023 Funda Wang <fundawang@yeah.net> - 1.3-1
- update to 1.3
* Thu Dec 29 2022 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.2.13-1
- update to zlib-1.2.13
- remove openEuler uncompiled patch : 0005-Accelerate-Adler32-using-arm64-SVE-instructions.patch
* Mon Dec 26 2022 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.2.11-24
- DESC:remove unapplied patches
* Tue Aug 23 2022 shixuantong <shixuantong@h-partners.com> - 1.2.11-23
- Fix missing patches due to different arch
* Fri Aug 12 2022 dongyuzhen <dongyuzhen@h-partners.com> - 1.2.11-22
- fix CVE-2022-37434
* Mon Apr 18 2022 tianwei <tianwei12@h-partners.com> - 1.2.11-21
- modify patch info for CVE-2018-25032
* Wed Apr 13 2022 tianwei <tianwei12@h-partners.com> - 1.2.11-20
- fix CVE-2018-25032
* Thu Sep 2 2021 liqiang <liqiang64@huawei.com> - 1.2.11-19
- Optimize Adler32 by SVE instructions.
* Mon Sep 14 2020 noah <hedongbo@huawei.com> - 1.2.11-18
- add zlib-1.2.11-SIMD.patch
* Sat Dec 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.2.11-17
- Fix undefined buffer detected by oss-fuzz
* Tue Dec 3 2019 liqiang <liqiang64@huawei.com> - 1.2.11-16
- Optimize CRC32 by NEON
* Thu Sep 5 2019 dongjian <dongjian13@huawei.com> - 1.2.11-15
- Rebuild the zlib and fix description
|