# # spec file for package libarchive # # 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 https://bugs.opensuse.org/ # %define somajor 13 %define libname libarchive%{somajor} %if 0%{?centos_version} || 0%{?rhel_version} %if 0%{?centos_version} <= 600 || 0%{?rhel_version <= 700} %bcond_without static_libs %bcond_with openssl %bcond_with ext2fs %endif %else %bcond_with static_libs %bcond_without openssl %bcond_without ext2fs %endif Name: libarchive Version: 3.4.0 Release: 1.2 Summary: Utility and C library to create and read several different streaming archive formats License: BSD-2-Clause Group: Productivity/Archiving/Compression URL: http://www.libarchive.org/ Source0: https://github.com/libarchive/libarchive/releases/download/v%{version}/libarchive-%{version}.tar.gz Source1: https://github.com/libarchive/libarchive/releases/download/v%{version}/libarchive-%{version}.tar.gz.asc Source2: libarchive.keyring Source1000: baselibs.conf BuildRequires: libacl-devel BuildRequires: libbz2-devel BuildRequires: libtool BuildRequires: libxml2-devel BuildRequires: pkgconfig BuildRequires: xz-devel BuildRequires: zlib-devel %if %{with ext2fs} BuildRequires: libext2fs-devel %endif %if %{with openssl} BuildRequires: libopenssl-devel %endif %description Libarchive is a programming library that can create and read several different streaming archive formats, including most popular tar variants and several cpio formats. It can also write shar archives and read ISO-9660 CDROM images. The bsdtar program is an implementation of tar(1) that is built on top of libarchive. It started as a test harness, but has grown and is now the standard system tar for FreeBSD 5 and 6. This package contains the bsdtar cmdline utility. %package -n bsdtar Summary: Utility to read several different streaming archive formats Group: Productivity/Archiving/Compression Requires: %{libname} >= %{version} %description -n bsdtar This package contains the bsdtar cmdline utility. %package -n %{libname} Summary: Library to work with several different streaming archive formats Group: System/Libraries %description -n %{libname} Libarchive is a programming library that can create and read several different streaming archive formats, including most popular tar variants and several cpio formats. It can also write shar archives and read ISO-9660 CDROM images. The bsdtar program is an implementation of tar(1) that is built on top of libarchive. It started as a test harness, but has grown and is now the standard system tar for FreeBSD 5 and 6. The libarchive library offers a number of features that make it both very flexible and very powerful. - Automatic format detection: libarchive can automatically determine both the compression and the archive format, regardless of the data source. Most tar implementations do not automatically detect the compression format, few implementation that can correctly do this when reading from stdin or a socket. (The tar program included with Gunnar Ritter's heirloom collection also does full automatic format detection.) - Writes POSIX formats: libarchive writes POSIX-standard formats, including "ustar," "pax interchange format," and the POSIX "cpio" format. - Supports pax interchange format: Pax interchange format (which, despite the name, is really an extended tar format) eliminates almost all limitations of historic tar formats and provides a standard method for incorporating vendor-specific extensions. libarchive exploits this extension mechanism to support ACLs and file flags, for example. (Joerg Schilling's star archiver is another open-source tar program that supports pax interchange format.) - Reads popular formats: libarchive can read GNU tar, ustar, pax interchange format, cpio, and older tar variants. The internal architecture is easily extensible. The only requirement for support is that it be possible to read the format without seeking in the file. (For example, a format that includes a compressed size field before the data cannot be correctly written without seeking.) - High-Level API: the libarchive API makes it fairly simple to build an archive from a list of filenames or to extract the entries from an archive. However, the API also provides extreme flexibility with regards to data sources. For example, there are generic hooks that allow you to write an archive to a socket or read data from an archive entry into a memory buffer. - Extensible. The internal design uses generic interfaces for compression, archive format detection and decoding, and archive data I/O. It should be very easy to add new formats, new compression methods, or new ways of reading/writing archives. %package -n libarchive-devel Summary: Development files for libarchive Group: Development/Libraries/C and C++ Requires: %{libname} = %{version} Requires: glibc-devel %description -n libarchive-devel Libarchive is a programming library that can create and read several different streaming archive formats, including most popular tar variants and several cpio formats. It can also write shar archives and read ISO-9660 CDROM images. The bsdtar program is an implementation of tar(1) that is built on top of libarchive. It started as a test harness, but has grown and is now the standard system tar for FreeBSD 5 and 6. This package contains the development files. %package static-devel Summary: Static library for libarchive Group: Development/Libraries/C and C++ Requires: %{name}-devel = %{version} %description static-devel Static library for libarchive %prep %setup -q %build export CFLAGS="%{optflags} -D_REENTRANT -pipe" export CXXFLAGS="$CFLAGS" %configure \ --disable-silent-rules \ %if %{without static_libs} --disable-static \ %endif --enable-bsdcpio \ --without-nettle \ --without-lz4 # lzma mt detection is broken sed -i -e "/HAVE_LZMA_STREAM_ENCODER_MT/d" config.h make %{?_smp_mflags} %check # test suite is a bit racy unfortunatly, so give it three attempts make %{?_smp_mflags} check || make check || make check %install %make_install find %{buildroot} -type f -name "*.la" -delete -print rm "%{buildroot}%{_mandir}/man5/"{tar,cpio,mtree}.5* sed -i -e '/Libs.private/d' %{buildroot}%{_libdir}/pkgconfig/libarchive.pc %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files -n bsdtar %{_bindir}/bsdcat %{_bindir}/bsdcpio %{_bindir}/bsdtar %{_mandir}/man1/* %{_mandir}/man5/* %files -n %{libname} %license COPYING %doc NEWS %{_libdir}/libarchive.so.* %files -n libarchive-devel %doc examples/ %{_mandir}/man3/* %{_libdir}/libarchive.so %{_includedir}/archive* %{_libdir}/pkgconfig/libarchive.pc %if %{with static_libs} %files static-devel %{_libdir}/%{name}.a %endif %changelog * Thu Jun 13 2019 Ismail Dönmez - Update to version 3.4.0 * Support for file and directory symlinks on Windows * Read support for RAR 5.0 archives * Read support for ZIPX archives with xz, lzma, ppmd8 and bzip2 compression * Support for non-recursive list and extract * New tar option: --exclude-vcs * Improved file attribute support on Linux and file flags support on FreeBSD * Fix reading Android APK archives (#1055 ) * Fix problems related to unreadable directories (#1167) * A two-digit number of OSS-Fuzz issues was resolved in this release - Add libarchive.keyring and validate the tarball signature - Drop all security patches, fixed upstream: * CVE-2018-1000877.patch * CVE-2018-1000878.patch * CVE-2018-1000879.patch * CVE-2018-1000880.patch * CVE-2019-1000019.patch * CVE-2019-1000020.patch * Tue Feb 5 2019 Adrian Schröter - Added patches: * CVE-2019-1000019.patch Fixes 7zip crash (boo#1124341) * CVE-2019-1000020.patch ISO9660 infinite loop fixed (boo#1124342) * Thu Jan 3 2019 Karol Babioch - Added patches: * CVE-2018-1000877.patch, which fixes a double free vulnerability in RAR decoder (CVE-2018-1000877 bsc#1120653) * CVE-2018-1000878.patch, which fixes a Use-After-Free vulnerability in RAR decoder (CVE-2018-1000878 bsc#1120654) * CVE-2018-1000879.patch, which fixes a NULL Pointer Dereference vulnerability in ACL parser (CVE-2018-1000879 bsc#1120656) * CVE-2018-1000880.patch, which fixes an improper input validation vulnerability in WARC parser (CVE-2018-1000880 bsc#1120659) - Make use of %%license macro - Applied spec-cleaner * Tue Sep 18 2018 Jan Engelhardt - Fix RPM groups. Remove idempotent %%if..%%endif guards. Diversify summaries. Set CFLAGS instead of re-defining optflags with itself. * Fri Sep 14 2018 Adrian Schröter - update to version 3.3.3 * Avoid super-linear slowdown on malformed mtree files * Many fixes for building with Visual Studio * NO_OVERWRITE doesn't change existing directory attributes * New support for Zstandard read and write filters - fix-CVE-2017-14166.patch is obsolete * Thu Sep 7 2017 adrian@suse.de - update to version 3.3.2 * NFSv4 ACL support for Linux (librichacl) - fix-CVE-2017-14166.patch (boo#1057514) * Mon Apr 3 2017 adrian@suse.de - update to version 3.3.1 * Security & Feature release Details are not documented from upstream yet fix-extract-over-links.patch and libarchive-openssl.patch obsoleted * Fri Dec 2 2016 adrian@suse.com - fix extracting over symlinks: fix-extract-over-links.patch the problem is solved upstream different, but git master is too different atm. * Wed Oct 26 2016 adrian@suse.com - update to version 3.2.2 Unspecified security fixes, but at least: * CVE-2016-8687 * CVE-2016-8689 * CVE-2016-8688 * CVE-2016-5844 * CVE-2016-6250 * CVE-2016-5418 - obsoletes fix-build.patch * Sat Jul 23 2016 dmueller@suse.com - make bsdtar require a matching libarchive version to avoid missing symbol errors * Mon Jun 20 2016 adrian@suse.de - update to version 3.2.1 Fixes a number of security issues: CVE-2015-8934, CVE-2015-8933, CVE-2015-8917, CVE-2016-4301, CVE-2016-4300 - and fixing the build (fix-build.patch) * Thu Jun 16 2016 adrian@suse.de - limit size of symlinks in cpio archives (CVE-2016-4809, boo#984990) CVE-2016-4809.patch * Mon May 9 2016 adrian@suse.de - 4GB _constraints for ppc64le only, it would break other archs - update to version 3.2.0 * Fixes CVE-2016-1541 * Fixes CVE-2015-8928 * changes are only documented in git history * updated openssl patch * new bsdcat utility - removed obsolete patches for: * CVE-2013-0211.patch * directory-traversal-fix.patch * libarchive-xattr.patch * Fri May 6 2016 normand@linux.vnet.ibm.com - add _constraints memory 4096MB to avoid ppc64le build failure * Sat Sep 19 2015 astieger@suse.com - build static lib on RHEL 7 * Sun Mar 22 2015 astieger@suse.com - RHEL/CentOS build fix, skipping autoreconf * Sun Mar 15 2015 astieger@suse.com - add CVE for previous change * Thu Mar 5 2015 adrian@suse.com - fix a directory traversal in cpio tool (bnc#920870) directory-traversal-fix.patch CVE-2015-2304 * Tue Nov 11 2014 jsegitz@novell.com - Added CVE-2013-0211.patch to fix CVE-2013-0211 (bnc#800024) * Wed May 28 2014 crrodriguez@opensuse.org - libarchive-xattr.patch, fix subtle wrong library check that causes this package to depend on libattr when it should be using glibc. * Sun Nov 24 2013 andreas.stieger@gmx.de - add optional -static-devel library package, intended to publish pixz for CentOS / RHEL, default off - skip some dependencies not required for pixz on CentOS / RHEL * Tue Aug 20 2013 crrodriguez@opensuse.org - remove artificial dependencies on libacl-devel, libbz2-devel, zlib-devel from libarchive-devel. * Mon Aug 19 2013 crrodriguez@opensuse.org - libarchive-openssl.patch: Call OPENSSL_config where needed, otherwise on systems configured to use openSSL engines such as via-padlock wont benefit from hardware acceleration. * Fri Aug 16 2013 andreas.stieger@gmx.de - update to 3.1.2 This is a maintenance update to fix issues with the new RAR seeking feature. - libarchive's new website moved to http://www.libarchive.org. * Sun Jun 16 2013 jengelh@inai.de - Explicitly list libattr-devel as BuildRequires (and sort those) * Wed Feb 13 2013 werner@suse.de - Use %%libname macro to be consistent throughout the spec file * Tue Feb 5 2013 p.drouand@gmail.com - Update to version 3.1.1: + Fix an issue with the soname versioning in builds of libarchive using cmake - Removed patchs; fixed and merged on upstream release: * libarchive-fix-checks.patch * libarchive-ppc64.patch - The soname has changed and pass to 13. * Thu Aug 23 2012 dvaleev@suse.com - libarchive-ppc64.patch: fix http://code.google.com/p/libarchive/issues/detail?id=277 test_option_b and test_option_nodump are failing on ppc64 * Thu Aug 9 2012 cfarrell@suse.com - license update: BSD-2-Clause The COPYING file shows that the package is predominantly BSD-2-Clause licensed * Tue Aug 7 2012 dimstar@opensuse.org - Update to version 3.0.4: + libarchive development moved to http://libarchive.github.com/ - Changes from version 3.0.2: + Various fixes merged from FreeBSD + Symlink support in Zip reader and writer + Robustness fixes to 7Zip reader - Changes from version 3.0.1b: + 7Zip reader + Small fixes to ISO and Zip to improve robustness with corrupted input + Improve streaming Zip reader's support for uncompressed entries + New seeking Zip reader supports SFX Zip archives + Build fixes on Windows - For more changes since 2.8.5, please see NEWS file - Update URL Tag to represent new home of the project. - Rename libarchive2 to libarchive12, following upstreams soname bumps. - Add libarchive-fix-checks.patch: Fix gcc 4.7 side effects. - Drop libarchive-test-fuzz.patch: fixed upstream. - Drop libarchive-ignore-sigpipe-in-test-suite.patch: fixed upstream. - Drop libarchive-2.5.5_handle_ENOSYS_from_lutimes.patch: upstream rejected the patch. Seems to be too theoretical problem. * Mon May 7 2012 werner@suse.de - Enforce usage of reentrant versions of libc functions * Mon Feb 13 2012 dvaleev@suse.com - fix failed tests on ppc * Wed Feb 8 2012 idonmez@suse.com - Use %%makeinstall to be SLES compatible * Thu Dec 22 2011 werner@suse.de - For SLES11 work around missing rpm macro * Tue Dec 6 2011 coolo@suse.com - rename main package to libarchive * Tue Dec 6 2011 coolo@suse.com - Update to libarchive 2.8.5 (from werner) * Fix issue 134: Improve handling of open failures * Fix issue 119: Relax ISO verification * Fix issue 121: mtree parsing * Fix extraction of GNU tar 'D' directory entries * Be less demanding in LZMA/XZ compression tests * Fri Sep 30 2011 coolo@suse.com - add baselibs.conf for PackageKit to use * Tue Apr 19 2011 idoenmez@novell.com - Add suport for xz and xar archives - Add libarchive-2.8.4-iso9660-data-types.patch: fix ISO9660 reader data type mismatches * Thu Nov 11 2010 puzel@novell.com - udpate to libarchive-2.8.4 - see /usr/share/doc/packages/libarchive2/NEWS for changes - drop libarchive-2.5.5_fix_testsuite.patch (upstream) - update libarchive-2.5.5_handle_ENOSYS_from_lutimes.patch - clean up specfile - disable make check for now * Wed Jan 6 2010 jengelh@medozas.de - enable parallel building * Wed Oct 29 2008 mrueckert@suse.de - added libarchive-2.5.5_handle_ENOSYS_from_lutimes.patch: it can happen that your system at build times supports lutimes but later at runtime the needed syscall is missing. * Mon Sep 8 2008 mrueckert@suse.de - fix rm calls in %%install * Sat Sep 6 2008 mrueckert@suse.de - update to 2.5.5 This is a major version bump again: it incorporates lots of bugfixes and improvements. For all the details please see /usr/share/doc/packages/libarchive2/NEWS - drop the .la file - dropped patch libarchive-2.2.5_rpath.patch: no longer needed - added libarchive-2.5.5_fix_testsuite.patch: added missing mode to open() with O_CREAT * Wed Aug 15 2007 ro@suse.de - fix dependency of devel package * Tue Aug 7 2007 mrueckert@suse.de - restructured package: bsdtar is now the main package and libarchive2 and libarchive-devel the subpackages. This saves us a rename on soversion bumps. * Mon Jul 30 2007 mrueckert@suse.de - update to 2.2.5 (#291358) This is a major version bump. For a full list of all changes see /usr/share/doc/packages/libarchive/NEWS. Mostly notable this up- date includes the fixes for the following security bugs: Errors handling corrupt tar files in libarchive (CVE-2007-3641, CVE-2007-3644, CVE-2007-3645) - added libarchive-2.2.5_rpath.patch: dont set a rpath on the builddir. - no longer building the static lib * Thu Jun 7 2007 ro@suse.de - added ldconfig to post scripts - remove minitar objects (leave binary there for now) * Sun Apr 8 2007 mrueckert@suse.de - updated to 2.0.28 - removed all patches: included upstream * Sat Mar 24 2007 mrueckert@suse.de - require libbz2-devel on >= 10.3 * Sat Mar 24 2007 aj@suse.de - Change requires for libbz2 split. * Tue Mar 6 2007 mrueckert@suse.de - updated bsdtar-1.2.53_ext2_include.patch: the old fix was not complete and on newer glibc/kernel-headers it seems you need to include linux/fs.h explicitly new name: bsdtar-1.3.1_linux_fs_includes.patch - build with -fno-strict-aliasing * Fri Nov 10 2006 mrueckert@suse.de - added SA-06-24_libarchive.patch: fix DOS in libarchive (CVE-2006-5680) http://security.freebsd.org/advisories/FreeBSD-SA-06:24.libarchive.asc * Fri Sep 22 2006 mrueckert@suse.de - update to version 1.3.1 * Thu Apr 27 2006 mrueckert@suse.de - updated to 1.2.53: Upstream merged the source tarball. Splitted of a bsdtar package * Mon Feb 27 2006 mrueckert@suse.de - fixed building of debuginfo package * Mon Feb 27 2006 mrueckert@suse.de - libarchive 1.2.38