Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:davidnichols
libarchive
libarchive.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libarchive.spec of Package libarchive
%bcond_without check Name: libarchive Version: 3.4.4 Release: 4.7 Summary: A library for handling streaming archive formats License: BSD URL: http://www.libarchive.org/ Source: %{name}-%{version}.tar.bz2 #Patch0: libarchive-3.1.2-CVE-2017-14503.patch #Patch1: libarchive-3.1.2-CVE-2019-1000019.patch #Patch2: libarchive-3.1.2-CVE-2019-1000020.patch #Patch3: libarchive-3.3.2-CVE-2018-1000878.patch #Patch4: libarchive-3.3.2-CVE-2018-1000877.patch #Patch5: fix-use-after-free-in-delayed-newc.patch #Patch6: fix-few-obvious-resource-leaks-covscan.patch #Patch7: libarchive-3.3.2-CVE-2019-18408.patch BuildRequires: gcc BuildRequires: bison BuildRequires: sharutils BuildRequires: zlib-devel BuildRequires: xz-devel BuildRequires: lzo-devel BuildRequires: e2fsprogs-devel BuildRequires: libacl-devel BuildRequires: libattr-devel BuildRequires: openssl-devel BuildRequires: libxml2-devel BuildRequires: automake %if 0%{?suse_version} || 0%{?sles_version} BuildRequires: libbz2-devel BuildRequires: liblz4-devel BuildRequires: libtool %package -n libarchive13 Summary: Library to work with several different streaming archive formats Group: Development/Libraries/C and C++ %description -n libarchive13 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. %files -n libarchive13 %defattr(-,root,root) %doc COPYING NEWS README.md %{_libdir}/libarchive.so.* %post -n libarchive13 -p /sbin/ldconfig %postun -n libarchive13 -p /sbin/ldconfig %else BuildRequires: bzip2-devel BuildRequires: lz4-devel %files %{!?_licensedir:%global license %%doc} %license COPYING %doc NEWS README.md %{_libdir}/libarchive.so.13* %{_mandir}/*/cpio.* %{_mandir}/*/mtree.* %{_mandir}/*/tar.* %endif %description Libarchive is a programming library that can create and read several different streaming archive formats, including most popular tar variants, several cpio formats, and both BSD and GNU ar variants. It can also write shar archives and read ISO9660 CDROM images and ZIP archives. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package -n bsdtar Summary: Manipulate tape archives Requires: %{name}%{?_isa} = %{version}-%{release} %description -n bsdtar The bsdtar package contains standalone bsdtar utility split off regular libarchive packages. %package -n bsdcpio Summary: Copy files to and from archives Requires: %{name}%{?_isa} = %{version}-%{release} %description -n bsdcpio The bsdcpio package contains standalone bsdcpio utility split off regular libarchive packages. %package -n bsdcat Summary: Expand files to standard output Requires: %{name}%{?_isa} = %{version}-%{release} %description -n bsdcat The bsdcat program typically takes a filename as an argument or reads standard input when used in a pipe. In both cases decompressed data it written to standard output. %prep %autosetup %build build/autogen.sh %configure --disable-static --disable-rpath # remove rpaths sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' # rhbz#1294252 replace () { filename=$1 file=`basename "$filename"` binary=${file%%.*} pattern=${binary##bsd} awk " # replace the topic /^.Dt ${pattern^^} 1/ { print \".Dt ${binary^^} 1\"; next; } # replace the first occurence of \"$pattern\" by \"$binary\" !stop && /^.Nm $pattern/ { print \".Nm $binary\" ; stop = 1 ; next; } # print remaining lines 1; " "$filename" > "$filename.new" mv "$filename".new "$filename" } for manpage in bsdtar.1 bsdcpio.1 do installed_manpage=`find "$RPM_BUILD_ROOT" -name "$manpage"` replace "$installed_manpage" done %check %if %{with check} logfiles () { find -name '*_test.log' -or -name test-suite.log } tempdirs () { cat `logfiles` \ | awk "match(\$0, /[^[:space:]]*`date -I`[^[:space:]]*/) { print substr(\$0, RSTART, RLENGTH); }" \ | sort | uniq } cat_logs () { for i in `logfiles` do echo "=== $i ===" cat "$i" done } run_testsuite () { rc=0 LD_LIBRARY_PATH=`pwd`/.libs make %{?_smp_mflags} check -j1 || { # error happened - try to extract in koji as much info as possible cat_logs for i in `tempdirs`; do if test -d "$i" ; then find $i -printf "%p\n ~> a: %a\n ~> c: %c\n ~> t: %t\n ~> %s B\n" cat $i/*.log fi done return 1 } cat_logs } # On a ppc/ppc64 is some race condition causing 'make check' fail on ppc # when both 32 and 64 builds are done in parallel on the same machine in # koji. Try to run once again if failed. %ifarch ppc run_testsuite || run_testsuite %else run_testsuite %endif %endif %files devel %{_includedir}/*.h %{_mandir}/*/archive* %{_mandir}/*/libarchive* %{_libdir}/libarchive.so %{_libdir}/pkgconfig/libarchive.pc %if 0%{?suse_version} || 0%{?sles_version} %{_mandir}/man3/* %endif %files -n bsdtar %{!?_licensedir:%global license %%doc} %license COPYING %doc NEWS README.md %{_bindir}/bsdtar %{_mandir}/*/bsdtar* %if 0%{?suse_version} || 0%{?sles_version} %{_mandir}/man1/* %{_mandir}/man5/* %endif %files -n bsdcpio %{!?_licensedir:%global license %%doc} %license COPYING %doc NEWS README.md %{_bindir}/bsdcpio %{_mandir}/*/bsdcpio* %files -n bsdcat %{!?_licensedir:%global license %%doc} %license COPYING %doc NEWS README.md %{_bindir}/bsdcat %{_mandir}/*/bsdcat* %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor