From d259e194df12569c8fe286eacd285be28118ecd7 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 7 Nov 2026 06:22:11 +0000 Subject: automatic import of zlib --- zlib.spec | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 zlib.spec (limited to 'zlib.spec') diff --git a/zlib.spec b/zlib.spec new file mode 100644 index 0000000..dfc333a --- /dev/null +++ b/zlib.spec @@ -0,0 +1,180 @@ +Name: zlib +Version: 1.2.13 +Release: 5 +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-CVE-2023-45853.patch +Patch6002: backport-Fix-crash-when-gzsetparams-attempted-for-transparent-write.patch +Patch6003: backport-Remove-use-of-OF-from-contrib-untgz-and-render-it-compilable.patch +Patch6004: backport-minizip-Fix-being-unable-to-open-empty-zip-file.patch +Patch6005: backport-Fix-reading-disk-number-start-on-zip64-files-in-minizip.patch +Patch6006: backport-Fix-logic-error-in-minizip-argument-processing.patch +Patch6007: backport-Fix-bug-when-gzungetc-is-used-immediately-after-gzopen.patch +Patch6008: backport-Suppress-MSAN-detections-in-deflate-slide_hash.patch +Patch6009: backport-Fix-bug-when-using-gzflush-with-a-very-small-buffer.patch +Patch6010: backport-avoid-uninitialized-and-unused-warnings-in-contrib-minizip.patch +Patch6011: backport-Add-bounds-checking-to-ERR_MSG-macro-used-by-zError.patch +Patch6012: backport-Fix-bug-in-inflateSync-for-data-held-in-bit-buffer.patch +Patch6013: backport-Fix-decision-on-the-emission-of-Zip64-end-records-in.patch +Patch6014: backport-Neutralize-zip-file-traversal-attacks-in-miniunz.patch +Patch6015: backport-Fix-a-bug-in-ZLIB_DEBUG-compiles-in-check_match.patch +Patch6016: backport-CVE-2026-27171.patch + +Patch9000: zlib-Optimize-CRC32.patch +Patch9001: zlib-1.2.11-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 -n %{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 + +find $RPM_BUILD_ROOT -name '*.la' | xargs rm -f + +%check +make test + +%files +%defattr(-,root,root) +%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 +* Wed Feb 25 2026 liweigang - 1.2.13-5 +- fix CVE-2026-27171 + +* Tue Aug 13 2024 yanglongkang - 1.2.13-4 +- backport patches from upstream + +* Tue Jun 18 2024 zhoupengcheng - 1.2.13-3 +- delete redundant patch + +* Tue May 14 2024 zhoupengcheng - 1.2.13-2 +- downgrade to zlib-1.2.13 + +* Wed Feb 21 2024 liweigang - 1.3.1-1 +- update to version zlib-1.3.1 + +* Tue Oct 17 2023 liningjie - 1.2.13-2 +- DESC:Fix CVE-2023-45853 + +* Thu Dec 29 2022 zhoupengcheng - 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 - 1.2.11-24 +- DESC:remove unapplied patches + +* Tue Aug 23 2022 shixuantong - 1.2.11-23 +- Fix missing patches due to different arch + +* Fri Aug 12 2022 dongyuzhen - 1.2.11-22 +- fix CVE-2022-37434 + +* Mon Apr 18 2022 tianwei - 1.2.11-21 +- modify patch info for CVE-2018-25032 + +* Wed Apr 13 2022 tianwei - 1.2.11-20 +- fix CVE-2018-25032 + +* Thu Sep 2 2021 liqiang - 1.2.11-19 +- Optimize Adler32 by SVE instructions. + +* Mon Sep 14 2020 noah - 1.2.11-18 +- add zlib-1.2.11-SIMD.patch + +* Sat Dec 21 2019 openEuler Buildteam - 1.2.11-17 +- Fix undefined buffer detected by oss-fuzz + +* Tue Dec 3 2019 liqiang - 1.2.11-16 +- Optimize CRC32 by NEON + +* Thu Sep 5 2019 dongjian - 1.2.11-15 +- Rebuild the zlib and fix description -- cgit v1.2.3