# # spec file for package libarchive # # Copyright (c) 2016 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/ # %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 %define skip_autoreconf 1 %endif %else %bcond_with static_libs %bcond_without openssl %bcond_without ext2fs %endif %define somajor 13 %define libname libarchive%{somajor} Name: libarchive Version: 3.2.1 Release: 73.2 Summary: Creates and reads several different streaming archive formats License: BSD-2-Clause Group: Productivity/Archiving/Compression Url: http://www.libarchive.org/ Source0: http://www.libarchive.org/downloads/libarchive-%{version}.tar.gz Source1: baselibs.conf Patch1: fix-build.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libacl-devel BuildRequires: libbz2-devel %if %{with ext2fs} BuildRequires: libext2fs-devel %endif %if %{with openssl} BuildRequires: libopenssl-devel %endif BuildRequires: libtool BuildRequires: libxml2-devel BuildRequires: pkg-config BuildRequires: xz-devel BuildRequires: zlib-devel Patch0: libarchive-openssl.patch %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 ISO9660 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: Creates and reads several different streaming archive formats Group: Productivity/Archiving/Compression %description -n bsdtar This package contains the bsdtar cmdline utility. %package -n %{libname} Summary: Library to work with several different streaming archive formats Group: Development/Libraries/C and C++ %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 ISO9660 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 Requires: %{libname} = %{version} Requires: glibc-devel Summary: Development files for libarchive Group: Development/Libraries/C and C++ %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 ISO9660 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. %if %{with static_libs} %package static-devel Requires: %{name}-devel = %{version} Summary: static library for libarchive Group: Development/Libraries/C and C++ %description static-devel static library for libarchive %endif %prep %setup -q %if %{with openssl} %patch0 -p0 %endif %patch1 -p0 %build %if !0%{?skip_autoreconf} autoreconf -fiv %endif %global optflags %{optflags} -D_REENTRANT -pipe %configure \ --disable-silent-rules \ %if %{without static_libs} --disable-static \ %endif --enable-bsdcpio \ --without-lzo2 \ --without-nettle # lzma mt detection is broken sed -i -e "/HAVE_LZMA_STREAM_ENCODER_MT/d" config.h make %{?_smp_mflags} %check make check %install %makeinstall find %{buildroot} -name '*.la' -type f -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 %defattr(-,root,root) %{_bindir}/bsdcat %{_bindir}/bsdcpio %{_bindir}/bsdtar %{_mandir}/man1/* %{_mandir}/man5/* %files -n %{libname} %defattr(-,root,root) %doc COPYING NEWS README %{_libdir}/libarchive.so.* %files -n libarchive-devel %defattr(-,root,root) %doc examples/ %{_mandir}/man3/* %{_libdir}/libarchive.so %{_includedir}/archive* %{_libdir}/pkgconfig/libarchive.pc %if %{with static_libs} %files static-devel %defattr(-,root,root) %{_libdir}/%{name}.a %endif %changelog * 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