Index: lib/libarchive/Makefile
===================================================================
RCS file: /home/dcvs/src/lib/libarchive/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- lib/libarchive/Makefile	18 Sep 2006 01:47:10 -0000	1.5
+++ lib/libarchive/Makefile	25 Mar 2007 21:37:20 -0000
@@ -4,13 +4,13 @@
 LIB=	archive
 
 PATCHES!=	echo ${.CURDIR}/patches/*.patch
-CONTRIBDIR=	${.CURDIR}/../../contrib/libarchive-1.3.1/libarchive
+CONTRIBDIR=	${.CURDIR}/../../contrib/libarchive-2.0/libarchive
 .PATH: ${CONTRIBDIR}
 
-VERSION= 1.3.1
-ARCHIVE_API_MAJOR!=	echo ${VERSION} | sed -e 's/\..*//'
-ARCHIVE_API_MINOR!=	echo ${VERSION} | sed -e 's/[0-9]*\.//' | sed -e 's/\..*//'
-SHLIB_MAJOR!= echo $$((${ARCHIVE_API_MAJOR} + ${ARCHIVE_API_MINOR}))
+VERSION!=	cat ${CONTRIBDIR}/../version
+ARCHIVE_API_MAJOR!=	echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/\..*//'
+ARCHIVE_API_MINOR!=	echo ${VERSION} | sed -e 's/[^0-9]/./g' -e 's/[0-9]*\.//' -e 's/\..*//'
+SHLIB_MAJOR=	5
 CFLAGS+=	-DHAVE_CONFIG_H
 CFLAGS+=	-I${.OBJDIR} -I${.CURDIR} -I${CONTRIBDIR} -I-
 WARNS?=	6
@@ -36,13 +36,17 @@
 	archive_read_support_compression_none.c		\
 	archive_read_support_format_all.c		\
 	archive_read_support_format_cpio.c		\
+	archive_read_support_format_empty.c		\
 	archive_read_support_format_iso9660.c		\
 	archive_read_support_format_tar.c		\
 	archive_read_support_format_zip.c		\
 	archive_string.c				\
 	archive_string_sprintf.c			\
 	archive_util.c					\
+	archive_virtual.c				\
 	archive_write.c					\
+	archive_write_disk.c				\
+	archive_write_disk_set_standard_lookup.c	\
 	archive_write_open_fd.c				\
 	archive_write_open_file.c			\
 	archive_write_open_filename.c			\
@@ -85,6 +89,7 @@
 MLINKS+=	archive_entry.3 archive_entry_copy_hardlink_w.3
 MLINKS+=	archive_entry.3 archive_entry_copy_pathname_w.3
 MLINKS+=	archive_entry.3 archive_entry_copy_stat.3
+MLINKS+=	archive_entry.3 archive_entry_copy_symlink.3
 MLINKS+=	archive_entry.3 archive_entry_copy_symlink_w.3
 MLINKS+=	archive_entry.3 archive_entry_copy_uname_w.3
 MLINKS+=	archive_entry.3 archive_entry_dev.3
@@ -140,7 +145,6 @@
 MLINKS+=	archive_read.3 archive_read_open_fd.3
 MLINKS+=	archive_read.3 archive_read_open_filename.3
 MLINKS+=	archive_read.3 archive_read_open_memory.3
-MLINKS+=	archive_read.3 archive_read_set_bytes_per_block.3
 MLINKS+=	archive_read.3 archive_read_support_compression_all.3
 MLINKS+=	archive_read.3 archive_read_support_compression_bzip2.3
 MLINKS+=	archive_read.3 archive_read_support_compression_compress.3
@@ -148,9 +152,11 @@
 MLINKS+=	archive_read.3 archive_read_support_compression_none.3
 MLINKS+=	archive_read.3 archive_read_support_format_all.3
 MLINKS+=	archive_read.3 archive_read_support_format_cpio.3
+MLINKS+=	archive_read.3 archive_read_support_format_empty.3
 MLINKS+=	archive_read.3 archive_read_support_format_iso9660.3
 MLINKS+=	archive_read.3 archive_read_support_format_tar.3
 MLINKS+=	archive_read.3 archive_read_support_format_zip.3
+MLINKS+=	archive_util.3 archive_clear_error.3
 MLINKS+=	archive_util.3 archive_compression.3
 MLINKS+=	archive_util.3 archive_compression_name.3
 MLINKS+=	archive_util.3 archive_errno.3
@@ -161,15 +167,17 @@
 MLINKS+=	archive_write.3 archive_write_close.3
 MLINKS+=	archive_write.3 archive_write_data.3
 MLINKS+=	archive_write.3 archive_write_finish.3
+MLINKS+=	archive_write.3 archive_write_finish_entry.3
+MLINKS+=	archive_write.3 archive_write_get_bytes_per_block.3
 MLINKS+=	archive_write.3 archive_write_header.3
 MLINKS+=	archive_write.3 archive_write_new.3
 MLINKS+=	archive_write.3 archive_write_open.3
 MLINKS+=	archive_write.3 archive_write_open_FILE.3
 MLINKS+=	archive_write.3 archive_write_open_fd.3
-MLINKS+=	archive_write.3 archive_write_prepare.3
-MLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
+MLINKS+=	archive_write.3 archive_write_open_filename.3
+MLINKS+=	archive_write.3 archive_write_open_memory.3
 MLINKS+=	archive_write.3 archive_write_set_bytes_in_last_block.3
-MLINKS+=	archive_write.3 archive_write_set_callbacks.3
+MLINKS+=	archive_write.3 archive_write_set_bytes_per_block.3
 MLINKS+=	archive_write.3 archive_write_set_compression_bzip2.3
 MLINKS+=	archive_write.3 archive_write_set_compression_gzip.3
 MLINKS+=	archive_write.3 archive_write_set_format_cpio.3
Index: lib/libarchive/config.h
===================================================================
RCS file: /home/dcvs/src/lib/libarchive/config.h,v
retrieving revision 1.2
diff -u -r1.2 config.h
--- lib/libarchive/config.h	18 Sep 2006 01:47:10 -0000	1.2
+++ lib/libarchive/config.h	25 Mar 2007 18:37:35 -0000
@@ -1,4 +1,4 @@
-/* $DragonFly: src/lib/libarchive/config.h,v 1.2 2006/09/18 01:47:10 pavalos Exp $ */
+/* $DragonFly$ */
 /* config.h.  Generated by configure.  */
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
@@ -88,6 +88,9 @@
 /* Define to 1 if fnmatch(3) supports the FNM_LEADING_DIR flag */
 #define HAVE_FNM_LEADING_DIR 1
 
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#define HAVE_FSEEKO 1
+
 /* Define to 1 if you have the `fsetxattr' function. */
 /* #undef HAVE_FSETXATTR */
 
@@ -103,6 +106,9 @@
 /* Define to 1 if you have the `getxattr' function. */
 /* #undef HAVE_GETXATTR */
 
+/* Define to 1 if you have the <grp.h> header file. */
+#define HAVE_GRP_H 1
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
 
@@ -139,6 +145,9 @@
 /* Define to 1 if you have the <linux/ext2_fs.h> header file. */
 /* #undef HAVE_LINUX_EXT2_FS_H */
 
+/* Define to 1 if you have the <linux/fs.h> header file. */
+/* #undef HAVE_LINUX_FS_H */
+
 /* Define to 1 if you have the `listxattr' function. */
 /* #undef HAVE_LISTXATTR */
 
@@ -182,6 +191,9 @@
 /* Define to 1 if you have the <paths.h> header file. */
 #define HAVE_PATHS_H 1
 
+/* Define to 1 if you have the <pwd.h> header file. */
+#define HAVE_PWD_H 1
+
 /* Define to 1 if you have the `reallocf' function. */
 #define HAVE_REALLOCF 1
 
@@ -192,6 +204,9 @@
    zero-length file name argument. */
 /* #undef HAVE_STAT_EMPTY_STRING_BUG */
 
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #define HAVE_STDINT_H 1
 
@@ -263,6 +278,9 @@
 /* Define to 1 if you have the `timegm' function. */
 #define HAVE_TIMEGM 1
 
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
 /* Define to 1 if you have the <unistd.h> header file. */
 #define HAVE_UNISTD_H 1
 
@@ -300,13 +318,13 @@
 #define PACKAGE_NAME "libarchive"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libarchive 1.3.1"
+#define PACKAGE_STRING "libarchive 2.0.25"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "libarchive"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.3.1"
+#define PACKAGE_VERSION "2.0.25"
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
@@ -318,11 +336,14 @@
 #define TIME_WITH_SYS_TIME 1
 
 /* Version number of package */
-#define VERSION "1.3.1"
+#define VERSION "2.0.25"
 
 /* Number of bits in a file offset, on hosts where this is settable. */
 /* #undef _FILE_OFFSET_BITS */
 
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+/* #undef _LARGEFILE_SOURCE */
+
 /* Define for large files, on AIX-style hosts. */
 /* #undef _LARGE_FILES */
 
Index: lib/libarchive/patches/archive_platform.h.patch
===================================================================
RCS file: /home/dcvs/src/lib/libarchive/patches/archive_platform.h.patch,v
retrieving revision 1.3
diff -u -r1.3 archive_platform.h.patch
--- lib/libarchive/patches/archive_platform.h.patch	18 Sep 2006 01:47:10 -0000	1.3
+++ lib/libarchive/patches/archive_platform.h.patch	25 Mar 2007 21:58:27 -0000
@@ -1,13 +1,12 @@
-$DragonFly: src/lib/libarchive/patches/archive_platform.h.patch,v 1.3 2006/09/18 01:47:10 pavalos Exp $
-
---- archive_platform.h.orig	2006-09-16 21:14:36.000000000 -0700
-+++ archive_platform.h	2006-09-16 21:15:02.000000000 -0700
+$DragonFly$
+--- archive_platform.h.orig	2007-03-25 17:03:13.000000000 -0400
++++ archive_platform.h	2007-03-25 17:03:35.000000000 -0400
 @@ -38,7 +38,7 @@
- #define	ARCHIVE_PLATFORM_H_INCLUDED
  
- #if HAVE_CONFIG_H
+ #if defined(HAVE_CONFIG_H)
+ /* Most POSIX platforms use the 'configure' script to build config.h */
 -#include "../config.h"
 +#include "config.h"
- #else
- 
- /* A default configuration for FreeBSD, used if there is no config.h. */
+ #elif defined(__FreeBSD__)
+ /* Building as part of FreeBSD system requires a pre-built config.h. */
+ #include "config_freebsd.h"
Index: lib/libarchive/patches/archive_read_support_compression_none.c.patch
===================================================================
RCS file: lib/libarchive/patches/archive_read_support_compression_none.c.patch
diff -N lib/libarchive/patches/archive_read_support_compression_none.c.patch
--- lib/libarchive/patches/archive_read_support_compression_none.c.patch	8 Nov 2006 16:27:42 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
-$DragonFly: src/lib/libarchive/patches/archive_read_support_compression_none.c.patch,v 1.1 2006/11/08 16:27:42 pavalos Exp $
-
---- archive_read_support_compression_none.c.orig	2006-09-17 18:05:12.000000000 -0700
-+++ archive_read_support_compression_none.c	2006-11-08 09:19:43.000000000 -0700
-@@ -257,7 +257,9 @@
- }
- 
- /*
-- * 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 @@
- 	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 @@
- 		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 @@
- 		    &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);
Index: usr.bin/tar/Makefile
===================================================================
RCS file: /home/dcvs/src/usr.bin/tar/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- usr.bin/tar/Makefile	4 Feb 2007 03:48:07 -0000	1.6
+++ usr.bin/tar/Makefile	25 Mar 2007 20:25:29 -0000
@@ -8,11 +8,9 @@
 NOSHARED?=	yes
 
 PATCHES!=	echo ${.CURDIR}/patches/*.patch
-CONTRIBDIR=	${.CURDIR}/../../contrib/libarchive-1.3.1/tar
+CONTRIBDIR=	${.CURDIR}/../../contrib/libarchive-2.0/tar
 .PATH: ${CONTRIBDIR}
 SRCS+=	${PATCHES}
-NAME=		bsdtar
-VERSION=	1.3.1
 CFLAGS+=	-I${.OBJDIR} -I${.CURDIR}/../../lib/libarchive -I${CONTRIBDIR} -I-
 CFLAGS+=	-DHAVE_CONFIG_H
 
