183 lines
6.8 KiB
RPMSpec
183 lines
6.8 KiB
RPMSpec
Name: zlib
|
|
Version: 1.2.11
|
|
Release: 26
|
|
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: zlib-1.2.5-minizip-fixuncrypt.patch
|
|
Patch6002: backport-0001-CVE-2018-25032.patch
|
|
Patch6003: backport-0002-CVE-2018-25032.patch
|
|
Patch6004: backport-0001-CVE-2022-37434.patch
|
|
Patch6005: backport-0002-CVE-2022-37434.patch
|
|
Patch6006: backport-Fix-unztell64-in-minizip-to-work-past-4GB.-Dani-l-H-.patch
|
|
Patch6007: backport-Fix-memory-leak-on-error-in-gzlog.c.patch
|
|
Patch6008: backport-Fix-deflateEnd-to-not-report-an-error-at-start-of-ra.patch
|
|
Patch6009: backport-Avoid-an-undefined-behavior-of-memcpy-in-_tr_stored_.patch
|
|
Patch6010: backport-Avoid-an-undefined-behavior-of-memcpy-in-gzappend.patch
|
|
Patch6012: backport-Handle-case-where-inflateSync-used-when-header-never.patch
|
|
Patch6013: backport-Return-an-error-if-the-gzputs-string-length-can-t-fi.patch
|
|
Patch6014: backport-Fix-bug-when-window-full-in-deflate_stored.patch
|
|
Patch6015: backport-Fix-CLEAR_HASH-macro-to-be-usable-as-a-single-statem.patch
|
|
Patch6016: backport-Don-t-bother-computing-check-value-after-successful-.patch
|
|
Patch6017: backport-Avoid-undefined-negation-behavior-if-windowBits-is-I.patch
|
|
Patch6018: backport-Fix-bug-in-block-type-selection-when-Z_FIXED-used.patch
|
|
Patch6019: backport-Fix-inflateBack-to-detect-invalid-input-with-distanc.patch
|
|
Patch6020: backport-Security-and-warning-fixes-for-minizip.-gvollant.patch
|
|
Patch6021: backport-Avoid-adding-empty-gzip-member-after-gzflush-with-Z_FINISH.patch
|
|
Patch6022: backport-Avoid-undefined-behaviors-of-memcpy-in-gzprintf.patch
|
|
Patch6023: backport-Fix-crash-when-gzsetparams-attempted-for-transparent-write.patch
|
|
Patch6024: backport-Remove-use-of-OF-from-contrib-untgz-and-render-it-compilable.patch
|
|
Patch6025: backport-minizip-Fix-being-unable-to-open-empty-zip-file.patch
|
|
Patch6026: backport-Fix-reading-disk-number-start-on-zip64-files-in-minizip.patch
|
|
Patch6027: backport-Fix-logic-error-in-minizip-argument-processing.patch
|
|
Patch6028: backport-Fix-bug-when-gzungetc-is-used-immediately-after-gzopen.patch
|
|
Patch6029: backport-Suppress-MSAN-detections-in-deflate-slide_hash.patch
|
|
Patch6030: backport-Fix-bug-when-using-gzflush-with-a-very-small-buffer.patch
|
|
Patch6031: backport-avoid-uninitialized-and-unused-warnings-in-contrib-minizip.patch
|
|
Patch6032: backport-CVE-2023-45853.patch
|
|
Patch6033: backport-Add-bounds-checking-to-ERR_MSG-macro-used-by-zError.patch
|
|
Patch6034: backport-Fix-bug-in-inflateSync-for-data-held-in-bit-buffer.patch
|
|
Patch6035: backport-Fix-decision-on-the-emission-of-Zip64-end-records-in.patch
|
|
Patch6036: backport-Neutralize-zip-file-traversal-attacks-in-miniunz.patch
|
|
Patch6037: backport-Fix-a-bug-in-ZLIB_DEBUG-compiles-in-check_match.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
|
|
%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
|
|
* Tue Jun 18 2024 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.2.11-26
|
|
- delete redundant patch
|
|
|
|
* Fri Apr 26 2024 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.2.11-25
|
|
- DESC:apply patches regardless of architecture in zlib.spec and backport patches from upstream
|
|
|
|
* Tue Oct 17 2023 liningjie <liningjie@xfusion.com> - 1.2.11-24
|
|
- DESC:Fix CVE-2023-45853
|
|
|
|
* Mon Dec 26 2022 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.2.11-23
|
|
- DESC:remove unapplied patch
|
|
|
|
* Fri Aug 12 2022 dongyuzhen <dongyuzhen@h-partners.com> - 1.2.11-22
|
|
- fix CVE-2022-37434
|
|
|
|
* Tue May 10 2022 tinawei <tianwei12@h-partners.com> - 1.2.11-21
|
|
- Fix patches info for pre
|
|
|
|
* Wed Apr 27 2022 tinawei <tianwei12@h-partners.com> - 1.2.11-20
|
|
- Fix CVE-2018-25032
|
|
|
|
* Mon Nov 1 2021 Jun Yang <jun.yang@suse.com> - 1.2.11-19
|
|
- list all the patches for aarch64 to make the source rpm same both for x86_64 and aarch64.
|
|
|
|
* 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
|