summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2019-09-22 09:47:00 +0000
committerjoerg <joerg@pkgsrc.org>2019-09-22 09:47:00 +0000
commit3d58b3c8e51f686500fbe08fc5fea947dfa036b4 (patch)
tree54a4af7c883e75c1a11634a0a7f52e5bdc174484
parent8ebf4e7079542370a0dd5eba7eed1790d20c7f96 (diff)
downloadpkgsrc-3d58b3c8e51f686500fbe08fc5fea947dfa036b4.tar.gz
Import libarchive-3.3.3 as should have done originally.
-rw-r--r--archivers/libarchive/files/CMakeLists.txt49
-rw-r--r--archivers/libarchive/files/Makefile.am18
-rw-r--r--archivers/libarchive/files/Makefile.in254
-rw-r--r--archivers/libarchive/files/NEWS10
-rw-r--r--archivers/libarchive/files/README.md4
-rwxr-xr-xarchivers/libarchive/files/build/autoconf/config.guess645
-rwxr-xr-xarchivers/libarchive/files/build/autoconf/config.sub2532
-rw-r--r--archivers/libarchive/files/build/cmake/config.h.in10
-rw-r--r--archivers/libarchive/files/build/pkgconfig/libarchive.pc.in1
-rw-r--r--archivers/libarchive/files/build/version2
-rw-r--r--archivers/libarchive/files/cat/bsdcat.c19
-rw-r--r--archivers/libarchive/files/cat/test/CMakeLists.txt3
-rw-r--r--archivers/libarchive/files/cat/test/list.h3
-rw-r--r--archivers/libarchive/files/cat/test/test_empty.zst.uu4
-rw-r--r--archivers/libarchive/files/cat/test/test_empty_zstd.c41
-rw-r--r--archivers/libarchive/files/cat/test/test_expand.zst.uu4
-rw-r--r--archivers/libarchive/files/cat/test/test_expand_zstd.c41
-rw-r--r--archivers/libarchive/files/cat/test/test_stdin.c42
-rw-r--r--archivers/libarchive/files/config.h.in9
-rwxr-xr-xarchivers/libarchive/files/configure117
-rw-r--r--archivers/libarchive/files/configure.ac16
-rw-r--r--archivers/libarchive/files/contrib/android/Android.mk2
-rw-r--r--archivers/libarchive/files/cpio/bsdcpio.15
-rw-r--r--archivers/libarchive/files/cpio/cmdline.c1
-rw-r--r--archivers/libarchive/files/cpio/cpio.c6
-rw-r--r--archivers/libarchive/files/cpio/cpio.h3
-rw-r--r--archivers/libarchive/files/cpio/test/CMakeLists.txt2
-rw-r--r--archivers/libarchive/files/cpio/test/list.h2
-rw-r--r--archivers/libarchive/files/cpio/test/test_basic.c60
-rw-r--r--archivers/libarchive/files/cpio/test/test_extract.cpio.zst.uu6
-rw-r--r--archivers/libarchive/files/cpio/test/test_extract_cpio_zstd.c48
-rw-r--r--archivers/libarchive/files/cpio/test/test_format_newc.c40
-rw-r--r--archivers/libarchive/files/cpio/test/test_option_zstd.c85
-rw-r--r--archivers/libarchive/files/doc/html/archive_entry.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_entry_acl.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_entry_linkify.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_entry_paths.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_entry_perms.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_entry_stat.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_entry_time.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_data.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_disk.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_extract.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_filter.3.html11
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_format.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_free.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_header.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_new.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_open.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_read_set_options.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_util.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write.3.html4
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_blocksize.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_data.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_disk.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_filter.3.html13
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_format.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_free.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_header.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_new.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_open.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_set_options.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/bsdcpio.1.html9
-rw-r--r--archivers/libarchive/files/doc/html/bsdtar.1.html67
-rw-r--r--archivers/libarchive/files/doc/html/cpio.5.html2
-rw-r--r--archivers/libarchive/files/doc/html/libarchive-formats.5.html2
-rw-r--r--archivers/libarchive/files/doc/html/libarchive.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/libarchive_changes.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/libarchive_internals.3.html2
-rw-r--r--archivers/libarchive/files/doc/html/mtree.5.html2
-rw-r--r--archivers/libarchive/files/doc/html/tar.5.html2
-rw-r--r--archivers/libarchive/files/doc/man/archive_read_filter.38
-rw-r--r--archivers/libarchive/files/doc/man/archive_write.32
-rw-r--r--archivers/libarchive/files/doc/man/archive_write_filter.38
-rw-r--r--archivers/libarchive/files/doc/man/bsdcpio.16
-rw-r--r--archivers/libarchive/files/doc/man/bsdtar.161
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_entry.3.pdfbin28719 -> 28719 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdfbin38486 -> 38486 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdfbin27964 -> 27964 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdfbin24868 -> 24868 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdfbin29411 -> 29411 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdfbin32905 -> 32905 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdfbin23120 -> 23120 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read.3.pdfbin32552 -> 32552 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_add_passphrase.3.pdfbin21985 -> 21985 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_data.3.pdfbin26044 -> 26044 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdfbin39936 -> 39936 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdfbin28295 -> 28295 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdfbin24756 -> 24744 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_format.3.pdfbin27000 -> 27000 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_free.3.pdfbin22608 -> 22608 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_header.3.pdfbin22805 -> 22805 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_new.3.pdfbin19965 -> 19965 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_open.3.pdfbin29934 -> 29934 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdfbin26705 -> 26705 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_util.3.pdfbin28862 -> 28862 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write.3.pdfbin37430 -> 37426 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdfbin25697 -> 25697 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_data.3.pdfbin22898 -> 22898 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdfbin39794 -> 39794 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdfbin24639 -> 24777 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdfbin23584 -> 23584 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_format.3.pdfbin27030 -> 27030 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_free.3.pdfbin22423 -> 22423 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_header.3.pdfbin22296 -> 22296 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_new.3.pdfbin19953 -> 19953 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_open.3.pdfbin33080 -> 33080 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdfbin41905 -> 41905 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/archive_write_set_passphrase.3.pdfbin22237 -> 22237 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/bsdcpio.1.pdfbin38675 -> 38847 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/bsdtar.1.pdfbin71703 -> 72580 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/cpio.5.pdfbin35762 -> 35762 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdfbin42402 -> 42402 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/libarchive.3.pdfbin31378 -> 31378 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdfbin35353 -> 35353 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdfbin39553 -> 39553 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/mtree.5.pdfbin32398 -> 32398 bytes
-rw-r--r--archivers/libarchive/files/doc/pdf/tar.5.pdfbin68753 -> 68753 bytes
-rw-r--r--archivers/libarchive/files/doc/text/archive_read_filter.3.txt8
-rw-r--r--archivers/libarchive/files/doc/text/archive_write.3.txt2
-rw-r--r--archivers/libarchive/files/doc/text/archive_write_filter.3.txt7
-rw-r--r--archivers/libarchive/files/doc/text/bsdcpio.1.txt4
-rw-r--r--archivers/libarchive/files/doc/text/bsdtar.1.txt62
-rw-r--r--archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki8
-rw-r--r--archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki2
-rw-r--r--archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki8
-rw-r--r--archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki5
-rw-r--r--archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki57
-rw-r--r--archivers/libarchive/files/libarchive/CMakeLists.txt2
-rw-r--r--archivers/libarchive/files/libarchive/archive.h8
-rw-r--r--archivers/libarchive/files/libarchive/archive_acl.c2
-rw-r--r--archivers/libarchive/files/libarchive/archive_cmdline.c6
-rw-r--r--archivers/libarchive/files/libarchive/archive_cryptor.c2
-rw-r--r--archivers/libarchive/files/libarchive/archive_cryptor_private.h2
-rw-r--r--archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c2
-rw-r--r--archivers/libarchive/files/libarchive/archive_entry.c4
-rw-r--r--archivers/libarchive/files/libarchive/archive_entry.h3
-rw-r--r--archivers/libarchive/files/libarchive/archive_match.c4
-rw-r--r--archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h3
-rw-r--r--archivers/libarchive/files/libarchive/archive_pack_dev.c7
-rw-r--r--archivers/libarchive/files/libarchive/archive_platform.h17
-rw-r--r--archivers/libarchive/files/libarchive/archive_ppmd7.c10
-rw-r--r--archivers/libarchive/files/libarchive/archive_ppmd7_private.h4
-rw-r--r--archivers/libarchive/files/libarchive/archive_ppmd_private.h7
-rw-r--r--archivers/libarchive/files/libarchive/archive_read.c12
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_append_filter.c4
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c2
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_disk_posix.c8
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_disk_windows.c19
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_filter.36
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_filter_all.c2
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_filter_zstd.c292
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c21
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c7
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c29
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_lha.c6
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c109
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_rar.c30
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_tar.c10
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_xar.c32
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_zip.c32
-rw-r--r--archivers/libarchive/files/libarchive/archive_util.c4
-rw-r--r--archivers/libarchive/files/libarchive/archive_version_details.c18
-rw-r--r--archivers/libarchive/files/libarchive/archive_virtual.c11
-rw-r--r--archivers/libarchive/files/libarchive/archive_write.32
-rw-r--r--archivers/libarchive/files/libarchive/archive_write.c2
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_add_filter.c1
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_add_filter_by_name.c1
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c7
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_add_filter_zstd.c335
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_disk_posix.c12
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_disk_windows.c19
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_filter.36
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c17
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_set_format_ar.c12
-rw-r--r--archivers/libarchive/files/libarchive/archive_write_set_format_pax.c2
-rw-r--r--archivers/libarchive/files/libarchive/test/CMakeLists.txt2
-rw-r--r--archivers/libarchive/files/libarchive/test/list.h4
-rw-r--r--archivers/libarchive/files/libarchive/test/read_open_memory.c2
-rw-r--r--archivers/libarchive/files/libarchive/test/test.h6
-rw-r--r--archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c2
-rw-r--r--archivers/libarchive/files/libarchive/test/test_archive_write_add_filter_by_name.c5
-rw-r--r--archivers/libarchive/files/libarchive/test/test_compat_zip.c26
-rw-r--r--archivers/libarchive/files/libarchive/test/test_compat_zip_8.zip.uu6
-rw-r--r--archivers/libarchive/files/libarchive/test/test_compat_zstd.c82
-rw-r--r--archivers/libarchive/files/libarchive/test/test_compat_zstd_1.tar.zst.uu12
-rw-r--r--archivers/libarchive/files/libarchive/test/test_fuzz.c9
-rw-r--r--archivers/libarchive/files/libarchive/test/test_read_format_zip.c4
-rw-r--r--archivers/libarchive/files/libarchive/test/test_sparse_basic.c29
-rw-r--r--archivers/libarchive/files/libarchive/test/test_write_disk_perms.c33
-rw-r--r--archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c30
-rw-r--r--archivers/libarchive/files/libarchive/test/test_write_filter_zstd.c201
-rw-r--r--archivers/libarchive/files/tar/bsdtar.159
-rw-r--r--archivers/libarchive/files/tar/bsdtar.c10
-rw-r--r--archivers/libarchive/files/tar/bsdtar.h3
-rw-r--r--archivers/libarchive/files/tar/cmdline.c1
-rw-r--r--archivers/libarchive/files/tar/creation_set.c4
-rw-r--r--archivers/libarchive/files/tar/test/CMakeLists.txt3
-rw-r--r--archivers/libarchive/files/tar/test/list.h3
-rw-r--r--archivers/libarchive/files/tar/test/test_extract.tar.zst.uu6
-rw-r--r--archivers/libarchive/files/tar/test/test_extract_tar_zstd.c48
-rw-r--r--archivers/libarchive/files/tar/test/test_option_C_mtree.c73
-rw-r--r--archivers/libarchive/files/tar/test/test_option_acls.c4
-rw-r--r--archivers/libarchive/files/tar/test/test_option_fflags.c4
-rw-r--r--archivers/libarchive/files/tar/test/test_option_zstd.c85
-rw-r--r--archivers/libarchive/files/tar/write.c2
-rw-r--r--archivers/libarchive/files/test_utils/test_common.h3
-rw-r--r--archivers/libarchive/files/test_utils/test_main.c17
212 files changed, 4387 insertions, 2054 deletions
diff --git a/archivers/libarchive/files/CMakeLists.txt b/archivers/libarchive/files/CMakeLists.txt
index 73bf07b34b4..80871bc941c 100644
--- a/archivers/libarchive/files/CMakeLists.txt
+++ b/archivers/libarchive/files/CMakeLists.txt
@@ -179,6 +179,7 @@ include(CTest)
OPTION(ENABLE_NETTLE "Enable use of Nettle" ON)
OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON)
+OPTION(ENABLE_LZ4 "Enable the use of the system LZ4 library if found" ON)
OPTION(ENABLE_LZO "Enable the use of the system LZO library if found" OFF)
OPTION(ENABLE_LZMA "Enable the use of the system LZMA library if found" ON)
@@ -492,7 +493,7 @@ IF(ENABLE_LZO)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO2 DEFAULT_MSG LZO2_LIBRARY LZO2_INCLUDE_DIR)
ELSE(ENABLE_LZO)
- SET(LIBZMA_FOUND FALSE) # Override cached value
+ SET(LZO2_FOUND FALSE) # Override cached value
ENDIF(ENABLE_LZO)
IF(LZO2_FOUND)
SET(HAVE_LIBLZO2 1)
@@ -509,15 +510,19 @@ MARK_AS_ADVANCED(CLEAR LZO2_LIBRARY)
#
# Find LZ4
#
-IF (LZ4_INCLUDE_DIR)
- # Already in cache, be silent
- SET(LZ4_FIND_QUIETLY TRUE)
-ENDIF (LZ4_INCLUDE_DIR)
+IF(ENABLE_LZ4)
+ IF (LZ4_INCLUDE_DIR)
+ # Already in cache, be silent
+ SET(LZ4_FIND_QUIETLY TRUE)
+ ENDIF (LZ4_INCLUDE_DIR)
-FIND_PATH(LZ4_INCLUDE_DIR lz4.h)
-FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4)
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR)
+ FIND_PATH(LZ4_INCLUDE_DIR lz4.h)
+ FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4)
+ INCLUDE(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR)
+ELSE(ENABLE_LZ4)
+ SET(LZ4_FOUND FALSE) # Override cached value
+ENDIF(ENABLE_LZ4)
IF(LZ4_FOUND)
SET(HAVE_LIBLZ4 1)
SET(HAVE_LZ4_H 1)
@@ -533,6 +538,31 @@ IF(LZ4_FOUND)
ENDIF(LZ4_FOUND)
MARK_AS_ADVANCED(CLEAR LZ4_INCLUDE_DIR)
MARK_AS_ADVANCED(CLEAR LZ4_LIBRARY)
+#
+# Find Zstd
+#
+IF (ZSTD_INCLUDE_DIR)
+ # Already in cache, be silent
+ SET(ZSTD_FIND_QUIETLY TRUE)
+ENDIF (ZSTD_INCLUDE_DIR)
+
+FIND_PATH(ZSTD_INCLUDE_DIR zstd.h)
+FIND_LIBRARY(ZSTD_LIBRARY NAMES zstd libzstd)
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZSTD DEFAULT_MSG ZSTD_LIBRARY ZSTD_INCLUDE_DIR)
+IF(ZSTD_FOUND)
+ SET(HAVE_ZSTD_H 1)
+ INCLUDE_DIRECTORIES(${ZSTD_INCLUDE_DIR})
+ LIST(APPEND ADDITIONAL_LIBS ${ZSTD_LIBRARY})
+ SET(CMAKE_REQUIRED_LIBRARIES ${ZSTD_LIBRARY})
+ SET(CMAKE_REQUIRED_INCLUDES ${ZSTD_INCLUDE_DIR})
+ CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_LIBZSTD)
+ #
+ # TODO: test for static library.
+ #
+ENDIF(ZSTD_FOUND)
+MARK_AS_ADVANCED(CLEAR ZSTD_INCLUDE_DIR)
+MARK_AS_ADVANCED(CLEAR ZSTD_LIBRARY)
#
# Check headers
@@ -609,6 +639,7 @@ LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H)
LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
LA_CHECK_INCLUDE_FILE("sys/statfs.h" HAVE_SYS_STATFS_H)
LA_CHECK_INCLUDE_FILE("sys/statvfs.h" HAVE_SYS_STATVFS_H)
+LA_CHECK_INCLUDE_FILE("sys/sysmacros.h" HAVE_SYS_SYSMACROS_H)
LA_CHECK_INCLUDE_FILE("sys/time.h" HAVE_SYS_TIME_H)
LA_CHECK_INCLUDE_FILE("sys/utime.h" HAVE_SYS_UTIME_H)
LA_CHECK_INCLUDE_FILE("sys/utsname.h" HAVE_SYS_UTSNAME_H)
diff --git a/archivers/libarchive/files/Makefile.am b/archivers/libarchive/files/Makefile.am
index 63d7cc7913a..2c3ce999ee7 100644
--- a/archivers/libarchive/files/Makefile.am
+++ b/archivers/libarchive/files/Makefile.am
@@ -167,6 +167,7 @@ libarchive_la_SOURCES= \
libarchive/archive_read_support_filter_rpm.c \
libarchive/archive_read_support_filter_uu.c \
libarchive/archive_read_support_filter_xz.c \
+ libarchive/archive_read_support_filter_zstd.c \
libarchive/archive_read_support_format_7zip.c \
libarchive/archive_read_support_format_all.c \
libarchive/archive_read_support_format_ar.c \
@@ -213,6 +214,7 @@ libarchive_la_SOURCES= \
libarchive/archive_write_add_filter_program.c \
libarchive/archive_write_add_filter_uuencode.c \
libarchive/archive_write_add_filter_xz.c \
+ libarchive/archive_write_add_filter_zstd.c \
libarchive/archive_write_set_format.c \
libarchive/archive_write_set_format_7zip.c \
libarchive/archive_write_set_format_ar.c \
@@ -402,6 +404,7 @@ libarchive_test_SOURCES= \
libarchive/test/test_compat_uudecode_large.c \
libarchive/test/test_compat_xz.c \
libarchive/test/test_compat_zip.c \
+ libarchive/test/test_compat_zstd.c \
libarchive/test/test_empty_write.c \
libarchive/test/test_entry.c \
libarchive/test/test_entry_strmode.c \
@@ -559,6 +562,7 @@ libarchive_test_SOURCES= \
libarchive/test/test_write_filter_program.c \
libarchive/test/test_write_filter_uuencode.c \
libarchive/test/test_write_filter_xz.c \
+ libarchive/test/test_write_filter_zstd.c \
libarchive/test/test_write_format_7zip.c \
libarchive/test/test_write_format_7zip_empty.c \
libarchive/test/test_write_format_7zip_large.c \
@@ -677,6 +681,8 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_compat_zip_5.zip.uu \
libarchive/test/test_compat_zip_6.zip.uu \
libarchive/test/test_compat_zip_7.xps.uu \
+ libarchive/test/test_compat_zip_8.zip.uu \
+ libarchive/test/test_compat_zstd_1.tar.zst.uu \
libarchive/test/test_fuzz.cab.uu \
libarchive/test/test_fuzz.lzh.uu \
libarchive/test/test_fuzz_1.iso.Z.uu \
@@ -961,10 +967,12 @@ bsdtar_test_SOURCES= \
tar/test/test_extract_tar_lzma.c \
tar/test/test_extract_tar_lzo.c \
tar/test/test_extract_tar_xz.c \
+ tar/test/test_extract_tar_zstd.c \
tar/test/test_format_newc.c \
tar/test/test_help.c \
tar/test/test_leading_slash.c \
tar/test/test_missing_file.c \
+ tar/test/test_option_C_mtree.c \
tar/test/test_option_C_upper.c \
tar/test/test_option_H_upper.c \
tar/test/test_option_L_upper.c \
@@ -1000,6 +1008,7 @@ bsdtar_test_SOURCES= \
tar/test/test_option_xattrs.c \
tar/test/test_option_xz.c \
tar/test/test_option_z.c \
+ tar/test/test_option_zstd.c \
tar/test/test_patterns.c \
tar/test/test_print_longpath.c \
tar/test/test_stdio.c \
@@ -1036,6 +1045,7 @@ bsdtar_test_EXTRA_DIST= \
tar/test/test_extract.tar.lrz.uu \
tar/test/test_extract.tar.lz.uu \
tar/test/test_extract.tar.lz4.uu \
+ tar/test/test_extract.tar.zst.uu \
tar/test/test_extract.tar.lzma.uu \
tar/test/test_extract.tar.lzo.uu \
tar/test/test_extract.tar.xz.uu \
@@ -1121,6 +1131,7 @@ bsdcpio_test_SOURCES= \
cpio/test/test_extract_cpio_lzma.c \
cpio/test/test_extract_cpio_lzo.c \
cpio/test/test_extract_cpio_xz.c \
+ cpio/test/test_extract_cpio_zstd.c \
cpio/test/test_format_newc.c \
cpio/test/test_gcpio_compat.c \
cpio/test/test_missing_file.c \
@@ -1151,6 +1162,7 @@ bsdcpio_test_SOURCES= \
cpio/test/test_option_xz.c \
cpio/test/test_option_y.c \
cpio/test/test_option_z.c \
+ cpio/test/test_option_zstd.c \
cpio/test/test_owner_parse.c \
cpio/test/test_passthrough_dotdot.c \
cpio/test/test_passthrough_reverse.c
@@ -1184,6 +1196,7 @@ bsdcpio_test_EXTRA_DIST= \
cpio/test/test_extract.cpio.lrz.uu \
cpio/test/test_extract.cpio.lz.uu \
cpio/test/test_extract.cpio.lz4.uu \
+ cpio/test/test_extract.cpio.zst.uu \
cpio/test/test_extract.cpio.lzma.uu \
cpio/test/test_extract.cpio.lzo.uu \
cpio/test/test_extract.cpio.xz.uu \
@@ -1259,6 +1272,7 @@ bsdcat_test_SOURCES= \
cat/test/test_empty_gz.c \
cat/test/test_empty_lz4.c \
cat/test/test_empty_xz.c \
+ cat/test/test_empty_zstd.c \
cat/test/test_error.c \
cat/test/test_error_mixed.c \
cat/test/test_expand_Z.c \
@@ -1268,7 +1282,9 @@ bsdcat_test_SOURCES= \
cat/test/test_expand_mixed.c \
cat/test/test_expand_plain.c \
cat/test/test_expand_xz.c \
+ cat/test/test_expand_zstd.c \
cat/test/test_help.c \
+ cat/test/test_stdin.c \
cat/test/test_version.c
bsdcat_test_CPPFLAGS= \
@@ -1294,11 +1310,13 @@ bsdcat_test_EXTRA_DIST= \
cat/test/list.h \
cat/test/test_empty.gz.uu \
cat/test/test_empty.lz4.uu \
+ cat/test/test_empty.zst.uu \
cat/test/test_empty.xz.uu \
cat/test/test_expand.Z.uu \
cat/test/test_expand.bz2.uu \
cat/test/test_expand.gz.uu \
cat/test/test_expand.lz4.uu \
+ cat/test/test_expand.zst.uu \
cat/test/test_expand.plain.uu \
cat/test/test_expand.xz.uu \
cat/test/CMakeLists.txt
diff --git a/archivers/libarchive/files/Makefile.in b/archivers/libarchive/files/Makefile.in
index a7f7ae9528a..99faaf826a3 100644
--- a/archivers/libarchive/files/Makefile.in
+++ b/archivers/libarchive/files/Makefile.in
@@ -238,6 +238,7 @@ am__libarchive_la_SOURCES_DIST = libarchive/archive_acl.c \
libarchive/archive_read_support_filter_rpm.c \
libarchive/archive_read_support_filter_uu.c \
libarchive/archive_read_support_filter_xz.c \
+ libarchive/archive_read_support_filter_zstd.c \
libarchive/archive_read_support_format_7zip.c \
libarchive/archive_read_support_format_all.c \
libarchive/archive_read_support_format_ar.c \
@@ -281,6 +282,7 @@ am__libarchive_la_SOURCES_DIST = libarchive/archive_acl.c \
libarchive/archive_write_add_filter_program.c \
libarchive/archive_write_add_filter_uuencode.c \
libarchive/archive_write_add_filter_xz.c \
+ libarchive/archive_write_add_filter_zstd.c \
libarchive/archive_write_set_format.c \
libarchive/archive_write_set_format_7zip.c \
libarchive/archive_write_set_format_ar.c \
@@ -366,6 +368,7 @@ am_libarchive_la_OBJECTS = libarchive/archive_acl.lo \
libarchive/archive_read_support_filter_rpm.lo \
libarchive/archive_read_support_filter_uu.lo \
libarchive/archive_read_support_filter_xz.lo \
+ libarchive/archive_read_support_filter_zstd.lo \
libarchive/archive_read_support_format_7zip.lo \
libarchive/archive_read_support_format_all.lo \
libarchive/archive_read_support_format_ar.lo \
@@ -407,6 +410,7 @@ am_libarchive_la_OBJECTS = libarchive/archive_acl.lo \
libarchive/archive_write_add_filter_program.lo \
libarchive/archive_write_add_filter_uuencode.lo \
libarchive/archive_write_add_filter_xz.lo \
+ libarchive/archive_write_add_filter_zstd.lo \
libarchive/archive_write_set_format.lo \
libarchive/archive_write_set_format_7zip.lo \
libarchive/archive_write_set_format_ar.lo \
@@ -464,6 +468,7 @@ am_bsdcat_test_OBJECTS = $(am__objects_7) \
cat/test/bsdcat_test-test_empty_gz.$(OBJEXT) \
cat/test/bsdcat_test-test_empty_lz4.$(OBJEXT) \
cat/test/bsdcat_test-test_empty_xz.$(OBJEXT) \
+ cat/test/bsdcat_test-test_empty_zstd.$(OBJEXT) \
cat/test/bsdcat_test-test_error.$(OBJEXT) \
cat/test/bsdcat_test-test_error_mixed.$(OBJEXT) \
cat/test/bsdcat_test-test_expand_Z.$(OBJEXT) \
@@ -473,7 +478,9 @@ am_bsdcat_test_OBJECTS = $(am__objects_7) \
cat/test/bsdcat_test-test_expand_mixed.$(OBJEXT) \
cat/test/bsdcat_test-test_expand_plain.$(OBJEXT) \
cat/test/bsdcat_test-test_expand_xz.$(OBJEXT) \
+ cat/test/bsdcat_test-test_expand_zstd.$(OBJEXT) \
cat/test/bsdcat_test-test_help.$(OBJEXT) \
+ cat/test/bsdcat_test-test_stdin.$(OBJEXT) \
cat/test/bsdcat_test-test_version.$(OBJEXT)
bsdcat_test_OBJECTS = $(am_bsdcat_test_OBJECTS)
bsdcat_test_DEPENDENCIES = libarchive_fe.la
@@ -504,6 +511,7 @@ am_bsdcpio_test_OBJECTS = $(am__objects_9) \
cpio/test/bsdcpio_test-test_extract_cpio_lzma.$(OBJEXT) \
cpio/test/bsdcpio_test-test_extract_cpio_lzo.$(OBJEXT) \
cpio/test/bsdcpio_test-test_extract_cpio_xz.$(OBJEXT) \
+ cpio/test/bsdcpio_test-test_extract_cpio_zstd.$(OBJEXT) \
cpio/test/bsdcpio_test-test_format_newc.$(OBJEXT) \
cpio/test/bsdcpio_test-test_gcpio_compat.$(OBJEXT) \
cpio/test/bsdcpio_test-test_missing_file.$(OBJEXT) \
@@ -534,6 +542,7 @@ am_bsdcpio_test_OBJECTS = $(am__objects_9) \
cpio/test/bsdcpio_test-test_option_xz.$(OBJEXT) \
cpio/test/bsdcpio_test-test_option_y.$(OBJEXT) \
cpio/test/bsdcpio_test-test_option_z.$(OBJEXT) \
+ cpio/test/bsdcpio_test-test_option_zstd.$(OBJEXT) \
cpio/test/bsdcpio_test-test_owner_parse.$(OBJEXT) \
cpio/test/bsdcpio_test-test_passthrough_dotdot.$(OBJEXT) \
cpio/test/bsdcpio_test-test_passthrough_reverse.$(OBJEXT)
@@ -571,10 +580,12 @@ am_bsdtar_test_OBJECTS = $(am__objects_11) \
tar/test/bsdtar_test-test_extract_tar_lzma.$(OBJEXT) \
tar/test/bsdtar_test-test_extract_tar_lzo.$(OBJEXT) \
tar/test/bsdtar_test-test_extract_tar_xz.$(OBJEXT) \
+ tar/test/bsdtar_test-test_extract_tar_zstd.$(OBJEXT) \
tar/test/bsdtar_test-test_format_newc.$(OBJEXT) \
tar/test/bsdtar_test-test_help.$(OBJEXT) \
tar/test/bsdtar_test-test_leading_slash.$(OBJEXT) \
tar/test/bsdtar_test-test_missing_file.$(OBJEXT) \
+ tar/test/bsdtar_test-test_option_C_mtree.$(OBJEXT) \
tar/test/bsdtar_test-test_option_C_upper.$(OBJEXT) \
tar/test/bsdtar_test-test_option_H_upper.$(OBJEXT) \
tar/test/bsdtar_test-test_option_L_upper.$(OBJEXT) \
@@ -610,6 +621,7 @@ am_bsdtar_test_OBJECTS = $(am__objects_11) \
tar/test/bsdtar_test-test_option_xattrs.$(OBJEXT) \
tar/test/bsdtar_test-test_option_xz.$(OBJEXT) \
tar/test/bsdtar_test-test_option_z.$(OBJEXT) \
+ tar/test/bsdtar_test-test_option_zstd.$(OBJEXT) \
tar/test/bsdtar_test-test_patterns.$(OBJEXT) \
tar/test/bsdtar_test-test_print_longpath.$(OBJEXT) \
tar/test/bsdtar_test-test_stdio.$(OBJEXT) \
@@ -682,6 +694,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \
libarchive/archive_read_support_filter_rpm.c \
libarchive/archive_read_support_filter_uu.c \
libarchive/archive_read_support_filter_xz.c \
+ libarchive/archive_read_support_filter_zstd.c \
libarchive/archive_read_support_format_7zip.c \
libarchive/archive_read_support_format_all.c \
libarchive/archive_read_support_format_ar.c \
@@ -725,6 +738,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \
libarchive/archive_write_add_filter_program.c \
libarchive/archive_write_add_filter_uuencode.c \
libarchive/archive_write_add_filter_xz.c \
+ libarchive/archive_write_add_filter_zstd.c \
libarchive/archive_write_set_format.c \
libarchive/archive_write_set_format_7zip.c \
libarchive/archive_write_set_format_ar.c \
@@ -818,6 +832,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \
libarchive/test/test_compat_uudecode_large.c \
libarchive/test/test_compat_xz.c \
libarchive/test/test_compat_zip.c \
+ libarchive/test/test_compat_zstd.c \
libarchive/test/test_empty_write.c \
libarchive/test/test_entry.c \
libarchive/test/test_entry_strmode.c \
@@ -975,6 +990,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \
libarchive/test/test_write_filter_program.c \
libarchive/test/test_write_filter_uuencode.c \
libarchive/test/test_write_filter_xz.c \
+ libarchive/test/test_write_filter_zstd.c \
libarchive/test/test_write_format_7zip.c \
libarchive/test/test_write_format_7zip_empty.c \
libarchive/test/test_write_format_7zip_large.c \
@@ -1080,6 +1096,7 @@ am__objects_17 = libarchive/libarchive_test-archive_acl.$(OBJEXT) \
libarchive/libarchive_test-archive_read_support_filter_rpm.$(OBJEXT) \
libarchive/libarchive_test-archive_read_support_filter_uu.$(OBJEXT) \
libarchive/libarchive_test-archive_read_support_filter_xz.$(OBJEXT) \
+ libarchive/libarchive_test-archive_read_support_filter_zstd.$(OBJEXT) \
libarchive/libarchive_test-archive_read_support_format_7zip.$(OBJEXT) \
libarchive/libarchive_test-archive_read_support_format_all.$(OBJEXT) \
libarchive/libarchive_test-archive_read_support_format_ar.$(OBJEXT) \
@@ -1122,6 +1139,7 @@ am__objects_17 = libarchive/libarchive_test-archive_acl.$(OBJEXT) \
libarchive/libarchive_test-archive_write_add_filter_program.$(OBJEXT) \
libarchive/libarchive_test-archive_write_add_filter_uuencode.$(OBJEXT) \
libarchive/libarchive_test-archive_write_add_filter_xz.$(OBJEXT) \
+ libarchive/libarchive_test-archive_write_add_filter_zstd.$(OBJEXT) \
libarchive/libarchive_test-archive_write_set_format.$(OBJEXT) \
libarchive/libarchive_test-archive_write_set_format_7zip.$(OBJEXT) \
libarchive/libarchive_test-archive_write_set_format_ar.$(OBJEXT) \
@@ -1210,6 +1228,7 @@ am_libarchive_test_OBJECTS = $(am__objects_17) $(am__objects_18) \
libarchive/test/libarchive_test-test_compat_uudecode_large.$(OBJEXT) \
libarchive/test/libarchive_test-test_compat_xz.$(OBJEXT) \
libarchive/test/libarchive_test-test_compat_zip.$(OBJEXT) \
+ libarchive/test/libarchive_test-test_compat_zstd.$(OBJEXT) \
libarchive/test/libarchive_test-test_empty_write.$(OBJEXT) \
libarchive/test/libarchive_test-test_entry.$(OBJEXT) \
libarchive/test/libarchive_test-test_entry_strmode.$(OBJEXT) \
@@ -1367,6 +1386,7 @@ am_libarchive_test_OBJECTS = $(am__objects_17) $(am__objects_18) \
libarchive/test/libarchive_test-test_write_filter_program.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_filter_uuencode.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_filter_xz.$(OBJEXT) \
+ libarchive/test/libarchive_test-test_write_filter_zstd.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_format_7zip.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_format_7zip_empty.$(OBJEXT) \
libarchive/test/libarchive_test-test_write_format_7zip_large.$(OBJEXT) \
@@ -1954,6 +1974,7 @@ libarchive_la_SOURCES = libarchive/archive_acl.c \
libarchive/archive_read_support_filter_rpm.c \
libarchive/archive_read_support_filter_uu.c \
libarchive/archive_read_support_filter_xz.c \
+ libarchive/archive_read_support_filter_zstd.c \
libarchive/archive_read_support_format_7zip.c \
libarchive/archive_read_support_format_all.c \
libarchive/archive_read_support_format_ar.c \
@@ -1997,6 +2018,7 @@ libarchive_la_SOURCES = libarchive/archive_acl.c \
libarchive/archive_write_add_filter_program.c \
libarchive/archive_write_add_filter_uuencode.c \
libarchive/archive_write_add_filter_xz.c \
+ libarchive/archive_write_add_filter_zstd.c \
libarchive/archive_write_set_format.c \
libarchive/archive_write_set_format_7zip.c \
libarchive/archive_write_set_format_ar.c \
@@ -2162,6 +2184,7 @@ libarchive_test_SOURCES = \
libarchive/test/test_compat_uudecode_large.c \
libarchive/test/test_compat_xz.c \
libarchive/test/test_compat_zip.c \
+ libarchive/test/test_compat_zstd.c \
libarchive/test/test_empty_write.c \
libarchive/test/test_entry.c \
libarchive/test/test_entry_strmode.c \
@@ -2319,6 +2342,7 @@ libarchive_test_SOURCES = \
libarchive/test/test_write_filter_program.c \
libarchive/test/test_write_filter_uuencode.c \
libarchive/test/test_write_filter_xz.c \
+ libarchive/test/test_write_filter_zstd.c \
libarchive/test/test_write_format_7zip.c \
libarchive/test/test_write_format_7zip_empty.c \
libarchive/test/test_write_format_7zip_large.c \
@@ -2428,6 +2452,8 @@ libarchive_test_EXTRA_DIST = \
libarchive/test/test_compat_zip_5.zip.uu \
libarchive/test/test_compat_zip_6.zip.uu \
libarchive/test/test_compat_zip_7.xps.uu \
+ libarchive/test/test_compat_zip_8.zip.uu \
+ libarchive/test/test_compat_zstd_1.tar.zst.uu \
libarchive/test/test_fuzz.cab.uu \
libarchive/test/test_fuzz.lzh.uu \
libarchive/test/test_fuzz_1.iso.Z.uu \
@@ -2687,10 +2713,12 @@ bsdtar_test_SOURCES = \
tar/test/test_extract_tar_lzma.c \
tar/test/test_extract_tar_lzo.c \
tar/test/test_extract_tar_xz.c \
+ tar/test/test_extract_tar_zstd.c \
tar/test/test_format_newc.c \
tar/test/test_help.c \
tar/test/test_leading_slash.c \
tar/test/test_missing_file.c \
+ tar/test/test_option_C_mtree.c \
tar/test/test_option_C_upper.c \
tar/test/test_option_H_upper.c \
tar/test/test_option_L_upper.c \
@@ -2726,6 +2754,7 @@ bsdtar_test_SOURCES = \
tar/test/test_option_xattrs.c \
tar/test/test_option_xz.c \
tar/test/test_option_z.c \
+ tar/test/test_option_zstd.c \
tar/test/test_patterns.c \
tar/test/test_print_longpath.c \
tar/test/test_stdio.c \
@@ -2754,6 +2783,7 @@ bsdtar_test_EXTRA_DIST = \
tar/test/test_extract.tar.lrz.uu \
tar/test/test_extract.tar.lz.uu \
tar/test/test_extract.tar.lz4.uu \
+ tar/test/test_extract.tar.zst.uu \
tar/test/test_extract.tar.lzma.uu \
tar/test/test_extract.tar.lzo.uu \
tar/test/test_extract.tar.xz.uu \
@@ -2817,6 +2847,7 @@ bsdcpio_test_SOURCES = \
cpio/test/test_extract_cpio_lzma.c \
cpio/test/test_extract_cpio_lzo.c \
cpio/test/test_extract_cpio_xz.c \
+ cpio/test/test_extract_cpio_zstd.c \
cpio/test/test_format_newc.c \
cpio/test/test_gcpio_compat.c \
cpio/test/test_missing_file.c \
@@ -2847,6 +2878,7 @@ bsdcpio_test_SOURCES = \
cpio/test/test_option_xz.c \
cpio/test/test_option_y.c \
cpio/test/test_option_z.c \
+ cpio/test/test_option_zstd.c \
cpio/test/test_owner_parse.c \
cpio/test/test_passthrough_dotdot.c \
cpio/test/test_passthrough_reverse.c
@@ -2872,6 +2904,7 @@ bsdcpio_test_EXTRA_DIST = \
cpio/test/test_extract.cpio.lrz.uu \
cpio/test/test_extract.cpio.lz.uu \
cpio/test/test_extract.cpio.lz4.uu \
+ cpio/test/test_extract.cpio.zst.uu \
cpio/test/test_extract.cpio.lzma.uu \
cpio/test/test_extract.cpio.lzo.uu \
cpio/test/test_extract.cpio.xz.uu \
@@ -2928,6 +2961,7 @@ bsdcat_test_SOURCES = \
cat/test/test_empty_gz.c \
cat/test/test_empty_lz4.c \
cat/test/test_empty_xz.c \
+ cat/test/test_empty_zstd.c \
cat/test/test_error.c \
cat/test/test_error_mixed.c \
cat/test/test_expand_Z.c \
@@ -2937,7 +2971,9 @@ bsdcat_test_SOURCES = \
cat/test/test_expand_mixed.c \
cat/test/test_expand_plain.c \
cat/test/test_expand_xz.c \
+ cat/test/test_expand_zstd.c \
cat/test/test_help.c \
+ cat/test/test_stdin.c \
cat/test/test_version.c
bsdcat_test_CPPFLAGS = \
@@ -2956,11 +2992,13 @@ bsdcat_test_EXTRA_DIST = \
cat/test/list.h \
cat/test/test_empty.gz.uu \
cat/test/test_empty.lz4.uu \
+ cat/test/test_empty.zst.uu \
cat/test/test_empty.xz.uu \
cat/test/test_expand.Z.uu \
cat/test/test_expand.bz2.uu \
cat/test/test_expand.gz.uu \
cat/test/test_expand.lz4.uu \
+ cat/test/test_expand.zst.uu \
cat/test/test_expand.plain.uu \
cat/test/test_expand.xz.uu \
cat/test/CMakeLists.txt
@@ -3185,6 +3223,9 @@ libarchive/archive_read_support_filter_uu.lo: \
libarchive/archive_read_support_filter_xz.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
+libarchive/archive_read_support_filter_zstd.lo: \
+ libarchive/$(am__dirstamp) \
+ libarchive/$(DEPDIR)/$(am__dirstamp)
libarchive/archive_read_support_format_7zip.lo: \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
@@ -3298,6 +3339,9 @@ libarchive/archive_write_add_filter_uuencode.lo: \
libarchive/$(DEPDIR)/$(am__dirstamp)
libarchive/archive_write_add_filter_xz.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
+libarchive/archive_write_add_filter_zstd.lo: \
+ libarchive/$(am__dirstamp) \
+ libarchive/$(DEPDIR)/$(am__dirstamp)
libarchive/archive_write_set_format.lo: libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
libarchive/archive_write_set_format_7zip.lo: \
@@ -3495,6 +3539,8 @@ cat/test/bsdcat_test-test_empty_lz4.$(OBJEXT): \
cat/test/$(am__dirstamp) cat/test/$(DEPDIR)/$(am__dirstamp)
cat/test/bsdcat_test-test_empty_xz.$(OBJEXT): \
cat/test/$(am__dirstamp) cat/test/$(DEPDIR)/$(am__dirstamp)
+cat/test/bsdcat_test-test_empty_zstd.$(OBJEXT): \
+ cat/test/$(am__dirstamp) cat/test/$(DEPDIR)/$(am__dirstamp)
cat/test/bsdcat_test-test_error.$(OBJEXT): cat/test/$(am__dirstamp) \
cat/test/$(DEPDIR)/$(am__dirstamp)
cat/test/bsdcat_test-test_error_mixed.$(OBJEXT): \
@@ -3513,8 +3559,12 @@ cat/test/bsdcat_test-test_expand_plain.$(OBJEXT): \
cat/test/$(am__dirstamp) cat/test/$(DEPDIR)/$(am__dirstamp)
cat/test/bsdcat_test-test_expand_xz.$(OBJEXT): \
cat/test/$(am__dirstamp) cat/test/$(DEPDIR)/$(am__dirstamp)
+cat/test/bsdcat_test-test_expand_zstd.$(OBJEXT): \
+ cat/test/$(am__dirstamp) cat/test/$(DEPDIR)/$(am__dirstamp)
cat/test/bsdcat_test-test_help.$(OBJEXT): cat/test/$(am__dirstamp) \
cat/test/$(DEPDIR)/$(am__dirstamp)
+cat/test/bsdcat_test-test_stdin.$(OBJEXT): cat/test/$(am__dirstamp) \
+ cat/test/$(DEPDIR)/$(am__dirstamp)
cat/test/bsdcat_test-test_version.$(OBJEXT): cat/test/$(am__dirstamp) \
cat/test/$(DEPDIR)/$(am__dirstamp)
@@ -3577,6 +3627,8 @@ cpio/test/bsdcpio_test-test_extract_cpio_lzo.$(OBJEXT): \
cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
cpio/test/bsdcpio_test-test_extract_cpio_xz.$(OBJEXT): \
cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
+cpio/test/bsdcpio_test-test_extract_cpio_zstd.$(OBJEXT): \
+ cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
cpio/test/bsdcpio_test-test_format_newc.$(OBJEXT): \
cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
cpio/test/bsdcpio_test-test_gcpio_compat.$(OBJEXT): \
@@ -3637,6 +3689,8 @@ cpio/test/bsdcpio_test-test_option_y.$(OBJEXT): \
cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
cpio/test/bsdcpio_test-test_option_z.$(OBJEXT): \
cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
+cpio/test/bsdcpio_test-test_option_zstd.$(OBJEXT): \
+ cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
cpio/test/bsdcpio_test-test_owner_parse.$(OBJEXT): \
cpio/test/$(am__dirstamp) cpio/test/$(DEPDIR)/$(am__dirstamp)
cpio/test/bsdcpio_test-test_passthrough_dotdot.$(OBJEXT): \
@@ -3713,6 +3767,8 @@ tar/test/bsdtar_test-test_extract_tar_lzo.$(OBJEXT): \
tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_extract_tar_xz.$(OBJEXT): \
tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
+tar/test/bsdtar_test-test_extract_tar_zstd.$(OBJEXT): \
+ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_format_newc.$(OBJEXT): \
tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_help.$(OBJEXT): tar/test/$(am__dirstamp) \
@@ -3721,6 +3777,8 @@ tar/test/bsdtar_test-test_leading_slash.$(OBJEXT): \
tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_missing_file.$(OBJEXT): \
tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
+tar/test/bsdtar_test-test_option_C_mtree.$(OBJEXT): \
+ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_option_C_upper.$(OBJEXT): \
tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_option_H_upper.$(OBJEXT): \
@@ -3791,6 +3849,8 @@ tar/test/bsdtar_test-test_option_xz.$(OBJEXT): \
tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
tar/test/bsdtar_test-test_option_z.$(OBJEXT): \
tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
+tar/test/bsdtar_test-test_option_zstd.$(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_print_longpath.$(OBJEXT): \
@@ -3956,6 +4016,9 @@ libarchive/libarchive_test-archive_read_support_filter_uu.$(OBJEXT): \
libarchive/libarchive_test-archive_read_support_filter_xz.$(OBJEXT): \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
+libarchive/libarchive_test-archive_read_support_filter_zstd.$(OBJEXT): \
+ libarchive/$(am__dirstamp) \
+ libarchive/$(DEPDIR)/$(am__dirstamp)
libarchive/libarchive_test-archive_read_support_format_7zip.$(OBJEXT): \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
@@ -4082,6 +4145,9 @@ libarchive/libarchive_test-archive_write_add_filter_uuencode.$(OBJEXT): \
libarchive/libarchive_test-archive_write_add_filter_xz.$(OBJEXT): \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
+libarchive/libarchive_test-archive_write_add_filter_zstd.$(OBJEXT): \
+ libarchive/$(am__dirstamp) \
+ libarchive/$(DEPDIR)/$(am__dirstamp)
libarchive/libarchive_test-archive_write_set_format.$(OBJEXT): \
libarchive/$(am__dirstamp) \
libarchive/$(DEPDIR)/$(am__dirstamp)
@@ -4370,6 +4436,9 @@ libarchive/test/libarchive_test-test_compat_xz.$(OBJEXT): \
libarchive/test/libarchive_test-test_compat_zip.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/libarchive_test-test_compat_zstd.$(OBJEXT): \
+ libarchive/test/$(am__dirstamp) \
+ libarchive/test/$(DEPDIR)/$(am__dirstamp)
libarchive/test/libarchive_test-test_empty_write.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -4841,6 +4910,9 @@ libarchive/test/libarchive_test-test_write_filter_uuencode.$(OBJEXT): \
libarchive/test/libarchive_test-test_write_filter_xz.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/libarchive_test-test_write_filter_zstd.$(OBJEXT): \
+ libarchive/test/$(am__dirstamp) \
+ libarchive/test/$(DEPDIR)/$(am__dirstamp)
libarchive/test/libarchive_test-test_write_format_7zip.$(OBJEXT): \
libarchive/test/$(am__dirstamp) \
libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -5011,6 +5083,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_empty_gz.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_empty_lz4.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_empty_xz.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_empty_zstd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_error.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_error_mixed.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_expand_Z.Po@am__quote@
@@ -5020,7 +5093,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_expand_mixed.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_expand_plain.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_expand_xz.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_expand_zstd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_help.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_stdin.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cat/test/$(DEPDIR)/bsdcat_test-test_version.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/$(DEPDIR)/bsdcpio-cmdline.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/$(DEPDIR)/bsdcpio-cpio.Po@am__quote@
@@ -5039,6 +5114,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_lzma.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_lzo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_xz.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_zstd.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@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_missing_file.Po@am__quote@
@@ -5069,6 +5145,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_option_xz.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_option_y.Po@am__quote@
@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_option_zstd.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_passthrough_dotdot.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@cpio/test/$(DEPDIR)/bsdcpio_test-test_passthrough_reverse.Po@am__quote@
@@ -5127,6 +5204,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_filter_rpm.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_filter_uu.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_filter_xz.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_filter_zstd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_7zip.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@
@@ -5164,6 +5242,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_add_filter_program.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_add_filter_uuencode.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_add_filter_xz.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_add_filter_zstd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_disk_posix.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_disk_windows.Plo@am__quote@
@@ -5248,6 +5327,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_rpm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_uu.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_xz.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_zstd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_read_support_format_7zip.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_read_support_format_all.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_read_support_format_ar.Po@am__quote@
@@ -5285,6 +5365,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_program.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_uuencode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_xz.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_zstd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_posix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_set_standard_lookup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_windows.Po@am__quote@
@@ -5377,6 +5458,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_compat_uudecode_large.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_compat_xz.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_compat_zip.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_compat_zstd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_empty_write.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_entry.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_entry_strmode.Po@am__quote@
@@ -5534,6 +5616,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_program.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_uuencode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_xz.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_zstd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_7zip.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_7zip_empty.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_7zip_large.Po@am__quote@
@@ -5606,10 +5689,12 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_lzma.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_lzo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_xz.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_zstd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_format_newc.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_leading_slash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_missing_file.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_C_mtree.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_C_upper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_H_upper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_L_upper.Po@am__quote@
@@ -5645,6 +5730,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_xz.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_z.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_zstd.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_print_longpath.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_stdio.Po@am__quote@
@@ -5818,6 +5904,20 @@ cat/test/bsdcat_test-test_empty_xz.obj: cat/test/test_empty_xz.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cat/test/bsdcat_test-test_empty_xz.obj `if test -f 'cat/test/test_empty_xz.c'; then $(CYGPATH_W) 'cat/test/test_empty_xz.c'; else $(CYGPATH_W) '$(srcdir)/cat/test/test_empty_xz.c'; fi`
+cat/test/bsdcat_test-test_empty_zstd.o: cat/test/test_empty_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cat/test/bsdcat_test-test_empty_zstd.o -MD -MP -MF cat/test/$(DEPDIR)/bsdcat_test-test_empty_zstd.Tpo -c -o cat/test/bsdcat_test-test_empty_zstd.o `test -f 'cat/test/test_empty_zstd.c' || echo '$(srcdir)/'`cat/test/test_empty_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cat/test/$(DEPDIR)/bsdcat_test-test_empty_zstd.Tpo cat/test/$(DEPDIR)/bsdcat_test-test_empty_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cat/test/test_empty_zstd.c' object='cat/test/bsdcat_test-test_empty_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cat/test/bsdcat_test-test_empty_zstd.o `test -f 'cat/test/test_empty_zstd.c' || echo '$(srcdir)/'`cat/test/test_empty_zstd.c
+
+cat/test/bsdcat_test-test_empty_zstd.obj: cat/test/test_empty_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cat/test/bsdcat_test-test_empty_zstd.obj -MD -MP -MF cat/test/$(DEPDIR)/bsdcat_test-test_empty_zstd.Tpo -c -o cat/test/bsdcat_test-test_empty_zstd.obj `if test -f 'cat/test/test_empty_zstd.c'; then $(CYGPATH_W) 'cat/test/test_empty_zstd.c'; else $(CYGPATH_W) '$(srcdir)/cat/test/test_empty_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cat/test/$(DEPDIR)/bsdcat_test-test_empty_zstd.Tpo cat/test/$(DEPDIR)/bsdcat_test-test_empty_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cat/test/test_empty_zstd.c' object='cat/test/bsdcat_test-test_empty_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cat/test/bsdcat_test-test_empty_zstd.obj `if test -f 'cat/test/test_empty_zstd.c'; then $(CYGPATH_W) 'cat/test/test_empty_zstd.c'; else $(CYGPATH_W) '$(srcdir)/cat/test/test_empty_zstd.c'; fi`
+
cat/test/bsdcat_test-test_error.o: cat/test/test_error.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cat/test/bsdcat_test-test_error.o -MD -MP -MF cat/test/$(DEPDIR)/bsdcat_test-test_error.Tpo -c -o cat/test/bsdcat_test-test_error.o `test -f 'cat/test/test_error.c' || echo '$(srcdir)/'`cat/test/test_error.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cat/test/$(DEPDIR)/bsdcat_test-test_error.Tpo cat/test/$(DEPDIR)/bsdcat_test-test_error.Po
@@ -5944,6 +6044,20 @@ cat/test/bsdcat_test-test_expand_xz.obj: cat/test/test_expand_xz.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cat/test/bsdcat_test-test_expand_xz.obj `if test -f 'cat/test/test_expand_xz.c'; then $(CYGPATH_W) 'cat/test/test_expand_xz.c'; else $(CYGPATH_W) '$(srcdir)/cat/test/test_expand_xz.c'; fi`
+cat/test/bsdcat_test-test_expand_zstd.o: cat/test/test_expand_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cat/test/bsdcat_test-test_expand_zstd.o -MD -MP -MF cat/test/$(DEPDIR)/bsdcat_test-test_expand_zstd.Tpo -c -o cat/test/bsdcat_test-test_expand_zstd.o `test -f 'cat/test/test_expand_zstd.c' || echo '$(srcdir)/'`cat/test/test_expand_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cat/test/$(DEPDIR)/bsdcat_test-test_expand_zstd.Tpo cat/test/$(DEPDIR)/bsdcat_test-test_expand_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cat/test/test_expand_zstd.c' object='cat/test/bsdcat_test-test_expand_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cat/test/bsdcat_test-test_expand_zstd.o `test -f 'cat/test/test_expand_zstd.c' || echo '$(srcdir)/'`cat/test/test_expand_zstd.c
+
+cat/test/bsdcat_test-test_expand_zstd.obj: cat/test/test_expand_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cat/test/bsdcat_test-test_expand_zstd.obj -MD -MP -MF cat/test/$(DEPDIR)/bsdcat_test-test_expand_zstd.Tpo -c -o cat/test/bsdcat_test-test_expand_zstd.obj `if test -f 'cat/test/test_expand_zstd.c'; then $(CYGPATH_W) 'cat/test/test_expand_zstd.c'; else $(CYGPATH_W) '$(srcdir)/cat/test/test_expand_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cat/test/$(DEPDIR)/bsdcat_test-test_expand_zstd.Tpo cat/test/$(DEPDIR)/bsdcat_test-test_expand_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cat/test/test_expand_zstd.c' object='cat/test/bsdcat_test-test_expand_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cat/test/bsdcat_test-test_expand_zstd.obj `if test -f 'cat/test/test_expand_zstd.c'; then $(CYGPATH_W) 'cat/test/test_expand_zstd.c'; else $(CYGPATH_W) '$(srcdir)/cat/test/test_expand_zstd.c'; fi`
+
cat/test/bsdcat_test-test_help.o: cat/test/test_help.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cat/test/bsdcat_test-test_help.o -MD -MP -MF cat/test/$(DEPDIR)/bsdcat_test-test_help.Tpo -c -o cat/test/bsdcat_test-test_help.o `test -f 'cat/test/test_help.c' || echo '$(srcdir)/'`cat/test/test_help.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cat/test/$(DEPDIR)/bsdcat_test-test_help.Tpo cat/test/$(DEPDIR)/bsdcat_test-test_help.Po
@@ -5958,6 +6072,20 @@ cat/test/bsdcat_test-test_help.obj: cat/test/test_help.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cat/test/bsdcat_test-test_help.obj `if test -f 'cat/test/test_help.c'; then $(CYGPATH_W) 'cat/test/test_help.c'; else $(CYGPATH_W) '$(srcdir)/cat/test/test_help.c'; fi`
+cat/test/bsdcat_test-test_stdin.o: cat/test/test_stdin.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cat/test/bsdcat_test-test_stdin.o -MD -MP -MF cat/test/$(DEPDIR)/bsdcat_test-test_stdin.Tpo -c -o cat/test/bsdcat_test-test_stdin.o `test -f 'cat/test/test_stdin.c' || echo '$(srcdir)/'`cat/test/test_stdin.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cat/test/$(DEPDIR)/bsdcat_test-test_stdin.Tpo cat/test/$(DEPDIR)/bsdcat_test-test_stdin.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cat/test/test_stdin.c' object='cat/test/bsdcat_test-test_stdin.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cat/test/bsdcat_test-test_stdin.o `test -f 'cat/test/test_stdin.c' || echo '$(srcdir)/'`cat/test/test_stdin.c
+
+cat/test/bsdcat_test-test_stdin.obj: cat/test/test_stdin.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cat/test/bsdcat_test-test_stdin.obj -MD -MP -MF cat/test/$(DEPDIR)/bsdcat_test-test_stdin.Tpo -c -o cat/test/bsdcat_test-test_stdin.obj `if test -f 'cat/test/test_stdin.c'; then $(CYGPATH_W) 'cat/test/test_stdin.c'; else $(CYGPATH_W) '$(srcdir)/cat/test/test_stdin.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cat/test/$(DEPDIR)/bsdcat_test-test_stdin.Tpo cat/test/$(DEPDIR)/bsdcat_test-test_stdin.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cat/test/test_stdin.c' object='cat/test/bsdcat_test-test_stdin.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cat/test/bsdcat_test-test_stdin.obj `if test -f 'cat/test/test_stdin.c'; then $(CYGPATH_W) 'cat/test/test_stdin.c'; else $(CYGPATH_W) '$(srcdir)/cat/test/test_stdin.c'; fi`
+
cat/test/bsdcat_test-test_version.o: cat/test/test_version.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcat_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cat/test/bsdcat_test-test_version.o -MD -MP -MF cat/test/$(DEPDIR)/bsdcat_test-test_version.Tpo -c -o cat/test/bsdcat_test-test_version.o `test -f 'cat/test/test_version.c' || echo '$(srcdir)/'`cat/test/test_version.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cat/test/$(DEPDIR)/bsdcat_test-test_version.Tpo cat/test/$(DEPDIR)/bsdcat_test-test_version.Po
@@ -6238,6 +6366,20 @@ cpio/test/bsdcpio_test-test_extract_cpio_xz.obj: cpio/test/test_extract_cpio_xz.
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_extract_cpio_xz.obj `if test -f 'cpio/test/test_extract_cpio_xz.c'; then $(CYGPATH_W) 'cpio/test/test_extract_cpio_xz.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_extract_cpio_xz.c'; fi`
+cpio/test/bsdcpio_test-test_extract_cpio_zstd.o: cpio/test/test_extract_cpio_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_extract_cpio_zstd.o -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_zstd.Tpo -c -o cpio/test/bsdcpio_test-test_extract_cpio_zstd.o `test -f 'cpio/test/test_extract_cpio_zstd.c' || echo '$(srcdir)/'`cpio/test/test_extract_cpio_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_zstd.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cpio/test/test_extract_cpio_zstd.c' object='cpio/test/bsdcpio_test-test_extract_cpio_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_extract_cpio_zstd.o `test -f 'cpio/test/test_extract_cpio_zstd.c' || echo '$(srcdir)/'`cpio/test/test_extract_cpio_zstd.c
+
+cpio/test/bsdcpio_test-test_extract_cpio_zstd.obj: cpio/test/test_extract_cpio_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_extract_cpio_zstd.obj -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_zstd.Tpo -c -o cpio/test/bsdcpio_test-test_extract_cpio_zstd.obj `if test -f 'cpio/test/test_extract_cpio_zstd.c'; then $(CYGPATH_W) 'cpio/test/test_extract_cpio_zstd.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_extract_cpio_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_zstd.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_extract_cpio_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cpio/test/test_extract_cpio_zstd.c' object='cpio/test/bsdcpio_test-test_extract_cpio_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_extract_cpio_zstd.obj `if test -f 'cpio/test/test_extract_cpio_zstd.c'; then $(CYGPATH_W) 'cpio/test/test_extract_cpio_zstd.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_extract_cpio_zstd.c'; fi`
+
cpio/test/bsdcpio_test-test_format_newc.o: cpio/test/test_format_newc.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_format_newc.o -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_format_newc.Tpo -c -o cpio/test/bsdcpio_test-test_format_newc.o `test -f 'cpio/test/test_format_newc.c' || echo '$(srcdir)/'`cpio/test/test_format_newc.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cpio/test/$(DEPDIR)/bsdcpio_test-test_format_newc.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_format_newc.Po
@@ -6658,6 +6800,20 @@ cpio/test/bsdcpio_test-test_option_z.obj: cpio/test/test_option_z.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_option_z.obj `if test -f 'cpio/test/test_option_z.c'; then $(CYGPATH_W) 'cpio/test/test_option_z.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_option_z.c'; fi`
+cpio/test/bsdcpio_test-test_option_zstd.o: cpio/test/test_option_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_option_zstd.o -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_option_zstd.Tpo -c -o cpio/test/bsdcpio_test-test_option_zstd.o `test -f 'cpio/test/test_option_zstd.c' || echo '$(srcdir)/'`cpio/test/test_option_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cpio/test/$(DEPDIR)/bsdcpio_test-test_option_zstd.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_option_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cpio/test/test_option_zstd.c' object='cpio/test/bsdcpio_test-test_option_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_option_zstd.o `test -f 'cpio/test/test_option_zstd.c' || echo '$(srcdir)/'`cpio/test/test_option_zstd.c
+
+cpio/test/bsdcpio_test-test_option_zstd.obj: cpio/test/test_option_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_option_zstd.obj -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_option_zstd.Tpo -c -o cpio/test/bsdcpio_test-test_option_zstd.obj `if test -f 'cpio/test/test_option_zstd.c'; then $(CYGPATH_W) 'cpio/test/test_option_zstd.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_option_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cpio/test/$(DEPDIR)/bsdcpio_test-test_option_zstd.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_option_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cpio/test/test_option_zstd.c' object='cpio/test/bsdcpio_test-test_option_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cpio/test/bsdcpio_test-test_option_zstd.obj `if test -f 'cpio/test/test_option_zstd.c'; then $(CYGPATH_W) 'cpio/test/test_option_zstd.c'; else $(CYGPATH_W) '$(srcdir)/cpio/test/test_option_zstd.c'; fi`
+
cpio/test/bsdcpio_test-test_owner_parse.o: cpio/test/test_owner_parse.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdcpio_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cpio/test/bsdcpio_test-test_owner_parse.o -MD -MP -MF cpio/test/$(DEPDIR)/bsdcpio_test-test_owner_parse.Tpo -c -o cpio/test/bsdcpio_test-test_owner_parse.o `test -f 'cpio/test/test_owner_parse.c' || echo '$(srcdir)/'`cpio/test/test_owner_parse.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cpio/test/$(DEPDIR)/bsdcpio_test-test_owner_parse.Tpo cpio/test/$(DEPDIR)/bsdcpio_test-test_owner_parse.Po
@@ -7036,6 +7192,20 @@ tar/test/bsdtar_test-test_extract_tar_xz.obj: tar/test/test_extract_tar_xz.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_extract_tar_xz.obj `if test -f 'tar/test/test_extract_tar_xz.c'; then $(CYGPATH_W) 'tar/test/test_extract_tar_xz.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_extract_tar_xz.c'; fi`
+tar/test/bsdtar_test-test_extract_tar_zstd.o: tar/test/test_extract_tar_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_extract_tar_zstd.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_zstd.Tpo -c -o tar/test/bsdtar_test-test_extract_tar_zstd.o `test -f 'tar/test/test_extract_tar_zstd.c' || echo '$(srcdir)/'`tar/test/test_extract_tar_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_zstd.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_extract_tar_zstd.c' object='tar/test/bsdtar_test-test_extract_tar_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_extract_tar_zstd.o `test -f 'tar/test/test_extract_tar_zstd.c' || echo '$(srcdir)/'`tar/test/test_extract_tar_zstd.c
+
+tar/test/bsdtar_test-test_extract_tar_zstd.obj: tar/test/test_extract_tar_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_extract_tar_zstd.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_zstd.Tpo -c -o tar/test/bsdtar_test-test_extract_tar_zstd.obj `if test -f 'tar/test/test_extract_tar_zstd.c'; then $(CYGPATH_W) 'tar/test/test_extract_tar_zstd.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_extract_tar_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_zstd.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_extract_tar_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_extract_tar_zstd.c' object='tar/test/bsdtar_test-test_extract_tar_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_extract_tar_zstd.obj `if test -f 'tar/test/test_extract_tar_zstd.c'; then $(CYGPATH_W) 'tar/test/test_extract_tar_zstd.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_extract_tar_zstd.c'; fi`
+
tar/test/bsdtar_test-test_format_newc.o: tar/test/test_format_newc.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_format_newc.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_format_newc.Tpo -c -o tar/test/bsdtar_test-test_format_newc.o `test -f 'tar/test/test_format_newc.c' || echo '$(srcdir)/'`tar/test/test_format_newc.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_format_newc.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_format_newc.Po
@@ -7092,6 +7262,20 @@ tar/test/bsdtar_test-test_missing_file.obj: tar/test/test_missing_file.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_missing_file.obj `if test -f 'tar/test/test_missing_file.c'; then $(CYGPATH_W) 'tar/test/test_missing_file.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_missing_file.c'; fi`
+tar/test/bsdtar_test-test_option_C_mtree.o: tar/test/test_option_C_mtree.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_C_mtree.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_C_mtree.Tpo -c -o tar/test/bsdtar_test-test_option_C_mtree.o `test -f 'tar/test/test_option_C_mtree.c' || echo '$(srcdir)/'`tar/test/test_option_C_mtree.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_C_mtree.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_C_mtree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_C_mtree.c' object='tar/test/bsdtar_test-test_option_C_mtree.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_C_mtree.o `test -f 'tar/test/test_option_C_mtree.c' || echo '$(srcdir)/'`tar/test/test_option_C_mtree.c
+
+tar/test/bsdtar_test-test_option_C_mtree.obj: tar/test/test_option_C_mtree.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_C_mtree.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_C_mtree.Tpo -c -o tar/test/bsdtar_test-test_option_C_mtree.obj `if test -f 'tar/test/test_option_C_mtree.c'; then $(CYGPATH_W) 'tar/test/test_option_C_mtree.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_C_mtree.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_C_mtree.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_C_mtree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_C_mtree.c' object='tar/test/bsdtar_test-test_option_C_mtree.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_C_mtree.obj `if test -f 'tar/test/test_option_C_mtree.c'; then $(CYGPATH_W) 'tar/test/test_option_C_mtree.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_C_mtree.c'; fi`
+
tar/test/bsdtar_test-test_option_C_upper.o: tar/test/test_option_C_upper.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_C_upper.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_C_upper.Tpo -c -o tar/test/bsdtar_test-test_option_C_upper.o `test -f 'tar/test/test_option_C_upper.c' || echo '$(srcdir)/'`tar/test/test_option_C_upper.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_C_upper.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_C_upper.Po
@@ -7582,6 +7766,20 @@ tar/test/bsdtar_test-test_option_z.obj: tar/test/test_option_z.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_z.obj `if test -f 'tar/test/test_option_z.c'; then $(CYGPATH_W) 'tar/test/test_option_z.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_z.c'; fi`
+tar/test/bsdtar_test-test_option_zstd.o: tar/test/test_option_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_zstd.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_zstd.Tpo -c -o tar/test/bsdtar_test-test_option_zstd.o `test -f 'tar/test/test_option_zstd.c' || echo '$(srcdir)/'`tar/test/test_option_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_zstd.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_zstd.c' object='tar/test/bsdtar_test-test_option_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_zstd.o `test -f 'tar/test/test_option_zstd.c' || echo '$(srcdir)/'`tar/test/test_option_zstd.c
+
+tar/test/bsdtar_test-test_option_zstd.obj: tar/test/test_option_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_zstd.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_zstd.Tpo -c -o tar/test/bsdtar_test-test_option_zstd.obj `if test -f 'tar/test/test_option_zstd.c'; then $(CYGPATH_W) 'tar/test/test_option_zstd.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_zstd.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_zstd.c' object='tar/test/bsdtar_test-test_option_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_zstd.obj `if test -f 'tar/test/test_option_zstd.c'; then $(CYGPATH_W) 'tar/test/test_option_zstd.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_zstd.c'; fi`
+
tar/test/bsdtar_test-test_patterns.o: tar/test/test_patterns.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(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@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Po
@@ -8366,6 +8564,20 @@ libarchive/libarchive_test-archive_read_support_filter_xz.obj: libarchive/archiv
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_read_support_filter_xz.obj `if test -f 'libarchive/archive_read_support_filter_xz.c'; then $(CYGPATH_W) 'libarchive/archive_read_support_filter_xz.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_read_support_filter_xz.c'; fi`
+libarchive/libarchive_test-archive_read_support_filter_zstd.o: libarchive/archive_read_support_filter_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_read_support_filter_zstd.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_zstd.Tpo -c -o libarchive/libarchive_test-archive_read_support_filter_zstd.o `test -f 'libarchive/archive_read_support_filter_zstd.c' || echo '$(srcdir)/'`libarchive/archive_read_support_filter_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_zstd.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_read_support_filter_zstd.c' object='libarchive/libarchive_test-archive_read_support_filter_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_read_support_filter_zstd.o `test -f 'libarchive/archive_read_support_filter_zstd.c' || echo '$(srcdir)/'`libarchive/archive_read_support_filter_zstd.c
+
+libarchive/libarchive_test-archive_read_support_filter_zstd.obj: libarchive/archive_read_support_filter_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_read_support_filter_zstd.obj -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_zstd.Tpo -c -o libarchive/libarchive_test-archive_read_support_filter_zstd.obj `if test -f 'libarchive/archive_read_support_filter_zstd.c'; then $(CYGPATH_W) 'libarchive/archive_read_support_filter_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_read_support_filter_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_zstd.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_read_support_filter_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_read_support_filter_zstd.c' object='libarchive/libarchive_test-archive_read_support_filter_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_read_support_filter_zstd.obj `if test -f 'libarchive/archive_read_support_filter_zstd.c'; then $(CYGPATH_W) 'libarchive/archive_read_support_filter_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_read_support_filter_zstd.c'; fi`
+
libarchive/libarchive_test-archive_read_support_format_7zip.o: libarchive/archive_read_support_format_7zip.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_read_support_format_7zip.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_read_support_format_7zip.Tpo -c -o libarchive/libarchive_test-archive_read_support_format_7zip.o `test -f 'libarchive/archive_read_support_format_7zip.c' || echo '$(srcdir)/'`libarchive/archive_read_support_format_7zip.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_read_support_format_7zip.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_read_support_format_7zip.Po
@@ -8954,6 +9166,20 @@ libarchive/libarchive_test-archive_write_add_filter_xz.obj: libarchive/archive_w
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_write_add_filter_xz.obj `if test -f 'libarchive/archive_write_add_filter_xz.c'; then $(CYGPATH_W) 'libarchive/archive_write_add_filter_xz.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_write_add_filter_xz.c'; fi`
+libarchive/libarchive_test-archive_write_add_filter_zstd.o: libarchive/archive_write_add_filter_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_write_add_filter_zstd.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_zstd.Tpo -c -o libarchive/libarchive_test-archive_write_add_filter_zstd.o `test -f 'libarchive/archive_write_add_filter_zstd.c' || echo '$(srcdir)/'`libarchive/archive_write_add_filter_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_zstd.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_write_add_filter_zstd.c' object='libarchive/libarchive_test-archive_write_add_filter_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_write_add_filter_zstd.o `test -f 'libarchive/archive_write_add_filter_zstd.c' || echo '$(srcdir)/'`libarchive/archive_write_add_filter_zstd.c
+
+libarchive/libarchive_test-archive_write_add_filter_zstd.obj: libarchive/archive_write_add_filter_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_write_add_filter_zstd.obj -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_zstd.Tpo -c -o libarchive/libarchive_test-archive_write_add_filter_zstd.obj `if test -f 'libarchive/archive_write_add_filter_zstd.c'; then $(CYGPATH_W) 'libarchive/archive_write_add_filter_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_write_add_filter_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_zstd.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_write_add_filter_zstd.c' object='libarchive/libarchive_test-archive_write_add_filter_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_write_add_filter_zstd.obj `if test -f 'libarchive/archive_write_add_filter_zstd.c'; then $(CYGPATH_W) 'libarchive/archive_write_add_filter_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_write_add_filter_zstd.c'; fi`
+
libarchive/libarchive_test-archive_write_set_format.o: libarchive/archive_write_set_format.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_write_set_format.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_write_set_format.Tpo -c -o libarchive/libarchive_test-archive_write_set_format.o `test -f 'libarchive/archive_write_set_format.c' || echo '$(srcdir)/'`libarchive/archive_write_set_format.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_write_set_format.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_write_set_format.Po
@@ -10270,6 +10496,20 @@ libarchive/test/libarchive_test-test_compat_zip.obj: libarchive/test/test_compat
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_compat_zip.obj `if test -f 'libarchive/test/test_compat_zip.c'; then $(CYGPATH_W) 'libarchive/test/test_compat_zip.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_compat_zip.c'; fi`
+libarchive/test/libarchive_test-test_compat_zstd.o: libarchive/test/test_compat_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_compat_zstd.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_compat_zstd.Tpo -c -o libarchive/test/libarchive_test-test_compat_zstd.o `test -f 'libarchive/test/test_compat_zstd.c' || echo '$(srcdir)/'`libarchive/test/test_compat_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_compat_zstd.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_compat_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_compat_zstd.c' object='libarchive/test/libarchive_test-test_compat_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_compat_zstd.o `test -f 'libarchive/test/test_compat_zstd.c' || echo '$(srcdir)/'`libarchive/test/test_compat_zstd.c
+
+libarchive/test/libarchive_test-test_compat_zstd.obj: libarchive/test/test_compat_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_compat_zstd.obj -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_compat_zstd.Tpo -c -o libarchive/test/libarchive_test-test_compat_zstd.obj `if test -f 'libarchive/test/test_compat_zstd.c'; then $(CYGPATH_W) 'libarchive/test/test_compat_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_compat_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_compat_zstd.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_compat_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_compat_zstd.c' object='libarchive/test/libarchive_test-test_compat_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_compat_zstd.obj `if test -f 'libarchive/test/test_compat_zstd.c'; then $(CYGPATH_W) 'libarchive/test/test_compat_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_compat_zstd.c'; fi`
+
libarchive/test/libarchive_test-test_empty_write.o: libarchive/test/test_empty_write.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_empty_write.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_empty_write.Tpo -c -o libarchive/test/libarchive_test-test_empty_write.o `test -f 'libarchive/test/test_empty_write.c' || echo '$(srcdir)/'`libarchive/test/test_empty_write.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_empty_write.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_empty_write.Po
@@ -12468,6 +12708,20 @@ libarchive/test/libarchive_test-test_write_filter_xz.obj: libarchive/test/test_w
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_filter_xz.obj `if test -f 'libarchive/test/test_write_filter_xz.c'; then $(CYGPATH_W) 'libarchive/test/test_write_filter_xz.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_filter_xz.c'; fi`
+libarchive/test/libarchive_test-test_write_filter_zstd.o: libarchive/test/test_write_filter_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_filter_zstd.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_zstd.Tpo -c -o libarchive/test/libarchive_test-test_write_filter_zstd.o `test -f 'libarchive/test/test_write_filter_zstd.c' || echo '$(srcdir)/'`libarchive/test/test_write_filter_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_zstd.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_write_filter_zstd.c' object='libarchive/test/libarchive_test-test_write_filter_zstd.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_filter_zstd.o `test -f 'libarchive/test/test_write_filter_zstd.c' || echo '$(srcdir)/'`libarchive/test/test_write_filter_zstd.c
+
+libarchive/test/libarchive_test-test_write_filter_zstd.obj: libarchive/test/test_write_filter_zstd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_filter_zstd.obj -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_zstd.Tpo -c -o libarchive/test/libarchive_test-test_write_filter_zstd.obj `if test -f 'libarchive/test/test_write_filter_zstd.c'; then $(CYGPATH_W) 'libarchive/test/test_write_filter_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_filter_zstd.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_zstd.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_filter_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_write_filter_zstd.c' object='libarchive/test/libarchive_test-test_write_filter_zstd.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_filter_zstd.obj `if test -f 'libarchive/test/test_write_filter_zstd.c'; then $(CYGPATH_W) 'libarchive/test/test_write_filter_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_filter_zstd.c'; fi`
+
libarchive/test/libarchive_test-test_write_format_7zip.o: libarchive/test/test_write_format_7zip.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_write_format_7zip.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_7zip.Tpo -c -o libarchive/test/libarchive_test-test_write_format_7zip.o `test -f 'libarchive/test/test_write_format_7zip.c' || echo '$(srcdir)/'`libarchive/test/test_write_format_7zip.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_7zip.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_7zip.Po
diff --git a/archivers/libarchive/files/NEWS b/archivers/libarchive/files/NEWS
index 9527e662a86..45b40b499a6 100644
--- a/archivers/libarchive/files/NEWS
+++ b/archivers/libarchive/files/NEWS
@@ -1,3 +1,13 @@
+Sep 03, 2018: libarchive 3.3.3 released
+
+Jul 19, 2018: Avoid super-linear slowdown on malformed mtree files
+
+Jan 27, 2018: Many fixes for building with Visual Studio
+
+Oct 19, 2017: NO_OVERWRITE doesn't change existing directory attributes
+
+Aug 12, 2017: New support for Zstandard read and write filters
+
Jul 09, 2017: libarchive 3.3.2 released
Mar 16, 2017: NFSv4 ACL support for Linux (librichacl)
diff --git a/archivers/libarchive/files/README.md b/archivers/libarchive/files/README.md
index be6c13b3f03..b48142191f2 100644
--- a/archivers/libarchive/files/README.md
+++ b/archivers/libarchive/files/README.md
@@ -99,6 +99,7 @@ The library also detects and handles any of the following before evaluating the
* lzma, lzip, and xz compression
* lz4 compression
* lzop compression
+ * zstandard compression
The library can create archives in any of the following formats:
* POSIX ustar
@@ -125,6 +126,7 @@ When creating archives, the result can be filtered with any of the following:
* lzma, lzip, and xz compression
* lz4 compression
* lzop compression
+ * zstandard compression
## Notes about the Library Design
@@ -159,7 +161,7 @@ questions we are asked about libarchive:
* On read, compression and format are always detected automatically.
-* The same API is used for all formats; in particular, it's very
+* The same API is used for all formats; it should be very
easy for software using libarchive to transparently handle
any of libarchive's archiving formats.
diff --git a/archivers/libarchive/files/build/autoconf/config.guess b/archivers/libarchive/files/build/autoconf/config.guess
index 2193702b12a..b33c9e890e0 100755
--- a/archivers/libarchive/files/build/autoconf/config.guess
+++ b/archivers/libarchive/files/build/autoconf/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2017 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2017-05-27'
+timestamp='2018-08-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2017-05-27'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2017-05-27'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -84,8 +84,6 @@ if test $# != 0; then
exit 1
fi
-trap 'exit 1' 1 2 15
-
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
@@ -96,34 +94,39 @@ trap 'exit 1' 1 2 15
# Portable tmp directory creation inspired by the Autoconf team.
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
+trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
+
+set_cc_for_build() {
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$driver"
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+if test -f /.attbin/uname ; then
PATH=$PATH:/.attbin ; export PATH
fi
@@ -132,14 +135,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
- eval $set_cc_for_build
- cat <<-EOF > $dummy.c
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -149,13 +152,20 @@ Linux|GNU|GNU/*)
LIBC=gnu
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
;;
esac
# Note: order is significant - the case branches are not exclusive.
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -169,30 +179,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
- /sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
- arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
- endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
- machine=${arch}${endian}-unknown
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently (or will in the future) and ABI.
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
+ set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -208,10 +218,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Determine ABI tags.
- case "${UNAME_MACHINE_ARCH}" in
+ case "$UNAME_MACHINE_ARCH" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
- abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
;;
esac
# The OS release
@@ -219,46 +229,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
+ case "$UNAME_VERSION" in
Debian*)
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}${abi}"
+ echo "$machine-${os}${release}${abi-}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
exit ;;
*:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
exit ;;
*:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:Sortix:*:*)
- echo ${UNAME_MACHINE}-unknown-sortix
+ echo "$UNAME_MACHINE"-unknown-sortix
+ exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -310,28 +329,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
+ echo "$UNAME_MACHINE"-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
+ echo "$UNAME_MACHINE"-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@@ -343,7 +353,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
+ echo arm-acorn-riscix"$UNAME_RELEASE"
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
@@ -370,38 +380,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
+ echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH=i386
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH=x86_64
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
+ case `isainfo -b` in
+ 32)
+ echo i386-pc-solaris2"$UNAME_REL"
+ ;;
+ 64)
+ echo x86_64-pc-solaris2"$UNAME_REL"
+ ;;
+ esac
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
@@ -410,25 +415,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
exit ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
;;
sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
+ echo sparc-sun-sunos"$UNAME_RELEASE"
;;
esac
exit ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
@@ -439,44 +444,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
+ echo m68k-milan-mint"$UNAME_RELEASE"
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
+ echo m68k-hades-mint"$UNAME_RELEASE"
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
+ echo m68k-unknown-mint"$UNAME_RELEASE"
exit ;;
m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
+ echo m68k-apple-machten"$UNAME_RELEASE"
exit ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
+ echo powerpc-apple-machten"$UNAME_RELEASE"
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
+ echo mips-dec-ultrix"$UNAME_RELEASE"
exit ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
+ echo vax-dec-ultrix"$UNAME_RELEASE"
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -485,23 +490,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
+ echo mips-mips-riscos"$UNAME_RELEASE"
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
@@ -527,17 +532,17 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
then
- echo m88k-dg-dgux${UNAME_RELEASE}
+ echo m88k-dg-dgux"$UNAME_RELEASE"
else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ echo i586-dg-dgux"$UNAME_RELEASE"
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
@@ -554,7 +559,7 @@ EOF
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
@@ -566,14 +571,14 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
main()
@@ -584,7 +589,7 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
echo "$SYSTEM_NAME"
else
@@ -598,7 +603,7 @@ EOF
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -607,18 +612,18 @@ EOF
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
@@ -633,28 +638,28 @@ EOF
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
+ case "$sc_cpu_version" in
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
+ case "$sc_kernel_bits" in
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ if [ "$HP_ARCH" = "" ]; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -687,13 +692,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = hppa2.0w ]
+ if [ "$HP_ARCH" = hppa2.0w ]
then
- eval $set_cc_for_build
+ set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -712,15 +717,15 @@ EOF
HP_ARCH=hppa64
fi
fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
exit ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
main ()
@@ -745,11 +750,11 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
@@ -758,7 +763,7 @@ EOF
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
@@ -766,9 +771,9 @@ EOF
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
+ echo "$UNAME_MACHINE"-unknown-osf1mk
else
- echo ${UNAME_MACHINE}-unknown-osf1
+ echo "$UNAME_MACHINE"-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
@@ -793,128 +798,120 @@ EOF
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
exit ;;
sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
+ exit ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+ else
+ echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+ fi
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
+ case "$UNAME_PROCESSOR" in
amd64)
UNAME_PROCESSOR=x86_64 ;;
i386)
UNAME_PROCESSOR=i586 ;;
esac
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
+ echo "$UNAME_MACHINE"-pc-cygwin
exit ;;
*:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
+ echo "$UNAME_MACHINE"-pc-mingw64
exit ;;
*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
+ echo "$UNAME_MACHINE"-pc-mingw32
exit ;;
*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ echo "$UNAME_MACHINE"-pc-msys
exit ;;
i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
+ echo "$UNAME_MACHINE"-pc-pw32
exit ;;
*:Interix*:*)
- case ${UNAME_MACHINE} in
+ case "$UNAME_MACHINE" in
x86)
- echo i586-pc-interix${UNAME_RELEASE}
+ echo i586-pc-interix"$UNAME_RELEASE"
exit ;;
authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
exit ;;
IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
+ echo ia64-unknown-interix"$UNAME_RELEASE"
exit ;;
esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
+ echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
+ *:Minix:*:*)
+ echo "$UNAME_MACHINE"-unknown-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -928,63 +925,63 @@ EOF
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
- eval $set_cc_for_build
+ set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
e2k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
k1om:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
@@ -998,70 +995,70 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+ test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
mips64el:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
openrisc*:Linux:*:*)
- echo or1k-unknown-linux-${LIBC}
+ echo or1k-unknown-linux-"$LIBC"
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-${LIBC}
+ echo sparc-unknown-linux-"$LIBC"
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-${LIBC}
+ echo hppa64-unknown-linux-"$LIBC"
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
- PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
- *) echo hppa-unknown-linux-${LIBC} ;;
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-${LIBC}
+ echo powerpc64-unknown-linux-"$LIBC"
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-${LIBC}
+ echo powerpc-unknown-linux-"$LIBC"
exit ;;
ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-${LIBC}
+ echo powerpc64le-unknown-linux-"$LIBC"
exit ;;
ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-${LIBC}
+ echo powerpcle-unknown-linux-"$LIBC"
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1075,34 +1072,34 @@ EOF
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
+ echo "$UNAME_MACHINE"-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
+ echo "$UNAME_MACHINE"-unknown-stop
exit ;;
i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
+ echo "$UNAME_MACHINE"-unknown-atheos
exit ;;
i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
+ echo "$UNAME_MACHINE"-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
exit ;;
i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
fi
exit ;;
i*86:*:5:[678]*)
@@ -1112,12 +1109,12 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1127,9 +1124,9 @@ EOF
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv32
+ echo "$UNAME_MACHINE"-pc-sysv32
fi
exit ;;
pc:*:*:*)
@@ -1149,9 +1146,9 @@ EOF
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
@@ -1171,9 +1168,9 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
@@ -1182,28 +1179,28 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
+ echo mips-dde-sysv"$UNAME_RELEASE"
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
@@ -1214,7 +1211,7 @@ EOF
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
+ echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
fi
@@ -1234,23 +1231,23 @@ EOF
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
+ echo "$UNAME_MACHINE"-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
+ echo m68k-apple-aux"$UNAME_RELEASE"
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv"$UNAME_RELEASE"
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv"$UNAME_RELEASE"
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@@ -1269,39 +1266,39 @@ EOF
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
+ echo sx4-nec-superux"$UNAME_RELEASE"
exit ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
+ echo sx5-nec-superux"$UNAME_RELEASE"
exit ;;
SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
+ echo sx6-nec-superux"$UNAME_RELEASE"
exit ;;
SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
+ echo sx7-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
+ echo sx8-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
+ echo sx8r-nec-superux"$UNAME_RELEASE"
exit ;;
SX-ACE:SUPER-UX:*:*)
- echo sxace-nec-superux${UNAME_RELEASE}
+ echo sxace-nec-superux"$UNAME_RELEASE"
exit ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
+ set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
@@ -1329,7 +1326,7 @@ EOF
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
@@ -1337,22 +1334,25 @@ EOF
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-*:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
+ echo neo-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
+ echo nse-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSR-*:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSX-*:NONSTOP_KERNEL:*:*)
- echo nsx-tandem-nsk${UNAME_RELEASE}
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
@@ -1361,18 +1361,19 @@ EOF
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
+ # shellcheck disable=SC2154
if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
- echo ${UNAME_MACHINE}-unknown-plan9
+ echo "$UNAME_MACHINE"-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
@@ -1393,14 +1394,14 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux"$UNAME_RELEASE"
exit ;;
*:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
+ case "$UNAME_MACHINE" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
@@ -1409,32 +1410,44 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
exit ;;
i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
+ echo "$UNAME_MACHINE"-pc-rdos
exit ;;
i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
+ echo "$UNAME_MACHINE"-pc-aros
exit ;;
x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
+ echo "$UNAME_MACHINE"-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
cat >&2 <<EOF
-$0: unable to guess system type
This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite
-config.guess and config.sub with the latest versions from:
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
@@ -1457,16 +1470,16 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
EOF
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/archivers/libarchive/files/build/autoconf/config.sub b/archivers/libarchive/files/build/autoconf/config.sub
index 40ea5dfe115..b51fb8cdb69 100755
--- a/archivers/libarchive/files/build/autoconf/config.sub
+++ b/archivers/libarchive/files/build/autoconf/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2017 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2017-04-02'
+timestamp='2018-08-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2017-04-02'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,7 +33,7 @@ timestamp='2017-04-02'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -94,7 +94,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
- echo $1
+ echo "$1"
exit ;;
* )
@@ -110,1252 +110,1159 @@ case $# in
exit 1;;
esac
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
- kopensolaris*-gnu* | cloudabi*-eabi* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
+# Split fields of configuration type
+IFS="-" read -r field1 field2 field3 field4 <<EOF
+$1
+EOF
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
- ;;
- -lynx*)
- os=-lynxos
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ os=$field3-$field4
;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ os=$field3
+ ;;
+ esac
;;
- -psos*)
- os=-psos
+ *-*)
+ # A lone config we happen to match not fitting any patern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ os=
+ ;;
+ *)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ esac
+ ;;
+ esac
;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=sysv3
+ ;;
+ hp300)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=hpux
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=mach
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ os=vsta
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=linux
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=vms
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ os=
+ ;;
+ esac
;;
esac
-# Decode aliases for certain CPU-COMPANY combinations.
+# Decode 1-component or ad-hoc basic machines
case $basic_machine in
- # Recognize the basic CPU types without company name.
- # Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | aarch64 | aarch64_be \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
- | avr | avr32 \
- | ba \
- | be32 | be64 \
- | bfin \
- | c4x | c8051 | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | e2k | epiphany \
- | fido | fr30 | frv | ft32 \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | hexagon \
- | i370 | i860 | i960 | ia16 | ia64 \
- | ip2k | iq2000 \
- | k1om \
- | le32 | le64 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa32r6 | mipsisa32r6el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64r6 | mipsisa64r6el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nds32 | nds32le | nds32be \
- | nios | nios2 | nios2eb | nios2el \
- | ns16k | ns32k \
- | open8 | or1k | or1knd | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle \
- | pru \
- | pyramid \
- | riscv32 | riscv64 \
- | rl78 | rx \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu \
- | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
- | ubicom32 \
- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | visium \
- | wasm32 \
- | we32k \
- | x86 | xc16x | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
- leon|leon[3-9])
- basic_machine=sparc-$basic_machine
- ;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
- basic_machine=$basic_machine-unknown
- os=-none
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
;;
- ms1)
- basic_machine=mt-unknown
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
;;
-
- strongarm | thumb | xscale)
- basic_machine=arm-unknown
+ ibm*)
+ cpu=i370
+ vendor=ibm
;;
- xgate)
- basic_machine=$basic_machine-unknown
- os=-none
+ orion105)
+ cpu=clipper
+ vendor=highlevel
;;
- xscaleeb)
- basic_machine=armeb-unknown
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
;;
-
- xscaleel)
- basic_machine=armel-unknown
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
;;
- # We use `pc' rather than `unknown'
- # because (1) that's what they normally are, and
- # (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
- basic_machine=$basic_machine-pc
- ;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
- # Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | aarch64-* | aarch64_be-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | ba-* \
- | be32-* | be64-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | e2k-* | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | hexagon-* \
- | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
- | ip2k-* | iq2000-* \
- | k1om-* \
- | le32-* | le64-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | microblaze-* | microblazeel-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa32r6-* | mipsisa32r6el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64r6-* | mipsisa64r6el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipsr5900-* | mipsr5900el-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* | nios2eb-* | nios2el-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | open8-* \
- | or1k*-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
- | pru-* \
- | pyramid-* \
- | riscv32-* | riscv64-* \
- | rl78-* | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
- | tahoe-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile*-* \
- | tron-* \
- | ubicom32-* \
- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
- | vax-* \
- | visium-* \
- | wasm32-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
- basic_machine=m68000-att
+ cpu=m68000
+ vendor=att
;;
3b*)
- basic_machine=we32k-att
- ;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
- alliant | fx80)
- basic_machine=fx80-alliant
- ;;
- altos | altos3068)
- basic_machine=m68k-altos
- ;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
- ;;
- amiga | amiga-*)
- basic_machine=m68k-unknown
- ;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- asmjs)
- basic_machine=asmjs-unknown
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ cpu=we32k
+ vendor=att
;;
bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
- convex-c1)
- basic_machine=c1-convex
- os=-bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- os=-bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- os=-bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- os=-bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
- ;;
- cr16 | cr16-*)
- basic_machine=cr16-unknown
- os=-elf
- ;;
- crds | unos)
- basic_machine=m68k-crds
- ;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
- da30 | da30-*)
- basic_machine=m68k-da30
- ;;
- decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
- basic_machine=mips-dec
+ cpu=powerpc
+ vendor=ibm
+ os=cnk
;;
decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
+ cpu=pdp10
+ vendor=dec
+ os=tops10
;;
decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
+ cpu=pdp10
+ vendor=dec
+ os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
- basic_machine=m68k-motorola
+ cpu=m68k
+ vendor=motorola
;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
- dpx20 | dpx20-*)
- basic_machine=rs6000-bull
- os=-bosx
- ;;
- dpx2* | dpx2*-bull)
- basic_machine=m68k-bull
- os=-sysv3
- ;;
- e500v[12])
- basic_machine=powerpc-unknown
- os=$os"spe"
- ;;
- e500v[12]-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=$os"spe"
- ;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
- ;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ os=sysv3
;;
encore | umax | mmax)
- basic_machine=ns32k-encore
+ cpu=ns32k
+ vendor=encore
;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ os=${os:-bsd}
;;
fx2800)
- basic_machine=i860-alliant
+ cpu=i860
+ vendor=alliant
;;
genix)
- basic_machine=ns32k-ns
- ;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
+ cpu=ns32k
+ vendor=ns
;;
h3050r* | hiux*)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
- ;;
- hp300-*)
- basic_machine=m68k-hp
- ;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
- basic_machine=m68000-hp
+ cpu=m68000
+ vendor=hp
;;
hp9k3[2-9][0-9])
- basic_machine=m68k-hp
+ cpu=m68k
+ vendor=hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
+ cpu=hppa1.0
+ vendor=hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
- basic_machine=hppa1.1-hp
+ cpu=hppa1.1
+ vendor=hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
- i370-ibm* | ibm*)
- basic_machine=i370-ibm
+ cpu=hppa1.0
+ vendor=hp
;;
i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv32
;;
i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv4
;;
i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=sysv
;;
i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
- ;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ os=solaris2
;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ os=${os:-unicos}
;;
iris | iris4d)
- basic_machine=mips-sgi
+ cpu=mips
+ vendor=sgi
case $os in
- -irix*)
+ irix*)
;;
*)
- os=-irix4
+ os=irix4
;;
esac
;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- leon-*|leon[3-9]-*)
- basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
- ;;
- microblaze*)
- basic_machine=microblaze-xilinx
- ;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
miniframe)
- basic_machine=m68000-convergent
- ;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
- mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
- ;;
- mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- moxiebox)
- basic_machine=moxie-unknown
- os=-moxiebox
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i686-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
+ cpu=m68000
+ vendor=convergent
;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ os=mint
;;
news-3600 | risc-news)
- basic_machine=mips-sony
- os=-newsos
+ cpu=mips
+ vendor=sony
+ os=newsos
;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
- next | m*-next )
- basic_machine=m68k-next
+ next | m*-next)
+ cpu=m68k
+ vendor=next
case $os in
- -nextstep* )
+ nextstep* )
;;
- -ns2*)
- os=-nextstep2
+ ns2*)
+ os=nextstep2
;;
*)
- os=-nextstep3
+ os=nextstep3
;;
esac
;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
np1)
- basic_machine=np1-gould
- ;;
- neo-tandem)
- basic_machine=neo-tandem
- ;;
- nse-tandem)
- basic_machine=nse-tandem
- ;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- nsx-tandem)
- basic_machine=nsx-tandem
+ cpu=np1
+ vendor=gould
;;
op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
+ cpu=hppa1.1
+ vendor=oki
+ os=proelf
;;
pa-hitachi)
- basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ cpu=hppa1.1
+ vendor=hitachi
+ os=hiuxwe2
;;
pbd)
- basic_machine=sparc-tti
+ cpu=sparc
+ vendor=tti
;;
pbb)
- basic_machine=m68k-tti
- ;;
- pc532 | pc532-*)
- basic_machine=ns32k-pc532
+ cpu=m68k
+ vendor=tti
;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
- ;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
- ;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ pc532)
+ cpu=ns32k
+ vendor=pc532
;;
pn)
- basic_machine=pn-gould
+ cpu=pn
+ vendor=gould
;;
- power) basic_machine=power-ibm
- ;;
- ppc | ppcbe) basic_machine=powerpc-unknown
- ;;
- ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppcle | powerpclittle)
- basic_machine=powerpcle-unknown
- ;;
- ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ power)
+ cpu=power
+ vendor=ibm
;;
ps2)
- basic_machine=i386-ibm
- ;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
+ cpu=i386
+ vendor=ibm
;;
rm[46]00)
- basic_machine=mips-siemens
+ cpu=mips
+ vendor=siemens
;;
rtpc | rtpc-*)
- basic_machine=romp-ibm
- ;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
+ cpu=romp
+ vendor=ibm
;;
sde)
- basic_machine=mipsisa32-sde
- os=-elf
+ cpu=mipsisa32
+ vendor=sde
+ os=${os:-elf}
;;
- sei)
- basic_machine=mips-sei
- os=-seiux
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ os=vxworks
;;
- sequent)
- basic_machine=i386-sequent
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
;;
- sh5el)
- basic_machine=sh5le-unknown
+ w65)
+ cpu=w65
+ vendor=wdc
;;
- sh64)
- basic_machine=sh64-unknown
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ os=proelf
;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
+ none)
+ cpu=none
+ vendor=none
;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
;;
- spur)
- basic_machine=spur-unknown
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
;;
- st2000)
- basic_machine=m68k-tandem
+
+ *-*)
+ IFS="-" read -r cpu vendor <<EOF
+$basic_machine
+EOF
;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
;;
- strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
;;
- sun2)
- basic_machine=m68000-sun
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in cannonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ os=${os:-unicosmp}
;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
+ c90-unknown | c90-cray)
+ vendor=cray
+ os=${os:-unicos}
;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
+ fx80-unknown)
+ vendor=alliant
;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
+ romp-unknown)
+ vendor=ibm
;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
+ mmix-unknown)
+ vendor=knuth
;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
;;
- sun3 | sun3-*)
- basic_machine=m68k-sun
+ rs6000-unknown)
+ vendor=ibm
;;
- sun4)
- basic_machine=sparc-sun
+ vax-unknown)
+ vendor=dec
;;
- sun386 | sun386i | roadrunner)
- basic_machine=i386-sun
+ pdp11-unknown)
+ vendor=dec
;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
+ we32k-unknown)
+ vendor=att
;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
+ cydra-unknown)
+ vendor=cydrome
;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
+ i370-ibm*)
+ vendor=ibm
;;
- t90)
- basic_machine=t90-cray
- os=-unicos
+ orion-unknown)
+ vendor=highlevel
;;
- tile*)
- basic_machine=$basic_machine-unknown
- os=-linux-gnu
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
;;
- tx39)
- basic_machine=mipstx39-unknown
+
+ # Here we normalize CPU types with a missing or matching vendor
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ os=${os:-bosx}
;;
- tx39el)
- basic_machine=mipstx39el-unknown
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
+ blackfin-*)
+ cpu=bfin
+ os=linux
;;
- tower | tower-32)
- basic_machine=m68k-ncr
+ c54x-*)
+ cpu=tic54x
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
+ c55x-*)
+ cpu=tic55x
;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
+ c6x-*)
+ cpu=tic6x
;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
+ e500v[12]-*)
+ cpu=powerpc
+ os=$os"spe"
;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
+ mips3*-*)
+ cpu=mips64
;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
+ ms1-*)
+ cpu=mt
;;
- vms)
- basic_machine=vax-dec
- os=-vms
+ m68knommu-*)
+ cpu=m68k
+ os=linux
;;
- vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
+ openrisc-*)
+ cpu=or32
;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
+ parisc-*)
+ cpu=hppa
+ os=linux
;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
;;
- wasm32)
- basic_machine=wasm32-unknown
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
;;
- w65*)
- basic_machine=w65-wdc
- os=-none
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
+ pentium4-*)
+ cpu=i786
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
+ pc98-*)
+ cpu=i386
;;
- xps | xps100)
- basic_machine=xps100-honeywell
+ ppc-* | ppcbe-*)
+ cpu=powerpc
;;
- xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
+ ppc64-*)
+ cpu=powerpc64
;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
+ sb1-*)
+ cpu=mipsisa64sb1
;;
- none)
- basic_machine=none-none
- os=-none
+ sb1el-*)
+ cpu=mipsisa64sb1el
;;
-
-# Here we handle the default manufacturer of certain CPU types. It is in
-# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
;;
- op50n)
- basic_machine=hppa1.1-oki
+ spur-*)
+ cpu=spur
;;
- op60c)
- basic_machine=hppa1.1-oki
+ strongarm-* | thumb-*)
+ cpu=arm
;;
- romp)
- basic_machine=romp-ibm
+ tx39-*)
+ cpu=mipstx39
;;
- mmix)
- basic_machine=mmix-knuth
+ tx39el-*)
+ cpu=mipstx39el
;;
- rs6000)
- basic_machine=rs6000-ibm
+ x64-*)
+ cpu=x86_64
;;
- vax)
- basic_machine=vax-dec
+ xscale-* | xscalee[bl]-*)
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
+
+ # Recognize the cannonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ os=${os:-elf}
;;
- pdp11)
- basic_machine=pdp11-dec
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
;;
- we32k)
- basic_machine=we32k-att
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
+ crx-*)
+ os=${os:-elf}
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
;;
- cydra)
- basic_machine=cydra-cydrome
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
;;
- orion)
- basic_machine=orion-highlevel
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
;;
- orion105)
- basic_machine=clipper-highlevel
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
+ s390-*)
+ cpu=s390
+ vendor=ibm
+ ;;
+ s390x-*)
+ cpu=s390x
+ vendor=ibm
;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
+ tile*-*)
+ os=${os:-linux-gnu}
;;
+
*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
+ # Recognize the cannonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv64 \
+ | rl78 | romp | rs6000 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | wasm32 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
;;
esac
# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
- *-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+case $vendor in
+ digital*)
+ vendor=dec
;;
- *-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ commodore*)
+ vendor=cbm
;;
*)
;;
@@ -1363,200 +1270,246 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if [ x"$os" != x"" ]
+if [ x$os != x ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ bluegene*)
+ os=cnk
;;
- -solaris)
- os=-solaris2
+ solaris1 | solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
- -svr4*)
- os=-sysv4
+ solaris)
+ os=solaris2
;;
- -unixware*)
- os=-sysv4.2uw
+ unixware*)
+ os=sysv4.2uw
;;
- -gnu/linux*)
+ gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
- # First accept the basic system types.
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ # Now accept the basic system types.
# The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* | -cloudabi* | -sortix* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
+ # Each alternative MUST end in a * to match a version number.
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
+ qnx*)
+ case $cpu in
+ x86 | i*86)
;;
*)
- os=-nto$os
+ os=nto-$os
;;
esac
;;
- -nto-qnx*)
+ hiux*)
+ os=hiuxwe2
;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ nto-qnx*)
;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
;;
- -linux-dietlibc)
- os=-linux-dietlibc
+ linux-dietlibc)
+ os=linux-dietlibc
;;
- -linux*)
+ linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ lynx*178)
+ os=lynxos178
;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ lynx*5)
+ os=lynxos5
;;
- -opened*)
- os=-openedition
+ lynx*)
+ os=lynxos
;;
- -os400*)
- os=-os400
+ mac*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
;;
- -wince*)
- os=-wince
+ opened*)
+ os=openedition
;;
- -osfrose*)
- os=-osfrose
+ os400*)
+ os=os400
;;
- -osf*)
- os=-osf
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
- -utek*)
- os=-bsd
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
- -dynix*)
- os=-bsd
+ wince*)
+ os=wince
;;
- -acis*)
- os=-aos
+ utek*)
+ os=bsd
;;
- -atheos*)
- os=-atheos
+ dynix*)
+ os=bsd
;;
- -syllable*)
- os=-syllable
+ acis*)
+ os=aos
;;
- -386bsd)
- os=-bsd
+ atheos*)
+ os=atheos
;;
- -ctix* | -uts*)
- os=-sysv
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
;;
- -nova*)
- os=-rtmk-nova
+ ctix* | uts*)
+ os=sysv
;;
- -ns2 )
- os=-nextstep2
+ nova*)
+ os=rtmk-nova
;;
- -nsk*)
- os=-nsk
+ ns2)
+ os=nextstep2
+ ;;
+ nsk*)
+ os=nsk
;;
# Preserve the version number of sinix5.
- -sinix5.*)
+ sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
- -sinix*)
- os=-sysv4
- ;;
- -tpf*)
- os=-tpf
+ sinix*)
+ os=sysv4
;;
- -triton*)
- os=-sysv3
+ tpf*)
+ os=tpf
;;
- -oss*)
- os=-sysv3
+ triton*)
+ os=sysv3
;;
- -svr4)
- os=-sysv4
+ oss*)
+ os=sysv3
;;
- -svr3)
- os=-sysv3
+ svr4*)
+ os=sysv4
;;
- -sysvr4)
- os=-sysv4
+ svr3)
+ os=sysv3
;;
- # This must come after -sysvr4.
- -sysv*)
+ sysvr4)
+ os=sysv4
;;
- -ose*)
- os=-ose
+ # This must come after sysvr4.
+ sysv*)
;;
- -es1800*)
- os=-ose
+ ose*)
+ os=ose
;;
- -xenix)
- os=-xenix
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ zvmoe)
+ os=zvmoe
;;
- -aros*)
- os=-aros
+ dicos*)
+ os=dicos
;;
- -zvmoe)
- os=-zvmoe
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
;;
- -dicos*)
- os=-dicos
+ nacl*)
;;
- -nacl*)
+ ios)
;;
- -ios)
+ none)
;;
- -none)
+ *-eabi)
;;
*)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
esac
@@ -1572,264 +1525,265 @@ else
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
-case $basic_machine in
+case $cpu-$vendor in
score-*)
- os=-elf
+ os=elf
;;
spu-*)
- os=-elf
+ os=elf
;;
*-acorn)
- os=-riscix1.2
+ os=riscix1.2
;;
arm*-rebel)
- os=-linux
+ os=linux
;;
arm*-semi)
- os=-aout
+ os=aout
;;
c4x-* | tic4x-*)
- os=-coff
+ os=coff
;;
c8051-*)
- os=-elf
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
;;
hexagon-*)
- os=-elf
+ os=elf
;;
tic54x-*)
- os=-coff
+ os=coff
;;
tic55x-*)
- os=-coff
+ os=coff
;;
tic6x-*)
- os=-coff
+ os=coff
;;
# This must come before the *-dec entry.
pdp10-*)
- os=-tops20
+ os=tops20
;;
pdp11-*)
- os=-none
+ os=none
;;
*-dec | vax-*)
- os=-ultrix4.2
+ os=ultrix4.2
;;
m68*-apollo)
- os=-domain
+ os=domain
;;
i386-sun)
- os=-sunos4.0.2
+ os=sunos4.0.2
;;
m68000-sun)
- os=-sunos3
+ os=sunos3
;;
m68*-cisco)
- os=-aout
+ os=aout
;;
mep-*)
- os=-elf
+ os=elf
;;
mips*-cisco)
- os=-elf
+ os=elf
;;
mips*-*)
- os=-elf
+ os=elf
;;
or32-*)
- os=-coff
+ os=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
+ os=sysv3
;;
sparc-* | *-sun)
- os=-sunos4.1.1
+ os=sunos4.1.1
;;
pru-*)
- os=-elf
+ os=elf
;;
*-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
+ os=beos
;;
*-ibm)
- os=-aix
+ os=aix
;;
*-knuth)
- os=-mmixware
+ os=mmixware
;;
*-wec)
- os=-proelf
+ os=proelf
;;
*-winbond)
- os=-proelf
+ os=proelf
;;
*-oki)
- os=-proelf
+ os=proelf
;;
*-hp)
- os=-hpux
+ os=hpux
;;
*-hitachi)
- os=-hiux
+ os=hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
+ os=sysv
;;
*-cbm)
- os=-amigaos
+ os=amigaos
;;
*-dg)
- os=-dgux
+ os=dgux
;;
*-dolphin)
- os=-sysv3
+ os=sysv3
;;
m68k-ccur)
- os=-rtu
+ os=rtu
;;
m88k-omron*)
- os=-luna
+ os=luna
;;
- *-next )
- os=-nextstep
+ *-next)
+ os=nextstep
;;
*-sequent)
- os=-ptx
+ os=ptx
;;
*-crds)
- os=-unos
+ os=unos
;;
*-ns)
- os=-genix
+ os=genix
;;
i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
+ os=mvs
;;
*-gould)
- os=-sysv
+ os=sysv
;;
*-highlevel)
- os=-bsd
+ os=bsd
;;
*-encore)
- os=-bsd
+ os=bsd
;;
*-sgi)
- os=-irix
+ os=irix
;;
*-siemens)
- os=-sysv4
+ os=sysv4
;;
*-masscomp)
- os=-rtu
+ os=rtu
;;
f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
+ os=uxpv
;;
*-rom68k)
- os=-coff
+ os=coff
;;
*-*bug)
- os=-coff
+ os=coff
;;
*-apple)
- os=-macos
+ os=macos
;;
*-atari*)
- os=-mint
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
;;
*)
- os=-none
+ os=none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
- *-unknown)
+case $vendor in
+ unknown)
case $os in
- -riscix*)
+ riscix*)
vendor=acorn
;;
- -sunos*)
+ sunos*)
vendor=sun
;;
- -cnk*|-aix*)
+ cnk*|-aix*)
vendor=ibm
;;
- -beos*)
+ beos*)
vendor=be
;;
- -hpux*)
+ hpux*)
vendor=hp
;;
- -mpeix*)
+ mpeix*)
vendor=hp
;;
- -hiux*)
+ hiux*)
vendor=hitachi
;;
- -unos*)
+ unos*)
vendor=crds
;;
- -dgux*)
+ dgux*)
vendor=dg
;;
- -luna*)
+ luna*)
vendor=omron
;;
- -genix*)
+ genix*)
vendor=ns
;;
- -mvs* | -opened*)
+ clix*)
+ vendor=intergraph
+ ;;
+ mvs* | opened*)
vendor=ibm
;;
- -os400*)
+ os400*)
vendor=ibm
;;
- -ptx*)
+ ptx*)
vendor=sequent
;;
- -tpf*)
+ tpf*)
vendor=ibm
;;
- -vxsim* | -vxworks* | -windiss*)
+ vxsim* | vxworks* | windiss*)
vendor=wrs
;;
- -aux*)
+ aux*)
vendor=apple
;;
- -hms*)
+ hms*)
vendor=hitachi
;;
- -mpw* | -macos*)
+ mpw* | macos*)
vendor=apple
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
vendor=atari
;;
- -vos*)
+ vos*)
vendor=stratus
;;
esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
-echo $basic_machine$os
+echo "$cpu-$vendor-$os"
exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/archivers/libarchive/files/build/cmake/config.h.in b/archivers/libarchive/files/build/cmake/config.h.in
index e646213d4bf..04f938d3f7f 100644
--- a/archivers/libarchive/files/build/cmake/config.h.in
+++ b/archivers/libarchive/files/build/cmake/config.h.in
@@ -725,6 +725,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `z' library (-lz). */
#cmakedefine HAVE_LIBZ 1
+/* Define to 1 if you have the `zstd' library (-lzstd). */
+#cmakedefine HAVE_LIBZSTD 1
+
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1
@@ -1065,6 +1068,10 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/sysmacros.h> header file. */
+#cmakedefine HAVE_SYS_SYSMACROS_H 1
+
/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1
@@ -1179,6 +1186,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the <zlib.h> header file. */
#cmakedefine HAVE_ZLIB_H 1
+/* Define to 1 if you have the <zstd.h> header file. */
+#cmakedefine HAVE_ZSTD_H 1
+
/* Define to 1 if you have the `_ctime64_s' function. */
#cmakedefine HAVE__CTIME64_S 1
diff --git a/archivers/libarchive/files/build/pkgconfig/libarchive.pc.in b/archivers/libarchive/files/build/pkgconfig/libarchive.pc.in
index 95d71595177..4b631e635cc 100644
--- a/archivers/libarchive/files/build/pkgconfig/libarchive.pc.in
+++ b/archivers/libarchive/files/build/pkgconfig/libarchive.pc.in
@@ -7,5 +7,6 @@ Name: libarchive
Description: library that can create and read several streaming archive formats
Version: @VERSION@
Cflags: -I${includedir}
+Cflags.private: -DLIBARCHIVE_STATIC
Libs: -L${libdir} -larchive
Libs.private: @LIBS@
diff --git a/archivers/libarchive/files/build/version b/archivers/libarchive/files/build/version
index 2dd08397476..2427eab0f0b 100644
--- a/archivers/libarchive/files/build/version
+++ b/archivers/libarchive/files/build/version
@@ -1 +1 @@
-3003002
+3003003
diff --git a/archivers/libarchive/files/cat/bsdcat.c b/archivers/libarchive/files/cat/bsdcat.c
index 6ba10349434..bdb9c40b915 100644
--- a/archivers/libarchive/files/cat/bsdcat.c
+++ b/archivers/libarchive/files/cat/bsdcat.c
@@ -61,7 +61,7 @@ usage(FILE *stream, int eval)
static void
version(void)
{
- printf("bsdcat %s - %s\n",
+ printf("bsdcat %s - %s \n",
BSDCAT_VERSION_STRING,
archive_version_details());
exit(0);
@@ -70,6 +70,12 @@ version(void)
void
bsdcat_next(void)
{
+ if (a != NULL) {
+ if (archive_read_close(a) != ARCHIVE_OK)
+ bsdcat_print_error();
+ archive_read_free(a);
+ }
+
a = archive_read_new();
archive_read_support_filter_all(a);
archive_read_support_format_empty(a);
@@ -100,8 +106,10 @@ bsdcat_read_to_stdout(const char* filename)
;
else if (archive_read_data_into_fd(a, 1) != ARCHIVE_OK)
bsdcat_print_error();
- if (archive_read_free(a) != ARCHIVE_OK)
+ if (archive_read_close(a) != ARCHIVE_OK)
bsdcat_print_error();
+ archive_read_free(a);
+ a = NULL;
}
int
@@ -135,15 +143,14 @@ main(int argc, char **argv)
if (*bsdcat->argv == NULL) {
bsdcat_current_path = "<stdin>";
bsdcat_read_to_stdout(NULL);
- } else
+ } else {
while (*bsdcat->argv) {
bsdcat_current_path = *bsdcat->argv++;
bsdcat_read_to_stdout(bsdcat_current_path);
bsdcat_next();
}
-
- if (a != NULL)
- archive_read_free(a);
+ archive_read_free(a); /* Help valgrind & friends */
+ }
exit(exit_status);
}
diff --git a/archivers/libarchive/files/cat/test/CMakeLists.txt b/archivers/libarchive/files/cat/test/CMakeLists.txt
index 0cd3aad84f4..72f4a1037f8 100644
--- a/archivers/libarchive/files/cat/test/CMakeLists.txt
+++ b/archivers/libarchive/files/cat/test/CMakeLists.txt
@@ -12,6 +12,7 @@ IF(ENABLE_CAT AND ENABLE_TEST)
test_empty_gz.c
test_empty_lz4.c
test_empty_xz.c
+ test_empty_zstd.c
test_error.c
test_error_mixed.c
test_expand_Z.c
@@ -21,7 +22,9 @@ IF(ENABLE_CAT AND ENABLE_TEST)
test_expand_mixed.c
test_expand_plain.c
test_expand_xz.c
+ test_expand_zstd.c
test_help.c
+ test_stdin.c
test_version.c
)
diff --git a/archivers/libarchive/files/cat/test/list.h b/archivers/libarchive/files/cat/test/list.h
index ffd0702d062..5246122281f 100644
--- a/archivers/libarchive/files/cat/test/list.h
+++ b/archivers/libarchive/files/cat/test/list.h
@@ -2,6 +2,7 @@ DEFINE_TEST(test_0)
DEFINE_TEST(test_empty_gz)
DEFINE_TEST(test_empty_lz4)
DEFINE_TEST(test_empty_xz)
+DEFINE_TEST(test_empty_zstd)
DEFINE_TEST(test_error)
DEFINE_TEST(test_error_mixed)
DEFINE_TEST(test_expand_bz2)
@@ -11,5 +12,7 @@ DEFINE_TEST(test_expand_mixed)
DEFINE_TEST(test_expand_plain)
DEFINE_TEST(test_expand_xz)
DEFINE_TEST(test_expand_Z)
+DEFINE_TEST(test_expand_zstd)
DEFINE_TEST(test_help)
+DEFINE_TEST(test_stdin)
DEFINE_TEST(test_version)
diff --git a/archivers/libarchive/files/cat/test/test_empty.zst.uu b/archivers/libarchive/files/cat/test/test_empty.zst.uu
new file mode 100644
index 00000000000..44ae9a966c1
--- /dev/null
+++ b/archivers/libarchive/files/cat/test/test_empty.zst.uu
@@ -0,0 +1,4 @@
+begin 644 test_empty.zst
+-*+4O_010`0``F>G840``
+`
+end
diff --git a/archivers/libarchive/files/cat/test/test_empty_zstd.c b/archivers/libarchive/files/cat/test/test_empty_zstd.c
new file mode 100644
index 00000000000..c2d5ea106fa
--- /dev/null
+++ b/archivers/libarchive/files/cat/test/test_empty_zstd.c
@@ -0,0 +1,41 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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"
+
+DEFINE_TEST(test_empty_zstd)
+{
+ const char *reffile = "test_empty.zst";
+ int f;
+
+ extract_reference_file(reffile);
+ f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
+ if (f == 0 || canZstd()) {
+ assertEqualInt(0, f);
+ assertEmptyFile("test.out");
+ assertEmptyFile("test.err");
+ } else {
+ skipping("It seems zstd is not supported on this platform");
+ }
+}
diff --git a/archivers/libarchive/files/cat/test/test_expand.zst.uu b/archivers/libarchive/files/cat/test/test_expand.zst.uu
new file mode 100644
index 00000000000..89c28b1bc2f
--- /dev/null
+++ b/archivers/libarchive/files/cat/test/test_expand.zst.uu
@@ -0,0 +1,4 @@
+begin 644 test_expand.zst
+J*+4O_010Z0``8V]N=&5N=',@;V8@=&5S=%]E>'!A;F0N>G-T+@J;23#F
+`
+end
diff --git a/archivers/libarchive/files/cat/test/test_expand_zstd.c b/archivers/libarchive/files/cat/test/test_expand_zstd.c
new file mode 100644
index 00000000000..23d918252ad
--- /dev/null
+++ b/archivers/libarchive/files/cat/test/test_expand_zstd.c
@@ -0,0 +1,41 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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"
+
+DEFINE_TEST(test_expand_zstd)
+{
+ const char *reffile = "test_expand.zst";
+ int f;
+
+ extract_reference_file(reffile);
+ f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
+ if (f == 0 || canZstd()) {
+ assertEqualInt(0, f);
+ assertTextFileContents("contents of test_expand.zst.\n", "test.out");
+ assertEmptyFile("test.err");
+ } else {
+ skipping("It seems zstd is not supported on this platform");
+ }
+}
diff --git a/archivers/libarchive/files/cat/test/test_stdin.c b/archivers/libarchive/files/cat/test/test_stdin.c
new file mode 100644
index 00000000000..cea5eb0ec1b
--- /dev/null
+++ b/archivers/libarchive/files/cat/test/test_stdin.c
@@ -0,0 +1,42 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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"
+
+#if !defined(_WIN32) || defined(__CYGWIN__)
+#define DEV_NULL "/dev/null"
+#else
+#define DEV_NULL "NUL"
+#endif
+
+DEFINE_TEST(test_stdin)
+{
+ int f;
+
+ f = systemf("%s <%s >test.out 2>test.err", testprog, DEV_NULL);
+ assertEqualInt(0, f);
+ assertEmptyFile("test.out");
+ assertEmptyFile("test.err");
+}
+
diff --git a/archivers/libarchive/files/config.h.in b/archivers/libarchive/files/config.h.in
index 39aa933cacf..7147ae2e231 100644
--- a/archivers/libarchive/files/config.h.in
+++ b/archivers/libarchive/files/config.h.in
@@ -655,6 +655,9 @@
/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ
+/* Define to 1 if you have the `zstd' library (-lzstd). */
+#undef HAVE_LIBZSTD
+
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
@@ -1052,6 +1055,9 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
+/* Define to 1 if you have the <sys/sysmacros.h> header file. */
+#undef HAVE_SYS_SYSMACROS_H
+
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
@@ -1166,6 +1172,9 @@
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
+/* Define to 1 if you have the <zstd.h> header file. */
+#undef HAVE_ZSTD_H
+
/* Define to 1 if you have the `_ctime64_s' function. */
#undef HAVE__CTIME64_S
diff --git a/archivers/libarchive/files/configure b/archivers/libarchive/files/configure
index 91bee3bde3f..088f12e96ee 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.69 for libarchive 3.3.2.
+# Generated by GNU Autoconf 2.69 for libarchive 3.3.3.
#
# Report bugs to <libarchive-discuss@googlegroups.com>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libarchive'
PACKAGE_TARNAME='libarchive'
-PACKAGE_VERSION='3.3.2'
-PACKAGE_STRING='libarchive 3.3.2'
+PACKAGE_VERSION='3.3.3'
+PACKAGE_STRING='libarchive 3.3.3'
PACKAGE_BUGREPORT='libarchive-discuss@googlegroups.com'
PACKAGE_URL=''
@@ -815,6 +815,7 @@ with_iconv
enable_rpath
with_libiconv_prefix
with_lz4
+with_zstd
with_lzma
with_lzo2
with_cng
@@ -1392,7 +1393,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 3.3.2 to adapt to many kinds of systems.
+\`configure' configures libarchive 3.3.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1463,7 +1464,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libarchive 3.3.2:";;
+ short | recursive ) echo "Configuration of libarchive 3.3.3:";;
esac
cat <<\_ACEOF
@@ -1531,6 +1532,7 @@ Optional Packages:
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
--without-lz4 Don't build support for lz4 through liblz4
+ --without-zstd Don't build support for zstd through libzstd
--without-lzma Don't build support for xz through lzma
--with-lzo2 Build with LZO support from liblzo2
--without-cng Don't build support of CNG(Crypto Next Generation)
@@ -1627,7 +1629,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libarchive configure 3.3.2
+libarchive configure 3.3.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2466,7 +2468,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 3.3.2, which was
+It was created by libarchive $as_me 3.3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3335,7 +3337,7 @@ fi
# Define the identity of the package.
PACKAGE='libarchive'
- VERSION='3.3.2'
+ VERSION='3.3.3'
cat >>confdefs.h <<_ACEOF
@@ -3495,7 +3497,7 @@ AM_BACKSLASH='\'
# Libtool interface version bumps on any API change, so increments
# whenever libarchive minor version does.
-ARCHIVE_MINOR=$(( (3003002 / 1000) % 1000 ))
+ARCHIVE_MINOR=$(( (3003003 / 1000) % 1000 ))
# Libarchive 2.7 == libtool interface 9 = 2 + 7
# Libarchive 2.8 == libtool interface 10 = 2 + 8
# Libarchive 2.9 == libtool interface 11 = 2 + 8
@@ -3503,37 +3505,37 @@ ARCHIVE_MINOR=$(( (3003002 / 1000) % 1000 ))
# Libarchive 3.1 == libtool interface 13
ARCHIVE_INTERFACE=`echo $((13 + ${ARCHIVE_MINOR}))`
# Libarchive revision is bumped on any source change === libtool revision
-ARCHIVE_REVISION=$(( 3003002 % 1000 ))
+ARCHIVE_REVISION=$(( 3003003 % 1000 ))
# Libarchive minor is bumped on any interface addition === libtool age
ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_INTERFACE:$ARCHIVE_REVISION:$ARCHIVE_MINOR
# Stick the version numbers into config.h
-$as_echo "#define LIBARCHIVE_VERSION_STRING \"3.3.2\"" >>confdefs.h
+$as_echo "#define LIBARCHIVE_VERSION_STRING \"3.3.3\"" >>confdefs.h
cat >>confdefs.h <<_ACEOF
-#define LIBARCHIVE_VERSION_NUMBER "3003002"
+#define LIBARCHIVE_VERSION_NUMBER "3003003"
_ACEOF
-$as_echo "#define BSDCPIO_VERSION_STRING \"3.3.2\"" >>confdefs.h
+$as_echo "#define BSDCPIO_VERSION_STRING \"3.3.3\"" >>confdefs.h
-$as_echo "#define BSDTAR_VERSION_STRING \"3.3.2\"" >>confdefs.h
+$as_echo "#define BSDTAR_VERSION_STRING \"3.3.3\"" >>confdefs.h
-$as_echo "#define BSDCAT_VERSION_STRING \"3.3.2\"" >>confdefs.h
+$as_echo "#define BSDCAT_VERSION_STRING \"3.3.3\"" >>confdefs.h
# 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=3.3.2
-BSDTAR_VERSION_STRING=3.3.2
-BSDCAT_VERSION_STRING=3.3.2
-LIBARCHIVE_VERSION_STRING=3.3.2
-LIBARCHIVE_VERSION_NUMBER=3003002
+BSDCPIO_VERSION_STRING=3.3.3
+BSDTAR_VERSION_STRING=3.3.3
+BSDCAT_VERSION_STRING=3.3.3
+LIBARCHIVE_VERSION_STRING=3.3.3
+LIBARCHIVE_VERSION_NUMBER=3003003
# Substitute the above version numbers into the various files below.
# Yes, I believe this is the fourth time we define what are essentially
@@ -13779,7 +13781,7 @@ fi
done
-for ac_header in sys/select.h sys/statfs.h sys/statvfs.h
+for ac_header in sys/select.h sys/statfs.h sys/statvfs.h sys/sysmacros.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -15185,6 +15187,73 @@ fi
fi
+# Check whether --with-zstd was given.
+if test "${with_zstd+set}" = set; then :
+ withval=$with_zstd;
+fi
+
+
+if test "x$with_zstd" != "xno"; then
+ for ac_header in zstd.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
+if test "x$ac_cv_header_zstd_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ZSTD_H 1
+_ACEOF
+
+fi
+
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compressStream in -lzstd" >&5
+$as_echo_n "checking for ZSTD_compressStream in -lzstd... " >&6; }
+if ${ac_cv_lib_zstd_ZSTD_compressStream+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lzstd $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ZSTD_compressStream ();
+int
+main ()
+{
+return ZSTD_compressStream ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_zstd_ZSTD_compressStream=yes
+else
+ ac_cv_lib_zstd_ZSTD_compressStream=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compressStream" >&5
+$as_echo "$ac_cv_lib_zstd_ZSTD_compressStream" >&6; }
+if test "x$ac_cv_lib_zstd_ZSTD_compressStream" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZSTD 1
+_ACEOF
+
+ LIBS="-lzstd $LIBS"
+
+fi
+
+fi
+
+
# Check whether --with-lzma was given.
if test "${with_lzma+set}" = set; then :
withval=$with_lzma;
@@ -17920,7 +17989,7 @@ return setxattr ();
return 0;
}
_ACEOF
-for ac_lib in '' attr; do
+for ac_lib in '' attr gnu; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@@ -21812,7 +21881,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 3.3.2, which was
+This file was extended by libarchive $as_me 3.3.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21878,7 +21947,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libarchive config.status 3.3.2
+libarchive config.status 3.3.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/archivers/libarchive/files/configure.ac b/archivers/libarchive/files/configure.ac
index ba3cfdafcdb..cc61e724d4b 100644
--- a/archivers/libarchive/files/configure.ac
+++ b/archivers/libarchive/files/configure.ac
@@ -4,8 +4,8 @@ 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],[3.3.2])
-m4_define([LIBARCHIVE_VERSION_N],[3003002])
+m4_define([LIBARCHIVE_VERSION_S],[3.3.3])
+m4_define([LIBARCHIVE_VERSION_N],[3003003])
dnl bsdtar and bsdcpio versioning tracks libarchive
m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
@@ -290,7 +290,7 @@ AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h])
AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/ea.h sys/extattr.h])
AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h])
AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/richacl.h])
-AC_CHECK_HEADERS([sys/select.h sys/statfs.h sys/statvfs.h])
+AC_CHECK_HEADERS([sys/select.h sys/statfs.h sys/statvfs.h sys/sysmacros.h])
AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h sys/xattr.h])
AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h wctype.h])
AC_CHECK_HEADERS([windows.h])
@@ -367,6 +367,14 @@ if test "x$with_lz4" != "xno"; then
AC_CHECK_LIB(lz4,LZ4_decompress_safe)
fi
+AC_ARG_WITH([zstd],
+ AS_HELP_STRING([--without-zstd], [Don't build support for zstd through libzstd]))
+
+if test "x$with_zstd" != "xno"; then
+ AC_CHECK_HEADERS([zstd.h])
+ AC_CHECK_LIB(zstd,ZSTD_compressStream)
+fi
+
AC_ARG_WITH([lzma],
AS_HELP_STRING([--without-lzma], [Don't build support for xz through lzma]))
@@ -682,7 +690,7 @@ AC_ARG_ENABLE([xattr],
[Disable Extended Attributes support (default: check)]))
if test "x$enable_xattr" != "xno"; then
- AC_SEARCH_LIBS([setxattr], [attr])
+ AC_SEARCH_LIBS([setxattr], [attr gnu])
AC_CHECK_DECLS([EXTATTR_NAMESPACE_USER], [], [], [#include <sys/types.h>
#include <sys/extattr.h>
])
diff --git a/archivers/libarchive/files/contrib/android/Android.mk b/archivers/libarchive/files/contrib/android/Android.mk
index b82beab4a6d..2f2cf563697 100644
--- a/archivers/libarchive/files/contrib/android/Android.mk
+++ b/archivers/libarchive/files/contrib/android/Android.mk
@@ -74,6 +74,7 @@ libarchive_src_files := libarchive/archive_acl.c \
libarchive/archive_read_support_filter_rpm.c \
libarchive/archive_read_support_filter_uu.c \
libarchive/archive_read_support_filter_xz.c \
+ libarchive/archive_read_support_filter_zstd.c \
libarchive/archive_read_support_format_7zip.c \
libarchive/archive_read_support_format_all.c \
libarchive/archive_read_support_format_ar.c \
@@ -116,6 +117,7 @@ libarchive_src_files := libarchive/archive_acl.c \
libarchive/archive_write_add_filter_program.c \
libarchive/archive_write_add_filter_uuencode.c \
libarchive/archive_write_add_filter_xz.c \
+ libarchive/archive_write_add_filter_zstd.c \
libarchive/archive_write_set_format.c \
libarchive/archive_write_set_format_7zip.c \
libarchive/archive_write_set_format_ar.c \
diff --git a/archivers/libarchive/files/cpio/bsdcpio.1 b/archivers/libarchive/files/cpio/bsdcpio.1
index e52546e6f76..786a717097e 100644
--- a/archivers/libarchive/files/cpio/bsdcpio.1
+++ b/archivers/libarchive/files/cpio/bsdcpio.1
@@ -187,6 +187,11 @@ In input mode, this option is ignored.
Compress the archive with lz4-compatible compression before writing it.
In input mode, this option is ignored; lz4 compression is recognized
automatically on input.
+.It Fl Fl zstd
+(o mode only)
+Compress the archive with zstd-compatible compression before writing it.
+In input mode, this option is ignored; zstd compression is recognized
+automatically on input.
.It Fl Fl lzma
(o mode only)
Compress the file with lzma-compatible compression before writing it.
diff --git a/archivers/libarchive/files/cpio/cmdline.c b/archivers/libarchive/files/cpio/cmdline.c
index 0c10b2cdcf8..c8fc30ea773 100644
--- a/archivers/libarchive/files/cpio/cmdline.c
+++ b/archivers/libarchive/files/cpio/cmdline.c
@@ -92,6 +92,7 @@ static const struct option {
{ "verbose", 0, 'v' },
{ "version", 0, OPTION_VERSION },
{ "xz", 0, 'J' },
+ { "zstd", 0, OPTION_ZSTD },
{ NULL, 0, 0 }
};
diff --git a/archivers/libarchive/files/cpio/cpio.c b/archivers/libarchive/files/cpio/cpio.c
index 5beedd0d16b..4b8ce79296f 100644
--- a/archivers/libarchive/files/cpio/cpio.c
+++ b/archivers/libarchive/files/cpio/cpio.c
@@ -269,6 +269,7 @@ main(int argc, char *argv[])
case OPTION_LZ4:
case OPTION_LZMA: /* GNU tar, others */
case OPTION_LZOP: /* GNU tar, others */
+ case OPTION_ZSTD:
cpio->compress = opt;
break;
case 'm': /* POSIX 1997 */
@@ -498,7 +499,7 @@ long_help(void)
static void
version(void)
{
- fprintf(stdout,"bsdcpio %s - %s\n",
+ fprintf(stdout,"bsdcpio %s - %s \n",
BSDCPIO_VERSION_STRING,
archive_version_details());
exit(0);
@@ -546,6 +547,9 @@ mode_out(struct cpio *cpio)
case OPTION_LZOP:
r = archive_write_add_filter_lzop(cpio->archive);
break;
+ case OPTION_ZSTD:
+ r = archive_write_add_filter_zstd(cpio->archive);
+ break;
case 'j': case 'y':
r = archive_write_add_filter_bzip2(cpio->archive);
break;
diff --git a/archivers/libarchive/files/cpio/cpio.h b/archivers/libarchive/files/cpio/cpio.h
index 1036dece93b..abf3628bfae 100644
--- a/archivers/libarchive/files/cpio/cpio.h
+++ b/archivers/libarchive/files/cpio/cpio.h
@@ -111,7 +111,8 @@ enum {
OPTION_PRESERVE_OWNER,
OPTION_QUIET,
OPTION_UUENCODE,
- OPTION_VERSION
+ OPTION_VERSION,
+ OPTION_ZSTD,
};
int cpio_getopt(struct cpio *cpio);
diff --git a/archivers/libarchive/files/cpio/test/CMakeLists.txt b/archivers/libarchive/files/cpio/test/CMakeLists.txt
index 4c3fb88a61f..d0927a81e8a 100644
--- a/archivers/libarchive/files/cpio/test/CMakeLists.txt
+++ b/archivers/libarchive/files/cpio/test/CMakeLists.txt
@@ -23,6 +23,7 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
test_extract_cpio_lzma
test_extract_cpio_lzo
test_extract_cpio_xz
+ test_extract_cpio_zstd
test_format_newc.c
test_gcpio_compat.c
test_missing_file.c
@@ -53,6 +54,7 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
test_option_xz.c
test_option_y.c
test_option_z.c
+ test_option_zstd.c
test_owner_parse.c
test_passthrough_dotdot.c
test_passthrough_reverse.c
diff --git a/archivers/libarchive/files/cpio/test/list.h b/archivers/libarchive/files/cpio/test/list.h
index 9968c4d9d97..92f9ec82ed1 100644
--- a/archivers/libarchive/files/cpio/test/list.h
+++ b/archivers/libarchive/files/cpio/test/list.h
@@ -11,6 +11,7 @@ DEFINE_TEST(test_extract_cpio_lzma)
DEFINE_TEST(test_extract_cpio_lzo)
DEFINE_TEST(test_extract_cpio_xz)
DEFINE_TEST(test_extract_cpio_Z)
+DEFINE_TEST(test_extract_cpio_zstd)
DEFINE_TEST(test_format_newc)
DEFINE_TEST(test_gcpio_compat)
DEFINE_TEST(test_missing_file)
@@ -40,6 +41,7 @@ DEFINE_TEST(test_option_version)
DEFINE_TEST(test_option_xz)
DEFINE_TEST(test_option_y)
DEFINE_TEST(test_option_z)
+DEFINE_TEST(test_option_zstd)
DEFINE_TEST(test_option_Z_upper)
DEFINE_TEST(test_owner_parse)
DEFINE_TEST(test_passthrough_dotdot)
diff --git a/archivers/libarchive/files/cpio/test/test_basic.c b/archivers/libarchive/files/cpio/test/test_basic.c
index f3a048002a5..6e45d185698 100644
--- a/archivers/libarchive/files/cpio/test/test_basic.c
+++ b/archivers/libarchive/files/cpio/test/test_basic.c
@@ -144,49 +144,79 @@ DEFINE_TEST(test_basic)
/* File with 10 bytes content. */
assertMakeFile("file", 0644, "1234567890");
fprintf(filelist, "file\n");
- if (is_LargeInode("file"))
+ if (is_LargeInode("file")) {
strncat(result,
- "bsdcpio: file: large inode number truncated: "
- "Numerical result out of range\n",
+ "bsdcpio: file: large inode number truncated: ",
sizeof(result) - strlen(result) -1);
+ strncat(result,
+ strerror(ERANGE),
+ sizeof(result) - strlen(result) -1);
+ strncat(result,
+ "\n",
+ sizeof(result) - strlen(result) -1);
+ }
/* hardlink to above file. */
assertMakeHardlink("linkfile", "file");
fprintf(filelist, "linkfile\n");
- if (is_LargeInode("linkfile"))
+ if (is_LargeInode("linkfile")) {
+ strncat(result,
+ "bsdcpio: linkfile: large inode number truncated: ",
+ sizeof(result) - strlen(result) -1);
+ strncat(result,
+ strerror(ERANGE),
+ sizeof(result) - strlen(result) -1);
strncat(result,
- "bsdcpio: linkfile: large inode number truncated: "
- "Numerical result out of range\n",
+ "\n",
sizeof(result) - strlen(result) -1);
+ }
/* Symlink to above file. */
if (canSymlink()) {
assertMakeSymlink("symlink", "file");
fprintf(filelist, "symlink\n");
- if (is_LargeInode("symlink"))
+ if (is_LargeInode("symlink")) {
+ strncat(result,
+ "bsdcpio: symlink: large inode number truncated: ",
+ sizeof(result) - strlen(result) -1);
strncat(result,
- "bsdcpio: symlink: large inode number truncated: "
- "Numerical result out of range\n",
+ strerror(ERANGE),
sizeof(result) - strlen(result) -1);
+ strncat(result,
+ "\n",
+ sizeof(result) - strlen(result) -1);
+ }
}
/* Another file with different permissions. */
assertMakeFile("file2", 0777, "1234567890");
fprintf(filelist, "file2\n");
- if (is_LargeInode("file2"))
+ if (is_LargeInode("file2")) {
+ strncat(result,
+ "bsdcpio: file2: large inode number truncated: ",
+ sizeof(result) - strlen(result) -1);
+ strncat(result,
+ strerror(ERANGE),
+ sizeof(result) - strlen(result) -1);
strncat(result,
- "bsdcpio: file2: large inode number truncated: "
- "Numerical result out of range\n",
+ "\n",
sizeof(result) - strlen(result) -1);
+ }
/* Directory. */
assertMakeDir("dir", 0775);
fprintf(filelist, "dir\n");
- if (is_LargeInode("dir"))
+ if (is_LargeInode("dir")) {
+ strncat(result,
+ "bsdcpio: dir: large inode number truncated: ",
+ sizeof(result) - strlen(result) -1);
strncat(result,
- "bsdcpio: dir: large inode number truncated: "
- "Numerical result out of range\n",
+ strerror(ERANGE),
sizeof(result) - strlen(result) -1);
+ strncat(result,
+ "\n",
+ sizeof(result) - strlen(result) -1);
+ }
strncat(result, "2 blocks\n", sizeof(result) - strlen(result) -1);
/* All done. */
diff --git a/archivers/libarchive/files/cpio/test/test_extract.cpio.zst.uu b/archivers/libarchive/files/cpio/test/test_extract.cpio.zst.uu
new file mode 100644
index 00000000000..5ec854b85d2
--- /dev/null
+++ b/archivers/libarchive/files/cpio/test/test_extract.cpio.zst.uu
@@ -0,0 +1,6 @@
+begin 644 test_extract.cpio.zst
+M*+4O_01090,`,@41%X")&@#'G6T\K16_MR)#=DK)5:.1,2J0HY2"!(1!`!7R
+M$(UB`2"*D41;J2UF&)<0!Y7X'TU<%W.\W^R]GO-WW^OO^QX0`%P<]30-!#U`
+?!KD!`#XP,_`U4`HT3+RF:#!7Y\V@R)5"7P"^;WEUK@``
+`
+end
diff --git a/archivers/libarchive/files/cpio/test/test_extract_cpio_zstd.c b/archivers/libarchive/files/cpio/test/test_extract_cpio_zstd.c
new file mode 100644
index 00000000000..289f33d0583
--- /dev/null
+++ b/archivers/libarchive/files/cpio/test/test_extract_cpio_zstd.c
@@ -0,0 +1,48 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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_extract_cpio_zstd)
+{
+ const char *reffile = "test_extract.cpio.zst";
+ int f;
+
+ extract_reference_file(reffile);
+ f = systemf("%s -it < %s >test.out 2>test.err", testprog, reffile);
+ if (f == 0 || canZstd()) {
+ assertEqualInt(0, systemf("%s -i < %s >test.out 2>test.err",
+ testprog, reffile));
+
+ assertFileExists("file1");
+ assertTextFileContents("contents of file1.\n", "file1");
+ assertFileExists("file2");
+ assertTextFileContents("contents of file2.\n", "file2");
+ assertEmptyFile("test.out");
+ assertTextFileContents("1 block\n", "test.err");
+ } else {
+ skipping("It seems zstd is not supported on this platform");
+ }
+}
diff --git a/archivers/libarchive/files/cpio/test/test_format_newc.c b/archivers/libarchive/files/cpio/test/test_format_newc.c
index d2daa46ab71..258640443fe 100644
--- a/archivers/libarchive/files/cpio/test/test_format_newc.c
+++ b/archivers/libarchive/files/cpio/test/test_format_newc.c
@@ -124,26 +124,42 @@ DEFINE_TEST(test_format_newc)
/* Setup result message. */
memset(result, 0, sizeof(result));
- if (is_LargeInode("file1"))
+ if (is_LargeInode("file1")) {
strncat(result,
- "bsdcpio: file1: large inode number truncated: "
- "Numerical result out of range\n",
+ "bsdcpio: file1: large inode number truncated: ",
sizeof(result) - strlen(result) -1);
- if (canSymlink() && is_LargeInode("symlink"))
+ strncat(result, strerror(ERANGE),
+ sizeof(result) - strlen(result) -1);
+ strncat(result, "\n",
+ sizeof(result) - strlen(result) -1);
+ }
+ if (canSymlink() && is_LargeInode("symlink")) {
strncat(result,
- "bsdcpio: symlink: large inode number truncated: "
- "Numerical result out of range\n",
+ "bsdcpio: symlink: large inode number truncated: ",
sizeof(result) - strlen(result) -1);
- if (is_LargeInode("dir"))
+ strncat(result, strerror(ERANGE),
+ sizeof(result) - strlen(result) -1);
+ strncat(result, "\n",
+ sizeof(result) - strlen(result) -1);
+ }
+ if (is_LargeInode("dir")) {
strncat(result,
- "bsdcpio: dir: large inode number truncated: "
- "Numerical result out of range\n",
+ "bsdcpio: dir: large inode number truncated: ",
sizeof(result) - strlen(result) -1);
- if (is_LargeInode("hardlink"))
+ strncat(result, strerror(ERANGE),
+ sizeof(result) - strlen(result) -1);
+ strncat(result, "\n",
+ sizeof(result) - strlen(result) -1);
+ }
+ if (is_LargeInode("hardlink")) {
strncat(result,
- "bsdcpio: hardlink: large inode number truncated: "
- "Numerical result out of range\n",
+ "bsdcpio: hardlink: large inode number truncated: ",
sizeof(result) - strlen(result) -1);
+ strncat(result, strerror(ERANGE),
+ sizeof(result) - strlen(result) -1);
+ strncat(result, "\n",
+ sizeof(result) - strlen(result) -1);
+ }
/* Record some facts about what we just created: */
now = time(NULL); /* They were all created w/in last two seconds. */
diff --git a/archivers/libarchive/files/cpio/test/test_option_zstd.c b/archivers/libarchive/files/cpio/test/test_option_zstd.c
new file mode 100644
index 00000000000..29b8c78b94a
--- /dev/null
+++ b/archivers/libarchive/files/cpio/test/test_option_zstd.c
@@ -0,0 +1,85 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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_option_zstd)
+{
+ char *p;
+ int r;
+ size_t s;
+
+ /* Create a file. */
+ assertMakeFile("f", 0644, "a");
+
+ /* Archive it with zstd compression. */
+ r = systemf("echo f | %s -o --zstd >archive.out 2>archive.err",
+ testprog);
+ p = slurpfile(&s, "archive.err");
+ p[s] = '\0';
+ if (r != 0) {
+ if (strstr(p, "Unsupported compression") != NULL) {
+ skipping("This version of bsdcpio was compiled "
+ "without zstd support");
+ goto done;
+ }
+ /* POSIX permits different handling of the spawnp
+ * system call used to launch the subsidiary
+ * program: */
+ /* Some systems fail immediately to spawn the new process. */
+ if (strstr(p, "Can't launch") != NULL && !canZstd()) {
+ skipping("This version of bsdcpio uses an external zstd program "
+ "but no such program is available on this system.");
+ goto done;
+ }
+ /* Some systems successfully spawn the new process,
+ * but fail to exec a program within that process.
+ * This results in failure at the first attempt to
+ * write. */
+ if (strstr(p, "Can't write") != NULL && !canZstd()) {
+ skipping("This version of bsdcpio uses an external zstd program "
+ "but no such program is available on this system.");
+ goto done;
+ }
+ /* On some systems the error won't be detected until closing
+ time, by a 127 exit error returned by waitpid. */
+ if (strstr(p, "Error closing") != NULL && !canZstd()) {
+ skipping("This version of bsdcpio uses an external zstd program "
+ "but no such program is available on this system.");
+ return;
+ }
+ failure("--zstd option is broken: %s", p);
+ assertEqualInt(r, 0);
+ goto done;
+ }
+ free(p);
+ /* Check that the archive file has an zstd signature. */
+ p = slurpfile(&s, "archive.out");
+ assert(s > 2);
+ assertEqualMem(p, "\x28\xb5\x2f\xfd", 4);
+
+done:
+ free(p);
+}
diff --git a/archivers/libarchive/files/doc/html/archive_entry.3.html b/archivers/libarchive/files/doc/html/archive_entry.3.html
index 00dd4d7fa8f..7833e8b8c55 100644
--- a/archivers/libarchive/files/doc/html/archive_entry.3.html
+++ b/archivers/libarchive/files/doc/html/archive_entry.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:53 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:06 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_entry_acl.3.html b/archivers/libarchive/files/doc/html/archive_entry_acl.3.html
index 0765da06e49..e87c56679e0 100644
--- a/archivers/libarchive/files/doc/html/archive_entry_acl.3.html
+++ b/archivers/libarchive/files/doc/html/archive_entry_acl.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html b/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html
index 7dfb3571707..5e9d077563a 100644
--- a/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html
+++ b/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_entry_paths.3.html b/archivers/libarchive/files/doc/html/archive_entry_paths.3.html
index 7554dfa8704..252bdbfbea4 100644
--- a/archivers/libarchive/files/doc/html/archive_entry_paths.3.html
+++ b/archivers/libarchive/files/doc/html/archive_entry_paths.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_entry_perms.3.html b/archivers/libarchive/files/doc/html/archive_entry_perms.3.html
index b7d09b82cb0..df9b1cd8482 100644
--- a/archivers/libarchive/files/doc/html/archive_entry_perms.3.html
+++ b/archivers/libarchive/files/doc/html/archive_entry_perms.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_entry_stat.3.html b/archivers/libarchive/files/doc/html/archive_entry_stat.3.html
index 462b4cc95da..4f6c0659db8 100644
--- a/archivers/libarchive/files/doc/html/archive_entry_stat.3.html
+++ b/archivers/libarchive/files/doc/html/archive_entry_stat.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_entry_time.3.html b/archivers/libarchive/files/doc/html/archive_entry_time.3.html
index a7529e47682..f8e5a1e52b4 100644
--- a/archivers/libarchive/files/doc/html/archive_entry_time.3.html
+++ b/archivers/libarchive/files/doc/html/archive_entry_time.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read.3.html b/archivers/libarchive/files/doc/html/archive_read.3.html
index c527e6ed48c..cd642769a7a 100644
--- a/archivers/libarchive/files/doc/html/archive_read.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html b/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html
index 3fd4f1cc6a6..c0b5f69e07c 100644
--- a/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_data.3.html b/archivers/libarchive/files/doc/html/archive_read_data.3.html
index 897e7620a9d..126d8431312 100644
--- a/archivers/libarchive/files/doc/html/archive_read_data.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_data.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_disk.3.html b/archivers/libarchive/files/doc/html/archive_read_disk.3.html
index 03cd69c36c5..2847481b332 100644
--- a/archivers/libarchive/files/doc/html/archive_read_disk.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_disk.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:54 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:07 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_extract.3.html b/archivers/libarchive/files/doc/html/archive_read_extract.3.html
index f9f424f0086..046eece2157 100644
--- a/archivers/libarchive/files/doc/html/archive_read_extract.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_extract.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:55 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_filter.3.html b/archivers/libarchive/files/doc/html/archive_read_filter.3.html
index 47fb7892fea..b41a6dcda7d 100644
--- a/archivers/libarchive/files/doc/html/archive_read_filter.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_filter.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:55 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -36,6 +36,7 @@ ARCHIVE_READ_FILTER(3)</p>
<b>archive_read_support_filter_rpm</b>,
<b>archive_read_support_filter_uu</b>,
<b>archive_read_support_filter_xz</b>,
+<b>archive_read_support_filter_zstd</b>,
<b>archive_read_support_filter_program</b>,
<b>archive_read_support_filter_program_signature</b> &mdash;
functions for reading streaming archives</p>
@@ -118,6 +119,11 @@ functions for reading streaming archives</p>
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
+<p style="margin-left:12%;"><b>archive_read_support_filter_zstd</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
+
+<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
+
+
<p><b>archive_read_support_filter_program</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>const&nbsp;char&nbsp;*cmd</i>);</p>
@@ -141,7 +147,8 @@ archive_read_support_filter_bzip2</b>(),
<b>archive_read_support_filter_none</b>(),
<b>archive_read_support_filter_rpm</b>(),
<b>archive_read_support_filter_uu</b>(),
-<b>archive_read_support_filter_xz</b>()</p>
+<b>archive_read_support_filter_xz</b>(),
+<b>archive_read_support_filter_zstd</b>(),</p>
<p style="margin-left:17%;">Enables auto-detection code and
decompression support for the specified compression. These
diff --git a/archivers/libarchive/files/doc/html/archive_read_format.3.html b/archivers/libarchive/files/doc/html/archive_read_format.3.html
index d09ebaa67a8..81eba00dc9a 100644
--- a/archivers/libarchive/files/doc/html/archive_read_format.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_format.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:55 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_free.3.html b/archivers/libarchive/files/doc/html/archive_read_free.3.html
index 927f5f10139..16c8b4838db 100644
--- a/archivers/libarchive/files/doc/html/archive_read_free.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_free.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:55 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_header.3.html b/archivers/libarchive/files/doc/html/archive_read_header.3.html
index 5da9acb25b9..988a46ebee2 100644
--- a/archivers/libarchive/files/doc/html/archive_read_header.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_header.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:55 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_new.3.html b/archivers/libarchive/files/doc/html/archive_read_new.3.html
index 6f5dffa819f..e2078e56504 100644
--- a/archivers/libarchive/files/doc/html/archive_read_new.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_new.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:55 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_open.3.html b/archivers/libarchive/files/doc/html/archive_read_open.3.html
index 9f1c0e03545..72d2e8e14bf 100644
--- a/archivers/libarchive/files/doc/html/archive_read_open.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_open.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:55 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_read_set_options.3.html b/archivers/libarchive/files/doc/html/archive_read_set_options.3.html
index 8f17c374ab9..cff2a0ae3c6 100644
--- a/archivers/libarchive/files/doc/html/archive_read_set_options.3.html
+++ b/archivers/libarchive/files/doc/html/archive_read_set_options.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:55 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_util.3.html b/archivers/libarchive/files/doc/html/archive_util.3.html
index f1798303a67..be632ffbe92 100644
--- a/archivers/libarchive/files/doc/html/archive_util.3.html
+++ b/archivers/libarchive/files/doc/html/archive_util.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:55 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write.3.html b/archivers/libarchive/files/doc/html/archive_write.3.html
index 87dd69b8cab..e92da664c1a 100644
--- a/archivers/libarchive/files/doc/html/archive_write.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -71,7 +71,7 @@ corresponding compression and format support.</p>
<p style="margin-left:6%; margin-top: 1em"><b>Set
options</b> <br>
-See archive_read_set_options(3).</p>
+See archive_write_set_options(3).</p>
<p style="margin-left:6%; margin-top: 1em"><b>Open
archive</b> <br>
diff --git a/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html b/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html
index 399a405504c..3d233788518 100644
--- a/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_data.3.html b/archivers/libarchive/files/doc/html/archive_write_data.3.html
index 96006a02c85..0d386fafa0e 100644
--- a/archivers/libarchive/files/doc/html/archive_write_data.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_data.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_disk.3.html b/archivers/libarchive/files/doc/html/archive_write_disk.3.html
index c49997e3052..d13bbe7b95d 100644
--- a/archivers/libarchive/files/doc/html/archive_write_disk.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_disk.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_filter.3.html b/archivers/libarchive/files/doc/html/archive_write_filter.3.html
index 6d0fdce1f17..6e86d8555bf 100644
--- a/archivers/libarchive/files/doc/html/archive_write_filter.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_filter.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -40,7 +40,8 @@ ARCHIVE_WRITE_FILTER(3)</p>
<b>archive_write_add_filter_none</b>,
<b>archive_write_add_filter_program</b>,
<b>archive_write_add_filter_uuencode</b>,
-<b>archive_write_add_filter_xz</b> &mdash; functions
+<b>archive_write_add_filter_xz</b>,
+<b>archive_write_add_filter_zstd</b>, &mdash; functions
enabling output filters</p>
<p style="margin-top: 1em"><b>LIBRARY</b></p>
@@ -124,6 +125,11 @@ enabling output filters</p>
<p style="margin-left:12%;"><b>archive_write_add_filter_xz</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
+<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
+
+
+<p style="margin-left:12%;"><b>archive_write_add_filter_zstd</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
+
<p style="margin-top: 1em"><b>DESCRIPTION <br>
archive_write_add_filter_bzip2</b>(),
<b>archive_write_add_filter_compress</b>(),
@@ -134,7 +140,8 @@ archive_write_add_filter_bzip2</b>(),
<b>archive_write_add_filter_lzip</b>(),
<b>archive_write_add_filter_lzma</b>(),
<b>archive_write_add_filter_lzop</b>(),
-<b>archive_write_add_filter_xz</b>(),</p>
+<b>archive_write_add_filter_xz</b>(),
+<b>archive_write_add_filter_zstd</b>(),</p>
<p style="margin-left:17%;">The resulting archive will be
compressed as specified. Note that the compressed output is
diff --git a/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html b/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html
index e394628a8b9..bc1f5c6dbeb 100644
--- a/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_format.3.html b/archivers/libarchive/files/doc/html/archive_write_format.3.html
index 0912509dba1..44a5cc45101 100644
--- a/archivers/libarchive/files/doc/html/archive_write_format.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_format.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_free.3.html b/archivers/libarchive/files/doc/html/archive_write_free.3.html
index f5c8c687087..2346fe9e1b7 100644
--- a/archivers/libarchive/files/doc/html/archive_write_free.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_free.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_header.3.html b/archivers/libarchive/files/doc/html/archive_write_header.3.html
index 17941cdb233..cb538860af5 100644
--- a/archivers/libarchive/files/doc/html/archive_write_header.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_header.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_new.3.html b/archivers/libarchive/files/doc/html/archive_write_new.3.html
index 2a12fe61bb9..fff8510e6c0 100644
--- a/archivers/libarchive/files/doc/html/archive_write_new.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_new.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_open.3.html b/archivers/libarchive/files/doc/html/archive_write_open.3.html
index 6d51e6db453..294f28d75cb 100644
--- a/archivers/libarchive/files/doc/html/archive_write_open.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_open.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:56 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_set_options.3.html b/archivers/libarchive/files/doc/html/archive_write_set_options.3.html
index 28dcaa0c58f..3239f738af1 100644
--- a/archivers/libarchive/files/doc/html/archive_write_set_options.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_set_options.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html b/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html
index 04ff2a28c83..5012a0b244a 100644
--- a/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html
+++ b/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/bsdcpio.1.html b/archivers/libarchive/files/doc/html/bsdcpio.1.html
index 3ed5a48817f..7cfb2712e43 100644
--- a/archivers/libarchive/files/doc/html/bsdcpio.1.html
+++ b/archivers/libarchive/files/doc/html/bsdcpio.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:58 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:11 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -226,6 +226,13 @@ Compress the archive with lz4-compatible compression before
writing it. In input mode, this option is ignored; lz4
compression is recognized automatically on input.</p>
+<p style="margin-top: 1em"><b>--zstd</b></p>
+
+<p style="margin-left:17%; margin-top: 1em">(o mode only)
+Compress the archive with zstd-compatible compression before
+writing it. In input mode, this option is ignored; zstd
+compression is recognized automatically on input.</p>
+
<p style="margin-top: 1em"><b>--lzma</b></p>
<p style="margin-left:17%; margin-top: 1em">(o mode only)
diff --git a/archivers/libarchive/files/doc/html/bsdtar.1.html b/archivers/libarchive/files/doc/html/bsdtar.1.html
index d7ad4d87776..ff7e6de0b15 100644
--- a/archivers/libarchive/files/doc/html/bsdtar.1.html
+++ b/archivers/libarchive/files/doc/html/bsdtar.1.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:58 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:11 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -348,18 +348,18 @@ example, the command</p>
<p style="margin-left:17%;">(c mode only) Compress the
resulting archive with xz(1). In extract or list modes, this
-option is ignored. Note that, unlike other <b>tar</b>
-implementations, this implementation recognizes XZ
-compression automatically when reading archives.</p>
+option is ignored. Note that this <b>tar</b> implementation
+recognizes XZ compression automatically when reading
+archives.</p>
<p style="margin-top: 1em"><b>-j</b>, <b>--bzip</b>,
<b>--bzip2</b>, <b>--bunzip2</b></p>
<p style="margin-left:17%;">(c mode only) Compress the
resulting archive with bzip2(1). In extract or list modes,
-this option is ignored. Note that, unlike other <b>tar</b>
-implementations, this implementation recognizes bzip2
-compression automatically when reading archives.</p>
+this option is ignored. Note that this <b>tar</b>
+implementation recognizes bzip2 compression automatically
+when reading archives.</p>
<p style="margin-top: 1em"><b>-k</b>,
<b>--keep-old-files</b></p>
@@ -394,22 +394,33 @@ archived.</p>
<p style="margin-left:17%;">(c mode only) Compress the
resulting archive with lrzip(1). In extract or list modes,
-this option is ignored.</p>
+this option is ignored. Note that this <b>tar</b>
+implementation recognizes lrzip compression automatically
+when reading archives.</p>
<p style="margin-top: 1em"><b>--lz4</b></p>
<p style="margin-left:17%; margin-top: 1em">(c mode only)
Compress the archive with lz4-compatible compression before
-writing it. In input mode, this option is ignored; lz4
-compression is recognized automatically on input.</p>
+writing it. In extract or list modes, this option is
+ignored. Note that this <b>tar</b> implementation recognizes
+lz4 compression automatically when reading archives.</p>
+
+<p style="margin-top: 1em"><b>--zstd</b></p>
+
+<p style="margin-left:17%; margin-top: 1em">(c mode only)
+Compress the archive with zstd-compatible compression before
+writing it. In extract or list modes, this option is
+ignored. Note that this <b>tar</b> implementation recognizes
+zstd compression automatically when reading archives.</p>
<p style="margin-top: 1em"><b>--lzma</b></p>
<p style="margin-left:17%; margin-top: 1em">(c mode only)
Compress the resulting archive with the original LZMA
-algorithm. Use of this option is discouraged and new
-archives should be created with <b>--xz</b> instead. Note
-that, unlike other <b>tar</b> implementations, this
+algorithm. In extract or list modes, this option is ignored.
+Use of this option is discouraged and new archives should be
+created with <b>--xz</b> instead. Note that this <b>tar</b>
implementation recognizes LZMA compression automatically
when reading archives.</p>
@@ -417,7 +428,9 @@ when reading archives.</p>
<p style="margin-left:17%; margin-top: 1em">(c mode only)
Compress the resulting archive with lzop(1). In extract or
-list modes, this option is ignored.</p>
+list modes, this option is ignored. Note that this
+<b>tar</b> implementation recognizes LZO compression
+automatically when reading archives.</p>
<p style="margin-top: 1em"><b>-m</b>,
<b>--modification-time</b></p>
@@ -701,6 +714,11 @@ default).</p>
block being compressed for a compression dictionary to
improve compression ratio.</p>
+<p><b>zstd:compression-level</b></p>
+
+<p style="margin-left:27%;">A decimal integer from 1 to 22
+specifying the zstd compression level.</p>
+
<p><b>lzop:compression-level</b></p>
<p style="margin-left:27%;">A decimal integer from 1 to 9
@@ -964,28 +982,27 @@ modes or if <b>tar</b> is run in x mode as root.</p>
<p style="margin-left:17%; margin-top: 1em">(c mode only)
Compress the resulting archive with bzip2(1). In extract or
-list modes, this option is ignored. Note that, unlike other
-<b>tar</b> implementations, this implementation recognizes
-bzip2 compression automatically when reading archives.</p>
+list modes, this option is ignored. Note that this
+<b>tar</b> implementation recognizes bzip2 compression
+automatically when reading archives.</p>
<p style="margin-top: 1em"><b>-Z</b>, <b>--compress</b>,
<b>--uncompress</b></p>
<p style="margin-left:17%;">(c mode only) Compress the
resulting archive with compress(1). In extract or list
-modes, this option is ignored. Note that, unlike other
-<b>tar</b> implementations, this implementation recognizes
-compress compression automatically when reading
-archives.</p>
+modes, this option is ignored. Note that this <b>tar</b>
+implementation recognizes compress compression automatically
+when reading archives.</p>
<p style="margin-top: 1em"><b>-z</b>, <b>--gunzip</b>,
<b>--gzip</b></p>
<p style="margin-left:17%;">(c mode only) Compress the
resulting archive with gzip(1). In extract or list modes,
-this option is ignored. Note that, unlike other <b>tar</b>
-implementations, this implementation recognizes gzip
-compression automatically when reading archives.</p>
+this option is ignored. Note that this <b>tar</b>
+implementation recognizes gzip compression automatically
+when reading archives.</p>
<p style="margin-top: 1em"><b>ENVIRONMENT</b></p>
@@ -1333,7 +1350,7 @@ incompatible ways that different archive formats store
hardlink information.)</p>
<p style="margin-left:6%; margin-top: 1em">BSD
-February&nbsp;25, 2017 BSD</p>
+October&nbsp;1, 2017 BSD</p>
<hr>
</body>
</html>
diff --git a/archivers/libarchive/files/doc/html/cpio.5.html b/archivers/libarchive/files/doc/html/cpio.5.html
index 305a5514ba5..5ee99fd8f27 100644
--- a/archivers/libarchive/files/doc/html/cpio.5.html
+++ b/archivers/libarchive/files/doc/html/cpio.5.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:09 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/libarchive-formats.5.html b/archivers/libarchive/files/doc/html/libarchive-formats.5.html
index 69b77411d39..6172fea963c 100644
--- a/archivers/libarchive/files/doc/html/libarchive-formats.5.html
+++ b/archivers/libarchive/files/doc/html/libarchive-formats.5.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:10 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/libarchive.3.html b/archivers/libarchive/files/doc/html/libarchive.3.html
index 80906e3a56a..54e09ee3d6c 100644
--- a/archivers/libarchive/files/doc/html/libarchive.3.html
+++ b/archivers/libarchive/files/doc/html/libarchive.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:10 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/libarchive_changes.3.html b/archivers/libarchive/files/doc/html/libarchive_changes.3.html
index 6ccb6795fac..2a3dde77a64 100644
--- a/archivers/libarchive/files/doc/html/libarchive_changes.3.html
+++ b/archivers/libarchive/files/doc/html/libarchive_changes.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:10 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/libarchive_internals.3.html b/archivers/libarchive/files/doc/html/libarchive_internals.3.html
index dccacddecfa..cf757b58c74 100644
--- a/archivers/libarchive/files/doc/html/libarchive_internals.3.html
+++ b/archivers/libarchive/files/doc/html/libarchive_internals.3.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:10 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/mtree.5.html b/archivers/libarchive/files/doc/html/mtree.5.html
index 6cea6e39824..a276365abd6 100644
--- a/archivers/libarchive/files/doc/html/mtree.5.html
+++ b/archivers/libarchive/files/doc/html/mtree.5.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:57 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:10 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/html/tar.5.html b/archivers/libarchive/files/doc/html/tar.5.html
index 2e0969b9dbb..c9af4d8acf9 100644
--- a/archivers/libarchive/files/doc/html/tar.5.html
+++ b/archivers/libarchive/files/doc/html/tar.5.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Mon Jul 10 02:32:58 2017 -->
+<!-- CreationDate: Mon Sep 3 22:55:10 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/archivers/libarchive/files/doc/man/archive_read_filter.3 b/archivers/libarchive/files/doc/man/archive_read_filter.3
index 9e9cc2097c6..9a54a88a4a0 100644
--- a/archivers/libarchive/files/doc/man/archive_read_filter.3
+++ b/archivers/libarchive/files/doc/man/archive_read_filter.3
@@ -11,6 +11,7 @@
\fB\%archive_read_support_filter_rpm\fP,
\fB\%archive_read_support_filter_uu\fP,
\fB\%archive_read_support_filter_xz\fP,
+\fB\%archive_read_support_filter_zstd\fP,
\fB\%archive_read_support_filter_program\fP,
\fB\%archive_read_support_filter_program_signature\fP
\- functions for reading streaming archives
@@ -75,6 +76,10 @@ Streaming Archive Library (libarchive, -larchive)
.br
\fIint\fP
.br
+\fB\%archive_read_support_filter_zstd\fP(\fI\%struct\ archive\ *\fP);
+.br
+\fIint\fP
+.br
\fB\%archive_read_support_filter_program\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ char\ *cmd\fP);
.br
\fIint\fP
@@ -95,7 +100,8 @@ Streaming Archive Library (libarchive, -larchive)
\fB\%archive_read_support_filter_none\fP(),
\fB\%archive_read_support_filter_rpm\fP(),
\fB\%archive_read_support_filter_uu\fP(),
-\fB\%archive_read_support_filter_xz\fP()
+\fB\%archive_read_support_filter_xz\fP(),
+\fB\%archive_read_support_filter_zstd\fP(),
Enables auto-detection code and decompression support for the
specified compression.
These functions may fall back on external programs if an appropriate
diff --git a/archivers/libarchive/files/doc/man/archive_write.3 b/archivers/libarchive/files/doc/man/archive_write.3
index 9387f168667..76e7d508493 100644
--- a/archivers/libarchive/files/doc/man/archive_write.3
+++ b/archivers/libarchive/files/doc/man/archive_write.3
@@ -44,7 +44,7 @@ functions to enable the corresponding compression and format
support.
.SS Set options
See
-\fBarchive_read_set_options\fP(3).
+\fBarchive_write_set_options\fP(3).
.SS Open archive
See
\fBarchive_write_open\fP(3).
diff --git a/archivers/libarchive/files/doc/man/archive_write_filter.3 b/archivers/libarchive/files/doc/man/archive_write_filter.3
index 35429609cca..98f75ac38ce 100644
--- a/archivers/libarchive/files/doc/man/archive_write_filter.3
+++ b/archivers/libarchive/files/doc/man/archive_write_filter.3
@@ -15,7 +15,8 @@
\fB\%archive_write_add_filter_none\fP,
\fB\%archive_write_add_filter_program\fP,
\fB\%archive_write_add_filter_uuencode\fP,
-\fB\%archive_write_add_filter_xz\fP
+\fB\%archive_write_add_filter_xz\fP,
+\fB\%archive_write_add_filter_zstd\fP,
\- functions enabling output filters
.SH LIBRARY
.ad l
@@ -79,6 +80,10 @@ Streaming Archive Library (libarchive, -larchive)
\fIint\fP
.br
\fB\%archive_write_add_filter_xz\fP(\fI\%struct\ archive\ *\fP);
+.br
+\fIint\fP
+.br
+\fB\%archive_write_add_filter_zstd\fP(\fI\%struct\ archive\ *\fP);
.SH DESCRIPTION
.ad l
.RS 5
@@ -93,6 +98,7 @@ Streaming Archive Library (libarchive, -larchive)
\fB\%archive_write_add_filter_lzma\fP(),
\fB\%archive_write_add_filter_lzop\fP(),
\fB\%archive_write_add_filter_xz\fP(),
+\fB\%archive_write_add_filter_zstd\fP(),
The resulting archive will be compressed as specified.
Note that the compressed output is always properly blocked.
.TP
diff --git a/archivers/libarchive/files/doc/man/bsdcpio.1 b/archivers/libarchive/files/doc/man/bsdcpio.1
index 9e7d8154f0e..061133fc5d9 100644
--- a/archivers/libarchive/files/doc/man/bsdcpio.1
+++ b/archivers/libarchive/files/doc/man/bsdcpio.1
@@ -196,6 +196,12 @@ Compress the archive with lz4-compatible compression before writing it.
In input mode, this option is ignored; lz4 compression is recognized
automatically on input.
.TP
+\fB\-Fl\fP zstd
+(o mode only)
+Compress the archive with zstd-compatible compression before writing it.
+In input mode, this option is ignored; zstd compression is recognized
+automatically on input.
+.TP
\fB\-Fl\fP lzma
(o mode only)
Compress the file with lzma-compatible compression before writing it.
diff --git a/archivers/libarchive/files/doc/man/bsdtar.1 b/archivers/libarchive/files/doc/man/bsdtar.1
index 46ebe42e2a6..d4d535d560c 100644
--- a/archivers/libarchive/files/doc/man/bsdtar.1
+++ b/archivers/libarchive/files/doc/man/bsdtar.1
@@ -1,4 +1,4 @@
-.TH TAR 1 "February 25, 2017" ""
+.TH TAR 1 "October 1, 2017" ""
.SH NAME
.ad l
\fB\%tar\fP
@@ -326,20 +326,19 @@ Sq foo.
Compress the resulting archive with
\fBxz\fP(1).
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
\fB\%tar\fP
-implementations, this implementation recognizes XZ compression
-automatically when reading archives.
+implementation recognizes XZ compression automatically when reading archives.
.TP
\fB\-j\fP, \fB\-Fl\fP bzip, \fB\-Fl\fP bzip2, \fB\-Fl\fP bunzip2
(c mode only)
Compress the resulting archive with
\fBbzip2\fP(1).
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
\fB\%tar\fP
-implementations, this implementation recognizes bzip2 compression
-automatically when reading archives.
+implementation recognizes bzip2 compression automatically when reading
+archives.
.TP
\fB\-k\fP, \fB\-Fl\fP keep-old-files
(x mode only)
@@ -367,28 +366,45 @@ Issue a warning message unless all links to each file are archived.
Compress the resulting archive with
\fBlrzip\fP(1).
In extract or list modes, this option is ignored.
+Note that this
+\fB\%tar\fP
+implementation recognizes lrzip compression automatically when reading
+archives.
.TP
\fB\-Fl\fP lz4
(c mode only)
Compress the archive with lz4-compatible compression before writing it.
-In input mode, this option is ignored; lz4 compression is recognized
-automatically on input.
+In extract or list modes, this option is ignored.
+Note that this
+\fB\%tar\fP
+implementation recognizes lz4 compression automatically when reading archives.
+.TP
+\fB\-Fl\fP zstd
+(c mode only)
+Compress the archive with zstd-compatible compression before writing it.
+In extract or list modes, this option is ignored.
+Note that this
+\fB\%tar\fP
+implementation recognizes zstd compression automatically when reading archives.
.TP
\fB\-Fl\fP lzma
(c mode only) Compress the resulting archive with the original LZMA algorithm.
+In extract or list modes, this option is ignored.
Use of this option is discouraged and new archives should be created with
\fB\-Fl\fP xz
instead.
-Note that, unlike other
+Note that this
\fB\%tar\fP
-implementations, this implementation recognizes LZMA compression
-automatically when reading archives.
+implementation recognizes LZMA compression automatically when reading archives.
.TP
\fB\-Fl\fP lzop
(c mode only)
Compress the resulting archive with
\fBlzop\fP(1).
In extract or list modes, this option is ignored.
+Note that this
+\fB\%tar\fP
+implementation recognizes LZO compression automatically when reading archives.
.TP
\fB\-m\fP, \fB\-Fl\fP modification-time
(x mode only)
@@ -653,6 +669,9 @@ A decimal integer from 4 to 7 specifying the lz4 compression block size
Use the previous block of the block being compressed for
a compression dictionary to improve compression ratio.
.TP
+\fBzstd:compression-level\fP
+A decimal integer from 1 to 22 specifying the zstd compression level.
+.TP
\fBlzop:compression-level\fP
A decimal integer from 1 to 9 specifying the lzop compression level.
.TP
@@ -932,30 +951,30 @@ is run in x mode as root.
Compress the resulting archive with
\fBbzip2\fP(1).
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
\fB\%tar\fP
-implementations, this implementation recognizes bzip2 compression
-automatically when reading archives.
+implementation recognizes bzip2 compression automatically when reading
+archives.
.TP
\fB\-Z\fP, \fB\-Fl\fP compress, \fB\-Fl\fP uncompress
(c mode only)
Compress the resulting archive with
\fBcompress\fP(1).
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
\fB\%tar\fP
-implementations, this implementation recognizes compress compression
-automatically when reading archives.
+implementation recognizes compress compression automatically when reading
+archives.
.TP
\fB\-z\fP, \fB\-Fl\fP gunzip, \fB\-Fl\fP gzip
(c mode only)
Compress the resulting archive with
\fBgzip\fP(1).
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
\fB\%tar\fP
-implementations, this implementation recognizes gzip compression
-automatically when reading archives.
+implementation recognizes gzip compression automatically when reading
+archives.
.RE
.SH ENVIRONMENT
.ad l
diff --git a/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf
index 3c2a21f3b29..4f81ea37534 100644
--- a/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf
index a13889d951b..24ac06e9c76 100644
--- a/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf
index 54000839774..a2afe0d8b7b 100644
--- a/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf
index 65b396645e6..a3c35dbbb1e 100644
--- a/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf
index 920105bb9a7..a3bb2388dc1 100644
--- a/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf
index b886f9ce8d1..0035bf1ffcf 100644
--- a/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf
index 7c96650939e..f71df0c2ab7 100644
--- a/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read.3.pdf
index 47e175f5ada..b40adb59c8d 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_add_passphrase.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_add_passphrase.3.pdf
index 566e1352c42..249b2c8d255 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_add_passphrase.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_add_passphrase.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf
index 032adc289f0..a2b37d2ba8d 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf
index 8984373cf8c..60786ba2461 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf
index 6c8e0e09e51..dd3626f9047 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf
index be5daf67838..1f1a7e3245b 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf
index f5fa6a2fe20..988beba48a9 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf
index 9ad23301f4a..3794c9357c5 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf
index de829ee8e22..35e81c21a5f 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf
index 144103d9df8..aac4c87fd0a 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf
index a96e278630a..47fb20c12fe 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf
index 6685010c46c..0268c52fc4e 100644
--- a/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_util.3.pdf b/archivers/libarchive/files/doc/pdf/archive_util.3.pdf
index a05f69b0f08..ff9dc6e40d1 100644
--- a/archivers/libarchive/files/doc/pdf/archive_util.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_util.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write.3.pdf
index 22e9c173e24..c3981176311 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf
index 52f369d20ab..66b82100356 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf
index 1c700296d6f..0874872680d 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf
index 6250444551c..5ebca78a313 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf
index db48f2e2ef4..66cbb133b70 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf
index 45754911523..fc488d0f79c 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf
index e5affd6126b..6830c579757 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf
index f1b3ec4827c..81a227f941c 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf
index 3e1cecdfa7f..9508a9a983b 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf
index b77f9d6bb47..9c7eadf2df3 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf
index 2b40a0a34d9..e34be0d03c3 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf
index 1808d7033d0..8847912410d 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/archive_write_set_passphrase.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_set_passphrase.3.pdf
index 8aae5a7b5a6..a4427d5f0d4 100644
--- a/archivers/libarchive/files/doc/pdf/archive_write_set_passphrase.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/archive_write_set_passphrase.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf b/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf
index 353de24aa22..4a7eb427fbd 100644
--- a/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf
+++ b/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf b/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf
index 4422988748b..c7ea8768eb6 100644
--- a/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf
+++ b/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/cpio.5.pdf b/archivers/libarchive/files/doc/pdf/cpio.5.pdf
index f35600de14f..6356b00fdee 100644
--- a/archivers/libarchive/files/doc/pdf/cpio.5.pdf
+++ b/archivers/libarchive/files/doc/pdf/cpio.5.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf b/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf
index 06fb38caec0..976bb6872d7 100644
--- a/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf
+++ b/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/libarchive.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive.3.pdf
index d91e4ec9ff0..513a97e68d8 100644
--- a/archivers/libarchive/files/doc/pdf/libarchive.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/libarchive.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf
index a8698caacc8..15c9f3cdf17 100644
--- a/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf
index 3aff2463924..c2ffd32d463 100644
--- a/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf
+++ b/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/mtree.5.pdf b/archivers/libarchive/files/doc/pdf/mtree.5.pdf
index 07b3d080ce9..327be0e047e 100644
--- a/archivers/libarchive/files/doc/pdf/mtree.5.pdf
+++ b/archivers/libarchive/files/doc/pdf/mtree.5.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/pdf/tar.5.pdf b/archivers/libarchive/files/doc/pdf/tar.5.pdf
index 1e1975d5fbb..fcb8e47552b 100644
--- a/archivers/libarchive/files/doc/pdf/tar.5.pdf
+++ b/archivers/libarchive/files/doc/pdf/tar.5.pdf
Binary files differ
diff --git a/archivers/libarchive/files/doc/text/archive_read_filter.3.txt b/archivers/libarchive/files/doc/text/archive_read_filter.3.txt
index 3af7cdf6cc3..8aee520f267 100644
--- a/archivers/libarchive/files/doc/text/archive_read_filter.3.txt
+++ b/archivers/libarchive/files/doc/text/archive_read_filter.3.txt
@@ -6,7 +6,7 @@ NAME
archive_read_support_filter_lz4, archive_read_support_filter_lzma,
archive_read_support_filter_none, archive_read_support_filter_rpm,
archive_read_support_filter_uu, archive_read_support_filter_xz,
- archive_read_support_filter_program,
+ archive_read_support_filter_zstd, archive_read_support_filter_program,
archive_read_support_filter_program_signature — functions for reading
streaming archives
@@ -56,6 +56,9 @@ SYNOPSIS
archive_read_support_filter_xz(struct archive *);
int
+ archive_read_support_filter_zstd(struct archive *);
+
+ int
archive_read_support_filter_program(struct archive *, const char *cmd);
int
@@ -74,7 +77,8 @@ DESCRIPTION
archive_read_support_filter_none(),
archive_read_support_filter_rpm(),
archive_read_support_filter_uu(),
- archive_read_support_filter_xz()
+ archive_read_support_filter_xz(),
+ archive_read_support_filter_zstd(),
Enables auto-detection code and decompression support for the
specified compression. These functions may fall back on external
programs if an appropriate library was not available at build
diff --git a/archivers/libarchive/files/doc/text/archive_write.3.txt b/archivers/libarchive/files/doc/text/archive_write.3.txt
index 7f779c81d11..6a097658fdc 100644
--- a/archivers/libarchive/files/doc/text/archive_write.3.txt
+++ b/archivers/libarchive/files/doc/text/archive_write.3.txt
@@ -31,7 +31,7 @@ DESCRIPTION
functions to enable the corresponding compression and format support.
Set options
- See archive_read_set_options(3).
+ See archive_write_set_options(3).
Open archive
See archive_write_open(3).
diff --git a/archivers/libarchive/files/doc/text/archive_write_filter.3.txt b/archivers/libarchive/files/doc/text/archive_write_filter.3.txt
index f6e8be6adb0..03006fa6abb 100644
--- a/archivers/libarchive/files/doc/text/archive_write_filter.3.txt
+++ b/archivers/libarchive/files/doc/text/archive_write_filter.3.txt
@@ -8,7 +8,8 @@ NAME
archive_write_add_filter_lzip, archive_write_add_filter_lzma,
archive_write_add_filter_lzop, archive_write_add_filter_none,
archive_write_add_filter_program, archive_write_add_filter_uuencode,
- archive_write_add_filter_xz — functions enabling output filters
+ archive_write_add_filter_xz, archive_write_add_filter_zstd, — functions
+ enabling output filters
LIBRARY
Streaming Archive Library (libarchive, -larchive)
@@ -58,6 +59,9 @@ SYNOPSIS
int
archive_write_add_filter_xz(struct archive *);
+ int
+ archive_write_add_filter_zstd(struct archive *);
+
DESCRIPTION
archive_write_add_filter_bzip2(), archive_write_add_filter_compress(),
archive_write_add_filter_grzip(),
@@ -65,6 +69,7 @@ DESCRIPTION
archive_write_add_filter_lrzip(), archive_write_add_filter_lz4(),
archive_write_add_filter_lzip(), archive_write_add_filter_lzma(),
archive_write_add_filter_lzop(), archive_write_add_filter_xz(),
+ archive_write_add_filter_zstd(),
The resulting archive will be compressed as specified. Note that
the compressed output is always properly blocked.
diff --git a/archivers/libarchive/files/doc/text/bsdcpio.1.txt b/archivers/libarchive/files/doc/text/bsdcpio.1.txt
index 15920c0547d..34e5c8ca2cd 100644
--- a/archivers/libarchive/files/doc/text/bsdcpio.1.txt
+++ b/archivers/libarchive/files/doc/text/bsdcpio.1.txt
@@ -113,6 +113,10 @@ OPTIONS
sion before writing it. In input mode, this option is ignored;
lz4 compression is recognized automatically on input.
+ --zstd (o mode only) Compress the archive with zstd-compatible compres‐
+ sion before writing it. In input mode, this option is ignored;
+ zstd compression is recognized automatically on input.
+
--lzma (o mode only) Compress the file with lzma-compatible compression
before writing it. In input mode, this option is ignored; lzma
compression is recognized automatically on input.
diff --git a/archivers/libarchive/files/doc/text/bsdtar.1.txt b/archivers/libarchive/files/doc/text/bsdtar.1.txt
index f2ff1f2c1ea..69e12c41080 100644
--- a/archivers/libarchive/files/doc/text/bsdtar.1.txt
+++ b/archivers/libarchive/files/doc/text/bsdtar.1.txt
@@ -184,15 +184,15 @@ OPTIONS
-J, --xz
(c mode only) Compress the resulting archive with xz(1). In
- extract or list modes, this option is ignored. Note that, unlike
- other tar implementations, this implementation recognizes XZ com‐
- pression automatically when reading archives.
+ extract or list modes, this option is ignored. Note that this
+ tar implementation recognizes XZ compression automatically when
+ reading archives.
-j, --bzip, --bzip2, --bunzip2
(c mode only) Compress the resulting archive with bzip2(1). In
- extract or list modes, this option is ignored. Note that, unlike
- other tar implementations, this implementation recognizes bzip2
- compression automatically when reading archives.
+ extract or list modes, this option is ignored. Note that this
+ tar implementation recognizes bzip2 compression automatically
+ when reading archives.
-k, --keep-old-files
(x mode only) Do not overwrite existing files. In particular, if
@@ -214,20 +214,31 @@ OPTIONS
--lrzip
(c mode only) Compress the resulting archive with lrzip(1). In
- extract or list modes, this option is ignored.
+ extract or list modes, this option is ignored. Note that this
+ tar implementation recognizes lrzip compression automatically
+ when reading archives.
--lz4 (c mode only) Compress the archive with lz4-compatible compres‐
- sion before writing it. In input mode, this option is ignored;
- lz4 compression is recognized automatically on input.
+ sion before writing it. In extract or list modes, this option is
+ ignored. Note that this tar implementation recognizes lz4 com‐
+ pression automatically when reading archives.
+
+ --zstd (c mode only) Compress the archive with zstd-compatible compres‐
+ sion before writing it. In extract or list modes, this option is
+ ignored. Note that this tar implementation recognizes zstd com‐
+ pression automatically when reading archives.
--lzma (c mode only) Compress the resulting archive with the original
- LZMA algorithm. Use of this option is discouraged and new ar‐
- chives should be created with --xz instead. Note that, unlike
- other tar implementations, this implementation recognizes LZMA
- compression automatically when reading archives.
+ LZMA algorithm. In extract or list modes, this option is
+ ignored. Use of this option is discouraged and new archives
+ should be created with --xz instead. Note that this tar imple‐
+ mentation recognizes LZMA compression automatically when reading
+ archives.
--lzop (c mode only) Compress the resulting archive with lzop(1). In
- extract or list modes, this option is ignored.
+ extract or list modes, this option is ignored. Note that this
+ tar implementation recognizes LZO compression automatically when
+ reading archives.
-m, --modification-time
(x mode only) Do not extract modification time. By default, the
@@ -400,6 +411,9 @@ OPTIONS
lz4:block-dependence
Use the previous block of the block being compressed for
a compression dictionary to improve compression ratio.
+ zstd:compression-level
+ A decimal integer from 1 to 22 specifying the zstd com‐
+ pression level.
lzop:compression-level
A decimal integer from 1 to 9 specifying the lzop com‐
pression level.
@@ -575,21 +589,21 @@ OPTIONS
r, and u modes or if tar is run in x mode as root.
-y (c mode only) Compress the resulting archive with bzip2(1). In
- extract or list modes, this option is ignored. Note that, unlike
- other tar implementations, this implementation recognizes bzip2
- compression automatically when reading archives.
+ extract or list modes, this option is ignored. Note that this
+ tar implementation recognizes bzip2 compression automatically
+ when reading archives.
-Z, --compress, --uncompress
(c mode only) Compress the resulting archive with compress(1).
- In extract or list modes, this option is ignored. Note that,
- unlike other tar implementations, this implementation recognizes
- compress compression automatically when reading archives.
+ In extract or list modes, this option is ignored. Note that this
+ tar implementation recognizes compress compression automatically
+ when reading archives.
-z, --gunzip, --gzip
(c mode only) Compress the resulting archive with gzip(1). In
- extract or list modes, this option is ignored. Note that, unlike
- other tar implementations, this implementation recognizes gzip
- compression automatically when reading archives.
+ extract or list modes, this option is ignored. Note that this
+ tar implementation recognizes gzip compression automatically when
+ reading archives.
ENVIRONMENT
The following environment variables affect the execution of tar:
@@ -798,4 +812,4 @@ BUGS
(This is a consequence of the incompatible ways that different archive
formats store hardlink information.)
-BSD February 25, 2017 BSD
+BSD October 1, 2017 BSD
diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki
index f0e87b6bbe9..0a8d8287943 100644
--- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki
+++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki
@@ -10,6 +10,7 @@ ARCHIVE_READ_FILTER(3) manual page
'''archive_read_support_filter_rpm''',
'''archive_read_support_filter_uu''',
'''archive_read_support_filter_xz''',
+'''archive_read_support_filter_zstd''',
'''archive_read_support_filter_program''',
'''archive_read_support_filter_program_signature'''
- functions for reading streaming archives
@@ -72,6 +73,10 @@ Streaming Archive Library (libarchive, -larchive)
<br>
''int''
<br>
+'''archive_read_support_filter_zstd'''(''struct archive *'');
+<br>
+''int''
+<br>
'''archive_read_support_filter_program'''(''struct archive *'', ''const char *cmd'');
<br>
''int''
@@ -91,7 +96,8 @@ Streaming Archive Library (libarchive, -larchive)
'''archive_read_support_filter_none'''(),
'''archive_read_support_filter_rpm'''(),
'''archive_read_support_filter_uu'''(),
-'''archive_read_support_filter_xz'''()
+'''archive_read_support_filter_xz'''(),
+'''archive_read_support_filter_zstd'''(),
</dt> <dd>
Enables auto-detection code and decompression support for the
specified compression.
diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki
index 9f7218111b4..892e74ea668 100644
--- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki
+++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki
@@ -40,7 +40,7 @@ functions to enable the corresponding compression and format
support.
=== Set options===
See
-[[ManPagerchiveeadetptions3]].
+[[ManPagerchiveriteetptions3]].
=== Open archive===
See
[[ManPagerchiveritepen3]].
diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki
index 3ec3e46e017..84a427bcc4d 100644
--- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki
+++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki
@@ -14,7 +14,8 @@ ARCHIVE_WRITE_FILTER(3) manual page
'''archive_write_add_filter_none''',
'''archive_write_add_filter_program''',
'''archive_write_add_filter_uuencode''',
-'''archive_write_add_filter_xz'''
+'''archive_write_add_filter_xz''',
+'''archive_write_add_filter_zstd''',
- functions enabling output filters
== LIBRARY ==
Streaming Archive Library (libarchive, -larchive)
@@ -76,6 +77,10 @@ Streaming Archive Library (libarchive, -larchive)
''int''
<br>
'''archive_write_add_filter_xz'''(''struct archive *'');
+<br>
+''int''
+<br>
+'''archive_write_add_filter_zstd'''(''struct archive *'');
== DESCRIPTION ==
<dl>
<dt>
@@ -89,6 +94,7 @@ Streaming Archive Library (libarchive, -larchive)
'''archive_write_add_filter_lzma'''(),
'''archive_write_add_filter_lzop'''(),
'''archive_write_add_filter_xz'''(),
+'''archive_write_add_filter_zstd'''(),
</dt> <dd>
The resulting archive will be compressed as specified.
Note that the compressed output is always properly blocked.
diff --git a/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki b/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki
index d186bc55fe3..087d46e5366 100644
--- a/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki
+++ b/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki
@@ -162,6 +162,11 @@ In input mode, this option is ignored.
Compress the archive with lz4-compatible compression before writing it.
In input mode, this option is ignored; lz4 compression is recognized
automatically on input.
+</dd><dt>--zstd</dt><dd>
+(o mode only)
+Compress the archive with zstd-compatible compression before writing it.
+In input mode, this option is ignored; zstd compression is recognized
+automatically on input.
</dd><dt>--lzma</dt><dd>
(o mode only)
Compress the file with lzma-compatible compression before writing it.
diff --git a/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki b/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki
index 7dda43daa10..45eb3bc899a 100644
--- a/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki
+++ b/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki
@@ -295,19 +295,18 @@ Sq foo.
Compress the resulting archive with
[[xz(1)|http://www.freebsd.org/cgi/man.cgi?query=xz&sektion=1]].
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
'''tar'''
-implementations, this implementation recognizes XZ compression
-automatically when reading archives.
+implementation recognizes XZ compression automatically when reading archives.
</dd><dt>-j, --bzip, --bzip2, --bunzip2</dt><dd>
(c mode only)
Compress the resulting archive with
[[bzip2(1)|http://www.freebsd.org/cgi/man.cgi?query=bzip2&sektion=1]].
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
'''tar'''
-implementations, this implementation recognizes bzip2 compression
-automatically when reading archives.
+implementation recognizes bzip2 compression automatically when reading
+archives.
</dd><dt>-k, --keep-old-files</dt><dd>
(x mode only)
Do not overwrite existing files.
@@ -330,25 +329,41 @@ Issue a warning message unless all links to each file are archived.
Compress the resulting archive with
[[lrzip(1)|http://www.freebsd.org/cgi/man.cgi?query=lrzip&sektion=1]].
In extract or list modes, this option is ignored.
+Note that this
+'''tar'''
+implementation recognizes lrzip compression automatically when reading
+archives.
</dd><dt>--lz4</dt><dd>
(c mode only)
Compress the archive with lz4-compatible compression before writing it.
-In input mode, this option is ignored; lz4 compression is recognized
-automatically on input.
+In extract or list modes, this option is ignored.
+Note that this
+'''tar'''
+implementation recognizes lz4 compression automatically when reading archives.
+</dd><dt>--zstd</dt><dd>
+(c mode only)
+Compress the archive with zstd-compatible compression before writing it.
+In extract or list modes, this option is ignored.
+Note that this
+'''tar'''
+implementation recognizes zstd compression automatically when reading archives.
</dd><dt>--lzma</dt><dd>
(c mode only) Compress the resulting archive with the original LZMA algorithm.
+In extract or list modes, this option is ignored.
Use of this option is discouraged and new archives should be created with
--xz
instead.
-Note that, unlike other
+Note that this
'''tar'''
-implementations, this implementation recognizes LZMA compression
-automatically when reading archives.
+implementation recognizes LZMA compression automatically when reading archives.
</dd><dt>--lzop</dt><dd>
(c mode only)
Compress the resulting archive with
[[lzop(1)|http://www.freebsd.org/cgi/man.cgi?query=lzop&sektion=1]].
In extract or list modes, this option is ignored.
+Note that this
+'''tar'''
+implementation recognizes LZO compression automatically when reading archives.
</dd><dt>-m, --modification-time</dt><dd>
(x mode only)
Do not extract modification time.
@@ -570,6 +585,8 @@ A decimal integer from 4 to 7 specifying the lz4 compression block size
</dd><dt>'''lz4:block-dependence'''</dt><dd>
Use the previous block of the block being compressed for
a compression dictionary to improve compression ratio.
+</dd><dt>'''zstd:compression-level'''</dt><dd>
+A decimal integer from 1 to 22 specifying the zstd compression level.
</dd><dt>'''lzop:compression-level'''</dt><dd>
A decimal integer from 1 to 9 specifying the lzop compression level.
</dd><dt>'''xz:compression-level'''</dt><dd>
@@ -819,28 +836,28 @@ is run in x mode as root.
Compress the resulting archive with
[[bzip2(1)|http://www.freebsd.org/cgi/man.cgi?query=bzip2&sektion=1]].
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
'''tar'''
-implementations, this implementation recognizes bzip2 compression
-automatically when reading archives.
+implementation recognizes bzip2 compression automatically when reading
+archives.
</dd><dt>-Z, --compress, --uncompress</dt><dd>
(c mode only)
Compress the resulting archive with
[[compress(1)|http://www.freebsd.org/cgi/man.cgi?query=compress&sektion=1]].
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
'''tar'''
-implementations, this implementation recognizes compress compression
-automatically when reading archives.
+implementation recognizes compress compression automatically when reading
+archives.
</dd><dt>-z, --gunzip, --gzip</dt><dd>
(c mode only)
Compress the resulting archive with
[[gzip(1)|http://www.freebsd.org/cgi/man.cgi?query=gzip&sektion=1]].
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
'''tar'''
-implementations, this implementation recognizes gzip compression
-automatically when reading archives.
+implementation recognizes gzip compression automatically when reading
+archives.
</dd></dl>
== ENVIRONMENT ==
The following environment variables affect the execution of
diff --git a/archivers/libarchive/files/libarchive/CMakeLists.txt b/archivers/libarchive/files/libarchive/CMakeLists.txt
index 5e958da1c53..82dd56c9d7d 100644
--- a/archivers/libarchive/files/libarchive/CMakeLists.txt
+++ b/archivers/libarchive/files/libarchive/CMakeLists.txt
@@ -88,6 +88,7 @@ SET(libarchive_SOURCES
archive_read_support_filter_rpm.c
archive_read_support_filter_uu.c
archive_read_support_filter_xz.c
+ archive_read_support_filter_zstd.c
archive_read_support_format_7zip.c
archive_read_support_format_all.c
archive_read_support_format_ar.c
@@ -134,6 +135,7 @@ SET(libarchive_SOURCES
archive_write_add_filter_program.c
archive_write_add_filter_uuencode.c
archive_write_add_filter_xz.c
+ archive_write_add_filter_zstd.c
archive_write_set_format.c
archive_write_set_format_7zip.c
archive_write_set_format_ar.c
diff --git a/archivers/libarchive/files/libarchive/archive.h b/archivers/libarchive/files/libarchive/archive.h
index 316a68a6336..cdbbeddf1d3 100644
--- a/archivers/libarchive/files/libarchive/archive.h
+++ b/archivers/libarchive/files/libarchive/archive.h
@@ -36,7 +36,7 @@
* assert that ARCHIVE_VERSION_NUMBER >= 2012108.
*/
/* Note: Compiler will complain if this does not match archive_entry.h! */
-#define ARCHIVE_VERSION_NUMBER 3003002
+#define ARCHIVE_VERSION_NUMBER 3003003
#include <sys/stat.h>
#include <stddef.h> /* for wchar_t */
@@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void);
/*
* Textual name/version of the library, useful for version displays.
*/
-#define ARCHIVE_VERSION_ONLY_STRING "3.3.2"
+#define ARCHIVE_VERSION_ONLY_STRING "3.3.3"
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
__LA_DECL const char * archive_version_string(void);
@@ -177,6 +177,7 @@ __LA_DECL const char * archive_zlib_version(void);
__LA_DECL const char * archive_liblzma_version(void);
__LA_DECL const char * archive_bzlib_version(void);
__LA_DECL const char * archive_liblz4_version(void);
+__LA_DECL const char * archive_libzstd_version(void);
/* Declare our basic types. */
struct archive;
@@ -276,6 +277,7 @@ typedef const char *archive_passphrase_callback(struct archive *,
#define ARCHIVE_FILTER_LZOP 11
#define ARCHIVE_FILTER_GRZIP 12
#define ARCHIVE_FILTER_LZ4 13
+#define ARCHIVE_FILTER_ZSTD 14
#if ARCHIVE_VERSION_NUMBER < 4000000
#define ARCHIVE_COMPRESSION_NONE ARCHIVE_FILTER_NONE
@@ -433,6 +435,7 @@ __LA_DECL int archive_read_support_filter_program_signature
__LA_DECL int archive_read_support_filter_rpm(struct archive *);
__LA_DECL int archive_read_support_filter_uu(struct archive *);
__LA_DECL int archive_read_support_filter_xz(struct archive *);
+__LA_DECL int archive_read_support_filter_zstd(struct archive *);
__LA_DECL int archive_read_support_format_7zip(struct archive *);
__LA_DECL int archive_read_support_format_all(struct archive *);
@@ -778,6 +781,7 @@ __LA_DECL int archive_write_add_filter_program(struct archive *,
const char *cmd);
__LA_DECL int archive_write_add_filter_uuencode(struct archive *);
__LA_DECL int archive_write_add_filter_xz(struct archive *);
+__LA_DECL int archive_write_add_filter_zstd(struct archive *);
/* A convenience function to set the format based on the code or name. */
diff --git a/archivers/libarchive/files/libarchive/archive_acl.c b/archivers/libarchive/files/libarchive/archive_acl.c
index b8b6b636453..4736531afa1 100644
--- a/archivers/libarchive/files/libarchive/archive_acl.c
+++ b/archivers/libarchive/files/libarchive/archive_acl.c
@@ -1159,6 +1159,7 @@ archive_acl_from_text_w(struct archive_acl *acl, const wchar_t *text,
switch (want_type) {
case ARCHIVE_ENTRY_ACL_TYPE_POSIX1E:
want_type = ARCHIVE_ENTRY_ACL_TYPE_ACCESS;
+ __LA_FALLTHROUGH;
case ARCHIVE_ENTRY_ACL_TYPE_ACCESS:
case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT:
numfields = 5;
@@ -1626,6 +1627,7 @@ archive_acl_from_text_l(struct archive_acl *acl, const char *text,
switch (want_type) {
case ARCHIVE_ENTRY_ACL_TYPE_POSIX1E:
want_type = ARCHIVE_ENTRY_ACL_TYPE_ACCESS;
+ __LA_FALLTHROUGH;
case ARCHIVE_ENTRY_ACL_TYPE_ACCESS:
case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT:
numfields = 5;
diff --git a/archivers/libarchive/files/libarchive/archive_cmdline.c b/archivers/libarchive/files/libarchive/archive_cmdline.c
index 7d3bac53bb5..5c519cd17f1 100644
--- a/archivers/libarchive/files/libarchive/archive_cmdline.c
+++ b/archivers/libarchive/files/libarchive/archive_cmdline.c
@@ -100,10 +100,10 @@ get_argument(struct archive_string *as, const char *p)
/*
* Set up command line arguments.
- * Returns ARChIVE_OK if everything okey.
- * Returns ARChIVE_FAILED if there is a lack of the `"' terminator or an
+ * Returns ARCHIVE_OK if everything okey.
+ * Returns ARCHIVE_FAILED if there is a lack of the `"' terminator or an
* empty command line.
- * Returns ARChIVE_FATAL if no memory.
+ * Returns ARCHIVE_FATAL if no memory.
*/
int
__archive_cmdline_parse(struct archive_cmdline *data, const char *cmd)
diff --git a/archivers/libarchive/files/libarchive/archive_cryptor.c b/archivers/libarchive/files/libarchive/archive_cryptor.c
index ced52fd7062..71967c9d46f 100644
--- a/archivers/libarchive/files/libarchive/archive_cryptor.c
+++ b/archivers/libarchive/files/libarchive/archive_cryptor.c
@@ -153,7 +153,7 @@ aes_ctr_encrypt_counter(archive_crypto_ctx *ctx)
CCCryptorStatus r;
r = CCCryptorReset(ref, NULL);
- if (r != kCCSuccess)
+ if (r != kCCSuccess && r != kCCUnimplemented)
return -1;
r = CCCryptorUpdate(ref, ctx->nonce, AES_BLOCK_SIZE, ctx->encr_buf,
AES_BLOCK_SIZE, NULL);
diff --git a/archivers/libarchive/files/libarchive/archive_cryptor_private.h b/archivers/libarchive/files/libarchive/archive_cryptor_private.h
index 0ca544b5797..b9759220df6 100644
--- a/archivers/libarchive/files/libarchive/archive_cryptor_private.h
+++ b/archivers/libarchive/files/libarchive/archive_cryptor_private.h
@@ -64,7 +64,7 @@ typedef struct {
} archive_crypto_ctx;
#elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H)
-#include <Bcrypt.h>
+#include <bcrypt.h>
/* Common in other bcrypt implementations, but missing from VS2008. */
#ifndef BCRYPT_SUCCESS
diff --git a/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c b/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c
index 07d08ff962f..aba41e5dabb 100644
--- a/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c
+++ b/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c
@@ -93,7 +93,9 @@ static const acl_perm_map_t acl_nfs4_flag_map[] = {
{ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY},
{ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS},
{ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS},
+#ifdef ACL_ENTRY_INHERITED
{ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}
+#endif
};
static const int acl_nfs4_flag_map_size =
diff --git a/archivers/libarchive/files/libarchive/archive_entry.c b/archivers/libarchive/files/libarchive/archive_entry.c
index 30fb4566eb9..f722bbe85c7 100644
--- a/archivers/libarchive/files/libarchive/archive_entry.c
+++ b/archivers/libarchive/files/libarchive/archive_entry.c
@@ -1491,7 +1491,7 @@ archive_entry_acl_next(struct archive_entry *entry, int want_type, int *type,
* the style of the generated ACL.
*/
wchar_t *
-archive_entry_acl_to_text_w(struct archive_entry *entry, ssize_t *len,
+archive_entry_acl_to_text_w(struct archive_entry *entry, la_ssize_t *len,
int flags)
{
return (archive_acl_to_text_w(&entry->acl, len, flags,
@@ -1499,7 +1499,7 @@ archive_entry_acl_to_text_w(struct archive_entry *entry, ssize_t *len,
}
char *
-archive_entry_acl_to_text(struct archive_entry *entry, ssize_t *len,
+archive_entry_acl_to_text(struct archive_entry *entry, la_ssize_t *len,
int flags)
{
return (archive_acl_to_text_l(&entry->acl, len, flags, NULL));
diff --git a/archivers/libarchive/files/libarchive/archive_entry.h b/archivers/libarchive/files/libarchive/archive_entry.h
index bcc2962b983..78a060c242d 100644
--- a/archivers/libarchive/files/libarchive/archive_entry.h
+++ b/archivers/libarchive/files/libarchive/archive_entry.h
@@ -30,7 +30,7 @@
#define ARCHIVE_ENTRY_H_INCLUDED
/* Note: Compiler will complain if this does not match archive.h! */
-#define ARCHIVE_VERSION_NUMBER 3003002
+#define ARCHIVE_VERSION_NUMBER 3003003
/*
* Note: archive_entry.h is for use outside of libarchive; the
@@ -42,6 +42,7 @@
#include <sys/types.h>
#include <stddef.h> /* for wchar_t */
+#include <stdint.h>
#include <time.h>
#if defined(_WIN32) && !defined(__CYGWIN__)
diff --git a/archivers/libarchive/files/libarchive/archive_match.c b/archivers/libarchive/files/libarchive/archive_match.c
index be72066eac6..f150e8224c1 100644
--- a/archivers/libarchive/files/libarchive/archive_match.c
+++ b/archivers/libarchive/files/libarchive/archive_match.c
@@ -1582,7 +1582,7 @@ time_excluded(struct archive_match *a, struct archive_entry *entry)
*/
int
-archive_match_include_uid(struct archive *_a, int64_t uid)
+archive_match_include_uid(struct archive *_a, la_int64_t uid)
{
struct archive_match *a;
@@ -1593,7 +1593,7 @@ archive_match_include_uid(struct archive *_a, int64_t uid)
}
int
-archive_match_include_gid(struct archive *_a, int64_t gid)
+archive_match_include_gid(struct archive *_a, la_int64_t gid)
{
struct archive_match *a;
diff --git a/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h b/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h
index 59f95b80af8..921249bb945 100644
--- a/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h
+++ b/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h
@@ -28,7 +28,8 @@
#include <openssl/hmac.h>
#include <openssl/opensslv.h>
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
+ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memset */
static inline HMAC_CTX *HMAC_CTX_new(void)
diff --git a/archivers/libarchive/files/libarchive/archive_pack_dev.c b/archivers/libarchive/files/libarchive/archive_pack_dev.c
index 9ff697abda6..fb2b251274d 100644
--- a/archivers/libarchive/files/libarchive/archive_pack_dev.c
+++ b/archivers/libarchive/files/libarchive/archive_pack_dev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: archive_pack_dev.c,v 1.1.1.2 2017/08/01 22:21:19 joerg Exp $ */
+/* $NetBSD: archive_pack_dev.c,v 1.1.1.3 2019/09/22 09:47:06 joerg Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#endif
#if !defined(lint)
-__RCSID("$NetBSD: archive_pack_dev.c,v 1.1.1.2 2017/08/01 22:21:19 joerg Exp $");
+__RCSID("$NetBSD: archive_pack_dev.c,v 1.1.1.3 2019/09/22 09:47:06 joerg Exp $");
#endif /* not lint */
#ifdef HAVE_LIMITS_H
@@ -57,6 +57,9 @@ __RCSID("$NetBSD: archive_pack_dev.c,v 1.1.1.2 2017/08/01 22:21:19 joerg Exp $")
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/archivers/libarchive/files/libarchive/archive_platform.h b/archivers/libarchive/files/libarchive/archive_platform.h
index 34be8edaa57..32b884c96ed 100644
--- a/archivers/libarchive/files/libarchive/archive_platform.h
+++ b/archivers/libarchive/files/libarchive/archive_platform.h
@@ -52,6 +52,17 @@
#error Oops: No config.h and no pre-built configuration in archive_platform.h.
#endif
+/* On macOS check for some symbols based on the deployment target version. */
+#if defined(__APPLE__)
+# undef HAVE_FUTIMENS
+# undef HAVE_UTIMENSAT
+# include <AvailabilityMacros.h>
+# if MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
+# define HAVE_FUTIMENS 1
+# define HAVE_UTIMENSAT 1
+# endif
+#endif
+
/* It should be possible to get rid of this by extending the feature-test
* macros to cover Windows API functions, probably along with non-trivial
* refactoring of code to find structures that sit more cleanly on top of
@@ -180,4 +191,10 @@
#define ARCHIVE_ERRNO_MISC (-1)
#endif
+#if defined(__GNUC__) && (__GNUC__ >= 7)
+#define __LA_FALLTHROUGH __attribute__((fallthrough))
+#else
+#define __LA_FALLTHROUGH
+#endif
+
#endif /* !ARCHIVE_PLATFORM_H_INCLUDED */
diff --git a/archivers/libarchive/files/libarchive/archive_ppmd7.c b/archivers/libarchive/files/libarchive/archive_ppmd7.c
index 1aed922db65..d0bacc68cd7 100644
--- a/archivers/libarchive/files/libarchive/archive_ppmd7.c
+++ b/archivers/libarchive/files/libarchive/archive_ppmd7.c
@@ -115,14 +115,14 @@ static void Ppmd7_Construct(CPpmd7 *p)
memset(p->HB2Flag + 0x40, 8, 0x100 - 0x40);
}
-static void Ppmd7_Free(CPpmd7 *p, ISzAlloc *alloc)
+static void Ppmd7_Free(CPpmd7 *p)
{
- alloc->Free(alloc, p->Base);
+ free(p->Base);
p->Size = 0;
p->Base = 0;
}
-static Bool Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAlloc *alloc)
+static Bool Ppmd7_Alloc(CPpmd7 *p, UInt32 size)
{
if (p->Base == 0 || p->Size != size)
{
@@ -131,14 +131,14 @@ static Bool Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAlloc *alloc)
if (size < UNIT_SIZE) {
return False;
}
- Ppmd7_Free(p, alloc);
+ Ppmd7_Free(p);
p->AlignOffset =
#ifdef PPMD_32BIT
(4 - size) & 3;
#else
4 - (size & 3);
#endif
- if ((p->Base = (Byte *)alloc->Alloc(alloc, p->AlignOffset + size
+ if ((p->Base = (Byte *)malloc(p->AlignOffset + size
#ifndef PPMD_32BIT
+ UNIT_SIZE
#endif
diff --git a/archivers/libarchive/files/libarchive/archive_ppmd7_private.h b/archivers/libarchive/files/libarchive/archive_ppmd7_private.h
index 06c99e828ab..577d6fb43d0 100644
--- a/archivers/libarchive/files/libarchive/archive_ppmd7_private.h
+++ b/archivers/libarchive/files/libarchive/archive_ppmd7_private.h
@@ -95,8 +95,8 @@ typedef struct
{
/* Base Functions */
void (*Ppmd7_Construct)(CPpmd7 *p);
- Bool (*Ppmd7_Alloc)(CPpmd7 *p, UInt32 size, ISzAlloc *alloc);
- void (*Ppmd7_Free)(CPpmd7 *p, ISzAlloc *alloc);
+ Bool (*Ppmd7_Alloc)(CPpmd7 *p, UInt32 size);
+ void (*Ppmd7_Free)(CPpmd7 *p);
void (*Ppmd7_Init)(CPpmd7 *p, unsigned maxOrder);
#define Ppmd7_WasAllocated(p) ((p)->Base != NULL)
diff --git a/archivers/libarchive/files/libarchive/archive_ppmd_private.h b/archivers/libarchive/files/libarchive/archive_ppmd_private.h
index e78bde59405..a83b8514d87 100644
--- a/archivers/libarchive/files/libarchive/archive_ppmd_private.h
+++ b/archivers/libarchive/files/libarchive/archive_ppmd_private.h
@@ -69,13 +69,6 @@ typedef struct
void (*Write)(void *p, Byte b);
} IByteOut;
-
-typedef struct
-{
- void *(*Alloc)(void *p, size_t size);
- void (*Free)(void *p, void *address); /* address can be 0 */
-} ISzAlloc;
-
/*** End defined in Types.h ***/
/*** Begin defined in CpuArch.h ***/
diff --git a/archivers/libarchive/files/libarchive/archive_read.c b/archivers/libarchive/files/libarchive/archive_read.c
index a642a336def..0e56e76e731 100644
--- a/archivers/libarchive/files/libarchive/archive_read.c
+++ b/archivers/libarchive/files/libarchive/archive_read.c
@@ -120,7 +120,8 @@ archive_read_new(void)
* Record the do-not-extract-to file. This belongs in archive_read_extract.c.
*/
void
-archive_read_extract_set_skip_file(struct archive *_a, int64_t d, int64_t i)
+archive_read_extract_set_skip_file(struct archive *_a, la_int64_t d,
+ la_int64_t i)
{
struct archive_read *a = (struct archive_read *)_a;
@@ -747,7 +748,7 @@ choose_format(struct archive_read *a)
* Return the file offset (within the uncompressed data stream) where
* the last header started.
*/
-int64_t
+la_int64_t
archive_read_header_position(struct archive *_a)
{
struct archive_read *a = (struct archive_read *)_a;
@@ -820,7 +821,7 @@ archive_read_format_capabilities(struct archive *_a)
* DO NOT intermingle calls to this function and archive_read_data_block
* to read a single entry body.
*/
-ssize_t
+la_ssize_t
archive_read_data(struct archive *_a, void *buff, size_t s)
{
struct archive *a = (struct archive *)_a;
@@ -943,7 +944,7 @@ archive_read_data_skip(struct archive *_a)
return (r);
}
-int64_t
+la_int64_t
archive_seek_data(struct archive *_a, int64_t offset, int whence)
{
struct archive_read *a = (struct archive_read *)_a;
@@ -1626,7 +1627,8 @@ __archive_read_filter_seek(struct archive_read_filter *filter, int64_t offset,
switch (whence) {
case SEEK_CUR:
/* Adjust the offset and use SEEK_SET instead */
- offset += filter->position;
+ offset += filter->position;
+ __LA_FALLTHROUGH;
case SEEK_SET:
cursor = 0;
while (1)
diff --git a/archivers/libarchive/files/libarchive/archive_read_append_filter.c b/archivers/libarchive/files/libarchive/archive_read_append_filter.c
index 5e4d1630798..da7c55b9b08 100644
--- a/archivers/libarchive/files/libarchive/archive_read_append_filter.c
+++ b/archivers/libarchive/files/libarchive/archive_read_append_filter.c
@@ -89,6 +89,10 @@ archive_read_append_filter(struct archive *_a, int code)
strcpy(str, "lz4");
r1 = archive_read_support_filter_lz4(_a);
break;
+ case ARCHIVE_FILTER_ZSTD:
+ strcpy(str, "zstd");
+ r1 = archive_read_support_filter_zstd(_a);
+ break;
case ARCHIVE_FILTER_LZIP:
strcpy(str, "lzip");
r1 = archive_read_support_filter_lzip(_a);
diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c b/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c
index 548ba89ef3d..1786cff3845 100644
--- a/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c
+++ b/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c
@@ -127,7 +127,7 @@ archive_read_disk_entry_setup_acls(struct archive_read_disk *a,
/*
* Enter working directory and return working pathname of archive_entry.
* If a pointer to an integer is provided and its value is below zero
- * open a file descriptor on this pahtname.
+ * open a file descriptor on this pathname.
*/
const char *
archive_read_disk_entry_setup_path(struct archive_read_disk *a,
diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_posix.c b/archivers/libarchive/files/libarchive/archive_read_disk_posix.c
index 6961ae6a42f..cdf7541238c 100644
--- a/archivers/libarchive/files/libarchive/archive_read_disk_posix.c
+++ b/archivers/libarchive/files/libarchive/archive_read_disk_posix.c
@@ -387,7 +387,7 @@ archive_read_disk_vtable(void)
}
const char *
-archive_read_disk_gname(struct archive *_a, int64_t gid)
+archive_read_disk_gname(struct archive *_a, la_int64_t gid)
{
struct archive_read_disk *a = (struct archive_read_disk *)_a;
if (ARCHIVE_OK != __archive_check_magic(_a, ARCHIVE_READ_DISK_MAGIC,
@@ -399,7 +399,7 @@ archive_read_disk_gname(struct archive *_a, int64_t gid)
}
const char *
-archive_read_disk_uname(struct archive *_a, int64_t uid)
+archive_read_disk_uname(struct archive *_a, la_int64_t uid)
{
struct archive_read_disk *a = (struct archive_read_disk *)_a;
if (ARCHIVE_OK != __archive_check_magic(_a, ARCHIVE_READ_DISK_MAGIC,
@@ -413,7 +413,7 @@ archive_read_disk_uname(struct archive *_a, int64_t uid)
int
archive_read_disk_set_gname_lookup(struct archive *_a,
void *private_data,
- const char * (*lookup_gname)(void *private, int64_t gid),
+ const char * (*lookup_gname)(void *private, la_int64_t gid),
void (*cleanup_gname)(void *private))
{
struct archive_read_disk *a = (struct archive_read_disk *)_a;
@@ -432,7 +432,7 @@ archive_read_disk_set_gname_lookup(struct archive *_a,
int
archive_read_disk_set_uname_lookup(struct archive *_a,
void *private_data,
- const char * (*lookup_uname)(void *private, int64_t uid),
+ const char * (*lookup_uname)(void *private, la_int64_t uid),
void (*cleanup_uname)(void *private))
{
struct archive_read_disk *a = (struct archive_read_disk *)_a;
diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_windows.c b/archivers/libarchive/files/libarchive/archive_read_disk_windows.c
index 3b903304f08..d82048de299 100644
--- a/archivers/libarchive/files/libarchive/archive_read_disk_windows.c
+++ b/archivers/libarchive/files/libarchive/archive_read_disk_windows.c
@@ -117,7 +117,7 @@ struct filesystem {
*/
#define MAX_OVERLAPPED 8
-#define BUFFER_SIZE (1024 * 8)
+#define READ_BUFFER_SIZE (1024 * 64) /* Default to 64KB per https://technet.microsoft.com/en-us/library/cc938632.aspx */
#define DIRECT_IO 0/* Disabled */
#define ASYNC_IO 1/* Enabled */
@@ -320,7 +320,7 @@ archive_read_disk_vtable(void)
}
const char *
-archive_read_disk_gname(struct archive *_a, int64_t gid)
+archive_read_disk_gname(struct archive *_a, la_int64_t gid)
{
struct archive_read_disk *a = (struct archive_read_disk *)_a;
if (ARCHIVE_OK != __archive_check_magic(_a, ARCHIVE_READ_DISK_MAGIC,
@@ -332,7 +332,7 @@ archive_read_disk_gname(struct archive *_a, int64_t gid)
}
const char *
-archive_read_disk_uname(struct archive *_a, int64_t uid)
+archive_read_disk_uname(struct archive *_a, la_int64_t uid)
{
struct archive_read_disk *a = (struct archive_read_disk *)_a;
if (ARCHIVE_OK != __archive_check_magic(_a, ARCHIVE_READ_DISK_MAGIC,
@@ -346,7 +346,7 @@ archive_read_disk_uname(struct archive *_a, int64_t uid)
int
archive_read_disk_set_gname_lookup(struct archive *_a,
void *private_data,
- const char * (*lookup_gname)(void *private, int64_t gid),
+ const char * (*lookup_gname)(void *private, la_int64_t gid),
void (*cleanup_gname)(void *private))
{
struct archive_read_disk *a = (struct archive_read_disk *)_a;
@@ -567,7 +567,7 @@ start_next_async_read(struct archive_read_disk *a, struct tree *t)
/* Allocate read buffer. */
if (olp->buff == NULL) {
void *p;
- size_t s = (size_t)align_num_per_sector(t, BUFFER_SIZE);
+ size_t s = (size_t)align_num_per_sector(t, READ_BUFFER_SIZE);
p = VirtualAlloc(NULL, s, MEM_COMMIT, PAGE_READWRITE);
if (p == NULL) {
archive_set_error(&a->archive, ENOMEM,
@@ -683,7 +683,7 @@ _archive_read_data_block(struct archive *_a, const void **buff,
break;
} while (r == ARCHIVE_OK && t->ol_num_doing < MAX_OVERLAPPED);
} else {
- if (start_next_async_read(a, t) == ARCHIVE_FATAL)
+ if ((r = start_next_async_read(a, t)) == ARCHIVE_FATAL)
goto abort_read_data;
}
@@ -923,6 +923,7 @@ next_entry(struct archive_read_disk *a, struct tree *t,
t->entry_fh = CreateFileW(tree_current_access_path(t),
GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, flags, NULL);
if (t->entry_fh == INVALID_HANDLE_VALUE) {
+ la_dosmaperr(GetLastError());
archive_set_error(&a->archive, errno,
"Couldn't open %ls", tree_current_path(a->tree));
return (ARCHIVE_FAILED);
@@ -2275,10 +2276,10 @@ setup_sparse_from_disk(struct archive_read_disk *a,
if (range.Length.QuadPart > 0)
continue;
} else {
- /* The remaining data is hole. */
+ /* The entire file is a hole. Add one data block of size 0 at the end. */
archive_entry_sparse_add_entry(entry,
- range.FileOffset.QuadPart,
- range.Length.QuadPart);
+ entry_size,
+ 0);
}
break;
} else {
diff --git a/archivers/libarchive/files/libarchive/archive_read_filter.3 b/archivers/libarchive/files/libarchive/archive_read_filter.3
index 7f020e3734b..ef0a7017533 100644
--- a/archivers/libarchive/files/libarchive/archive_read_filter.3
+++ b/archivers/libarchive/files/libarchive/archive_read_filter.3
@@ -38,6 +38,7 @@
.Nm archive_read_support_filter_rpm ,
.Nm archive_read_support_filter_uu ,
.Nm archive_read_support_filter_xz ,
+.Nm archive_read_support_filter_zstd ,
.Nm archive_read_support_filter_program ,
.Nm archive_read_support_filter_program_signature
.Nd functions for reading streaming archives
@@ -73,6 +74,8 @@ Streaming Archive Library (libarchive, -larchive)
.Ft int
.Fn archive_read_support_filter_xz "struct archive *"
.Ft int
+.Fn archive_read_support_filter_zstd "struct archive *"
+.Ft int
.Fo archive_read_support_filter_program
.Fa "struct archive *"
.Fa "const char *cmd"
@@ -99,7 +102,8 @@ Streaming Archive Library (libarchive, -larchive)
.Fn archive_read_support_filter_none ,
.Fn archive_read_support_filter_rpm ,
.Fn archive_read_support_filter_uu ,
-.Fn archive_read_support_filter_xz
+.Fn archive_read_support_filter_xz ,
+.Fn archive_read_support_filter_zstd ,
.Xc
Enables auto-detection code and decompression support for the
specified compression.
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_filter_all.c b/archivers/libarchive/files/libarchive/archive_read_support_filter_all.c
index 68c53de41f2..edb508c1dfd 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_filter_all.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_filter_all.c
@@ -71,6 +71,8 @@ archive_read_support_filter_all(struct archive *a)
archive_read_support_filter_grzip(a);
/* Lz4 falls back to "lz4 -d" command-line program. */
archive_read_support_filter_lz4(a);
+ /* Zstd falls back to "zstd -d" command-line program. */
+ archive_read_support_filter_zstd(a);
/* Note: We always return ARCHIVE_OK here, even if some of the
* above return ARCHIVE_WARN. The intent here is to enable
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_filter_zstd.c b/archivers/libarchive/files/libarchive/archive_read_support_filter_zstd.c
new file mode 100644
index 00000000000..c8bb36be703
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/archive_read_support_filter_zstd.c
@@ -0,0 +1,292 @@
+/*-
+ * Copyright (c) 2009-2011 Sean Purcell
+ * 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 "archive_platform.h"
+
+__FBSDID("$FreeBSD$");
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_ZSTD_H
+#include <zstd.h>
+#endif
+
+#include "archive.h"
+#include "archive_endian.h"
+#include "archive_private.h"
+#include "archive_read_private.h"
+
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+
+struct private_data {
+ ZSTD_DStream *dstream;
+ unsigned char *out_block;
+ size_t out_block_size;
+ int64_t total_out;
+ char in_frame; /* True = in the middle of a zstd frame. */
+ char eof; /* True = found end of compressed data. */
+};
+
+/* Zstd Filter. */
+static ssize_t zstd_filter_read(struct archive_read_filter *, const void**);
+static int zstd_filter_close(struct archive_read_filter *);
+#endif
+
+/*
+ * Note that we can detect zstd compressed files even if we can't decompress
+ * them. (In fact, we like detecting them because we can give better error
+ * messages.) So the bid framework here gets compiled even if no zstd library
+ * is available.
+ */
+static int zstd_bidder_bid(struct archive_read_filter_bidder *,
+ struct archive_read_filter *);
+static int zstd_bidder_init(struct archive_read_filter *);
+
+int
+archive_read_support_filter_zstd(struct archive *_a)
+{
+ struct archive_read *a = (struct archive_read *)_a;
+ struct archive_read_filter_bidder *bidder;
+
+ archive_check_magic(_a, ARCHIVE_READ_MAGIC,
+ ARCHIVE_STATE_NEW, "archive_read_support_filter_zstd");
+
+ if (__archive_read_get_bidder(a, &bidder) != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+
+ bidder->data = NULL;
+ bidder->name = "zstd";
+ bidder->bid = zstd_bidder_bid;
+ bidder->init = zstd_bidder_init;
+ bidder->options = NULL;
+ bidder->free = NULL;
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+ return (ARCHIVE_OK);
+#else
+ archive_set_error(_a, ARCHIVE_ERRNO_MISC,
+ "Using external zstd program for zstd decompression");
+ return (ARCHIVE_WARN);
+#endif
+}
+
+/*
+ * Test whether we can handle this data.
+ */
+static int
+zstd_bidder_bid(struct archive_read_filter_bidder *self,
+ struct archive_read_filter *filter)
+{
+ const unsigned char *buffer;
+ ssize_t avail;
+ unsigned prefix;
+
+ /* Zstd frame magic values */
+ const unsigned zstd_magic = 0xFD2FB528U;
+
+ (void) self; /* UNUSED */
+
+ buffer = __archive_read_filter_ahead(filter, 4, &avail);
+ if (buffer == NULL)
+ return (0);
+
+ prefix = archive_le32dec(buffer);
+ if (prefix == zstd_magic)
+ return (32);
+
+ return (0);
+}
+
+#if !(HAVE_ZSTD_H && HAVE_LIBZSTD)
+
+/*
+ * If we don't have the library on this system, we can't do the
+ * decompression directly. We can, however, try to run "zstd -d"
+ * in case that's available.
+ */
+static int
+zstd_bidder_init(struct archive_read_filter *self)
+{
+ int r;
+
+ r = __archive_read_program(self, "zstd -d -qq");
+ /* Note: We set the format here even if __archive_read_program()
+ * above fails. We do, after all, know what the format is
+ * even if we weren't able to read it. */
+ self->code = ARCHIVE_FILTER_ZSTD;
+ self->name = "zstd";
+ return (r);
+}
+
+#else
+
+/*
+ * Initialize the filter object
+ */
+static int
+zstd_bidder_init(struct archive_read_filter *self)
+{
+ struct private_data *state;
+ const size_t out_block_size = ZSTD_DStreamOutSize();
+ void *out_block;
+ ZSTD_DStream *dstream;
+
+ self->code = ARCHIVE_FILTER_ZSTD;
+ self->name = "zstd";
+
+ state = (struct private_data *)calloc(sizeof(*state), 1);
+ out_block = (unsigned char *)malloc(out_block_size);
+ dstream = ZSTD_createDStream();
+
+ if (state == NULL || out_block == NULL || dstream == NULL) {
+ free(out_block);
+ free(state);
+ ZSTD_freeDStream(dstream); /* supports free on NULL */
+ archive_set_error(&self->archive->archive, ENOMEM,
+ "Can't allocate data for zstd decompression");
+ return (ARCHIVE_FATAL);
+ }
+
+ self->data = state;
+
+ state->out_block_size = out_block_size;
+ state->out_block = out_block;
+ state->dstream = dstream;
+ self->read = zstd_filter_read;
+ self->skip = NULL; /* not supported */
+ self->close = zstd_filter_close;
+
+ state->eof = 0;
+ state->in_frame = 0;
+
+ return (ARCHIVE_OK);
+}
+
+static ssize_t
+zstd_filter_read(struct archive_read_filter *self, const void **p)
+{
+ struct private_data *state;
+ size_t decompressed;
+ ssize_t avail_in;
+ ZSTD_outBuffer out;
+ ZSTD_inBuffer in;
+
+ state = (struct private_data *)self->data;
+
+ out = (ZSTD_outBuffer) { state->out_block, state->out_block_size, 0 };
+
+ /* Try to fill the output buffer. */
+ while (out.pos < out.size && !state->eof) {
+ if (!state->in_frame) {
+ const size_t ret = ZSTD_initDStream(state->dstream);
+ if (ZSTD_isError(ret)) {
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Error initializing zstd decompressor: %s",
+ ZSTD_getErrorName(ret));
+ return (ARCHIVE_FATAL);
+ }
+ }
+ in.src = __archive_read_filter_ahead(self->upstream, 1,
+ &avail_in);
+ if (avail_in < 0) {
+ return avail_in;
+ }
+ if (in.src == NULL && avail_in == 0) {
+ if (!state->in_frame) {
+ /* end of stream */
+ state->eof = 1;
+ break;
+ } else {
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Truncated zstd input");
+ return (ARCHIVE_FATAL);
+ }
+ }
+ in.size = avail_in;
+ in.pos = 0;
+
+ {
+ const size_t ret =
+ ZSTD_decompressStream(state->dstream, &out, &in);
+
+ if (ZSTD_isError(ret)) {
+ archive_set_error(&self->archive->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Zstd decompression failed: %s",
+ ZSTD_getErrorName(ret));
+ return (ARCHIVE_FATAL);
+ }
+
+ /* Decompressor made some progress */
+ __archive_read_filter_consume(self->upstream, in.pos);
+
+ /* ret guaranteed to be > 0 if frame isn't done yet */
+ state->in_frame = (ret != 0);
+ }
+ }
+
+ decompressed = out.pos;
+ state->total_out += decompressed;
+ if (decompressed == 0)
+ *p = NULL;
+ else
+ *p = state->out_block;
+ return (decompressed);
+}
+
+/*
+ * Clean up the decompressor.
+ */
+static int
+zstd_filter_close(struct archive_read_filter *self)
+{
+ struct private_data *state;
+
+ state = (struct private_data *)self->data;
+
+ ZSTD_freeDStream(state->dstream);
+ free(state->out_block);
+ free(state);
+
+ return (ARCHIVE_OK);
+}
+
+#endif /* HAVE_ZLIB_H && HAVE_LIBZSTD */
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c b/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c
index 3387eaf7e7f..bccbf896603 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c
@@ -975,18 +975,6 @@ decode_codec_id(const unsigned char *codecId, size_t id_size)
return (id);
}
-static void *
-ppmd_alloc(void *p, size_t size)
-{
- (void)p;
- return malloc(size);
-}
-static void
-ppmd_free(void *p, void *address)
-{
- (void)p;
- free(address);
-}
static Byte
ppmd_read(void *p)
{
@@ -1006,8 +994,6 @@ ppmd_read(void *p)
return (b);
}
-static ISzAlloc g_szalloc = { ppmd_alloc, ppmd_free };
-
static int
init_decompression(struct archive_read *a, struct _7zip *zip,
const struct _7z_coder *coder1, const struct _7z_coder *coder2)
@@ -1237,7 +1223,7 @@ init_decompression(struct archive_read *a, struct _7zip *zip,
if (zip->ppmd7_valid) {
__archive_ppmd7_functions.Ppmd7_Free(
- &zip->ppmd7_context, &g_szalloc);
+ &zip->ppmd7_context);
zip->ppmd7_valid = 0;
}
@@ -1256,7 +1242,7 @@ init_decompression(struct archive_read *a, struct _7zip *zip,
}
__archive_ppmd7_functions.Ppmd7_Construct(&zip->ppmd7_context);
r = __archive_ppmd7_functions.Ppmd7_Alloc(
- &zip->ppmd7_context, msize, &g_szalloc);
+ &zip->ppmd7_context, msize);
if (r == 0) {
archive_set_error(&a->archive, ENOMEM,
"Coludn't allocate memory for PPMd");
@@ -1636,7 +1622,7 @@ free_decompression(struct archive_read *a, struct _7zip *zip)
#endif
if (zip->ppmd7_valid) {
__archive_ppmd7_functions.Ppmd7_Free(
- &zip->ppmd7_context, &g_szalloc);
+ &zip->ppmd7_context);
zip->ppmd7_valid = 0;
}
return (r);
@@ -2569,6 +2555,7 @@ read_Header(struct archive_read *a, struct _7z_header_info *h,
case kDummy:
if (ll == 0)
break;
+ __LA_FALLTHROUGH;
default:
if (header_bytes(a, ll) == NULL)
return (-1);
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c b/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c
index ad9f782de48..67d5b21eebb 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c
@@ -633,6 +633,13 @@ header_newc(struct archive_read *a, struct cpio *cpio,
/* Pad name to 2 more than a multiple of 4. */
*name_pad = (2 - *namelength) & 3;
+ /* Make sure that the padded name length fits into size_t. */
+ if (*name_pad > SIZE_MAX - *namelength) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "cpio archive has invalid namelength");
+ return (ARCHIVE_FATAL);
+ }
+
/*
* Note: entry_bytes_remaining is at least 64 bits and
* therefore guaranteed to be big enough for a 33-bit file
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 f01d37bf682..28acfefbba8 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c
@@ -409,7 +409,8 @@ static int next_entry_seek(struct archive_read *, struct iso9660 *,
struct file_info **);
static struct file_info *
parse_file_info(struct archive_read *a,
- struct file_info *parent, const unsigned char *isodirrec);
+ struct file_info *parent, const unsigned char *isodirrec,
+ size_t reclen);
static int parse_rockridge(struct archive_read *a,
struct file_info *file, const unsigned char *start,
const unsigned char *end);
@@ -1022,7 +1023,7 @@ read_children(struct archive_read *a, struct file_info *parent)
if (*(p + DR_name_len_offset) == 1
&& *(p + DR_name_offset) == '\001')
continue;
- child = parse_file_info(a, parent, p);
+ child = parse_file_info(a, parent, p, b - p);
if (child == NULL) {
__archive_read_consume(a, skip_size);
return (ARCHIVE_FATAL);
@@ -1112,7 +1113,7 @@ choose_volume(struct archive_read *a, struct iso9660 *iso9660)
*/
seenJoliet = iso9660->seenJoliet;/* Save flag. */
iso9660->seenJoliet = 0;
- file = parse_file_info(a, NULL, block);
+ file = parse_file_info(a, NULL, block, vd->size);
if (file == NULL)
return (ARCHIVE_FATAL);
iso9660->seenJoliet = seenJoliet;
@@ -1144,7 +1145,7 @@ choose_volume(struct archive_read *a, struct iso9660 *iso9660)
return (ARCHIVE_FATAL);
}
iso9660->seenJoliet = 0;
- file = parse_file_info(a, NULL, block);
+ file = parse_file_info(a, NULL, block, vd->size);
if (file == NULL)
return (ARCHIVE_FATAL);
iso9660->seenJoliet = seenJoliet;
@@ -1749,7 +1750,7 @@ archive_read_format_iso9660_cleanup(struct archive_read *a)
*/
static struct file_info *
parse_file_info(struct archive_read *a, struct file_info *parent,
- const unsigned char *isodirrec)
+ const unsigned char *isodirrec, size_t reclen)
{
struct iso9660 *iso9660;
struct file_info *file, *filep;
@@ -1763,16 +1764,20 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
iso9660 = (struct iso9660 *)(a->format->data);
- dr_len = (size_t)isodirrec[DR_length_offset];
- name_len = (size_t)isodirrec[DR_name_len_offset];
- location = archive_le32dec(isodirrec + DR_extent_offset);
- fsize = toi(isodirrec + DR_size_offset, DR_size_size);
- /* Sanity check that dr_len needs at least 34. */
- if (dr_len < 34) {
+ if (reclen != 0)
+ dr_len = (size_t)isodirrec[DR_length_offset];
+ /*
+ * Sanity check that reclen is not zero and dr_len is greater than
+ * reclen but at least 34
+ */
+ if (reclen == 0 || reclen < dr_len || dr_len < 34) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
- "Invalid length of directory record");
+ "Invalid length of directory record");
return (NULL);
}
+ name_len = (size_t)isodirrec[DR_name_len_offset];
+ location = archive_le32dec(isodirrec + DR_extent_offset);
+ fsize = toi(isodirrec + DR_size_offset, DR_size_size);
/* Sanity check that name_len doesn't exceed dr_len. */
if (dr_len - 33 < name_len || name_len == 0) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c b/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c
index b8ef4ae10ec..95c99bb1f31 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c
@@ -701,6 +701,12 @@ archive_read_format_lha_read_header(struct archive_read *a,
* Prepare variables used to read a file content.
*/
lha->entry_bytes_remaining = lha->compsize;
+ if (lha->entry_bytes_remaining < 0) {
+ archive_set_error(&a->archive,
+ ARCHIVE_ERRNO_FILE_FORMAT,
+ "Invalid LHa entry size");
+ return (ARCHIVE_FATAL);
+ }
lha->entry_offset = 0;
lha->entry_crc_calculated = 0;
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 44b6083cb2f..5b0eadc0844 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_mtree.c 2011
#include "archive.h"
#include "archive_entry.h"
#include "archive_private.h"
+#include "archive_rb.h"
#include "archive_read_private.h"
#include "archive_string.h"
#include "archive_pack_dev.h"
@@ -75,7 +76,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_mtree.c 2011
#define MTREE_HAS_OPTIONAL 0x0800
#define MTREE_HAS_NOCHANGE 0x1000 /* FreeBSD specific */
-#define MTREE_HASHTABLE_SIZE 1024
+#define MAX_LINE_LEN (1024 * 1024)
struct mtree_option {
struct mtree_option *next;
@@ -83,13 +84,13 @@ struct mtree_option {
};
struct mtree_entry {
+ struct archive_rb_node rbnode;
+ struct mtree_entry *next_dup;
struct mtree_entry *next;
struct mtree_option *options;
char *name;
char full;
char used;
- unsigned int name_hash;
- struct mtree_entry *hashtable_next;
};
struct mtree {
@@ -102,11 +103,12 @@ struct mtree {
const char *archive_format_name;
struct mtree_entry *entries;
struct mtree_entry *this_entry;
- struct mtree_entry *entry_hashtable[MTREE_HASHTABLE_SIZE];
+ struct archive_rb_tree entry_rbtree;
struct archive_string current_dir;
struct archive_string contents_name;
struct archive_entry_linkresolver *resolver;
+ struct archive_rb_tree rbtree;
int64_t cur_size;
char checkfs;
@@ -115,7 +117,6 @@ struct mtree {
static int bid_keycmp(const char *, const char *, ssize_t);
static int cleanup(struct archive_read *);
static int detect_form(struct archive_read *, int *);
-static unsigned int hash(const char *);
static int mtree_bid(struct archive_read *, int);
static int parse_file(struct archive_read *, struct archive_entry *,
struct mtree *, struct mtree_entry *, int *);
@@ -217,9 +218,30 @@ free_options(struct mtree_option *head)
}
}
+static int
+mtree_cmp_node(const struct archive_rb_node *n1,
+ const struct archive_rb_node *n2)
+{
+ const struct mtree_entry *e1 = (const struct mtree_entry *)n1;
+ const struct mtree_entry *e2 = (const struct mtree_entry *)n2;
+
+ return (strcmp(e1->name, e2->name));
+}
+
+static int
+mtree_cmp_key(const struct archive_rb_node *n, const void *key)
+{
+ const struct mtree_entry *e = (const struct mtree_entry *)n;
+
+ return (strcmp(e->name, key));
+}
+
int
archive_read_support_format_mtree(struct archive *_a)
{
+ static const struct archive_rb_tree_ops rb_ops = {
+ mtree_cmp_node, mtree_cmp_key,
+ };
struct archive_read *a = (struct archive_read *)_a;
struct mtree *mtree;
int r;
@@ -235,6 +257,8 @@ archive_read_support_format_mtree(struct archive *_a)
}
mtree->fd = -1;
+ __archive_rb_tree_init(&mtree->rbtree, &rb_ops);
+
r = __archive_read_register_format(a, mtree, "mtree",
mtree_bid, archive_read_format_mtree_options, read_header, read_data, skip, NULL, cleanup, NULL, NULL);
@@ -334,6 +358,14 @@ next_line(struct archive_read *a,
size_t nbytes_req = (*ravail+1023) & ~1023U;
ssize_t tested;
+ /*
+ * Place an arbitrary limit on the line length.
+ * mtree is almost free-form input and without line length limits,
+ * it can consume a lot of memory.
+ */
+ if (len >= MAX_LINE_LEN)
+ return (-1);
+
/* Increase reading bytes if it is not enough to at least
* new two lines. */
if (nbytes_req < (size_t)*ravail + 160)
@@ -865,12 +897,11 @@ process_add_entry(struct archive_read *a, struct mtree *mtree,
struct mtree_option **global, const char *line, ssize_t line_len,
struct mtree_entry **last_entry, int is_form_d)
{
- struct mtree_entry *entry, *ht_iter;
+ struct mtree_entry *entry;
struct mtree_option *iter;
const char *next, *eq, *name, *end;
size_t name_len, len;
int r, i;
- unsigned int ht_idx;
if ((entry = malloc(sizeof(*entry))) == NULL) {
archive_set_error(&a->archive, errno, "Can't allocate memory");
@@ -881,8 +912,6 @@ process_add_entry(struct archive_read *a, struct mtree *mtree,
entry->name = NULL;
entry->used = 0;
entry->full = 0;
- entry->name_hash = 0;
- entry->hashtable_next = NULL;
/* Add this entry to list. */
if (*last_entry == NULL)
@@ -935,15 +964,17 @@ process_add_entry(struct archive_read *a, struct mtree *mtree,
memcpy(entry->name, name, name_len);
entry->name[name_len] = '\0';
parse_escapes(entry->name, entry);
- entry->name_hash = hash(entry->name);
- ht_idx = entry->name_hash % MTREE_HASHTABLE_SIZE;
- if ((ht_iter = mtree->entry_hashtable[ht_idx]) != NULL) {
- while (ht_iter->hashtable_next)
- ht_iter = ht_iter->hashtable_next;
- ht_iter->hashtable_next = entry;
- } else {
- mtree->entry_hashtable[ht_idx] = entry;
+ entry->next_dup = NULL;
+ if (entry->full) {
+ if (!__archive_rb_tree_insert_node(&mtree->rbtree, &entry->rbnode)) {
+ struct mtree_entry *alt;
+ alt = (struct mtree_entry *)__archive_rb_tree_find_node(
+ &mtree->rbtree, entry->name);
+ while (alt->next_dup)
+ alt = alt->next_dup;
+ alt->next_dup = entry;
+ }
}
for (iter = *global; iter != NULL; iter = iter->next) {
@@ -1138,14 +1169,13 @@ parse_file(struct archive_read *a, struct archive_entry *entry,
* with pathname canonicalization, which is a very
* tricky subject.)
*/
- for (mp = mentry->hashtable_next; mp != NULL; mp = mp->hashtable_next) {
- if (mp->full && !mp->used
- && mentry->name_hash == mp->name_hash
- && strcmp(mentry->name, mp->name) == 0) {
+ mp = (struct mtree_entry *)__archive_rb_tree_find_node(
+ &mtree->rbtree, mentry->name);
+ for (; mp; mp = mp->next_dup) {
+ if (mp->full && !mp->used) {
/* Later lines override earlier ones. */
mp->used = 1;
- r1 = parse_line(a, entry, mtree, mp,
- &parsed_kws);
+ r1 = parse_line(a, entry, mtree, mp, &parsed_kws);
if (r1 < r)
r = r1;
}
@@ -1489,6 +1519,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
}
if (strcmp(key, "cksum") == 0)
break;
+ __LA_FALLTHROUGH;
case 'd':
if (strcmp(key, "device") == 0) {
/* stat(2) st_rdev field, e.g. the major/minor IDs
@@ -1502,12 +1533,14 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
archive_entry_set_rdev(entry, dev);
return r;
}
+ __LA_FALLTHROUGH;
case 'f':
if (strcmp(key, "flags") == 0) {
*parsed_kws |= MTREE_HAS_FFLAGS;
archive_entry_copy_fflags_text(entry, val);
break;
}
+ __LA_FALLTHROUGH;
case 'g':
if (strcmp(key, "gid") == 0) {
*parsed_kws |= MTREE_HAS_GID;
@@ -1519,16 +1552,19 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
archive_entry_copy_gname(entry, val);
break;
}
+ __LA_FALLTHROUGH;
case 'i':
if (strcmp(key, "inode") == 0) {
archive_entry_set_ino(entry, mtree_atol(&val, 10));
break;
}
+ __LA_FALLTHROUGH;
case 'l':
if (strcmp(key, "link") == 0) {
archive_entry_copy_symlink(entry, val);
break;
}
+ __LA_FALLTHROUGH;
case 'm':
if (strcmp(key, "md5") == 0 || strcmp(key, "md5digest") == 0)
break;
@@ -1545,6 +1581,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
}
break;
}
+ __LA_FALLTHROUGH;
case 'n':
if (strcmp(key, "nlink") == 0) {
*parsed_kws |= MTREE_HAS_NLINK;
@@ -1552,6 +1589,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
(unsigned int)mtree_atol(&val, 10));
break;
}
+ __LA_FALLTHROUGH;
case 'r':
if (strcmp(key, "resdevice") == 0) {
/* stat(2) st_dev field, e.g. the device ID where the
@@ -1567,6 +1605,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
if (strcmp(key, "rmd160") == 0 ||
strcmp(key, "rmd160digest") == 0)
break;
+ __LA_FALLTHROUGH;
case 's':
if (strcmp(key, "sha1") == 0 || strcmp(key, "sha1digest") == 0)
break;
@@ -1583,6 +1622,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
archive_entry_set_size(entry, mtree_atol(&val, 10));
break;
}
+ __LA_FALLTHROUGH;
case 't':
if (strcmp(key, "tags") == 0) {
/*
@@ -1625,18 +1665,21 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
archive_entry_set_filetype(entry, AE_IFBLK);
break;
}
+ __LA_FALLTHROUGH;
case 'c':
if (strcmp(val, "char") == 0) {
archive_entry_set_filetype(entry,
AE_IFCHR);
break;
}
+ __LA_FALLTHROUGH;
case 'd':
if (strcmp(val, "dir") == 0) {
archive_entry_set_filetype(entry,
AE_IFDIR);
break;
}
+ __LA_FALLTHROUGH;
case 'f':
if (strcmp(val, "fifo") == 0) {
archive_entry_set_filetype(entry,
@@ -1648,12 +1691,14 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
AE_IFREG);
break;
}
+ __LA_FALLTHROUGH;
case 'l':
if (strcmp(val, "link") == 0) {
archive_entry_set_filetype(entry,
AE_IFLNK);
break;
}
+ __LA_FALLTHROUGH;
default:
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
@@ -1665,6 +1710,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
*parsed_kws |= MTREE_HAS_TYPE;
break;
}
+ __LA_FALLTHROUGH;
case 'u':
if (strcmp(key, "uid") == 0) {
*parsed_kws |= MTREE_HAS_UID;
@@ -1676,6 +1722,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree,
archive_entry_copy_uname(entry, val);
break;
}
+ __LA_FALLTHROUGH;
default:
archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
"Unrecognized key %s=%s", key, val);
@@ -1962,19 +2009,3 @@ readline(struct archive_read *a, struct mtree *mtree, char **start,
find_off = u - mtree->line.s;
}
}
-
-static unsigned int
-hash(const char *p)
-{
- /* A 32-bit version of Peter Weinberger's (PJW) hash algorithm,
- as used by ELF for hashing function names. */
- unsigned g, h = 0;
- while (*p != '\0') {
- h = (h << 4) + *p++;
- if ((g = h & 0xF0000000) != 0) {
- h ^= g >> 24;
- h &= 0x0FFFFFFF;
- }
- }
- return h;
-}
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c b/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c
index cbb14c32dc3..234522229e4 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c
@@ -604,20 +604,6 @@ lzss_emit_match(struct rar *rar, int offset, int length)
rar->lzss.position += length;
}
-static void *
-ppmd_alloc(void *p, size_t size)
-{
- (void)p;
- return malloc(size);
-}
-static void
-ppmd_free(void *p, void *address)
-{
- (void)p;
- free(address);
-}
-static ISzAlloc g_szalloc = { ppmd_alloc, ppmd_free };
-
static Byte
ppmd_read(void *p)
{
@@ -1038,7 +1024,7 @@ archive_read_format_rar_read_data(struct archive_read *a, const void **buff,
case COMPRESS_METHOD_BEST:
ret = read_data_compressed(a, buff, size, offset);
if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN)
- __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context, &g_szalloc);
+ __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context);
break;
default:
@@ -1253,7 +1239,7 @@ archive_read_format_rar_cleanup(struct archive_read *a)
free(rar->dbo);
free(rar->unp_buffer);
free(rar->lzss.window);
- __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context, &g_szalloc);
+ __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context);
free(rar);
(a->format->data) = NULL;
return (ARCHIVE_OK);
@@ -1496,7 +1482,11 @@ read_header(struct archive_read *a, struct archive_entry *entry,
return (ARCHIVE_FATAL);
}
filename[filename_size++] = '\0';
- filename[filename_size++] = '\0';
+ /*
+ * Do not increment filename_size here as the computations below
+ * add the space for the terminating NUL explicitly.
+ */
+ filename[filename_size] = '\0';
/* Decoded unicode form is UTF-16BE, so we have to update a string
* conversion object for it. */
@@ -1654,7 +1644,7 @@ read_header(struct archive_read *a, struct archive_entry *entry,
rar->unp_offset = 0;
rar->unp_buffer_size = UNP_BUFFER_SIZE;
memset(rar->lengthtable, 0, sizeof(rar->lengthtable));
- __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context, &g_szalloc);
+ __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context);
rar->ppmd_valid = rar->ppmd_eod = 0;
/* Don't set any archive entries for non-file header types */
@@ -2118,7 +2108,7 @@ parse_codes(struct archive_read *a)
/* Make sure ppmd7_contest is freed before Ppmd7_Construct
* because reading a broken file cause this abnormal sequence. */
- __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context, &g_szalloc);
+ __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context);
rar->bytein.a = a;
rar->bytein.Read = &ppmd_read;
@@ -2133,7 +2123,7 @@ parse_codes(struct archive_read *a)
}
if (!__archive_ppmd7_functions.Ppmd7_Alloc(&rar->ppmd7_context,
- rar->dictionary_size, &g_szalloc))
+ rar->dictionary_size))
{
archive_set_error(&a->archive, ENOMEM,
"Out of memory");
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 30d5bc83c32..60800bb812e 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c
@@ -251,15 +251,15 @@ archive_read_support_format_tar(struct archive *_a)
ARCHIVE_STATE_NEW, "archive_read_support_format_tar");
tar = (struct tar *)calloc(1, sizeof(*tar));
-#ifdef HAVE_COPYFILE_H
- /* Set this by default on Mac OS. */
- tar->process_mac_extensions = 1;
-#endif
if (tar == NULL) {
archive_set_error(&a->archive, ENOMEM,
"Can't allocate tar data");
return (ARCHIVE_FATAL);
}
+#ifdef HAVE_COPYFILE_H
+ /* Set this by default on Mac OS. */
+ tar->process_mac_extensions = 1;
+#endif
r = __archive_read_register_format(a, tar, "tar",
archive_read_format_tar_bid,
@@ -2241,7 +2241,7 @@ gnu_add_sparse_entry(struct archive_read *a, struct tar *tar,
else
tar->sparse_list = p;
tar->sparse_last = p;
- if (remaining < 0 || offset < 0) {
+ if (remaining < 0 || offset < 0 || offset > INT64_MAX - remaining) {
archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Malformed sparse map data");
return (ARCHIVE_FATAL);
}
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c b/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c
index 7a22beb9d8e..602fc772214 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c
@@ -1040,6 +1040,9 @@ atol10(const char *p, size_t char_cnt)
uint64_t l;
int digit;
+ if (char_cnt == 0)
+ return (0);
+
l = 0;
digit = *p - '0';
while (digit >= 0 && digit < 10 && char_cnt-- > 0) {
@@ -1054,7 +1057,10 @@ atol8(const char *p, size_t char_cnt)
{
int64_t l;
int digit;
-
+
+ if (char_cnt == 0)
+ return (0);
+
l = 0;
while (char_cnt-- > 0) {
if (*p >= '0' && *p <= '7')
@@ -2623,6 +2629,14 @@ strappend_base64(struct xar *xar,
archive_strncat(as, (const char *)buff, len);
}
+static int
+is_string(const char *known, const char *data, size_t len)
+{
+ if (strlen(known) != len)
+ return -1;
+ return memcmp(data, known, len);
+}
+
static void
xml_data(void *userData, const char *s, int len)
{
@@ -2674,26 +2688,26 @@ xml_data(void *userData, const char *s, int len)
archive_strncpy(&(xar->file->symlink), s, len);
break;
case FILE_TYPE:
- if (strncmp("file", s, len) == 0 ||
- strncmp("hardlink", s, len) == 0)
+ if (is_string("file", s, len) == 0 ||
+ is_string("hardlink", s, len) == 0)
xar->file->mode =
(xar->file->mode & ~AE_IFMT) | AE_IFREG;
- if (strncmp("directory", s, len) == 0)
+ if (is_string("directory", s, len) == 0)
xar->file->mode =
(xar->file->mode & ~AE_IFMT) | AE_IFDIR;
- if (strncmp("symlink", s, len) == 0)
+ if (is_string("symlink", s, len) == 0)
xar->file->mode =
(xar->file->mode & ~AE_IFMT) | AE_IFLNK;
- if (strncmp("character special", s, len) == 0)
+ if (is_string("character special", s, len) == 0)
xar->file->mode =
(xar->file->mode & ~AE_IFMT) | AE_IFCHR;
- if (strncmp("block special", s, len) == 0)
+ if (is_string("block special", s, len) == 0)
xar->file->mode =
(xar->file->mode & ~AE_IFMT) | AE_IFBLK;
- if (strncmp("socket", s, len) == 0)
+ if (is_string("socket", s, len) == 0)
xar->file->mode =
(xar->file->mode & ~AE_IFMT) | AE_IFSOCK;
- if (strncmp("fifo", s, len) == 0)
+ if (is_string("fifo", s, len) == 0)
xar->file->mode =
(xar->file->mode & ~AE_IFMT) | AE_IFIFO;
xar->file->has |= HAS_TYPE;
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c b/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c
index 4c4f6fad479..18f0d04e5c4 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c
@@ -511,7 +511,13 @@ process_extra(struct archive_read *a, const char *p, size_t extra_length, struct
case 0x5455:
{
/* Extended time field "UT". */
- int flags = p[offset];
+ int flags;
+ if (datasize == 0) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Incomplete extended time field");
+ return ARCHIVE_FAILED;
+ }
+ flags = p[offset];
offset++;
datasize--;
/* Flag bits indicate which dates are present. */
@@ -723,6 +729,11 @@ process_extra(struct archive_read *a, const char *p, size_t extra_length, struct
}
case 0x9901:
/* WinZip AES extra data field. */
+ if (datasize < 6) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Incomplete AES field");
+ return ARCHIVE_FAILED;
+ }
if (p[offset + 2] == 'A' && p[offset + 3] == 'E') {
/* Vendor version. */
zip_entry->aes_extra.vendor =
@@ -881,6 +892,24 @@ zip_read_local_file_header(struct archive_read *a, struct archive_entry *entry,
zip_entry->mode |= 0664;
}
+ /* Windows archivers sometimes use backslash as the directory separator.
+ Normalize to slash. */
+ if (zip_entry->system == 0 &&
+ (wp = archive_entry_pathname_w(entry)) != NULL) {
+ if (wcschr(wp, L'/') == NULL && wcschr(wp, L'\\') != NULL) {
+ size_t i;
+ struct archive_wstring s;
+ archive_string_init(&s);
+ archive_wstrcpy(&s, wp);
+ for (i = 0; i < archive_strlen(&s); i++) {
+ if (s.s[i] == '\\')
+ s.s[i] = '/';
+ }
+ archive_entry_copy_pathname_w(entry, s.s);
+ archive_wstring_free(&s);
+ }
+ }
+
/* Make sure that entries with a trailing '/' are marked as directories
* even if the External File Attributes contains bogus values. If this
* is not a directory and there is no type, assume regularfile. */
@@ -1056,6 +1085,7 @@ zip_read_local_file_header(struct archive_read *a, struct archive_entry *entry,
zip->end_of_entry = 1;
/* Set up a more descriptive format name. */
+ archive_string_empty(&zip->format_name);
archive_string_sprintf(&zip->format_name, "ZIP %d.%d (%s)",
version / 10, version % 10,
compression_name(zip->entry->compression));
diff --git a/archivers/libarchive/files/libarchive/archive_util.c b/archivers/libarchive/files/libarchive/archive_util.c
index bac9ba1cab1..96d61456d33 100644
--- a/archivers/libarchive/files/libarchive/archive_util.c
+++ b/archivers/libarchive/files/libarchive/archive_util.c
@@ -140,7 +140,7 @@ archive_compression_name(struct archive *a)
/*
* Return a count of the number of compressed bytes processed.
*/
-int64_t
+la_int64_t
archive_position_compressed(struct archive *a)
{
return archive_filter_bytes(a, -1);
@@ -149,7 +149,7 @@ archive_position_compressed(struct archive *a)
/*
* Return a count of the number of uncompressed bytes processed.
*/
-int64_t
+la_int64_t
archive_position_uncompressed(struct archive *a)
{
return archive_filter_bytes(a, 0);
diff --git a/archivers/libarchive/files/libarchive/archive_version_details.c b/archivers/libarchive/files/libarchive/archive_version_details.c
index 813f0f3f2e3..bfb20eab202 100644
--- a/archivers/libarchive/files/libarchive/archive_version_details.c
+++ b/archivers/libarchive/files/libarchive/archive_version_details.c
@@ -45,6 +45,9 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_util.c 201098 2009-12-28 02:58:1
#ifdef HAVE_LZ4_H
#include <lz4.h>
#endif
+#ifdef HAVE_ZSTD_H
+#include <zstd.h>
+#endif
#include "archive.h"
#include "archive_private.h"
@@ -59,6 +62,7 @@ archive_version_details(void)
const char *liblzma = archive_liblzma_version();
const char *bzlib = archive_bzlib_version();
const char *liblz4 = archive_liblz4_version();
+ const char *libzstd = archive_libzstd_version();
if (!init) {
archive_string_init(&str);
@@ -84,6 +88,10 @@ archive_version_details(void)
archive_strcat(&str, " liblz4/");
archive_strcat(&str, liblz4);
}
+ if (libzstd) {
+ archive_strcat(&str, " libzstd/");
+ archive_strcat(&str, libzstd);
+ }
}
return str.s;
}
@@ -131,3 +139,13 @@ archive_liblz4_version(void)
return NULL;
#endif
}
+
+const char *
+archive_libzstd_version(void)
+{
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+ return ZSTD_VERSION_STRING;
+#else
+ return NULL;
+#endif
+}
diff --git a/archivers/libarchive/files/libarchive/archive_virtual.c b/archivers/libarchive/files/libarchive/archive_virtual.c
index de2595a9ead..f509ee5c672 100644
--- a/archivers/libarchive/files/libarchive/archive_virtual.c
+++ b/archivers/libarchive/files/libarchive/archive_virtual.c
@@ -48,7 +48,7 @@ archive_filter_name(struct archive *a, int n)
return ((a->vtable->archive_filter_name)(a, n));
}
-int64_t
+la_int64_t
archive_filter_bytes(struct archive *a, int n)
{
return ((a->vtable->archive_filter_bytes)(a, n));
@@ -124,14 +124,15 @@ archive_write_finish_entry(struct archive *a)
return ((a->vtable->archive_write_finish_entry)(a));
}
-ssize_t
+la_ssize_t
archive_write_data(struct archive *a, const void *buff, size_t s)
{
return ((a->vtable->archive_write_data)(a, buff, s));
}
-ssize_t
-archive_write_data_block(struct archive *a, const void *buff, size_t s, int64_t o)
+la_ssize_t
+archive_write_data_block(struct archive *a, const void *buff, size_t s,
+ la_int64_t o)
{
if (a->vtable->archive_write_data_block == NULL) {
archive_set_error(a, ARCHIVE_ERRNO_MISC,
@@ -156,7 +157,7 @@ archive_read_next_header2(struct archive *a, struct archive_entry *entry)
int
archive_read_data_block(struct archive *a,
- const void **buff, size_t *s, int64_t *o)
+ const void **buff, size_t *s, la_int64_t *o)
{
return ((a->vtable->archive_read_data_block)(a, buff, s, o));
}
diff --git a/archivers/libarchive/files/libarchive/archive_write.3 b/archivers/libarchive/files/libarchive/archive_write.3
index 376d71dee20..c1164f5b5fd 100644
--- a/archivers/libarchive/files/libarchive/archive_write.3
+++ b/archivers/libarchive/files/libarchive/archive_write.3
@@ -71,7 +71,7 @@ support.
.\"
.Ss Set options
See
-.Xr archive_read_set_options 3 .
+.Xr archive_write_set_options 3 .
.\"
.Ss Open archive
See
diff --git a/archivers/libarchive/files/libarchive/archive_write.c b/archivers/libarchive/files/libarchive/archive_write.c
index 0634a22967f..e8daf530d26 100644
--- a/archivers/libarchive/files/libarchive/archive_write.c
+++ b/archivers/libarchive/files/libarchive/archive_write.c
@@ -190,7 +190,7 @@ archive_write_get_bytes_in_last_block(struct archive *_a)
* an archive to itself recursively.
*/
int
-archive_write_set_skip_file(struct archive *_a, int64_t d, int64_t i)
+archive_write_set_skip_file(struct archive *_a, la_int64_t d, la_int64_t i)
{
struct archive_write *a = (struct archive_write *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter.c b/archivers/libarchive/files/libarchive/archive_write_add_filter.c
index 08f518adec4..203f4142b5c 100644
--- a/archivers/libarchive/files/libarchive/archive_write_add_filter.c
+++ b/archivers/libarchive/files/libarchive/archive_write_add_filter.c
@@ -53,6 +53,7 @@ struct { int code; int (*setter)(struct archive *); } codes[] =
{ ARCHIVE_FILTER_LZOP, archive_write_add_filter_lzip },
{ ARCHIVE_FILTER_UU, archive_write_add_filter_uuencode },
{ ARCHIVE_FILTER_XZ, archive_write_add_filter_xz },
+ { ARCHIVE_FILTER_ZSTD, archive_write_add_filter_zstd },
{ -1, NULL }
};
diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_by_name.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_by_name.c
index 85a8d475341..ffa633c9637 100644
--- a/archivers/libarchive/files/libarchive/archive_write_add_filter_by_name.c
+++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_by_name.c
@@ -57,6 +57,7 @@ struct { const char *name; int (*setter)(struct archive *); } names[] =
{ "lzop", archive_write_add_filter_lzop },
{ "uuencode", archive_write_add_filter_uuencode },
{ "xz", archive_write_add_filter_xz },
+ { "zstd", archive_write_add_filter_zstd },
{ NULL, NULL }
};
diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c
index 04eb06c1c06..e4b3435e420 100644
--- a/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c
+++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c
@@ -226,7 +226,12 @@ archive_compressor_gzip_open(struct archive_write_filter *f)
data->compressed[7] = (uint8_t)(t>>24)&0xff;
} else
memset(&data->compressed[4], 0, 4);
- data->compressed[8] = 0; /* No deflate options */
+ if (data->compression_level == 9)
+ data->compressed[8] = 2;
+ else if(data->compression_level == 1)
+ data->compressed[8] = 4;
+ else
+ data->compressed[8] = 0;
data->compressed[9] = 3; /* OS=Unix */
data->stream.next_out += 10;
data->stream.avail_out -= 10;
diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_zstd.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_zstd.c
new file mode 100644
index 00000000000..671fc6affba
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_zstd.c
@@ -0,0 +1,335 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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 "archive_platform.h"
+
+__FBSDID("$FreeBSD$");
+
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_ZSTD_H
+#include <zstd.h>
+#endif
+
+#include "archive.h"
+#include "archive_private.h"
+#include "archive_string.h"
+#include "archive_write_private.h"
+
+/* Don't compile this if we don't have zstd.h */
+
+struct private_data {
+ int compression_level;
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+ ZSTD_CStream *cstream;
+ int64_t total_in;
+ ZSTD_outBuffer out;
+#else
+ struct archive_write_program_data *pdata;
+#endif
+};
+
+static int archive_compressor_zstd_options(struct archive_write_filter *,
+ const char *, const char *);
+static int archive_compressor_zstd_open(struct archive_write_filter *);
+static int archive_compressor_zstd_write(struct archive_write_filter *,
+ const void *, size_t);
+static int archive_compressor_zstd_close(struct archive_write_filter *);
+static int archive_compressor_zstd_free(struct archive_write_filter *);
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+static int drive_compressor(struct archive_write_filter *,
+ struct private_data *, int, const void *, size_t);
+#endif
+
+
+/*
+ * Add a zstd compression filter to this write handle.
+ */
+int
+archive_write_add_filter_zstd(struct archive *_a)
+{
+ struct archive_write *a = (struct archive_write *)_a;
+ struct archive_write_filter *f = __archive_write_allocate_filter(_a);
+ struct private_data *data;
+ archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
+ ARCHIVE_STATE_NEW, "archive_write_add_filter_zstd");
+
+ data = calloc(1, sizeof(*data));
+ if (data == NULL) {
+ archive_set_error(&a->archive, ENOMEM, "Out of memory");
+ return (ARCHIVE_FATAL);
+ }
+ f->data = data;
+ f->open = &archive_compressor_zstd_open;
+ f->options = &archive_compressor_zstd_options;
+ f->close = &archive_compressor_zstd_close;
+ f->free = &archive_compressor_zstd_free;
+ f->code = ARCHIVE_FILTER_ZSTD;
+ f->name = "zstd";
+ data->compression_level = 3; /* Default level used by the zstd CLI */
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+ data->cstream = ZSTD_createCStream();
+ if (data->cstream == NULL) {
+ free(data);
+ archive_set_error(&a->archive, ENOMEM,
+ "Failed to allocate zstd compressor object");
+ return (ARCHIVE_FATAL);
+ }
+
+ return (ARCHIVE_OK);
+#else
+ data->pdata = __archive_write_program_allocate("zstd");
+ if (data->pdata == NULL) {
+ free(data);
+ archive_set_error(&a->archive, ENOMEM, "Out of memory");
+ return (ARCHIVE_FATAL);
+ }
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "Using external zstd program");
+ return (ARCHIVE_WARN);
+#endif
+}
+
+static int
+archive_compressor_zstd_free(struct archive_write_filter *f)
+{
+ struct private_data *data = (struct private_data *)f->data;
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+ ZSTD_freeCStream(data->cstream);
+ free(data->out.dst);
+#else
+ __archive_write_program_free(data->pdata);
+#endif
+ free(data);
+ f->data = NULL;
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Set write options.
+ */
+static int
+archive_compressor_zstd_options(struct archive_write_filter *f, const char *key,
+ const char *value)
+{
+ struct private_data *data = (struct private_data *)f->data;
+
+ if (strcmp(key, "compression-level") == 0) {
+ int level = atoi(value);
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+ if (level < 1 || level > ZSTD_maxCLevel()) {
+#else
+ /* If we don't have the library, hard-code the max level */
+ if (level < 1 || level > 22) {
+#endif
+ return (ARCHIVE_WARN);
+ }
+ data->compression_level = level;
+ return (ARCHIVE_OK);
+ }
+
+ /* Note: The "warn" return is just to inform the options
+ * supervisor that we didn't handle it. It will generate
+ * a suitable error if no one used this option. */
+ return (ARCHIVE_WARN);
+}
+
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+/*
+ * Setup callback.
+ */
+static int
+archive_compressor_zstd_open(struct archive_write_filter *f)
+{
+ struct private_data *data = (struct private_data *)f->data;
+ int ret;
+
+ ret = __archive_write_open_filter(f->next_filter);
+ if (ret != ARCHIVE_OK)
+ return (ret);
+
+ if (data->out.dst == NULL) {
+ size_t bs = ZSTD_CStreamOutSize(), bpb;
+ if (f->archive->magic == ARCHIVE_WRITE_MAGIC) {
+ /* Buffer size should be a multiple number of
+ * the of bytes per block for performance. */
+ bpb = archive_write_get_bytes_per_block(f->archive);
+ if (bpb > bs)
+ bs = bpb;
+ else if (bpb != 0)
+ bs -= bs % bpb;
+ }
+ data->out.size = bs;
+ data->out.pos = 0;
+ data->out.dst
+ = (unsigned char *)malloc(data->out.size);
+ if (data->out.dst == NULL) {
+ archive_set_error(f->archive, ENOMEM,
+ "Can't allocate data for compression buffer");
+ return (ARCHIVE_FATAL);
+ }
+ }
+
+ f->write = archive_compressor_zstd_write;
+
+ if (ZSTD_isError(ZSTD_initCStream(data->cstream,
+ data->compression_level))) {
+ archive_set_error(f->archive, ARCHIVE_ERRNO_MISC,
+ "Internal error initializing zstd compressor object");
+ return (ARCHIVE_FATAL);
+ }
+
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Write data to the compressed stream.
+ */
+static int
+archive_compressor_zstd_write(struct archive_write_filter *f, const void *buff,
+ size_t length)
+{
+ struct private_data *data = (struct private_data *)f->data;
+ int ret;
+
+ /* Update statistics */
+ data->total_in += length;
+
+ if ((ret = drive_compressor(f, data, 0, buff, length)) != ARCHIVE_OK)
+ return (ret);
+
+ return (ARCHIVE_OK);
+}
+
+/*
+ * Finish the compression...
+ */
+static int
+archive_compressor_zstd_close(struct archive_write_filter *f)
+{
+ struct private_data *data = (struct private_data *)f->data;
+ int r1, r2;
+
+ /* Finish zstd frame */
+ r1 = drive_compressor(f, data, 1, NULL, 0);
+
+ r2 = __archive_write_close_filter(f->next_filter);
+
+ return r1 < r2 ? r1 : r2;
+}
+
+/*
+ * Utility function to push input data through compressor,
+ * writing full output blocks as necessary.
+ *
+ * Note that this handles both the regular write case (finishing ==
+ * false) and the end-of-archive case (finishing == true).
+ */
+static int
+drive_compressor(struct archive_write_filter *f,
+ struct private_data *data, int finishing, const void *src, size_t length)
+{
+ ZSTD_inBuffer in = (ZSTD_inBuffer) { src, length, 0 };
+
+ for (;;) {
+ if (data->out.pos == data->out.size) {
+ const int ret = __archive_write_filter(f->next_filter,
+ data->out.dst, data->out.size);
+ if (ret != ARCHIVE_OK)
+ return (ARCHIVE_FATAL);
+ data->out.pos = 0;
+ }
+
+ /* If there's nothing to do, we're done. */
+ if (!finishing && in.pos == in.size)
+ return (ARCHIVE_OK);
+
+ {
+ const size_t zstdret = !finishing ?
+ ZSTD_compressStream(data->cstream, &data->out, &in)
+ : ZSTD_endStream(data->cstream, &data->out);
+
+ if (ZSTD_isError(zstdret)) {
+ archive_set_error(f->archive,
+ ARCHIVE_ERRNO_MISC,
+ "Zstd compression failed: %s",
+ ZSTD_getErrorName(zstdret));
+ return (ARCHIVE_FATAL);
+ }
+
+ /* If we're finishing, 0 means nothing left to flush */
+ if (finishing && zstdret == 0) {
+ const int ret = __archive_write_filter(f->next_filter,
+ data->out.dst, data->out.pos);
+ return (ret);
+ }
+ }
+ }
+}
+
+#else /* HAVE_ZSTD_H && HAVE_LIBZSTD */
+
+static int
+archive_compressor_zstd_open(struct archive_write_filter *f)
+{
+ struct private_data *data = (struct private_data *)f->data;
+ struct archive_string as;
+ int r;
+
+ archive_string_init(&as);
+ archive_string_sprintf(&as, "zstd -%d", data->compression_level);
+
+ f->write = archive_compressor_zstd_write;
+ r = __archive_write_program_open(f, data->pdata, as.s);
+ archive_string_free(&as);
+ return (r);
+}
+
+static int
+archive_compressor_zstd_write(struct archive_write_filter *f, const void *buff,
+ size_t length)
+{
+ struct private_data *data = (struct private_data *)f->data;
+
+ return __archive_write_program_write(f, data->pdata, buff, length);
+}
+
+static int
+archive_compressor_zstd_close(struct archive_write_filter *f)
+{
+ struct private_data *data = (struct private_data *)f->data;
+
+ return __archive_write_program_close(f, data->pdata);
+}
+
+#endif /* HAVE_ZSTD_H && HAVE_LIBZSTD */
diff --git a/archivers/libarchive/files/libarchive/archive_write_disk_posix.c b/archivers/libarchive/files/libarchive/archive_write_disk_posix.c
index 6ad53992fd8..3fd5f579851 100644
--- a/archivers/libarchive/files/libarchive/archive_write_disk_posix.c
+++ b/archivers/libarchive/files/libarchive/archive_write_disk_posix.c
@@ -835,7 +835,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
}
int
-archive_write_disk_set_skip_file(struct archive *_a, int64_t d, int64_t i)
+archive_write_disk_set_skip_file(struct archive *_a, la_int64_t d, la_int64_t i)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
@@ -1786,7 +1786,7 @@ finish_metadata:
int
archive_write_disk_set_group_lookup(struct archive *_a,
void *private_data,
- int64_t (*lookup_gid)(void *private, const char *gname, int64_t gid),
+ la_int64_t (*lookup_gid)(void *private, const char *gname, la_int64_t gid),
void (*cleanup_gid)(void *private))
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
@@ -1822,7 +1822,7 @@ archive_write_disk_set_user_lookup(struct archive *_a,
}
int64_t
-archive_write_disk_gid(struct archive *_a, const char *name, int64_t id)
+archive_write_disk_gid(struct archive *_a, const char *name, la_int64_t id)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
@@ -1833,7 +1833,7 @@ archive_write_disk_gid(struct archive *_a, const char *name, int64_t id)
}
int64_t
-archive_write_disk_uid(struct archive *_a, const char *name, int64_t id)
+archive_write_disk_uid(struct archive *_a, const char *name, la_int64_t id)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
@@ -1981,6 +1981,10 @@ restore_entry(struct archive_write_disk *a)
if ((en == EISDIR || en == EEXIST)
&& (a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE)) {
/* If we're not overwriting, we're done. */
+ if (S_ISDIR(a->mode)) {
+ /* Don't overwrite any settings on existing directories. */
+ a->todo = 0;
+ }
archive_entry_unset_size(a->entry);
return (ARCHIVE_OK);
}
diff --git a/archivers/libarchive/files/libarchive/archive_write_disk_windows.c b/archivers/libarchive/files/libarchive/archive_write_disk_windows.c
index 94b016edf01..78eda4abc8d 100644
--- a/archivers/libarchive/files/libarchive/archive_write_disk_windows.c
+++ b/archivers/libarchive/files/libarchive/archive_write_disk_windows.c
@@ -906,7 +906,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
}
int
-archive_write_disk_set_skip_file(struct archive *_a, int64_t d, int64_t i)
+archive_write_disk_set_skip_file(struct archive *_a, la_int64_t d, la_int64_t i)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
@@ -1156,7 +1156,7 @@ _archive_write_disk_finish_entry(struct archive *_a)
int
archive_write_disk_set_group_lookup(struct archive *_a,
void *private_data,
- int64_t (*lookup_gid)(void *private, const char *gname, int64_t gid),
+ la_int64_t (*lookup_gid)(void *private, const char *gname, la_int64_t gid),
void (*cleanup_gid)(void *private))
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
@@ -1192,7 +1192,7 @@ archive_write_disk_set_user_lookup(struct archive *_a,
}
int64_t
-archive_write_disk_gid(struct archive *_a, const char *name, int64_t id)
+archive_write_disk_gid(struct archive *_a, const char *name, la_int64_t id)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
@@ -1203,7 +1203,7 @@ archive_write_disk_gid(struct archive *_a, const char *name, int64_t id)
}
int64_t
-archive_write_disk_uid(struct archive *_a, const char *name, int64_t id)
+archive_write_disk_uid(struct archive *_a, const char *name, la_int64_t id)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
@@ -1322,9 +1322,20 @@ restore_entry(struct archive_write_disk *a)
}
}
+ if ((en == ENOENT) && (archive_entry_hardlink(a->entry) != NULL)) {
+ archive_set_error(&a->archive, en,
+ "Hard-link target '%s' does not exist.",
+ archive_entry_hardlink(a->entry));
+ return (ARCHIVE_FAILED);
+ }
+
if ((en == EISDIR || en == EEXIST)
&& (a->flags & ARCHIVE_EXTRACT_NO_OVERWRITE)) {
/* If we're not overwriting, we're done. */
+ if (S_ISDIR(a->mode)) {
+ /* Don't overwrite any settings on existing directories. */
+ a->todo = 0;
+ }
archive_entry_unset_size(a->entry);
return (ARCHIVE_OK);
}
diff --git a/archivers/libarchive/files/libarchive/archive_write_filter.3 b/archivers/libarchive/files/libarchive/archive_write_filter.3
index e1d18915064..d6fa07131a8 100644
--- a/archivers/libarchive/files/libarchive/archive_write_filter.3
+++ b/archivers/libarchive/files/libarchive/archive_write_filter.3
@@ -42,7 +42,8 @@
.Nm archive_write_add_filter_none ,
.Nm archive_write_add_filter_program ,
.Nm archive_write_add_filter_uuencode ,
-.Nm archive_write_add_filter_xz
+.Nm archive_write_add_filter_xz ,
+.Nm archive_write_add_filter_zstd ,
.Nd functions enabling output filters
.Sh LIBRARY
Streaming Archive Library (libarchive, -larchive)
@@ -76,6 +77,8 @@ Streaming Archive Library (libarchive, -larchive)
.Fn archive_write_add_filter_uuencode "struct archive *"
.Ft int
.Fn archive_write_add_filter_xz "struct archive *"
+.Ft int
+.Fn archive_write_add_filter_zstd "struct archive *"
.Sh DESCRIPTION
.Bl -tag -width indent
.It Xo
@@ -89,6 +92,7 @@ Streaming Archive Library (libarchive, -larchive)
.Fn archive_write_add_filter_lzma ,
.Fn archive_write_add_filter_lzop ,
.Fn archive_write_add_filter_xz ,
+.Fn archive_write_add_filter_zstd ,
.Xc
The resulting archive will be compressed as specified.
Note that the compressed output is always properly blocked.
diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c b/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c
index 41ed74daf1b..f63a2266a85 100644
--- a/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c
+++ b/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c
@@ -2095,19 +2095,6 @@ compression_init_encoder_lzma2(struct archive *a,
/*
* _7_PPMD compressor.
*/
-static void *
-ppmd_alloc(void *p, size_t size)
-{
- (void)p;
- return malloc(size);
-}
-static void
-ppmd_free(void *p, void *address)
-{
- (void)p;
- free(address);
-}
-static ISzAlloc g_szalloc = { ppmd_alloc, ppmd_free };
static void
ppmd_write(void *p, Byte b)
{
@@ -2167,7 +2154,7 @@ compression_init_encoder_ppmd(struct archive *a,
archive_le32enc(props+1, msize);
__archive_ppmd7_functions.Ppmd7_Construct(&strm->ppmd7_context);
r = __archive_ppmd7_functions.Ppmd7_Alloc(
- &strm->ppmd7_context, msize, &g_szalloc);
+ &strm->ppmd7_context, msize);
if (r == 0) {
free(strm->buff);
free(strm);
@@ -2243,7 +2230,7 @@ compression_end_ppmd(struct archive *a, struct la_zstream *lastrm)
(void)a; /* UNUSED */
strm = (struct ppmd_stream *)lastrm->real_stream;
- __archive_ppmd7_functions.Ppmd7_Free(&strm->ppmd7_context, &g_szalloc);
+ __archive_ppmd7_functions.Ppmd7_Free(&strm->ppmd7_context);
free(strm->buff);
free(strm);
lastrm->real_stream = NULL;
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 441119d5d71..50305ccbeda 100644
--- a/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c
+++ b/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c
@@ -180,7 +180,7 @@ archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
}
memset(buff, ' ', 60);
- strncpy(&buff[AR_fmag_offset], "`\n", 2);
+ memcpy(&buff[AR_fmag_offset], "`\n", 2);
if (strcmp(pathname, "/") == 0 ) {
/* Entry is archive symbol table in GNU format */
@@ -189,7 +189,7 @@ archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
}
if (strcmp(pathname, "__.SYMDEF") == 0) {
/* Entry is archive symbol table in BSD format */
- strncpy(buff + AR_name_offset, "__.SYMDEF", 9);
+ memcpy(buff + AR_name_offset, "__.SYMDEF", 9);
goto stat;
}
if (strcmp(pathname, "//") == 0) {
@@ -225,7 +225,7 @@ archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
* actually 15 bytes.
*/
if (strlen(filename) <= 15) {
- strncpy(&buff[AR_name_offset],
+ memcpy(&buff[AR_name_offset],
filename, strlen(filename));
buff[AR_name_offset + strlen(filename)] = '/';
} else {
@@ -248,7 +248,7 @@ archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
return (ARCHIVE_FATAL);
}
- strncpy(se, filename, strlen(filename));
+ memcpy(se, filename, strlen(filename));
strcpy(se + strlen(filename), "/\n");
ss = strstr(ar->strtab, se);
@@ -285,11 +285,11 @@ archive_write_ar_header(struct archive_write *a, struct archive_entry *entry)
* archive header.
*/
if (strlen(filename) <= 16 && strchr(filename, ' ') == NULL) {
- strncpy(&buff[AR_name_offset], filename, strlen(filename));
+ memcpy(&buff[AR_name_offset], filename, strlen(filename));
buff[AR_name_offset + strlen(filename)] = ' ';
}
else {
- strncpy(buff + AR_name_offset, "#1/", 3);
+ memcpy(buff + AR_name_offset, "#1/", 3);
if (format_decimal(strlen(filename),
buff + AR_name_offset + 3,
AR_name_size - 3)) {
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 0eaf733cd9a..3cebeae187d 100644
--- a/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c
+++ b/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c
@@ -1654,7 +1654,7 @@ build_pax_attribute_name(char *dest, const char *src)
* GNU PAX Format 1.0 requires the special name, which pattern is:
* <dir>/GNUSparseFile.<pid>/<original file name>
*
- * Since reproducable archives are more important, use 0 as pid.
+ * Since reproducible archives are more important, use 0 as pid.
*
* This function is used for only Sparse file, a file type of which
* is regular file.
diff --git a/archivers/libarchive/files/libarchive/test/CMakeLists.txt b/archivers/libarchive/files/libarchive/test/CMakeLists.txt
index ee8686bae98..3bc8b775263 100644
--- a/archivers/libarchive/files/libarchive/test/CMakeLists.txt
+++ b/archivers/libarchive/files/libarchive/test/CMakeLists.txt
@@ -69,6 +69,7 @@ IF(ENABLE_TEST)
test_compat_uudecode_large.c
test_compat_xz.c
test_compat_zip.c
+ test_compat_zstd.c
test_empty_write.c
test_entry.c
test_entry_strmode.c
@@ -226,6 +227,7 @@ IF(ENABLE_TEST)
test_write_filter_program.c
test_write_filter_uuencode.c
test_write_filter_xz.c
+ test_write_filter_zstd.c
test_write_format_7zip.c
test_write_format_7zip_empty.c
test_write_format_7zip_large.c
diff --git a/archivers/libarchive/files/libarchive/test/list.h b/archivers/libarchive/files/libarchive/test/list.h
index 72e88f5df90..311a9834c35 100644
--- a/archivers/libarchive/files/libarchive/test/list.h
+++ b/archivers/libarchive/files/libarchive/test/list.h
@@ -58,6 +58,7 @@ DEFINE_TEST(test_archive_write_add_filter_by_name_lzma)
DEFINE_TEST(test_archive_write_add_filter_by_name_lzop)
DEFINE_TEST(test_archive_write_add_filter_by_name_uuencode)
DEFINE_TEST(test_archive_write_add_filter_by_name_xz)
+DEFINE_TEST(test_archive_write_add_filter_by_name_zstd)
DEFINE_TEST(test_archive_write_set_filter_option)
DEFINE_TEST(test_archive_write_set_format_by_name_7zip)
DEFINE_TEST(test_archive_write_set_format_by_name_ar)
@@ -133,6 +134,8 @@ DEFINE_TEST(test_compat_zip_4)
DEFINE_TEST(test_compat_zip_5)
DEFINE_TEST(test_compat_zip_6)
DEFINE_TEST(test_compat_zip_7)
+DEFINE_TEST(test_compat_zip_8)
+DEFINE_TEST(test_compat_zstd)
DEFINE_TEST(test_empty_write)
DEFINE_TEST(test_entry)
DEFINE_TEST(test_entry_strmode)
@@ -420,6 +423,7 @@ DEFINE_TEST(test_write_filter_lzop)
DEFINE_TEST(test_write_filter_program)
DEFINE_TEST(test_write_filter_uuencode)
DEFINE_TEST(test_write_filter_xz)
+DEFINE_TEST(test_write_filter_zstd)
DEFINE_TEST(test_write_format_7zip)
DEFINE_TEST(test_write_format_7zip_basic_bzip2)
DEFINE_TEST(test_write_format_7zip_basic_copy)
diff --git a/archivers/libarchive/files/libarchive/test/read_open_memory.c b/archivers/libarchive/files/libarchive/test/read_open_memory.c
index 2bb8d54751c..daa3c3a1f02 100644
--- a/archivers/libarchive/files/libarchive/test/read_open_memory.c
+++ b/archivers/libarchive/files/libarchive/test/read_open_memory.c
@@ -91,9 +91,11 @@ read_open_memory_internal(struct archive *a, const void *buff,
switch (level) {
case 3:
archive_read_set_seek_callback(a, memory_read_seek);
+ __LA_FALLTHROUGH;
case 2:
archive_read_set_open_callback(a, memory_read_open);
archive_read_set_skip_callback(a, memory_read_skip);
+ __LA_FALLTHROUGH;
case 1:
mine = malloc(sizeof(*mine));
if (mine == NULL) {
diff --git a/archivers/libarchive/files/libarchive/test/test.h b/archivers/libarchive/files/libarchive/test/test.h
index fd679f5f2ff..c0a0c0d8719 100644
--- a/archivers/libarchive/files/libarchive/test/test.h
+++ b/archivers/libarchive/files/libarchive/test/test.h
@@ -33,4 +33,10 @@
#define EXTRA_ERRNO(x) archive_errno((struct archive *)(x))
#define EXTRA_VERSION archive_version_details()
+#if defined(__GNUC__) && (__GNUC__ >= 7)
+#define __LA_FALLTHROUGH __attribute__((fallthrough))
+#else
+#define __LA_FALLTHROUGH
+#endif
+
#include "test_common.h"
diff --git a/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c b/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c
index a3868a627ee..410582bfc7b 100644
--- a/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c
+++ b/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c
@@ -408,7 +408,9 @@ acl_flagset_to_bitmap(acl_flagset_t opaque_fs)
{ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, RICHACE_INHERIT_ONLY_ACE},
{ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, RICHACE_INHERITED_ACE}
#else /* FreeBSD NFSv4 ACL inheritance flags */
+#ifdef ACL_ENTRY_INHERITED
{ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED},
+#endif
{ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT},
{ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT},
{ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT},
diff --git a/archivers/libarchive/files/libarchive/test/test_archive_write_add_filter_by_name.c b/archivers/libarchive/files/libarchive/test/test_archive_write_add_filter_by_name.c
index 38b606b9d16..d962af92311 100644
--- a/archivers/libarchive/files/libarchive/test/test_archive_write_add_filter_by_name.c
+++ b/archivers/libarchive/files/libarchive/test/test_archive_write_add_filter_by_name.c
@@ -207,3 +207,8 @@ DEFINE_TEST(test_archive_write_add_filter_by_name_xz)
{
test_filter_by_name("xz", ARCHIVE_FILTER_XZ, cannot);
}
+
+DEFINE_TEST(test_archive_write_add_filter_by_name_zstd)
+{
+ test_filter_by_name("zstd", ARCHIVE_FILTER_ZSTD, canZstd);
+}
diff --git a/archivers/libarchive/files/libarchive/test/test_compat_zip.c b/archivers/libarchive/files/libarchive/test/test_compat_zip.c
index bb6d92ef498..39152206c1b 100644
--- a/archivers/libarchive/files/libarchive/test/test_compat_zip.c
+++ b/archivers/libarchive/files/libarchive/test/test_compat_zip.c
@@ -422,3 +422,29 @@ DEFINE_TEST(test_compat_zip_7)
}
free(p);
}
+
+/**
+ * A file with backslash path separators instead of slashes.
+ * PowerShell's Compress-Archive cmdlet produces such archives.
+ */
+DEFINE_TEST(test_compat_zip_8)
+{
+ const char *refname = "test_compat_zip_8.zip";
+ struct archive *a;
+ struct archive_entry *ae;
+ void *p;
+ size_t s;
+
+ extract_reference_file(refname);
+ p = slurpfile(&s, refname);
+
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a));
+ assertEqualIntA(a, ARCHIVE_OK, read_open_memory_minimal(a, p, s, 7));
+
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ /* This file is in the archive as arc\test */
+ assertEqualString("arc/test", archive_entry_pathname(ae));
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a));
+ free(p);
+}
diff --git a/archivers/libarchive/files/libarchive/test/test_compat_zip_8.zip.uu b/archivers/libarchive/files/libarchive/test/test_compat_zip_8.zip.uu
new file mode 100644
index 00000000000..316b6f62d4b
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/test/test_compat_zip_8.zip.uu
@@ -0,0 +1,6 @@
+begin 666 test_compat_zip_8.zip
+M4$L#!!0````(`%A\;TOY6""D$`````X````(````87)C7'1E<W3[_Z^$(96A
+MF*&$@9>!BP$`4$L!`A0`%`````@`6'QO2_E8(*00````#@````@`````````
+H`````````````&%R8UQT97-T4$L%!@`````!``$`-@```#8`````````
+`
+end
diff --git a/archivers/libarchive/files/libarchive/test/test_compat_zstd.c b/archivers/libarchive/files/libarchive/test/test_compat_zstd.c
new file mode 100644
index 00000000000..1d63a2845ff
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/test/test_compat_zstd.c
@@ -0,0 +1,82 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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$");
+
+/*
+ * Verify our ability to read sample files compatibly with 'zstd -d'.
+ *
+ * In particular:
+ * * zstd -d will read multiple zstd streams, concatenating the output
+ * * zstd -d will skip over zstd skippable frames
+ */
+
+static void
+compat_zstd(const char *name)
+{
+ const char *n[7] = { "f1", "f2", "f3", "d1/f1", "d1/f2", "d1/f3", NULL };
+ struct archive_entry *ae;
+ struct archive *a;
+ int i, r;
+
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
+ r = archive_read_support_filter_zstd(a);
+ if (r == ARCHIVE_WARN) {
+ skipping("zstd reading not fully supported on this platform");
+ assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+ return;
+ }
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+ extract_reference_file(name);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 2));
+
+ /* Read entries, match up names with list above. */
+ for (i = 0; i < 6; ++i) {
+ failure("Could not read file %d (%s) from %s", i, n[i], name);
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_next_header(a, &ae));
+ assertEqualString(n[i], archive_entry_pathname(ae));
+ }
+
+ /* Verify the end-of-archive. */
+ assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
+
+ /* Verify that the format detection worked. */
+ assertEqualInt(archive_filter_code(a, 0), ARCHIVE_FILTER_ZSTD);
+ assertEqualString(archive_filter_name(a, 0), "zstd");
+ assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR_USTAR);
+
+ assertEqualInt(ARCHIVE_OK, archive_read_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
+
+
+DEFINE_TEST(test_compat_zstd)
+{
+ /* This sample was compressed as 3 separate streams with a zstd skippable
+ * frame placed in the middle */
+ compat_zstd("test_compat_zstd_1.tar.zst");
+}
diff --git a/archivers/libarchive/files/libarchive/test/test_compat_zstd_1.tar.zst.uu b/archivers/libarchive/files/libarchive/test/test_compat_zstd_1.tar.zst.uu
new file mode 100644
index 00000000000..4b0b98447ff
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/test/test_compat_zstd_1.tar.zst.uu
@@ -0,0 +1,12 @@
+begin 644 test_compat_zstd_1.tar.zst
+M*+4O_010)0,`HL0.%;`Q&>>\/$2[#IQF[<1+Z3T<0CX]!77&0@R.6+/F,0+I
+M.$1A$QE2`J!+*_6[_YT9_W_M1KC-EG*V>10.`,M`%3*@#F#\`-FT#J:1#U1"
+M`H1!&R#<!.<"@#3@M58XY1,8`DMMD\@HM2_]!%!=`P`B!1`5H#D!0!.SELJ"
+M5#509I*T/YQ^]?H/3T1D>A5\*'"JYIJ;C&4=B2CL(L)*E-IJT/RV?.:A_]_N
+MB&[7SDG;/=4&#P";0!5D0`=8T0&R&19,)1^HA`0(@S9`N`G.!0!IP&NM<,K!
+M-#8!%A]U]K10*DT8!`````$"`P0HM2_]!%!]`P`B11`6H+$)"%]@,Z6OH`"L
+MM$R2MAN&*MSG`W?OJ7+4P*B::VXR`NM(1&$7&58"J*U'_&V^S$/_O]U1N%T[
+M)VW7J'+4!A``_4$%^T`],J`8P.0!L@D63"4?J(0$"(,V0+@)S@4`:<!KK7!J
+)P51V`E@!9CD#
+`
+end
diff --git a/archivers/libarchive/files/libarchive/test/test_fuzz.c b/archivers/libarchive/files/libarchive/test/test_fuzz.c
index ce7b8663fae..42351450b26 100644
--- a/archivers/libarchive/files/libarchive/test/test_fuzz.c
+++ b/archivers/libarchive/files/libarchive/test/test_fuzz.c
@@ -413,6 +413,12 @@ DEFINE_TEST(test_fuzz_tar)
NULL
};
#endif
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+ static const char *fileset10[] = {
+ "test_compat_zstd_1.tar.zst",
+ NULL
+ };
+#endif
static const struct files filesets[] = {
{0, fileset1}, /* Exercise bzip2 decompressor. */
{1, fileset1},
@@ -426,6 +432,9 @@ DEFINE_TEST(test_fuzz_tar)
#if HAVE_LIBLZO2 && HAVE_LZO_LZO1X_H && HAVE_LZO_LZOCONF_H
{0, fileset9}, /* Exercise lzo decompressor. */
#endif
+#if HAVE_ZSTD_H && HAVE_LIBZSTD
+ {0, fileset10}, /* Excercise zstd decompressor. */
+#endif
{1, NULL}
};
test_fuzz(filesets);
diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip.c
index cea2676f3ea..6cc25a6676f 100644
--- a/archivers/libarchive/files/libarchive/test/test_read_format_zip.c
+++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip.c
@@ -41,6 +41,7 @@ verify_basic(struct archive *a, int seek_checks)
int64_t o;
assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("ZIP 1.0 (uncompressed)", archive_format_name(a));
assertEqualString("dir/", archive_entry_pathname(ae));
assertEqualInt(1179604249, archive_entry_mtime(ae));
assertEqualInt(0, archive_entry_size(ae));
@@ -53,6 +54,7 @@ verify_basic(struct archive *a, int seek_checks)
assertEqualInt((int)s, 0);
assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("ZIP 2.0 (deflation)", archive_format_name(a));
assertEqualString("file1", archive_entry_pathname(ae));
assertEqualInt(1179604289, archive_entry_mtime(ae));
if (seek_checks)
@@ -72,6 +74,7 @@ verify_basic(struct archive *a, int seek_checks)
}
assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+ assertEqualString("ZIP 2.0 (deflation)", archive_format_name(a));
assertEqualString("file2", archive_entry_pathname(ae));
assertEqualInt(1179605932, archive_entry_mtime(ae));
assertEqualInt(archive_entry_is_encrypted(ae), 0);
@@ -93,6 +96,7 @@ verify_basic(struct archive *a, int seek_checks)
assert(archive_errno(a) != 0);
}
assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae));
+ assertEqualString("ZIP 2.0 (deflation)", archive_format_name(a));
/* Verify the number of files read. */
failure("the archive file has three files");
assertEqualInt(3, archive_file_count(a));
diff --git a/archivers/libarchive/files/libarchive/test/test_sparse_basic.c b/archivers/libarchive/files/libarchive/test/test_sparse_basic.c
index 9d45f0fedc1..58d53a94e07 100644
--- a/archivers/libarchive/files/libarchive/test/test_sparse_basic.c
+++ b/archivers/libarchive/files/libarchive/test/test_sparse_basic.c
@@ -118,13 +118,26 @@ create_sparse_file(const char *path, const struct sparse *s)
assert(handle != INVALID_HANDLE_VALUE);
assert(DeviceIoControl(handle, FSCTL_SET_SPARSE, NULL, 0,
NULL, 0, &dmy, NULL) != 0);
+
+ size_t offsetSoFar = 0;
+
while (s->type != END) {
if (s->type == HOLE) {
- LARGE_INTEGER distance;
-
- distance.QuadPart = s->size;
- assert(SetFilePointerEx(handle, distance,
- NULL, FILE_CURRENT) != 0);
+ LARGE_INTEGER fileOffset, beyondOffset, distanceToMove;
+ fileOffset.QuadPart = offsetSoFar;
+ beyondOffset.QuadPart = offsetSoFar + s->size;
+ distanceToMove.QuadPart = s->size;
+
+ FILE_ZERO_DATA_INFORMATION zeroInformation;
+ zeroInformation.FileOffset = fileOffset;
+ zeroInformation.BeyondFinalZero = beyondOffset;
+
+ DWORD bytesReturned;
+ assert(SetFilePointerEx(handle, distanceToMove,
+ NULL, FILE_CURRENT) != 0);
+ assert(SetEndOfFile(handle) != 0);
+ assert(DeviceIoControl(handle, FSCTL_SET_ZERO_DATA, &zeroInformation,
+ sizeof(FILE_ZERO_DATA_INFORMATION), NULL, 0, &bytesReturned, NULL) != 0);
} else {
DWORD w, wr;
size_t size;
@@ -139,6 +152,7 @@ create_sparse_file(const char *path, const struct sparse *s)
size -= wr;
}
}
+ offsetSoFar += s->size;
s++;
}
assertEqualInt(CloseHandle(handle), 1);
@@ -484,10 +498,15 @@ DEFINE_TEST(test_sparse_basic)
* on all platform.
*/
const struct sparse sparse_file0[] = {
+ // 0 // 1024
{ DATA, 1024 }, { HOLE, 2048000 },
+ // 2049024 // 2051072
{ DATA, 2048 }, { HOLE, 2048000 },
+ // 4099072 // 4103168
{ DATA, 4096 }, { HOLE, 20480000 },
+ // 24583168 // 24591360
{ DATA, 8192 }, { HOLE, 204800000 },
+ // 229391360 // 229391361
{ DATA, 1 }, { END, 0 }
};
const struct sparse sparse_file1[] = {
diff --git a/archivers/libarchive/files/libarchive/test/test_write_disk_perms.c b/archivers/libarchive/files/libarchive/test/test_write_disk_perms.c
index 4b68e52b4ee..8205d6abc59 100644
--- a/archivers/libarchive/files/libarchive/test/test_write_disk_perms.c
+++ b/archivers/libarchive/files/libarchive/test/test_write_disk_perms.c
@@ -131,6 +131,8 @@ DEFINE_TEST(test_write_disk_perms)
struct archive *a;
struct archive_entry *ae;
struct stat st;
+ uid_t original_uid;
+ uid_t try_to_change_uid;
assertUmask(UMASK);
@@ -201,6 +203,37 @@ DEFINE_TEST(test_write_disk_perms)
failure("dir_overwrite_0744: st.st_mode=%o", st.st_mode);
assertEqualInt(st.st_mode & 0777, 0744);
+ /* For dir, the owner should get left when not overwritting. */
+ assertMakeDir("dir_owner", 0744);
+
+ if (getuid() == 0) {
+ original_uid = getuid() + 1;
+ try_to_change_uid = getuid();
+ assertEqualInt(0, chown("dir_owner", original_uid, getgid()));
+ } else {
+ original_uid = getuid();
+ try_to_change_uid = getuid() + 1;
+ }
+
+ /* Check original owner. */
+ assertEqualInt(0, stat("dir_owner", &st));
+ failure("dir_owner: st.st_uid=%d", st.st_uid);
+ assertEqualInt(st.st_uid, original_uid);
+ /* Shouldn't try to edit the owner when no overwrite option is set. */
+ assert((ae = archive_entry_new()) != NULL);
+ archive_entry_copy_pathname(ae, "dir_owner");
+ archive_entry_set_mode(ae, S_IFDIR | 0744);
+ archive_entry_set_uid(ae, try_to_change_uid);
+ archive_write_disk_set_options(a,
+ ARCHIVE_EXTRACT_OWNER | ARCHIVE_EXTRACT_NO_OVERWRITE);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
+ archive_entry_free(ae);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_finish_entry(a));
+ /* Make sure they're unchanged. */
+ assertEqualInt(0, stat("dir_owner", &st));
+ failure("dir_owner: st.st_uid=%d", st.st_uid);
+ assertEqualInt(st.st_uid, original_uid);
+
/* Write a regular file with SUID bit, but don't use _EXTRACT_PERM. */
assert((ae = archive_entry_new()) != NULL);
archive_entry_copy_pathname(ae, "file_no_suid");
diff --git a/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c b/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c
index 7bbdb1232a9..935fb51f514 100644
--- a/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c
+++ b/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c
@@ -39,6 +39,7 @@ DEFINE_TEST(test_write_filter_gzip)
struct archive* a;
char *buff, *data;
size_t buffsize, datasize;
+ unsigned char *rbuff;
char path[16];
size_t used1, used2;
int i, r, use_prog = 0;
@@ -58,6 +59,7 @@ DEFINE_TEST(test_write_filter_gzip)
/*
* Write a 100 files and read them all back.
+ * Use default compression level (6).
*/
assert((a = archive_write_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
@@ -93,6 +95,14 @@ DEFINE_TEST(test_write_filter_gzip)
assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+ /* Basic gzip header tests */
+ rbuff = (unsigned char *)buff;
+ assertEqualInt(rbuff[0], 0x1f);
+ assertEqualInt(rbuff[1], 0x8b);
+ assertEqualInt(rbuff[2], 0x08);
+ assertEqualInt(rbuff[3], 0x00);
+ assertEqualInt(rbuff[8], 0); /* RFC 1952 flag for compression level 6 */
+
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
r = archive_read_support_filter_gzip(a);
@@ -116,7 +126,7 @@ DEFINE_TEST(test_write_filter_gzip)
/*
* Repeat the cycle again, this time setting some compression
- * options.
+ * options. Compression level is 9.
*/
assert((a = archive_write_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
@@ -150,6 +160,14 @@ DEFINE_TEST(test_write_filter_gzip)
assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+ /* Basic gzip header tests */
+ rbuff = (unsigned char *)buff;
+ assertEqualInt(rbuff[0], 0x1f);
+ assertEqualInt(rbuff[1], 0x8b);
+ assertEqualInt(rbuff[2], 0x08);
+ assertEqualInt(rbuff[3], 0x00);
+ assertEqualInt(rbuff[8], 2); /* RFC 1952 flag for compression level 9 */
+
/* Curiously, this test fails; the test data above compresses
* better at default compression than at level 9. */
/*
@@ -181,7 +199,7 @@ DEFINE_TEST(test_write_filter_gzip)
assertEqualInt(ARCHIVE_OK, archive_read_free(a));
/*
- * Repeat again, with much lower compression.
+ * Repeat again, with compression level 1
*/
assert((a = archive_write_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
@@ -213,6 +231,14 @@ DEFINE_TEST(test_write_filter_gzip)
(int)used2, (int)used1);
assert(used2 > used1);
+ /* Basic gzip header tests */
+ rbuff = (unsigned char *)buff;
+ assertEqualInt(rbuff[0], 0x1f);
+ assertEqualInt(rbuff[1], 0x8b);
+ assertEqualInt(rbuff[2], 0x08);
+ assertEqualInt(rbuff[3], 0x00);
+ assertEqualInt(rbuff[8], 4); /* RFC 1952 flag for compression level 1 */
+
assert((a = archive_read_new()) != NULL);
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
diff --git a/archivers/libarchive/files/libarchive/test/test_write_filter_zstd.c b/archivers/libarchive/files/libarchive/test/test_write_filter_zstd.c
new file mode 100644
index 00000000000..da3c806671a
--- /dev/null
+++ b/archivers/libarchive/files/libarchive/test/test_write_filter_zstd.c
@@ -0,0 +1,201 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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.
+ */
+
+#include "test.h"
+__FBSDID("$FreeBSD$");
+
+DEFINE_TEST(test_write_filter_zstd)
+{
+ struct archive_entry *ae;
+ struct archive *a;
+ char *buff, *data;
+ size_t buffsize, datasize;
+ char path[16];
+ size_t used1, used2;
+ int i, r;
+
+ buffsize = 2000000;
+ assert(NULL != (buff = (char *)malloc(buffsize)));
+ if (buff == NULL)
+ return;
+
+ datasize = 10000;
+ assert(NULL != (data = (char *)malloc(datasize)));
+ if (data == NULL) {
+ free(buff);
+ return;
+ }
+ memset(data, 0, datasize);
+
+ /*
+ * Write a 100 files and read them all back.
+ */
+ assert((a = archive_write_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
+ r = archive_write_add_filter_zstd(a);
+ if (r != ARCHIVE_OK) {
+ skipping("zstd writing not supported on this platform");
+ assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+ free(buff);
+ free(data);
+ return;
+ }
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_write_set_bytes_per_block(a, 10));
+ assertEqualInt(ARCHIVE_FILTER_ZSTD, archive_filter_code(a, 0));
+ assertEqualString("zstd", archive_filter_name(a, 0));
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, buffsize, &used1));
+ assertEqualInt(ARCHIVE_FILTER_ZSTD, archive_filter_code(a, 0));
+ assertEqualString("zstd", archive_filter_name(a, 0));
+ assert((ae = archive_entry_new()) != NULL);
+ archive_entry_set_filetype(ae, AE_IFREG);
+ archive_entry_set_size(ae, datasize);
+ for (i = 0; i < 100; i++) {
+ sprintf(path, "file%03d", i);
+ archive_entry_copy_pathname(ae, path);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
+ assertA(datasize
+ == (size_t)archive_write_data(a, data, datasize));
+ }
+ archive_entry_free(ae);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+ r = archive_read_support_filter_zstd(a);
+ if (r == ARCHIVE_WARN) {
+ skipping("Can't verify zstd writing by reading back;"
+ " zstd reading not fully supported on this platform");
+ } else {
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_support_filter_all(a));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_open_memory(a, buff, used1));
+ for (i = 0; i < 100; i++) {
+ sprintf(path, "file%03d", i);
+ if (!assertEqualInt(ARCHIVE_OK,
+ archive_read_next_header(a, &ae)))
+ break;
+ assertEqualString(path, archive_entry_pathname(ae));
+ assertEqualInt((int)datasize, archive_entry_size(ae));
+ }
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ }
+ assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+
+ /*
+ * Repeat the cycle again, this time setting some compression
+ * options.
+ */
+ assert((a = archive_write_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_write_set_bytes_per_block(a, 10));
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_zstd(a));
+ assertEqualIntA(a, ARCHIVE_FAILED,
+ archive_write_set_filter_option(a, NULL, "nonexistent-option", "0"));
+ assertEqualIntA(a, ARCHIVE_FAILED,
+ archive_write_set_filter_option(a, NULL, "compression-level", "abc"));
+ assertEqualIntA(a, ARCHIVE_FAILED,
+ archive_write_set_filter_option(a, NULL, "compression-level", "25")); /* too big */
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_write_set_filter_option(a, NULL, "compression-level", "9"));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_write_set_filter_option(a, NULL, "compression-level", "6"));
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, buffsize, &used2));
+ for (i = 0; i < 100; i++) {
+ sprintf(path, "file%03d", i);
+ assert((ae = archive_entry_new()) != NULL);
+ archive_entry_copy_pathname(ae, path);
+ archive_entry_set_size(ae, datasize);
+ archive_entry_set_filetype(ae, AE_IFREG);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
+ assertA(datasize == (size_t)archive_write_data(a, data, datasize));
+ archive_entry_free(ae);
+ }
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+
+ failure("compression-level=6 wrote %d bytes, default wrote %d bytes",
+ (int)used2, (int)used1);
+ assert(used2 < used1);
+
+ assert((a = archive_read_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+ r = archive_read_support_filter_zstd(a);
+ if (r == ARCHIVE_WARN) {
+ skipping("zstd reading not fully supported on this platform");
+ } else {
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_support_filter_all(a));
+ assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_open_memory(a, buff, used2));
+ for (i = 0; i < 100; i++) {
+ sprintf(path, "file%03d", i);
+ failure("Trying to read %s", path);
+ if (!assertEqualIntA(a, ARCHIVE_OK,
+ archive_read_next_header(a, &ae)))
+ break;
+ assertEqualString(path, archive_entry_pathname(ae));
+ assertEqualInt((int)datasize, archive_entry_size(ae));
+ }
+ assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+ }
+ assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+
+ /*
+ * Test various premature shutdown scenarios to make sure we
+ * don't crash or leak memory.
+ */
+ assert((a = archive_write_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_zstd(a));
+ assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+
+ assert((a = archive_write_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_zstd(a));
+ assertEqualInt(ARCHIVE_OK, archive_write_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+
+ assert((a = archive_write_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_zstd(a));
+ assertEqualInt(ARCHIVE_OK, archive_write_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+
+ assert((a = archive_write_new()) != NULL);
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_add_filter_zstd(a));
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, buffsize, &used2));
+ assertEqualInt(ARCHIVE_OK, archive_write_close(a));
+ assertEqualInt(ARCHIVE_OK, archive_write_free(a));
+
+ /*
+ * Clean up.
+ */
+ free(data);
+ free(buff);
+}
diff --git a/archivers/libarchive/files/tar/bsdtar.1 b/archivers/libarchive/files/tar/bsdtar.1
index cdc317b6cf4..132e1145794 100644
--- a/archivers/libarchive/files/tar/bsdtar.1
+++ b/archivers/libarchive/files/tar/bsdtar.1
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 25, 2017
+.Dd October 1, 2017
.Dt TAR 1
.Os
.Sh NAME
@@ -302,19 +302,18 @@ containing the string
Compress the resulting archive with
.Xr xz 1 .
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
.Nm tar
-implementations, this implementation recognizes XZ compression
-automatically when reading archives.
+implementation recognizes XZ compression automatically when reading archives.
.It Fl j , Fl Fl bzip , Fl Fl bzip2 , Fl Fl bunzip2
(c mode only)
Compress the resulting archive with
.Xr bzip2 1 .
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
.Nm tar
-implementations, this implementation recognizes bzip2 compression
-automatically when reading archives.
+implementation recognizes bzip2 compression automatically when reading
+archives.
.It Fl k , Fl Fl keep-old-files
(x mode only)
Do not overwrite existing files.
@@ -337,25 +336,41 @@ Issue a warning message unless all links to each file are archived.
Compress the resulting archive with
.Xr lrzip 1 .
In extract or list modes, this option is ignored.
+Note that this
+.Nm tar
+implementation recognizes lrzip compression automatically when reading
+archives.
.It Fl Fl lz4
(c mode only)
Compress the archive with lz4-compatible compression before writing it.
-In input mode, this option is ignored; lz4 compression is recognized
-automatically on input.
+In extract or list modes, this option is ignored.
+Note that this
+.Nm tar
+implementation recognizes lz4 compression automatically when reading archives.
+.It Fl Fl zstd
+(c mode only)
+Compress the archive with zstd-compatible compression before writing it.
+In extract or list modes, this option is ignored.
+Note that this
+.Nm tar
+implementation recognizes zstd compression automatically when reading archives.
.It Fl Fl lzma
(c mode only) Compress the resulting archive with the original LZMA algorithm.
+In extract or list modes, this option is ignored.
Use of this option is discouraged and new archives should be created with
.Fl Fl xz
instead.
-Note that, unlike other
+Note that this
.Nm tar
-implementations, this implementation recognizes LZMA compression
-automatically when reading archives.
+implementation recognizes LZMA compression automatically when reading archives.
.It Fl Fl lzop
(c mode only)
Compress the resulting archive with
.Xr lzop 1 .
In extract or list modes, this option is ignored.
+Note that this
+.Nm tar
+implementation recognizes LZO compression automatically when reading archives.
.It Fl m , Fl Fl modification-time
(x mode only)
Do not extract modification time.
@@ -577,6 +592,8 @@ A decimal integer from 4 to 7 specifying the lz4 compression block size
.It Cm lz4:block-dependence
Use the previous block of the block being compressed for
a compression dictionary to improve compression ratio.
+.It Cm zstd:compression-level
+A decimal integer from 1 to 22 specifying the zstd compression level.
.It Cm lzop:compression-level
A decimal integer from 1 to 9 specifying the lzop compression level.
.It Cm xz:compression-level
@@ -826,28 +843,28 @@ is run in x mode as root.
Compress the resulting archive with
.Xr bzip2 1 .
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
.Nm tar
-implementations, this implementation recognizes bzip2 compression
-automatically when reading archives.
+implementation recognizes bzip2 compression automatically when reading
+archives.
.It Fl Z , Fl Fl compress , Fl Fl uncompress
(c mode only)
Compress the resulting archive with
.Xr compress 1 .
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
.Nm tar
-implementations, this implementation recognizes compress compression
-automatically when reading archives.
+implementation recognizes compress compression automatically when reading
+archives.
.It Fl z , Fl Fl gunzip , Fl Fl gzip
(c mode only)
Compress the resulting archive with
.Xr gzip 1 .
In extract or list modes, this option is ignored.
-Note that, unlike other
+Note that this
.Nm tar
-implementations, this implementation recognizes gzip compression
-automatically when reading archives.
+implementation recognizes gzip compression automatically when reading
+archives.
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of
diff --git a/archivers/libarchive/files/tar/bsdtar.c b/archivers/libarchive/files/tar/bsdtar.c
index 9fc68332e5d..963bd4f9ad5 100644
--- a/archivers/libarchive/files/tar/bsdtar.c
+++ b/archivers/libarchive/files/tar/bsdtar.c
@@ -419,6 +419,7 @@ main(int argc, char **argv)
case OPTION_LZIP: /* GNU tar beginning with 1.23 */
case OPTION_LZMA: /* GNU tar beginning with 1.20 */
case OPTION_LZOP: /* GNU tar beginning with 1.21 */
+ case OPTION_ZSTD:
if (compression != '\0')
lafe_errc(1, 0,
"Can't specify both -%c and -%c", opt,
@@ -427,9 +428,10 @@ main(int argc, char **argv)
switch (opt) {
case OPTION_LRZIP: compression_name = "lrzip"; break;
case OPTION_LZ4: compression_name = "lz4"; break;
- case OPTION_LZIP: compression_name = "lzip"; break;
- case OPTION_LZMA: compression_name = "lzma"; break;
- case OPTION_LZOP: compression_name = "lzop"; break;
+ case OPTION_LZIP: compression_name = "lzip"; break;
+ case OPTION_LZMA: compression_name = "lzma"; break;
+ case OPTION_LZOP: compression_name = "lzop"; break;
+ case OPTION_ZSTD: compression_name = "zstd"; break;
}
break;
case 'm': /* SUSv2 */
@@ -918,7 +920,7 @@ usage(void)
static void
version(void)
{
- printf("bsdtar %s - %s\n",
+ printf("bsdtar %s - %s \n",
BSDTAR_VERSION_STRING,
archive_version_details());
exit(0);
diff --git a/archivers/libarchive/files/tar/bsdtar.h b/archivers/libarchive/files/tar/bsdtar.h
index 10a2cf2f9bd..543a228c907 100644
--- a/archivers/libarchive/files/tar/bsdtar.h
+++ b/archivers/libarchive/files/tar/bsdtar.h
@@ -181,7 +181,8 @@ enum {
OPTION_USE_COMPRESS_PROGRAM,
OPTION_UUENCODE,
OPTION_VERSION,
- OPTION_XATTRS
+ OPTION_XATTRS,
+ OPTION_ZSTD,
};
int bsdtar_getopt(struct bsdtar *);
diff --git a/archivers/libarchive/files/tar/cmdline.c b/archivers/libarchive/files/tar/cmdline.c
index e36c545b333..66cf4c2d196 100644
--- a/archivers/libarchive/files/tar/cmdline.c
+++ b/archivers/libarchive/files/tar/cmdline.c
@@ -160,6 +160,7 @@ static const struct bsdtar_option {
{ "version", 0, OPTION_VERSION },
{ "xattrs", 0, OPTION_XATTRS },
{ "xz", 0, 'J' },
+ { "zstd", 0, OPTION_ZSTD },
{ NULL, 0, 0 }
};
diff --git a/archivers/libarchive/files/tar/creation_set.c b/archivers/libarchive/files/tar/creation_set.c
index 24cf3fcdd4e..bdc607daeb2 100644
--- a/archivers/libarchive/files/tar/creation_set.c
+++ b/archivers/libarchive/files/tar/creation_set.c
@@ -80,9 +80,10 @@ get_filter_code(const char *suffix)
{ ".lzma", "lzma" },
{ ".uu", "uuencode" },
{ ".xz", "xz" },
+ { ".zst", "zstd"},
{ NULL, NULL }
};
-
+
return get_suffix_code(filters, suffix);
}
@@ -121,6 +122,7 @@ decompose_alias(const char *suffix)
{ ".tzo", ".tar.lzo" },
{ ".taZ", ".tar.Z" },
{ ".tZ", ".tar.Z" },
+ { ".tzst", ".tar.zst" },
{ NULL, NULL }
};
diff --git a/archivers/libarchive/files/tar/test/CMakeLists.txt b/archivers/libarchive/files/tar/test/CMakeLists.txt
index abd43b0f4b2..d7de42d6ab6 100644
--- a/archivers/libarchive/files/tar/test/CMakeLists.txt
+++ b/archivers/libarchive/files/tar/test/CMakeLists.txt
@@ -22,11 +22,13 @@ IF(ENABLE_TAR AND ENABLE_TEST)
test_extract_tar_lzma.c
test_extract_tar_lzo.c
test_extract_tar_xz.c
+ test_extract_tar_zstd.c
test_format_newc.c
test_help.c
test_leading_slash.c
test_missing_file.c
test_option_C_upper.c
+ test_option_C_mtree.c
test_option_H_upper.c
test_option_L_upper.c
test_option_O_upper.c
@@ -61,6 +63,7 @@ IF(ENABLE_TAR AND ENABLE_TEST)
test_option_xattrs.c
test_option_xz.c
test_option_z.c
+ test_option_zstd.c
test_patterns.c
test_print_longpath.c
test_stdio.c
diff --git a/archivers/libarchive/files/tar/test/list.h b/archivers/libarchive/files/tar/test/list.h
index 2b28490e779..b5397fae8ec 100644
--- a/archivers/libarchive/files/tar/test/list.h
+++ b/archivers/libarchive/files/tar/test/list.h
@@ -12,6 +12,7 @@ DEFINE_TEST(test_extract_tar_lzma)
DEFINE_TEST(test_extract_tar_lzo)
DEFINE_TEST(test_extract_tar_xz)
DEFINE_TEST(test_extract_tar_Z)
+DEFINE_TEST(test_extract_tar_zstd)
DEFINE_TEST(test_format_newc)
DEFINE_TEST(test_help)
DEFINE_TEST(test_leading_slash)
@@ -20,6 +21,7 @@ DEFINE_TEST(test_option_a)
DEFINE_TEST(test_option_acls)
DEFINE_TEST(test_option_b64encode)
DEFINE_TEST(test_option_b)
+DEFINE_TEST(test_option_C_mtree)
DEFINE_TEST(test_option_C_upper)
DEFINE_TEST(test_option_exclude)
DEFINE_TEST(test_option_fflags)
@@ -51,6 +53,7 @@ DEFINE_TEST(test_option_xattrs)
DEFINE_TEST(test_option_X_upper)
DEFINE_TEST(test_option_xz)
DEFINE_TEST(test_option_z)
+DEFINE_TEST(test_option_zstd)
DEFINE_TEST(test_patterns)
DEFINE_TEST(test_print_longpath)
DEFINE_TEST(test_stdio)
diff --git a/archivers/libarchive/files/tar/test/test_extract.tar.zst.uu b/archivers/libarchive/files/tar/test/test_extract.tar.zst.uu
new file mode 100644
index 00000000000..3df0caf5475
--- /dev/null
+++ b/archivers/libarchive/files/tar/test/test_extract.tar.zst.uu
@@ -0,0 +1,6 @@
+begin 644 test_extract.tar.zst
+M*+4O_010S0,`<L40$Z`5.(2U_RNV_[]L4V;Z_/R@1:7Y$3;9E`8$D$WI:W1)
+M'58'D3->Y+>!0*5E/PM"$7^K^1VI3SS-AX&_W0KQWY!-Z1(`_4$%[$"]<T!A
+L(*`#I!DXC4[J!6J8$!DJ$D"9$T*L]#G-$$/A`#`I`-(`UUKAU$Z@"`UXII``
+`
+end
diff --git a/archivers/libarchive/files/tar/test/test_extract_tar_zstd.c b/archivers/libarchive/files/tar/test/test_extract_tar_zstd.c
new file mode 100644
index 00000000000..d67170ce343
--- /dev/null
+++ b/archivers/libarchive/files/tar/test/test_extract_tar_zstd.c
@@ -0,0 +1,48 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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_extract_tar_zstd)
+{
+ const char *reffile = "test_extract.tar.zst";
+ int f;
+
+ extract_reference_file(reffile);
+ f = systemf("%s -tf %s >test.out 2>test.err", testprog, reffile);
+ if (f == 0 || canZstd()) {
+ assertEqualInt(0, systemf("%s -xf %s >test.out 2>test.err",
+ testprog, reffile));
+
+ assertFileExists("file1");
+ assertTextFileContents("contents of file1.\n", "file1");
+ assertFileExists("file2");
+ assertTextFileContents("contents of file2.\n", "file2");
+ assertEmptyFile("test.out");
+ assertEmptyFile("test.err");
+ } else {
+ skipping("It seems zstd is not supported on this platform");
+ }
+}
diff --git a/archivers/libarchive/files/tar/test/test_option_C_mtree.c b/archivers/libarchive/files/tar/test/test_option_C_mtree.c
new file mode 100644
index 00000000000..caf8044bf93
--- /dev/null
+++ b/archivers/libarchive/files/tar/test/test_option_C_mtree.c
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 2018 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * This software was developed by Arshan Khanifar <arshankhanifar@gmail.com>
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * 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_option_C_mtree)
+{
+ char *p0;
+ size_t s;
+ int r;
+ p0 = NULL;
+ char *content = "./foo type=file uname=root gname=root mode=0755\n";
+ char *filename = "output.tar";
+
+ /* an absolute path to mtree file */
+ char *mtree_file = "/METALOG.mtree";
+ char *absolute_path = malloc(strlen(testworkdir) + strlen(mtree_file) + 1);
+ strcpy(absolute_path, testworkdir);
+ strcat(absolute_path, mtree_file );
+
+ /* Create an archive using an mtree file. */
+ assertMakeFile(absolute_path, 0777, content);
+ assertMakeDir("bar", 0775);
+ assertMakeFile("bar/foo", 0777, "abc");
+
+ r = systemf("%s -cf %s -C bar \"@%s\" >step1.out 2>step1.err", testprog, filename, absolute_path);
+
+ failure("Error invoking %s -cf %s -C bar @%s", testprog, filename, absolute_path);
+ assertEqualInt(r, 0);
+ assertEmptyFile("step1.out");
+ assertEmptyFile("step1.err");
+
+ /* Do validation of the constructed archive. */
+
+ p0 = slurpfile(&s, "output.tar");
+ if (!assert(p0 != NULL))
+ goto done;
+ if (!assert(s >= 2048))
+ goto done;
+ assertEqualMem(p0 + 0, "./foo", 5);
+ assertEqualMem(p0 + 512, "abc", 3);
+ assertEqualMem(p0 + 1024, "\0\0\0\0\0\0\0\0", 8);
+ assertEqualMem(p0 + 1536, "\0\0\0\0\0\0\0\0", 8);
+done:
+ free(p0);
+}
+
+
diff --git a/archivers/libarchive/files/tar/test/test_option_acls.c b/archivers/libarchive/files/tar/test/test_option_acls.c
index f2d51d661ab..f7451c8eb36 100644
--- a/archivers/libarchive/files/tar/test/test_option_acls.c
+++ b/archivers/libarchive/files/tar/test/test_option_acls.c
@@ -85,7 +85,9 @@ static const acl_flag_t acl_flags[] = {
ACL_ENTRY_INHERIT_ONLY,
ACL_ENTRY_SUCCESSFUL_ACCESS,
ACL_ENTRY_FAILED_ACCESS,
+#ifdef ACL_ENTRY_INHERITED
ACL_ENTRY_INHERITED
+#endif
#endif /* ARCHIVE_ACL_FREEBSD_NFS4 */
};
#endif /* ARCHIVE_ACL_DARWIN || ARCHIVE_ACL_FREEBSD_NFS4 */
@@ -483,7 +485,7 @@ DEFINE_TEST(test_option_acls)
r = compare_acls("f", "acls_acls/f");
assertEqualInt(r, 1);
- /* Extractl acls without acls */
+ /* Extract acls without acls */
assertMakeDir("acls_noacls", 0755);
clear_inheritance_flags("acls_noacls", acltype);
r = systemf("%s -x -C acls_noacls -p --no-acls -f acls.tar >acls_noacls.out 2>acls_noacls.err", testprog);
diff --git a/archivers/libarchive/files/tar/test/test_option_fflags.c b/archivers/libarchive/files/tar/test/test_option_fflags.c
index 77a4e3e19f0..f223feb1906 100644
--- a/archivers/libarchive/files/tar/test/test_option_fflags.c
+++ b/archivers/libarchive/files/tar/test/test_option_fflags.c
@@ -25,6 +25,10 @@
#include "test.h"
__FBSDID("$FreeBSD$");
+#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
+#define chmod _chmod
+#endif
+
static void
clear_fflags(const char *pathname)
{
diff --git a/archivers/libarchive/files/tar/test/test_option_zstd.c b/archivers/libarchive/files/tar/test/test_option_zstd.c
new file mode 100644
index 00000000000..73965e33f3a
--- /dev/null
+++ b/archivers/libarchive/files/tar/test/test_option_zstd.c
@@ -0,0 +1,85 @@
+/*-
+ * Copyright (c) 2017 Sean Purcell
+ * 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_option_zstd)
+{
+ char *p;
+ int r;
+ size_t s;
+
+ /* Create a file. */
+ assertMakeFile("f", 0644, "a");
+
+ /* Archive it with lz4 compression. */
+ r = systemf("%s -cf - --zstd f >archive.out 2>archive.err",
+ testprog);
+ p = slurpfile(&s, "archive.err");
+ p[s] = '\0';
+ if (r != 0) {
+ if (strstr(p, "Unsupported compression") != NULL) {
+ skipping("This version of bsdtar was compiled "
+ "without zstd support");
+ goto done;
+ }
+ /* POSIX permits different handling of the spawnp
+ * system call used to launch the subsidiary
+ * program: */
+ /* Some systems fail immediately to spawn the new process. */
+ if (strstr(p, "Can't launch") != NULL && !canZstd()) {
+ skipping("This version of bsdtar uses an external zstd program "
+ "but no such program is available on this system.");
+ goto done;
+ }
+ /* Some systems successfully spawn the new process,
+ * but fail to exec a program within that process.
+ * This results in failure at the first attempt to
+ * write. */
+ if (strstr(p, "Can't write") != NULL && !canZstd()) {
+ skipping("This version of bsdtar uses an external zstd program "
+ "but no such program is available on this system.");
+ goto done;
+ }
+ /* On some systems the error won't be detected until closing
+ time, by a 127 exit error returned by waitpid. */
+ if (strstr(p, "Error closing") != NULL && !canZstd()) {
+ skipping("This version of bsdcpio uses an external zstd program "
+ "but no such program is available on this system.");
+ return;
+ }
+ failure("--zstd option is broken: %s", p);
+ assertEqualInt(r, 0);
+ goto done;
+ }
+ free(p);
+ /* Check that the archive file has an lz4 signature. */
+ p = slurpfile(&s, "archive.out");
+ assert(s > 2);
+ assertEqualMem(p, "\x28\xb5\x2f\xfd", 4);
+
+done:
+ free(p);
+}
diff --git a/archivers/libarchive/files/tar/write.c b/archivers/libarchive/files/tar/write.c
index 9c245662527..e15cc06ccfc 100644
--- a/archivers/libarchive/files/tar/write.c
+++ b/archivers/libarchive/files/tar/write.c
@@ -503,7 +503,7 @@ write_archive(struct archive *a, struct bsdtar *bsdtar)
}
set_chdir(bsdtar, arg);
} else {
- if (*arg != '/' && (arg[0] != '@' || arg[1] != '/'))
+ if (*arg != '/')
do_chdir(bsdtar); /* Handle a deferred -C */
if (*arg == '@') {
if (append_archive_filename(bsdtar, a,
diff --git a/archivers/libarchive/files/test_utils/test_common.h b/archivers/libarchive/files/test_utils/test_common.h
index 1425dd84b7d..dd7e41016d5 100644
--- a/archivers/libarchive/files/test_utils/test_common.h
+++ b/archivers/libarchive/files/test_utils/test_common.h
@@ -329,6 +329,9 @@ int canLrzip(void);
/* Return true if this platform can run the "lz4" program. */
int canLz4(void);
+/* Return true if this platform can run the "zstd" program. */
+int canZstd(void);
+
/* Return true if this platform can run the "lzip" program. */
int canLzip(void);
diff --git a/archivers/libarchive/files/test_utils/test_main.c b/archivers/libarchive/files/test_utils/test_main.c
index 0e1413693f4..20ce551828c 100644
--- a/archivers/libarchive/files/test_utils/test_main.c
+++ b/archivers/libarchive/files/test_utils/test_main.c
@@ -2115,7 +2115,7 @@ void assertVersion(const char *prog, const char *base)
int r;
char *p, *q;
size_t s;
- unsigned int prog_len = strlen(base);
+ size_t prog_len = strlen(base);
r = systemf("%s --version >version.stdout 2>version.stderr", prog);
if (r != 0)
@@ -2319,6 +2319,21 @@ canLz4(void)
}
/*
+ * Can this platform run the zstd program?
+ */
+int
+canZstd(void)
+{
+ static int tested = 0, value = 0;
+ if (!tested) {
+ tested = 1;
+ if (systemf("zstd -V %s", redirectArgs) == 0)
+ value = 1;
+ }
+ return (value);
+}
+
+/*
* Can this platform run the lzip program?
*/
int