# # spec file for package libzip # # Copyright (c) 2018 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 sover 5 Name: libzip Version: 1.5.1 Release: 1.2 Summary: C library for reading, creating, and modifying zip archives License: BSD-3-Clause Group: Development/Libraries/C and C++ URL: https://libzip.org/ Source0: https://libzip.org/download/libzip-%{version}.tar.gz Source1: baselibs.conf # PATCH-FIX-OPENSUSE: close on exec, upstream is aware Patch1: libzip-ocloexec.patch Patch2: pkgconfig.patch BuildRequires: cmake BuildRequires: fdupes BuildRequires: groff BuildRequires: libbz2-devel BuildRequires: openssl-devel BuildRequires: pkgconfig # for tests BuildRequires: timezone # for tests BuildRequires: unzip BuildRequires: zlib-devel Provides: libzip-util = %{version} Obsoletes: libzip-util < %{version} %description libzip is a C library for reading, creating, and modifying zip archives. Files can be added from data buffers, files, or compressed. This package contains a set of small utilities built using libzip * zipmerge - merge source zip archives into the target one * zipcmp - compares the zip archives and check if they contains same files %package -n libzip%{sover} Summary: C library for reading, creating, and modifying zip archives Group: Development/Libraries/C and C++ %description -n libzip%{sover} This is libzip, a C library for reading, creating, and modifying zip archives. Files can be added from data buffers, files, or compressed data copied directly from other zip archives. Changes made without closing the archive can be reverted. The API is documented by man pages. %package devel Summary: C library for reading, creating, and modifying zip archives Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: libzip%{sover} = %{version} %description devel libzip is a C library for reading, creating, and modifying zip archives. This package contains devel files. %package tools Summary: Utilities from the libzip project Group: Productivity/Archiving/Compression Obsoletes: libzip < %{version} Provides: libzip = %{version} %description tools This subpackage contains zipcmp and zipmerge, for comparison of two archives, and merging multiple archives together, respectively. %prep %autosetup -p1 %build %cmake -DDOCUMENTATION_FORMAT=man make %{?_smp_mflags} %install %cmake_install rm -f %{buildroot}%{_libdir}/libzip.la %fdupes %{buildroot}%{_mandir}/man3 %check # path needs to be exported otherwise unit tests will fail export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} %ctest %post -n libzip%{sover} -p /sbin/ldconfig %postun -n libzip%{sover} -p /sbin/ldconfig %files tools %{_bindir}/zipcmp %{_bindir}/zipmerge %{_bindir}/ziptool %{_mandir}/man1/zipcmp.1%{?ext_man} %{_mandir}/man1/zipmerge.1%{?ext_man} %{_mandir}/man1/ziptool.1%{?ext_man} %files -n libzip%{sover} %license LICENSE %{_libdir}/libzip.so.%{sover}* %files devel %doc AUTHORS NEWS.md THANKS %{_libdir}/%{name}.so %{_includedir}/zip.h %{_includedir}/zipconf.h %{_libdir}/pkgconfig/%{name}.pc %{_mandir}/man3/*.3%{?ext_man} %changelog * Thu Apr 12 2018 tchvatal@suse.com - Compile the package in %%build phase not during %%install phase * Wed Apr 11 2018 9+suse@cirno.systems - Update to version 1.5.1 * Choose format of installed documentation based on available tools. * Fix visibility of symbols. * Fix zipcmp directory support. * Don’t set RPATH on Linux. * Use Libs.private for link dependencies in pkg-config file. * Fix build with LibreSSL. * Various bugfixes. - Add groff to BuildRequires (so manpages get installed) * Mon Apr 2 2018 mimi.vx@gmail.com - add pkgconfig.patch - fixes boo#1087756 * Mon Mar 19 2018 mpluskal@suse.com - Enable tests again - Enable more functionality by updating dependencies - Deduplicate manpages * Mon Mar 12 2018 avindra@opensuse.org - update to version 1.5.0: * Use standard cryptographic library instead of custom AES implementation. This also simplifies the license. - includes 1.4.0: * Improve build with cmake (retires autoconf/automake) * Add zip_source_buffer_fragment(). * Add support to clone unchanged beginning of archive (instead of rewriting it). Supported for buffer sources and on AFS. - rebase libzip-ocloexec.patch - drop libzip-uninitialized-value.patch * merged in 8609c9ce6c8e613a7b5825e4d0eba8a31fe67e75 - cleanup with spec-cleaner * Tue Dec 19 2017 pgajdos@suse.com - updated to version 1.3.2: * Fix bug introduced in last: zip_t was erroneously freed if zip_close() failed. * Install zipconf.h into ${PREFIX}/include * Add zip_libzip_version() * Fix AES tests on Linux * Support bzip2 compressed zip archives * Improve file progress callback code * Fix zip_fdopen() * CVE-2017-12858: Fix double free() * CVE-2017-14107: Improve EOCD64 parsing - removed patches (upstreamed) * libzip-CVE-2017-12858.patch * libzip-CVE-2017-14107.patch - added patch (fixed in head) * libzip-uninitialized-value.patch * Fri Sep 22 2017 pgajdos@suse.com - reverted 'version update to 1.3.0' due failing i586 tests - remove libzip-disable-failing-tests.patch again - add libzip-CVE-2017-12858.patch again - add libzip-CVE-2017-14107.patch [bsc#1056996] * Wed Sep 6 2017 pgajdos@suse.com - update to version 1.3.0: * Support bzip2 compressed zip archives * Improve file progress callback code * Fix zip_fdopen() * CVE-2017-12858: Fix double free(). * CVE-2017-14107: Improve EOCD64 parsing. - remove upstreamed libzip-CVE-2017-12858.patch - added libzip-disable-failing-tests.patch [bsc#1056996#c12] * Mon Aug 28 2017 pgajdos@suse.com - security update: * CVE-2017-12858 [bsc#1055377] + libzip-CVE-2017-12858.patch * Mon Jun 19 2017 jengelh@inai.de - Drop with-pic which is for static libs only. * Wed Jun 7 2017 mpluskal@suse.com - Small spec file and dependencies cleanup - Try profiled build * Mon Feb 20 2017 pgajdos@suse.com - Update to version 1.2.0: * Support for AES encryption (Winzip version), both encryption and decryption. * Support legacy zip files with >64k entries. * Fix seeking in zip_source_file if start > 0. * Add zip_fseek() for seeking in uncompressed data. * Add zip_ftell() for telling position in uncompressed data. * Add zip_register_progress_callback() for UI updates during zip_close() * Mon May 30 2016 mpluskal@suse.com - Update to version 1.1.3: * Fix build on Windows when using autoconf. * Mon Feb 22 2016 pgajdos@suse.com - update to 1.1.2 * Improve support for 3MF files * ziptool(1): command line tool to modify zip archives * Speedups for archives with many entries * Better APK support * Documentation improvements * Tue May 5 2015 jengelh@inai.de - Update to new upstream release 1.0.1 * (Build fixes for Windows only) - The documentation targets the library, so move them from -tools to -devel subpackage. * Mon May 4 2015 jengelh@inai.de - Place utilities in a separate subpackage which explicitly has "-tools" in its name. * Mon May 4 2015 pgajdos@suse.com - updated to 1.0: * Implemented an I/O abstraction layer. * Added support for native Windows API for files. * Added support for setting the last modification time for a file. * Added a new type zip_error_t for errors. * Added more typedefs for structs. * Torrentzip support was removed. * CVE-2015-2331 was fixed. * Addressed all Coverity CIDs. - removed upstreamed patches: - libzip-CVE-2015-2331.patch - libzip-fseeko.patch - libzip-fix-large-file-support.patch http://www.nih.at/listarchive/libzip-discuss/msg00489.html - libzip-autoconf-268.patch * Fri Mar 20 2015 pgajdos@suse.com - fix CVE-2015-2331 [bnc#923240] + libzip-CVE-2015-2331.patch * Wed Oct 29 2014 opensuse@sukimashita.com - add libzip-fseeko.patch which changes two fseek() calls that were not replaced with fseeko() to properly support large files - properly mark patches as PATCH-FIX-UPSTREAM where it applies * Wed Oct 22 2014 opensuse@sukimashita.com - add libzip-fix-large-file-support.patch to fix LFS support not being activated for 32bit compilation and thus >2GB Zip files failing to open * Wed Jun 4 2014 hrvoje.senjan@gmail.com - Add baselibs.conf * Thu Apr 3 2014 tbehrens@suse.com - fix for bnc#859525 has happened upstream - update to 0.11.2 - drop: libzip-visibility.diff (included upstream already) * Mon May 6 2013 mvyskocil@suse.com - use upstream patch for visibility drop: libzip-0.8.hg20080403-visibility.patch add : libzip-visibility.diff - tag all patches according a policy * Mon Apr 29 2013 mvyskocil@suse.com - make test failure fatal again and add needed timezone and unzip build dependencies * Mon Apr 29 2013 mvyskocil@suse.com - update to 0.11.1 * Fix bugs in zip_set_file_compression(). * Added Zip64 support (large file support) * Added UTF-8 support for file names, file comments, and archive comments * Changed API for name and comment related functions for UTF-8 support * Added zip_discard() * Added ZIP_TRUNCATE for zip_open() * Added zip_set_file_compression() * Added API for accessing and modifying extra fields * Improved API type consistency * Use gcc4's visibility __attribute__ * More changes for Windows support * Additional test cases - split the automake part from ocloexec patch to libzip-autoconf-268.patch - drop already upstream libzip.test.diff - make tests non-fail, until issue will be solved upstream * Mon Mar 4 2013 jengelh@inai.de - Specify exact build requirements on autotools (2.68 comes from patch; tarball has 2.57) * Tue Mar 20 2012 pgajdos@suse.com - updated to 0.10.1: fixes * CVE-2012-1162 [bnc#751829] * CVE-2012-1163 [bnc#751830] * Mon Feb 13 2012 coolo@suse.com - patch license to follow spdx.org standard * Thu Dec 29 2011 crrodriguez@opensuse.org - Use O_CLOEXEC where needed, as calling applications may fork.. execve and we end up leaking internal fds. * Mon Nov 21 2011 jengelh@medozas.de - Remove redundant/unwanted tags/section (cf. specfile guidelines) - Use %%_smp_mflags for parallel building * Sun Nov 20 2011 coolo@suse.com - add libtool as buildrequire to avoid implicit dependency * Mon Jul 25 2011 andrea@opensuse.org - restore zipconf.h into include dir or packages using zip.h will fail to build * Tue Mar 22 2011 coolo@novell.com - fix -devel dependency * Tue Mar 22 2011 mvyskocil@suse.cz - don't move zipconf.h to include dir * Mon Mar 21 2011 mvyskocil@suse.cz - update to 0.10 - rename to libzip to avoid source package rename on each soname change. Package libzip deprecate libzip-utils * add zip_get_num_files(), deprecate zip_get_num_entries(). * support for traditional PKWARE encryption added. * fix opening archives with more than 65535 entries. * fix some memory leaks. * fix cmake build and installation * fix memory leak in error case in zip_open() * fix CVE-2011-0421 (no security implications though) (bnc#681193) * more documentation. - refresh libzip-0.8.hg20080403-visibility.patch - add libzip.test.diff from upstream fixing failed tests - add libzip-0.10-zipconf-location.patch installs zipconf.h to includedir - add pkg-config to BuildRequires * Sun Jul 27 2008 crrodriguez@suse.de - update to version 0.9 * remove erroneous references to GPL * add support for torrentzip * new functions: zip_get_archive_flag, zip_set_archive_flag * zip_source_zip: add flag to force recompression * zip_sorce_file: only keep file open while reading from it * Thu Apr 3 2008 crrodriguez@suse.de - initial version for openSUSE 11, needed by ARK/KDE4 * Thu Jun 7 2007 judas_iscariote@shorewall.net - update to stable 0.8 version