diff options
author | mm <mm@FreeBSD.org> | 2016-06-17 22:40:10 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2016-06-17 22:40:10 +0000 |
commit | c11d326853c1481383222c04e0e06f1ed38956ca (patch) | |
tree | c36277ceb452e4862141a9167b27e72819038726 /lib/libarchive | |
parent | 6497d87fb01990e4599884b769bb7776c03be24a (diff) | |
download | FreeBSD-src-c11d326853c1481383222c04e0e06f1ed38956ca.zip FreeBSD-src-c11d326853c1481383222c04e0e06f1ed38956ca.tar.gz |
MFC r299529,r299540,r299576,r299896:
r299529,r299540:
Update libarchive to 3.2.0
New features:
- new bsdcat command-line utility
- LZ4 compression (in src only via external utility from ports)
- Warc format support
- 'Raw' format writer
- Zip: Support archives >4GB, entries >4GB
- Zip: Support encrypting and decrypting entries
- Zip: Support experimental streaming extension
- Identify encrypted entries in several formats
- New --clear-nochange-flags option to bsdtar tries to remove noschg and
similar flags before deleting files
- New --ignore-zeros option to bsdtar to handle concatenated tar archives
- Use multi-threaded LZMA decompression if liblzma supports it
- Expose version info for libraries used by libarchive
r299576,r299896:
Fix broken cpio behavior.
Relnotes: yes
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/Makefile | 34 | ||||
-rw-r--r-- | lib/libarchive/config_freebsd.h | 11 | ||||
-rw-r--r-- | lib/libarchive/tests/Makefile | 94 |
3 files changed, 118 insertions, 21 deletions
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile index c8e3cdc..ffb2e97 100644 --- a/lib/libarchive/Makefile +++ b/lib/libarchive/Makefile @@ -4,22 +4,9 @@ LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive LIB= archive -DPADD= ${LIBZ} -LDADD= -lz - -DPADD+= ${LIBBZ2} -LDADD+= -lbz2 -CFLAGS+= -DHAVE_BZLIB_H=1 - -DPADD+= ${LIBLZMA} -LDADD+= -llzma -CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 - -DPADD+= ${LIBPTHREAD} -LDADD+= -lpthread - -DPADD+= ${LIBBSDXML} -LDADD+= -lbsdxml +DPADD= ${LIBZ} ${LIBBZ2} ${LIBLZMA} ${LIBPTHREAD} ${LIBBSDXML} +LDADD= -lz -lbz2 -llzma -lpthread -lbsdxml +CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. # It has no real relation to the libarchive version number. @@ -61,7 +48,8 @@ INCS= archive.h archive_entry.h SRCS= archive_acl.c \ archive_check_magic.c \ archive_cmdline.c \ - archive_crypto.c \ + archive_cryptor.c \ + archive_digest.c \ archive_entry.c \ archive_entry_copy_stat.c \ archive_entry_link_resolver.c \ @@ -70,18 +58,23 @@ SRCS= archive_acl.c \ archive_entry_strmode.c \ archive_entry_xattr.c \ archive_getdate.c \ + archive_hmac.c \ archive_match.c \ archive_options.c \ + archive_pack_dev.c \ archive_pathmatch.c \ archive_ppmd7.c \ + archive_random.c \ archive_rb.c \ archive_read.c \ + archive_read_add_passphrase.c \ archive_read_append_filter.c \ archive_read_data_into_fd.c \ archive_read_disk_entry_from_file.c \ archive_read_disk_posix.c \ archive_read_disk_set_standard_lookup.c \ archive_read_extract.c \ + archive_read_extract2.c \ archive_read_open_fd.c \ archive_read_open_file.c \ archive_read_open_filename.c \ @@ -94,6 +87,7 @@ SRCS= archive_acl.c \ archive_read_support_filter_gzip.c \ archive_read_support_filter_grzip.c \ archive_read_support_filter_lrzip.c \ + archive_read_support_filter_lz4.c \ archive_read_support_filter_lzop.c \ archive_read_support_filter_none.c \ archive_read_support_filter_program.c \ @@ -113,6 +107,7 @@ SRCS= archive_acl.c \ archive_read_support_format_rar.c \ archive_read_support_format_raw.c \ archive_read_support_format_tar.c \ + archive_read_support_format_warc.c \ archive_read_support_format_xar.c \ archive_read_support_format_zip.c \ archive_string.c \ @@ -135,6 +130,7 @@ SRCS= archive_acl.c \ archive_write_add_filter_grzip.c \ archive_write_add_filter_gzip.c \ archive_write_add_filter_lrzip.c \ + archive_write_add_filter_lz4.c \ archive_write_add_filter_lzop.c \ archive_write_add_filter_none.c \ archive_write_add_filter_program.c \ @@ -146,15 +142,19 @@ SRCS= archive_acl.c \ archive_write_set_format_by_name.c \ archive_write_set_format_cpio.c \ archive_write_set_format_cpio_newc.c \ + archive_write_set_format_filter_by_ext.c \ archive_write_set_format_gnutar.c \ archive_write_set_format_iso9660.c \ archive_write_set_format_mtree.c \ archive_write_set_format_pax.c \ + archive_write_set_format_raw.c \ archive_write_set_format_shar.c \ archive_write_set_format_ustar.c \ archive_write_set_format_v7tar.c \ + archive_write_set_format_warc.c \ archive_write_set_format_xar.c \ archive_write_set_format_zip.c \ + archive_write_set_passphrase.c \ archive_write_set_options.c \ filter_fork_posix.c diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h index 0df3f91..9394054 100644 --- a/lib/libarchive/config_freebsd.h +++ b/lib/libarchive/config_freebsd.h @@ -38,6 +38,7 @@ #define HAVE_ACL_SET_FILE 1 #define HAVE_ACL_SET_LINK_NP 1 #define HAVE_ACL_USER 1 +#define HAVE_ARC4RANDOM_BUF 1 #define HAVE_EXTATTR_GET_FILE 1 #define HAVE_EXTATTR_LIST_FILE 1 #define HAVE_EXTATTR_SET_FD 1 @@ -55,6 +56,7 @@ #define HAVE_OPENSSL_SHA256_INIT 1 #define HAVE_OPENSSL_SHA384_INIT 1 #define HAVE_OPENSSL_SHA512_INIT 1 +#define HAVE_PKCS5_PBKDF2_HMAC_SHA1 1 #define HAVE_SHA256 1 #define HAVE_SHA384 1 #define HAVE_SHA512 1 @@ -82,13 +84,18 @@ #define HAVE_CTIME_R 1 #define HAVE_CTYPE_H 1 #define HAVE_DECL_EXTATTR_NAMESPACE_USER 1 +#define HAVE_DECL_INT32_MAX 1 +#define HAVE_DECL_INT32_MIN 1 #define HAVE_DECL_INT64_MAX 1 #define HAVE_DECL_INT64_MIN 1 +#define HAVE_DECL_INTMAX_MAX 1 +#define HAVE_DECL_INTMAX_MIN 1 #define HAVE_DECL_SIZE_MAX 1 #define HAVE_DECL_SSIZE_MAX 1 #define HAVE_DECL_STRERROR_R 1 #define HAVE_DECL_UINT32_MAX 1 #define HAVE_DECL_UINT64_MAX 1 +#define HAVE_DECL_UINTMAX_MAX 1 #define HAVE_DIRENT_H 1 #define HAVE_DLFCN_H 1 #define HAVE_D_MD_ORDER 1 @@ -149,10 +156,13 @@ #define HAVE_POLL 1 #define HAVE_POLL_H 1 #define HAVE_POSIX_SPAWNP 1 +#define HAVE_PTHREAD_H 1 #define HAVE_PWD_H 1 #define HAVE_READDIR_R 1 #define HAVE_READLINK 1 #define HAVE_READLINKAT 1 +#define HAVE_READPASSPHRASE 1 +#define HAVE_READPASSPHRASE_H 1 #define HAVE_REGEX_H 1 #define HAVE_SELECT 1 #define HAVE_SETENV 1 @@ -217,6 +227,7 @@ #define HAVE_WCTYPE_H 1 #define HAVE_WMEMCMP 1 #define HAVE_WMEMCPY 1 +#define HAVE_WMEMMOVE 1 #define HAVE_ZLIB_H 1 #define TIME_WITH_SYS_TIME 1 diff --git a/lib/libarchive/tests/Makefile b/lib/libarchive/tests/Makefile index ddb36fa..b8c2f20 100644 --- a/lib/libarchive/tests/Makefile +++ b/lib/libarchive/tests/Makefile @@ -29,12 +29,13 @@ TESTS_SRCS= \ test_archive_api_feature.c \ test_archive_clear_error.c \ test_archive_cmdline.c \ - test_archive_crypto.c \ + test_archive_digest.c \ test_archive_getdate.c \ test_archive_match_time.c \ test_archive_match_owner.c \ test_archive_match_path.c \ test_archive_pathmatch.c \ + test_archive_read_add_passphrase.c \ test_archive_read_close_twice.c \ test_archive_read_close_twice_open_fd.c \ test_archive_read_close_twice_open_filename.c \ @@ -53,14 +54,17 @@ TESTS_SRCS= \ test_archive_write_add_filter_by_name.c \ test_archive_write_set_filter_option.c \ test_archive_write_set_format_by_name.c \ + test_archive_write_set_format_filter_by_ext.c \ test_archive_write_set_format_option.c \ test_archive_write_set_option.c \ test_archive_write_set_options.c \ + test_archive_write_set_passphrase.c \ test_bad_fd.c \ test_compat_bzip2.c \ test_compat_cpio.c \ test_compat_gtar.c \ test_compat_gzip.c \ + test_compat_lz4.c \ test_compat_lzip.c \ test_compat_lzma.c \ test_compat_lzop.c \ @@ -70,6 +74,7 @@ TESTS_SRCS= \ test_compat_solaris_pax_sparse.c \ test_compat_tar_hardlink.c \ test_compat_uudecode.c \ + test_compat_uudecode_large.c \ test_compat_xz.c \ test_compat_zip.c \ test_empty_write.c \ @@ -91,6 +96,7 @@ TESTS_SRCS= \ test_read_disk_entry_from_file.c \ test_read_extract.c \ test_read_file_nonexistent.c \ + test_read_filter_compress.c \ test_read_filter_grzip.c \ test_read_filter_lrzip.c \ test_read_filter_lzop.c \ @@ -99,6 +105,10 @@ TESTS_SRCS= \ test_read_filter_program_signature.c \ test_read_filter_uudecode.c \ test_read_format_7zip.c \ + test_read_format_7zip_encryption_data.c \ + test_read_format_7zip_encryption_header.c \ + test_read_format_7zip_encryption_partially.c \ + test_read_format_7zip_malformed.c \ test_read_format_ar.c \ test_read_format_cab.c \ test_read_format_cab_filename.c \ @@ -108,6 +118,7 @@ TESTS_SRCS= \ test_read_format_cpio_bin_be.c \ test_read_format_cpio_bin_bz2.c \ test_read_format_cpio_bin_gz.c \ + test_read_format_cpio_bin_le.c \ test_read_format_cpio_bin_lzip.c \ test_read_format_cpio_bin_lzma.c \ test_read_format_cpio_bin_xz.c \ @@ -136,13 +147,19 @@ TESTS_SRCS= \ test_read_format_isorr_new_bz2.c \ test_read_format_isozisofs_bz2.c \ test_read_format_lha.c \ + test_read_format_lha_bugfix_0.c \ test_read_format_lha_filename.c \ test_read_format_mtree.c \ test_read_format_pax_bz2.c \ test_read_format_rar.c \ + test_read_format_rar_encryption_data.c \ + test_read_format_rar_encryption_header.c \ + test_read_format_rar_encryption_partially.c \ test_read_format_raw.c \ test_read_format_tar.c \ + test_read_format_tar_concatenated.c \ test_read_format_tar_empty_filename.c \ + test_read_format_tar_empty_pax.c \ test_read_format_tar_filename.c \ test_read_format_tbz.c \ test_read_format_tgz.c \ @@ -150,21 +167,36 @@ TESTS_SRCS= \ test_read_format_txz.c \ test_read_format_tz.c \ test_read_format_ustar_filename.c \ + test_read_format_warc.c \ test_read_format_xar.c \ test_read_format_zip.c \ test_read_format_zip_comment_stored.c \ + test_read_format_zip_encryption_data.c \ + test_read_format_zip_encryption_header.c \ + test_read_format_zip_encryption_partially.c \ test_read_format_zip_filename.c \ test_read_format_zip_mac_metadata.c \ + test_read_format_zip_malformed.c \ + test_read_format_zip_msdos.c \ + test_read_format_zip_nested.c \ + test_read_format_zip_nofiletype.c \ + test_read_format_zip_padded.c \ test_read_format_zip_sfx.c \ + test_read_format_zip_traditional_encryption_data.c \ + test_read_format_zip_winzip_aes.c \ + test_read_format_zip_winzip_aes_large.c \ + test_read_format_zip_zip64.c \ test_read_large.c \ test_read_pax_truncated.c \ test_read_position.c \ test_read_set_format.c \ + test_read_too_many_filters.c \ test_read_truncated.c \ test_read_truncated_filter.c \ test_sparse_basic.c \ test_tar_filenames.c \ test_tar_large.c \ + test_warn_missing_hardlink_target.c \ test_ustar_filenames.c \ test_ustar_filename_encoding.c \ test_write_disk.c \ @@ -186,6 +218,7 @@ TESTS_SRCS= \ test_write_filter_gzip.c \ test_write_filter_gzip_timestamp.c \ test_write_filter_lrzip.c \ + test_write_filter_lz4.c \ test_write_filter_lzip.c \ test_write_filter_lzma.c \ test_write_filter_lzop.c \ @@ -214,19 +247,28 @@ TESTS_SRCS= \ test_write_format_mtree_no_separator.c \ test_write_format_mtree_quoted_filename.c \ test_write_format_pax.c \ + test_write_format_raw.c \ + test_write_format_raw_b64.c \ test_write_format_shar_empty.c \ test_write_format_tar.c \ test_write_format_tar_empty.c \ test_write_format_tar_sparse.c \ test_write_format_tar_ustar.c \ test_write_format_tar_v7tar.c \ + test_write_format_warc.c \ + test_write_format_warc_empty.c \ test_write_format_xar.c \ test_write_format_xar_empty.c \ test_write_format_zip.c \ + test_write_format_zip_compression_store.c \ test_write_format_zip_empty.c \ - test_write_format_zip_no_compression.c \ - test_write_zip_set_compression_store.c \ + test_write_format_zip_empty_zip64.c \ + test_write_format_zip_file.c \ + test_write_format_zip_file_zip64.c \ + test_write_format_zip_large.c \ + test_write_format_zip_zip64.c \ test_write_open_memory.c \ + test_write_read_format_zip.c \ test_zip_filename_encoding.c # Deterministic failures: @@ -259,7 +301,7 @@ SRCS.libarchive_test+= test_utils.c # list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines list.h: ${TESTS_SRCS} Makefile @(cd ${LIBARCHIVEDIR}/libarchive/test && \ - grep -h DEFINE_TEST ${.ALLSRC:N*Makefile} | \ + grep -E -h ^DEFINE_TEST ${.ALLSRC:N*Makefile} | \ egrep -v '${BROKEN_TESTS:tW:C/ /|/g}') > ${.TARGET}.tmp @mv ${.TARGET}.tmp ${.TARGET} @@ -273,6 +315,18 @@ FILES+= test_compat_bzip2_2.tbz.uu FILES+= test_compat_cpio_1.cpio.uu FILES+= test_compat_gtar_1.tar.uu FILES+= test_compat_gzip_1.tgz.uu +FILES+= test_compat_lz4_1.tar.lz4.uu +FILES+= test_compat_lz4_2.tar.lz4.uu +FILES+= test_compat_lz4_3.tar.lz4.uu +FILES+= test_compat_lz4_B4.tar.lz4.uu +FILES+= test_compat_lz4_B4BD.tar.lz4.uu +FILES+= test_compat_lz4_B4BDBX.tar.lz4.uu +FILES+= test_compat_lz4_B5.tar.lz4.uu +FILES+= test_compat_lz4_B5BD.tar.lz4.uu +FILES+= test_compat_lz4_B6.tar.lz4.uu +FILES+= test_compat_lz4_B6BD.tar.lz4.uu +FILES+= test_compat_lz4_B7.tar.lz4.uu +FILES+= test_compat_lz4_B7BD.tar.lz4.uu FILES+= test_compat_gzip_2.tgz.uu FILES+= test_compat_lzip_1.tlz.uu FILES+= test_compat_lzip_2.tlz.uu @@ -289,6 +343,7 @@ FILES+= test_compat_solaris_pax_sparse_1.pax.Z.uu FILES+= test_compat_solaris_pax_sparse_2.pax.Z.uu FILES+= test_compat_solaris_tar_acl.tar.uu FILES+= test_compat_tar_hardlink_1.tar.uu +FILES+= test_compat_uudecode_large.tar.Z.uu FILES+= test_compat_xz_1.txz.uu FILES+= test_compat_zip_1.zip.uu FILES+= test_compat_zip_2.zip.uu @@ -346,10 +401,15 @@ FILES+= test_read_format_7zip_delta_lzma1.7z.uu FILES+= test_read_format_7zip_delta_lzma2.7z.uu FILES+= test_read_format_7zip_empty_archive.7z.uu FILES+= test_read_format_7zip_empty_file.7z.uu +FILES+= test_read_format_7zip_encryption.7z.uu +FILES+= test_read_format_7zip_encryption_header.7z.uu +FILES+= test_read_format_7zip_encryption_partially.7z.uu FILES+= test_read_format_7zip_lzma1.7z.uu FILES+= test_read_format_7zip_lzma1_2.7z.uu FILES+= test_read_format_7zip_lzma1_lzma2.7z.uu FILES+= test_read_format_7zip_lzma2.7z.uu +FILES+= test_read_format_7zip_malformed.7z.uu +FILES+= test_read_format_7zip_malformed2.7z.uu FILES+= test_read_format_7zip_ppmd.7z.uu FILES+= test_read_format_7zip_symbolic_name.7z.uu FILES+= test_read_format_ar.ar.uu @@ -358,6 +418,7 @@ FILES+= test_read_format_cab_2.cab.uu FILES+= test_read_format_cab_3.cab.uu FILES+= test_read_format_cab_filename_cp932.cab.uu FILES+= test_read_format_cpio_bin_be.cpio.uu +FILES+= test_read_format_cpio_bin_le.cpio.uu FILES+= test_read_format_cpio_filename_cp866.cpio.uu FILES+= test_read_format_cpio_filename_eucjp.cpio.uu FILES+= test_read_format_cpio_filename_koi8r.cpio.uu @@ -388,6 +449,7 @@ FILES+= test_read_format_iso_rockridge_new.iso.Z.uu FILES+= test_read_format_iso_rockridge_rr_moved.iso.Z.uu FILES+= test_read_format_iso_xorriso.iso.Z.uu FILES+= test_read_format_iso_zisofs.iso.Z.uu +FILES+= test_read_format_lha_bugfix_0.lzh.uu FILES+= test_read_format_lha_filename_cp932.lzh.uu FILES+= test_read_format_lha_header0.lzh.uu FILES+= test_read_format_lha_header1.lzh.uu @@ -405,6 +467,9 @@ FILES+= test_read_format_rar.rar.uu FILES+= test_read_format_rar_binary_data.rar.uu FILES+= test_read_format_rar_compress_best.rar.uu FILES+= test_read_format_rar_compress_normal.rar.uu +FILES+= test_read_format_rar_encryption_data.rar.uu +FILES+= test_read_format_rar_encryption_header.rar.uu +FILES+= test_read_format_rar_encryption_partially.rar.uu FILES+= test_read_format_rar_multi_lzss_blocks.rar.uu FILES+= test_read_format_rar_multivolume.part0001.rar.uu FILES+= test_read_format_rar_multivolume.part0002.rar.uu @@ -418,14 +483,20 @@ FILES+= test_read_format_rar_unicode.rar.uu FILES+= test_read_format_rar_windows.rar.uu FILES+= test_read_format_raw.data.Z.uu FILES+= test_read_format_raw.data.uu +FILES+= test_read_format_tar_concatenated.tar.uu FILES+= test_read_format_tar_empty_filename.tar.uu +FILES+= test_read_format_tar_empty_pax.tar.Z.uu FILES+= test_read_format_tar_filename_koi8r.tar.Z.uu FILES+= test_read_format_ustar_filename_cp866.tar.Z.uu FILES+= test_read_format_ustar_filename_eucjp.tar.Z.uu FILES+= test_read_format_ustar_filename_koi8r.tar.Z.uu +FILES+= test_read_format_warc.warc.uu FILES+= test_read_format_zip.zip.uu FILES+= test_read_format_zip_comment_stored_1.zip.uu FILES+= test_read_format_zip_comment_stored_2.zip.uu +FILES+= test_read_format_zip_encryption_data.zip.uu +FILES+= test_read_format_zip_encryption_header.zip.uu +FILES+= test_read_format_zip_encryption_partially.zip.uu FILES+= test_read_format_zip_filename_cp866.zip.uu FILES+= test_read_format_zip_filename_cp932.zip.uu FILES+= test_read_format_zip_filename_koi8r.zip.uu @@ -434,9 +505,23 @@ FILES+= test_read_format_zip_filename_utf8_ru.zip.uu FILES+= test_read_format_zip_filename_utf8_ru2.zip.uu FILES+= test_read_format_zip_length_at_end.zip.uu FILES+= test_read_format_zip_mac_metadata.zip.uu +FILES+= test_read_format_zip_malformed1.zip.uu +FILES+= test_read_format_zip_msdos.zip.uu +FILES+= test_read_format_zip_nested.zip.uu +FILES+= test_read_format_zip_nofiletype.zip.uu +FILES+= test_read_format_zip_padded1.zip.uu +FILES+= test_read_format_zip_padded2.zip.uu +FILES+= test_read_format_zip_padded3.zip.uu FILES+= test_read_format_zip_sfx.uu FILES+= test_read_format_zip_symlink.zip.uu +FILES+= test_read_format_zip_traditional_encryption_data.zip.uu FILES+= test_read_format_zip_ux.zip.uu +FILES+= test_read_format_zip_winzip_aes128.zip.uu +FILES+= test_read_format_zip_winzip_aes256.zip.uu +FILES+= test_read_format_zip_winzip_aes256_large.zip.uu +FILES+= test_read_format_zip_winzip_aes256_stored.zip.uu +FILES+= test_read_format_zip_zip64a.zip.uu +FILES+= test_read_format_zip_zip64b.zip.uu FILES+= test_read_large_splitted_rar_aa.uu FILES+= test_read_large_splitted_rar_ab.uu FILES+= test_read_large_splitted_rar_ac.uu @@ -446,6 +531,7 @@ FILES+= test_read_splitted_rar_aa.uu FILES+= test_read_splitted_rar_ab.uu FILES+= test_read_splitted_rar_ac.uu FILES+= test_read_splitted_rar_ad.uu +FILES+= test_read_too_many_filters.gz.uu FILES+= test_splitted_rar_seek_support_aa.uu FILES+= test_splitted_rar_seek_support_ab.uu FILES+= test_splitted_rar_seek_support_ac.uu |