23300035 problem in LIBRARY/LIBARCHIVE s11u3-sru
authorRich Burridge <rich.burridge@oracle.com>
Mon, 06 Jun 2016 06:15:48 -0700
branchs11u3-sru
changeset 6164 66436ccdbe51
parent 6146 a087085992c3
child 6166 50758e8956e6
23300035 problem in LIBRARY/LIBARCHIVE
components/libarchive/Makefile
components/libarchive/libarchive.p5m
components/libarchive/patches/CVE-2016-1541.patch
components/libarchive/patches/archive_string.c.patch
components/libarchive/patches/archive_write_set_format_ar.c.patch
components/libarchive/patches/archive_write_set_format_pax.c.patch
components/libarchive/patches/archive_write_set_format_zip.c.patch
components/libarchive/patches/b64_encode.patch
components/libarchive/patches/libarchive-archive_entry.3.patch
components/libarchive/patches/libarchive-archive_entry_acl.3.patch
components/libarchive/patches/libarchive-archive_entry_linkify.3.patch
components/libarchive/patches/libarchive-archive_entry_paths.3.patch
components/libarchive/patches/libarchive-archive_entry_perms.3.patch
components/libarchive/patches/libarchive-archive_entry_stat.3.patch
components/libarchive/patches/libarchive-archive_entry_time.3.patch
components/libarchive/patches/libarchive-archive_read.3.patch
components/libarchive/patches/libarchive-archive_read_disk.3.patch
components/libarchive/patches/libarchive-archive_read_set_options.3.patch
components/libarchive/patches/libarchive-archive_util.3.patch
components/libarchive/patches/libarchive-archive_write.3.patch
components/libarchive/patches/libarchive-archive_write_disk.3.patch
components/libarchive/patches/libarchive-archive_write_set_options.3.patch
components/libarchive/patches/libarchive-libarchive-formats.5.patch
components/libarchive/patches/libarchive-libarchive.3.patch
--- a/components/libarchive/Makefile	Fri Jun 03 13:49:50 2016 -0700
+++ b/components/libarchive/Makefile	Mon Jun 06 06:15:48 2016 -0700
@@ -18,22 +18,22 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		libarchive
-COMPONENT_VERSION=	3.0.4
+COMPONENT_VERSION=	3.1.2
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
-COMPONENT_PROJECT_URL=	http://github.com/
+COMPONENT_PROJECT_URL=	http://www.libarchive.org/
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:76e8d7c7b100ec4071e48c1b7d3f3ea1d22b39db3e45b7189f75b5ff4df90fac
+    sha256:eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e
 COMPONENT_ARCHIVE_URL=	\
-    $(COMPONENT_PROJECT_URL)downloads/libarchive/libarchive/$(COMPONENT_ARCHIVE)
+    $(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	library/libarchive
 
-TPNO=			11624
+TPNO=			24584
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/configure.mk
@@ -42,10 +42,15 @@
 # Userland default includes -mt which links with libthread which we don't need.
 studio_MT =
 
-# Nettle is coming.  Disable building with it until it actually arrives, at
-# which point we can verify it works, then remove the following (and add a
-# REQUIRED_PACKAGES entry below).
-CONFIGURE_OPTIONS +=	--without-nettle
+CONFIGURE_OPTIONS += --disable-static
+CONFIGURE_OPTIONS += --enable-shared
+CONFIGURE_OPTIONS += --enable-largefile
+# We prefer openssl over nettle.
+CONFIGURE_OPTIONS += --without-nettle
+CONFIGURE_OPTIONS += --with-openssl
+CONFIGURE_OPTIONS += --with-pic
+CONFIGURE_OPTIONS += --with-xml2
+CONFIGURE_OPTIONS += --with-zlib
 
 # libarchive's Makefile hard-codes some gcc-only flags in COMMON_CFLAGS, then
 # appends CFLAGS to that.  Reset the former here so we can build with Studio.
@@ -55,11 +60,19 @@
 COMPONENT_TEST_ARGS +=	CFLAGS="$(CFLAGS)"
 
 # We need GNU awk for the following to work; hence the PATH tweak.
+# We then convert BSD-style section numbers in the libarchive man pages to
+# Solaris-style section numbers.
 COMPONENT_PREP_ACTION = \
-    (cd $(@D)/doc/man ; rm *.[135] ; env PATH=/usr/gnu/bin:$$PATH gmake all)
+	cd $(@D)/doc/man ; rm *.[135] ; env PATH=$(GNUBIN):$$PATH gmake all ; \
+	cd $(@D)/libarchive ; \
+	find . -name "*\.[35]" | xargs $(GSED) -i 's/\(Xr.*\|Dt.*\)3/\13ARCHIVE/' ; \
+	find . -name "*\.[35]" | xargs $(GSED) -i \
+	-e 's/Xr \(malloc\|getpwuid\|getgrgud\|strerror\|printf\|getpwnam\|getgrnam\) 3ARCHIVE/Xr \13C/' \
+	-e 's/\(Dt.*LIBARCHIVE.*\)3ARCHIVE/\13LIB/' \
+	-e 's/Xr \(libarchive\|archive\) 3ARCHIVE/Xr libarchive 3LIB/';
+
 PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc/man
 
-# common targets
 build:		$(BUILD_32_and_64)
 
 install:	$(INSTALL_32_and_64)
--- a/components/libarchive/libarchive.p5m	Fri Jun 03 13:49:50 2016 -0700
+++ b/components/libarchive/libarchive.p5m	Mon Jun 06 06:15:48 2016 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability Uncommitted>
@@ -43,13 +43,19 @@
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 file path=usr/include/archive.h
 file path=usr/include/archive_entry.h
-link path=usr/lib/$(MACH64)/libarchive.so target=libarchive.so.12.0.4
-link path=usr/lib/$(MACH64)/libarchive.so.12 target=libarchive.so.12.0.4
-file path=usr/lib/$(MACH64)/libarchive.so.12.0.4
+link path=usr/lib/$(MACH64)/libarchive.so \
+    target=libarchive.so.1$(COMPONENT_VERSION)
+file path=usr/lib/$(MACH64)/libarchive.so.1$(COMPONENT_VERSION)
+# Symlink for the old SONAME libarchive.so.12 to the new libarchive.so.13.
+# This is to aid consumers of the old library. Upstream has confirmed that
+# the new library is both API and ABI backwards compatible.
+link path=usr/lib/$(MACH64)/libarchive.so.12 target=libarchive.so.13
+link path=usr/lib/$(MACH64)/libarchive.so.13 \
+    target=libarchive.so.1$(COMPONENT_VERSION)
 file path=usr/lib/$(MACH64)/pkgconfig/libarchive.pc
-link path=usr/lib/libarchive.so target=libarchive.so.12
-link path=usr/lib/libarchive.so.12 target=libarchive.so.12.0.4
-file path=usr/lib/libarchive.so.12.0.4
+link path=usr/lib/libarchive.so target=libarchive.so.1$(COMPONENT_VERSION)
+file path=usr/lib/libarchive.so.1$(COMPONENT_VERSION)
+link path=usr/lib/libarchive.so.13 target=libarchive.so.1$(COMPONENT_VERSION)
 file path=usr/lib/pkgconfig/libarchive.pc
 file path=usr/share/man/man3archive/archive_entry.3archive
 file path=usr/share/man/man3archive/archive_entry_acl.3archive
@@ -59,12 +65,32 @@
 file path=usr/share/man/man3archive/archive_entry_stat.3archive
 file path=usr/share/man/man3archive/archive_entry_time.3archive
 file path=usr/share/man/man3archive/archive_read.3archive
+file path=usr/share/man/man3archive/archive_read_data.3archive
 file path=usr/share/man/man3archive/archive_read_disk.3archive
+file path=usr/share/man/man3archive/archive_read_extract.3archive
+file path=usr/share/man/man3archive/archive_read_filter.3archive
+file path=usr/share/man/man3archive/archive_read_format.3archive
+file path=usr/share/man/man3archive/archive_read_free.3archive
+file path=usr/share/man/man3archive/archive_read_header.3archive
+file path=usr/share/man/man3archive/archive_read_new.3archive
+file path=usr/share/man/man3archive/archive_read_open.3archive
 file path=usr/share/man/man3archive/archive_read_set_options.3archive
 file path=usr/share/man/man3archive/archive_util.3archive
 file path=usr/share/man/man3archive/archive_write.3archive
+file path=usr/share/man/man3archive/archive_write_blocksize.3archive
+file path=usr/share/man/man3archive/archive_write_data.3archive
 file path=usr/share/man/man3archive/archive_write_disk.3archive
+file path=usr/share/man/man3archive/archive_write_filter.3archive
+file path=usr/share/man/man3archive/archive_write_finish_entry.3archive
+file path=usr/share/man/man3archive/archive_write_format.3archive
+file path=usr/share/man/man3archive/archive_write_free.3archive
+file path=usr/share/man/man3archive/archive_write_header.3archive
+file path=usr/share/man/man3archive/archive_write_new.3archive
+file path=usr/share/man/man3archive/archive_write_open.3archive
 file path=usr/share/man/man3archive/archive_write_set_options.3archive
 file path=usr/share/man/man3lib/libarchive.3lib
-file libarchive-formats.5 path=usr/share/man/man4/libarchive-formats.4
+file path=usr/share/man/man3lib/libarchive_changes.3lib
+file path=usr/share/man/man3lib/libarchive_internals.3lib
+file path=usr/share/man/man5/libarchive-formats.5
+file path=usr/share/man/man5/mtree.5
 license libarchive.license license=BSD-like
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libarchive/patches/CVE-2016-1541.patch	Mon Jun 06 06:15:48 2016 -0700
@@ -0,0 +1,49 @@
+Fix for CVE-2016-1541.
+
+More information at:
+
+  https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1541
+
+Patch based on committed changes at:
+
+  https://github.com/libarchive/libarchive/commit/d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
+
+and adjusted to work with the version of libarchive we currently have.
+
+--- libarchive-3.1.2/libarchive/archive_read_support_format_zip.c.orig	2016-05-25 07:28:45.920088332 -0700
++++ libarchive-3.1.2/libarchive/archive_read_support_format_zip.c	2016-05-25 07:32:19.394552995 -0700
+@@ -560,6 +560,11 @@
+ 
+ 	switch(rsrc->compression) {
+ 	case 0:  /* No compression. */
++		if (rsrc->uncompressed_size != rsrc->compressed_size) {
++			archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
++			    "Malformed OS X metadata entry: inconsistent size");
++			return (ARCHIVE_FATAL);
++		}
+ #ifdef HAVE_ZLIB_H
+ 	case 8: /* Deflate compression. */
+ #endif
+@@ -581,6 +586,13 @@
+ 		return (ARCHIVE_WARN);
+ 	}
+ 
++	if (rsrc->compressed_size > (4 * 1024 * 1024)) {
++		archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
++		    "Mac metadata is too large: %jd > 4M bytes",
++		    (intmax_t)rsrc->compressed_size);
++		return (ARCHIVE_WARN);
++	}
++
+ 	metadata = malloc((size_t)rsrc->uncompressed_size);
+ 	if (metadata == NULL) {
+ 		archive_set_error(&a->archive, ENOMEM,
+@@ -619,6 +631,8 @@
+ 			bytes_avail = remaining_bytes;
+ 		switch(rsrc->compression) {
+ 		case 0:  /* No compression. */
++			if ((size_t)bytes_avail > metadata_bytes)
++				bytes_avail = metadata_bytes;
+ 			memcpy(mp, p, bytes_avail);
+ 			bytes_used = (size_t)bytes_avail;
+ 			metadata_bytes -= bytes_used;
--- a/components/libarchive/patches/archive_string.c.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-This patch was fed back to the upstream community:
-http://code.google.com/p/libarchive/issues/detail?id=288
-Given the response "This issue has been already fixed in master branch."
-it should no longer be needed with the next release.
-
---- libarchive/libarchive/archive_string.c.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_string.c	Tue Nov 27 18:10:35 2012
-@@ -1120,8 +1120,8 @@
- 	}
- 	sc->to_charset = strdup(tc);
- 	if (sc->to_charset == NULL) {
--		free(sc);
- 		free(sc->from_charset);
-+		free(sc);
- 		return (NULL);
- 	}
- 	archive_string_init(&sc->utftmp);
--- a/components/libarchive/patches/archive_write_set_format_ar.c.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-This patch was fed back to the upstream community:
-http://code.google.com/p/libarchive/issues/detail?id=287
-Given the response "I just committed your patch.", it should
-no longer be needed with the next release.
-
---- libarchive/libarchive/archive_write_set_format_ar.c.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_write_set_format_ar.c	Tue Nov 27 17:48:04 2012
-@@ -165,7 +165,7 @@
- 	 * Reject files with empty name.
- 	 */
- 	pathname = archive_entry_pathname(entry);
--	if (*pathname == '\0') {
-+	if (pathname == NULL || *pathname == '\0') {
- 		archive_set_error(&a->archive, EINVAL,
- 		    "Invalid filename");
- 		return (ARCHIVE_WARN);
--- a/components/libarchive/patches/archive_write_set_format_pax.c.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-A less complete version of this patch was fed back to the upstream community:
-http://code.google.com/p/libarchive/issues/detail?id=285
-This more complete patch was committed instead.  It should no longer be
-needed with the next release.
-
---- libarchive/libarchive/archive_write_set_format_pax.c.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_write_set_format_pax.c	Sun Dec  2 04:03:38 2012
-@@ -647,8 +647,10 @@ archive_write_pax_header(struct archive_write *a,
-		oname = archive_entry_pathname(entry_original);
-		name_length = strlen(oname);
-		name = malloc(name_length + 3);
--		if (name == NULL) {
-+		if (name == NULL || extra == NULL) {
-			/* XXX error message */
-+			archive_entry_free(extra);
-+			free(name);
-			return (ARCHIVE_FAILED);
-		}
-		strcpy(name, oname);
-@@ -687,6 +689,7 @@ archive_write_pax_header(struct archive_write *a,
-
-		/* Recurse to write the special copyfile entry. */
-		r = archive_write_pax_header(a, extra);
-+		archive_entry_free(extra);
-		if (r < ARCHIVE_WARN)
-			return (r);
-		if (r < ret)
--- a/components/libarchive/patches/archive_write_set_format_zip.c.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-This patch was fed back to the upstream community:
-http://code.google.com/p/libarchive/issues/detail?id=286
-Given the response "I applied your patch to zip writer."
-it should no longer be needed with the next release.
-
---- libarchive/libarchive/archive_write_set_format_zip.c.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_write_set_format_zip.c	Tue Nov 27 17:31:42 2012
-@@ -842,6 +842,8 @@
- 	type = archive_entry_filetype(entry);
- 	path = archive_entry_pathname(entry);
- 
-+	if (path == NULL)
-+		return (0);
- 	if ((type == AE_IFDIR) & (path[strlen(path) - 1] != '/')) {
- 		return strlen(path) + 1;
- 	} else {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libarchive/patches/b64_encode.patch	Mon Jun 06 06:15:48 2016 -0700
@@ -0,0 +1,47 @@
+solaris now provides its own b64_encode which
+conflicts with our private one.
+
+--- libarchive-3.1.2/libarchive/archive_write_add_filter_b64encode.c.orig	Sun Jan 24 10:08:09 2016
++++ libarchive-3.1.2/libarchive/archive_write_add_filter_b64encode.c	Sun Jan 24 10:08:54 2016
+@@ -60,7 +60,7 @@
+     const void *, size_t);
+ static int archive_filter_b64encode_close(struct archive_write_filter *);
+ static int archive_filter_b64encode_free(struct archive_write_filter *);
+-static void b64_encode(struct archive_string *, const unsigned char *, size_t);
++static void archive_private_b64_encode(struct archive_string *, const unsigned char *, size_t);
+ static int64_t atol8(const char *, size_t);
+ 
+ static const char base64[] = {
+@@ -180,7 +180,7 @@
+ }
+ 
+ static void
+-b64_encode(struct archive_string *as, const unsigned char *p, size_t len)
++archive_private_b64_encode(struct archive_string *as, const unsigned char *p, size_t len)
+ {
+ 	int c;
+ 
+@@ -234,12 +234,12 @@
+ 		}
+ 		if (state->hold_len < LBYTES)
+ 			return (ret);
+-		b64_encode(&state->encoded_buff, state->hold, LBYTES);
++		archive_private_b64_encode(&state->encoded_buff, state->hold, LBYTES);
+ 		state->hold_len = 0;
+ 	}
+ 
+ 	for (; length >= LBYTES; length -= LBYTES, p += LBYTES)
+-		b64_encode(&state->encoded_buff, p, LBYTES);
++		archive_private_b64_encode(&state->encoded_buff, p, LBYTES);
+ 
+ 	/* Save remaining bytes. */
+ 	if (length > 0) {
+@@ -270,7 +270,7 @@
+ 
+ 	/* Flush remaining bytes. */
+ 	if (state->hold_len != 0)
+-		b64_encode(&state->encoded_buff, state->hold, state->hold_len);
++		archive_private_b64_encode(&state->encoded_buff, state->hold, state->hold_len);
+ 	archive_string_sprintf(&state->encoded_buff, "====\n");
+ 	/* Write the last block */
+ 	archive_write_set_bytes_in_last_block(f->archive, 1);
--- a/components/libarchive/patches/libarchive-archive_entry.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_entry.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_entry.3	Fri Nov  9 12:39:50 2012
-@@ -26,7 +26,7 @@
- .\" $FreeBSD$
- .\"
- .Dd Feburary 2, 2012
--.Dt ARCHIVE_ENTRY 3
-+.Dt ARCHIVE_ENTRY 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_entry_clear ,
-@@ -57,7 +57,7 @@
- .Tn struct stat
- plus associated pathname, textual group and user names, etc.
- These objects are used by
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- to represent the metadata associated with a particular
- entry in an archive.
- .Ss Create and Destroy
-@@ -84,17 +84,17 @@
- .Ss Function groups
- Due to high number of functions, the accessor functions can be found in
- man pages grouped by the purpose.
--.Bl -tag -width ".Xr archive_entry_perms 3"
--.It Xr archive_entry_acl 3
-+.Bl -tag -width ".Xr archive_entry_perms 3ARCHIVE"
-+.It Xr archive_entry_acl 3ARCHIVE
- Access Control List manipulation
--.It Xr archive_entry_paths 3
-+.It Xr archive_entry_paths 3ARCHIVE
- Path name manipulation
--.It Xr archive_entry_perms 3
-+.It Xr archive_entry_perms 3ARCHIVE
- User, group and mode manipulation
--.It Xr archive_entry_stat 3
-+.It Xr archive_entry_stat 3ARCHIVE
- Functions not in the other groups and copying to/from
- .Vt struct stat .
--.It Xr archive_entry_time 3
-+.It Xr archive_entry_time 3ARCHIVE
- Time field manipulation
- .El
- .Pp
-@@ -131,11 +131,11 @@
- .\" .Sh RETURN VALUES
- .\" .Sh ERRORS
- .Sh SEE ALSO
--.Xr archive 3 ,
--.Xr archive_entry_acl 3 ,
--.Xr archive_entry_paths 3 ,
--.Xr archive_entry_perms 3 ,
--.Xr archive_entry_time 3
-+.Xr libarchive 3LIB ,
-+.Xr archive_entry_acl 3ARCHIVE ,
-+.Xr archive_entry_paths 3ARCHIVE ,
-+.Xr archive_entry_perms 3ARCHIVE ,
-+.Xr archive_entry_time 3ARCHIVE
- .Sh HISTORY
- The
- .Nm libarchive
--- a/components/libarchive/patches/libarchive-archive_entry_acl.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_entry_acl.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_entry_acl.3	Fri Nov  9 12:39:06 2012
-@@ -23,7 +23,7 @@
- .\" SUCH DAMAGE.
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_ENTRY_ACL 3
-+.Dt ARCHIVE_ENTRY_ACL 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_entry_acl_add_entry ,
-@@ -173,7 +173,7 @@
- .Fn archive_entry_acl_next_w .
- The function returns either 0, if no non-extended ACLs are found.
- In this case, the access permissions should be obtained by
--.Xr archive_entry_mode 3
-+.Xr archive_entry_mode 3ARCHIVE
- or set using
- .Xr chmod 2 .
- Otherwise, the function returns the same value as
-@@ -226,8 +226,8 @@
- or
- .Fn archive_entry_acl_text_w .
- .Sh SEE ALSO
--.Xr archive 3 ,
--.Xr archive_entry 3
-+.Xr libarchive 3LIB ,
-+.Xr archive_entry 3ARCHIVE
- .Sh BUGS
- .Dv ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID
- and
--- a/components/libarchive/patches/libarchive-archive_entry_linkify.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_entry_linkify.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_entry_linkify.3	Fri Nov  9 12:38:22 2012
-@@ -23,7 +23,7 @@
- .\" SUCH DAMAGE.
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_ENTRY_LINKIFY 3
-+.Dt ARCHIVE_ENTRY_LINKIFY 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_entry_linkresolver ,
-@@ -91,7 +91,7 @@
- .Fn archive_entry_linkresolver_set_strategy
- function selects the optimal hardlink strategy for the given format.
- The format code can be obtained from
--.Xr archive_format 3 .
-+.Xr archive_format 3ARCHIVE .
- The function can be called more than once, but it is recommended to
- flush all deferred entries first.
- .Pp
-@@ -218,7 +218,7 @@
- returns
- .Dv NULL
- on
--.Xr malloc 3
-+.Xr malloc 3C
- failures.
- .Sh SEE ALSO
--.Xr archive_entry 3
-+.Xr archive_entry 3ARCHIVE
--- a/components/libarchive/patches/libarchive-archive_entry_paths.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_entry_paths.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_entry_paths.3	Fri Nov  9 12:37:42 2012
-@@ -23,7 +23,7 @@
- .\" SUCH DAMAGE.
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_ENTRY_PATHS 3
-+.Dt ARCHIVE_ENTRY_PATHS 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_entry_hardlink ,
-@@ -105,7 +105,7 @@
- .Fn archive_entry_update_symlink_utf8 "struct archive_entry *a" "const char *path"
- .Sh DESCRIPTION
- Path names supported by
--.Xr archive_entry 3 :
-+.Xr archive_entry 3ARCHIVE :
- .Bl -tag -width "sourcepath" -compact
- .It hardlink
- Destination of the hardlink.
-@@ -118,7 +118,7 @@
- Path in the archive
- .It sourcepath
- Path on the disk for use by
--.Xr archive_read_disk 3 .
-+.Xr archive_read_disk 3ARCHIVE .
- .It symlink
- Destination of the symbolic link.
- .El
-@@ -149,5 +149,5 @@
- is an alias for 
- .Fn archive_entry_copy_XXX .
- .Sh SEE ALSO
--.Xr archive 3 ,
--.Xr archive_entry 3
-+.Xr libarchive 3LIB ,
-+.Xr archive_entry 3ARCHIVE
--- a/components/libarchive/patches/libarchive-archive_entry_perms.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ b/components/libarchive/patches/libarchive-archive_entry_perms.3.patch	Mon Jun 06 06:15:48 2016 -0700
@@ -1,18 +1,9 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
+This patch is needed to remove references to functions that don't exist on 
+Solaris. It has not been fed back to the upstream community. It may need to be 
+tweaked slightly for future releases.  
 
 --- libarchive/libarchive/archive_entry_perms.3.orig	Mon Mar 26 19:49:00 2012
 +++ libarchive/libarchive/archive_entry_perms.3	Fri Nov  9 12:37:14 2012
-@@ -24,7 +24,7 @@
- .\" SUCH DAMAGE.
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_ENTRY_PERMS 3
-+.Dt ARCHIVE_ENTRY_PERMS 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_entry_gid ,
 @@ -170,9 +170,6 @@
  In unusual circumstances, you can force a fully-specified set
  of file flags by setting the bitmap of flags to clear to the complement
@@ -23,7 +14,7 @@
  Converting a bitmap to a textual string is a platform-specific
  operation; bits that are not meaningful on the current platform
  will be ignored.
-@@ -190,15 +187,12 @@
+@@ -190,7 +187,4 @@
  Note that every name \(em including names that follow an unrecognized
  name \(em will be evaluated, and the bitmaps will be set to reflect
  every name that is recognized.
@@ -31,16 +22,3 @@
 -.Xr strtofflags 3 ,
 -which stops parsing at the first unrecognized name.)
  .Sh SEE ALSO
--.Xr archive 3 ,
--.Xr archive_entry 3 ,
--.Xr archive_entry_acl 3 ,
--.Xr archive_read_disk 3 ,
--.Xr archive_write_disk 3
-+.Xr libarchive 3LIB ,
-+.Xr archive_entry 3ARCHIVE ,
-+.Xr archive_entry_acl 3ARCHIVE ,
-+.Xr archive_read_disk 3ARCHIVE ,
-+.Xr archive_write_disk 3ARCHIVE
- .Sh BUGS
- The platform types
- .Vt uid_t
--- a/components/libarchive/patches/libarchive-archive_entry_stat.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_entry_stat.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_entry_stat.3	Fri Nov  9 12:41:56 2012
-@@ -23,7 +23,7 @@
- .\" SUCH DAMAGE.
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_ENTRY_STAT 3
-+.Dt ARCHIVE_ENTRY_STAT 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_entry_stat ,
-@@ -224,7 +224,7 @@
- and
- .Fn archive_entry_ino64
- are used by
--.Xr archive_entry_linkify 3
-+.Xr archive_entry_linkify 3ARCHIVE
- to find hardlinks.
- The pair of device and inode is suppossed to identify hardlinked files.
- .Pp
-@@ -267,8 +267,8 @@
- Some archive formats use the combined form, while other formats use
- the split form.
- .Sh SEE ALSO
--.Xr archive 3 ,
--.Xr archive_entry_acl 3 ,
--.Xr archive_entry_perms 3 ,
--.Xr archive_entry_time 3 ,
-+.Xr libarchive 3LIB ,
-+.Xr archive_entry_acl 3ARCHIVE ,
-+.Xr archive_entry_perms 3ARCHIVE ,
-+.Xr archive_entry_time 3ARCHIVE ,
- .Xr stat 2
--- a/components/libarchive/patches/libarchive-archive_entry_time.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_entry_time.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_entry_time.3	Fri Nov  9 12:36:07 2012
-@@ -26,7 +26,7 @@
- .\" $FreeBSD$
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_ENTRY_TIME 3
-+.Dt ARCHIVE_ENTRY_TIME 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_entry_atime ,
-@@ -100,7 +100,7 @@
- Supported time fields are atime (access time), birthtime (creation time),
- ctime (last time an inode property was changed) and mtime (modification time).
- .Pp
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- provides a high-resolution interface.
- The timestamps are truncated automatically depending on the archive format
- (for archiving) or the filesystem capabilities (for restoring).
-@@ -113,8 +113,8 @@
- .Fn XXX_is_set .
- Unset time fields have a second and nanosecond field of 0.
- .Sh SEE ALSO
--.Xr archive 3 ,
--.Xr archive_entry 3
-+.Xr libarchive 3LIB ,
-+.Xr archive_entry 3ARCHIVE
- .Sh HISTORY
- The
- .Nm libarchive
--- a/components/libarchive/patches/libarchive-archive_read.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_read.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_read.3	Fri Nov  9 12:42:17 2012
-@@ -25,7 +25,7 @@
- .\" $FreeBSD$
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_READ 3
-+.Dt ARCHIVE_READ 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_read
-@@ -44,7 +44,7 @@
- .\"
- .Ss Create archive object
- See
--.Xr archive_read_new 3 .
-+.Xr archive_read_new 3ARCHIVE .
- .Pp
- To read an archive, you must first obtain an initialized
- .Tn struct archive
-@@ -53,9 +53,9 @@
- .\"
- .Ss Enable filters and formats
- See
--.Xr archive_read_filter 3
-+.Xr archive_read_filter 3ARCHIVE
- and
--.Xr archive_read_format 3 .
-+.Xr archive_read_format 3ARCHIVE .
- .Pp
- You can then modify this object for the desired operations with the
- various
-@@ -80,11 +80,11 @@
- .\"
- .Ss Set options
- See
--.Xr archive_read_set_options 3 .
-+.Xr archive_read_set_options 3ARCHIVE .
- .\"
- .Ss Open archive
- See
--.Xr archive_read_open 3 .
-+.Xr archive_read_open 3ARCHIVE .
- .Pp
- Once you have prepared the
- .Tn struct archive
-@@ -105,10 +105,10 @@
- .\"
- .Ss Consume archive
- See
--.Xr archive_read_header 3 ,
--.Xr archive_read_data 3
-+.Xr archive_read_header 3ARCHIVE ,
-+.Xr archive_read_data 3ARCHIVE
- and
--.Xr archive_read_extract 3 .
-+.Xr archive_read_extract 3ARCHIVE .
- .Pp
- Each archive entry consists of a header followed by a certain
- amount of data.
-@@ -146,7 +146,7 @@
- .\"
- .Ss Release resources
- See
--.Xr archive_read_free 3 .
-+.Xr archive_read_free 3ARCHIVE .
- .Pp
- Once you have finished reading data from the archive, you
- should call
-@@ -217,17 +217,16 @@
- .\" .Sh ERRORS
- .Sh SEE ALSO
- .Xr tar 1 ,
--.Xr libarchive 3 ,
--.Xr archive_read_new 3 ,
--.Xr archive_read_data 3 ,
--.Xr archive_read_extract 3 ,
--.Xr archive_read_filter 3 ,
--.Xr archive_read_format 3 ,
--.Xr archive_read_header 3 ,
--.Xr archive_read_open 3 ,
--.Xr archive_read_set_options 3 ,
--.Xr archive_util 3 ,
--.Xr tar 5
-+.Xr libarchive 3LIB ,
-+.Xr archive_read_new 3ARCHIVE ,
-+.Xr archive_read_data 3ARCHIVE ,
-+.Xr archive_read_extract 3ARCHIVE ,
-+.Xr archive_read_filter 3ARCHIVE ,
-+.Xr archive_read_format 3ARCHIVE ,
-+.Xr archive_read_header 3ARCHIVE ,
-+.Xr archive_read_open 3ARCHIVE ,
-+.Xr archive_read_set_options 3ARCHIVE ,
-+.Xr archive_util 3ARCHIVE
- .Sh HISTORY
- The
- .Nm libarchive
--- a/components/libarchive/patches/libarchive-archive_read_disk.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_read_disk.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_read_disk.3	Fri Nov  9 12:35:02 2012
-@@ -25,7 +25,7 @@
- .\" $FreeBSD$
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_READ_DISK 3
-+.Dt ARCHIVE_READ_DISK 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_read_disk_new ,
-@@ -138,16 +138,16 @@
- This convenience function installs a standard set of user
- and group name lookup functions.
- These functions use
--.Xr getpwuid 3
-+.Xr getpwuid 3C
- and
--.Xr getgrgid 3
-+.Xr getgrgid 3C
- to convert ids to names, defaulting to NULL if the names cannot
- be looked up.
- These functions also implement a simple memory cache to reduce
- the number of calls to
--.Xr getpwuid 3
-+.Xr getpwuid 3C
- and
--.Xr getgrgid 3 .
-+.Xr getgrgid 3C .
- .It Fn archive_read_disk_entry_from_file
- Populates a
- .Tn struct archive_entry
-@@ -155,7 +155,7 @@
- The
- .Tn archive_entry
- object must have already been created with
--.Xr archive_entry_new 3
-+.Xr archive_entry_new 3ARCHIVE
- and at least one of the source path or path fields must already be set.
- (If both are set, the source path will be used.)
- .Pp
-@@ -196,7 +196,7 @@
- More information about the
- .Va struct archive
- object and the overall design of the library can be found in the
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- overview.
- .Sh EXAMPLE
- The following illustrates basic usage of the library by
-@@ -263,12 +263,12 @@
- functions.
- .\"
- .Sh SEE ALSO
--.Xr archive_read 3 ,
--.Xr archive_util 3 ,
--.Xr archive_write 3 ,
--.Xr archive_write_disk 3 ,
-+.Xr archive_read 3ARCHIVE ,
-+.Xr archive_util 3ARCHIVE ,
-+.Xr archive_write 3ARCHIVE ,
-+.Xr archive_write_disk 3ARCHIVE ,
- .Xr tar 1 ,
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- .Sh HISTORY
- The
- .Nm libarchive
-@@ -290,9 +290,9 @@
- The
- .Dq standard
- user name and group name lookup functions are not the defaults because
--.Xr getgrgid 3
-+.Xr getgrgid 3C
- and
--.Xr getpwuid 3
-+.Xr getpwuid 3C
- are sometimes too large for particular applications.
- The current design allows the application author to use a more
- compact implementation when appropriate.
-@@ -310,7 +310,7 @@
- .Pp
- This API should provide a set of methods for walking a directory tree.
- That would make it a direct parallel of the
--.Xr archive_read 3
-+.Xr archive_read 3ARCHIVE
- API.
- When such methods are implemented, the
- .Dq hybrid
--- a/components/libarchive/patches/libarchive-archive_read_set_options.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_read_set_options.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_read_set_options.3	Fri Nov  9 12:28:47 2012
-@@ -25,7 +25,7 @@
- .\" $FreeBSD$
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_READ_OPTIONS 3
-+.Dt ARCHIVE_READ_OPTIONS 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_read_set_filter_option ,
-@@ -204,6 +204,6 @@
- .\"
- .Sh SEE ALSO
- .Xr tar 1 ,
--.Xr libarchive 3 ,
--.Xr archive_write_set_options 3 ,
--.Xr archive_read 3
-+.Xr libarchive 3LIB ,
-+.Xr archive_write_set_options 3ARCHIVE ,
-+.Xr archive_read 3ARCHIVE
--- a/components/libarchive/patches/libarchive-archive_util.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_util.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_util.3	Fri Nov  9 12:34:22 2012
-@@ -25,7 +25,7 @@
- .\" $FreeBSD$
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_UTIL 3
-+.Dt ARCHIVE_UTIL 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_clear_error ,
-@@ -84,7 +84,7 @@
- These functions provide access to various information about the
- .Tn struct archive
- object used in the
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- library.
- .Bl -tag -compact -width indent
- .It Fn archive_clear_error
-@@ -112,13 +112,13 @@
- obtained from passing the result of
- .Fn archive_errno
- to
--.Xr strerror 3 .
-+.Xr strerror 3C .
- .It Fn archive_file_count
- Returns a count of the number of files processed by this archive object.
- The count is incremented by calls to
--.Xr archive_write_header 3
-+.Xr archive_write_header 3ARCHIVE
- or
--.Xr archive_read_next_header 3 .
-+.Xr archive_read_next_header 3ARCHIVE .
- .It Fn archive_filter_code
- Returns a numeric code identifying the indicated filter.
- See
-@@ -207,10 +207,10 @@
- not uniformly supported and should not be used.
- .El
- .Sh SEE ALSO
--.Xr archive_read 3 ,
--.Xr archive_write 3 ,
--.Xr libarchive 3 ,
--.Xr printf 3
-+.Xr archive_read 3ARCHIVE ,
-+.Xr archive_write 3ARCHIVE ,
-+.Xr libarchive 3LIB ,
-+.Xr printf 3C
- .Sh HISTORY
- The
- .Nm libarchive
--- a/components/libarchive/patches/libarchive-archive_write.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_write.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_write.3	Fri Nov  9 12:24:57 2012
-@@ -25,7 +25,7 @@
- .\" $FreeBSD$
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_WRITE 3
-+.Dt ARCHIVE_WRITE 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_write
-@@ -44,7 +44,7 @@
- .\"
- .Ss Create archive object
- See
--.Xr archive_write_new 3 .
-+.Xr archive_write_new 3ARCHIVE .
- .Pp
- To write an archive, you must first obtain an initialized
- .Tn struct archive
-@@ -53,10 +53,10 @@
- .\"
- .Ss Enable filters and formats, configure block size and padding
- See
--.Xr archive_write_filter 3 ,
--.Xr archive_write_format 3
-+.Xr archive_write_filter 3ARCHIVE ,
-+.Xr archive_write_format 3ARCHIVE
- and
--.Xr archive_write_blocksize 3 .
-+.Xr archive_write_blocksize 3ARCHIVE .
- .Pp
- You can then modify this object for the desired operations with the
- various
-@@ -71,11 +71,11 @@
- .\"
- .Ss Set options
- See
--.Xr archive_read_set_options 3 .
-+.Xr archive_read_set_options 3ARCHIVE .
- .\"
- .Ss Open archive
- See
--.Xr archive_write_open 3 .
-+.Xr archive_write_open 3ARCHIVE .
- .Pp
- Once you have prepared the
- .Tn struct archive
-@@ -92,9 +92,9 @@
- .\"
- .Ss Produce archive
- See
--.Xr archive_write_header 3
-+.Xr archive_write_header 3ARCHIVE
- and
--.Xr archive_write_data 3 .
-+.Xr archive_write_data 3ARCHIVE .
- .Pp
- Individual archive entries are written in a three-step
- process:
-@@ -112,7 +112,7 @@
- .\"
- .Ss Release resources
- See
--.Xr archive_write_free 3 .
-+.Xr archive_write_free 3ARCHIVE .
- .Pp
- After all entries have been written, use the
- .Fn archive_write_free
-@@ -220,11 +220,8 @@
- .Ed
- .Sh SEE ALSO
- .Xr tar 1 ,
--.Xr libarchive 3 ,
--.Xr archive_write_set_options 3 ,
--.Xr cpio 5 ,
--.Xr mtree 5 ,
--.Xr tar 5
-+.Xr libarchive 3LIB ,
-+.Xr archive_write_set_options 3ARCHIVE
- .Sh HISTORY
- The
- .Nm libarchive
--- a/components/libarchive/patches/libarchive-archive_write_disk.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_write_disk.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_write_disk.3	Fri Nov  9 12:33:36 2012
-@@ -25,7 +25,7 @@
- .\" $FreeBSD$
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_WRITE_DISK 3
-+.Dt ARCHIVE_WRITE_DISK 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_write_disk_new ,
-@@ -207,22 +207,22 @@
- This convenience function installs a standard set of user
- and group lookup functions.
- These functions use
--.Xr getpwnam 3
-+.Xr getpwnam 3C
- and
--.Xr getgrnam 3
-+.Xr getgrnam 3C
- to convert names to ids, defaulting to the ids if the names cannot
- be looked up.
- These functions also implement a simple memory cache to reduce
- the number of calls to
--.Xr getpwnam 3
-+.Xr getpwnam 3C
- and
--.Xr getgrnam 3 .
-+.Xr getgrnam 3C .
- .It Fn archive_write_header
- Build and write a header using the data in the provided
- .Tn struct archive_entry
- structure.
- See
--.Xr archive_entry 3
-+.Xr archive_entry 3ARCHIVE
- for information on creating and populating
- .Tn struct archive_entry
- objects.
-@@ -275,10 +275,10 @@
- More information about the
- .Va struct archive
- object and the overall design of the library can be found in the
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- overview.
- Many of these functions are also documented under
--.Xr archive_write 3 .
-+.Xr archive_write 3ARCHIVE .
- .Sh RETURN VALUES
- Most functions return
- .Cm ARCHIVE_OK
-@@ -311,10 +311,10 @@
- functions.
- .\"
- .Sh SEE ALSO
--.Xr archive_read 3 ,
--.Xr archive_write 3 ,
-+.Xr archive_read 3ARCHIVE ,
-+.Xr archive_write 3ARCHIVE ,
- .Xr tar 1 ,
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- .Sh HISTORY
- The
- .Nm libarchive
-@@ -390,9 +390,9 @@
- The
- .Dq standard
- user-id and group-id lookup functions are not the defaults because
--.Xr getgrnam 3
-+.Xr getgrnam 3C
- and
--.Xr getpwnam 3
-+.Xr getpwnam 3C
- are sometimes too large for particular applications.
- The current design allows the application author to use a more
- compact implementation when appropriate.
--- a/components/libarchive/patches/libarchive-archive_write_set_options.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/archive_write_set_options.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/archive_write_set_options.3	Fri Nov  9 12:25:27 2012
-@@ -25,7 +25,7 @@
- .\" $FreeBSD$
- .\"
- .Dd February 2, 2012
--.Dt ARCHIVE_WRITE_OPTIONS 3
-+.Dt ARCHIVE_WRITE_OPTIONS 3ARCHIVE
- .Os
- .Sh NAME
- .Nm archive_write_set_filter_option ,
-@@ -422,9 +422,9 @@
- .\"
- .Sh SEE ALSO
- .Xr tar 1 ,
--.Xr libarchive 3 ,
--.Xr archive_read_set_options 3 ,
--.Xr archive_write 3
-+.Xr libarchive 3LIB ,
-+.Xr archive_read_set_options 3ARCHIVE ,
-+.Xr archive_write 3ARCHIVE
- .Sh HISTORY
- The
- .Nm libarchive
--- a/components/libarchive/patches/libarchive-libarchive-formats.5.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/libarchive-formats.5.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/libarchive-formats.5	Fri Nov  9 12:32:18 2012
-@@ -25,7 +25,7 @@
- .\" $FreeBSD$
- .\"
- .Dd March 18, 2012
--.Dt LIBARCHIVE-FORMATS 5
-+.Dt LIBARCHIVE-FORMATS 4
- .Os
- .Sh NAME
- .Nm libarchive-formats
-@@ -32,7 +32,7 @@
- .Nd archive formats supported by the libarchive library
- .Sh DESCRIPTION
- The
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- library reads and writes a variety of streaming archive formats.
- Generally speaking, all of these archive formats consist of a series of
- .Dq entries .
-@@ -49,7 +49,7 @@
- functions to enable all supported formats.
- .Ss Tar Formats
- The
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- library can read most tar archives.
- It can write POSIX-standard
- .Dq ustar
-@@ -69,7 +69,7 @@
- .Bl -tag -width indent
- .It Cm gnutar
- The
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- library can read most GNU-format tar archives.
- It currently supports the most popular GNU extensions, including
- modern long filename and linkname support, as well as atime and ctime data.
-@@ -79,12 +79,12 @@
- formats.
- .Pp
- The
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- library can write GNU tar format, including long filename
- and linkname support, as well as atime and ctime data.
- .It Cm pax
- The
--.Xr libarchive 3
-+.Xr libarchive 3LIB
- library can read and write POSIX-compliant pax interchange format
- archives.
- Pax interchange format archives are an extension of the older ustar
-@@ -371,9 +371,7 @@
- This can cause problems for programs such as
- GNU ld that do not support the BSD-style long filenames.
- .Ss mtree
--Libarchive can read and write files in
--.Xr mtree 5
--format.
-+Libarchive can read and write files in mtree format.
- This format is not a true archive format, but rather a textual description
- of a file hierarchy in which each line specifies the name of a file and
- provides specific metadata about that file.
-@@ -384,7 +382,7 @@
- .Tn archive_entry
- object.
- When writing, libarchive supports use of the
--.Xr archive_write_set_options 3
-+.Xr archive_write_set_options 3ARCHIVE
- interface to specify which keywords should be included in the
- output.
- If libarchive was compiled with access to suitable
-@@ -425,7 +423,4 @@
- .Xr shar 1 ,
- .Xr tar 1 ,
- .Xr zip 1 ,
--.Xr zlib 3 ,
--.Xr cpio 5 ,
--.Xr mtree 5 ,
--.Xr tar 5
-+.Xr zlib 3
--- a/components/libarchive/patches/libarchive-libarchive.3.patch	Fri Jun 03 13:49:50 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-This patch is needed to convert BSD-style section numbers to Solaris-style
-section numbers.  It has not been fed back to the upstream community.  It
-may need to be tweaked slightly for future releases.
-
---- libarchive/libarchive/libarchive.3.orig	Mon Mar 26 19:49:00 2012
-+++ libarchive/libarchive/libarchive.3	Fri Nov  9 12:43:07 2012
-@@ -25,7 +25,7 @@
- .\" $FreeBSD$
- .\"
- .Dd March 18, 2012
--.Dt LIBARCHIVE 3
-+.Dt LIBARCHIVE 3LIB
- .Os
- .Sh NAME
- .Nm libarchive
-@@ -146,21 +146,21 @@
- .\"
- .Sh READING AN ARCHIVE
- See
--.Xr libarchive_read 3 .
-+.Xr libarchive_read 3ARCHIVE .
- .\"
- .Sh WRITING AN ARCHIVE
- See
--.Xr libarchive_write 3 .
-+.Xr libarchive_write 3ARCHIVE .
- .\"
- .Sh WRITING ENTRIES TO DISK
- The
--.Xr archive_write_disk 3
-+.Xr archive_write_disk 3ARCHIVE
- API allows you to write
--.Xr archive_entry 3
-+.Xr archive_entry 3ARCHIVE
- objects to disk using the same API used by
--.Xr archive_write 3 .
-+.Xr archive_write 3ARCHIVE .
- The
--.Xr archive_write_disk 3
-+.Xr archive_write_disk 3ARCHIVE
- API is used internally by
- .Fn archive_read_extract ;
- using it directly can provide greater control over how entries
-@@ -170,9 +170,9 @@
- operations.
- .Sh READING ENTRIES FROM DISK
- The
--.Xr archive_read_disk 3
-+.Xr archive_read_disk 3ARCHIVE
- supports for populating
--.Xr archive_entry 3
-+.Xr archive_entry 3ARCHIVE
- objects from information in the filesystem.
- This includes the information accessible from the
- .Xr stat 2
-@@ -179,12 +179,12 @@
- system call as well as ACLs, extended attributes,
- and other metadata.
- The
--.Xr archive_read_disk 3
-+.Xr archive_read_disk 3ARCHIVE
- API also supports iterating over directory trees,
- which allows directories of files to be read using
- an API compatible with
- the
--.Xr archive_read 3
-+.Xr archive_read 3ARCHIVE
- API.
- .Sh DESCRIPTION
- Detailed descriptions of each function are provided by the
-@@ -199,7 +199,7 @@
- structure contains a complete description of a single archive
- entry.
- It uses an opaque interface that is fully documented in
--.Xr archive_entry 3 .
-+.Xr archive_entry 3ARCHIVE .
- .Pp
- Users familiar with historic formats should be aware that the newer
- variants have eliminated most restrictions on the length of textual fields.
-@@ -247,15 +247,14 @@
- functions can be used to obtain more information.
- .Sh ENVIRONMENT
- There are character set conversions within the
--.Xr archive_entry 3
-+.Xr archive_entry 3ARCHIVE
- functions that are impacted by the currently-selected locale.
- .Sh SEE ALSO
- .Xr tar 1 ,
--.Xr archive_entry 3 ,
--.Xr archive_read 3 ,
--.Xr archive_util 3 ,
--.Xr archive_write 3 ,
--.Xr tar 5
-+.Xr archive_entry 3ARCHIVE ,
-+.Xr archive_read 3ARCHIVE ,
-+.Xr archive_util 3ARCHIVE ,
-+.Xr archive_write 3ARCHIVE
- .Sh HISTORY
- The
- .Nm libarchive