pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/archivers/libarchive/files Import libarchive-3.3.1.
details: https://anonhg.NetBSD.org/pkgsrc/rev/612a6942673a
branches: trunk
changeset: 359039:612a6942673a
user: joerg <joerg%pkgsrc.org@localhost>
date: Sat Feb 25 20:54:04 2017 +0000
description:
Import libarchive-3.3.1.
diffstat:
archivers/libarchive/files/README.md | 222 +
archivers/libarchive/files/build/autoconf/config.rpath | 10 +-
archivers/libarchive/files/cat/bsdcat.c | 3 +
archivers/libarchive/files/cat/test/CMakeLists.txt | 6 +-
archivers/libarchive/files/cat/test/test.h | 326 +-
archivers/libarchive/files/cat/test/test_version.c | 67 +-
archivers/libarchive/files/contrib/android/config/windows_host.h | 3 -
archivers/libarchive/files/cpio/test/test_option_J_upper.c | 5 +-
archivers/libarchive/files/cpio/test/test_option_Z_upper.c | 5 +-
archivers/libarchive/files/cpio/test/test_option_lz4.c | 7 +
archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html | 2 +-
archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html | 2 +-
archivers/libarchive/files/doc/pdf/archive_read_add_passphrase.3.pdf | Bin
archivers/libarchive/files/doc/pdf/archive_write_set_passphrase.3.pdf | Bin
archivers/libarchive/files/doc/text/archive_entry_linkify.3.txt | 94 +-
archivers/libarchive/files/doc/text/archive_read_add_passphrase.3.txt | 34 +-
archivers/libarchive/files/doc/text/archive_read_extract.3.txt | 62 +-
archivers/libarchive/files/doc/text/archive_read_format.3.txt | 134 +-
archivers/libarchive/files/doc/text/archive_read_free.3.txt | 50 +-
archivers/libarchive/files/doc/text/archive_read_header.3.txt | 40 +-
archivers/libarchive/files/doc/text/archive_read_new.3.txt | 18 +-
archivers/libarchive/files/doc/text/archive_write_blocksize.3.txt | 62 +-
archivers/libarchive/files/doc/text/archive_write_free.3.txt | 60 +-
archivers/libarchive/files/doc/text/archive_write_header.3.txt | 32 +-
archivers/libarchive/files/doc/text/archive_write_new.3.txt | 18 +-
archivers/libarchive/files/doc/text/archive_write_set_passphrase.3.txt | 34 +-
archivers/libarchive/files/doc/wiki/ManPageArchiveReadAddPassphrase3.wiki | 6 +-
archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetPassphrase3.wiki | 6 +-
archivers/libarchive/files/libarchive/archive_acl.c | 1679 +++-
archivers/libarchive/files/libarchive/archive_acl_private.h | 22 +-
archivers/libarchive/files/libarchive/archive_cryptor.c | 10 +-
archivers/libarchive/files/libarchive/archive_cryptor_private.h | 4 +-
archivers/libarchive/files/libarchive/archive_digest.c | 74 +-
archivers/libarchive/files/libarchive/archive_digest_private.h | 15 +-
archivers/libarchive/files/libarchive/archive_entry_locale.h | 10 +-
archivers/libarchive/files/libarchive/archive_hmac.c | 18 +-
archivers/libarchive/files/libarchive/archive_hmac_private.h | 4 +-
archivers/libarchive/files/libarchive/archive_openssl_evp_private.h | 48 +
archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h | 48 +
archivers/libarchive/files/libarchive/archive_ppmd7_private.h | 2 +-
archivers/libarchive/files/libarchive/archive_random.c | 2 +-
archivers/libarchive/files/libarchive/archive_rb.c | 2 +-
archivers/libarchive/files/libarchive/archive_read_add_passphrase.c | 22 +-
archivers/libarchive/files/libarchive/archive_read_extract2.c | 3 +-
archivers/libarchive/files/libarchive/archive_read_support_filter_lz4.c | 13 +-
archivers/libarchive/files/libarchive/archive_read_support_filter_program.c | 2 +
archivers/libarchive/files/libarchive/archive_string_composition.h | 2 +-
archivers/libarchive/files/libarchive/archive_write_add_filter_lz4.c | 4 +-
archivers/libarchive/files/libarchive/archive_write_set_format_v7tar.c | 9 +-
archivers/libarchive/files/libarchive/archive_write_set_format_warc.c | 2 +-
archivers/libarchive/files/libarchive/test/test_acl_nfs4.c | 126 +-
archivers/libarchive/files/libarchive/test/test_acl_pax_nfs4.tar.uu | 129 +
archivers/libarchive/files/libarchive/test/test_acl_pax_posix1e.tar.uu | 117 +
archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c | 933 ++
archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c | 653 +
archivers/libarchive/files/libarchive/test/test_acl_posix1e.c | 147 +-
archivers/libarchive/files/libarchive/test/test_acl_text.c | 473 +
archivers/libarchive/files/libarchive/test/test_archive_cmdline.c | 8 +-
archivers/libarchive/files/libarchive/test/test_archive_read_add_passphrase.c | 14 +-
archivers/libarchive/files/libarchive/test/test_archive_string_conversion.c | 4 +-
archivers/libarchive/files/libarchive/test/test_compat_gtar_2.tar.uu | 49 +
archivers/libarchive/files/libarchive/test/test_compat_perl_archive_tar.c | 66 +
archivers/libarchive/files/libarchive/test/test_compat_perl_archive_tar.tar.uu | 49 +
archivers/libarchive/files/libarchive/test/test_compat_plexus_archiver_tar.c | 69 +
archivers/libarchive/files/libarchive/test/test_compat_plexus_archiver_tar.tar.uu | 49 +
archivers/libarchive/files/libarchive/test/test_compat_solaris_tar_acl.tar.uu | 220 +-
archivers/libarchive/files/libarchive/test/test_compat_star_acl.c | 321 +
archivers/libarchive/files/libarchive/test/test_compat_star_acl_nfs4.tar.uu | 231 +
archivers/libarchive/files/libarchive/test/test_compat_star_acl_posix1e.tar.uu | 231 +
archivers/libarchive/files/libarchive/test/test_compat_uudecode.c | 2 +-
archivers/libarchive/files/libarchive/test/test_read_filter_lzop.c | 9 +-
archivers/libarchive/files/libarchive/test/test_read_filter_lzop_multiple_parts.c | 8 +-
archivers/libarchive/files/libarchive/test/test_read_format_mtree_crash747.c | 49 +
archivers/libarchive/files/libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu | 6 +
archivers/libarchive/files/libarchive/test/test_read_format_raw.bufr.uu | 95 +
archivers/libarchive/files/libarchive/test/test_read_format_zip_high_compression.c | 153 +
archivers/libarchive/files/libarchive/test/test_read_format_zip_high_compression.zip.uu | 18 +
archivers/libarchive/files/libarchive/test/test_read_format_zip_jar.c | 59 +
archivers/libarchive/files/libarchive/test/test_read_format_zip_jar.jar.uu | 6 +
archivers/libarchive/files/libarchive/test/test_read_format_zip_malformed.c | 1 +
archivers/libarchive/files/libarchive/test/test_read_format_zip_nested.c | 2 +
archivers/libarchive/files/libarchive/test/test_read_format_zip_padded.c | 2 +
archivers/libarchive/files/libarchive/test/test_read_format_zip_traditional_encryption_data.c | 4 +-
archivers/libarchive/files/libarchive/test/test_read_format_zip_winzip_aes.c | 2 +-
archivers/libarchive/files/libarchive/test/test_read_format_zip_winzip_aes_large.c | 2 +-
archivers/libarchive/files/libarchive/test/test_read_pax_schily_xattr.c | 70 +
archivers/libarchive/files/libarchive/test/test_read_pax_schily_xattr.tar.uu | 231 +
archivers/libarchive/files/libarchive/test/test_read_set_format.c | 33 +-
archivers/libarchive/files/libarchive/test/test_write_disk_secure744.c | 95 +
archivers/libarchive/files/libarchive/test/test_write_disk_secure745.c | 79 +
archivers/libarchive/files/libarchive/test/test_write_disk_secure746.c | 132 +
archivers/libarchive/files/libarchive/test/test_write_filter_lz4.c | 2 +
archivers/libarchive/files/libarchive/test/test_write_format_gnutar_filenames.c | 12 +-
archivers/libarchive/files/libarchive/test/test_write_format_iso9660_zisofs.c | 2 +-
archivers/libarchive/files/libarchive/test/test_write_format_xar_empty.c | 2 +-
archivers/libarchive/files/libarchive/test/test_write_format_zip_empty_zip64.c | 2 +-
archivers/libarchive/files/libarchive/test/test_write_format_zip_large.c | 1 +
archivers/libarchive/files/libarchive/test/test_write_format_zip_zip64.c | 2 +
archivers/libarchive/files/libarchive/xxhash.c | 5 +-
archivers/libarchive/files/tar/test/test_leading_slash.c | 1 +
archivers/libarchive/files/tar/test/test_missing_file.c | 6 +-
archivers/libarchive/files/tar/test/test_option_H_upper.c | 4 +-
archivers/libarchive/files/tar/test/test_option_L_upper.c | 12 +-
archivers/libarchive/files/tar/test/test_option_U_upper.c | 4 +-
archivers/libarchive/files/tar/test/test_option_a.c | 7 +
archivers/libarchive/files/tar/test/test_option_b64encode.c | 2 +
archivers/libarchive/files/tar/test/test_option_gid_gname.c | 4 +
archivers/libarchive/files/tar/test/test_option_grzip.c | 3 +
archivers/libarchive/files/tar/test/test_option_j.c | 7 +-
archivers/libarchive/files/tar/test/test_option_lrzip.c | 2 +
archivers/libarchive/files/tar/test/test_option_lz4.c | 17 +-
archivers/libarchive/files/tar/test/test_option_lzma.c | 5 +-
archivers/libarchive/files/tar/test/test_option_lzop.c | 7 +-
archivers/libarchive/files/tar/test/test_option_n.c | 2 +-
archivers/libarchive/files/tar/test/test_option_uid_uname.c | 13 +-
archivers/libarchive/files/tar/test/test_option_uuencode.c | 2 +
archivers/libarchive/files/tar/test/test_option_xz.c | 7 +-
archivers/libarchive/files/tar/test/test_option_z.c | 7 +-
archivers/libarchive/files/test_utils/test_common.h | 434 +
archivers/libarchive/files/test_utils/test_main.c | 3407 ++++++++++
120 files changed, 10631 insertions(+), 1600 deletions(-)
diffs (truncated from 14572 to 300 lines):
diff -r e405a7099c6a -r 612a6942673a archivers/libarchive/files/README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/libarchive/files/README.md Sat Feb 25 20:54:04 2017 +0000
@@ -0,0 +1,222 @@
+# Welcome to libarchive!
+
+The libarchive project develops a portable, efficient C library that
+can read and write streaming archives in a variety of formats. It
+also includes implementations of the common `tar`, `cpio`, and `zcat`
+command-line tools that use the libarchive library.
+
+## Questions? Issues?
+
+* http://www.libarchive.org is the home for ongoing
+ libarchive development, including documentation,
+ and links to the libarchive mailing lists.
+* To report an issue, use the issue tracker at
+ https://github.com/libarchive/libarchive/issues
+* To submit an enhancement to libarchive, please
+ submit a pull request via GitHub: https://github.com/libarchive/libarchive/pulls
+
+## Contents of the Distribution
+
+This distribution bundle includes the following major components:
+
+* **libarchive**: a library for reading and writing streaming archives
+* **tar**: the 'bsdtar' program is a full-featured 'tar' implementation built on libarchive
+* **cpio**: the 'bsdcpio' program is a different interface to essentially the same functionality
+* **cat**: the 'bsdcat' program is a simple replacement tool for zcat, bzcat, xzcat, and such
+* **examples**: Some small example programs that you may find useful.
+* **examples/minitar**: a compact sample demonstrating use of libarchive.
+* **contrib**: Various items sent to me by third parties; please contact the authors with any questions.
+
+The top-level directory contains the following information files:
+
+* **NEWS** - highlights of recent changes
+* **COPYING** - what you can do with this
+* **INSTALL** - installation instructions
+* **README** - this file
+* **CMakeLists.txt** - input for "cmake" build tool, see INSTALL
+* **configure** - configuration script, see INSTALL for details. If your copy of the source lacks a `configure` script, you can try to construct it by running the script in `build/autogen.sh` (or
use `cmake`).
+
+The following files in the top-level directory are used by the 'configure' script:
+* `Makefile.am`, `aclocal.m4`, `configure.ac` - used to build this distribution, only needed by maintainers
+* `Makefile.in`, `config.h.in` - templates used by configure script
+
+## Documentation
+
+In addition to the informational articles and documentation
+in the online [libarchive Wiki](https://github.com/libarchive/libarchive/wiki),
+the distribution also includes a number of manual pages:
+
+ * bsdtar.1 explains the use of the bsdtar program
+ * bsdcpio.1 explains the use of the bsdcpio program
+ * bsdcat.1 explains the use of the bsdcat program
+ * libarchive.3 gives an overview of the library as a whole
+ * archive_read.3, archive_write.3, archive_write_disk.3, and
+ archive_read_disk.3 provide detailed calling sequences for the read
+ and write APIs
+ * archive_entry.3 details the "struct archive_entry" utility class
+ * archive_internals.3 provides some insight into libarchive's
+ internal structure and operation.
+ * libarchive-formats.5 documents the file formats supported by the library
+ * cpio.5, mtree.5, and tar.5 provide detailed information about these
+ popular archive formats, including hard-to-find details about
+ modern cpio and tar variants.
+
+The manual pages above are provided in the 'doc' directory in
+a number of different formats.
+
+You should also read the copious comments in `archive.h` and the
+source code for the sample programs for more details. Please let us
+know about any errors or omissions you find.
+
+## Supported Formats
+
+Currently, the library automatically detects and reads the following fomats:
+ * Old V7 tar archives
+ * POSIX ustar
+ * GNU tar format (including GNU long filenames, long link names, and sparse files)
+ * Solaris 9 extended tar format (including ACLs)
+ * POSIX pax interchange format
+ * POSIX octet-oriented cpio
+ * SVR4 ASCII cpio
+ * POSIX octet-oriented cpio
+ * Binary cpio (big-endian or little-endian)
+ * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
+ * ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives)
+ * GNU and BSD 'ar' archives
+ * 'mtree' format
+ * 7-Zip archives
+ * Microsoft CAB format
+ * LHA and LZH archives
+ * RAR archives (with some limitations due to RAR's proprietary status)
+ * XAR archives
+
+The library also detects and handles any of the following before evaluating the archive:
+ * uuencoded files
+ * files with RPM wrapper
+ * gzip compression
+ * bzip2 compression
+ * compress/LZW compression
+ * lzma, lzip, and xz compression
+ * lz4 compression
+ * lzop compression
+
+The library can create archives in any of the following formats:
+ * POSIX ustar
+ * POSIX pax interchange format
+ * "restricted" pax format, which will create ustar archives except for
+ entries that require pax extensions (for long filenames, ACLs, etc).
+ * Old GNU tar format
+ * Old V7 tar format
+ * POSIX octet-oriented cpio
+ * SVR4 "newc" cpio
+ * shar archives
+ * ZIP archives (with uncompressed or "deflate" compressed entries)
+ * GNU and BSD 'ar' archives
+ * 'mtree' format
+ * ISO9660 format
+ * 7-Zip archives
+ * XAR archives
+
+When creating archives, the result can be filtered with any of the following:
+ * uuencode
+ * gzip compression
+ * bzip2 compression
+ * compress/LZW compression
+ * lzma, lzip, and xz compression
+ * lz4 compression
+ * lzop compression
+
+## Notes about the Library Design
+
+The following notes address many of the most common
+questions we are asked about libarchive:
+
+* This is a heavily stream-oriented system. That means that
+ it is optimized to read or write the archive in a single
+ pass from beginning to end. For example, this allows
+ libarchive to process archives too large to store on disk
+ by processing them on-the-fly as they are read from or
+ written to a network or tape drive. This also makes
+ libarchive useful for tools that need to produce
+ archives on-the-fly (such as webservers that provide
+ archived contents of a users account).
+
+* In-place modification and random access to the contents
+ of an archive are not directly supported. For some formats,
+ this is not an issue: For example, tar.gz archives are not
+ designed for random access. In some other cases, libarchive
+ can re-open an archive and scan it from the beginning quickly
+ enough to provide the needed abilities even without true
+ random access. Of course, some applications do require true
+ random access; those applications should consider alternatives
+ to libarchive.
+
+* The library is designed to be extended with new compression and
+ archive formats. The only requirement is that the format be
+ readable or writable as a stream and that each archive entry be
+ independent. There are articles on the libarchive Wiki explaining
+ how to extend libarchive.
+
+* On read, compression and format are always detected automatically.
+
+* The same API is used for all formats; in particular, it's very
+ easy for software using libarchive to transparently handle
+ any of libarchive's archiving formats.
+
+* Libarchive's automatic support for decompression can be used
+ without archiving by explicitly selecting the "raw" and "empty"
+ formats.
+
+* I've attempted to minimize static link pollution. If you don't
+ explicitly invoke a particular feature (such as support for a
+ particular compression or format), it won't get pulled in to
+ statically-linked programs. In particular, if you don't explicitly
+ enable a particular compression or decompression support, you won't
+ need to link against the corresponding compression or decompression
+ libraries. This also reduces the size of statically-linked
+ binaries in environments where that matters.
+
+* The library is generally _thread safe_ depending on the platform:
+ it does not define any global variables of its own. However, some
+ platforms do not provide fully thread-safe versions of key C library
+ functions. On those platforms, libarchive will use the non-thread-safe
+ functions. Patches to improve this are of great interest to us.
+
+* In particular, libarchive's modules to read or write a directory
+ tree do use `chdir()` to optimize the directory traversals. This
+ can cause problems for programs that expect to do disk access from
+ multiple threads. Of course, those modules are completely
+ optional and you can use the rest of libarchive without them.
+
+* The library is _not_ thread aware, however. It does no locking
+ or thread management of any kind. If you create a libarchive
+ object and need to access it from multiple threads, you will
+ need to provide your own locking.
+
+* On read, the library accepts whatever blocks you hand it.
+ Your read callback is free to pass the library a byte at a time
+ or mmap the entire archive and give it to the library at once.
+ On write, the library always produces correctly-blocked output.
+
+* The object-style approach allows you to have multiple archive streams
+ open at once. bsdtar uses this in its "@archive" extension.
+
+* The archive itself is read/written using callback functions.
+ You can read an archive directly from an in-memory buffer or
+ write it to a socket, if you wish. There are some utility
+ functions to provide easy-to-use "open file," etc, capabilities.
+
+* The read/write APIs are designed to allow individual entries
+ to be read or written to any data source: You can create
+ a block of data in memory and add it to a tar archive without
+ first writing a temporary file. You can also read an entry from
+ an archive and write the data directly to a socket. If you want
+ to read/write entries to disk, there are convenience functions to
+ make this especially easy.
+
+* Note: The "pax interchange format" is a POSIX standard extended tar
+ format that should be used when the older _ustar_ format is not
+ appropriate. It has many advantages over other tar formats
+ (including the legacy GNU tar format) and is widely supported by
+ current tar implementations.
+
diff -r e405a7099c6a -r 612a6942673a archivers/libarchive/files/build/autoconf/config.rpath
--- a/archivers/libarchive/files/build/autoconf/config.rpath Sat Feb 25 17:43:52 2017 +0000
+++ b/archivers/libarchive/files/build/autoconf/config.rpath Sat Feb 25 20:54:04 2017 +0000
@@ -63,7 +63,7 @@
aix*)
wl='-Wl,'
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
@@ -155,7 +155,7 @@
hardcode_minus_L=no
case "$host_os" in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -204,7 +204,7 @@
ld_shlibs=no
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -354,7 +354,7 @@
;;
bsdi[45]*)
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -543,7 +543,7 @@
bsdi[45]*)
library_names_spec='$libname$shrext'
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
shrext=.dll
library_names_spec='$libname.dll.a $libname.lib'
;;
diff -r e405a7099c6a -r 612a6942673a archivers/libarchive/files/cat/bsdcat.c
--- a/archivers/libarchive/files/cat/bsdcat.c Sat Feb 25 17:43:52 2017 +0000
+++ b/archivers/libarchive/files/cat/bsdcat.c Sat Feb 25 20:54:04 2017 +0000
@@ -142,5 +142,8 @@
bsdcat_next();
}
+ if (a != NULL)
+ archive_read_free(a);
+
exit(exit_status);
}
diff -r e405a7099c6a -r 612a6942673a archivers/libarchive/files/cat/test/CMakeLists.txt
--- a/archivers/libarchive/files/cat/test/CMakeLists.txt Sat Feb 25 17:43:52 2017 +0000
+++ b/archivers/libarchive/files/cat/test/CMakeLists.txt Sat Feb 25 20:54:04 2017 +0000
@@ -6,7 +6,7 @@
IF(ENABLE_CAT AND ENABLE_TEST)
SET(bsdcat_test_SOURCES
../../test_utils/test_utils.c
- main.c
+ ../../test_utils/test_main.c
test.h
test_0.c
test_empty_gz.c
@@ -54,11 +54,13 @@
INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/list.h)
Home |
Main Index |
Thread Index |
Old Index