Accepting request 104956 from Archiving

- fix failed tests on ppc (forwarded request 104794 from k0da)

OBS-URL: https://build.opensuse.org/request/show/104956
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libarchive?expand=0&rev=3
This commit is contained in:
Stephan Kulow 2012-02-16 15:17:13 +00:00 committed by Git OBS Bridge
commit 52752a7a25
4 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,34 @@
diff -ur libarchive-2.8.5-orig/libarchive/test/main.c libarchive-2.8.5/libarchive/test/main.c
--- libarchive-2.8.5-orig/libarchive/test/main.c 2010-06-29 12:06:59.000000000 +1200
+++ libarchive-2.8.5/libarchive/test/main.c 2011-11-04 20:36:13.000000000 +1300
@@ -28,6 +28,7 @@
#include <locale.h>
#include <stdarg.h>
#include <time.h>
+#include <signal.h>
/*
* This same file is used pretty much verbatim for all test harnesses.
@@ -1873,6 +1874,7 @@
const char *tmp, *option_arg, *p;
char tmpdir[256];
char tmpdir_timestamp[256];
+ struct sigaction sa;
(void)argc; /* UNUSED */
@@ -2002,6 +2004,14 @@
#endif
/*
+ * Ignore SIGPIPE signals
+ */
+ sa.sa_handler = SIG_IGN;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ sigaction(SIGPIPE, &sa, NULL);
+
+ /*
* Create a temp directory for the following tests.
* Include the time the tests started as part of the name,
* to make it easier to track the results of multiple tests.

View File

@ -0,0 +1,17 @@
Index: libarchive-2.8.5/libarchive/archive_read_support_format_iso9660.c
===================================================================
--- libarchive-2.8.5.orig/libarchive/archive_read_support_format_iso9660.c
+++ libarchive-2.8.5/libarchive/archive_read_support_format_iso9660.c
@@ -2161,6 +2161,12 @@ read_CE(struct archive_read *a, struct i
}
do {
file = heap->reqs[0].file;
+ if (file->ce_offset + file->ce_size > step) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Malformed CE information");
+ return (ARCHIVE_FATAL);
+ }
p = b + file->ce_offset;
end = p + file->ce_size;
next_CE(heap);

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Feb 13 18:19:49 UTC 2012 - dvaleev@suse.com
- fix failed tests on ppc
-------------------------------------------------------------------
Wed Feb 8 10:57:45 UTC 2012 - idonmez@suse.com

View File

@ -16,6 +16,7 @@
#
Name: libarchive
Version: 2.8.5
Release: 0
@ -39,6 +40,9 @@ Url: http://code.google.com/p/libarchive/
Source0: http://libarchive.googlecode.com/files/libarchive-%{version}.tar.gz
Source1: baselibs.conf
Patch1: libarchive-2.5.5_handle_ENOSYS_from_lutimes.patch
Patch2: libarchive-test-fuzz.patch
Patch3: libarchive-ignore-sigpipe-in-test-suite.patch
%description
Libarchive is a programming library that can create and read several
@ -52,17 +56,23 @@ 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 libarchive2
#
Summary: Library to work with several different streaming archive formats
Group: Development/Libraries/C and C++
%description -n libarchive2
Libarchive is a programming library that can create and read several
different streaming archive formats, including most popular tar
@ -117,6 +127,8 @@ 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: libacl-devel
Requires: libarchive2 = %{version}
Requires: zlib-devel
@ -124,6 +136,7 @@ Requires: libbz2-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
@ -138,15 +151,20 @@ This package contains the development files.
%prep
%setup -q -n %{name}-%{version}
%patch1
%patch2 -p1
%patch3 -p1
%build
#autoreconf -fi
%configure --disable-static --enable-bsdcpio
make %{?_smp_mflags}
%check
make check
%install
%makeinstall
@ -154,10 +172,13 @@ rm -fv minitar/*.o
rm -fv %{buildroot}%{_libdir}/*.la
rm "%{buildroot}%{_mandir}/man5/"{tar,cpio,mtree}.5*
%post -n libarchive2 -p /sbin/ldconfig
%postun -n libarchive2 -p /sbin/ldconfig
%files -n bsdtar
%defattr(-,root,root)
%{_bindir}/bsdtar
@ -165,11 +186,13 @@ rm "%{buildroot}%{_mandir}/man5/"{tar,cpio,mtree}.5*
%{_mandir}/man1/*
%{_mandir}/man5/*
%files -n libarchive2
%defattr(-,root,root)
%{_libdir}/libarchive.so.*
%doc COPYING INSTALL NEWS README examples/
%files -n libarchive-devel
%defattr(-,root,root)
%{_mandir}/man3/*
@ -177,4 +200,6 @@ rm "%{buildroot}%{_mandir}/man5/"{tar,cpio,mtree}.5*
%{_includedir}/archive*
%{_libdir}/pkgconfig/libarchive.pc
%changelog