# # spec file for package zziplib # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define lname libzzip-0-13 Name: zziplib Version: 0.13.69 Release: 4.2 Summary: ZIP Compression Library License: LGPL-2.1+ Group: Development/Libraries/C and C++ Url: http://zziplib.sourceforge.net Source0: https://github.com/gdraheim/zziplib/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source2: baselibs.conf Patch0: zziplib-0.13.62.patch Patch1: zziplib-0.13.62-wronglinking.patch Patch2: zziplib-largefile.patch Patch3: CVE-2018-7726.patch Patch4: CVE-2018-7725.patch Patch5: CVE-2018-16548.patch Patch6: CVE-2018-17828.patch Patch7: bsc1129403-prevent-division-by-zero.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: xmlto BuildRequires: pkgconfig(zlib) %description ZZipLib is a library for dealing with ZIP and ZIP-like archives by using algorithms of zlib. %package -n %{lname} Summary: ZIP compression library Group: System/Libraries Obsoletes: zziplib < %{version}-%{release} Provides: zziplib = %{version}-%{release} %description -n %{lname} ZZipLib is a library for dealing with ZIP and ZIP-like archives by using algorithms of zlib. %package devel Summary: Development files for zziplib, a ZIP compression library Group: Development/Libraries/C and C++ Requires: %{lname} = %{version} Requires: pkgconfig(zlib) %description devel That are the header files needed for developing applications using ZZipLib. %prep %setup -q %patch0 %patch1 %patch2 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 # do not bother with html docs saving us python2 dependency sed -i -e 's:docs ::g' Makefile.am %build autoreconf -fiv %configure \ --with-largefile \ --enable-frame-pointer \ --disable-static make %{?_smp_mflags} %install %make_install rm -f docs/Make* docs/zziplib-manpages.ar find %{buildroot} -type f -name "*.la" -delete -print %post -n %{lname} -p /sbin/ldconfig %postun -n %{lname} -p /sbin/ldconfig %files -n %{lname} %license COPYING.LIB %{_libdir}/libzzip*.so.* %files devel %doc docs/README.SDL ChangeLog README TODO %{_bindir}/unzzip* %{_bindir}/zz* %{_bindir}/unzip-mem %{_libdir}/libzzip*.so %{_includedir}/* %{_libdir}/pkgconfig/*.pc %{_datadir}/aclocal/*.m4 %changelog * Thu Jun 13 2019 josef.moellers@suse.com - Prevent division by zero by first checking if uncompressed size is 0. This may happen with directories which have a compressed and uncompressed size of 0. [bsc#1129403, bsc1129403-prevent-division-by-zero.patch] * Thu Oct 4 2018 josef.moellers@suse.com - Remove any "../" components from pathnames of extracted files. [bsc#1110687, CVE-2018-17828, CVE-2018-17828.patch] * Fri Sep 7 2018 josef.moellers@suse.com - Avoid memory leak from __zzip_parse_root_directory(). Free allocated structure if its address is not passed back. [bsc#1107424, CVE-2018-16548, CVE-2018-16548.patch] * Mon Mar 19 2018 josef.moellers@suse.com - Check if data from End of central directory record makes sense. Especially the Offset of start of central directory must not a) be negative or b) point behind the end-of-file. - Check if compressed size in Central directory file header makes sense, i.e. the file's data does not extend beyond the end of the file. [bsc#1084517, CVE-2018-7726, CVE-2018-7726.patch, bsc#1084519, CVE-2018-7725, CVE-2018-7725.patch] * Sat Mar 17 2018 avindra@opensuse.org - Update to 0.13.69: * fix a number of CVEs reported with special *.zip PoC files * completing some doc strings while checking the new man-pages to look good * update refs to point to github instead of sf.net * man-pages are generated with new dbk2man.py - docbook xmlto is optional now * a zip-program is still required for testing, but some errors are gone when not present - run spec-cleaner - don't ship Windows only file, README.MSVC6 * Mon Feb 19 2018 adam.majer@suse.de - Drop BR: fdupes since it does nothing. * Mon Feb 19 2018 jengelh@inai.de - Fix RPM groups. Remove ineffective --with-pic. Trim redundancies from description. Do not let fdupes run across partitions. * Sun Feb 18 2018 avindra@opensuse.org - Update to 0.13.68: * fix a number of CVEs reported with special *.zip files * minor doc updates referencing GitHub instead of sf.net - drop CVE-2018-6381.patch * merged in a803559fa9194be895422ba3684cf6309b6bb598 - drop CVE-2018-6484.patch * merged in 0c0c9256b0903f664bca25dd8d924211f81e01d3 - drop CVE-2018-6540.patch * merged in 15b8c969df962a444dfa07b3d5bd4b27dc0dbba7 - drop CVE-2018-6542.patch * merged in 938011cd60f5a8a2a16a49e5f317aca640cf4110 * Wed Feb 14 2018 josef.moellers@suse.com - Changed %%license to %%doc in SPEC file. * Mon Feb 12 2018 josef.moellers@suse.com - If the size of the central directory is too big, reject the file. Then, if loading the ZIP file fails, display an error message. [CVE-2018-6542.patch, CVE-2018-6542, bsc#1079094] * Tue Feb 6 2018 josef.moellers@suse.com - If an extension block is too small to hold an extension, do not use the information therein. - If the End of central directory record (EOCD) contains an Offset of start of central directory which is beyond the end of the file, reject the file. [CVE-2018-6540, bsc#1079096, CVE-2018-6540.patch] * Fri Feb 2 2018 josef.moellers@suse.com - Reject the ZIP file and report it as corrupt if the size of the central directory and/or the offset of start of central directory point beyond the end of the ZIP file. [CVE-2018-6484, boo#1078701, CVE-2018-6484.patch] * Thu Feb 1 2018 josef.moellers@suse.com - If a file is uncompressed, compressed and uncompressed sizes should be identical. [CVE-2018-6381, bsc#1078497, CVE-2018-6381.patch] * Tue Jan 23 2018 tchvatal@suse.com - Drop tests as they fail completely anyway, not finding lib needing zip command, this should allow us to kill python dependency - Also drop docs subdir avoiding python dependency for it * The generated xmls were used for mans too but we shipped those only in devel pkg and as such we will live without them * Tue Jan 23 2018 tchvatal@suse.com - Version update to 0.13.67: * Various fixes found by fuzzing * Merged bellow patches - Remove merged patches: * zziplib-CVE-2017-5974.patch * zziplib-CVE-2017-5975.patch * zziplib-CVE-2017-5976.patch * zziplib-CVE-2017-5978.patch * zziplib-CVE-2017-5979.patch * zziplib-CVE-2017-5981.patch - Switch to github tarball as upstream seem no longer pull it to sourceforge - Remove no longer applying patch zziplib-unzipcat-NULL-name.patch * The sourcecode was quite changed for this to work this way anymore, lets hope this is fixed too * Wed Nov 1 2017 mpluskal@suse.com - Packaking changes: * Depend on python2 explicitly * Cleanup with spec-cleaner * Thu Mar 23 2017 josef.moellers@suse.com - Several bugs fixed: * heap-based buffer overflows (bsc#1024517, CVE-2017-5974, zziplib-CVE-2017-5974.patch) * check if "relative offset of local header" in "central directory header" really points to a local header (ZZIP_FILE_HEADER_MAGIC) (bsc#1024528, CVE-2017-5975, zziplib-CVE-2017-5975.patch) * protect against bad formatted data in extra blocks (bsc#1024531, CVE-2017-5976, zziplib-CVE-2017-5976.patch) * NULL pointer dereference in main (unzzipcat-mem.c) (bsc#1024532, bsc#1024536, CVE-2017-5975, zziplib-CVE-2017-5975.patch) * protect against huge values of "extra field length" in local file header and central file header (bsc#1024533, CVE-2017-5978, zziplib-CVE-2017-5978.patch) * clear ZZIP_ENTRY record before use. (bsc#1024534, bsc#1024535, CVE-2017-5979, CVE-2017-5977, zziplib-CVE-2017-5979.patch) * prevent unzzipcat.c from trying to print a NULL name (bsc#1024537, zziplib-unzipcat-NULL-name.patch) * Replace assert() by going to error exit. (bsc#1034539, CVE-2017-5981, zziplib-CVE-2017-5981.patch) * Sat Mar 16 2013 schwab@linux-m68k.org - zziplib-largefile.patch: Enable largefile support - Enable debug information * Sat Dec 15 2012 p.drouand@gmail.com - Update to 0.13.62 version: * configure.ac: fallback to libtool -export-dynamic unless being sure to use gnu-ld --export-dynamic. The darwin case is a bit special here as the c-compiler and linker might be from different worlds. * Makefile.am: allow nonstaic build * wrap fd.open like in the Fedora patch - Remove the package name on summary - Add dos2unix as build dependencie to fix a wrong file encoding * Sat Nov 19 2011 coolo@suse.com - add libtool as buildrequire to avoid implicit dependency * Fri Sep 16 2011 jengelh@medozas.de - Implement shlib policy/packaging for package, add baselibs.conf and resolve redundant constructs * Sat Apr 30 2011 crrodriguez@opensuse.org - Fix build with gcc 4.6 * Mon Feb 15 2010 dimstar@opensuse.org - Update to version 0.13.58: + Some bugs fixed, see ChangeLog * Mon Jul 27 2009 coolo@novell.com - update to version 0.13.56 - fixes many smaller issues (see Changelog) * Wed Jun 17 2009 coolo@novell.com - fix build with automake 1.11 * Mon Jan 26 2009 crrodriguez@suse.de - remove "la" files * Fri Oct 24 2008 wgottwalt@suse.de - removed ./msvc7/pkzip.exe and ./msvc8/zip.exe to avoid license problems * Wed Aug 15 2007 crrodriguez@suse.de - update to version 0.13.49 fixes #260734 buffer overflow due to wrong usage of strcpy() * Thu Mar 29 2007 dmueller@suse.de - adjust buildrequires * Mon Dec 4 2006 dmueller@suse.de - don't build as root * Tue Oct 3 2006 aj@suse.de - Fix build. * Fri Aug 18 2006 aj@suse.de - Fix build. * Mon May 22 2006 wgottwalt@suse.de - initial release - still problems with the "make check" build option