summaryrefslogtreecommitdiff
path: root/testing/libarchive
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2012-02-05 17:25:05 +0000
committerParabola <dev@list.parabolagnulinux.org>2012-02-05 17:25:05 +0000
commit359d940358dec836dd0acfe9d9caf0b1ff0a97fe (patch)
treeeeed5f77c8417a98fe5b8538d3c019d1cea00c04 /testing/libarchive
parentcdc66cc7110e78bf1197f9effc70422114f9341b (diff)
Sun Feb 5 17:25:01 UTC 2012
Diffstat (limited to 'testing/libarchive')
-rw-r--r--testing/libarchive/PKGBUILD49
-rw-r--r--testing/libarchive/interpret-non-posix-zips.patch165
-rw-r--r--testing/libarchive/release-2.8-fixes.patch234
-rw-r--r--testing/libarchive/sparse-file.patch13
-rw-r--r--testing/libarchive/test-with-zip-mtime.patch23
5 files changed, 0 insertions, 484 deletions
diff --git a/testing/libarchive/PKGBUILD b/testing/libarchive/PKGBUILD
deleted file mode 100644
index 28229f186..000000000
--- a/testing/libarchive/PKGBUILD
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Id: PKGBUILD 147250 2012-01-25 03:21:31Z dreisner $
-# Maintainer: Dan McGee <dan@archlinux.org>
-
-pkgname=libarchive
-pkgver=3.0.3
-pkgrel=3
-pkgdesc="library that can create and read several streaming archive formats"
-arch=('i686' 'x86_64')
-url="http://libarchive.googlecode.com/"
-license=('BSD')
-depends=('zlib' 'bzip2' 'xz>=5.0.0' 'acl' 'openssl>=1.0.0' 'expat')
-source=("http://libarchive.googlecode.com/files/libarchive-${pkgver}.tar.gz"
- 'interpret-non-posix-zips.patch'
- 'test-with-zip-mtime.patch')
-md5sums=('ca4090f0099432a9ac5a8b6618dc3892'
- 'f02b88eb10877c7a7d527ed89c662e44'
- '8366def6d7d70d424fa28a986c78c015')
-sha256sums=('c5fc7620f74a54b1717e4aed38aee85dc27a988ad1db7640f28eb63a82ea62d7'
- '9d8240a360d61464dfc5a98342f520ad41b0f922261f2ace7ec1fefb8c289bdc'
- 'b7a8be5c1e3220960a9f67c9779b10d2663e25d72939546b4f01a49f1ee3a61f')
-
-# keep an upgrade path for older installations
-PKGEXT='.pkg.tar.gz'
-
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- # http://code.google.com/p/libarchive/issues/detail?id=225
- patch -Np0 <"$srcdir/interpret-non-posix-zips.patch"
-
- # http://code.google.com/p/libarchive/issues/detail?id=231
- patch -Np0 <"$srcdir/test-with-zip-mtime.patch"
-
- ./configure --prefix=/usr --without-xml2
- make
-}
-
-check() {
- cd "$srcdir/$pkgname-$pkgver"
-
- make check
-}
-
-package() {
- cd "$srcdir/$pkgname-$pkgver"
- make DESTDIR="$pkgdir" install
-
- install -D -m644 COPYING "$pkgdir"/usr/share/licenses/libarchive/COPYING
-}
diff --git a/testing/libarchive/interpret-non-posix-zips.patch b/testing/libarchive/interpret-non-posix-zips.patch
deleted file mode 100644
index 63bc439d9..000000000
--- a/testing/libarchive/interpret-non-posix-zips.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-Index: libarchive/archive_read_support_format_zip.c
-===================================================================
---- libarchive/archive_read_support_format_zip.c (revision 4189)
-+++ libarchive/archive_read_support_format_zip.c (revision 4190)
-@@ -217,14 +217,13 @@
- }
-
- /*
-- * TODO: This is a performance sink because it forces
-- * the read core to drop buffered data from the start
-- * of file, which will then have to be re-read again
-- * if this bidder loses.
-+ * TODO: This is a performance sink because it forces the read core to
-+ * drop buffered data from the start of file, which will then have to
-+ * be re-read again if this bidder loses.
- *
-- * Consider passing in the winning bid value to subsequent
-- * bidders so that this bidder in particular can avoid
-- * seeking if it knows it's going to lose anyway.
-+ * We workaround this a little by passing in the best bid so far so
-+ * that later bidders can do nothing if they know they'll never
-+ * outbid. But we can certainly do better...
- */
- static int
- archive_read_format_zip_seekable_bid(struct archive_read *a, int best_bid)
-@@ -311,19 +310,29 @@
- external_attributes = archive_le32dec(p + 38);
- zip_entry->local_header_offset = archive_le32dec(p + 42);
-
-+ /* If we can't guess the mode, leave it zero here;
-+ when we read the local file header we might get
-+ more information. */
-+ zip_entry->mode = 0;
- if (zip_entry->system == 3) {
- zip_entry->mode = external_attributes >> 16;
-- } else {
-- zip_entry->mode = AE_IFREG | 0777;
- }
-
-- /* Do we need to parse filename here? */
-- /* Or can we wait until we read the local header? */
-+ /* We don't read the filename until we get to the
-+ local file header. Reading it here would speed up
-+ table-of-contents operations (removing the need to
-+ find and read local file header to get the
-+ filename) at the cost of requiring a lot of extra
-+ space. */
-+ /* We don't read the extra block here. We assume it
-+ will be duplicated at the local file header. */
- __archive_read_consume(a,
- 46 + filename_length + extra_length + comment_length);
- }
-
-- /* TODO: Sort zip entries. */
-+ /* TODO: Sort zip entries by file offset so that we
-+ can optimize get_next_header() to use skip instead of
-+ seek. */
-
- return ARCHIVE_OK;
- }
-@@ -434,6 +443,11 @@
- return (30);
- }
-
-+ /* TODO: It's worth looking ahead a little bit for a valid
-+ * PK signature. In particular, that would make it possible
-+ * to read some UUEncoded SFX files or SFX files coming from
-+ * a network socket. */
-+
- return (0);
- }
-
-Index: libarchive/test/test_compat_zip_6.zip.uu
-===================================================================
---- libarchive/test/test_compat_zip_6.zip.uu (revision 0)
-+++ libarchive/test/test_compat_zip_6.zip.uu (revision 4190)
-@@ -0,0 +1,10 @@
-+begin 755 test_compat_zip_6.zip
-+M4$L#!`H``````'@3-T`````````````````6````3F5W($9O;&1E<B].97<@
-+M1F]L9&5R+U!+`P0*``````!\$S=`%4-8OPL````+````*P```$YE=R!&;VQD
-+M97(O3F5W($9O;&1E<B].97<@5&5X="!$;V-U;65N="YT>'1S;VUE('1E>'0-
-+M"E!+`0(4"PH``````'@3-T`````````````````6````````````$```````
-+M``!.97<@1F]L9&5R+TYE=R!&;VQD97(O4$L!`A0+"@``````?!,W0!5#6+\+
-+M````"P```"L``````````0`@````-````$YE=R!&;VQD97(O3F5W($9O;&1E
-+M<B].97<@5&5X="!$;V-U;65N="YT>'102P4&``````(``@"=````B```````
-+`
-+end
-Index: libarchive/test/test_compat_zip.c
-===================================================================
---- libarchive/test/test_compat_zip.c (revision 4189)
-+++ libarchive/test/test_compat_zip.c (revision 4190)
-@@ -348,6 +348,53 @@
- free(p);
- }
-
-+/*
-+ * Issue 225: Errors extracting MSDOS Zip archives with directories.
-+ */
-+static void
-+compat_zip_6_verify(struct archive *a)
-+{
-+ struct archive_entry *ae;
-+
-+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
-+ assertEqualString("New Folder/New Folder/", archive_entry_pathname(ae));
-+ assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
-+ assertEqualInt(1327314468, archive_entry_mtime(ae));
-+ assertEqualInt(0, archive_entry_size(ae));
-+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
-+ assertEqualString("New Folder/New Folder/New Text Document.txt", archive_entry_pathname(ae));
-+ assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
-+ assertEqualInt(1327314476, archive_entry_mtime(ae));
-+ assertEqualInt(11, archive_entry_size(ae));
-+ assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
-+}
-+
-+static void
-+test_compat_zip_6(void)
-+{
-+ const char *refname = "test_compat_zip_6.zip";
-+ struct archive *a;
-+ void *p;
-+ size_t s;
-+
-+ extract_reference_file(refname);
-+ p = slurpfile(&s, refname);
-+
-+ assert((a = archive_read_new()) != NULL);
-+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
-+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
-+ assertEqualIntA(a, ARCHIVE_OK, read_open_memory_seek(a, p, s, 7));
-+ compat_zip_6_verify(a);
-+ assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a));
-+
-+ assert((a = archive_read_new()) != NULL);
-+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
-+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
-+ assertEqualIntA(a, ARCHIVE_OK, read_open_memory(a, p, s, 7));
-+ compat_zip_6_verify(a);
-+ assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a));
-+}
-+
- DEFINE_TEST(test_compat_zip)
- {
- test_compat_zip_1();
-@@ -355,6 +402,7 @@
- test_compat_zip_3();
- test_compat_zip_4();
- test_compat_zip_5();
-+ test_compat_zip_6();
- }
-
-
-Index: Makefile.am
-===================================================================
---- Makefile.am (revision 4189)
-+++ Makefile.am (revision 4190)
-@@ -462,6 +462,7 @@
- libarchive/test/test_compat_zip_3.zip.uu \
- libarchive/test/test_compat_zip_4.zip.uu \
- libarchive/test/test_compat_zip_5.zip.uu \
-+ libarchive/test/test_compat_zip_6.zip.uu \
- libarchive/test/test_fuzz_1.iso.Z.uu \
- libarchive/test/test_fuzz.cab.uu \
- libarchive/test/test_fuzz.lzh.uu \
diff --git a/testing/libarchive/release-2.8-fixes.patch b/testing/libarchive/release-2.8-fixes.patch
deleted file mode 100644
index c21eeaa7b..000000000
--- a/testing/libarchive/release-2.8-fixes.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-Index: build/cmake/config.h.in
-===================================================================
---- build/cmake/config.h.in (revision 3670)
-+++ build/cmake/config.h.in (revision 3737)
-@@ -1,5 +1,8 @@
- /* config.h. Generated from config.h.cmake by cmake configure */
-
-+/* Define ZLIB_WINAPI if zlib was built on Visual Studio. */
-+#cmakedefine ZLIB_WINAPI 1
-+
- /* MD5 via ARCHIVE_HASH_MD5_LIBC supported. */
- #cmakedefine ARCHIVE_HASH_MD5_LIBC
-
-Index: libarchive/archive_read_support_format_all.c
-===================================================================
---- libarchive/archive_read_support_format_all.c (revision 3670)
-+++ libarchive/archive_read_support_format_all.c (revision 3737)
-@@ -1,5 +1,5 @@
- /*-
-- * Copyright (c) 2003-2007 Tim Kientzle
-+ * Copyright (c) 2003-2011 Tim Kientzle
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
-@@ -39,5 +39,13 @@
- archive_read_support_format_tar(a);
- archive_read_support_format_xar(a);
- archive_read_support_format_zip(a);
-+
-+ /* Note: We always return ARCHIVE_OK here, even if some of the
-+ * above return ARCHIVE_WARN. The intent here is to enable
-+ * "as much as possible." Clients who need specific
-+ * compression should enable those individually so they can
-+ * verify the level of support. */
-+ /* Clear any warning messages set by the above functions. */
-+ archive_clear_error(a);
- return (ARCHIVE_OK);
- }
-Index: libarchive/archive_write_disk.c
-===================================================================
---- libarchive/archive_write_disk.c (revision 3670)
-+++ libarchive/archive_write_disk.c (revision 3737)
-@@ -1513,6 +1513,22 @@
- }
-
- #if defined(_WIN32) || defined(__CYGWIN__)
-+static int
-+guidword(const char *p, int n)
-+{
-+ int i;
-+
-+ for (i = 0; i < n; i++) {
-+ if ((*p >= '0' && *p <= '9') ||
-+ (*p >= 'a' && *p <= 'f') ||
-+ (*p >= 'A' && *p <= 'F'))
-+ p++;
-+ else
-+ return (-1);
-+ }
-+ return (0);
-+}
-+
- /*
- * 1. Convert a path separator from '\' to '/' .
- * We shouldn't check multi-byte character directly because some
-@@ -1521,26 +1537,92 @@
- * 2. Replace unusable characters in Windows with underscore('_').
- * See also : http://msdn.microsoft.com/en-us/library/aa365247.aspx
- */
--static void
-+static int
- cleanup_pathname_win(struct archive_write_disk *a)
- {
- wchar_t wc;
- char *p;
- size_t alen, l;
-
-- alen = 0;
-- l = 0;
-- for (p = a->name; *p != '\0'; p++) {
-- ++alen;
-- if (*p == '\\')
-- l = 1;
-+ p = a->name;
-+ /* Skip leading "\\.\" or "\\?\" or "\\?\UNC\" or
-+ * "\\?\Volume{GUID}\"
-+ * (absolute path prefixes used by Windows API) */
-+ if ((p[0] == '\\' || p[0] == '/') && (p[1] == '\\' || p[1] == '/' ) &&
-+ (p[2] == '.' || p[2] == '?') && (p[3] == '\\' || p[3] == '/'))
-+ {
-+ /* A path begin with "\\?\UNC\" */
-+ if (p[2] == '?' &&
-+ (p[4] == 'U' || p[4] == 'u') &&
-+ (p[5] == 'N' || p[5] == 'n') &&
-+ (p[6] == 'C' || p[6] == 'c') &&
-+ (p[7] == '\\' || p[7] == '/'))
-+ p += 8;
-+ /* A path begin with "\\?\Volume{GUID}\" */
-+ else if (p[2] == '?' &&
-+ (p[4] == 'V' || p[4] == 'v') &&
-+ (p[5] == 'O' || p[5] == 'o') &&
-+ (p[6] == 'L' || p[6] == 'l') &&
-+ (p[7] == 'U' || p[7] == 'u') &&
-+ (p[8] == 'M' || p[8] == 'm') &&
-+ (p[9] == 'E' || p[9] == 'e') &&
-+ p[10] == '{') {
-+ if (guidword(p+11, 8) == 0 && p[19] == '-' &&
-+ guidword(p+20, 4) == 0 && p[24] == '-' &&
-+ guidword(p+25, 4) == 0 && p[29] == '-' &&
-+ guidword(p+30, 4) == 0 && p[34] == '-' &&
-+ guidword(p+35, 12) == 0 && p[47] == '}' &&
-+ (p[48] == '\\' || p[48] == '/'))
-+ p += 49;
-+ else
-+ p += 4;
-+ /* A path begin with "\\.\PhysicalDriveX" */
-+ } else if (p[2] == '.' &&
-+ (p[4] == 'P' || p[4] == 'p') &&
-+ (p[5] == 'H' || p[5] == 'h') &&
-+ (p[6] == 'Y' || p[6] == 'y') &&
-+ (p[7] == 'S' || p[7] == 's') &&
-+ (p[8] == 'I' || p[8] == 'i') &&
-+ (p[9] == 'C' || p[9] == 'c') &&
-+ (p[9] == 'A' || p[9] == 'a') &&
-+ (p[9] == 'L' || p[9] == 'l') &&
-+ (p[9] == 'D' || p[9] == 'd') &&
-+ (p[9] == 'R' || p[9] == 'r') &&
-+ (p[9] == 'I' || p[9] == 'i') &&
-+ (p[9] == 'V' || p[9] == 'v') &&
-+ (p[9] == 'E' || p[9] == 'e') &&
-+ (p[10] >= '0' && p[10] <= '9') &&
-+ p[11] == '\0') {
-+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
-+ "Path is a physical drive name");
-+ return (ARCHIVE_FAILED);
-+ } else
-+ p += 4;
-+ }
-+
-+ /* Skip leading drive letter from archives created
-+ * on Windows. */
-+ if (((p[0] >= 'a' && p[0] <= 'z') ||
-+ (p[0] >= 'A' && p[0] <= 'Z')) &&
-+ p[1] == ':') {
-+ if (p[2] == '\0') {
-+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
-+ "Path is a drive name");
-+ return (ARCHIVE_FAILED);
-+ }
-+ if (p[2] == '\\' || p[2] == '/')
-+ p += 3;
-+ }
-+
-+ for (; *p != '\0'; p++) {
- /* Rewrite the path name if its character is a unusable. */
- if (*p == ':' || *p == '*' || *p == '?' || *p == '"' ||
- *p == '<' || *p == '>' || *p == '|')
- *p = '_';
- }
-- if (alen == 0 || l == 0)
-- return;
-+ alen = p - a->name;
-+ if (alen == 0 || strchr(a->name, '\\') == NULL)
-+ return (ARCHIVE_OK);
- /*
- * Convert path separator.
- */
-@@ -1560,6 +1642,7 @@
- p += l;
- alen -= l;
- }
-+ return (ARCHIVE_OK);
- }
- #endif
-
-@@ -1583,7 +1666,8 @@
- }
-
- #if defined(_WIN32) || defined(__CYGWIN__)
-- cleanup_pathname_win(a);
-+ if (cleanup_pathname_win(a) != ARCHIVE_OK)
-+ return (ARCHIVE_FAILED);
- #endif
- /* Skip leading '/'. */
- if (*src == '/')
-Index: libarchive/archive_util.c
-===================================================================
---- libarchive/archive_util.c (revision 3670)
-+++ libarchive/archive_util.c (revision 3737)
-@@ -155,6 +155,7 @@
- {
- archive_string_empty(&a->error_string);
- a->error = NULL;
-+ a->archive_error_number = 0;
- }
-
- void
-Index: libarchive/archive_read_extract.c
-===================================================================
---- libarchive/archive_read_extract.c (revision 3670)
-+++ libarchive/archive_read_extract.c (revision 3737)
-@@ -108,7 +108,7 @@
- if (r != ARCHIVE_OK)
- /* If _write_header failed, copy the error. */
- archive_copy_error(&a->archive, ad);
-- else if (archive_entry_size(entry) > 0)
-+ else if (!archive_entry_size_is_set(entry) || archive_entry_size(entry) > 0)
- /* Otherwise, pour data into the entry. */
- r = copy_data(_a, ad);
- r2 = archive_write_finish_entry(ad);
-Index: CMakeLists.txt
-===================================================================
---- CMakeLists.txt (revision 3670)
-+++ CMakeLists.txt (revision 3737)
-@@ -154,6 +154,13 @@
- SET(HAVE_ZLIB_H 1)
- INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
- LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES})
-+ IF(WIN32 AND NOT CYGWIN)
-+ SET(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
-+ SET(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES})
-+ CHECK_C_SOURCE_Runs(
-+ "#ifndef ZLIB_WINAPI\n#define ZLIB_WINAPI\n#endif\n#include <zlib.h>\nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }"
-+ ZLIB_WINAPI)
-+ ENDIF(WIN32 AND NOT CYGWIN)
- ENDIF(ZLIB_FOUND)
- MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR)
- MARK_AS_ADVANCED(CLEAR ZLIB_LIBRARY)
-
-Property changes on: .
-___________________________________________________________________
-Modified: svn:mergeinfo
- Merged /trunk:r1989,3247,3722
-
diff --git a/testing/libarchive/sparse-file.patch b/testing/libarchive/sparse-file.patch
deleted file mode 100644
index e7d3e473b..000000000
--- a/testing/libarchive/sparse-file.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: libarchive/archive_write_set_format_pax.c
-===================================================================
---- libarchive/archive_write_set_format_pax.c (revision 4094)
-+++ libarchive/archive_write_set_format_pax.c (working copy)
-@@ -1647,7 +1647,7 @@
- return (total);
-
- p = ((const unsigned char *)buff) + total;
-- ws = s;
-+ ws = s - total;
- if (ws > pax->sparse_list->remaining)
- ws = pax->sparse_list->remaining;
-
diff --git a/testing/libarchive/test-with-zip-mtime.patch b/testing/libarchive/test-with-zip-mtime.patch
deleted file mode 100644
index 79e2f3c7e..000000000
--- a/testing/libarchive/test-with-zip-mtime.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: libarchive/test/test_compat_zip.c
-===================================================================
---- libarchive/test/test_compat_zip.c (revision 4197)
-+++ libarchive/test/test_compat_zip.c (revision 4198)
-@@ -359,12 +359,16 @@
- assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
- assertEqualString("New Folder/New Folder/", archive_entry_pathname(ae));
- assertEqualInt(AE_IFDIR, archive_entry_filetype(ae));
-- assertEqualInt(1327314468, archive_entry_mtime(ae));
-+ /* Zip timestamps are local time, so vary by time zone. */
-+ /* TODO: A more complex assert would work here; we could
-+ verify that it's within +/- 24 hours of a particular value. */
-+ /* assertEqualInt(1327314468, archive_entry_mtime(ae)); */
- assertEqualInt(0, archive_entry_size(ae));
- assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
- assertEqualString("New Folder/New Folder/New Text Document.txt", archive_entry_pathname(ae));
- assertEqualInt(AE_IFREG, archive_entry_filetype(ae));
-- assertEqualInt(1327314476, archive_entry_mtime(ae));
-+ /* Zip timestamps are local time, so vary by time zone. */
-+ /* assertEqualInt(1327314476, archive_entry_mtime(ae)); */
- assertEqualInt(11, archive_entry_size(ae));
- assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
- }