summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2008-05-25 19:41:18 +0000
committerjoerg <joerg@pkgsrc.org>2008-05-25 19:41:18 +0000
commitb39716c20b623ac85787b669363ba3f534d06e1a (patch)
tree9de2580634ccb9d590062a8956ab0a9be93db8d6
parent8958141f9f3a47aa065779b39aba25bc077b3375 (diff)
downloadpkgsrc-b39716c20b623ac85787b669363ba3f534d06e1a.tar.gz
Import libarchive-2.5.4b. Major changes:
- much improved mtree support - fix a number of non-exploitable integer and buffer overflows - bsdtar get -s and SIGINFO/SIGUSR1 support - fix hardlink extraction bug where latter hardlinks would overwrite the permissions of earlier entries even when they don't carry data - fix bsdtar crashes on entries with empty filenames
-rw-r--r--archivers/libarchive/files/COPYING40
-rw-r--r--archivers/libarchive/files/Makefile.am52
-rw-r--r--archivers/libarchive/files/Makefile.in1186
-rw-r--r--archivers/libarchive/files/NEWS50
-rw-r--r--archivers/libarchive/files/README1
-rw-r--r--archivers/libarchive/files/config.h.in12
-rwxr-xr-xarchivers/libarchive/files/configure103
-rw-r--r--archivers/libarchive/files/configure.ac15
-rw-r--r--archivers/libarchive/files/contrib/psota-benchmark/results.txt122
-rw-r--r--archivers/libarchive/files/contrib/psota-benchmark/tcp.sh104
-rw-r--r--archivers/libarchive/files/cpio/cpio.c95
-rw-r--r--archivers/libarchive/files/cpio/test/list.h1
-rw-r--r--archivers/libarchive/files/cpio/test/main.c60
-rw-r--r--archivers/libarchive/files/cpio/test/test_0.c62
-rw-r--r--archivers/libarchive/files/cpio/test/test_basic.c110
-rw-r--r--archivers/libarchive/files/cpio/test/test_format_newc.c18
-rw-r--r--archivers/libarchive/files/cpio/test/test_gcpio_compat.c16
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_B.c8
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_L.c12
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_a.c125
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_c.c4
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_d.c8
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_ell.c4
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_f.c2
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_u.c19
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_version.c8
-rw-r--r--archivers/libarchive/files/doc/man/archive_entry.330
-rw-r--r--archivers/libarchive/files/doc/man/archive_read.337
-rw-r--r--archivers/libarchive/files/doc/man/archive_write.313
-rw-r--r--archivers/libarchive/files/doc/man/archive_write_disk.35
-rw-r--r--archivers/libarchive/files/doc/man/bsdtar.163
-rw-r--r--archivers/libarchive/files/doc/man/libarchive-formats.58
-rw-r--r--archivers/libarchive/files/doc/man/mtree.59
-rw-r--r--archivers/libarchive/files/doc/text/archive_entry.360
-rw-r--r--archivers/libarchive/files/doc/text/archive_read.319
-rw-r--r--archivers/libarchive/files/doc/text/archive_write.311
-rw-r--r--archivers/libarchive/files/doc/text/archive_write_disk.35
-rw-r--r--archivers/libarchive/files/doc/text/bsdtar.161
-rw-r--r--archivers/libarchive/files/doc/text/libarchive-formats.56
-rw-r--r--archivers/libarchive/files/doc/text/mtree.510
-rw-r--r--archivers/libarchive/files/libarchive/archive.h592
-rw-r--r--archivers/libarchive/files/libarchive/archive_endian.h14
-rw-r--r--archivers/libarchive/files/libarchive/archive_entry.315
-rw-r--r--archivers/libarchive/files/libarchive/archive_entry.c83
-rw-r--r--archivers/libarchive/files/libarchive/archive_entry.h89
-rw-r--r--archivers/libarchive/files/libarchive/archive_entry_link_resolver.c40
-rw-r--r--archivers/libarchive/files/libarchive/archive_entry_private.h21
-rw-r--r--archivers/libarchive/files/libarchive/archive_entry_strmode.c5
-rw-r--r--archivers/libarchive/files/libarchive/archive_read.323
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_data_into_fd.c12
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_extract.c28
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_compression_bzip2.c32
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_compression_program.c20
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_ar.c8
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c59
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c663
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_tar.c2
-rw-r--r--archivers/libarchive/files/libarchive/archive_string.c8
-rw-r--r--archivers/libarchive/files/libarchive/archive_windows.c188
-rw-r--r--archivers/libarchive/files/libarchive/archive_windows.h152
-rw-r--r--archivers/libarchive/files/libarchive/archive_write.36
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_disk.34
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_disk.c163
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_set_compression_program.c19
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_set_format_ar.c11
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_set_format_pax.c79
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c68
-rw-r--r--archivers/libarchive/files/libarchive/config_freebsd.h3
-rw-r--r--archivers/libarchive/files/libarchive/config_windows.h1198
-rw-r--r--archivers/libarchive/files/libarchive/filter_fork.c5
-rw-r--r--archivers/libarchive/files/libarchive/libarchive-formats.58
-rw-r--r--archivers/libarchive/files/libarchive/mtree.59
-rw-r--r--archivers/libarchive/files/libarchive/test/list.h3
-rw-r--r--archivers/libarchive/files/libarchive/test/main.c60
-rw-r--r--archivers/libarchive/files/libarchive/test/test_entry.c5
-rw-r--r--archivers/libarchive/files/libarchive/test/test_read_format_mtree.c10
-rw-r--r--archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.c66
-rw-r--r--archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.tar.uu38
-rw-r--r--archivers/libarchive/files/libarchive/test/test_tar_filenames.c34
-rw-r--r--archivers/libarchive/files/libarchive/test/test_tar_large.c5
-rw-r--r--archivers/libarchive/files/libarchive/test/test_ustar_filenames.c183
-rw-r--r--archivers/libarchive/files/libarchive/test/test_write_disk_hardlink.c16
-rw-r--r--archivers/libarchive/files/libarchive/test/test_write_format_ar.c3
-rw-r--r--archivers/libarchive/files/libarchive/test/test_write_format_tar_ustar.c342
-rw-r--r--archivers/libarchive/files/tar/bsdtar.154
-rw-r--r--archivers/libarchive/files/tar/bsdtar.c37
-rw-r--r--archivers/libarchive/files/tar/bsdtar.h18
-rw-r--r--archivers/libarchive/files/tar/matching.c23
-rw-r--r--archivers/libarchive/files/tar/read.c35
-rw-r--r--archivers/libarchive/files/tar/siginfo.c147
-rw-r--r--archivers/libarchive/files/tar/subst.c275
-rw-r--r--archivers/libarchive/files/tar/test/main.c102
-rw-r--r--archivers/libarchive/files/tar/test/test.h9
-rw-r--r--archivers/libarchive/files/tar/test/test_0.c62
-rw-r--r--archivers/libarchive/files/tar/test/test_copy.c187
-rw-r--r--archivers/libarchive/files/tar/test/test_option_T.c142
-rw-r--r--archivers/libarchive/files/tar/test/test_patterns.c47
-rw-r--r--archivers/libarchive/files/tar/test/test_version.c8
-rw-r--r--archivers/libarchive/files/tar/util.c60
-rw-r--r--archivers/libarchive/files/tar/write.c340
-rw-r--r--archivers/libarchive/files/version2
-rw-r--r--archivers/libarchive/files/windows/mvcpp.nt126
-rw-r--r--archivers/libarchive/files/windows/wccpp.nt116
103 files changed, 6461 insertions, 2295 deletions
diff --git a/archivers/libarchive/files/COPYING b/archivers/libarchive/files/COPYING
index 6128d175fde..ec7d6c43603 100644
--- a/archivers/libarchive/files/COPYING
+++ b/archivers/libarchive/files/COPYING
@@ -1,7 +1,41 @@
-All of the C source code and documentation in this package is subject
-to the following:
+The libarchive distribution as a whole is Copyright by Tim Kientzle
+and is subject to the copyright notice reproduced at the bottom of
+this file.
-Copyright (c) 2003-2006 Tim Kientzle
+Each individual file in this distribution should have a clear
+copyright/licensing statement at the beginning of the file. If any do
+not, please let me know and I will rectify it. The following is
+intended to summarize the copyright status of the individual files;
+the actual statements in the files are controlling.
+
+* Except as listed below, all C sources (including .c and .h files)
+ and documentation files are subject to the copyright notice reproduced
+ at the bottom of this file.
+
+* The following source files are also subject in whole or in part to
+ a 3-clause UC Regents copyright; please read the individual source
+ files for details:
+ libarchive/archive_entry.c
+ libarchive/archive_read_support_compression_compress.c
+ libarchive/archive_write_set_compression_compress.c
+ libarchive/mtree.5
+ tar/matching.c
+
+* The following source files are in the public domain:
+ tar/getdate.y
+
+* The build files---including Makefiles, configure scripts,
+ and auxiliary scripts used as part of the compile process---have
+ widely varying licensing terms. Please check individual files before
+ distributing them to see if those restrictions apply to you.
+
+I intend for all new source code to use the license below and hope over
+time to replace code with other licenses with new implementations that
+do use the license below. The varying licensing of the build scripts
+seems to be an unavoidable mess.
+
+
+Copyright (c) 2003-2008 <author(s)>
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/archivers/libarchive/files/Makefile.am b/archivers/libarchive/files/Makefile.am
index db075c0b461..f9e1f0bd137 100644
--- a/archivers/libarchive/files/Makefile.am
+++ b/archivers/libarchive/files/Makefile.am
@@ -25,8 +25,9 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio
#
EXTRA_DIST= version \
contrib \
+ doc \
examples \
- doc \
+ windows \
$(libarchive_EXTRA_DIST) \
$(libarchive_test_EXTRA_DIST) \
$(bsdtar_EXTRA_DIST) \
@@ -43,7 +44,7 @@ dist-hook:
rm -f `find $(distdir) -name '*.out'`
rm -f `find $(distdir) -name '*.core'`
-rm -f $(distdir)/*/Makefile $(distdir)/*/*/Makefile
- cd $(distdir)/doc && ./update.sh
+ cd $(distdir)/doc && /bin/sh update.sh
#
# Extra rules for cleanup
@@ -57,16 +58,19 @@ distclean-local:
-rm -rf .ref
-rm -rf autom4te.cache/
-rm -f *~
+ -[ -f libarchive/Makefile ] && cd libarchive && make clean
+ -[ -f libarchive/test/Makefile ] && cd libarchive/test && make clean
+ -[ -f tar/Makefile ] && cd tar && make clean
+ -[ -f tar/test/Makefile ] && cd tar/test && make clean
+ -[ -f cpio/Makefile ] && cd cpio && make clean
+ -[ -f cpio/test/Makefile ] && cd cpio/test && make clean
#
# Libarchive headers, source, etc.
#
#
-include_HEADERS= libarchive/archive_entry.h
-# Note: archive.h is built from archive.h.in, so don't
-# include archive.h in the distfile, but do install it.
-nodist_include_HEADERS= libarchive/archive.h
+include_HEADERS= libarchive/archive.h libarchive/archive_entry.h
libarchive_la_SOURCES= \
libarchive/archive_check_magic.c \
@@ -134,9 +138,9 @@ libarchive_la_SOURCES= \
libarchive/filter_fork.c \
libarchive/filter_fork.h
-# archive.h ends up in the build directory, so make sure we can find it.
-libarchive_la_CPPFLAGS= -I$(top_builddir)/libarchive
-libarchive_la_LDFLAGS= -version-info $(ARCHIVE_LIBTOOL_VERSION)
+# cygwin barfs without -no-undefined; I don't know what it does or
+# whether it helps or hurts other platforms...
+libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION)
# Manpages to install
libarchive_man_MANS= \
@@ -153,8 +157,10 @@ libarchive_man_MANS= \
libarchive/tar.5
# Additional libarchive files to include in the distribution
-libarchive_EXTRA_DIST= \
- libarchive/test/list.h \
+libarchive_EXTRA_DIST= \
+ libarchive/test/list.h \
+ libarchive/archive_windows.c \
+ libarchive/archive_windows.h \
$(libarchive_man_MANS)
#
@@ -198,6 +204,7 @@ libarchive_test_SOURCES= \
libarchive/test/test_read_format_mtree.c \
libarchive/test/test_read_format_pax_bz2.c \
libarchive/test/test_read_format_tar.c \
+ libarchive/test/test_read_format_tar_empty_filename.c \
libarchive/test/test_read_format_tbz.c \
libarchive/test/test_read_format_tgz.c \
libarchive/test/test_read_format_tz.c \
@@ -208,6 +215,7 @@ libarchive_test_SOURCES= \
libarchive/test/test_read_truncated.c \
libarchive/test/test_tar_filenames.c \
libarchive/test/test_tar_large.c \
+ libarchive/test/test_ustar_filenames.c \
libarchive/test/test_write_compress.c \
libarchive/test/test_write_compress_program.c \
libarchive/test/test_write_disk.c \
@@ -222,6 +230,7 @@ libarchive_test_SOURCES= \
libarchive/test/test_write_format_shar_empty.c \
libarchive/test/test_write_format_tar.c \
libarchive/test/test_write_format_tar_empty.c \
+ libarchive/test/test_write_format_tar_ustar.c \
libarchive/test/test_write_open_memory.c
libarchive_test_CPPFLAGS= -I$(top_builddir)/libarchive -I$(top_srcdir)/libarchive -I$(top_builddir)/libarchive/test
@@ -244,7 +253,9 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tgz.uu \
libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tgz.uu \
libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tgz.uu \
- libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu
+ libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu \
+ libarchive/test/test_read_format_tar_empty_filename.tar.uu
+
#
#
@@ -259,14 +270,14 @@ bsdtar_SOURCES= \
tar/getdate.y \
tar/matching.c \
tar/read.c \
+ tar/siginfo.c \
+ tar/subst.c \
tar/tree.c \
tar/tree.h \
tar/util.c \
tar/write.c
-bsdtar_DEPENDENCIES= libarchive.la \
- libarchive/archive_entry.h \
- libarchive/archive.h
+bsdtar_DEPENDENCIES= libarchive.la
if STATIC_BSDTAR
bsdtar_static= -static
@@ -296,16 +307,16 @@ bsdtar_test_SOURCES= \
tar/getdate.c \
tar/test/main.c \
tar/test/test.h \
+ tar/test/test_0.c \
tar/test/test_basic.c \
tar/test/test_copy.c \
tar/test/test_getdate.c \
tar/test/test_help.c \
+ tar/test/test_option_T.c \
+ tar/test/test_patterns.c \
tar/test/test_stdio.c \
tar/test/test_version.c
-bsdtar_test_EXTRA_DIST= \
- tar/test/old
-
bsdtar_test_CPPFLAGS= -I$(top_builddir)/tar/test
tar/test/list.h: Makefile
@@ -337,9 +348,7 @@ bsdcpio_SOURCES= \
cpio/pathmatch.c \
cpio/pathmatch.h
-bsdcpio_DEPENDENCIES = libarchive.la \
- libarchive/archive_entry.h \
- libarchive/archive.h
+bsdcpio_DEPENDENCIES = libarchive.la
if STATIC_BSDCPIO
@@ -374,6 +383,7 @@ bsdcpio_test_SOURCES= \
cpio/pathmatch.c \
cpio/test/main.c \
cpio/test/test.h \
+ cpio/test/test_0.c \
cpio/test/test_basic.c \
cpio/test/test_format_newc.c \
cpio/test/test_gcpio_compat.c \
diff --git a/archivers/libarchive/files/Makefile.in b/archivers/libarchive/files/Makefile.in
index 0bcc34d87f2..06dba1c720d 100644
--- a/archivers/libarchive/files/Makefile.in
+++ b/archivers/libarchive/files/Makefile.in
@@ -41,9 +41,8 @@ TESTS = libarchive_test$(EXEEXT) $(am__EXEEXT_3) $(am__EXEEXT_4)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.h.in $(top_srcdir)/configure \
- $(top_srcdir)/libarchive/archive.h.in COPYING INSTALL NEWS \
- config.aux/compile config.aux/config.guess \
+ $(srcdir)/config.h.in $(top_srcdir)/configure COPYING INSTALL \
+ NEWS config.aux/compile config.aux/config.guess \
config.aux/config.sub config.aux/depcomp config.aux/install-sh \
config.aux/ltmain.sh config.aux/missing config.aux/ylwrap \
tar/getdate.c
@@ -55,7 +54,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = libarchive/archive.h
+CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -64,65 +63,60 @@ am__vpath_adj = case $$p in \
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \
- "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(includedir)" \
- "$(DESTDIR)$(includedir)"
+ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libarchive_la_LIBADD =
am__dirstamp = $(am__leading_dot)dirstamp
-am_libarchive_la_OBJECTS = \
- libarchive/libarchive_la-archive_check_magic.lo \
- libarchive/libarchive_la-archive_entry.lo \
- libarchive/libarchive_la-archive_entry_copy_stat.lo \
- libarchive/libarchive_la-archive_entry_link_resolver.lo \
- libarchive/libarchive_la-archive_entry_stat.lo \
- libarchive/libarchive_la-archive_entry_strmode.lo \
- libarchive/libarchive_la-archive_read.lo \
- libarchive/libarchive_la-archive_read_data_into_fd.lo \
- libarchive/libarchive_la-archive_read_extract.lo \
- libarchive/libarchive_la-archive_read_open_fd.lo \
- libarchive/libarchive_la-archive_read_open_file.lo \
- libarchive/libarchive_la-archive_read_open_filename.lo \
- libarchive/libarchive_la-archive_read_open_memory.lo \
- libarchive/libarchive_la-archive_read_support_compression_all.lo \
- libarchive/libarchive_la-archive_read_support_compression_bzip2.lo \
- libarchive/libarchive_la-archive_read_support_compression_compress.lo \
- libarchive/libarchive_la-archive_read_support_compression_gzip.lo \
- libarchive/libarchive_la-archive_read_support_compression_none.lo \
- libarchive/libarchive_la-archive_read_support_compression_program.lo \
- libarchive/libarchive_la-archive_read_support_format_all.lo \
- libarchive/libarchive_la-archive_read_support_format_ar.lo \
- libarchive/libarchive_la-archive_read_support_format_cpio.lo \
- libarchive/libarchive_la-archive_read_support_format_empty.lo \
- libarchive/libarchive_la-archive_read_support_format_iso9660.lo \
- libarchive/libarchive_la-archive_read_support_format_mtree.lo \
- libarchive/libarchive_la-archive_read_support_format_tar.lo \
- libarchive/libarchive_la-archive_read_support_format_zip.lo \
- libarchive/libarchive_la-archive_string.lo \
- libarchive/libarchive_la-archive_string_sprintf.lo \
- libarchive/libarchive_la-archive_util.lo \
- libarchive/libarchive_la-archive_virtual.lo \
- libarchive/libarchive_la-archive_write.lo \
- libarchive/libarchive_la-archive_write_disk.lo \
- libarchive/libarchive_la-archive_write_disk_set_standard_lookup.lo \
- libarchive/libarchive_la-archive_write_open_fd.lo \
- libarchive/libarchive_la-archive_write_open_file.lo \
- libarchive/libarchive_la-archive_write_open_filename.lo \
- libarchive/libarchive_la-archive_write_open_memory.lo \
- libarchive/libarchive_la-archive_write_set_compression_bzip2.lo \
- libarchive/libarchive_la-archive_write_set_compression_compress.lo \
- libarchive/libarchive_la-archive_write_set_compression_gzip.lo \
- libarchive/libarchive_la-archive_write_set_compression_none.lo \
- libarchive/libarchive_la-archive_write_set_compression_program.lo \
- libarchive/libarchive_la-archive_write_set_format.lo \
- libarchive/libarchive_la-archive_write_set_format_ar.lo \
- libarchive/libarchive_la-archive_write_set_format_by_name.lo \
- libarchive/libarchive_la-archive_write_set_format_cpio.lo \
- libarchive/libarchive_la-archive_write_set_format_cpio_newc.lo \
- libarchive/libarchive_la-archive_write_set_format_pax.lo \
- libarchive/libarchive_la-archive_write_set_format_shar.lo \
- libarchive/libarchive_la-archive_write_set_format_ustar.lo \
- libarchive/libarchive_la-filter_fork.lo
+am_libarchive_la_OBJECTS = libarchive/archive_check_magic.lo \
+ libarchive/archive_entry.lo \
+ libarchive/archive_entry_copy_stat.lo \
+ libarchive/archive_entry_link_resolver.lo \
+ libarchive/archive_entry_stat.lo \
+ libarchive/archive_entry_strmode.lo libarchive/archive_read.lo \
+ libarchive/archive_read_data_into_fd.lo \
+ libarchive/archive_read_extract.lo \
+ libarchive/archive_read_open_fd.lo \
+ libarchive/archive_read_open_file.lo \
+ libarchive/archive_read_open_filename.lo \
+ libarchive/archive_read_open_memory.lo \
+ libarchive/archive_read_support_compression_all.lo \
+ libarchive/archive_read_support_compression_bzip2.lo \
+ libarchive/archive_read_support_compression_compress.lo \
+ libarchive/archive_read_support_compression_gzip.lo \
+ libarchive/archive_read_support_compression_none.lo \
+ libarchive/archive_read_support_compression_program.lo \
+ libarchive/archive_read_support_format_all.lo \
+ libarchive/archive_read_support_format_ar.lo \
+ libarchive/archive_read_support_format_cpio.lo \
+ libarchive/archive_read_support_format_empty.lo \
+ libarchive/archive_read_support_format_iso9660.lo \
+ libarchive/archive_read_support_format_mtree.lo \
+ libarchive/archive_read_support_format_tar.lo \
+ libarchive/archive_read_support_format_zip.lo \
+ libarchive/archive_string.lo \
+ libarchive/archive_string_sprintf.lo \
+ libarchive/archive_util.lo libarchive/archive_virtual.lo \
+ libarchive/archive_write.lo libarchive/archive_write_disk.lo \
+ libarchive/archive_write_disk_set_standard_lookup.lo \
+ libarchive/archive_write_open_fd.lo \
+ libarchive/archive_write_open_file.lo \
+ libarchive/archive_write_open_filename.lo \
+ libarchive/archive_write_open_memory.lo \
+ libarchive/archive_write_set_compression_bzip2.lo \
+ libarchive/archive_write_set_compression_compress.lo \
+ libarchive/archive_write_set_compression_gzip.lo \
+ libarchive/archive_write_set_compression_none.lo \
+ libarchive/archive_write_set_compression_program.lo \
+ libarchive/archive_write_set_format.lo \
+ libarchive/archive_write_set_format_ar.lo \
+ libarchive/archive_write_set_format_by_name.lo \
+ libarchive/archive_write_set_format_cpio.lo \
+ libarchive/archive_write_set_format_cpio_newc.lo \
+ libarchive/archive_write_set_format_pax.lo \
+ libarchive/archive_write_set_format_shar.lo \
+ libarchive/archive_write_set_format_ustar.lo \
+ libarchive/filter_fork.lo
libarchive_la_OBJECTS = $(am_libarchive_la_OBJECTS)
libarchive_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -145,6 +139,7 @@ am_bsdcpio_test_OBJECTS = cpio/bsdcpio_test-cmdline.$(OBJEXT) \
cpio/bsdcpio_test-err.$(OBJEXT) \
cpio/bsdcpio_test-pathmatch.$(OBJEXT) \
cpio/test/bsdcpio_test-main.$(OBJEXT) \
+ cpio/test/bsdcpio_test-test_0.$(OBJEXT) \
cpio/test/bsdcpio_test-test_basic.$(OBJEXT) \
cpio/test/bsdcpio_test-test_format_newc.$(OBJEXT) \
cpio/test/bsdcpio_test-test_gcpio_compat.$(OBJEXT) \
@@ -168,7 +163,8 @@ bsdcpio_test_OBJECTS = $(am_bsdcpio_test_OBJECTS)
bsdcpio_test_LDADD = $(LDADD)
am_bsdtar_OBJECTS = tar/bsdtar-bsdtar.$(OBJEXT) \
tar/bsdtar-getdate.$(OBJEXT) tar/bsdtar-matching.$(OBJEXT) \
- tar/bsdtar-read.$(OBJEXT) tar/bsdtar-tree.$(OBJEXT) \
+ tar/bsdtar-read.$(OBJEXT) tar/bsdtar-siginfo.$(OBJEXT) \
+ tar/bsdtar-subst.$(OBJEXT) tar/bsdtar-tree.$(OBJEXT) \
tar/bsdtar-util.$(OBJEXT) tar/bsdtar-write.$(OBJEXT)
bsdtar_OBJECTS = $(am_bsdtar_OBJECTS)
bsdtar_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -176,10 +172,13 @@ bsdtar_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(LDFLAGS) -o $@
am_bsdtar_test_OBJECTS = tar/bsdtar_test-getdate.$(OBJEXT) \
tar/test/bsdtar_test-main.$(OBJEXT) \
+ tar/test/bsdtar_test-test_0.$(OBJEXT) \
tar/test/bsdtar_test-test_basic.$(OBJEXT) \
tar/test/bsdtar_test-test_copy.$(OBJEXT) \
tar/test/bsdtar_test-test_getdate.$(OBJEXT) \
tar/test/bsdtar_test-test_help.$(OBJEXT) \
+ tar/test/bsdtar_test-test_option_T.$(OBJEXT) \
+ tar/test/bsdtar_test-test_patterns.$(OBJEXT) \
tar/test/bsdtar_test-test_stdio.$(OBJEXT) \
tar/test/bsdtar_test-test_version.$(OBJEXT)
bsdtar_test_OBJECTS = $(am_bsdtar_test_OBJECTS)
@@ -271,6 +270,7 @@ am_libarchive_test_OBJECTS = $(am__objects_1) \
libarchive/test/libarchive_test-test_read_format_mtree.$(OBJEXT) \
libarchive/test/libarchive_test-test_read_format_pax_bz2.$(OBJEXT) \
libarchive/test/libarchive_test-test_read_format_tar.$(OBJEXT) \
+ libarchive/test/libarchive_test-test_read_format_tar_empty_filename.$(OBJEXT) \
libarchive/test/libarchive_test-test_read_format_tbz.$(OBJEXT) \
libarchive/test/libarchive_test-test_read_format_tgz.$(OBJEXT) \
libarchive/test/libarchive_test-test_read_format_tz.$(OBJEXT) \
@@ -281,6 +281,7 @@ am_libarchive_test_OBJECTS = $(am__objects_1) \
libarchive/test/libarchive_test-test_read_truncated.$(OBJEXT) \
libarchive/test/libarchive_test-test_tar_filenames.$(OBJEXT) \
libarchive/test/libarchive_test-test_tar_large.$(OBJEXT) \
+ libarchive/test/libarchive_test-test_ustar_filenames.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_compress.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_compress_program.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_disk.$(OBJEXT) \
@@ -295,6 +296,7 @@ am_libarchive_test_OBJECTS = $(am__objects_1) \
libarchive/test/libarchive_test-test_write_format_shar_empty.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_format_tar.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_format_tar_empty.$(OBJEXT) \
+ libarchive/test/libarchive_test-test_write_format_tar_ustar.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_open_memory.$(OBJEXT)
libarchive_test_OBJECTS = $(am_libarchive_test_OBJECTS)
libarchive_test_LDADD = $(LDADD)
@@ -326,8 +328,7 @@ man5dir = $(mandir)/man5
NROFF = nroff
MANS = $(man_MANS)
includeHEADERS_INSTALL = $(INSTALL_HEADER)
-nodist_includeHEADERS_INSTALL = $(INSTALL_HEADER)
-HEADERS = $(include_HEADERS) $(nodist_include_HEADERS)
+HEADERS = $(include_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -471,8 +472,9 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio
#
EXTRA_DIST = version \
contrib \
+ doc \
examples \
- doc \
+ windows \
$(libarchive_EXTRA_DIST) \
$(libarchive_test_EXTRA_DIST) \
$(bsdtar_EXTRA_DIST) \
@@ -494,10 +496,7 @@ DISTCLEANFILES = tar/getdate.c tar/getdate.h \
# Libarchive headers, source, etc.
#
#
-include_HEADERS = libarchive/archive_entry.h
-# Note: archive.h is built from archive.h.in, so don't
-# include archive.h in the distfile, but do install it.
-nodist_include_HEADERS = libarchive/archive.h
+include_HEADERS = libarchive/archive.h libarchive/archive_entry.h
libarchive_la_SOURCES = \
libarchive/archive_check_magic.c \
libarchive/archive_endian.h \
@@ -565,9 +564,9 @@ libarchive_la_SOURCES = \
libarchive/filter_fork.h
-# archive.h ends up in the build directory, so make sure we can find it.
-libarchive_la_CPPFLAGS = -I$(top_builddir)/libarchive
-libarchive_la_LDFLAGS = -version-info $(ARCHIVE_LIBTOOL_VERSION)
+# cygwin barfs without -no-undefined; I don't know what it does or
+# whether it helps or hurts other platforms...
+libarchive_la_LDFLAGS = -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION)
# Manpages to install
libarchive_man_MANS = \
@@ -586,7 +585,9 @@ libarchive_man_MANS = \
# Additional libarchive files to include in the distribution
libarchive_EXTRA_DIST = \
- libarchive/test/list.h \
+ libarchive/test/list.h \
+ libarchive/archive_windows.c \
+ libarchive/archive_windows.h \
$(libarchive_man_MANS)
@@ -631,6 +632,7 @@ libarchive_test_SOURCES = \
libarchive/test/test_read_format_mtree.c \
libarchive/test/test_read_format_pax_bz2.c \
libarchive/test/test_read_format_tar.c \
+ libarchive/test/test_read_format_tar_empty_filename.c \
libarchive/test/test_read_format_tbz.c \
libarchive/test/test_read_format_tgz.c \
libarchive/test/test_read_format_tz.c \
@@ -641,6 +643,7 @@ libarchive_test_SOURCES = \
libarchive/test/test_read_truncated.c \
libarchive/test/test_tar_filenames.c \
libarchive/test/test_tar_large.c \
+ libarchive/test/test_ustar_filenames.c \
libarchive/test/test_write_compress.c \
libarchive/test/test_write_compress_program.c \
libarchive/test/test_write_disk.c \
@@ -655,6 +658,7 @@ libarchive_test_SOURCES = \
libarchive/test/test_write_format_shar_empty.c \
libarchive/test/test_write_format_tar.c \
libarchive/test/test_write_format_tar_empty.c \
+ libarchive/test/test_write_format_tar_ustar.c \
libarchive/test/test_write_open_memory.c
libarchive_test_CPPFLAGS = -I$(top_builddir)/libarchive -I$(top_srcdir)/libarchive -I$(top_builddir)/libarchive/test
@@ -669,7 +673,8 @@ libarchive_test_EXTRA_DIST = \
libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tgz.uu \
libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tgz.uu \
libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tgz.uu \
- libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu
+ libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu \
+ libarchive/test/test_read_format_tar_empty_filename.tar.uu
#
@@ -684,15 +689,14 @@ bsdtar_SOURCES = \
tar/getdate.y \
tar/matching.c \
tar/read.c \
+ tar/siginfo.c \
+ tar/subst.c \
tar/tree.c \
tar/tree.h \
tar/util.c \
tar/write.c
-bsdtar_DEPENDENCIES = libarchive.la \
- libarchive/archive_entry.h \
- libarchive/archive.h
-
+bsdtar_DEPENDENCIES = libarchive.la
@STATIC_BSDTAR_FALSE@bsdtar_static =
@STATIC_BSDTAR_TRUE@bsdtar_static = -static
bsdtar_LDADD = libarchive.la
@@ -713,16 +717,16 @@ bsdtar_test_SOURCES = \
tar/getdate.c \
tar/test/main.c \
tar/test/test.h \
+ tar/test/test_0.c \
tar/test/test_basic.c \
tar/test/test_copy.c \
tar/test/test_getdate.c \
tar/test/test_help.c \
+ tar/test/test_option_T.c \
+ tar/test/test_patterns.c \
tar/test/test_stdio.c \
tar/test/test_version.c
-bsdtar_test_EXTRA_DIST = \
- tar/test/old
-
bsdtar_test_CPPFLAGS = -I$(top_builddir)/tar/test
@BUILD_BSDTAR_FALSE@bsdtar_test_programs =
@BUILD_BSDTAR_TRUE@bsdtar_test_programs = bsdtar_test
@@ -745,10 +749,7 @@ bsdcpio_SOURCES = \
cpio/pathmatch.c \
cpio/pathmatch.h
-bsdcpio_DEPENDENCIES = libarchive.la \
- libarchive/archive_entry.h \
- libarchive/archive.h
-
+bsdcpio_DEPENDENCIES = libarchive.la
@STATIC_BSDCPIO_FALSE@bsdcpio_static =
@STATIC_BSDCPIO_TRUE@bsdcpio_static = -static
bsdcpio_LDADD = libarchive.la
@@ -774,6 +775,7 @@ bsdcpio_test_SOURCES = \
cpio/pathmatch.c \
cpio/test/main.c \
cpio/test/test.h \
+ cpio/test/test_0.c \
cpio/test/test_basic.c \
cpio/test/test_format_newc.c \
cpio/test/test_gcpio_compat.c \
@@ -865,8 +867,6 @@ $(srcdir)/config.h.in: $(am__configure_deps)
distclean-hdr:
-rm -f config.h stamp-h1
-libarchive/archive.h: $(top_builddir)/config.status $(top_srcdir)/libarchive/archive.h.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@@ -900,156 +900,135 @@ libarchive/$(am__dirstamp):
libarchive/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) libarchive/$(DEPDIR)
@: > libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_check_magic.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_check_magic.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_entry.lo: libarchive/$(am__dirstamp) \
+libarchive/archive_entry.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_entry_copy_stat.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_entry_copy_stat.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_entry_link_resolver.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_entry_link_resolver.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_entry_stat.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_entry_stat.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_entry_strmode.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_entry_strmode.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read.lo: libarchive/$(am__dirstamp) \
+libarchive/archive_read.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_data_into_fd.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_read_data_into_fd.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_extract.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_read_extract.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_open_fd.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_read_open_fd.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_open_file.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_read_open_file.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_open_filename.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_read_open_filename.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_open_memory.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_read_open_memory.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_compression_all.lo: \
+libarchive/archive_read_support_compression_all.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_compression_bzip2.lo: \
+libarchive/archive_read_support_compression_bzip2.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_compression_compress.lo: \
+libarchive/archive_read_support_compression_compress.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_compression_gzip.lo: \
+libarchive/archive_read_support_compression_gzip.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_compression_none.lo: \
+libarchive/archive_read_support_compression_none.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_compression_program.lo: \
+libarchive/archive_read_support_compression_program.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_format_all.lo: \
+libarchive/archive_read_support_format_all.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_format_ar.lo: \
+libarchive/archive_read_support_format_ar.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_format_cpio.lo: \
+libarchive/archive_read_support_format_cpio.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_format_empty.lo: \
+libarchive/archive_read_support_format_empty.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_format_iso9660.lo: \
+libarchive/archive_read_support_format_iso9660.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_format_mtree.lo: \
+libarchive/archive_read_support_format_mtree.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_format_tar.lo: \
+libarchive/archive_read_support_format_tar.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_read_support_format_zip.lo: \
+libarchive/archive_read_support_format_zip.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_string.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_string.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_string_sprintf.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_string_sprintf.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_util.lo: libarchive/$(am__dirstamp) \
+libarchive/archive_util.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_virtual.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_virtual.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write.lo: libarchive/$(am__dirstamp) \
+libarchive/archive_write.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_disk.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_write_disk.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_disk_set_standard_lookup.lo: \
+libarchive/archive_write_disk_set_standard_lookup.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_open_fd.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_write_open_fd.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_open_file.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_write_open_file.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_open_filename.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_write_open_filename.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_open_memory.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_write_open_memory.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_compression_bzip2.lo: \
+libarchive/archive_write_set_compression_bzip2.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_compression_compress.lo: \
+libarchive/archive_write_set_compression_compress.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_compression_gzip.lo: \
+libarchive/archive_write_set_compression_gzip.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_compression_none.lo: \
+libarchive/archive_write_set_compression_none.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_compression_program.lo: \
+libarchive/archive_write_set_compression_program.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_format.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_write_set_format.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_format_ar.lo: \
- libarchive/$(am__dirstamp) \
+libarchive/archive_write_set_format_ar.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_format_by_name.lo: \
+libarchive/archive_write_set_format_by_name.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_format_cpio.lo: \
+libarchive/archive_write_set_format_cpio.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_format_cpio_newc.lo: \
+libarchive/archive_write_set_format_cpio_newc.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_format_pax.lo: \
+libarchive/archive_write_set_format_pax.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_format_shar.lo: \
+libarchive/archive_write_set_format_shar.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-archive_write_set_format_ustar.lo: \
+libarchive/archive_write_set_format_ustar.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/libarchive_la-filter_fork.lo: libarchive/$(am__dirstamp) \
+libarchive/filter_fork.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
libarchive.la: $(libarchive_la_OBJECTS) $(libarchive_la_DEPENDENCIES)
$(libarchive_la_LINK) -rpath $(libdir) $(libarchive_la_OBJECTS) $(libarchive_la_LIBADD) $(LIBS)
@@ -1121,6 +1100,8 @@ cpio/test/$(DEPDIR)/$(am__dirstamp):
@: > cpio/test/$(DEPDIR)/$(am__dirstamp)
cpio/test/bsdcpio_test-main.$(OBJEXT): cpio/test/$(am__dirstamp) \
cpio/test/$(DEPDIR)/$(am__dirstamp)
+cpio/test/bsdcpio_test-test_0.$(OBJEXT): cpio/test/$(am__dirstamp) \
+ cpio/test/$(DEPDIR)/$(am__dirstamp)
cpio/test/bsdcpio_test-test_basic.$(OBJEXT): \
cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
cpio/test/bsdcpio_test-test_format_newc.$(OBJEXT): \
@@ -1176,6 +1157,10 @@ tar/bsdtar-matching.$(OBJEXT): tar/$(am__dirstamp) \
tar/$(DEPDIR)/$(am__dirstamp)
tar/bsdtar-read.$(OBJEXT): tar/$(am__dirstamp) \
tar/$(DEPDIR)/$(am__dirstamp)
+tar/bsdtar-siginfo.$(OBJEXT): tar/$(am__dirstamp) \
+ tar/$(DEPDIR)/$(am__dirstamp)
+tar/bsdtar-subst.$(OBJEXT): tar/$(am__dirstamp) \
+ tar/$(DEPDIR)/$(am__dirstamp)
tar/bsdtar-tree.$(OBJEXT): tar/$(am__dirstamp) \
tar/$(DEPDIR)/$(am__dirstamp)
tar/bsdtar-util.$(OBJEXT): tar/$(am__dirstamp) \
@@ -1195,6 +1180,8 @@ tar/test/$(DEPDIR)/$(am__dirstamp):
@: > tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-main.$(OBJEXT): tar/test/$(am__dirstamp) \
tar/test/$(DEPDIR)/$(am__dirstamp)
+tar/test/bsdtar_test-test_0.$(OBJEXT): tar/test/$(am__dirstamp) \
+ tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_basic.$(OBJEXT): tar/test/$(am__dirstamp) \
tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_copy.$(OBJEXT): tar/test/$(am__dirstamp) \
@@ -1203,6 +1190,10 @@ tar/test/bsdtar_test-test_getdate.$(OBJEXT): tar/test/$(am__dirstamp) \
tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_help.$(OBJEXT): tar/test/$(am__dirstamp) \
tar/test/$(DEPDIR)/$(am__dirstamp)
+tar/test/bsdtar_test-test_option_T.$(OBJEXT): \
+ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
+tar/test/bsdtar_test-test_patterns.$(OBJEXT): \
+ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_stdio.$(OBJEXT): tar/test/$(am__dirstamp) \
tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_version.$(OBJEXT): tar/test/$(am__dirstamp) \
@@ -1471,6 +1462,9 @@ libarchive/test/libarchive_test-test_read_format_pax_bz2.$(OBJEXT): \
libarchive/test/libarchive_test-test_read_format_tar.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/libarchive_test-test_read_format_tar_empty_filename.$(OBJEXT): \
+ libarchive/test/$(am__dirstamp) \
+ libarchive/test/$(DEPDIR)/$(am__dirstamp)
libarchive/test/libarchive_test-test_read_format_tbz.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -1501,6 +1495,9 @@ libarchive/test/libarchive_test-test_tar_filenames.$(OBJEXT): \
libarchive/test/libarchive_test-test_tar_large.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/libarchive_test-test_ustar_filenames.$(OBJEXT): \
+ libarchive/test/$(am__dirstamp) \
+ libarchive/test/$(DEPDIR)/$(am__dirstamp)
libarchive/test/libarchive_test-test_write_compress.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -1543,6 +1540,9 @@ libarchive/test/libarchive_test-test_write_format_tar.$(OBJEXT): \
libarchive/test/libarchive_test-test_write_format_tar_empty.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/libarchive_test-test_write_format_tar_ustar.$(OBJEXT): \
+ libarchive/test/$(am__dirstamp) \
+ libarchive/test/$(DEPDIR)/$(am__dirstamp)
libarchive/test/libarchive_test-test_write_open_memory.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -1561,6 +1561,7 @@ mostlyclean-compile:
-rm -f cpio/bsdcpio_test-err.$(OBJEXT)
-rm -f cpio/bsdcpio_test-pathmatch.$(OBJEXT)
-rm -f cpio/test/bsdcpio_test-main.$(OBJEXT)
+ -rm -f cpio/test/bsdcpio_test-test_0.$(OBJEXT)
-rm -f cpio/test/bsdcpio_test-test_basic.$(OBJEXT)
-rm -f cpio/test/bsdcpio_test-test_format_newc.$(OBJEXT)
-rm -f cpio/test/bsdcpio_test-test_gcpio_compat.$(OBJEXT)
@@ -1580,110 +1581,110 @@ mostlyclean-compile:
-rm -f cpio/test/bsdcpio_test-test_option_z.$(OBJEXT)
-rm -f cpio/test/bsdcpio_test-test_owner_parse.$(OBJEXT)
-rm -f cpio/test/bsdcpio_test-test_pathmatch.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_check_magic.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_check_magic.lo
- -rm -f libarchive/libarchive_la-archive_entry.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_entry.lo
- -rm -f libarchive/libarchive_la-archive_entry_copy_stat.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_entry_copy_stat.lo
- -rm -f libarchive/libarchive_la-archive_entry_link_resolver.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_entry_link_resolver.lo
- -rm -f libarchive/libarchive_la-archive_entry_stat.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_entry_stat.lo
- -rm -f libarchive/libarchive_la-archive_entry_strmode.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_entry_strmode.lo
- -rm -f libarchive/libarchive_la-archive_read.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read.lo
- -rm -f libarchive/libarchive_la-archive_read_data_into_fd.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_data_into_fd.lo
- -rm -f libarchive/libarchive_la-archive_read_extract.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_extract.lo
- -rm -f libarchive/libarchive_la-archive_read_open_fd.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_open_fd.lo
- -rm -f libarchive/libarchive_la-archive_read_open_file.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_open_file.lo
- -rm -f libarchive/libarchive_la-archive_read_open_filename.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_open_filename.lo
- -rm -f libarchive/libarchive_la-archive_read_open_memory.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_open_memory.lo
- -rm -f libarchive/libarchive_la-archive_read_support_compression_all.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_compression_all.lo
- -rm -f libarchive/libarchive_la-archive_read_support_compression_bzip2.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_compression_bzip2.lo
- -rm -f libarchive/libarchive_la-archive_read_support_compression_compress.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_compression_compress.lo
- -rm -f libarchive/libarchive_la-archive_read_support_compression_gzip.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_compression_gzip.lo
- -rm -f libarchive/libarchive_la-archive_read_support_compression_none.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_compression_none.lo
- -rm -f libarchive/libarchive_la-archive_read_support_compression_program.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_compression_program.lo
- -rm -f libarchive/libarchive_la-archive_read_support_format_all.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_format_all.lo
- -rm -f libarchive/libarchive_la-archive_read_support_format_ar.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_format_ar.lo
- -rm -f libarchive/libarchive_la-archive_read_support_format_cpio.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_format_cpio.lo
- -rm -f libarchive/libarchive_la-archive_read_support_format_empty.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_format_empty.lo
- -rm -f libarchive/libarchive_la-archive_read_support_format_iso9660.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_format_iso9660.lo
- -rm -f libarchive/libarchive_la-archive_read_support_format_mtree.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_format_mtree.lo
- -rm -f libarchive/libarchive_la-archive_read_support_format_tar.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_format_tar.lo
- -rm -f libarchive/libarchive_la-archive_read_support_format_zip.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_read_support_format_zip.lo
- -rm -f libarchive/libarchive_la-archive_string.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_string.lo
- -rm -f libarchive/libarchive_la-archive_string_sprintf.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_string_sprintf.lo
- -rm -f libarchive/libarchive_la-archive_util.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_util.lo
- -rm -f libarchive/libarchive_la-archive_virtual.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_virtual.lo
- -rm -f libarchive/libarchive_la-archive_write.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write.lo
- -rm -f libarchive/libarchive_la-archive_write_disk.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_disk.lo
- -rm -f libarchive/libarchive_la-archive_write_disk_set_standard_lookup.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_disk_set_standard_lookup.lo
- -rm -f libarchive/libarchive_la-archive_write_open_fd.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_open_fd.lo
- -rm -f libarchive/libarchive_la-archive_write_open_file.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_open_file.lo
- -rm -f libarchive/libarchive_la-archive_write_open_filename.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_open_filename.lo
- -rm -f libarchive/libarchive_la-archive_write_open_memory.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_open_memory.lo
- -rm -f libarchive/libarchive_la-archive_write_set_compression_bzip2.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_compression_bzip2.lo
- -rm -f libarchive/libarchive_la-archive_write_set_compression_compress.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_compression_compress.lo
- -rm -f libarchive/libarchive_la-archive_write_set_compression_gzip.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_compression_gzip.lo
- -rm -f libarchive/libarchive_la-archive_write_set_compression_none.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_compression_none.lo
- -rm -f libarchive/libarchive_la-archive_write_set_compression_program.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_compression_program.lo
- -rm -f libarchive/libarchive_la-archive_write_set_format.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_format.lo
- -rm -f libarchive/libarchive_la-archive_write_set_format_ar.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_format_ar.lo
- -rm -f libarchive/libarchive_la-archive_write_set_format_by_name.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_format_by_name.lo
- -rm -f libarchive/libarchive_la-archive_write_set_format_cpio.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_format_cpio.lo
- -rm -f libarchive/libarchive_la-archive_write_set_format_cpio_newc.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_format_cpio_newc.lo
- -rm -f libarchive/libarchive_la-archive_write_set_format_pax.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_format_pax.lo
- -rm -f libarchive/libarchive_la-archive_write_set_format_shar.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_format_shar.lo
- -rm -f libarchive/libarchive_la-archive_write_set_format_ustar.$(OBJEXT)
- -rm -f libarchive/libarchive_la-archive_write_set_format_ustar.lo
- -rm -f libarchive/libarchive_la-filter_fork.$(OBJEXT)
- -rm -f libarchive/libarchive_la-filter_fork.lo
+ -rm -f libarchive/archive_check_magic.$(OBJEXT)
+ -rm -f libarchive/archive_check_magic.lo
+ -rm -f libarchive/archive_entry.$(OBJEXT)
+ -rm -f libarchive/archive_entry.lo
+ -rm -f libarchive/archive_entry_copy_stat.$(OBJEXT)
+ -rm -f libarchive/archive_entry_copy_stat.lo
+ -rm -f libarchive/archive_entry_link_resolver.$(OBJEXT)
+ -rm -f libarchive/archive_entry_link_resolver.lo
+ -rm -f libarchive/archive_entry_stat.$(OBJEXT)
+ -rm -f libarchive/archive_entry_stat.lo
+ -rm -f libarchive/archive_entry_strmode.$(OBJEXT)
+ -rm -f libarchive/archive_entry_strmode.lo
+ -rm -f libarchive/archive_read.$(OBJEXT)
+ -rm -f libarchive/archive_read.lo
+ -rm -f libarchive/archive_read_data_into_fd.$(OBJEXT)
+ -rm -f libarchive/archive_read_data_into_fd.lo
+ -rm -f libarchive/archive_read_extract.$(OBJEXT)
+ -rm -f libarchive/archive_read_extract.lo
+ -rm -f libarchive/archive_read_open_fd.$(OBJEXT)
+ -rm -f libarchive/archive_read_open_fd.lo
+ -rm -f libarchive/archive_read_open_file.$(OBJEXT)
+ -rm -f libarchive/archive_read_open_file.lo
+ -rm -f libarchive/archive_read_open_filename.$(OBJEXT)
+ -rm -f libarchive/archive_read_open_filename.lo
+ -rm -f libarchive/archive_read_open_memory.$(OBJEXT)
+ -rm -f libarchive/archive_read_open_memory.lo
+ -rm -f libarchive/archive_read_support_compression_all.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_compression_all.lo
+ -rm -f libarchive/archive_read_support_compression_bzip2.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_compression_bzip2.lo
+ -rm -f libarchive/archive_read_support_compression_compress.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_compression_compress.lo
+ -rm -f libarchive/archive_read_support_compression_gzip.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_compression_gzip.lo
+ -rm -f libarchive/archive_read_support_compression_none.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_compression_none.lo
+ -rm -f libarchive/archive_read_support_compression_program.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_compression_program.lo
+ -rm -f libarchive/archive_read_support_format_all.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_format_all.lo
+ -rm -f libarchive/archive_read_support_format_ar.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_format_ar.lo
+ -rm -f libarchive/archive_read_support_format_cpio.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_format_cpio.lo
+ -rm -f libarchive/archive_read_support_format_empty.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_format_empty.lo
+ -rm -f libarchive/archive_read_support_format_iso9660.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_format_iso9660.lo
+ -rm -f libarchive/archive_read_support_format_mtree.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_format_mtree.lo
+ -rm -f libarchive/archive_read_support_format_tar.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_format_tar.lo
+ -rm -f libarchive/archive_read_support_format_zip.$(OBJEXT)
+ -rm -f libarchive/archive_read_support_format_zip.lo
+ -rm -f libarchive/archive_string.$(OBJEXT)
+ -rm -f libarchive/archive_string.lo
+ -rm -f libarchive/archive_string_sprintf.$(OBJEXT)
+ -rm -f libarchive/archive_string_sprintf.lo
+ -rm -f libarchive/archive_util.$(OBJEXT)
+ -rm -f libarchive/archive_util.lo
+ -rm -f libarchive/archive_virtual.$(OBJEXT)
+ -rm -f libarchive/archive_virtual.lo
+ -rm -f libarchive/archive_write.$(OBJEXT)
+ -rm -f libarchive/archive_write.lo
+ -rm -f libarchive/archive_write_disk.$(OBJEXT)
+ -rm -f libarchive/archive_write_disk.lo
+ -rm -f libarchive/archive_write_disk_set_standard_lookup.$(OBJEXT)
+ -rm -f libarchive/archive_write_disk_set_standard_lookup.lo
+ -rm -f libarchive/archive_write_open_fd.$(OBJEXT)
+ -rm -f libarchive/archive_write_open_fd.lo
+ -rm -f libarchive/archive_write_open_file.$(OBJEXT)
+ -rm -f libarchive/archive_write_open_file.lo
+ -rm -f libarchive/archive_write_open_filename.$(OBJEXT)
+ -rm -f libarchive/archive_write_open_filename.lo
+ -rm -f libarchive/archive_write_open_memory.$(OBJEXT)
+ -rm -f libarchive/archive_write_open_memory.lo
+ -rm -f libarchive/archive_write_set_compression_bzip2.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_compression_bzip2.lo
+ -rm -f libarchive/archive_write_set_compression_compress.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_compression_compress.lo
+ -rm -f libarchive/archive_write_set_compression_gzip.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_compression_gzip.lo
+ -rm -f libarchive/archive_write_set_compression_none.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_compression_none.lo
+ -rm -f libarchive/archive_write_set_compression_program.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_compression_program.lo
+ -rm -f libarchive/archive_write_set_format.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_format.lo
+ -rm -f libarchive/archive_write_set_format_ar.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_format_ar.lo
+ -rm -f libarchive/archive_write_set_format_by_name.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_format_by_name.lo
+ -rm -f libarchive/archive_write_set_format_cpio.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_format_cpio.lo
+ -rm -f libarchive/archive_write_set_format_cpio_newc.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_format_cpio_newc.lo
+ -rm -f libarchive/archive_write_set_format_pax.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_format_pax.lo
+ -rm -f libarchive/archive_write_set_format_shar.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_format_shar.lo
+ -rm -f libarchive/archive_write_set_format_ustar.$(OBJEXT)
+ -rm -f libarchive/archive_write_set_format_ustar.lo
+ -rm -f libarchive/filter_fork.$(OBJEXT)
+ -rm -f libarchive/filter_fork.lo
-rm -f libarchive/libarchive_test-archive_check_magic.$(OBJEXT)
-rm -f libarchive/libarchive_test-archive_entry.$(OBJEXT)
-rm -f libarchive/libarchive_test-archive_entry_copy_stat.$(OBJEXT)
@@ -1769,6 +1770,7 @@ mostlyclean-compile:
-rm -f libarchive/test/libarchive_test-test_read_format_mtree.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_read_format_pax_bz2.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_read_format_tar.$(OBJEXT)
+ -rm -f libarchive/test/libarchive_test-test_read_format_tar_empty_filename.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_read_format_tbz.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_read_format_tgz.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_read_format_tz.$(OBJEXT)
@@ -1779,6 +1781,7 @@ mostlyclean-compile:
-rm -f libarchive/test/libarchive_test-test_read_truncated.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_tar_filenames.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_tar_large.$(OBJEXT)
+ -rm -f libarchive/test/libarchive_test-test_ustar_filenames.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_write_compress.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_write_compress_program.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_write_disk.$(OBJEXT)
@@ -1793,20 +1796,26 @@ mostlyclean-compile:
-rm -f libarchive/test/libarchive_test-test_write_format_shar_empty.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_write_format_tar.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_write_format_tar_empty.$(OBJEXT)
+ -rm -f libarchive/test/libarchive_test-test_write_format_tar_ustar.$(OBJEXT)
-rm -f libarchive/test/libarchive_test-test_write_open_memory.$(OBJEXT)
-rm -f tar/bsdtar-bsdtar.$(OBJEXT)
-rm -f tar/bsdtar-getdate.$(OBJEXT)
-rm -f tar/bsdtar-matching.$(OBJEXT)
-rm -f tar/bsdtar-read.$(OBJEXT)
+ -rm -f tar/bsdtar-siginfo.$(OBJEXT)
+ -rm -f tar/bsdtar-subst.$(OBJEXT)
-rm -f tar/bsdtar-tree.$(OBJEXT)
-rm -f tar/bsdtar-util.$(OBJEXT)
-rm -f tar/bsdtar-write.$(OBJEXT)
-rm -f tar/bsdtar_test-getdate.$(OBJEXT)
-rm -f tar/test/bsdtar_test-main.$(OBJEXT)
+ -rm -f tar/test/bsdtar_test-test_0.$(OBJEXT)
-rm -f tar/test/bsdtar_test-test_basic.$(OBJEXT)
-rm -f tar/test/bsdtar_test-test_copy.$(OBJEXT)
-rm -f tar/test/bsdtar_test-test_getdate.$(OBJEXT)
-rm -f tar/test/bsdtar_test-test_help.$(OBJEXT)
+ -rm -f tar/test/bsdtar_test-test_option_T.$(OBJEXT)
+ -rm -f tar/test/bsdtar_test-test_patterns.$(OBJEXT)
-rm -f tar/test/bsdtar_test-test_stdio.$(OBJEXT)
-rm -f tar/test/bsdtar_test-test_version.$(OBJEXT)
@@ -1822,6 +1831,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@cpio/$(DEPDIR)/bsdcpio_test-err.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/$(DEPDIR)/bsdcpio_test-pathmatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_0.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_basic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_format_newc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_gcpio_compat.Po@am__quote@
@@ -1841,58 +1851,58 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_option_z.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_owner_parse.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_pathmatch.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_check_magic.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_entry.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_entry_copy_stat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_entry_link_resolver.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_entry_stat.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_entry_strmode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_data_into_fd.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_extract.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_open_fd.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_open_file.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_open_filename.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_open_memory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_all.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_bzip2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_compress.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_gzip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_none.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_program.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_all.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_ar.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_cpio.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_empty.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_iso9660.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_mtree.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_tar.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_zip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_string.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_string_sprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_util.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_virtual.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_disk.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_disk_set_standard_lookup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_open_fd.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_open_file.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_open_filename.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_open_memory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_bzip2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_compress.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_gzip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_none.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_program.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_ar.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_by_name.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_cpio.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_cpio_newc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_pax.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_shar.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_ustar.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_la-filter_fork.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_check_magic.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry_copy_stat.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry_link_resolver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry_stat.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry_strmode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_data_into_fd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_extract.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_open_fd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_open_file.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_open_filename.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_open_memory.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_compression_all.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_compression_bzip2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_compression_compress.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_compression_gzip.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_compression_none.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_compression_program.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_all.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_ar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_cpio.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_empty.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_iso9660.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_mtree.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_tar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_zip.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_string.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_string_sprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_util.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_virtual.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_disk.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_disk_set_standard_lookup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_open_fd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_open_file.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_open_filename.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_open_memory.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_compression_bzip2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_compression_compress.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_compression_gzip.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_compression_none.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_compression_program.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_format.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_format_ar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_format_by_name.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_format_cpio.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_format_cpio_newc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_format_pax.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_format_shar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_set_format_ustar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/filter_fork.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_check_magic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_entry.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_entry_copy_stat.Po@am__quote@
@@ -1978,6 +1988,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_mtree.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_pax_bz2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar_empty_filename.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tbz.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tgz.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tz.Po@am__quote@
@@ -1988,6 +1999,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_truncated.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_tar_filenames.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_tar_large.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_ustar_filenames.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_compress.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_compress_program.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_disk.Po@am__quote@
@@ -2002,20 +2014,26 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_shar_empty.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_tar.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_tar_empty.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_tar_ustar.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_open_memory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar-bsdtar.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar-getdate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar-matching.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar-read.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar-siginfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar-subst.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar-tree.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar-util.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar-write.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/bsdtar_test-getdate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_0.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_basic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_copy.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_getdate.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_help.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_T.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_stdio.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_version.Po@am__quote@
@@ -2043,370 +2061,6 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-libarchive/libarchive_la-archive_check_magic.lo: libarchive/archive_check_magic.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_check_magic.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_check_magic.Tpo -c -o libarchive/libarchive_la-archive_check_magic.lo `test -f 'libarchive/archive_check_magic.c' || echo '$(srcdir)/'`libarchive/archive_check_magic.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_check_magic.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_check_magic.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_check_magic.c' object='libarchive/libarchive_la-archive_check_magic.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_check_magic.lo `test -f 'libarchive/archive_check_magic.c' || echo '$(srcdir)/'`libarchive/archive_check_magic.c
-
-libarchive/libarchive_la-archive_entry.lo: libarchive/archive_entry.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_entry.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_entry.Tpo -c -o libarchive/libarchive_la-archive_entry.lo `test -f 'libarchive/archive_entry.c' || echo '$(srcdir)/'`libarchive/archive_entry.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_entry.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_entry.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_entry.c' object='libarchive/libarchive_la-archive_entry.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_entry.lo `test -f 'libarchive/archive_entry.c' || echo '$(srcdir)/'`libarchive/archive_entry.c
-
-libarchive/libarchive_la-archive_entry_copy_stat.lo: libarchive/archive_entry_copy_stat.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_entry_copy_stat.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_entry_copy_stat.Tpo -c -o libarchive/libarchive_la-archive_entry_copy_stat.lo `test -f 'libarchive/archive_entry_copy_stat.c' || echo '$(srcdir)/'`libarchive/archive_entry_copy_stat.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_entry_copy_stat.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_entry_copy_stat.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_entry_copy_stat.c' object='libarchive/libarchive_la-archive_entry_copy_stat.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_entry_copy_stat.lo `test -f 'libarchive/archive_entry_copy_stat.c' || echo '$(srcdir)/'`libarchive/archive_entry_copy_stat.c
-
-libarchive/libarchive_la-archive_entry_link_resolver.lo: libarchive/archive_entry_link_resolver.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_entry_link_resolver.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_entry_link_resolver.Tpo -c -o libarchive/libarchive_la-archive_entry_link_resolver.lo `test -f 'libarchive/archive_entry_link_resolver.c' || echo '$(srcdir)/'`libarchive/archive_entry_link_resolver.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_entry_link_resolver.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_entry_link_resolver.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_entry_link_resolver.c' object='libarchive/libarchive_la-archive_entry_link_resolver.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_entry_link_resolver.lo `test -f 'libarchive/archive_entry_link_resolver.c' || echo '$(srcdir)/'`libarchive/archive_entry_link_resolver.c
-
-libarchive/libarchive_la-archive_entry_stat.lo: libarchive/archive_entry_stat.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_entry_stat.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_entry_stat.Tpo -c -o libarchive/libarchive_la-archive_entry_stat.lo `test -f 'libarchive/archive_entry_stat.c' || echo '$(srcdir)/'`libarchive/archive_entry_stat.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_entry_stat.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_entry_stat.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_entry_stat.c' object='libarchive/libarchive_la-archive_entry_stat.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_entry_stat.lo `test -f 'libarchive/archive_entry_stat.c' || echo '$(srcdir)/'`libarchive/archive_entry_stat.c
-
-libarchive/libarchive_la-archive_entry_strmode.lo: libarchive/archive_entry_strmode.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_entry_strmode.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_entry_strmode.Tpo -c -o libarchive/libarchive_la-archive_entry_strmode.lo `test -f 'libarchive/archive_entry_strmode.c' || echo '$(srcdir)/'`libarchive/archive_entry_strmode.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_entry_strmode.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_entry_strmode.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_entry_strmode.c' object='libarchive/libarchive_la-archive_entry_strmode.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_entry_strmode.lo `test -f 'libarchive/archive_entry_strmode.c' || echo '$(srcdir)/'`libarchive/archive_entry_strmode.c
-
-libarchive/libarchive_la-archive_read.lo: libarchive/archive_read.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read.Tpo -c -o libarchive/libarchive_la-archive_read.lo `test -f 'libarchive/archive_read.c' || echo '$(srcdir)/'`libarchive/archive_read.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read.c' object='libarchive/libarchive_la-archive_read.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read.lo `test -f 'libarchive/archive_read.c' || echo '$(srcdir)/'`libarchive/archive_read.c
-
-libarchive/libarchive_la-archive_read_data_into_fd.lo: libarchive/archive_read_data_into_fd.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_data_into_fd.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_data_into_fd.Tpo -c -o libarchive/libarchive_la-archive_read_data_into_fd.lo `test -f 'libarchive/archive_read_data_into_fd.c' || echo '$(srcdir)/'`libarchive/archive_read_data_into_fd.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_data_into_fd.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_data_into_fd.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_data_into_fd.c' object='libarchive/libarchive_la-archive_read_data_into_fd.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_data_into_fd.lo `test -f 'libarchive/archive_read_data_into_fd.c' || echo '$(srcdir)/'`libarchive/archive_read_data_into_fd.c
-
-libarchive/libarchive_la-archive_read_extract.lo: libarchive/archive_read_extract.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_extract.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_extract.Tpo -c -o libarchive/libarchive_la-archive_read_extract.lo `test -f 'libarchive/archive_read_extract.c' || echo '$(srcdir)/'`libarchive/archive_read_extract.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_extract.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_extract.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_extract.c' object='libarchive/libarchive_la-archive_read_extract.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_extract.lo `test -f 'libarchive/archive_read_extract.c' || echo '$(srcdir)/'`libarchive/archive_read_extract.c
-
-libarchive/libarchive_la-archive_read_open_fd.lo: libarchive/archive_read_open_fd.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_open_fd.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_open_fd.Tpo -c -o libarchive/libarchive_la-archive_read_open_fd.lo `test -f 'libarchive/archive_read_open_fd.c' || echo '$(srcdir)/'`libarchive/archive_read_open_fd.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_open_fd.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_open_fd.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_open_fd.c' object='libarchive/libarchive_la-archive_read_open_fd.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_open_fd.lo `test -f 'libarchive/archive_read_open_fd.c' || echo '$(srcdir)/'`libarchive/archive_read_open_fd.c
-
-libarchive/libarchive_la-archive_read_open_file.lo: libarchive/archive_read_open_file.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_open_file.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_open_file.Tpo -c -o libarchive/libarchive_la-archive_read_open_file.lo `test -f 'libarchive/archive_read_open_file.c' || echo '$(srcdir)/'`libarchive/archive_read_open_file.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_open_file.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_open_file.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_open_file.c' object='libarchive/libarchive_la-archive_read_open_file.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_open_file.lo `test -f 'libarchive/archive_read_open_file.c' || echo '$(srcdir)/'`libarchive/archive_read_open_file.c
-
-libarchive/libarchive_la-archive_read_open_filename.lo: libarchive/archive_read_open_filename.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_open_filename.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_open_filename.Tpo -c -o libarchive/libarchive_la-archive_read_open_filename.lo `test -f 'libarchive/archive_read_open_filename.c' || echo '$(srcdir)/'`libarchive/archive_read_open_filename.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_open_filename.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_open_filename.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_open_filename.c' object='libarchive/libarchive_la-archive_read_open_filename.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_open_filename.lo `test -f 'libarchive/archive_read_open_filename.c' || echo '$(srcdir)/'`libarchive/archive_read_open_filename.c
-
-libarchive/libarchive_la-archive_read_open_memory.lo: libarchive/archive_read_open_memory.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_open_memory.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_open_memory.Tpo -c -o libarchive/libarchive_la-archive_read_open_memory.lo `test -f 'libarchive/archive_read_open_memory.c' || echo '$(srcdir)/'`libarchive/archive_read_open_memory.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_open_memory.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_open_memory.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_open_memory.c' object='libarchive/libarchive_la-archive_read_open_memory.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_open_memory.lo `test -f 'libarchive/archive_read_open_memory.c' || echo '$(srcdir)/'`libarchive/archive_read_open_memory.c
-
-libarchive/libarchive_la-archive_read_support_compression_all.lo: libarchive/archive_read_support_compression_all.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_compression_all.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_all.Tpo -c -o libarchive/libarchive_la-archive_read_support_compression_all.lo `test -f 'libarchive/archive_read_support_compression_all.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_all.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_all.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_all.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_compression_all.c' object='libarchive/libarchive_la-archive_read_support_compression_all.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_compression_all.lo `test -f 'libarchive/archive_read_support_compression_all.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_all.c
-
-libarchive/libarchive_la-archive_read_support_compression_bzip2.lo: libarchive/archive_read_support_compression_bzip2.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_compression_bzip2.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_bzip2.Tpo -c -o libarchive/libarchive_la-archive_read_support_compression_bzip2.lo `test -f 'libarchive/archive_read_support_compression_bzip2.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_bzip2.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_bzip2.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_bzip2.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_compression_bzip2.c' object='libarchive/libarchive_la-archive_read_support_compression_bzip2.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_compression_bzip2.lo `test -f 'libarchive/archive_read_support_compression_bzip2.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_bzip2.c
-
-libarchive/libarchive_la-archive_read_support_compression_compress.lo: libarchive/archive_read_support_compression_compress.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_compression_compress.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_compress.Tpo -c -o libarchive/libarchive_la-archive_read_support_compression_compress.lo `test -f 'libarchive/archive_read_support_compression_compress.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_compress.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_compress.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_compress.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_compression_compress.c' object='libarchive/libarchive_la-archive_read_support_compression_compress.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_compression_compress.lo `test -f 'libarchive/archive_read_support_compression_compress.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_compress.c
-
-libarchive/libarchive_la-archive_read_support_compression_gzip.lo: libarchive/archive_read_support_compression_gzip.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_compression_gzip.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_gzip.Tpo -c -o libarchive/libarchive_la-archive_read_support_compression_gzip.lo `test -f 'libarchive/archive_read_support_compression_gzip.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_gzip.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_gzip.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_gzip.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_compression_gzip.c' object='libarchive/libarchive_la-archive_read_support_compression_gzip.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_compression_gzip.lo `test -f 'libarchive/archive_read_support_compression_gzip.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_gzip.c
-
-libarchive/libarchive_la-archive_read_support_compression_none.lo: libarchive/archive_read_support_compression_none.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_compression_none.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_none.Tpo -c -o libarchive/libarchive_la-archive_read_support_compression_none.lo `test -f 'libarchive/archive_read_support_compression_none.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_none.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_none.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_none.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_compression_none.c' object='libarchive/libarchive_la-archive_read_support_compression_none.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_compression_none.lo `test -f 'libarchive/archive_read_support_compression_none.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_none.c
-
-libarchive/libarchive_la-archive_read_support_compression_program.lo: libarchive/archive_read_support_compression_program.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_compression_program.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_program.Tpo -c -o libarchive/libarchive_la-archive_read_support_compression_program.lo `test -f 'libarchive/archive_read_support_compression_program.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_program.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_program.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_compression_program.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_compression_program.c' object='libarchive/libarchive_la-archive_read_support_compression_program.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_compression_program.lo `test -f 'libarchive/archive_read_support_compression_program.c' || echo '$(srcdir)/'`libarchive/archive_read_support_compression_program.c
-
-libarchive/libarchive_la-archive_read_support_format_all.lo: libarchive/archive_read_support_format_all.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_format_all.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_all.Tpo -c -o libarchive/libarchive_la-archive_read_support_format_all.lo `test -f 'libarchive/archive_read_support_format_all.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_all.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_all.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_all.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_format_all.c' object='libarchive/libarchive_la-archive_read_support_format_all.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_format_all.lo `test -f 'libarchive/archive_read_support_format_all.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_all.c
-
-libarchive/libarchive_la-archive_read_support_format_ar.lo: libarchive/archive_read_support_format_ar.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_format_ar.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_ar.Tpo -c -o libarchive/libarchive_la-archive_read_support_format_ar.lo `test -f 'libarchive/archive_read_support_format_ar.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_ar.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_ar.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_ar.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_format_ar.c' object='libarchive/libarchive_la-archive_read_support_format_ar.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_format_ar.lo `test -f 'libarchive/archive_read_support_format_ar.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_ar.c
-
-libarchive/libarchive_la-archive_read_support_format_cpio.lo: libarchive/archive_read_support_format_cpio.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_format_cpio.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_cpio.Tpo -c -o libarchive/libarchive_la-archive_read_support_format_cpio.lo `test -f 'libarchive/archive_read_support_format_cpio.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_cpio.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_cpio.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_cpio.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_format_cpio.c' object='libarchive/libarchive_la-archive_read_support_format_cpio.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_format_cpio.lo `test -f 'libarchive/archive_read_support_format_cpio.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_cpio.c
-
-libarchive/libarchive_la-archive_read_support_format_empty.lo: libarchive/archive_read_support_format_empty.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_format_empty.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_empty.Tpo -c -o libarchive/libarchive_la-archive_read_support_format_empty.lo `test -f 'libarchive/archive_read_support_format_empty.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_empty.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_empty.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_empty.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_format_empty.c' object='libarchive/libarchive_la-archive_read_support_format_empty.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_format_empty.lo `test -f 'libarchive/archive_read_support_format_empty.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_empty.c
-
-libarchive/libarchive_la-archive_read_support_format_iso9660.lo: libarchive/archive_read_support_format_iso9660.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_format_iso9660.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_iso9660.Tpo -c -o libarchive/libarchive_la-archive_read_support_format_iso9660.lo `test -f 'libarchive/archive_read_support_format_iso9660.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_iso9660.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_iso9660.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_iso9660.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_format_iso9660.c' object='libarchive/libarchive_la-archive_read_support_format_iso9660.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_format_iso9660.lo `test -f 'libarchive/archive_read_support_format_iso9660.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_iso9660.c
-
-libarchive/libarchive_la-archive_read_support_format_mtree.lo: libarchive/archive_read_support_format_mtree.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_format_mtree.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_mtree.Tpo -c -o libarchive/libarchive_la-archive_read_support_format_mtree.lo `test -f 'libarchive/archive_read_support_format_mtree.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_mtree.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_mtree.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_mtree.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_format_mtree.c' object='libarchive/libarchive_la-archive_read_support_format_mtree.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_format_mtree.lo `test -f 'libarchive/archive_read_support_format_mtree.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_mtree.c
-
-libarchive/libarchive_la-archive_read_support_format_tar.lo: libarchive/archive_read_support_format_tar.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_format_tar.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_tar.Tpo -c -o libarchive/libarchive_la-archive_read_support_format_tar.lo `test -f 'libarchive/archive_read_support_format_tar.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_tar.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_tar.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_tar.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_format_tar.c' object='libarchive/libarchive_la-archive_read_support_format_tar.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_format_tar.lo `test -f 'libarchive/archive_read_support_format_tar.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_tar.c
-
-libarchive/libarchive_la-archive_read_support_format_zip.lo: libarchive/archive_read_support_format_zip.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_read_support_format_zip.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_zip.Tpo -c -o libarchive/libarchive_la-archive_read_support_format_zip.lo `test -f 'libarchive/archive_read_support_format_zip.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_zip.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_zip.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_read_support_format_zip.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_read_support_format_zip.c' object='libarchive/libarchive_la-archive_read_support_format_zip.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_read_support_format_zip.lo `test -f 'libarchive/archive_read_support_format_zip.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_zip.c
-
-libarchive/libarchive_la-archive_string.lo: libarchive/archive_string.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_string.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_string.Tpo -c -o libarchive/libarchive_la-archive_string.lo `test -f 'libarchive/archive_string.c' || echo '$(srcdir)/'`libarchive/archive_string.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_string.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_string.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_string.c' object='libarchive/libarchive_la-archive_string.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_string.lo `test -f 'libarchive/archive_string.c' || echo '$(srcdir)/'`libarchive/archive_string.c
-
-libarchive/libarchive_la-archive_string_sprintf.lo: libarchive/archive_string_sprintf.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_string_sprintf.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_string_sprintf.Tpo -c -o libarchive/libarchive_la-archive_string_sprintf.lo `test -f 'libarchive/archive_string_sprintf.c' || echo '$(srcdir)/'`libarchive/archive_string_sprintf.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_string_sprintf.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_string_sprintf.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_string_sprintf.c' object='libarchive/libarchive_la-archive_string_sprintf.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_string_sprintf.lo `test -f 'libarchive/archive_string_sprintf.c' || echo '$(srcdir)/'`libarchive/archive_string_sprintf.c
-
-libarchive/libarchive_la-archive_util.lo: libarchive/archive_util.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_util.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_util.Tpo -c -o libarchive/libarchive_la-archive_util.lo `test -f 'libarchive/archive_util.c' || echo '$(srcdir)/'`libarchive/archive_util.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_util.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_util.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_util.c' object='libarchive/libarchive_la-archive_util.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_util.lo `test -f 'libarchive/archive_util.c' || echo '$(srcdir)/'`libarchive/archive_util.c
-
-libarchive/libarchive_la-archive_virtual.lo: libarchive/archive_virtual.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_virtual.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_virtual.Tpo -c -o libarchive/libarchive_la-archive_virtual.lo `test -f 'libarchive/archive_virtual.c' || echo '$(srcdir)/'`libarchive/archive_virtual.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_virtual.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_virtual.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_virtual.c' object='libarchive/libarchive_la-archive_virtual.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_virtual.lo `test -f 'libarchive/archive_virtual.c' || echo '$(srcdir)/'`libarchive/archive_virtual.c
-
-libarchive/libarchive_la-archive_write.lo: libarchive/archive_write.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write.Tpo -c -o libarchive/libarchive_la-archive_write.lo `test -f 'libarchive/archive_write.c' || echo '$(srcdir)/'`libarchive/archive_write.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write.c' object='libarchive/libarchive_la-archive_write.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write.lo `test -f 'libarchive/archive_write.c' || echo '$(srcdir)/'`libarchive/archive_write.c
-
-libarchive/libarchive_la-archive_write_disk.lo: libarchive/archive_write_disk.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_disk.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_disk.Tpo -c -o libarchive/libarchive_la-archive_write_disk.lo `test -f 'libarchive/archive_write_disk.c' || echo '$(srcdir)/'`libarchive/archive_write_disk.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_disk.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_disk.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_disk.c' object='libarchive/libarchive_la-archive_write_disk.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_disk.lo `test -f 'libarchive/archive_write_disk.c' || echo '$(srcdir)/'`libarchive/archive_write_disk.c
-
-libarchive/libarchive_la-archive_write_disk_set_standard_lookup.lo: libarchive/archive_write_disk_set_standard_lookup.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_disk_set_standard_lookup.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_disk_set_standard_lookup.Tpo -c -o libarchive/libarchive_la-archive_write_disk_set_standard_lookup.lo `test -f 'libarchive/archive_write_disk_set_standard_lookup.c' || echo '$(srcdir)/'`libarchive/archive_write_disk_set_standard_lookup.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_disk_set_standard_lookup.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_disk_set_standard_lookup.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_disk_set_standard_lookup.c' object='libarchive/libarchive_la-archive_write_disk_set_standard_lookup.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_disk_set_standard_lookup.lo `test -f 'libarchive/archive_write_disk_set_standard_lookup.c' || echo '$(srcdir)/'`libarchive/archive_write_disk_set_standard_lookup.c
-
-libarchive/libarchive_la-archive_write_open_fd.lo: libarchive/archive_write_open_fd.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_open_fd.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_open_fd.Tpo -c -o libarchive/libarchive_la-archive_write_open_fd.lo `test -f 'libarchive/archive_write_open_fd.c' || echo '$(srcdir)/'`libarchive/archive_write_open_fd.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_open_fd.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_open_fd.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_open_fd.c' object='libarchive/libarchive_la-archive_write_open_fd.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_open_fd.lo `test -f 'libarchive/archive_write_open_fd.c' || echo '$(srcdir)/'`libarchive/archive_write_open_fd.c
-
-libarchive/libarchive_la-archive_write_open_file.lo: libarchive/archive_write_open_file.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_open_file.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_open_file.Tpo -c -o libarchive/libarchive_la-archive_write_open_file.lo `test -f 'libarchive/archive_write_open_file.c' || echo '$(srcdir)/'`libarchive/archive_write_open_file.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_open_file.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_open_file.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_open_file.c' object='libarchive/libarchive_la-archive_write_open_file.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_open_file.lo `test -f 'libarchive/archive_write_open_file.c' || echo '$(srcdir)/'`libarchive/archive_write_open_file.c
-
-libarchive/libarchive_la-archive_write_open_filename.lo: libarchive/archive_write_open_filename.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_open_filename.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_open_filename.Tpo -c -o libarchive/libarchive_la-archive_write_open_filename.lo `test -f 'libarchive/archive_write_open_filename.c' || echo '$(srcdir)/'`libarchive/archive_write_open_filename.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_open_filename.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_open_filename.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_open_filename.c' object='libarchive/libarchive_la-archive_write_open_filename.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_open_filename.lo `test -f 'libarchive/archive_write_open_filename.c' || echo '$(srcdir)/'`libarchive/archive_write_open_filename.c
-
-libarchive/libarchive_la-archive_write_open_memory.lo: libarchive/archive_write_open_memory.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_open_memory.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_open_memory.Tpo -c -o libarchive/libarchive_la-archive_write_open_memory.lo `test -f 'libarchive/archive_write_open_memory.c' || echo '$(srcdir)/'`libarchive/archive_write_open_memory.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_open_memory.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_open_memory.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_open_memory.c' object='libarchive/libarchive_la-archive_write_open_memory.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_open_memory.lo `test -f 'libarchive/archive_write_open_memory.c' || echo '$(srcdir)/'`libarchive/archive_write_open_memory.c
-
-libarchive/libarchive_la-archive_write_set_compression_bzip2.lo: libarchive/archive_write_set_compression_bzip2.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_compression_bzip2.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_bzip2.Tpo -c -o libarchive/libarchive_la-archive_write_set_compression_bzip2.lo `test -f 'libarchive/archive_write_set_compression_bzip2.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_bzip2.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_bzip2.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_bzip2.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_compression_bzip2.c' object='libarchive/libarchive_la-archive_write_set_compression_bzip2.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_compression_bzip2.lo `test -f 'libarchive/archive_write_set_compression_bzip2.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_bzip2.c
-
-libarchive/libarchive_la-archive_write_set_compression_compress.lo: libarchive/archive_write_set_compression_compress.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_compression_compress.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_compress.Tpo -c -o libarchive/libarchive_la-archive_write_set_compression_compress.lo `test -f 'libarchive/archive_write_set_compression_compress.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_compress.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_compress.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_compress.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_compression_compress.c' object='libarchive/libarchive_la-archive_write_set_compression_compress.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_compression_compress.lo `test -f 'libarchive/archive_write_set_compression_compress.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_compress.c
-
-libarchive/libarchive_la-archive_write_set_compression_gzip.lo: libarchive/archive_write_set_compression_gzip.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_compression_gzip.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_gzip.Tpo -c -o libarchive/libarchive_la-archive_write_set_compression_gzip.lo `test -f 'libarchive/archive_write_set_compression_gzip.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_gzip.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_gzip.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_gzip.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_compression_gzip.c' object='libarchive/libarchive_la-archive_write_set_compression_gzip.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_compression_gzip.lo `test -f 'libarchive/archive_write_set_compression_gzip.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_gzip.c
-
-libarchive/libarchive_la-archive_write_set_compression_none.lo: libarchive/archive_write_set_compression_none.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_compression_none.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_none.Tpo -c -o libarchive/libarchive_la-archive_write_set_compression_none.lo `test -f 'libarchive/archive_write_set_compression_none.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_none.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_none.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_none.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_compression_none.c' object='libarchive/libarchive_la-archive_write_set_compression_none.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_compression_none.lo `test -f 'libarchive/archive_write_set_compression_none.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_none.c
-
-libarchive/libarchive_la-archive_write_set_compression_program.lo: libarchive/archive_write_set_compression_program.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_compression_program.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_program.Tpo -c -o libarchive/libarchive_la-archive_write_set_compression_program.lo `test -f 'libarchive/archive_write_set_compression_program.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_program.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_program.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_compression_program.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_compression_program.c' object='libarchive/libarchive_la-archive_write_set_compression_program.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_compression_program.lo `test -f 'libarchive/archive_write_set_compression_program.c' || echo '$(srcdir)/'`libarchive/archive_write_set_compression_program.c
-
-libarchive/libarchive_la-archive_write_set_format.lo: libarchive/archive_write_set_format.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_format.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format.Tpo -c -o libarchive/libarchive_la-archive_write_set_format.lo `test -f 'libarchive/archive_write_set_format.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_format.c' object='libarchive/libarchive_la-archive_write_set_format.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_format.lo `test -f 'libarchive/archive_write_set_format.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format.c
-
-libarchive/libarchive_la-archive_write_set_format_ar.lo: libarchive/archive_write_set_format_ar.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_format_ar.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_ar.Tpo -c -o libarchive/libarchive_la-archive_write_set_format_ar.lo `test -f 'libarchive/archive_write_set_format_ar.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_ar.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_ar.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_ar.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_format_ar.c' object='libarchive/libarchive_la-archive_write_set_format_ar.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_format_ar.lo `test -f 'libarchive/archive_write_set_format_ar.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_ar.c
-
-libarchive/libarchive_la-archive_write_set_format_by_name.lo: libarchive/archive_write_set_format_by_name.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_format_by_name.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_by_name.Tpo -c -o libarchive/libarchive_la-archive_write_set_format_by_name.lo `test -f 'libarchive/archive_write_set_format_by_name.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_by_name.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_by_name.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_by_name.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_format_by_name.c' object='libarchive/libarchive_la-archive_write_set_format_by_name.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_format_by_name.lo `test -f 'libarchive/archive_write_set_format_by_name.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_by_name.c
-
-libarchive/libarchive_la-archive_write_set_format_cpio.lo: libarchive/archive_write_set_format_cpio.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_format_cpio.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_cpio.Tpo -c -o libarchive/libarchive_la-archive_write_set_format_cpio.lo `test -f 'libarchive/archive_write_set_format_cpio.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_cpio.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_cpio.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_cpio.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_format_cpio.c' object='libarchive/libarchive_la-archive_write_set_format_cpio.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_format_cpio.lo `test -f 'libarchive/archive_write_set_format_cpio.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_cpio.c
-
-libarchive/libarchive_la-archive_write_set_format_cpio_newc.lo: libarchive/archive_write_set_format_cpio_newc.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_format_cpio_newc.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_cpio_newc.Tpo -c -o libarchive/libarchive_la-archive_write_set_format_cpio_newc.lo `test -f 'libarchive/archive_write_set_format_cpio_newc.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_cpio_newc.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_cpio_newc.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_cpio_newc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_format_cpio_newc.c' object='libarchive/libarchive_la-archive_write_set_format_cpio_newc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_format_cpio_newc.lo `test -f 'libarchive/archive_write_set_format_cpio_newc.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_cpio_newc.c
-
-libarchive/libarchive_la-archive_write_set_format_pax.lo: libarchive/archive_write_set_format_pax.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_format_pax.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_pax.Tpo -c -o libarchive/libarchive_la-archive_write_set_format_pax.lo `test -f 'libarchive/archive_write_set_format_pax.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_pax.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_pax.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_pax.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_format_pax.c' object='libarchive/libarchive_la-archive_write_set_format_pax.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_format_pax.lo `test -f 'libarchive/archive_write_set_format_pax.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_pax.c
-
-libarchive/libarchive_la-archive_write_set_format_shar.lo: libarchive/archive_write_set_format_shar.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_format_shar.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_shar.Tpo -c -o libarchive/libarchive_la-archive_write_set_format_shar.lo `test -f 'libarchive/archive_write_set_format_shar.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_shar.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_shar.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_shar.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_format_shar.c' object='libarchive/libarchive_la-archive_write_set_format_shar.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_format_shar.lo `test -f 'libarchive/archive_write_set_format_shar.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_shar.c
-
-libarchive/libarchive_la-archive_write_set_format_ustar.lo: libarchive/archive_write_set_format_ustar.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-archive_write_set_format_ustar.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_ustar.Tpo -c -o libarchive/libarchive_la-archive_write_set_format_ustar.lo `test -f 'libarchive/archive_write_set_format_ustar.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_ustar.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_ustar.Tpo libarchive/$(DEPDIR)/libarchive_la-archive_write_set_format_ustar.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/archive_write_set_format_ustar.c' object='libarchive/libarchive_la-archive_write_set_format_ustar.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-archive_write_set_format_ustar.lo `test -f 'libarchive/archive_write_set_format_ustar.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format_ustar.c
-
-libarchive/libarchive_la-filter_fork.lo: libarchive/filter_fork.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_la-filter_fork.lo -MD -MP -MF libarchive/$(DEPDIR)/libarchive_la-filter_fork.Tpo -c -o libarchive/libarchive_la-filter_fork.lo `test -f 'libarchive/filter_fork.c' || echo '$(srcdir)/'`libarchive/filter_fork.c
-@am__fastdepCC_TRUE@ mv -f libarchive/$(DEPDIR)/libarchive_la-filter_fork.Tpo libarchive/$(DEPDIR)/libarchive_la-filter_fork.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/filter_fork.c' object='libarchive/libarchive_la-filter_fork.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_la-filter_fork.lo `test -f 'libarchive/filter_fork.c' || echo '$(srcdir)/'`libarchive/filter_fork.c
-
cpio/bsdcpio-cmdline.o: cpio/cmdline.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/bsdcpio-cmdline.o -MD -MP -MF cpio/$(DEPDIR)/bsdcpio-cmdline.Tpo -c -o cpio/bsdcpio-cmdline.o `test -f 'cpio/cmdline.c' || echo '$(srcdir)/'`cpio/cmdline.c
@am__fastdepCC_TRUE@ mv -f cpio/$(DEPDIR)/bsdcpio-cmdline.Tpo cpio/$(DEPDIR)/bsdcpio-cmdline.Po
@@ -2533,6 +2187,20 @@ cpio/test/bsdcpio_test-main.obj: cpio/test/main.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-main.obj `if test -f 'cpio/test/main.c'; then $(CYGPATH_W) 'cpio/test/main.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/main.c'; fi`
+cpio/test/bsdcpio_test-test_0.o: cpio/test/test_0.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_0.o -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_0.Tpo -c -o cpio/test/bsdcpio_test-test_0.o `test -f 'cpio/test/test_0.c' || echo '$(srcdir)/'`cpio/test/test_0.c
+@am__fastdepCC_TRUE@ mv -f cpio/test/$(DEPDIR)/bsdcpio_test-test_0.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_0.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cpio/test/test_0.c' object='cpio/test/bsdcpio_test-test_0.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_0.o `test -f 'cpio/test/test_0.c' || echo '$(srcdir)/'`cpio/test/test_0.c
+
+cpio/test/bsdcpio_test-test_0.obj: cpio/test/test_0.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_0.obj -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_0.Tpo -c -o cpio/test/bsdcpio_test-test_0.obj `if test -f 'cpio/test/test_0.c'; then $(CYGPATH_W) 'cpio/test/test_0.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_0.c'; fi`
+@am__fastdepCC_TRUE@ mv -f cpio/test/$(DEPDIR)/bsdcpio_test-test_0.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_0.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cpio/test/test_0.c' object='cpio/test/bsdcpio_test-test_0.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_0.obj `if test -f 'cpio/test/test_0.c'; then $(CYGPATH_W) 'cpio/test/test_0.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_0.c'; fi`
+
cpio/test/bsdcpio_test-test_basic.o: cpio/test/test_basic.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_basic.o -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_basic.Tpo -c -o cpio/test/bsdcpio_test-test_basic.o `test -f 'cpio/test/test_basic.c' || echo '$(srcdir)/'`cpio/test/test_basic.c
@am__fastdepCC_TRUE@ mv -f cpio/test/$(DEPDIR)/bsdcpio_test-test_basic.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_basic.Po
@@ -2855,6 +2523,34 @@ tar/bsdtar-read.obj: tar/read.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/bsdtar-read.obj `if test -f 'tar/read.c'; then $(CYGPATH_W) 'tar/read.c'; else $(CYGPATH_W) '$(srcdir)/tar/read.c'; fi`
+tar/bsdtar-siginfo.o: tar/siginfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/bsdtar-siginfo.o -MD -MP -MF tar/$(DEPDIR)/bsdtar-siginfo.Tpo -c -o tar/bsdtar-siginfo.o `test -f 'tar/siginfo.c' || echo '$(srcdir)/'`tar/siginfo.c
+@am__fastdepCC_TRUE@ mv -f tar/$(DEPDIR)/bsdtar-siginfo.Tpo tar/$(DEPDIR)/bsdtar-siginfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/siginfo.c' object='tar/bsdtar-siginfo.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/bsdtar-siginfo.o `test -f 'tar/siginfo.c' || echo '$(srcdir)/'`tar/siginfo.c
+
+tar/bsdtar-siginfo.obj: tar/siginfo.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/bsdtar-siginfo.obj -MD -MP -MF tar/$(DEPDIR)/bsdtar-siginfo.Tpo -c -o tar/bsdtar-siginfo.obj `if test -f 'tar/siginfo.c'; then $(CYGPATH_W) 'tar/siginfo.c'; else $(CYGPATH_W) '$(srcdir)/tar/siginfo.c'; fi`
+@am__fastdepCC_TRUE@ mv -f tar/$(DEPDIR)/bsdtar-siginfo.Tpo tar/$(DEPDIR)/bsdtar-siginfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/siginfo.c' object='tar/bsdtar-siginfo.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/bsdtar-siginfo.obj `if test -f 'tar/siginfo.c'; then $(CYGPATH_W) 'tar/siginfo.c'; else $(CYGPATH_W) '$(srcdir)/tar/siginfo.c'; fi`
+
+tar/bsdtar-subst.o: tar/subst.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/bsdtar-subst.o -MD -MP -MF tar/$(DEPDIR)/bsdtar-subst.Tpo -c -o tar/bsdtar-subst.o `test -f 'tar/subst.c' || echo '$(srcdir)/'`tar/subst.c
+@am__fastdepCC_TRUE@ mv -f tar/$(DEPDIR)/bsdtar-subst.Tpo tar/$(DEPDIR)/bsdtar-subst.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/subst.c' object='tar/bsdtar-subst.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/bsdtar-subst.o `test -f 'tar/subst.c' || echo '$(srcdir)/'`tar/subst.c
+
+tar/bsdtar-subst.obj: tar/subst.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/bsdtar-subst.obj -MD -MP -MF tar/$(DEPDIR)/bsdtar-subst.Tpo -c -o tar/bsdtar-subst.obj `if test -f 'tar/subst.c'; then $(CYGPATH_W) 'tar/subst.c'; else $(CYGPATH_W) '$(srcdir)/tar/subst.c'; fi`
+@am__fastdepCC_TRUE@ mv -f tar/$(DEPDIR)/bsdtar-subst.Tpo tar/$(DEPDIR)/bsdtar-subst.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/subst.c' object='tar/bsdtar-subst.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/bsdtar-subst.obj `if test -f 'tar/subst.c'; then $(CYGPATH_W) 'tar/subst.c'; else $(CYGPATH_W) '$(srcdir)/tar/subst.c'; fi`
+
tar/bsdtar-tree.o: tar/tree.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/bsdtar-tree.o -MD -MP -MF tar/$(DEPDIR)/bsdtar-tree.Tpo -c -o tar/bsdtar-tree.o `test -f 'tar/tree.c' || echo '$(srcdir)/'`tar/tree.c
@am__fastdepCC_TRUE@ mv -f tar/$(DEPDIR)/bsdtar-tree.Tpo tar/$(DEPDIR)/bsdtar-tree.Po
@@ -2925,6 +2621,20 @@ tar/test/bsdtar_test-main.obj: tar/test/main.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-main.obj `if test -f 'tar/test/main.c'; then $(CYGPATH_W) 'tar/test/main.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/main.c'; fi`
+tar/test/bsdtar_test-test_0.o: tar/test/test_0.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_0.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_0.Tpo -c -o tar/test/bsdtar_test-test_0.o `test -f 'tar/test/test_0.c' || echo '$(srcdir)/'`tar/test/test_0.c
+@am__fastdepCC_TRUE@ mv -f tar/test/$(DEPDIR)/bsdtar_test-test_0.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_0.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/test/test_0.c' object='tar/test/bsdtar_test-test_0.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_0.o `test -f 'tar/test/test_0.c' || echo '$(srcdir)/'`tar/test/test_0.c
+
+tar/test/bsdtar_test-test_0.obj: tar/test/test_0.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_0.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_0.Tpo -c -o tar/test/bsdtar_test-test_0.obj `if test -f 'tar/test/test_0.c'; then $(CYGPATH_W) 'tar/test/test_0.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_0.c'; fi`
+@am__fastdepCC_TRUE@ mv -f tar/test/$(DEPDIR)/bsdtar_test-test_0.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_0.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/test/test_0.c' object='tar/test/bsdtar_test-test_0.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_0.obj `if test -f 'tar/test/test_0.c'; then $(CYGPATH_W) 'tar/test/test_0.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_0.c'; fi`
+
tar/test/bsdtar_test-test_basic.o: tar/test/test_basic.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_basic.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_basic.Tpo -c -o tar/test/bsdtar_test-test_basic.o `test -f 'tar/test/test_basic.c' || echo '$(srcdir)/'`tar/test/test_basic.c
@am__fastdepCC_TRUE@ mv -f tar/test/$(DEPDIR)/bsdtar_test-test_basic.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_basic.Po
@@ -2981,6 +2691,34 @@ tar/test/bsdtar_test-test_help.obj: tar/test/test_help.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_help.obj `if test -f 'tar/test/test_help.c'; then $(CYGPATH_W) 'tar/test/test_help.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_help.c'; fi`
+tar/test/bsdtar_test-test_option_T.o: tar/test/test_option_T.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_T.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_T.Tpo -c -o tar/test/bsdtar_test-test_option_T.o `test -f 'tar/test/test_option_T.c' || echo '$(srcdir)/'`tar/test/test_option_T.c
+@am__fastdepCC_TRUE@ mv -f tar/test/$(DEPDIR)/bsdtar_test-test_option_T.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_T.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/test/test_option_T.c' object='tar/test/bsdtar_test-test_option_T.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_T.o `test -f 'tar/test/test_option_T.c' || echo '$(srcdir)/'`tar/test/test_option_T.c
+
+tar/test/bsdtar_test-test_option_T.obj: tar/test/test_option_T.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_T.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_T.Tpo -c -o tar/test/bsdtar_test-test_option_T.obj `if test -f 'tar/test/test_option_T.c'; then $(CYGPATH_W) 'tar/test/test_option_T.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_T.c'; fi`
+@am__fastdepCC_TRUE@ mv -f tar/test/$(DEPDIR)/bsdtar_test-test_option_T.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_T.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/test/test_option_T.c' object='tar/test/bsdtar_test-test_option_T.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_T.obj `if test -f 'tar/test/test_option_T.c'; then $(CYGPATH_W) 'tar/test/test_option_T.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_T.c'; fi`
+
+tar/test/bsdtar_test-test_patterns.o: tar/test/test_patterns.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_patterns.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Tpo -c -o tar/test/bsdtar_test-test_patterns.o `test -f 'tar/test/test_patterns.c' || echo '$(srcdir)/'`tar/test/test_patterns.c
+@am__fastdepCC_TRUE@ mv -f tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/test/test_patterns.c' object='tar/test/bsdtar_test-test_patterns.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_patterns.o `test -f 'tar/test/test_patterns.c' || echo '$(srcdir)/'`tar/test/test_patterns.c
+
+tar/test/bsdtar_test-test_patterns.obj: tar/test/test_patterns.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_patterns.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Tpo -c -o tar/test/bsdtar_test-test_patterns.obj `if test -f 'tar/test/test_patterns.c'; then $(CYGPATH_W) 'tar/test/test_patterns.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_patterns.c'; fi`
+@am__fastdepCC_TRUE@ mv -f tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tar/test/test_patterns.c' object='tar/test/bsdtar_test-test_patterns.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_patterns.obj `if test -f 'tar/test/test_patterns.c'; then $(CYGPATH_W) 'tar/test/test_patterns.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_patterns.c'; fi`
+
tar/test/bsdtar_test-test_stdio.o: tar/test/test_stdio.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_stdio.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_stdio.Tpo -c -o tar/test/bsdtar_test-test_stdio.o `test -f 'tar/test/test_stdio.c' || echo '$(srcdir)/'`tar/test/test_stdio.c
@am__fastdepCC_TRUE@ mv -f tar/test/$(DEPDIR)/bsdtar_test-test_stdio.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_stdio.Po
@@ -4199,6 +3937,20 @@ libarchive/test/libarchive_test-test_read_format_tar.obj: libarchive/test/test_r
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_read_format_tar.obj `if test -f 'libarchive/test/test_read_format_tar.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_tar.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_tar.c'; fi`
+libarchive/test/libarchive_test-test_read_format_tar_empty_filename.o: libarchive/test/test_read_format_tar_empty_filename.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_read_format_tar_empty_filename.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar_empty_filename.Tpo -c -o libarchive/test/libarchive_test-test_read_format_tar_empty_filename.o `test -f 'libarchive/test/test_read_format_tar_empty_filename.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_tar_empty_filename.c
+@am__fastdepCC_TRUE@ mv -f libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar_empty_filename.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar_empty_filename.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/test/test_read_format_tar_empty_filename.c' object='libarchive/test/libarchive_test-test_read_format_tar_empty_filename.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_read_format_tar_empty_filename.o `test -f 'libarchive/test/test_read_format_tar_empty_filename.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_tar_empty_filename.c
+
+libarchive/test/libarchive_test-test_read_format_tar_empty_filename.obj: libarchive/test/test_read_format_tar_empty_filename.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_read_format_tar_empty_filename.obj -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar_empty_filename.Tpo -c -o libarchive/test/libarchive_test-test_read_format_tar_empty_filename.obj `if test -f 'libarchive/test/test_read_format_tar_empty_filename.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_tar_empty_filename.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_tar_empty_filename.c'; fi`
+@am__fastdepCC_TRUE@ mv -f libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar_empty_filename.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tar_empty_filename.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/test/test_read_format_tar_empty_filename.c' object='libarchive/test/libarchive_test-test_read_format_tar_empty_filename.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_read_format_tar_empty_filename.obj `if test -f 'libarchive/test/test_read_format_tar_empty_filename.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_tar_empty_filename.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_tar_empty_filename.c'; fi`
+
libarchive/test/libarchive_test-test_read_format_tbz.o: libarchive/test/test_read_format_tbz.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_read_format_tbz.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tbz.Tpo -c -o libarchive/test/libarchive_test-test_read_format_tbz.o `test -f 'libarchive/test/test_read_format_tbz.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_tbz.c
@am__fastdepCC_TRUE@ mv -f libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tbz.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_tbz.Po
@@ -4339,6 +4091,20 @@ libarchive/test/libarchive_test-test_tar_large.obj: libarchive/test/test_tar_lar
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_tar_large.obj `if test -f 'libarchive/test/test_tar_large.c'; then $(CYGPATH_W) 'libarchive/test/test_tar_large.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_tar_large.c'; fi`
+libarchive/test/libarchive_test-test_ustar_filenames.o: libarchive/test/test_ustar_filenames.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_ustar_filenames.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_ustar_filenames.Tpo -c -o libarchive/test/libarchive_test-test_ustar_filenames.o `test -f 'libarchive/test/test_ustar_filenames.c' || echo '$(srcdir)/'`libarchive/test/test_ustar_filenames.c
+@am__fastdepCC_TRUE@ mv -f libarchive/test/$(DEPDIR)/libarchive_test-test_ustar_filenames.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_ustar_filenames.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/test/test_ustar_filenames.c' object='libarchive/test/libarchive_test-test_ustar_filenames.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_ustar_filenames.o `test -f 'libarchive/test/test_ustar_filenames.c' || echo '$(srcdir)/'`libarchive/test/test_ustar_filenames.c
+
+libarchive/test/libarchive_test-test_ustar_filenames.obj: libarchive/test/test_ustar_filenames.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_ustar_filenames.obj -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_ustar_filenames.Tpo -c -o libarchive/test/libarchive_test-test_ustar_filenames.obj `if test -f 'libarchive/test/test_ustar_filenames.c'; then $(CYGPATH_W) 'libarchive/test/test_ustar_filenames.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_ustar_filenames.c'; fi`
+@am__fastdepCC_TRUE@ mv -f libarchive/test/$(DEPDIR)/libarchive_test-test_ustar_filenames.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_ustar_filenames.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/test/test_ustar_filenames.c' object='libarchive/test/libarchive_test-test_ustar_filenames.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_ustar_filenames.obj `if test -f 'libarchive/test/test_ustar_filenames.c'; then $(CYGPATH_W) 'libarchive/test/test_ustar_filenames.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_ustar_filenames.c'; fi`
+
libarchive/test/libarchive_test-test_write_compress.o: libarchive/test/test_write_compress.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_compress.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_compress.Tpo -c -o libarchive/test/libarchive_test-test_write_compress.o `test -f 'libarchive/test/test_write_compress.c' || echo '$(srcdir)/'`libarchive/test/test_write_compress.c
@am__fastdepCC_TRUE@ mv -f libarchive/test/$(DEPDIR)/libarchive_test-test_write_compress.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_compress.Po
@@ -4535,6 +4301,20 @@ libarchive/test/libarchive_test-test_write_format_tar_empty.obj: libarchive/test
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_format_tar_empty.obj `if test -f 'libarchive/test/test_write_format_tar_empty.c'; then $(CYGPATH_W) 'libarchive/test/test_write_format_tar_empty.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_tar_empty.c'; fi`
+libarchive/test/libarchive_test-test_write_format_tar_ustar.o: libarchive/test/test_write_format_tar_ustar.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_format_tar_ustar.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_tar_ustar.Tpo -c -o libarchive/test/libarchive_test-test_write_format_tar_ustar.o `test -f 'libarchive/test/test_write_format_tar_ustar.c' || echo '$(srcdir)/'`libarchive/test/test_write_format_tar_ustar.c
+@am__fastdepCC_TRUE@ mv -f libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_tar_ustar.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_tar_ustar.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/test/test_write_format_tar_ustar.c' object='libarchive/test/libarchive_test-test_write_format_tar_ustar.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_format_tar_ustar.o `test -f 'libarchive/test/test_write_format_tar_ustar.c' || echo '$(srcdir)/'`libarchive/test/test_write_format_tar_ustar.c
+
+libarchive/test/libarchive_test-test_write_format_tar_ustar.obj: libarchive/test/test_write_format_tar_ustar.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_format_tar_ustar.obj -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_tar_ustar.Tpo -c -o libarchive/test/libarchive_test-test_write_format_tar_ustar.obj `if test -f 'libarchive/test/test_write_format_tar_ustar.c'; then $(CYGPATH_W) 'libarchive/test/test_write_format_tar_ustar.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_tar_ustar.c'; fi`
+@am__fastdepCC_TRUE@ mv -f libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_tar_ustar.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_tar_ustar.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libarchive/test/test_write_format_tar_ustar.c' object='libarchive/test/libarchive_test-test_write_format_tar_ustar.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_format_tar_ustar.obj `if test -f 'libarchive/test/test_write_format_tar_ustar.c'; then $(CYGPATH_W) 'libarchive/test/test_write_format_tar_ustar.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_tar_ustar.c'; fi`
+
libarchive/test/libarchive_test-test_write_open_memory.o: libarchive/test/test_write_open_memory.c
@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_open_memory.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_open_memory.Tpo -c -o libarchive/test/libarchive_test-test_write_open_memory.o `test -f 'libarchive/test/test_write_open_memory.c' || echo '$(srcdir)/'`libarchive/test/test_write_open_memory.c
@am__fastdepCC_TRUE@ mv -f libarchive/test/$(DEPDIR)/libarchive_test-test_write_open_memory.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_open_memory.Po
@@ -4713,23 +4493,6 @@ uninstall-includeHEADERS:
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
rm -f "$(DESTDIR)$(includedir)/$$f"; \
done
-install-nodist_includeHEADERS: $(nodist_include_HEADERS)
- @$(NORMAL_INSTALL)
- test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
- @list='$(nodist_include_HEADERS)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(nodist_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
- $(nodist_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
- done
-
-uninstall-nodist_includeHEADERS:
- @$(NORMAL_UNINSTALL)
- @list='$(nodist_include_HEADERS)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
- rm -f "$(DESTDIR)$(includedir)/$$f"; \
- done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -4990,7 +4753,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS) \
install-binPROGRAMS: install-libLTLIBRARIES
installdirs:
- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
@@ -5055,8 +4818,7 @@ info: info-am
info-am:
-install-data-am: install-includeHEADERS install-man \
- install-nodist_includeHEADERS
+install-data-am: install-includeHEADERS install-man
install-dvi: install-dvi-am
@@ -5095,8 +4857,7 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
- uninstall-libLTLIBRARIES uninstall-man \
- uninstall-nodist_includeHEADERS
+ uninstall-libLTLIBRARIES uninstall-man
uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5
@@ -5114,15 +4875,14 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5
install-exec install-exec-am install-html install-html-am \
install-includeHEADERS install-info install-info-am \
install-libLTLIBRARIES install-man install-man1 install-man3 \
- install-man5 install-nodist_includeHEADERS install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-includeHEADERS uninstall-libLTLIBRARIES \
- uninstall-man uninstall-man1 uninstall-man3 uninstall-man5 \
- uninstall-nodist_includeHEADERS
+ install-man5 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-includeHEADERS \
+ uninstall-libLTLIBRARIES uninstall-man uninstall-man1 \
+ uninstall-man3 uninstall-man5
# a) Clean out some unneeded files and directories
@@ -5134,12 +4894,18 @@ dist-hook:
rm -f `find $(distdir) -name '*.out'`
rm -f `find $(distdir) -name '*.core'`
-rm -f $(distdir)/*/Makefile $(distdir)/*/*/Makefile
- cd $(distdir)/doc && ./update.sh
+ cd $(distdir)/doc && /bin/sh update.sh
distclean-local:
-rm -rf .ref
-rm -rf autom4te.cache/
-rm -f *~
+ -[ -f libarchive/Makefile ] && cd libarchive && make clean
+ -[ -f libarchive/test/Makefile ] && cd libarchive/test && make clean
+ -[ -f tar/Makefile ] && cd tar && make clean
+ -[ -f tar/test/Makefile ] && cd tar/test && make clean
+ -[ -f cpio/Makefile ] && cd cpio && make clean
+ -[ -f cpio/test/Makefile ] && cd cpio/test && make clean
# The "list.h" file just lists all of the tests defined in all of the sources.
# Building it automatically provides a sanity-check on libarchive_test_SOURCES
diff --git a/archivers/libarchive/files/NEWS b/archivers/libarchive/files/NEWS
index f6e1167fa85..b7e578e2902 100644
--- a/archivers/libarchive/files/NEWS
+++ b/archivers/libarchive/files/NEWS
@@ -1,4 +1,54 @@
+May 25, 2008: libarchive 2.5.4b released
+May 21, 2008: Joerg Sonnenberger: fix bsdtar hardlink handling for newc format
+
+May 21, 2008: More progress on Windows building. Thanks to "Scott"
+ for the Windows makefiles, thanks to Kees Zeelenberg for
+ code contributions.
+
+May 21, 2008: Fix a number of non-exploitable integer and buffer overflows,
+ thanks to David Remahl at Apple for pointing these out.
+
+May 21, 2008: Colin Percival: SIGINFO or SIGUSR1 to bsdtar prints progress info
+
+May 16, 2008: bsdtar's test harness no longer depends on file ordering.
+ This was causing spurious test failures on a lot of systems.
+ Thanks to Bernhard R. Link for the diagnosis.
+
+May 14, 2008: Joerg Sonnenberger: -s substitution support for bsdtar
+
+May 13, 2008: Joerg Sonnenberger: Many mtree improvements
+
+May 11, 2008: Joerg Sonnenberger: fix hardlink extraction when
+ hardlinks have different permissions from original file
+
+April 30, 2008: Primary libarchive work has been moved into the FreeBSD
+ project's Perforce repository: http://perforce.freebsd.org/
+ The libarchive project can be browsed at
+ //depot/user/kientzle/libarchive-portable
+ Direct link: http://preview.tinyurl.com/46mdgr
+
+May 04, 2008: libarchive 2.5.3b released
+ * libarchive: Several fixes to link resolver to address bsdcpio crashes
+ * bsdcpio: -p hardlink handling fixes
+ * tar/pax: Ensure ustar dirnames end in '/'; be more careful about
+ measuring filenames when deciding what pathname fields to use
+ * libarchive: Mark which entry strings are set; be accurate about
+ distinguishing empty strings ("") from unset ones (NULL)
+ * tar: Don't crash reading entries with empty filenames
+ * libarchive_test, bsdtar_test, bsdcpio_test: Better detaults:
+ run all tests, delete temp dirs, summarize repeated failures
+ * -no-undefined to libtool for Cygwin
+ * libarchive_test: Skip large file tests on systems with 32-bit off_t
+ * iso9660: Don't bother trying to find the body of an empty file;
+ this works around strange behavior from some ISO9660 writers
+ * tar: allow -r -T to be used together
+ * tar: allow --format with -r or -u
+ * libarchive: Don't build archive.h
+
+May 04, 2008: Simplified building: archive.h is no longer constructed
+ This may require additional #if conditionals on some platforms.
+
Mar 30, 2008: libarchive 2.5.1b released
Mar 15, 2008: libarchive 2.5.0b released
diff --git a/archivers/libarchive/files/README b/archivers/libarchive/files/README
index 3652503ddfa..50a9d628f30 100644
--- a/archivers/libarchive/files/README
+++ b/archivers/libarchive/files/README
@@ -69,6 +69,7 @@ Currently, the library automatically detects and reads the following:
The library can write:
* gzip compression
* bzip2 compression
+ * compress/LZW compression
* POSIX ustar
* POSIX pax interchange format
* "restricted" pax format, which will create ustar archives except for
diff --git a/archivers/libarchive/files/config.h.in b/archivers/libarchive/files/config.h.in
index 6226b894f2e..a253386b415 100644
--- a/archivers/libarchive/files/config.h.in
+++ b/archivers/libarchive/files/config.h.in
@@ -114,6 +114,9 @@
/* Define to 1 if you have the `fchown' function. */
#undef HAVE_FCHOWN
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -244,6 +247,9 @@
/* Define to 1 if you have the <paths.h> header file. */
#undef HAVE_PATHS_H
+/* Define to 1 if you have the `pipe' function. */
+#undef HAVE_PIPE
+
/* Define to 1 if you have the `poll' function. */
#undef HAVE_POLL
@@ -253,6 +259,9 @@
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
@@ -382,6 +391,9 @@
/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
diff --git a/archivers/libarchive/files/configure b/archivers/libarchive/files/configure
index 99df7a647c1..3f49d7dbf18 100755
--- a/archivers/libarchive/files/configure
+++ b/archivers/libarchive/files/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for libarchive 2.5.1b.
+# Generated by GNU Autoconf 2.61 for libarchive 2.5.4b.
#
# Report bugs to <kientzle@freebsd.org>.
#
@@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='libarchive'
PACKAGE_TARNAME='libarchive'
-PACKAGE_VERSION='2.5.1b'
-PACKAGE_STRING='libarchive 2.5.1b'
+PACKAGE_VERSION='2.5.4b'
+PACKAGE_STRING='libarchive 2.5.4b'
PACKAGE_BUGREPORT='kientzle@freebsd.org'
ac_unique_file="libarchive"
@@ -1408,7 +1408,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libarchive 2.5.1b to adapt to many kinds of systems.
+\`configure' configures libarchive 2.5.4b to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1478,7 +1478,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libarchive 2.5.1b:";;
+ short | recursive ) echo "Configuration of libarchive 2.5.4b:";;
esac
cat <<\_ACEOF
@@ -1596,7 +1596,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libarchive configure 2.5.1b
+libarchive configure 2.5.4b
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1610,7 +1610,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libarchive $as_me 2.5.1b, which was
+It was created by libarchive $as_me 2.5.4b, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2304,7 +2304,7 @@ fi
# Define the identity of the package.
PACKAGE='libarchive'
- VERSION='2.5.1b'
+ VERSION='2.5.4b'
cat >>confdefs.h <<_ACEOF
@@ -2455,41 +2455,41 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
# platforms. At least on FreeBSD, libtool uses an overly complex
# convention that attempts to solve problems that most people just
# don't have and which just causes confusion for most end users.
-ARCHIVE_MAJOR=$(( 2005001 / 1000000 ))
-ARCHIVE_MINOR=$(( (2005001 / 1000) % 1000 ))
-ARCHIVE_REVISION=$(( 2005001 % 1000 ))
+ARCHIVE_MAJOR=$(( 2005004 / 1000000 ))
+ARCHIVE_MINOR=$(( (2005004 / 1000) % 1000 ))
+ARCHIVE_REVISION=$(( 2005004 % 1000 ))
ARCHIVE_LIBTOOL_MAJOR=`echo $((${ARCHIVE_MAJOR} + ${ARCHIVE_MINOR}))`
ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_LIBTOOL_MAJOR:$ARCHIVE_REVISION:$ARCHIVE_MINOR
# Stick the version numbers into config.h
cat >>confdefs.h <<\_ACEOF
-#define LIBARCHIVE_VERSION_STRING "2.5.1b"
+#define LIBARCHIVE_VERSION_STRING "2.5.4b"
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define LIBARCHIVE_VERSION_NUMBER "2005001"
+#define LIBARCHIVE_VERSION_NUMBER "2005004"
_ACEOF
cat >>confdefs.h <<\_ACEOF
-#define BSDCPIO_VERSION_STRING "0.9.9a"
+#define BSDCPIO_VERSION_STRING "0.9.10a"
_ACEOF
cat >>confdefs.h <<\_ACEOF
-#define BSDTAR_VERSION_STRING "2.5.1b"
+#define BSDTAR_VERSION_STRING "2.5.4b"
_ACEOF
# The shell variables here must be the same as the AC_SUBST() variables
# below, but the shell variable names apparently cannot be the same as
# the m4 macro names above. Why? Ask autoconf.
-BSDCPIO_VERSION_STRING=0.9.9a
-BSDTAR_VERSION_STRING=2.5.1b
-LIBARCHIVE_VERSION_STRING=2.5.1b
-LIBARCHIVE_VERSION_NUMBER=2005001
+BSDCPIO_VERSION_STRING=0.9.10a
+BSDTAR_VERSION_STRING=2.5.4b
+LIBARCHIVE_VERSION_STRING=2.5.4b
+LIBARCHIVE_VERSION_NUMBER=2005004
# Substitute the above version numbers into the various files below.
# Yes, I believe this is the fourth time we define what are essentially
@@ -2504,8 +2504,6 @@ ac_config_headers="$ac_config_headers config.h"
ac_config_files="$ac_config_files Makefile"
-ac_config_files="$ac_config_files libarchive/archive.h"
-
# Checks for programs.
ac_ext=c
@@ -4562,7 +4560,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4565 "configure"' > conftest.$ac_ext
+ echo '#line 4563 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7293,11 +7291,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7296: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7294: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7300: \$? = $ac_status" >&5
+ echo "$as_me:7298: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7561,11 +7559,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7564: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7562: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7568: \$? = $ac_status" >&5
+ echo "$as_me:7566: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7665,11 +7663,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7668: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7666: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7672: \$? = $ac_status" >&5
+ echo "$as_me:7670: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9973,7 +9971,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9976 "configure"
+#line 9974 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10073,7 +10071,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10076 "configure"
+#line 10074 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12409,11 +12407,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12412: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12410: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12416: \$? = $ac_status" >&5
+ echo "$as_me:12414: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12513,11 +12511,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12516: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12514: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12520: \$? = $ac_status" >&5
+ echo "$as_me:12518: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14083,11 +14081,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14086: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14084: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14090: \$? = $ac_status" >&5
+ echo "$as_me:14088: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14187,11 +14185,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14190: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14188: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14194: \$? = $ac_status" >&5
+ echo "$as_me:14192: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16385,11 +16383,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16388: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16386: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16392: \$? = $ac_status" >&5
+ echo "$as_me:16390: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16653,11 +16651,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16656: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16654: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16660: \$? = $ac_status" >&5
+ echo "$as_me:16658: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16757,11 +16755,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16760: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16758: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16764: \$? = $ac_status" >&5
+ echo "$as_me:16762: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -20580,7 +20578,8 @@ fi
-for ac_header in locale.h paths.h poll.h pwd.h stdarg.h
+
+for ac_header in locale.h paths.h poll.h pwd.h regex.h stdarg.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -24855,7 +24854,8 @@ done
-for ac_func in chflags chown fchdir fchflags fchmod fchown fstat
+
+for ac_func in chflags chown fchdir fchflags fchmod fchown fcntl fstat
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -25246,7 +25246,8 @@ done
-for ac_func in nl_langinfo poll select setenv setlocale
+
+for ac_func in nl_langinfo pipe poll select setenv setlocale
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -25441,7 +25442,8 @@ done
-for ac_func in tzset unsetenv utime utimes
+
+for ac_func in tzset unsetenv utime utimes vfork
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -27783,7 +27785,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libarchive $as_me 2.5.1b, which was
+This file was extended by libarchive $as_me 2.5.4b, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -27836,7 +27838,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-libarchive config.status 2.5.1b
+libarchive config.status 2.5.4b
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -27952,7 +27954,6 @@ do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "libarchive/archive.h") CONFIG_FILES="$CONFIG_FILES libarchive/archive.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
diff --git a/archivers/libarchive/files/configure.ac b/archivers/libarchive/files/configure.ac
index 055772b4c09..405490bd23f 100644
--- a/archivers/libarchive/files/configure.ac
+++ b/archivers/libarchive/files/configure.ac
@@ -4,13 +4,13 @@ dnl First, define all of the version numbers up front.
dnl In particular, this allows the version macro to be used in AC_INIT
dnl These first two version numbers are updated automatically on each release.
-m4_define([LIBARCHIVE_VERSION_S],[2.5.1b])
-m4_define([LIBARCHIVE_VERSION_N],[2005001])
+m4_define([LIBARCHIVE_VERSION_S],[2.5.4b])
+m4_define([LIBARCHIVE_VERSION_N],[2005004])
dnl bsdtar versioning tracks libarchive
m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
dnl bsdcpio is still versioning separately
-m4_define([BSDCPIO_VERSION_S],[0.9.9a])
+m4_define([BSDCPIO_VERSION_S],[0.9.10a])
#
# Now starts the "real" configure script.
@@ -63,7 +63,6 @@ AC_SUBST(LIBARCHIVE_VERSION_NUMBER)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([libarchive/archive.h])
# Checks for programs.
AC_PROG_CC
@@ -174,7 +173,7 @@ AC_CHECK_HEADERS([inttypes.h langinfo.h limits.h linux/ext2_fs.h linux/fs.h])
AC_CHECK_HEADER(inttypes.h,
[AC_SUBST(ARCHIVE_H_INCLUDE_INTTYPES_H,['#include <inttypes.h> /* For int64_t */'])],
[AC_SUBST(ARCHIVE_H_INCLUDE_INTTYPES_H,[''])])
-AC_CHECK_HEADERS([locale.h paths.h poll.h pwd.h stdarg.h])
+AC_CHECK_HEADERS([locale.h paths.h poll.h pwd.h regex.h stdarg.h])
AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/acl.h sys/ioctl.h])
AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/select.h sys/time.h sys/utime.h])
AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h zlib.h])
@@ -240,13 +239,13 @@ AC_FUNC_STAT
AC_FUNC_STRERROR_R
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([chflags chown fchdir fchflags fchmod fchown fstat])
+AC_CHECK_FUNCS([chflags chown fchdir fchflags fchmod fchown fcntl fstat])
AC_CHECK_FUNCS([ftruncate futimes geteuid getopt_long getpid])
AC_CHECK_FUNCS([lchflags lchmod lchown])
AC_CHECK_FUNCS([lutimes memmove memset mkdir mkfifo mknod])
-AC_CHECK_FUNCS([nl_langinfo poll select setenv setlocale])
+AC_CHECK_FUNCS([nl_langinfo pipe poll select setenv setlocale])
AC_CHECK_FUNCS([strchr strdup strerror strrchr timegm])
-AC_CHECK_FUNCS([tzset unsetenv utime utimes])
+AC_CHECK_FUNCS([tzset unsetenv utime utimes vfork])
AC_CHECK_FUNCS([wcscpy wcslen wmemcmp wmemcpy])
# FreeBSD's nl_langinfo supports an option to specify whether the
diff --git a/archivers/libarchive/files/contrib/psota-benchmark/results.txt b/archivers/libarchive/files/contrib/psota-benchmark/results.txt
new file mode 100644
index 00000000000..8197b28f7ea
--- /dev/null
+++ b/archivers/libarchive/files/contrib/psota-benchmark/results.txt
@@ -0,0 +1,122 @@
+ODP: [Bug-tar] GNU tar, star and BSD tar speed comparision +new script
+
+Jan Psota
+Thu, 25 Oct 2007 06:51:13 -0700
+
+Latest TCP script at the bottom (3180 bytes).
+4 tests: 64bit dual core Athlon tmpfs / disk (reiserfs) - 60MB/s,
+ 32bit Athlon tmpfs / disk (reiserfs) - 55MB/s
+Both machines were idle -- used for testing only.
+Tarball and extracted files were on different physical devices.
+Test data: linux 2.6.22/3 kernel sources for memory operations,
+for the other data average file size should bring enough info.
+
+2 x [...] processor means 1 processor with 2 cores (2 entries in cpuinfo).
+Archive format is set to pax (Joerg).
+Let's end with it. I only wanted to send You a new version of TCP script :-).
+
+--
+Jan Psota
+
+TCP, version 2007-10-25
+Linux 2.6.22-suspend2-r2 / Gentoo Base System release 2.0.0_rc5
+2012MB of memory, 2 x AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ 2211.348
+512 KB 4426.24 bmips
+gcc (GCC) 4.2.2 (Gentoo 4.2.2 p1.0)
+CFLAGS="-O2 -march=k8 -pipe"
+
+bsdtar: bsdtar 2.3.4 - libarchive 2.3.4
+gnutar: tar (GNU tar) 1.19
+star: star: star 1.5a85 (x86_64-unknown-linux-gnu)
+
+best time of 5 repetitions,
+ src=linux-2.6.23, 291M in 23867 files, avg 13KB/file,
+ archive=/tmp/tcp.tar, extract to /tmp/tcptmp
+program operation real user system %CPU speed
+bsdtar create 0.764 0.232 0.532 99.96 370308 KB/s
+gnutar create 0.743 0.200 0.512 95.87 380775 KB/s
+star create 0.587 0.040 0.820 100.00 441247 KB/s
+
+bsdtar list 0.164 0.096 0.068 99.84 1579341 KB/s
+gnutar list 0.218 0.064 0.152 98.92 1188128 KB/s
+star list 0.359 0.044 0.240 79.09 721481 KB/s
+
+bsdtar extract 0.733 0.200 0.504 96.02 353358 KB/s
+gnutar extract 0.625 0.092 0.508 96.02 414419 KB/s
+star extract 0.875 0.096 0.980 100.00 296013 KB/s
+
+bsdtar compare 0.001 0.000 0.000 0.00 259012000 KB/s
+gnutar compare 0.719 0.288 0.400 95.66 360239 KB/s
+star compare 0.695 0.224 0.636 100.00 372679 KB/s
+
+[...]
+best time of 3 repetitions,
+ src=/home, 3.2G in 7447 files, avg 554KB/file,
+ archive=/var/tcp.tar, extract to /mnt/a/tcptmp
+program operation real user system %CPU speed
+bsdtar create 184.680 0.552 13.365 7.53 17958 KB/s
+gnutar create 159.240 0.256 12.417 7.95 20827 KB/s
+star create 181.779 0.140 14.789 8.21 18203 KB/s
+
+bsdtar list 0.053 0.032 0.016 91.41 62435471 KB/s
+gnutar list 56.535 0.136 3.764 6.89 58531 KB/s
+star list 56.652 0.080 5.236 9.38 58410 KB/s
+
+bsdtar extract 78.914 0.820 15.149 20.23 41932 KB/s
+gnutar extract 78.480 0.196 14.197 18.33 42164 KB/s
+star extract 79.439 0.132 12.973 16.49 41655 KB/s
+
+bsdtar compare 0.001 0.000 0.000 0.00 3309080000 KB/s
+gnutar compare 61.771 3.464 8.905 20.02 53570 KB/s
+star compare 57.561 1.728 9.897 20.19 57488 KB/s
+
+
+Linux 2.6.22-suspend2-smp / Gentoo Base System release 2.0.0_rc5
+504MB of memory, 1 x AMD Athlon(tm) Processor 1500.033 256 KB 3002.55 bmips
+gcc (GCC) 4.2.2 (Gentoo 4.2.2 p1.0)
+CFLAGS="-O2 -march=athlon-xp -mfpmath=sse -frename-registers -pipe"
+
+bsdtar: bsdtar 2.3.4 - libarchive 2.3.4
+gnutar: tar (GNU tar) 1.19
+star: star: star 1.5a85 (i686-pc-linux-gnu)
+
+best time of 3 repetitions,
+ src=/usr/src/linux-2.6.22-suspend2/drivers, 119M in 5900 files,
+ avg 21KB/file, archive=/tmp/tcp.tar, extract to /tmp/tcptmp
+program operation real user system %CPU speed
+bsdtar create 1.329 0.192 1.132 99.63 89784 KB/s
+gnutar create 1.223 0.124 1.092 99.46 97566 KB/s
+star create 1.848 0.036 1.708 94.36 61372 KB/s
+
+bsdtar list 0.167 0.060 0.108 100.00 679137 KB/s
+gnutar list 0.161 0.040 0.124 100.00 704447 KB/s
+star list 0.859 0.044 0.716 88.51 132032 KB/s
+
+bsdtar extract 1.186 0.172 1.012 99.87 95629 KB/s
+gnutar extract 1.064 0.056 1.004 99.63 106593 KB/s
+star extract 1.920 0.088 1.724 94.40 59070 KB/s
+
+bsdtar compare 0.002 0.000 0.000 0.00 56708000 KB/s
+gnutar compare 0.925 0.232 0.692 99.90 122611 KB/s
+star compare 1.569 0.376 1.096 93.79 72285 KB/s
+
+[...]
+best time of 3 repetitions,
+ src=/home/jasiu, 2.1G in 8416 files, avg 277KB/file,
+ archive=/home/j2/tcp.tar, extract to /mnt/a/tar/tcptmp
+program operation real user system %CPU speed
+bsdtar create 182.171 1.692 29.130 16.91 11584 KB/s
+gnutar create 174.999 0.632 27.450 16.04 12059 KB/s
+star create 180.004 0.360 41.795 23.41 11677 KB/s
+
+bsdtar list 0.214 0.076 0.136 99.04 9822294 KB/s
+gnutar list 0.210 0.076 0.136 100.00 10009385 KB/s
+star list 43.462 0.148 18.109 42.00 48363 KB/s
+
+bsdtar extract 94.912 4.476 31.574 37.98 22146 KB/s
+gnutar extract 94.657 0.396 29.462 31.54 22206 KB/s
+star extract 100.814 0.400 39.906 39.98 20849 KB/s
+
+bsdtar compare 0.003 0.000 0.004 100.00 700657000 KB/s
+gnutar compare 80.174 3.932 20.365 30.30 26217 KB/s
+star compare 73.911 8.341 27.670 48.72 28439 KB/s
diff --git a/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh b/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh
new file mode 100644
index 00000000000..6c0e4b5e92e
--- /dev/null
+++ b/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh
@@ -0,0 +1,104 @@
+#!/bin/sh
+# tar comparision program
+# 2007-10-25 Jan Psota
+
+n=3 # number of repetitions
+TAR=(bsdtar gnutar star) # TApeArchivers to compare
+OPT=("" "--seek" "-no-fsync")
+pax="--format=pax" # comment out for defaults
+OPN=(create list extract compare) # operations
+version="2007-10-25"
+TIMEFORMAT=$'%R\t%U\t%S\t%P'
+LC_ALL=C
+
+test $# -ge 2 || {
+ echo -e "usage:\t$0 source_dir where_to_place_archive
+[where_to_extract_it]
+
+TCP, version $version
+TCP stands for Tar Comparision Program here.
+It currently compares: BSD tar (bsdtar), GNU tar (gnutar) and star in archive
+creation, listing, extraction and archive-to-extracted comparision.
+Tcp prints out best time of n=$n repetitions.
+
+Tcp creates temporary archive named tcp.tar with $pax and some native
+(--seek/-no-fsync) options and extracts it to [\$3]/tcptmp/.
+If unset, third argument defaults to [\$2].
+After normal exit tcp removes tarball and extracted files.
+Tcp does not check filesystems destination directories are on for free space,
+so make sure there is enough space (a bit more than source_dir uses) for both:
+archive and extracted files.
+Do not use white space in arguments.
+ Jan Psota, $version"
+ exit 0
+}
+src=$1
+dst=$2/tcp.tar
+dst_path=${3:-$2}/tcptmp
+test -e $dst -o -e /tmp/tcp \
+ && { echo "$dst or /tmp/tcp exists, exiting"; exit 1; }
+mkdir $dst_path || exit 2
+
+use_times ()
+{
+ awk -F"\t" -vN=$n -vL="`du -k $dst`" -vOFS="\t" -vORS="" '
+ { if (NF==4) { printf "\t%s\t%10.1d KB/s\n", $0, ($1+0>0 ?
+(L+0)/($1+0) : 0) } }' \
+ /tmp/tcp | sort | head -1
+ > /tmp/tcp
+}
+
+test -d $src || { echo "'$src' is not a directory"; exit 3; }
+
+# system information: type, release, memory, cpu(s), compiler and flags
+echo -e "TCP, version $version\n"`uname -sr`" / "`head -1 /etc/*-release`
+free -m | awk '/^Mem/ { printf "%dMB of memory, ", $2 }'
+test -e /proc/cpuinfo \
+ && awk -F: '/name|cache size|MHz|mips/ { if (!a) b=b $2 }
+ /^$/ { a++ } END { print a" x"b" bmips" }' /proc/cpuinfo
+test -e /etc/gentoo-release \
+ && gcc --version | head -1 && grep ^CFLAGS /etc/make.conf
+
+# tar versions
+echo
+for tar in [EMAIL PROTECTED]; do echo -ne "$tar:\t"; $tar --version | head -1;
+done
+
+echo -e "\nbest time of $n repetitions,\n"\
+" src=$src, "\
+`du -sh $src | awk '{print $1}'`" in "`find $src | wc -l`" files, "\
+"avg "$((`du -sk $src | awk '{print $1}'`/`find $src -type f | wc
+-l`))"KB/file,\n"\
+" archive=$dst, extract to $dst_path"
+
+echo -e "program\toperation\treal\tuser\tsystem\t%CPU\t speed"
+> /tmp/tcp
+let op_num=0
+for op in "cf $dst $pax -C $src ." "tf $dst" "xf $dst -C $dst_path" \
+ "f $dst -C $dst_path --diff"; do
+ let tar_num=0
+ for tar in [EMAIL PROTECTED]; do
+ echo -en "$tar\t${OPN[op_num]}\t"
+ for ((i=1; i<=$n; i++)); do
+ echo $op | grep -q ^cf && rm -f $dst
+ echo $op | grep -q ^xf &&
+ { chmod -R u+w $dst_path
+ rm -rf $dst_path; mkdir $dst_path; }
+ sync
+ if echo $op | grep -q ^f; then # op == compare
+ time $tar $op ${OPT[$tar_num]} > /dev/null
+ else # op in (create | list | extract)
+ time $tar $op ${OPT[$tar_num]} > /dev/null \
+ || break 3
+ fi 2>> /tmp/tcp
+ done
+ use_times
+ let tar_num++
+ done
+ let op_num++
+ echo
+done
+rm -rf $dst_path $dst
+echo
+cat /tmp/tcp
+rm -f /tmp/tcp
diff --git a/archivers/libarchive/files/cpio/cpio.c b/archivers/libarchive/files/cpio/cpio.c
index 0a0771bbaef..1d78ce1266f 100644
--- a/archivers/libarchive/files/cpio/cpio.c
+++ b/archivers/libarchive/files/cpio/cpio.c
@@ -70,7 +70,7 @@ static void mode_pass(struct cpio *, const char *);
static void restore_time(struct cpio *, struct archive_entry *,
const char *, int fd);
static void usage(void);
-static void version(FILE *);
+static void version(void);
int
main(int argc, char *argv[])
@@ -204,7 +204,7 @@ main(int argc, char *argv[])
cpio->verbose++;
break;
case OPTION_VERSION: /* GNU convention */
- version(stdout);
+ version();
break;
#if 0
/*
@@ -326,16 +326,16 @@ long_help(void)
} else
putchar(*p);
}
- version(stdout);
+ version();
}
static void
-version(FILE *out)
+version(void)
{
- fprintf(out,"bsdcpio %s -- %s\n",
+ fprintf(stdout,"bsdcpio %s -- %s\n",
BSDCPIO_VERSION_STRING,
archive_version());
- exit(1);
+ exit(0);
}
static void
@@ -412,7 +412,10 @@ static int
file_to_archive(struct cpio *cpio, const char *srcpath)
{
struct stat st;
+ const char *destpath;
struct archive_entry *entry, *spare;
+ size_t len;
+ const char *p;
int lnklen;
int r;
@@ -422,7 +425,7 @@ file_to_archive(struct cpio *cpio, const char *srcpath)
entry = archive_entry_new();
if (entry == NULL)
cpio_errc(1, 0, "Couldn't allocate entry");
- archive_entry_set_pathname(entry, srcpath);
+ archive_entry_copy_sourcepath(entry, srcpath);
/* Get stat information. */
if (cpio->option_follow_links)
@@ -455,45 +458,11 @@ file_to_archive(struct cpio *cpio, const char *srcpath)
}
/*
- * If we're trying to preserve hardlinks, match them here.
+ * Generate a destination path for this entry.
+ * "destination path" is the name to which it will be copied in
+ * pass mode or the name that will go into the archive in
+ * output mode.
*/
- spare = NULL;
- if (cpio->linkresolver != NULL
- && !S_ISDIR(st.st_mode)) {
- archive_entry_linkify(cpio->linkresolver, &entry, &spare);
- }
-
- if (entry != NULL) {
- r = entry_to_archive(cpio, entry);
- archive_entry_free(entry);
- }
- if (spare != NULL) {
- if (r == 0)
- r = entry_to_archive(cpio, spare);
- archive_entry_free(spare);
- }
- return (r);
-}
-
-static int
-entry_to_archive(struct cpio *cpio, struct archive_entry *entry)
-{
- const char *destpath;
- char *srcpath;
- int fd = -1;
- ssize_t bytes_read;
- size_t len;
- const char *p;
- int r;
-
- /*
- * Generate a target path for this entry.
- */
- p = archive_entry_pathname(entry);
- srcpath = malloc(strlen(p) + 1);
- if (srcpath == NULL)
- cpio_errc(1, ENOMEM, "Can't allocate path buffer");
- strcpy(srcpath, p);
destpath = srcpath;
if (cpio->destdir) {
len = strlen(cpio->destdir) + strlen(srcpath) + 8;
@@ -517,12 +486,40 @@ entry_to_archive(struct cpio *cpio, struct archive_entry *entry)
}
if (cpio->option_rename)
destpath = cpio_rename(destpath);
- if (destpath == NULL) {
- free(srcpath);
+ if (destpath == NULL)
return (0);
- }
archive_entry_copy_pathname(entry, destpath);
+ /*
+ * If we're trying to preserve hardlinks, match them here.
+ */
+ spare = NULL;
+ if (cpio->linkresolver != NULL
+ && !S_ISDIR(st.st_mode)) {
+ archive_entry_linkify(cpio->linkresolver, &entry, &spare);
+ }
+
+ if (entry != NULL) {
+ r = entry_to_archive(cpio, entry);
+ archive_entry_free(entry);
+ }
+ if (spare != NULL) {
+ if (r == 0)
+ r = entry_to_archive(cpio, spare);
+ archive_entry_free(spare);
+ }
+ return (r);
+}
+
+static int
+entry_to_archive(struct cpio *cpio, struct archive_entry *entry)
+{
+ const char *destpath = archive_entry_pathname(entry);
+ const char *srcpath = archive_entry_sourcepath(entry);
+ int fd = -1;
+ ssize_t bytes_read;
+ int r;
+
/* Print out the destination name to the user. */
if (cpio->verbose)
fprintf(stderr,"%s", destpath);
@@ -539,7 +536,6 @@ entry_to_archive(struct cpio *cpio, struct archive_entry *entry)
archive_error_string(cpio->archive));
if (r == ARCHIVE_FATAL)
exit(1);
- free(srcpath);
return (0);
}
@@ -594,7 +590,6 @@ cleanup:
fprintf(stderr,"\n");
if (fd >= 0)
close(fd);
- free(srcpath);
return (0);
}
diff --git a/archivers/libarchive/files/cpio/test/list.h b/archivers/libarchive/files/cpio/test/list.h
index 9b0197cd50f..42cc5588218 100644
--- a/archivers/libarchive/files/cpio/test/list.h
+++ b/archivers/libarchive/files/cpio/test/list.h
@@ -1,3 +1,4 @@
+DEFINE_TEST(test_0)
DEFINE_TEST(test_basic)
DEFINE_TEST(test_format_newc)
DEFINE_TEST(test_gcpio_compat)
diff --git a/archivers/libarchive/files/cpio/test/main.c b/archivers/libarchive/files/cpio/test/main.c
index f06f75a918c..c88dd2ac341 100644
--- a/archivers/libarchive/files/cpio/test/main.c
+++ b/archivers/libarchive/files/cpio/test/main.c
@@ -64,10 +64,14 @@ extern char *optarg;
extern int optind;
#endif
-/* Default is to crash and try to force a core dump on failure. */
-static int dump_on_failure = 1;
+/* Enable core dump on failure. */
+static int dump_on_failure = 0;
+/* Default is to remove temp dirs for successful tests. */
+static int keep_temp_files = 0;
/* Default is to print some basic information about each test. */
static int quiet_flag = 0;
+/* Default is to summarize repeated failures. */
+static int verbose = 0;
/* Cumulative count of component failures. */
static int failures = 0;
/* Cumulative count of skipped component tests. */
@@ -243,7 +247,7 @@ test_assert(const char *file, int line, int value, const char *condition, void *
return (value);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (value);
fprintf(stderr, "%s:%d: Assertion failed\n", file, line);
fprintf(stderr, " Condition: %s\n", condition);
@@ -262,7 +266,7 @@ test_assert_equal_int(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: Ints not equal\n",
file, line);
@@ -314,16 +318,16 @@ test_assert_equal_string(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: Strings not equal\n",
file, line);
fprintf(stderr, " %s = ", e1);
strdump(v1);
- fprintf(stderr, "\n");
+ fprintf(stderr, " (length %d)\n", v1 == NULL ? 0 : strlen(v1));
fprintf(stderr, " %s = ", e2);
strdump(v2);
- fprintf(stderr, "\n");
+ fprintf(stderr, " (length %d)\n", v2 == NULL ? 0 : strlen(v2));
report_failure(extra);
return (0);
}
@@ -372,7 +376,7 @@ test_assert_equal_wstring(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: Unicode strings not equal\n",
file, line);
@@ -442,7 +446,7 @@ test_assert_equal_mem(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: memory not equal\n",
file, line);
@@ -474,12 +478,13 @@ test_assert_empty_file(const char *f1fmt, ...)
if (stat(f1, &st) != 0) {
fprintf(stderr, "%s:%d: Could not stat: %s\n", test_filename, test_line, f1);
report_failure(NULL);
+ return (0);
}
if (st.st_size == 0)
return (1);
failures ++;
- if (previous_failures(test_filename, test_line))
+ if (!verbose && previous_failures(test_filename, test_line))
return (0);
fprintf(stderr, "%s:%d: File not empty: %s\n", test_filename, test_line, f1);
@@ -526,7 +531,7 @@ test_assert_equal_file(const char *f1, const char *f2pattern, ...)
break;
}
failures ++;
- if (previous_failures(test_filename, test_line))
+ if (!verbose && previous_failures(test_filename, test_line))
return (0);
fprintf(stderr, "%s:%d: Files are not identical\n",
test_filename, test_line);
@@ -697,6 +702,12 @@ static int test_run(int i, const char *tmpdir)
(*tests[i].func)();
/* Summarize the results of this test. */
summarize();
+ /* If there were no failures, we can remove the work dir. */
+ if (failures == failures_before) {
+ if (!keep_temp_files && chdir(tmpdir) == 0) {
+ systemf("rm -rf %s", tests[i].name);
+ }
+ }
/* Return appropriate status. */
return (failures == failures_before ? 0 : 1);
}
@@ -710,8 +721,9 @@ static void usage(const char *program)
printf("Default is to run all tests.\n");
printf("Otherwise, specify the numbers of the tests you wish to run.\n");
printf("Options:\n");
- printf(" -k Keep running after failures.\n");
- printf(" Default: Core dump after any failure.\n");
+ printf(" -d Dump core after any failure, for debugging.\n");
+ printf(" -k Keep all temp files.\n");
+ printf(" Default: temp files for successful tests deleted.\n");
#ifdef PROGRAM
printf(" -p <path> Path to executable to be tested.\n");
printf(" Default: path taken from " ENVBASE " environment variable.\n");
@@ -719,6 +731,7 @@ static void usage(const char *program)
printf(" -q Quiet.\n");
printf(" -r <dir> Path to dir containing reference files.\n");
printf(" Default: Current directory.\n");
+ printf(" -v Verbose.\n");
printf("Available tests:\n");
for (i = 0; i < limit; i++)
printf(" %d: %s\n", i, tests[i].name);
@@ -811,9 +824,9 @@ int main(int argc, char **argv)
testprog = getenv(ENVBASE);
#endif
- /* Allow -k to be controlled through the environment. */
- if (getenv(ENVBASE "_KEEP_GOING") != NULL)
- dump_on_failure = 0;
+ /* Allow -d to be controlled through the environment. */
+ if (getenv(ENVBASE "_DEBUG") != NULL)
+ dump_on_failure = 1;
/* Get the directory holding test files from environment. */
refdir = getenv(ENVBASE "_TEST_FILES");
@@ -821,10 +834,13 @@ int main(int argc, char **argv)
/*
* Parse options.
*/
- while ((opt = getopt(argc, argv, "kp:qr:")) != -1) {
+ while ((opt = getopt(argc, argv, "dkp:qr:v")) != -1) {
switch (opt) {
+ case 'd':
+ dump_on_failure = 1;
+ break;
case 'k':
- dump_on_failure = 0;
+ keep_temp_files = 1;
break;
case 'p':
#ifdef PROGRAM
@@ -839,6 +855,9 @@ int main(int argc, char **argv)
case 'r':
refdir = optarg;
break;
+ case 'v':
+ verbose = 1;
+ break;
case '?':
default:
usage(progname);
@@ -887,6 +906,7 @@ int main(int argc, char **argv)
--p;
*p = '\0';
}
+ systemf("rm %s/refdir", tmpdir);
}
/*
@@ -942,5 +962,9 @@ int main(int argc, char **argv)
free(refdir_alloc);
+ /* If the final tmpdir is empty, we can remove it. */
+ /* This should be the usual case when all tests succeed. */
+ rmdir(tmpdir);
+
return (tests_failed);
}
diff --git a/archivers/libarchive/files/cpio/test/test_0.c b/archivers/libarchive/files/cpio/test/test_0.c
new file mode 100644
index 00000000000..7a72af1c8ed
--- /dev/null
+++ b/archivers/libarchive/files/cpio/test/test_0.c
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+/*
+ * This first test does basic sanity checks on the environment. For
+ * most of these, we just exit on failure.
+ */
+
+DEFINE_TEST(test_0)
+{
+ struct stat st;
+
+ failure("File %s does not exist?!", testprog);
+ if (!assertEqualInt(0, stat(testprog, &st)))
+ exit(1);
+
+ failure("%s is not executable?!", testprog);
+ if (!assert((st.st_mode & 0111) != 0))
+ exit(1);
+
+ /*
+ * Try to succesfully run the program; this requires that
+ * we know some option that will succeed.
+ */
+ if (0 == systemf("%s --version >/dev/null", testprog)) {
+ /* This worked. */
+ } else if (0 == systemf("%s -W version >/dev/null", testprog)) {
+ /* This worked. */
+ } else {
+ failure("Unable to successfully run any of the following:\n"
+ " * %s --version\n"
+ " * %s -W version\n",
+ testprog, testprog);
+ assert(0);
+ }
+
+ /* TODO: Ensure that our reference files are available. */
+}
diff --git a/archivers/libarchive/files/cpio/test/test_basic.c b/archivers/libarchive/files/cpio/test/test_basic.c
index 449d90e67b9..7f1fe6de9f7 100644
--- a/archivers/libarchive/files/cpio/test/test_basic.c
+++ b/archivers/libarchive/files/cpio/test/test_basic.c
@@ -25,37 +25,13 @@
#include "test.h"
__FBSDID("$FreeBSD$");
-
static void
-basic_cpio(const char *target, const char *pack_options, const char *unpack_options)
+verify_files(const char *target)
{
struct stat st, st2;
char buff[128];
int r;
- assertEqualInt(0, mkdir(target, 0775));
-
- /* Use the cpio program to create an archive. */
- r = systemf("%s -o --quiet %s < filelist >%s/archive 2>%s/pack.err", testprog, pack_options, target, target);
- failure("Error invoking %s -o --quiet %s", testprog, pack_options);
- assertEqualInt(r, 0);
-
- chdir(target);
-
- /* Verify that nothing went to stderr. */
- assertEmptyFile("pack.err");
-
- /*
- * Use cpio to unpack the archive into another directory.
- */
- r = systemf("%s -i --quiet %s< archive >unpack.out 2>unpack.err", testprog, unpack_options);
- failure("Error invoking %s -i %s", testprog, unpack_options);
- assertEqualInt(r, 0);
-
- /* Verify stderr. */
- failure("Error invoking %s -i %s in dir %s", testprog, unpack_options, target);
- assertEmptyFile("unpack.err");
-
/*
* Verify unpacked files.
*/
@@ -68,7 +44,7 @@ basic_cpio(const char *target, const char *pack_options, const char *unpack_opti
assert(S_ISREG(st.st_mode));
assertEqualInt(0644, st.st_mode & 0777);
assertEqualInt(10, st.st_size);
- failure("file %s/file", target);
+ failure("file %s/file should have 2 links", target);
assertEqualInt(2, st.st_nlink);
}
@@ -80,11 +56,12 @@ basic_cpio(const char *target, const char *pack_options, const char *unpack_opti
assert(S_ISREG(st2.st_mode));
assertEqualInt(0644, st2.st_mode & 0777);
assertEqualInt(10, st2.st_size);
- failure("file %s/linkfile", target);
+ failure("file %s/linkfile should have 2 links", target);
assertEqualInt(2, st2.st_nlink);
/* Verify that the two are really hardlinked. */
assertEqualInt(st.st_dev, st2.st_dev);
- failure("%s/linkfile and %s/file aren't really hardlinks", target, target);
+ failure("%s/linkfile and %s/file should be hardlinked",
+ target, target);
assertEqualInt(st.st_ino, st2.st_ino);
}
@@ -111,7 +88,72 @@ basic_cpio(const char *target, const char *pack_options, const char *unpack_opti
assert(S_ISDIR(st.st_mode));
assertEqualInt(0775, st.st_mode & 0777);
}
+}
+
+static void
+basic_cpio(const char *target,
+ const char *pack_options,
+ const char *unpack_options,
+ const char *se)
+{
+ int r;
+
+ if (!assertEqualInt(0, mkdir(target, 0775)))
+ return;
+
+ /* Use the cpio program to create an archive. */
+ r = systemf("%s -o %s < filelist >%s/archive 2>%s/pack.err",
+ testprog, pack_options, target, target);
+ failure("Error invoking %s -o %s", testprog, pack_options);
+ assertEqualInt(r, 0);
+
+ chdir(target);
+
+ /* Verify stderr. */
+ failure("Expected: %s, options=%s", se, pack_options);
+ assertFileContents(se, strlen(se), "pack.err");
+
+ /*
+ * Use cpio to unpack the archive into another directory.
+ */
+ r = systemf("%s -i %s< archive >unpack.out 2>unpack.err",
+ testprog, unpack_options);
+ failure("Error invoking %s -i %s", testprog, unpack_options);
+ assertEqualInt(r, 0);
+
+ /* Verify stderr. */
+ failure("Error invoking %s -i %s in dir %s", testprog, unpack_options, target);
+ assertFileContents(se, strlen(se), "unpack.err");
+
+ verify_files(target);
+
+ chdir("..");
+}
+
+static void
+passthrough(const char *target)
+{
+ int r;
+
+ if (!assertEqualInt(0, mkdir(target, 0775)))
+ return;
+
+ /*
+ * Use cpio passthrough mode to copy files to another directory.
+ */
+ r = systemf("%s -p -W quiet %s <filelist >%s/stdout 2>%s/stderr",
+ testprog, target, target, target);
+ failure("Error invoking %s -p", testprog);
+ assertEqualInt(r, 0);
+
+ chdir(target);
+
+ /* Verify stderr. */
+ failure("Error invoking %s -p in dir %s",
+ testprog, target);
+ assertEmptyFile("stderr");
+ verify_files(target);
chdir("..");
}
@@ -150,11 +192,13 @@ DEFINE_TEST(test_basic)
close(filelist);
/* Archive/dearchive with a variety of options. */
- basic_cpio("copy", "", "");
- basic_cpio("copy_odc", "--format=odc", "");
- basic_cpio("copy_newc", "-H newc", "");
- basic_cpio("copy_cpio", "-H odc", "");
- basic_cpio("copy_ustar", "-H ustar", "");
+ basic_cpio("copy", "", "", "1 block\n");
+ basic_cpio("copy_odc", "--format=odc", "", "1 block\n");
+ basic_cpio("copy_newc", "-H newc", "", "2 blocks\n");
+ basic_cpio("copy_cpio", "-H odc", "", "1 block\n");
+ basic_cpio("copy_ustar", "-H ustar", "", "7 blocks\n");
+ /* Copy in one step using -p */
+ passthrough("passthrough");
umask(oldumask);
}
diff --git a/archivers/libarchive/files/cpio/test/test_format_newc.c b/archivers/libarchive/files/cpio/test/test_format_newc.c
index 68cc193cf2a..0714bd427e2 100644
--- a/archivers/libarchive/files/cpio/test/test_format_newc.c
+++ b/archivers/libarchive/files/cpio/test/test_format_newc.c
@@ -66,7 +66,7 @@ DEFINE_TEST(test_format_newc)
int fd, list;
int r;
int devmajor, devminor, ino, gid;
- time_t t, now;
+ time_t t, t2, now;
char *p, *e;
size_t s;
mode_t oldmask;
@@ -106,13 +106,13 @@ DEFINE_TEST(test_format_newc)
/* Use the cpio program to create an archive. */
close(list);
- r = systemf("%s -o --format=newc --quiet <list >newc.out 2>newc.err",
+ r = systemf("%s -o --format=newc <list >newc.out 2>newc.err",
testprog);
if (!assertEqualInt(r, 0))
return;
/* Verify that nothing went to stderr. */
- assertEmptyFile("newc.err");
+ assertFileContents("2 blocks\n", 9, "newc.err");
/* Verify that stdout is a well-formed cpio file in "newc" format. */
p = slurpfile(&s, "newc.out");
@@ -159,7 +159,9 @@ DEFINE_TEST(test_format_newc)
assertEqualInt(from_hex(e + 22, 8), getuid()); /* uid */
assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */
assertEqualMem(e + 38, "00000001", 8); /* nlink */
- assertEqualInt(t, from_hex(e + 46, 8)); /* mtime */
+ t2 = from_hex(e + 46, 8); /* mtime */
+ failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2);
+ assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */
assertEqualMem(e + 54, "00000005", 8); /* File size */
assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */
assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */
@@ -179,7 +181,9 @@ DEFINE_TEST(test_format_newc)
assertEqualInt(from_hex(e + 22, 8), getuid()); /* uid */
assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */
assertEqualMem(e + 38, "00000002", 8); /* nlink */
- assertEqualInt(t, from_hex(e + 46, 8)); /* mtime */
+ t2 = from_hex(e + 46, 8); /* mtime */
+ failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2);
+ assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */
assertEqualMem(e + 54, "00000000", 8); /* File size */
assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */
assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */
@@ -203,7 +207,9 @@ DEFINE_TEST(test_format_newc)
assertEqualInt(from_hex(e + 22, 8), getuid()); /* uid */
assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */
assertEqualMem(e + 38, "00000003", 8); /* nlink */
- assertEqualInt(t, from_hex(e + 46, 8)); /* mtime */
+ t2 = from_hex(e + 46, 8); /* mtime */
+ failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2);
+ assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */
assertEqualInt(10, from_hex(e + 54, 8)); /* File size */
assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */
assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */
diff --git a/archivers/libarchive/files/cpio/test/test_gcpio_compat.c b/archivers/libarchive/files/cpio/test/test_gcpio_compat.c
index 61c9878b11e..4c69abb6368 100644
--- a/archivers/libarchive/files/cpio/test/test_gcpio_compat.c
+++ b/archivers/libarchive/files/cpio/test/test_gcpio_compat.c
@@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$");
static void
-unpack_test(const char *from, const char *options)
+unpack_test(const char *from, const char *options, const char *se)
{
struct stat st, st2;
char buff[128];
@@ -41,14 +41,14 @@ unpack_test(const char *from, const char *options)
* Use cpio to unpack the sample archive
*/
extract_reference_file(from);
- r = systemf("%s -i --quiet %s < %s >unpack.out 2>unpack.err",
+ r = systemf("%s -i %s < %s >unpack.out 2>unpack.err",
testprog, options, from);
- failure("Error invoking %s -i --quiet %s < %s",
+ failure("Error invoking %s -i %s < %s",
testprog, options, from);
assertEqualInt(r, 0);
/* Verify that nothing went to stderr. */
- assertEmptyFile("unpack.err");
+ assertFileContents(se, strlen(se), "unpack.err");
/*
* Verify unpacked files.
@@ -118,10 +118,10 @@ DEFINE_TEST(test_gcpio_compat)
oldumask = umask(0);
/* Dearchive sample files with a variety of options. */
- unpack_test("test_gcpio_compat_ref.bin", "");
- unpack_test("test_gcpio_compat_ref.crc", "");
- unpack_test("test_gcpio_compat_ref.newc", "");
- unpack_test("test_gcpio_compat_ref.ustar", "");
+ unpack_test("test_gcpio_compat_ref.bin", "", "1 block\n");
+ unpack_test("test_gcpio_compat_ref.crc", "", "2 blocks\n");
+ unpack_test("test_gcpio_compat_ref.newc", "", "2 blocks\n");
+ unpack_test("test_gcpio_compat_ref.ustar", "", "7 blocks\n");
umask(oldumask);
}
diff --git a/archivers/libarchive/files/cpio/test/test_option_B.c b/archivers/libarchive/files/cpio/test/test_option_B.c
index 17533180cec..80838823f9d 100644
--- a/archivers/libarchive/files/cpio/test/test_option_B.c
+++ b/archivers/libarchive/files/cpio/test/test_option_B.c
@@ -39,16 +39,16 @@ DEFINE_TEST(test_option_B)
close(fd);
/* Create an archive without -B; this should be 512 bytes. */
- r = systemf("echo file | %s -o --quiet > small.cpio 2>small.err", testprog);
+ r = systemf("echo file | %s -o > small.cpio 2>small.err", testprog);
assertEqualInt(r, 0);
- assertEmptyFile("small.err");
+ assertFileContents("1 block\n", 8, "small.err");
assertEqualInt(0, stat("small.cpio", &st));
assertEqualInt(512, st.st_size);
/* Create an archive with -B; this should be 5120 bytes. */
- r = systemf("echo file | %s -oB --quiet > large.cpio 2>large.err", testprog);
+ r = systemf("echo file | %s -oB > large.cpio 2>large.err", testprog);
assertEqualInt(r, 0);
- assertEmptyFile("large.err");
+ assertFileContents("1 block\n", 8, "large.err");
assertEqualInt(0, stat("large.cpio", &st));
assertEqualInt(5120, st.st_size);
}
diff --git a/archivers/libarchive/files/cpio/test/test_option_L.c b/archivers/libarchive/files/cpio/test/test_option_L.c
index d91c001631f..2d69ab6ec34 100644
--- a/archivers/libarchive/files/cpio/test/test_option_L.c
+++ b/archivers/libarchive/files/cpio/test/test_option_L.c
@@ -46,13 +46,13 @@ DEFINE_TEST(test_option_L)
close(filelist);
- r = systemf("cat filelist | %s -pd --quiet copy >copy.out 2>copy.err", testprog);
+ r = systemf("cat filelist | %s -pd copy >copy.out 2>copy.err", testprog);
assertEqualInt(r, 0);
assertEqualInt(0, lstat("copy/symlink", &st));
failure("Regular -p without -L should preserve symlinks.");
assert(S_ISLNK(st.st_mode));
- r = systemf("cat filelist | %s -pd -L --quiet copy-L >copy-L.out 2>copy-L.err", testprog);
+ r = systemf("cat filelist | %s -pd -L copy-L >copy-L.out 2>copy-L.err", testprog);
assertEqualInt(r, 0);
assertEmptyFile("copy-L.out");
assertEmptyFile("copy-L.err");
@@ -60,8 +60,8 @@ DEFINE_TEST(test_option_L)
failure("-pdL should dereference symlinks and turn them into files.");
assert(!S_ISLNK(st.st_mode));
- r = systemf("cat filelist | %s -o --quiet >archive.out 2>archive.err", testprog);
- failure("Error invoking %s -o --quiet", testprog);
+ r = systemf("cat filelist | %s -o >archive.out 2>archive.err", testprog);
+ failure("Error invoking %s -o ", testprog);
assertEqualInt(r, 0);
assertEqualInt(0, mkdir("unpack", 0755));
@@ -71,8 +71,8 @@ DEFINE_TEST(test_option_L)
assertEqualInt(0, lstat("unpack/symlink", &st));
assert(S_ISLNK(st.st_mode));
- r = systemf("cat filelist | %s -oL --quiet >archive-L.out 2>archive-L.err", testprog);
- failure("Error invoking %s -oL --quiet", testprog);
+ r = systemf("cat filelist | %s -oL >archive-L.out 2>archive-L.err", testprog);
+ failure("Error invoking %s -oL", testprog);
assertEqualInt(r, 0);
assertEqualInt(0, mkdir("unpack-L", 0755));
diff --git a/archivers/libarchive/files/cpio/test/test_option_a.c b/archivers/libarchive/files/cpio/test/test_option_a.c
index 39118d71171..c063280f7d7 100644
--- a/archivers/libarchive/files/cpio/test/test_option_a.c
+++ b/archivers/libarchive/files/cpio/test/test_option_a.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2003-2007 Tim Kientzle
+ * Copyright (c) 2003-2008 Tim Kientzle
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,33 +23,70 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
+#include <utime.h>
__FBSDID("$FreeBSD$");
+static struct {
+ const char *name;
+ time_t atime_sec;
+} files[] = {
+ { "f0", 0 },
+ { "f1", 0 },
+ { "f2", 0 },
+ { "f3", 0 },
+ { "f4", 0 },
+ { "f5", 0 }
+};
+
/*
- * Create a file on disk and set the atime to a known value.
+ * Create a bunch of test files and record their atimes.
+ * For the atime preserve/change tests, the files must have
+ * atimes in the past. We can accomplish this by explicitly invoking
+ * utime() on platforms that support it or by simply sleeping
+ * for a second after creating the files. (Creating all of the files
+ * at once means we only need to sleep once.)
*/
static void
-test_create(const char *filename)
+test_create(void)
{
+ struct stat st;
+ struct utimbuf times;
+ static const int numfiles = sizeof(files) / sizeof(files[0]);
+ int i;
int fd;
- struct timeval times[2];
- fd = open(filename, O_CREAT | O_WRONLY, 0644);
- assert(fd >= 0);
- /*
- * Note: Have to write at least one byte to the file.
- * cpio doesn't bother reading the file if it's zero length,
- * so the atime never gets changed in that case, which
- * makes the tests below rather pointless.
- */
- assertEqualInt(1, write(fd, "a", 1));
- memset(times, 0, sizeof(times));
- times[0].tv_sec = 1; /* atime = 1.000000002 */
- times[0].tv_usec = 2;
- times[1].tv_sec = 3; /* mtime = 3.000000004 */
- times[1].tv_usec = 4;
- assertEqualInt(0, futimes(fd, times));
- close(fd);
+ for (i = 0; i < numfiles; ++i) {
+ fd = open(files[i].name, O_CREAT | O_WRONLY, 0644);
+ assert(fd >= 0);
+ /*
+ * Note: Have to write at least one byte to the file.
+ * cpio doesn't bother reading the file if it's zero length,
+ * so the atime never gets changed in that case, which
+ * makes the tests below rather pointless.
+ */
+ assertEqualInt(1, write(fd, "a", 1));
+ close(fd);
+
+ /* If utime() isn't supported on your platform, just
+ * #ifdef this section out. Most of the test below is
+ * still valid. */
+ memset(&times, 0, sizeof(times));
+ times.actime = 1;
+ times.modtime = 3;
+ assertEqualInt(0, utime(files[i].name, &times));
+
+ /* Record whatever atime the file ended up with. */
+ /* If utime() is available, this should be 1, but there's
+ * no harm in being careful. */
+ assertEqualInt(0, stat(files[i].name, &st));
+ files[i].atime_sec = st.st_atime;
+ }
+
+ /* Wait until the atime on the last file is actually in the past. */
+ /* If utime() is supported above, there's no sleep here which
+ * makes the test faster. */
+ while (files[numfiles - 1].atime_sec >= time(NULL))
+ sleep(1);
}
DEFINE_TEST(test_option_a)
@@ -59,18 +96,15 @@ DEFINE_TEST(test_option_a)
int f;
char buff[64];
- /* Sanity check; verify that test_create really works. */
- test_create("f0");
- assertEqualInt(0, stat("f0", &st));
- failure("test_create function is supposed to create a file with atime == 1; if this doesn't work, test_option_a is entirely invalid.");
- assertEqualInt(st.st_atime, 1);
+ /* Create all of the test files. */
+ test_create();
/* Sanity check; verify that atimes really do get modified. */
- f = open("f0", O_RDONLY);
+ f = open(files[0].name, O_RDONLY);
assertEqualInt(1, read(f,buff, 1));
assertEqualInt(0, close(f));
assertEqualInt(0, stat("f0", &st));
- if (st.st_atime == 1) {
+ if (st.st_atime == files[0].atime_sec) {
skipping("Cannot verify -a option\n"
" Your system appears to not support atime.");
}
@@ -82,23 +116,21 @@ DEFINE_TEST(test_option_a)
*/
/* Copy the file without -a; should change the atime. */
- test_create("f1");
- r = systemf("echo f1 | %s -pd --quiet copy-no-a > copy-no-a.out 2>copy-no-a.err", testprog);
+ r = systemf("echo %s | %s -pd copy-no-a > copy-no-a.out 2>copy-no-a.err", files[1].name, testprog);
assertEqualInt(r, 0);
assertEmptyFile("copy-no-a.err");
assertEmptyFile("copy-no-a.out");
- assertEqualInt(0, stat("f1", &st));
- failure("Copying file without -a should have changed atime. Ignore this if your system does not record atimes.");
- assert(st.st_atime != 1);
+ assertEqualInt(0, stat(files[1].name, &st));
+ failure("Copying file without -a should have changed atime.");
+ assert(st.st_atime != files[1].atime_sec);
/* Archive the file without -a; should change the atime. */
- test_create("f2");
- r = systemf("echo f2 | %s -o --quiet > archive-no-a.out 2>archive-no-a.err", testprog);
+ r = systemf("echo %s | %s -o > archive-no-a.out 2>archive-no-a.err", files[2].name, testprog);
assertEqualInt(r, 0);
assertEmptyFile("copy-no-a.err");
- assertEqualInt(0, stat("f2", &st));
- failure("Archiving file without -a should have changed atime. Ignore this if your system does not record atimes.");
- assert(st.st_atime != 1);
+ assertEqualInt(0, stat(files[2].name, &st));
+ failure("Archiving file without -a should have changed atime.");
+ assert(st.st_atime != files[2].atime_sec);
}
/*
@@ -107,22 +139,21 @@ DEFINE_TEST(test_option_a)
*/
/* Copy the file with -a; should not change the atime. */
- test_create("f3");
- r = systemf("echo f3 | %s -pad --quiet copy-a > copy-a.out 2>copy-a.err", testprog);
+ r = systemf("echo %s | %s -pad copy-a > copy-a.out 2>copy-a.err",
+ files[3].name, testprog);
assertEqualInt(r, 0);
assertEmptyFile("copy-a.err");
assertEmptyFile("copy-a.out");
- assertEqualInt(0, stat("f3", &st));
+ assertEqualInt(0, stat(files[3].name, &st));
failure("Copying file with -a should not have changed atime.");
- assertEqualInt(st.st_atime, 1);
+ assertEqualInt(st.st_atime, files[3].atime_sec);
- /* Archive the file without -a; should change the atime. */
- test_create("f4");
- r = systemf("echo f4 | %s -oa --quiet > archive-a.out 2>archive-a.err", testprog);
+ /* Archive the file with -a; should not change the atime. */
+ r = systemf("echo %s | %s -oa > archive-a.out 2>archive-a.err",
+ files[4].name, testprog);
assertEqualInt(r, 0);
assertEmptyFile("copy-a.err");
- assertEqualInt(0, stat("f4", &st));
+ assertEqualInt(0, stat(files[4].name, &st));
failure("Archiving file with -a should not have changed atime.");
- assertEqualInt(st.st_atime, 1);
-
+ assertEqualInt(st.st_atime, files[4].atime_sec);
}
diff --git a/archivers/libarchive/files/cpio/test/test_option_c.c b/archivers/libarchive/files/cpio/test/test_option_c.c
index 9c422c97058..05b48c29cc3 100644
--- a/archivers/libarchive/files/cpio/test/test_option_c.c
+++ b/archivers/libarchive/files/cpio/test/test_option_c.c
@@ -88,9 +88,9 @@ DEFINE_TEST(test_option_c)
/* Use the cpio program to create an archive. */
close(filelist);
- r = systemf("%s -oc --quiet <filelist >basic.out 2>basic.err", testprog);
+ r = systemf("%s -oc <filelist >basic.out 2>basic.err", testprog);
/* Verify that nothing went to stderr. */
- assertEmptyFile("basic.err");
+ assertFileContents("1 block\n", 8, "basic.err");
/* Assert that the program finished. */
failure("%s -oc crashed", testprog);
diff --git a/archivers/libarchive/files/cpio/test/test_option_d.c b/archivers/libarchive/files/cpio/test/test_option_d.c
index cc962cc5856..370c82ae2d0 100644
--- a/archivers/libarchive/files/cpio/test/test_option_d.c
+++ b/archivers/libarchive/files/cpio/test/test_option_d.c
@@ -40,9 +40,9 @@ DEFINE_TEST(test_option_d)
close(fd);
/* Create an archive. */
- r = systemf("echo dir/file | %s -o --quiet > archive.cpio 2>archive.err", testprog);
+ r = systemf("echo dir/file | %s -o > archive.cpio 2>archive.err", testprog);
assertEqualInt(r, 0);
- assertEmptyFile("archive.err");
+ assertFileContents("1 block\n", 8, "archive.err");
assertEqualInt(0, stat("archive.cpio", &st));
assertEqualInt(512, st.st_size);
@@ -59,10 +59,10 @@ DEFINE_TEST(test_option_d)
assertEqualInt(0, chdir(".."));
assertEqualInt(0, mkdir("with-d", 0755));
assertEqualInt(0, chdir("with-d"));
- r = systemf("%s -id --quiet < ../archive.cpio >out 2>err", testprog);
+ r = systemf("%s -id < ../archive.cpio >out 2>err", testprog);
assertEqualInt(r, 0);
assertEmptyFile("out");
- assertEmptyFile("err");
+ assertFileContents("1 block\n", 8, "err");
/* And the file should be restored. */
assertEqualInt(0, stat("dir/file", &st));
}
diff --git a/archivers/libarchive/files/cpio/test/test_option_ell.c b/archivers/libarchive/files/cpio/test/test_option_ell.c
index caf2a80b6d4..36bb0acc350 100644
--- a/archivers/libarchive/files/cpio/test/test_option_ell.c
+++ b/archivers/libarchive/files/cpio/test/test_option_ell.c
@@ -47,7 +47,7 @@ DEFINE_TEST(test_option_ell)
assertEqualInt(0, stat("f", &st));
/* Copy the file to the "copy" dir. */
- r = systemf("echo f | %s -pd --quiet copy >copy.out 2>copy.err",
+ r = systemf("echo f | %s -pd copy >copy.out 2>copy.err",
testprog);
assertEqualInt(r, 0);
@@ -56,7 +56,7 @@ DEFINE_TEST(test_option_ell)
assert(st2.st_ino != st.st_ino);
/* Copy the file to the "link" dir with the -l option. */
- r = systemf("echo f | %s -pld --quiet link >link.out 2>link.err",
+ r = systemf("echo f | %s -pld link >link.out 2>link.err",
testprog);
assertEqualInt(r, 0);
diff --git a/archivers/libarchive/files/cpio/test/test_option_f.c b/archivers/libarchive/files/cpio/test/test_option_f.c
index 37aba7fa41d..d1af91290d4 100644
--- a/archivers/libarchive/files/cpio/test/test_option_f.c
+++ b/archivers/libarchive/files/cpio/test/test_option_f.c
@@ -36,7 +36,7 @@ unpack(const char *dirname, const char *option)
assertEqualInt(0, mkdir(dirname, 0755));
assertEqualInt(0, chdir(dirname));
extract_reference_file("test_option_f.cpio");
- r = systemf("%s -i --quiet %s < test_option_f.cpio > copy-no-a.out 2>copy-no-a.err", testprog, option);
+ r = systemf("%s -i %s < test_option_f.cpio > copy-no-a.out 2>copy-no-a.err", testprog, option);
assertEqualInt(0, r);
assertEqualInt(0, chdir(".."));
}
diff --git a/archivers/libarchive/files/cpio/test/test_option_u.c b/archivers/libarchive/files/cpio/test/test_option_u.c
index b35719f6c52..7abd7f0f0ef 100644
--- a/archivers/libarchive/files/cpio/test/test_option_u.c
+++ b/archivers/libarchive/files/cpio/test/test_option_u.c
@@ -23,11 +23,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
+#include <utime.h>
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_u)
{
- struct timeval times[2];
+ struct utimbuf times;
char *p;
size_t s;
int fd;
@@ -40,7 +41,7 @@ DEFINE_TEST(test_option_u)
close(fd);
/* Copy the file to the "copy" dir. */
- r = systemf("echo f | %s -pd --quiet copy >copy.out 2>copy.err",
+ r = systemf("echo f | %s -pd copy >copy.out 2>copy.err",
testprog);
assertEqualInt(r, 0);
@@ -56,15 +57,13 @@ DEFINE_TEST(test_option_u)
close(fd);
/* Set the mtime to the distant past. */
- memset(times, 0, sizeof(times));
- times[0].tv_sec = 1; /* atime = 1.000000002 */
- times[0].tv_usec = 2;
- times[1].tv_sec = 3; /* mtime = 3.000000004 */
- times[1].tv_usec = 4;
- assertEqualInt(0, utimes("f", times));
+ memset(&times, 0, sizeof(times));
+ times.actime = 1;
+ times.modtime = 3;
+ assertEqualInt(0, utime("f", &times));
/* Copy the file to the "copy" dir. */
- r = systemf("echo f | %s -pd --quiet copy >copy.out 2>copy.err",
+ r = systemf("echo f | %s -pd copy >copy.out 2>copy.err",
testprog);
assertEqualInt(r, 0);
@@ -74,7 +73,7 @@ DEFINE_TEST(test_option_u)
assertEqualMem(p, "a", 1);
/* Copy the file to the "copy" dir with -u (force) */
- r = systemf("echo f | %s -pud --quiet copy >copy.out 2>copy.err",
+ r = systemf("echo f | %s -pud copy >copy.out 2>copy.err",
testprog);
assertEqualInt(r, 0);
diff --git a/archivers/libarchive/files/cpio/test/test_option_version.c b/archivers/libarchive/files/cpio/test/test_option_version.c
index ff90dfd824e..95258eb7e82 100644
--- a/archivers/libarchive/files/cpio/test/test_option_version.c
+++ b/archivers/libarchive/files/cpio/test/test_option_version.c
@@ -88,6 +88,14 @@ DEFINE_TEST(test_option_version)
size_t s;
r = systemf("%s --version >version.stdout 2>version.stderr", testprog);
+ if (r != 0)
+ r = systemf("%s -W version >version.stdout 2>version.stderr",
+ testprog);
+ failure("Unable to run either %s --version or %s -W version",
+ testprog, testprog);
+ if (!assert(r == 0))
+ return;
+
/* --version should generate nothing to stderr. */
assertEmptyFile("version.stderr");
/* Verify format of version message. */
diff --git a/archivers/libarchive/files/doc/man/archive_entry.3 b/archivers/libarchive/files/doc/man/archive_entry.3
index 02261c50cf6..994b4743c33 100644
--- a/archivers/libarchive/files/doc/man/archive_entry.3
+++ b/archivers/libarchive/files/doc/man/archive_entry.3
@@ -1,4 +1,4 @@
-.TH archive_entry 3 "December 15, 2003" ""
+.TH archive_entry 3 "May 12, 2008" ""
.SH NAME
\fBarchive_entry_acl_add_entry\fP,
\fBarchive_entry_acl_add_entry_w\fP,
@@ -12,6 +12,7 @@
\fBarchive_entry_atime_nsec\fP,
\fBarchive_entry_clear\fP,
\fBarchive_entry_clone\fP,
+\fBarchive_entry_copy_fflags_text\fP,
\fBarchive_entry_copy_fflags_text_w\fP,
\fBarchive_entry_copy_gname\fP,
\fBarchive_entry_copy_gname_w\fP,
@@ -20,6 +21,7 @@
\fBarchive_entry_copy_link\fP,
\fBarchive_entry_copy_link_w\fP,
\fBarchive_entry_copy_pathname_w\fP,
+\fBarchive_entry_copy_sourcepath\fP,
\fBarchive_entry_copy_stat\fP,
\fBarchive_entry_copy_symlink\fP,
\fBarchive_entry_copy_symlink_w\fP,
@@ -67,6 +69,7 @@
\fBarchive_entry_set_uid\fP,
\fBarchive_entry_set_uname\fP,
\fBarchive_entry_size\fP,
+\fBarchive_entry_sourcepath\fP,
\fBarchive_entry_stat\fP,
\fBarchive_entry_symlink\fP,
\fBarchive_entry_uid\fP,
@@ -165,6 +168,12 @@ Fc
\fBarchive_entry_clone\fP
.hy
("struct archive_entry *");
+\fIconst char * *\fP
+.RE
+.nh
+\fBarchive_entry_copy_fflags_text_w\fP
+.hy
+("struct archive_entry *" "const char *");
\fIconst wchar_t *\fP
.RE
.nh
@@ -198,6 +207,12 @@ Fc
\fIvoid\fP
.RE
.nh
+\fBarchive_entry_copy_sourcepath\fP
+.hy
+("struct archive_entry *" "const char *");
+\fIvoid\fP
+.RE
+.nh
\fBarchive_entry_copy_pathname_w\fP
.hy
("struct archive_entry *" "const wchar_t *");
@@ -485,6 +500,12 @@ Fc
\fBarchive_entry_size\fP
.hy
("struct archive_entry *");
+\fIconst char *\fP
+.RE
+.nh
+\fBarchive_entry_sourcepath\fP
+.hy
+("struct archive_entry *");
\fIconst struct stat *\fP
.RE
.nh
@@ -627,10 +648,15 @@ will be ignored.
The canonical text format is a comma-separated list of flag names.
The
.nh
+\fBarchive_entry_copy_fflags_text\fP
+.hy
+();
+and
+.nh
\fBarchive_entry_copy_fflags_text_w\fP
.hy
();
-function parses the provided text and sets the internal bitmap values.
+functions parse the provided text and sets the internal bitmap values.
This is a platform-specific operation; names that are not meaningful
on the current platform will be ignored.
The function returns a pointer to the start of the first name that was not
diff --git a/archivers/libarchive/files/doc/man/archive_read.3 b/archivers/libarchive/files/doc/man/archive_read.3
index 9548c5403a1..91908e824ec 100644
--- a/archivers/libarchive/files/doc/man/archive_read.3
+++ b/archivers/libarchive/files/doc/man/archive_read.3
@@ -26,6 +26,7 @@
\fBarchive_read_data_into_buffer\fP,
\fBarchive_read_data_into_fd\fP,
\fBarchive_read_extract\fP,
+\fBarchive_read_extract2\fP,
\fBarchive_read_extract_set_progress_callback\fP,
\fBarchive_read_close\fP,
\fBarchive_read_finish\fP
@@ -200,6 +201,13 @@ Fa "struct archive *"
Fa "struct archive_entry *"
Fa "int flags"
Fc
+\fIint\fP
+.RE
+Fo archive_read_extract2
+Fa "struct archive *src"
+Fa "struct archive_entry *"
+Fa "struct archive *dest"
+Fc
\fIvoid\fP
.RE
Fo archive_read_extract_set_progress_callback
@@ -540,6 +548,35 @@ argument is passed unmodified to
\fBarchive_write_disk_set_options\fP(3).
.TP
.nh
+\fBarchive_read_extract2\fP
+.hy
+();
+This is another version of
+.nh
+\fBarchive_read_extract\fP
+.hy
+();
+that allows you to provide your own restore object.
+In particular, this allows you to override the standard lookup functions
+using
+\fBarchive_write_disk_set_group_lookup\fP(3),
+and
+\fBarchive_write_disk_set_user_lookup\fP(3).
+Note that
+.nh
+\fBarchive_read_extract2\fP
+.hy
+();
+does not accept a
+\fIflags\fP
+argument; you should use
+.nh
+\fBarchive_write_disk_set_options\fP
+.hy
+();
+to set the restore options yourself.
+.TP
+.nh
\fBarchive_read_extract_set_progress_callback\fP
.hy
();
diff --git a/archivers/libarchive/files/doc/man/archive_write.3 b/archivers/libarchive/files/doc/man/archive_write.3
index 32a3e17198e..3c02d5222d4 100644
--- a/archivers/libarchive/files/doc/man/archive_write.3
+++ b/archivers/libarchive/files/doc/man/archive_write.3
@@ -1,4 +1,4 @@
-.TH archive_write 3 "August 19, 2006" ""
+.TH archive_write 3 "May 11, 2008" ""
.SH NAME
\fBarchive_write_new\fP,
\fBarchive_write_set_format_cpio\fP,
@@ -11,6 +11,7 @@
\fBarchive_write_set_bytes_per_block\fP,
\fBarchive_write_set_bytes_in_last_block\fP,
\fBarchive_write_set_compression_bzip2\fP,
+\fBarchive_write_set_compression_compress\fP,
\fBarchive_write_set_compression_gzip\fP,
\fBarchive_write_set_compression_none\fP,
\fBarchive_write_set_compression_program\fP,
@@ -61,6 +62,12 @@
\fIint\fP
.RE
.nh
+\fBarchive_write_set_compression_compress\fP
+.hy
+("struct archive *");
+\fIint\fP
+.RE
+.nh
\fBarchive_write_set_compression_gzip\fP
.hy
("struct archive *");
@@ -303,6 +310,10 @@ Xo
.hy
(,);
.nh
+\fBarchive_write_set_compression_compress\fP
+.hy
+(,);
+.nh
\fBarchive_write_set_compression_gzip\fP
.hy
(,);
diff --git a/archivers/libarchive/files/doc/man/archive_write_disk.3 b/archivers/libarchive/files/doc/man/archive_write_disk.3
index f6f23b4ddb5..e48292d0e47 100644
--- a/archivers/libarchive/files/doc/man/archive_write_disk.3
+++ b/archivers/libarchive/files/doc/man/archive_write_disk.3
@@ -210,6 +210,11 @@ Note that paths ending in
\fI\& ..\fP
always cause an error, regardless of this flag.
.TP
+\fBARCHIVE_EXTRACT_SPARSE\fP
+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.
+.TP
Xo
.nh
\fBarchive_write_disk_set_group_lookup\fP
diff --git a/archivers/libarchive/files/doc/man/bsdtar.1 b/archivers/libarchive/files/doc/man/bsdtar.1
index d1cc8ddad04..c1088d9e861 100644
--- a/archivers/libarchive/files/doc/man/bsdtar.1
+++ b/archivers/libarchive/files/doc/man/bsdtar.1
@@ -1,4 +1,4 @@
-.TH BSDTAR 1 "April 13, 2004" ""
+.TH BSDTAR 1 "May 15, 2008" ""
.SH NAME
\fBtar\fP
\- manipulate tape archives
@@ -149,7 +149,7 @@ Note that exclusions take precedence over patterns or filenames
specified on the command line.
.TP
\fB\--format\fP \fIformat\fP (\fB\-W\fP \fBformat\fP=\fIformat\fP)
-(c mode only)
+(c, r, u mode only)
Use the specified format for the created archive.
Supported formats include
``cpio'',
@@ -160,6 +160,8 @@ and
Other formats may also be supported; see
\fBlibarchive-formats\fP(5)
for more information about currently-supported formats.
+In r and u modes, when extending an existing archive, the format specified
+here must be compatible with the format of the existing archive on disk.
.TP
\fB\-f\fP \fIfile\fP
Read the archive from or write the archive to the specified file.
@@ -223,6 +225,11 @@ Do not overwrite existing files.
In particular, if a file appears more than once in an archive,
later copies will not overwrite earlier copies.
.TP
+\fB\--keep-newer-files\fP (\fB\-W\fP \fBkeep-newer-files\fP)
+(x mode only)
+Do not overwrite existing files that are newer than the
+versions appearing in the archive being extracted.
+.TP
\fB\-L\fP
(c and r mode only)
All symbolic links will be followed.
@@ -282,6 +289,11 @@ This is often used to read filenames output by the
option to
\fBfind\fP(1).
.TP
+\fB\--numeric-owner\fP
+(x mode only)
+Ignore symbolic user and group names when restoring archives to disk,
+only numeric uid and gid values will be obeyed.
+.TP
\fB\-O\fP
(x, t modes only)
In extract (-x) mode, files will be written to standard out rather than
@@ -290,7 +302,7 @@ In list (-t) mode, the file listing will be written to stderr rather than
the usual stdout.
.TP
\fB\-o\fP
-(x mode only)
+(x mode)
Use the user and group of the user running the program rather
than those specified in the archive.
Note that this has no significance unless
@@ -300,6 +312,11 @@ In this case, the file modes and flags from
the archive will be restored, but ACLs or owner information in
the archive will be discarded.
.TP
+\fB\-o\fP
+(c, r, u mode)
+A synonym for
+\fB\--format\fP \fIustar\fP
+.TP
\fB\--one-file-system\fP (\fB\-W\fP \fBone-file-system\fP)
(c, r, and u modes)
Do not cross mount points.
@@ -341,6 +358,13 @@ there can be multiple entries with the same name and, by convention,
later entries overwrite earlier entries.
This option is provided as a performance optimization.
.TP
+\fB\-S\fP
+(x mode only)
+Extract files as sparse files.
+For every block on disk, check first if it contains only NULL bytes and seek
+over it otherwise.
+This works similiar to the conv=sparse option of dd.
+.TP
\fB\--strip-components\fP \fIcount\fP (\fB\-W\fP \fBstrip-components\fP=\fIcount\fP)
(x and t mode only)
Remove the specified number of leading path elements.
@@ -348,6 +372,23 @@ Pathnames with fewer elements will be silently skipped.
Note that the pathname is edited after checking inclusion/exclusion patterns
but before security checks.
.TP
+\fB\-s\fP \fIpattern\fP
+Modify file or archive member names according to
+\fIpattern\fP.
+The pattern has the format /old/new/[gps].
+old is a basic regular expression.
+If it doesn't apply, the pattern is skipped.
+new is the replacement string of the matched part.
+~ is substituted with the match, \1 to \9 with the content of
+the corresponding captured group.
+The optional trailing g specifies that matching should continue
+after the matched part and stopped on the first unmatched pattern.
+The optional trailing s specifies that the pattern applies to the value
+of symbolic links.
+The optional trailing p specifies that after a successful substitution
+the original path name and the new path name should be printed to
+standard error.
+.TP
\fB\-T\fP \fIfilename\fP
In x or t mode,
\fBtar\fP
@@ -535,6 +576,22 @@ Finally, it will switch to the
directory and add
\fIfoo2\fP
to the output archive.
+An input file in
+\fBmtree\fP(5)
+format can be used to create an output archive with arbitrary ownership,
+permissions, or names that differ from existing data on disk:
+.RS
+$ cat input.mtree
+.RE
+.RS
+usr/bin uid=0 gid=0 mode=0755 type=dir
+.RE
+.RS
+usr/bin/ls uid=0 gid=0 mode=0755 type=file content=myls
+.RE
+.RS
+$ tar -cvf output.tar @input.mtree
+.RE
The
\fB\--newer\fP
and
diff --git a/archivers/libarchive/files/doc/man/libarchive-formats.5 b/archivers/libarchive/files/doc/man/libarchive-formats.5
index 1e88dd2d2ae..580aaeaa071 100644
--- a/archivers/libarchive/files/doc/man/libarchive-formats.5
+++ b/archivers/libarchive/files/doc/man/libarchive-formats.5
@@ -226,6 +226,14 @@ There are two common variants:
the GNU format derived from SVR4,
and the BSD format, which first appeared in 4.4BSD.
Libarchive provides read and write support for both variants.
+.SS mtree
+Libarchive can read files in
+\fBmtree\fP(5)
+format. This format is not a true archive format, but rather a description
+of a file hierarchy. When requested, libarchive obtains the contents of
+the files described by the
+\fBmtree\fP(5)
+format from files on disk instead.
.SH SEE ALSO
\fBar\fP(1),
\fBcpio\fP(1),
diff --git a/archivers/libarchive/files/doc/man/mtree.5 b/archivers/libarchive/files/doc/man/mtree.5
index 7b7d74afe7a..0f4c255b495 100644
--- a/archivers/libarchive/files/doc/man/mtree.5
+++ b/archivers/libarchive/files/doc/man/mtree.5
@@ -1,12 +1,12 @@
.TH MTREE 5 "August 20, 2007" ""
.SH NAME
\fBmtree\fP
-\- format of mtree dir heirarchy files
+\- format of mtree dir hierarchy files
.SH DESCRIPTION
The
\fBmtree\fP
format is a textual format that describes a collection of filesystem objects.
-Such files are typically used to create or verify directory heirarchies.
+Such files are typically used to create or verify directory hierarchies.
.SS General Format
An
\fBmtree\fP
@@ -105,8 +105,7 @@ the
utility.
.TP
\fBcontents\fP
-The full pathname of a file whose contents should be
-compared to the contents of this file.
+The full pathname of a file that holds the contents of this file.
.TP
\fBflags\fP
The file flags as a symbolic name.
@@ -127,7 +126,7 @@ The file group as a symbolic name.
Ignore any file hierarchy below this file.
.TP
\fBlink\fP
-The file the symbolic link is expected to reference.
+The target of the symbolic link when type=link.
.TP
\fBmd5\fP
The MD5 message digest of the file.
diff --git a/archivers/libarchive/files/doc/text/archive_entry.3 b/archivers/libarchive/files/doc/text/archive_entry.3
index 2982b86aeff..e1f4ccd0456 100644
--- a/archivers/libarchive/files/doc/text/archive_entry.3
+++ b/archivers/libarchive/files/doc/text/archive_entry.3
@@ -5,22 +5,22 @@ NAME
archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_next,
archive_entry_acl_next_w, archive_entry_acl_reset,
archive_entry_acl_text_w, archive_entry_atime, archive_entry_atime_nsec,
- archive_entry_clear, archive_entry_clone,
+ archive_entry_clear, archive_entry_clone, archive_entry_copy_fflags_text,
archive_entry_copy_fflags_text_w, archive_entry_copy_gname,
archive_entry_copy_gname_w, archive_entry_copy_hardlink,
archive_entry_copy_hardlink_w, archive_entry_copy_link,
archive_entry_copy_link_w, archive_entry_copy_pathname_w,
- archive_entry_copy_stat, archive_entry_copy_symlink,
- archive_entry_copy_symlink_w, archive_entry_copy_uname,
- archive_entry_copy_uname_w, archive_entry_dev, archive_entry_devmajor,
- archive_entry_devminor, archive_entry_filetype, archive_entry_fflags,
- archive_entry_fflags_text, archive_entry_free, archive_entry_gid,
- archive_entry_gname, archive_entry_hardlink, archive_entry_ino,
- archive_entry_mode, archive_entry_mtime, archive_entry_mtime_nsec,
- archive_entry_nlink, archive_entry_new, archive_entry_pathname,
- archive_entry_pathname_w, archive_entry_rdev, archive_entry_rdevmajor,
- archive_entry_rdevminor, archive_entry_set_atime,
- archive_entry_set_ctime, archive_entry_set_dev,
+ archive_entry_copy_sourcepath, archive_entry_copy_stat,
+ archive_entry_copy_symlink, archive_entry_copy_symlink_w,
+ archive_entry_copy_uname, archive_entry_copy_uname_w, archive_entry_dev,
+ archive_entry_devmajor, archive_entry_devminor, archive_entry_filetype,
+ archive_entry_fflags, archive_entry_fflags_text, archive_entry_free,
+ archive_entry_gid, archive_entry_gname, archive_entry_hardlink,
+ archive_entry_ino, archive_entry_mode, archive_entry_mtime,
+ archive_entry_mtime_nsec, archive_entry_nlink, archive_entry_new,
+ archive_entry_pathname, archive_entry_pathname_w, archive_entry_rdev,
+ archive_entry_rdevmajor, archive_entry_rdevminor,
+ archive_entry_set_atime, archive_entry_set_ctime, archive_entry_set_dev,
archive_entry_set_devmajor, archive_entry_set_devminor,
archive_entry_set_filetype, archive_entry_set_fflags,
archive_entry_set_gid, archive_entry_set_gname,
@@ -29,9 +29,10 @@ NAME
archive_entry_set_pathname, archive_entry_set_rdevmajor,
archive_entry_set_rdevminor, archive_entry_set_size,
archive_entry_set_symlink, archive_entry_set_uid,
- archive_entry_set_uname, archive_entry_size, archive_entry_stat,
- archive_entry_symlink, archive_entry_uid, archive_entry_uname -- func-
- tions for manipulating archive entry descriptions
+ archive_entry_set_uname, archive_entry_size, archive_entry_sourcepath,
+ archive_entry_stat, archive_entry_symlink, archive_entry_uid,
+ archive_entry_uname -- functions for manipulating archive entry descrip-
+ tions
SYNOPSIS
#include <archive_entry.h>
@@ -76,6 +77,9 @@ SYNOPSIS
struct archive_entry *
archive_entry_clone(struct archive_entry *);
+ const char * *
+ archive_entry_copy_fflags_text_w(struct archive_entry *, const char *);
+
const wchar_t *
archive_entry_copy_fflags_text_w(struct archive_entry *,
const wchar_t *);
@@ -93,6 +97,9 @@ SYNOPSIS
archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *);
void
+ archive_entry_copy_sourcepath(struct archive_entry *, const char *);
+
+ void
archive_entry_copy_pathname_w(struct archive_entry *, const wchar_t *);
void
@@ -238,6 +245,9 @@ SYNOPSIS
int64_t
archive_entry_size(struct archive_entry *);
+ const char *
+ archive_entry_sourcepath(struct archive_entry *);
+
const struct stat *
archive_entry_stat(struct archive_entry *);
@@ -317,15 +327,15 @@ DESCRIPTION
bits that are not meaningful on the current platform will be ignored.
The canonical text format is a comma-separated list of flag names. The
- archive_entry_copy_fflags_text_w() function parses the provided text and
- sets the internal bitmap values. This is a platform-specific operation;
- names that are not meaningful on the current platform will be ignored.
- The function returns a pointer to the start of the first name that was
- not recognized, or NULL if every name was recognized. Note that every
- name--including names that follow an unrecognized name--will be evalu-
- ated, and the bitmaps will be set to reflect every name that is recog-
- nized. (In particular, this differs from strtofflags(3), which stops
- parsing at the first unrecognized name.)
+ archive_entry_copy_fflags_text() and archive_entry_copy_fflags_text_w()
+ functions parse the provided text and sets the internal bitmap values.
+ This is a platform-specific operation; names that are not meaningful on
+ the current platform will be ignored. The function returns a pointer to
+ the start of the first name that was not recognized, or NULL if every
+ name was recognized. Note that every name--including names that follow
+ an unrecognized name--will be evaluated, and the bitmaps will be set to
+ reflect every name that is recognized. (In particular, this differs from
+ strtofflags(3), which stops parsing at the first unrecognized name.)
ACL Handling
XXX This needs serious help. XXX
@@ -348,4 +358,4 @@ HISTORY
AUTHORS
The libarchive library was written by Tim Kientzle <kientzle@acm.org>.
-FreeBSD 6.0 December 15, 2003 FreeBSD 6.0
+FreeBSD 6.0 May 12, 2008 FreeBSD 6.0
diff --git a/archivers/libarchive/files/doc/text/archive_read.3 b/archivers/libarchive/files/doc/text/archive_read.3
index e189852d51b..00d60f82c2a 100644
--- a/archivers/libarchive/files/doc/text/archive_read.3
+++ b/archivers/libarchive/files/doc/text/archive_read.3
@@ -15,9 +15,9 @@ NAME
archive_read_open_memory, archive_read_next_header, archive_read_data,
archive_read_data_block, archive_read_data_skip,
archive_read_data_into_buffer, archive_read_data_into_fd,
- archive_read_extract, archive_read_extract_set_progress_callback,
- archive_read_close, archive_read_finish -- functions for reading stream-
- ing archives
+ archive_read_extract, archive_read_extract2,
+ archive_read_extract_set_progress_callback, archive_read_close,
+ archive_read_finish -- functions for reading streaming archives
SYNOPSIS
#include <archive.h>
@@ -108,6 +108,10 @@ SYNOPSIS
archive_read_extract(struct archive *, struct archive_entry *,
int flags);
+ int
+ archive_read_extract2(struct archive *src, struct archive_entry *,
+ struct archive *dest);
+
void
archive_read_extract_set_progress_callback(struct archive *,
void (*func)(void *), void *user_data);
@@ -224,6 +228,15 @@ DESCRIPTION
archive_write_finish_entry(3) to create the entry on disk and
copy data into it. The flags argument is passed unmodified to
archive_write_disk_set_options(3).
+ archive_read_extract2()
+ This is another version of archive_read_extract() that allows you
+ to provide your own restore object. In particular, this allows
+ you to override the standard lookup functions using
+ archive_write_disk_set_group_lookup(3), and
+ archive_write_disk_set_user_lookup(3). Note that
+ archive_read_extract2() does not accept a flags argument; you
+ should use archive_write_disk_set_options() to set the restore
+ options yourself.
archive_read_extract_set_progress_callback()
Sets a pointer to a user-defined callback that can be used for
updating progress displays during extraction. The progress func-
diff --git a/archivers/libarchive/files/doc/text/archive_write.3 b/archivers/libarchive/files/doc/text/archive_write.3
index 397f9326cfc..fff35ea6520 100644
--- a/archivers/libarchive/files/doc/text/archive_write.3
+++ b/archivers/libarchive/files/doc/text/archive_write.3
@@ -6,8 +6,9 @@ NAME
archive_write_set_format_shar, archive_write_set_format_shar_binary,
archive_write_set_format_ustar, archive_write_get_bytes_per_block,
archive_write_set_bytes_per_block, archive_write_set_bytes_in_last_block,
- archive_write_set_compression_bzip2, archive_write_set_compression_gzip,
- archive_write_set_compression_none,
+ archive_write_set_compression_bzip2,
+ archive_write_set_compression_compress,
+ archive_write_set_compression_gzip, archive_write_set_compression_none,
archive_write_set_compression_program, archive_write_open,
archive_write_open_fd, archive_write_open_FILE,
archive_write_open_filename, archive_write_open_memory,
@@ -34,6 +35,9 @@ SYNOPSIS
archive_write_set_compression_bzip2(struct archive *);
int
+ archive_write_set_compression_compress(struct archive *);
+
+ int
archive_write_set_compression_gzip(struct archive *);
int
@@ -159,6 +163,7 @@ DESCRIPTION
result in ordinary ustar archives.
archive_write_set_compression_bzip2(),
+ archive_write_set_compression_compress(),
archive_write_set_compression_gzip(),
archive_write_set_compression_none()
The resulting archive will be compressed as specified. Note that
@@ -417,4 +422,4 @@ BUGS
correctly restore device nodes with large device numbers from archives
created by this library.
-FreeBSD 6.0 August 19, 2006 FreeBSD 6.0
+FreeBSD 6.0 May 11, 2008 FreeBSD 6.0
diff --git a/archivers/libarchive/files/doc/text/archive_write_disk.3 b/archivers/libarchive/files/doc/text/archive_write_disk.3
index 18e4e50c113..58916acf26b 100644
--- a/archivers/libarchive/files/doc/text/archive_write_disk.3
+++ b/archivers/libarchive/files/doc/text/archive_write_disk.3
@@ -129,6 +129,11 @@ DESCRIPTION
paths. Note that paths ending in .. always cause an
error, regardless of this flag.
+ 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.
+
archive_write_disk_set_group_lookup(),
archive_write_disk_set_user_lookup()
The struct archive_entry objects contain both names and ids that
diff --git a/archivers/libarchive/files/doc/text/bsdtar.1 b/archivers/libarchive/files/doc/text/bsdtar.1
index 34205faa2f8..d6a22ea0e1a 100644
--- a/archivers/libarchive/files/doc/text/bsdtar.1
+++ b/archivers/libarchive/files/doc/text/bsdtar.1
@@ -87,11 +87,13 @@ OPTIONS
filenames specified on the command line.
--format format (-W format=format)
- (c mode only) Use the specified format for the created archive.
- Supported formats include ``cpio'', ``pax'', ``shar'', and
- ``ustar''. Other formats may also be supported; see
+ (c, r, u mode only) Use the specified format for the created ar-
+ chive. Supported formats include ``cpio'', ``pax'', ``shar'',
+ and ``ustar''. Other formats may also be supported; see
libarchive-formats(5) for more information about currently-sup-
- ported formats.
+ ported formats. In r and u modes, when extending an existing ar-
+ chive, the format specified here must be compatible with the for-
+ mat of the existing archive on disk.
-f file
Read the archive from or write the archive to the specified file.
@@ -127,6 +129,10 @@ OPTIONS
a file appears more than once in an archive, later copies will
not overwrite earlier copies.
+ --keep-newer-files (-W keep-newer-files)
+ (x mode only) Do not overwrite existing files that are newer than
+ the versions appearing in the archive being extracted.
+
-L (c and r mode only) All symbolic links will be followed. Nor-
mally, symbolic links are archived as such. With this option,
the target of the link will be archived instead.
@@ -164,17 +170,23 @@ OPTIONS
null characters, not by newlines. This is often used to read
filenames output by the -print0 option to find(1).
+ --numeric-owner
+ (x mode only) Ignore symbolic user and group names when restoring
+ archives to disk, only numeric uid and gid values will be obeyed.
+
-O (x, t modes only) In extract (-x) mode, files will be written to
standard out rather than being extracted to disk. In list (-t)
mode, the file listing will be written to stderr rather than the
usual stdout.
- -o (x mode only) Use the user and group of the user running the pro-
- gram rather than those specified in the archive. Note that this
- has no significance unless -p is specified, and the program is
- being run by the root user. In this case, the file modes and
- flags from the archive will be restored, but ACLs or owner infor-
- mation in the archive will be discarded.
+ -o (x mode) Use the user and group of the user running the program
+ rather than those specified in the archive. Note that this has
+ no significance unless -p is specified, and the program is being
+ run by the root user. In this case, the file modes and flags
+ from the archive will be restored, but ACLs or owner information
+ in the archive will be discarded.
+
+ -o (c, r, u mode) A synonym for --format ustar
--one-file-system (-W one-file-system)
(c, r, and u modes) Do not cross mount points.
@@ -204,12 +216,30 @@ OPTIONS
entries overwrite earlier entries. This option is provided as a
performance optimization.
+ -S (x mode only) Extract files as sparse files. For every block on
+ disk, check first if it contains only NULL bytes and seek over it
+ otherwise. This works similiar to the conv=sparse option of dd.
+
--strip-components count (-W strip-components=count)
(x and t mode only) Remove the specified number of leading path
elements. Pathnames with fewer elements will be silently
skipped. Note that the pathname is edited after checking inclu-
sion/exclusion patterns but before security checks.
+ -s pattern
+ Modify file or archive member names according to pattern. The
+ pattern has the format /old/new/[gps]. old is a basic regular
+ expression. If it doesn't apply, the pattern is skipped. new is
+ the replacement string of the matched part. ~ is substituted
+ with the match, 1 to 9 with the content of the corresponding cap-
+ tured group. The optional trailing g specifies that matching
+ should continue after the matched part and stopped on the first
+ unmatched pattern. The optional trailing s specifies that the
+ pattern applies to the value of symbolic links. The optional
+ trailing p specifies that after a successful substitution the
+ original path name and the new path name should be printed to
+ standard error.
+
-T filename
In x or t mode, tar will read the list of names to be extracted
from filename. In c mode, tar will read names to be archived
@@ -307,6 +337,15 @@ EXAMPLES
Finally, it will switch to the /tmp directory and add foo2 to the output
archive.
+ An input file in mtree(5) format can be used to create an output archive
+ with arbitrary ownership, permissions, or names that differ from existing
+ data on disk:
+
+ $ cat input.mtree
+ usr/bin uid=0 gid=0 mode=0755 type=dir
+ usr/bin/ls uid=0 gid=0 mode=0755 type=file content=myls
+ $ tar -cvf output.tar @input.mtree
+
The --newer and --newer-mtime switches accept a variety of common date
and time specifications, including ``12 Mar 2005 7:14:29pm'',
``2005-03-12 19:14'', ``5 minutes ago'', and ``19:14 PST May 1''.
@@ -447,4 +486,4 @@ BUGS
There are alternative long options for many of the short options that are
deliberately not documented.
-FreeBSD 6.0 April 13, 2004 FreeBSD 6.0
+FreeBSD 6.0 May 15, 2008 FreeBSD 6.0
diff --git a/archivers/libarchive/files/doc/text/libarchive-formats.5 b/archivers/libarchive/files/doc/text/libarchive-formats.5
index 35eb2783bab..579370c9a65 100644
--- a/archivers/libarchive/files/doc/text/libarchive-formats.5
+++ b/archivers/libarchive/files/doc/text/libarchive-formats.5
@@ -173,6 +173,12 @@ DESCRIPTION
SVR4, and the BSD format, which first appeared in 4.4BSD. Libarchive
provides read and write support for both variants.
+ mtree
+ Libarchive can read files in mtree(5) format. This format is not a true
+ archive format, but rather a description of a file hierarchy. When
+ requested, libarchive obtains the contents of the files described by the
+ mtree(5) format from files on disk instead.
+
SEE ALSO
ar(1), cpio(1), mkisofs(1), shar(1), tar(1), zip(1), zlib(3), cpio(5),
mtree(5), tar(5)
diff --git a/archivers/libarchive/files/doc/text/mtree.5 b/archivers/libarchive/files/doc/text/mtree.5
index 89a0850f962..7ceadb3d961 100644
--- a/archivers/libarchive/files/doc/text/mtree.5
+++ b/archivers/libarchive/files/doc/text/mtree.5
@@ -1,12 +1,12 @@
MTREE(5) FreeBSD File Formats Manual MTREE(5)
NAME
- mtree -- format of mtree dir heirarchy files
+ mtree -- format of mtree dir hierarchy files
DESCRIPTION
The mtree format is a textual format that describes a collection of
filesystem objects. Such files are typically used to create or verify
- directory heirarchies.
+ directory hierarchies.
General Format
An mtree file consists of a series of lines, each providing information
@@ -76,8 +76,8 @@ DESCRIPTION
cksum The checksum of the file using the default algorithm speci-
fied by the cksum(1) utility.
- contents The full pathname of a file whose contents should be compared
- to the contents of this file.
+ contents The full pathname of a file that holds the contents of this
+ file.
flags The file flags as a symbolic name. See chflags(1) for infor-
mation on these names. If no flags are to be set the string
@@ -89,7 +89,7 @@ DESCRIPTION
ignore Ignore any file hierarchy below this file.
- link The file the symbolic link is expected to reference.
+ link The target of the symbolic link when type=link.
md5 The MD5 message digest of the file.
diff --git a/archivers/libarchive/files/libarchive/archive.h b/archivers/libarchive/files/libarchive/archive.h
new file mode 100644
index 00000000000..6bfe81eb24a
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/archive.h
@@ -0,0 +1,592 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.49 2008/03/14 22:19:50 kientzle Exp $
+ */
+
+#ifndef ARCHIVE_H_INCLUDED
+#define ARCHIVE_H_INCLUDED
+
+/*
+ * Note: archive.h is for use outside of libarchive; the configuration
+ * headers (config.h, archive_platform.h, etc.) are purely internal.
+ * Do NOT use HAVE_XXX configuration macros to control the behavior of
+ * this header! If you must conditionalize, use predefined compiler and/or
+ * platform macros.
+ */
+
+#include <sys/types.h> /* Linux requires this for off_t */
+#if !defined(__WATCOMC__) && !defined(_MSC_VER)
+/* Header unavailable on Watcom C or MS Visual C++. */
+#include <inttypes.h> /* int64_t, etc. */
+#endif
+#include <stdio.h> /* For FILE * */
+
+/* Get appropriate definitions of standard POSIX-style types. */
+/* These should match the types used in 'struct stat' */
+#ifdef _WIN32
+#define __LA_SSIZE_T long
+#define __LA_UID_T unsigned int
+#define __LA_GID_T unsigned int
+#else
+#include <unistd.h> /* ssize_t, uid_t, and gid_t */
+#define __LA_SSIZE_T ssize_t
+#define __LA_UID_T uid_t
+#define __LA_GID_T gid_t
+#endif
+
+/*
+ * On Windows, define LIBARCHIVE_STATIC if you're building or using a
+ * .lib. The default here assumes you're building a DLL. Only
+ * libarchive source should ever define __LIBARCHIVE_BUILD.
+ */
+#if ((defined __WIN32__) || (defined _WIN32)) && (!defined LIBARCHIVE_STATIC)
+# ifdef __LIBARCHIVE_BUILD
+# ifdef __GNUC__
+# define __LA_DECL __attribute__((dllexport)) extern
+# else
+# define __LA_DECL __declspec(dllexport)
+# endif
+# else
+# ifdef __GNUC__
+# define __LA_DECL __attribute__((dllimport)) extern
+# else
+# define __LA_DECL __declspec(dllimport)
+# endif
+# endif
+#else
+/* Static libraries or non-Windows needs no special declaration. */
+# define __LA_DECL
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The version number is provided as both a macro and a function.
+ * The macro identifies the installed header; the function identifies
+ * the library version (which may not be the same if you're using a
+ * dynamically-linked version of the library). Of course, if the
+ * header and library are very different, you should expect some
+ * strangeness. Don't do that.
+ */
+
+/*
+ * The version number is expressed as a single integer that makes it
+ * easy to compare versions at build time: for version a.b.c, the
+ * version number is printf("%d%03d%03d",a,b,c). For example, if you
+ * know your application requires version 2.12.108 or later, you can
+ * assert that ARCHIVE_VERSION >= 2012108.
+ *
+ * This single-number format was introduced with libarchive 1.9.0 in
+ * the libarchive 1.x family and libarchive 2.2.4 in the libarchive
+ * 2.x family. The following may be useful if you really want to do
+ * feature detection for earlier libarchive versions (which defined
+ * ARCHIVE_API_VERSION and ARCHIVE_API_FEATURE instead):
+ *
+ * #ifndef ARCHIVE_VERSION_NUMBER
+ * #define ARCHIVE_VERSION_NUMBER \
+ * (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000)
+ * #endif
+ */
+#define ARCHIVE_VERSION_NUMBER 2005004
+__LA_DECL int archive_version_number(void);
+
+/*
+ * Textual name/version of the library, useful for version displays.
+ */
+#define ARCHIVE_VERSION_STRING "libarchive 2.5.4b"
+__LA_DECL const char * archive_version_string(void);
+
+#if ARCHIVE_VERSION_NUMBER < 3000000
+/*
+ * Deprecated; these are older names that will be removed in favor of
+ * the simpler definitions above.
+ */
+#define ARCHIVE_VERSION_STAMP ARCHIVE_VERSION_NUMBER
+__LA_DECL int archive_version_stamp(void);
+#define ARCHIVE_LIBRARY_VERSION ARCHIVE_VERSION_STRING
+__LA_DECL const char * archive_version(void);
+#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_NUMBER / 1000000)
+__LA_DECL int archive_api_version(void);
+#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_NUMBER / 1000) % 1000)
+__LA_DECL int archive_api_feature(void);
+#endif
+
+#if ARCHIVE_VERSION_NUMBER < 3000000
+/* This should never have been here in the first place. */
+/* Legacy of old tar assumptions, will be removed in libarchive 3.0. */
+#define ARCHIVE_BYTES_PER_RECORD 512
+#define ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240
+#endif
+
+/* Declare our basic types. */
+struct archive;
+struct archive_entry;
+
+/*
+ * Error codes: Use archive_errno() and archive_error_string()
+ * to retrieve details. Unless specified otherwise, all functions
+ * that return 'int' use these codes.
+ */
+#define ARCHIVE_EOF 1 /* Found end of archive. */
+#define ARCHIVE_OK 0 /* Operation was successful. */
+#define ARCHIVE_RETRY (-10) /* Retry might succeed. */
+#define ARCHIVE_WARN (-20) /* Partial success. */
+/* For example, if write_header "fails", then you can't push data. */
+#define ARCHIVE_FAILED (-25) /* Current operation cannot complete. */
+/* But if write_header is "fatal," then this archive is dead and useless. */
+#define ARCHIVE_FATAL (-30) /* No more operations are possible. */
+
+/*
+ * As far as possible, archive_errno returns standard platform errno codes.
+ * Of course, the details vary by platform, so the actual definitions
+ * here are stored in "archive_platform.h". The symbols are listed here
+ * for reference; as a rule, clients should not need to know the exact
+ * platform-dependent error code.
+ */
+/* Unrecognized or invalid file format. */
+/* #define ARCHIVE_ERRNO_FILE_FORMAT */
+/* Illegal usage of the library. */
+/* #define ARCHIVE_ERRNO_PROGRAMMER_ERROR */
+/* Unknown or unclassified error. */
+/* #define ARCHIVE_ERRNO_MISC */
+
+/*
+ * Callbacks are invoked to automatically read/skip/write/open/close the
+ * archive. You can provide your own for complex tasks (like breaking
+ * archives across multiple tapes) or use standard ones built into the
+ * library.
+ */
+
+/* Returns pointer and size of next block of data from archive. */
+typedef __LA_SSIZE_T archive_read_callback(struct archive *, void *_client_data,
+ const void **_buffer);
+/* Skips at most request bytes from archive and returns the skipped amount */
+#if ARCHIVE_VERSION_NUMBER < 2000000
+typedef __LA_SSIZE_T archive_skip_callback(struct archive *, void *_client_data,
+ size_t request);
+#else
+typedef off_t archive_skip_callback(struct archive *, void *_client_data,
+ off_t request);
+#endif
+/* Returns size actually written, zero on EOF, -1 on error. */
+typedef __LA_SSIZE_T archive_write_callback(struct archive *, void *_client_data,
+ const void *_buffer, size_t _length);
+typedef int archive_open_callback(struct archive *, void *_client_data);
+typedef int archive_close_callback(struct archive *, void *_client_data);
+
+/*
+ * Codes for archive_compression.
+ */
+#define ARCHIVE_COMPRESSION_NONE 0
+#define ARCHIVE_COMPRESSION_GZIP 1
+#define ARCHIVE_COMPRESSION_BZIP2 2
+#define ARCHIVE_COMPRESSION_COMPRESS 3
+#define ARCHIVE_COMPRESSION_PROGRAM 4
+
+/*
+ * Codes returned by archive_format.
+ *
+ * Top 16 bits identifies the format family (e.g., "tar"); lower
+ * 16 bits indicate the variant. This is updated by read_next_header.
+ * Note that the lower 16 bits will often vary from entry to entry.
+ * In some cases, this variation occurs as libarchive learns more about
+ * the archive (for example, later entries might utilize extensions that
+ * weren't necessary earlier in the archive; in this case, libarchive
+ * will change the format code to indicate the extended format that
+ * was used). In other cases, it's because different tools have
+ * modified the archive and so different parts of the archive
+ * actually have slightly different formts. (Both tar and cpio store
+ * format codes in each entry, so it is quite possible for each
+ * entry to be in a different format.)
+ */
+#define ARCHIVE_FORMAT_BASE_MASK 0xff0000
+#define ARCHIVE_FORMAT_CPIO 0x10000
+#define ARCHIVE_FORMAT_CPIO_POSIX (ARCHIVE_FORMAT_CPIO | 1)
+#define ARCHIVE_FORMAT_CPIO_BIN_LE (ARCHIVE_FORMAT_CPIO | 2)
+#define ARCHIVE_FORMAT_CPIO_BIN_BE (ARCHIVE_FORMAT_CPIO | 3)
+#define ARCHIVE_FORMAT_CPIO_SVR4_NOCRC (ARCHIVE_FORMAT_CPIO | 4)
+#define ARCHIVE_FORMAT_CPIO_SVR4_CRC (ARCHIVE_FORMAT_CPIO | 5)
+#define ARCHIVE_FORMAT_SHAR 0x20000
+#define ARCHIVE_FORMAT_SHAR_BASE (ARCHIVE_FORMAT_SHAR | 1)
+#define ARCHIVE_FORMAT_SHAR_DUMP (ARCHIVE_FORMAT_SHAR | 2)
+#define ARCHIVE_FORMAT_TAR 0x30000
+#define ARCHIVE_FORMAT_TAR_USTAR (ARCHIVE_FORMAT_TAR | 1)
+#define ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE (ARCHIVE_FORMAT_TAR | 2)
+#define ARCHIVE_FORMAT_TAR_PAX_RESTRICTED (ARCHIVE_FORMAT_TAR | 3)
+#define ARCHIVE_FORMAT_TAR_GNUTAR (ARCHIVE_FORMAT_TAR | 4)
+#define ARCHIVE_FORMAT_ISO9660 0x40000
+#define ARCHIVE_FORMAT_ISO9660_ROCKRIDGE (ARCHIVE_FORMAT_ISO9660 | 1)
+#define ARCHIVE_FORMAT_ZIP 0x50000
+#define ARCHIVE_FORMAT_EMPTY 0x60000
+#define ARCHIVE_FORMAT_AR 0x70000
+#define ARCHIVE_FORMAT_AR_GNU (ARCHIVE_FORMAT_AR | 1)
+#define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2)
+#define ARCHIVE_FORMAT_MTREE 0x80000
+#define ARCHIVE_FORMAT_MTREE_V1 (ARCHIVE_FORMAT_MTREE | 1)
+#define ARCHIVE_FORMAT_MTREE_V2 (ARCHIVE_FORMAT_MTREE | 2)
+
+/*-
+ * Basic outline for reading an archive:
+ * 1) Ask archive_read_new for an archive reader object.
+ * 2) Update any global properties as appropriate.
+ * In particular, you'll certainly want to call appropriate
+ * archive_read_support_XXX functions.
+ * 3) Call archive_read_open_XXX to open the archive
+ * 4) Repeatedly call archive_read_next_header to get information about
+ * successive archive entries. Call archive_read_data to extract
+ * data for entries of interest.
+ * 5) Call archive_read_finish to end processing.
+ */
+__LA_DECL struct archive *archive_read_new(void);
+
+/*
+ * The archive_read_support_XXX calls enable auto-detect for this
+ * archive handle. They also link in the necessary support code.
+ * For example, if you don't want bzlib linked in, don't invoke
+ * support_compression_bzip2(). The "all" functions provide the
+ * obvious shorthand.
+ */
+__LA_DECL int archive_read_support_compression_all(struct archive *);
+__LA_DECL int archive_read_support_compression_bzip2(struct archive *);
+__LA_DECL int archive_read_support_compression_compress(struct archive *);
+__LA_DECL int archive_read_support_compression_gzip(struct archive *);
+__LA_DECL int archive_read_support_compression_none(struct archive *);
+__LA_DECL int archive_read_support_compression_program(struct archive *,
+ const char *command);
+
+__LA_DECL int archive_read_support_format_all(struct archive *);
+__LA_DECL int archive_read_support_format_ar(struct archive *);
+__LA_DECL int archive_read_support_format_cpio(struct archive *);
+__LA_DECL int archive_read_support_format_empty(struct archive *);
+__LA_DECL int archive_read_support_format_gnutar(struct archive *);
+__LA_DECL int archive_read_support_format_iso9660(struct archive *);
+__LA_DECL int archive_read_support_format_mtree(struct archive *);
+__LA_DECL int archive_read_support_format_tar(struct archive *);
+__LA_DECL int archive_read_support_format_zip(struct archive *);
+
+
+/* Open the archive using callbacks for archive I/O. */
+__LA_DECL int archive_read_open(struct archive *, void *_client_data,
+ archive_open_callback *, archive_read_callback *,
+ archive_close_callback *);
+__LA_DECL int archive_read_open2(struct archive *, void *_client_data,
+ archive_open_callback *, archive_read_callback *,
+ archive_skip_callback *, archive_close_callback *);
+
+/*
+ * A variety of shortcuts that invoke archive_read_open() with
+ * canned callbacks suitable for common situations. The ones that
+ * accept a block size handle tape blocking correctly.
+ */
+/* Use this if you know the filename. Note: NULL indicates stdin. */
+__LA_DECL int archive_read_open_filename(struct archive *,
+ const char *_filename, size_t _block_size);
+/* archive_read_open_file() is a deprecated synonym for ..._open_filename(). */
+__LA_DECL int archive_read_open_file(struct archive *,
+ const char *_filename, size_t _block_size);
+/* Read an archive that's stored in memory. */
+__LA_DECL int archive_read_open_memory(struct archive *,
+ void * buff, size_t size);
+/* A more involved version that is only used for internal testing. */
+__LA_DECL int archive_read_open_memory2(struct archive *a, void *buff,
+ size_t size, size_t read_size);
+/* Read an archive that's already open, using the file descriptor. */
+__LA_DECL int archive_read_open_fd(struct archive *, int _fd,
+ size_t _block_size);
+/* Read an archive that's already open, using a FILE *. */
+/* Note: DO NOT use this with tape drives. */
+__LA_DECL int archive_read_open_FILE(struct archive *, FILE *_file);
+
+/* Parses and returns next entry header. */
+__LA_DECL int archive_read_next_header(struct archive *,
+ struct archive_entry **);
+
+/*
+ * Retrieve the byte offset in UNCOMPRESSED data where last-read
+ * header started.
+ */
+__LA_DECL int64_t archive_read_header_position(struct archive *);
+
+/* Read data from the body of an entry. Similar to read(2). */
+__LA_DECL __LA_SSIZE_T archive_read_data(struct archive *, void *, size_t);
+/*
+ * A zero-copy version of archive_read_data that also exposes the file offset
+ * of each returned block. Note that the client has no way to specify
+ * the desired size of the block. The API does guarantee that offsets will
+ * be strictly increasing and that returned blocks will not overlap.
+ */
+__LA_DECL int archive_read_data_block(struct archive *a,
+ const void **buff, size_t *size, off_t *offset);
+
+/*-
+ * Some convenience functions that are built on archive_read_data:
+ * 'skip': skips entire entry
+ * 'into_buffer': writes data into memory buffer that you provide
+ * 'into_fd': writes data to specified filedes
+ */
+__LA_DECL int archive_read_data_skip(struct archive *);
+__LA_DECL int archive_read_data_into_buffer(struct archive *, void *buffer,
+ __LA_SSIZE_T len);
+__LA_DECL int archive_read_data_into_fd(struct archive *, int fd);
+
+/*-
+ * Convenience function to recreate the current entry (whose header
+ * has just been read) on disk.
+ *
+ * This does quite a bit more than just copy data to disk. It also:
+ * - Creates intermediate directories as required.
+ * - Manages directory permissions: non-writable directories will
+ * be initially created with write permission enabled; when the
+ * archive is closed, dir permissions are edited to the values specified
+ * in the archive.
+ * - Checks hardlinks: hardlinks will not be extracted unless the
+ * linked-to file was also extracted within the same session. (TODO)
+ */
+
+/* The "flags" argument selects optional behavior, 'OR' the flags you want. */
+
+/* Default: Do not try to set owner/group. */
+#define ARCHIVE_EXTRACT_OWNER (0x0001)
+/* Default: Do obey umask, do not restore SUID/SGID/SVTX bits. */
+#define ARCHIVE_EXTRACT_PERM (0x0002)
+/* Default: Do not restore mtime/atime. */
+#define ARCHIVE_EXTRACT_TIME (0x0004)
+/* Default: Replace existing files. */
+#define ARCHIVE_EXTRACT_NO_OVERWRITE (0x0008)
+/* Default: Try create first, unlink only if create fails with EEXIST. */
+#define ARCHIVE_EXTRACT_UNLINK (0x0010)
+/* Default: Do not restore ACLs. */
+#define ARCHIVE_EXTRACT_ACL (0x0020)
+/* Default: Do not restore fflags. */
+#define ARCHIVE_EXTRACT_FFLAGS (0x0040)
+/* Default: Do not restore xattrs. */
+#define ARCHIVE_EXTRACT_XATTR (0x0080)
+/* Default: Do not try to guard against extracts redirected by symlinks. */
+/* Note: With ARCHIVE_EXTRACT_UNLINK, will remove any intermediate symlink. */
+#define ARCHIVE_EXTRACT_SECURE_SYMLINKS (0x0100)
+/* Default: Do not reject entries with '..' as path elements. */
+#define ARCHIVE_EXTRACT_SECURE_NODOTDOT (0x0200)
+/* Default: Create parent directories as needed. */
+#define ARCHIVE_EXTRACT_NO_AUTODIR (0x0400)
+/* Default: Overwrite files, even if one on disk is newer. */
+#define ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER (0x0800)
+/* Detect blocks of 0 and write holes instead. */
+#define ARCHIVE_EXTRACT_SPARSE (0x1000)
+
+__LA_DECL int archive_read_extract(struct archive *, struct archive_entry *,
+ int flags);
+__LA_DECL int archive_read_extract2(struct archive *, struct archive_entry *,
+ struct archive * /* dest */);
+__LA_DECL void archive_read_extract_set_progress_callback(struct archive *,
+ void (*_progress_func)(void *), void *_user_data);
+
+/* Record the dev/ino of a file that will not be written. This is
+ * generally set to the dev/ino of the archive being read. */
+__LA_DECL void archive_read_extract_set_skip_file(struct archive *,
+ dev_t, ino_t);
+
+/* Close the file and release most resources. */
+__LA_DECL int archive_read_close(struct archive *);
+/* Release all resources and destroy the object. */
+/* Note that archive_read_finish will call archive_read_close for you. */
+#if ARCHIVE_VERSION_NUMBER >= 2000000
+__LA_DECL int archive_read_finish(struct archive *);
+#else
+/* Temporarily allow library to compile with either 1.x or 2.0 API. */
+/* Erroneously declared to return void in libarchive 1.x */
+__LA_DECL void archive_read_finish(struct archive *);
+#endif
+
+/*-
+ * To create an archive:
+ * 1) Ask archive_write_new for a archive writer object.
+ * 2) Set any global properties. In particular, you should set
+ * the compression and format to use.
+ * 3) Call archive_write_open to open the file (most people
+ * will use archive_write_open_file or archive_write_open_fd,
+ * which provide convenient canned I/O callbacks for you).
+ * 4) For each entry:
+ * - construct an appropriate struct archive_entry structure
+ * - archive_write_header to write the header
+ * - archive_write_data to write the entry data
+ * 5) archive_write_close to close the output
+ * 6) archive_write_finish to cleanup the writer and release resources
+ */
+__LA_DECL struct archive *archive_write_new(void);
+__LA_DECL int archive_write_set_bytes_per_block(struct archive *,
+ int bytes_per_block);
+__LA_DECL int archive_write_get_bytes_per_block(struct archive *);
+/* XXX This is badly misnamed; suggestions appreciated. XXX */
+__LA_DECL int archive_write_set_bytes_in_last_block(struct archive *,
+ int bytes_in_last_block);
+__LA_DECL int archive_write_get_bytes_in_last_block(struct archive *);
+
+/* The dev/ino of a file that won't be archived. This is used
+ * to avoid recursively adding an archive to itself. */
+__LA_DECL int archive_write_set_skip_file(struct archive *, dev_t, ino_t);
+
+__LA_DECL int archive_write_set_compression_bzip2(struct archive *);
+__LA_DECL int archive_write_set_compression_compress(struct archive *);
+__LA_DECL int archive_write_set_compression_gzip(struct archive *);
+__LA_DECL int archive_write_set_compression_none(struct archive *);
+__LA_DECL int archive_write_set_compression_program(struct archive *,
+ const char *cmd);
+/* A convenience function to set the format based on the code or name. */
+__LA_DECL int archive_write_set_format(struct archive *, int format_code);
+__LA_DECL int archive_write_set_format_by_name(struct archive *,
+ const char *name);
+/* To minimize link pollution, use one or more of the following. */
+__LA_DECL int archive_write_set_format_ar_bsd(struct archive *);
+__LA_DECL int archive_write_set_format_ar_svr4(struct archive *);
+__LA_DECL int archive_write_set_format_cpio(struct archive *);
+__LA_DECL int archive_write_set_format_cpio_newc(struct archive *);
+/* TODO: int archive_write_set_format_old_tar(struct archive *); */
+__LA_DECL int archive_write_set_format_pax(struct archive *);
+__LA_DECL int archive_write_set_format_pax_restricted(struct archive *);
+__LA_DECL int archive_write_set_format_shar(struct archive *);
+__LA_DECL int archive_write_set_format_shar_dump(struct archive *);
+__LA_DECL int archive_write_set_format_ustar(struct archive *);
+__LA_DECL int archive_write_open(struct archive *, void *,
+ archive_open_callback *, archive_write_callback *,
+ archive_close_callback *);
+__LA_DECL int archive_write_open_fd(struct archive *, int _fd);
+__LA_DECL int archive_write_open_filename(struct archive *, const char *_file);
+/* A deprecated synonym for archive_write_open_filename() */
+__LA_DECL int archive_write_open_file(struct archive *, const char *_file);
+__LA_DECL int archive_write_open_FILE(struct archive *, FILE *);
+/* _buffSize is the size of the buffer, _used refers to a variable that
+ * will be updated after each write into the buffer. */
+__LA_DECL int archive_write_open_memory(struct archive *,
+ void *_buffer, size_t _buffSize, size_t *_used);
+
+/*
+ * Note that the library will truncate writes beyond the size provided
+ * to archive_write_header or pad if the provided data is short.
+ */
+__LA_DECL int archive_write_header(struct archive *,
+ struct archive_entry *);
+#if ARCHIVE_VERSION_NUMBER >= 2000000
+__LA_DECL __LA_SSIZE_T archive_write_data(struct archive *, const void *, size_t);
+#else
+/* Temporarily allow library to compile with either 1.x or 2.0 API. */
+/* This was erroneously declared to return "int" in libarchive 1.x. */
+__LA_DECL int archive_write_data(struct archive *, const void *, size_t);
+#endif
+__LA_DECL __LA_SSIZE_T archive_write_data_block(struct archive *, const void *, size_t, off_t);
+__LA_DECL int archive_write_finish_entry(struct archive *);
+__LA_DECL int archive_write_close(struct archive *);
+#if ARCHIVE_VERSION_NUMBER >= 2000000
+__LA_DECL int archive_write_finish(struct archive *);
+#else
+/* Temporarily allow library to compile with either 1.x or 2.0 API. */
+/* Return value was incorrect in libarchive 1.x. */
+__LA_DECL void archive_write_finish(struct archive *);
+#endif
+
+/*-
+ * To create objects on disk:
+ * 1) Ask archive_write_disk_new for a new archive_write_disk object.
+ * 2) Set any global properties. In particular, you should set
+ * the compression and format to use.
+ * 3) For each entry:
+ * - construct an appropriate struct archive_entry structure
+ * - archive_write_header to create the file/dir/etc on disk
+ * - archive_write_data to write the entry data
+ * 4) archive_write_finish to cleanup the writer and release resources
+ *
+ * In particular, you can use this in conjunction with archive_read()
+ * to pull entries out of an archive and create them on disk.
+ */
+__LA_DECL struct archive *archive_write_disk_new(void);
+/* This file will not be overwritten. */
+__LA_DECL int archive_write_disk_set_skip_file(struct archive *,
+ dev_t, ino_t);
+/* Set flags to control how the next item gets created. */
+__LA_DECL int archive_write_disk_set_options(struct archive *,
+ int flags);
+/*
+ * The lookup functions are given uname/uid (or gname/gid) pairs and
+ * return a uid (gid) suitable for this system. These are used for
+ * restoring ownership and for setting ACLs. The default functions
+ * are naive, they just return the uid/gid. These are small, so reasonable
+ * for applications that don't need to preserve ownership; they
+ * are probably also appropriate for applications that are doing
+ * same-system backup and restore.
+ */
+/*
+ * The "standard" lookup functions use common system calls to lookup
+ * the uname/gname, falling back to the uid/gid if the names can't be
+ * found. They cache lookups and are reasonably fast, but can be very
+ * large, so they are not used unless you ask for them. In
+ * particular, these match the specifications of POSIX "pax" and old
+ * POSIX "tar".
+ */
+__LA_DECL int archive_write_disk_set_standard_lookup(struct archive *);
+/*
+ * If neither the default (naive) nor the standard (big) functions suit
+ * your needs, you can write your own and register them. Be sure to
+ * include a cleanup function if you have allocated private data.
+ */
+__LA_DECL int archive_write_disk_set_group_lookup(struct archive *,
+ void * /* private_data */,
+ __LA_GID_T (*)(void *, const char *, __LA_GID_T),
+ void (* /* cleanup */)(void *));
+__LA_DECL int archive_write_disk_set_user_lookup(struct archive *,
+ void * /* private_data */,
+ __LA_UID_T (*)(void *, const char *, __LA_UID_T),
+ void (* /* cleanup */)(void *));
+
+/*
+ * Accessor functions to read/set various information in
+ * the struct archive object:
+ */
+/* Bytes written after compression or read before decompression. */
+__LA_DECL int64_t archive_position_compressed(struct archive *);
+/* Bytes written to compressor or read from decompressor. */
+__LA_DECL int64_t archive_position_uncompressed(struct archive *);
+
+__LA_DECL const char *archive_compression_name(struct archive *);
+__LA_DECL int archive_compression(struct archive *);
+__LA_DECL int archive_errno(struct archive *);
+__LA_DECL const char *archive_error_string(struct archive *);
+__LA_DECL const char *archive_format_name(struct archive *);
+__LA_DECL int archive_format(struct archive *);
+__LA_DECL void archive_clear_error(struct archive *);
+__LA_DECL void archive_set_error(struct archive *, int _err,
+ const char *fmt, ...);
+__LA_DECL void archive_copy_error(struct archive *dest,
+ struct archive *src);
+
+#ifdef __cplusplus
+}
+#endif
+
+/* This is meaningless outside of this header. */
+#undef __LA_DECL
+
+#endif /* !ARCHIVE_H_INCLUDED */
diff --git a/archivers/libarchive/files/libarchive/archive_endian.h b/archivers/libarchive/files/libarchive/archive_endian.h
index 259f5de91ea..61af4161c37 100644
--- a/archivers/libarchive/files/libarchive/archive_endian.h
+++ b/archivers/libarchive/files/libarchive/archive_endian.h
@@ -28,9 +28,23 @@
* Borrowed from FreeBSD's <sys/endian.h>
*/
+/* Note: This is a purely internal header! */
+/* Do not use this outside of libarchive internal code! */
+
#ifndef ARCHIVE_ENDIAN_H_INCLUDED
#define ARCHIVE_ENDIAN_H_INCLUDED
+
+/* Watcom C++ doesn't support 'inline' in C code. (For any version?) */
+#if defined( __WATCOMC__ )
+ #define inline
+#endif
+
+/* Visual C++ 6.0 doesn't support 'inline' in C code. (Does VC7? VC8?) */
+#if defined(_MSC_VER)
+ #define inline
+#endif
+
/* Alignment-agnostic encode/decode bytestream to/from little/big endian. */
static inline uint16_t
diff --git a/archivers/libarchive/files/libarchive/archive_entry.3 b/archivers/libarchive/files/libarchive/archive_entry.3
index 8d96de1fbf4..e2d4ab11770 100644
--- a/archivers/libarchive/files/libarchive/archive_entry.3
+++ b/archivers/libarchive/files/libarchive/archive_entry.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.17 2008/03/14 23:00:53 kientzle Exp $
.\"
-.Dd December 15, 2003
+.Dd May 12, 2008
.Dt archive_entry 3
.Os
.Sh NAME
@@ -40,6 +40,7 @@
.Nm archive_entry_atime_nsec ,
.Nm archive_entry_clear ,
.Nm archive_entry_clone ,
+.Nm archive_entry_copy_fflags_text ,
.Nm archive_entry_copy_fflags_text_w ,
.Nm archive_entry_copy_gname ,
.Nm archive_entry_copy_gname_w ,
@@ -48,6 +49,7 @@
.Nm archive_entry_copy_link ,
.Nm archive_entry_copy_link_w ,
.Nm archive_entry_copy_pathname_w ,
+.Nm archive_entry_copy_sourcepath ,
.Nm archive_entry_copy_stat ,
.Nm archive_entry_copy_symlink ,
.Nm archive_entry_copy_symlink_w ,
@@ -95,6 +97,7 @@
.Nm archive_entry_set_uid ,
.Nm archive_entry_set_uname ,
.Nm archive_entry_size ,
+.Nm archive_entry_sourcepath ,
.Nm archive_entry_stat ,
.Nm archive_entry_symlink ,
.Nm archive_entry_uid ,
@@ -156,6 +159,8 @@
.Fn archive_entry_clear "struct archive_entry *"
.Ft struct archive_entry *
.Fn archive_entry_clone "struct archive_entry *"
+.Ft const char * *
+.Fn archive_entry_copy_fflags_text_w "struct archive_entry *" "const char *"
.Ft const wchar_t *
.Fn archive_entry_copy_fflags_text_w "struct archive_entry *" "const wchar_t *"
.Ft void
@@ -167,6 +172,8 @@
.Ft void
.Fn archive_entry_copy_hardlink_w "struct archive_entry *" "const wchar_t *"
.Ft void
+.Fn archive_entry_copy_sourcepath "struct archive_entry *" "const char *"
+.Ft void
.Fn archive_entry_copy_pathname_w "struct archive_entry *" "const wchar_t *"
.Ft void
.Fn archive_entry_copy_stat "struct archive_entry *" "const struct stat *"
@@ -270,6 +277,8 @@
.Fn archive_entry_set_uname "struct archive_entry *" "const char *"
.Ft int64_t
.Fn archive_entry_size "struct archive_entry *"
+.Ft const char *
+.Fn archive_entry_sourcepath "struct archive_entry *"
.Ft const struct stat *
.Fn archive_entry_stat "struct archive_entry *"
.Ft const char *
@@ -376,8 +385,10 @@ will be ignored.
.Pp
The canonical text format is a comma-separated list of flag names.
The
+.Fn archive_entry_copy_fflags_text
+and
.Fn archive_entry_copy_fflags_text_w
-function parses the provided text and sets the internal bitmap values.
+functions parse the provided text and sets the internal bitmap values.
This is a platform-specific operation; names that are not meaningful
on the current platform will be ignored.
The function returns a pointer to the start of the first name that was not
diff --git a/archivers/libarchive/files/libarchive/archive_entry.c b/archivers/libarchive/files/libarchive/archive_entry.c
index acc57291d45..210685af2b3 100644
--- a/archivers/libarchive/files/libarchive/archive_entry.c
+++ b/archivers/libarchive/files/libarchive/archive_entry.c
@@ -155,6 +155,7 @@ aes_clean(struct aes *aes)
}
archive_string_free(&(aes->aes_mbs));
archive_string_free(&(aes->aes_utf8));
+ aes->aes_set = 0;
}
static void
@@ -162,6 +163,7 @@ aes_copy(struct aes *dest, struct aes *src)
{
wchar_t *wp;
+ dest->aes_set = src->aes_set;
archive_string_copy(&(dest->aes_mbs), &(src->aes_mbs));
archive_string_copy(&(dest->aes_utf8), &(src->aes_utf8));
@@ -178,25 +180,28 @@ aes_copy(struct aes *dest, struct aes *src)
static const char *
aes_get_utf8(struct aes *aes)
{
- if (aes->aes_utf8.s == NULL || aes->aes_utf8.length == 0) {
- if (aes->aes_wcs == NULL)
- return (NULL);
- if (archive_strappend_w_utf8(&(aes->aes_utf8), aes->aes_wcs) == NULL)
- return (NULL);
+ if (aes->aes_set & AES_SET_UTF8)
+ return (aes->aes_utf8.s);
+ if ((aes->aes_set & AES_SET_WCS)
+ && archive_strappend_w_utf8(&(aes->aes_utf8), aes->aes_wcs) != NULL) {
+ aes->aes_set |= AES_SET_UTF8;
+ return (aes->aes_utf8.s);
}
- return (aes->aes_utf8.s);
+ return (NULL);
}
static const char *
aes_get_mbs(struct aes *aes)
{
/* If we already have an MBS form, return that immediately. */
- if (aes->aes_mbs.s != NULL && aes->aes_mbs.length != 0)
+ if (aes->aes_set & AES_SET_MBS)
return (aes->aes_mbs.s);
/* If there's a WCS form, try converting with the native locale. */
- if (aes->aes_wcs != NULL
- && archive_strappend_w_mbs(&(aes->aes_mbs), aes->aes_wcs) != NULL)
+ if ((aes->aes_set & AES_SET_WCS)
+ && archive_strappend_w_mbs(&(aes->aes_mbs), aes->aes_wcs) != NULL) {
+ aes->aes_set |= AES_SET_MBS;
return (aes->aes_mbs.s);
+ }
/* We'll use UTF-8 for MBS if all else fails. */
return (aes_get_utf8(aes));
}
@@ -208,10 +213,10 @@ aes_get_wcs(struct aes *aes)
int r;
/* Return WCS form if we already have it. */
- if (aes->aes_wcs != NULL)
+ if (aes->aes_set & AES_SET_WCS)
return (aes->aes_wcs);
- if (aes->aes_mbs.s != NULL && aes->aes_mbs.length > 0) {
+ if (aes->aes_set & AES_SET_MBS) {
/* Try converting MBS to WCS using native locale. */
/*
* No single byte will be more than one wide character,
@@ -224,14 +229,17 @@ aes_get_wcs(struct aes *aes)
__archive_errx(1, "No memory for aes_get_wcs()");
r = mbstowcs(w, aes->aes_mbs.s, wcs_length);
w[wcs_length] = 0;
- if (r > 0)
+ if (r > 0) {
+ aes->aes_set |= AES_SET_WCS;
return (aes->aes_wcs = w);
+ }
free(w);
}
- if (aes->aes_utf8.s != NULL && aes->aes_utf8.length > 0) {
+ if (aes->aes_set & AES_SET_UTF8) {
/* Try converting UTF8 to WCS. */
aes->aes_wcs = __archive_string_utf8_w(&(aes->aes_utf8));
+ aes->aes_set |= AES_SET_WCS;
return (aes->aes_wcs);
}
return (NULL);
@@ -246,6 +254,11 @@ aes_set_mbs(struct aes *aes, const char *mbs)
static int
aes_copy_mbs(struct aes *aes, const char *mbs)
{
+ if (mbs == NULL) {
+ aes->aes_set = 0;
+ return (0);
+ }
+ aes->aes_set = AES_SET_MBS; /* Only MBS form is set now. */
archive_strcpy(&(aes->aes_mbs), mbs);
archive_string_empty(&(aes->aes_utf8));
if (aes->aes_wcs) {
@@ -268,6 +281,11 @@ aes_copy_mbs(struct aes *aes, const char *mbs)
static int
aes_update_utf8(struct aes *aes, const char *utf8)
{
+ if (utf8 == NULL) {
+ aes->aes_set = 0;
+ return (1); /* Succeeded in clearing everything. */
+ }
+
/* Save the UTF8 string. */
archive_strcpy(&(aes->aes_utf8), utf8);
@@ -278,18 +296,24 @@ aes_update_utf8(struct aes *aes, const char *utf8)
aes->aes_wcs = NULL;
}
- /* TODO: We should just do a UTF-8 to MBS conversion here.
- * That would be faster, use less space, and give the same
- * information. */
+ aes->aes_set = AES_SET_UTF8; /* Only UTF8 is set now. */
+
+ /* TODO: We should just do a direct UTF-8 to MBS conversion
+ * here. That would be faster, use less space, and give the
+ * same information. (If a UTF-8 to MBS conversion succeeds,
+ * then UTF-8->WCS and Unicode->MBS conversions will both
+ * succeed.) */
/* Try converting UTF8 to WCS, return false on failure. */
aes->aes_wcs = __archive_string_utf8_w(&(aes->aes_utf8));
if (aes->aes_wcs == NULL)
return (0);
+ aes->aes_set = AES_SET_UTF8 | AES_SET_WCS; /* Both UTF8 and WCS set. */
/* Try converting WCS to MBS, return false on failure. */
if (archive_strappend_w_mbs(&(aes->aes_mbs), aes->aes_wcs) == NULL)
return (0);
+ aes->aes_set = AES_SET_UTF8 | AES_SET_WCS | AES_SET_MBS;
/* All conversions succeeded. */
return (1);
@@ -298,7 +322,7 @@ aes_update_utf8(struct aes *aes, const char *utf8)
static int
aes_copy_wcs(struct aes *aes, const wchar_t *wcs)
{
- return aes_copy_wcs_len(aes, wcs, wcslen(wcs));
+ return aes_copy_wcs_len(aes, wcs, wcs == NULL ? 0 : wcslen(wcs));
}
static int
@@ -306,6 +330,11 @@ aes_copy_wcs_len(struct aes *aes, const wchar_t *wcs, size_t len)
{
wchar_t *w;
+ if (wcs == NULL) {
+ aes->aes_set = 0;
+ return (0);
+ }
+ aes->aes_set = AES_SET_WCS; /* Only WCS form set. */
archive_string_empty(&(aes->aes_mbs));
archive_string_empty(&(aes->aes_utf8));
if (aes->aes_wcs) {
@@ -623,6 +652,12 @@ archive_entry_size(struct archive_entry *entry)
}
const char *
+archive_entry_sourcepath(struct archive_entry *entry)
+{
+ return (aes_get_mbs(&entry->ae_sourcepath));
+}
+
+const char *
archive_entry_symlink(struct archive_entry *entry)
{
if (!entry->ae_symlinkset)
@@ -922,6 +957,12 @@ archive_entry_set_size(struct archive_entry *entry, int64_t s)
}
void
+archive_entry_copy_sourcepath(struct archive_entry *entry, const char *path)
+{
+ aes_set_mbs(&entry->ae_sourcepath, path);
+}
+
+void
archive_entry_set_symlink(struct archive_entry *entry, const char *linkname)
{
aes_set_mbs(&entry->ae_symlink, linkname);
@@ -1889,13 +1930,13 @@ ae_strtofflags(const char *s, unsigned long *setp, unsigned long *clrp)
while (*end != '\0' && *end != '\t' &&
*end != ' ' && *end != ',')
end++;
- for (flag = flags; flag->wname != NULL; flag++) {
- if (memcmp(start, flag->wname, end - start) == 0) {
+ for (flag = flags; flag->name != NULL; flag++) {
+ if (memcmp(start, flag->name, end - start) == 0) {
/* Matched "noXXXX", so reverse the sense. */
clear |= flag->set;
set |= flag->clear;
break;
- } else if (memcmp(start, flag->wname + 2, end - start)
+ } else if (memcmp(start, flag->name + 2, end - start)
== 0) {
/* Matched "XXXX", so don't reverse. */
set |= flag->set;
@@ -1904,7 +1945,7 @@ ae_strtofflags(const char *s, unsigned long *setp, unsigned long *clrp)
}
}
/* Ignore unknown flag names. */
- if (flag->wname == NULL && failed == NULL)
+ if (flag->name == NULL && failed == NULL)
failed = start;
/* Find start of next token. */
diff --git a/archivers/libarchive/files/libarchive/archive_entry.h b/archivers/libarchive/files/libarchive/archive_entry.h
index ba2255e220b..f8601b9ee28 100644
--- a/archivers/libarchive/files/libarchive/archive_entry.h
+++ b/archivers/libarchive/files/libarchive/archive_entry.h
@@ -28,6 +28,14 @@
#ifndef ARCHIVE_ENTRY_H_INCLUDED
#define ARCHIVE_ENTRY_H_INCLUDED
+/*
+ * Note: archive_entry.h is for use outside of libarchive; the
+ * configuration headers (config.h, archive_platform.h, etc.) are
+ * purely internal. Do NOT use HAVE_XXX configuration macros to
+ * control the behavior of this header! If you must conditionalize,
+ * use predefined compiler and/or platform macros.
+ */
+
#include <sys/types.h>
#include <stddef.h> /* for wchar_t */
#include <time.h>
@@ -37,19 +45,26 @@
#ifdef _WIN32
#define __LA_UID_T unsigned int
#define __LA_GID_T unsigned int
-#define __LA_INO_T unsigned int
#define __LA_DEV_T unsigned int
#define __LA_MODE_T unsigned short
#else
#include <unistd.h>
#define __LA_UID_T uid_t
#define __LA_GID_T gid_t
-#define __LA_INO_T ino_t
#define __LA_DEV_T dev_t
#define __LA_MODE_T mode_t
#endif
/*
+ * XXX Is this defined for all Windows compilers? If so, in what
+ * header? It would be nice to remove the __LA_INO_T indirection and
+ * just use plain ino_t everywhere. Likewise for the other types just
+ * above.
+ */
+#define __LA_INO_T ino_t
+
+
+/*
* On Windows, define LIBARCHIVE_STATIC if you're building or using a
* .lib. The default here assumes you're building a DLL. Only
* libarchive source should ever define __LIBARCHIVE_BUILD.
@@ -69,7 +84,7 @@
# endif
# endif
#else
-/* Static libraries and shared libraries on non-Windows. */
+/* Static libraries on all platforms and shared libraries on non-Windows. */
# define __LA_DECL
#endif
@@ -80,7 +95,7 @@ extern "C" {
/*
* Description of an archive entry.
*
- * Basically, a "struct stat" with a few text fields added in.
+ * You can think of this as "struct stat" with some text fields added in.
*
* TODO: Add "comment", "charset", and possibly other entries that are
* supported by "pax interchange" format. However, GNU, ustar, cpio,
@@ -139,40 +154,41 @@ __LA_DECL struct archive_entry *archive_entry_new(void);
* Retrieve fields from an archive_entry.
*/
-__LA_DECL time_t archive_entry_atime(struct archive_entry *);
-__LA_DECL long archive_entry_atime_nsec(struct archive_entry *);
-__LA_DECL time_t archive_entry_ctime(struct archive_entry *);
-__LA_DECL long archive_entry_ctime_nsec(struct archive_entry *);
-__LA_DECL dev_t archive_entry_dev(struct archive_entry *);
-__LA_DECL dev_t archive_entry_devmajor(struct archive_entry *);
-__LA_DECL dev_t archive_entry_devminor(struct archive_entry *);
-__LA_DECL __LA_MODE_T archive_entry_filetype(struct archive_entry *);
-__LA_DECL void archive_entry_fflags(struct archive_entry *,
+__LA_DECL time_t archive_entry_atime(struct archive_entry *);
+__LA_DECL long archive_entry_atime_nsec(struct archive_entry *);
+__LA_DECL time_t archive_entry_ctime(struct archive_entry *);
+__LA_DECL long archive_entry_ctime_nsec(struct archive_entry *);
+__LA_DECL dev_t archive_entry_dev(struct archive_entry *);
+__LA_DECL dev_t archive_entry_devmajor(struct archive_entry *);
+__LA_DECL dev_t archive_entry_devminor(struct archive_entry *);
+__LA_DECL __LA_MODE_T archive_entry_filetype(struct archive_entry *);
+__LA_DECL void archive_entry_fflags(struct archive_entry *,
unsigned long * /* set */,
unsigned long * /* clear */);
-__LA_DECL const char *archive_entry_fflags_text(struct archive_entry *);
-__LA_DECL __LA_GID_T archive_entry_gid(struct archive_entry *);
-__LA_DECL const char *archive_entry_gname(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_gname_w(struct archive_entry *);
-__LA_DECL const char *archive_entry_hardlink(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_hardlink_w(struct archive_entry *);
-__LA_DECL __LA_INO_T archive_entry_ino(struct archive_entry *);
-__LA_DECL __LA_MODE_T archive_entry_mode(struct archive_entry *);
-__LA_DECL time_t archive_entry_mtime(struct archive_entry *);
-__LA_DECL long archive_entry_mtime_nsec(struct archive_entry *);
-__LA_DECL unsigned int archive_entry_nlink(struct archive_entry *);
-__LA_DECL const char *archive_entry_pathname(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_pathname_w(struct archive_entry *);
-__LA_DECL dev_t archive_entry_rdev(struct archive_entry *);
-__LA_DECL dev_t archive_entry_rdevmajor(struct archive_entry *);
-__LA_DECL dev_t archive_entry_rdevminor(struct archive_entry *);
-__LA_DECL int64_t archive_entry_size(struct archive_entry *);
-__LA_DECL const char *archive_entry_strmode(struct archive_entry *);
-__LA_DECL const char *archive_entry_symlink(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *);
-__LA_DECL __LA_UID_T archive_entry_uid(struct archive_entry *);
-__LA_DECL const char *archive_entry_uname(struct archive_entry *);
-__LA_DECL const wchar_t *archive_entry_uname_w(struct archive_entry *);
+__LA_DECL const char *archive_entry_fflags_text(struct archive_entry *);
+__LA_DECL __LA_GID_T archive_entry_gid(struct archive_entry *);
+__LA_DECL const char *archive_entry_gname(struct archive_entry *);
+__LA_DECL const wchar_t *archive_entry_gname_w(struct archive_entry *);
+__LA_DECL const char *archive_entry_hardlink(struct archive_entry *);
+__LA_DECL const wchar_t *archive_entry_hardlink_w(struct archive_entry *);
+__LA_DECL __LA_INO_T archive_entry_ino(struct archive_entry *);
+__LA_DECL __LA_MODE_T archive_entry_mode(struct archive_entry *);
+__LA_DECL time_t archive_entry_mtime(struct archive_entry *);
+__LA_DECL long archive_entry_mtime_nsec(struct archive_entry *);
+__LA_DECL unsigned int archive_entry_nlink(struct archive_entry *);
+__LA_DECL const char *archive_entry_pathname(struct archive_entry *);
+__LA_DECL const wchar_t *archive_entry_pathname_w(struct archive_entry *);
+__LA_DECL dev_t archive_entry_rdev(struct archive_entry *);
+__LA_DECL dev_t archive_entry_rdevmajor(struct archive_entry *);
+__LA_DECL dev_t archive_entry_rdevminor(struct archive_entry *);
+__LA_DECL const char *archive_entry_sourcepath(struct archive_entry *);
+__LA_DECL int64_t archive_entry_size(struct archive_entry *);
+__LA_DECL const char *archive_entry_strmode(struct archive_entry *);
+__LA_DECL const char *archive_entry_symlink(struct archive_entry *);
+__LA_DECL const wchar_t *archive_entry_symlink_w(struct archive_entry *);
+__LA_DECL __LA_UID_T archive_entry_uid(struct archive_entry *);
+__LA_DECL const char *archive_entry_uname(struct archive_entry *);
+__LA_DECL const wchar_t *archive_entry_uname_w(struct archive_entry *);
/*
* Set fields in an archive_entry.
@@ -220,6 +236,7 @@ __LA_DECL void archive_entry_set_rdev(struct archive_entry *, dev_t);
__LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, dev_t);
__LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, dev_t);
__LA_DECL void archive_entry_set_size(struct archive_entry *, int64_t);
+__LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *);
__LA_DECL void archive_entry_set_symlink(struct archive_entry *, const char *);
__LA_DECL void archive_entry_copy_symlink(struct archive_entry *, const char *);
__LA_DECL void archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *);
diff --git a/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c b/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c
index 0df9ff92e68..c0770c239de 100644
--- a/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c
+++ b/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c
@@ -60,8 +60,9 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_link_resolver.c,v 1.1 2007/
/* Users pass us a format code, we translate that into a strategy here. */
#define ARCHIVE_ENTRY_LINKIFY_LIKE_TAR 0
-#define ARCHIVE_ENTRY_LINKIFY_LIKE_OLD_CPIO 1
-#define ARCHIVE_ENTRY_LINKIFY_LIKE_NEW_CPIO 2
+#define ARCHIVE_ENTRY_LINKIFY_LIKE_MTREE 1
+#define ARCHIVE_ENTRY_LINKIFY_LIKE_OLD_CPIO 2
+#define ARCHIVE_ENTRY_LINKIFY_LIKE_NEW_CPIO 3
/* Initial size of link cache. */
#define links_cache_initial_size 1024
@@ -130,6 +131,9 @@ archive_entry_linkresolver_set_strategy(struct archive_entry_linkresolver *res,
break;
}
break;
+ case ARCHIVE_FORMAT_MTREE:
+ res->strategy = ARCHIVE_ENTRY_LINKIFY_LIKE_MTREE;
+ break;
case ARCHIVE_FORMAT_TAR:
res->strategy = ARCHIVE_ENTRY_LINKIFY_LIKE_TAR;
break;
@@ -144,6 +148,9 @@ archive_entry_linkresolver_free(struct archive_entry_linkresolver *res)
{
struct links_entry *le;
+ if (res == NULL)
+ return;
+
if (res->buckets != NULL) {
while ((le = next_entry(res)) != NULL)
archive_entry_free(le->entry);
@@ -164,8 +171,10 @@ archive_entry_linkify(struct archive_entry_linkresolver *res,
if (*e == NULL) {
le = next_entry(res);
- if (le != NULL)
+ if (le != NULL) {
*e = le->entry;
+ le->entry = NULL;
+ }
return;
}
@@ -178,7 +187,15 @@ archive_entry_linkify(struct archive_entry_linkresolver *res,
le = find_entry(res, *e);
if (le != NULL) {
archive_entry_set_size(*e, 0);
- archive_entry_set_hardlink(*e,
+ archive_entry_copy_hardlink(*e,
+ archive_entry_pathname(le->canonical));
+ } else
+ insert_entry(res, *e);
+ return;
+ case ARCHIVE_ENTRY_LINKIFY_LIKE_MTREE:
+ le = find_entry(res, *e);
+ if (le != NULL) {
+ archive_entry_copy_hardlink(*e,
archive_entry_pathname(le->canonical));
} else
insert_entry(res, *e);
@@ -198,12 +215,14 @@ archive_entry_linkify(struct archive_entry_linkresolver *res,
le->entry = t;
/* Make the old entry into a hardlink. */
archive_entry_set_size(*e, 0);
- archive_entry_set_hardlink(*e,
+ archive_entry_copy_hardlink(*e,
archive_entry_pathname(le->canonical));
/* If we ran out of links, return the
* final entry as well. */
- if (le->links == 0)
+ if (le->links == 0) {
*f = le->entry;
+ le->entry = NULL;
+ }
} else {
/*
* If we haven't seen it, tuck it away
@@ -232,6 +251,7 @@ find_entry(struct archive_entry_linkresolver *res,
/* Free a held entry. */
if (res->spare != NULL) {
archive_entry_free(res->spare->canonical);
+ archive_entry_free(res->spare->entry);
free(res->spare);
res->spare = NULL;
}
@@ -248,8 +268,8 @@ find_entry(struct archive_entry_linkresolver *res,
bucket = hash % res->number_buckets;
for (le = res->buckets[bucket]; le != NULL; le = le->next) {
if (le->hash == hash
- && dev == archive_entry_dev(le->entry)
- && ino == archive_entry_ino(le->entry)) {
+ && dev == archive_entry_dev(le->canonical)
+ && ino == archive_entry_ino(le->canonical)) {
/*
* Decrement link count each time and release
* the entry if it hits zero. This saves
@@ -320,7 +340,8 @@ insert_entry(struct archive_entry_linkresolver *res,
le = malloc(sizeof(struct links_entry));
if (le == NULL)
return (NULL);
- le->entry = entry;
+ memset(le, 0, sizeof(*le));
+ le->canonical = archive_entry_clone(entry);
/* If the links cache is getting too full, enlarge the hash table. */
if (res->number_entries > res->number_buckets * 2)
@@ -338,7 +359,6 @@ insert_entry(struct archive_entry_linkresolver *res,
res->buckets[bucket] = le;
le->hash = hash;
le->links = archive_entry_nlink(entry) - 1;
- le->canonical = archive_entry_clone(entry);
return (le);
}
diff --git a/archivers/libarchive/files/libarchive/archive_entry_private.h b/archivers/libarchive/files/libarchive/archive_entry_private.h
index d8dd9b6b70d..f893fb982ae 100644
--- a/archivers/libarchive/files/libarchive/archive_entry_private.h
+++ b/archivers/libarchive/files/libarchive/archive_entry_private.h
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libarchive/archive_entry_private.h,v 1.2 2007/12/30 04:58:21 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive_entry_private.h,v 1.3 2008/03/31 06:24:39 kientzle Exp $
*/
#ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED
@@ -33,13 +33,20 @@
/*
* Handle wide character (i.e., Unicode) and non-wide character
* strings transparently.
- *
*/
struct aes {
struct archive_string aes_mbs;
struct archive_string aes_utf8;
const wchar_t *aes_wcs;
+ /* Bitmap of which of the above are valid. Because we're lazy
+ * about malloc-ing and reusing the underlying storage, we
+ * can't rely on NULL pointers to indicate whether a string
+ * has been set. */
+ int aes_set;
+#define AES_SET_MBS 1
+#define AES_SET_UTF8 2
+#define AES_SET_WCS 4
};
struct ae_acl {
@@ -129,8 +136,6 @@ struct archive_entry {
dev_t aest_rdevminor;
} ae_stat;
-
-
/*
* Use aes here so that we get transparent mbs<->wcs conversions.
*/
@@ -145,15 +150,21 @@ struct archive_entry {
unsigned char ae_hardlinkset;
unsigned char ae_symlinkset;
+ /* Not used within libarchive; useful for some clients. */
+ struct aes ae_sourcepath; /* Path this entry is sourced from. */
+
+ /* ACL support. */
struct ae_acl *acl_head;
struct ae_acl *acl_p;
int acl_state; /* See acl_next for details. */
wchar_t *acl_text_w;
+ /* extattr support. */
struct ae_xattr *xattr_head;
struct ae_xattr *xattr_p;
- char strmode[11];
+ /* Miscellaneous. */
+ char strmode[12];
};
diff --git a/archivers/libarchive/files/libarchive/archive_entry_strmode.c b/archivers/libarchive/files/libarchive/archive_entry_strmode.c
index dc08d9721a6..cfe6ae33baa 100644
--- a/archivers/libarchive/files/libarchive/archive_entry_strmode.c
+++ b/archivers/libarchive/files/libarchive/archive_entry_strmode.c
@@ -24,7 +24,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_strmode.c,v 1.2 2008/02/19 05:49:02 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_strmode.c,v 1.3 2008/05/23 04:57:28 cperciva Exp $");
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_strmode.c,v 1.2 2008/02/19
const char *
archive_entry_strmode(struct archive_entry *entry)
{
- static const char *perms = "?rwxrwxrwx ";
static const mode_t permbits[] =
{ 0400, 0200, 0100, 0040, 0020, 0010, 0004, 0002, 0001 };
char *bp = entry->strmode;
@@ -47,7 +46,7 @@ archive_entry_strmode(struct archive_entry *entry)
int i;
/* Fill in a default string, then selectively override. */
- strcpy(bp, perms);
+ strcpy(bp, "?rwxrwxrwx ");
mode = archive_entry_mode(entry);
switch (archive_entry_filetype(entry)) {
diff --git a/archivers/libarchive/files/libarchive/archive_read.3 b/archivers/libarchive/files/libarchive/archive_read.3
index e15c904a712..dbbe1f7f1e6 100644
--- a/archivers/libarchive/files/libarchive/archive_read.3
+++ b/archivers/libarchive/files/libarchive/archive_read.3
@@ -56,6 +56,7 @@
.\" #endif
.Nm archive_read_data_into_fd ,
.Nm archive_read_extract ,
+.Nm archive_read_extract2 ,
.Nm archive_read_extract_set_progress_callback ,
.Nm archive_read_close ,
.Nm archive_read_finish
@@ -145,6 +146,12 @@
.Fa "struct archive_entry *"
.Fa "int flags"
.Fc
+.Ft int
+.Fo archive_read_extract2
+.Fa "struct archive *src"
+.Fa "struct archive_entry *"
+.Fa "struct archive *dest"
+.Fc
.Ft void
.Fo archive_read_extract_set_progress_callback
.Fa "struct archive *"
@@ -314,6 +321,22 @@ The
.Va flags
argument is passed unmodified to
.Xr archive_write_disk_set_options 3 .
+.It Fn archive_read_extract2
+This is another version of
+.Fn archive_read_extract
+that allows you to provide your own restore object.
+In particular, this allows you to override the standard lookup functions
+using
+.Xr archive_write_disk_set_group_lookup 3 ,
+and
+.Xr archive_write_disk_set_user_lookup 3 .
+Note that
+.Fn archive_read_extract2
+does not accept a
+.Va flags
+argument; you should use
+.Fn archive_write_disk_set_options
+to set the restore options yourself.
.It Fn archive_read_extract_set_progress_callback
Sets a pointer to a user-defined callback that can be used
for updating progress displays during extraction.
diff --git a/archivers/libarchive/files/libarchive/archive_read_data_into_fd.c b/archivers/libarchive/files/libarchive/archive_read_data_into_fd.c
index 664cc2c3c24..3aeef3bc2da 100644
--- a/archivers/libarchive/files/libarchive/archive_read_data_into_fd.c
+++ b/archivers/libarchive/files/libarchive/archive_read_data_into_fd.c
@@ -24,7 +24,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_data_into_fd.c,v 1.15 2007/04/02 00:21:46 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_data_into_fd.c,v 1.16 2008/05/23 05:01:29 cperciva Exp $");
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -64,8 +64,12 @@ archive_read_data_into_fd(struct archive *a, int fd)
ARCHIVE_OK) {
const char *p = buff;
if (offset > output_offset) {
- lseek(fd, offset - output_offset, SEEK_CUR);
- output_offset = offset;
+ output_offset = lseek(fd,
+ offset - output_offset, SEEK_CUR);
+ if (output_offset != offset) {
+ archive_set_error(a, errno, "Seek error");
+ return (ARCHIVE_FATAL);
+ }
}
while (size > 0) {
bytes_to_write = size;
@@ -74,7 +78,7 @@ archive_read_data_into_fd(struct archive *a, int fd)
bytes_written = write(fd, p, bytes_to_write);
if (bytes_written < 0) {
archive_set_error(a, errno, "Write error");
- return (-1);
+ return (ARCHIVE_FATAL);
}
output_offset += bytes_written;
total_written += bytes_written;
diff --git a/archivers/libarchive/files/libarchive/archive_read_extract.c b/archivers/libarchive/files/libarchive/archive_read_extract.c
index bb5add7bbdc..ab01f7df3e2 100644
--- a/archivers/libarchive/files/libarchive/archive_read_extract.c
+++ b/archivers/libarchive/files/libarchive/archive_read_extract.c
@@ -82,34 +82,40 @@ get_extract(struct archive_read *a)
int
archive_read_extract(struct archive *_a, struct archive_entry *entry, int flags)
{
- struct archive_read *a = (struct archive_read *)_a;
struct extract *extract;
- int r, r2;
- extract = get_extract(a);
+ extract = get_extract((struct archive_read *)_a);
if (extract == NULL)
return (ARCHIVE_FATAL);
+ archive_write_disk_set_options(extract->ad, flags);
+ return (archive_read_extract2(_a, entry, extract->ad));
+}
+
+int
+archive_read_extract2(struct archive *_a, struct archive_entry *entry,
+ struct archive *ad)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ int r, r2;
/* Set up for this particular entry. */
- extract = a->extract;
- archive_write_disk_set_options(a->extract->ad, flags);
- archive_write_disk_set_skip_file(a->extract->ad,
+ archive_write_disk_set_skip_file(ad,
a->skip_file_dev, a->skip_file_ino);
- r = archive_write_header(a->extract->ad, entry);
+ r = archive_write_header(ad, entry);
if (r < ARCHIVE_WARN)
r = ARCHIVE_WARN;
if (r != ARCHIVE_OK)
/* If _write_header failed, copy the error. */
- archive_copy_error(&a->archive, extract->ad);
+ archive_copy_error(&a->archive, ad);
else
/* Otherwise, pour data into the entry. */
- r = copy_data(_a, a->extract->ad);
- r2 = archive_write_finish_entry(a->extract->ad);
+ r = copy_data(_a, ad);
+ r2 = archive_write_finish_entry(ad);
if (r2 < ARCHIVE_WARN)
r2 = ARCHIVE_WARN;
/* Use the first message. */
if (r2 != ARCHIVE_OK && r == ARCHIVE_OK)
- archive_copy_error(&a->archive, extract->ad);
+ archive_copy_error(&a->archive, ad);
/* Use the worst error return. */
if (r2 < r)
r = r2;
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_compression_bzip2.c b/archivers/libarchive/files/libarchive/archive_read_support_compression_bzip2.c
index 372eff09541..e6397df9634 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_compression_bzip2.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_compression_bzip2.c
@@ -116,17 +116,29 @@ bid(const void *buff, size_t len)
if (buffer[3] < '1' || buffer[3] > '9')
return (0);
bits_checked += 5;
+ if (len < 5)
+ return (bits_checked);
- /*
- * Research Question: Can we do any more to verify that this
- * really is BZip2 format?? For 99.9% of the time, the above
- * test is sufficient, but it would be nice to do a more
- * thorough check. It's especially troubling that the BZip2
- * signature begins with all ASCII characters; a tar archive
- * whose first filename begins with 'BZh3' would potentially
- * fool this logic. (It may also be possible to guard against
- * such anomalies in archive_read_support_compression_none.)
- */
+ /* After BZh[1-9], there must be either a data block
+ * which begins with 0x314159265359 or an end-of-data
+ * marker of 0x177245385090. */
+
+ if (buffer[4] == 0x31) {
+ /* Verify the data block signature. */
+ size_t s = len;
+ if (s > 10) s = 10;
+ if (memcmp(buffer + 4, "\x31\x41\x59\x26\x53\x59", s - 4) != 0)
+ return (0);
+ bits_checked += 8 * (s - 4);
+ } else if (buffer[4] == 0x17) {
+ /* Verify the end-of-data marker. */
+ size_t s = len;
+ if (s > 10) s = 10;
+ if (memcmp(buffer + 4, "\x17\x72\x45\x38\x50\x90", s - 4) != 0)
+ return (0);
+ bits_checked += 8 * (s - 4);
+ } else
+ return (0);
return (bits_checked);
}
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_compression_program.c b/archivers/libarchive/files/libarchive/archive_read_support_compression_program.c
index 58b4bbddf0b..206215c897c 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_compression_program.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_compression_program.c
@@ -26,6 +26,24 @@
#include "archive_platform.h"
__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_program.c,v 1.2 2007/07/20 01:28:50 kientzle Exp $");
+
+/* This capability is only available on POSIX systems. */
+#if !defined(HAVE_PIPE) || !defined(HAVE_VFORK) || !defined(HAVE_FCNTL)
+
+/*
+ * On non-Posix systems, allow the program to build, but choke if
+ * this function is actually invoked.
+ */
+int
+archive_read_support_compression_program(struct archive *_a, const char *cmd)
+{
+ archive_set_error(_a, -1,
+ "External compression programs not supported on this platform");
+ return (ARCHIVE_FATAL);
+}
+
+#else
+
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
@@ -313,3 +331,5 @@ archive_decompressor_program_finish(struct archive_read *a)
return (ARCHIVE_OK);
}
+
+#endif /* !defined(HAVE_PIPE) || !defined(HAVE_VFORK) || !defined(HAVE_FCNTL) */
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_ar.c b/archivers/libarchive/files/libarchive/archive_read_support_format_ar.c
index f6e4cc7e2ab..15d7e7cfd72 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_ar.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_ar.c
@@ -350,12 +350,16 @@ archive_read_format_ar_read_header(struct archive_read *a,
/* Parse the size of the name, adjust the file size. */
number = ar_atol10(h + AR_name_offset + 3, AR_name_size - 3);
- if ((off_t)number > ar->entry_bytes_remaining) {
+ bsd_name_length = (size_t)number;
+ /* Guard against the filename + trailing NUL
+ * overflowing a size_t and against the filename size
+ * being larger than the entire entry. */
+ if (number > (uint64_t)(bsd_name_length + 1)
+ || (off_t)bsd_name_length > ar->entry_bytes_remaining) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Bad input file size");
return (ARCHIVE_FATAL);
}
- bsd_name_length = (size_t)number;
ar->entry_bytes_remaining -= bsd_name_length;
/* Adjust file size reported to client. */
archive_entry_set_size(entry, ar->entry_bytes_remaining);
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c b/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c
index d333f0ccb4e..e0825a36e1a 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c
@@ -595,8 +595,11 @@ add_entry(struct iso9660 *iso9660, struct file_info *file)
struct file_info **new_pending_files;
int new_size = iso9660->pending_files_allocated * 2;
- if (new_size < 1024)
+ if (iso9660->pending_files_allocated < 1024)
new_size = 1024;
+ /* Overflow might keep us from growing the list. */
+ if (new_size <= iso9660->pending_files_allocated)
+ __archive_errx(1, "Out of memory");
new_pending_files = (struct file_info **)malloc(new_size * sizeof(new_pending_files[0]));
if (new_pending_files == NULL)
__archive_errx(1, "Out of memory");
@@ -908,6 +911,11 @@ fprintf(stderr, " *** Discarding CE data.\n");
file->ce_size = 0;
}
+ /* Don't waste time seeking for zero-length bodies. */
+ if (file->size == 0) {
+ file->offset = iso9660->current_position;
+ }
+
/* If CE exists, find and read it now. */
if (file->ce_offset > 0)
offset = file->ce_offset;
@@ -1041,51 +1049,22 @@ isodate17(const unsigned char *v)
return (time_from_tm(&tm));
}
-/*
- * timegm() converts a struct tm to a time_t, except it isn't standard,
- * so I provide my own function here that (ideally) is just a wrapper
- * for timegm().
- */
static time_t
time_from_tm(struct tm *t)
{
#if HAVE_TIMEGM
+ /* Use platform timegm() if available. */
return (timegm(t));
-#elif HAVE_STRUCT_TM_TM_GMTOFF
- /*
- * Unfortunately, timegm() isn't standard. The standard
- * mktime() function is a close match, except that it uses
- * local timezone instead of GMT. You can compensate for
- * this by adding the timezone and DST offsets back in, at
- * the cost of two calls to mktime().
- */
- mktime(t); /* Normalize the time and get the TZ offset. */
- t->tm_sec += t->tm_gmtoff; /* Try to adjust for the timezone and DST.*/
- if (t->tm_isdst)
- t->tm_hour -= 1;
- return (mktime(t)); /* Re-convert. */
-#elif defined(HAVE_SETENV) && defined(HAVE_UNSETENV) && defined(HAVE_TZSET)
- /* No timegm() and no tm_gmtoff, let's try forcing mktime() to UTC. */
- time_t ret;
- char *tz;
-
- /* Reset the timezone, remember the old one. */
- tz = getenv("TZ");
- setenv("TZ", "UTC 0", 1);
- tzset();
-
- ret = mktime(t);
-
- /* Restore the previous timezone. */
- if (tz)
- setenv("TZ", tz, 1);
- else
- unsetenv("TZ");
- tzset();
- return ret;
#else
- /* <sigh> We have no choice but to use localtime instead of UTC. */
- return (mktime(t));
+ /* Else use direct calculation using POSIX assumptions. */
+ /* First, fix up tm_yday based on the year/month/day. */
+ mktime(t);
+ /* Then we can compute timegm() from first principles. */
+ return (t->tm_sec + t->tm_min * 60 + t->tm_hour * 3600
+ + t->tm_yday * 86400 + (t->tm_year - 70) * 31536000
+ + ((t->tm_year - 69) / 4) * 86400 -
+ ((t->tm_year - 1) / 100) * 86400
+ + ((t->tm_year + 299) / 400) * 86400);
#endif
}
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c b/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c
index f1980e6bd10..72232ed7e03 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2003-2007 Tim Kientzle
+ * Copyright (c) 2008 Joerg Sonnenberger
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,7 +25,7 @@
*/
#include "archive_platform.h"
-__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.4 2008/03/15 11:02:47 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.5 2008/05/19 18:06:48 cperciva Exp $");
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -54,11 +55,29 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.4
#define O_BINARY 0
#endif
+#define MTREE_HAS_DEVICE 0x0001
+#define MTREE_HAS_FFLAGS 0x0002
+#define MTREE_HAS_GID 0x0004
+#define MTREE_HAS_GNAME 0x0008
+#define MTREE_HAS_MTIME 0x0010
+#define MTREE_HAS_NLINK 0x0020
+#define MTREE_HAS_PERM 0x0040
+#define MTREE_HAS_SIZE 0x0080
+#define MTREE_HAS_TYPE 0x0100
+#define MTREE_HAS_UID 0x0200
+#define MTREE_HAS_UNAME 0x0400
+
+#define MTREE_HAS_OPTIONAL 0x0800
+
+struct mtree_option {
+ struct mtree_option *next;
+ char *value;
+};
+
struct mtree_entry {
struct mtree_entry *next;
+ struct mtree_option *options;
char *name;
- char *option_start;
- char *option_end;
char full;
char used;
};
@@ -77,18 +96,20 @@ struct mtree {
struct archive_string current_dir;
struct archive_string contents_name;
+ struct archive_entry_linkresolver *resolver;
+
off_t cur_size, cur_offset;
};
static int cleanup(struct archive_read *);
static int mtree_bid(struct archive_read *);
static int parse_file(struct archive_read *, struct archive_entry *,
- struct mtree *, struct mtree_entry *);
+ struct mtree *, struct mtree_entry *, int *);
static void parse_escapes(char *, struct mtree_entry *);
static int parse_line(struct archive_read *, struct archive_entry *,
- struct mtree *, struct mtree_entry *);
+ struct mtree *, struct mtree_entry *, int *);
static int parse_keyword(struct archive_read *, struct mtree *,
- struct archive_entry *, char *, char *);
+ struct archive_entry *, struct mtree_option *, int *);
static int read_data(struct archive_read *a,
const void **buff, size_t *size, off_t *offset);
static ssize_t readline(struct archive_read *, struct mtree *, char **, ssize_t);
@@ -97,6 +118,19 @@ static int read_header(struct archive_read *,
struct archive_entry *);
static int64_t mtree_atol10(char **);
static int64_t mtree_atol8(char **);
+static int64_t mtree_atol(char **);
+
+static void
+free_options(struct mtree_option *head)
+{
+ struct mtree_option *next;
+
+ for (; head != NULL; head = next) {
+ next = head->next;
+ free(head->value);
+ free(head);
+ }
+}
int
archive_read_support_format_mtree(struct archive *_a)
@@ -129,21 +163,20 @@ cleanup(struct archive_read *a)
struct mtree_entry *p, *q;
mtree = (struct mtree *)(a->format->data);
+
p = mtree->entries;
while (p != NULL) {
q = p->next;
free(p->name);
- /*
- * Note: option_start, option_end are pointers into
- * the block that p->name points to. So we should
- * not try to free them!
- */
+ free_options(p->options);
free(p);
p = q;
}
archive_string_free(&mtree->line);
archive_string_free(&mtree->current_dir);
archive_string_free(&mtree->contents_name);
+ archive_entry_linkresolver_free(mtree->resolver);
+
free(mtree->buff);
free(mtree);
(a->format->data) = NULL;
@@ -184,21 +217,205 @@ mtree_bid(struct archive_read *a)
/*
* The extended mtree format permits multiple lines specifying
- * attributes for each file. Practically speaking, that means we have
+ * attributes for each file. For those entries, only the last line
+ * is actually used. Practically speaking, that means we have
* to read the entire mtree file into memory up front.
+ *
+ * The parsing is done in two steps. First, it is decided if a line
+ * changes the global defaults and if it is, processed accordingly.
+ * Otherwise, the options of the line are merged with the current
+ * global options.
*/
static int
+add_option(struct archive_read *a, struct mtree_option **global,
+ const char *value, size_t len)
+{
+ struct mtree_option *option;
+
+ if ((option = malloc(sizeof(*option))) == NULL) {
+ archive_set_error(&a->archive, errno, "Can't allocate memory");
+ return (ARCHIVE_FATAL);
+ }
+ if ((option->value = malloc(len + 1)) == NULL) {
+ free(option);
+ archive_set_error(&a->archive, errno, "Can't allocate memory");
+ return (ARCHIVE_FATAL);
+ }
+ memcpy(option->value, value, len);
+ option->value[len] = '\0';
+ option->next = *global;
+ *global = option;
+ return (ARCHIVE_OK);
+}
+
+static void
+remove_option(struct mtree_option **global, const char *value, size_t len)
+{
+ struct mtree_option *iter, *last;
+
+ last = NULL;
+ for (iter = *global; iter != NULL; last = iter, iter = iter->next) {
+ if (strncmp(iter->value, value, len) == 0 &&
+ (iter->value[len] == '\0' ||
+ iter->value[len] == '='))
+ break;
+ }
+ if (iter == NULL)
+ return;
+ if (last == NULL)
+ *global = iter->next;
+ else
+ last->next = iter->next;
+
+ free(iter->value);
+ free(iter);
+}
+
+static int
+process_global_set(struct archive_read *a,
+ struct mtree_option **global, const char *line)
+{
+ const char *next, *eq;
+ size_t len;
+ int r;
+
+ line += 4;
+ for (;;) {
+ next = line + strspn(line, " \t\r\n");
+ if (*next == '\0')
+ return (ARCHIVE_OK);
+ line = next;
+ next = line + strcspn(line, " \t\r\n");
+ eq = strchr(line, '=');
+ if (eq > next)
+ len = next - line;
+ else
+ len = eq - line;
+
+ remove_option(global, line, len);
+ r = add_option(a, global, line, next - line);
+ if (r != ARCHIVE_OK)
+ return (r);
+ line = next;
+ }
+}
+
+static int
+process_global_unset(struct archive_read *a,
+ struct mtree_option **global, const char *line)
+{
+ const char *next;
+ size_t len;
+
+ line += 6;
+ if ((next = strchr(line, '=')) != NULL) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "/unset shall not contain `='");
+ return ARCHIVE_FATAL;
+ }
+
+ for (;;) {
+ next = line + strspn(line, " \t\r\n");
+ if (*next == '\0')
+ return (ARCHIVE_OK);
+ line = next;
+ len = strcspn(line, " \t\r\n");
+
+ if (len == 3 && strncmp(line, "all", 3) == 0) {
+ free_options(*global);
+ *global = NULL;
+ } else {
+ remove_option(global, line, len);
+ }
+
+ line += len;
+ }
+}
+
+static int
+process_add_entry(struct archive_read *a, struct mtree *mtree,
+ struct mtree_option **global, const char *line,
+ struct mtree_entry **last_entry)
+{
+ struct mtree_entry *entry;
+ struct mtree_option *iter;
+ const char *next, *eq;
+ size_t len;
+ int r;
+
+ if ((entry = malloc(sizeof(*entry))) == NULL) {
+ archive_set_error(&a->archive, errno, "Can't allocate memory");
+ return (ARCHIVE_FATAL);
+ }
+ entry->next = NULL;
+ entry->options = NULL;
+ entry->name = NULL;
+ entry->used = 0;
+ entry->full = 0;
+
+ /* Add this entry to list. */
+ if (*last_entry == NULL)
+ mtree->entries = entry;
+ else
+ (*last_entry)->next = entry;
+ *last_entry = entry;
+
+ len = strcspn(line, " \t\r\n");
+ if ((entry->name = malloc(len + 1)) == NULL) {
+ archive_set_error(&a->archive, errno, "Can't allocate memory");
+ return (ARCHIVE_FATAL);
+ }
+
+ memcpy(entry->name, line, len);
+ entry->name[len] = '\0';
+ parse_escapes(entry->name, entry);
+
+ line += len;
+ for (iter = *global; iter != NULL; iter = iter->next) {
+ r = add_option(a, &entry->options, iter->value,
+ strlen(iter->value));
+ if (r != ARCHIVE_OK)
+ return (r);
+ }
+
+ for (;;) {
+ next = line + strspn(line, " \t\r\n");
+ if (*next == '\0')
+ return (ARCHIVE_OK);
+ line = next;
+ next = line + strcspn(line, " \t\r\n");
+ eq = strchr(line, '=');
+ if (eq > next)
+ len = next - line;
+ else
+ len = eq - line;
+
+ remove_option(&entry->options, line, len);
+ r = add_option(a, &entry->options, line, next - line);
+ if (r != ARCHIVE_OK)
+ return (r);
+ line = next;
+ }
+}
+
+static int
read_mtree(struct archive_read *a, struct mtree *mtree)
{
ssize_t len;
+ uintmax_t counter;
char *p;
- struct mtree_entry *mentry;
- struct mtree_entry *last_mentry = NULL;
+ struct mtree_option *global;
+ struct mtree_entry *last_entry;
+ int r;
mtree->archive_format = ARCHIVE_FORMAT_MTREE_V1;
mtree->archive_format_name = "mtree";
- for (;;) {
+ global = NULL;
+ last_entry = NULL;
+ r = ARCHIVE_OK;
+
+ for (counter = 1; ; ++counter) {
len = readline(a, mtree, &p, 256);
if (len == 0) {
mtree->this_entry = mtree->entries;
@@ -216,46 +433,27 @@ read_mtree(struct archive_read *a, struct mtree *mtree)
continue;
if (*p == '\r' || *p == '\n' || *p == '\0')
continue;
- mentry = malloc(sizeof(*mentry));
- if (mentry == NULL) {
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate memory");
- return (ARCHIVE_FATAL);
- }
- memset(mentry, 0, sizeof(*mentry));
- /* Add this entry to list. */
- if (last_mentry == NULL) {
- last_mentry = mtree->entries = mentry;
- } else {
- last_mentry->next = mentry;
- }
- last_mentry = mentry;
+ if (*p != '/') {
+ r = process_add_entry(a, mtree, &global, p,
+ &last_entry);
+ } else if (strncmp(p, "/set", 4) == 0) {
+ if (p[4] != ' ' && p[4] != '\t')
+ break;
+ r = process_global_set(a, &global, p);
+ } else if (strncmp(p, "/unset", 6) == 0) {
+ if (p[6] != ' ' && p[6] != '\t')
+ break;
+ r = process_global_unset(a, &global, p);
+ } else
+ break;
- /* Copy line over onto heap. */
- mentry->name = malloc(len + 1);
- if (mentry->name == NULL) {
- free(mentry);
- archive_set_error(&a->archive, ENOMEM,
- "Can't allocate memory");
- return (ARCHIVE_FATAL);
- }
- strcpy(mentry->name, p);
- mentry->option_end = mentry->name + len;
- /* Find end of name. */
- p = mentry->name;
- while (*p != ' ' && *p != '\n' && *p != '\0')
- ++p;
- *p++ = '\0';
- parse_escapes(mentry->name, mentry);
- /* Find start of options and record it. */
- while (p < mentry->option_end && (*p == ' ' || *p == '\t'))
- ++p;
- mentry->option_start = p;
- /* Null terminate each separate option. */
- while (++p < mentry->option_end)
- if (*p == ' ' || *p == '\t' || *p == '\n')
- *p = '\0';
+ if (r != ARCHIVE_OK)
+ return r;
}
+
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Can't parse line %ju", counter);
+ return ARCHIVE_FATAL;
}
/*
@@ -267,7 +465,7 @@ read_header(struct archive_read *a, struct archive_entry *entry)
{
struct mtree *mtree;
char *p;
- int r;
+ int r, use_next;
mtree = (struct mtree *)(a->format->data);
@@ -277,6 +475,11 @@ read_header(struct archive_read *a, struct archive_entry *entry)
}
if (mtree->entries == NULL) {
+ mtree->resolver = archive_entry_linkresolver_new();
+ if (mtree->resolver == NULL)
+ return ARCHIVE_FATAL;
+ archive_entry_linkresolver_set_strategy(mtree->resolver,
+ ARCHIVE_FORMAT_MTREE);
r = read_mtree(a, mtree);
if (r != ARCHIVE_OK)
return (r);
@@ -303,8 +506,10 @@ read_header(struct archive_read *a, struct archive_entry *entry)
}
}
if (!mtree->this_entry->used) {
- r = parse_file(a, entry, mtree, mtree->this_entry);
- return (r);
+ use_next = 0;
+ r = parse_file(a, entry, mtree, mtree->this_entry, &use_next);
+ if (use_next == 0)
+ return (r);
}
mtree->this_entry = mtree->this_entry->next;
}
@@ -317,11 +522,13 @@ read_header(struct archive_read *a, struct archive_entry *entry)
*/
static int
parse_file(struct archive_read *a, struct archive_entry *entry,
- struct mtree *mtree, struct mtree_entry *mentry)
+ struct mtree *mtree, struct mtree_entry *mentry, int *use_next)
{
- struct stat st;
+ const char *path;
+ struct stat st_storage, *st;
struct mtree_entry *mp;
- int r = ARCHIVE_OK, r1;
+ struct archive_entry *sparse_entry;
+ int r = ARCHIVE_OK, r1, parsed_kws, mismatched_type;
mentry->used = 1;
@@ -330,7 +537,8 @@ parse_file(struct archive_read *a, struct archive_entry *entry,
archive_entry_set_size(entry, 0);
/* Parse options from this line. */
- r = parse_line(a, entry, mtree, mentry);
+ parsed_kws = 0;
+ r = parse_line(a, entry, mtree, mentry, &parsed_kws);
if (mentry->full) {
archive_entry_copy_pathname(entry, mentry->name);
@@ -349,7 +557,8 @@ parse_file(struct archive_read *a, struct archive_entry *entry,
&& strcmp(mentry->name, mp->name) == 0) {
/* Later lines override earlier ones. */
mp->used = 1;
- r1 = parse_line(a, entry, mtree, mp);
+ r1 = parse_line(a, entry, mtree, mp,
+ &parsed_kws);
if (r1 < r)
r = r1;
}
@@ -381,49 +590,126 @@ parse_file(struct archive_read *a, struct archive_entry *entry,
* disk.)
*/
mtree->fd = -1;
- if (archive_strlen(&mtree->contents_name) > 0) {
- mtree->fd = open(mtree->contents_name.s,
+ if (archive_strlen(&mtree->contents_name) > 0)
+ path = mtree->contents_name.s;
+ else
+ path = archive_entry_pathname(entry);
+
+ if (archive_entry_filetype(entry) == AE_IFREG ||
+ archive_entry_filetype(entry) == AE_IFDIR) {
+ mtree->fd = open(path,
O_RDONLY | O_BINARY);
- if (mtree->fd < 0) {
+ if (mtree->fd == -1 &&
+ (errno != ENOENT ||
+ archive_strlen(&mtree->contents_name) > 0)) {
archive_set_error(&a->archive, errno,
- "Can't open content=\"%s\"",
- mtree->contents_name.s);
+ "Can't open %s", path);
r = ARCHIVE_WARN;
}
- } else if (archive_entry_filetype(entry) == AE_IFREG) {
- mtree->fd = open(archive_entry_pathname(entry),
- O_RDONLY | O_BINARY);
}
- /*
- * If there is a contents file on disk, use that size;
- * otherwise leave it as-is (it might have been set from
- * the mtree size= keyword).
- */
+ st = &st_storage;
if (mtree->fd >= 0) {
- if (fstat(mtree->fd, &st) != 0) {
+ if (fstat(mtree->fd, st) == -1) {
archive_set_error(&a->archive, errno,
- "could not stat %s",
- archive_entry_pathname(entry));
+ "Could not fstat %s", path);
r = ARCHIVE_WARN;
/* If we can't stat it, don't keep it open. */
close(mtree->fd);
mtree->fd = -1;
- } else if ((st.st_mode & S_IFMT) != S_IFREG) {
- archive_set_error(&a->archive, errno,
- "%s is not a regular file",
- archive_entry_pathname(entry));
- r = ARCHIVE_WARN;
+ st = NULL;
+ }
+ } else if (lstat(path, st) == -1) {
+ st = NULL;
+ }
+
+ /*
+ * If there is a contents file on disk, use that size;
+ * otherwise leave it as-is (it might have been set from
+ * the mtree size= keyword).
+ */
+ if (st != NULL) {
+ mismatched_type = 0;
+ if ((st->st_mode & S_IFMT) == S_IFREG &&
+ archive_entry_filetype(entry) != AE_IFREG)
+ mismatched_type = 1;
+ if ((st->st_mode & S_IFMT) == S_IFLNK &&
+ archive_entry_filetype(entry) != AE_IFLNK)
+ mismatched_type = 1;
+ if ((st->st_mode & S_IFSOCK) == S_IFSOCK &&
+ archive_entry_filetype(entry) != AE_IFSOCK)
+ mismatched_type = 1;
+ if ((st->st_mode & S_IFMT) == S_IFCHR &&
+ archive_entry_filetype(entry) != AE_IFCHR)
+ mismatched_type = 1;
+ if ((st->st_mode & S_IFMT) == S_IFBLK &&
+ archive_entry_filetype(entry) != AE_IFBLK)
+ mismatched_type = 1;
+ if ((st->st_mode & S_IFMT) == S_IFDIR &&
+ archive_entry_filetype(entry) != AE_IFDIR)
+ mismatched_type = 1;
+ if ((st->st_mode & S_IFMT) == S_IFIFO &&
+ archive_entry_filetype(entry) != AE_IFIFO)
+ mismatched_type = 1;
+
+ if (mismatched_type) {
+ if ((parsed_kws & MTREE_HAS_OPTIONAL) == 0) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_MISC,
+ "mtree specification has different type for %s",
+ archive_entry_pathname(entry));
+ r = ARCHIVE_WARN;
+ } else {
+ *use_next = 1;
+ }
/* Don't hold a non-regular file open. */
close(mtree->fd);
mtree->fd = -1;
- } else {
- archive_entry_set_size(entry, st.st_size);
- archive_entry_set_ino(entry, st.st_ino);
- archive_entry_set_dev(entry, st.st_dev);
- archive_entry_set_nlink(entry, st.st_nlink);
+ st = NULL;
+ return r;
}
}
+
+ if (st != NULL) {
+ if ((parsed_kws & MTREE_HAS_DEVICE) == 0 &&
+ (archive_entry_filetype(entry) == AE_IFCHR ||
+ archive_entry_filetype(entry) == AE_IFBLK))
+ archive_entry_set_rdev(entry, st->st_rdev);
+ if ((parsed_kws & (MTREE_HAS_GID | MTREE_HAS_GNAME)) == 0)
+ archive_entry_set_gid(entry, st->st_gid);
+ if ((parsed_kws & (MTREE_HAS_UID | MTREE_HAS_UNAME)) == 0)
+ archive_entry_set_uid(entry, st->st_uid);
+ if ((parsed_kws & MTREE_HAS_MTIME) == 0) {
+#if HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
+ archive_entry_set_mtime(entry, st->st_mtime,
+ st->st_mtimespec.tv_nsec);
+#elif HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
+ archive_entry_set_mtime(entry, st->st_mtime,
+ st->st_mtim.tv_nsec);
+#else
+ archive_entry_set_mtime(entry, st->st_mtime, 0);
+#endif
+ }
+ if ((parsed_kws & MTREE_HAS_NLINK) == 0)
+ archive_entry_set_nlink(entry, st->st_nlink);
+ if ((parsed_kws & MTREE_HAS_PERM) == 0)
+ archive_entry_set_perm(entry, st->st_mode);
+ if ((parsed_kws & MTREE_HAS_SIZE) == 0)
+ archive_entry_set_size(entry, st->st_size);
+ archive_entry_set_ino(entry, st->st_ino);
+ archive_entry_set_dev(entry, st->st_dev);
+
+ archive_entry_linkify(mtree->resolver, &entry, &sparse_entry);
+ } else if (parsed_kws & MTREE_HAS_OPTIONAL) {
+ /*
+ * Couldn't open the entry, stat it or the on-disk type
+ * didn't match. If this entry is optional, just ignore it
+ * and read the next header entry.
+ */
+ *use_next = 1;
+ return ARCHIVE_OK;
+ }
+
mtree->cur_size = archive_entry_size(entry);
mtree->offset = 0;
@@ -435,36 +721,82 @@ parse_file(struct archive_read *a, struct archive_entry *entry,
*/
static int
parse_line(struct archive_read *a, struct archive_entry *entry,
- struct mtree *mtree, struct mtree_entry *mp)
+ struct mtree *mtree, struct mtree_entry *mp, int *parsed_kws)
{
- char *p, *q;
+ struct mtree_option *iter;
int r = ARCHIVE_OK, r1;
- p = mp->option_start;
- while (p < mp->option_end) {
- q = p + strlen(p);
- r1 = parse_keyword(a, mtree, entry, p, q);
+ for (iter = mp->options; iter != NULL; iter = iter->next) {
+ r1 = parse_keyword(a, mtree, entry, iter, parsed_kws);
if (r1 < r)
r = r1;
- p = q + 1;
+ }
+ if ((*parsed_kws & MTREE_HAS_TYPE) == 0) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Missing type keyword in mtree specification");
+ return (ARCHIVE_WARN);
}
return (r);
}
/*
+ * Device entries have one of the following forms:
+ * raw dev_t
+ * format,major,minor[,subdevice]
+ *
+ * Just use major and minor, no translation etc is done
+ * between formats.
+ */
+static int
+parse_device(struct archive *a, struct archive_entry *entry, char *val)
+{
+ char *comma1, *comma2;
+
+ comma1 = strchr(val, ',');
+ if (comma1 == NULL) {
+ archive_entry_set_dev(entry, mtree_atol10(&val));
+ return (ARCHIVE_OK);
+ }
+ ++comma1;
+ comma2 = strchr(comma1, ',');
+ if (comma1 == NULL) {
+ archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Malformed device attribute");
+ return (ARCHIVE_WARN);
+ }
+ ++comma2;
+ archive_entry_set_rdevmajor(entry, mtree_atol(&comma1));
+ archive_entry_set_rdevminor(entry, mtree_atol(&comma2));
+ return (ARCHIVE_OK);
+}
+
+/*
* Parse a single keyword and its value.
*/
static int
parse_keyword(struct archive_read *a, struct mtree *mtree,
- struct archive_entry *entry, char *key, char *end)
+ struct archive_entry *entry, struct mtree_option *option, int *parsed_kws)
{
- char *val;
+ char *val, *key;
+
+ key = option->value;
- if (end == key)
- return (ARCHIVE_OK);
if (*key == '\0')
return (ARCHIVE_OK);
+ if (strcmp(key, "optional") == 0) {
+ *parsed_kws |= MTREE_HAS_OPTIONAL;
+ return (ARCHIVE_OK);
+ }
+ if (strcmp(key, "ignore") == 0) {
+ /*
+ * The mtree processing is not recursive, so
+ * recursion will only happen for explicitly listed
+ * entries.
+ */
+ return (ARCHIVE_OK);
+ }
+
val = strchr(key, '=');
if (val == NULL) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
@@ -483,38 +815,93 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
archive_strcpy(&mtree->contents_name, val);
break;
}
+ if (strcmp(key, "cksum") == 0)
+ break;
+ case 'd':
+ if (strcmp(key, "device") == 0) {
+ *parsed_kws |= MTREE_HAS_DEVICE;
+ return parse_device(&a->archive, entry, val);
+ }
+ case 'f':
+ if (strcmp(key, "flags") == 0) {
+ *parsed_kws |= MTREE_HAS_FFLAGS;
+ archive_entry_copy_fflags_text(entry, val);
+ break;
+ }
case 'g':
if (strcmp(key, "gid") == 0) {
+ *parsed_kws |= MTREE_HAS_GID;
archive_entry_set_gid(entry, mtree_atol10(&val));
break;
}
if (strcmp(key, "gname") == 0) {
+ *parsed_kws |= MTREE_HAS_GNAME;
archive_entry_copy_gname(entry, val);
break;
}
case 'l':
if (strcmp(key, "link") == 0) {
- archive_entry_set_link(entry, val);
+ archive_entry_copy_symlink(entry, val);
break;
}
case 'm':
+ if (strcmp(key, "md5") == 0 || strcmp(key, "md5digest") == 0)
+ break;
if (strcmp(key, "mode") == 0) {
- if (val[0] == '0') {
+ if (val[0] >= '0' && val[0] <= '9') {
+ *parsed_kws |= MTREE_HAS_PERM;
archive_entry_set_perm(entry,
mtree_atol8(&val));
- } else
+ } else {
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
"Symbolic mode \"%s\" unsupported", val);
+ return ARCHIVE_WARN;
+ }
+ break;
+ }
+ case 'n':
+ if (strcmp(key, "nlink") == 0) {
+ *parsed_kws |= MTREE_HAS_NLINK;
+ archive_entry_set_nlink(entry, mtree_atol10(&val));
break;
}
+ case 'r':
+ if (strcmp(key, "rmd160") == 0 ||
+ strcmp(key, "rmd160digest") == 0)
+ break;
case 's':
+ if (strcmp(key, "sha1") == 0 || strcmp(key, "sha1digest") == 0)
+ break;
+ if (strcmp(key, "sha256") == 0 ||
+ strcmp(key, "sha256digest") == 0)
+ break;
+ if (strcmp(key, "sha384") == 0 ||
+ strcmp(key, "sha384digest") == 0)
+ break;
+ if (strcmp(key, "sha512") == 0 ||
+ strcmp(key, "sha512digest") == 0)
+ break;
if (strcmp(key, "size") == 0) {
archive_entry_set_size(entry, mtree_atol10(&val));
break;
}
case 't':
+ if (strcmp(key, "tags") == 0) {
+ /*
+ * Comma delimited list of tags.
+ * Ignore the tags for now, but the interface
+ * should be extended to allow inclusion/exclusion.
+ */
+ break;
+ }
+ if (strcmp(key, "time") == 0) {
+ *parsed_kws |= MTREE_HAS_MTIME;
+ archive_entry_set_mtime(entry, mtree_atol10(&val), 0);
+ break;
+ }
if (strcmp(key, "type") == 0) {
+ *parsed_kws |= MTREE_HAS_TYPE;
switch (val[0]) {
case 'b':
if (strcmp(val, "block") == 0) {
@@ -554,16 +941,14 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
archive_entry_set_filetype(entry, mtree->filetype);
break;
}
- if (strcmp(key, "time") == 0) {
- archive_entry_set_mtime(entry, mtree_atol10(&val), 0);
- break;
- }
case 'u':
if (strcmp(key, "uid") == 0) {
+ *parsed_kws |= MTREE_HAS_UID;
archive_entry_set_uid(entry, mtree_atol10(&val));
break;
}
if (strcmp(key, "uname") == 0) {
+ *parsed_kws |= MTREE_HAS_UNAME;
archive_entry_copy_uname(entry, val);
break;
}
@@ -596,6 +981,7 @@ read_data(struct archive_read *a, const void **buff, size_t *size, off_t *offset
archive_set_error(&a->archive, ENOMEM,
"Can't allocate memory");
}
+ return (ARCHIVE_FATAL);
}
*buff = mtree->buff;
@@ -642,6 +1028,13 @@ parse_escapes(char *src, struct mtree_entry *mentry)
char *dest = src;
char c;
+ /*
+ * The current directory is somewhat special, it should be archived
+ * only once as it will confuse extraction otherwise.
+ */
+ if (strcmp(src, ".") == 0)
+ mentry->full = 1;
+
while (*src != '\0') {
c = *src++;
if (c == '/' && mentry != NULL)
@@ -724,6 +1117,66 @@ mtree_atol10(char **p)
}
/*
+ * Note that this implementation does not (and should not!) obey
+ * locale settings; you cannot simply substitute strtol here, since
+ * it does obey locale.
+ */
+static int64_t
+mtree_atol16(char **p)
+{
+ int64_t l, limit, last_digit_limit;
+ int base, digit, sign;
+
+ base = 16;
+ limit = INT64_MAX / base;
+ last_digit_limit = INT64_MAX % base;
+
+ if (**p == '-') {
+ sign = -1;
+ ++(*p);
+ } else
+ sign = 1;
+
+ l = 0;
+ if (**p >= '0' && **p <= '9')
+ digit = **p - '0';
+ else if (**p >= 'a' && **p <= 'f')
+ digit = **p - 'a' + 10;
+ else if (**p >= 'A' && **p <= 'F')
+ digit = **p - 'A' + 10;
+ else
+ digit = -1;
+ while (digit >= 0 && digit < base) {
+ if (l > limit || (l == limit && digit > last_digit_limit)) {
+ l = UINT64_MAX; /* Truncate on overflow. */
+ break;
+ }
+ l = (l * base) + digit;
+ if (**p >= '0' && **p <= '9')
+ digit = **p - '0';
+ else if (**p >= 'a' && **p <= 'f')
+ digit = **p - 'a' + 10;
+ else if (**p >= 'A' && **p <= 'F')
+ digit = **p - 'A' + 10;
+ else
+ digit = -1;
+ }
+ return (sign < 0) ? -l : l;
+}
+
+static int64_t
+mtree_atol(char **p)
+{
+ if (**p != '0')
+ return mtree_atol10(p);
+ if ((*p)[1] == 'x' || (*p)[1] == 'X') {
+ *p += 2;
+ return mtree_atol16(p);
+ }
+ return mtree_atol8(p);
+}
+
+/*
* Returns length of line (including trailing newline)
* or negative on error. 'start' argument is updated to
* point to first character of line.
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c b/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c
index 147ec0b2795..6d7f048a40d 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c
@@ -2303,7 +2303,7 @@ base64_decode(const char *s, size_t len, size_t *out_len)
/* Allocate enough space to hold the entire output. */
/* Note that we may not use all of this... */
- out = (char *)malloc((len * 3 + 3) / 4);
+ out = (char *)malloc(len - len / 4 + 1);
if (out == NULL) {
*out_len = 0;
return (NULL);
diff --git a/archivers/libarchive/files/libarchive/archive_string.c b/archivers/libarchive/files/libarchive/archive_string.c
index e308c480bba..7c378deead4 100644
--- a/archivers/libarchive/files/libarchive/archive_string.c
+++ b/archivers/libarchive/files/libarchive/archive_string.c
@@ -41,6 +41,14 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_string.c,v 1.11 2007/07/15 19:13:
#include <wchar.h>
#endif
+#ifdef __sgi
+/*
+ * The following prototype is missing on IRXI,
+ * even though the function is implemented in libc.
+ */
+size_t wcrtomb(char *, wchar_t, mbstate_t *);
+#endif
+
#include "archive_private.h"
#include "archive_string.h"
diff --git a/archivers/libarchive/files/libarchive/archive_windows.c b/archivers/libarchive/files/libarchive/archive_windows.c
new file mode 100644
index 00000000000..1f4d273dabb
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/archive_windows.c
@@ -0,0 +1,188 @@
+/*-
+ * Copyright (c) 2003-2007 Kees Zeelenberg
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * A set of compatibility glue for building libarchive on Windows platforms.
+ *
+ * Originally created as "libarchive-nonposix.c" by Kees Zeelenberg
+ * for the GnuWin32 project, trimmed significantly by Tim Kientzle.
+ *
+ * Much of the original file was unnecessary for libarchive, because
+ * many of the features it emulated were not strictly necessary for
+ * libarchive. I hope for this to shrink further as libarchive
+ * internals are gradually reworked to sit more naturally on both
+ * POSIX and Windows. Any ideas for this are greatly appreciated.
+ *
+ * The biggest remaining issue is the dev/ino emulation; libarchive
+ * has a couple of public APIs that rely on dev/ino uniquely
+ * identifying a file. This doesn't match well with Windows. I'm
+ * considering alternative APIs.
+ */
+
+#ifdef _WIN32
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/utime.h>
+#include <sys/stat.h>
+#include <process.h>
+#include <stdlib.h>
+#include <windows.h>
+#include "archive_platform.h"
+
+/* Make a link to FROM called TO. */
+int link (from, to)
+ const char *from;
+ const char *to;
+{
+ int res;
+
+ if (from == NULL || to == NULL) {
+ set_errno (EINVAL);
+ return -1;
+ }
+
+ if (!_access (from, F_OK))
+ res = CopyFile (from, to, FALSE);
+ else {
+ /* from doesn not exist; try to prepend it with the dirname of to */
+ char *fullfrompath, *slash, *todir;
+ todir = strdup (to);
+ if (!todir)
+ return -1;
+ slash = strrchr(todir, '/');
+ if (slash)
+ *slash = '\0';
+ fullfrompath = malloc (strlen (from) + strlen (todir) + 2);
+ if (!fullfrompath)
+ return -1;
+ strcpy (fullfrompath, todir);
+ strcat (fullfrompath, "/");
+ strcat (fullfrompath, from);
+ if (todir)
+ free (todir);
+ if (_access (fullfrompath, R_OK))
+ return -1;
+ res = CopyFile (fullfrompath, to, FALSE);
+ if (fullfrompath)
+ free (fullfrompath);
+ }
+
+ if (res == 0) {
+ set_errno (EINVAL);
+ return -1;
+ }
+ return 0;
+}
+
+/* Make a symbolic link to FROM called TO. */
+int symlink (from, to)
+ const char *from;
+ const char *to;
+{
+ return link (from, to);
+}
+
+static int get_dev_ino (HANDLE hFile, dev_t *dev, ino_t *ino)
+{
+/* dev_t: short (2 bytes); ino_t: unsigned int (4 bytes) */
+#define LODWORD(l) ((DWORD)((DWORDLONG)(l)))
+#define HIDWORD(l) ((DWORD)(((DWORDLONG)(l)>>32)&0xFFFFFFFF))
+#define MAKEDWORDLONG(a,b) ((DWORDLONG)(((DWORD)(a))|(((DWORDLONG)((DWORD)(b)))<<32)))
+
+#define INOSIZE (8*sizeof(ino_t)) /* 32 */
+//#define DEVSIZE (8*sizeof(dev_t)) /* 16 */
+#define SEQNUMSIZE (16)
+
+ BY_HANDLE_FILE_INFORMATION FileInformation;
+ uint64_t ino64, FileReferenceNumber ;
+ ino_t resino;
+ dev_t resdev;
+ DWORD VolumeSerialNumber;
+
+ *ino = 0;
+ *dev = 0;
+ if (hFile == INVALID_HANDLE_VALUE) /* file cannot be opened */
+ return 0;
+ ZeroMemory (&FileInformation, sizeof(FileInformation));
+ if (!GetFileInformationByHandle (hFile, &FileInformation)) /* cannot obtain FileInformation */
+ return 0;
+ ino64 = (uint64_t) MAKEDWORDLONG (
+ FileInformation.nFileIndexLow, FileInformation.nFileIndexHigh);
+ FileReferenceNumber = ino64 & ((~(0ULL)) >> SEQNUMSIZE); /* remove sequence number */
+ /* transform 64-bits ino into 32-bits by hashing */
+ resino = (ino_t) (
+ ( (LODWORD(FileReferenceNumber)) ^ ((LODWORD(FileReferenceNumber)) >> INOSIZE) )
+// ^
+// ( (HIDWORD(FileReferenceNumber)) ^ ((HIDWORD(FileReferenceNumber)) >> INOSIZE) )
+ );
+ *ino = resino;
+ VolumeSerialNumber = FileInformation.dwVolumeSerialNumber;
+ //resdev = (unsigned short) ( (LOWORD(VolumeSerialNumber)) ^ ((HIWORD(VolumeSerialNumber)) >> DEVSIZE) );
+ resdev = (dev_t) VolumeSerialNumber;
+ *dev = resdev;
+//printf ("get_dev_ino: dev = %d; ino = %u\n", resdev, resino);
+ return 0;
+}
+
+int get_dev_ino_fd (int fd, dev_t *dev, ino_t *ino)
+{
+ HANDLE hFile;
+ hFile = (HANDLE) _get_osfhandle (fd);
+ return get_dev_ino (hFile, dev, ino);
+}
+
+int get_dev_ino_filename (char *path, dev_t *dev, ino_t *ino)
+{
+ HANDLE hFile;
+ int res;
+ if (!path || !*path) /* path = NULL */
+ return 0;
+ if (_access (path, F_OK)) /* path does not exist */
+ return -1;
+/* obtain handle to file "name"; FILE_FLAG_BACKUP_SEMANTICS is used to open directories */
+ hFile = CreateFile (path, 0, 0, NULL, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_ATTRIBUTE_READONLY,
+ NULL);
+ res = get_dev_ino (hFile, dev, ino);
+ CloseHandle (hFile);
+ return res;
+}
+
+int fstati64 (int fd, struct _stati64 *st)
+{
+ int res;
+ res = _fstati64 (fd, st);
+ if (res < 0)
+ return -1;
+ if (st->st_ino == 0)
+ res = get_dev_ino_fd (fd, &st->st_dev, &st->st_ino);
+// printf ("fstat: dev = %u; ino = %u\n", st->st_dev, st->st_ino);
+ return res;
+}
+
+#endif /* _WIN32 */
diff --git a/archivers/libarchive/files/libarchive/archive_windows.h b/archivers/libarchive/files/libarchive/archive_windows.h
new file mode 100644
index 00000000000..9bc21e4de8f
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/archive_windows.h
@@ -0,0 +1,152 @@
+/*-
+ * Copyright (c) 2003-2006 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in this position and unchanged.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef LIBARCHIVE_NONPOSIX_H_INCLUDED
+#define LIBARCHIVE_NONPOSIX_H_INCLUDED
+
+/* Start of configuration for native Win32 */
+
+#include <errno.h>
+#define set_errno(val) ((errno)=val)
+#include <io.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <process.h>
+#include <direct.h>
+
+#define EFTYPE 7
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+
+/* TODO: Fix the code, don't suppress the warnings. */
+#pragma warning(disable:4244) /* 'conversion' conversion from 'type1' to 'type2', possible loss of data */
+#pragma warning(disable:4146) /* unary minus operator applied to unsigned type, result still unsigned */
+#pragma warning(disable:4996) /* 'function': was declared deprecated */
+#pragma warning(disable:4267) /* Conversion, possible loss of data */
+
+/* Basic definitions for system and integer types. */
+#ifndef _SSIZE_T_
+# define SSIZE_MAX LONG_MAX
+#define _SSIZE_T_
+#endif /* _SSIZE_T_ */
+
+#ifndef NULL
+#ifdef __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+/* Replacement for major/minor/makedev. */
+#define major(x) ((int)(0x00ff & ((x) >> 8)))
+#define minor(x) ((int)(0xffff00ff & (x)))
+#define makedev(maj,min) ((0xff00 & ((maj)<<8))|(0xffff00ff & (min)))
+
+#define EFTYPE 7
+#ifndef STDERR_FILENO
+#define STDERR_FILENO 2
+#endif /* STDERR_FILENO */
+
+/* Alias the Windows _function to the POSIX equivalent. */
+#define chdir _chdir
+#define chmod _chmod
+#define close _close
+#define fileno _fileno
+#define fstat _fstat
+#define lseek _lseek
+#define open _open
+#define stat _stat
+#define mkdir(d,m) _mkdir(d)
+#define mktemp _mktemp
+#define read _read
+#define rmdir _rmdir
+#define strdup _strdup
+#define tzset _tzset
+#define umask _umask
+#define write _write
+
+#define O_RDONLY _O_RDONLY
+#define O_WRONLY _O_WRONLY
+#define O_TRUNC _O_TRUNC
+#define O_CREAT _O_CREAT
+#define O_EXCL _O_EXCL
+
+#define S_ISUID 0004000
+#define S_ISGID 0002000
+#define S_ISVTX 0001000
+
+#define S_IFMT 0170000
+#define S_IFDIR _S_IFDIR
+#define S_IFREG _S_IFREG
+
+#define S_ISDIR(m) (((m) & 0170000) == _S_IFDIR) /* directory */
+#define S_ISCHR(m) (((m) & 0170000) == _S_IFCHR) /* char special */
+#define S_ISREG(m) (((m) & 0170000) == _S_IFREG) /* regular file */
+
+/* Windows doesn't have the following, so they're trivial. */
+#define S_ISBLK(m) (0) /* block special */
+#define S_ISFIFO(m) (0) /* fifo or socket */
+#define S_ISLNK(m) (0) /* Symbolic link */
+#define S_ISSOCK(m) (0) /* Socket */
+
+/* replace stat and seek by their large-file equivalents */
+#undef stat
+#define stat _stati64
+#undef fstat
+#define fstat _fstati64
+
+#undef lseek
+#define lseek _lseeki64
+#define lseek64 _lseeki64
+#define tell _telli64
+#define tell64 _telli64
+
+#ifdef __MINGW32__
+# define fseek fseeko64
+# define fseeko fseeko64
+# define ftell ftello64
+# define ftello ftello64
+# define ftell64 ftello64
+#endif /* __MINGW32__ */
+
+/* End of Win32 definitions. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int link (const char *from, const char *to);
+extern int symlink (const char *from, const char *to);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBARCHIVE_NONPOSIX_H_INCLUDED */
diff --git a/archivers/libarchive/files/libarchive/archive_write.3 b/archivers/libarchive/files/libarchive/archive_write.3
index 253b39e7826..fff84f7cddc 100644
--- a/archivers/libarchive/files/libarchive/archive_write.3
+++ b/archivers/libarchive/files/libarchive/archive_write.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD: src/lib/libarchive/archive_write.3,v 1.23 2008/03/10 14:44:41 jkoshy Exp $
.\"
-.Dd August 19, 2006
+.Dd May 11, 2008
.Dt archive_write 3
.Os
.Sh NAME
@@ -39,6 +39,7 @@
.Nm archive_write_set_bytes_per_block ,
.Nm archive_write_set_bytes_in_last_block ,
.Nm archive_write_set_compression_bzip2 ,
+.Nm archive_write_set_compression_compress ,
.Nm archive_write_set_compression_gzip ,
.Nm archive_write_set_compression_none ,
.Nm archive_write_set_compression_program ,
@@ -66,6 +67,8 @@
.Ft int
.Fn archive_write_set_compression_bzip2 "struct archive *"
.Ft int
+.Fn archive_write_set_compression_compress "struct archive *"
+.Ft int
.Fn archive_write_set_compression_gzip "struct archive *"
.Ft int
.Fn archive_write_set_compression_none "struct archive *"
@@ -197,6 +200,7 @@ the pax extended header for most normal files.
In most cases, this will result in ordinary ustar archives.
.It Xo
.Fn archive_write_set_compression_bzip2 ,
+.Fn archive_write_set_compression_compress ,
.Fn archive_write_set_compression_gzip ,
.Fn archive_write_set_compression_none
.Xc
diff --git a/archivers/libarchive/files/libarchive/archive_write_disk.3 b/archivers/libarchive/files/libarchive/archive_write_disk.3
index 5d836e105e3..f71d7d54854 100644
--- a/archivers/libarchive/files/libarchive/archive_write_disk.3
+++ b/archivers/libarchive/files/libarchive/archive_write_disk.3
@@ -170,6 +170,10 @@ 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.
.It Xo
.Fn archive_write_disk_set_group_lookup ,
.Fn archive_write_disk_set_user_lookup
diff --git a/archivers/libarchive/files/libarchive/archive_write_disk.c b/archivers/libarchive/files/libarchive/archive_write_disk.c
index 620beac48ed..8010c1330ea 100644
--- a/archivers/libarchive/files/libarchive/archive_write_disk.c
+++ b/archivers/libarchive/files/libarchive/archive_write_disk.c
@@ -187,6 +187,8 @@ struct archive_write_disk {
/* UID/GID to use in restoring this entry. */
uid_t uid;
gid_t gid;
+ /* Last offset written to disk. */
+ off_t last_offset;
};
/*
@@ -242,6 +244,31 @@ static int _archive_write_finish_entry(struct archive *);
static ssize_t _archive_write_data(struct archive *, const void *, size_t);
static ssize_t _archive_write_data_block(struct archive *, const void *, size_t, off_t);
+static int
+_archive_write_disk_lazy_stat(struct archive_write_disk *a)
+{
+ if (a->pst != NULL) {
+ /* Already have stat() data available. */
+ return (ARCHIVE_OK);
+ }
+#ifdef HAVE_FSTAT
+ if (a->fd >= 0 && fstat(a->fd, &a->st) == 0) {
+ a->pst = &a->st;
+ return (ARCHIVE_OK);
+ }
+#endif
+ /*
+ * XXX At this point, symlinks should not be hit, otherwise
+ * XXX a race occured. Do we want to check explicitly for that?
+ */
+ if (lstat(a->name, &a->st) == 0) {
+ a->pst = &a->st;
+ return (ARCHIVE_OK);
+ }
+ archive_set_error(&a->archive, errno, "Couldn't stat file");
+ return (ARCHIVE_WARN);
+}
+
static struct archive_vtable *
archive_write_disk_vtable(void)
{
@@ -294,7 +321,7 @@ _archive_write_header(struct archive *_a, struct archive_entry *entry)
archive_clear_error(&a->archive);
if (a->archive.state & ARCHIVE_STATE_DATA) {
r = _archive_write_finish_entry(&a->archive);
- if (r != ARCHIVE_OK)
+ if (r == ARCHIVE_FATAL)
return (r);
}
@@ -308,6 +335,7 @@ _archive_write_header(struct archive *_a, struct archive_entry *entry)
}
a->entry = archive_entry_clone(entry);
a->fd = -1;
+ a->last_offset = 0;
a->offset = 0;
a->uid = a->user_uid;
a->mode = archive_entry_mode(a->entry);
@@ -463,6 +491,7 @@ _archive_write_data_block(struct archive *_a,
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
ssize_t bytes_written = 0;
+ ssize_t block_size, bytes_to_write;
int r = ARCHIVE_OK;
__archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
@@ -473,31 +502,53 @@ _archive_write_data_block(struct archive *_a,
}
archive_clear_error(&a->archive);
- /* Seek if necessary to the specified offset. */
- if (offset != a->offset) {
- if (lseek(a->fd, offset, SEEK_SET) < 0) {
- archive_set_error(&a->archive, errno, "Seek failed");
- return (ARCHIVE_WARN);
- }
- a->offset = offset;
+ if (a->flags & ARCHIVE_EXTRACT_SPARSE) {
+ if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
+ return (r);
+ block_size = a->pst->st_blksize;
+ } else
+ block_size = -1;
+
+ if ((off_t)(offset + size) > a->filesize) {
+ size = (size_t)(a->filesize - a->offset);
+ archive_set_error(&a->archive, 0,
+ "Write request too large");
+ r = ARCHIVE_WARN;
}
/* Write the data. */
- while (size > 0 && a->offset < a->filesize) {
- if ((off_t)(a->offset + size) > a->filesize) {
- size = (size_t)(a->filesize - a->offset);
- archive_set_error(&a->archive, errno,
- "Write request too large");
- r = ARCHIVE_WARN;
- }
+ while (size > 0) {
+ if (block_size != -1) {
+ const char *buf;
+
+ for (buf = buff; size; ++buf, --size, ++offset) {
+ if (*buf != '\0')
+ break;
+ }
+ if (size == 0)
+ break;
+ bytes_to_write = block_size - offset % block_size;
+ buff = buf;
+ } else
+ bytes_to_write = size;
+ /* Seek if necessary to the specified offset. */
+ if (offset != a->last_offset) {
+ if (lseek(a->fd, offset, SEEK_SET) < 0) {
+ archive_set_error(&a->archive, errno, "Seek failed");
+ return (ARCHIVE_FATAL);
+ }
+ }
bytes_written = write(a->fd, buff, size);
if (bytes_written < 0) {
archive_set_error(&a->archive, errno, "Write failed");
return (ARCHIVE_WARN);
}
+ buff = (const char *)buff + bytes_written;
size -= bytes_written;
- a->offset += bytes_written;
+ offset += bytes_written;
+ a->last_offset = a->offset = offset;
}
+ a->offset = offset;
return (r);
}
@@ -505,7 +556,6 @@ static ssize_t
_archive_write_data(struct archive *_a, const void *buff, size_t size)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
- off_t offset;
int r;
__archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
@@ -513,11 +563,10 @@ _archive_write_data(struct archive *_a, const void *buff, size_t size)
if (a->fd < 0)
return (ARCHIVE_OK);
- offset = a->offset;
r = _archive_write_data_block(_a, buff, size, a->offset);
if (r < ARCHIVE_OK)
return (r);
- return (a->offset - offset);
+ return size;
}
static int
@@ -533,6 +582,34 @@ _archive_write_finish_entry(struct archive *_a)
return (ARCHIVE_OK);
archive_clear_error(&a->archive);
+ if (a->last_offset != a->filesize && a->fd >= 0) {
+ if (ftruncate(a->fd, a->filesize) == -1 &&
+ a->filesize == 0) {
+ archive_set_error(&a->archive, errno,
+ "File size could not be restored");
+ return (ARCHIVE_FAILED);
+ }
+ /*
+ * Explicitly stat the file as some platforms might not
+ * implement the XSI option to extend files via ftruncate.
+ */
+ a->pst = NULL;
+ if ((ret = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
+ return (ret);
+ if (a->st.st_size != a->filesize) {
+ const char nul = '\0';
+ if (lseek(a->fd, a->st.st_size - 1, SEEK_SET) < 0) {
+ archive_set_error(&a->archive, errno, "Seek failed");
+ return (ARCHIVE_FATAL);
+ }
+ if (write(a->fd, &nul, 1) < 0) {
+ archive_set_error(&a->archive, errno,
+ "Write to restore size failed");
+ return (ARCHIVE_FATAL);
+ }
+ }
+ }
+
/* Restore metadata. */
/*
@@ -723,11 +800,13 @@ restore_entry(struct archive_write_disk *a)
* object isn't a dir.
*/
if (unlink(a->name) == 0) {
- /* We removed it, we're done. */
+ /* We removed it, reset cached stat. */
+ a->pst = NULL;
} else if (errno == ENOENT) {
/* File didn't exist, that's just as good. */
} else if (rmdir(a->name) == 0) {
/* It was a dir, but now it's gone. */
+ a->pst = NULL;
} else {
/* We tried, but couldn't get rid of it. */
archive_set_error(&a->archive, errno,
@@ -768,6 +847,7 @@ restore_entry(struct archive_write_disk *a)
"Can't remove already-existing dir");
return (ARCHIVE_WARN);
}
+ a->pst = NULL;
/* Try again. */
en = create_filesystem_object(a);
} else if (en == EEXIST) {
@@ -807,6 +887,7 @@ restore_entry(struct archive_write_disk *a)
"Can't unlink already-existing object");
return (ARCHIVE_WARN);
}
+ a->pst = NULL;
/* Try again. */
en = create_filesystem_object(a);
} else if (!S_ISDIR(a->mode)) {
@@ -866,8 +947,18 @@ create_filesystem_object(struct archive_write_disk *a)
* New cpio and pax formats allow hardlink entries
* to carry data, so we may have to open the file
* for hardlink entries.
+ *
+ * If the hardlink was successfully created and
+ * the archive doesn't have carry data for it,
+ * consider it to be non-authoritive for meta data.
+ * This is consistent with GNU tar and BSD pax.
+ * If the hardlink does carry data, let the last
+ * archive entry decide ownership.
*/
- if (r == 0 && a->filesize > 0) {
+ if (r == 0 && a->filesize == 0) {
+ a->todo = 0;
+ a->deferred = 0;
+ } if (r == 0 && a->filesize > 0) {
a->fd = open(a->name, O_WRONLY | O_TRUNC | O_BINARY);
if (a->fd < 0)
r = errno;
@@ -1203,6 +1294,7 @@ check_symlinks(struct archive_write_disk *a)
pn[0] = c;
return (ARCHIVE_WARN);
}
+ a->pst = NULL;
/*
* Even if we did remove it, a warning
* is in order. The warning is silly,
@@ -1226,6 +1318,7 @@ check_symlinks(struct archive_write_disk *a)
pn[0] = c;
return (ARCHIVE_WARN);
}
+ a->pst = NULL;
} else {
archive_set_error(&a->archive, 0,
"Cannot extract through symlink %s",
@@ -1608,19 +1701,8 @@ set_mode(struct archive_write_disk *a, int mode)
* process, since systems sometimes set GID from
* the enclosing dir or based on ACLs.
*/
- if (a->pst != NULL) {
- /* Already have stat() data available. */
-#ifdef HAVE_FSTAT
- } else if (a->fd >= 0 && fstat(a->fd, &a->st) == 0) {
- a->pst = &a->st;
-#endif
- } else if (stat(a->name, &a->st) == 0) {
- a->pst = &a->st;
- } else {
- archive_set_error(&a->archive, errno,
- "Couldn't stat file");
- return (ARCHIVE_WARN);
- }
+ if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
+ return (r);
if (a->pst->st_gid != a->gid) {
mode &= ~ S_ISGID;
if (a->flags & ARCHIVE_EXTRACT_OWNER) {
@@ -1783,6 +1865,8 @@ static int
set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
mode_t mode, unsigned long set, unsigned long clear)
{
+ int r;
+
(void)mode; /* UNUSED */
if (set == 0 && clear == 0)
return (ARCHIVE_OK);
@@ -1793,15 +1877,8 @@ set_fflags_platform(struct archive_write_disk *a, int fd, const char *name,
* about the correct approach if we're overwriting an existing
* file that already has flags on it. XXX
*/
- if (fd >= 0 && fstat(fd, &a->st) == 0)
- a->pst = &a->st;
- else if (lstat(name, &a->st) == 0)
- a->pst = &a->st;
- else {
- archive_set_error(&a->archive, errno,
- "Couldn't stat file");
- return (ARCHIVE_WARN);
- }
+ if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK)
+ return (r);
a->st.st_flags &= ~clear;
a->st.st_flags |= set;
diff --git a/archivers/libarchive/files/libarchive/archive_write_set_compression_program.c b/archivers/libarchive/files/libarchive/archive_write_set_compression_program.c
index fc1481dbcd9..b8b20c86cf9 100644
--- a/archivers/libarchive/files/libarchive/archive_write_set_compression_program.c
+++ b/archivers/libarchive/files/libarchive/archive_write_set_compression_program.c
@@ -27,6 +27,23 @@
__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_set_compression_program.c,v 1.1 2007/05/29 01:00:19 kientzle Exp $");
+/* This capability is only available on POSIX systems. */
+#if !defined(HAVE_PIPE) || !defined(HAVE_VFORK) || !defined(HAVE_FCNTL)
+
+/*
+ * On non-Posix systems, allow the program to build, but choke if
+ * this function is actually invoked.
+ */
+int
+archive_write_set_compression_program(struct archive *_a, const char *cmd)
+{
+ archive_set_error(_a, -1,
+ "External compression programs not supported on this platform");
+ return (ARCHIVE_FATAL);
+}
+
+#else
+
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
@@ -320,3 +337,5 @@ cleanup:
free(state);
return (ret);
}
+
+#endif /* !defined(HAVE_PIPE) || !defined(HAVE_VFORK) || !defined(HAVE_FCNTL) */
diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c b/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c
index 313d0b390f9..1731844d339 100644
--- a/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c
+++ b/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c
@@ -142,12 +142,15 @@ archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
struct ar_w *ar;
const char *pathname;
const char *filename;
+ int64_t size;
ret = 0;
append_fn = 0;
ar = (struct ar_w *)a->format_data;
ar->is_strtab = 0;
filename = NULL;
+ size = archive_entry_size(entry);
+
/*
* Reject files with empty name.
@@ -285,8 +288,7 @@ archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
return (ARCHIVE_WARN);
}
append_fn = 1;
- archive_entry_set_size(entry,
- archive_entry_size(entry) + strlen(filename));
+ size += strlen(filename);
}
}
@@ -322,8 +324,7 @@ stat:
}
size:
- if (format_decimal(archive_entry_size(entry), buff + AR_size_offset,
- AR_size_size)) {
+ if (format_decimal(size, buff + AR_size_offset, AR_size_size)) {
archive_set_error(&a->archive, ERANGE,
"File size out of range");
return (ARCHIVE_WARN);
@@ -333,7 +334,7 @@ size:
if (ret != ARCHIVE_OK)
return (ret);
- ar->entry_bytes_remaining = archive_entry_size(entry);
+ ar->entry_bytes_remaining = size;
ar->entry_padding = ar->entry_bytes_remaining % 2;
if (append_fn > 0) {
diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c b/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c
index 585989fd79b..89f89bc9f54 100644
--- a/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c
+++ b/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c
@@ -386,7 +386,7 @@ archive_write_pax_header(struct archive_write *a,
const char *p;
char *t;
const wchar_t *wp;
- const char *suffix_start;
+ const char *suffix;
int need_extension, r, ret;
struct pax *pax;
const char *hdrcharset = NULL;
@@ -508,35 +508,60 @@ archive_write_pax_header(struct archive_write *a,
add_pax_attr_w(&(pax->pax_header), "path", path_w);
archive_entry_set_pathname(entry_main, "@WidePath");
need_extension = 1;
- } else {
- /* We have a narrow path; we first need to decide
- * if we can just put it in the ustar header. */
- suffix_start = path; /* Start with a zero-length prefix. */
- if (strlen(path) > 100) {
- /* Find largest suffix that will fit. */
- suffix_start = strchr(path + strlen(path) - 100 - 1, '/');
+ } else if (has_non_ASCII(path_w)) {
+ /* We have non-ASCII characters. */
+ if (path_w == NULL || hdrcharset != NULL) {
+ /* Can't do UTF-8, so store it raw. */
+ add_pax_attr(&(pax->pax_header), "path", path);
+ } else {
+ /* Store UTF-8 */
+ add_pax_attr_w(&(pax->pax_header),
+ "path", path_w);
}
- /* We can put it in the ustar header if it's all ASCII
- * and it's either <= 100 characters or can be split at a
- * '/' into a prefix <= 155 chars and a suffix <= 100 chars.
- * (Note the strchr() above will return NULL exactly when
- * the path can't be split.)
+ archive_entry_set_pathname(entry_main,
+ build_ustar_entry_name(ustar_entry_name,
+ path, strlen(path), NULL));
+ need_extension = 1;
+ } else {
+ /* We have an all-ASCII path; we'd like to just store
+ * it in the ustar header if it will fit. Yes, this
+ * duplicates some of the logic in
+ * write_set_format_ustar.c
*/
- if (has_non_ASCII(path_w) || suffix_start == NULL
- || suffix_start - path > 155) {
- /* Path is either too long or has non-ASCII chars. */
- if (path_w == NULL || hdrcharset != NULL) {
- /* Can't do UTF-8, so store it raw. */
- add_pax_attr(&(pax->pax_header), "path", path);
- } else {
- /* Store UTF-8 */
- add_pax_attr_w(&(pax->pax_header),
- "path", path_w);
+ if (strlen(path) <= 100) {
+ /* Fits in the old 100-char tar name field. */
+ } else {
+ /* Find largest suffix that will fit. */
+ /* Note: strlen() > 100, so strlen() - 100 - 1 >= 0 */
+ suffix = strchr(path + strlen(path) - 100 - 1, '/');
+ /* Don't attempt an empty prefix. */
+ if (suffix == path)
+ suffix = strchr(suffix + 1, '/');
+ /* We can put it in the ustar header if it's
+ * all ASCII and it's either <= 100 characters
+ * or can be split at a '/' into a prefix <=
+ * 155 chars and a suffix <= 100 chars. (Note
+ * the strchr() above will return NULL exactly
+ * when the path can't be split.)
+ */
+ if (suffix == NULL /* Suffix > 100 chars. */
+ || suffix[1] == '\0' /* empty suffix */
+ || suffix - path > 155) /* Prefix > 155 chars */
+ {
+ if (path_w == NULL || hdrcharset != NULL) {
+ /* Can't do UTF-8, so store it raw. */
+ add_pax_attr(&(pax->pax_header),
+ "path", path);
+ } else {
+ /* Store UTF-8 */
+ add_pax_attr_w(&(pax->pax_header),
+ "path", path_w);
+ }
+ archive_entry_set_pathname(entry_main,
+ build_ustar_entry_name(ustar_entry_name,
+ path, strlen(path), NULL));
+ need_extension = 1;
}
- archive_entry_set_pathname(entry_main,
- build_ustar_entry_name(ustar_entry_name,
- path, strlen(path), NULL));
- need_extension = 1;
}
}
diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c b/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c
index c2c0011aee2..970fee8db1b 100644
--- a/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c
+++ b/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c
@@ -195,7 +195,7 @@ static int
archive_write_ustar_header(struct archive_write *a, struct archive_entry *entry)
{
char buff[512];
- int ret;
+ int ret, ret2;
struct ustar *ustar;
ustar = (struct ustar *)a->format_data;
@@ -206,7 +206,7 @@ archive_write_ustar_header(struct archive_write *a, struct archive_entry *entry)
!(archive_entry_filetype(entry) == AE_IFREG))
archive_entry_set_size(entry, 0);
- if (AE_IFDIR == archive_entry_mode(entry)) {
+ if (AE_IFDIR == archive_entry_filetype(entry)) {
const char *p;
char *t;
/*
@@ -229,15 +229,17 @@ archive_write_ustar_header(struct archive_write *a, struct archive_entry *entry)
}
ret = __archive_write_format_header_ustar(a, buff, entry, -1, 1);
- if (ret != ARCHIVE_OK)
- return (ret);
- ret = (a->compressor.write)(a, buff, 512);
- if (ret != ARCHIVE_OK)
+ if (ret < ARCHIVE_WARN)
return (ret);
+ ret2 = (a->compressor.write)(a, buff, 512);
+ if (ret2 < ARCHIVE_WARN)
+ return (ret2);
+ if (ret2 < ret)
+ ret = ret2;
ustar->entry_bytes_remaining = archive_entry_size(entry);
ustar->entry_padding = 0x1ff & (-(int64_t)ustar->entry_bytes_remaining);
- return (ARCHIVE_OK);
+ return (ret);
}
/*
@@ -282,27 +284,33 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512],
/* Store in two pieces, splitting at a '/'. */
p = strchr(pp + strlen(pp) - USTAR_name_size - 1, '/');
/*
- * If the separator we found is the first '/', find
- * the next one. (This is a pathological case that
- * occurs for paths of exactly 101 bytes that start with
- * '/'; it occurs because the separating '/' is not
- * stored explicitly and the reconstruction assumes that
- * an empty prefix means there is no '/' separator.)
+ * Look for the next '/' if we chose the first character
+ * as the separator. (ustar format doesn't permit
+ * an empty prefix.)
*/
if (p == pp)
p = strchr(p + 1, '/');
- /*
- * If there is no path separator, or the prefix or
- * remaining name are too large, return an error.
- */
+ /* Fail if the name won't fit. */
if (!p) {
+ /* No separator. */
+ archive_set_error(&a->archive, ENAMETOOLONG,
+ "Pathname too long");
+ ret = ARCHIVE_FAILED;
+ } else if (p[1] == '\0') {
+ /*
+ * The only feasible separator is a final '/';
+ * this would result in a non-empty prefix and
+ * an empty name, which POSIX doesn't
+ * explicity forbid, but it just feels wrong.
+ */
archive_set_error(&a->archive, ENAMETOOLONG,
"Pathname too long");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
} else if (p > pp + USTAR_prefix_size) {
+ /* Prefix is too long. */
archive_set_error(&a->archive, ENAMETOOLONG,
"Pathname too long");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
} else {
/* Copy prefix and remainder to appropriate places */
memcpy(h + USTAR_prefix_offset, pp, p - pp);
@@ -320,7 +328,7 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512],
if (copy_length > USTAR_linkname_size) {
archive_set_error(&a->archive, ENAMETOOLONG,
"Link contents too long");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
copy_length = USTAR_linkname_size;
}
memcpy(h + USTAR_linkname_offset, p, copy_length);
@@ -332,7 +340,7 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512],
if (copy_length > USTAR_uname_size) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Username too long");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
copy_length = USTAR_uname_size;
}
memcpy(h + USTAR_uname_offset, p, copy_length);
@@ -344,7 +352,7 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512],
if (strlen(p) > USTAR_gname_size) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
"Group name too long");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
copy_length = USTAR_gname_size;
}
memcpy(h + USTAR_gname_offset, p, copy_length);
@@ -352,28 +360,28 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512],
if (format_number(archive_entry_mode(entry) & 07777, h + USTAR_mode_offset, USTAR_mode_size, USTAR_mode_max_size, strict)) {
archive_set_error(&a->archive, ERANGE, "Numeric mode too large");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
}
if (format_number(archive_entry_uid(entry), h + USTAR_uid_offset, USTAR_uid_size, USTAR_uid_max_size, strict)) {
archive_set_error(&a->archive, ERANGE, "Numeric user ID too large");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
}
if (format_number(archive_entry_gid(entry), h + USTAR_gid_offset, USTAR_gid_size, USTAR_gid_max_size, strict)) {
archive_set_error(&a->archive, ERANGE, "Numeric group ID too large");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
}
if (format_number(archive_entry_size(entry), h + USTAR_size_offset, USTAR_size_size, USTAR_size_max_size, strict)) {
archive_set_error(&a->archive, ERANGE, "File size out of range");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
}
if (format_number(archive_entry_mtime(entry), h + USTAR_mtime_offset, USTAR_mtime_size, USTAR_mtime_max_size, strict)) {
archive_set_error(&a->archive, ERANGE,
"File modification time too large");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
}
if (archive_entry_filetype(entry) == AE_IFBLK
@@ -382,14 +390,14 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512],
USTAR_rdevmajor_size, USTAR_rdevmajor_max_size, strict)) {
archive_set_error(&a->archive, ERANGE,
"Major device number too large");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
}
if (format_number(archive_entry_rdevminor(entry), h + USTAR_rdevminor_offset,
USTAR_rdevminor_size, USTAR_rdevminor_max_size, strict)) {
archive_set_error(&a->archive, ERANGE,
"Minor device number too large");
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
}
}
@@ -409,7 +417,7 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512],
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"tar format cannot archive this (mode=0%lo)",
(unsigned long)archive_entry_mode(entry));
- ret = ARCHIVE_WARN;
+ ret = ARCHIVE_FAILED;
}
}
diff --git a/archivers/libarchive/files/libarchive/config_freebsd.h b/archivers/libarchive/files/libarchive/config_freebsd.h
index 97127a19be8..3d5e821612f 100644
--- a/archivers/libarchive/files/libarchive/config_freebsd.h
+++ b/archivers/libarchive/files/libarchive/config_freebsd.h
@@ -51,6 +51,7 @@
#define HAVE_FCHFLAGS 1
#define HAVE_FCHMOD 1
#define HAVE_FCHOWN 1
+#define HAVE_FCNTL 1
#define HAVE_FCNTL_H 1
#define HAVE_FSEEKO 1
#define HAVE_FSTAT 1
@@ -70,6 +71,7 @@
#define HAVE_MKDIR 1
#define HAVE_MKFIFO 1
#define HAVE_MKNOD 1
+#define HAVE_PIPE 1
#define HAVE_POLL 1
#define HAVE_POLL_H 1
#define HAVE_PWD_H 1
@@ -102,6 +104,7 @@
#define HAVE_UTIME 1
#define HAVE_UTIMES 1
#define HAVE_UTIME_H 1
+#define HAVE_VFORK 1
#define HAVE_WCHAR_H 1
#define HAVE_WCSCPY 1
#define HAVE_WCSLEN 1
diff --git a/archivers/libarchive/files/libarchive/config_windows.h b/archivers/libarchive/files/libarchive/config_windows.h
index 64eb15f3317..0ccb2f1b166 100644
--- a/archivers/libarchive/files/libarchive/config_windows.h
+++ b/archivers/libarchive/files/libarchive/config_windows.h
@@ -1,510 +1,688 @@
-/* config.h. Generated from config.h.in by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-#ifndef CONFIG_H_INCLUDED
-#define CONFIG_H_INCLUDED
-
-/* Version number of bsdcpio */
-#define BSDCPIO_VERSION_STRING "0.9.9"
-
-/* Version number of bsdtar */
-#define BSDTAR_VERSION_STRING "2.5.0"
-
-/* Define to 1 if you have the `acl_create_entry' function. */
-/* #undef HAVE_ACL_CREATE_ENTRY */
-
-/* Define to 1 if you have the `acl_get_perm' function. */
-/* #undef HAVE_ACL_GET_PERM */
-
-/* Define to 1 if you have the `acl_get_perm_np' function. */
-/* #undef HAVE_ACL_GET_PERM_NP */
-
-/* Define to 1 if you have the `acl_init' function. */
-/* #undef HAVE_ACL_INIT */
-
-/* Define to 1 if the system has the type `acl_permset_t'. */
-/* #undef HAVE_ACL_PERMSET_T */
-
-/* Define to 1 if you have the `acl_set_fd' function. */
-/* #undef HAVE_ACL_SET_FD */
-
-/* Define to 1 if you have the `acl_set_fd_np' function. */
-/* #undef HAVE_ACL_SET_FD_NP */
-
-/* Define to 1 if you have the `acl_set_file' function. */
-/* #undef HAVE_ACL_SET_FILE */
-
-/* True for systems with POSIX ACL support */
-/* #undef HAVE_ACL_USER */
-
-/* Define to 1 if you have the <attr/xattr.h> header file. */
-/* #undef HAVE_ATTR_XATTR_H */
-
-/* Define to 1 if you have the <bzlib.h> header file. */
-/* #undef HAVE_BZLIB_H */
-
-/* Define to 1 if you have the `chflags' function. */
-/* #undef HAVE_CHFLAGS */
-
-/* Define to 1 if you have the `chown' function. */
-/* #undef HAVE_CHOWN */
-
-/* Define to 1 if you have the declaration of `INT64_MAX', and to 0 if you
- don't. */
-/* #undef HAVE_DECL_INT64_MAX */
-
-/* Define to 1 if you have the declaration of `INT64_MIN', and to 0 if you
- don't. */
-/* #undef HAVE_DECL_INT64_MIN */
-
-/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
- */
-/* #undef HAVE_DECL_OPTARG */
-
-/* Define to 1 if you have the declaration of `optind', and to 0 if you don't.
- */
-/* #undef HAVE_DECL_OPTIND */
-
-/* Define to 1 if you have the declaration of `SIZE_MAX', and to 0 if you
- don't. */
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#define HAVE_DECL_SIZE_MAX 1
-#else
-/* #undef HAVE_DECL_SIZE_MAX */
-#endif
-
-/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
- don't. */
-/* #undef HAVE_DECL_STRERROR_R */
-
-/* Define to 1 if you have the declaration of `UINT32_MAX', and to 0 if you
- don't. */
-/* #undef HAVE_DECL_UINT32_MAX */
-
-/* Define to 1 if you have the declaration of `UINT64_MAX', and to 0 if you
- don't. */
-/* #undef HAVE_DECL_UINT64_MAX */
-
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_DIRENT_H */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-/* #undef HAVE_DOPRNT */
-
-/* Define to 1 if nl_langinfo supports D_MD_ORDER */
-/* #undef HAVE_D_MD_ORDER */
-
-/* A possible errno value for invalid file format errors */
-#define HAVE_EFTYPE 1
-
-/* A possible errno value for invalid file format errors */
-#define HAVE_EILSEQ 1
-
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if you have the <ext2fs/ext2_fs.h> header file. */
-/* #undef HAVE_EXT2FS_EXT2_FS_H */
-
-/* Define to 1 if you have the `fchdir' function. */
-/* #undef HAVE_FCHDIR */
-
-/* Define to 1 if you have the `fchflags' function. */
-/* #undef HAVE_FCHFLAGS */
-
-/* Define to 1 if you have the `fchmod' function. */
-/* #undef HAVE_FCHMOD */
-
-/* Define to 1 if you have the `fchown' function. */
-/* #undef HAVE_FCHOWN */
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define to 1 if your system has a working POSIX `fnmatch' function. */
-/* #undef HAVE_FNMATCH */
-
-/* Define to 1 if fnmatch(3) supports the FNM_LEADING_DIR flag */
-/* #undef HAVE_FNM_LEADING_DIR */
-
-/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
-/* #undef HAVE_FSEEKO */
-
-/* Define to 1 if you have the `fsetxattr' function. */
-/* #undef HAVE_FSETXATTR */
-
-/* Define to 1 if you have the `ftruncate' function. */
-/* #undef HAVE_FTRUNCATE */
-
-/* Define to 1 if you have the `futimes' function. */
-/* #undef HAVE_FUTIMES */
-
-/* Define to 1 if you have the `geteuid' function. */
-/* #undef HAVE_GETEUID */
-
-/* Define to 1 if you have the `getopt_long' function. */
-/* #undef HAVE_GETOPT_LONG */
-
-/* Define to 1 if you have the `getxattr' function. */
-/* #undef HAVE_GETXATTR */
-
-/* Define to 1 if you have the <grp.h> header file. */
-/* #undef HAVE_GRP_H */
-
-/* Define to 1 if the system has the type `intmax_t'. */
-/* #undef HAVE_INTMAX_T */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-/* #undef HAVE_INTTYPES_H */
-
-/* Define to 1 if you have the <langinfo.h> header file. */
-/* #undef HAVE_LANGINFO_H */
-
-/* Define to 1 if you have the `lchflags' function. */
-/* #undef HAVE_LCHFLAGS */
-
-/* Define to 1 if you have the `lchmod' function. */
-/* #undef HAVE_LCHMOD */
-
-/* Define to 1 if you have the `lchown' function. */
-/* #undef HAVE_LCHOWN */
-
-/* Define to 1 if you have the `lgetxattr' function. */
-/* #undef HAVE_LGETXATTR */
-
-/* Define to 1 if you have the `acl' library (-lacl). */
-/* #undef HAVE_LIBACL */
-
-/* Define to 1 if you have the `attr' library (-lattr). */
-/* #undef HAVE_LIBATTR */
-
-/* Define to 1 if you have the `bz2' library (-lbz2). */
-/* #undef HAVE_LIBBZ2 */
-
-/* Define to 1 if you have the `z' library (-lz). */
-/* #undef HAVE_LIBZ */
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* 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 */
-
-/* Define to 1 if you have the `llistxattr' function. */
-/* #undef HAVE_LLISTXATTR */
-
-/* Define to 1 if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define to 1 if the system has the type `long long int'. */
-#define HAVE_LONG_LONG_INT 1
-
-/* Define to 1 if you have the `lsetxattr' function. */
-/* #undef HAVE_LSETXATTR */
-
-/* Define to 1 if `lstat' has the bug that it succeeds when given the
- zero-length file name argument. */
-/* #undef HAVE_LSTAT_EMPTY_STRING_BUG */
-
-/* Define to 1 if you have the `lutimes' function. */
-/* #undef HAVE_LUTIMES */
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `memset' function. */
-#define HAVE_MEMSET 1
-
-/* Define to 1 if you have the `mkdir' function. */
-#define HAVE_MKDIR 1
-
-/* Define to 1 if you have the `mkfifo' function. */
-/* #undef HAVE_MKFIFO */
-
-/* Define to 1 if you have the `mknod' function. */
-/* #undef HAVE_MKNOD */
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-/* #undef HAVE_NDIR_H */
-
-/* Define to 1 if you have the `nl_langinfo' function. */
-/* #undef HAVE_NL_LANGINFO */
-
-/* Define to 1 if you have the <paths.h> header file. */
-/* #undef HAVE_PATHS_H */
-
-/* Define to 1 if you have the `poll' function. */
-/* #undef HAVE_POLL */
-
-/* Define to 1 if you have the <poll.h> header file. */
-/* #undef HAVE_POLL_H */
-
-/* Define to 1 if you have the <pwd.sh.h> header file. */
-/* #undef HAVE_PWD_H */
-
-/* Define to 1 if you have the `select' function. */
-/* #undef HAVE_SELECT */
-
-/* Define to 1 if you have the `setlocale' function. */
-#define HAVE_SETLOCALE 1
-
-/* Define to 1 if `stat' has the bug that it succeeds when given the
- 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. */
-/* #undef HAVE_STDINT_H */
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strchr' function. */
-#define HAVE_STRCHR 1
-
-/* Define to 1 if you have the `strdup' function. */
-#define HAVE_STRDUP 1
-
-/* Define to 1 if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
-/* Define to 1 if you have the `strerror_r' function. */
-/* #undef HAVE_STRERROR_R */
-
-/* Define to 1 if you have the `strftime' function. */
-#define HAVE_STRFTIME 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strrchr' function. */
-#define HAVE_STRRCHR 1
-
-/* Define to 1 if `st_mtimespec.tv_nsec' is member of `struct stat'. */
-/* #undef HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC */
-
-/* Define to 1 if `st_mtim.tv_nsec' is member of `struct stat'. */
-/* #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */
-
-/* Define to 1 if `st_rdev' is member of `struct stat'. */
-#define HAVE_STRUCT_STAT_ST_RDEV 1
-
-/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */
-/* #undef HAVE_STRUCT_TM_TM_GMTOFF */
-
-/* Define to 1 if you have the <sys/acl.h> header file. */
-/* #undef HAVE_SYS_ACL_H */
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-/* #undef HAVE_SYS_IOCTL_H */
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
- */
-/* #undef HAVE_SYS_NDIR_H */
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-/* #undef HAVE_SYS_PARAM_H */
-
-/* Define to 1 if you have the <sys/poll.h> header file. */
-/* #undef HAVE_SYS_POLL_H */
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-/* #undef HAVE_SYS_SELECT_H */
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-/* #undef HAVE_SYS_TIME_H */
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <sys/utime.h> header file. */
-#define HAVE_SYS_UTIME_H 1
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-/* #undef HAVE_SYS_WAIT_H */
-
-/* Define to 1 if you have the `timegm' function. */
-/* #undef HAVE_TIMEGM */
-
-/* Define to 1 if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
-/* Define to 1 if the system has the type `uintmax_t'. */
-/* #undef HAVE_UINTMAX_T */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-/* #undef HAVE_UNISTD_H */
-
-/* Define to 1 if the system has the type `unsigned long long'. */
-#define HAVE_UNSIGNED_LONG_LONG 1
-
-/* Define to 1 if the system has the type `unsigned long long int'. */
-#define HAVE_UNSIGNED_LONG_LONG_INT 1
-
-/* Define to 1 if you have the `utime' function. */
-#define HAVE_UTIME 1
-
-/* Define to 1 if you have the `utimes' function. */
-/* #undef HAVE_UTIMES */
-
-/* Define to 1 if you have the <utime.h> header file. */
-/* #undef HAVE_UTIME_H */
-
-/* Define to 1 if you have the `vprintf' function. */
-#define HAVE_VPRINTF 1
-
-/* Define to 1 if you have the <wchar.h> header file. */
-#define HAVE_WCHAR_H 1
-
-/* Define to 1 if you have the `wcscpy' function. */
-#define HAVE_WCSCPY 1
-
-/* Define to 1 if you have the `wcslen' function. */
-#define HAVE_WCSLEN 1
-
-/* Define to 1 if you have the `wmemcmp' function. */
-/* #undef HAVE_WMEMCMP */
-
-/* Define to 1 if you have the `wmemcpy' function. */
-/* #undef HAVE_WMEMCPY */
-
-/* Define to 1 if you have the <zlib.h> header file. */
-/* #undef HAVE_ZLIB_H */
-
-/* Version number of libarchive as a single integer */
-#define LIBARCHIVE_VERSION_NUMBER "2005000"
-
-/* Version number of libarchive */
-#define LIBARCHIVE_VERSION_STRING "2.5.0b"
-
-/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
- slash. */
-/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
-
-/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
- */
-/* #undef MAJOR_IN_MKDEV */
-
-/* Define to 1 if `major', `minor', and `makedev' are declared in
- <sysmacros.h>. */
-/* #undef MAJOR_IN_SYSMACROS */
-
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-/* #undef NO_MINUS_C_MINUS_O */
-
-/* Name of package */
-#define PACKAGE "libarchive"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "kientzle@freebsd.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "libarchive"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libarchive 2.4.12"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "libarchive"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.4.12"
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to 1 if strerror_r returns char *. */
-/* #undef STRERROR_R_CHAR_P */
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
-
-/* Version number of package */
-#define VERSION "2.4.12"
-
-/* 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 */
-
-/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
- <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
- #define below would cause a syntax error. */
-/* #undef _UINT64_T */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#define gid_t int
-
-/* Define to `unsigned long' if <sys/types.h> does not define. */
-#define id_t int
-
-/* Define to the type of a signed integer type of width exactly 64 bits if
- such a type exists and the standard includes do not define it. */
-#define int64_t long long
-
-/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
- not define. */
-#define intmax_t long long
-
-/* Define to `int' if <sys/types.h> does not define. */
-#define mode_t unsigned short
-
-/* Define to `long long' if <sys/types.h> does not define. */
-/* #undef off_t */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#define uid_t int
-
-/* Define to the type of an unsigned integer type of width exactly 64 bits if
- such a type exists and the standard includes do not define it. */
-#define uint64_t unsigned long long
-
-/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
- do not define. */
-#define uintmax_t unsigned long long
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef uintptr_t */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#define pid_t unsigned int
-
-#define uint32_t unsigned long
-#define uint16_t unsigned short
-#define ssize_t long
-
-#endif /* CONFIG_H_INCLUDED */
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+#ifndef CONFIG_H_INCLUDED
+#define CONFIG_H_INCLUDED
+
+
+///////////////////////////////////////////////////////////////////////////
+// Check for Watcom and Microsoft Visual C compilers (WIN32 only) ///////
+///////////////////////////////////////////////////////////////////////////
+#if defined(__WIN32__) || defined(_WIN32) || defined(__WIN32)
+ #define IS_WIN32 1
+
+ #if defined(__TURBOC__) || defined(__BORLANDC__) /* Borland compilers */
+ #elif defined( __WATCOMC__ ) || defined(__WATCOMCPP__) /* Watcom compilers */
+ #define IS_WATCOM 1
+ /* Define to 1 if __INT64 is defined */
+ #define HAVE___INT64 1
+
+ /* Define to 1 if UID should be unsigned */
+ #define USE_UNSIGNED_UID 1
+
+ /* Define to 1 if UID should be unsigned */
+ #define USE_UNSIGNED_GID 1
+
+ #elif defined(__IBMC__) || defined(__IBMCPP__) /* IBM compilers */
+ #elif defined( __SC__ ) /* Symantec C++ compilers */
+ #elif defined( M_I86 ) && defined( MSDOS ) /* Microsoft DOS/Win 16 compilers */
+ #elif defined( _M_IX86 ) || defined( _68K_ ) /* Microsoft Win32 compilers */
+ #define IS_VISUALC 1
+ /* Define to 1 if __INT64 is defined */
+ #define HAVE___INT64 1
+ #else
+ #endif
+
+#endif
+///////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////
+
+/* Define to 1 if you have the `acl_create_entry' function. */
+/* #undef HAVE_ACL_CREATE_ENTRY */
+
+/* Define to 1 if you have the `acl_get_perm' function. */
+/* #undef HAVE_ACL_GET_PERM */
+
+/* Define to 1 if you have the `acl_get_perm_np' function. */
+/* #undef HAVE_ACL_GET_PERM_NP */
+
+/* Define to 1 if you have the `acl_init' function. */
+/* #undef HAVE_ACL_INIT */
+
+/* Define to 1 if the system has the type `acl_permset_t'. */
+/* #undef HAVE_ACL_PERMSET_T */
+
+/* Define to 1 if you have the `acl_set_fd' function. */
+/* #undef HAVE_ACL_SET_FD */
+
+/* Define to 1 if you have the `acl_set_fd_np' function. */
+/* #undef HAVE_ACL_SET_FD_NP */
+
+/* Define to 1 if you have the `acl_set_file' function. */
+/* #undef HAVE_ACL_SET_FILE */
+
+/* True for systems with POSIX ACL support */
+/* #undef HAVE_ACL_USER */
+
+/* Define to 1 if you have the <attr/xattr.h> header file. */
+/* #undef HAVE_ATTR_XATTR_H */
+
+/* Define to 1 if you have the <bzlib.h> header file. */
+/* #undef HAVE_BZLIB_H */
+
+/* Define to 1 if you have the `chflags' function. */
+/* #undef HAVE_CHFLAGS */
+
+/* Define to 1 if you have the `chown' function. */
+/* #undef HAVE_CHOWN */
+
+/* Define to 1 if you have the declaration of `INT64_MAX', and to 0 if you
+ don't. */
+/* #undef HAVE_DECL_INT64_MAX */
+
+/* Define to 1 if you have the declaration of `INT64_MIN', and to 0 if you
+ don't. */
+/* #undef HAVE_DECL_INT64_MIN */
+
+/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
+ */
+/* #undef HAVE_DECL_OPTARG */
+
+/* Define to 1 if you have the declaration of `optind', and to 0 if you don't.
+ */
+/* #undef HAVE_DECL_OPTIND */
+
+/* Define to 1 if you have the declaration of `SIZE_MAX', and to 0 if you
+ don't. */
+/* #undef HAVE_DECL_SIZE_MAX */
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+#define HAVE_DECL_SIZE_MAX 1
+#endif
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+ don't. */
+/* #undef HAVE_DECL_STRERROR_R */
+
+/* Define to 1 if you have the declaration of `UINT32_MAX', and to 0 if you
+ don't. */
+/* #undef HAVE_DECL_UINT32_MAX */
+
+/* Define to 1 if you have the declaration of `UINT64_MAX', and to 0 if you
+ don't. */
+/* #undef HAVE_DECL_UINT64_MAX */
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_DIRENT_H */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #undef HAVE_DLFCN_H */
+
+/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
+/* #undef HAVE_DOPRNT */
+
+/* Define to 1 if nl_langinfo supports D_MD_ORDER */
+/* #undef HAVE_D_MD_ORDER */
+
+/* A possible errno value for invalid file format errors */
+#if ((IS_WATCOM) || (IS_VISUALC))
+#define HAVE_EFTYPE 0
+#else
+#define HAVE_EFTYPE 1
+#endif
+
+/* A possible errno value for invalid file format errors */
+#define HAVE_EILSEQ 1
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <ext2fs/ext2_fs.h> header file. */
+/* #undef HAVE_EXT2FS_EXT2_FS_H */
+
+/* Define to 1 if you have the `fchdir' function. */
+/* #undef HAVE_FCHDIR */
+
+/* Define to 1 if you have the `fchflags' function. */
+/* #undef HAVE_FCHFLAGS */
+
+/* Define to 1 if you have the `fchmod' function. */
+/* #undef HAVE_FCHMOD */
+
+/* Define to 1 if you have the `fchown' function. */
+/* #undef HAVE_FCHOWN */
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+/* #undef HAVE_FCNTL_H 1 */
+
+/* Define to 1 if you have the fcntl() function. */
+/* #undef HAVE_FCNTL_FN */
+
+/* Define to 1 if your system has a working POSIX `fnmatch' function. */
+/* #undef HAVE_FNMATCH */
+
+/* Define to 1 if fnmatch(3) supports the FNM_LEADING_DIR flag */
+/* #undef HAVE_FNM_LEADING_DIR */
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+/* #undef HAVE_FSEEKO */
+
+/* Define to 1 if you have the `fsetxattr' function. */
+/* #undef HAVE_FSETXATTR */
+
+/* Define to 1 if you have the `ftruncate' function. */
+/* #undef HAVE_FTRUNCATE */
+
+/* Define to 1 if you have the `futimes' function. */
+/* #undef HAVE_FUTIMES */
+
+/* Define to 1 if you have the `geteuid' function. */
+/* #undef HAVE_GETEUID */
+
+/* Define to 1 if you have the `getopt_long' function. */
+/* #undef HAVE_GETOPT_LONG */
+
+/* Define to 1 if you have the `getxattr' function. */
+/* #undef HAVE_GETXATTR */
+
+/* Define to 1 if you have the <grp.h> header file. */
+/* #undef HAVE_GRP_H */
+
+/* Define to 1 if the system has the type `intmax_t'. */
+/* #undef HAVE_INTMAX_T */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+/* #undef HAVE_INTTYPES_H */
+
+/* Define to 1 if you have the <langinfo.h> header file. */
+/* #undef HAVE_LANGINFO_H */
+
+/* Define to 1 if you have the `lchflags' function. */
+/* #undef HAVE_LCHFLAGS */
+
+/* Define to 1 if you have the `lchmod' function. */
+/* #undef HAVE_LCHMOD */
+
+/* Define to 1 if you have the `lchown' function. */
+/* #undef HAVE_LCHOWN */
+
+/* Define to 1 if you have the `lgetxattr' function. */
+/* #undef HAVE_LGETXATTR */
+
+/* Define to 1 if you have the `acl' library (-lacl). */
+/* #undef HAVE_LIBACL */
+
+/* Define to 1 if you have the `attr' library (-lattr). */
+/* #undef HAVE_LIBATTR */
+
+/* Define to 1 if you have the `bz2' library (-lbz2). */
+/* #undef HAVE_LIBBZ2 */
+
+/* Define to 1 if you have the `z' library (-lz). */
+/* #undef HAVE_LIBZ */
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* 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 */
+
+/* Define to 1 if you have the `llistxattr' function. */
+/* #undef HAVE_LLISTXATTR */
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if the system has the type `long long int'. */
+#define HAVE_LONG_LONG_INT 1
+
+/* Define to 1 if you have the `lsetxattr' function. */
+/* #undef HAVE_LSETXATTR */
+
+/* Define to 1 if `lstat' has the bug that it succeeds when given the
+ zero-length file name argument. */
+/* #undef HAVE_LSTAT_EMPTY_STRING_BUG */
+
+/* Define to 1 if you have the `lutimes' function. */
+/* #undef HAVE_LUTIMES */
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the `mkdir' function. */
+#define HAVE_MKDIR 1
+
+/* Define to 1 if you have the `mkfifo' function. */
+/* #undef HAVE_MKFIFO */
+
+/* Define to 1 if you have the `mknod' function. */
+/* #undef HAVE_MKNOD */
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the `nl_langinfo' function. */
+/* #undef HAVE_NL_LANGINFO */
+
+/* Define to 1 if you have the <paths.h> header file. */
+/* #undef HAVE_PATHS_H */
+
+/* Define to 1 if you have the `poll' function. */
+/* #undef HAVE_POLL */
+
+/* Define to 1 if you have the <poll.h> header file. */
+/* #undef HAVE_POLL_H */
+
+/* Define to 1 if you have the <pwd.sh.h> header file. */
+/* #undef HAVE_PWD_H */
+
+/* Define to 1 if you have the `select' function. */
+/* #undef HAVE_SELECT */
+
+/* Define to 1 if you have the `setlocale' function. */
+#define HAVE_SETLOCALE 1
+
+/* Define to 1 if `stat' has the bug that it succeeds when given the
+ 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. */
+/* #undef HAVE_STDINT_H */
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+/* #undef HAVE_STRERROR_R */
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strrchr' function. */
+#define HAVE_STRRCHR 1
+
+/* Define to 1 if `st_mtimespec.tv_nsec' is member of `struct stat'. */
+/* #undef HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC */
+
+/* Define to 1 if `st_mtim.tv_nsec' is member of `struct stat'. */
+/* #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */
+
+/* Define to 1 if `st_rdev' is member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+
+/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */
+/* #undef HAVE_STRUCT_TM_TM_GMTOFF */
+
+/* Define to 1 if you have the <sys/acl.h> header file. */
+/* #undef HAVE_SYS_ACL_H */
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+/* #undef HAVE_SYS_IOCTL_H */
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+/* #undef HAVE_SYS_PARAM_H */
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+/* #undef HAVE_SYS_POLL_H */
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+/* #undef HAVE_SYS_SELECT_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+/* #undef HAVE_SYS_TIME_H */
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/utime.h> header file. */
+#define HAVE_SYS_UTIME_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+/* #undef HAVE_SYS_WAIT_H */
+
+/* Define to 1 if you have the `timegm' function. */
+/* #undef HAVE_TIMEGM */
+
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
+/* Define to 1 if the system has the type `uintmax_t'. */
+/* #undef HAVE_UINTMAX_T */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+/* #undef HAVE_UNISTD_H */
+
+/* Define to 1 if the system has the type `unsigned long long'. */
+#define HAVE_UNSIGNED_LONG_LONG 1
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+
+/* Define to 1 if you have the `utime' function. */
+#define HAVE_UTIME 1
+
+/* Define to 1 if you have the `utimes' function. */
+/* #undef HAVE_UTIMES */
+
+/* Define to 1 if you have the <utime.h> header file. */
+/* #undef HAVE_UTIME_H */
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
+/* Define to 1 if you have the `wcscpy' function. */
+#define HAVE_WCSCPY 1
+
+/* Define to 1 if you have the `wcslen' function. */
+#define HAVE_WCSLEN 1
+
+/* Define to 1 if you have the `wmemcmp' function. */
+/* #undef HAVE_WMEMCMP */
+
+/* Define to 1 if you have the `wmemcpy' function. */
+/* #undef HAVE_WMEMCPY */
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#define HAVE_ZLIB_H 1
+
+/* Version number of libarchive as a single integer */
+#define LIBARCHIVE_VERSION_NUMBER "2005000"
+
+/* Version number of libarchive */
+#define LIBARCHIVE_VERSION_STRING "2.5.0b"
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+ slash. */
+/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
+
+/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
+ */
+/* #undef MAJOR_IN_MKDEV */
+
+/* Define to 1 if `major', `minor', and `makedev' are declared in
+ <sysmacros.h>. */
+/* #undef MAJOR_IN_SYSMACROS */
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* Name of package */
+#define PACKAGE "libarchive"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "kientzle@freebsd.org"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "libarchive"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "libarchive 2.4.12"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "libarchive"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "2.4.12"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if strerror_r returns char *. */
+/* #undef STRERROR_R_CHAR_P */
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Version number of package */
+#define VERSION "2.4.12"
+
+/* 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 */
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef was allowed, the
+ #define below would cause a syntax error. */
+/* #undef _UINT64_T */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#if (USE_UNSIGNED_GID)
+#define gid_t unsigned int
+#else
+#define gid_t int
+#endif
+
+/* Define to `unsigned long' if <sys/types.h> does not define. */
+#define id_t int
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#if (HAVE___INT64)
+typedef __int64 int64_t;
+#else
+#define int64_t long long
+#endif
+
+/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
+ not define. */
+#if (HAVE___INT64)
+typedef __int64 intmax_t;
+#else
+#define intmax_t long long
+#endif
+
+/* Define to `int' if <sys/types.h> does not define. */
+#define mode_t unsigned short
+
+/* Define to `long long' if <sys/types.h> does not define. */
+/* #undef off_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#if (USE_UNSIGNED_UID)
+#define uid_t unsigned int
+#else
+#define uid_t int
+#endif
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#if (HAVE___INT64)
+typedef unsigned __int64 uint64_t;
+#else
+#define uint64_t unsigned long long
+#endif
+
+/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
+ do not define. */
+#if (HAVE___INT64)
+typedef unsigned __int64 uintmax_t;
+#else
+#define uintmax_t unsigned long long
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef uintptr_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#define pid_t unsigned int
+
+#define uint32_t unsigned long
+#define uint16_t unsigned short
+#define ssize_t long
+
+
+///////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+#if (IS_VISUALC)
+ #include <io.h>
+ #include <stdlib.h> //brings in NULL
+ #include <sys/stat.h> //brings in S_IFMT(), etc...
+
+ #define HAVE_UINTPTR 0
+
+ #if !defined(STDIN_FILENO)
+ #define STDIN_FILENO 0
+ #endif
+
+ #if !defined(STDOUT_FILENO)
+ #define STDOUT_FILENO 1
+ #endif
+
+ #if !defined(STDERR_FILENO)
+ #define STDERR_FILENO 2
+ #endif
+
+ /* Define to 1 if ino_t is defined (possibly in sys/types.h) */
+ #define HAVE_INO_T 1
+
+ #define S_IFFIFO _S_IFIFO
+
+ #define S_ISBLK( m ) 0
+ #define S_ISFIFO( m ) (((m) & S_IFMT) == S_IFFIFO)
+ #define S_ISCHR( m ) (((m) & S_IFMT) == S_IFCHR)
+ #define S_ISDIR( m ) (((m) & S_IFMT) == S_IFDIR)
+ #define S_ISREG( m ) (((m) & S_IFMT) == S_IFREG)
+ #define S_ISUID 0004000
+ #define S_ISGID 0002000
+ #define S_ISVTX 0001000
+
+ //NOT SURE IF O_NONBLOCK is OK here but at least the 0x0004 flag is not used by anything else...
+ #define O_NONBLOCK 0x0004 /* Non-blocking I/O. */
+ //#define O_NDELAY O_NONBLOCK
+
+ #define lstat _stat
+
+ /* Symbolic constants for the access() function */
+ #if !defined(F_OK)
+ #define R_OK 4 /* Test for read permission */
+ #define W_OK 2 /* Test for write permission */
+ #define X_OK 1 /* Test for execute permission */
+ #define F_OK 0 /* Test for existence of file */
+ #endif
+
+#endif
+
+//////////////////////////////////////////////////////////////////////////
+#if (IS_WATCOM)
+ #include <io.h> //brings in STDERR/OUT/IN_FILENO, dup(), dup2(), close(), write(), etc...
+ #include <process.h> //brings in execlp() and _exit()
+ #include <stdlib.h> //brings in NULL
+ #include <sys/stat.h>
+
+ /* Define to 1 if ino_t is defined (possibly in sys/types.h) */
+ #define HAVE_INO_T 1
+
+ //NOT SURE IF O_NONBLOCK is OK here but at least the 0x0004 flag is not used by anything else...
+ #define O_NONBLOCK 0x0004 /* Non-blocking I/O. */
+ //#define O_NDELAY O_NONBLOCK
+
+ //Prototypes for functions which we'll define in archive_windows.c
+ extern unsigned int sleep (unsigned int seconds);
+
+ #define lstat _stat
+#endif
+
+
+//////////////////////////////////////////////////////////////////////////
+#if !(HAVE_UINTPTR)
+ typedef unsigned int *uintptr_t;
+ #if defined(HAVE_UINTPTR)
+ #undef HAVE_UINTPTR
+ #endif
+ #define HAVE_UINTPTR 1
+#endif
+
+#if !defined(SSIZE_MAX)
+ //#define _POSIX_SSIZE_MAX 32767
+ #if defined(_POSIX_SSIZE_MAX)
+ #define SSIZE_MAX _POSIX_SSIZE_MAX
+ #else
+ #define SSIZE_MAX ((ssize_t)((size_t)-1 >> 1))
+ #endif
+#endif
+
+#if !(HAVE_FCNTL_FN)
+ #define F_SETFL 4 /* Set file status flags. */
+
+ #if defined(HAVE_FCNTL_FN)
+ #undef HAVE_FCNTL_FN
+ #endif
+ #define HAVE_FCNTL_FN 1
+#endif
+
+ #define _S_IFLNK 0xA000 /* symbolic link */
+ #if !defined(_S_IFMT)
+ #define _S_IFMT S_IFMT
+ #endif
+
+ #define _S_ISLNK(m) (((m) & _S_IFMT) == _S_IFLNK)
+ #define S_ISLNK(m) _S_ISLNK(m)
+
+
+/* Replacement for major/minor/makedev. */
+#if !(MAJOR_IN_MKDEV) && !(MAJOR_IN_SYSMACROS)
+ #define major(x) ((int)(0x00ff & ((x) >> 8)))
+ #define minor(x) ((int)(0xffff00ff & (x)))
+ #define makedev(maj,min) ((0xff00 & ((maj)<<8))|(0xffff00ff & (min)))
+#endif
+
+#define set_errno(val) ((errno)=val)
+
+
+#endif /* CONFIG_H_INCLUDED */
diff --git a/archivers/libarchive/files/libarchive/filter_fork.c b/archivers/libarchive/files/libarchive/filter_fork.c
index 8cad9e2f098..3c2d829d052 100644
--- a/archivers/libarchive/files/libarchive/filter_fork.c
+++ b/archivers/libarchive/files/libarchive/filter_fork.c
@@ -25,6 +25,9 @@
#include "archive_platform.h"
+/* This capability is only available on POSIX systems. */
+#if defined(HAVE_PIPE) && defined(HAVE_VFORK) && defined(HAVE_FCNTL)
+
__FBSDID("$FreeBSD: src/lib/libarchive/filter_fork.c,v 1.2 2007/12/30 04:58:22 kientzle Exp $");
#if defined(HAVE_POLL)
@@ -137,3 +140,5 @@ __archive_check_child(int in, int out)
sleep(1);
#endif
}
+
+#endif /* defined(HAVE_PIPE) && defined(HAVE_VFORK) && defined(HAVE_FCNTL) */
diff --git a/archivers/libarchive/files/libarchive/libarchive-formats.5 b/archivers/libarchive/files/libarchive/libarchive-formats.5
index 0346d8f5aff..f570935c824 100644
--- a/archivers/libarchive/files/libarchive/libarchive-formats.5
+++ b/archivers/libarchive/files/libarchive/libarchive-formats.5
@@ -259,6 +259,14 @@ There are two common variants:
the GNU format derived from SVR4,
and the BSD format, which first appeared in 4.4BSD.
Libarchive provides read and write support for both variants.
+.Ss mtree
+Libarchive can read files in
+.Xr mtree 5
+format. This format is not a true archive format, but rather a description
+of a file hierarchy. When requested, libarchive obtains the contents of
+the files described by the
+.Xr mtree 5
+format from files on disk instead.
.Sh SEE ALSO
.Xr ar 1 ,
.Xr cpio 1 ,
diff --git a/archivers/libarchive/files/libarchive/mtree.5 b/archivers/libarchive/files/libarchive/mtree.5
index 2341626d877..b6637d6f55e 100644
--- a/archivers/libarchive/files/libarchive/mtree.5
+++ b/archivers/libarchive/files/libarchive/mtree.5
@@ -33,12 +33,12 @@
.Os
.Sh NAME
.Nm mtree
-.Nd format of mtree dir heirarchy files
+.Nd format of mtree dir hierarchy files
.Sh DESCRIPTION
The
.Nm
format is a textual format that describes a collection of filesystem objects.
-Such files are typically used to create or verify directory heirarchies.
+Such files are typically used to create or verify directory hierarchies.
.Ss General Format
An
.Nm
@@ -135,8 +135,7 @@ the
.Xr cksum 1
utility.
.It Cm contents
-The full pathname of a file whose contents should be
-compared to the contents of this file.
+The full pathname of a file that holds the contents of this file.
.It Cm flags
The file flags as a symbolic name.
See
@@ -152,7 +151,7 @@ The file group as a symbolic name.
.It Cm ignore
Ignore any file hierarchy below this file.
.It Cm link
-The file the symbolic link is expected to reference.
+The target of the symbolic link when type=link.
.It Cm md5
The MD5 message digest of the file.
.It Cm md5digest
diff --git a/archivers/libarchive/files/libarchive/test/list.h b/archivers/libarchive/files/libarchive/test/list.h
index 94f9fc11a39..278821ad974 100644
--- a/archivers/libarchive/files/libarchive/test/list.h
+++ b/archivers/libarchive/files/libarchive/test/list.h
@@ -31,6 +31,7 @@ DEFINE_TEST(test_read_format_isorr_bz2)
DEFINE_TEST(test_read_format_mtree)
DEFINE_TEST(test_read_format_pax_bz2)
DEFINE_TEST(test_read_format_tar)
+DEFINE_TEST(test_read_format_tar_empty_filename)
DEFINE_TEST(test_read_format_tbz)
DEFINE_TEST(test_read_format_tgz)
DEFINE_TEST(test_read_format_tz)
@@ -41,6 +42,7 @@ DEFINE_TEST(test_read_position)
DEFINE_TEST(test_read_truncated)
DEFINE_TEST(test_tar_filenames)
DEFINE_TEST(test_tar_large)
+DEFINE_TEST(test_ustar_filenames)
DEFINE_TEST(test_write_compress)
DEFINE_TEST(test_write_compress_program)
DEFINE_TEST(test_write_disk)
@@ -55,4 +57,5 @@ DEFINE_TEST(test_write_format_cpio_odc)
DEFINE_TEST(test_write_format_shar_empty)
DEFINE_TEST(test_write_format_tar)
DEFINE_TEST(test_write_format_tar_empty)
+DEFINE_TEST(test_write_format_tar_ustar)
DEFINE_TEST(test_write_open_memory)
diff --git a/archivers/libarchive/files/libarchive/test/main.c b/archivers/libarchive/files/libarchive/test/main.c
index 71493321510..6e6ca6c8da1 100644
--- a/archivers/libarchive/files/libarchive/test/main.c
+++ b/archivers/libarchive/files/libarchive/test/main.c
@@ -63,10 +63,14 @@ extern char *optarg;
extern int optind;
#endif
-/* Default is to crash and try to force a core dump on failure. */
-static int dump_on_failure = 1;
+/* Enable core dump on failure. */
+static int dump_on_failure = 0;
+/* Default is to remove temp dirs for successful tests. */
+static int keep_temp_files = 0;
/* Default is to print some basic information about each test. */
static int quiet_flag = 0;
+/* Default is to summarize repeated failures. */
+static int verbose = 0;
/* Cumulative count of component failures. */
static int failures = 0;
/* Cumulative count of skipped component tests. */
@@ -242,7 +246,7 @@ test_assert(const char *file, int line, int value, const char *condition, void *
return (value);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (value);
fprintf(stderr, "%s:%d: Assertion failed\n", file, line);
fprintf(stderr, " Condition: %s\n", condition);
@@ -261,7 +265,7 @@ test_assert_equal_int(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: Ints not equal\n",
file, line);
@@ -313,16 +317,16 @@ test_assert_equal_string(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: Strings not equal\n",
file, line);
fprintf(stderr, " %s = ", e1);
strdump(v1);
- fprintf(stderr, "\n");
+ fprintf(stderr, " (length %d)\n", v1 == NULL ? 0 : strlen(v1));
fprintf(stderr, " %s = ", e2);
strdump(v2);
- fprintf(stderr, "\n");
+ fprintf(stderr, " (length %d)\n", v2 == NULL ? 0 : strlen(v2));
report_failure(extra);
return (0);
}
@@ -371,7 +375,7 @@ test_assert_equal_wstring(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: Unicode strings not equal\n",
file, line);
@@ -441,7 +445,7 @@ test_assert_equal_mem(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: memory not equal\n",
file, line);
@@ -473,12 +477,13 @@ test_assert_empty_file(const char *f1fmt, ...)
if (stat(f1, &st) != 0) {
fprintf(stderr, "%s:%d: Could not stat: %s\n", test_filename, test_line, f1);
report_failure(NULL);
+ return (0);
}
if (st.st_size == 0)
return (1);
failures ++;
- if (previous_failures(test_filename, test_line))
+ if (!verbose && previous_failures(test_filename, test_line))
return (0);
fprintf(stderr, "%s:%d: File not empty: %s\n", test_filename, test_line, f1);
@@ -525,7 +530,7 @@ test_assert_equal_file(const char *f1, const char *f2pattern, ...)
break;
}
failures ++;
- if (previous_failures(test_filename, test_line))
+ if (!verbose && previous_failures(test_filename, test_line))
return (0);
fprintf(stderr, "%s:%d: Files are not identical\n",
test_filename, test_line);
@@ -696,6 +701,12 @@ static int test_run(int i, const char *tmpdir)
(*tests[i].func)();
/* Summarize the results of this test. */
summarize();
+ /* If there were no failures, we can remove the work dir. */
+ if (failures == failures_before) {
+ if (!keep_temp_files && chdir(tmpdir) == 0) {
+ systemf("rm -rf %s", tests[i].name);
+ }
+ }
/* Return appropriate status. */
return (failures == failures_before ? 0 : 1);
}
@@ -709,8 +720,9 @@ static void usage(const char *program)
printf("Default is to run all tests.\n");
printf("Otherwise, specify the numbers of the tests you wish to run.\n");
printf("Options:\n");
- printf(" -k Keep running after failures.\n");
- printf(" Default: Core dump after any failure.\n");
+ printf(" -d Dump core after any failure, for debugging.\n");
+ printf(" -k Keep all temp files.\n");
+ printf(" Default: temp files for successful tests deleted.\n");
#ifdef PROGRAM
printf(" -p <path> Path to executable to be tested.\n");
printf(" Default: path taken from " ENVBASE " environment variable.\n");
@@ -718,6 +730,7 @@ static void usage(const char *program)
printf(" -q Quiet.\n");
printf(" -r <dir> Path to dir containing reference files.\n");
printf(" Default: Current directory.\n");
+ printf(" -v Verbose.\n");
printf("Available tests:\n");
for (i = 0; i < limit; i++)
printf(" %d: %s\n", i, tests[i].name);
@@ -810,9 +823,9 @@ int main(int argc, char **argv)
testprog = getenv(ENVBASE);
#endif
- /* Allow -k to be controlled through the environment. */
- if (getenv(ENVBASE "_KEEP_GOING") != NULL)
- dump_on_failure = 0;
+ /* Allow -d to be controlled through the environment. */
+ if (getenv(ENVBASE "_DEBUG") != NULL)
+ dump_on_failure = 1;
/* Get the directory holding test files from environment. */
refdir = getenv(ENVBASE "_TEST_FILES");
@@ -820,10 +833,13 @@ int main(int argc, char **argv)
/*
* Parse options.
*/
- while ((opt = getopt(argc, argv, "kp:qr:")) != -1) {
+ while ((opt = getopt(argc, argv, "dkp:qr:v")) != -1) {
switch (opt) {
+ case 'd':
+ dump_on_failure = 1;
+ break;
case 'k':
- dump_on_failure = 0;
+ keep_temp_files = 1;
break;
case 'p':
#ifdef PROGRAM
@@ -838,6 +854,9 @@ int main(int argc, char **argv)
case 'r':
refdir = optarg;
break;
+ case 'v':
+ verbose = 1;
+ break;
case '?':
default:
usage(progname);
@@ -886,6 +905,7 @@ int main(int argc, char **argv)
--p;
*p = '\0';
}
+ systemf("rm %s/refdir", tmpdir);
}
/*
@@ -941,5 +961,9 @@ int main(int argc, char **argv)
free(refdir_alloc);
+ /* If the final tmpdir is empty, we can remove it. */
+ /* This should be the usual case when all tests succeed. */
+ rmdir(tmpdir);
+
return (tests_failed);
}
diff --git a/archivers/libarchive/files/libarchive/test/test_entry.c b/archivers/libarchive/files/libarchive/test/test_entry.c
index 8386d98926e..5ed3278c60b 100644
--- a/archivers/libarchive/files/libarchive/test/test_entry.c
+++ b/archivers/libarchive/files/libarchive/test/test_entry.c
@@ -232,6 +232,11 @@ DEFINE_TEST(test_entry)
assertEqualString(archive_entry_fflags_text(e),
"uappnd,nouchg,nodump,noopaque,uunlnk");
/* TODO: Test archive_entry_copy_fflags_text_w() */
+ /* Test archive_entry_copy_fflags_text() */
+ archive_entry_copy_fflags_text(e, "nouappnd, nouchg, dump,uunlnk");
+ archive_entry_fflags(e, &set, &clear);
+ assertEqualInt(16, set);
+ assertEqualInt(7, clear);
#endif
/* See test_acl_basic.c for tests of ACL set/get consistency. */
diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c b/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c
index e5165d31fbe..b2fdbb88349 100644
--- a/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c
+++ b/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c
@@ -32,18 +32,18 @@ static unsigned char archive[] = {
"dir type=dir\n"
" file\\040with\\040space type=file uid=18\n"
" ..\n"
- "file\\04with\\040space\n"
+ "file\\04with\\040space type=file\n"
"dir2 type=dir\n"
" dir3a type=dir\n"
- " indir3a\n"
+ " indir3a type=file\n"
"dir2/fullindir2 type=file mode=0777\n"
" ..\n"
- " indir2\n"
+ " indir2 type=file\n"
" dir3b type=dir\n"
- " indir3b\n"
+ " indir3b type=file\n"
" ..\n"
" ..\n"
- "notindir\n"
+ "notindir type=file\n"
"dir2/fullindir2 mode=0644\n"
};
diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.c b/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.c
new file mode 100644
index 00000000000..d9ba69bd93c
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.c
@@ -0,0 +1,66 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+/*
+ * Tar entries with empty filenames are unusual, but shouldn't crash us.
+ */
+DEFINE_TEST(test_read_format_tar_empty_filename)
+{
+ char name[] = "test_read_format_tar_empty_filename.tar";
+ struct archive_entry *ae;
+ struct archive *a;
+
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+ extract_reference_file(name);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 10240));
+
+ /* Read first entry. */
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("", archive_entry_pathname(ae));
+ assertEqualInt(1208628157, archive_entry_mtime(ae));
+ assertEqualInt(1000, archive_entry_uid(ae));
+ assertEqualString("tim", archive_entry_uname(ae));
+ assertEqualInt(0, archive_entry_gid(ae));
+ assertEqualString("wheel", archive_entry_gname(ae));
+ assertEqualInt(040775, archive_entry_mode(ae));
+
+ /* Verify the end-of-archive. */
+ assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
+
+ /* Verify that the format detection worked. */
+ assertEqualInt(archive_compression(a), ARCHIVE_COMPRESSION_NONE);
+ assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);
+
+ assertEqualInt(ARCHIVE_OK, archive_read_close(a));
+#if ARCHIVE_API_VERSION > 1
+ assertEqualInt(ARCHIVE_OK, archive_read_finish(a));
+#else
+ archive_read_finish(a);
+#endif
+}
diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.tar.uu b/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.tar.uu
new file mode 100644
index 00000000000..7a34c82ca6b
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/test/test_read_format_tar_empty_filename.tar.uu
@@ -0,0 +1,38 @@
+begin 644 test_compat_tar_1.tar
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M`````````````#`P,#<W-2``,#`Q-S4P(``P,#`P,#`@`#`P,#`P,#`P,#`P
+M(#$Q,#`R-#,Q-C<U(#`Q,3`P,0`@-0``````````````````````````````
+M````````````````````````````````````````````````````````````
+M``````````````````````````````````````````!U<W1A<@`P,'1I;0``
+M````````````````````````````````````=VAE96P`````````````````
+M```````````````````P,#`P,#`@`#`P,#`P,"``````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+M````````````````````````````````````````````````````````````
+&````````
+`
+end
diff --git a/archivers/libarchive/files/libarchive/test/test_tar_filenames.c b/archivers/libarchive/files/libarchive/test/test_tar_filenames.c
index 8b83b527733..9b98448e4a7 100644
--- a/archivers/libarchive/files/libarchive/test/test_tar_filenames.c
+++ b/archivers/libarchive/files/libarchive/test/test_tar_filenames.c
@@ -40,19 +40,22 @@ test_filename(const char *prefix, int dlen, int flen)
struct archive_entry *ae;
struct archive *a;
size_t used;
- size_t prefix_length = 0;
- unsigned i = 0;
+ char *p;
+ int i;
+ p = filename;
if (prefix) {
strcpy(filename, prefix);
- i = prefix_length = strlen(prefix);
+ p += strlen(p);
}
- for (; i < prefix_length + dlen; i++)
- filename[i] = 'a';
- filename[i++] = '/';
- for (; i < prefix_length + dlen + flen + 1; i++)
- filename[i] = 'b';
- filename[i++] = '\0';
+ if (dlen > 0) {
+ for (i = 0; i < dlen; i++)
+ *p++ = 'a';
+ *p++ = '/';
+ }
+ for (i = 0; i < flen; i++)
+ *p++ = 'b';
+ *p = '\0';
strcpy(dirname, filename);
@@ -160,15 +163,22 @@ DEFINE_TEST(test_tar_filenames)
int dlen, flen;
/* Repeat the following for a variety of dir/file lengths. */
- for (dlen = 40; dlen < 60; dlen++) {
- for (flen = 40; flen < 60; flen++) {
+ for (dlen = 45; dlen < 55; dlen++) {
+ for (flen = 45; flen < 55; flen++) {
+ test_filename(NULL, dlen, flen);
+ test_filename("/", dlen, flen);
+ }
+ }
+
+ for (dlen = 0; dlen < 140; dlen += 10) {
+ for (flen = 98; flen < 102; flen++) {
test_filename(NULL, dlen, flen);
test_filename("/", dlen, flen);
}
}
for (dlen = 140; dlen < 160; dlen++) {
- for (flen = 90; flen < 110; flen++) {
+ for (flen = 95; flen < 105; flen++) {
test_filename(NULL, dlen, flen);
test_filename("/", dlen, flen);
}
diff --git a/archivers/libarchive/files/libarchive/test/test_tar_large.c b/archivers/libarchive/files/libarchive/test/test_tar_large.c
index c675ac1ee04..a05b49f6ab5 100644
--- a/archivers/libarchive/files/libarchive/test/test_tar_large.c
+++ b/archivers/libarchive/files/libarchive/test/test_tar_large.c
@@ -242,6 +242,11 @@ DEFINE_TEST(test_tar_large)
archive_entry_copy_pathname(ae, namebuff);
archive_entry_set_mode(ae, S_IFREG | 0755);
filesize = tests[i];
+
+ if (filesize < 0) {
+ skipping("32-bit off_t doesn't permit testing of very large files.");
+ return;
+ }
archive_entry_set_size(ae, filesize);
assertA(0 == archive_write_header(a, ae));
diff --git a/archivers/libarchive/files/libarchive/test/test_ustar_filenames.c b/archivers/libarchive/files/libarchive/test/test_ustar_filenames.c
new file mode 100644
index 00000000000..88b4b2c4ac4
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/test/test_ustar_filenames.c
@@ -0,0 +1,183 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+/*
+ * Exercise various lengths of filenames in ustar archives.
+ */
+
+static void
+test_filename(const char *prefix, int dlen, int flen)
+{
+ char buff[8192];
+ char filename[400];
+ char dirname[400];
+ struct archive_entry *ae;
+ struct archive *a;
+ size_t used;
+ int separator = 0;
+ int i = 0;
+
+ if (prefix != NULL) {
+ strcpy(filename, prefix);
+ i = strlen(prefix);
+ }
+ if (dlen > 0) {
+ for (; i < dlen; i++)
+ filename[i] = 'a';
+ filename[i++] = '/';
+ separator = 1;
+ }
+ for (; i < dlen + flen + separator; i++)
+ filename[i] = 'b';
+ filename[i++] = '\0';
+
+ strcpy(dirname, filename);
+
+ /* Create a new archive in memory. */
+ assert((a = archive_write_new()) != NULL);
+ assertA(0 == archive_write_set_format_ustar(a));
+ assertA(0 == archive_write_set_compression_none(a));
+ assertA(0 == archive_write_set_bytes_per_block(a,0));
+ assertA(0 == archive_write_open_memory(a, buff, sizeof(buff), &used));
+
+ /*
+ * Write a file to it.
+ */
+ assert((ae = archive_entry_new()) != NULL);
+ archive_entry_copy_pathname(ae, filename);
+ archive_entry_set_mode(ae, S_IFREG | 0755);
+ failure("dlen=%d, flen=%d", dlen, flen);
+ if (flen > 100) {
+ assertEqualIntA(a, ARCHIVE_FAILED, archive_write_header(a, ae));
+ } else {
+ assertEqualIntA(a, 0, archive_write_header(a, ae));
+ }
+ archive_entry_free(ae);
+
+ /*
+ * Write a dir to it (without trailing '/').
+ */
+ assert((ae = archive_entry_new()) != NULL);
+ archive_entry_copy_pathname(ae, dirname);
+ archive_entry_set_mode(ae, S_IFDIR | 0755);
+ failure("dlen=%d, flen=%d", dlen, flen);
+ if (flen >= 100) {
+ assertEqualIntA(a, ARCHIVE_FAILED, archive_write_header(a, ae));
+ } else {
+ assertEqualIntA(a, 0, archive_write_header(a, ae));
+ }
+ archive_entry_free(ae);
+
+ /* Tar adds a '/' to directory names. */
+ strcat(dirname, "/");
+
+ /*
+ * Write a dir to it (with trailing '/').
+ */
+ assert((ae = archive_entry_new()) != NULL);
+ archive_entry_copy_pathname(ae, dirname);
+ archive_entry_set_mode(ae, S_IFDIR | 0755);
+ failure("dlen=%d, flen=%d", dlen, flen);
+ if (flen >= 100) {
+ assertEqualIntA(a, ARCHIVE_FAILED, archive_write_header(a, ae));
+ } else {
+ assertEqualIntA(a, 0, archive_write_header(a, ae));
+ }
+ archive_entry_free(ae);
+
+ /* Close out the archive. */
+ assertA(0 == archive_write_close(a));
+ assertA(0 == archive_write_finish(a));
+
+ /*
+ * Now, read the data back.
+ */
+ assert((a = archive_read_new()) != NULL);
+ assertA(0 == archive_read_support_format_all(a));
+ assertA(0 == archive_read_support_compression_all(a));
+ assertA(0 == archive_read_open_memory(a, buff, used));
+
+ if (flen <= 100) {
+ /* Read the file and check the filename. */
+ assertA(0 == archive_read_next_header(a, &ae));
+ failure("dlen=%d, flen=%d", dlen, flen);
+ assertEqualString(filename, archive_entry_pathname(ae));
+ assertEqualInt((S_IFREG | 0755), archive_entry_mode(ae));
+ }
+
+ /*
+ * Read the two dirs and check the names.
+ *
+ * Both dirs should read back with the same name, since
+ * tar should add a trailing '/' to any dir that doesn't
+ * already have one.
+ */
+ if (flen <= 99) {
+ assertA(0 == archive_read_next_header(a, &ae));
+ assert((S_IFDIR | 0755) == archive_entry_mode(ae));
+ failure("dlen=%d, flen=%d", dlen, flen);
+ assertEqualString(dirname, archive_entry_pathname(ae));
+ }
+
+ if (flen <= 99) {
+ assertA(0 == archive_read_next_header(a, &ae));
+ assert((S_IFDIR | 0755) == archive_entry_mode(ae));
+ assertEqualString(dirname, archive_entry_pathname(ae));
+ }
+
+ /* Verify the end of the archive. */
+ failure("This fails if entries were written that should not have been written. dlen=%d, flen=%d", dlen, flen);
+ assertEqualInt(1, archive_read_next_header(a, &ae));
+ assert(0 == archive_read_close(a));
+ assert(0 == archive_read_finish(a));
+}
+
+DEFINE_TEST(test_ustar_filenames)
+{
+ int dlen, flen;
+
+ /* Try a bunch of different file/dir lengths that add up
+ * to just a little less or a little more than 100 bytes.
+ * This exercises the code that splits paths between ustar
+ * filename and prefix fields.
+ */
+ for (dlen = 5; dlen < 70; dlen += 5) {
+ for (flen = 100 - dlen - 5; flen < 100 - dlen + 5; flen++) {
+ test_filename(NULL, dlen, flen);
+ test_filename("/", dlen, flen);
+ }
+ }
+
+ /* Probe the 100-char limit for paths with no '/'. */
+ for (flen = 90; flen < 110; flen++) {
+ test_filename(NULL, 0, flen);
+ test_filename("/", dlen, flen);
+ }
+
+ /* XXXX TODO Probe the 100-char limit with a dir prefix. */
+ /* XXXX TODO Probe the 255-char total limit. */
+}
diff --git a/archivers/libarchive/files/libarchive/test/test_write_disk_hardlink.c b/archivers/libarchive/files/libarchive/test/test_write_disk_hardlink.c
index b21c44b2384..0729c38a114 100644
--- a/archivers/libarchive/files/libarchive/test/test_write_disk_hardlink.c
+++ b/archivers/libarchive/files/libarchive/test/test_write_disk_hardlink.c
@@ -29,6 +29,10 @@ __FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_disk_hardlink.c,v 1.1 200
/*
* Exercise hardlink recreation.
+ *
+ * File permissions are chosen so that the authoritive entry
+ * has the correct permission and the non-authoritive versions
+ * are just writeable files.
*/
DEFINE_TEST(test_write_disk_hardlink)
{
@@ -64,7 +68,7 @@ DEFINE_TEST(test_write_disk_hardlink)
/* Link. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link1b");
- archive_entry_set_mode(ae, S_IFREG | 0755);
+ archive_entry_set_mode(ae, S_IFREG | 0600);
archive_entry_set_size(ae, 0);
archive_entry_copy_hardlink(ae, "link1a");
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
@@ -80,7 +84,7 @@ DEFINE_TEST(test_write_disk_hardlink)
/* Regular file. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link2a");
- archive_entry_set_mode(ae, S_IFREG | 0755);
+ archive_entry_set_mode(ae, S_IFREG | 0600);
archive_entry_set_size(ae, sizeof(data));
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data)));
@@ -106,10 +110,14 @@ DEFINE_TEST(test_write_disk_hardlink)
/* Regular file. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "link3a");
- archive_entry_set_mode(ae, S_IFREG | 0755);
+ archive_entry_set_mode(ae, S_IFREG | 0600);
archive_entry_set_size(ae, 0);
assertEqualIntA(ad, 0, archive_write_header(ad, ae));
- assertEqualInt(0, archive_write_data(ad, data, sizeof(data)));
+#if ARCHIVE_VERSION_NUMBER < 3000000
+ assertEqualInt(ARCHIVE_WARN, archive_write_data(ad, data, 1));
+#else
+ assertEqualInt(-1, archive_write_data(ad, data, 1));
+#endif
assertEqualIntA(ad, 0, archive_write_finish_entry(ad));
archive_entry_free(ae);
diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_ar.c b/archivers/libarchive/files/libarchive/test/test_write_format_ar.c
index 6c7a4462a90..4bb84a6a615 100644
--- a/archivers/libarchive/files/libarchive/test/test_write_format_ar.c
+++ b/archivers/libarchive/files/libarchive/test/test_write_format_ar.c
@@ -30,7 +30,7 @@ __FBSDID("$FreeBSD: src/lib/libarchive/test/test_write_format_ar.c,v 1.6 2008/03
char buff[4096];
char buff2[64];
-static unsigned char strtab[] = "abcdefghijklmn.o/\nggghhhjjjrrrttt.o/\niiijjjdddsssppp.o/\n";
+static char strtab[] = "abcdefghijklmn.o/\nggghhhjjjrrrttt.o/\niiijjjdddsssppp.o/\n";
DEFINE_TEST(test_write_format_ar)
{
@@ -162,6 +162,7 @@ DEFINE_TEST(test_write_format_ar)
archive_entry_set_filetype(ae, AE_IFREG);
archive_entry_set_size(ae, 5);
assertA(0 == archive_write_header(a, ae));
+ assertA(5 == archive_entry_size(ae));
assertA(5 == archive_write_data(a, "12345", 7));
archive_entry_free(ae);
diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_tar_ustar.c b/archivers/libarchive/files/libarchive/test/test_write_format_tar_ustar.c
new file mode 100644
index 00000000000..53eb07cf7d9
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/test/test_write_format_tar_ustar.c
@@ -0,0 +1,342 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+static int
+is_null(const char *p, size_t l)
+{
+ while (l > 0) {
+ if (*p != '\0')
+ return (0);
+ --l;
+ ++p;
+ }
+ return (1);
+}
+
+/* Verify the contents, then erase them to NUL bytes. */
+/* Tar requires all "unused" bytes be set to NUL; this allows us
+ * to easily verify that by invoking is_null() over the entire header
+ * after verifying each field. */
+#define myAssertEqualMem(a,b,s) assertEqualMem(a, b, s); memset(a, 0, s)
+
+/*
+ * Detailed verification that 'ustar' archives are written with
+ * the correct format.
+ */
+DEFINE_TEST(test_write_format_tar_ustar)
+{
+ struct archive *a;
+ struct archive_entry *entry;
+ char *buff, *e;
+ size_t buffsize = 100000;
+ size_t used;
+ int i;
+ char f99[100];
+ char f100[101];
+ char f256[257];
+
+ for (i = 0; i < 99; ++i)
+ f99[i] = 'a' + i % 26;
+ f99[99] = '\0';
+
+ for (i = 0; i < 100; ++i)
+ f100[i] = 'A' + i % 26;
+ f100[100] = '\0';
+
+ for (i = 0; i < 256; ++i)
+ f256[i] = 'A' + i % 26;
+ f256[155] = '/';
+ f256[256] = '\0';
+
+ buff = malloc(buffsize);
+
+ /* Create a new archive in memory. */
+ assert((a = archive_write_new()) != NULL);
+ assertEqualIntA(a, 0, archive_write_set_format_ustar(a));
+ assertEqualIntA(a, 0, archive_write_set_compression_none(a));
+ assertEqualIntA(a, 0, archive_write_open_memory(a, buff, buffsize, &used));
+
+ /*
+ * Add various files to it.
+ * TODO: Extend this to cover more filetypes.
+ */
+
+ /* "file" with 10 bytes of content */
+ assert((entry = archive_entry_new()) != NULL);
+ archive_entry_set_mtime(entry, 1, 10);
+ archive_entry_set_pathname(entry, "file");
+ archive_entry_set_mode(entry, S_IFREG | 0664);
+ archive_entry_set_size(entry, 10);
+ archive_entry_set_uid(entry, 80);
+ archive_entry_set_gid(entry, 90);
+ archive_entry_set_dev(entry, 12);
+ archive_entry_set_ino(entry, 89);
+ archive_entry_set_nlink(entry, 2);
+ assertEqualIntA(a, 0, archive_write_header(a, entry));
+ archive_entry_free(entry);
+ assertEqualIntA(a, 10, archive_write_data(a, "1234567890", 10));
+
+ /* Hardlink to "file" with 10 bytes of content */
+ assert((entry = archive_entry_new()) != NULL);
+ archive_entry_set_mtime(entry, 1, 10);
+ archive_entry_set_pathname(entry, "linkfile");
+ archive_entry_set_mode(entry, S_IFREG | 0664);
+ /* TODO: Put this back and fix the bug. */
+ /* archive_entry_set_size(entry, 10); */
+ archive_entry_set_uid(entry, 80);
+ archive_entry_set_gid(entry, 90);
+ archive_entry_set_dev(entry, 12);
+ archive_entry_set_ino(entry, 89);
+ archive_entry_set_nlink(entry, 2);
+ assertEqualIntA(a, 0, archive_write_header(a, entry));
+ archive_entry_free(entry);
+ /* Write of data to dir should fail == zero bytes get written. */
+ assertEqualIntA(a, 0, archive_write_data(a, "1234567890", 10));
+
+ /* "dir" */
+ assert((entry = archive_entry_new()) != NULL);
+ archive_entry_set_mtime(entry, 2, 20);
+ archive_entry_set_pathname(entry, "dir");
+ archive_entry_set_mode(entry, S_IFDIR | 0775);
+ archive_entry_set_size(entry, 10);
+ archive_entry_set_nlink(entry, 2);
+ assertEqualIntA(a, 0, archive_write_header(a, entry));
+ archive_entry_free(entry);
+ /* Write of data to dir should fail == zero bytes get written. */
+ assertEqualIntA(a, 0, archive_write_data(a, "1234567890", 10));
+
+ /* "symlink" pointing to "file" */
+ assert((entry = archive_entry_new()) != NULL);
+ archive_entry_set_mtime(entry, 3, 30);
+ archive_entry_set_pathname(entry, "symlink");
+ archive_entry_set_mode(entry, S_IFLNK | 0664);
+ archive_entry_set_symlink(entry,"file");
+ archive_entry_set_size(entry, 0);
+ archive_entry_set_uid(entry, 88);
+ archive_entry_set_gid(entry, 98);
+ archive_entry_set_dev(entry, 12);
+ archive_entry_set_ino(entry, 90);
+ archive_entry_set_nlink(entry, 1);
+ assertEqualIntA(a, 0, archive_write_header(a, entry));
+ archive_entry_free(entry);
+ /* Write of data to symlink should fail == zero bytes get written. */
+ assertEqualIntA(a, 0, archive_write_data(a, "1234567890", 10));
+
+ /* file with 99-char filename. */
+ assert((entry = archive_entry_new()) != NULL);
+ archive_entry_set_mtime(entry, 1, 10);
+ archive_entry_set_pathname(entry, f99);
+ archive_entry_set_mode(entry, S_IFREG | 0664);
+ archive_entry_set_size(entry, 0);
+ archive_entry_set_uid(entry, 82);
+ archive_entry_set_gid(entry, 93);
+ archive_entry_set_dev(entry, 102);
+ archive_entry_set_ino(entry, 7);
+ archive_entry_set_nlink(entry, 1);
+ assertEqualIntA(a, 0, archive_write_header(a, entry));
+ archive_entry_free(entry);
+
+ /* file with 100-char filename. */
+ assert((entry = archive_entry_new()) != NULL);
+ archive_entry_set_mtime(entry, 1, 10);
+ archive_entry_set_pathname(entry, f100);
+ archive_entry_set_mode(entry, S_IFREG | 0664);
+ archive_entry_set_size(entry, 0);
+ archive_entry_set_uid(entry, 82);
+ archive_entry_set_gid(entry, 93);
+ archive_entry_set_dev(entry, 102);
+ archive_entry_set_ino(entry, 7);
+ archive_entry_set_nlink(entry, 1);
+ assertEqualIntA(a, 0, archive_write_header(a, entry));
+ archive_entry_free(entry);
+
+ /* file with 256-char filename. */
+ assert((entry = archive_entry_new()) != NULL);
+ archive_entry_set_mtime(entry, 1, 10);
+ archive_entry_set_pathname(entry, f256);
+ archive_entry_set_mode(entry, S_IFREG | 0664);
+ archive_entry_set_size(entry, 0);
+ archive_entry_set_uid(entry, 82);
+ archive_entry_set_gid(entry, 93);
+ archive_entry_set_dev(entry, 102);
+ archive_entry_set_ino(entry, 7);
+ archive_entry_set_nlink(entry, 1);
+ assertEqualIntA(a, 0, archive_write_header(a, entry));
+ archive_entry_free(entry);
+
+ assert(0 == archive_write_finish(a));
+
+ /*
+ * Verify the archive format.
+ */
+ e = buff;
+
+ /* "file" */
+ myAssertEqualMem(e + 0, "file", 5); /* Filename */
+ myAssertEqualMem(e + 100, "000664 ", 8); /* mode */
+ myAssertEqualMem(e + 108, "000120 ", 8); /* uid */
+ myAssertEqualMem(e + 116, "000132 ", 8); /* gid */
+ myAssertEqualMem(e + 124, "00000000012 ", 12); /* size */
+ myAssertEqualMem(e + 136, "00000000001 ", 12); /* mtime */
+ myAssertEqualMem(e + 148, "010034\0 ", 8); /* checksum */
+ myAssertEqualMem(e + 156, "0", 1); /* linkflag */
+ myAssertEqualMem(e + 157, "", 1); /* linkname */
+ myAssertEqualMem(e + 257, "ustar\000000", 8); /* signature/version */
+ myAssertEqualMem(e + 265, "", 1); /* uname */
+ myAssertEqualMem(e + 297, "", 1); /* gname */
+ myAssertEqualMem(e + 329, "000000 ", 8); /* devmajor */
+ myAssertEqualMem(e + 337, "000000 ", 8); /* devminor */
+ myAssertEqualMem(e + 345, "", 1); /* prefix */
+ assert(is_null(e + 0, 512));
+ myAssertEqualMem(e + 512, "1234567890", 10);
+ assert(is_null(e + 512, 512));
+ e += 1024;
+
+ /* hardlink to "file" */
+ myAssertEqualMem(e + 0, "linkfile", 9); /* Filename */
+ myAssertEqualMem(e + 100, "000664 ", 8); /* mode */
+ myAssertEqualMem(e + 108, "000120 ", 8); /* uid */
+ myAssertEqualMem(e + 116, "000132 ", 8); /* gid */
+ myAssertEqualMem(e + 124, "00000000000 ", 12); /* size */
+ myAssertEqualMem(e + 136, "00000000001 ", 12); /* mtime */
+ myAssertEqualMem(e + 148, "010707\0 ", 8); /* checksum */
+ myAssertEqualMem(e + 156, "0", 1); /* linkflag */
+ myAssertEqualMem(e + 157, "", 1); /* linkname */
+ myAssertEqualMem(e + 257, "ustar\000000", 8); /* signature/version */
+ myAssertEqualMem(e + 265, "", 1); /* uname */
+ myAssertEqualMem(e + 297, "", 1); /* gname */
+ myAssertEqualMem(e + 329, "000000 ", 8); /* devmajor */
+ myAssertEqualMem(e + 337, "000000 ", 8); /* devminor */
+ myAssertEqualMem(e + 345, "", 1); /* prefix */
+ assert(is_null(e + 0, 512));
+ e += 512;
+
+ /* "dir" */
+ myAssertEqualMem(e + 0, "dir/", 4); /* Filename */
+ myAssertEqualMem(e + 100, "000775 ", 8); /* mode */
+ myAssertEqualMem(e + 108, "000000 ", 8); /* uid */
+ myAssertEqualMem(e + 116, "000000 ", 8); /* gid */
+ myAssertEqualMem(e + 124, "00000000000 ", 12); /* size */
+ myAssertEqualMem(e + 136, "00000000002 ", 12); /* mtime */
+ myAssertEqualMem(e + 148, "007747\0 ", 8); /* checksum */
+ myAssertEqualMem(e + 156, "5", 1); /* typeflag */
+ myAssertEqualMem(e + 157, "", 1); /* linkname */
+ myAssertEqualMem(e + 257, "ustar\000000", 8); /* signature/version */
+ myAssertEqualMem(e + 265, "", 1); /* uname */
+ myAssertEqualMem(e + 297, "", 1); /* gname */
+ myAssertEqualMem(e + 329, "000000 ", 8); /* devmajor */
+ myAssertEqualMem(e + 337, "000000 ", 8); /* devminor */
+ myAssertEqualMem(e + 345, "", 1); /* prefix */
+ assert(is_null(e + 0, 512));
+ e += 512;
+
+ /* "symlink" pointing to "file" */
+ myAssertEqualMem(e + 0, "symlink", 8); /* Filename */
+ myAssertEqualMem(e + 100, "000664 ", 8); /* mode */
+ myAssertEqualMem(e + 108, "000130 ", 8); /* uid */
+ myAssertEqualMem(e + 116, "000142 ", 8); /* gid */
+ myAssertEqualMem(e + 124, "00000000000 ", 12); /* size */
+ myAssertEqualMem(e + 136, "00000000003 ", 12); /* mtime */
+ myAssertEqualMem(e + 148, "011446\0 ", 8); /* checksum */
+ myAssertEqualMem(e + 156, "2", 1); /* linkflag */
+ myAssertEqualMem(e + 157, "file", 5); /* linkname */
+ myAssertEqualMem(e + 257, "ustar\000000", 8); /* signature/version */
+ myAssertEqualMem(e + 265, "", 1); /* uname */
+ myAssertEqualMem(e + 297, "", 1); /* gname */
+ myAssertEqualMem(e + 329, "000000 ", 8); /* devmajor */
+ myAssertEqualMem(e + 337, "000000 ", 8); /* devminor */
+ myAssertEqualMem(e + 345, "", 1); /* prefix */
+ assert(is_null(e + 0, 512));
+ e += 512;
+
+ /* File with 99-char filename */
+ myAssertEqualMem(e + 0, f99, 100); /* Filename */
+ myAssertEqualMem(e + 100, "000664 ", 8); /* mode */
+ myAssertEqualMem(e + 108, "000122 ", 8); /* uid */
+ myAssertEqualMem(e + 116, "000135 ", 8); /* gid */
+ myAssertEqualMem(e + 124, "00000000000 ", 12); /* size */
+ myAssertEqualMem(e + 136, "00000000001 ", 12); /* mtime */
+ myAssertEqualMem(e + 148, "034242\0 ", 8); /* checksum */
+ myAssertEqualMem(e + 156, "0", 1); /* linkflag */
+ myAssertEqualMem(e + 157, "", 1); /* linkname */
+ myAssertEqualMem(e + 257, "ustar\000000", 8); /* signature/version */
+ myAssertEqualMem(e + 265, "", 1); /* uname */
+ myAssertEqualMem(e + 297, "", 1); /* gname */
+ myAssertEqualMem(e + 329, "000000 ", 8); /* devmajor */
+ myAssertEqualMem(e + 337, "000000 ", 8); /* devminor */
+ myAssertEqualMem(e + 345, "", 1); /* prefix */
+ assert(is_null(e + 0, 512));
+ e += 512;
+
+ /* File with 100-char filename */
+ myAssertEqualMem(e + 0, f100, 100); /* Filename */
+ myAssertEqualMem(e + 100, "000664 ", 8); /* mode */
+ myAssertEqualMem(e + 108, "000122 ", 8); /* uid */
+ myAssertEqualMem(e + 116, "000135 ", 8); /* gid */
+ myAssertEqualMem(e + 124, "00000000000 ", 12); /* size */
+ myAssertEqualMem(e + 136, "00000000001 ", 12); /* mtime */
+ myAssertEqualMem(e + 148, "026230\0 ", 8); /* checksum */
+ myAssertEqualMem(e + 156, "0", 1); /* linkflag */
+ myAssertEqualMem(e + 157, "", 1); /* linkname */
+ myAssertEqualMem(e + 257, "ustar\000000", 8); /* signature/version */
+ myAssertEqualMem(e + 265, "", 1); /* uname */
+ myAssertEqualMem(e + 297, "", 1); /* gname */
+ myAssertEqualMem(e + 329, "000000 ", 8); /* devmajor */
+ myAssertEqualMem(e + 337, "000000 ", 8); /* devminor */
+ myAssertEqualMem(e + 345, "", 1); /* prefix */
+ assert(is_null(e + 0, 512));
+ e += 512;
+
+ /* File with 256-char filename */
+ myAssertEqualMem(e + 0, f256 + 156, 100); /* Filename */
+ myAssertEqualMem(e + 100, "000664 ", 8); /* mode */
+ myAssertEqualMem(e + 108, "000122 ", 8); /* uid */
+ myAssertEqualMem(e + 116, "000135 ", 8); /* gid */
+ myAssertEqualMem(e + 124, "00000000000 ", 12); /* size */
+ myAssertEqualMem(e + 136, "00000000001 ", 12); /* mtime */
+ myAssertEqualMem(e + 148, "055570\0 ", 8); /* checksum */
+ myAssertEqualMem(e + 156, "0", 1); /* linkflag */
+ myAssertEqualMem(e + 157, "", 1); /* linkname */
+ myAssertEqualMem(e + 257, "ustar\000000", 8); /* signature/version */
+ myAssertEqualMem(e + 265, "", 1); /* uname */
+ myAssertEqualMem(e + 297, "", 1); /* gname */
+ myAssertEqualMem(e + 329, "000000 ", 8); /* devmajor */
+ myAssertEqualMem(e + 337, "000000 ", 8); /* devminor */
+ myAssertEqualMem(e + 345, f256, 155); /* prefix */
+ assert(is_null(e + 0, 512));
+ e += 512;
+
+ /* TODO: Verify other types of entries. */
+
+ /* Last entry is end-of-archive marker. */
+ assert(is_null(e, 1024));
+ e += 1024;
+
+ assertEqualInt(used, e - buff);
+
+ free(buff);
+}
diff --git a/archivers/libarchive/files/tar/bsdtar.1 b/archivers/libarchive/files/tar/bsdtar.1
index 433f5b364d0..542b0f3f509 100644
--- a/archivers/libarchive/files/tar/bsdtar.1
+++ b/archivers/libarchive/files/tar/bsdtar.1
@@ -22,9 +22,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/usr.bin/tar/bsdtar.1,v 1.40 2008/03/15 03:25:26 kientzle Exp $
+.\" $FreeBSD: src/usr.bin/tar/bsdtar.1,v 1.42 2008/05/17 15:55:29 cperciva Exp $
.\"
-.Dd April 13, 2004
+.Dd May 15, 2008
.Dt BSDTAR 1
.Os
.Sh NAME
@@ -159,7 +159,7 @@ specified pattern.
Note that exclusions take precedence over patterns or filenames
specified on the command line.
.It Fl -format Ar format ( Fl W Cm format Ns = Ns Ar format )
-(c mode only)
+(c, r, u mode only)
Use the specified format for the created archive.
Supported formats include
.Dq cpio ,
@@ -170,6 +170,8 @@ and
Other formats may also be supported; see
.Xr libarchive-formats 5
for more information about currently-supported formats.
+In r and u modes, when extending an existing archive, the format specified
+here must be compatible with the format of the existing archive on disk.
.It Fl f Ar file
Read the archive from or write the archive to the specified file.
The filename can be
@@ -223,6 +225,10 @@ automatically when reading archives.
Do not overwrite existing files.
In particular, if a file appears more than once in an archive,
later copies will not overwrite earlier copies.
+.It Fl -keep-newer-files ( Fl W Cm keep-newer-files )
+(x mode only)
+Do not overwrite existing files that are newer than the
+versions appearing in the archive being extracted.
.It Fl L
(c and r mode only)
All symbolic links will be followed.
@@ -272,6 +278,10 @@ This is often used to read filenames output by the
.Fl print0
option to
.Xr find 1 .
+.It Fl -numeric-owner
+(x mode only)
+Ignore symbolic user and group names when restoring archives to disk,
+only numeric uid and gid values will be obeyed.
.It Fl O
(x, t modes only)
In extract (-x) mode, files will be written to standard out rather than
@@ -279,7 +289,7 @@ being extracted to disk.
In list (-t) mode, the file listing will be written to stderr rather than
the usual stdout.
.It Fl o
-(x mode only)
+(x mode)
Use the user and group of the user running the program rather
than those specified in the archive.
Note that this has no significance unless
@@ -288,6 +298,10 @@ is specified, and the program is being run by the root user.
In this case, the file modes and flags from
the archive will be restored, but ACLs or owner information in
the archive will be discarded.
+.It Fl o
+(c, r, u mode)
+A synonym for
+.Fl -format Ar ustar
.It Fl -one-file-system ( Fl W Cm one-file-system )
(c, r, and u modes)
Do not cross mount points.
@@ -325,12 +339,34 @@ By default, the archive is always read to the very end, since
there can be multiple entries with the same name and, by convention,
later entries overwrite earlier entries.
This option is provided as a performance optimization.
+.It Fl S
+(x mode only)
+Extract files as sparse files.
+For every block on disk, check first if it contains only NULL bytes and seek
+over it otherwise.
+This works similiar to the conv=sparse option of dd.
.It Fl -strip-components Ar count ( Fl W Cm strip-components Ns = Ns Ar count )
(x and t mode only)
Remove the specified number of leading path elements.
Pathnames with fewer elements will be silently skipped.
Note that the pathname is edited after checking inclusion/exclusion patterns
but before security checks.
+.It Fl s Ar pattern
+Modify file or archive member names according to
+.Pa pattern .
+The pattern has the format /old/new/[gps].
+old is a basic regular expression.
+If it doesn't apply, the pattern is skipped.
+new is the replacement string of the matched part.
+~ is substituted with the match, \1 to \9 with the content of
+the corresponding captured group.
+The optional trailing g specifies that matching should continue
+after the matched part and stopped on the first unmatched pattern.
+The optional trailing s specifies that the pattern applies to the value
+of symbolic links.
+The optional trailing p specifies that after a successful substitution
+the original path name and the new path name should be printed to
+standard error.
.It Fl T Ar filename
In x or t mode,
.Nm
@@ -502,6 +538,16 @@ directory and add
.Pa foo2
to the output archive.
.Pp
+An input file in
+.Xr mtree 5
+format can be used to create an output archive with arbitrary ownership,
+permissions, or names that differ from existing data on disk:
+.Pp
+.Dl $ cat input.mtree
+.Dl usr/bin uid=0 gid=0 mode=0755 type=dir
+.Dl usr/bin/ls uid=0 gid=0 mode=0755 type=file content=myls
+.Dl $ tar -cvf output.tar @input.mtree
+.Pp
The
.Fl -newer
and
diff --git a/archivers/libarchive/files/tar/bsdtar.c b/archivers/libarchive/files/tar/bsdtar.c
index 81d9841bd94..2491dda6bca 100644
--- a/archivers/libarchive/files/tar/bsdtar.c
+++ b/archivers/libarchive/files/tar/bsdtar.c
@@ -24,7 +24,7 @@
*/
#include "bsdtar_platform.h"
-__FBSDID("$FreeBSD: src/usr.bin/tar/bsdtar.c,v 1.86 2008/03/15 05:08:21 kientzle Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/tar/bsdtar.c,v 1.90 2008/05/19 18:38:01 cperciva Exp $");
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
@@ -118,7 +118,7 @@ static void version(void);
* non-option. Otherwise, GNU getopt() permutes the arguments and
* screws up -C processing.
*/
-static const char *tar_opts = "+Bb:C:cf:HhI:jkLlmnOoPprtT:UuvW:wX:xyZz";
+static const char *tar_opts = "+Bb:C:cf:HhI:jkLlmnOoPprts:ST:UuvW:wX:xyZz";
/*
* Most of these long options are deliberately not documented. They
@@ -142,6 +142,7 @@ enum {
OPTION_FORMAT,
OPTION_HELP,
OPTION_INCLUDE,
+ OPTION_KEEP_NEWER_FILES,
OPTION_NEWER_CTIME,
OPTION_NEWER_CTIME_THAN,
OPTION_NEWER_MTIME,
@@ -150,6 +151,7 @@ enum {
OPTION_NO_SAME_OWNER,
OPTION_NO_SAME_PERMISSIONS,
OPTION_NULL,
+ OPTION_NUMERIC_OWNER,
OPTION_ONE_FILE_SYSTEM,
OPTION_POSIX,
OPTION_STRIP_COMPONENTS,
@@ -190,6 +192,7 @@ static const struct option tar_longopts[] = {
{ "include", required_argument, NULL, OPTION_INCLUDE },
{ "interactive", no_argument, NULL, 'w' },
{ "insecure", no_argument, NULL, 'P' },
+ { "keep-newer-files", no_argument, NULL, OPTION_KEEP_NEWER_FILES },
{ "keep-old-files", no_argument, NULL, 'k' },
{ "list", no_argument, NULL, 't' },
{ "modification-time", no_argument, NULL, 'm' },
@@ -205,6 +208,7 @@ static const struct option tar_longopts[] = {
{ "no-same-owner", no_argument, NULL, OPTION_NO_SAME_OWNER },
{ "no-same-permissions",no_argument, NULL, OPTION_NO_SAME_PERMISSIONS },
{ "null", no_argument, NULL, OPTION_NULL },
+ { "numeric-owner", no_argument, NULL, OPTION_NUMERIC_OWNER },
{ "one-file-system", no_argument, NULL, OPTION_ONE_FILE_SYSTEM },
{ "posix", no_argument, NULL, OPTION_POSIX },
{ "preserve-permissions", no_argument, NULL, 'p' },
@@ -392,6 +396,9 @@ main(int argc, char **argv)
case 'k': /* GNU tar */
bsdtar->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE;
break;
+ case OPTION_KEEP_NEWER_FILES: /* GNU tar */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER;
+ break;
case 'L': /* BSD convention */
bsdtar->symlink_mode = 'L';
break;
@@ -455,6 +462,9 @@ main(int argc, char **argv)
case OPTION_NULL: /* GNU tar */
bsdtar->option_null++;
break;
+ case OPTION_NUMERIC_OWNER: /* GNU tar */
+ bsdtar->option_numeric_owner++;
+ break;
case 'O': /* GNU tar */
bsdtar->option_stdout = 1;
break;
@@ -494,6 +504,17 @@ main(int argc, char **argv)
case 'r': /* SUSv2 */
set_mode(bsdtar, opt);
break;
+ case 'S': /* NetBSD pax-as-tar */
+ bsdtar->extract_flags |= ARCHIVE_EXTRACT_SPARSE;
+ break;
+ case 's': /* NetBSD pax-as-tar */
+#if HAVE_REGEX_H
+ add_substitution(bsdtar, optarg);
+#else
+ bsdtar_warnc(bsdtar, 0, "-s is not supported by this version of bsdtar");
+ usage(bsdtar);
+#endif
+ break;
case OPTION_STRIP_COMPONENTS: /* GNU tar 1.15 */
bsdtar->strip_components = atoi(optarg);
break;
@@ -638,7 +659,7 @@ main(int argc, char **argv)
only_mode(bsdtar, buff, "cxt");
}
if (bsdtar->create_format != NULL)
- only_mode(bsdtar, "--format", "c");
+ only_mode(bsdtar, "--format", "cru");
if (bsdtar->symlink_mode != '\0') {
strcpy(buff, "-?");
buff[1] = bsdtar->symlink_mode;
@@ -669,6 +690,10 @@ main(int argc, char **argv)
}
cleanup_exclusions(bsdtar);
+#if HAVE_REGEX_H
+ cleanup_substitution(bsdtar);
+#endif
+
if (bsdtar->return_value != 0)
bsdtar_warnc(bsdtar, 0,
"Error exit delayed from previous errors.");
@@ -721,8 +746,8 @@ rewrite_argv(struct bsdtar *bsdtar, int *argc, char **src_argv,
const char *p;
char *src, *dest;
- if (src_argv[0] == NULL ||
- src_argv[1] == NULL || src_argv[1][0] == '-')
+ if (src_argv[0] == NULL || src_argv[1] == NULL ||
+ src_argv[1][0] == '-' || src_argv[1][0] == '\0')
return (src_argv);
*argc += strlen(src_argv[1]) - 1;
@@ -788,7 +813,7 @@ version(void)
printf("bsdtar %s - %s\n",
BSDTAR_VERSION_STRING,
archive_version());
- exit(1);
+ exit(0);
}
static const char *long_help_msg =
diff --git a/archivers/libarchive/files/tar/bsdtar.h b/archivers/libarchive/files/tar/bsdtar.h
index 167b55235e9..9d4733c5045 100644
--- a/archivers/libarchive/files/tar/bsdtar.h
+++ b/archivers/libarchive/files/tar/bsdtar.h
@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/usr.bin/tar/bsdtar.h,v 1.30 2008/03/15 03:06:46 kientzle Exp $
+ * $FreeBSD: src/usr.bin/tar/bsdtar.h,v 1.32 2008/05/22 21:08:36 cperciva Exp $
*/
#include "bsdtar_platform.h"
@@ -65,6 +65,7 @@ struct bsdtar {
char option_no_owner; /* -o */
char option_no_subdirs; /* -n */
char option_null; /* --null */
+ char option_numeric_owner; /* --numeric-owner */
char option_stdout; /* -O */
char option_totals; /* --totals */
char option_unlink_first; /* -U */
@@ -90,12 +91,14 @@ struct bsdtar {
* Data for various subsystems. Full definitions are located in
* the file where they are used.
*/
+ struct archive_entry_linkresolver *resolver;
struct archive_dir *archive_dir; /* for write.c */
struct name_cache *gname_cache; /* for write.c */
- struct links_cache *links_cache; /* for write.c */
struct matching *matching; /* for matching.c */
struct security *security; /* for read.c */
struct name_cache *uname_cache; /* for write.c */
+ struct siginfo_data *siginfo; /* for siginfo.c */
+ struct substitution *substitution; /* for subst.c */
};
void bsdtar_errc(struct bsdtar *, int _eval, int _code,
@@ -114,12 +117,23 @@ int process_lines(struct bsdtar *bsdtar, const char *pathname,
int (*process)(struct bsdtar *, const char *));
void safe_fprintf(FILE *, const char *fmt, ...);
void set_chdir(struct bsdtar *, const char *newdir);
+void siginfo_init(struct bsdtar *);
+void siginfo_setinfo(struct bsdtar *, const char * oper,
+ const char * path, int64_t size);
+void siginfo_printinfo(struct bsdtar *, off_t progress);
+void siginfo_done(struct bsdtar *);
void tar_mode_c(struct bsdtar *bsdtar);
void tar_mode_r(struct bsdtar *bsdtar);
void tar_mode_t(struct bsdtar *bsdtar);
void tar_mode_u(struct bsdtar *bsdtar);
void tar_mode_x(struct bsdtar *bsdtar);
int unmatched_inclusions(struct bsdtar *bsdtar);
+int unmatched_inclusions_warn(struct bsdtar *bsdtar, const char *msg);
void usage(struct bsdtar *);
int yes(const char *fmt, ...);
+#if HAVE_REGEX_H
+void add_substitution(struct bsdtar *, const char *);
+int apply_substitution(struct bsdtar *, const char *, char **, int);
+void cleanup_substitution(struct bsdtar *);
+#endif
diff --git a/archivers/libarchive/files/tar/matching.c b/archivers/libarchive/files/tar/matching.c
index 9a6b2795161..59be17b9a3a 100644
--- a/archivers/libarchive/files/tar/matching.c
+++ b/archivers/libarchive/files/tar/matching.c
@@ -259,6 +259,29 @@ unmatched_inclusions(struct bsdtar *bsdtar)
}
+int
+unmatched_inclusions_warn(struct bsdtar *bsdtar, const char *msg)
+{
+ struct matching *matching;
+ struct match *p;
+
+ matching = bsdtar->matching;
+ if (matching == NULL)
+ return (0);
+
+ p = matching->inclusions;
+ while (p != NULL) {
+ if (p->matches == 0) {
+ bsdtar->return_value = 1;
+ bsdtar_warnc(bsdtar, 0, "%s: %s",
+ p->pattern, msg);
+ }
+ p = p->next;
+ }
+ return (matching->inclusions_unmatched_count);
+}
+
+
#if defined(HAVE_FNMATCH) && defined(HAVE_FNM_LEADING_DIR)
diff --git a/archivers/libarchive/files/tar/read.c b/archivers/libarchive/files/tar/read.c
index 279a10549d7..e1905b24867 100644
--- a/archivers/libarchive/files/tar/read.c
+++ b/archivers/libarchive/files/tar/read.c
@@ -24,7 +24,7 @@
*/
#include "bsdtar_platform.h"
-__FBSDID("$FreeBSD: src/usr.bin/tar/read.c,v 1.36 2008/03/15 03:06:46 kientzle Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/tar/read.c,v 1.37 2008/05/18 06:24:47 cperciva Exp $");
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -77,12 +77,28 @@ void
tar_mode_t(struct bsdtar *bsdtar)
{
read_archive(bsdtar, 't');
+ unmatched_inclusions_warn(bsdtar, "Not found in archive");
}
void
tar_mode_x(struct bsdtar *bsdtar)
{
+ /* We want to catch SIGINFO and SIGUSR1. */
+ siginfo_init(bsdtar);
+
read_archive(bsdtar, 'x');
+
+ unmatched_inclusions_warn(bsdtar, "Not found in archive");
+ /* Restore old SIGINFO + SIGUSR1 handlers. */
+ siginfo_done(bsdtar);
+}
+
+static void
+progress_func(void * cookie)
+{
+ struct bsdtar * bsdtar = cookie;
+
+ siginfo_printinfo(bsdtar, 0);
}
/*
@@ -119,6 +135,12 @@ read_archive(struct bsdtar *bsdtar, char mode)
do_chdir(bsdtar);
+ if (mode == 'x') {
+ /* Set an extract callback so that we can handle SIGINFO. */
+ archive_read_extract_set_progress_callback(a, progress_func,
+ bsdtar);
+ }
+
if (mode == 'x' && bsdtar->option_chroot) {
#if HAVE_CHROOT
if (chroot(".") != 0)
@@ -150,6 +172,11 @@ read_archive(struct bsdtar *bsdtar, char mode)
if (r == ARCHIVE_FATAL)
break;
+ if (bsdtar->option_numeric_owner) {
+ archive_entry_set_uname(entry, NULL);
+ archive_entry_set_gname(entry, NULL);
+ }
+
/*
* Exclude entries that are too old.
*/
@@ -238,6 +265,12 @@ read_archive(struct bsdtar *bsdtar, char mode)
archive_entry_pathname(entry));
fflush(stderr);
}
+
+ /* Tell the SIGINFO-handler code what we're doing. */
+ siginfo_setinfo(bsdtar, "extracting",
+ archive_entry_pathname(entry), 0);
+ siginfo_printinfo(bsdtar, 0);
+
if (bsdtar->option_stdout)
r = archive_read_data_into_fd(a, 1);
else
diff --git a/archivers/libarchive/files/tar/siginfo.c b/archivers/libarchive/files/tar/siginfo.c
new file mode 100644
index 00000000000..249ee34a933
--- /dev/null
+++ b/archivers/libarchive/files/tar/siginfo.c
@@ -0,0 +1,147 @@
+/*-
+ * Copyright 2008 Colin Percival
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "bsdtar_platform.h"
+__FBSDID("$FreeBSD: src/usr.bin/tar/siginfo.c,v 1.2 2008/05/22 21:08:36 cperciva Exp $");
+
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "bsdtar.h"
+
+/* Is there a pending SIGINFO or SIGUSR1? */
+static volatile sig_atomic_t siginfo_received = 0;
+
+struct siginfo_data {
+ /* What sort of operation are we doing? */
+ char * oper;
+
+ /* What path are we handling? */
+ char * path;
+
+ /* How large is the archive entry? */
+ int64_t size;
+
+ /* Old signal handlers. */
+#ifdef SIGINFO
+ void (*siginfo_old)(int);
+#endif
+ void (*sigusr1_old)(int);
+};
+
+static void siginfo_handler(int sig);
+
+/* Handler for SIGINFO / SIGUSR1. */
+static void
+siginfo_handler(int sig)
+{
+
+ (void)sig; /* UNUSED */
+
+ /* Record that SIGINFO or SIGUSR1 has been received. */
+ siginfo_received = 1;
+}
+
+void
+siginfo_init(struct bsdtar *bsdtar)
+{
+
+ /* Allocate space for internal structure. */
+ if ((bsdtar->siginfo = malloc(sizeof(struct siginfo_data))) == NULL)
+ bsdtar_errc(bsdtar, 1, errno, "malloc failed");
+
+ /* Set the strings to NULL so that free() is safe. */
+ bsdtar->siginfo->path = bsdtar->siginfo->oper = NULL;
+
+#ifdef SIGINFO
+ /* We want to catch SIGINFO, if it exists. */
+ bsdtar->siginfo->siginfo_old = signal(SIGINFO, siginfo_handler);
+#endif
+ /* ... and treat SIGUSR1 the same way as SIGINFO. */
+ bsdtar->siginfo->sigusr1_old = signal(SIGUSR1, siginfo_handler);
+}
+
+void
+siginfo_setinfo(struct bsdtar *bsdtar, const char * oper, const char * path,
+ int64_t size)
+{
+
+ /* Free old operation and path strings. */
+ free(bsdtar->siginfo->oper);
+ free(bsdtar->siginfo->path);
+
+ /* Duplicate strings and store entry size. */
+ if ((bsdtar->siginfo->oper = strdup(oper)) == NULL)
+ bsdtar_errc(bsdtar, 1, errno, "Cannot strdup");
+ if ((bsdtar->siginfo->path = strdup(path)) == NULL)
+ bsdtar_errc(bsdtar, 1, errno, "Cannot strdup");
+ bsdtar->siginfo->size = size;
+}
+
+void
+siginfo_printinfo(struct bsdtar *bsdtar, off_t progress)
+{
+
+ /* If there's a signal to handle and we know what we're doing... */
+ if ((siginfo_received == 1) &&
+ (bsdtar->siginfo->path != NULL) &&
+ (bsdtar->siginfo->oper != NULL)) {
+ if (bsdtar->verbose)
+ fprintf(stderr, "\n");
+ if (bsdtar->siginfo->size > 0) {
+ safe_fprintf(stderr, "%s %s (%ju / %" PRId64 ")",
+ bsdtar->siginfo->oper, bsdtar->siginfo->path,
+ (uintmax_t)progress, bsdtar->siginfo->size);
+ } else {
+ safe_fprintf(stderr, "%s %s",
+ bsdtar->siginfo->oper, bsdtar->siginfo->path);
+ }
+ if (!bsdtar->verbose)
+ fprintf(stderr, "\n");
+ siginfo_received = 0;
+ }
+}
+
+void
+siginfo_done(struct bsdtar *bsdtar)
+{
+
+#ifdef SIGINFO
+ /* Restore old SIGINFO handler. */
+ signal(SIGINFO, bsdtar->siginfo->siginfo_old);
+#endif
+ /* And the old SIGUSR1 handler, too. */
+ signal(SIGUSR1, bsdtar->siginfo->sigusr1_old);
+
+ /* Free strings. */
+ free(bsdtar->siginfo->path);
+ free(bsdtar->siginfo->oper);
+
+ /* Free internal data structure. */
+ free(bsdtar->siginfo);
+}
diff --git a/archivers/libarchive/files/tar/subst.c b/archivers/libarchive/files/tar/subst.c
new file mode 100644
index 00000000000..9fcd4d95fcf
--- /dev/null
+++ b/archivers/libarchive/files/tar/subst.c
@@ -0,0 +1,275 @@
+/*-
+ * Copyright (c) 2008 Joerg Sonnenberger
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "bsdtar_platform.h"
+__FBSDID("$FreeBSD$");
+
+#if HAVE_REGEX_H
+#include "bsdtar.h"
+
+#include <errno.h>
+#include <regex.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct subst_rule {
+ struct subst_rule *next;
+ regex_t re;
+ char *result;
+ int global:1, print:1, symlink:1;
+};
+
+struct substitution {
+ struct subst_rule *first_rule, *last_rule;
+};
+
+static void
+init_substitution(struct bsdtar *bsdtar)
+{
+ struct substitution *subst;
+
+ bsdtar->substitution = subst = malloc(sizeof(*subst));
+ if (subst == NULL)
+ bsdtar_errc(bsdtar, 1, errno, "Out of memory");
+ subst->first_rule = subst->last_rule = NULL;
+}
+
+void
+add_substitution(struct bsdtar *bsdtar, const char *rule_text)
+{
+ struct subst_rule *rule;
+ struct substitution *subst;
+ const char *end_pattern, *start_subst;
+ char *pattern;
+ int r;
+
+ if ((subst = bsdtar->substitution) == NULL) {
+ init_substitution(bsdtar);
+ subst = bsdtar->substitution;
+ }
+
+ rule = malloc(sizeof(*rule));
+ if (rule == NULL)
+ bsdtar_errc(bsdtar, 1, errno, "Out of memory");
+ rule->next = NULL;
+
+ if (subst->last_rule == NULL)
+ subst->first_rule = rule;
+ else
+ subst->last_rule->next = rule;
+ subst->last_rule = rule;
+
+ if (*rule_text == '\0')
+ bsdtar_errc(bsdtar, 1, 0, "Empty replacement string");
+ end_pattern = strchr(rule_text + 1, *rule_text);
+ if (end_pattern == NULL)
+ bsdtar_errc(bsdtar, 1, 0, "Invalid replacement string");
+
+ pattern = malloc(end_pattern - rule_text);
+ if (pattern == NULL)
+ bsdtar_errc(bsdtar, 1, errno, "Out of memory");
+ memcpy(pattern, rule_text + 1, end_pattern - rule_text - 1);
+ pattern[end_pattern - rule_text - 1] = '\0';
+
+ if ((r = regcomp(&rule->re, pattern, REG_BASIC)) != 0) {
+ char buf[80];
+ regerror(r, &rule->re, buf, sizeof(buf));
+ bsdtar_errc(bsdtar, 1, 0, "Invalid regular expression: %s", buf);
+ }
+ free(pattern);
+
+ start_subst = end_pattern + 1;
+ end_pattern = strchr(start_subst, *rule_text);
+ if (end_pattern == NULL)
+ bsdtar_errc(bsdtar, 1, 0, "Invalid replacement string");
+
+ rule->result = malloc(end_pattern - start_subst + 1);
+ if (rule->result == NULL)
+ bsdtar_errc(bsdtar, 1, errno, "Out of memory");
+ memcpy(rule->result, start_subst, end_pattern - start_subst);
+ rule->result[end_pattern - start_subst] = '\0';
+
+ rule->global = 0;
+ rule->print = 0;
+ rule->symlink = 0;
+
+ while (*++end_pattern) {
+ switch (*end_pattern) {
+ case 'g':
+ case 'G':
+ rule->global = 1;
+ break;
+ case 'p':
+ case 'P':
+ rule->print = 1;
+ break;
+ case 's':
+ case 'S':
+ rule->symlink = 1;
+ break;
+ default:
+ bsdtar_errc(bsdtar, 1, 0, "Invalid replacement flag %c", *end_pattern);
+ }
+ }
+}
+
+static void
+realloc_strncat(struct bsdtar *bsdtar, char **str, const char *append, size_t len)
+{
+ char *new_str;
+ size_t old_len;
+
+ if (*str == NULL)
+ old_len = 0;
+ else
+ old_len = strlen(*str);
+
+ new_str = malloc(old_len + len + 1);
+ if (new_str == NULL)
+ bsdtar_errc(bsdtar, 1, errno, "Out of memory");
+ memcpy(new_str, *str, old_len);
+ memcpy(new_str + old_len, append, len);
+ new_str[old_len + len] = '\0';
+ free(*str);
+ *str = new_str;
+}
+
+static void
+realloc_strcat(struct bsdtar *bsdtar, char **str, const char *append)
+{
+ char *new_str;
+ size_t old_len;
+
+ if (*str == NULL)
+ old_len = 0;
+ else
+ old_len = strlen(*str);
+
+ new_str = malloc(old_len + strlen(append) + 1);
+ if (new_str == NULL)
+ bsdtar_errc(bsdtar, 1, errno, "Out of memory");
+ memcpy(new_str, *str, old_len);
+ strcpy(new_str + old_len, append);
+ free(*str);
+ *str = new_str;
+}
+
+int
+apply_substitution(struct bsdtar *bsdtar, const char *name, char **result, int symlink_only)
+{
+ const char *path = name;
+ regmatch_t matches[10];
+ size_t i, j;
+ struct subst_rule *rule;
+ struct substitution *subst;
+ int c, got_match, print_match;
+
+ *result = NULL;
+
+ if ((subst = bsdtar->substitution) == NULL)
+ return 0;
+
+ got_match = 0;
+ print_match = 0;
+
+ for (rule = subst->first_rule; rule != NULL; rule = rule->next) {
+ if (symlink_only && !rule->symlink)
+ continue;
+ if (regexec(&rule->re, name, 10, matches, 0))
+ break;
+
+ got_match = 1;
+ print_match |= rule->print;
+ realloc_strncat(bsdtar, result, name, matches[0].rm_so);
+
+ for (i = 0, j = 0; rule->result[i] != '\0'; ++i) {
+ if (rule->result[i] == '~') {
+ realloc_strncat(bsdtar, result, rule->result + j, i - j);
+ realloc_strncat(bsdtar, result, name, matches[0].rm_eo);
+ j = i + 1;
+ continue;
+ }
+ if (rule->result[i] != '\\')
+ continue;
+
+ ++i;
+ c = rule->result[i];
+ switch (c) {
+ case '~':
+ case '\\':
+ realloc_strncat(bsdtar, result, rule->result + j, i - j - 1);
+ j = i;
+ break;
+ case '1' ... '9':
+ realloc_strncat(bsdtar, result, rule->result + j, i - j - 1);
+ if ((size_t)(c - '0') > (size_t)(rule->re.re_nsub)) {
+ free(*result);
+ *result = NULL;
+ return -1;
+ }
+ realloc_strncat(bsdtar, result, name + matches[c - '0'].rm_so, matches[c - '0'].rm_eo - matches[c - '0'].rm_so);
+ j = i + 1;
+ break;
+ default:
+ /* Just continue; */
+ break;
+ }
+
+ }
+
+ realloc_strcat(bsdtar, result, rule->result + j);
+
+ name += matches[0].rm_eo;
+
+ if (!rule->global)
+ break;
+ }
+
+ if (got_match)
+ realloc_strcat(bsdtar, result, name);
+
+ if (print_match)
+ fprintf(stderr, "%s >> %s\n", path, *result);
+
+ return got_match;
+}
+
+void
+cleanup_substitution(struct bsdtar *bsdtar)
+{
+ struct subst_rule *rule;
+ struct substitution *subst;
+
+ if ((subst = bsdtar->substitution) == NULL)
+ return;
+
+ while ((rule = subst->first_rule) != NULL) {
+ subst->first_rule = rule->next;
+ free(rule->result);
+ free(rule);
+ }
+ free(subst);
+}
+#endif /* HAVE_REGEX_H */
diff --git a/archivers/libarchive/files/tar/test/main.c b/archivers/libarchive/files/tar/test/main.c
index d56f574cfb6..3856f3a3c79 100644
--- a/archivers/libarchive/files/tar/test/main.c
+++ b/archivers/libarchive/files/tar/test/main.c
@@ -64,10 +64,14 @@ extern char *optarg;
extern int optind;
#endif
-/* Default is to crash and try to force a core dump on failure. */
-static int dump_on_failure = 1;
+/* Enable core dump on failure. */
+static int dump_on_failure = 0;
+/* Default is to remove temp dirs for successful tests. */
+static int keep_temp_files = 0;
/* Default is to print some basic information about each test. */
static int quiet_flag = 0;
+/* Default is to summarize repeated failures. */
+static int verbose = 0;
/* Cumulative count of component failures. */
static int failures = 0;
/* Cumulative count of skipped component tests. */
@@ -243,7 +247,7 @@ test_assert(const char *file, int line, int value, const char *condition, void *
return (value);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (value);
fprintf(stderr, "%s:%d: Assertion failed\n", file, line);
fprintf(stderr, " Condition: %s\n", condition);
@@ -262,7 +266,7 @@ test_assert_equal_int(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: Ints not equal\n",
file, line);
@@ -314,16 +318,16 @@ test_assert_equal_string(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: Strings not equal\n",
file, line);
fprintf(stderr, " %s = ", e1);
strdump(v1);
- fprintf(stderr, "\n");
+ fprintf(stderr, " (length %d)\n", v1 == NULL ? 0 : strlen(v1));
fprintf(stderr, " %s = ", e2);
strdump(v2);
- fprintf(stderr, "\n");
+ fprintf(stderr, " (length %d)\n", v2 == NULL ? 0 : strlen(v2));
report_failure(extra);
return (0);
}
@@ -372,7 +376,7 @@ test_assert_equal_wstring(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: Unicode strings not equal\n",
file, line);
@@ -442,7 +446,7 @@ test_assert_equal_mem(const char *file, int line,
return (1);
}
failures ++;
- if (previous_failures(file, line))
+ if (!verbose && previous_failures(file, line))
return (0);
fprintf(stderr, "%s:%d: Assertion failed: memory not equal\n",
file, line);
@@ -474,12 +478,13 @@ test_assert_empty_file(const char *f1fmt, ...)
if (stat(f1, &st) != 0) {
fprintf(stderr, "%s:%d: Could not stat: %s\n", test_filename, test_line, f1);
report_failure(NULL);
+ return (0);
}
if (st.st_size == 0)
return (1);
failures ++;
- if (previous_failures(test_filename, test_line))
+ if (!verbose && previous_failures(test_filename, test_line))
return (0);
fprintf(stderr, "%s:%d: File not empty: %s\n", test_filename, test_line, f1);
@@ -526,7 +531,7 @@ test_assert_equal_file(const char *f1, const char *f2pattern, ...)
break;
}
failures ++;
- if (previous_failures(test_filename, test_line))
+ if (!verbose && previous_failures(test_filename, test_line))
return (0);
fprintf(stderr, "%s:%d: Files are not identical\n",
test_filename, test_line);
@@ -536,6 +541,48 @@ test_assert_equal_file(const char *f1, const char *f2pattern, ...)
return (0);
}
+int
+test_assert_file_exists(const char *fpattern, ...)
+{
+ char f[1024];
+ va_list ap;
+
+ va_start(ap, fpattern);
+ vsprintf(f, fpattern, ap);
+ va_end(ap);
+
+ if (!access(f, F_OK))
+ return (1);
+ if (!previous_failures(test_filename, test_line)) {
+ fprintf(stderr, "%s:%d: File doesn't exist\n",
+ test_filename, test_line);
+ fprintf(stderr, " file=\"%s\"\n", f);
+ report_failure(test_extra);
+ }
+ return (0);
+}
+
+int
+test_assert_file_not_exists(const char *fpattern, ...)
+{
+ char f[1024];
+ va_list ap;
+
+ va_start(ap, fpattern);
+ vsprintf(f, fpattern, ap);
+ va_end(ap);
+
+ if (access(f, F_OK))
+ return (1);
+ if (!previous_failures(test_filename, test_line)) {
+ fprintf(stderr, "%s:%d: File exists and shouldn't\n",
+ test_filename, test_line);
+ fprintf(stderr, " file=\"%s\"\n", f);
+ report_failure(test_extra);
+ }
+ return (0);
+}
+
/* assertFileContents() asserts the contents of a file. */
int
test_assert_file_contents(const void *buff, int s, const char *fpattern, ...)
@@ -697,6 +744,12 @@ static int test_run(int i, const char *tmpdir)
(*tests[i].func)();
/* Summarize the results of this test. */
summarize();
+ /* If there were no failures, we can remove the work dir. */
+ if (failures == failures_before) {
+ if (!keep_temp_files && chdir(tmpdir) == 0) {
+ systemf("rm -rf %s", tests[i].name);
+ }
+ }
/* Return appropriate status. */
return (failures == failures_before ? 0 : 1);
}
@@ -710,8 +763,9 @@ static void usage(const char *program)
printf("Default is to run all tests.\n");
printf("Otherwise, specify the numbers of the tests you wish to run.\n");
printf("Options:\n");
- printf(" -k Keep running after failures.\n");
- printf(" Default: Core dump after any failure.\n");
+ printf(" -d Dump core after any failure, for debugging.\n");
+ printf(" -k Keep all temp files.\n");
+ printf(" Default: temp files for successful tests deleted.\n");
#ifdef PROGRAM
printf(" -p <path> Path to executable to be tested.\n");
printf(" Default: path taken from " ENVBASE " environment variable.\n");
@@ -719,6 +773,7 @@ static void usage(const char *program)
printf(" -q Quiet.\n");
printf(" -r <dir> Path to dir containing reference files.\n");
printf(" Default: Current directory.\n");
+ printf(" -v Verbose.\n");
printf("Available tests:\n");
for (i = 0; i < limit; i++)
printf(" %d: %s\n", i, tests[i].name);
@@ -811,9 +866,9 @@ int main(int argc, char **argv)
testprog = getenv(ENVBASE);
#endif
- /* Allow -k to be controlled through the environment. */
- if (getenv(ENVBASE "_KEEP_GOING") != NULL)
- dump_on_failure = 0;
+ /* Allow -d to be controlled through the environment. */
+ if (getenv(ENVBASE "_DEBUG") != NULL)
+ dump_on_failure = 1;
/* Get the directory holding test files from environment. */
refdir = getenv(ENVBASE "_TEST_FILES");
@@ -821,10 +876,13 @@ int main(int argc, char **argv)
/*
* Parse options.
*/
- while ((opt = getopt(argc, argv, "kp:qr:")) != -1) {
+ while ((opt = getopt(argc, argv, "dkp:qr:v")) != -1) {
switch (opt) {
+ case 'd':
+ dump_on_failure = 1;
+ break;
case 'k':
- dump_on_failure = 0;
+ keep_temp_files = 1;
break;
case 'p':
#ifdef PROGRAM
@@ -839,6 +897,9 @@ int main(int argc, char **argv)
case 'r':
refdir = optarg;
break;
+ case 'v':
+ verbose = 1;
+ break;
case '?':
default:
usage(progname);
@@ -887,6 +948,7 @@ int main(int argc, char **argv)
--p;
*p = '\0';
}
+ systemf("rm %s/refdir", tmpdir);
}
/*
@@ -942,5 +1004,9 @@ int main(int argc, char **argv)
free(refdir_alloc);
+ /* If the final tmpdir is empty, we can remove it. */
+ /* This should be the usual case when all tests succeed. */
+ rmdir(tmpdir);
+
return (tests_failed);
}
diff --git a/archivers/libarchive/files/tar/test/test.h b/archivers/libarchive/files/tar/test/test.h
index 314fbebf7ea..416f0dd62e7 100644
--- a/archivers/libarchive/files/tar/test/test.h
+++ b/archivers/libarchive/files/tar/test/test.h
@@ -102,6 +102,12 @@
/* Assert that a file is empty; supports printf-style arguments. */
#define assertEmptyFile \
test_setup(__FILE__, __LINE__);test_assert_empty_file
+/* Assert that a file exists; supports printf-style arguments. */
+#define assertFileExists \
+ test_setup(__FILE__, __LINE__);test_assert_file_exists
+/* Assert that a file exists; supports printf-style arguments. */
+#define assertFileNotExists \
+ test_setup(__FILE__, __LINE__);test_assert_file_not_exists
/*
* This would be simple with C99 variadic macros, but I don't want to
@@ -124,6 +130,8 @@ int test_assert_equal_string(const char *, int, const char *v1, const char *, co
int test_assert_equal_wstring(const char *, int, const wchar_t *v1, const char *, const wchar_t *v2, const char *, void *);
int test_assert_equal_mem(const char *, int, const char *, const char *, const char *, const char *, size_t, const char *, void *);
int test_assert_file_contents(const void *, int, const char *, ...);
+int test_assert_file_exists(const char *, ...);
+int test_assert_file_not_exists(const char *, ...);
/* Like sprintf, then system() */
int systemf(const char * fmt, ...);
@@ -141,4 +149,3 @@ void extract_reference_file(const char *);
/* Pathname of exe to be tested. */
char *testprog;
-
diff --git a/archivers/libarchive/files/tar/test/test_0.c b/archivers/libarchive/files/tar/test/test_0.c
new file mode 100644
index 00000000000..7a72af1c8ed
--- /dev/null
+++ b/archivers/libarchive/files/tar/test/test_0.c
@@ -0,0 +1,62 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+/*
+ * This first test does basic sanity checks on the environment. For
+ * most of these, we just exit on failure.
+ */
+
+DEFINE_TEST(test_0)
+{
+ struct stat st;
+
+ failure("File %s does not exist?!", testprog);
+ if (!assertEqualInt(0, stat(testprog, &st)))
+ exit(1);
+
+ failure("%s is not executable?!", testprog);
+ if (!assert((st.st_mode & 0111) != 0))
+ exit(1);
+
+ /*
+ * Try to succesfully run the program; this requires that
+ * we know some option that will succeed.
+ */
+ if (0 == systemf("%s --version >/dev/null", testprog)) {
+ /* This worked. */
+ } else if (0 == systemf("%s -W version >/dev/null", testprog)) {
+ /* This worked. */
+ } else {
+ failure("Unable to successfully run any of the following:\n"
+ " * %s --version\n"
+ " * %s -W version\n",
+ testprog, testprog);
+ assert(0);
+ }
+
+ /* TODO: Ensure that our reference files are available. */
+}
diff --git a/archivers/libarchive/files/tar/test/test_copy.c b/archivers/libarchive/files/tar/test/test_copy.c
index 4e4aa9f3051..52b9b786673 100644
--- a/archivers/libarchive/files/tar/test/test_copy.c
+++ b/archivers/libarchive/files/tar/test/test_copy.c
@@ -35,11 +35,16 @@ create_tree(void)
assertEqualInt(0, mkdir("original", 0775));
chdir("original");
+ assertEqualInt(0, mkdir("f", 0775));
+ assertEqualInt(0, mkdir("l", 0775));
+ assertEqualInt(0, mkdir("m", 0775));
+ assertEqualInt(0, mkdir("s", 0775));
+ assertEqualInt(0, mkdir("d", 0775));
- buff[0] = 'f';
- buff[1] = '_';
for (i = 0; i < 200; i++) {
- /* Create a file named "f_abcdef..." */
+ buff[0] = 'f';
+ buff[1] = '/';
+ /* Create a file named "f/abcdef..." */
buff[i + 2] = 'a' + (i % 26);
buff[i + 3] = '\0';
fd = open(buff, O_CREAT | O_WRONLY, 0644);
@@ -47,23 +52,27 @@ create_tree(void)
assertEqualInt(i + 3, write(fd, buff, strlen(buff)));
close(fd);
- /* Create a link named "l_abcdef..." to the above. */
+ /* Create a link named "l/abcdef..." to the above. */
strcpy(buff2, buff);
buff2[0] = 'l';
assertEqualInt(0, link(buff, buff2));
- /* Create a link named "m_abcdef..." to the above. */
+ /* Create a link named "m/abcdef..." to the above. */
strcpy(buff2, buff);
buff2[0] = 'm';
assertEqualInt(0, link(buff, buff2));
- /* Create a symlink named "s_abcdef..." to the above. */
- buff2[0] = 's';
- assertEqualInt(0, symlink(buff, buff2));
-
- /* Create a dir named "d_abcdef...". */
- buff2[0] = 'd';
- assertEqualInt(0, mkdir(buff2, 0775));
+ /* Create a symlink named "s/abcdef..." to the above. */
+ strcpy(buff2 + 3, buff);
+ buff[0] = 's';
+ buff2[0] = '.';
+ buff2[1] = '.';
+ buff2[2] = '/';
+ assertEqualInt(0, symlink(buff2, buff));
+
+ /* Create a dir named "d/abcdef...". */
+ buff[0] = 'd';
+ assertEqualInt(0, mkdir(buff, 0775));
}
chdir("..");
@@ -77,35 +86,44 @@ verify_tree(int limit)
{
struct stat st, st2;
char filename[260];
+ char name1[260];
+ char name2[260];
char contents[260];
- int i, r;
+ int i, j, r;
int fd;
int len;
- const char *p;
+ const char *p, *dp;
DIR *d;
struct dirent *de;
/* Generate the names we know should be there and verify them. */
- for (i = 0; i < 200; i++) {
- /* Verify a file named "f_abcdef..." */
- filename[0] = 'f';
- filename[1] = '_';
- filename[i + 2] = 'a' + (i % 26);
- filename[i + 3] = '\0';
+ for (i = 1; i < 200; i++) {
+ /* Generate a base name of the correct length. */
+ for (j = 0; j < i; ++j)
+ filename[j] = 'a' + (j % 26);
+#if 0
+ for (n = i; n > 0; n /= 10)
+ filename[--j] = '0' + (n % 10);
+#endif
+ filename[i] = '\0';
+
+ /* Verify a file named "f/abcdef..." */
+ strcpy(name1, "f/");
+ strcat(name1, filename);
if (limit != LIMIT_USTAR || strlen(filename) <= 100) {
- fd = open(filename, O_RDONLY);
+ fd = open(name1, O_RDONLY);
failure("Couldn't open \"%s\": %s",
- filename, strerror(errno));
+ name1, strerror(errno));
if (assert(fd >= 0)) {
len = read(fd, contents, i + 10);
close(fd);
- assertEqualInt(len, i + 3);
+ assertEqualInt(len, i + 2);
/* Verify contents of 'contents' */
contents[len] = '\0';
failure("Each test file contains its own name");
- assertEqualString(filename, contents);
- /* stat() file and get dev/ino for next check */
- assertEqualInt(0, lstat(filename, &st));
+ assertEqualString(name1, contents);
+ /* stat() for dev/ino for next check */
+ assertEqualInt(0, lstat(name1, &st));
}
}
@@ -114,18 +132,19 @@ verify_tree(int limit)
* "original/" as part of the name, so the link
* names here can't exceed 91 chars.
*/
- if (limit != LIMIT_USTAR || strlen(filename) <= 91) {
- /* Verify hardlink "l_abcdef..." */
- filename[0] = 'l';
- assertEqualInt(0, (r = lstat(filename, &st2)));
+ strcpy(name2, "l/");
+ strcat(name2, filename);
+ if (limit != LIMIT_USTAR || strlen(name2) <= 100) {
+ /* Verify hardlink "l/abcdef..." */
+ assertEqualInt(0, (r = lstat(name2, &st2)));
if (r == 0) {
assertEqualInt(st2.st_dev, st.st_dev);
assertEqualInt(st2.st_ino, st.st_ino);
}
/* Verify hardlink "m_abcdef..." */
- filename[0] = 'm';
- assertEqualInt(0, (r = lstat(filename, &st2)));
+ name2[0] = 'm';
+ assertEqualInt(0, (r = lstat(name2, &st2)));
if (r == 0) {
assertEqualInt(st2.st_dev, st.st_dev);
assertEqualInt(st2.st_ino, st.st_ino);
@@ -136,30 +155,32 @@ verify_tree(int limit)
* Symlink text doesn't include the 'original/' prefix,
* so the limit here is 100 characters.
*/
- /* Verify symlink "s_abcdef..." */
- filename[0] = 's';
- if (limit != LIMIT_USTAR || strlen(filename) <= 100) {
+ /* Verify symlink "s/abcdef..." */
+ strcpy(name2, "../s/");
+ strcat(name2, filename);
+ if (limit != LIMIT_USTAR || strlen(name2) <= 100) {
/* This is a symlink. */
failure("Couldn't stat %s (length %d)",
filename, strlen(filename));
- if (assertEqualInt(0, lstat(filename, &st2))) {
+ if (assertEqualInt(0, lstat(name2 + 3, &st2))) {
assert(S_ISLNK(st2.st_mode));
/* This is a symlink to the file above. */
- failure("Couldn't stat %s", filename);
- if (assertEqualInt(0, stat(filename, &st2))) {
+ failure("Couldn't stat %s", name2 + 3);
+ if (assertEqualInt(0, stat(name2 + 3, &st2))) {
assertEqualInt(st2.st_dev, st.st_dev);
assertEqualInt(st2.st_ino, st.st_ino);
}
}
}
- /* Verify dir "d_abcdef...". */
- filename[0] = 'd';
- if (limit != LIMIT_USTAR || strlen(filename) <= 100) {
+ /* Verify dir "d/abcdef...". */
+ strcpy(name1, "d/");
+ strcat(name1, filename);
+ if (limit != LIMIT_USTAR || strlen(filename) < 100) {
/* This is a dir. */
failure("Couldn't stat %s (length %d)",
- filename, strlen(filename));
- if (assertEqualInt(0, lstat(filename, &st2))) {
+ name1, strlen(filename));
+ if (assertEqualInt(0, lstat(name1, &st2))) {
if (assert(S_ISDIR(st2.st_mode))) {
/* TODO: opendir/readdir this
* directory and make sure
@@ -171,38 +192,47 @@ verify_tree(int limit)
}
/* Now make sure nothing is there that shouldn't be. */
- d = opendir(".");
- while ((de = readdir(d)) != NULL) {
- p = de->d_name;
- switch(p[0]) {
- case 'l': case 'm':
- if (limit == LIMIT_USTAR) {
- failure("strlen(p) = %d", strlen(p));
- assert(strlen(p) <= 91);
- }
- case 'd': case 'f': case 's':
- if (limit == LIMIT_USTAR) {
- failure("strlen(p)=%d", strlen(p));
- assert(strlen(p) <= 100);
+ for (dp = "dflms"; *dp != '\0'; ++dp) {
+ char dir[2];
+ dir[0] = *dp; dir[1] = '\0';
+ d = opendir(dir);
+ while ((de = readdir(d)) != NULL) {
+ p = de->d_name;
+ switch(dp[0]) {
+ case 'l': case 'm':
+ if (limit == LIMIT_USTAR) {
+ failure("strlen(p) = %d", strlen(p));
+ assert(strlen(p) <= 100);
+ }
+ case 'd':
+ if (limit == LIMIT_USTAR) {
+ failure("strlen(p)=%d", strlen(p));
+ assert(strlen(p) < 100);
+ }
+ case 'f': case 's':
+ if (limit == LIMIT_USTAR) {
+ failure("strlen(p)=%d", strlen(p));
+ assert(strlen(p) < 101);
+ }
+ /* Our files have very particular filename patterns. */
+ if (p[0] != '.' || (p[1] != '.' && p[1] != '\0')) {
+ for (i = 0; p[i] != '\0' && i < 200; i++) {
+ failure("i=%d, p[i]='%c' 'a'+(i%%26)='%c'", i, p[i], 'a' + (i % 26));
+ assertEqualInt(p[i], 'a' + (i % 26));
+ }
+ assert(p[i] == '\0');
+ }
+ break;
+ case '.':
+ assert(p[1] == '\0' || (p[1] == '.' && p[2] == '\0'));
+ break;
+ default:
+ failure("File %s shouldn't be here", p);
+ assert(0);
}
- /* Our files have very particular filename patterns. */
- assert(p[1] == '_' && p[2] == 'a');
- assert(p[2] == 'a');
- p += 2;
- for (i = 0; p[i] != '\0' && i < 200; i++)
- assert(p[i] == 'a' + (i % 26));
- assert(p[i] == '\0');
- break;
- case '.':
- assert(p[1] == '\0' || (p[1] == '.' && p[2] == '\0'));
- break;
- default:
- failure("File %s shouldn't be here", p);
- assert(0);
}
-
+ closedir(d);
}
- closedir(d);
}
static void
@@ -211,12 +241,12 @@ copy_basic(void)
int r;
assertEqualInt(0, mkdir("plain", 0775));
- chdir("plain");
+ assertEqualInt(0, chdir("plain"));
/*
* Use the tar program to create an archive.
*/
- r = systemf("%s cf archive -C .. original >pack.out 2>pack.err",
+ r = systemf("%s cf archive -C ../original f d l m s >pack.out 2>pack.err",
testprog);
failure("Error invoking \"%s cf\"", testprog);
assertEqualInt(r, 0);
@@ -236,9 +266,8 @@ copy_basic(void)
assertEmptyFile("unpack.err");
assertEmptyFile("unpack.out");
- chdir("original");
verify_tree(LIMIT_NONE);
- chdir("../..");
+ assertEqualInt(0, chdir(".."));
}
static void
@@ -248,18 +277,20 @@ copy_ustar(void)
int r;
assertEqualInt(0, mkdir(target, 0775));
- chdir(target);
+ assertEqualInt(0, chdir(target));
/*
* Use the tar program to create an archive.
*/
- r = systemf("%s cf archive --format=ustar -C .. original >pack.out 2>pack.err",
+ r = systemf("%s cf archive --format=ustar -C ../original f d l m s >pack.out 2>pack.err",
testprog);
failure("Error invoking \"%s cf archive --format=ustar\"", testprog);
assertEqualInt(r, 0);
/* Verify that nothing went to stdout. */
assertEmptyFile("pack.out");
+ /* Stderr is non-empty, since there are a bunch of files
+ * with filenames too long to archive. */
/*
* Use tar to unpack the archive into another directory.
diff --git a/archivers/libarchive/files/tar/test/test_option_T.c b/archivers/libarchive/files/tar/test/test_option_T.c
new file mode 100644
index 00000000000..eec40bb4587
--- /dev/null
+++ b/archivers/libarchive/files/tar/test/test_option_T.c
@@ -0,0 +1,142 @@
+/*-
+ * Copyright (c) 2003-2008 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+static int
+touch(const char *fn)
+{
+ int fd = open(fn, O_RDWR | O_CREAT);
+ failure("Couldn't create file '%s', fd=%d, errno=%d (%s)\n",
+ fn, fd, errno, strerror(errno));
+ if (!assert(fd > 0))
+ return (0); /* Failure. */
+ close(fd);
+ return (1); /* Success */
+}
+
+DEFINE_TEST(test_option_T)
+{
+ FILE *f;
+
+ /* Create a simple dir heirarchy; bail if anything fails. */
+ if (!assertEqualInt(0, mkdir("d1", 0755))) return;
+ if (!assertEqualInt(0, mkdir("d1/d2", 0755))) return;
+ if (!touch("d1/f1")) return;
+ if (!touch("d1/f2")) return;
+ if (!touch("d1/d2/f3")) return;
+ if (!touch("d1/d2/f4")) return;
+ if (!touch("d1/d2/f5")) return;
+
+ /* Populate a file list */
+ f = fopen("filelist", "w+");
+ if (!assert(f != NULL))
+ return;
+ fprintf(f, "d1/f1\n");
+ fprintf(f, "d1/d2/f4\n");
+ fclose(f);
+
+ /* Populate a second file list */
+ f = fopen("filelist2", "w+");
+ if (!assert(f != NULL))
+ return;
+ fprintf(f, "d1/d2/f3\n");
+ fprintf(f, "d1/d2/f5\n");
+ fclose(f);
+
+ /* Use -c -T to archive up the files. */
+ systemf("%s -c -f test1.tar -T filelist > test1.out 2> test1.err",
+ testprog);
+ assertEmptyFile("test1.out");
+ assertEmptyFile("test1.err");
+
+ /* Use -x -T to dearchive the files */
+ if (!assertEqualInt(0, mkdir("test1", 0755))) return;
+ systemf("%s -x -f test1.tar -T filelist -C test1"
+ " > test1b.out 2> test1b.err", testprog);
+ assertEmptyFile("test1b.out");
+ assertEmptyFile("test1b.err");
+
+ /* Verify the files were extracted. */
+ assertFileExists("test1/d1/f1");
+ assertFileNotExists("test1/d1/f2");
+ assertFileNotExists("test1/d1/d2/f3");
+ assertFileExists("test1/d1/d2/f4");
+ assertFileNotExists("test1/d1/d2/f5");
+
+ /* Use -r -T to add more files to the archive. */
+ systemf("%s -r -f test1.tar -T filelist2 > test2.out 2> test2.err",
+ testprog);
+ assertEmptyFile("test2.out");
+ assertEmptyFile("test2.err");
+
+ /* Use -x without -T to dearchive the files (ensure -r worked) */
+ if (!assertEqualInt(0, mkdir("test3", 0755))) return;
+ systemf("%s -x -f test1.tar -C test3"
+ " > test3.out 2> test3.err", testprog);
+ assertEmptyFile("test3.out");
+ assertEmptyFile("test3.err");
+ /* Verify the files were extracted.*/
+ assertFileExists("test3/d1/f1");
+ assertFileNotExists("test3/d1/f2");
+ assertFileExists("test3/d1/d2/f3");
+ assertFileExists("test3/d1/d2/f4");
+ assertFileExists("test3/d1/d2/f5");
+
+ /* Use -x -T to dearchive the files (verify -x -T together) */
+ if (!assertEqualInt(0, mkdir("test2", 0755))) return;
+ systemf("%s -x -f test1.tar -T filelist -C test2"
+ " > test2b.out 2> test2b.err", testprog);
+ assertEmptyFile("test2b.out");
+ assertEmptyFile("test2b.err");
+ /* Verify the files were extracted.*/
+ assertFileExists("test2/d1/f1");
+ assertFileNotExists("test2/d1/f2");
+ assertFileNotExists("test2/d1/d2/f3");
+ assertFileExists("test2/d1/d2/f4");
+ assertFileNotExists("test2/d1/d2/f5");
+
+ assertEqualInt(0, mkdir("test4", 0755));
+ assertEqualInt(0, mkdir("test4_out", 0755));
+ assertEqualInt(0, mkdir("test4_out2", 0755));
+ assertEqualInt(0, mkdir("test4/d1", 0755));
+ assertEqualInt(1, touch("test4/d1/foo"));
+
+ systemf("%s -cf - -s /foo/bar/ test4/d1/foo | %s -xf - -C test4_out",
+ testprog, testprog);
+ assertEmptyFile("test4_out/test4/d1/bar");
+ systemf("%s -cf - -s /d1/d2/ test4/d1/foo | %s -xf - -C test4_out",
+ testprog, testprog);
+ assertEmptyFile("test4_out/test4/d2/foo");
+ systemf("%s -cf - -s ,test4/d1/foo,, test4/d1/foo | %s -tvf - > test4.lst",
+ testprog, testprog);
+ assertEmptyFile("test4.lst");
+ systemf("%s -cf - test4/d1/foo | %s -xf - -s /foo/bar/ -C test4_out2",
+ testprog, testprog);
+ assertEmptyFile("test4_out2/test4/d1/bar");
+
+ /* TODO: Include some use of -C directory-changing within the filelist. */
+ /* I'm pretty sure -C within the filelist is broken on extract. */
+}
diff --git a/archivers/libarchive/files/tar/test/test_patterns.c b/archivers/libarchive/files/tar/test/test_patterns.c
new file mode 100644
index 00000000000..e7b1679fd9d
--- /dev/null
+++ b/archivers/libarchive/files/tar/test/test_patterns.c
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 2003-2007 Tim Kientzle
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+DEFINE_TEST(test_patterns)
+{
+ int fd, r;
+
+ /*
+ * Test basic command-line pattern handling.
+ */
+
+ /*
+ * John Baldwin reported this problem in PR bin/121598
+ */
+ fd = open("foo", O_CREAT | O_WRONLY, 0644);
+ assert(fd >= 0);
+ close(fd);
+ r = systemf("%s zcfv tar1.tgz foo > tar1a.out 2> tar1a.err", testprog);
+ assertEqualInt(r, 0);
+ r = systemf("%s zxfv tar1.tgz foo bar > tar1b.out 2> tar1b.err", testprog);
+ failure("tar should return non-zero because a file was given on the command line that's not in the archive");
+ assert(r != 0);
+}
diff --git a/archivers/libarchive/files/tar/test/test_version.c b/archivers/libarchive/files/tar/test/test_version.c
index de5e1100bd9..6f2f6a0b5a0 100644
--- a/archivers/libarchive/files/tar/test/test_version.c
+++ b/archivers/libarchive/files/tar/test/test_version.c
@@ -37,6 +37,14 @@ DEFINE_TEST(test_version)
r = systemf("%s --version >version.stdout 2>version.stderr", testprog);
+ if (r != 0)
+ r = systemf("%s -W version >version.stdout 2>version.stderr",
+ testprog);
+ failure("Unable to run either %s --version or %s -W version",
+ testprog, testprog);
+ if (!assert(r == 0))
+ return;
+
/* --version should generate nothing to stdout. */
assertEmptyFile("version.stderr");
/* Verify format of version message. */
diff --git a/archivers/libarchive/files/tar/util.c b/archivers/libarchive/files/tar/util.c
index 68ff8d8f5e3..1d50dcd8010 100644
--- a/archivers/libarchive/files/tar/util.c
+++ b/archivers/libarchive/files/tar/util.c
@@ -178,7 +178,7 @@ yes(const char *fmt, ...)
fprintf(stderr, " (y/N)? ");
fflush(stderr);
- l = read(2, buff, sizeof(buff));
+ l = read(2, buff, sizeof(buff) - 1);
if (l <= 0)
return (0);
buff[l] = 0;
@@ -215,7 +215,7 @@ process_lines(struct bsdtar *bsdtar, const char *pathname,
{
FILE *f;
char *buff, *buff_end, *line_start, *line_end, *p;
- size_t buff_length, bytes_read, bytes_wanted;
+ size_t buff_length, new_buff_length, bytes_read, bytes_wanted;
int separator;
int ret;
@@ -262,7 +262,12 @@ process_lines(struct bsdtar *bsdtar, const char *pathname,
line_start = buff;
} else {
/* Line is too big; enlarge the buffer. */
- p = realloc(buff, buff_length *= 2);
+ new_buff_length = buff_length * 2;
+ if (new_buff_length <= buff_length)
+ bsdtar_errc(bsdtar, 1, ENOMEM,
+ "Line too long in %s", pathname);
+ buff_length = new_buff_length;
+ p = realloc(buff, buff_length);
if (p == NULL)
bsdtar_errc(bsdtar, 1, ENOMEM,
"Line too long in %s", pathname);
@@ -351,10 +356,51 @@ int
edit_pathname(struct bsdtar *bsdtar, struct archive_entry *entry)
{
const char *name = archive_entry_pathname(entry);
+#if HAVE_REGEX_H
+ char *subst_name;
+#endif
+ int r;
+
+#if HAVE_REGEX_H
+ r = apply_substitution(bsdtar, name, &subst_name, 0);
+ if (r == -1) {
+ bsdtar_warnc(bsdtar, 0, "Invalid substituion, skipping entry");
+ return 1;
+ }
+ if (r == 1) {
+ archive_entry_copy_pathname(entry, subst_name);
+ free(subst_name);
+ if (*subst_name == '\0')
+ return -1;
+ name = archive_entry_pathname(entry);
+ }
+
+ if (archive_entry_hardlink(entry)) {
+ r = apply_substitution(bsdtar, archive_entry_hardlink(entry), &subst_name, 1);
+ if (r == -1) {
+ bsdtar_warnc(bsdtar, 0, "Invalid substituion, skipping entry");
+ return 1;
+ }
+ if (r == 1) {
+ archive_entry_copy_hardlink(entry, subst_name);
+ free(subst_name);
+ }
+ }
+ if (archive_entry_symlink(entry) != NULL) {
+ r = apply_substitution(bsdtar, archive_entry_symlink(entry), &subst_name, 1);
+ if (r == -1) {
+ bsdtar_warnc(bsdtar, 0, "Invalid substituion, skipping entry");
+ return 1;
+ }
+ if (r == 1) {
+ archive_entry_copy_symlink(entry, subst_name);
+ free(subst_name);
+ }
+ }
+#endif
/* Strip leading dir names as per --strip-components option. */
- if (bsdtar->strip_components > 0) {
- int r = bsdtar->strip_components;
+ if ((r = bsdtar->strip_components) > 0) {
const char *p = name;
while (r > 0) {
@@ -368,6 +414,10 @@ edit_pathname(struct bsdtar *bsdtar, struct archive_entry *entry)
return (1);
}
}
+ while (*name == '/')
+ ++name;
+ if (*name == '\0')
+ return (1);
}
/* Strip redundant leading '/' characters. */
diff --git a/archivers/libarchive/files/tar/write.c b/archivers/libarchive/files/tar/write.c
index 82736afcd98..432612ac7a0 100644
--- a/archivers/libarchive/files/tar/write.c
+++ b/archivers/libarchive/files/tar/write.c
@@ -24,7 +24,7 @@
*/
#include "bsdtar_platform.h"
-__FBSDID("$FreeBSD: src/usr.bin/tar/write.c,v 1.65 2008/03/15 02:41:44 kientzle Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/tar/write.c,v 1.69 2008/05/23 05:07:22 cperciva Exp $");
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -87,9 +87,6 @@ __FBSDID("$FreeBSD: src/usr.bin/tar/write.c,v 1.65 2008/03/15 02:41:44 kientzle
static const char * const NO_NAME = "(noname)";
-/* Initial size of link cache. */
-#define links_cache_initial_size 1024
-
struct archive_dir_entry {
struct archive_dir_entry *next;
time_t mtime_sec;
@@ -101,21 +98,6 @@ struct archive_dir {
struct archive_dir_entry *head, *tail;
};
-struct links_cache {
- unsigned long number_entries;
- size_t number_buckets;
- struct links_entry **buckets;
-};
-
-struct links_entry {
- struct links_entry *next;
- struct links_entry *previous;
- int links;
- dev_t dev;
- ino_t ino;
- char *name;
-};
-
struct name_cache {
int probes;
int hits;
@@ -139,13 +121,10 @@ static int archive_names_from_file_helper(struct bsdtar *bsdtar,
static int copy_file_data(struct bsdtar *bsdtar,
struct archive *a, struct archive *ina);
static void create_cleanup(struct bsdtar *);
-static void free_buckets(struct bsdtar *, struct links_cache *);
static void free_cache(struct name_cache *cache);
static const char * lookup_gname(struct bsdtar *bsdtar, gid_t gid);
static int lookup_gname_helper(struct bsdtar *bsdtar,
const char **name, id_t gid);
-static void lookup_hardlink(struct bsdtar *,
- struct archive_entry *entry, const struct stat *);
static const char * lookup_uname(struct bsdtar *bsdtar, uid_t uid);
static int lookup_uname_helper(struct bsdtar *bsdtar,
const char **name, id_t uid);
@@ -160,6 +139,8 @@ static void write_archive(struct archive *, struct bsdtar *);
static void write_entry(struct bsdtar *, struct archive *,
const struct stat *, const char *pathname,
const char *accpath);
+static void write_entry_backend(struct bsdtar *, struct archive *,
+ struct archive_entry *, int);
static int write_file_data(struct bsdtar *, struct archive *,
int fd);
static void write_hierarchy(struct bsdtar *, struct archive *,
@@ -174,6 +155,9 @@ tar_mode_c(struct bsdtar *bsdtar)
if (*bsdtar->argv == NULL && bsdtar->names_from_file == NULL)
bsdtar_errc(bsdtar, 1, 0, "no files or directories specified");
+ /* We want to catch SIGINFO and SIGUSR1. */
+ siginfo_init(bsdtar);
+
a = archive_write_new();
/* Support any format that the library supports. */
@@ -242,6 +226,9 @@ tar_mode_c(struct bsdtar *bsdtar)
}
archive_write_finish(a);
+
+ /* Restore old SIGINFO + SIGUSR1 handlers. */
+ siginfo_done(bsdtar);
}
/*
@@ -260,6 +247,9 @@ tar_mode_r(struct bsdtar *bsdtar)
/* Sanity-test some arguments and the file. */
test_for_append(bsdtar);
+ /* We want to catch SIGINFO and SIGUSR1. */
+ siginfo_init(bsdtar);
+
format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
bsdtar->fd = open(bsdtar->filename, O_RDWR | O_CREAT, 0666);
@@ -358,6 +348,9 @@ tar_mode_u(struct bsdtar *bsdtar)
/* Sanity-test some arguments and the file. */
test_for_append(bsdtar);
+ /* We want to catch SIGINFO and SIGUSR1. */
+ siginfo_init(bsdtar);
+
bsdtar->fd = open(bsdtar->filename, O_RDWR);
if (bsdtar->fd < 0)
bsdtar_errc(bsdtar, 1, errno,
@@ -442,6 +435,12 @@ static void
write_archive(struct archive *a, struct bsdtar *bsdtar)
{
const char *arg;
+ struct archive_entry *entry, *sparse_entry;
+
+ if ((bsdtar->resolver = archive_entry_linkresolver_new()) == NULL)
+ bsdtar_errc(bsdtar, 1, 0, "cannot create link resolver");
+ archive_entry_linkresolver_set_strategy(bsdtar->resolver,
+ archive_format(a));
if (bsdtar->names_from_file != NULL)
archive_names_from_file(bsdtar, a);
@@ -474,6 +473,16 @@ write_archive(struct archive *a, struct bsdtar *bsdtar)
bsdtar->argv++;
}
+ entry = NULL;
+ archive_entry_linkify(bsdtar->resolver, &entry, &sparse_entry);
+ while (entry != NULL) {
+ int fd = -1;
+ write_entry_backend(bsdtar, a, entry, fd);
+ archive_entry_free(entry);
+ entry = NULL;
+ archive_entry_linkify(bsdtar->resolver, &entry, &sparse_entry);
+ }
+
create_cleanup(bsdtar);
if (archive_write_close(a)) {
bsdtar_warnc(bsdtar, 0, "%s", archive_error_string(a));
@@ -574,6 +583,10 @@ append_archive(struct bsdtar *bsdtar, struct archive *a, struct archive *ina)
if (bsdtar->verbose)
safe_fprintf(stderr, "a %s",
archive_entry_pathname(in_entry));
+ siginfo_setinfo(bsdtar, "copying",
+ archive_entry_pathname(in_entry),
+ archive_entry_size(in_entry));
+ siginfo_printinfo(bsdtar, 0);
e = archive_write_header(a, in_entry);
if (e != ARCHIVE_OK) {
@@ -587,9 +600,12 @@ append_archive(struct bsdtar *bsdtar, struct archive *a, struct archive *ina)
if (e == ARCHIVE_FATAL)
exit(1);
- if (e >= ARCHIVE_WARN)
- if (copy_file_data(bsdtar, a, ina))
+ if (e >= ARCHIVE_WARN) {
+ if (archive_entry_size(in_entry) == 0)
+ archive_read_data_skip(ina);
+ else if (copy_file_data(bsdtar, a, ina))
exit(1);
+ }
if (bsdtar->verbose)
fprintf(stderr, "\n");
@@ -606,14 +622,18 @@ copy_file_data(struct bsdtar *bsdtar, struct archive *a, struct archive *ina)
char buff[64*1024];
ssize_t bytes_read;
ssize_t bytes_written;
+ off_t progress = 0;
bytes_read = archive_read_data(ina, buff, sizeof(buff));
while (bytes_read > 0) {
+ siginfo_printinfo(bsdtar, progress);
+
bytes_written = archive_write_data(a, buff, bytes_read);
if (bytes_written < bytes_read) {
bsdtar_warnc(bsdtar, 0, "%s", archive_error_string(a));
return (-1);
}
+ progress += bytes_written;
bytes_read = archive_read_data(ina, buff, sizeof(buff));
}
@@ -777,15 +797,62 @@ write_hierarchy(struct bsdtar *bsdtar, struct archive *a, const char *path)
}
/*
+ * Backend for write_entry.
+ */
+static void
+write_entry_backend(struct bsdtar *bsdtar, struct archive *a,
+ struct archive_entry *entry, int fd)
+{
+ int e;
+
+ if (fd == -1 && archive_entry_size(entry) > 0) {
+ const char *pathname = archive_entry_sourcepath(entry);
+ fd = open(pathname, O_RDONLY);
+ if (fd == -1) {
+ if (!bsdtar->verbose)
+ bsdtar_warnc(bsdtar, errno,
+ "%s: could not open file", pathname);
+ else
+ fprintf(stderr, ": %s", strerror(errno));
+ return;
+ }
+ }
+
+ e = archive_write_header(a, entry);
+ if (e != ARCHIVE_OK) {
+ if (!bsdtar->verbose)
+ bsdtar_warnc(bsdtar, 0, "%s: %s",
+ archive_entry_pathname(entry),
+ archive_error_string(a));
+ else
+ fprintf(stderr, ": %s", archive_error_string(a));
+ }
+
+ if (e == ARCHIVE_FATAL)
+ exit(1);
+
+ /*
+ * If we opened a file earlier, write it out now. Note that
+ * the format handler might have reset the size field to zero
+ * to inform us that the archive body won't get stored. In
+ * that case, just skip the write.
+ */
+ if (e >= ARCHIVE_WARN && fd >= 0 && archive_entry_size(entry) > 0) {
+ if (write_file_data(bsdtar, a, fd))
+ exit(1);
+ close(fd);
+ }
+}
+
+/*
* Add a single filesystem object to the archive.
*/
static void
write_entry(struct bsdtar *bsdtar, struct archive *a, const struct stat *st,
const char *pathname, const char *accpath)
{
- struct archive_entry *entry;
- int e;
- int fd;
+ struct archive_entry *entry, *sparse_entry;
+ int fd;
#ifdef __linux
int r;
unsigned long stflags;
@@ -796,6 +863,7 @@ write_entry(struct bsdtar *bsdtar, struct archive *a, const struct stat *st,
entry = archive_entry_new();
archive_entry_set_pathname(entry, pathname);
+ archive_entry_copy_sourcepath(entry, accpath);
/*
* Rewrite the pathname to be archived. If rewrite
@@ -811,9 +879,6 @@ write_entry(struct bsdtar *bsdtar, struct archive *a, const struct stat *st,
if (!new_enough(bsdtar, archive_entry_pathname(entry), st))
goto abort;
- if (!S_ISDIR(st->st_mode) && (st->st_nlink > 1))
- lookup_hardlink(bsdtar, entry, st);
-
/* Display entry as we process it. This format is required by SUSv2. */
if (bsdtar->verbose)
safe_fprintf(stderr, "a %s", archive_entry_pathname(entry));
@@ -860,48 +925,25 @@ write_entry(struct bsdtar *bsdtar, struct archive *a, const struct stat *st,
setup_acls(bsdtar, entry, accpath);
setup_xattrs(bsdtar, entry, accpath);
- /*
- * If it's a regular file (and non-zero in size) make sure we
- * can open it before we start to write. In particular, note
- * that we can always archive a zero-length file, even if we
- * can't read it.
- */
- if (S_ISREG(st->st_mode) && st->st_size > 0) {
- fd = open(accpath, O_RDONLY);
- if (fd < 0) {
- if (!bsdtar->verbose)
- bsdtar_warnc(bsdtar, errno, "%s: could not open file", pathname);
- else
- fprintf(stderr, ": %s", strerror(errno));
- goto cleanup;
- }
- }
-
/* Non-regular files get archived with zero size. */
if (!S_ISREG(st->st_mode))
archive_entry_set_size(entry, 0);
- e = archive_write_header(a, entry);
- if (e != ARCHIVE_OK) {
- if (!bsdtar->verbose)
- bsdtar_warnc(bsdtar, 0, "%s: %s", pathname,
- archive_error_string(a));
- else
- fprintf(stderr, ": %s", archive_error_string(a));
- }
+ /* Record what we're doing, for the benefit of SIGINFO / SIGUSR1. */
+ siginfo_setinfo(bsdtar, "adding", archive_entry_pathname(entry),
+ archive_entry_size(entry));
+ archive_entry_linkify(bsdtar->resolver, &entry, &sparse_entry);
- if (e == ARCHIVE_FATAL)
- exit(1);
+ /* Handle SIGINFO / SIGUSR1 request if one was made. */
+ siginfo_printinfo(bsdtar, 0);
- /*
- * If we opened a file earlier, write it out now. Note that
- * the format handler might have reset the size field to zero
- * to inform us that the archive body won't get stored. In
- * that case, just skip the write.
- */
- if (e >= ARCHIVE_WARN && fd >= 0 && archive_entry_size(entry) > 0)
- if (write_file_data(bsdtar, a, fd))
- exit(1);
+ while (entry != NULL) {
+ write_entry_backend(bsdtar, a, entry, fd);
+ fd = -1;
+ archive_entry_free(entry);
+ entry = sparse_entry;
+ sparse_entry = NULL;
+ }
cleanup:
if (bsdtar->verbose)
@@ -911,8 +953,7 @@ abort:
if (fd >= 0)
close(fd);
- if (entry != NULL)
- archive_entry_free(entry);
+ archive_entry_free(entry);
}
@@ -923,12 +964,15 @@ write_file_data(struct bsdtar *bsdtar, struct archive *a, int fd)
char buff[64*1024];
ssize_t bytes_read;
ssize_t bytes_written;
+ off_t progress = 0;
/* XXX TODO: Allocate buffer on heap and store pointer to
* it in bsdtar structure; arrange cleanup as well. XXX */
bytes_read = read(fd, buff, sizeof(buff));
while (bytes_read > 0) {
+ siginfo_printinfo(bsdtar, progress);
+
bytes_written = archive_write_data(a, buff, bytes_read);
if (bytes_written < 0) {
/* Write failed; this is bad */
@@ -941,6 +985,7 @@ write_file_data(struct bsdtar *bsdtar, struct archive *a, int fd)
"Truncated write; file may have grown while being archived.");
return (0);
}
+ progress += bytes_written;
bytes_read = read(fd, buff, sizeof(buff));
}
return 0;
@@ -950,169 +995,12 @@ write_file_data(struct bsdtar *bsdtar, struct archive *a, int fd)
static void
create_cleanup(struct bsdtar *bsdtar)
{
- /* Free inode->pathname map used for hardlink detection. */
- if (bsdtar->links_cache != NULL) {
- free_buckets(bsdtar, bsdtar->links_cache);
- free(bsdtar->links_cache);
- bsdtar->links_cache = NULL;
- }
-
free_cache(bsdtar->uname_cache);
bsdtar->uname_cache = NULL;
free_cache(bsdtar->gname_cache);
bsdtar->gname_cache = NULL;
}
-
-static void
-free_buckets(struct bsdtar *bsdtar, struct links_cache *links_cache)
-{
- size_t i;
-
- if (links_cache->buckets == NULL)
- return;
-
- for (i = 0; i < links_cache->number_buckets; i++) {
- while (links_cache->buckets[i] != NULL) {
- struct links_entry *lp = links_cache->buckets[i]->next;
- if (bsdtar->option_warn_links)
- bsdtar_warnc(bsdtar, 0, "Missing links to %s",
- links_cache->buckets[i]->name);
- if (links_cache->buckets[i]->name != NULL)
- free(links_cache->buckets[i]->name);
- free(links_cache->buckets[i]);
- links_cache->buckets[i] = lp;
- }
- }
- free(links_cache->buckets);
- links_cache->buckets = NULL;
-}
-
-static void
-lookup_hardlink(struct bsdtar *bsdtar, struct archive_entry *entry,
- const struct stat *st)
-{
- struct links_cache *links_cache;
- struct links_entry *le, **new_buckets;
- int hash;
- size_t i, new_size;
-
- /* If necessary, initialize the links cache. */
- links_cache = bsdtar->links_cache;
- if (links_cache == NULL) {
- bsdtar->links_cache = malloc(sizeof(struct links_cache));
- if (bsdtar->links_cache == NULL)
- bsdtar_errc(bsdtar, 1, ENOMEM,
- "No memory for hardlink detection.");
- links_cache = bsdtar->links_cache;
- memset(links_cache, 0, sizeof(struct links_cache));
- links_cache->number_buckets = links_cache_initial_size;
- links_cache->buckets = malloc(links_cache->number_buckets *
- sizeof(links_cache->buckets[0]));
- if (links_cache->buckets == NULL) {
- bsdtar_errc(bsdtar, 1, ENOMEM,
- "No memory for hardlink detection.");
- }
- for (i = 0; i < links_cache->number_buckets; i++)
- links_cache->buckets[i] = NULL;
- }
-
- /* If the links cache overflowed and got flushed, don't bother. */
- if (links_cache->buckets == NULL)
- return;
-
- /* If the links cache is getting too full, enlarge the hash table. */
- if (links_cache->number_entries > links_cache->number_buckets * 2)
- {
- new_size = links_cache->number_buckets * 2;
- new_buckets = malloc(new_size * sizeof(struct links_entry *));
-
- if (new_buckets != NULL) {
- memset(new_buckets, 0,
- new_size * sizeof(struct links_entry *));
- for (i = 0; i < links_cache->number_buckets; i++) {
- while (links_cache->buckets[i] != NULL) {
- /* Remove entry from old bucket. */
- le = links_cache->buckets[i];
- links_cache->buckets[i] = le->next;
-
- /* Add entry to new bucket. */
- hash = (le->dev ^ le->ino) % new_size;
-
- if (new_buckets[hash] != NULL)
- new_buckets[hash]->previous =
- le;
- le->next = new_buckets[hash];
- le->previous = NULL;
- new_buckets[hash] = le;
- }
- }
- free(links_cache->buckets);
- links_cache->buckets = new_buckets;
- links_cache->number_buckets = new_size;
- } else {
- free_buckets(bsdtar, links_cache);
- bsdtar_warnc(bsdtar, ENOMEM,
- "No more memory for recording hard links");
- bsdtar_warnc(bsdtar, 0,
- "Remaining links will be dumped as full files");
- }
- }
-
- /* Try to locate this entry in the links cache. */
- hash = ( st->st_dev ^ st->st_ino ) % links_cache->number_buckets;
- for (le = links_cache->buckets[hash]; le != NULL; le = le->next) {
- if (le->dev == st->st_dev && le->ino == st->st_ino) {
- archive_entry_copy_hardlink(entry, le->name);
-
- /*
- * Decrement link count each time and release
- * the entry if it hits zero. This saves
- * memory and is necessary for proper -l
- * implementation.
- */
- if (--le->links <= 0) {
- if (le->previous != NULL)
- le->previous->next = le->next;
- if (le->next != NULL)
- le->next->previous = le->previous;
- if (le->name != NULL)
- free(le->name);
- if (links_cache->buckets[hash] == le)
- links_cache->buckets[hash] = le->next;
- links_cache->number_entries--;
- free(le);
- }
-
- return;
- }
- }
-
- /* Add this entry to the links cache. */
- le = malloc(sizeof(struct links_entry));
- if (le != NULL)
- le->name = strdup(archive_entry_pathname(entry));
- if ((le == NULL) || (le->name == NULL)) {
- free_buckets(bsdtar, links_cache);
- bsdtar_warnc(bsdtar, ENOMEM,
- "No more memory for recording hard links");
- bsdtar_warnc(bsdtar, 0,
- "Remaining hard links will be dumped as full files");
- if (le != NULL)
- free(le);
- return;
- }
- if (links_cache->buckets[hash] != NULL)
- links_cache->buckets[hash]->previous = le;
- links_cache->number_entries++;
- le->next = links_cache->buckets[hash];
- le->previous = NULL;
- links_cache->buckets[hash] = le;
- le->dev = st->st_dev;
- le->ino = st->st_ino;
- le->links = st->st_nlink - 1;
-}
-
#ifdef HAVE_POSIX_ACL
static void setup_acl(struct bsdtar *bsdtar,
struct archive_entry *entry, const char *accpath,
@@ -1534,7 +1422,7 @@ test_for_append(struct bsdtar *bsdtar)
{
struct stat s;
- if (*bsdtar->argv == NULL)
+ if (*bsdtar->argv == NULL && bsdtar->names_from_file == NULL)
bsdtar_errc(bsdtar, 1, 0, "no files or directories specified");
if (bsdtar->filename == NULL)
bsdtar_errc(bsdtar, 1, 0, "Cannot append to stdout.");
diff --git a/archivers/libarchive/files/version b/archivers/libarchive/files/version
index df76515da74..bd20368be50 100644
--- a/archivers/libarchive/files/version
+++ b/archivers/libarchive/files/version
@@ -1 +1 @@
-2005001b
+2005004b
diff --git a/archivers/libarchive/files/windows/mvcpp.nt b/archivers/libarchive/files/windows/mvcpp.nt
new file mode 100644
index 00000000000..be64cf40d1f
--- /dev/null
+++ b/archivers/libarchive/files/windows/mvcpp.nt
@@ -0,0 +1,126 @@
+#/* FILE: mvcpp.nt
+# *
+# * Copyright (c) 2008
+# * TouchNet Information Systems, Inc.
+# * All Rights Reserved
+# *
+# * This program is an unpublished copyright work of TouchNet Information
+# * Systems, Inc. of Lenexa, KS. The program, all information disclosed
+# * and the matter shown and described hereon or herewith are confidential
+# * and proprietary to TouchNet Information Systems, Inc.
+# *
+# ******************************************************************************
+# *
+# * $Author: joerg $
+# * $Locker: $
+# * $ProjectName: $
+# * $ProjectRevision: $
+# * $Revision: 1.1.1.1 $
+# * $Date: 2008/05/25 19:41:30 $
+# * $State: Exp $
+# * $RCSfile: mvcpp.nt,v $
+# * $Source: /cvsroot/pkgsrc/archivers/libarchive/files/windows/Attic/mvcpp.nt,v $
+# *
+# * Change Log:
+# * $Log: mvcpp.nt,v $
+# * Revision 1.1.1.1 2008/05/25 19:41:30 joerg
+# * Import libarchive-2.5.4b. Major changes:
+# * - much improved mtree support
+# * - fix a number of non-exploitable integer and buffer overflows
+# * - bsdtar get -s and SIGINFO/SIGUSR1 support
+# * - fix hardlink extraction bug where latter hardlinks would overwrite the
+# * permissions of earlier entries even when they don't carry data
+# * - fix bsdtar crashes on entries with empty filenames
+# *
+# *
+# */
+
+.SUFFIXES : .c .cpp .obm
+
+ZLIB_INCL=\3rdParty\ZLib\Current\Include
+
+EXTRA_DEFINES=/DLIBARCHIVE_STATIC=1
+
+!ifdef DEBUG
+DEST_PATH=.\lib\mvcpp\debug
+OBJ_DIR=obj\debug
+COMPILE_FLAG=/MTd /DDEBUG=1 $(EXTRA_DEFINES) /Zi /Fd$(OBJ_DIR)\libarchive.pdb
+!else
+DEST_PATH=.\lib\mvcpp
+OBJ_DIR=obj
+COMPILE_FLAG=/MT $(EXTRA_DEFINES) /Fd$(OBJ_DIR)\libarchive.pdb
+!endif
+
+INCLUDE=.;$(MSDEVDIR)\INCLUDE;$(ZLIB_INCL);
+INCLUDE_OPTS=
+
+NT_CPP=cl
+NT_C=cl
+NT_LIBRARIAN=lib
+
+###
+NT_C_OPTS=$(COMPILE_FLAG) /GX /Zl /Zp1 /nologo /c /G5 /Oi /Ot /TC /DVC_EXTRANLEAN /DWIN32_LEAN_AND_MEAN $(INCLUDE_OPTS)
+NT_CPP_OPTS=$(COMPILE_FLAG) /GX /Zl /Zp1 /nologo /c /G5 /Oi /Ot /TP /DVC_EXTRANLEAN /DWIN32_LEAN_AND_MEAN $(INCLUDE_OPTS)
+NT_LIB_OPTS=
+
+.cpp{$(OBJ_DIR)}.obm:
+ -md $(OBJ_DIR) > nul 2>nul
+ $(NT_CPP) $(NT_CPP_OPTS) -Fo$*.obm $<
+
+.c{$(OBJ_DIR)}.obm:
+ -md $(OBJ_DIR) > nul 2>nul
+ $(NT_C) $(NT_C_OPTS) -Fo$*.obm $<
+
+
+OBJS=\
+ $(OBJ_DIR)\archive_check_magic.obm $(OBJ_DIR)\archive_entry.obm \
+ $(OBJ_DIR)\archive_entry_copy_stat.obm $(OBJ_DIR)\archive_entry_link_resolver.obm \
+ $(OBJ_DIR)\archive_entry_stat.obm $(OBJ_DIR)\archive_entry_strmode.obm \
+ $(OBJ_DIR)\archive_read.obm $(OBJ_DIR)\archive_read_data_into_fd.obm \
+ $(OBJ_DIR)\archive_read_extract.obm $(OBJ_DIR)\archive_read_open_fd.obm \
+ $(OBJ_DIR)\archive_read_open_file.obm $(OBJ_DIR)\archive_read_open_filename.obm \
+ $(OBJ_DIR)\archive_read_open_memory.obm $(OBJ_DIR)\archive_read_support_compression_all.obm \
+ $(OBJ_DIR)\archive_read_support_compression_bzip2.obm \
+ $(OBJ_DIR)\archive_read_support_compression_compress.obm \
+ $(OBJ_DIR)\archive_read_support_compression_gzip.obm \
+ $(OBJ_DIR)\archive_read_support_compression_none.obm \
+ $(OBJ_DIR)\archive_read_support_compression_program.obm \
+ $(OBJ_DIR)\archive_read_support_format_all.obm \
+ $(OBJ_DIR)\archive_read_support_format_ar.obm \
+ $(OBJ_DIR)\archive_read_support_format_cpio.obm \
+ $(OBJ_DIR)\archive_read_support_format_empty.obm \
+ $(OBJ_DIR)\archive_read_support_format_iso9660.obm \
+ $(OBJ_DIR)\archive_read_support_format_mtree.obm \
+ $(OBJ_DIR)\archive_read_support_format_tar.obm \
+ $(OBJ_DIR)\archive_read_support_format_zip.obm \
+ $(OBJ_DIR)\archive_string.obm $(OBJ_DIR)\archive_string_sprintf.obm \
+ $(OBJ_DIR)\archive_util.obm $(OBJ_DIR)\archive_virtual.obm \
+ $(OBJ_DIR)\archive_write.obm $(OBJ_DIR)\archive_write_disk.obm \
+ $(OBJ_DIR)\archive_write_disk_set_standard_lookup.obm \
+ $(OBJ_DIR)\archive_write_open_fd.obm $(OBJ_DIR)\archive_write_open_file.obm \
+ $(OBJ_DIR)\archive_write_open_filename.obm $(OBJ_DIR)\archive_write_open_memory.obm \
+ $(OBJ_DIR)\archive_write_set_compression_bzip2.obm $(OBJ_DIR)\archive_write_set_compression_compress.obm \
+ $(OBJ_DIR)\archive_write_set_compression_gzip.obm $(OBJ_DIR)\archive_write_set_compression_none.obm \
+ $(OBJ_DIR)\archive_write_set_compression_program.obm $(OBJ_DIR)\archive_write_set_format.obm \
+ $(OBJ_DIR)\archive_write_set_format_ar.obm $(OBJ_DIR)\archive_write_set_format_by_name.obm \
+ $(OBJ_DIR)\archive_write_set_format_cpio.obm $(OBJ_DIR)\archive_write_set_format_cpio_newc.obm \
+ $(OBJ_DIR)\archive_write_set_format_pax.obm $(OBJ_DIR)\archive_write_set_format_shar.obm \
+ $(OBJ_DIR)\archive_write_set_format_ustar.obm $(OBJ_DIR)\filter_fork.obm \
+ $(OBJ_DIR)\libarchive-nonposix.obm
+
+all: CLEAN $(DEST_PATH)\libarchive.lib
+
+$(DEST_PATH)\libarchive.lib :: $(OBJS) $(DEST_PATH)
+
+$(DEST_PATH)\libarchive.lib ::
+ $(NT_LIBRARIAN) $(NT_LIB_OPTS) /OUT:$(DEST_PATH)\libarchive.lib $(OBJS)
+
+$(DEST_PATH):
+ -md $(DEST_PATH) > nul 2>nul
+
+CLEAN:
+!ifdef CLEAN
+ -del $(OBJ_DIR)\*.pd? > nul 2>nul
+ -ren $(OBJ_DIR)\*.pdb *.pd1 > nul 2>nul
+ -ren $(OBJ_DIR)\*.pdb *.pd2 > nul 2>nul
+!endif
diff --git a/archivers/libarchive/files/windows/wccpp.nt b/archivers/libarchive/files/windows/wccpp.nt
new file mode 100644
index 00000000000..b9b0ec0d9fe
--- /dev/null
+++ b/archivers/libarchive/files/windows/wccpp.nt
@@ -0,0 +1,116 @@
+#/* FILE: wccpp.nt
+# *
+# * Copyright (c) 2008
+# * TouchNet Information Systems, Inc.
+# * All Rights Reserved
+# *
+# * This program is an unpublished copyright work of TouchNet Information
+# * Systems, Inc. of Lenexa, KS. The program, all information disclosed
+# * and the matter shown and described hereon or herewith are confidential
+# * and proprietary to TouchNet Information Systems, Inc.
+# *
+# ******************************************************************************
+# *
+# * $Author: joerg $
+# * $Locker: $
+# * $ProjectName: $
+# * $ProjectRevision: $
+# * $Revision: 1.1.1.1 $
+# * $Date: 2008/05/25 19:41:30 $
+# * $State: Exp $
+# * $RCSfile: wccpp.nt,v $
+# * $Source: /cvsroot/pkgsrc/archivers/libarchive/files/windows/Attic/wccpp.nt,v $
+# *
+# * Change Log:
+# * $Log: wccpp.nt,v $
+# * Revision 1.1.1.1 2008/05/25 19:41:30 joerg
+# * Import libarchive-2.5.4b. Major changes:
+# * - much improved mtree support
+# * - fix a number of non-exploitable integer and buffer overflows
+# * - bsdtar get -s and SIGINFO/SIGUSR1 support
+# * - fix hardlink extraction bug where latter hardlinks would overwrite the
+# * permissions of earlier entries even when they don't carry data
+# * - fix bsdtar crashes on entries with empty filenames
+# *
+# *
+# */
+
+.EXTENSIONS:
+.EXTENSIONS: .obn .cpp .c
+
+ZLIB_INCL=\3rdParty\ZLib\Current\Include
+
+!ifdef DEBUG
+DEST_PATH=.\lib\wccpp\debug
+OBJ_DIR=obj\debug
+EXT_COMPILE_FLAG=-d2 -DLIBARCHIVE_STATIC=1
+!else
+DEST_PATH=.\lib\wccpp
+OBJ_DIR=obj
+EXT_COMPILE_FLAG=-DLIBARCHIVE_STATIC=1
+!endif
+
+# ----- NT compiler options -----------------------------------------------
+NT_CPP=wpp386
+NT_C=wcc386
+NT_LIBRARIAN=wlib
+
+
+###
+INCLUDE_OPTS=/I.;$(%watcom)\h;$(%watcom)\h\nt;$(ZLIB_INCL);
+NT_CPP_OPTS=-ei -wx -xs -xss -xst -od -of+ -zp1 -5 -bt=nt -bm $(EXT_COMPILE_FLAG) $(INCLUDE_OPTS) -DWIN32_LEAN_AND_MEAN
+NT_C_OPTS=-ei -wx -od -of+ -zp1 -5 -bt=nt -bm $(EXT_COMPILE_FLAG) $(INCLUDE_OPTS) -DWIN32_LEAN_AND_MEAN
+NT_LIB_OPTS=
+
+.cpp{$(OBJ_DIR)}.obn:
+ -md $(OBJ_DIR) > nul 2>nul
+ $(NT_CPP) $(NT_CPP_OPTS) -zp1 -fo=$*.obn $<
+
+.c{$(OBJ_DIR)}.obn:
+ -md $(OBJ_DIR) > nul 2>nul
+ $(NT_C) $(NT_C_OPTS) -zp1 -fo=$*.obn $<
+
+OBJS = &
+ $(OBJ_DIR)\archive_check_magic.obn $(OBJ_DIR)\archive_entry.obn &
+ $(OBJ_DIR)\archive_entry_copy_stat.obn $(OBJ_DIR)\archive_entry_link_resolver.obn &
+ $(OBJ_DIR)\archive_entry_stat.obn $(OBJ_DIR)\archive_entry_strmode.obn &
+ $(OBJ_DIR)\archive_read.obn $(OBJ_DIR)\archive_read_data_into_fd.obn &
+ $(OBJ_DIR)\archive_read_extract.obn $(OBJ_DIR)\archive_read_open_fd.obn &
+ $(OBJ_DIR)\archive_read_open_file.obn $(OBJ_DIR)\archive_read_open_filename.obn &
+ $(OBJ_DIR)\archive_read_open_memory.obn $(OBJ_DIR)\archive_read_support_compression_all.obn &
+ $(OBJ_DIR)\archive_read_support_compression_bzip2.obn &
+ $(OBJ_DIR)\archive_read_support_compression_compress.obn &
+ $(OBJ_DIR)\archive_read_support_compression_gzip.obn &
+ $(OBJ_DIR)\archive_read_support_compression_none.obn &
+ $(OBJ_DIR)\archive_read_support_compression_program.obn &
+ $(OBJ_DIR)\archive_read_support_format_all.obn &
+ $(OBJ_DIR)\archive_read_support_format_ar.obn &
+ $(OBJ_DIR)\archive_read_support_format_cpio.obn &
+ $(OBJ_DIR)\archive_read_support_format_empty.obn &
+ $(OBJ_DIR)\archive_read_support_format_iso9660.obn &
+ $(OBJ_DIR)\archive_read_support_format_mtree.obn &
+ $(OBJ_DIR)\archive_read_support_format_tar.obn &
+ $(OBJ_DIR)\archive_read_support_format_zip.obn &
+ $(OBJ_DIR)\archive_string.obn $(OBJ_DIR)\archive_string_sprintf.obn &
+ $(OBJ_DIR)\archive_util.obn $(OBJ_DIR)\archive_virtual.obn &
+ $(OBJ_DIR)\archive_write.obn $(OBJ_DIR)\archive_write_disk.obn &
+ $(OBJ_DIR)\archive_write_disk_set_standard_lookup.obn &
+ $(OBJ_DIR)\archive_write_open_fd.obn $(OBJ_DIR)\archive_write_open_file.obn &
+ $(OBJ_DIR)\archive_write_open_filename.obn $(OBJ_DIR)\archive_write_open_memory.obn &
+ $(OBJ_DIR)\archive_write_set_compression_bzip2.obn $(OBJ_DIR)\archive_write_set_compression_compress.obn &
+ $(OBJ_DIR)\archive_write_set_compression_gzip.obn $(OBJ_DIR)\archive_write_set_compression_none.obn &
+ $(OBJ_DIR)\archive_write_set_compression_program.obn $(OBJ_DIR)\archive_write_set_format.obn &
+ $(OBJ_DIR)\archive_write_set_format_ar.obn $(OBJ_DIR)\archive_write_set_format_by_name.obn &
+ $(OBJ_DIR)\archive_write_set_format_cpio.obn $(OBJ_DIR)\archive_write_set_format_cpio_newc.obn &
+ $(OBJ_DIR)\archive_write_set_format_pax.obn $(OBJ_DIR)\archive_write_set_format_shar.obn &
+ $(OBJ_DIR)\archive_write_set_format_ustar.obn $(OBJ_DIR)\filter_fork.obn &
+ $(OBJ_DIR)\libarchive-nonposix.obn
+
+$(DEST_PATH)\LibArchive.lib :: $(OBJS) $(DEST_PATH)
+
+$(DEST_PATH)\LibArchive.lib ::
+ -md $(DEST_PATH) > nul 2>nul
+ $(NT_LIBRARIAN) $@ -+ $(OBJS)
+
+$(DEST_PATH):
+ -md $(DEST_PATH) > nul 2>nul