Module Name:    src
Committed By:   joerg
Date:           Sat Feb 20 02:51:33 UTC 2010

Modified Files:
        src/external/bsd/libarchive/dist/libarchive: archive_read.3
            archive_read_disk.3 archive_write.3 archive_write_disk.3
Removed Files:
        src/external/bsd/libarchive/dist/cpio: err.c matching.c matching.h
            pathmatch.c pathmatch.h
        src/external/bsd/libarchive/dist/cpio/test: test_option_B.c
            test_option_L.c test_option_ell.c
        src/external/bsd/libarchive/dist/libarchive: config_freebsd.h
            config_windows.h
        src/external/bsd/libarchive/dist/libarchive/test:
            test_compat_gtar_1.tgz.uu test_pax_filename_encoding.tar.gz.uu
            test_read_format_gtar_sparse_1_13.tgz.uu
            test_read_format_gtar_sparse_1_17.tgz.uu
            test_read_format_gtar_sparse_1_17_posix00.tgz.uu
            test_read_format_gtar_sparse_1_17_posix01.tgz.uu
            test_read_format_gtar_sparse_1_17_posix10.tgz.uu
            test_read_format_isorr_bz2.iso.bz2.uu
        src/external/bsd/libarchive/dist/tar: getdate.y matching.c siginfo.c
        src/external/bsd/libarchive/dist/tar/test: test_option_T.c

Log Message:
Merge changes


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/libarchive/dist/cpio/err.c \
    src/external/bsd/libarchive/dist/cpio/matching.c \
    src/external/bsd/libarchive/dist/cpio/matching.h \
    src/external/bsd/libarchive/dist/cpio/pathmatch.c \
    src/external/bsd/libarchive/dist/cpio/pathmatch.h
cvs rdiff -u -r1.1.1.1 -r0 \
    src/external/bsd/libarchive/dist/cpio/test/test_option_B.c \
    src/external/bsd/libarchive/dist/cpio/test/test_option_L.c \
    src/external/bsd/libarchive/dist/cpio/test/test_option_ell.c
cvs rdiff -u -r1.2 -r1.3 \
    src/external/bsd/libarchive/dist/libarchive/archive_read.3 \
    src/external/bsd/libarchive/dist/libarchive/archive_write.3 \
    src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3
cvs rdiff -u -r1.1.1.1 -r1.2 \
    src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3
cvs rdiff -u -r1.1.1.1 -r0 \
    src/external/bsd/libarchive/dist/libarchive/config_freebsd.h \
    src/external/bsd/libarchive/dist/libarchive/config_windows.h
cvs rdiff -u -r1.1.1.1 -r0 \
    src/external/bsd/libarchive/dist/libarchive/test/test_compat_gtar_1.tgz.uu \
    
src/external/bsd/libarchive/dist/libarchive/test/test_pax_filename_encoding.tar.gz.uu
 \
    
src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_13.tgz.uu
 \
    
src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17.tgz.uu
 \
    
src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tgz.uu
 \
    
src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tgz.uu
 \
    
src/external/bsd/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tgz.uu
 \
    
src/external/bsd/libarchive/dist/libarchive/test/test_read_format_isorr_bz2.iso.bz2.uu
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/libarchive/dist/tar/getdate.y \
    src/external/bsd/libarchive/dist/tar/matching.c \
    src/external/bsd/libarchive/dist/tar/siginfo.c
cvs rdiff -u -r1.1.1.1 -r0 \
    src/external/bsd/libarchive/dist/tar/test/test_option_T.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/libarchive/dist/libarchive/archive_read.3
diff -u src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.2 src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.3
--- src/external/bsd/libarchive/dist/libarchive/archive_read.3:1.2	Thu Oct 15 17:26:57 2009
+++ src/external/bsd/libarchive/dist/libarchive/archive_read.3	Sat Feb 20 02:51:33 2010
@@ -22,23 +22,32 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libarchive/archive_read.3,v 1.37 2008/05/26 17:00:22 kientzle Exp $
+.\" $FreeBSD: head/lib/libarchive/archive_read.3 191595 2009-04-27 20:13:13Z kientzle $
 .\"
-.Dd August 19, 2006
+.Dd April 13, 2009
 .Dt archive_read 3
 .Os
 .Sh NAME
 .Nm archive_read_new ,
+.Nm archive_read_set_filter_options ,
+.Nm archive_read_set_format_options ,
+.Nm archive_read_set_options ,
 .Nm archive_read_support_compression_all ,
 .Nm archive_read_support_compression_bzip2 ,
 .Nm archive_read_support_compression_compress ,
 .Nm archive_read_support_compression_gzip ,
+.Nm archive_read_support_compression_lzma ,
 .Nm archive_read_support_compression_none ,
+.Nm archive_read_support_compression_xz ,
 .Nm archive_read_support_compression_program ,
+.Nm archive_read_support_compression_program_signature ,
 .Nm archive_read_support_format_all ,
+.Nm archive_read_support_format_ar ,
 .Nm archive_read_support_format_cpio ,
 .Nm archive_read_support_format_empty ,
 .Nm archive_read_support_format_iso9660 ,
+.Nm archive_read_support_format_mtree,
+.Nm archive_read_support_format_raw,
 .Nm archive_read_support_format_tar ,
 .Nm archive_read_support_format_zip ,
 .Nm archive_read_open ,
@@ -48,6 +57,7 @@
 .Nm archive_read_open_filename ,
 .Nm archive_read_open_memory ,
 .Nm archive_read_next_header ,
+.Nm archive_read_next_header2 ,
 .Nm archive_read_data ,
 .Nm archive_read_data_block ,
 .Nm archive_read_data_skip ,
@@ -74,25 +84,48 @@
 .Ft int
 .Fn archive_read_support_compression_gzip "struct archive *"
 .Ft int
+.Fn archive_read_support_compression_lzma "struct archive *"
+.Ft int
 .Fn archive_read_support_compression_none "struct archive *"
 .Ft int
+.Fn archive_read_support_compression_xz "struct archive *"
+.Ft int
 .Fo archive_read_support_compression_program
 .Fa "struct archive *"
 .Fa "const char *cmd"
 .Fc
 .Ft int
+.Fo archive_read_support_compression_program_signature
+.Fa "struct archive *"
+.Fa "const char *cmd"
+.Fa "const void *signature"
+.Fa "size_t signature_length"
+.Fc
+.Ft int
 .Fn archive_read_support_format_all "struct archive *"
 .Ft int
+.Fn archive_read_support_format_ar "struct archive *"
+.Ft int
 .Fn archive_read_support_format_cpio "struct archive *"
 .Ft int
 .Fn archive_read_support_format_empty "struct archive *"
 .Ft int
 .Fn archive_read_support_format_iso9660 "struct archive *"
 .Ft int
+.Fn archive_read_support_format_mtree "struct archive *"
+.Ft int
+.Fn archive_read_support_format_raw "struct archive *"
+.Ft int
 .Fn archive_read_support_format_tar "struct archive *"
 .Ft int
 .Fn archive_read_support_format_zip "struct archive *"
 .Ft int
+.Fn archive_read_set_filter_options "struct archive *" "const char *"
+.Ft int
+.Fn archive_read_set_format_options "struct archive *" "const char *"
+.Ft int
+.Fn archive_read_set_options "struct archive *" "const char *"
+.Ft int
 .Fo archive_read_open
 .Fa "struct archive *"
 .Fa "void *client_data"
@@ -123,6 +156,8 @@
 .Fn archive_read_open_memory "struct archive *" "void *buff" "size_t size"
 .Ft int
 .Fn archive_read_next_header "struct archive *" "struct archive_entry **"
+.Ft int
+.Fn archive_read_next_header2 "struct archive *" "struct archive_entry *"
 .Ft ssize_t
 .Fn archive_read_data "struct archive *" "void *buff" "size_t len"
 .Ft int
@@ -176,28 +211,41 @@
 Allocates and initializes a
 .Tn struct archive
 object suitable for reading from an archive.
-.It Fn archive_read_support_compression_all , \
-Fn archive_read_support_compression_bzip2 , \
+.It Fn archive_read_support_compression_bzip2 , \
 Fn archive_read_support_compression_compress , \
 Fn archive_read_support_compression_gzip , \
-Fn archive_read_support_compression_none
+Fn archive_read_support_compression_lzma , \
+Fn archive_read_support_compression_none , \
+Fn archive_read_support_compression_xz
 Enables auto-detection code and decompression support for the
 specified compression.
+Returns
+.Cm ARCHIVE_OK
+if the compression is fully supported, or
+.Cm ARCHIVE_WARN
+if the compression is supported only through an external program.
+Note that decompression using an external program is usually slower than
+decompression through built-in libraries.
 Note that
 .Dq none
 is always enabled by default.
-For convenience,
-.Fn archive_read_support_compression_all
-enables all available decompression code.
+.It Fn archive_read_support_compression_all
+Enables all available decompression filters.
 .It Fn archive_read_support_compression_program
 Data is fed through the specified external program before being dearchived.
 Note that this disables automatic detection of the compression format,
 so it makes no sense to specify this in conjunction with any other
 decompression option.
+.It Fn archive_read_support_compression_program_signature
+This feeds data through the specified external program
+but only if the initial bytes of the data match the specified
+signature value.
 .It Fn archive_read_support_format_all , \
+Fn archive_read_support_format_ar , \
 Fn archive_read_support_format_cpio , \
 Fn archive_read_support_format_empty , \
 Fn archive_read_support_format_iso9660 , \
+Fn archive_read_support_format_mtree , \
 Fn archive_read_support_format_tar , \
 Fn archive_read_support_format_zip
 Enables support---including auto-detection code---for the
@@ -210,6 +258,57 @@
 .Fn archive_read_support_format_all
 enables support for all available formats.
 Only empty archives are supported by default.
+.It Fn archive_read_support_format_raw
+The
+.Dq raw
+format handler allows libarchive to be used to read arbitrary data.
+It treats any data stream as an archive with a single entry.
+The pathname of this entry is
+.Dq data ;
+all other entry fields are unset.
+This is not enabled by
+.Fn archive_read_support_format_all
+in order to avoid erroneous handling of damaged archives.
+.It Fn archive_read_set_filter_options , \
+Fn archive_read_set_format_options , \
+Fn archive_read_set_options
+Specifies options that will be passed to currently-registered
+filters (including decompression filters) and/or format readers.
+The argument is a comma-separated list of individual options.
+Individual options have one of the following forms:
+.Bl -tag -compact -width indent
+.It Ar option=value
+The option/value pair will be provided to every module.
+Modules that do not accept an option with this name will ignore it.
+.It Ar option
+The option will be provided to every module with a value of
+.Dq 1 .
+.It Ar !option
+The option will be provided to every module with a NULL value.
+.It Ar module:option=value , Ar module:option , Ar module:!option
+As above, but the corresponding option and value will be provided
+only to modules whose name matches
+.Ar module .
+.El
+The return value will be
+.Cm ARCHIVE_OK
+if any module accepts the option, or
+.Cm ARCHIVE_WARN
+if no module accepted the option, or
+.Cm ARCHIVE_FATAL
+if there was a fatal error while attempting to process the option.
+.Pp
+The currently supported options are:
+.Bl -tag -compact -width indent
+.It Format iso9660
+.Bl -tag -compact -width indent
+.It Cm joliet
+Support Joliet extensions.
+Defaults to enabled, use
+.Cm !joliet
+to disable.
+.El
+.El
 .It Fn archive_read_open
 The same as
 .Fn archive_read_open2 ,
@@ -262,6 +361,14 @@
 Read the header for the next entry and return a pointer to
 a
 .Tn struct archive_entry .
+This is a convenience wrapper around
+.Fn archive_read_next_header2
+that reuses an internal
+.Tn struct archive_entry
+object for each request.
+.It Fn archive_read_next_header2
+Read the header for the next entry and populate the provided
+.Tn struct archive_entry .
 .It Fn archive_read_data
 Read data associated with the header just read.
 Internally, this is a convenience function that calls
Index: src/external/bsd/libarchive/dist/libarchive/archive_write.3
diff -u src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.2 src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.3
--- src/external/bsd/libarchive/dist/libarchive/archive_write.3:1.2	Thu Oct 15 17:26:57 2009
+++ src/external/bsd/libarchive/dist/libarchive/archive_write.3	Sat Feb 20 02:51:33 2010
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libarchive/archive_write.3,v 1.24 2008/05/26 17:00:23 kientzle Exp $
+.\" $FreeBSD: head/lib/libarchive/archive_write.3 201110 2009-12-28 03:31:29Z kientzle $
 .\"
 .Dd May 11, 2008
 .Dt archive_write 3
@@ -43,6 +43,9 @@
 .Nm archive_write_set_compression_gzip ,
 .Nm archive_write_set_compression_none ,
 .Nm archive_write_set_compression_program ,
+.Nm archive_write_set_compressor_options ,
+.Nm archive_write_set_format_options ,
+.Nm archive_write_set_options ,
 .Nm archive_write_open ,
 .Nm archive_write_open_fd ,
 .Nm archive_write_open_FILE ,
@@ -73,10 +76,7 @@
 .Ft int
 .Fn archive_write_set_compression_none "struct archive *"
 .Ft int
-.Fo archive_write_set_compression_program
-.Fa "struct archive *"
-.Fa "const char * cmd"
-.Fc
+.Fn archive_write_set_compression_program "struct archive *" "const char * cmd"
 .Ft int
 .Fn archive_write_set_format_cpio "struct archive *"
 .Ft int
@@ -90,6 +90,12 @@
 .Ft int
 .Fn archive_write_set_format_ustar "struct archive *"
 .Ft int
+.Fn archive_write_set_format_options "struct archive *" "const char *"
+.Ft int
+.Fn archive_write_set_compressor_options "struct archive *" "const char *"
+.Ft int
+.Fn archive_write_set_options "struct archive *" "const char *"
+.Ft int
 .Fo archive_write_open
 .Fa "struct archive *"
 .Fa "void *client_data"
@@ -206,6 +212,66 @@
 The archive will be fed into the specified compression program.
 The output of that program is blocked and written to the client
 write callbacks.
+.It Fn archive_write_set_compressor_options , \
+Fn archive_write_set_format_options , \
+Fn archive_write_set_options
+Specifies options that will be passed to the currently-enabled
+compressor and/or format writer.
+The argument is a comma-separated list of individual options.
+Individual options have one of the following forms:
+.Bl -tag -compact -width indent
+.It Ar option=value
+The option/value pair will be provided to every module.
+Modules that do not accept an option with this name will ignore it.
+.It Ar option
+The option will be provided to every module with a value of
+.Dq 1 .
+.It Ar !option
+The option will be provided to every module with a NULL value.
+.It Ar module:option=value , Ar module:option , Ar module:!option
+As above, but the corresponding option and value will be provided
+only to modules whose name matches
+.Ar module .
+.El
+The return value will be
+.Cm ARCHIVE_OK
+if any module accepts the option, or
+.Cm ARCHIVE_WARN
+if no module accepted the option, or
+.Cm ARCHIVE_FATAL
+if there was a fatal error while attempting to process the option.
+.Pp
+The currently supported options are:
+.Bl -tag -compact -width indent
+.It Compressor gzip
+.Bl -tag -compact -width indent
+.It Cm compression-level
+The value is interpreted as a decimal integer specifying the
+gzip compression level.
+.El
+.It Compressor xz
+.Bl -tag -compact -width indent
+.It Cm compression-level
+The value is interpreted as a decimal integer specifying the
+compression level.
+.El
+.It Format mtree
+.Bl -tag -compact -width indent
+.It Cm cksum , Cm device , Cm flags , Cm gid , Cm gname , Cm indent , Cm link , Cm md5 , Cm mode , Cm nlink , Cm rmd160 , Cm sha1 , Cm sha256 , Cm sha384 , Cm sha512 , Cm size , Cm time , Cm uid , Cm uname
+Enable a particular keyword in the mtree output.
+Prefix with an exclamation mark to disable the corresponding keyword.
+The default is equivalent to
+.Dq device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname .
+.It Cm all
+Enables all of the above keywords.
+.It Cm use-set
+Enables generation of
+.Cm /set
+lines that specify default values for the following files and/or directories.
+.It Cm indent
+XXX needs explanation XXX
+.El
+.El
 .It Fn archive_write_open
 Freeze the settings, open the archive, and prepare for writing entries.
 This is the most generic form of this function, which accepts
@@ -338,7 +404,7 @@
 .Fo archive_write_callback
 .Fa "struct archive *"
 .Fa "void *client_data"
-.Fa "void *buffer"
+.Fa "const void *buffer"
 .Fa "size_t length"
 .Fc
 .El
@@ -381,6 +447,9 @@
 .Xr close 2
 system calls.
 .Bd -literal -offset indent
+#ifdef __linux__
+#define	_FILE_OFFSET_BITS 64
+#endif
 #include <sys/stat.h>
 #include <archive.h>
 #include <archive_entry.h>
@@ -406,7 +475,7 @@
 }
 
 ssize_t
-mywrite(struct archive *a, void *client_data, void *buff, size_t n)
+mywrite(struct archive *a, void *client_data, const void *buff, size_t n)
 {
   struct mydata *mydata = client_data;
 
Index: src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3
diff -u src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3:1.2 src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3:1.3
--- src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3:1.2	Thu Oct 15 17:26:57 2009
+++ src/external/bsd/libarchive/dist/libarchive/archive_write_disk.3	Sat Feb 20 02:51:33 2010
@@ -22,9 +22,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/lib/libarchive/archive_write_disk.3,v 1.3 2008/05/26 17:00:23 kientzle Exp $
+.\" $FreeBSD: src/lib/libarchive/archive_write_disk.3,v 1.4 2008/09/04 05:22:00 kientzle Exp $
 .\"
-.Dd March 2, 2007
+.Dd August 5, 2008
 .Dt archive_write_disk 3
 .Os
 .Sh NAME
@@ -169,11 +169,11 @@
 Note that paths ending in
 .Pa ..
 always cause an error, regardless of this flag.
-.El
 .It Cm ARCHIVE_EXTRACT_SPARSE
 Scan data for blocks of NUL bytes and try to recreate them with holes.
 This results in sparse files, independent of whether the archive format
 supports or uses them.
+.El
 .It Fn archive_write_disk_set_group_lookup , \
 Fn archive_write_disk_set_user_lookup
 The

Index: src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3
diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3:1.1.1.1 src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3:1.2
--- src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3:1.1.1.1	Sat Feb 20 02:48:42 2010
+++ src/external/bsd/libarchive/dist/libarchive/archive_read_disk.3	Sat Feb 20 02:51:33 2010
@@ -93,11 +93,9 @@
 Allocates and initializes a
 .Tn struct archive
 object suitable for reading object information from disk.
-.It Xo
-.Fn archive_read_disk_set_symlink_logical ,
-.Fn archive_read_disk_set_symlink_physical ,
-.Fn archive_read_disk_set_symlink_hybrid
-.Xc
+.It Fn archive_read_disk_set_symlink_logical , \
+Fn archive_read_disk_set_symlink_physical , \
+Fn archive_read_disk_set_symlink_hybrid
 This sets the mode used for handling symbolic links.
 The
 .Dq logical
@@ -110,16 +108,12 @@
 mode currently behaves identically to the
 .Dq logical
 mode.
-.It Xo
-.Fn archive_read_disk_gname ,
-.Fn archive_read_disk_uname
-.Xc
+.It Fn archive_read_disk_gname , \
+Fn archive_read_disk_uname
 Returns a user or group name given a gid or uid value.
 By default, these always return a NULL string.
-.It Xo
-.Fn archive_read_disk_set_gname_lookup ,
-.Fn archive_read_disk_set_uname_lookup
-.Xc
+.It Fn archive_read_disk_set_gname_lookup , \
+Fn archive_read_disk_set_uname_lookup
 These allow you to override the functions used for
 user and group name lookups.
 You may also provide a

Reply via email to