f1e1597
%{warn:TODO: package README after https://github.com/libarchive/libarchive/pull/809
f1e1597
}
f1e1597
Tomas Bzatek 43b4cad
Name:           libarchive
f1e1597
Version:        3.2.2
f1e1597
Release:        1%{?dist}
b71c2f0
Summary:        A library for handling streaming archive formats
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
License:        BSD
7e034d8
URL:            http://www.libarchive.org/
f98ca6a
Source0:        http://www.libarchive.org/downloads/%{name}-%{version}.tar.gz
Tomas Bzatek 43b4cad
Tomas Bzatek fb8561b
BuildRequires: bison
Tomas Bzatek fb8561b
BuildRequires: sharutils
Tomas Bzatek 43b4cad
BuildRequires: zlib-devel
Tomas Bzatek 43b4cad
BuildRequires: bzip2-devel
Tomas Bzatek b7414a4
BuildRequires: xz-devel
a8db99e
BuildRequires: lzo-devel
Tomas Bzatek 134f127
BuildRequires: e2fsprogs-devel
Tomas Bzatek 134f127
BuildRequires: libacl-devel
Tomas Bzatek 134f127
BuildRequires: libattr-devel
Tomas Bzatek fb8561b
BuildRequires: openssl-devel
Tomas Bzatek e11ed8d
BuildRequires: libxml2-devel
Jaromir Koncicky da58d4e
4d2a26a
Tomas Bzatek 43b4cad
%description
b71c2f0
Libarchive is a programming library that can create and read several different
b71c2f0
streaming archive formats, including most popular tar variants, several cpio
b71c2f0
formats, and both BSD and GNU ar variants. It can also write shar archives and
Tomas Bzatek 43b4cad
read ISO9660 CDROM images and ZIP archives.
Tomas Bzatek 43b4cad
e09c6ee
Tomas Bzatek 43b4cad
%package        devel
Tomas Bzatek 43b4cad
Summary:        Development files for %{name}
cab6450
Requires:       %{name}%{?_isa} = %{version}-%{release}
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
%description    devel
Tomas Bzatek 43b4cad
The %{name}-devel package contains libraries and header files for
Tomas Bzatek 43b4cad
developing applications that use %{name}.
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
89564de
%package -n     bsdtar
b71c2f0
Summary:        Manipulate tape archives
Björn Esser efd48f1
Requires:       %{name}%{?_isa} = %{version}-%{release}
89564de
89564de
%description -n bsdtar
89564de
The bsdtar package contains standalone bsdtar utility split off regular
89564de
libarchive packages.
89564de
89564de
89564de
%package -n     bsdcpio
b71c2f0
Summary:        Copy files to and from archives
Björn Esser efd48f1
Requires:       %{name}%{?_isa} = %{version}-%{release}
89564de
89564de
%description -n bsdcpio
89564de
The bsdcpio package contains standalone bsdcpio utility split off regular
89564de
libarchive packages.
89564de
89564de
9e3ae29
%package -n     bsdcat
9e3ae29
Summary:        Expand files to standard output
9e3ae29
Requires:       %{name}%{?_isa} = %{version}-%{release}
9e3ae29
9e3ae29
%description -n bsdcat
9e3ae29
The bsdcat program typically takes a filename as an argument or reads standard
9e3ae29
input when used in a pipe.  In both cases decompressed data it written to
9e3ae29
standard output.
9e3ae29
9e3ae29
Tomas Bzatek 43b4cad
%prep
e09c6ee
%autosetup -p1
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
%build
89564de
%configure --disable-static --disable-rpath
89564de
# remove rpaths
89564de
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
89564de
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
7615a7f
9e3ae29
make %{?_smp_mflags}
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
%install
Tomas Bzatek 43b4cad
make install DESTDIR=$RPM_BUILD_ROOT
Tomas Bzatek 43b4cad
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
Tomas Bzatek 43b4cad
c0faaa9
# rhbz#1294252
c0faaa9
replace ()
c0faaa9
{
c0faaa9
    filename=$1
c0faaa9
    file=`basename "$filename"`
c0faaa9
    binary=${file%%.*}
c0faaa9
    pattern=${binary##bsd}
c0faaa9
c0faaa9
    awk "
20b4c54
        # replace the topic
20b4c54
        /^.Dt ${pattern^^} 1/ {
20b4c54
            print \".Dt ${binary^^} 1\";
20b4c54
            next;
20b4c54
        }
c0faaa9
        # replace the first occurence of \"$pattern\" by \"$binary\"
c0faaa9
        !stop && /^.Nm $pattern/ {
c0faaa9
            print \".Nm $binary\" ;
c0faaa9
            stop = 1 ;
c0faaa9
            next;
c0faaa9
        }
c0faaa9
        # print remaining lines
c0faaa9
        1;
c0faaa9
    " "$filename" > "$filename.new"
c0faaa9
    mv "$filename".new "$filename"
c0faaa9
}
c0faaa9
c0faaa9
for manpage in bsdtar.1 bsdcpio.1
c0faaa9
do
c0faaa9
    installed_manpage=`find "$RPM_BUILD_ROOT" -name "$manpage"`
c0faaa9
    replace "$installed_manpage"
c0faaa9
done
c0faaa9
Tomas Bzatek 43b4cad
7615a7f
%check
41018e7
logfiles ()
bbde57d
{
41018e7
    find -name '*_test.log' -or -name test-suite.log
41018e7
}
41018e7
41018e7
tempdirs ()
bbde57d
{
41018e7
    cat `logfiles` \
41018e7
        | awk "match(\$0, /[^[:space:]]*`date -I`[^[:space:]]*/) { print substr(\$0, RSTART, RLENGTH); }" \
41018e7
        | sort | uniq
41018e7
}
41018e7
41018e7
cat_logs ()
41018e7
{
41018e7
    for i in `logfiles`
41018e7
    do
41018e7
        echo "=== $i ==="
41018e7
        cat "$i"
41018e7
    done
41018e7
}
41018e7
41018e7
run_testsuite ()
41018e7
{
41018e7
    rc=0
9e3ae29
    LD_LIBRARY_PATH=`pwd`/.libs make %{?_smp_mflags} check -j1 || {
bbde57d
        # error happened - try to extract in koji as much info as possible
41018e7
        cat_logs
41018e7
41018e7
        for i in `tempdirs`; do
41018e7
            if test -d "$i" ; then
41018e7
                find $i -printf "%p\n    ~> a: %a\n    ~> c: %c\n    ~> t: %t\n    ~> %s B\n"
41018e7
                cat $i/*.log
41018e7
            fi
bbde57d
        done
bbde57d
        return 1
9e3ae29
    }
41018e7
    cat_logs
bbde57d
}
bbde57d
3518c10
# On a ppc/ppc64 is some race condition causing 'make check' fail on ppc
3518c10
# when both 32 and 64 builds are done in parallel on the same machine in
3518c10
# koji.  Try to run once again if failed.
bbde57d
%ifarch ppc
3518c10
run_testsuite || run_testsuite
3518c10
%else
3518c10
run_testsuite
bbde57d
%endif
7615a7f
3518c10
Tomas Bzatek 43b4cad
%post -p /sbin/ldconfig
Tomas Bzatek 43b4cad
7615a7f
Tomas Bzatek 43b4cad
%postun -p /sbin/ldconfig
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
%files
71ff6ca
%{!?_licensedir:%global license %%doc}
71ff6ca
%license COPYING
f1e1597
%doc NEWS
3a6b649
%{_libdir}/libarchive.so.13*
b71c2f0
%{_mandir}/*/cpio.*
b71c2f0
%{_mandir}/*/mtree.*
b71c2f0
%{_mandir}/*/tar.*
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
%files devel
cab6450
%{_includedir}/*.h
b71c2f0
%{_mandir}/*/archive*
b71c2f0
%{_mandir}/*/libarchive*
cab6450
%{_libdir}/libarchive.so
cab6450
%{_libdir}/pkgconfig/libarchive.pc
Tomas Bzatek 43b4cad
89564de
%files -n bsdtar
71ff6ca
%{!?_licensedir:%global license %%doc}
71ff6ca
%license COPYING
f1e1597
%doc NEWS
89564de
%{_bindir}/bsdtar
b71c2f0
%{_mandir}/*/bsdtar*
89564de
89564de
%files -n bsdcpio
71ff6ca
%{!?_licensedir:%global license %%doc}
71ff6ca
%license COPYING
f1e1597
%doc NEWS
89564de
%{_bindir}/bsdcpio
b71c2f0
%{_mandir}/*/bsdcpio*
89564de
9e3ae29
%files -n bsdcat
9e3ae29
%{!?_licensedir:%global license %%doc}
9e3ae29
%license COPYING
f1e1597
%doc NEWS
9e3ae29
%{_bindir}/bsdcat
9e3ae29
%{_mandir}/*/bsdcat*
9e3ae29
9e3ae29
Tomas Bzatek 43b4cad
Tomas Bzatek 43b4cad
%changelog
f1e1597
* Tue Oct 25 2016 Pavel Raiskup <praiskup@redhat.com> - 3.2.2-1
f1e1597
- minor rebase to 3.2.2
f1e1597
240fa71
* Wed Jul 20 2016 Tomas Repik <trepik@redhat.com> - 3.2.1-3
240fa71
- rebase from rawhide (f25)
240fa71
41018e7
* Mon Jul 18 2016 Pavel Raiskup <praiskup@redhat.com> - 3.2.1-2
41018e7
- print more detailed logs for testsuite, even if testsuite succeeded
41018e7
e4bfe11
* Mon Jun 20 2016 Pavel Raiskup <praiskup@redhat.com> - 3.2.1-1
e4bfe11
- rebase, several security issues fixed (rhbz#1348194)
e4bfe11
20b4c54
* Mon May 16 2016 Pavel Raiskup <praiskup@redhat.com> - 3.2.0-3
20b4c54
- fix the manual pages for remaining issue (rhbz#1294252)
20b4c54
7827061
* Thu May 12 2016 Pavel Raiskup <praiskup@redhat.com> - 3.2.0-2
c0faaa9
- fix manual pages to mention correctly spelled binary names (rhbz#1294252)
2a8a282
- fix CVE-2016-1541, rhbz#1334213
c0faaa9
9e3ae29
* Tue May 03 2016 Pavel Raiskup <praiskup@redhat.com> - 3.2.0-1
9e3ae29
- new upstream release 3.2.0 (rhbz#1330345), per release notes:
9e3ae29
  https://groups.google.com/d/msg/libarchive-discuss/qIzW7doKzxA/MVbUkjlNAAAJ
9e3ae29
Björn Esser efd48f1
* Mon Mar 07 2016 Björn Esser <fedora@besser82.io> - 3.1.2-16
Björn Esser efd48f1
- removed %%defattr, BuildRoot and other ancient bits
Björn Esser efd48f1
- added arch'ed bits to all Requires
Björn Esser efd48f1
3f1eeba
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.2-15
3f1eeba
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
3f1eeba
e09c6ee
* Mon Dec 21 2015 Pavel Raiskup <praiskup@redhat.com> - 3.1.2-14
e09c6ee
- fix 'Out of memory when creating mtree files' error (rhbz#1284162)
e09c6ee
- use %%autosetup macro
e09c6ee
a3f6b95
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.2-13
a3f6b95
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a3f6b95
e7c1099
* Wed Apr 29 2015 Pavel Raiskup <praiskup@redhat.com> - 3.1.2-12
e7c1099
- fix libarchive segfault for intentionally broken cpio archives (rhbz#1216892)
e7c1099
d46b2e1
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 3.1.2-11
d46b2e1
- Rebuilt for Fedora 23 Change
d46b2e1
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
d46b2e1
9f8894a
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.2-10
9f8894a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9f8894a
71ff6ca
* Thu Jul 17 2014 Tom Callaway <spot@fedoraproject.org> - 3.1.2-9
71ff6ca
- fix license handling
71ff6ca
0725db5
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.2-8
0725db5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0725db5
Jaromir Koncicky da58d4e
* Thu Aug 08 2013 Jaromir Koncicky <jkoncick@redhat.com> - 3.1.2-7
Jaromir Koncicky da58d4e
- Fixed Bug 993048 - added #ifdef ACL_TYPE_NFS4 to code which requires
Jaromir Koncicky da58d4e
  NFS4 ACL support
Jaromir Koncicky da58d4e
bf786a6
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.2-6
bf786a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bf786a6
bbde57d
* Mon Jul 22 2013 Pavel Raiskup <praiskup@redhat.com> - 3.1.2-5
bbde57d
- try to workaround racy testsuite fail
bbde57d
7615a7f
* Sun Jun 30 2013 Pavel Raiskup <praiskup@redhat.com> - 3.1.2-4
7615a7f
- enable testsuite in the %%check phase
7615a7f
8b39f7e
* Mon Jun 24 2013 Pavel Raiskup <praiskup@redhat.com> - 3.1.2-3
8b39f7e
- bsdtar/bsdcpio should require versioned libarchive
8b39f7e
0eefbad
* Wed Apr  3 2013 Tomas Bzatek <tbzatek@redhat.com> - 3.1.2-2
0eefbad
- Remove libunistring-devel build require
0eefbad
7e034d8
* Thu Mar 28 2013 Tomas Bzatek <tbzatek@redhat.com> - 3.1.2-1
7e034d8
- Update to 3.1.2
7e034d8
- Fix CVE-2013-0211: read buffer overflow on 64-bit systems (#927105)
7e034d8
a748932
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-2
a748932
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a748932
3a6b649
* Mon Jan 14 2013 Tomas Bzatek <tbzatek@redhat.com> - 3.1.1-1
3a6b649
- Update to 3.1.1
3a6b649
- NEWS seems to be valid UTF-8 nowadays
3a6b649
b71c2f0
* Wed Oct 03 2012 Pavel Raiskup <praiskup@redhat.com> - 3.0.4-3
b71c2f0
- better install manual pages for libarchive/bsdtar/bsdcpio (# ... )
b71c2f0
- several fedora-review fixes ...:
b71c2f0
- Source0 has moved to github.com
b71c2f0
- remove trailing white spaces
b71c2f0
- repair summary to better describe bsdtar/cpiotar utilities
b71c2f0
163481b
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.4-2
163481b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
163481b
8afa47d
* Mon May  7 2012 Tomas Bzatek <tbzatek@redhat.com> - 3.0.4-1
8afa47d
- Update to 3.0.4
8afa47d
89564de
* Wed Feb  1 2012 Tomas Bzatek <tbzatek@redhat.com> - 3.0.3-2
89564de
- Enable bsdtar and bsdcpio in separate subpackages (#786400)
89564de
0284c0f
* Fri Jan 13 2012 Tomas Bzatek <tbzatek@redhat.com> - 3.0.3-1
0284c0f
- Update to 3.0.3
0284c0f
00649a5
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-0.3.a
00649a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
00649a5
cab6450
* Tue Nov 15 2011 Rex Dieter <rdieter@fedoraproject.org> 3.0.0-0.2.a
cab6450
- track files/sonames closer, so abi bumps aren't a surprise
cab6450
- tighten subpkg deps via %%_isa
cab6450
59f48db
* Mon Nov 14 2011 Tomas Bzatek <tbzatek@redhat.com> - 3.0.0-0.1.a
59f48db
- Update to 3.0.0a (alpha release)
59f48db
835aa94
* Mon Sep  5 2011 Tomas Bzatek <tbzatek@redhat.com> - 2.8.5-1
835aa94
- Update to 2.8.5
835aa94
07e29c7
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.4-3
07e29c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
07e29c7
8553261
* Thu Jan 13 2011 Tomas Bzatek <tbzatek@redhat.com> - 2.8.4-2
8553261
- Rebuild for new xz-libs
8553261
Tomas Bzatek 46f6ae9
* Wed Jun 30 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.8.4-1
Tomas Bzatek 46f6ae9
- Update to 2.8.4
Tomas Bzatek 46f6ae9
Tomas Bzatek 46f6ae9
* Fri Jun 25 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.8.3-2
Tomas Bzatek 46f6ae9
- Fix ISO9660 reader data type mismatches (#597243)
Tomas Bzatek 46f6ae9
Tomas Bzatek d2d6c84
* Tue Mar 16 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.8.3-1
Tomas Bzatek d2d6c84
- Update to 2.8.3
Tomas Bzatek d2d6c84
Tomas Bzatek dfb63a5
* Mon Mar  8 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.8.1-1
Tomas Bzatek dfb63a5
- Update to 2.8.1
Tomas Bzatek dfb63a5
Tomas Bzatek 9486c6f
* Fri Feb  5 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.8.0-1
Tomas Bzatek 9486c6f
- Update to 2.8.0
Tomas Bzatek 9486c6f
Tomas Bzatek e11ed8d
* Wed Jan  6 2010 Tomas Bzatek <tbzatek@redhat.com> - 2.7.902a-1
Tomas Bzatek e11ed8d
- Update to 2.7.902a
Tomas Bzatek e11ed8d
f2ff60c
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.7.1-2
f2ff60c
- rebuilt with new openssl
f2ff60c
Tomas Bzatek 00f293e
* Fri Aug  7 2009 Tomas Bzatek <tbzatek@redhat.com> 2.7.1-1
Tomas Bzatek 00f293e
- Update to 2.7.1
Tomas Bzatek 00f293e
- Drop deprecated lzma dependency, libxz handles both formats
Tomas Bzatek 00f293e
Tomas Bzatek b7414a4
* Mon Jul 27 2009 Tomas Bzatek <tbzatek@redhat.com> 2.7.0-3
Tomas Bzatek b7414a4
- Enable XZ compression format
Tomas Bzatek b7414a4
fc4ed7e
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-2
fc4ed7e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
fc4ed7e
Tomas Bzatek fb8561b
* Tue May 12 2009 Tomas Bzatek <tbzatek@redhat.com> 2.7.0-1
Tomas Bzatek fb8561b
- Update to 2.7.0
Tomas Bzatek fb8561b
Tomas Bzatek a838355
* Fri Mar  6 2009 Tomas Bzatek <tbzatek@redhat.com> 2.6.2-1
Tomas Bzatek a838355
- Update to 2.6.2
Tomas Bzatek a838355
7fc8017
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-2
7fc8017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
7fc8017
Tomas Bzatek d12ad8f
* Mon Feb 16 2009 Tomas Bzatek <tbzatek@redhat.com> 2.6.1-1
Tomas Bzatek d12ad8f
- Update to 2.6.1
Tomas Bzatek d12ad8f
Tomas Bzatek 291ffd3
* Thu Jan  8 2009 Tomas Bzatek <tbzatek@redhat.com> 2.6.0-1
Tomas Bzatek 291ffd3
- Update to 2.6.0
Tomas Bzatek 291ffd3
Tomas Bzatek 12f0975
* Mon Dec 15 2008 Tomas Bzatek <tbzatek@redhat.com> 2.5.904a-1
Tomas Bzatek 12f0975
- Update to 2.5.904a
Tomas Bzatek 12f0975
Tomas Bzatek 134f127
* Tue Dec  9 2008 Tomas Bzatek <tbzatek@redhat.com> 2.5.903a-2
Tomas Bzatek 134f127
- Add LZMA support
Tomas Bzatek 134f127
Tomas Bzatek 5b3e986
* Mon Dec  8 2008 Tomas Bzatek <tbzatek@redhat.com> 2.5.903a-1
Tomas Bzatek 5b3e986
- Update to 2.5.903a
Tomas Bzatek 5b3e986
Tomas Bzatek 58b253e
* Tue Jul 22 2008 Tomas Bzatek <tbzatek@redhat.com> 2.5.5-1
Tomas Bzatek 58b253e
- Update to 2.5.5
Tomas Bzatek 58b253e
Tomas Bzatek 734f5c0
* Wed Apr  2 2008 Tomas Bzatek <tbzatek@redhat.com> 2.4.17-1
Tomas Bzatek 734f5c0
- Update to 2.4.17
Tomas Bzatek 734f5c0
f98ca6a
* Wed Mar 19 2008 Tomas Bzatek <tbzatek@redhat.com> 2.4.14-1
Tomas Bzatek 43b4cad
- Initial packaging