diff --git a/libarchive-3.1.2-mtree-fix.patch b/libarchive-3.1.2-mtree-fix.patch new file mode 100644 index 0000000..3d33922 --- /dev/null +++ b/libarchive-3.1.2-mtree-fix.patch @@ -0,0 +1,29 @@ +From e65bf287f0133426b26611fe3e80b51267987106 Mon Sep 17 00:00:00 2001 +From: Dave Reisner +Date: Thu, 21 Feb 2013 19:01:06 -0500 +Subject: [PATCH] mtree: fix line filename length calculation. Fixes #301. + Signed-off-by: Andres Mejia + +--- + libarchive/archive_write_set_format_mtree.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libarchive/archive_write_set_format_mtree.c b/libarchive/archive_write_set_format_mtree.c +index 9c0613c..f37f723 100644 +--- a/libarchive/archive_write_set_format_mtree.c ++++ b/libarchive/archive_write_set_format_mtree.c +@@ -1855,9 +1855,9 @@ mtree_entry_setup_filenames(struct archive_write *a, struct mtree_entry *file, + return (ret); + } + +- /* Make a basename from dirname and slash */ ++ /* Make a basename from file->parentdir.s and slash */ + *slash = '\0'; +- file->parentdir.length = slash - dirname; ++ file->parentdir.length = slash - file->parentdir.s; + archive_strcpy(&(file->basename), slash + 1); + return (ret); + } +-- +2.5.0 + diff --git a/libarchive.spec b/libarchive.spec index ed2166c..55bbb6a 100644 --- a/libarchive.spec +++ b/libarchive.spec @@ -1,6 +1,6 @@ Name: libarchive Version: 3.1.2 -Release: 13%{?dist} +Release: 14%{?dist} Summary: A library for handling streaming archive formats Group: System Environment/Libraries @@ -28,19 +28,26 @@ BuildRequires: automake autoconf libtool # https://bugzilla.redhat.com/show_bug.cgi?id=927105 Patch0: libarchive-3.1.3-CVE-2013-0211_read_buffer_overflow.patch +# upstream ~> 26629c191a & b539b2e597 & 9caa49246 Patch1: libarchive-3.1.2-testsuite.patch +# fix not working saving/restoring acl +# ~> downstream Patch2: libarchive-3.1.2-acl.patch # ~> upstream patches: 3865cf2b e6c9668f 24f5de65 Patch3: libarchive-3.1.2-security-rhbz-1216891.patch +# upstream: e65bf287 +Patch4: libarchive-3.1.2-mtree-fix.patch + %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} Group: Development/Libraries @@ -72,15 +79,7 @@ libarchive packages. %prep -%setup -q -n %{name}-%{version} -%patch0 -p1 -b .CVE-2013-0211 -# fix bugs in testsuite -# ~> upstream ~> 26629c191a & b539b2e597 & 9caa49246 -%patch1 -p1 -b .fix-testsuite -# fix not working saving/restoring acl -# ~> downstream -%patch2 -p1 -b .fix-acl -%patch3 -p1 -b .segfault-cpio +%autosetup -p1 %build @@ -179,6 +178,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Dec 21 2015 Pavel Raiskup - 3.1.2-14 +- fix 'Out of memory when creating mtree files' error (rhbz#1284162) +- use %%autosetup macro + * Wed Jun 17 2015 Fedora Release Engineering - 3.1.2-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild