pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/libarchive Update libarchive to 2.2.5. Bigge...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/afc4cf32ae03
branches:  trunk
changeset: 531402:afc4cf32ae03
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sun Jul 29 17:35:14 2007 +0000

description:
Update libarchive to 2.2.5. Biggest changes are:
- massive performance improvements, up to 40% for bsdtar compared to 1.x
- support for external (de)compressors, ar-chives and many other goodies.

diffstat:

 archivers/libarchive/Makefile         |    9 +-
 archivers/libarchive/PLIST            |    4 +-
 archivers/libarchive/buildlink3.mk    |    4 +-
 archivers/libarchive/distinfo         |   12 +-
 archivers/libarchive/patches/patch-ab |   28 ++--
 archivers/libarchive/patches/patch-ac |   52 -------
 archivers/libarchive/patches/patch-ad |  230 ----------------------------------
 7 files changed, 28 insertions(+), 311 deletions(-)

diffs (truncated from 404 to 300 lines):

diff -r 0cdfea0021ed -r afc4cf32ae03 archivers/libarchive/Makefile
--- a/archivers/libarchive/Makefile     Sun Jul 29 17:09:47 2007 +0000
+++ b/archivers/libarchive/Makefile     Sun Jul 29 17:35:14 2007 +0000
@@ -1,13 +1,12 @@
-# $NetBSD: Makefile,v 1.17 2007/07/13 09:26:31 lkundrak Exp $
+# $NetBSD: Makefile,v 1.18 2007/07/29 17:35:14 joerg Exp $
 #
 
-DISTNAME=      libarchive-1.3.1
-PKGREVISION=   1
+DISTNAME=      libarchive-2.2.5
 CATEGORIES=    archivers
 MASTER_SITES=  http://people.freebsd.org/~kientzle/libarchive/src/
 
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      http://people.freebsd.org/~kientzle/libarchive/src/
+MAINTAINER=    joerg%NetBSD.org@localhost
+HOMEPAGE=      http://people.freebsd.org/~kientzle/libarchive/
 COMMENT=       Library to read/create different archive formats
 
 PKG_DESTDIR_SUPPORT=   user-destdir
diff -r 0cdfea0021ed -r afc4cf32ae03 archivers/libarchive/PLIST
--- a/archivers/libarchive/PLIST        Sun Jul 29 17:09:47 2007 +0000
+++ b/archivers/libarchive/PLIST        Sun Jul 29 17:35:14 2007 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2006/08/20 14:56:03 joerg Exp $
+@comment $NetBSD: PLIST,v 1.5 2007/07/29 17:35:14 joerg Exp $
 include/archive.h
 include/archive_entry.h
 lib/libarchive.la
@@ -6,6 +6,8 @@
 man/man3/archive_read.3
 man/man3/archive_util.3
 man/man3/archive_write.3
+man/man3/archive_write_disk.3
+man/man3/libarchive_internals.3
 man/man3/libarchive.3
 man/man5/libarchive-formats.5
 man/man5/tar.5
diff -r 0cdfea0021ed -r afc4cf32ae03 archivers/libarchive/buildlink3.mk
--- a/archivers/libarchive/buildlink3.mk        Sun Jul 29 17:09:47 2007 +0000
+++ b/archivers/libarchive/buildlink3.mk        Sun Jul 29 17:35:14 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.1 2007/02/20 23:16:18 xtraeme Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2007/07/29 17:35:14 joerg Exp $
 
 BUILDLINK_DEPTH:=              ${BUILDLINK_DEPTH}+
 LIBARCHIVE_BUILDLINK3_MK:=     ${LIBARCHIVE_BUILDLINK3_MK}+
@@ -12,7 +12,7 @@
 BUILDLINK_ORDER:=      ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libarchive
 
 .if ${LIBARCHIVE_BUILDLINK3_MK} == "+"
-BUILDLINK_API_DEPENDS.libarchive+=     libarchive>=1.3.1
+BUILDLINK_API_DEPENDS.libarchive+=     libarchive>=2.2
 BUILDLINK_PKGSRCDIR.libarchive?=       ../../archivers/libarchive
 .endif # LIBARCHIVE_BUILDLINK3_MK
 
diff -r 0cdfea0021ed -r afc4cf32ae03 archivers/libarchive/distinfo
--- a/archivers/libarchive/distinfo     Sun Jul 29 17:09:47 2007 +0000
+++ b/archivers/libarchive/distinfo     Sun Jul 29 17:35:14 2007 +0000
@@ -1,8 +1,6 @@
-$NetBSD: distinfo,v 1.14 2007/07/13 09:26:31 lkundrak Exp $
+$NetBSD: distinfo,v 1.15 2007/07/29 17:35:14 joerg Exp $
 
-SHA1 (libarchive-1.3.1.tar.gz) = aed6eda15b012adbb88af0f0d76887920ffe7bbf
-RMD160 (libarchive-1.3.1.tar.gz) = e518f802d9a50afcfede6dd7cbb4f42b2cbe12a1
-Size (libarchive-1.3.1.tar.gz) = 901173 bytes
-SHA1 (patch-ab) = 5e92405b0898123d8240f332475d13abe85f8ad3
-SHA1 (patch-ac) = 5775e26d19ace2b94c870c0e8de8e6efbe4b5c63
-SHA1 (patch-ad) = ea7a7ae72ca85589830aefae6e6e4f9f4ba45c7a
+SHA1 (libarchive-2.2.5.tar.gz) = fd04f17397c7af6c8964bde02146eda391413bf4
+RMD160 (libarchive-2.2.5.tar.gz) = fda5c804679e29954b387ae2c06b32bca4ae7bd4
+Size (libarchive-2.2.5.tar.gz) = 637691 bytes
+SHA1 (patch-ab) = 6ed1a120e0cc45a34e6359736f0f2aa3f0a505fe
diff -r 0cdfea0021ed -r afc4cf32ae03 archivers/libarchive/patches/patch-ab
--- a/archivers/libarchive/patches/patch-ab     Sun Jul 29 17:09:47 2007 +0000
+++ b/archivers/libarchive/patches/patch-ab     Sun Jul 29 17:35:14 2007 +0000
@@ -1,22 +1,22 @@
-$NetBSD: patch-ab,v 1.3 2006/08/20 14:56:03 joerg Exp $
+$NetBSD: patch-ab,v 1.4 2007/07/29 17:35:14 joerg Exp $
 
---- Makefile.in.orig   2006-08-20 02:33:45.000000000 +0200
+--- Makefile.in.orig   2007-07-14 03:17:48.000000000 +0000
 +++ Makefile.in
-@@ -38,7 +38,7 @@ PRE_UNINSTALL = :
+@@ -34,7 +34,7 @@ PRE_UNINSTALL = :
  POST_UNINSTALL = :
  build_triplet = @build@
  host_triplet = @host@
 -bin_PROGRAMS = bsdtar$(EXEEXT)
 +bin_PROGRAMS =
- DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \
-       $(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/config.h.in $(top_srcdir)/configure \
-@@ -264,7 +264,7 @@ EXTRA_DIST = version config.h.in                   \
-       tar/test tar/getdate.c tar/getdate.h
+ check_PROGRAMS = libarchive_test$(EXEEXT)
+ TESTS = libarchive_test$(EXEEXT)
+ subdir = .
+@@ -565,7 +565,7 @@ bsdtar_LDADD = -larchive
+ bsdtar_CPPFLAGS = -I$(top_builddir)/libarchive
+ # Link libarchive statically...
+ bsdtar_LDFLAGS = -static -I$(destdir)/libarchive
+-bsdtar_dist_man_MANS = tar/bsdtar.1
++bsdtar_dist_man_MANS =
+ all: $(BUILT_SOURCES) config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-am
  
- lib_LTLIBRARIES = libarchive.la
--dist_man_MANS = $(libarchive_dist_man_MANS) $(bsdtar_dist_man_MANS)
-+dist_man_MANS = $(libarchive_dist_man_MANS)
- 
- #
- # Libarchive headers, source, etc.
diff -r 0cdfea0021ed -r afc4cf32ae03 archivers/libarchive/patches/patch-ac
--- a/archivers/libarchive/patches/patch-ac     Sun Jul 29 17:09:47 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2006/11/10 00:29:44 adrianp Exp $
-
---- libarchive/archive_read_support_compression_none.c.orig    2006-09-05 07:00:47.000000000 +0100
-+++ libarchive/archive_read_support_compression_none.c
-@@ -257,7 +257,9 @@ archive_decompressor_none_read_consume(s
- }
- 
- /*
-- * Skip at most request bytes. Skipped data is marked as consumed.
-+ * Skip forward by exactly the requested bytes or else return
-+ * ARCHIVE_FATAL.  Note that this differs from the contract for
-+ * read_ahead, which does not gaurantee a minimum count.
-  */
- static ssize_t
- archive_decompressor_none_skip(struct archive *a, size_t request)
-@@ -287,9 +289,7 @@ archive_decompressor_none_skip(struct ar
-       if (request == 0)
-               return (total_bytes_skipped);
-       /*
--       * If no client_skipper is provided, just read the old way. It is very
--       * likely that after skipping, the request has not yet been fully
--       * satisfied (and is still > 0). In that case, read as well.
-+       * If a client_skipper was provided, try that first.
-        */
-       if (a->client_skipper != NULL) {
-               bytes_skipped = (a->client_skipper)(a, a->client_data,
-@@ -307,6 +307,12 @@ archive_decompressor_none_skip(struct ar
-               a->raw_position += bytes_skipped;
-               state->client_avail = state->client_total = 0;
-       }
-+      /*
-+       * Note that client_skipper will usually not satisfy the
-+       * full request (due to low-level blocking concerns),
-+       * so even if client_skipper is provided, we may still
-+       * have to use ordinary reads to finish out the request.
-+       */
-       while (request > 0) {
-               const void* dummy_buffer;
-               ssize_t bytes_read;
-@@ -314,6 +320,12 @@ archive_decompressor_none_skip(struct ar
-                   &dummy_buffer, request);
-               if (bytes_read < 0)
-                       return (bytes_read);
-+              if (bytes_read == 0) {
-+                      /* We hit EOF before we satisfied the skip request. */
-+                      archive_set_error(a, ARCHIVE_ERRNO_MISC,
-+                          "Truncated input file (need to skip %d bytes)", (int)request);
-+                      return (ARCHIVE_FATAL);
-+              }
-               assert(bytes_read >= 0); /* precondition for cast below */
-               min = minimum((size_t)bytes_read, request);
-               bytes_read = archive_decompressor_none_read_consume(a, min);
diff -r 0cdfea0021ed -r afc4cf32ae03 archivers/libarchive/patches/patch-ad
--- a/archivers/libarchive/patches/patch-ad     Sun Jul 29 17:09:47 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2007/07/13 09:26:32 lkundrak Exp $
-
-Fix for CVE-2007-3641, CVE-2007-3644 and CVE-2007-3645 from FreeBSD-SA-07:05.libarchive
-
---- libarchive/archive_read_support_format_tar.c.orig  2006-09-05 08:00:48.000000000 +0200
-+++ libarchive/archive_read_support_format_tar.c       2007-07-13 11:35:48.000000000 +0200
-@@ -670,7 +670,13 @@ tar_read_header(struct archive *a, struc
-               }
-       }
-       --tar->header_recursion_depth;
--      return (err);
-+      /* We return warnings or success as-is.  Anything else is fatal. */
-+      if (err == ARCHIVE_WARN || err == ARCHIVE_OK)
-+              return (err);
-+      if (err == ARCHIVE_EOF)
-+              /* EOF when recursively reading a header is bad. */
-+              archive_set_error(a, EINVAL, "Damaged tar archive");
-+      return (ARCHIVE_FATAL);
- }
- 
- /*
-@@ -741,32 +747,55 @@ static int
- header_Solaris_ACL(struct archive *a, struct tar *tar,
-     struct archive_entry *entry, struct stat *st, const void *h)
- {
--      int err, err2;
--      char *p;
-+      const struct archive_entry_header_ustar *header;
-+      size_t size;
-+      int err;
-+      char *acl, *p;
-       wchar_t *wp;
- 
-+      /*
-+       * read_body_to_string adds a NUL terminator, but we need a little
-+       * more to make sure that we don't overrun acl_text later.
-+       */
-+      header = (const struct archive_entry_header_ustar *)h;
-+      size = tar_atol(header->size, sizeof(header->size));
-       err = read_body_to_string(a, tar, &(tar->acl_text), h);
--      err2 = tar_read_header(a, tar, entry, st);
--      err = err_combine(err, err2);
--
--      /* XXX Ensure p doesn't overrun acl_text */
-+      if (err != ARCHIVE_OK)
-+              return (err);
-+      err = tar_read_header(a, tar, entry, st);
-+      if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
-+              return (err);
- 
-       /* Skip leading octal number. */
-       /* XXX TODO: Parse the octal number and sanity-check it. */
--      p = tar->acl_text.s;
--      while (*p != '\0')
-+      p = acl = tar->acl_text.s;
-+      while (*p != '\0' && p < acl + size)
-               p++;
-       p++;
- 
--      wp = malloc((strlen(p) + 1) * sizeof(wchar_t));
--      if (wp != NULL) {
--              utf8_decode(wp, p, strlen(p));
--              err2 = __archive_entry_acl_parse_w(entry, wp,
--                  ARCHIVE_ENTRY_ACL_TYPE_ACCESS);
--              err = err_combine(err, err2);
--              free(wp);
-+      if (p >= acl + size) {
-+              archive_set_error(a, ARCHIVE_ERRNO_MISC,
-+                  "Malformed Solaris ACL attribute");
-+              return(ARCHIVE_WARN);
-       }
- 
-+      /* Skip leading octal number. */
-+      size -= (p - acl);
-+      acl = p;
-+
-+      while (*p != '\0' && p < acl + size)
-+              p++;
-+
-+      wp = malloc((p - acl + 1) * sizeof(wchar_t));
-+      if (wp == NULL) {
-+              archive_set_error(a, ENOMEM,
-+                  "Can't allocate work buffer for ACL parsing");
-+              return (ARCHIVE_FATAL);
-+      }
-+      utf8_decode(wp, acl, p - acl);
-+      err = __archive_entry_acl_parse_w(entry, wp,
-+          ARCHIVE_ENTRY_ACL_TYPE_ACCESS);
-+      free(wp);
-       return (err);
- }
- 
-@@ -777,15 +806,17 @@ static int
- header_longlink(struct archive *a, struct tar *tar,
-     struct archive_entry *entry, struct stat *st, const void *h)
- {
--      int err, err2;
-+      int err;
- 
-       err = read_body_to_string(a, tar, &(tar->longlink), h);
--      err2 = tar_read_header(a, tar, entry, st);
--      if (err == ARCHIVE_OK && err2 == ARCHIVE_OK) {
--              /* Set symlink if symlink already set, else hardlink. */
--              archive_entry_set_link(entry, tar->longlink.s);
--      }
--      return (err_combine(err, err2));
-+      if (err != ARCHIVE_OK)
-+              return (err);
-+      err = tar_read_header(a, tar, entry, st);
-+      if ((err != ARCHIVE_OK) && (err != ARCHIVE_WARN))
-+              return (err);
-+      /* Set symlink if symlink already set, else hardlink. */
-+      archive_entry_set_link(entry, tar->longlink.s);
-+      return (ARCHIVE_OK);
- }
- 
- /*
-@@ -795,14 +826,17 @@ static int
- header_longname(struct archive *a, struct tar *tar,
-     struct archive_entry *entry, struct stat *st, const void *h)
- {
--      int err, err2;
-+      int err;
- 
-       err = read_body_to_string(a, tar, &(tar->longname), h);
-+      if (err != ARCHIVE_OK)



Home | Main Index | Thread Index | Old Index