diff options
author | nia <nia@pkgsrc.org> | 2020-05-26 09:16:39 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2020-05-26 09:16:39 +0000 |
commit | 77b7ddd5ec744c612dccb7cc3ec6c907dd11fb79 (patch) | |
tree | 9469d039c5417798c26750b3636acc857355b0b3 /archivers/libarchive | |
parent | b7236e242e7b13cdf416c0f7d0bca0e751f24261 (diff) | |
download | pkgsrc-77b7ddd5ec744c612dccb7cc3ec6c907dd11fb79.tar.gz |
libarchive: Update to 3.4.3
Libarchive 3.4.3 is a feature and bugfix release.
New features:
support for pzstd compressed files (#1357)
support for RHT.security.selinux tar extended attribute (#1348)
Important bugfixes:
various zstd fixes and improvements (#1342 #1352 #1359)
child process handling fixes (#1372)
Libarchive 3.4.2 is a feature and security release.
New features:
support for atomic file extraction (bsdtar -x --safe-writes) (#1289)
support for mbed TLS (PolarSSL) (#1301)
Important bugfixes:
security fixes in RAR5 reader (#1280 #1326)
compression buffer fix in XAR writer (#1317)
fix uname and gname longer than 32 characters in PAX writer (#1319)
fix segfault when archiving hard links in ISO9660 and XAR writers (#1325)
fix support for extracting 7z archive entries with Delta filter (#987)
Libarchive 3.4.1 is a feature and security release.
New features:
Unicode filename support for reading lha/lzh archives
New pax write option "xattrhdr"
Important bugfixes:
security fixes in wide string processing (#1276 #1298)
security fixes in RAR5 reader (#1212 #1217 #1296)
security fixes and optimizations to write filter logic (#351)
security fix related to use of readlink(2) (1dae5a5)
sparse file handling fixes (#1218 #1260)
Thanks to all contributors and bug reporters.
Special thanks to Christos Zoulas (@zoulasc) from NetBSD for the atomic file extraction feature.
Diffstat (limited to 'archivers/libarchive')
468 files changed, 10170 insertions, 14529 deletions
diff --git a/archivers/libarchive/Makefile b/archivers/libarchive/Makefile index 05c0fad42ba..82f90fafd0d 100644 --- a/archivers/libarchive/Makefile +++ b/archivers/libarchive/Makefile @@ -1,6 +1,5 @@ -# $NetBSD: Makefile,v 1.49 2020/01/18 21:48:40 jperkin Exp $ +# $NetBSD: Makefile,v 1.50 2020/05/26 09:16:39 nia Exp $ -PKGREVISION= 1 .include "Makefile.common" COMMENT= Library to read/create different archive formats diff --git a/archivers/libarchive/Makefile.common b/archivers/libarchive/Makefile.common index ec594707134..b4ebef1ec0b 100644 --- a/archivers/libarchive/Makefile.common +++ b/archivers/libarchive/Makefile.common @@ -1,10 +1,10 @@ -# $NetBSD: Makefile.common,v 1.11 2020/01/26 17:30:40 rillig Exp $ +# $NetBSD: Makefile.common,v 1.12 2020/05/26 09:16:39 nia Exp $ # used by archivers/bsdtar/Makefile # used by archivers/libarchive/Makefile -DISTNAME= libarchive-3.4.0 +DISTNAME= libarchive-3.4.3 CATEGORIES= archivers -MASTER_SITES= http://www.libarchive.org/downloads/ +MASTER_SITES= https://www.libarchive.org/downloads/ DISTFILES= # empty MAINTAINER?= joerg@NetBSD.org @@ -14,8 +14,11 @@ LICENSE= 2-clause-bsd TEST_TARGET= check GNU_CONFIGURE= yes CONFIGURE_ARGS+= --without-expat +CONFIGURE_ARGS+= --without-libb2 CONFIGURE_ARGS+= --without-lzo2 +CONFIGURE_ARGS+= --without-mbedtls CONFIGURE_ARGS+= --without-nettle +CONFIGURE_ARGS+= --without-openssl CONFIGURE_ARGS+= --without-xml2 CONFIGURE_ARGS+= --without-zstd CONFIGURE_ARGS+= --disable-maintainer-mode diff --git a/archivers/libarchive/files/CMakeLists.txt b/archivers/libarchive/files/CMakeLists.txt index 4fd93d04802..b2634da6fa5 100644 --- a/archivers/libarchive/files/CMakeLists.txt +++ b/archivers/libarchive/files/CMakeLists.txt @@ -155,34 +155,34 @@ IF (MSVC) ################################################################# # Set compile flags for debug build. # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" - # Enable level 4 C4061: The enumerate has no associated handler in a switch - # statement. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4061") + # Enable level 4 C4062: The enumerate has no associated handler in a switch + # statement and there is no default that can catch it. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14062") # Enable level 4 C4254: A larger bit field was assigned to a smaller bit # field. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4254") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14254") # Enable level 4 C4295: An array was initialized but the last character in # the array is not a null; accessing the array may # produce unexpected results. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4295") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14295") # Enable level 4 C4296: An unsigned variable was used in a comparison # operation with zero. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4296") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14296") # Enable level 4 C4389: An operation involved signed and unsigned variables. # This could result in a loss of data. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4389") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14389") # Enable level 4 C4505: The given function is local and not referenced in # the body of the module; therefore, the function is # dead code. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4505") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14505") # Enable level 4 C4514: The optimizer removed an inline function that is not # called. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4514") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14514") # Enable level 4 C4702: Unreachable code. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4702") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14702") # Enable level 4 C4706: The test value in a conditional expression was the # result of an assignment. - SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /we4706") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14706") # /Oi option enables built-in functions. SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Oi") ################################################################# @@ -193,7 +193,8 @@ ENDIF (MSVC) # Enable CTest/CDash support include(CTest) -OPTION(ENABLE_NETTLE "Enable use of Nettle" ON) +OPTION(ENABLE_MBEDTLS "Enable use of mbed TLS" OFF) +OPTION(ENABLE_NETTLE "Enable use of Nettle" OFF) OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON) OPTION(ENABLE_LIBB2 "Enable the use of the system LIBB2 library if found" ON) OPTION(ENABLE_LZ4 "Enable the use of the system LZ4 library if found" ON) @@ -286,6 +287,10 @@ IF("${CMAKE_C_PLATFORM_ID}" MATCHES "^(HP-UX)$") ADD_DEFINITIONS(-D_XOPEN_SOURCE=500) # Ask wchar.h for mbstate_t ENDIF() +IF(MINGW) + ADD_DEFINITIONS(-D__USE_MINGW_ANSI_STDIO) +ENDIF() + # INCLUDE(CheckCSourceCompiles) INCLUDE(CheckCSourceRuns) @@ -739,6 +744,26 @@ CHECK_C_SOURCE_COMPILES( SAFE_TO_DEFINE_EXTENSIONS) # +# Find mbed TLS +# +IF(ENABLE_MBEDTLS) + FIND_PACKAGE(MbedTLS) + IF(MBEDTLS_FOUND) + SET(HAVE_LIBMBEDCRYPTO 1) + LIST(APPEND ADDITIONAL_LIBS ${MBEDCRYPTO_LIBRARY}) + INCLUDE_DIRECTORIES(${MBEDTLS_INCLUDE_DIRS}) + + LIST(APPEND CMAKE_REQUIRED_INCLUDES ${MBEDTLS_INCLUDE_DIRS}) + LA_CHECK_INCLUDE_FILE("mbedtls/aes.h" HAVE_MBEDTLS_AES_H) + LA_CHECK_INCLUDE_FILE("mbedtls/md.h" HAVE_MBEDTLS_MD_H) + LA_CHECK_INCLUDE_FILE("mbedtls/pkcs5.h" HAVE_MBEDTLS_PKCS5_H) + + ENDIF(MBEDTLS_FOUND) + MARK_AS_ADVANCED(CLEAR MBEDTLS_INCLUDE_DIRS) + MARK_AS_ADVANCED(CLEAR MBEDCRYPTO_LIBRARY) +ENDIF(ENABLE_MBEDTLS) + +# # Find Nettle # IF(ENABLE_NETTLE) @@ -800,6 +825,8 @@ MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) STRING(TOUPPER "${ALGORITHM}" algorithm) IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) SET(ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} FALSE) + ELSEIF("${IMPLEMENTATION}" MATCHES "^MBEDTLS$" AND NOT MBEDTLS_FOUND) + SET(ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} FALSE) ELSEIF("${IMPLEMENTATION}" MATCHES "^NETTLE$" AND NOT NETTLE_FOUND) SET(ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION} FALSE) ENDIF("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND NOT OPENSSL_FOUND) @@ -815,6 +842,11 @@ MACRO(CHECK_CRYPTO ALGORITHMS IMPLEMENTATION) "${TRY_CRYPTO_REQUIRED_INCLUDES};${OPENSSL_INCLUDE_DIR}") SET(TRY_CRYPTO_REQUIRED_LIBS "-DLINK_LIBRARIES:STRING=${OPENSSL_LIBRARIES}") + ELSEIF("${IMPLEMENTATION}" MATCHES "^MBEDTLS$" AND MBEDTLS_FOUND) + SET(TRY_CRYPTO_REQUIRED_INCLUDES + "${TRY_CRYPTO_REQUIRED_INCLUDES};${MBEDTLS_INCLUDE_DIRS}") + SET(TRY_CRYPTO_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${MBEDCRYPTO_LIBRARY}") ELSEIF("${IMPLEMENTATION}" MATCHES "^NETTLE$" AND NETTLE_FOUND) SET(TRY_CRYPTO_REQUIRED_INCLUDES "${TRY_CRYPTO_REQUIRED_INCLUDES};${NETTLE_INCLUDE_DIR}") @@ -1364,6 +1396,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +CHECK_FUNCTION_EXISTS_GLIBC(_gmtime64_s HAVE__GMTIME64_S) CHECK_FUNCTION_EXISTS_GLIBC(_localtime64_s HAVE__LOCALTIME64_S) CHECK_FUNCTION_EXISTS_GLIBC(_mkgmtime64 HAVE__MKGMTIME64) @@ -1416,9 +1449,13 @@ CHECK_C_SOURCE_COMPILES( "#include <sys/sysmacros.h>\nint main() { return major(256); }" MAJOR_IN_SYSMACROS) +IF(ENABLE_LZMA) CHECK_C_SOURCE_COMPILES( "#include <lzma.h>\n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}" HAVE_LZMA_STREAM_ENCODER_MT) +ELSE() + SET(HAVE_LZMA_STREAM_ENCODER_MT 0) +ENDIF(ENABLE_LZMA) IF(HAVE_STRERROR_R) SET(HAVE_DECL_STRERROR_R 1) @@ -1960,6 +1997,7 @@ CHECK_CRYPTO("MD5;RMD160;SHA1;SHA256;SHA384;SHA512" LIBC) CHECK_CRYPTO("SHA256;SHA384;SHA512" LIBC2) CHECK_CRYPTO("SHA256;SHA384;SHA512" LIBC3) CHECK_CRYPTO("MD5;SHA1;SHA256;SHA384;SHA512" LIBSYSTEM) +CHECK_CRYPTO("MD5;RMD160;SHA1;SHA256;SHA384;SHA512" MBEDTLS) CHECK_CRYPTO("MD5;RMD160;SHA1;SHA256;SHA384;SHA512" NETTLE) CHECK_CRYPTO("MD5;RMD160;SHA1;SHA256;SHA384;SHA512" OPENSSL) @@ -2002,6 +2040,11 @@ IF(MSVC) ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) ENDIF(MSVC) +IF(APPLE) + # CC_MD5_Init() functions are deprecated on macOS 10.15, but we want to use them + ADD_DEFINITIONS(-Wno-deprecated-declarations) +ENDIF(APPLE) + IF(ENABLE_TEST) ADD_CUSTOM_TARGET(run_all_tests) ENDIF(ENABLE_TEST) diff --git a/archivers/libarchive/files/Makefile.am b/archivers/libarchive/files/Makefile.am index da78b24acb5..d526daa7356 100644 --- a/archivers/libarchive/files/Makefile.am +++ b/archivers/libarchive/files/Makefile.am @@ -228,6 +228,7 @@ libarchive_la_SOURCES= \ libarchive/archive_write_set_format_iso9660.c \ libarchive/archive_write_set_format_mtree.c \ libarchive/archive_write_set_format_pax.c \ + libarchive/archive_write_set_format_private.h \ libarchive/archive_write_set_format_raw.c \ libarchive/archive_write_set_format_shar.c \ libarchive/archive_write_set_format_ustar.c \ @@ -429,6 +430,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_open_file.c \ libarchive/test/test_open_filename.c \ libarchive/test/test_pax_filename_encoding.c \ + libarchive/test/test_pax_xattr_header.c \ libarchive/test/test_read_data_large.c \ libarchive/test/test_read_disk.c \ libarchive/test/test_read_disk_directory_traversals.c \ @@ -448,6 +450,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_read_format_7zip_encryption_partially.c \ libarchive/test/test_read_format_7zip_encryption_header.c \ libarchive/test/test_read_format_7zip_malformed.c \ + libarchive/test/test_read_format_7zip_packinfo_digests.c \ libarchive/test/test_read_format_ar.c \ libarchive/test/test_read_format_cab.c \ libarchive/test/test_read_format_cab_filename.c \ @@ -488,6 +491,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_read_format_lha.c \ libarchive/test/test_read_format_lha_bugfix_0.c \ libarchive/test/test_read_format_lha_filename.c \ + libarchive/test/test_read_format_lha_filename_utf16.c \ libarchive/test/test_read_format_mtree.c \ libarchive/test/test_read_format_mtree_crash747.c \ libarchive/test/test_read_format_pax_bz2.c \ @@ -535,7 +539,8 @@ libarchive_test_SOURCES= \ libarchive/test/test_read_format_zip_zip64.c \ libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c \ libarchive/test/test_read_large.c \ - libarchive/test/test_read_pax_schily_xattr.c \ + libarchive/test/test_read_pax_xattr_rht_security_selinux.c \ + libarchive/test/test_read_pax_xattr_schily.c \ libarchive/test/test_read_pax_truncated.c \ libarchive/test/test_read_position.c \ libarchive/test/test_read_set_format.c \ @@ -697,10 +702,14 @@ libarchive_test_EXTRA_DIST=\ 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_compat_zstd_2.tar.zst.uu \ libarchive/test/test_fuzz.cab.uu \ libarchive/test/test_fuzz.lzh.uu \ libarchive/test/test_fuzz_1.iso.Z.uu \ libarchive/test/test_pax_filename_encoding.tar.uu \ + libarchive/test/test_pax_xattr_header_all.tar.uu \ + libarchive/test/test_pax_xattr_header_libarchive.tar.uu \ + libarchive/test/test_pax_xattr_header_schily.tar.uu \ libarchive/test/test_rar_multivolume_multiple_files.part1.rar.uu \ libarchive/test/test_rar_multivolume_multiple_files.part2.rar.uu \ libarchive/test/test_rar_multivolume_multiple_files.part3.rar.uu \ @@ -745,7 +754,9 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_7zip_copy_2.7z.uu \ libarchive/test/test_read_format_7zip_deflate.7z.uu \ libarchive/test/test_read_format_7zip_delta_lzma1.7z.uu \ + libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu \ libarchive/test/test_read_format_7zip_delta_lzma2.7z.uu \ + libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu \ libarchive/test/test_read_format_7zip_empty_archive.7z.uu \ libarchive/test/test_read_format_7zip_empty_file.7z.uu \ libarchive/test/test_read_format_7zip_encryption.7z.uu \ @@ -757,6 +768,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_7zip_lzma2.7z.uu \ libarchive/test/test_read_format_7zip_malformed.7z.uu \ libarchive/test/test_read_format_7zip_malformed2.7z.uu \ + libarchive/test/test_read_format_7zip_packinfo_digests.7z.uu \ libarchive/test/test_read_format_7zip_ppmd.7z.uu \ libarchive/test/test_read_format_7zip_symbolic_name.7z.uu \ libarchive/test/test_read_format_ar.ar.uu \ @@ -798,6 +810,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_iso_zisofs.iso.Z.uu \ libarchive/test/test_read_format_lha_bugfix_0.lzh.uu \ libarchive/test/test_read_format_lha_filename_cp932.lzh.uu \ + libarchive/test/test_read_format_lha_filename_utf16.lzh.uu \ libarchive/test/test_read_format_lha_header0.lzh.uu \ libarchive/test/test_read_format_lha_header1.lzh.uu \ libarchive/test/test_read_format_lha_header2.lzh.uu \ @@ -826,6 +839,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_rar_noeof.rar.uu \ libarchive/test/test_read_format_rar_ppmd_lzss_conversion.rar.uu \ libarchive/test/test_read_format_rar_ppmd_use_after_free.rar.uu \ + libarchive/test/test_read_format_rar_ppmd_use_after_free2.rar.uu \ libarchive/test/test_read_format_rar_sfx.exe.uu \ libarchive/test/test_read_format_rar_subblock.rar.uu \ libarchive/test/test_read_format_rar_unicode.rar.uu \ @@ -833,6 +847,8 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_rar5_arm.rar.uu \ libarchive/test/test_read_format_rar5_blake2.rar.uu \ libarchive/test/test_read_format_rar5_compressed.rar.uu \ + libarchive/test/test_read_format_rar5_different_window_size.rar.uu \ + libarchive/test/test_read_format_rar5_different_solid_window_size.rar.uu \ libarchive/test/test_read_format_rar5_distance_overflow.rar.uu \ libarchive/test/test_read_format_rar5_extra_field_version.rar.uu \ libarchive/test/test_read_format_rar5_fileattr.rar.uu \ @@ -863,6 +879,9 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_rar5_symlink.rar.uu \ libarchive/test/test_read_format_rar5_truncated_huff.rar.uu \ libarchive/test/test_read_format_rar5_win32.rar.uu \ + libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu \ + libarchive/test/test_read_format_rar5_different_winsize_on_merge.rar.uu \ + libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu \ libarchive/test/test_read_format_raw.bufr.uu \ libarchive/test/test_read_format_raw.data.gz.uu \ libarchive/test/test_read_format_raw.data.Z.uu \ @@ -898,6 +917,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_zip_lzma.zipx.uu \ libarchive/test/test_read_format_zip_lzma_alone_leak.zipx.uu \ libarchive/test/test_read_format_zip_lzma_multi.zipx.uu \ + libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu \ libarchive/test/test_read_format_zip_jar.jar.uu \ libarchive/test/test_read_format_zip_mac_metadata.zip.uu \ libarchive/test/test_read_format_zip_malformed1.zip.uu \ @@ -928,7 +948,8 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_large_splitted_rar_ac.uu \ libarchive/test/test_read_large_splitted_rar_ad.uu \ libarchive/test/test_read_large_splitted_rar_ae.uu \ - libarchive/test/test_read_pax_schily_xattr.tar.uu \ + libarchive/test/test_read_pax_xattr_rht_security_selinux.tar.uu \ + libarchive/test/test_read_pax_xattr_schily.tar.uu \ libarchive/test/test_read_splitted_rar_aa.uu \ libarchive/test/test_read_splitted_rar_ab.uu \ libarchive/test/test_read_splitted_rar_ac.uu \ @@ -1068,6 +1089,7 @@ bsdtar_test_SOURCES= \ tar/test/test_option_q.c \ tar/test/test_option_r.c \ tar/test/test_option_s.c \ + tar/test/test_option_safe_writes.c \ tar/test/test_option_uid_uname.c \ tar/test/test_option_uuencode.c \ tar/test/test_option_xattrs.c \ diff --git a/archivers/libarchive/files/Makefile.in b/archivers/libarchive/files/Makefile.in index 7884c7e8ff4..4e1c55c03c1 100644 --- a/archivers/libarchive/files/Makefile.in +++ b/archivers/libarchive/files/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -136,6 +136,11 @@ am__aclocal_m4_deps = \ $(top_srcdir)/build/autoconf/lib-ld.m4 \ $(top_srcdir)/build/autoconf/lib-link.m4 \ $(top_srcdir)/build/autoconf/lib-prefix.m4 \ + $(top_srcdir)/build/autoconf/libtool.m4 \ + $(top_srcdir)/build/autoconf/ltoptions.m4 \ + $(top_srcdir)/build/autoconf/ltsugar.m4 \ + $(top_srcdir)/build/autoconf/ltversion.m4 \ + $(top_srcdir)/build/autoconf/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -308,6 +313,7 @@ am__libarchive_la_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/archive_write_set_format_iso9660.c \ libarchive/archive_write_set_format_mtree.c \ libarchive/archive_write_set_format_pax.c \ + libarchive/archive_write_set_format_private.h \ libarchive/archive_write_set_format_raw.c \ libarchive/archive_write_set_format_shar.c \ libarchive/archive_write_set_format_ustar.c \ @@ -631,6 +637,7 @@ am_bsdtar_test_OBJECTS = $(am__objects_12) \ tar/test/bsdtar_test-test_option_q.$(OBJEXT) \ tar/test/bsdtar_test-test_option_r.$(OBJEXT) \ tar/test/bsdtar_test-test_option_s.$(OBJEXT) \ + tar/test/bsdtar_test-test_option_safe_writes.$(OBJEXT) \ tar/test/bsdtar_test-test_option_uid_uname.$(OBJEXT) \ tar/test/bsdtar_test-test_option_uuencode.$(OBJEXT) \ tar/test/bsdtar_test-test_option_xattrs.$(OBJEXT) \ @@ -766,6 +773,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/archive_write_set_format_iso9660.c \ libarchive/archive_write_set_format_mtree.c \ libarchive/archive_write_set_format_pax.c \ + libarchive/archive_write_set_format_private.h \ libarchive/archive_write_set_format_raw.c \ libarchive/archive_write_set_format_shar.c \ libarchive/archive_write_set_format_ustar.c \ @@ -865,6 +873,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/test/test_open_file.c \ libarchive/test/test_open_filename.c \ libarchive/test/test_pax_filename_encoding.c \ + libarchive/test/test_pax_xattr_header.c \ libarchive/test/test_read_data_large.c \ libarchive/test/test_read_disk.c \ libarchive/test/test_read_disk_directory_traversals.c \ @@ -884,6 +893,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/test/test_read_format_7zip_encryption_partially.c \ libarchive/test/test_read_format_7zip_encryption_header.c \ libarchive/test/test_read_format_7zip_malformed.c \ + libarchive/test/test_read_format_7zip_packinfo_digests.c \ libarchive/test/test_read_format_ar.c \ libarchive/test/test_read_format_cab.c \ libarchive/test/test_read_format_cab_filename.c \ @@ -924,6 +934,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/test/test_read_format_lha.c \ libarchive/test/test_read_format_lha_bugfix_0.c \ libarchive/test/test_read_format_lha_filename.c \ + libarchive/test/test_read_format_lha_filename_utf16.c \ libarchive/test/test_read_format_mtree.c \ libarchive/test/test_read_format_mtree_crash747.c \ libarchive/test/test_read_format_pax_bz2.c \ @@ -971,7 +982,8 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/test/test_read_format_zip_zip64.c \ libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c \ libarchive/test/test_read_large.c \ - libarchive/test/test_read_pax_schily_xattr.c \ + libarchive/test/test_read_pax_xattr_rht_security_selinux.c \ + libarchive/test/test_read_pax_xattr_schily.c \ libarchive/test/test_read_pax_truncated.c \ libarchive/test/test_read_position.c \ libarchive/test/test_read_set_format.c \ @@ -1268,6 +1280,7 @@ am_libarchive_test_OBJECTS = $(am__objects_19) $(am__objects_20) \ libarchive/test/test-test_open_file.$(OBJEXT) \ libarchive/test/test-test_open_filename.$(OBJEXT) \ libarchive/test/test-test_pax_filename_encoding.$(OBJEXT) \ + libarchive/test/test-test_pax_xattr_header.$(OBJEXT) \ libarchive/test/test-test_read_data_large.$(OBJEXT) \ libarchive/test/test-test_read_disk.$(OBJEXT) \ libarchive/test/test-test_read_disk_directory_traversals.$(OBJEXT) \ @@ -1287,6 +1300,7 @@ am_libarchive_test_OBJECTS = $(am__objects_19) $(am__objects_20) \ libarchive/test/test-test_read_format_7zip_encryption_partially.$(OBJEXT) \ libarchive/test/test-test_read_format_7zip_encryption_header.$(OBJEXT) \ libarchive/test/test-test_read_format_7zip_malformed.$(OBJEXT) \ + libarchive/test/test-test_read_format_7zip_packinfo_digests.$(OBJEXT) \ libarchive/test/test-test_read_format_ar.$(OBJEXT) \ libarchive/test/test-test_read_format_cab.$(OBJEXT) \ libarchive/test/test-test_read_format_cab_filename.$(OBJEXT) \ @@ -1327,6 +1341,7 @@ am_libarchive_test_OBJECTS = $(am__objects_19) $(am__objects_20) \ libarchive/test/test-test_read_format_lha.$(OBJEXT) \ libarchive/test/test-test_read_format_lha_bugfix_0.$(OBJEXT) \ libarchive/test/test-test_read_format_lha_filename.$(OBJEXT) \ + libarchive/test/test-test_read_format_lha_filename_utf16.$(OBJEXT) \ libarchive/test/test-test_read_format_mtree.$(OBJEXT) \ libarchive/test/test-test_read_format_mtree_crash747.$(OBJEXT) \ libarchive/test/test-test_read_format_pax_bz2.$(OBJEXT) \ @@ -1374,7 +1389,8 @@ am_libarchive_test_OBJECTS = $(am__objects_19) $(am__objects_20) \ libarchive/test/test-test_read_format_zip_zip64.$(OBJEXT) \ libarchive/test/test-test_read_format_zip_with_invalid_traditional_eocd.$(OBJEXT) \ libarchive/test/test-test_read_large.$(OBJEXT) \ - libarchive/test/test-test_read_pax_schily_xattr.$(OBJEXT) \ + libarchive/test/test-test_read_pax_xattr_rht_security_selinux.$(OBJEXT) \ + libarchive/test/test-test_read_pax_xattr_schily.$(OBJEXT) \ libarchive/test/test-test_read_pax_truncated.$(OBJEXT) \ libarchive/test/test-test_read_position.$(OBJEXT) \ libarchive/test/test-test_read_set_format.$(OBJEXT) \ @@ -1883,6 +1899,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdcat-bsdcat.Po \ libarchive/test/$(DEPDIR)/test-test_open_file.Po \ libarchive/test/$(DEPDIR)/test-test_open_filename.Po \ libarchive/test/$(DEPDIR)/test-test_pax_filename_encoding.Po \ + libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Po \ libarchive/test/$(DEPDIR)/test-test_read_data_large.Po \ libarchive/test/$(DEPDIR)/test-test_read_disk.Po \ libarchive/test/$(DEPDIR)/test-test_read_disk_directory_traversals.Po \ @@ -1902,6 +1919,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdcat-bsdcat.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_7zip_encryption_header.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_7zip_encryption_partially.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_7zip_malformed.Po \ + libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_ar.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_cab.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_cab_filename.Po \ @@ -1942,6 +1960,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdcat-bsdcat.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_lha.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_lha_bugfix_0.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename.Po \ + libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_mtree.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_mtree_crash747.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_pax_bz2.Po \ @@ -1989,8 +2008,9 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdcat-bsdcat.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_zip_with_invalid_traditional_eocd.Po \ libarchive/test/$(DEPDIR)/test-test_read_format_zip_zip64.Po \ libarchive/test/$(DEPDIR)/test-test_read_large.Po \ - libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Po \ libarchive/test/$(DEPDIR)/test-test_read_pax_truncated.Po \ + libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Po \ + libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Po \ libarchive/test/$(DEPDIR)/test-test_read_position.Po \ libarchive/test/$(DEPDIR)/test-test_read_set_format.Po \ libarchive/test/$(DEPDIR)/test-test_read_too_many_filters.Po \ @@ -2139,6 +2159,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdcat-bsdcat.Po \ tar/test/$(DEPDIR)/bsdtar_test-test_option_q.Po \ tar/test/$(DEPDIR)/bsdtar_test-test_option_r.Po \ tar/test/$(DEPDIR)/bsdtar_test-test_option_s.Po \ + tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Po \ tar/test/$(DEPDIR)/bsdtar_test-test_option_uid_uname.Po \ tar/test/$(DEPDIR)/bsdtar_test-test_option_uuencode.Po \ tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Po \ @@ -2200,8 +2221,8 @@ NROFF = nroff MANS = $(man_MANS) DATA = $(pkgconfig_DATA) HEADERS = $(include_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -2423,9 +2444,9 @@ am__remove_distdir = \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) -DIST_ARCHIVES = $(distdir).tar.gz +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz $(distdir).zip GZIP_ENV = --best -DIST_TARGETS = dist-gzip +DIST_TARGETS = dist-xz dist-gzip dist-zip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -2553,7 +2574,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -2740,6 +2760,7 @@ libarchive_la_SOURCES = libarchive/archive_acl.c \ libarchive/archive_write_set_format_iso9660.c \ libarchive/archive_write_set_format_mtree.c \ libarchive/archive_write_set_format_pax.c \ + libarchive/archive_write_set_format_private.h \ libarchive/archive_write_set_format_raw.c \ libarchive/archive_write_set_format_shar.c \ libarchive/archive_write_set_format_ustar.c \ @@ -2910,6 +2931,7 @@ libarchive_test_SOURCES = \ libarchive/test/test_open_file.c \ libarchive/test/test_open_filename.c \ libarchive/test/test_pax_filename_encoding.c \ + libarchive/test/test_pax_xattr_header.c \ libarchive/test/test_read_data_large.c \ libarchive/test/test_read_disk.c \ libarchive/test/test_read_disk_directory_traversals.c \ @@ -2929,6 +2951,7 @@ libarchive_test_SOURCES = \ libarchive/test/test_read_format_7zip_encryption_partially.c \ libarchive/test/test_read_format_7zip_encryption_header.c \ libarchive/test/test_read_format_7zip_malformed.c \ + libarchive/test/test_read_format_7zip_packinfo_digests.c \ libarchive/test/test_read_format_ar.c \ libarchive/test/test_read_format_cab.c \ libarchive/test/test_read_format_cab_filename.c \ @@ -2969,6 +2992,7 @@ libarchive_test_SOURCES = \ libarchive/test/test_read_format_lha.c \ libarchive/test/test_read_format_lha_bugfix_0.c \ libarchive/test/test_read_format_lha_filename.c \ + libarchive/test/test_read_format_lha_filename_utf16.c \ libarchive/test/test_read_format_mtree.c \ libarchive/test/test_read_format_mtree_crash747.c \ libarchive/test/test_read_format_pax_bz2.c \ @@ -3016,7 +3040,8 @@ libarchive_test_SOURCES = \ libarchive/test/test_read_format_zip_zip64.c \ libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c \ libarchive/test/test_read_large.c \ - libarchive/test/test_read_pax_schily_xattr.c \ + libarchive/test/test_read_pax_xattr_rht_security_selinux.c \ + libarchive/test/test_read_pax_xattr_schily.c \ libarchive/test/test_read_pax_truncated.c \ libarchive/test/test_read_position.c \ libarchive/test/test_read_set_format.c \ @@ -3169,10 +3194,14 @@ libarchive_test_EXTRA_DIST = \ 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_compat_zstd_2.tar.zst.uu \ libarchive/test/test_fuzz.cab.uu \ libarchive/test/test_fuzz.lzh.uu \ libarchive/test/test_fuzz_1.iso.Z.uu \ libarchive/test/test_pax_filename_encoding.tar.uu \ + libarchive/test/test_pax_xattr_header_all.tar.uu \ + libarchive/test/test_pax_xattr_header_libarchive.tar.uu \ + libarchive/test/test_pax_xattr_header_schily.tar.uu \ libarchive/test/test_rar_multivolume_multiple_files.part1.rar.uu \ libarchive/test/test_rar_multivolume_multiple_files.part2.rar.uu \ libarchive/test/test_rar_multivolume_multiple_files.part3.rar.uu \ @@ -3217,7 +3246,9 @@ libarchive_test_EXTRA_DIST = \ libarchive/test/test_read_format_7zip_copy_2.7z.uu \ libarchive/test/test_read_format_7zip_deflate.7z.uu \ libarchive/test/test_read_format_7zip_delta_lzma1.7z.uu \ + libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu \ libarchive/test/test_read_format_7zip_delta_lzma2.7z.uu \ + libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu \ libarchive/test/test_read_format_7zip_empty_archive.7z.uu \ libarchive/test/test_read_format_7zip_empty_file.7z.uu \ libarchive/test/test_read_format_7zip_encryption.7z.uu \ @@ -3229,6 +3260,7 @@ libarchive_test_EXTRA_DIST = \ libarchive/test/test_read_format_7zip_lzma2.7z.uu \ libarchive/test/test_read_format_7zip_malformed.7z.uu \ libarchive/test/test_read_format_7zip_malformed2.7z.uu \ + libarchive/test/test_read_format_7zip_packinfo_digests.7z.uu \ libarchive/test/test_read_format_7zip_ppmd.7z.uu \ libarchive/test/test_read_format_7zip_symbolic_name.7z.uu \ libarchive/test/test_read_format_ar.ar.uu \ @@ -3270,6 +3302,7 @@ libarchive_test_EXTRA_DIST = \ libarchive/test/test_read_format_iso_zisofs.iso.Z.uu \ libarchive/test/test_read_format_lha_bugfix_0.lzh.uu \ libarchive/test/test_read_format_lha_filename_cp932.lzh.uu \ + libarchive/test/test_read_format_lha_filename_utf16.lzh.uu \ libarchive/test/test_read_format_lha_header0.lzh.uu \ libarchive/test/test_read_format_lha_header1.lzh.uu \ libarchive/test/test_read_format_lha_header2.lzh.uu \ @@ -3298,6 +3331,7 @@ libarchive_test_EXTRA_DIST = \ libarchive/test/test_read_format_rar_noeof.rar.uu \ libarchive/test/test_read_format_rar_ppmd_lzss_conversion.rar.uu \ libarchive/test/test_read_format_rar_ppmd_use_after_free.rar.uu \ + libarchive/test/test_read_format_rar_ppmd_use_after_free2.rar.uu \ libarchive/test/test_read_format_rar_sfx.exe.uu \ libarchive/test/test_read_format_rar_subblock.rar.uu \ libarchive/test/test_read_format_rar_unicode.rar.uu \ @@ -3305,6 +3339,8 @@ libarchive_test_EXTRA_DIST = \ libarchive/test/test_read_format_rar5_arm.rar.uu \ libarchive/test/test_read_format_rar5_blake2.rar.uu \ libarchive/test/test_read_format_rar5_compressed.rar.uu \ + libarchive/test/test_read_format_rar5_different_window_size.rar.uu \ + libarchive/test/test_read_format_rar5_different_solid_window_size.rar.uu \ libarchive/test/test_read_format_rar5_distance_overflow.rar.uu \ libarchive/test/test_read_format_rar5_extra_field_version.rar.uu \ libarchive/test/test_read_format_rar5_fileattr.rar.uu \ @@ -3335,6 +3371,9 @@ libarchive_test_EXTRA_DIST = \ libarchive/test/test_read_format_rar5_symlink.rar.uu \ libarchive/test/test_read_format_rar5_truncated_huff.rar.uu \ libarchive/test/test_read_format_rar5_win32.rar.uu \ + libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu \ + libarchive/test/test_read_format_rar5_different_winsize_on_merge.rar.uu \ + libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu \ libarchive/test/test_read_format_raw.bufr.uu \ libarchive/test/test_read_format_raw.data.gz.uu \ libarchive/test/test_read_format_raw.data.Z.uu \ @@ -3370,6 +3409,7 @@ libarchive_test_EXTRA_DIST = \ libarchive/test/test_read_format_zip_lzma.zipx.uu \ libarchive/test/test_read_format_zip_lzma_alone_leak.zipx.uu \ libarchive/test/test_read_format_zip_lzma_multi.zipx.uu \ + libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu \ libarchive/test/test_read_format_zip_jar.jar.uu \ libarchive/test/test_read_format_zip_mac_metadata.zip.uu \ libarchive/test/test_read_format_zip_malformed1.zip.uu \ @@ -3400,7 +3440,8 @@ libarchive_test_EXTRA_DIST = \ libarchive/test/test_read_large_splitted_rar_ac.uu \ libarchive/test/test_read_large_splitted_rar_ad.uu \ libarchive/test/test_read_large_splitted_rar_ae.uu \ - libarchive/test/test_read_pax_schily_xattr.tar.uu \ + libarchive/test/test_read_pax_xattr_rht_security_selinux.tar.uu \ + libarchive/test/test_read_pax_xattr_schily.tar.uu \ libarchive/test/test_read_splitted_rar_aa.uu \ libarchive/test/test_read_splitted_rar_ab.uu \ libarchive/test/test_read_splitted_rar_ac.uu \ @@ -3515,6 +3556,7 @@ bsdtar_test_SOURCES = \ tar/test/test_option_q.c \ tar/test/test_option_r.c \ tar/test/test_option_s.c \ + tar/test/test_option_safe_writes.c \ tar/test/test_option_uid_uname.c \ tar/test/test_option_uuencode.c \ tar/test/test_option_xattrs.c \ @@ -4614,6 +4656,8 @@ tar/test/bsdtar_test-test_option_r.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_s.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) +tar/test/bsdtar_test-test_option_safe_writes.$(OBJEXT): \ + tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_uid_uname.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_uuencode.$(OBJEXT): \ @@ -5242,6 +5286,9 @@ libarchive/test/test-test_open_filename.$(OBJEXT): \ libarchive/test/test-test_pax_filename_encoding.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) +libarchive/test/test-test_pax_xattr_header.$(OBJEXT): \ + libarchive/test/$(am__dirstamp) \ + libarchive/test/$(DEPDIR)/$(am__dirstamp) libarchive/test/test-test_read_data_large.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) @@ -5299,6 +5346,9 @@ libarchive/test/test-test_read_format_7zip_encryption_header.$(OBJEXT): \ libarchive/test/test-test_read_format_7zip_malformed.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) +libarchive/test/test-test_read_format_7zip_packinfo_digests.$(OBJEXT): \ + libarchive/test/$(am__dirstamp) \ + libarchive/test/$(DEPDIR)/$(am__dirstamp) libarchive/test/test-test_read_format_ar.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) @@ -5419,6 +5469,9 @@ libarchive/test/test-test_read_format_lha_bugfix_0.$(OBJEXT): \ libarchive/test/test-test_read_format_lha_filename.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) +libarchive/test/test-test_read_format_lha_filename_utf16.$(OBJEXT): \ + libarchive/test/$(am__dirstamp) \ + libarchive/test/$(DEPDIR)/$(am__dirstamp) libarchive/test/test-test_read_format_mtree.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) @@ -5560,7 +5613,10 @@ libarchive/test/test-test_read_format_zip_with_invalid_traditional_eocd.$(OBJEXT libarchive/test/test-test_read_large.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) -libarchive/test/test-test_read_pax_schily_xattr.$(OBJEXT): \ +libarchive/test/test-test_read_pax_xattr_rht_security_selinux.$(OBJEXT): \ + libarchive/test/$(am__dirstamp) \ + libarchive/test/$(DEPDIR)/$(am__dirstamp) +libarchive/test/test-test_read_pax_xattr_schily.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) libarchive/test/test-test_read_pax_truncated.$(OBJEXT): \ @@ -6255,6 +6311,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_open_file.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_open_filename.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_pax_filename_encoding.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_data_large.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_disk.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_disk_directory_traversals.Po@am__quote@ # am--include-marker @@ -6274,6 +6331,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_7zip_encryption_header.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_7zip_encryption_partially.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_7zip_malformed.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_ar.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_cab.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_cab_filename.Po@am__quote@ # am--include-marker @@ -6314,6 +6372,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_lha.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_lha_bugfix_0.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_mtree.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_mtree_crash747.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_pax_bz2.Po@am__quote@ # am--include-marker @@ -6361,8 +6420,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_zip_with_invalid_traditional_eocd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_zip_zip64.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_large.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_pax_truncated.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_position.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_set_format.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_too_many_filters.Po@am__quote@ # am--include-marker @@ -6513,6 +6573,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_q.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_r.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_s.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_uid_uname.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_uuencode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Po@am__quote@ # am--include-marker @@ -8504,6 +8565,20 @@ tar/test/bsdtar_test-test_option_s.obj: tar/test/test_option_s.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_s.obj `if test -f 'tar/test/test_option_s.c'; then $(CYGPATH_W) 'tar/test/test_option_s.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_s.c'; fi` +tar/test/bsdtar_test-test_option_safe_writes.o: tar/test/test_option_safe_writes.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_safe_writes.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Tpo -c -o tar/test/bsdtar_test-test_option_safe_writes.o `test -f 'tar/test/test_option_safe_writes.c' || echo '$(srcdir)/'`tar/test/test_option_safe_writes.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_safe_writes.c' object='tar/test/bsdtar_test-test_option_safe_writes.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_safe_writes.o `test -f 'tar/test/test_option_safe_writes.c' || echo '$(srcdir)/'`tar/test/test_option_safe_writes.c + +tar/test/bsdtar_test-test_option_safe_writes.obj: tar/test/test_option_safe_writes.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_safe_writes.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Tpo -c -o tar/test/bsdtar_test-test_option_safe_writes.obj `if test -f 'tar/test/test_option_safe_writes.c'; then $(CYGPATH_W) 'tar/test/test_option_safe_writes.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_safe_writes.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_safe_writes.c' object='tar/test/bsdtar_test-test_option_safe_writes.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_safe_writes.obj `if test -f 'tar/test/test_option_safe_writes.c'; then $(CYGPATH_W) 'tar/test/test_option_safe_writes.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_safe_writes.c'; fi` + tar/test/bsdtar_test-test_option_uid_uname.o: tar/test/test_option_uid_uname.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_uid_uname.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_uid_uname.Tpo -c -o tar/test/bsdtar_test-test_option_uid_uname.o `test -f 'tar/test/test_option_uid_uname.c' || echo '$(srcdir)/'`tar/test/test_option_uid_uname.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_uid_uname.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_uid_uname.Po @@ -11542,6 +11617,20 @@ libarchive/test/test-test_pax_filename_encoding.obj: libarchive/test/test_pax_fi @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/test-test_pax_filename_encoding.obj `if test -f 'libarchive/test/test_pax_filename_encoding.c'; then $(CYGPATH_W) 'libarchive/test/test_pax_filename_encoding.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_pax_filename_encoding.c'; fi` +libarchive/test/test-test_pax_xattr_header.o: libarchive/test/test_pax_xattr_header.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_pax_xattr_header.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Tpo -c -o libarchive/test/test-test_pax_xattr_header.o `test -f 'libarchive/test/test_pax_xattr_header.c' || echo '$(srcdir)/'`libarchive/test/test_pax_xattr_header.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Tpo libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_pax_xattr_header.c' object='libarchive/test/test-test_pax_xattr_header.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/test-test_pax_xattr_header.o `test -f 'libarchive/test/test_pax_xattr_header.c' || echo '$(srcdir)/'`libarchive/test/test_pax_xattr_header.c + +libarchive/test/test-test_pax_xattr_header.obj: libarchive/test/test_pax_xattr_header.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_pax_xattr_header.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Tpo -c -o libarchive/test/test-test_pax_xattr_header.obj `if test -f 'libarchive/test/test_pax_xattr_header.c'; then $(CYGPATH_W) 'libarchive/test/test_pax_xattr_header.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_pax_xattr_header.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Tpo libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_pax_xattr_header.c' object='libarchive/test/test-test_pax_xattr_header.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/test-test_pax_xattr_header.obj `if test -f 'libarchive/test/test_pax_xattr_header.c'; then $(CYGPATH_W) 'libarchive/test/test_pax_xattr_header.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_pax_xattr_header.c'; fi` + libarchive/test/test-test_read_data_large.o: libarchive/test/test_read_data_large.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_data_large.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_data_large.Tpo -c -o libarchive/test/test-test_read_data_large.o `test -f 'libarchive/test/test_read_data_large.c' || echo '$(srcdir)/'`libarchive/test/test_read_data_large.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_data_large.Tpo libarchive/test/$(DEPDIR)/test-test_read_data_large.Po @@ -11808,6 +11897,20 @@ libarchive/test/test-test_read_format_7zip_malformed.obj: libarchive/test/test_r @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/test-test_read_format_7zip_malformed.obj `if test -f 'libarchive/test/test_read_format_7zip_malformed.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_7zip_malformed.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_7zip_malformed.c'; fi` +libarchive/test/test-test_read_format_7zip_packinfo_digests.o: libarchive/test/test_read_format_7zip_packinfo_digests.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_format_7zip_packinfo_digests.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Tpo -c -o libarchive/test/test-test_read_format_7zip_packinfo_digests.o `test -f 'libarchive/test/test_read_format_7zip_packinfo_digests.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_7zip_packinfo_digests.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_format_7zip_packinfo_digests.c' object='libarchive/test/test-test_read_format_7zip_packinfo_digests.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/test-test_read_format_7zip_packinfo_digests.o `test -f 'libarchive/test/test_read_format_7zip_packinfo_digests.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_7zip_packinfo_digests.c + +libarchive/test/test-test_read_format_7zip_packinfo_digests.obj: libarchive/test/test_read_format_7zip_packinfo_digests.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_format_7zip_packinfo_digests.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Tpo -c -o libarchive/test/test-test_read_format_7zip_packinfo_digests.obj `if test -f 'libarchive/test/test_read_format_7zip_packinfo_digests.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_7zip_packinfo_digests.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_7zip_packinfo_digests.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_format_7zip_packinfo_digests.c' object='libarchive/test/test-test_read_format_7zip_packinfo_digests.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/test-test_read_format_7zip_packinfo_digests.obj `if test -f 'libarchive/test/test_read_format_7zip_packinfo_digests.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_7zip_packinfo_digests.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_7zip_packinfo_digests.c'; fi` + libarchive/test/test-test_read_format_ar.o: libarchive/test/test_read_format_ar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_format_ar.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_ar.Tpo -c -o libarchive/test/test-test_read_format_ar.o `test -f 'libarchive/test/test_read_format_ar.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_ar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_ar.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_ar.Po @@ -12368,6 +12471,20 @@ libarchive/test/test-test_read_format_lha_filename.obj: libarchive/test/test_rea @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/test-test_read_format_lha_filename.obj `if test -f 'libarchive/test/test_read_format_lha_filename.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_lha_filename.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_lha_filename.c'; fi` +libarchive/test/test-test_read_format_lha_filename_utf16.o: libarchive/test/test_read_format_lha_filename_utf16.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_format_lha_filename_utf16.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Tpo -c -o libarchive/test/test-test_read_format_lha_filename_utf16.o `test -f 'libarchive/test/test_read_format_lha_filename_utf16.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_lha_filename_utf16.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_format_lha_filename_utf16.c' object='libarchive/test/test-test_read_format_lha_filename_utf16.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/test-test_read_format_lha_filename_utf16.o `test -f 'libarchive/test/test_read_format_lha_filename_utf16.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_lha_filename_utf16.c + +libarchive/test/test-test_read_format_lha_filename_utf16.obj: libarchive/test/test_read_format_lha_filename_utf16.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_format_lha_filename_utf16.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Tpo -c -o libarchive/test/test-test_read_format_lha_filename_utf16.obj `if test -f 'libarchive/test/test_read_format_lha_filename_utf16.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_lha_filename_utf16.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_lha_filename_utf16.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_format_lha_filename_utf16.c' object='libarchive/test/test-test_read_format_lha_filename_utf16.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/test-test_read_format_lha_filename_utf16.obj `if test -f 'libarchive/test/test_read_format_lha_filename_utf16.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_lha_filename_utf16.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_lha_filename_utf16.c'; fi` + libarchive/test/test-test_read_format_mtree.o: libarchive/test/test_read_format_mtree.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_format_mtree.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_mtree.Tpo -c -o libarchive/test/test-test_read_format_mtree.o `test -f 'libarchive/test/test_read_format_mtree.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_mtree.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_mtree.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_mtree.Po @@ -13026,19 +13143,33 @@ libarchive/test/test-test_read_large.obj: libarchive/test/test_read_large.c @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/test-test_read_large.obj `if test -f 'libarchive/test/test_read_large.c'; then $(CYGPATH_W) 'libarchive/test/test_read_large.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_large.c'; fi` -libarchive/test/test-test_read_pax_schily_xattr.o: libarchive/test/test_read_pax_schily_xattr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_pax_schily_xattr.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Tpo -c -o libarchive/test/test-test_read_pax_schily_xattr.o `test -f 'libarchive/test/test_read_pax_schily_xattr.c' || echo '$(srcdir)/'`libarchive/test/test_read_pax_schily_xattr.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Tpo libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_pax_schily_xattr.c' object='libarchive/test/test-test_read_pax_schily_xattr.o' libtool=no @AMDEPBACKSLASH@ +libarchive/test/test-test_read_pax_xattr_rht_security_selinux.o: libarchive/test/test_read_pax_xattr_rht_security_selinux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_pax_xattr_rht_security_selinux.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Tpo -c -o libarchive/test/test-test_read_pax_xattr_rht_security_selinux.o `test -f 'libarchive/test/test_read_pax_xattr_rht_security_selinux.c' || echo '$(srcdir)/'`libarchive/test/test_read_pax_xattr_rht_security_selinux.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Tpo libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_pax_xattr_rht_security_selinux.c' object='libarchive/test/test-test_read_pax_xattr_rht_security_selinux.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/test-test_read_pax_schily_xattr.o `test -f 'libarchive/test/test_read_pax_schily_xattr.c' || echo '$(srcdir)/'`libarchive/test/test_read_pax_schily_xattr.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/test-test_read_pax_xattr_rht_security_selinux.o `test -f 'libarchive/test/test_read_pax_xattr_rht_security_selinux.c' || echo '$(srcdir)/'`libarchive/test/test_read_pax_xattr_rht_security_selinux.c -libarchive/test/test-test_read_pax_schily_xattr.obj: libarchive/test/test_read_pax_schily_xattr.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_pax_schily_xattr.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Tpo -c -o libarchive/test/test-test_read_pax_schily_xattr.obj `if test -f 'libarchive/test/test_read_pax_schily_xattr.c'; then $(CYGPATH_W) 'libarchive/test/test_read_pax_schily_xattr.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_pax_schily_xattr.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Tpo libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_pax_schily_xattr.c' object='libarchive/test/test-test_read_pax_schily_xattr.obj' libtool=no @AMDEPBACKSLASH@ +libarchive/test/test-test_read_pax_xattr_rht_security_selinux.obj: libarchive/test/test_read_pax_xattr_rht_security_selinux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_pax_xattr_rht_security_selinux.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Tpo -c -o libarchive/test/test-test_read_pax_xattr_rht_security_selinux.obj `if test -f 'libarchive/test/test_read_pax_xattr_rht_security_selinux.c'; then $(CYGPATH_W) 'libarchive/test/test_read_pax_xattr_rht_security_selinux.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_pax_xattr_rht_security_selinux.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Tpo libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_pax_xattr_rht_security_selinux.c' object='libarchive/test/test-test_read_pax_xattr_rht_security_selinux.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/test-test_read_pax_schily_xattr.obj `if test -f 'libarchive/test/test_read_pax_schily_xattr.c'; then $(CYGPATH_W) 'libarchive/test/test_read_pax_schily_xattr.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_pax_schily_xattr.c'; fi` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/test-test_read_pax_xattr_rht_security_selinux.obj `if test -f 'libarchive/test/test_read_pax_xattr_rht_security_selinux.c'; then $(CYGPATH_W) 'libarchive/test/test_read_pax_xattr_rht_security_selinux.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_pax_xattr_rht_security_selinux.c'; fi` + +libarchive/test/test-test_read_pax_xattr_schily.o: libarchive/test/test_read_pax_xattr_schily.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_pax_xattr_schily.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Tpo -c -o libarchive/test/test-test_read_pax_xattr_schily.o `test -f 'libarchive/test/test_read_pax_xattr_schily.c' || echo '$(srcdir)/'`libarchive/test/test_read_pax_xattr_schily.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Tpo libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_pax_xattr_schily.c' object='libarchive/test/test-test_read_pax_xattr_schily.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/test-test_read_pax_xattr_schily.o `test -f 'libarchive/test/test_read_pax_xattr_schily.c' || echo '$(srcdir)/'`libarchive/test/test_read_pax_xattr_schily.c + +libarchive/test/test-test_read_pax_xattr_schily.obj: libarchive/test/test_read_pax_xattr_schily.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_pax_xattr_schily.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Tpo -c -o libarchive/test/test-test_read_pax_xattr_schily.obj `if test -f 'libarchive/test/test_read_pax_xattr_schily.c'; then $(CYGPATH_W) 'libarchive/test/test_read_pax_xattr_schily.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_pax_xattr_schily.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Tpo libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_pax_xattr_schily.c' object='libarchive/test/test-test_read_pax_xattr_schily.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/test-test_read_pax_xattr_schily.obj `if test -f 'libarchive/test/test_read_pax_xattr_schily.c'; then $(CYGPATH_W) 'libarchive/test/test_read_pax_xattr_schily.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_pax_xattr_schily.c'; fi` libarchive/test/test-test_read_pax_truncated.o: libarchive/test/test_read_pax_truncated.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_pax_truncated.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_pax_truncated.Tpo -c -o libarchive/test/test-test_read_pax_truncated.o `test -f 'libarchive/test/test_read_pax_truncated.c' || echo '$(srcdir)/'`libarchive/test/test_read_pax_truncated.c @@ -14767,11 +14898,14 @@ dist-bzip2: distdir dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) - dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -14785,7 +14919,6 @@ dist-shar: distdir @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) - dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) @@ -14814,6 +14947,8 @@ distcheck: dist eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -15359,6 +15494,7 @@ distclean: distclean-am -rm -f libarchive/test/$(DEPDIR)/test-test_open_file.Po -rm -f libarchive/test/$(DEPDIR)/test-test_open_filename.Po -rm -f libarchive/test/$(DEPDIR)/test-test_pax_filename_encoding.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_data_large.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_disk.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_disk_directory_traversals.Po @@ -15378,6 +15514,7 @@ distclean: distclean-am -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_7zip_encryption_header.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_7zip_encryption_partially.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_7zip_malformed.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_ar.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_cab.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_cab_filename.Po @@ -15418,6 +15555,7 @@ distclean: distclean-am -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_lha.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_lha_bugfix_0.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_mtree.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_mtree_crash747.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_pax_bz2.Po @@ -15465,8 +15603,9 @@ distclean: distclean-am -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_zip_with_invalid_traditional_eocd.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_zip_zip64.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_large.Po - -rm -f libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_pax_truncated.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_position.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_set_format.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_too_many_filters.Po @@ -15617,6 +15756,7 @@ distclean: distclean-am -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_q.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_r.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_s.Po + -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_uid_uname.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_uuencode.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Po @@ -16088,6 +16228,7 @@ maintainer-clean: maintainer-clean-am -rm -f libarchive/test/$(DEPDIR)/test-test_open_file.Po -rm -f libarchive/test/$(DEPDIR)/test-test_open_filename.Po -rm -f libarchive/test/$(DEPDIR)/test-test_pax_filename_encoding.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_pax_xattr_header.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_data_large.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_disk.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_disk_directory_traversals.Po @@ -16107,6 +16248,7 @@ maintainer-clean: maintainer-clean-am -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_7zip_encryption_header.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_7zip_encryption_partially.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_7zip_malformed.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_7zip_packinfo_digests.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_ar.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_cab.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_cab_filename.Po @@ -16147,6 +16289,7 @@ maintainer-clean: maintainer-clean-am -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_lha.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_lha_bugfix_0.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_lha_filename_utf16.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_mtree.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_mtree_crash747.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_pax_bz2.Po @@ -16194,8 +16337,9 @@ maintainer-clean: maintainer-clean-am -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_zip_with_invalid_traditional_eocd.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_zip_zip64.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_large.Po - -rm -f libarchive/test/$(DEPDIR)/test-test_read_pax_schily_xattr.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_pax_truncated.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_rht_security_selinux.Po + -rm -f libarchive/test/$(DEPDIR)/test-test_read_pax_xattr_schily.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_position.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_set_format.Po -rm -f libarchive/test/$(DEPDIR)/test-test_read_too_many_filters.Po @@ -16346,6 +16490,7 @@ maintainer-clean: maintainer-clean-am -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_q.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_r.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_s.Po + -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_safe_writes.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_uid_uname.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_uuencode.Po -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Po @@ -16396,7 +16541,7 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-compile \ + dist-zip dist-zstd distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-local distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ diff --git a/archivers/libarchive/files/NEWS b/archivers/libarchive/files/NEWS index 222532d1e97..47e2dd6a4d7 100644 --- a/archivers/libarchive/files/NEWS +++ b/archivers/libarchive/files/NEWS @@ -1,3 +1,23 @@ +May 20, 2020: libarchive 3.4.3 released + +Apr 30, 2020: Support for pzstd compressed files + +Apr 16, 2020: Support for RHT.security.selinux tar extended attribute + +Feb 11, 2020: libarchive 3.4.2 released + +Jan 23, 2020: Important fixes for writing XAR archives + +Jan 20, 2020: New tar option: --safe-writes (atomical file extraction) + +Jan 03, 2020: Support mbed TLS (PolarSSL) as optional crypto provider + +Dec 30, 2019: libarchive 3.4.1 released + +Dec 11, 2019: New pax write option "xattrhdr" + +Nov 17, 2019: Unicode filename support for reading lha/lzh archives + Jun 11, 2019: libarchive 3.4.0 released May 18, 2019: Fixes for reading Android APK and JAR archives diff --git a/archivers/libarchive/files/README.md b/archivers/libarchive/files/README.md index 2912b3d0a61..56cd723daa4 100644 --- a/archivers/libarchive/files/README.md +++ b/archivers/libarchive/files/README.md @@ -70,7 +70,7 @@ know about any errors or omissions you find. ## Supported Formats -Currently, the library automatically detects and reads the following fomats: +Currently, the library automatically detects and reads the following formats: * Old V7 tar archives * POSIX ustar * GNU tar format (including GNU long filenames, long link names, and sparse files) diff --git a/archivers/libarchive/files/aclocal.m4 b/archivers/libarchive/files/aclocal.m4 index 7f044624ac0..b7448a4c1e1 100644 --- a/archivers/libarchive/files/aclocal.m4 +++ b/archivers/libarchive/files/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,9063 +20,9 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 2014 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. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU 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/>. -]) - -# serial 58 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_PREPARE_CC_BASENAME -# ----------------------- -m4_defun([_LT_PREPARE_CC_BASENAME], [ -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in @S|@*""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} -])# _LT_PREPARE_CC_BASENAME - - -# _LT_CC_BASENAME(CC) -# ------------------- -# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, -# but that macro is also expanded into generated libtool script, which -# arranges for $SED and $ECHO to be set by different means. -m4_defun([_LT_CC_BASENAME], -[m4_require([_LT_PREPARE_CC_BASENAME])dnl -AC_REQUIRE([_LT_DECL_SED])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl -func_cc_basename $1 -cc_basename=$func_cc_basename_result -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl -dnl -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl -m4_require([_LT_CMD_TRUNCATE])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options that allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld=$lt_cv_prog_gnu_ld - -old_CC=$CC -old_CFLAGS=$CFLAGS - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from 'configure', and 'config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# 'config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain=$ac_aux_dir/ltmain.sh -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the 'libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to 'config.status' so that its -# declaration there will have the same value as in 'configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags='_LT_TAGS'dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into 'config.status', and then the shell code to quote escape them in -# for loops in 'config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# '#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test 0 = "$lt_write_fail" && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -'$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to <bug-libtool@gnu.org>." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2011 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test 0 != $[#] -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try '$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try '$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test yes = "$silent" && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options that allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then - setopt NO_GLOB_SUBST - fi - - cfgfile=${ofile}T - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION -# NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -_LT_COPYING -_LT_LIBTOOL_TAGS - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -_LT_PREPARE_MUNGE_PATH_LIST -_LT_PREPARE_CC_BASENAME - -# ### END FUNCTIONS SHARED WITH CONFIGURE - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Go], [_LT_LANG(GO)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -m4_ifndef([AC_PROG_GO], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -m4_defun([AC_PROG_GO], -[AC_LANG_PUSH(Go)dnl -AC_ARG_VAR([GOC], [Go compiler command])dnl -AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -AC_CHECK_TOOL(GOC, gccgo) -if test -z "$GOC"; then - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) - fi -fi -if test -z "$GOC"; then - AC_CHECK_PROG(GOC, gccgo, gccgo, false) -fi -])#m4_defun -])#m4_ifndef - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([AC_PROG_GO], - [LT_LANG(GO)], - [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # If there is a non-empty error log, and "single_module" - # appears in it, assume the flag caused a linker warning - if test -s conftest.err && $GREP single_module conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - # Otherwise, if the output was created with a 0 exit code from - # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS=$save_LDFLAGS - ]) - - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -s conftest.err && $GREP force_load conftest.err; then - cat conftest.err >&AS_MESSAGE_LOG_FD - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test yes = "$lt_cv_apple_cc_single_mod"; then - _lt_dar_single_mod='$single_module' - fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' - fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test yes = "$lt_cv_ld_force_load"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], - [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined - case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test yes = "$_lt_dar_can_shared"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - m4_if([$1], [CXX], -[ if test yes != "$lt_cv_apple_cc_single_mod"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test set = "${lt_cv_aix_libpath+set}"; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script that will find a shell with a builtin -# printf (that we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case $ECHO in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], - [Search for dependent libraries within DIR (or the compiler's sysroot - if not specified).])], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case $with_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([$with_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and where our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test no = "$enable_libtool_lock" || enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE=32 - ;; - *ELF-64*) - HPUX_IA64_MODE=64 - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac - ;; - powerpc64le-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test yes != "$lt_cv_cc_needs_belf"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS - fi - ;; -*-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) - case $host in - i?86-*-solaris*|x86_64-*-solaris*) - LD="${LD-ld} -m elf_x86_64" - ;; - sparc*-*-solaris*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - # GNU ld 2.21 introduced _sol2 emulations. Use them if available. - if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 - fi - ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks=$enable_libtool_lock -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test 0 -eq "$ac_status"; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test 0 -ne "$ac_status"; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test no = "$lt_cv_ar_at_file"; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - bitrig* | openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test yes = "[$]$2"; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS=$save_LDFLAGS -]) - -if test yes = "[$]$2"; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring=ABCD - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - os2*) - # The test takes a long time on OS/2. - lt_cv_sys_max_cmd_len=8192 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n "$lt_cv_sys_max_cmd_len"; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes = "$cross_compiling"; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include <dlfcn.h> -#endif - -#include <stdio.h> - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisibility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test yes != "$enable_dlopen"; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen=load_add_on - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ - lt_cv_dlopen=dyld - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen=shl_load], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen=dlopen], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else - enable_dlopen=yes - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS=$LDFLAGS - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS=$LIBS - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test yes = "$lt_cv_dlopen_self"; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links=nottested -if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test no = "$hard_links"; then - AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", - [Define to the sub-directory where libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then - - # We can hardcode non-existent directories. - if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && - test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || - test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then - # Fast installation is not supported - enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP"; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_PREPARE_MUNGE_PATH_LIST -# --------------------------- -# Make sure func_munge_path_list() is defined correctly. -m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], -[[# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x@S|@2 in - x) - ;; - *:) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" - ;; - x:*) - eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" - ;; - *) - eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" - ;; - esac -} -]])# _LT_PREPARE_PATH_LIST - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test yes = "$GCC"; then - case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=.so -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -AC_ARG_VAR([LT_SYS_LIBRARY_PATH], -[User-defined run-time library search path.]) - -case $host_os in -aix3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then - # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' - # If using run time linking (on AIX 4.2 or later) use lib<name>.so - # instead of lib<name>.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a[(]lib.so.V[)]' - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='$libname$shared_ext' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec=$LIB - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -haiku*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 - fi - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test yes = "$lt_cv_prog_gnu_ld"; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd* | bitrig*) - version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib - need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -os2*) - libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no - need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec; then - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test no = "$dynamic_linker" && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec -fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec -fi - -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], - [Detected run-time system search path for libraries]) -_LT_DECL([], [configure_time_lt_sys_library_path], [2], - [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program that can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$1"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD - ;; -esac]) -MAGIC_CMD=$lt_cv_path_MAGIC_CMD -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program that can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test no = "$withval" || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test yes = "$GCC"; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD=$ac_prog - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test yes = "$with_gnu_ld"; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in - *GNU* | *'with BFD'*) - test no != "$with_gnu_ld" && break - ;; - *) - test yes != "$with_gnu_ld" && break - ;; - esac - fi - done - IFS=$lt_save_ifs -else - lt_cv_path_LD=$LD # Let the user override the test with a path. -fi]) -LD=$lt_cv_path_LD -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -_LT_PATH_LD_GNU -AC_SUBST([LD]) - -_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) -])# LT_PATH_LD - -# Old names: -AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) -AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_LD], []) -dnl AC_DEFUN([AC_PROG_LD], []) - - -# _LT_PATH_LD_GNU -#- -------------- -m4_defun([_LT_PATH_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - lt_cv_prog_gnu_ld=yes - ;; -*) - lt_cv_prog_gnu_ld=no - ;; -esac]) -with_gnu_ld=$lt_cv_prog_gnu_ld -])# _LT_PATH_LD_GNU - - -# _LT_CMD_RELOAD -# -------------- -# find reload flag for linker -# -- PORTME Some linkers may need a different reload flag. -m4_defun([_LT_CMD_RELOAD], -[AC_CACHE_CHECK([for $LD option to reload object files], - lt_cv_ld_reload_flag, - [lt_cv_ld_reload_flag='-r']) -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then - reload_cmds=false - fi - ;; - darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac -_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl -_LT_TAGDECL([], [reload_cmds], [2])dnl -])# _LT_CMD_RELOAD - - -# _LT_PATH_DD -# ----------- -# find a working dd -m4_defun([_LT_PATH_DD], -[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], -[printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], -[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi]) -rm -f conftest.i conftest2.i conftest.out]) -])# _LT_PATH_DD - - -# _LT_CMD_TRUNCATE -# ---------------- -# find command to truncate a binary pipe -m4_defun([_LT_CMD_TRUNCATE], -[m4_require([_LT_PATH_DD]) -AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], -[printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) -_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], - [Command to truncate a binary pipe]) -])# _LT_CMD_TRUNCATE - - -# _LT_CHECK_MAGIC_METHOD -# ---------------------- -# how to check for library dependencies -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_MAGIC_METHOD], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -AC_CACHE_CHECK([how to recognize dependent libraries], -lt_cv_deplibs_check_method, -[lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[[4-9]]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[[45]]*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM=$NM -else - lt_nm_to_check=${ac_tool_prefix}nm - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs - test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break 2 - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break 2 - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS=$lt_save_ifs - done - : ${lt_cv_path_NM=no} -fi]) -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test : != "$DUMPBIN"; then - NM=$DUMPBIN - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test yes != "$lt_cv_path_mainfest_tool"; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# _LT_DLL_DEF_P([FILE]) -# --------------------- -# True iff FILE is a Windows DLL '.def' file. -# Keep in sync with func_dll_def_p in the libtool script -AC_DEFUN([_LT_DLL_DEF_P], -[dnl - test DEF = "`$SED -n dnl - -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace - -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments - -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl - -e q dnl Only consider the first "real" line - $1`" dnl -])# _LT_DLL_DEF_P - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM=-lm) - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test yes = "$GCC"; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test ia64 = "$host_cpu"; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined __osf__ -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], - [Transform the output of nm into a list of symbols to manually relocate]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], - [The name lister interface]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test yes = "$GCC"; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test ia64 = "$host_cpu"; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - case $host_os in - os2*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' - ;; - esac - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ F* | *Sun*Fortran*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - *Intel*\ [[CF]]*Compiler*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - *Portland\ Group*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test yes != "$GCC"; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd* | bitrig*) - with_gnu_ld=no - ;; - linux* | k*bsd*-gnu | gnu*) - _LT_TAGVAR(link_all_deplibs, $1)=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test yes = "$lt_use_gnu_ld_interface"; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test linux-dietlibc = "$host_os"; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - tcc*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' - ;; - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then - aix_use_runtimelinking=yes - break - fi - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GCC"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - - hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS=$save_LDFLAGS]) - if test yes = "$lt_cv_irix_exported_symbol"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' - fi - _LT_TAGVAR(link_all_deplibs, $1)=no - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - _LT_TAGVAR(ld_shlibs, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - netbsd* | netbsdelf*-gnu) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - osf3*) - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='$wl' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test sequent = "$host_vendor"; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - if test yes = "$GCC"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test sni = "$host_vendor"; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test yes,yes = "$GCC,$enable_shared"; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting $shlibpath_var if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC=$CC -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report what library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC=$lt_save_CC -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test yes = "$GXX"; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test yes = "$GXX"; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='$wl' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test ia64 = "$host_cpu"; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag= - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - ;; - esac - - if test yes = "$GXX"; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' - fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' - else - # not using gcc - if test ia64 = "$host_cpu"; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' - else - shared_flag='$wl-bM:SRE' - fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag - else - if test ia64 = "$host_cpu"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' - if test yes = "$with_gnu_ld"; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - shrext_cmds=.dll - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd* | bitrig*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - else - # g++ 2.7 appears to require '-G' NOT '-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no - - _LT_TAGVAR(GCC, $1)=$GXX - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case @S|@2 in - .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; - *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF -package foo -func foo() { -} -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test no = "$pre_test_object_deps_done"; then - case $prev in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)=$prev$p - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test no = "$pre_test_object_deps_done"; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)=$p - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)=$p - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test no = "$F77"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_F77"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$G77 - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_F77" - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test no = "$FC"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_disable_FC"; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test no = "$can_build_shared" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test yes = "$enable_shared" && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu - _LT_TAGVAR(LD, $1)=$LD - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test yes != "$_lt_disable_FC" - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_GO_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Go compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_GO_CONFIG], -[AC_REQUIRE([LT_PROG_GO])dnl -AC_LANG_SAVE - -# Source file extension for Go test sources. -ac_ext=go - -# Object file extension for compiled Go test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="package main; func main() { }" - -# Code to be used in simple link tests -lt_simple_link_test_code='package main; func main() { }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GOC-"gccgo"} -CFLAGS=$GOFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)=$LD -_LT_CC_BASENAME([$compiler]) - -# Go did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GO_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to 'libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code=$lt_simple_compile_test_code - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_GO -# ---------- -AC_DEFUN([LT_PROG_GO], -[AC_CHECK_TOOL(GOC, gccgo,) -]) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f "$lt_ac_sed" && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test 10 -lt "$lt_ac_count" && break - lt_ac_count=`expr $lt_ac_count + 1` - if test "$lt_ac_count" -gt "$lt_ac_max"; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine what file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 8 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 11 (pkg-config-0.29.1) - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option '$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl 'shared' nor 'disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], - [_LT_WITH_AIX_SONAME([aix])]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the 'shared' and -# 'disable-shared' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the 'static' and -# 'disable-static' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the 'fast-install' -# and 'disable-fast-install' LT_INIT options. -# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for pkg in $enableval; do - IFS=$lt_save_ifs - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the 'disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_AIX_SONAME([DEFAULT]) -# ---------------------------------- -# implement the --with-aix-soname flag, and support the `aix-soname=aix' -# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT -# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. -m4_define([_LT_WITH_AIX_SONAME], -[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl -shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[[5-9]]*,yes) - AC_MSG_CHECKING([which variant of shared library versioning to provide]) - AC_ARG_WITH([aix-soname], - [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], - [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], - [case $withval in - aix|svr4|both) - ;; - *) - AC_MSG_ERROR([Unknown argument to --with-aix-soname]) - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname], - [AC_CACHE_VAL([lt_cv_with_aix_soname], - [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) - with_aix_soname=$lt_cv_with_aix_soname]) - AC_MSG_RESULT([$with_aix_soname]) - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - -_LT_DECL([], [shared_archive_member_spec], [0], - [Shared archive member basename, for filename based shared library versioning on AIX])dnl -])# _LT_WITH_AIX_SONAME - -LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) -LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' -# LT_INIT options. -# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, - for lt_pkg in $withval; do - IFS=$lt_save_ifs - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS=$lt_save_ifs - ;; - esac], - [pic_mode=m4_default([$1], [default])]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the 'pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software -# Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59, which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# @configure_input@ - -# serial 4179 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) - -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> dnl @@ -9350,7 +296,75 @@ AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------ +dnl +dnl Prepare a "--with-" configure option using the lowercase +dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and +dnl PKG_CHECK_MODULES in a single macro. +AC_DEFUN([PKG_WITH_MODULES], +[ +m4_pushdef([with_arg], m4_tolower([$1])) + +m4_pushdef([description], + [m4_default([$5], [build with ]with_arg[ support])]) + +m4_pushdef([def_arg], [m4_default([$6], [auto])]) +m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) +m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) + +m4_case(def_arg, + [yes],[m4_pushdef([with_without], [--without-]with_arg)], + [m4_pushdef([with_without],[--with-]with_arg)]) + +AC_ARG_WITH(with_arg, + AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, + [AS_TR_SH([with_]with_arg)=def_arg]) + +AS_CASE([$AS_TR_SH([with_]with_arg)], + [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], + [auto],[PKG_CHECK_MODULES([$1],[$2], + [m4_n([def_action_if_found]) $3], + [m4_n([def_action_if_not_found]) $4])]) + +m4_popdef([with_arg]) +m4_popdef([description]) +m4_popdef([def_arg]) + +])dnl PKG_WITH_MODULES + +dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ----------------------------------------------- +dnl +dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES +dnl check._[VARIABLE-PREFIX] is exported as make variable. +AC_DEFUN([PKG_HAVE_WITH_MODULES], +[ +PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) + +AM_CONDITIONAL([HAVE_][$1], + [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) +])dnl PKG_HAVE_WITH_MODULES + +dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------------------ +dnl +dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after +dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make +dnl and preprocessor variable. +AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], +[ +PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) + +AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) +])dnl PKG_HAVE_DEFINE_WITH_MODULES + +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9365,7 +379,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -9381,14 +395,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9440,7 +454,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9471,7 +485,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9662,7 +676,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9701,7 +715,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -9728,7 +744,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9925,7 +941,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9946,7 +962,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9968,7 +984,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10003,7 +1019,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10046,7 +1062,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10085,7 +1101,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10114,7 +1130,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10161,7 +1177,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10180,7 +1196,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10261,7 +1277,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10321,7 +1337,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10349,7 +1365,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10368,7 +1384,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10509,3 +1525,8 @@ m4_include([build/autoconf/la_uid_t.m4]) m4_include([build/autoconf/lib-ld.m4]) m4_include([build/autoconf/lib-link.m4]) m4_include([build/autoconf/lib-prefix.m4]) +m4_include([build/autoconf/libtool.m4]) +m4_include([build/autoconf/ltoptions.m4]) +m4_include([build/autoconf/ltsugar.m4]) +m4_include([build/autoconf/ltversion.m4]) +m4_include([build/autoconf/lt~obsolete.m4]) diff --git a/archivers/libarchive/files/build/autoconf/compile b/archivers/libarchive/files/build/autoconf/compile index 99e50524b3b..23fcba01132 100755 --- a/archivers/libarchive/files/build/autoconf/compile +++ b/archivers/libarchive/files/build/autoconf/compile @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff --git a/archivers/libarchive/files/build/autoconf/config.guess b/archivers/libarchive/files/build/autoconf/config.guess index 41b8b854c02..a2c4684d30e 100755 --- a/archivers/libarchive/files/build/autoconf/config.guess +++ b/archivers/libarchive/files/build/autoconf/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2019-06-10' +timestamp='2019-01-03' # 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 @@ -187,8 +187,10 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in 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,'` + earm*) + arch="${UNAME_MACHINE_ARCH#e}" + arch="${arch%eb}" + arch="${arch%hf}" endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine="${arch}${endian}"-unknown ;; @@ -219,7 +221,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # Determine ABI tags. case "$UNAME_MACHINE_ARCH" in earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' + expr='s/v[0-9]//;s/earm/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac @@ -262,9 +264,6 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; - *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; @@ -388,7 +387,20 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in 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/[^.]*//'`" + set_cc_for_build + SUN_ARCH=sparc + # 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 __sparcv9'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=sparcv9 + fi + fi + echo "$SUN_ARCH"-sun-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" @@ -988,50 +1000,22 @@ EOF exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build - IS_GLIBC=0 - test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef mips - #undef mipsel - #undef mips64 - #undef mips64el - #if ${IS_GLIBC} && defined(_ABI64) - LIBCABI=gnuabi64 - #else - #if ${IS_GLIBC} && defined(_ABIN32) - LIBCABI=gnuabin32 - #else - LIBCABI=${LIBC} - #endif - #endif - - #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa64r6 - #else - #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 - CPU=mipsisa32r6 - #else - #if defined(__mips64) - CPU=mips64 - #else - CPU=mips - #endif - #endif - #endif - + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - MIPS_ENDIAN=el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - MIPS_ENDIAN= + CPU=${UNAME_MACHINE} #else - MIPS_ENDIAN= + CPU= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`" - test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; 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" @@ -1144,7 +1128,7 @@ 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 @@ -1328,39 +1312,38 @@ EOF echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - if command -v xcode-select > /dev/null 2> /dev/null && \ - ! xcode-select --print-path > /dev/null 2> /dev/null ; then - # Avoid executing cc if there is no toolchain installed as - # cc will be a stub that puts up a graphical alert - # prompting the user to install developer tools. - CC_FOR_BUILD=no_compiler_found - else - set_cc_for_build + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc fi - 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) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc + 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) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then - # uname -m returns i386 or x86_64 - UNAME_PROCESSOR=$UNAME_MACHINE + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; @@ -1465,143 +1448,6 @@ EOF exit ;; esac -# No uname command or uname output not recognized. -set_cc_for_build -cat > "$dummy.c" <<EOF -#ifdef _SEQUENT_ -#include <sys/types.h> -#include <sys/utsname.h> -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#include <signal.h> -#if defined(_SIZE_T_) || defined(SIGLOST) -#include <sys/utsname.h> -#endif -#endif -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); -#endif - -#if defined (vax) -#if !defined (ultrix) -#include <sys/param.h> -#if defined (BSD) -#if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -#else -#if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#endif -#else - printf ("vax-dec-bsd\n"); exit (0); -#endif -#else -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname un; - uname (&un); - printf ("vax-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif -#endif -#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) -#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) -#if defined(_SIZE_T_) || defined(SIGLOST) - struct utsname *un; - uname (&un); - printf ("mips-dec-ultrix%s\n", un.release); exit (0); -#else - printf ("mips-dec-ultrix\n"); exit (0); -#endif -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. -test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } - echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in diff --git a/archivers/libarchive/files/build/autoconf/config.sub b/archivers/libarchive/files/build/autoconf/config.sub index 5b158ac41c9..3b4c7624b68 100755 --- a/archivers/libarchive/files/build/autoconf/config.sub +++ b/archivers/libarchive/files/build/autoconf/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2019 Free Software Foundation, Inc. -timestamp='2019-05-23' +timestamp='2019-01-05' # 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 @@ -822,9 +822,7 @@ case $basic_machine in cpu=m68k vendor=next case $os in - openstep*) - ;; - nextstep*) + nextstep* ) ;; ns2*) os=nextstep2 @@ -1172,7 +1170,7 @@ case $cpu-$vendor in | asmjs \ | ba \ | be32 | be64 \ - | bfin | bpf | bs2000 \ + | bfin | bs2000 \ | c[123]* | c30 | [cjt]90 | c4x \ | c8051 | clipper | craynv | csky | cydra \ | d10v | d30v | dlx | dsp16xx \ @@ -1247,8 +1245,7 @@ case $cpu-$vendor in | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | vax \ | visium \ - | w65 \ - | wasm32 | wasm64 \ + | w65 | wasm32 \ | we32k \ | x86 | x86_64 | xc16x | xgate | xps100 \ | xstormy16 | xtensa* \ @@ -1368,7 +1365,7 @@ case $os in | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ - | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*) + | midnightbsd* | amdhsa* | unleashed* | emscripten*) # Remember, each alternative MUST END IN *, to match a version number. ;; qnx*) diff --git a/archivers/libarchive/files/build/autoconf/depcomp b/archivers/libarchive/files/build/autoconf/depcomp index 65cbf7093a1..6b391623c4b 100755 --- a/archivers/libarchive/files/build/autoconf/depcomp +++ b/archivers/libarchive/files/build/autoconf/depcomp @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/archivers/libarchive/files/build/autoconf/install-sh b/archivers/libarchive/files/build/autoconf/install-sh index 8175c640fe6..fd83d706270 100755 --- a/archivers/libarchive/files/build/autoconf/install-sh +++ b/archivers/libarchive/files/build/autoconf/install-sh @@ -1,518 +1,301 @@ #!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2018-03-11.20; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium # -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: +# $NetBSD: install-sh,v 1.6 2020/05/26 09:16:39 nia Exp $ +# This script now also installs multiple files, but might choke on installing +# multiple files with spaces in the file names. # -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). # +# Copyright 1991 by the Massachusetts Institute of Technology # -# FSF changes to this file are in the public domain. +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent -# 'make' implicit rules from creating a file called install from it +# `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. -tab=' ' -nl=' -' -IFS=" $tab$nl" - -# Set DOITPROG to "echo" to test this script. +# set DOITPROG to echo to test this script -doit=${DOITPROG-} -doit_exec=${doit:-exec} +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" -# Put in absolute file names if you don't have them in your path; -# or use environment vars. -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} +# put in absolute paths if you don't have them in your path; or use env. vars. -posix_mkdir= +awkprog="${AWKPROG-awk}" +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog +instcmd="$cpprog" +instflags="" +pathcompchmodcmd="$chmodprog 755" +chmodcmd="$chmodprog 755" +chowncmd="" +chgrpcmd="" +stripcmd="" +stripflags="" rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= +mvcmd="$mvprog" +src="" +msrc="" +dst="" +dir_arg="" +suffix="" +suffixfmt="" + +while [ x"$1" != x ]; do + case $1 in + -b) suffix=".old" + shift + continue;; + + -B) suffixfmt="$2" + shift + shift + continue;; + + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -m*) + chmodcmd="$chmodprog ${1#-m}" + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -S) stripcmd="$stripprog" + stripflags="-S $2 $stripflags" + shift + shift + continue;; + + -p) instflags="-p" + shift + continue;; + + *) if [ x"$msrc" = x ] + then + msrc="$dst" + else + msrc="$msrc $dst" + fi + src="$dst" + dst="$1" + shift + continue;; + esac +done -copy_on_change=false -is_target_a_directory=possibly +if [ x"$dir_arg" = x ] +then + dstisfile="" + if [ ! -d "$dst" ] + then + if [ x"$msrc" = x"$src" ] + then + dstisfile=true + else + echo "install: destination is not a directory" + exit 1 + fi + fi +else + msrc="$msrc $dst" +fi -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... +if [ x"$msrc" = x ] +then + echo "install: no destination specified" + exit 1 +fi + +for srcarg in $msrc; do + +if [ x"$dir_arg" != x ]; then + + dstarg="$srcarg" +else + dstarg="$dst" + +# Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f "$srcarg" ] + then + doinst="$instcmd $instflags" + elif [ -d "$srcarg" ] + then + echo "install: $srcarg: not a regular file" + exit 1 + elif [ "$srcarg" = "/dev/null" ] + then + doinst="$cpprog" + else + echo "install: $srcarg does not exist" + exit 1 + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d "$dstarg" ] + then + dstarg="$dstarg"/`basename "$srcarg"` + fi +fi -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. +## this sed command emulates the dirname command +dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` -Options: - --help display this help and exit. - --version display version info and exit. +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" -while test $# -ne 0; do - case $1 in - -c) ;; +pathcomp='' - -C) copy_on_change=true;; +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift - -d) dir_arg=true;; + if [ ! -d "${pathcomp}" ] ; + then + $doit $mkdirprog "${pathcomp}" + if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi && + if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi - -g) chgrpcmd="$chgrpprog $2" - shift;; + else + true + fi - --help) echo "$usage"; exit $?;; + pathcomp="${pathcomp}/" +done +fi - -m) mode=$2 - case $mode in - *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + if [ x"$dir_arg" != x ] + then + if [ -d "$dstarg" ]; then + true + else + $doit $mkdirprog "$dstarg" && - -o) chowncmd="$chownprog $2" - shift;; + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi + fi + else - -s) stripcmd=$stripprog;; + if [ x"$dstisfile" = x ] + then + file=$srcarg + else + file=$dst + fi - -t) - is_target_a_directory=always - dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + dstfile=`basename "$file"` + dstfinal="$dstdir/$dstfile" - -T) is_target_a_directory=never;; +# Make a temp file name in the proper directory. - --version) echo "$0 $scriptversion"; exit $?;; + dsttmp=$dstdir/#inst.$$# - --) shift - break;; +# Make a backup file name in the proper directory. + case x$suffixfmt in + *%*) suffix=`echo x | + $awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" ' + { cnt = 0; + do { + sfx = sprintf(fmt, cnt++); + name = bname sfx; + } while (system("test -f " name) == 0); + print sfx; }' -`;; + x) ;; + *) suffix="$suffixfmt";; + esac + dstbackup="$dstfinal$suffix" - -*) echo "$0: invalid option: $1" >&2 - exit 1;; +# Move or copy the file name to the temp name - *) break;; - esac - shift -done + $doit $doinst $srcarg "$dsttmp" && -# We allow the use of options -d and -T together, by making -d -# take the precedence; this is for compatibility with GNU install. + trap "rm -f ${dsttmp}" 0 && -if test -n "$dir_arg"; then - if test -n "$dst_arg"; then - echo "$0: target directory not allowed when installing a directory." >&2 - exit 1 - fi -fi +# and set any options; do chmod last to preserve setuid bits -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - done -fi +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call 'install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi && -if test -z "$dir_arg"; then - if test $# -gt 1 || test "$is_target_a_directory" = always; then - if test ! -d "$dst_arg"; then - echo "$0: $dst_arg: Is not a directory." >&2 - exit 1 - fi - fi -fi +# Now rename the file to the real destination. -if test -z "$dir_arg"; then - do_exit='(exit $ret); exit $ret' - trap "ret=129; $do_exit" 1 - trap "ret=130; $do_exit" 2 - trap "ret=141; $do_exit" 13 - trap "ret=143; $do_exit" 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi + if [ x"$suffix" != x ] && [ -f "$dstfinal" ] + then + $doit $mvcmd "$dstfinal" "$dstbackup" + else + $doit $rmcmd -f "$dstfinal" + fi && + $doit $mvcmd "$dsttmp" "$dstfinal" + fi -for src -do - # Protect names problematic for 'test' and other utilities. - case $src in - -* | [=\(\)!]) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - dst=$dst_arg - - # If destination is a directory, append the input filename. - if test -d "$dst"; then - if test "$is_target_a_directory" = never; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dstbase=`basename "$src"` - case $dst in - */) dst=$dst$dstbase;; - *) dst=$dst/$dstbase;; - esac - dstdir_status=0 - else - dstdir=`dirname "$dst"` - test -d "$dstdir" - dstdir_status=$? - fi - fi - - case $dstdir in - */) dstdirslash=$dstdir;; - *) dstdirslash=$dstdir/;; - esac - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; - esac +done && - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - oIFS=$IFS - IFS=/ - set -f - set fnord $dstdir - shift - set +f - IFS=$oIFS - - prefixes= - - for d - do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=${dstdirslash}_inst.$$_ - rmtmp=${dstdirslash}_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - set +f && - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: +exit 0 diff --git a/archivers/libarchive/files/build/autoconf/ltmain.sh b/archivers/libarchive/files/build/autoconf/ltmain.sh index f402c9c17d3..ffabee228c1 100755 --- a/archivers/libarchive/files/build/autoconf/ltmain.sh +++ b/archivers/libarchive/files/build/autoconf/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-10" +VERSION=2.4.6 package_revision=2.4.6 @@ -309,6 +309,9 @@ test -z "$GREP" && { # uses them if a suitable command of that name is not already available # in the command search PATH. +unset CP +unset MV +unset RM : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} @@ -1370,7 +1373,7 @@ func_lt_ver () #! /bin/sh # Set a version string for this script. -scriptversion=2015-10-07.11; # UTC +scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,8 +1533,6 @@ func_run_hooks () { $debug_cmd - _G_rc_run_hooks=false - case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1540,16 +1541,16 @@ func_run_hooks () eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - if eval $_G_hook '"$@"'; then - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift - _G_rc_run_hooks=: - fi + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift done - $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result } @@ -1559,16 +1560,10 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, you may remove/edit -# any options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed # options in '<hooked_function_name>_result', escaped suitably for -# 'eval'. In this case you also must return $EXIT_SUCCESS to let the -# hook's caller know that it should pay attention to -# '<hooked_function_name>_result'. Returning $EXIT_FAILURE signalizes that -# arguments are left untouched by the hook and therefore caller will ignore the -# result variable. -# -# Like this: +# 'eval'. Like this: # # my_options_prep () # { @@ -1578,11 +1573,9 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# # No change in '$@' (ignored completely by this hook). There is -# # no need to do the equivalent (but slower) action: -# # func_quote_for_eval ${1+"$@"} -# # my_options_prep_result=$func_quote_for_eval_result -# false +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # @@ -1591,37 +1584,25 @@ func_run_hooks () # { # $debug_cmd # -# args_changed=false -# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: -# args_changed=: -# ;; +# --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift -# args_changed=: # ;; -# *) # Make sure the first unrecognised option "$_G_opt" -# # is added back to "$@", we could need that later -# # if $args_changed is true. -# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # -# if $args_changed; then -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result -# fi -# -# $args_changed +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # @@ -1633,32 +1614,16 @@ func_run_hooks () # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# false +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll also need to manually amend $usage_message to reflect the extra +# You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. -# func_options_finish [ARG]... -# ---------------------------- -# Finishing the option parse loop (call 'func_options' hooks ATM). -func_options_finish () -{ - $debug_cmd - - _G_func_options_finish_exit=false - if func_run_hooks func_options ${1+"$@"}; then - func_options_finish_result=$func_run_hooks_result - _G_func_options_finish_exit=: - fi - - $_G_func_options_finish_exit -} - - # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1668,28 +1633,17 @@ func_options () { $debug_cmd - _G_rc_options=false - - for my_func in options_prep parse_options validate_options options_finish - do - if eval func_$my_func '${1+"$@"}'; then - eval _G_res_var='$'"func_${my_func}_result" - eval set dummy "$_G_res_var" ; shift - _G_rc_options=: - fi - done + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} - # Save modified positional parameters for caller. As a top-level - # options-parser function we always need to set the 'func_options_result' - # variable (regardless the $_G_rc_options value). - if $_G_rc_options; then - func_options_result=$_G_res_var - else - func_quote_for_eval ${1+"$@"} - func_options_result=$func_quote_for_eval_result - fi + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} - $_G_rc_options + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result } @@ -1698,9 +1652,9 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propagate that back to rest of this script, then the complete +# needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). +# returning. func_hookable func_options_prep func_options_prep () { @@ -1710,14 +1664,10 @@ func_options_prep () opt_verbose=false opt_warning_types= - _G_rc_options_prep=false - if func_run_hooks func_options_prep ${1+"$@"}; then - _G_rc_options_prep=: - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result - fi + func_run_hooks func_options_prep ${1+"$@"} - $_G_rc_options_prep + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result } @@ -1731,20 +1681,18 @@ func_parse_options () func_parse_options_result= - _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - if func_run_hooks func_parse_options ${1+"$@"}; then - eval set dummy "$func_run_hooks_result"; shift - _G_rc_parse_options=: - fi + func_run_hooks func_parse_options ${1+"$@"} + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break - _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1759,10 +1707,7 @@ func_parse_options () ;; --warnings|--warning|-W) - if test $# = 0 && func_missing_arg $_G_opt; then - _G_rc_parse_options=: - break - fi + test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1815,25 +1760,15 @@ func_parse_options () shift ;; - --) _G_rc_parse_options=: ; break ;; + --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift - _G_match_parse_options=false - break - ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - - $_G_match_parse_options && _G_rc_parse_options=: done - - if $_G_rc_parse_options; then - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result - fi - - $_G_rc_parse_options + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result } @@ -1846,21 +1781,16 @@ func_validate_options () { $debug_cmd - _G_rc_validate_options=false - # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - if func_run_hooks func_validate_options ${1+"$@"}; then - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result - _G_rc_validate_options=: - fi + func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - $_G_rc_validate_options + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result } @@ -2141,7 +2071,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-10 + version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2343,8 +2273,6 @@ libtool_options_prep () nonopt= preserve_args= - _G_rc_lt_options_prep=: - # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2368,18 +2296,11 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; - *) - _G_rc_lt_options_prep=false - ;; esac - if $_G_rc_lt_options_prep; then - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result - fi - - $_G_rc_lt_options_prep + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep @@ -2391,12 +2312,9 @@ libtool_parse_options () { $debug_cmd - _G_rc_lt_parse_options=false - # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do - _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2471,22 +2389,15 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"} ; shift - _G_match_lt_parse_options=false - break - ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done - if $_G_rc_lt_parse_options; then - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result - fi - $_G_rc_lt_parse_options + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options @@ -7364,14 +7275,10 @@ func_mode_link () # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer - # -fuse-ld=* Linker select flags for GCC -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" @@ -7664,10 +7571,7 @@ func_mode_link () case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then @@ -7986,19 +7890,19 @@ func_mode_link () # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done continue fi # $pass = conv @@ -8441,7 +8345,11 @@ func_mode_link () # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then - add=$libdir/$linklib + if test -f "$inst_prefix_dir$libdir/$linklib"; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name @@ -8922,9 +8830,6 @@ func_mode_link () revision=$number_minor lt_irix_increment=no ;; - *) - func_fatal_configuration "$modename: unknown library version type '$version_type'" - ;; esac ;; no) @@ -8967,6 +8872,7 @@ func_mode_link () # Calculate the version variables. major= versuffix= + versuffix2= verstring= case $version_type in none) ;; @@ -9037,6 +8943,7 @@ func_mode_link () func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision + versuffix2=$major.$age ;; osf) @@ -9102,8 +9009,10 @@ func_mode_link () esac if test no = "$need_version"; then versuffix= + versuffix2= else versuffix=.0.0 + versuffix2=.0.0 fi fi @@ -9111,6 +9020,7 @@ func_mode_link () if test yes,no = "$avoid_version,$need_version"; then major= versuffix= + versuffix2= verstring= fi @@ -9224,7 +9134,7 @@ func_mode_link () *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-mirbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -9247,12 +9157,14 @@ func_mode_link () libname_save=$libname release_save=$release versuffix_save=$versuffix + versuffix2_save=$versuffix2 major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= + versuffix2= major= newdeplibs= droppeddeps=no @@ -9529,6 +9441,7 @@ EOF ;; esac versuffix=$versuffix_save + versuffix2=$versuffix2_save major=$major_save release=$release_save libname=$libname_save @@ -11014,7 +10927,7 @@ dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test no,yes = "$installed,$need_relink"; then + if test no,yes = "$installed,$need_relink" && test -n "$relink_command"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi diff --git a/archivers/libarchive/files/build/autoconf/missing b/archivers/libarchive/files/build/autoconf/missing index 625aeb11897..8d0eaad250f 100755 --- a/archivers/libarchive/files/build/autoconf/missing +++ b/archivers/libarchive/files/build/autoconf/missing @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify diff --git a/archivers/libarchive/files/build/autoconf/test-driver b/archivers/libarchive/files/build/autoconf/test-driver index b8521a482e2..89dba1e075c 100755 --- a/archivers/libarchive/files/build/autoconf/test-driver +++ b/archivers/libarchive/files/build/autoconf/test-driver @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/archivers/libarchive/files/build/cmake/CreatePkgConfigFile.cmake b/archivers/libarchive/files/build/cmake/CreatePkgConfigFile.cmake index fc8529a571f..bc5a43f72af 100644 --- a/archivers/libarchive/files/build/cmake/CreatePkgConfigFile.cmake +++ b/archivers/libarchive/files/build/cmake/CreatePkgConfigFile.cmake @@ -24,10 +24,10 @@ ENDFOREACH() # thus there's a good chance it'll make some binutils versions unhappy... # This only affects Libs.private (looked up for static builds) though. CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc.in - ${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc + ${CMAKE_CURRENT_BINARY_DIR}/build/pkgconfig/libarchive.pc @ONLY) # And install it, of course ;). IF(ENABLE_INSTALL) - INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/pkgconfig/libarchive.pc DESTINATION "lib/pkgconfig") ENDIF() diff --git a/archivers/libarchive/files/build/cmake/FindMbedTLS.cmake b/archivers/libarchive/files/build/cmake/FindMbedTLS.cmake new file mode 100644 index 00000000000..a9163958921 --- /dev/null +++ b/archivers/libarchive/files/build/cmake/FindMbedTLS.cmake @@ -0,0 +1,13 @@ +find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h) + +find_library(MBEDTLS_LIBRARY mbedtls) +find_library(MBEDX509_LIBRARY mbedx509) +find_library(MBEDCRYPTO_LIBRARY mbedcrypto) + +set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(MBEDTLS DEFAULT_MSG + MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY) + +mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY) diff --git a/archivers/libarchive/files/build/cmake/config.h.in b/archivers/libarchive/files/build/cmake/config.h.in index f0761c957ec..fcbd80c5a17 100644 --- a/archivers/libarchive/files/build/cmake/config.h.in +++ b/archivers/libarchive/files/build/cmake/config.h.in @@ -710,6 +710,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `lzo2' library (-llzo2). */ #cmakedefine HAVE_LIBLZO2 1 +/* Define to 1 if you have the `mbedcrypto' library (-lmbedcrypto). */ +#cmakedefine HAVE_LIBMBEDCRYPTO 1 + /* Define to 1 if you have the `nettle' library (-lnettle). */ #cmakedefine HAVE_LIBNETTLE 1 @@ -1207,6 +1210,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `_get_timezone' function. */ #cmakedefine HAVE__GET_TIMEZONE 1 +/* Define to 1 if you have the `_gmtime64_s' function. */ +#cmakedefine HAVE__GMTIME64_S 1 + /* Define to 1 if you have the `_localtime64_s' function. */ #cmakedefine HAVE__LOCALTIME64_S 1 diff --git a/archivers/libarchive/files/build/version b/archivers/libarchive/files/build/version index 784078cf9c9..2e3400d77cb 100644 --- a/archivers/libarchive/files/build/version +++ b/archivers/libarchive/files/build/version @@ -1 +1 @@ -3004000 +3004003 diff --git a/archivers/libarchive/files/cat/bsdcat.1 b/archivers/libarchive/files/cat/bsdcat.1 index 4f82b1e57c0..036623e4e4d 100644 --- a/archivers/libarchive/files/cat/bsdcat.1 +++ b/archivers/libarchive/files/cat/bsdcat.1 @@ -34,16 +34,15 @@ .Nm .Op options .Op files -.Pp .Sh DESCRIPTION .Nm expands files to standard output. .Sh OPTIONS .Nm typically takes a filename as an argument or reads standard input when used in a -pipe. In both cases decompressed data it written to standard output. +pipe. +In both cases decompressed data it written to standard output. .Sh EXAMPLES -.Pp To decompress a file: .Pp .Dl bsdcat example.txt.gz > example.txt @@ -55,8 +54,8 @@ To decompress standard input in a pipe: Both examples achieve the same results - a decompressed file by redirecting output. .Sh SEE ALSO -.Xr uncompress 1 , -.Xr zcat 1 , .Xr bzcat 1 , +.Xr uncompress 1 , .Xr xzcat 1 , -.Xr libarchive-formats 5 , +.Xr zcat 1 , +.Xr libarchive-formats 5 diff --git a/archivers/libarchive/files/cat/bsdcat.h b/archivers/libarchive/files/cat/bsdcat.h index 2e055e7c187..6467d6e3d31 100644 --- a/archivers/libarchive/files/cat/bsdcat.h +++ b/archivers/libarchive/files/cat/bsdcat.h @@ -23,6 +23,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef BSDCAT_H_INCLUDED +#define BSDCAT_H_INCLUDED + #if defined(PLATFORM_CONFIG_H) /* Use hand-built config.h in environments that need it. */ #include PLATFORM_CONFIG_H @@ -54,3 +57,5 @@ void usage(FILE *stream, int eval); void bsdcat_next(void); void bsdcat_print_error(void); void bsdcat_read_to_stdout(const char* filename); + +#endif diff --git a/archivers/libarchive/files/cat/test/list.h b/archivers/libarchive/files/cat/test/list.h index 5246122281f..57f2f2ac4d5 100644 --- a/archivers/libarchive/files/cat/test/list.h +++ b/archivers/libarchive/files/cat/test/list.h @@ -5,13 +5,13 @@ DEFINE_TEST(test_empty_xz) DEFINE_TEST(test_empty_zstd) DEFINE_TEST(test_error) DEFINE_TEST(test_error_mixed) +DEFINE_TEST(test_expand_Z) DEFINE_TEST(test_expand_bz2) DEFINE_TEST(test_expand_gz) DEFINE_TEST(test_expand_lz4) 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) diff --git a/archivers/libarchive/files/cat/test/test_0.c b/archivers/libarchive/files/cat/test/test_0.c index f9fe5d8473f..c806c24356c 100644 --- a/archivers/libarchive/files/cat/test/test_0.c +++ b/archivers/libarchive/files/cat/test/test_0.c @@ -59,7 +59,7 @@ DEFINE_TEST(test_0) * we know some option that will succeed. */ if (0 != systemf("%s --version >" DEV_NULL, testprog)) { - failure("Unable to successfully run: %s --version\n", testprog, testprog); + failure("Unable to successfully run: %s --version\n", testprog); assert(0); } diff --git a/archivers/libarchive/files/config.h.in b/archivers/libarchive/files/config.h.in index 96a30255331..1a94a69495f 100644 --- a/archivers/libarchive/files/config.h.in +++ b/archivers/libarchive/files/config.h.in @@ -30,6 +30,9 @@ /* MD5 via ARCHIVE_CRYPTO_MD5_LIBSYSTEM supported. */ #undef ARCHIVE_CRYPTO_MD5_LIBSYSTEM +/* MD5 via ARCHIVE_CRYPTO_MD5_MBEDTLS supported. */ +#undef ARCHIVE_CRYPTO_MD5_MBEDTLS + /* MD5 via ARCHIVE_CRYPTO_MD5_NETTLE supported. */ #undef ARCHIVE_CRYPTO_MD5_NETTLE @@ -45,6 +48,9 @@ /* RMD160 via ARCHIVE_CRYPTO_RMD160_LIBMD supported. */ #undef ARCHIVE_CRYPTO_RMD160_LIBMD +/* RMD160 via ARCHIVE_CRYPTO_RMD160_MBEDTLS supported. */ +#undef ARCHIVE_CRYPTO_RMD160_MBEDTLS + /* RMD160 via ARCHIVE_CRYPTO_RMD160_NETTLE supported. */ #undef ARCHIVE_CRYPTO_RMD160_NETTLE @@ -60,6 +66,9 @@ /* SHA1 via ARCHIVE_CRYPTO_SHA1_LIBSYSTEM supported. */ #undef ARCHIVE_CRYPTO_SHA1_LIBSYSTEM +/* SHA1 via ARCHIVE_CRYPTO_SHA1_MBEDTLS supported. */ +#undef ARCHIVE_CRYPTO_SHA1_MBEDTLS + /* SHA1 via ARCHIVE_CRYPTO_SHA1_NETTLE supported. */ #undef ARCHIVE_CRYPTO_SHA1_NETTLE @@ -84,6 +93,9 @@ /* SHA256 via ARCHIVE_CRYPTO_SHA256_LIBSYSTEM supported. */ #undef ARCHIVE_CRYPTO_SHA256_LIBSYSTEM +/* SHA256 via ARCHIVE_CRYPTO_SHA256_MBEDTLS supported. */ +#undef ARCHIVE_CRYPTO_SHA256_MBEDTLS + /* SHA256 via ARCHIVE_CRYPTO_SHA256_NETTLE supported. */ #undef ARCHIVE_CRYPTO_SHA256_NETTLE @@ -105,6 +117,9 @@ /* SHA384 via ARCHIVE_CRYPTO_SHA384_LIBSYSTEM supported. */ #undef ARCHIVE_CRYPTO_SHA384_LIBSYSTEM +/* SHA384 via ARCHIVE_CRYPTO_SHA384_MBEDTLS supported. */ +#undef ARCHIVE_CRYPTO_SHA384_MBEDTLS + /* SHA384 via ARCHIVE_CRYPTO_SHA384_NETTLE supported. */ #undef ARCHIVE_CRYPTO_SHA384_NETTLE @@ -129,6 +144,9 @@ /* SHA512 via ARCHIVE_CRYPTO_SHA512_LIBSYSTEM supported. */ #undef ARCHIVE_CRYPTO_SHA512_LIBSYSTEM +/* SHA512 via ARCHIVE_CRYPTO_SHA512_MBEDTLS supported. */ +#undef ARCHIVE_CRYPTO_SHA512_MBEDTLS + /* SHA512 via ARCHIVE_CRYPTO_SHA512_NETTLE supported. */ #undef ARCHIVE_CRYPTO_SHA512_NETTLE @@ -631,6 +649,9 @@ /* Define to 1 if you have the `lzo2' library (-llzo2). */ #undef HAVE_LIBLZO2 +/* Define to 1 if you have the `mbedcrypto' library (-lmbedcrypto). */ +#undef HAVE_LIBMBEDCRYPTO + /* Define to 1 if you have the `md' library (-lmd). */ #undef HAVE_LIBMD @@ -743,6 +764,15 @@ /* Define to 1 if you have the <lzo/lzoconf.h> header file. */ #undef HAVE_LZO_LZOCONF_H +/* Define to 1 if you have the <mbedtls/aes.h> header file. */ +#undef HAVE_MBEDTLS_AES_H + +/* Define to 1 if you have the <mbedtls/md.h> header file. */ +#undef HAVE_MBEDTLS_MD_H + +/* Define to 1 if you have the <mbedtls/pkcs5.h> header file. */ +#undef HAVE_MBEDTLS_PKCS5_H + /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC @@ -1193,6 +1223,9 @@ /* Define to 1 if you have the `_get_timezone' function. */ #undef HAVE__GET_TIMEZONE +/* Define to 1 if you have the `_gmtime64_s' function. */ +#undef HAVE__GMTIME64_S + /* Define to 1 if you have the `_localtime64_s' function. */ #undef HAVE__LOCALTIME64_S diff --git a/archivers/libarchive/files/configure b/archivers/libarchive/files/configure index dd1f54c9071..937f7a6fd41 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.4.0. +# Generated by GNU Autoconf 2.69 for libarchive 3.4.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.4.0' -PACKAGE_STRING='libarchive 3.4.0' +PACKAGE_VERSION='3.4.3' +PACKAGE_STRING='libarchive 3.4.3' PACKAGE_BUGREPORT='libarchive-discuss@googlegroups.com' PACKAGE_URL='' @@ -773,7 +773,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -822,6 +821,7 @@ with_zstd with_lzma with_lzo2 with_cng +with_mbedtls with_nettle with_openssl with_xml2 @@ -884,7 +884,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1137,15 +1136,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1283,7 +1273,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1396,7 +1386,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.4.0 to adapt to many kinds of systems. +\`configure' configures libarchive 3.4.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1436,7 +1426,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1467,7 +1456,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libarchive 3.4.0:";; + short | recursive ) echo "Configuration of libarchive 3.4.3:";; esac cat <<\_ACEOF @@ -1540,7 +1529,8 @@ Optional Packages: --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) - --without-nettle Don't build with crypto support from Nettle + --with-mbedtls Build with crypto support from mbed TLS + --with-nettle Build with crypto support from Nettle --without-openssl Don't build support for mtree and xar hashes through openssl --without-xml2 Don't build support for xar through libxml2 @@ -1633,7 +1623,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libarchive configure 3.4.0 +libarchive configure 3.4.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2472,7 +2462,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.4.0, which was +It was created by libarchive $as_me 3.4.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3341,7 +3331,7 @@ fi # Define the identity of the package. PACKAGE='libarchive' - VERSION='3.4.0' + VERSION='3.4.3' cat >>confdefs.h <<_ACEOF @@ -3501,7 +3491,7 @@ AM_BACKSLASH='\' # Libtool interface version bumps on any API change, so increments # whenever libarchive minor version does. -ARCHIVE_MINOR=$(( (3004000 / 1000) % 1000 )) +ARCHIVE_MINOR=$(( (3004003 / 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 @@ -3509,37 +3499,37 @@ ARCHIVE_MINOR=$(( (3004000 / 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=$(( 3004000 % 1000 )) +ARCHIVE_REVISION=$(( 3004003 % 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.4.0\"" >>confdefs.h +$as_echo "#define LIBARCHIVE_VERSION_STRING \"3.4.3\"" >>confdefs.h cat >>confdefs.h <<_ACEOF -#define LIBARCHIVE_VERSION_NUMBER "3004000" +#define LIBARCHIVE_VERSION_NUMBER "3004003" _ACEOF -$as_echo "#define BSDCPIO_VERSION_STRING \"3.4.0\"" >>confdefs.h +$as_echo "#define BSDCPIO_VERSION_STRING \"3.4.3\"" >>confdefs.h -$as_echo "#define BSDTAR_VERSION_STRING \"3.4.0\"" >>confdefs.h +$as_echo "#define BSDTAR_VERSION_STRING \"3.4.3\"" >>confdefs.h -$as_echo "#define BSDCAT_VERSION_STRING \"3.4.0\"" >>confdefs.h +$as_echo "#define BSDCAT_VERSION_STRING \"3.4.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.4.0 -BSDTAR_VERSION_STRING=3.4.0 -BSDCAT_VERSION_STRING=3.4.0 -LIBARCHIVE_VERSION_STRING=3.4.0 -LIBARCHIVE_VERSION_NUMBER=3004000 +BSDCPIO_VERSION_STRING=3.4.3 +BSDTAR_VERSION_STRING=3.4.3 +BSDCAT_VERSION_STRING=3.4.3 +LIBARCHIVE_VERSION_STRING=3.4.3 +LIBARCHIVE_VERSION_NUMBER=3004003 # Substitute the above version numbers into the various files below. # Yes, I believe this is the fourth time we define what are essentially @@ -4700,6 +4690,183 @@ else fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 +$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +if ${ac_cv_prog_cc_c99+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdbool.h> +#include <stdlib.h> +#include <wchar.h> +#include <stdio.h> + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static void +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str; + int number; + float fnumber; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); +} + +int +main () +{ + + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); + + ; + return 0; +} +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c99" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c99" != xno; then : + +fi + + ac_ext=c @@ -6568,7 +6735,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; -netbsd* | netbsdelf*-gnu) +netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -7428,8 +7595,11 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -9260,6 +9430,10 @@ _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= @@ -9505,12 +9679,6 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -9987,9 +10155,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie openbsd* | bitrig*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu | gnu*) - link_all_deplibs=no - ;; esac ld_shlibs=yes @@ -10244,7 +10409,7 @@ _LT_EOF fi ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -10914,7 +11079,6 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi - link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' @@ -10936,7 +11100,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } esac ;; - netbsd* | netbsdelf*-gnu) + netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -12051,18 +12215,6 @@ fi dynamic_linker='GNU/Linux ld.so' ;; -netbsdelf*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='NetBSD ld.elf_so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -15518,6 +15670,12 @@ fi +# Check whether --with-mbedtls was given. +if test "${with_mbedtls+set}" = set; then : + withval=$with_mbedtls; +fi + + # Check whether --with-nettle was given. if test "${with_nettle+set}" = set; then : withval=$with_nettle; @@ -17912,7 +18070,7 @@ _ACEOF fi done -for ac_func in _get_timezone _localtime64_s _mkgmtime64 +for ac_func in _get_timezone _gmtime64_s _localtime64_s _mkgmtime64 do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -18998,7 +19156,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -19044,7 +19202,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -19068,7 +19226,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -19113,7 +19271,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -19137,7 +19295,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -19988,7 +20146,348 @@ done fi -if test "x$with_nettle" != "xno"; then +if test "x$with_mbedtls" = "xyes"; then + for ac_header in mbedtls/aes.h mbedtls/md.h mbedtls/pkcs5.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" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + saved_LIBS=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbedtls_sha1_init in -lmbedcrypto" >&5 +$as_echo_n "checking for mbedtls_sha1_init in -lmbedcrypto... " >&6; } +if ${ac_cv_lib_mbedcrypto_mbedtls_sha1_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmbedcrypto $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 mbedtls_sha1_init (); +int +main () +{ +return mbedtls_sha1_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mbedcrypto_mbedtls_sha1_init=yes +else + ac_cv_lib_mbedcrypto_mbedtls_sha1_init=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_mbedcrypto_mbedtls_sha1_init" >&5 +$as_echo "$ac_cv_lib_mbedcrypto_mbedtls_sha1_init" >&6; } +if test "x$ac_cv_lib_mbedcrypto_mbedtls_sha1_init" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMBEDCRYPTO 1 +_ACEOF + + LIBS="-lmbedcrypto $LIBS" + +fi + + + if test "$found_MD5" != yes; then + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I. -I$srcdir -I$srcdir/libarchive" + touch "check_crypto_md.h" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking support for ARCHIVE_CRYPTO_MD5_MBEDTLS" >&5 +$as_echo_n "checking support for ARCHIVE_CRYPTO_MD5_MBEDTLS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define ARCHIVE_MD5_COMPILE_TEST +#define ARCHIVE_CRYPTO_MD5_MBEDTLS +#define PLATFORM_CONFIG_H "check_crypto_md.h" + +$(cat "$srcdir/libarchive/archive_digest.c") + +int +main(int argc, char **argv) +{ + archive_md5_ctx ctx; + archive_md5_init(&ctx); + archive_md5_update(&ctx, *argv, argc); + archive_md5_final(&ctx, NULL); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + found_MD5=yes + found_MBEDTLS=yes + +$as_echo "#define ARCHIVE_CRYPTO_MD5_MBEDTLS 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS="$saved_CPPFLAGS" + rm "check_crypto_md.h" + fi + + + if test "$found_RMD160" != yes; then + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I. -I$srcdir -I$srcdir/libarchive" + touch "check_crypto_md.h" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking support for ARCHIVE_CRYPTO_RMD160_MBEDTLS" >&5 +$as_echo_n "checking support for ARCHIVE_CRYPTO_RMD160_MBEDTLS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define ARCHIVE_RMD160_COMPILE_TEST +#define ARCHIVE_CRYPTO_RMD160_MBEDTLS +#define PLATFORM_CONFIG_H "check_crypto_md.h" + +$(cat "$srcdir/libarchive/archive_digest.c") + +int +main(int argc, char **argv) +{ + archive_rmd160_ctx ctx; + archive_rmd160_init(&ctx); + archive_rmd160_update(&ctx, *argv, argc); + archive_rmd160_final(&ctx, NULL); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + found_RMD160=yes + found_MBEDTLS=yes + +$as_echo "#define ARCHIVE_CRYPTO_RMD160_MBEDTLS 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS="$saved_CPPFLAGS" + rm "check_crypto_md.h" + fi + + + if test "$found_SHA1" != yes; then + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I. -I$srcdir -I$srcdir/libarchive" + touch "check_crypto_md.h" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking support for ARCHIVE_CRYPTO_SHA1_MBEDTLS" >&5 +$as_echo_n "checking support for ARCHIVE_CRYPTO_SHA1_MBEDTLS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define ARCHIVE_SHA1_COMPILE_TEST +#define ARCHIVE_CRYPTO_SHA1_MBEDTLS +#define PLATFORM_CONFIG_H "check_crypto_md.h" + +$(cat "$srcdir/libarchive/archive_digest.c") + +int +main(int argc, char **argv) +{ + archive_sha1_ctx ctx; + archive_sha1_init(&ctx); + archive_sha1_update(&ctx, *argv, argc); + archive_sha1_final(&ctx, NULL); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + found_SHA1=yes + found_MBEDTLS=yes + +$as_echo "#define ARCHIVE_CRYPTO_SHA1_MBEDTLS 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS="$saved_CPPFLAGS" + rm "check_crypto_md.h" + fi + + + if test "$found_SHA256" != yes; then + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I. -I$srcdir -I$srcdir/libarchive" + touch "check_crypto_md.h" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking support for ARCHIVE_CRYPTO_SHA256_MBEDTLS" >&5 +$as_echo_n "checking support for ARCHIVE_CRYPTO_SHA256_MBEDTLS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define ARCHIVE_SHA256_COMPILE_TEST +#define ARCHIVE_CRYPTO_SHA256_MBEDTLS +#define PLATFORM_CONFIG_H "check_crypto_md.h" + +$(cat "$srcdir/libarchive/archive_digest.c") + +int +main(int argc, char **argv) +{ + archive_sha256_ctx ctx; + archive_sha256_init(&ctx); + archive_sha256_update(&ctx, *argv, argc); + archive_sha256_final(&ctx, NULL); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + found_SHA256=yes + found_MBEDTLS=yes + +$as_echo "#define ARCHIVE_CRYPTO_SHA256_MBEDTLS 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS="$saved_CPPFLAGS" + rm "check_crypto_md.h" + fi + + + if test "$found_SHA384" != yes; then + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I. -I$srcdir -I$srcdir/libarchive" + touch "check_crypto_md.h" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking support for ARCHIVE_CRYPTO_SHA384_MBEDTLS" >&5 +$as_echo_n "checking support for ARCHIVE_CRYPTO_SHA384_MBEDTLS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define ARCHIVE_SHA384_COMPILE_TEST +#define ARCHIVE_CRYPTO_SHA384_MBEDTLS +#define PLATFORM_CONFIG_H "check_crypto_md.h" + +$(cat "$srcdir/libarchive/archive_digest.c") + +int +main(int argc, char **argv) +{ + archive_sha384_ctx ctx; + archive_sha384_init(&ctx); + archive_sha384_update(&ctx, *argv, argc); + archive_sha384_final(&ctx, NULL); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + found_SHA384=yes + found_MBEDTLS=yes + +$as_echo "#define ARCHIVE_CRYPTO_SHA384_MBEDTLS 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS="$saved_CPPFLAGS" + rm "check_crypto_md.h" + fi + + + if test "$found_SHA512" != yes; then + saved_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -I. -I$srcdir -I$srcdir/libarchive" + touch "check_crypto_md.h" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking support for ARCHIVE_CRYPTO_SHA512_MBEDTLS" >&5 +$as_echo_n "checking support for ARCHIVE_CRYPTO_SHA512_MBEDTLS... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define ARCHIVE_SHA512_COMPILE_TEST +#define ARCHIVE_CRYPTO_SHA512_MBEDTLS +#define PLATFORM_CONFIG_H "check_crypto_md.h" + +$(cat "$srcdir/libarchive/archive_digest.c") + +int +main(int argc, char **argv) +{ + archive_sha512_ctx ctx; + archive_sha512_init(&ctx); + archive_sha512_update(&ctx, *argv, argc); + archive_sha512_final(&ctx, NULL); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + found_SHA512=yes + found_MBEDTLS=yes + +$as_echo "#define ARCHIVE_CRYPTO_SHA512_MBEDTLS 1" >>confdefs.h + + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CPPFLAGS="$saved_CPPFLAGS" + rm "check_crypto_md.h" + fi + + if test "x$found_MBEDTLS" != "xyes"; then + LIBS=$saved_LIBS + fi +fi + +if test "x$with_nettle" = "xyes"; then for ac_header in nettle/md5.h nettle/ripemd160.h nettle/sha.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -21919,7 +22418,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.4.0, which was +This file was extended by libarchive $as_me 3.4.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21985,7 +22484,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.4.0 +libarchive config.status 3.4.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -23082,7 +23581,9 @@ $as_echo X/"$am_mf" | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } @@ -23109,6 +23610,7 @@ See \`config.log' for more details" "$LINENO" 5; } cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. diff --git a/archivers/libarchive/files/configure.ac b/archivers/libarchive/files/configure.ac index c517b17c197..e73985846c7 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.4.0]) -m4_define([LIBARCHIVE_VERSION_N],[3004000]) +m4_define([LIBARCHIVE_VERSION_S],[3.4.3]) +m4_define([LIBARCHIVE_VERSION_N],[3004003]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) @@ -26,7 +26,7 @@ AC_CONFIG_AUX_DIR([build/autoconf]) # M4 scripts AC_CONFIG_MACRO_DIR([build/autoconf]) # Must follow AC_CONFIG macros above... -AM_INIT_AUTOMAKE() +AM_INIT_AUTOMAKE([1.11 dist-xz dist-zip]) AM_MAINTAINER_MODE([enable]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -103,6 +103,7 @@ AC_SUBST(PLATFORMCPPFLAGS) # Checks for programs. AC_PROG_CC +AC_PROG_CC_C99 AM_PROG_CC_C_O AC_USE_SYSTEM_EXTENSIONS AC_LIBTOOL_WIN32_DLL @@ -421,8 +422,10 @@ fi AC_ARG_WITH([cng], AS_HELP_STRING([--without-cng], [Don't build support of CNG(Crypto Next Generation)])) +AC_ARG_WITH([mbedtls], + AS_HELP_STRING([--with-mbedtls], [Build with crypto support from mbed TLS])) AC_ARG_WITH([nettle], - AS_HELP_STRING([--without-nettle], [Don't build with crypto support from Nettle])) + AS_HELP_STRING([--with-nettle], [Build with crypto support from Nettle])) AC_ARG_WITH([openssl], AS_HELP_STRING([--without-openssl], [Don't build support for mtree and xar hashes through openssl])) case "$host_os" in @@ -639,7 +642,7 @@ AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strrchr symlink timegm]) AC_CHECK_FUNCS([tzset unlinkat unsetenv utime utimensat utimes vfork]) AC_CHECK_FUNCS([wcrtomb wcscmp wcscpy wcslen wctomb wmemcmp wmemcpy wmemmove]) AC_CHECK_FUNCS([_ctime64_s _fseeki64]) -AC_CHECK_FUNCS([_get_timezone _localtime64_s _mkgmtime64]) +AC_CHECK_FUNCS([_get_timezone _gmtime64_s _localtime64_s _mkgmtime64]) # detects cygwin-1.7, as opposed to older versions AC_CHECK_FUNCS([cygwin_conv_path]) @@ -1120,7 +1123,22 @@ if test "x$with_cng" != "xno"; then ]]) fi -if test "x$with_nettle" != "xno"; then +if test "x$with_mbedtls" = "xyes"; then + AC_CHECK_HEADERS([mbedtls/aes.h mbedtls/md.h mbedtls/pkcs5.h]) + saved_LIBS=$LIBS + AC_CHECK_LIB(mbedcrypto,mbedtls_sha1_init) + CRYPTO_CHECK(MD5, MBEDTLS, md5) + CRYPTO_CHECK(RMD160, MBEDTLS, rmd160) + CRYPTO_CHECK(SHA1, MBEDTLS, sha1) + CRYPTO_CHECK(SHA256, MBEDTLS, sha256) + CRYPTO_CHECK(SHA384, MBEDTLS, sha384) + CRYPTO_CHECK(SHA512, MBEDTLS, sha512) + if test "x$found_MBEDTLS" != "xyes"; then + LIBS=$saved_LIBS + fi +fi + +if test "x$with_nettle" = "xyes"; then AC_CHECK_HEADERS([nettle/md5.h nettle/ripemd160.h nettle/sha.h]) AC_CHECK_HEADERS([nettle/pbkdf2.h nettle/aes.h nettle/hmac.h]) saved_LIBS=$LIBS diff --git a/archivers/libarchive/files/contrib/archivetest.c b/archivers/libarchive/files/contrib/archivetest.c index 8002039ee4e..e4a25e3c911 100644 --- a/archivers/libarchive/files/contrib/archivetest.c +++ b/archivers/libarchive/files/contrib/archivetest.c @@ -37,10 +37,14 @@ #include <archive.h> #include <archive_entry.h> -const char *errnostr(int errno) +#if defined __MINGW32__ +#include <getopt.h> +#endif + +static const char *errnostr(int e) { char *estr; - switch(errno) { + switch(e) { case ARCHIVE_EOF: estr = "ARCHIVE_EOF"; break; @@ -66,12 +70,12 @@ const char *errnostr(int errno) return (estr); } -void usage(const char *prog) +static void usage(const char *prog) { fprintf(stderr, "Usage: %s [-f filename] [-h] [-q] [-s]\n", prog); } -void printhelp() +static void printhelp() { fprintf(stdout, "archivetest: verify reading archives with " "libarchive\n\n" @@ -84,7 +88,7 @@ void printhelp() "\n%s\n", archive_version_details()); } -int v_print(int verbose, const char *format, ...) +static int v_print(int verbose, const char *format, ...) { int r = 0; @@ -139,6 +143,8 @@ int main(int argc, char *argv[]) fprintf(stderr, "Unknown option " "character '\\x%x'.\n", optopt); usage(argv[0]); + exit(1); + break; default: exit(1); } diff --git a/archivers/libarchive/files/contrib/libarchive.1aix53.spec b/archivers/libarchive/files/contrib/libarchive.1aix53.spec index b8546bd8e10..073752da136 100644 --- a/archivers/libarchive/files/contrib/libarchive.1aix53.spec +++ b/archivers/libarchive/files/contrib/libarchive.1aix53.spec @@ -127,14 +127,53 @@ rm -fr %buildroot All persons listed below can be reached at <cvs_login>@pld-linux.org $Log: libarchive.1aix53.spec,v $ -Revision 1.11 2019/09/22 09:55:06 joerg -Update for libarchive-3.4.0: -- improvements for Android APK and JAR archives -- better support for non-recursive list and extract -- tar --exclude-vcs support -- fixes for file attributes and flags handling -- zipx support -- rar 5.0 reader +Revision 1.12 2020/05/26 09:16:40 nia +libarchive: Update to 3.4.3 + +Libarchive 3.4.3 is a feature and bugfix release. + +New features: + + support for pzstd compressed files (#1357) + support for RHT.security.selinux tar extended attribute (#1348) + +Important bugfixes: + + various zstd fixes and improvements (#1342 #1352 #1359) + child process handling fixes (#1372) + +Libarchive 3.4.2 is a feature and security release. + +New features: + + support for atomic file extraction (bsdtar -x --safe-writes) (#1289) + support for mbed TLS (PolarSSL) (#1301) + +Important bugfixes: + + security fixes in RAR5 reader (#1280 #1326) + compression buffer fix in XAR writer (#1317) + fix uname and gname longer than 32 characters in PAX writer (#1319) + fix segfault when archiving hard links in ISO9660 and XAR writers (#1325) + fix support for extracting 7z archive entries with Delta filter (#987) + +Libarchive 3.4.1 is a feature and security release. + +New features: + + Unicode filename support for reading lha/lzh archives + New pax write option "xattrhdr" + +Important bugfixes: + + security fixes in wide string processing (#1276 #1298) + security fixes in RAR5 reader (#1212 #1217 #1296) + security fixes and optimizations to write filter logic (#351) + security fix related to use of readlink(2) (1dae5a5) + sparse file handling fixes (#1218 #1260) + +Thanks to all contributors and bug reporters. +Special thanks to Christos Zoulas (@zoulasc) from NetBSD for the atomic file extraction feature. Release 1aix53 2006/12/12 rm1023@dcx.com - tweak for aix-5.3 diff --git a/archivers/libarchive/files/contrib/shar/shar.1 b/archivers/libarchive/files/contrib/shar/shar.1 index e3152f299eb..31561978f05 100644 --- a/archivers/libarchive/files/contrib/shar/shar.1 +++ b/archivers/libarchive/files/contrib/shar/shar.1 @@ -61,7 +61,8 @@ or The following options are available: .Bl -tag -width indent .It Fl b -Use an alternative binary format. Content of files will be uuencoded. +Use an alternative binary format. +Content of files will be uuencoded. This option should be used to archive binary files correctly. In this mode also file permissions will be stored to the archive. uudecode(1) is needed to extract archives created with this option. @@ -72,8 +73,8 @@ Redirect output to If .Ar file given on command line is a directory the entire subtree will be archived. -Symbolic links given on command line are followed. Other symbolic links will -be archived as such. +Symbolic links given on command line are followed. +Other symbolic links will be archived as such. .El .Sh EXAMPLES To create a shell archive of the program @@ -111,7 +112,9 @@ The command makes no provisions for hard links. .Pp Files containing magic characters or files without a newline ('\\n') as the -last character are not handled correctly with the default format. Use the -b +last character are not handled correctly with the default format. +Use the +.Fl b option for binary files. .Pp It is easy to insert trojan horses into diff --git a/archivers/libarchive/files/cpio/bsdcpio.1 b/archivers/libarchive/files/cpio/bsdcpio.1 index 786a717097e..514c1a2c193 100644 --- a/archivers/libarchive/files/cpio/bsdcpio.1 +++ b/archivers/libarchive/files/cpio/bsdcpio.1 @@ -75,7 +75,6 @@ Pass-through. Read a list of filenames from standard input and copy the files to the specified directory. .El -.Pp .Sh OPTIONS Unless specifically stated otherwise, options are applicable in all operating modes. @@ -385,10 +384,10 @@ For best compatibility, scripts should limit themselves to the standard syntax. .Sh SEE ALSO .Xr bzip2 1 , -.Xr tar 1 , .Xr gzip 1 , .Xr mt 1 , .Xr pax 1 , +.Xr tar 1 , .Xr libarchive 3 , .Xr cpio 5 , .Xr libarchive-formats 5 , diff --git a/archivers/libarchive/files/cpio/cpio.c b/archivers/libarchive/files/cpio/cpio.c index 4fd394dea5f..c15ee525f06 100644 --- a/archivers/libarchive/files/cpio/cpio.c +++ b/archivers/libarchive/files/cpio/cpio.c @@ -737,7 +737,7 @@ file_to_archive(struct cpio *cpio, const char *srcpath) */ destpath = srcpath; if (cpio->destdir) { - len = strlen(cpio->destdir) + strlen(srcpath) + 8; + len = cpio->destdir_len + strlen(srcpath) + 8; if (len >= cpio->pass_destpath_alloc) { while (len >= cpio->pass_destpath_alloc) { cpio->pass_destpath_alloc += 512; @@ -1139,6 +1139,14 @@ list_item_verbose(struct cpio *cpio, struct archive_entry *entry) const char *fmt; time_t mtime; static time_t now; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (!now) time(&now); @@ -1186,7 +1194,19 @@ list_item_verbose(struct cpio *cpio, struct archive_entry *entry) else fmt = cpio->day_first ? "%e %b %H:%M" : "%b %e %H:%M"; #endif - strftime(date, sizeof(date), fmt, localtime(&mtime)); +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&mtime, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = mtime; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&mtime); +#endif + strftime(date, sizeof(date), fmt, ltime); fprintf(out, "%s%3d %-8s %-8s %8s %12s %s", archive_entry_strmode(entry), @@ -1208,15 +1228,14 @@ mode_pass(struct cpio *cpio, const char *destdir) struct lafe_line_reader *lr; const char *p; int r; - size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - destdir_len = strlen(destdir); - cpio->destdir = malloc(destdir_len + 8); - memcpy(cpio->destdir, destdir, destdir_len); - if (destdir_len == 0 || destdir[destdir_len - 1] != '/') - cpio->destdir[destdir_len++] = '/'; - cpio->destdir[destdir_len++] = '\0'; + cpio->destdir_len = strlen(destdir); + cpio->destdir = malloc(cpio->destdir_len + 8); + memcpy(cpio->destdir, destdir, cpio->destdir_len); + if (cpio->destdir_len == 0 || destdir[cpio->destdir_len - 1] != '/') + cpio->destdir[cpio->destdir_len++] = '/'; + cpio->destdir[cpio->destdir_len] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) diff --git a/archivers/libarchive/files/cpio/cpio.h b/archivers/libarchive/files/cpio/cpio.h index abf3628bfae..8e7cc5fdd20 100644 --- a/archivers/libarchive/files/cpio/cpio.h +++ b/archivers/libarchive/files/cpio/cpio.h @@ -64,6 +64,7 @@ struct cpio { int option_numeric_uid_gid; /* -n */ int option_rename; /* -r */ char *destdir; + size_t destdir_len; size_t pass_destpath_alloc; char *pass_destpath; int uid_override; diff --git a/archivers/libarchive/files/cpio/test/list.h b/archivers/libarchive/files/cpio/test/list.h index 92f9ec82ed1..9c170a04d57 100644 --- a/archivers/libarchive/files/cpio/test/list.h +++ b/archivers/libarchive/files/cpio/test/list.h @@ -1,34 +1,35 @@ DEFINE_TEST(test_0) DEFINE_TEST(test_basic) DEFINE_TEST(test_cmdline) +DEFINE_TEST(test_extract_cpio_Z) DEFINE_TEST(test_extract_cpio_bz2) DEFINE_TEST(test_extract_cpio_grz) DEFINE_TEST(test_extract_cpio_gz) DEFINE_TEST(test_extract_cpio_lrz) -DEFINE_TEST(test_extract_cpio_lz4) DEFINE_TEST(test_extract_cpio_lz) +DEFINE_TEST(test_extract_cpio_lz4) 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) DEFINE_TEST(test_option_0) +DEFINE_TEST(test_option_B_upper) +DEFINE_TEST(test_option_C_upper) +DEFINE_TEST(test_option_J_upper) +DEFINE_TEST(test_option_L_upper) +DEFINE_TEST(test_option_Z_upper) DEFINE_TEST(test_option_a) DEFINE_TEST(test_option_b64encode) -DEFINE_TEST(test_option_B_upper) DEFINE_TEST(test_option_c) -DEFINE_TEST(test_option_C_upper) DEFINE_TEST(test_option_d) DEFINE_TEST(test_option_f) DEFINE_TEST(test_option_grzip) DEFINE_TEST(test_option_help) -DEFINE_TEST(test_option_J_upper) DEFINE_TEST(test_option_l) DEFINE_TEST(test_option_lrzip) -DEFINE_TEST(test_option_L_upper) DEFINE_TEST(test_option_lz4) DEFINE_TEST(test_option_lzma) DEFINE_TEST(test_option_lzop) @@ -42,7 +43,6 @@ 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) DEFINE_TEST(test_passthrough_reverse) diff --git a/archivers/libarchive/files/cpio/test/test_basic.c b/archivers/libarchive/files/cpio/test/test_basic.c index a8fedf89e96..b716253408f 100644 --- a/archivers/libarchive/files/cpio/test/test_basic.c +++ b/archivers/libarchive/files/cpio/test/test_basic.c @@ -33,15 +33,15 @@ verify_files(const char *msg) */ /* Regular file with 2 links. */ - failure(msg); + failure("%s", msg); assertIsReg("file", 0644); - failure(msg); + failure("%s", msg); assertFileSize("file", 10); - failure(msg); + failure("%s", msg); assertFileNLinks("file", 2); /* Another name for the same file. */ - failure(msg); + failure("%s", msg); assertIsHardlink("linkfile", "file"); /* Symlink */ @@ -49,11 +49,11 @@ verify_files(const char *msg) assertIsSymlink("symlink", "file", 0); /* Another file with 1 link and different permissions. */ - failure(msg); + failure("%s", msg); assertIsReg("file2", 0777); - failure(msg); + failure("%s", msg); assertFileSize("file2", 10); - failure(msg); + failure("%s", msg); assertFileNLinks("file2", 1); /* dir */ diff --git a/archivers/libarchive/files/cpio/test/test_format_newc.c b/archivers/libarchive/files/cpio/test/test_format_newc.c index 6c981f6ac13..6e3b9e359bb 100644 --- a/archivers/libarchive/files/cpio/test/test_format_newc.c +++ b/archivers/libarchive/files/cpio/test/test_format_newc.c @@ -49,10 +49,11 @@ is_hex(const char *p, size_t l) return (1); } -static int +/* Convert up to 8 hex characters to unsigned 32-bit decimal integer */ +static uint32_t from_hex(const char *p, size_t l) { - int r = 0; + uint32_t r = 0; while (l > 0) { r *= 16; @@ -82,11 +83,11 @@ DEFINE_TEST(test_format_newc) { FILE *list; int r; - int devmajor, devminor, ino, gid; - int uid = -1; + uint32_t devmajor, devminor, ino, gid, uid; time_t t, t2, now; char *p, *e; - size_t s, fs, ns; + size_t s; + uint64_t fs, ns; char result[1024]; assertUmask(0); @@ -199,28 +200,32 @@ DEFINE_TEST(test_format_newc) #else assertEqualInt(0x81a4, from_hex(e + 14, 8)); /* Mode */ #endif - if (uid < 0) - uid = from_hex(e + 22, 8); +#if defined(_WIN32) + uid = from_hex(e + 22, 8); +#else assertEqualInt(from_hex(e + 22, 8), uid); /* uid */ +#endif gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ - failure("t=0x%08x now=0x%08x=%d", t, now, now); + failure("t=%#08jx now=%#08jx=%jd", (intmax_t)t, (intmax_t)now, + (intmax_t)now); assert(t <= now); /* File wasn't created in future. */ - failure("t=0x%08x now - 2=0x%08x = %d", t, now - 2, now - 2); + failure("t=%#08jx now - 2=%#08jx=%jd", (intmax_t)t, (intmax_t)now - 2, + (intmax_t)now - 2); assert(t >= now - 2); /* File was created w/in last 2 secs. */ failure("newc format stores body only with last appearance of a link\n" " first appearance should be empty, so this file size\n" " field should be zero"); assertEqualInt(0, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); devmajor = from_hex(e + 62, 8); /* devmajor */ devminor = from_hex(e + 70, 8); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000006", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "file1\0", 6); /* Name contents */ @@ -243,17 +248,18 @@ DEFINE_TEST(test_format_newc) assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000001", 8); /* nlink */ t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created" + " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000005", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000008", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "symlink\0\0\0", 10); /* Name contents */ @@ -278,17 +284,18 @@ DEFINE_TEST(test_format_newc) assertEqualInt(nlinks("dir"), from_hex(e + 38, 8)); /* nlinks */ #endif t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created at" + "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000000", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000004", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "dir\0\0\0", 6); /* Name contents */ @@ -311,17 +318,18 @@ DEFINE_TEST(test_format_newc) assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t2 = from_hex(e + 46, 8); /* mtime */ - failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2); + failure("First entry created at t=%#08jx this entry created at" + "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000009", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "hardlink\0\0", 10); /* Name contents */ diff --git a/archivers/libarchive/files/doc/html/Makefile b/archivers/libarchive/files/doc/html/Makefile index 5fdc652f049..d15a786c93a 100644 --- a/archivers/libarchive/files/doc/html/Makefile +++ b/archivers/libarchive/files/doc/html/Makefile @@ -107,15 +107,15 @@ archive_write_set_passphrase.3.html: ../../libarchive/archive_write_set_passphra cpio.5.html: ../../libarchive/cpio.5 groff -mdoc -T html ../../libarchive/cpio.5 > cpio.5.html +libarchive-formats.5.html: ../../libarchive/libarchive-formats.5 + groff -mdoc -T html ../../libarchive/libarchive-formats.5 > libarchive-formats.5.html + libarchive.3.html: ../../libarchive/libarchive.3 groff -mdoc -T html ../../libarchive/libarchive.3 > libarchive.3.html libarchive_changes.3.html: ../../libarchive/libarchive_changes.3 groff -mdoc -T html ../../libarchive/libarchive_changes.3 > libarchive_changes.3.html -libarchive-formats.5.html: ../../libarchive/libarchive-formats.5 - groff -mdoc -T html ../../libarchive/libarchive-formats.5 > libarchive-formats.5.html - libarchive_internals.3.html: ../../libarchive/libarchive_internals.3 groff -mdoc -T html ../../libarchive/libarchive_internals.3 > libarchive_internals.3.html @@ -130,4 +130,4 @@ bsdtar.1.html: ../../tar/bsdtar.1 bsdcpio.1.html: ../../cpio/bsdcpio.1 groff -mdoc -T html ../../cpio/bsdcpio.1 > bsdcpio.1.html -all: archive_entry.3.html archive_entry_acl.3.html archive_entry_linkify.3.html archive_entry_misc.3.html archive_entry_paths.3.html archive_entry_perms.3.html archive_entry_stat.3.html archive_entry_time.3.html archive_read.3.html archive_read_add_passphrase.3.html archive_read_data.3.html archive_read_disk.3.html archive_read_extract.3.html archive_read_filter.3.html archive_read_format.3.html archive_read_free.3.html archive_read_header.3.html archive_read_new.3.html archive_read_open.3.html archive_read_set_options.3.html archive_util.3.html archive_write.3.html archive_write_blocksize.3.html archive_write_data.3.html archive_write_disk.3.html archive_write_filter.3.html archive_write_finish_entry.3.html archive_write_format.3.html archive_write_free.3.html archive_write_header.3.html archive_write_new.3.html archive_write_open.3.html archive_write_set_options.3.html archive_write_set_passphrase.3.html cpio.5.html libarchive.3.html libarchive_changes.3.html libarchive-formats.5.html libarchive_internals.3.html mtree.5.html tar.5.html bsdtar.1.html bsdcpio.1.html +all: archive_entry.3.html archive_entry_acl.3.html archive_entry_linkify.3.html archive_entry_misc.3.html archive_entry_paths.3.html archive_entry_perms.3.html archive_entry_stat.3.html archive_entry_time.3.html archive_read.3.html archive_read_add_passphrase.3.html archive_read_data.3.html archive_read_disk.3.html archive_read_extract.3.html archive_read_filter.3.html archive_read_format.3.html archive_read_free.3.html archive_read_header.3.html archive_read_new.3.html archive_read_open.3.html archive_read_set_options.3.html archive_util.3.html archive_write.3.html archive_write_blocksize.3.html archive_write_data.3.html archive_write_disk.3.html archive_write_filter.3.html archive_write_finish_entry.3.html archive_write_format.3.html archive_write_free.3.html archive_write_header.3.html archive_write_new.3.html archive_write_open.3.html archive_write_set_options.3.html archive_write_set_passphrase.3.html cpio.5.html libarchive-formats.5.html libarchive.3.html libarchive_changes.3.html libarchive_internals.3.html mtree.5.html tar.5.html bsdtar.1.html bsdcpio.1.html diff --git a/archivers/libarchive/files/doc/html/archive_entry.3.html b/archivers/libarchive/files/doc/html/archive_entry.3.html index 19de7283adc..0d66088a0b4 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:14 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:05 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -27,7 +27,7 @@ ARCHIVE_ENTRY(3)</p> <p style="margin-left:6%;"><b>archive_entry_clear</b>, <b>archive_entry_clone</b>, <b>archive_entry_free</b>, -<b>archive_entry_new</b>, — functions for managing +<b>archive_entry_new</b> — functions for managing archive entry descriptions</p> <p style="margin-top: 1em"><b>LIBRARY</b></p> @@ -168,7 +168,7 @@ string will be discarded in favor of the new data.</p> <p style="margin-left:6%;">archive_entry_acl(3), archive_entry_paths(3), archive_entry_perms(3), -archive_entry_time(3) libarchive(3),</p> +archive_entry_time(3), libarchive(3)</p> <p style="margin-top: 1em"><b>HISTORY</b></p> 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 a4465f2bf94..4bdb0b37a6f 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:14 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:05 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -33,7 +33,6 @@ ARCHIVE_ENTRY_ACL(3)</p> <b>archive_entry_acl_from_text</b>, <b>archive_entry_acl_from_text_w</b>, <b>archive_entry_acl_next</b>, -<b>archive_entry_acl_next_w</b>, <b>archive_entry_acl_reset</b>, <b>archive_entry_acl_to_text</b>, <b>archive_entry_acl_to_text_w</b>, @@ -104,15 +103,6 @@ descriptions</p> <p style="margin-left:6%; margin-top: 1em"><i>int</i></p> -<p><b>archive_entry_acl_next_w</b>(<i>struct archive_entry *a</i>, -<i>int type</i>, <i>int *ret_type</i>, -<i>int *ret_permset</i>, <i>int *ret_tag</i>, -<i>int *ret_qual</i>, -<i>const wchar_t **ret_name</i>);</p> - -<p style="margin-left:6%; margin-top: 1em"><i>int</i></p> - - <p style="margin-left:12%;"><b>archive_entry_acl_reset</b>(<i>struct archive_entry *a</i>, <i>int type</i>);</p> @@ -137,18 +127,18 @@ descriptions</p> <p style="margin-top: 1em"><b>DESCRIPTION</b></p> -<p style="margin-left:6%;">The “Access Control Lists -(ACLs)” extend the standard Unix perssion model. The -ACL interface of <b>libarchive</b> supports both POSIX.1e -and NFSv4 style ACLs. Use of ACLs is restricted by various -levels of ACL support in operating systems, file systems and -archive formats.</p> +<p style="margin-left:6%;">The ’’Access Control +Lists (ACLs)’’ extend the standard Unix +permission model. The ACL interface of <b>libarchive</b> +supports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is +restricted by various levels of ACL support in operating +systems, file systems and archive formats.</p> <p style="margin-left:6%; margin-top: 1em"><b>POSIX.1e Access Control Lists</b> <br> A POSIX.1e ACL consists of a number of independent entries. -Each entry specifies the permission set as bitmask of basic -permissions. Valid permissions in the <i>permset</i> +Each entry specifies the permission set as a bitmask of +basic permissions. Valid permissions in the <i>permset</i> are:</p> <p>ARCHIVE_ENTRY_ACL_READ (<b>r</b>) <br> @@ -173,12 +163,12 @@ field.</p> <p>ARCHIVE_ENTRY_ACL_GROUP</p> -<p style="margin-left:51%;">The group specied by the name +<p style="margin-left:51%;">The group specified by the name field.</p> <p>ARCHIVE_ENTRY_ACL_GROUP_OBJ</p> -<p style="margin-left:51%;">The group who owns the +<p style="margin-left:51%;">The group which owns the file.</p> <p>ARCHIVE_ENTRY_ACL_MASK</p> @@ -188,8 +178,8 @@ obtained via group permissions.</p> <p>ARCHIVE_ENTRY_ACL_OTHER</p> -<p style="margin-left:51%;">Any principal who is not file -owner or a member of the owning group.</p> +<p style="margin-left:51%;">Any principal who is not the +file owner or a member of the owning group.</p> <p style="margin-left:6%; margin-top: 1em">The principals ARCHIVE_ENTRY_ACL_USER_OBJ, ARCHIVE_ENTRY_ACL_GROUP_OBJ and @@ -197,12 +187,12 @@ ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries.</p> -<p style="margin-left:6%; margin-top: 1em">All files with -have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This +<p style="margin-left:6%; margin-top: 1em">All files have +an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This specifies the permissions required for access to the file itself. Directories have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which controls the initial -access ACL for newly created directory entries.</p> +access ACL for newly-created directory entries.</p> <p style="margin-left:6%; margin-top: 1em"><b>NFSv4 Access Control Lists</b> <br> @@ -248,18 +238,18 @@ field.</p> <p>ARCHIVE_ENTRY_ACL_GROUP</p> -<p style="margin-left:51%;">The group specied by the name +<p style="margin-left:51%;">The group specified by the name field.</p> <p>ARCHIVE_ENTRY_ACL_GROUP_OBJ</p> -<p style="margin-left:51%;">The group who owns the +<p style="margin-left:51%;">The group which owns the file.</p> <p>ARCHIVE_ENTRY_ACL_EVERYONE</p> -<p style="margin-left:51%;">Any principal who is not file -owner or a member of the owning group.</p> +<p style="margin-left:51%;">Any principal who is not the +file owner or a member of the owning group.</p> <p style="margin-left:6%; margin-top: 1em">Entries with the ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag store @@ -436,33 +426,30 @@ ARCHIVE_ENTRY_ACL_TYPE_NFS4</p> <p style="margin-left:6%; margin-top: 1em">Supports all formats that can be created with -<b>archive_entry_acl_to_text</b>() or respective +<b>archive_entry_acl_to_text</b>() or respectively <b>archive_entry_acl_to_text_w</b>(). Existing ACL entries are preserved. To get a clean new ACL from text <b>archive_entry_acl_clear</b>() must be called first. -Entries prefixed with “default:” are treated as -ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless <i>type</i> is -ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable -ACL entries and entries beginning with the ’#’ -character (comments) are skipped.</p> +Entries prefixed with ’’default:’’ +are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless +<i>type</i> is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, +non-parseable ACL entries and entries beginning with the +’#’ character (comments) are skipped.</p> <p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_next</b>() -and <b>archive_entry_acl_next_w</b>() return the next entry -of the ACL list. This functions may only be called after -<b>archive_entry_acl_reset</b>() has indicated the presence -of extended ACL entries.</p> +return the next entry of the ACL list. This functions may +only be called after <b>archive_entry_acl_reset</b>() has +indicated the presence of extended ACL entries.</p> <p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_reset</b>() prepare reading the list of ACL entries with -<b>archive_entry_acl_next</b>() or -<b>archive_entry_acl_next_w</b>(). The function returns -either 0, if no non-extended ACLs are found. In this case, -the access permissions should be obtained by -archive_entry_mode(3) or set using chmod(2). Otherwise, the -function returns the same value as -<b>archive_entry_acl_count</b>().</p> +<b>archive_entry_acl_next</b>(). The function returns 0 if +no non-extended ACLs are found. In this case, the access +permissions should be obtained by archive_entry_mode(3) or +set using chmod(2). Otherwise, the function returns the same +value as <b>archive_entry_acl_count</b>().</p> <p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_to_text</b>() @@ -489,7 +476,7 @@ ACLs.</p> <p>ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT</p> <p style="margin-left:24%;">Prefix each default ACL entry -with the word “default:”.</p> +with the word ’’default:’’.</p> <p>ARCHIVE_ENTRY_ACL_STYLE_SOLARIS</p> @@ -524,7 +511,7 @@ returned. It the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are specified, both access and default entries are returned and default entries are -prefixed with “default:”.</p> +prefixed with ’’default:’’.</p> <p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_types</b>() @@ -551,10 +538,10 @@ one or more entries were invalid or non-parseable.</p> <p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_next</b>() -and <b>archive_entry_acl_next_w</b>() return ARCHIVE_OK on -success, ARCHIVE_EOF if no more ACL entries exist and -ARCHIVE_WARN if <b>archive_entry_acl_reset</b>() has not -been called first.</p> +returns ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL +entries exist and ARCHIVE_WARN if +<b>archive_entry_acl_reset</b>() has not been called +first.</p> <p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_to_text</b>() 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 4ee95ca5a0b..c1722ff7b96 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:15 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:05 2020 --> <!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_misc.3.html b/archivers/libarchive/files/doc/html/archive_entry_misc.3.html index c41b3339957..905ee1dab9c 100644 --- a/archivers/libarchive/files/doc/html/archive_entry_misc.3.html +++ b/archivers/libarchive/files/doc/html/archive_entry_misc.3.html @@ -1,5 +1,5 @@ -<!-- Creator : groff version 1.22.4 --> -<!-- CreationDate: Wed Jun 12 21:10:15 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:05 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -28,7 +28,7 @@ ARCHIVE_ENTRY_MISC(3)</p> <p style="margin-left:6%;"><b>archive_entry_symlink_type</b>, <b>archive_entry_set_symlink_type</b> — miscellaneous -functions for manipulating properties of archive_entry.</p> +functions for manipulating properties of archive_entry</p> <p style="margin-top: 1em"><b>LIBRARY</b></p> 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 0e1c23598e3..a194c9e3058 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:15 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:05 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -254,7 +254,7 @@ named <b>XXX_w</b>().</p> <p style="margin-top: 1em">UTF-8</p> <p style="margin-left:21%; margin-top: 1em">Unicode strings -encoded as UTF-8. This are convience functions to update +encoded as UTF-8. These are convenience functions to update both the multibyte and wide character strings at the same time.</p> @@ -264,7 +264,7 @@ directly.</p> <p style="margin-left:6%; margin-top: 1em">For that reason, it is only available as multibyte string. The link path is a -convience function for conditionally setting hardlink or +convenience function for conditionally setting hardlink or symlink destination. It doesn’t have a corresponding get accessor function.</p> @@ -274,8 +274,8 @@ is an alias for <b>archive_entry_copy_XXX</b>().</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">archive_entry(3) -libarchive(3),</p> +<p style="margin-left:6%;">archive_entry(3), +libarchive(3)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 ebb537c1e3a..412f1869243 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:15 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:05 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -217,7 +217,7 @@ from the given entry. The corresponding functions <b>archive_entry_set_gid</b>(), and <b>archive_entry_set_perm</b>() store the given user id, group id and permission in the entry. The permission is also -set as side effect of calling +set as a side effect of calling <b>archive_entry_set_mode</b>().</p> @@ -244,7 +244,7 @@ named <b>XXX_w</b>().</p> <p style="margin-top: 1em">UTF-8</p> <p style="margin-left:21%; margin-top: 1em">Unicode strings -encoded as UTF-8. This are convience functions to update +encoded as UTF-8. These are convenience functions to update both the multibyte and wide character strings at the same time.</p> @@ -283,7 +283,7 @@ meaningful on the current platform will be ignored.</p> text format is a comma-separated list of flag names. The <b>archive_entry_copy_fflags_text</b>() and <b>archive_entry_copy_fflags_text_w</b>() functions parse -the provided text and sets the internal bitmap values. This +the provided text and set the internal bitmap values. This is a platform-specific operation; names that are not meaningful on the current platform will be ignored. The function returns a pointer to the start of the first name @@ -299,7 +299,7 @@ unrecognized name.)</p> <p style="margin-left:6%;">archive_entry(3), archive_entry_acl(3), archive_read_disk(3), -archive_write_disk(3) libarchive(3),</p> +archive_write_disk(3), libarchive(3)</p> <p style="margin-top: 1em"><b>BUGS</b></p> 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 3a5d88ecade..597058dd545 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:15 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:05 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -46,7 +46,7 @@ ARCHIVE_ENTRY_STAT(3)</p> <b>archive_entry_rdevmajor</b>, <b>archive_entry_set_rdevmajor</b>, <b>archive_entry_rdevminor</b>, -<b>archive_entry_set_rdevminor</b>, — accessor +<b>archive_entry_set_rdevminor</b> — accessor functions for manipulating archive entry descriptions</p> <p style="margin-top: 1em"><b>LIBRARY</b></p> @@ -323,8 +323,8 @@ respectively.</p> <p style="margin-left:6%; margin-top: 1em">The number of references (hardlinks) can be obtained by calling -<b>archive_entry_nlinks</b>() and set with -<b>archive_entry_set_nlinks</b>().</p> +<b>archive_entry_nlink</b>() and set with +<b>archive_entry_set_nlink</b>().</p> <p style="margin-left:6%; margin-top: 1em"><b>Identifying unique files</b> <br> @@ -370,9 +370,9 @@ form, while other formats use the split form.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">archive_entry_acl(3), +<p style="margin-left:6%;">stat(2), archive_entry_acl(3), archive_entry_perms(3), archive_entry_time(3), -libarchive(3), stat(2)</p> +libarchive(3)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 0087fd320f2..cb48371db4d 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:15 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -42,7 +42,7 @@ ARCHIVE_ENTRY_TIME(3)</p> <b>archive_entry_mtime</b>, <b>archive_entry_mtime_nsec</b>, <b>archive_entry_mtime_is_set</b>, <b>archive_entry_set_mtime</b>, -<b>archive_entry_unset_mtime</b>, — functions for +<b>archive_entry_unset_mtime</b> — functions for manipulating times in archive entry descriptions</p> <p style="margin-top: 1em"><b>LIBRARY</b></p> @@ -185,8 +185,8 @@ fields have a second and nanosecond field of 0.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">archive_entry(3) -libarchive(3),</p> +<p style="margin-left:6%;">archive_entry(3), +libarchive(3)</p> <p style="margin-top: 1em"><b>HISTORY</b></p> diff --git a/archivers/libarchive/files/doc/html/archive_read.3.html b/archivers/libarchive/files/doc/html/archive_read.3.html index 3a9cb6abedc..1cf833ab3ed 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:15 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -134,7 +134,7 @@ finished reading data from the archive, you should call <b>archive_read_free</b>() to release all resources, including all memory allocated by the library.</p> -<p style="margin-top: 1em"><b>EXAMPLE</b></p> +<p style="margin-top: 1em"><b>EXAMPLES</b></p> <p style="margin-left:6%;">The following illustrates basic usage of the library. In this example, the callback @@ -199,12 +199,12 @@ return (ARCHIVE_OK); <br> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_read_new(3), archive_read_data(3), +<p style="margin-left:6%;">tar(1), archive_read_data(3), archive_read_extract(3), archive_read_filter(3), archive_read_format(3), archive_read_header(3), -archive_read_open(3), archive_read_set_options(3), -archive_util(3), tar(5)</p> +archive_read_new(3), archive_read_open(3), +archive_read_set_options(3), archive_util(3), libarchive(3), +tar(5)</p> <p style="margin-top: 1em"><b>HISTORY</b></p> @@ -224,7 +224,7 @@ example, many implementations of tar(1) allow you to append entries to an empty file. Of course, it is impossible to determine the format of an empty file by inspecting the contents, so this library treats empty files as having a -special “empty” format.</p> +special ’’empty’’ format.</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 135b89058a2..724c9ec98dc 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:15 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -65,15 +65,15 @@ or empty, this function will do nothing and <p style="margin-top: 1em"><b>archive_read_set_passphrase_callback</b>()</p> -<p style="margin-left:17%;">Register callback function that -will be invoked to get a passphrase for decrption after -trying all passphrases registered by the +<p style="margin-left:17%;">Register a callback function +that will be invoked to get a passphrase for decryption +after trying all the passphrases registered by the <b>archive_read_add_passphrase</b>() function failed.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_read(3), archive_read_set_options(3)</p> +<p style="margin-left:6%;">tar(1), archive_read(3), +archive_read_set_options(3), libarchive(3)</p> <p style="margin-left:6%; margin-top: 1em">BSD September 14, 2014 BSD</p> 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 81e2603531a..faa7d4a3683 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:15 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -25,8 +25,9 @@ ARCHIVE_READ_DATA(3)</p> <p style="margin-top: 1em"><b>NAME</b></p> -<p style="margin-left:6%;"><b>archive_read_data -archive_read_data_block</b>, <b>archive_read_data_skip</b>, +<p style="margin-left:6%;"><b>archive_read_data</b>, +<b>archive_read_data_block</b>, +<b>archive_read_data_skip</b>, <b>archive_read_data_into_fd</b> — functions for reading streaming archives</p> @@ -128,11 +129,11 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_read(3), archive_read_extract(3), -archive_read_filter(3), archive_read_format(3), -archive_read_header(3), archive_read_open(3), -archive_read_set_options(3), archive_util(3), tar(5)</p> +<p style="margin-left:6%;">tar(1), archive_read(3), +archive_read_extract(3), archive_read_filter(3), +archive_read_format(3), archive_read_header(3), +archive_read_open(3), archive_read_set_options(3), +archive_util(3), libarchive(3), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 aec5789a561..816d6300f18 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -143,7 +143,7 @@ values:</p> <p style="margin-left:27%;">Skip files and directories with the nodump file attribute (file flag) set. By default, the -nodump file atrribute is ignored.</p> +nodump file attribute is ignored.</p> <p><b>ARCHIVE_READDISK_MAC_COPYFILE</b></p> @@ -166,7 +166,7 @@ X) for more information on file attributes.</p> <p><b>ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS</b></p> <p style="margin-left:27%;">Do not traverse mount points. -By defaut, moint points are traversed.</p> +By default, mount points are traversed.</p> <p><b>ARCHIVE_READDISK_NO_XATTR</b></p> @@ -188,11 +188,13 @@ is not restored.</p> <b>archive_read_disk_set_symlink_hybrid</b>()</p> <p style="margin-left:17%;">This sets the mode used for -handling symbolic links. The “logical” mode -follows all symbolic links. The “physical” mode -does not follow any symbolic links. The “hybrid” -mode currently behaves identically to the -“logical” mode.</p> +handling symbolic links. The +’’logical’’ mode follows all +symbolic links. The ’’physical’’ +mode does not follow any symbolic links. The +’’hybrid’’ mode currently behaves +identically to the ’’logical’’ +mode.</p> <p style="margin-top: 1em"><b>archive_read_disk_gname</b>(), @@ -251,7 +253,7 @@ this information.)</p> <p style="margin-left:17%; margin-top: 1em">Where necessary, user and group ids are converted to user and -group names using the currently registered lookup functions +group names using the currently-registered lookup functions above. This affects the file ownership fields and ACL values in the struct archive_entry object.</p> @@ -259,7 +261,7 @@ in the struct archive_entry object.</p> <i>struct archive</i> object and the overall design of the library can be found in the libarchive(3) overview.</p> -<p style="margin-top: 1em"><b>EXAMPLE</b></p> +<p style="margin-top: 1em"><b>EXAMPLES</b></p> <p style="margin-left:6%;">The following illustrates basic usage of the library by showing how to use it to copy an @@ -326,9 +328,9 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">archive_read(3), +<p style="margin-left:6%;">tar(1), archive_read(3), archive_util(3), archive_write(3), archive_write_disk(3), -tar(1), libarchive(3)</p> +libarchive(3)</p> <p style="margin-top: 1em"><b>HISTORY</b></p> @@ -346,10 +348,11 @@ was written by Tim Kientzle <p style="margin-top: 1em"><b>BUGS</b></p> -<p style="margin-left:6%;">The “standard” user -name and group name lookup functions are not the defaults -because getgrgid(3) and getpwuid(3) are sometimes too large -for particular applications. The current design allows the +<p style="margin-left:6%;">The +’’standard’’ user name and group +name lookup functions are not the defaults because +getgrgid(3) and getpwuid(3) are sometimes too large for +particular applications. The current design allows the application author to use a more compact implementation when appropriate.</p> @@ -368,8 +371,9 @@ such information.</p> <p style="margin-left:6%; margin-top: 1em">This API should provide a set of methods for walking a directory tree. That would make it a direct parallel of the archive_read(3) API. -When such methods are implemented, the “hybrid” -symbolic link mode will make sense.</p> +When such methods are implemented, the +’’hybrid’’ symbolic link mode will +make sense.</p> <p style="margin-left:6%; margin-top: 1em">BSD April 3, 2017 BSD</p> 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 f9ce3d1bbc7..b331a7e6c3b 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -121,11 +121,11 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_read(3), archive_read_data(3), -archive_read_filter(3), archive_read_format(3), -archive_read_open(3), archive_read_set_options(3), -archive_util(3), tar(5)</p> +<p style="margin-left:6%;">tar(1), archive_read(3), +archive_read_data(3), archive_read_filter(3), +archive_read_format(3), archive_read_open(3), +archive_read_set_options(3), archive_util(3), libarchive(3), +tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 483d366f071..2915e28d548 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -156,7 +156,8 @@ functions may fall back on external programs if an appropriate library was not available at build time. Decompression using an external program is usually slower than decompression through built-in libraries. Note that -“none” is always enabled by default.</p> +’’none’’ is always enabled by +default.</p> <p><b>archive_read_support_filter_all</b>()</p> @@ -197,9 +198,9 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">libarchive(3), archive_read(3), +<p style="margin-left:6%;">archive_read(3), archive_read_data(3), archive_read_format(3), -archive_read_format(3)</p> +archive_read_format(3), libarchive(3)</p> <p style="margin-left:6%; margin-top: 1em">BSD August 14, 2014 BSD</p> 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 e3dd4c5ba0e..a397bc2bb1e 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -153,8 +153,8 @@ variants.</p> <p><b>archive_read_support_format_all</b>()</p> <p style="margin-left:17%;">Enables support for all -available formats except the “raw” format (see -below).</p> +available formats except the ’’raw’’ +format (see below).</p> <p><b>archive_read_support_format_by_code</b>()</p> @@ -179,10 +179,11 @@ distinct format.</p> <p><b>archive_read_support_format_raw</b>()</p> -<p style="margin-left:17%;">The “raw” format -handler allows libarchive to be used to read arbitrary data. -It treats any data stream as an archive with a single entry. -The pathname of this entry is “data”; all other +<p style="margin-left:17%;">The +’’raw’’ format handler allows +libarchive to be used to read arbitrary data. It treats any +data stream as an archive with a single entry. The pathname +of this entry is ’’data’’; all other entry fields are unset. This is not enabled by <b>archive_read_support_format_all</b>() in order to avoid erroneous handling of damaged archives.</p> @@ -200,9 +201,9 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_read_data(3), archive_read_filter(3), -archive_read_set_options(3), archive_util(3), tar(5)</p> +<p style="margin-left:6%;">tar(1), archive_read_data(3), +archive_read_filter(3), archive_read_set_options(3), +archive_util(3), libarchive(3), tar(5)</p> <p style="margin-top: 1em"><b>BUGS</b></p> @@ -212,11 +213,12 @@ example, many implementations of tar(1) allow you to append entries to an empty file. Of course, it is impossible to determine the format of an empty file by inspecting the contents, so this library treats empty files as having a -special “empty” format.</p> +special ’’empty’’ format.</p> <p style="margin-left:6%; margin-top: 1em">Using the -“raw” handler together with any other handler -will often work but can produce surprising results.</p> +’’raw’’ handler together with any +other handler will often work but can produce surprising +results.</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 3005db7bd43..0ea19ec60b0 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -94,11 +94,11 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">libarchive(3), -archive_read_new(3), archive_read_data(3), +<p style="margin-left:6%;">archive_read_data(3), archive_read_filter(3), archive_read_format(3), -archive_read_open(3), archive_read_set_options(3), -archive_util(3)</p> +archive_read_new(3), archive_read_open(3), +archive_read_set_options(3), archive_util(3), +libarchive(3)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 a15d4e49b82..6c6ce89486e 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -85,11 +85,11 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_read(3), archive_read_data(3), -archive_read_extract(3), archive_read_filter(3), -archive_read_format(3), archive_read_open(3), -archive_read_set_options(3), archive_util(3), tar(5)</p> +<p style="margin-left:6%;">tar(1), archive_read(3), +archive_read_data(3), archive_read_extract(3), +archive_read_filter(3), archive_read_format(3), +archive_read_open(3), archive_read_set_options(3), +archive_util(3), libarchive(3), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 a44a4c053b6..0ecd0a9be4f 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -56,10 +56,10 @@ overview manual page for libarchive(3).</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_read_data(3), archive_read_filter(3), -archive_read_format(3), archive_read_set_options(3), -archive_util(3), tar(5)</p> +<p style="margin-left:6%;">tar(1), archive_read_data(3), +archive_read_filter(3), archive_read_format(3), +archive_read_set_options(3), archive_util(3), libarchive(3), +tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 200321bc5b7..d7ab760717e 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -213,7 +213,7 @@ callback is invoked by archive_close when the archive processing is complete. The callback should return <b>ARCHIVE_OK</b> on success. On failure, the callback should invoke <b>archive_set_error</b>() to register an -error code and message and return <b>ARCHIVE_FATAL.</b></p> +error code and message and return <b>ARCHIVE_FATAL</b>.</p> <p style="margin-top: 1em"><b>RETURN VALUES</b></p> @@ -228,10 +228,10 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_read(3), archive_read_data(3), -archive_read_filter(3), archive_read_format(3), -archive_read_set_options(3), archive_util(3), tar(5)</p> +<p style="margin-left:6%;">tar(1), archive_read(3), +archive_read_data(3), archive_read_filter(3), +archive_read_format(3), archive_read_set_options(3), +archive_util(3), libarchive(3), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 32632e4f6c3..fefdba16f99 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:06 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -142,7 +142,7 @@ option with this name will ignore it.</p> <p style="margin-left:27%; margin-top: 1em">The option will be provided to every module with a value of -“1”.</p> +’’1’’.</p> <p><i>!option</i></p> @@ -157,7 +157,21 @@ option and value will be provided only to modules whose name matches <i>module</i>.</p> <p style="margin-top: 1em"><b>OPTIONS</b> <br> -Format iso9660 <b><br> +Format cab <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file +names.</p> + +<p>Format cpio <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file +names.</p> + +<p>Format iso9660 <b><br> joliet</b></p> <p style="margin-left:27%; margin-top: 1em">Support Joliet @@ -169,6 +183,27 @@ disable.</p> <p style="margin-left:27%;">Support RockRidge extensions. Defaults to enabled, use <b>!rockridge</b> to disable.</p> +<p>Format lha <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file +names.</p> + +<p>Format mtree <b><br> +checkfs</b></p> + +<p style="margin-left:27%;">Allow reading information +missing from the mtree from the file system. Disabled by +default.</p> + +<p>Format rar <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file +names.</p> + <p>Format tar <b><br> compat-2x</b></p> @@ -180,8 +215,8 @@ archives can be read correctly.</p> <p><b>hdrcharset</b></p> <p style="margin-left:27%;">The value is used as a -character set name that will be used when translating -filenames.</p> +character set name that will be used when translating file +names.</p> <p><b>mac-ext</b></p> @@ -207,11 +242,11 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write_set_options(3), archive_read(3)</p> +<p style="margin-left:6%;">tar(1), archive_read(3), +archive_write_set_options(3), libarchive(3)</p> <p style="margin-left:6%; margin-top: 1em">BSD -February 2, 2012 BSD</p> +January 31, 2020 BSD</p> <hr> </body> </html> diff --git a/archivers/libarchive/files/doc/html/archive_util.3.html b/archivers/libarchive/files/doc/html/archive_util.3.html index 6aa59b612b6..6daa413e8e1 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:16 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -142,12 +142,12 @@ code.</p> <p><b>archive_compression</b>()</p> <p style="margin-left:17%;">Synonym for -<b>archive_filter_code(a,</b>(<i>0)</i>).</p> +<b>archive_filter_code</b>(<i>a</i>, <i>0</i>).</p> <p><b>archive_compression_name</b>()</p> <p style="margin-left:17%;">Synonym for -<b>archive_filter_name(a,</b>(<i>0)</i>).</p> +<b>archive_filter_name</b>(<i>a</i>, <i>0</i>).</p> <p><b>archive_copy_error</b>()</p> @@ -202,13 +202,13 @@ when reading a uuencoded gzipped tar archive, there are three filters: filter 0 is the gunzip filter, filter 1 is the uudecode filter, and filter 2 is the pseudo-filter that wraps the archive read functions. In this case, requesting -<b>archive_position(a,</b>(<i>-1)</i>) would be a synonym -for <b>archive_position(a,</b>(<i>2)</i>) which would return -the number of bytes currently read from the archive, while -<b>archive_position(a,</b>(<i>1)</i>) would return the -number of bytes after uudecoding, and -<b>archive_position(a,</b>(<i>0)</i>) would return the -number of bytes after decompression.</p> +<b>archive_position</b>(<i>a</i>, <i>-1</i>) would be a +synonym for <b>archive_position</b>(<i>a</i>, <i>2</i>) +which would return the number of bytes currently read from +the archive, while <b>archive_position</b>(<i>a</i>, +<i>1</i>) would return the number of bytes after uudecoding, +and <b>archive_position</b>(<i>a</i>, <i>0</i>) would return +the number of bytes after decompression.</p> <p><b>archive_filter_name</b>()</p> @@ -237,10 +237,10 @@ format of the current entry.</p> <p style="margin-left:17%;">Returns the number of bytes read from or written to the indicated filter. In particular, -<b>archive_position(a,</b>(<i>0)</i>) returns the number of -bytes read or written by the format handler, while -<b>archive_position(a,</b>(<i>-1)</i>) returns the number of -bytes read or written to the archive. See +<b>archive_position</b>(<i>a</i>, <i>0</i>) returns the +number of bytes read or written by the format handler, while +<b>archive_position</b>(<i>a</i>, <i>-1</i>) returns the +number of bytes read or written to the archive. See <b>archive_filter_count</b>() for details of the numbering here.</p> @@ -253,14 +253,23 @@ This function should be used within I/O callbacks to set system-specific error codes and error descriptions. This function accepts a printf-like format string and arguments. However, you should be careful to use only the following -printf format specifiers: “%c”, -“%d”, “%jd”, “%jo”, -“%ju”, “%jx”, “%ld”, -“%lo”, “%lu”, “%lx”, -“%o”, “%u”, “%s”, -“%x”, “%%”. Field-width specifiers -and other printf features are not uniformly supported and -should not be used.</p> +printf format specifiers: ’’%c’’, +’’%d’’, +’’%jd’’, +’’%jo’’, +’’%ju’’, +’’%jx’’, +’’%ld’’, +’’%lo’’, +’’%lu’’, +’’%lx’’, +’’%o’’, +’’%u’’, +’’%s’’, +’’%x’’, +’’%%’’. Field-width specifiers and +other printf features are not uniformly supported and should +not be used.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> diff --git a/archivers/libarchive/files/doc/html/archive_write.3.html b/archivers/libarchive/files/doc/html/archive_write.3.html index f3c40a16770..55b31191744 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -110,7 +110,7 @@ entries have been written, use the <b>archive_write_free</b>() function to release all resources.</p> -<p style="margin-top: 1em"><b>EXAMPLE</b></p> +<p style="margin-top: 1em"><b>EXAMPLES</b></p> <p style="margin-left:6%;">The following sketch illustrates basic usage of the library. In this example, the callback @@ -244,8 +244,9 @@ return 0; <br> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write_set_options(3), cpio(5), mtree(5), tar(5)</p> +<p style="margin-left:6%;">tar(1), +archive_write_set_options(3), libarchive(3), cpio(5), +mtree(5), tar(5)</p> <p style="margin-top: 1em"><b>HISTORY</b></p> @@ -273,11 +274,11 @@ limitations and provides a generic key/value attribute facility for vendor-defined extensions. One oversight in POSIX is the failure to provide a standard attribute for large device numbers. This library uses -“SCHILY.devminor” and -“SCHILY.devmajor” for device numbers that exceed -the range supported by the backwards-compatible ustar -header. These keys are compatible with Joerg -Schilling’s <b>star</b> archiver. Other +’’SCHILY.devminor’’ and +’’SCHILY.devmajor’’ for device +numbers that exceed the range supported by the +backwards-compatible ustar header. These keys are compatible +with Joerg Schilling’s <b>star</b> archiver. Other implementations may not recognize these keys and will thus be unable to correctly restore device nodes with large device numbers from archives created by this library.</p> 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 c0bff216878..6ad88f7c462 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -97,8 +97,8 @@ compression. The uncompressed data is always unpadded. The default is to pad the last block to the full block size (note that <b>archive_write_open_filename</b>() will set this based on the file type). Unlike the other -“set” functions, this function can be called -after the archive is opened.</p> +’’set’’ functions, this function can +be called after the archive is opened.</p> <p style="margin-top: 1em"><b>archive_write_get_bytes_in_last_block</b>()</p> @@ -130,8 +130,9 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write_set_options(3), cpio(5), mtree(5), tar(5)</p> +<p style="margin-left:6%;">tar(1), +archive_write_set_options(3), libarchive(3), cpio(5), +mtree(5), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 93c5716dee6..b799801cb2f 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -96,9 +96,9 @@ consider any non-negative value as success.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), +<p style="margin-left:6%;">tar(1), archive_write_finish_entry(3), archive_write_set_options(3), -cpio(5), mtree(5), tar(5)</p> +libarchive(3), cpio(5), mtree(5), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 28, 2017 BSD</p> 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 de65dc4fab8..02dbd4360c6 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -170,6 +170,14 @@ group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed.</p> +<p><b>ARCHIVE_EXTRACT_SAFE_WRITES</b></p> + +<p style="margin-left:27%;">Extract files atomically, by +first creating a unique temporary file and then renaming it +to its required destination name. This avoids a race where +an application might see a partial file (or no file) during +extraction.</p> + <p><b>ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS</b></p> <p style="margin-left:27%;">Refuse to extract an absolute @@ -287,8 +295,8 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">archive_read(3), -archive_write(3), tar(1), libarchive(3)</p> +<p style="margin-left:6%;">tar(1), archive_read(3), +archive_write(3), libarchive(3)</p> <p style="margin-top: 1em"><b>HISTORY</b></p> @@ -350,11 +358,12 @@ of the final object happen to match those specified in the entry.</p> <p style="margin-left:6%; margin-top: 1em">The -“standard” user-id and group-id lookup functions -are not the defaults because getgrnam(3) and getpwnam(3) are -sometimes too large for particular applications. The current -design allows the application author to use a more compact -implementation when appropriate.</p> +’’standard’’ user-id and group-id +lookup functions are not the defaults because getgrnam(3) +and getpwnam(3) are sometimes too large for particular +applications. The current design allows the application +author to use a more compact implementation when +appropriate.</p> <p style="margin-left:6%; margin-top: 1em">There should be a corresponding <b>archive_read_disk</b> interface that @@ -362,7 +371,7 @@ walks a directory hierarchy and returns archive entry objects.</p> <p style="margin-left:6%; margin-top: 1em">BSD -April 3, 2017 BSD</p> +January 19, 2020 BSD</p> <hr> </body> </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 be89c6c7e65..2da8caa5078 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -41,7 +41,7 @@ ARCHIVE_WRITE_FILTER(3)</p> <b>archive_write_add_filter_program</b>, <b>archive_write_add_filter_uuencode</b>, <b>archive_write_add_filter_xz</b>, -<b>archive_write_add_filter_zstd</b>, — functions +<b>archive_write_add_filter_zstd</b> — functions enabling output filters</p> <p style="margin-top: 1em"><b>LIBRARY</b></p> @@ -182,9 +182,9 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write(3), archive_write_format(3), -archive_write_set_options(3), cpio(5), mtree(5), tar(5)</p> +<p style="margin-left:6%;">tar(1), archive_write(3), +archive_write_format(3), archive_write_set_options(3), +libarchive(3), cpio(5), mtree(5), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD August 14, 2014 BSD</p> 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 91fabf50754..f82cfedd4c0 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -74,9 +74,9 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write_data(3), archive_write_set_options(3), -cpio(5), mtree(5), tar(5)</p> +<p style="margin-left:6%;">tar(1), archive_write_data(3), +archive_write_set_options(3), libarchive(3), cpio(5), +mtree(5), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 28, 2017 BSD</p> 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 dad31d1a413..efb6a29b893 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -50,7 +50,7 @@ ARCHIVE_WRITE_FORMAT(3)</p> <b>archive_write_set_format_v7tar</b>, <b>archive_write_set_format_warc</b>, <b>archive_write_set_format_xar</b>, -<b>archive_write_set_format_zip</b>, — functions for +<b>archive_write_set_format_zip</b> — functions for creating archives</p> <p style="margin-top: 1em"><b>LIBRARY</b></p> @@ -253,8 +253,8 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write(3), archive_write_set_options(3), cpio(5), +<p style="margin-left:6%;">tar(1), archive_write(3), +archive_write_set_options(3), libarchive(3), cpio(5), libarchive-formats(5), mtree(5), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD 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 ff7bdebac63..b9ca8bc3429 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -105,8 +105,9 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write_set_options(3), cpio(5), mtree(5), tar(5)</p> +<p style="margin-left:6%;">tar(1), +archive_write_set_options(3), libarchive(3), cpio(5), +mtree(5), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 760bc6d5352..576f01a99a1 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -69,8 +69,9 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write_set_options(3), cpio(5), mtree(5), tar(5)</p> +<p style="margin-left:6%;">tar(1), +archive_write_set_options(3), libarchive(3), cpio(5), +mtree(5), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD February 2, 2012 BSD</p> 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 2f8436b9831..9c54e491fa3 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -56,8 +56,8 @@ overview manual page for libarchive(3).</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write(3), archive_write_set_options(3), cpio(5), +<p style="margin-left:6%;">tar(1), archive_write(3), +archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD 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 61d787ff372..45891565c71 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:17 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:07 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -115,8 +115,9 @@ require correct blocking.</p> <p style="margin-left:17%;">A convenience form of <b>archive_write_open</b>() that accepts a filename. A NULL argument indicates that the output should be written to -standard output; an argument of “-” will open a -file with that name. If you have not invoked +standard output; an argument of +’’-’’ will open a file with that +name. If you have not invoked <b>archive_write_set_bytes_in_last_block</b>(), then <b>archive_write_open_filename</b>() will adjust the last-block padding depending on the file: it will enable @@ -199,7 +200,7 @@ callback is invoked by archive_close when the archive processing is complete. The callback should return <b>ARCHIVE_OK</b> on success. On failure, the callback should invoke <b>archive_set_error</b>() to register an -error code and message and return <b>ARCHIVE_FATAL.</b></p> +error code and message and return <b>ARCHIVE_FATAL</b>.</p> <p style="margin-left:6%; margin-top: 1em">Note that if the client-provided write callback function returns a non-zero @@ -226,10 +227,10 @@ and <b>archive_error_string</b>() functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write(3), archive_write_blocksize(3), -archive_write_filter(3), archive_write_format(3), -archive_write_new(3), archive_write_set_options(3), cpio(5), +<p style="margin-left:6%;">tar(1), archive_write(3), +archive_write_blocksize(3), archive_write_filter(3), +archive_write_format(3), archive_write_new(3), +archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5)</p> <p style="margin-left:6%; margin-top: 1em">BSD 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 1a9bf8ff3ae..f11bdb539b8 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:18 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:08 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -80,7 +80,7 @@ modules.</p> <b>archive_write_set_format_option</b>()</p> <p style="margin-left:17%;">Specifies an option that will -be passed to currently-registered filters (including +be passed to the currently-registered filters (including decompression filters) or format readers.</p> <p style="margin-left:17%; margin-top: 1em">If @@ -114,8 +114,8 @@ in all other cases.</p> <b>archive_write_set_format_option</b>(), then <b>archive_write_set_filter_option</b>(). If either function returns <b>ARCHIVE_FATAL</b>, <b>ARCHIVE_FATAL</b> will be -returned immediately. Otherwise, greater of the two values -will be returned.</p> +returned immediately. Otherwise, the greater of the two +values will be returned.</p> <p style="margin-top: 1em"><b>archive_write_set_options</b>()</p> @@ -138,7 +138,7 @@ option with this name will ignore it.</p> <p style="margin-left:27%; margin-top: 1em">The option will be provided to every module with a value of -“1”.</p> +’’1’’.</p> <p><i>!option</i></p> @@ -153,46 +153,156 @@ option and value will be provided only to modules whose name matches <i>module</i>.</p> <p style="margin-top: 1em"><b>OPTIONS</b> <br> -Filter gzip <b><br> +Filter b64encode <b><br> +mode</b></p> + +<p style="margin-left:27%; margin-top: 1em">The value is +interpreted as octal digits specifying the file mode.</p> + +<p><b>name</b></p> + +<p style="margin-left:27%; margin-top: 1em">The value +specifies the file name.</p> + +<p>Filter bzip2 <b><br> +compression-level</b></p> + +<p style="margin-left:27%;">The value is interpreted as a +decimal integer specifying the bzip2 compression level. +Supported values are from 1 to 9.</p> + +<p>Filter gzip <b><br> compression-level</b></p> <p style="margin-left:27%;">The value is interpreted as a -decimal integer specifying the gzip compression level.</p> +decimal integer specifying the gzip compression level. +Supported values are from 0 to 9.</p> + +<p><b>timestamp</b></p> + +<p style="margin-left:27%;">Store timestamp. This is +enabled by default.</p> + +<p>Filter lrzip <b><br> +compression</b>=<i>type</i></p> + +<p style="margin-left:27%;">Use <i>type</i> as compression +method. Supported values are +’’bzip2’’, +’’gzipi’’, +’’lzo’’ (ultra fast), and +’’zpaq’’ (best, extremely slow).</p> + +<p><b>compression-level</b></p> + +<p style="margin-left:27%;">The value is interpreted as a +decimal integer specifying the lrzip compression level. +Supported values are from 1 to 9.</p> + +<p>Filter lz4 <b><br> +compression-level</b></p> + +<p style="margin-left:27%;">The value is interpreted as a +decimal integer specifying the lz4 compression level. +Supported values are from 0 to 9.</p> + +<p><b>stream-checksum</b></p> + +<p style="margin-left:27%;">Enable stream checksum. This is +enabled by default.</p> + +<p><b>block-checksum</b></p> + +<p style="margin-left:27%;">Enable block checksum. This is +disabled by default.</p> + +<p><b>block-size</b></p> + +<p style="margin-left:27%;">The value is interpreted as a +decimal integer specifying the lz4 compression block size. +Supported values are from 4 to 7 (default).</p> + +<p><b>block-dependence</b></p> + +<p style="margin-left:27%;">Use the previous block of the +block being compressed for a compression dictionary to +improve compression ratio. This is disabled by default.</p> + +<p>Filter lzop <b><br> +compression-level</b></p> + +<p style="margin-left:27%;">The value is interpreted as a +decimal integer specifying the lzop compression level. +Supported values are from 1 to 9.</p> + +<p>Filter uuencode <b><br> +mode</b></p> + +<p style="margin-left:27%; margin-top: 1em">The value is +interpreted as octal digits specifying the file mode.</p> + +<p><b>name</b></p> + +<p style="margin-left:27%; margin-top: 1em">The value +specifies the file name.</p> <p>Filter xz <b><br> compression-level</b></p> <p style="margin-left:27%;">The value is interpreted as a -decimal integer specifying the compression level.</p> +decimal integer specifying the compression level. Supported +values are from 0 to 9.</p> -<p>Format mtree <b><br> -cksum</b>, <b>device</b>, <b>flags</b>, <b>gid</b>, -<b>gname</b>, <b>indent</b>, <b>link</b>, <b>md5</b>, -<b>mode</b>, <b>nlink</b>, <b>rmd160</b>, <b>sha1</b>, -<b>sha256</b>, <b>sha384</b>, <b>sha512</b>, <b>size</b>, -<b>time</b>, <b>uid</b>, <b>uname</b></p> +<p><b>threads</b></p> -<p style="margin-left:27%;">Enable a particular keyword in -the mtree output. Prefix with an exclamation mark to disable -the corresponding keyword. The default is equivalent to -“device, flags, gid, gname, link, mode, nlink, size, -time, type, uid, uname”.</p> +<p style="margin-left:27%;">The value is interpreted as a +decimal integer specifying the number of threads for +multi-threaded lzma compression. If supported, the default +value is read from <b>lzma_cputhreads</b>().</p> -<p><b>all</b></p> +<p>Filter zstd <b><br> +compression-level</b></p> -<p style="margin-left:27%; margin-top: 1em">Enables all of -the above keywords.</p> +<p style="margin-left:27%;">The value is interpreted as a +decimal integer specifying the compression level. Supported +values depend on the library version, common values are from +1 to 22.</p> -<p><b>use-set</b></p> +<p>Format 7zip <b><br> +compression</b></p> -<p style="margin-left:27%;">Enables generation of -<b>/set</b> lines that specify default values for the -following files and/or directories.</p> +<p style="margin-left:27%;">The value is one of +’’store’’, +’’deflate’’, +’’bzip2’’, +’’lzma1’’, +’’lzma2’’ or +’’ppmd’’ to indicate how the +following entries should be compressed. Note that this +setting is ignored for directories, symbolic links, and +other special entries.</p> -<p><b>indent</b></p> +<p><b>compression-level</b></p> -<p style="margin-left:27%; margin-top: 1em">XXX needs -explanation XXX</p> +<p style="margin-left:27%;">The value is interpreted as a +decimal integer specifying the compression level. Values +between 0 and 9 are supported. The interpretation of the +compression level depends on the chosen compression +method.</p> + +<p>Format cpio <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file +names.</p> + +<p>Format gnutar <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file, +group and user names.</p> <p>Format iso9660 - volume metadata</p> @@ -288,7 +398,7 @@ the <i>value</i> is <b>no-emulation</b>, the boot image is used without floppy or hard disk emulation. If the boot image is exactly 1.2MB, 1.44MB, or 2.88MB, then the default is <b>fd</b>, otherwise the default is -<b>no-emulation.</b></p> +<b>no-emulation</b>.</p> <p>Format iso9660 - filename and size extensions</p> @@ -325,7 +435,7 @@ Default: disabled.</p> <p style="margin-left:27%;">If enabled, allows filenames to contain trailing period characters, in violation of the -ISO9660 specification. If disabled,trailing periods will be +ISO9660 specification. If disabled, trailing periods will be converted to underscore characters. This does not impact names stored in the Rockridge or Joliet extension area. Default: disabled.</p> @@ -479,15 +589,153 @@ should not be compressed when using <b>zisofs=direct</b>. This option can be provided multiple times to suppress compression on many files.</p> +<p>Format mtree <b><br> +cksum</b>, <b>device</b>, <b>flags</b>, <b>gid</b>, +<b>gname</b>, <b>indent</b>, <b>link</b>, <b>md5</b>, +<b>mode</b>, <b>nlink</b>, <b>rmd160</b>, <b>sha1</b>, +<b>sha256</b>, <b>sha384</b>, <b>sha512</b>, <b>size</b>, +<b>time</b>, <b>uid</b>, <b>uname</b></p> + +<p style="margin-left:27%;">Enable a particular keyword in +the mtree output. Prefix with an exclamation mark to disable +the corresponding keyword. The default is equivalent to +’’device, flags, gid, gname, link, mode, nlink, +size, time, type, uid, uname’’.</p> + +<p><b>all</b></p> + +<p style="margin-left:27%; margin-top: 1em">Enables all of +the above keywords.</p> + +<p><b>use-set</b></p> + +<p style="margin-left:27%;">Enables generation of +<b>/set</b> lines that specify default values for the +following files and/or directories.</p> + +<p><b>indent</b></p> + +<p style="margin-left:27%; margin-top: 1em">XXX needs +explanation XXX</p> + +<p>Format newc <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file +names.</p> + +<p>Format pax <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file, +group and user names. The value is one of +’’BINARY’’ or +’’UTF-8’’. With +’’BINARY’’ there is no character +conversion, with ’’UTF-8’’ names are +converted to UTF-8.</p> + +<p><b>xattrheader</b></p> + +<p style="margin-left:27%;">When storing extended +attributes, this option configures which headers should be +written. The value is one of +’’all’’, +’’LIBARCHIVE’’, or +’’SCHILY’’. By default, both +’’LIBARCHIVE.xattr’’ and +’’SCHILY.xattr’’ headers are +written.</p> + +<p>Format ustar <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file, +group and user names.</p> + +<p>Format v7tar <b><br> +hdrcharset</b></p> + +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file, +group and user names.</p> + +<p>Format warc <b><br> +omit-warcinfo</b></p> + +<p style="margin-left:27%;">Set to +’’true’’ to disable output of the +warcinfo record.</p> + +<p>Format xar <b><br> +checksum</b>=<i>type</i></p> + +<p style="margin-left:27%;">Use <i>type</i> as file +checksum method. Supported values are +’’none’’, +’’md5’’, and +’’sha1’’ (default).</p> + +<p><b>compression</b>=<i>type</i></p> + +<p style="margin-left:27%;">Use <i>type</i> as compression +method. Supported values are +’’none’’, +’’bzip2’’, +’’gzip’’ (default), +’’lzma’’ and +’’xz’’.</p> + +<p><b>compression_level</b></p> + +<p style="margin-left:27%;">The value is a decimal integer +from 1 to 9 specifying the compression level.</p> + +<p><b>toc-checksum</b>=<i>type</i></p> + +<p style="margin-left:27%;">Use <i>type</i> as table of +contents checksum method. Supported values are +’’none’’, +’’md5’’ and +’’sha1’’ (default).</p> + <p>Format zip <b><br> compression</b></p> <p style="margin-left:27%;">The value is either -“store” or “deflate” to indicate how -the following entries should be compressed. Note that this +’’store’’ or +’’deflate’’ to indicate how the +following entries should be compressed. Note that this setting is ignored for directories, symbolic links, and other special entries.</p> +<p><b>compression-level</b></p> + +<p style="margin-left:27%;">The value is interpreted as a +decimal integer specifying the compression level. Values +between 0 and 9 are supported. A compression level of 0 +switches the compression method to +’’store’’, other values will enable +’’deflate’’ compression with the +given level.</p> + +<p><b>encryption</b></p> + +<p style="margin-left:27%;">Enable encryption using +traditional zip encryption.</p> + +<p><b>encryption</b>=<i>type</i></p> + +<p style="margin-left:27%;">Use <i>type</i> as encryption +type. Supported values are +’’zipcrypt’’ (traditional zip +encryption), ’’aes128’’ (WinZip +AES-128 encryption) and ’’aes256’’ +(WinZip AES-256 encryption).</p> + <p><b>experimental</b></p> <p style="margin-left:27%;">This boolean option enables or @@ -502,8 +750,9 @@ not be used except for testing purposes.</p> <p><b>hdrcharset</b></p> -<p style="margin-left:27%;">This sets the character set -used for filenames.</p> +<p style="margin-left:27%;">The value is used as a +character set name that will be used when translating file +names.</p> <p><b>zip64</b></p> @@ -557,8 +806,9 @@ functions.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_read_set_options(3), archive_write(3)</p> +<p style="margin-left:6%;">tar(1), +archive_read_set_options(3), archive_write(3), +libarchive(3)</p> <p style="margin-top: 1em"><b>HISTORY</b></p> @@ -573,7 +823,7 @@ NAKAJIMA.</p> <p style="margin-top: 1em"><b>BUGS</b></p> -<p style="margin-left:6%;">BSD February 2, 2012 +<p style="margin-left:6%;">BSD January 31, 2020 BSD</p> <hr> </body> 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 f6c4579b435..63fbc9e668a 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:18 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:08 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -57,7 +57,7 @@ functions for writing encrypted archives</p> archive_write_set_passphrase</b>()</p> <p style="margin-left:17%;">Set a passphrase for writing an -encryption archive. If <i>passphrase</i> is NULL or empty, +encrypted archive. If <i>passphrase</i> is NULL or empty, this function will do nothing and <b>ARCHIVE_FAILED</b> will be returned. Otherwise, <b>ARCHIVE_OK</b> will be returned.</p> @@ -65,15 +65,15 @@ returned.</p> <p style="margin-top: 1em"><b>archive_write_set_passphrase_callback</b>()</p> -<p style="margin-left:17%;">Register callback function that -will be invoked to get a passphrase for encrption if the -passphrase was not set by the +<p style="margin-left:17%;">Register a callback function +that will be invoked to get a passphrase for encryption if +the passphrase was not set by the <b>archive_write_set_passphrase</b>() function.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">tar(1), libarchive(3), -archive_write(3), archive_write_set_options(3)</p> +<p style="margin-left:6%;">tar(1), archive_write(3), +archive_write_set_options(3), libarchive(3)</p> <p style="margin-left:6%; margin-top: 1em">BSD September 21, 2014 BSD</p> diff --git a/archivers/libarchive/files/doc/html/bsdcpio.1.html b/archivers/libarchive/files/doc/html/bsdcpio.1.html index 511c4b1b33a..1cea7ba1633 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:19 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:09 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -430,9 +430,10 @@ pattern:</p> <p style="margin-left:6%; margin-top: 1em">This example copies files from <i>src</i> to <i>dest</i> that are more -than 2 days old and which contain the word “</p> +than 2 days old and which contain the word +’’</p> -<p>foobar ”:</p> +<p>foobar ’’:</p> <p style="margin-left:14%;"><b>find</b> <i>src</i> <b>-mtime</b> <i>+2</i> | <b>xargs grep -l foobar</b> | @@ -458,20 +459,22 @@ limit themselves to the standard syntax.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">bzip2(1), tar(1), gzip(1), -mt(1), pax(1), libarchive(3), cpio(5), +<p style="margin-left:6%;">bzip2(1), gzip(1), mt(1), +pax(1), tar(1), libarchive(3), cpio(5), libarchive-formats(5), tar(5)</p> <p style="margin-top: 1em"><b>STANDARDS</b></p> <p style="margin-left:6%;">There is no current POSIX standard for the cpio command; it appeared in ISO/IEC -9945-1:1996 (“POSIX.1”) but was dropped from -IEEE Std 1003.1-2001 (“POSIX.1”).</p> +9945-1:1996 (’’POSIX.1’’) but was +dropped from IEEE Std 1003.1-2001 +(’’POSIX.1’’).</p> <p style="margin-left:6%; margin-top: 1em">The cpio, ustar, and pax interchange file formats are defined by IEEE Std -1003.1-2001 (“POSIX.1”) for the pax command.</p> +1003.1-2001 (’’POSIX.1’’) for the +pax command.</p> <p style="margin-top: 1em"><b>HISTORY</b></p> @@ -479,12 +482,12 @@ and pax interchange file formats are defined by IEEE Std <b>find</b> utilities were written by Dick Haight while working in AT&T’s Unix Support Group. They first appeared in 1977 in PWB/UNIX 1.0, the -“Programmer’s Work Bench” system developed -for use within AT&T. They were first released outside of -AT&T as part of System III Unix in 1981. As a result, -<b>cpio</b> actually predates <b>tar</b>, even though it was -not well-known outside of AT&T until some time -later.</p> +’’Programmer’s Work Bench’’ +system developed for use within AT&T. They were first +released outside of AT&T as part of System III Unix in +1981. As a result, <b>cpio</b> actually predates <b>tar</b>, +even though it was not well-known outside of AT&T until +some time later.</p> <p style="margin-left:6%; margin-top: 1em">This is a complete re-implementation based on the libarchive(3) @@ -499,8 +502,8 @@ to transfer files between systems with dissimilar user and group numbering. Older cpio formats limit the user and group numbers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive formats cannot support files over -4 gigabytes, except for the “odc” variant, which -can support files up to 8 gigabytes.</p> +4 gigabytes, except for the ’’odc’’ +variant, which can support files up to 8 gigabytes.</p> <p style="margin-left:6%; margin-top: 1em">BSD September 16, 2014 BSD</p> diff --git a/archivers/libarchive/files/doc/html/bsdtar.1.html b/archivers/libarchive/files/doc/html/bsdtar.1.html index 8f42def5aad..e76eb803dcc 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:19 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:09 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -32,9 +32,9 @@ tape archives</p> <p style="margin-left:12%;"><b>tar</b> [<i>bundled-flags </i>⟨</p> -<p>args ⟩ ] [⟨ <i><br> -file</i> ⟩ | ⟨ <i><br> -pattern</i> ⟩ ...]</p> +<p>args ⟩] [⟨ <i><br> +file</i> ⟩ | ⟨ <i><br> +pattern</i> ⟩ ...]</p> <p style="margin-left:12%;"><b>tar</b> {<b>-c</b>} [<i>options</i>] @@ -54,9 +54,10 @@ and ISO 9660 cdrom images and can create tar, pax, cpio, ar, zip, 7-zip, and shar archives.</p> <p style="margin-left:6%; margin-top: 1em">The first -synopsis form shows a “bundled” option word. -This usage is provided for compatibility with historical -implementations. See COMPATIBILITY below for details.</p> +synopsis form shows a ’’bundled’’ +option word. This usage is provided for compatibility with +historical implementations. See COMPATIBILITY below for +details.</p> <p style="margin-left:6%; margin-top: 1em">The other synopsis forms show the preferred usage. The first option to @@ -175,9 +176,9 @@ format,</p> <p style="margin-left:24%;"><b>tar -a -jcf</b> <i>archive.tgz source.c source.h</i></p> -<p style="margin-left:17%;">ignores the “-j” -option, and creates a new archive with restricted pax format -and gzip compression,</p> +<p style="margin-left:17%;">ignores the +’’-j’’ option, and creates a new +archive with restricted pax format and gzip compression,</p> <p style="margin-left:24%;"><b>tar -a -jcf</b> <i>archive.xxx source.c source.h</i></p> @@ -246,9 +247,10 @@ specified on the command line.</p> <p style="margin-left:17%;">Do not process files or directories internally used by the version control systems -’CVS’, ’RCS’, ’SCCS’, -’SVN’, ’Arch’, ’Bazaar’, -’Mercurial’ and ’Darcs’.</p> +’Arch’, ’Bazaar’, ’CVS’, +’Darcs’, ’Mercurial’, +’RCS’, ’SCCS’, ’SVN’ and +’git’.</p> <p style="margin-top: 1em"><b>--fflags</b></p> @@ -263,13 +265,15 @@ mode as root.</p> <p style="margin-left:17%;">(c, r, u mode only) Use the specified format for the created archive. Supported formats -include “cpio”, “pax”, -“shar”, and “ustar”. Other formats -may also be supported; see libarchive-formats(5) for more -information about currently-supported formats. In r and u -modes, when extending an existing archive, the format -specified here must be compatible with the format of the -existing archive on disk.</p> +include ’’cpio’’, +’’pax’’, +’’shar’’, and +’’ustar’’. Other formats may also be +supported; see libarchive-formats(5) for more information +about currently-supported formats. In r and u modes, when +extending an existing archive, the format specified here +must be compatible with the format of the existing archive +on disk.</p> <p style="margin-top: 1em"><b>-f</b> <i>file</i>, <b>--file</b> <i>file</i></p> @@ -533,6 +537,12 @@ attributes using copyfile(3) in AppleDouble format. This is the reverse of <b>--mac-metadata</b>. and the default behavior if <b>tar</b> is run as non-root in x mode.</p> +<p style="margin-top: 1em"><b>--no-safe-writes</b></p> + +<p style="margin-left:17%;">(x mode only) Do not create +temporary files and use rename(2) to replace the original +ones. This is the reverse of <b>--safe-writes</b>.</p> + <p style="margin-top: 1em"><b>--no-same-owner</b></p> <p style="margin-left:17%;">(x mode only) Do not extract @@ -654,8 +664,13 @@ disabled in every module that supports it.</p> key and value will be provided only to modules whose name matches <i>module</i>.</p> -<p style="margin-left:17%;">The currently supported modules -and keys are:</p> +<p style="margin-left:17%; margin-top: 1em">The complete +list of supported modules and keys for create and append +modes is in archive_write_set_options(3) and for extract and +list modes in archive_read_set_options(3).</p> + +<p style="margin-left:17%; margin-top: 1em">Examples of +supported options:</p> <p><b>iso9660:joliet</b></p> @@ -720,8 +735,9 @@ 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 style="margin-left:27%;">A decimal integer specifying +the zstd compression level. Supported values depend on the +library version, common values are from 1 to 22.</p> <p><b>lzop:compression-level</b></p> @@ -743,8 +759,8 @@ output. Supported keywords include: <b>cksum</b>, <b>nlink</b>, <b>rmd160</b>, <b>sha1</b>, <b>sha256</b>, <b>sha384</b>, <b>sha512</b>, <b>size</b>, <b>time</b>, <b>uid</b>, <b>uname</b>. The default is equivalent to: -“device, flags, gid, gname, link, mode, nlink, size, -time, type, uid, uname”.</p> +’’device, flags, gid, gname, link, mode, nlink, +size, time, type, uid, uname’’.</p> <p><b>mtree:all</b></p> @@ -877,6 +893,22 @@ default is <i>hrs</i> which applies substitutions to all names. In particular, it is never necessary to specify h, r, or s.</p> +<p style="margin-top: 1em"><b>--safe-writes</b></p> + +<p style="margin-left:17%;">(x mode only) Extract files +atomically. By default <b>tar</b> unlinks the original file +with the same name as the extracted file (if it exists), and +then creates it immediately under the same name and writes +to it. For a short period of time, applications trying to +access the file might not find it, or see incomplete +results. If <b>--safe-writes</b> is enabled, <b>tar</b> +first creates a unique temporary file, then writes the new +contents to the temporary file, and finally renames the +temporary file to its final name atomically using rename(2). +This guarantees that an application accessing the file, will +either see the old contents or the new contents at all +times.</p> + <p style="margin-top: 1em"><b>--same-owner</b></p> <p style="margin-left:17%;">(x mode only) Extract owner and @@ -898,12 +930,13 @@ checks.</p> <p style="margin-left:17%;">In x or t mode, <b>tar</b> will read the list of names to be extracted from <i>filename</i>. In c mode, <b>tar</b> will read names to be archived from -<i>filename</i>. The special name “-C” on a line -by itself will cause the current directory to be changed to -the directory specified on the following line. Names are -terminated by newlines unless <b>--null</b> is specified. -Note that <b>--null</b> also disables the special handling -of lines containing “-C”. Note: If you are +<i>filename</i>. The special name +’’-C’’ on a line by itself will +cause the current directory to be changed to the directory +specified on the following line. Names are terminated by +newlines unless <b>--null</b> is specified. Note that +<b>--null</b> also disables the special handling of lines +containing ’’-C’’. Note: If you are generating lists of files using find(1), you probably want to use <b>-n</b> as well.</p> @@ -1078,14 +1111,13 @@ contents of an ISO 9660 cdrom image:</p> hierarchies, invoke <b>tar</b> as</p> <p style="margin-left:14%;"><b>tar -cf</b> <i>-</i> -<b>-C</b> <i>srcdir .</i> | <b>tar -xpf</b> <i>-</i> +<b>-C</b> <i>srcdir .</i> | <b>tar -xpf</b> <i>-</i> <b>-C</b> <i>destdir</i></p> <p style="margin-left:6%;">or more traditionally</p> -<p style="margin-left:14%;">cd srcdir ; <b>tar -cf</b> -<i>- .</i> | (<i>cd destdir ;</i> <b>tar -xpf</b> -<i>-</i>)</p> +<p style="margin-left:14%;">cd srcdir ; <b>tar -cf</b> <i>- +.</i> | (<i>cd destdir ;</i> <b>tar -xpf</b> <i>-</i>)</p> <p style="margin-left:6%; margin-top: 1em">In create mode, the list of files and directories to be archived can also @@ -1121,9 +1153,10 @@ $ tar -cvf output.tar @input.mtree</p> <p style="margin-left:6%; margin-top: 1em">The <b>--newer</b> and <b>--newer-mtime</b> switches accept a variety of common date and time specifications, including -“12 Mar 2005 7:14:29pm”, “2005-03-12 -19:14”, “5 minutes ago”, and “19:14 -PST May 1”.</p> +’’12 Mar 2005 7:14:29pm’’, +’’2005-03-12 19:14’’, +’’5 minutes ago’’, and +’’19:14 PST May 1’’.</p> <p style="margin-left:6%; margin-top: 1em">The <b>--options</b> argument can be used to control various @@ -1251,16 +1284,18 @@ libarchive-formats(5), tar(5)</p> <p style="margin-left:6%;">There is no current POSIX standard for the tar command; it appeared in ISO/IEC -9945-1:1996 (“POSIX.1”) but was dropped from -IEEE Std 1003.1-2001 (“POSIX.1”). The options -supported by this implementation were developed by surveying -a number of existing tar implementations as well as the old -POSIX specification for tar and the current POSIX -specification for pax.</p> +9945-1:1996 (’’POSIX.1’’) but was +dropped from IEEE Std 1003.1-2001 +(’’POSIX.1’’). The options supported +by this implementation were developed by surveying a number +of existing tar implementations as well as the old POSIX +specification for tar and the current POSIX specification +for pax.</p> <p style="margin-left:6%; margin-top: 1em">The ustar and pax interchange file formats are defined by IEEE Std -1003.1-2001 (“POSIX.1”) for the pax command.</p> +1003.1-2001 (’’POSIX.1’’) for the +pax command.</p> <p style="margin-top: 1em"><b>HISTORY</b></p> @@ -1281,9 +1316,9 @@ library. It was first released with FreeBSD 5.4 in May, <p style="margin-top: 1em"><b>BUGS</b></p> <p style="margin-left:6%;">This program follows ISO/IEC -9945-1:1996 (“POSIX.1”) for the definition of -the <b>-l</b> option. Note that GNU tar prior to version -1.15 treated <b>-l</b> as a synonym for the +9945-1:1996 (’’POSIX.1’’) for the +definition of the <b>-l</b> option. Note that GNU tar prior +to version 1.15 treated <b>-l</b> as a synonym for the <b>--one-file-system</b> option.</p> <p style="margin-left:6%; margin-top: 1em">The <b>-C</b> @@ -1349,8 +1384,8 @@ information to be lost. (This is a consequence of the incompatible ways that different archive formats store hardlink information.)</p> -<p style="margin-left:6%; margin-top: 1em">BSD June 3, -2019 BSD</p> +<p style="margin-left:6%; margin-top: 1em">BSD +January 31, 2020 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 b699e623232..95a08f6b8d9 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:18 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:08 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -46,7 +46,7 @@ those integers (binary, octal, or hexadecimal). The header is followed by the pathname of the entry (the length of the pathname is stored in the header) and any file data. The end of the archive is indicated by a special record with the -pathname “TRAILER!!!”.</p> +pathname ’’TRAILER!!!’’.</p> <p style="margin-left:6%; margin-top: 1em"><b>PWB format</b> <br> @@ -239,12 +239,13 @@ included with each copy of the file.</p> <p style="margin-left:6%; margin-top: 1em"><b>Portable ASCII Format</b> <br> Version 2 of the Single UNIX Specification -(“SUSv2”) standardized an ASCII variant that is -portable across all platforms. It is commonly known as the -“old character” format or as the -“odc” format. It stores the same numeric fields -as the old binary format, but represents them as 6-character -or 11-character octal values.</p> +(’’SUSv2’’) standardized an ASCII +variant that is portable across all platforms. It is +commonly known as the ’’old +character’’ format or as the +’’odc’’ format. It stores the same +numeric fields as the old binary format, but represents them +as 6-character or 11-character octal values.</p> <p style="margin-left:14%; margin-top: 1em">struct cpio_odc_header { <br> @@ -301,7 +302,7 @@ the old binary format above.</p> <p style="margin-top: 1em"><i>magic</i></p> <p style="margin-left:17%; margin-top: 1em">The string -“070701”.</p> +’’070701’’.</p> <p style="margin-top: 1em"><i>check</i></p> @@ -318,18 +319,18 @@ ASCII format, which supports 8 gigabyte files).</p> <p style="margin-left:6%; margin-top: 1em">In this format, hardlinked files are handled by setting the filesize to zero -for each entry except the last one that appears in the +for each entry except the first one that appears in the archive.</p> <p style="margin-left:6%; margin-top: 1em"><b>New CRC Format</b> <br> The CRC format is identical to the new ASCII format described in the previous section except that the magic -field is set to “070702” and the <i>check</i> -field is set to the sum of all bytes in the file data. This -sum is computed treating all bytes as unsigned values and -using unsigned arithmetic. Only the least-significant 32 -bits of the sum are stored.</p> +field is set to ’’070702’’ and the +<i>check</i> field is set to the sum of all bytes in the +file data. This sum is computed treating all bytes as +unsigned values and using unsigned arithmetic. Only the +least-significant 32 bits of the sum are stored.</p> <p style="margin-left:6%; margin-top: 1em"><b>HP variants</b> <br> @@ -354,31 +355,34 @@ XXX</p> <p style="margin-left:6%;">The <b>cpio</b> utility is no longer a part of POSIX or the Single Unix Standard. It last appeared in Version 2 of the Single UNIX Specification -(“SUSv2”). It has been supplanted in subsequent -standards by pax(1). The portable ASCII format is currently -part of the specification for the pax(1) utility.</p> +(’’SUSv2’’). It has been supplanted +in subsequent standards by pax(1). The portable ASCII format +is currently part of the specification for the pax(1) +utility.</p> <p style="margin-top: 1em"><b>HISTORY</b></p> <p style="margin-left:6%;">The original cpio utility was written by Dick Haight while working in AT&T’s Unix Support Group. It appeared in 1977 as part of PWB/UNIX -1.0, the “Programmer’s Work Bench” derived -from Version 6 AT&T UNIX that was used internally -at AT&T. Both the old binary and old character formats -were in use by 1980, according to the System III source -released by SCO under their “Ancient Unix” -license. The character format was adopted as part of IEEE -Std 1003.1-1988 (“POSIX.1”). XXX when did +1.0, the ’’Programmer’s Work +Bench’’ derived from Version 6 AT&T +UNIX that was used internally at AT&T. Both the old +binary and old character formats were in use by 1980, +according to the System III source released by SCO under +their ’’Ancient Unix’’ license. The +character format was adopted as part of IEEE Std 1003.1-1988 +(’’POSIX.1’’). XXX when did "newc" appear? Who invented it? When did HP come out with their variant? When did Sun introduce ACLs and extended attributes? XXX</p> <p style="margin-top: 1em"><b>BUGS</b></p> -<p style="margin-left:6%;">The “CRC” format is -mis-named, as it uses a simple checksum and not a cyclic -redundancy check.</p> +<p style="margin-left:6%;">The +’’CRC’’ format is mis-named, as it +uses a simple checksum and not a cyclic redundancy +check.</p> <p style="margin-left:6%; margin-top: 1em">The old binary format is limited to 16 bits for user id, group id, device, diff --git a/archivers/libarchive/files/doc/html/libarchive-formats.5.html b/archivers/libarchive/files/doc/html/libarchive-formats.5.html index e8a16215526..7151d054387 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:18 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:08 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -34,9 +34,9 @@ library</p> <p style="margin-left:6%;">The libarchive(3) library reads and writes a variety of streaming archive formats. Generally speaking, all of these archive formats consist of a series -of “entries”. Each entry stores a single file -system object, such as a file, directory, or symbolic -link.</p> +of ’’entries’’. Each entry stores a +single file system object, such as a file, directory, or +symbolic link.</p> <p style="margin-left:6%; margin-top: 1em">The following provides a brief description of each format supported by @@ -52,9 +52,10 @@ all supported formats.</p> <p style="margin-left:6%; margin-top: 1em"><b>Tar Formats</b> <br> The libarchive(3) library can read most tar archives. It can -write POSIX-standard “ustar” and “pax -interchange” formats as well as v7 tar format and a -subset of the legacy GNU tar format.</p> +write POSIX-standard ’’ustar’’ and +’’pax interchange’’ formats as well +as v7 tar format and a subset of the legacy GNU tar +format.</p> <p style="margin-left:6%; margin-top: 1em">All tar formats store each entry in one or more 512-byte records. The first @@ -98,10 +99,11 @@ standard are in all lowercase; vendors are allowed to define custom keys by preceding them with the vendor name in all uppercase. When writing pax archives, libarchive uses many of the SCHILY keys defined by Joerg Schilling’s -“star” archiver and a few LIBARCHIVE keys. The -libarchive library can read most of the SCHILY keys and most -of the GNU keys introduced by GNU tar. It silently ignores -any keywords that it does not understand.</p> +’’star’’ archiver and a few +LIBARCHIVE keys. The libarchive library can read most of the +SCHILY keys and most of the GNU keys introduced by GNU tar. +It silently ignores any keywords that it does not +understand.</p> <p style="margin-left:17%; margin-top: 1em">The pax interchange format converts filenames to Unicode and stores @@ -239,17 +241,18 @@ extended attribute records written by Solaris tar.</p> <p style="margin-left:6%; margin-top: 1em">The first tar program appeared in Seventh Edition Unix in 1979. The first official standard for the tar file format was the -“ustar” (Unix Standard Tar) format defined by -POSIX in 1988. POSIX.1-2001 extended the ustar format to -create the “pax interchange” format.</p> +’’ustar’’ (Unix Standard Tar) format +defined by POSIX in 1988. POSIX.1-2001 extended the ustar +format to create the ’’pax +interchange’’ format.</p> <p style="margin-left:6%; margin-top: 1em"><b>Cpio Formats</b> <br> The libarchive library can read a number of common cpio -variants and can write “odc” and -“newc” format archives. A cpio archive stores -each entry as a fixed-size header followed by a -variable-length filename and variable-length data. Unlike +variants and can write ’’odc’’ and +’’newc’’ format archives. A cpio +archive stores each entry as a fixed-size header followed by +a variable-length filename and variable-length data. Unlike the tar format, the cpio format does only minimal padding of the header or file data. There are several cpio variants, which differ primarily in how they store the initial header: @@ -269,14 +272,15 @@ mtime, and 16-bit binary values for the other fields.</p> <p style="margin-left:17%; margin-top: 1em">The libarchive library can both read and write this POSIX-standard format, -which is officially known as the “cpio interchange -format” or the “octet-oriented cpio archive -format” and sometimes unofficially referred to as the -“old character format”. This format stores the -header contents as octal values in ASCII. It is standard, -portable, and immune from byte-order confusion. File sizes -and mtime are limited to 33 bits (8GB file size), other -fields are limited to 18 bits.</p> +which is officially known as the ’’cpio +interchange format’’ or the +’’octet-oriented cpio archive +format’’ and sometimes unofficially referred to +as the ’’old character format’’. +This format stores the header contents as octal values in +ASCII. It is standard, portable, and immune from byte-order +confusion. File sizes and mtime are limited to 33 bits (8GB +file size), other fields are limited to 18 bits.</p> <p style="margin-top: 1em"><b>SVR4/newc</b></p> @@ -308,10 +312,10 @@ systems with dissimilar user numbering.</p> <p style="margin-left:6%; margin-top: 1em"><b>Shar Formats</b> <br> -A “shell archive” is a shell script that, when -executed on a POSIX-compliant system, will recreate a -collection of file system objects. The libarchive library -can write two different kinds of shar archives:</p> +A ’’shell archive’’ is a shell +script that, when executed on a POSIX-compliant system, will +recreate a collection of file system objects. The libarchive +library can write two different kinds of shar archives:</p> <p style="margin-top: 1em"><b>shar</b></p> @@ -375,15 +379,15 @@ variables.</p> format</b> <br> Libarchive can read and write zip format archives that have uncompressed entries and entries compressed with the -“deflate” algorithm. Other zip compression -algorithms are not supported. It can extract jar archives, -archives that use Zip64 extensions and self-extracting zip -archives. Libarchive can use either of two different -strategies for reading Zip archives: a streaming strategy -which is fast and can handle extremely large archives, and a -seeking strategy which can correctly process self-extracting -Zip archives and archives with deleted members or other -in-place modifications.</p> +’’deflate’’ algorithm. Other zip +compression algorithms are not supported. It can extract jar +archives, archives that use Zip64 extensions and +self-extracting zip archives. Libarchive can use either of +two different strategies for reading Zip archives: a +streaming strategy which is fast and can handle extremely +large archives, and a seeking strategy which can correctly +process self-extracting Zip archives and archives with +deleted members or other in-place modifications.</p> <p style="margin-left:6%; margin-top: 1em">The streaming reader processes Zip archives as they are read. It can read @@ -464,8 +468,9 @@ Libarchive can read and write 7-Zip format archives. TODO: Need more information</p> <p style="margin-left:6%; margin-top: 1em"><b>CAB</b> <br> -Libarchive can read Microsoft Cabinet ( “CAB”) -format archives. TODO: Need more information.</p> +Libarchive can read Microsoft Cabinet ( +’’CAB’’) format archives. TODO: Need +more information.</p> <p style="margin-left:6%; margin-top: 1em"><b>LHA</b> <br> TODO: Information about libarchive’s LHA support</p> @@ -479,8 +484,8 @@ the RARv3 format. Libarchive can also read self-extracting RAR archives.</p> <p style="margin-left:6%; margin-top: 1em"><b>Warc</b> <br> -Libarchive can read and write “web archives”. -TODO: Need more information</p> +Libarchive can read and write ’’web +archives’’. TODO: Need more information</p> <p style="margin-left:6%; margin-top: 1em"><b>XAR</b> <br> Libarchive can read and write the XAR format used by many diff --git a/archivers/libarchive/files/doc/html/libarchive.3.html b/archivers/libarchive/files/doc/html/libarchive.3.html index 8e5b5ff11d5..3fc33d9240c 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:18 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:08 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -53,12 +53,12 @@ for:</p> <p><b>•</b></p> <p style="margin-left:12%;">most variants of the POSIX -“ustar” format,</p> +’’ustar’’ format,</p> <p><b>•</b></p> -<p style="margin-left:12%;">the POSIX “pax -interchange” format,</p> +<p style="margin-left:12%;">the POSIX ’’pax +interchange’’ format,</p> <p><b>•</b></p> @@ -117,12 +117,12 @@ format to use. The library can write</p> <p><b>•</b></p> <p style="margin-left:12%;">POSIX-standard -“ustar” archives,</p> +’’ustar’’ archives,</p> <p><b>•</b></p> -<p style="margin-left:12%;">POSIX “pax interchange -format” archives,</p> +<p style="margin-left:12%;">POSIX ’’pax +interchange format’’ archives,</p> <p><b>•</b></p> diff --git a/archivers/libarchive/files/doc/html/libarchive_changes.3.html b/archivers/libarchive/files/doc/html/libarchive_changes.3.html index b686e68a0f2..133932b2a83 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:18 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:08 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -57,13 +57,13 @@ can be easily converted to UTF-8.</p> <p style="margin-left:6%; margin-top: 1em">Libarchive3 uses the standard iconv library to convert between character sets -and is introducing the notion of a “default character -set for the archive”. To support this, archive_entry -objects can now be bound to a particular archive when they -are created. The automatic character set conversions -performed by archive_entry objects when reading and writing -filenames, usernames, and other strings will now use an -appropriate default character set:</p> +and is introducing the notion of a ’’default +character set for the archive’’. To support +this, archive_entry objects can now be bound to a particular +archive when they are created. The automatic character set +conversions performed by archive_entry objects when reading +and writing filenames, usernames, and other strings will now +use an appropriate default character set:</p> <p style="margin-left:6%; margin-top: 1em">If the archive_entry object is bound to an archive, it will use the @@ -450,11 +450,12 @@ or <b>archive_write_set_format_option</b>()</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> -<p style="margin-left:6%;">libarchive(3), archive_read(3), +<p style="margin-left:6%;">archive_read(3), archive_read_filter(3), archive_read_format(3), -archive_read_set_options(3), archive_write(3), -archive_write_filter(3), archive_write_format(3), -archive_write_set_options(3), archive_util(3)</p> +archive_read_set_options(3), archive_util(3), +archive_write(3), archive_write_filter(3), +archive_write_format(3), archive_write_set_options(3), +libarchive(3)</p> <p style="margin-left:6%; margin-top: 1em">BSD December 23, 2011 BSD</p> diff --git a/archivers/libarchive/files/doc/html/libarchive_internals.3.html b/archivers/libarchive/files/doc/html/libarchive_internals.3.html index 5a97aa0ab29..e5e74700b9d 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:18 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:08 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -354,8 +354,8 @@ program.</p> <p style="margin-top: 1em"><b>SEE ALSO</b></p> <p style="margin-left:6%;">archive_entry(3), -archive_read(3), archive_write(3), archive_write_disk(3) -libarchive(3),</p> +archive_read(3), archive_write(3), archive_write_disk(3), +libarchive(3)</p> <p style="margin-top: 1em"><b>HISTORY</b></p> diff --git a/archivers/libarchive/files/doc/html/mtree.5.html b/archivers/libarchive/files/doc/html/mtree.5.html index 813e4a26759..fceb347aa63 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:19 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:08 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -175,8 +175,8 @@ pathname of a file that holds the contents of this file.</p> <p style="margin-left:22%; margin-top: 1em">The file flags as a symbolic name. See chflags(1) for information on these names. If no flags are to be set the string -“none” may be used to override the current -default.</p> +’’none’’ may be used to override the +current default.</p> <p style="margin-top: 1em"><b>gid</b></p> @@ -239,9 +239,9 @@ file hierarchy.</p> <p style="margin-top: 1em"><b>resdevice</b></p> <p style="margin-left:22%; margin-top: 1em">The -“resident” device number of the file, e.g. the -ID of the device that contains the file. Its format is the -same as the one for <b>device</b>.</p> +’’resident’’ device number of the +file, e.g. the ID of the device that contains the file. Its +format is the same as the one for <b>device</b>.</p> <p style="margin-top: 1em"><b>ripemd160digest</b></p> @@ -261,7 +261,8 @@ the file.</p> <p style="margin-top: 1em"><b>sha1</b></p> <p style="margin-left:22%; margin-top: 1em">The FIPS 160-1 -(“SHA-1”) message digest of the file.</p> +(’’SHA-1’’) message digest of the +file.</p> <p style="margin-top: 1em"><b>sha1digest</b></p> @@ -271,7 +272,8 @@ the file.</p> <p style="margin-top: 1em"><b>sha256</b></p> <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2 -(“SHA-256”) message digest of the file.</p> +(’’SHA-256’’) message digest of the +file.</p> <p style="margin-top: 1em"><b>sha256digest</b></p> @@ -281,7 +283,8 @@ the file.</p> <p style="margin-top: 1em"><b>sha384</b></p> <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2 -(“SHA-384”) message digest of the file.</p> +(’’SHA-384’’) message digest of the +file.</p> <p style="margin-top: 1em"><b>sha384digest</b></p> @@ -291,7 +294,8 @@ the file.</p> <p style="margin-top: 1em"><b>sha512</b></p> <p style="margin-left:22%; margin-top: 1em">The FIPS 180-2 -(“SHA-512”) message digest of the file.</p> +(’’SHA-512’’) message digest of the +file.</p> <p style="margin-top: 1em"><b>sha512digest</b></p> @@ -359,8 +363,7 @@ as a symbolic name.</p> <p style="margin-left:6%;">cksum(1), find(1), mtree(8)</p> -<p style="margin-top: 1em"><b>BUGS <br> -HISTORY</b></p> +<p style="margin-top: 1em"><b>HISTORY</b></p> <p style="margin-left:6%;">The <b>mtree</b> utility appeared in 4.3BSD-Reno. The MD5 digest capability was added @@ -370,7 +373,8 @@ digests were added in FreeBSD 4.0, as new attacks have demonstrated weaknesses in MD5. The SHA-256 digest was added in FreeBSD 6.0. Support for file flags was added in FreeBSD 4.0, and mostly comes from NetBSD. The -“full” entry format was added by NetBSD.</p> +’’full’’ entry format was added by +NetBSD.</p> <p style="margin-left:6%; margin-top: 1em">BSD September 4, 2013 BSD</p> diff --git a/archivers/libarchive/files/doc/html/tar.5.html b/archivers/libarchive/files/doc/html/tar.5.html index a718b1d2f7e..444806b9b52 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.4 --> -<!-- CreationDate: Wed Jun 12 21:10:19 2019 --> +<!-- Creator : groff version 1.22.3 --> +<!-- CreationDate: Wed May 20 01:10:09 2020 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -50,15 +50,16 @@ entirely of zero bytes.</p> compatibility with tape drives that use fixed block sizes, programs that read or write tar files always read or write a fixed number of records with each I/O operation. These -“blocks” are always a multiple of the record -size. The maximum block size supported by early +’’blocks’’ are always a multiple of +the record size. The maximum block size supported by early implementations was 10240 bytes or 20 records. This is still the default for most implementations although block sizes of 1MiB (2048 records) or larger are commonly used with modern -high-speed tape drives. (Note: the terms “block” -and “record” here are not entirely standard; -this document follows the convention established by John -Gilmore in documenting <b>pdtar</b>.)</p> +high-speed tape drives. (Note: the terms +’’block’’ and +’’record’’ here are not entirely +standard; this document follows the convention established +by John Gilmore in documenting <b>pdtar</b>.)</p> <p style="margin-left:6%; margin-top: 1em"><b>Old-Style Archive Format</b> <br> @@ -238,25 +239,25 @@ size and mtime fields must end in a space; the checksum is terminated by a null and a space. Early implementations filled the numeric fields with leading spaces. This seems to have been common practice until the IEEE Std 1003.1-1988 -(“POSIX.1”) standard was released. For best -portability, modern implementations should fill the numeric -fields with leading zeros.</p> +(’’POSIX.1’’) standard was released. +For best portability, modern implementations should fill the +numeric fields with leading zeros.</p> <p style="margin-left:6%; margin-top: 1em"><b>Pre-POSIX Archives</b> <br> An early draft of IEEE Std 1003.1-1988 -(“POSIX.1”) served as the basis for John -Gilmore’s <b>pdtar</b> program and many system -implementations from the late 1980s and early 1990s. These -archives generally follow the POSIX ustar format described -below with the following variations:</p> +(’’POSIX.1’’) served as the basis +for John Gilmore’s <b>pdtar</b> program and many +system implementations from the late 1980s and early 1990s. +These archives generally follow the POSIX ustar format +described below with the following variations:</p> <p><b>•</b></p> <p style="margin-left:17%;">The magic value consists of the -five characters “ustar” followed by a space. The -version field contains a space character followed by a -null.</p> +five characters ’’ustar’’ followed +by a space. The version field contains a space character +followed by a null.</p> <p><b>•</b></p> @@ -272,13 +273,13 @@ archives.</p> <p style="margin-left:6%; margin-top: 1em"><b>POSIX ustar Archives</b> <br> -IEEE Std 1003.1-1988 (“POSIX.1”) defined a -standard tar file format to be read and written by compliant -implementations of tar(1). This format is often called the -“ustar” format, after the magic value used in -the header. (The name is an acronym for “Unix Standard -TAR”.) It extends the historic format with new -fields:</p> +IEEE Std 1003.1-1988 (’’POSIX.1’’) +defined a standard tar file format to be read and written by +compliant implementations of tar(1). This format is often +called the ’’ustar’’ format, after +the magic value used in the header. (The name is an acronym +for ’’Unix Standard TAR’’.) It +extends the historic format with new fields:</p> <p style="margin-left:14%; margin-top: 1em">struct header_posix_ustar {</p> @@ -431,40 +432,40 @@ header_posix_ustar {</p> the earlier <i>linkflag</i> field with several new type values:</p> -<p>“0”</p> +<p>’’0’’</p> <p style="margin-left:27%; margin-top: 1em">Regular file. NUL should be treated as a synonym, for compatibility purposes.</p> -<p>“1”</p> +<p>’’1’’</p> <p style="margin-left:27%; margin-top: 1em">Hard link.</p> -<p>“2”</p> +<p>’’2’’</p> <p style="margin-left:27%; margin-top: 1em">Symbolic link.</p> -<p>“3”</p> +<p>’’3’’</p> <p style="margin-left:27%; margin-top: 1em">Character device node.</p> -<p>“4”</p> +<p>’’4’’</p> <p style="margin-left:27%; margin-top: 1em">Block device node.</p> -<p>“5”</p> +<p>’’5’’</p> <p style="margin-left:27%; margin-top: 1em">Directory.</p> -<p>“6”</p> +<p>’’6’’</p> <p style="margin-left:27%; margin-top: 1em">FIFO node.</p> -<p>“7”</p> +<p>’’7’’</p> <p style="margin-left:27%; margin-top: 1em">Reserved.</p> @@ -492,16 +493,16 @@ should be set to zero by writers and ignored by readers.</p> <p style="margin-top: 1em"><i>magic</i></p> <p style="margin-left:17%; margin-top: 1em">Contains the -magic value “ustar” followed by a NUL byte to -indicate that this is a POSIX standard archive. Full -compliance requires the uname and gname fields be properly -set.</p> +magic value ’’ustar’’ followed by a +NUL byte to indicate that this is a POSIX standard archive. +Full compliance requires the uname and gname fields be +properly set.</p> <p style="margin-top: 1em"><i>version</i></p> <p style="margin-left:17%;">Version. This should be -“00” (two copies of the ASCII digit zero) for -POSIX standard archives.</p> +’’00’’ (two copies of the ASCII +digit zero) for POSIX standard archives.</p> <p style="margin-top: 1em"><i>uname</i>, <i>gname</i></p> @@ -588,16 +589,17 @@ implementation.</p> Interchange Format</b> <br> There are many attributes that cannot be portably stored in a POSIX ustar archive. IEEE Std 1003.1-2001 -(“POSIX.1”) defined a “pax interchange -format” that uses two new types of entries to hold -text-formatted metadata that applies to following entries. -Note that a pax interchange format archive is a ustar -archive in every respect. The new data is stored in -ustar-compatible archive entries that use the -“x” or “g” typeflag. In particular, -older implementations that do not fully support these -extensions will extract the metadata into regular files, -where the metadata can be examined as necessary.</p> +(’’POSIX.1’’) defined a +’’pax interchange format’’ that uses +two new types of entries to hold text-formatted metadata +that applies to following entries. Note that a pax +interchange format archive is a ustar archive in every +respect. The new data is stored in ustar-compatible archive +entries that use the ’’x’’ or +’’g’’ typeflag. In particular, older +implementations that do not fully support these extensions +will extract the metadata into regular files, where the +metadata can be examined as necessary.</p> <p style="margin-left:6%; margin-top: 1em">An entry in a pax interchange format archive consists of one or two @@ -638,16 +640,17 @@ pax extended attributes are assumed to be in UTF-8, including pathnames, user names, and group names. In some cases, it is not possible to translate local conventions into UTF-8. If this key is present and the value is the -six-character ASCII string “BINARY”, then all -textual values are assumed to be in a platform-dependent -multi-byte encoding. Note that there are only two valid -values for this key: “BINARY” or -“ISO-IR 10646 2000 UTF-8”. No -other values are permitted by the standard, and the latter -value should generally not be used as it is the default when -this key is not specified. In particular, this flag should -not be used as a general mechanism to allow filenames to be -stored in arbitrary encodings.</p> +six-character ASCII string +’’BINARY’’, then all textual values +are assumed to be in a platform-dependent multi-byte +encoding. Note that there are only two valid values for this +key: ’’BINARY’’ or +’’ISO-IR 10646 2000 UTF-8’’. +No other values are permitted by the standard, and the +latter value should generally not be used as it is the +default when this key is not specified. In particular, this +flag should not be used as a general mechanism to allow +filenames to be stored in arbitrary encodings.</p> <p style="margin-top: 1em"><b>uname</b>, <b>uid</b>, <b>gname</b>, <b>gid</b></p> @@ -689,7 +692,7 @@ the historic 8GB limit.</p> by Joerg Schilling’s <b>star</b> implementation.</p> <p style="margin-top: 1em"><b>SCHILY.acl.access</b>, -<b>SCHILY.acl.default, SCHILY.acl.ace</b></p> +<b>SCHILY.acl.default</b>, <b>SCHILY.acl.ace</b></p> <p style="margin-left:17%;">Stores the access, default and NFSv4 ACLs as textual strings in a format that is an @@ -716,8 +719,8 @@ numbers for device nodes.</p> <p style="margin-left:17%;">The full size of the file on disk. XXX explain? XXX</p> -<p style="margin-top: 1em"><b>SCHILY.dev, SCHILY.ino</b>, -<b>SCHILY.nlinks</b></p> +<p style="margin-top: 1em"><b>SCHILY.dev</b>, +<b>SCHILY.ino</b>, <b>SCHILY.nlinks</b></p> <p style="margin-left:17%;">The device number, inode number, and link count for the entry. In particular, note @@ -736,20 +739,22 @@ it.</p> <p style="margin-left:17%;">The time when the file was created. (This should not be confused with the POSIX -“ctime” attribute, which refers to the time when -the file metadata was last changed.)</p> +’’ctime’’ attribute, which refers to +the time when the file metadata was last changed.)</p> -<p style="margin-top: 1em"><b>LIBARCHIVE.xattr.</b><i>namespace</i>.<i>key</i></p> +<p style="margin-top: 1em"><b>LIBARCHIVE.xattr</b>.<i>namespace</i>.<i>key</i></p> <p style="margin-left:17%;">Libarchive stores POSIX.1e-style extended attributes using keys of this form. The <i>key</i> value is URL-encoded: All non-ASCII -characters and the two special characters “=” -and “%” are encoded as “%” followed -by two uppercase hexadecimal digits. The value of this key -is the extended attribute value encoded in base 64. XXX -Detail the base-64 format here XXX</p> +characters and the two special characters +’’=’’ and +’’%’’ are encoded as +’’%’’ followed by two uppercase +hexadecimal digits. The value of this key is the extended +attribute value encoded in base 64. XXX Detail the base-64 +format here XXX</p> <p style="margin-top: 1em"><b>VENDOR.*</b></p> @@ -1132,21 +1137,23 @@ equal to realsize.</p> They contained a list of files to be renamed or symlinked after extraction; this was originally used to support long names. The contents of this record are a text description of -the operations to be done, in the form “Rename %s to -%s\n” or “Symlink %s to %s\n”; in either -case, both filenames are escaped using K&R C syntax. Due -to security concerns, "N" records are now -generally ignored when reading archives.</p> +the operations to be done, in the form ’’Rename +%s to %s\n’’ or ’’Symlink %s to +%s\n’’; in either case, both filenames are +escaped using K&R C syntax. Due to security concerns, +"N" records are now generally ignored when reading +archives.</p> <p style="margin-top: 1em">S</p> <p style="margin-left:27%; margin-top: 1em">This is a -“sparse” regular file. Sparse files are stored -as a series of fragments. The header contains a list of -fragment offset/length pairs. If more than four such entries -are required, the header is extended as necessary with -“extra” header extensions (an older format that -is no longer used), or “sparse” extensions.</p> +’’sparse’’ regular file. Sparse +files are stored as a series of fragments. The header +contains a list of fragment offset/length pairs. If more +than four such entries are required, the header is extended +as necessary with ’’extra’’ header +extensions (an older format that is no longer used), or +’’sparse’’ extensions.</p> <p style="margin-top: 1em">V</p> @@ -1157,15 +1164,16 @@ This entry should generally be ignored on extraction.</p> <p style="margin-top: 1em"><i>magic</i></p> <p style="margin-left:17%; margin-top: 1em">The magic field -holds the five characters “ustar” followed by a -space. Note that POSIX ustar archives have a trailing -null.</p> +holds the five characters ’’ustar’’ +followed by a space. Note that POSIX ustar archives have a +trailing null.</p> <p style="margin-top: 1em"><i>version</i></p> <p style="margin-left:17%;">The version field holds a space character followed by a null. Note that POSIX ustar archives -use two copies of the ASCII digit “0”.</p> +use two copies of the ASCII digit +’’0’’.</p> <p style="margin-top: 1em"><i>atime</i>, <i>ctime</i></p> @@ -1192,10 +1200,10 @@ written to the file at appropriate offsets.</p> <p style="margin-top: 1em"><i>isextended</i></p> <p style="margin-left:17%;">If this is set to non-zero, the -header will be followed by additional “sparse -header” records. Each such record contains information -about as many as 21 additional sparse blocks as shown -here:</p> +header will be followed by additional ’’sparse +header’’ records. Each such record contains +information about as many as 21 additional sparse blocks as +shown here:</p> <p style="margin-left:24%; margin-top: 1em">struct gnu_sparse_header {</p> @@ -1280,49 +1288,52 @@ interchange format archives when you specify the format closely, using some <b>SCHILY</b> tags and introducing new keywords to store sparse file information. There have been three iterations of the sparse file support, -referred to as “0.0”, “0.1”, and -“1.0”.</p> +referred to as ’’0.0’’, +’’0.1’’, and +’’1.0’’.</p> <p style="margin-top: 1em"><b>GNU.sparse.numblocks</b>, <b>GNU.sparse.offset</b>, <b>GNU.sparse.numbytes</b>, <b>GNU.sparse.size</b></p> -<p style="margin-left:17%;">The “0.0” format -used an initial <b>GNU.sparse.numblocks</b> attribute to -indicate the number of blocks in the file, a pair of -<b>GNU.sparse.offset</b> and <b>GNU.sparse.numbytes</b> to -indicate the offset and size of each block, and a single -<b>GNU.sparse.size</b> to indicate the full size of the -file. This is not the same as the size in the tar header -because the latter value does not include the size of any -holes. This format required that the order of attributes be -preserved and relied on readers accepting multiple -appearances of the same attribute names, which is not -officially permitted by the standards.</p> +<p style="margin-left:17%;">The +’’0.0’’ format used an initial +<b>GNU.sparse.numblocks</b> attribute to indicate the number +of blocks in the file, a pair of <b>GNU.sparse.offset</b> +and <b>GNU.sparse.numbytes</b> to indicate the offset and +size of each block, and a single <b>GNU.sparse.size</b> to +indicate the full size of the file. This is not the same as +the size in the tar header because the latter value does not +include the size of any holes. This format required that the +order of attributes be preserved and relied on readers +accepting multiple appearances of the same attribute names, +which is not officially permitted by the standards.</p> <p style="margin-top: 1em"><b>GNU.sparse.map</b></p> -<p style="margin-left:17%;">The “0.1” format -used a single attribute that stored a comma-separated list -of decimal numbers. Each pair of numbers indicated the -offset and size, respectively, of a block of data. This does -not work well if the archive is extracted by an archiver -that does not recognize this extension, since many pax -implementations simply discard unrecognized attributes.</p> +<p style="margin-left:17%;">The +’’0.1’’ format used a single +attribute that stored a comma-separated list of decimal +numbers. Each pair of numbers indicated the offset and size, +respectively, of a block of data. This does not work well if +the archive is extracted by an archiver that does not +recognize this extension, since many pax implementations +simply discard unrecognized attributes.</p> <p style="margin-top: 1em"><b>GNU.sparse.major</b>, <b>GNU.sparse.minor</b>, <b>GNU.sparse.name</b>, <b>GNU.sparse.realsize</b></p> -<p style="margin-left:17%;">The “1.0” format -stores the sparse block map in one or more 512-byte blocks -prepended to the file data in the entry body. The pax -attributes indicate the existence of this map (via the -<b>GNU.sparse.major</b> and <b>GNU.sparse.minor</b> fields) -and the full size of the file. The <b>GNU.sparse.name</b> -holds the true name of the file. To avoid confusion, the -name stored in the regular tar header is a modified name so -that extraction errors will be apparent to users.</p> +<p style="margin-left:17%;">The +’’1.0’’ format stores the sparse +block map in one or more 512-byte blocks prepended to the +file data in the entry body. The pax attributes indicate the +existence of this map (via the <b>GNU.sparse.major</b> and +<b>GNU.sparse.minor</b> fields) and the full size of the +file. The <b>GNU.sparse.name</b> holds the true name of the +file. To avoid confusion, the name stored in the regular tar +header is a modified name so that extraction errors will be +apparent to users.</p> <p style="margin-left:6%; margin-top: 1em"><b>Solaris Tar</b> <br> @@ -1330,9 +1341,9 @@ XXX More Details Needed XXX</p> <p style="margin-left:6%; margin-top: 1em">Solaris tar (beginning with SunOS XXX 5.7 ?? XXX) supports an -“extended” format that is fundamentally similar -to pax interchange format, with the following -differences:</p> +’’extended’’ format that is +fundamentally similar to pax interchange format, with the +following differences:</p> <p><b>•</b></p> @@ -1369,17 +1380,17 @@ Tar</b> <br> The tar distributed with Apple’s Mac OS X stores most regular files as two separate files in the tar archive. The two files have the same name except that the first one has -“._” prepended to the last path element. This -special file stores an AppleDouble-encoded binary blob with -additional metadata about the second file, including ACL, -extended attributes, and resources. To recreate the original -file on disk, each separate file can be extracted and the -Mac OS X <b>copyfile</b>() function can be used to unpack -the separate metadata file and apply it to th regular file. -Conversely, the same function provides a “pack” -option to encode the extended metadata from a file into a -separate file whose contents can then be put into a tar -archive.</p> +’’._’’ prepended to the last path +element. This special file stores an AppleDouble-encoded +binary blob with additional metadata about the second file, +including ACL, extended attributes, and resources. To +recreate the original file on disk, each separate file can +be extracted and the Mac OS X <b>copyfile</b>() function can +be used to unpack the separate metadata file and apply it to +th regular file. Conversely, the same function provides a +’’pack’’ option to encode the +extended metadata from a file into a separate file whose +contents can then be put into a tar archive.</p> <p style="margin-left:6%; margin-top: 1em">Note that the Apple extended attributes interact badly with long @@ -1515,11 +1526,11 @@ interchange format per-file extensions.</p> <p style="margin-left:6%;">The <b>tar</b> utility is no longer a part of POSIX or the Single Unix Standard. It last appeared in Version 2 of the Single UNIX Specification -(“SUSv2”). It has been supplanted in subsequent -standards by pax(1). The ustar format is currently part of -the specification for the pax(1) utility. The pax -interchange file format is new with IEEE Std 1003.1-2001 -(“POSIX.1”).</p> +(’’SUSv2’’). It has been supplanted +in subsequent standards by pax(1). The ustar format is +currently part of the specification for the pax(1) utility. +The pax interchange file format is new with IEEE Std +1003.1-2001 (’’POSIX.1’’).</p> <p style="margin-top: 1em"><b>HISTORY</b></p> diff --git a/archivers/libarchive/files/doc/man/Makefile b/archivers/libarchive/files/doc/man/Makefile index 82bac3b1e91..1d56a6d7387 100644 --- a/archivers/libarchive/files/doc/man/Makefile +++ b/archivers/libarchive/files/doc/man/Makefile @@ -107,15 +107,15 @@ archive_write_set_passphrase.3: ../mdoc2man.awk ../../libarchive/archive_write_s cpio.5: ../mdoc2man.awk ../../libarchive/cpio.5 awk -f ../mdoc2man.awk < ../../libarchive/cpio.5 > cpio.5 +libarchive-formats.5: ../mdoc2man.awk ../../libarchive/libarchive-formats.5 + awk -f ../mdoc2man.awk < ../../libarchive/libarchive-formats.5 > libarchive-formats.5 + libarchive.3: ../mdoc2man.awk ../../libarchive/libarchive.3 awk -f ../mdoc2man.awk < ../../libarchive/libarchive.3 > libarchive.3 libarchive_changes.3: ../mdoc2man.awk ../../libarchive/libarchive_changes.3 awk -f ../mdoc2man.awk < ../../libarchive/libarchive_changes.3 > libarchive_changes.3 -libarchive-formats.5: ../mdoc2man.awk ../../libarchive/libarchive-formats.5 - awk -f ../mdoc2man.awk < ../../libarchive/libarchive-formats.5 > libarchive-formats.5 - libarchive_internals.3: ../mdoc2man.awk ../../libarchive/libarchive_internals.3 awk -f ../mdoc2man.awk < ../../libarchive/libarchive_internals.3 > libarchive_internals.3 @@ -130,4 +130,4 @@ bsdtar.1: ../mdoc2man.awk ../../tar/bsdtar.1 bsdcpio.1: ../mdoc2man.awk ../../cpio/bsdcpio.1 awk -f ../mdoc2man.awk < ../../cpio/bsdcpio.1 > bsdcpio.1 -all: archive_entry.3 archive_entry_acl.3 archive_entry_linkify.3 archive_entry_misc.3 archive_entry_paths.3 archive_entry_perms.3 archive_entry_stat.3 archive_entry_time.3 archive_read.3 archive_read_add_passphrase.3 archive_read_data.3 archive_read_disk.3 archive_read_extract.3 archive_read_filter.3 archive_read_format.3 archive_read_free.3 archive_read_header.3 archive_read_new.3 archive_read_open.3 archive_read_set_options.3 archive_util.3 archive_write.3 archive_write_blocksize.3 archive_write_data.3 archive_write_disk.3 archive_write_filter.3 archive_write_finish_entry.3 archive_write_format.3 archive_write_free.3 archive_write_header.3 archive_write_new.3 archive_write_open.3 archive_write_set_options.3 archive_write_set_passphrase.3 cpio.5 libarchive.3 libarchive_changes.3 libarchive-formats.5 libarchive_internals.3 mtree.5 tar.5 bsdtar.1 bsdcpio.1 +all: archive_entry.3 archive_entry_acl.3 archive_entry_linkify.3 archive_entry_misc.3 archive_entry_paths.3 archive_entry_perms.3 archive_entry_stat.3 archive_entry_time.3 archive_read.3 archive_read_add_passphrase.3 archive_read_data.3 archive_read_disk.3 archive_read_extract.3 archive_read_filter.3 archive_read_format.3 archive_read_free.3 archive_read_header.3 archive_read_new.3 archive_read_open.3 archive_read_set_options.3 archive_util.3 archive_write.3 archive_write_blocksize.3 archive_write_data.3 archive_write_disk.3 archive_write_filter.3 archive_write_finish_entry.3 archive_write_format.3 archive_write_free.3 archive_write_header.3 archive_write_new.3 archive_write_open.3 archive_write_set_options.3 archive_write_set_passphrase.3 cpio.5 libarchive-formats.5 libarchive.3 libarchive_changes.3 libarchive_internals.3 mtree.5 tar.5 bsdtar.1 bsdcpio.1 diff --git a/archivers/libarchive/files/doc/man/archive_entry.3 b/archivers/libarchive/files/doc/man/archive_entry.3 index 35f2d741edd..e6938a62f19 100644 --- a/archivers/libarchive/files/doc/man/archive_entry.3 +++ b/archivers/libarchive/files/doc/man/archive_entry.3 @@ -4,7 +4,7 @@ \fB\%archive_entry_clear\fP, \fB\%archive_entry_clone\fP, \fB\%archive_entry_free\fP, -\fB\%archive_entry_new\fP, +\fB\%archive_entry_new\fP \- functions for managing archive entry descriptions .SH LIBRARY .ad l @@ -121,14 +121,13 @@ using the current locale. Similarly, if you store a wide string and then store a narrow string for the same data, the previously-set wide string will be discarded in favor of the new data. -.PP .SH SEE ALSO .ad l \fBarchive_entry_acl\fP(3), \fBarchive_entry_paths\fP(3), \fBarchive_entry_perms\fP(3), -\fBarchive_entry_time\fP(3) -\fBlibarchive\fP(3), +\fBarchive_entry_time\fP(3), +\fBlibarchive\fP(3) .SH HISTORY .ad l The diff --git a/archivers/libarchive/files/doc/man/archive_entry_acl.3 b/archivers/libarchive/files/doc/man/archive_entry_acl.3 index 52c9b1c5751..06a104a4f0e 100644 --- a/archivers/libarchive/files/doc/man/archive_entry_acl.3 +++ b/archivers/libarchive/files/doc/man/archive_entry_acl.3 @@ -8,7 +8,6 @@ \fB\%archive_entry_acl_from_text\fP, \fB\%archive_entry_acl_from_text_w\fP, \fB\%archive_entry_acl_next\fP, -\fB\%archive_entry_acl_next_w\fP, \fB\%archive_entry_acl_reset\fP, \fB\%archive_entry_acl_to_text\fP, \fB\%archive_entry_acl_to_text_w\fP, @@ -51,10 +50,6 @@ Streaming Archive Library (libarchive, -larchive) .br \fIint\fP .br -\fB\%archive_entry_acl_next_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\ type\fP, \fI\%int\ *ret_type\fP, \fI\%int\ *ret_permset\fP, \fI\%int\ *ret_tag\fP, \fI\%int\ *ret_qual\fP, \fI\%const\ wchar_t\ **ret_name\fP); -.br -\fIint\fP -.br \fB\%archive_entry_acl_reset\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\ type\fP); .br \fIchar *\fP @@ -72,15 +67,16 @@ Streaming Archive Library (libarchive, -larchive) .ad l The ``Access Control Lists (ACLs)'' -extend the standard Unix perssion model. +extend the standard Unix permission model. The ACL interface of \fB\%libarchive\fP -supports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by +supports both POSIX.1e and NFSv4 style ACLs. +Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. .SS POSIX.1e Access Control Lists A POSIX.1e ACL consists of a number of independent entries. -Each entry specifies the permission set as bitmask of basic permissions. +Each entry specifies the permission set as a bitmask of basic permissions. Valid permissions in the are: .RS 5 @@ -102,13 +98,13 @@ The user specified by the name field. It .BR ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. It .BR ARCHIVE_ENTRY_ACL_GROUP -The group specied by the name field. +The group specified by the name field. It .BR ARCHIVE_ENTRY_ACL_GROUP_OBJ -The group who owns the file. +The group which owns the file. It .BR ARCHIVE_ENTRY_ACL_MASK The maximum permissions to be obtained via group permissions. It .BR ARCHIVE_ENTRY_ACL_OTHER -Any principal who is not file owner or a member of the owning group. +Any principal who is not the file owner or a member of the owning group. .RE .PP The principals @@ -119,12 +115,12 @@ and are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries. .PP -All files with have an access ACL +All files have an access ACL (.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS.) This specifies the permissions required for access to the file itself. Directories have an additional ACL (.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT,) -which controls the initial access ACL for newly created directory entries. +which controls the initial access ACL for newly-created directory entries. .SS NFSv4 Access Control Lists A NFSv4 ACL consists of multiple individual entries called Access Control Entries (ACEs). @@ -151,11 +147,11 @@ The user specified by the name field. It .BR ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. It .BR ARCHIVE_ENTRY_ACL_GROUP -The group specied by the name field. +The group specified by the name field. It .BR ARCHIVE_ENTRY_ACL_GROUP_OBJ -The group who owns the file. +The group which owns the file. It .BR ARCHIVE_ENTRY_ACL_EVERYONE -Any principal who is not file owner or a member of the owning group. +Any principal who is not the file owner or a member of the owning group. .RE .PP Entries with the @@ -167,9 +163,10 @@ string and optionally the user or group ID in the integer. .PP NFSv4 ACE permissions and flags are stored in the same -bitfield. Some permissions share the same constant and permission character but -have different effect on directories than on files. The following ACE -permissions are supported: +bitfield. +Some permissions share the same constant and permission character +but have different effect on directories than on files. +The following ACE permissions are supported: .RS 5 .TP .BR ARCHIVE_ENTRY_ACL_READ_DATA (.B r ) @@ -237,7 +234,8 @@ Inherit parent directory ACE to subdirectories. Only inherit, do not apply the permission on the directory itself. .TP .BR ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (.B n ) -Do not propagate inherit flags. Only first-level entries inherit ACLs. +Do not propagate inherit flags. +Only first-level entries inherit ACLs. .TP .BR ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (.B S ) Trigger alarm or audit on successful access. @@ -254,8 +252,8 @@ and \fB\%archive_entry_acl_add_entry_w\fP() add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions -are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL -entries. +are updated. +An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. .PP \fB\%archive_entry_acl_clear\fP() removes all ACL entries and resets the enumeration pointer. @@ -280,7 +278,8 @@ for POSIX.1e ACLs and .TP .BR ARCHIVE_ENTRY_ACL_TYPE_ALARM .RE -for NFSv4 ACLs. For POSIX.1e ACLs if +for NFSv4 ACLs. +For POSIX.1e ACLs if .BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non-extended ACLs are added. @@ -292,7 +291,8 @@ add new (or merge with existing) ACL entries from (wide) -text. The argument +text. +The argument may take one of the following values: .RS 5 .TP @@ -304,11 +304,13 @@ may take one of the following values: .RE Supports all formats that can be created with \fB\%archive_entry_acl_to_text\fP() -or respective +or respectively \fB\%archive_entry_acl_to_text_w\fP(). -Existing ACL entries are preserved. To get a clean new ACL from text +Existing ACL entries are preserved. +To get a clean new ACL from text \fB\%archive_entry_acl_clear\fP() -must be called first. Entries prefixed with +must be called first. +Entries prefixed with ``default:'' are treated as .BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT @@ -323,8 +325,6 @@ character are skipped. .PP \fB\%archive_entry_acl_next\fP() -and -\fB\%archive_entry_acl_next_w\fP() return the next entry of the ACL list. This functions may only be called after \fB\%archive_entry_acl_reset\fP() @@ -332,10 +332,8 @@ has indicated the presence of extended ACL entries. .PP \fB\%archive_entry_acl_reset\fP() prepare reading the list of ACL entries with -\fB\%archive_entry_acl_next\fP() -or -\fB\%archive_entry_acl_next_w\fP(). -The function returns either 0, if no non-extended ACLs are found. +\fB\%archive_entry_acl_next\fP(). +The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be obtained by \fBarchive_entry_mode\fP(3) or set using @@ -348,7 +346,8 @@ and \fB\%archive_entry_acl_to_text_w\fP() convert the ACL entries for the given type into a (wide) -string of ACL entries separated by newline. If the pointer +string of ACL entries separated by newline. +If the pointer is not NULL, then the function shall return the length of the string (not including the NULL terminator) in the location pointed to by @@ -401,7 +400,8 @@ are prefixed with ``default:''. .PP \fB\%archive_entry_acl_types\fP() -get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 +get ACL entry types contained in an archive entry's ACL. +As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries. .SH RETURN VALUES @@ -425,9 +425,7 @@ if all entries were successfully parsed and if one or more entries were invalid or non-parseable. .PP \fB\%archive_entry_acl_next\fP() -and -\fB\%archive_entry_acl_next_w\fP() -return +returns .BR ARCHIVE_OK on success, .BR ARCHIVE_EOF diff --git a/archivers/libarchive/files/doc/man/archive_entry_misc.3 b/archivers/libarchive/files/doc/man/archive_entry_misc.3 index 02a4bd309a0..6ce320bdef8 100644 --- a/archivers/libarchive/files/doc/man/archive_entry_misc.3 +++ b/archivers/libarchive/files/doc/man/archive_entry_misc.3 @@ -3,7 +3,7 @@ .ad l \fB\%archive_entry_symlink_type\fP, \fB\%archive_entry_set_symlink_type\fP -\- miscellaneous functions for manipulating properties of archive_entry. +\- miscellaneous functions for manipulating properties of archive_entry .SH LIBRARY .ad l Streaming Archive Library (libarchive, -larchive) @@ -24,7 +24,8 @@ The function \fB\%archive_entry_symlink_type\fP() returns and the function \fB\%archive_entry_set_symlink_type\fP() -sets the type of the symbolic link stored in an archive entry. These functions +sets the type of the symbolic link stored in an archive entry. +These functions have special meaning on operating systems that support multiple symbolic link types (e.g. Microsoft Windows). .PP diff --git a/archivers/libarchive/files/doc/man/archive_entry_paths.3 b/archivers/libarchive/files/doc/man/archive_entry_paths.3 index 2468825ee56..3aa1c726b5c 100644 --- a/archivers/libarchive/files/doc/man/archive_entry_paths.3 +++ b/archivers/libarchive/files/doc/man/archive_entry_paths.3 @@ -167,7 +167,7 @@ The accessor functions are named .TP UTF-8 Unicode strings encoded as UTF-8. -This are convience functions to update both the multibyte and wide +These are convenience functions to update both the multibyte and wide character strings at the same time. .RE .PP @@ -175,14 +175,14 @@ The sourcepath is a pure filesystem concept and never stored in an archive directly. .PP For that reason, it is only available as multibyte string. -The link path is a convience function for conditionally setting +The link path is a convenience function for conditionally setting hardlink or symlink destination. It doesn't have a corresponding get accessor function. .PP \fB\%archive_entry_set_XXX\fP() -is an alias for +is an alias for \fB\%archive_entry_copy_XXX\fP(). .SH SEE ALSO .ad l -\fBarchive_entry\fP(3) -\fBlibarchive\fP(3), +\fBarchive_entry\fP(3), +\fBlibarchive\fP(3) diff --git a/archivers/libarchive/files/doc/man/archive_entry_perms.3 b/archivers/libarchive/files/doc/man/archive_entry_perms.3 index 94be16b9a1b..3660b5146b8 100644 --- a/archivers/libarchive/files/doc/man/archive_entry_perms.3 +++ b/archivers/libarchive/files/doc/man/archive_entry_perms.3 @@ -143,7 +143,7 @@ The corresponding functions and \fB\%archive_entry_set_perm\fP() store the given user id, group id and permission in the entry. -The permission is also set as side effect of calling +The permission is also set as a side effect of calling \fB\%archive_entry_set_mode\fP(). .PP \fB\%archive_entry_strmode\fP() @@ -163,12 +163,12 @@ The accessor functions are named .TP UTF-8 Unicode strings encoded as UTF-8. -This are convience functions to update both the multibyte and wide +These are convenience functions to update both the multibyte and wide character strings at the same time. .RE .PP \fB\%archive_entry_set_XXX\fP() -is an alias for +is an alias for \fB\%archive_entry_copy_XXX\fP(). .SS File Flags File flags are transparently converted between a bitmap @@ -202,7 +202,7 @@ The \fB\%archive_entry_copy_fflags_text\fP() and \fB\%archive_entry_copy_fflags_text_w\fP() -functions parse the provided text and sets the internal bitmap values. +functions parse the provided text and set the internal bitmap values. This is a platform-specific operation; names that are not meaningful on the current platform will be ignored. The function returns a pointer to the start of the first name that was not @@ -218,8 +218,8 @@ which stops parsing at the first unrecognized name.) \fBarchive_entry\fP(3), \fBarchive_entry_acl\fP(3), \fBarchive_read_disk\fP(3), -\fBarchive_write_disk\fP(3) -\fBlibarchive\fP(3), +\fBarchive_write_disk\fP(3), +\fBlibarchive\fP(3) .SH BUGS .ad l The platform types diff --git a/archivers/libarchive/files/doc/man/archive_entry_stat.3 b/archivers/libarchive/files/doc/man/archive_entry_stat.3 index 5b58c0e67ef..b482782bf48 100644 --- a/archivers/libarchive/files/doc/man/archive_entry_stat.3 +++ b/archivers/libarchive/files/doc/man/archive_entry_stat.3 @@ -29,7 +29,7 @@ \fB\%archive_entry_rdevmajor\fP, \fB\%archive_entry_set_rdevmajor\fP, \fB\%archive_entry_rdevminor\fP, -\fB\%archive_entry_set_rdevminor\fP, +\fB\%archive_entry_set_rdevminor\fP \- accessor functions for manipulating archive entry descriptions .SH LIBRARY .ad l @@ -260,9 +260,9 @@ and set and unset the size, respectively. .PP The number of references (hardlinks) can be obtained by calling -\fB\%archive_entry_nlinks\fP() +\fB\%archive_entry_nlink\fP() and set with -\fB\%archive_entry_set_nlinks\fP(). +\fB\%archive_entry_set_nlink\fP(). .SS Identifying unique files The functions \fB\%archive_entry_dev\fP() @@ -313,8 +313,8 @@ Some archive formats use the combined form, while other formats use the split form. .SH SEE ALSO .ad l +\fBstat\fP(2), \fBarchive_entry_acl\fP(3), \fBarchive_entry_perms\fP(3), \fBarchive_entry_time\fP(3), -\fBlibarchive\fP(3), -\fBstat\fP(2) +\fBlibarchive\fP(3) diff --git a/archivers/libarchive/files/doc/man/archive_entry_time.3 b/archivers/libarchive/files/doc/man/archive_entry_time.3 index 3da7279ecc6..77f78f07470 100644 --- a/archivers/libarchive/files/doc/man/archive_entry_time.3 +++ b/archivers/libarchive/files/doc/man/archive_entry_time.3 @@ -20,7 +20,7 @@ \fB\%archive_entry_mtime_nsec\fP, \fB\%archive_entry_mtime_is_set\fP, \fB\%archive_entry_set_mtime\fP, -\fB\%archive_entry_unset_mtime\fP, +\fB\%archive_entry_unset_mtime\fP \- functions for manipulating times in archive entry descriptions .SH LIBRARY .ad l @@ -129,8 +129,8 @@ The current state can be queried using Unset time fields have a second and nanosecond field of 0. .SH SEE ALSO .ad l -\fBarchive_entry\fP(3) -\fBlibarchive\fP(3), +\fBarchive_entry\fP(3), +\fBlibarchive\fP(3) .SH HISTORY .ad l The diff --git a/archivers/libarchive/files/doc/man/archive_read.3 b/archivers/libarchive/files/doc/man/archive_read.3 index 84fb89f086f..18fd3e4a81b 100644 --- a/archivers/libarchive/files/doc/man/archive_read.3 +++ b/archivers/libarchive/files/doc/man/archive_read.3 @@ -124,7 +124,7 @@ should call to close the archive, then call \fB\%archive_read_free\fP() to release all resources, including all memory allocated by the library. -.SH EXAMPLE +.SH EXAMPLES .ad l The following illustrates basic usage of the library. In this example, @@ -181,16 +181,16 @@ myclose(struct archive *a, void *client_data) .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), -\fBarchive_read_new\fP(3), \fBarchive_read_data\fP(3), \fBarchive_read_extract\fP(3), \fBarchive_read_filter\fP(3), \fBarchive_read_format\fP(3), \fBarchive_read_header\fP(3), +\fBarchive_read_new\fP(3), \fBarchive_read_open\fP(3), \fBarchive_read_set_options\fP(3), \fBarchive_util\fP(3), +\fBlibarchive\fP(3), \fBtar\fP(5) .SH HISTORY .ad l diff --git a/archivers/libarchive/files/doc/man/archive_read_add_passphrase.3 b/archivers/libarchive/files/doc/man/archive_read_add_passphrase.3 index 2b7f3f1c194..054fa79e5db 100644 --- a/archivers/libarchive/files/doc/man/archive_read_add_passphrase.3 +++ b/archivers/libarchive/files/doc/man/archive_read_add_passphrase.3 @@ -33,17 +33,17 @@ or empty, this function will do nothing and will be returned. Otherwise, \fBARCHIVE_OK\fP -will be returned. +will be returned. .TP \fB\%archive_read_set_passphrase_callback\fP() -Register callback function that will be invoked to get a passphrase -for decrption after trying all passphrases registered by the +Register a callback function that will be invoked to get a passphrase +for decryption after trying all the passphrases registered by the \fB\%archive_read_add_passphrase\fP() function failed. .RE .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_read\fP(3), -\fBarchive_read_set_options\fP(3) +\fBarchive_read_set_options\fP(3), +\fBlibarchive\fP(3) diff --git a/archivers/libarchive/files/doc/man/archive_read_data.3 b/archivers/libarchive/files/doc/man/archive_read_data.3 index 4f0d8ce1567..c0e9bfa8598 100644 --- a/archivers/libarchive/files/doc/man/archive_read_data.3 +++ b/archivers/libarchive/files/doc/man/archive_read_data.3 @@ -1,7 +1,7 @@ .TH ARCHIVE_READ_DATA 3 "February 2, 2012" "" .SH NAME .ad l -\fB\%archive_read_data\fP +\fB\%archive_read_data\fP, \fB\%archive_read_data_block\fP, \fB\%archive_read_data_skip\fP, \fB\%archive_read_data_into_fd\fP @@ -100,7 +100,6 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_read\fP(3), \fBarchive_read_extract\fP(3), \fBarchive_read_filter\fP(3), @@ -109,4 +108,5 @@ functions. \fBarchive_read_open\fP(3), \fBarchive_read_set_options\fP(3), \fBarchive_util\fP(3), +\fBlibarchive\fP(3), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_read_disk.3 b/archivers/libarchive/files/doc/man/archive_read_disk.3 index 130db8a5331..bd025374ac9 100644 --- a/archivers/libarchive/files/doc/man/archive_read_disk.3 +++ b/archivers/libarchive/files/doc/man/archive_read_disk.3 @@ -85,10 +85,11 @@ following values: .TP \fBARCHIVE_READDISK_HONOR_NODUMP\fP Skip files and directories with the nodump file attribute (file flag) set. -By default, the nodump file atrribute is ignored. +By default, the nodump file attribute is ignored. .TP \fBARCHIVE_READDISK_MAC_COPYFILE\fP -Mac OS X specific. Read metadata (ACLs and extended attributes) with +Mac OS X specific. +Read metadata (ACLs and extended attributes) with \fBcopyfile\fP(3). By default, metadata is read using \fBcopyfile\fP(3). @@ -110,7 +111,7 @@ for more information on file attributes. .TP \fBARCHIVE_READDISK_NO_TRAVERSE_MOUNTS\fP Do not traverse mount points. -By defaut, moint points are traversed. +By default, mount points are traversed. .TP \fBARCHIVE_READDISK_NO_XATTR\fP Do not read extended file attributes (xattrs). @@ -207,7 +208,7 @@ of some other operation. (For example, directory traversal libraries often provide this information.) .PP Where necessary, user and group ids are converted to user and group names -using the currently registered lookup functions above. +using the currently-registered lookup functions above. This affects the file ownership fields and ACL values in the Tn struct archive_entry object. @@ -217,7 +218,7 @@ More information about the object and the overall design of the library can be found in the \fBlibarchive\fP(3) overview. -.SH EXAMPLE +.SH EXAMPLES .ad l The following illustrates basic usage of the library by showing how to use it to copy an item on disk into an archive. @@ -284,11 +285,11 @@ and functions. .SH SEE ALSO .ad l +\fBtar\fP(1), \fBarchive_read\fP(3), \fBarchive_util\fP(3), \fBarchive_write\fP(3), \fBarchive_write_disk\fP(3), -\fBtar\fP(1), \fBlibarchive\fP(3) .SH HISTORY .ad l diff --git a/archivers/libarchive/files/doc/man/archive_read_extract.3 b/archivers/libarchive/files/doc/man/archive_read_extract.3 index 58f0f6e289a..1fb057bcf6e 100644 --- a/archivers/libarchive/files/doc/man/archive_read_extract.3 +++ b/archivers/libarchive/files/doc/man/archive_read_extract.3 @@ -101,7 +101,6 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_read\fP(3), \fBarchive_read_data\fP(3), \fBarchive_read_filter\fP(3), @@ -109,4 +108,5 @@ functions. \fBarchive_read_open\fP(3), \fBarchive_read_set_options\fP(3), \fBarchive_util\fP(3), +\fBlibarchive\fP(3), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_read_filter.3 b/archivers/libarchive/files/doc/man/archive_read_filter.3 index 9a54a88a4a0..3a12af00827 100644 --- a/archivers/libarchive/files/doc/man/archive_read_filter.3 +++ b/archivers/libarchive/files/doc/man/archive_read_filter.3 @@ -145,8 +145,8 @@ and functions. .SH SEE ALSO .ad l -\fBlibarchive\fP(3), \fBarchive_read\fP(3), \fBarchive_read_data\fP(3), \fBarchive_read_format\fP(3), -\fBarchive_read_format\fP(3) +\fBarchive_read_format\fP(3), +\fBlibarchive\fP(3) diff --git a/archivers/libarchive/files/doc/man/archive_read_format.3 b/archivers/libarchive/files/doc/man/archive_read_format.3 index 548fc001f47..9bd564d2184 100644 --- a/archivers/libarchive/files/doc/man/archive_read_format.3 +++ b/archivers/libarchive/files/doc/man/archive_read_format.3 @@ -160,11 +160,11 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_read_data\fP(3), \fBarchive_read_filter\fP(3), \fBarchive_read_set_options\fP(3), \fBarchive_util\fP(3), +\fBlibarchive\fP(3), \fBtar\fP(5) .SH BUGS .ad l diff --git a/archivers/libarchive/files/doc/man/archive_read_free.3 b/archivers/libarchive/files/doc/man/archive_read_free.3 index 471d3d8faca..559b205b72b 100644 --- a/archivers/libarchive/files/doc/man/archive_read_free.3 +++ b/archivers/libarchive/files/doc/man/archive_read_free.3 @@ -68,11 +68,11 @@ and functions. .SH SEE ALSO .ad l -\fBlibarchive\fP(3), -\fBarchive_read_new\fP(3), \fBarchive_read_data\fP(3), \fBarchive_read_filter\fP(3), \fBarchive_read_format\fP(3), +\fBarchive_read_new\fP(3), \fBarchive_read_open\fP(3), \fBarchive_read_set_options\fP(3), -\fBarchive_util\fP(3) +\fBarchive_util\fP(3), +\fBlibarchive\fP(3) diff --git a/archivers/libarchive/files/doc/man/archive_read_header.3 b/archivers/libarchive/files/doc/man/archive_read_header.3 index de8b2a4aa9d..f13c53abe52 100644 --- a/archivers/libarchive/files/doc/man/archive_read_header.3 +++ b/archivers/libarchive/files/doc/man/archive_read_header.3 @@ -60,7 +60,6 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_read\fP(3), \fBarchive_read_data\fP(3), \fBarchive_read_extract\fP(3), @@ -69,4 +68,5 @@ functions. \fBarchive_read_open\fP(3), \fBarchive_read_set_options\fP(3), \fBarchive_util\fP(3), +\fBlibarchive\fP(3), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_read_new.3 b/archivers/libarchive/files/doc/man/archive_read_new.3 index 0505a2c728f..8ad9a0980ce 100644 --- a/archivers/libarchive/files/doc/man/archive_read_new.3 +++ b/archivers/libarchive/files/doc/man/archive_read_new.3 @@ -28,10 +28,10 @@ object can be found in the overview manual page for .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_read_data\fP(3), \fBarchive_read_filter\fP(3), \fBarchive_read_format\fP(3), \fBarchive_read_set_options\fP(3), \fBarchive_util\fP(3), +\fBlibarchive\fP(3), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_read_open.3 b/archivers/libarchive/files/doc/man/archive_read_open.3 index c22c17434cd..caf0b57c8e0 100644 --- a/archivers/libarchive/files/doc/man/archive_read_open.3 +++ b/archivers/libarchive/files/doc/man/archive_read_open.3 @@ -178,7 +178,7 @@ On failure, the callback should invoke \fB\%archive_set_error\fP() to register an error code and message and return -\fBARCHIVE_FATAL.\fP +\fBARCHIVE_FATAL\fP. .SH RETURN VALUES .ad l These functions return @@ -195,11 +195,11 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_read\fP(3), \fBarchive_read_data\fP(3), \fBarchive_read_filter\fP(3), \fBarchive_read_format\fP(3), \fBarchive_read_set_options\fP(3), \fBarchive_util\fP(3), +\fBlibarchive\fP(3), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_read_set_options.3 b/archivers/libarchive/files/doc/man/archive_read_set_options.3 index fa7904a705c..a1c321febcd 100644 --- a/archivers/libarchive/files/doc/man/archive_read_set_options.3 +++ b/archivers/libarchive/files/doc/man/archive_read_set_options.3 @@ -1,4 +1,4 @@ -.TH ARCHIVE_READ_OPTIONS 3 "February 2, 2012" "" +.TH ARCHIVE_READ_OPTIONS 3 "January 31, 2020" "" .SH NAME .ad l \fB\%archive_read_set_filter_option\fP, @@ -145,6 +145,22 @@ only to modules whose name matches .ad l .RS 5 .TP +Format cab +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file names. +.RE +.TP +Format cpio +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file names. +.RE +.TP Format iso9660 .RS 5 .TP @@ -161,6 +177,30 @@ Defaults to enabled, use to disable. .RE .TP +Format lha +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file names. +.RE +.TP +Format mtree +.RS 5 +.TP +\fBcheckfs\fP +Allow reading information missing from the mtree from the file system. +Disabled by default. +.RE +.TP +Format rar +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file names. +.RE +.TP Format tar .RS 5 .TP @@ -172,7 +212,7 @@ so that such archives can be read correctly. .TP \fBhdrcharset\fP The value is used as a character set name that will be -used when translating filenames. +used when translating file names. .TP \fBmac-ext\fP Support Mac OS metadata extension that records data in special @@ -184,7 +224,8 @@ to disable. .TP \fBread_concatenated_archives\fP Ignore zeroed blocks in the archive, which occurs when multiple tar archives -have been concatenated together. Without this option, only the contents of +have been concatenated together. +Without this option, only the contents of the first concatenated archive would be read. .RE .RE @@ -198,6 +239,6 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), +\fBarchive_read\fP(3), \fBarchive_write_set_options\fP(3), -\fBarchive_read\fP(3) +\fBlibarchive\fP(3) diff --git a/archivers/libarchive/files/doc/man/archive_util.3 b/archivers/libarchive/files/doc/man/archive_util.3 index 42f08f4409c..08b1c95ea5e 100644 --- a/archivers/libarchive/files/doc/man/archive_util.3 +++ b/archivers/libarchive/files/doc/man/archive_util.3 @@ -93,11 +93,11 @@ Not generally used in client code. .TP \fB\%archive_compression\fP() Synonym for -\fB\%archive_filter_code(a,\fP(\fI\%0)\fP). +\fB\%archive_filter_code\fP(\fI\%a\fP, \fI\%0\fP). .TP \fB\%archive_compression_name\fP() Synonym for -\fB\%archive_filter_name(a,\fP(\fI\%0)\fP). +\fB\%archive_filter_name\fP(\fI\%a\fP, \fI\%0\fP). .TP \fB\%archive_copy_error\fP() Copies error information from one archive to another. @@ -150,13 +150,13 @@ filter 0 is the gunzip filter, filter 1 is the uudecode filter, and filter 2 is the pseudo-filter that wraps the archive read functions. In this case, requesting -\fB\%archive_position(a,\fP(\fI\%-1)\fP) +\fB\%archive_position\fP(\fI\%a\fP, \fI\%-1\fP) would be a synonym for -\fB\%archive_position(a,\fP(\fI\%2)\fP) +\fB\%archive_position\fP(\fI\%a\fP, \fI\%2\fP) which would return the number of bytes currently read from the archive, while -\fB\%archive_position(a,\fP(\fI\%1)\fP) +\fB\%archive_position\fP(\fI\%a\fP, \fI\%1\fP) would return the number of bytes after uudecoding, and -\fB\%archive_position(a,\fP(\fI\%0)\fP) +\fB\%archive_position\fP(\fI\%a\fP, \fI\%0\fP) would return the number of bytes after decompression. .TP \fB\%archive_filter_name\fP() @@ -182,9 +182,9 @@ A textual description of the format of the current entry. \fB\%archive_position\fP() Returns the number of bytes read from or written to the indicated filter. In particular, -\fB\%archive_position(a,\fP(\fI\%0)\fP) +\fB\%archive_position\fP(\fI\%a\fP, \fI\%0\fP) returns the number of bytes read or written by the format handler, while -\fB\%archive_position(a,\fP(\fI\%-1)\fP) +\fB\%archive_position\fP(\fI\%a\fP, \fI\%-1\fP) returns the number of bytes read or written to the archive. See \fB\%archive_filter_count\fP() diff --git a/archivers/libarchive/files/doc/man/archive_write.3 b/archivers/libarchive/files/doc/man/archive_write.3 index 76e7d508493..af64b7971c1 100644 --- a/archivers/libarchive/files/doc/man/archive_write.3 +++ b/archivers/libarchive/files/doc/man/archive_write.3 @@ -87,7 +87,7 @@ See After all entries have been written, use the \fB\%archive_write_free\fP() function to release all resources. -.SH EXAMPLE +.SH EXAMPLES .ad l The following sketch illustrates basic usage of the library. In this example, @@ -154,7 +154,7 @@ write_archive(const char *outname, const char **filename) if (archive_write_set_format_filter_by_ext(a, outname) != ARCHIVE_OK) { archive_write_add_filter_gzip(a); archive_write_set_format_ustar(a); - } + } archive_write_open(a, mydata, myopen, mywrite, myclose); while (*filename) { stat(*filename, &st); @@ -187,8 +187,8 @@ int main(int argc, const char **argv) .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBmtree\fP(5), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_write_blocksize.3 b/archivers/libarchive/files/doc/man/archive_write_blocksize.3 index 9d99a7d5870..5502bbed36f 100644 --- a/archivers/libarchive/files/doc/man/archive_write_blocksize.3 +++ b/archivers/libarchive/files/doc/man/archive_write_blocksize.3 @@ -97,8 +97,8 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBmtree\fP(5), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_write_data.3 b/archivers/libarchive/files/doc/man/archive_write_data.3 index 9ea9be413dd..060083e7261 100644 --- a/archivers/libarchive/files/doc/man/archive_write_data.3 +++ b/archivers/libarchive/files/doc/man/archive_write_data.3 @@ -63,9 +63,9 @@ and consider any non-negative value as success. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write_finish_entry\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBmtree\fP(5), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_write_disk.3 b/archivers/libarchive/files/doc/man/archive_write_disk.3 index ffc14930bbc..a4ee482b7ef 100644 --- a/archivers/libarchive/files/doc/man/archive_write_disk.3 +++ b/archivers/libarchive/files/doc/man/archive_write_disk.3 @@ -1,4 +1,4 @@ -.TH ARCHIVE_WRITE_DISK 3 "April 3, 2017" "" +.TH ARCHIVE_WRITE_DISK 3 "January 19, 2020" "" .SH NAME .ad l \fB\%archive_write_disk_new\fP, @@ -98,7 +98,8 @@ or for more information on file attributes. .TP \fBARCHIVE_EXTRACT_MAC_METADATA\fP -Mac OS X specific. Restore metadata using +Mac OS X specific. +Restore metadata using \fBcopyfile\fP(3). By default, \fBcopyfile\fP(3) @@ -127,6 +128,12 @@ if the default user and group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed. .TP +\fBARCHIVE_EXTRACT_SAFE_WRITES\fP +Extract files atomically, by first creating a unique temporary file and then +renaming it to its required destination name. +This avoids a race where an application might see a partial file (or no +file) during extraction. +.TP \fBARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS\fP Refuse to extract an absolute path. The default is to not refuse such paths. @@ -262,9 +269,9 @@ and functions. .SH SEE ALSO .ad l +\fBtar\fP(1), \fBarchive_read\fP(3), \fBarchive_write\fP(3), -\fBtar\fP(1), \fBlibarchive\fP(3) .SH HISTORY .ad l diff --git a/archivers/libarchive/files/doc/man/archive_write_filter.3 b/archivers/libarchive/files/doc/man/archive_write_filter.3 index 98f75ac38ce..65244edde12 100644 --- a/archivers/libarchive/files/doc/man/archive_write_filter.3 +++ b/archivers/libarchive/files/doc/man/archive_write_filter.3 @@ -16,7 +16,7 @@ \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_zstd\fP, +\fB\%archive_write_add_filter_zstd\fP \- functions enabling output filters .SH LIBRARY .ad l @@ -132,10 +132,10 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write\fP(3), \fBarchive_write_format\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBmtree\fP(5), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_write_finish_entry.3 b/archivers/libarchive/files/doc/man/archive_write_finish_entry.3 index 4523f232448..a8f7f7c49ad 100644 --- a/archivers/libarchive/files/doc/man/archive_write_finish_entry.3 +++ b/archivers/libarchive/files/doc/man/archive_write_finish_entry.3 @@ -49,9 +49,9 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write_data\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBmtree\fP(5), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_write_format.3 b/archivers/libarchive/files/doc/man/archive_write_format.3 index 5c0e25a370f..80ed63d7fda 100644 --- a/archivers/libarchive/files/doc/man/archive_write_format.3 +++ b/archivers/libarchive/files/doc/man/archive_write_format.3 @@ -25,7 +25,7 @@ \fB\%archive_write_set_format_v7tar\fP, \fB\%archive_write_set_format_warc\fP, \fB\%archive_write_set_format_xar\fP, -\fB\%archive_write_set_format_zip\fP, +\fB\%archive_write_set_format_zip\fP \- functions for creating archives .SH LIBRARY .ad l @@ -188,9 +188,9 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBlibarchive-formats\fP(5), \fBmtree\fP(5), diff --git a/archivers/libarchive/files/doc/man/archive_write_free.3 b/archivers/libarchive/files/doc/man/archive_write_free.3 index e28129c7af7..efda9aaaa81 100644 --- a/archivers/libarchive/files/doc/man/archive_write_free.3 +++ b/archivers/libarchive/files/doc/man/archive_write_free.3 @@ -41,7 +41,7 @@ after calling this function, the only call that can succeed is to release the resources. This can be used to speed recovery when the archive creation must be aborted. -Note that the created archive is likely to be malformed in this case; +Note that the created archive is likely to be malformed in this case; .TP \fB\%archive_write_close\fP() Complete the archive and invoke the close callback. @@ -77,8 +77,8 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBmtree\fP(5), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_write_header.3 b/archivers/libarchive/files/doc/man/archive_write_header.3 index 615129f12e7..941ecef00f9 100644 --- a/archivers/libarchive/files/doc/man/archive_write_header.3 +++ b/archivers/libarchive/files/doc/man/archive_write_header.3 @@ -44,8 +44,8 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBmtree\fP(5), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_write_new.3 b/archivers/libarchive/files/doc/man/archive_write_new.3 index 361eb2b3b8e..c5969a3b292 100644 --- a/archivers/libarchive/files/doc/man/archive_write_new.3 +++ b/archivers/libarchive/files/doc/man/archive_write_new.3 @@ -28,9 +28,9 @@ object can be found in the overview manual page for .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBmtree\fP(5), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_write_open.3 b/archivers/libarchive/files/doc/man/archive_write_open.3 index 6303c083d35..ab76795963d 100644 --- a/archivers/libarchive/files/doc/man/archive_write_open.3 +++ b/archivers/libarchive/files/doc/man/archive_write_open.3 @@ -176,7 +176,7 @@ On failure, the callback should invoke \fB\%archive_set_error\fP() to register an error code and message and return -\fBARCHIVE_FATAL.\fP +\fBARCHIVE_FATAL\fP. .PP Note that if the client-provided write callback function returns a non-zero value, that error will be propagated back to the caller @@ -210,13 +210,13 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write\fP(3), \fBarchive_write_blocksize\fP(3), \fBarchive_write_filter\fP(3), \fBarchive_write_format\fP(3), \fBarchive_write_new\fP(3), \fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3), \fBcpio\fP(5), \fBmtree\fP(5), \fBtar\fP(5) diff --git a/archivers/libarchive/files/doc/man/archive_write_set_options.3 b/archivers/libarchive/files/doc/man/archive_write_set_options.3 index 43b41a7a98c..f81c076833a 100644 --- a/archivers/libarchive/files/doc/man/archive_write_set_options.3 +++ b/archivers/libarchive/files/doc/man/archive_write_set_options.3 @@ -1,4 +1,4 @@ -.TH ARCHIVE_WRITE_OPTIONS 3 "February 2, 2012" "" +.TH ARCHIVE_WRITE_OPTIONS 3 "January 31, 2020" "" .SH NAME .ad l \fB\%archive_write_set_filter_option\fP, @@ -35,7 +35,7 @@ specific write modules. .TP \fB\%archive_write_set_filter_option\fP(), \fB\%archive_write_set_format_option\fP() -Specifies an option that will be passed to currently-registered +Specifies an option that will be passed to the currently-registered filters (including decompression filters) or format readers. .PP If @@ -103,7 +103,7 @@ If either function returns \fBARCHIVE_FATAL\fP will be returned immediately. -Otherwise, greater of the two values will be returned. +Otherwise, the greater of the two values will be returned. .TP \fB\%archive_write_set_options\fP() \fIoptions\fP @@ -140,12 +140,96 @@ only to modules whose name matches .ad l .RS 5 .TP +Filter b64encode +.RS 5 +.TP +\fBmode\fP +The value is interpreted as octal digits specifying the file mode. +.TP +\fBname\fP +The value specifies the file name. +.RE +.TP +Filter bzip2 +.RS 5 +.TP +\fBcompression-level\fP +The value is interpreted as a decimal integer specifying the +bzip2 compression level. Supported values are from 1 to 9. +.RE +.TP Filter gzip .RS 5 .TP \fBcompression-level\fP The value is interpreted as a decimal integer specifying the -gzip compression level. +gzip compression level. Supported values are from 0 to 9. +.TP +\fBtimestamp\fP +Store timestamp. This is enabled by default. +.RE +.TP +Filter lrzip +.RS 5 +.TP +\fBcompression\fP=\fItype\fP +Use +\fItype\fP +as compression method. +Supported values are +``bzip2'', +``gzipi'', +``lzo'' +(ultra fast,) +and +``zpaq'' +(best, extremely slow.) +.TP +\fBcompression-level\fP +The value is interpreted as a decimal integer specifying the +lrzip compression level. Supported values are from 1 to 9. +.RE +.TP +Filter lz4 +.RS 5 +.TP +\fBcompression-level\fP +The value is interpreted as a decimal integer specifying the +lz4 compression level. Supported values are from 0 to 9. +.TP +\fBstream-checksum\fP +Enable stream checksum. This is enabled by default. +.TP +\fBblock-checksum\fP +Enable block checksum. This is disabled by default. +.TP +\fBblock-size\fP +The value is interpreted as a decimal integer specifying the +lz4 compression block size. Supported values are from 4 to 7 +(default.) +.TP +\fBblock-dependence\fP +Use the previous block of the block being compressed for +a compression dictionary to improve compression ratio. +This is disabled by default. +.RE +.TP +Filter lzop +.RS 5 +.TP +\fBcompression-level\fP +The value is interpreted as a decimal integer specifying the +lzop compression level. Supported values are from 1 to 9. +.RE +.TP +Filter uuencode +.RS 5 +.TP +\fBmode\fP +The value is interpreted as octal digits specifying the file mode. +.TP +\fBname\fP +The value specifies the file name. .RE .TP Filter xz @@ -153,28 +237,62 @@ Filter xz .TP \fBcompression-level\fP The value is interpreted as a decimal integer specifying the -compression level. +compression level. Supported values are from 0 to 9. +.TP +\fBthreads\fP +The value is interpreted as a decimal integer specifying the +number of threads for multi-threaded lzma compression. +If supported, the default value is read from +\fB\%lzma_cputhreads\fP(). .RE .TP -Format mtree +Filter zstd .RS 5 .TP -\fBcksum\fP, \fBdevice\fP, \fBflags\fP, \fBgid\fP, \fBgname\fP, \fBindent\fP, \fBlink\fP, \fBmd5\fP, \fBmode\fP, \fBnlink\fP, \fBrmd160\fP, \fBsha1\fP, \fBsha256\fP, \fBsha384\fP, \fBsha512\fP, \fBsize\fP, \fBtime\fP, \fBuid\fP, \fBuname\fP -Enable a particular keyword in the mtree output. -Prefix with an exclamation mark to disable the corresponding keyword. -The default is equivalent to -``device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname''. +\fBcompression-level\fP +The value is interpreted as a decimal integer specifying the +compression level. Supported values depend on the library version, +common values are from 1 to 22. +.RE .TP -\fBall\fP -Enables all of the above keywords. +Format 7zip +.RS 5 .TP -\fBuse-set\fP -Enables generation of -\fB/set\fP -lines that specify default values for the following files and/or directories. +\fBcompression\fP +The value is one of +``store'', +``deflate'', +``bzip2'', +``lzma1'', +``lzma2'' +or +``ppmd'' +to indicate how the following entries should be compressed. +Note that this setting is ignored for directories, symbolic links, +and other special entries. .TP -\fBindent\fP -XXX needs explanation XXX +\fBcompression-level\fP +The value is interpreted as a decimal integer specifying the +compression level. +Values between 0 and 9 are supported. +The interpretation of the compression level depends on the chosen +compression method. +.RE +.TP +Format cpio +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file names. +.RE +.TP +Format gnutar +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file, group and user names. .RE .TP Format iso9660 - volume metadata @@ -183,27 +301,33 @@ These options are used to set standard ISO9660 metadata. .TP \fBabstract-file\fP=\fIfilename\fP The file with the specified name will be identified in the ISO9660 metadata -as holding the abstract for this volume. Default: none. +as holding the abstract for this volume. +Default: none. .TP \fBapplication-id\fP=\fIfilename\fP The file with the specified name will be identified in the ISO9660 metadata -as holding the application identifier for this volume. Default: none. +as holding the application identifier for this volume. +Default: none. .TP \fBbiblio-file\fP=\fIfilename\fP The file with the specified name will be identified in the ISO9660 metadata -as holding the bibliography for this volume. Default: none. +as holding the bibliography for this volume. +Default: none. .TP \fBcopyright-file\fP=\fIfilename\fP The file with the specified name will be identified in the ISO9660 metadata -as holding the copyright for this volume. Default: none. +as holding the copyright for this volume. +Default: none. .TP \fBpublisher\fP=\fIfilename\fP The file with the specified name will be identified in the ISO9660 metadata -as holding the publisher information for this volume. Default: none. +as holding the publisher information for this volume. +Default: none. .TP \fBvolume-id\fP=\fIstring\fP The specified string will be used as the Volume Identifier in the ISO9660 metadata. -It is limited to 32 bytes. Default: none. +It is limited to 32 bytes. +Default: none. .RE .TP Format iso9660 - boot support @@ -258,7 +382,7 @@ If the boot image is exactly 1.2MB, 1.44MB, or 2.88MB, then the default is \fBfd\fP, otherwise the default is -\fBno-emulation.\fP +\fBno-emulation\fP. .RE .TP Format iso9660 - filename and size extensions @@ -287,7 +411,7 @@ Default: disabled. .TP \fBallow-period\fP If enabled, allows filenames to contain trailing period characters, in violation of the ISO9660 specification. -If disabled,trailing periods will be converted to underscore characters. +If disabled, trailing periods will be converted to underscore characters. This does not impact names stored in the Rockridge or Joliet extension area. Default: disabled. .TP @@ -416,6 +540,132 @@ This option can be provided multiple times to suppress compression on many files. .RE .TP +Format mtree +.RS 5 +.TP +\fBcksum\fP, \fBdevice\fP, \fBflags\fP, \fBgid\fP, \fBgname\fP, \fBindent\fP, \fBlink\fP, \fBmd5\fP, \fBmode\fP, \fBnlink\fP, \fBrmd160\fP, \fBsha1\fP, \fBsha256\fP, \fBsha384\fP, \fBsha512\fP, \fBsize\fP, \fBtime\fP, \fBuid\fP, \fBuname\fP +Enable a particular keyword in the mtree output. +Prefix with an exclamation mark to disable the corresponding keyword. +The default is equivalent to +``device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname''. +.TP +\fBall\fP +Enables all of the above keywords. +.TP +\fBuse-set\fP +Enables generation of +\fB/set\fP +lines that specify default values for the following files and/or directories. +.TP +\fBindent\fP +XXX needs explanation XXX +.RE +.TP +Format newc +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file names. +.RE +.TP +Format pax +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file, group and user names. +The value is one of +``BINARY'' +or +``UTF-8''. +With +``BINARY'' +there is no character conversion, with +``UTF-8'' +names are converted to UTF-8. +.TP +\fBxattrheader\fP +When storing extended attributes, this option configures which +headers should be written. The value is one of +``all'', +``LIBARCHIVE'', +or +``SCHILY''. +By default, both +``LIBARCHIVE.xattr'' +and +``SCHILY.xattr'' +headers are written. +.RE +.TP +Format ustar +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file, group and user names. +.RE +.TP +Format v7tar +.RS 5 +.TP +\fBhdrcharset\fP +The value is used as a character set name that will be +used when translating file, group and user names. +.RE +.TP +Format warc +.RS 5 +.TP +\fBomit-warcinfo\fP +Set to +``true'' +to disable output of the warcinfo record. +.RE +.TP +Format xar +.RS 5 +.TP +\fBchecksum\fP=\fItype\fP +Use +\fItype\fP +as file checksum method. +Supported values are +``none'', +``md5'', +and +``sha1'' +(default.) +.TP +\fBcompression\fP=\fItype\fP +Use +\fItype\fP +as compression method. +Supported values are +``none'', +``bzip2'', +``gzip'' +(default,) +``lzma'' +and +``xz''. +.TP +\fBcompression_level\fP +The value is a decimal integer from 1 to 9 specifying the compression level. +.TP +\fBtoc-checksum\fP=\fItype\fP +Use +\fItype\fP +as table of contents checksum method. +Supported values are +``none'', +``md5'' +and +``sha1'' +(default.) +.RE +.TP Format zip .RS 5 .TP @@ -428,6 +678,32 @@ to indicate how the following entries should be compressed. Note that this setting is ignored for directories, symbolic links, and other special entries. .TP +\fBcompression-level\fP +The value is interpreted as a decimal integer specifying the +compression level. +Values between 0 and 9 are supported. +A compression level of 0 switches the compression method to +``store'', +other values will enable +``deflate'' +compression with the given level. +.TP +\fBencryption\fP +Enable encryption using traditional zip encryption. +.TP +\fBencryption\fP=\fItype\fP +Use +\fItype\fP +as encryption type. +Supported values are +``zipcrypt'' +(traditional zip encryption,) +``aes128'' +(WinZip AES-128 encryption) +and +``aes256'' +(WinZip AES-256 encryption.) +.TP \fBexperimental\fP This boolean option enables or disables experimental Zip features that may not be compatible with other Zip implementations. @@ -438,7 +714,8 @@ All CRC fields are set to zero. It should not be used except for testing purposes. .TP \fBhdrcharset\fP -This sets the character set used for filenames. +The value is used as a character set name that will be +used when translating file names. .TP \fBzip64\fP Zip64 extensions provide additional file size information @@ -490,9 +767,9 @@ functions. .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_read_set_options\fP(3), -\fBarchive_write\fP(3) +\fBarchive_write\fP(3), +\fBlibarchive\fP(3) .SH HISTORY .ad l The diff --git a/archivers/libarchive/files/doc/man/archive_write_set_passphrase.3 b/archivers/libarchive/files/doc/man/archive_write_set_passphrase.3 index 136732e66a9..7e67415941b 100644 --- a/archivers/libarchive/files/doc/man/archive_write_set_passphrase.3 +++ b/archivers/libarchive/files/doc/man/archive_write_set_passphrase.3 @@ -23,7 +23,7 @@ Streaming Archive Library (libarchive, -larchive) .RS 5 .TP \fB\%archive_write_set_passphrase\fP() -Set a passphrase for writing an encryption archive. +Set a passphrase for writing an encrypted archive. If \fIpassphrase\fP is @@ -33,17 +33,17 @@ or empty, this function will do nothing and will be returned. Otherwise, \fBARCHIVE_OK\fP -will be returned. +will be returned. .TP \fB\%archive_write_set_passphrase_callback\fP() -Register callback function that will be invoked to get a passphrase -for encrption if the passphrase was not set by the +Register a callback function that will be invoked to get a passphrase +for encryption if the passphrase was not set by the \fB\%archive_write_set_passphrase\fP() function. .RE .SH SEE ALSO .ad l \fBtar\fP(1), -\fBlibarchive\fP(3), \fBarchive_write\fP(3), -\fBarchive_write_set_options\fP(3) +\fBarchive_write_set_options\fP(3), +\fBlibarchive\fP(3) diff --git a/archivers/libarchive/files/doc/man/bsdcpio.1 b/archivers/libarchive/files/doc/man/bsdcpio.1 index 061133fc5d9..8f31df6de5c 100644 --- a/archivers/libarchive/files/doc/man/bsdcpio.1 +++ b/archivers/libarchive/files/doc/man/bsdcpio.1 @@ -56,7 +56,6 @@ Pass-through. Read a list of filenames from standard input and copy the files to the specified directory. .RE -.PP .SH OPTIONS .ad l Unless specifically stated otherwise, options are applicable in @@ -428,10 +427,10 @@ standard syntax. .SH SEE ALSO .ad l \fBbzip2\fP(1), -\fBtar\fP(1), \fBgzip\fP(1), \fBmt\fP(1), \fBpax\fP(1), +\fBtar\fP(1), \fBlibarchive\fP(3), \fBcpio\fP(5), \fBlibarchive-formats\fP(5), diff --git a/archivers/libarchive/files/doc/man/bsdtar.1 b/archivers/libarchive/files/doc/man/bsdtar.1 index a33d20e38bd..512db637b6f 100644 --- a/archivers/libarchive/files/doc/man/bsdtar.1 +++ b/archivers/libarchive/files/doc/man/bsdtar.1 @@ -1,4 +1,4 @@ -.TH TAR 1 "June 3, 2019" "" +.TH TAR 1 "January 31, 2020" "" .SH NAME .ad l \fB\%tar\fP @@ -170,12 +170,14 @@ restricted pax format and bzip2 compression. .TP \fB\-Fl\fP acls (c, r, u, x modes only) -Archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of +Archive or extract POSIX.1e or NFSv4 ACLs. +This is the reverse of \fB\-Fl\fP no-acls and the default behavior in c, r, and u modes (except on Mac OS X) or if \fB\%tar\fP -is run in x mode as root. On Mac OS X this option translates extended ACLs -to NFSv4 ACLs. To store extended ACLs the +is run in x mode as root. +On Mac OS X this option translates extended ACLs to NFSv4 ACLs. +To store extended ACLs the \fB\-Fl\fP mac-metadata option is preferred. .TP @@ -217,15 +219,16 @@ specified on the command line. \fB\-Fl\fP exclude-vcs Do not process files or directories internally used by the version control systems +Sq Arch, +Sq Bazaar, Sq CVS, +Sq Darcs, +Sq Mercurial, Sq RCS, Sq SCCS, -Sq SVN, -Sq Arch, -Sq Bazaar, -Sq Mercurial +Sq SVN and -Sq Darcs. +Sq git. .TP \fB\-Fl\fP fflags (c, r, u, x modes only) @@ -427,10 +430,12 @@ By default, the modification time is set to the time stored in the archive. .TP \fB\-Fl\fP mac-metadata (c, r, u and x mode only) -Mac OS X specific. Archive or extract extended ACLs and extended file +Mac OS X specific. +Archive or extract extended ACLs and extended file attributes using \fBcopyfile\fP(3) -in AppleDouble format. This is the reverse of +in AppleDouble format. +This is the reverse of \fB\-Fl\fP no-mac-metadata. and the default behavior in c, r, and u modes or if \fB\%tar\fP @@ -485,7 +490,8 @@ option to .TP \fB\-Fl\fP no-acls (c, r, u, x modes only) -Do not archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of +Do not archive or extract POSIX.1e or NFSv4 ACLs. +This is the reverse of \fB\-Fl\fP acls and the default behavior if \fB\%tar\fP @@ -493,7 +499,8 @@ is run as non-root in x mode (on Mac OS X as any user in c, r, u and x modes). .TP \fB\-Fl\fP no-fflags (c, r, u, x modes only) -Do not archive or extract file attributes or file flags. This is the reverse of +Do not archive or extract file attributes or file flags. +This is the reverse of \fB\-Fl\fP fflags and the default behavior if \fB\%tar\fP @@ -501,15 +508,25 @@ is run as non-root in x mode. .TP \fB\-Fl\fP no-mac-metadata (x mode only) -Mac OS X specific. Do not archive or extract ACLs and extended file attributes +Mac OS X specific. +Do not archive or extract ACLs and extended file attributes using \fBcopyfile\fP(3) -in AppleDouble format. This is the reverse of +in AppleDouble format. +This is the reverse of \fB\-Fl\fP mac-metadata. and the default behavior if \fB\%tar\fP is run as non-root in x mode. .TP +\fB\-Fl\fP no-safe-writes +(x mode only) +Do not create temporary files and use +\fBrename\fP(2) +to replace the original ones. +This is the reverse of +\fB\-Fl\fP safe-writes. +.TP \fB\-Fl\fP no-same-owner (x mode only) Do not extract owner and group IDs. @@ -531,7 +548,8 @@ is run as non-root. .TP \fB\-Fl\fP no-xattrs (c, r, u, x modes only) -Do not archive or extract extended file attributes. This is the reverse of +Do not archive or extract extended file attributes. +This is the reverse of \fB\-Fl\fP xattrs and the default behavior if \fB\%tar\fP @@ -623,7 +641,14 @@ As above, but the corresponding key and value will be provided only to modules whose name matches \fImodule\fP. .RE -The currently supported modules and keys are: +.PP +The complete list of supported modules and keys +for create and append modes is in +\fBarchive_write_set_options\fP(3) +and for extract and list modes in +\fBarchive_read_set_options\fP(3). +.PP +Examples of supported options: .RS 5 .TP \fBiso9660:joliet\fP @@ -646,7 +671,8 @@ to disable. A decimal integer from 1 to 9 specifying the gzip compression level. .TP \fBgzip:timestamp\fP -Store timestamp. This is enabled by default, use +Store timestamp. +This is enabled by default, use \fB!timestamp\fP or \fBgzip:!timestamp\fP @@ -666,7 +692,8 @@ A decimal integer from 1 to 9 specifying the lrzip compression level. A decimal integer from 1 to 9 specifying the lzop compression level. .TP \fBlz4:stream-checksum\fP -Enable stream checksum. This is by default, use +Enable stream checksum. +This is by default, use \fBlz4:!stream-checksum\fP to disable. .TP @@ -682,7 +709,8 @@ 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. +A decimal integer specifying the zstd compression level. Supported values depend +on the library version, common values are from 1 to 22. .TP \fBlzop:compression-level\fP A decimal integer from 1 to 9 specifying the lzop compression level. @@ -733,9 +761,10 @@ aes128 (WinZip AES-128 encryption) and aes256 (WinZip AES-256 encryption). .TP \fBread_concatenated_archives\fP Ignore zeroed blocks in the archive, which occurs when multiple tar archives -have been concatenated together. Without this option, only the contents of -the first concatenated archive would be read. This option is comparable to -the +have been concatenated together. +Without this option, only the contents of +the first concatenated archive would be read. +This option is comparable to the \fB\-i\fP, \fB\-Fl\fP ignore-zeros option of GNU tar. .RE @@ -759,11 +788,13 @@ This option suppresses these behaviors. Preserve file permissions. Attempt to restore the full permissions, including file modes, file attributes or file flags, extended file attributes and ACLs, if available, for each item -extracted from the archive. This is the reverse of +extracted from the archive. +This is the reverse of \fB\-Fl\fP no-same-permissions and the default if \fB\%tar\fP -is being run as root. It can be partially overridden by also specifying +is being run as root. +It can be partially overridden by also specifying \fB\-Fl\fP no-acls, \fB\-Fl\fP no-fflags, \fB\-Fl\fP no-mac-metadata @@ -837,6 +868,27 @@ The default is which applies substitutions to all names. In particular, it is never necessary to specify h, r, or s. .TP +\fB\-Fl\fP safe-writes +(x mode only) +Extract files atomically. +By default +\fB\%tar\fP +unlinks the original file with the same name as the extracted file (if it +exists), and then creates it immediately under the same name and writes to +it. +For a short period of time, applications trying to access the file might +not find it, or see incomplete results. +If +\fB\-Fl\fP safe-writes +is enabled, +\fB\%tar\fP +first creates a unique temporary file, then writes the new contents to +the temporary file, and finally renames the temporary file to its final +name atomically using +\fBrename\fP(2). +This guarantees that an application accessing the file, will either see +the old contents or the new contents at all times. +.TP \fB\-Fl\fP same-owner (x mode only) Extract owner and group IDs. @@ -952,7 +1004,8 @@ for more information about the handling of exclusions. .TP \fB\-Fl\fP xattrs (c, r, u, x modes only) -Archive or extract extended file attributes. This is the reverse of +Archive or extract extended file attributes. +This is the reverse of \fB\-Fl\fP no-xattrs and the default behavior in c, r, and u modes or if \fB\%tar\fP @@ -1064,11 +1117,11 @@ To move file hierarchies, invoke \fB\%tar\fP as .RS 4 -\fB\%tar\fP \fB\-cf\fP \fI-\fP \fB\-C\fP \fIsrcdir\\fP. | \fB\%tar\fP \fB\-xpf\fP \fI-\fP \fB\-C\fP \fIdestdir\fP +\fB\%tar\fP \fB\-cf\fP \fI-\fP \fB\-C\fP \fIsrcdir\fP \&. | \fB\%tar\fP \fB\-xpf\fP \fI-\fP \fB\-C\fP \fIdestdir\fP .RE or more traditionally .RS 4 -cd srcdir \&; \fB\%tar\fP \fB\-cf\fP \fI-\\fP. | (cd destdir \&; \fB\%tar\fP \fB\-xpf\fP \fI-\fP) +cd srcdir \&; \fB\%tar\fP \fB\-cf\fP \fI-\fP \&. | (cd destdir \&; \fB\%tar\fP \fB\-xpf\fP \fI-\fP) .RE .PP In create mode, the list of files and directories to be archived @@ -1099,7 +1152,6 @@ An input file in \fBmtree\fP(5) format can be used to create an output archive with arbitrary ownership, permissions, or names that differ from existing data on disk: -.PP .RS 4 .nf $ cat input.mtree diff --git a/archivers/libarchive/files/doc/man/cpio.5 b/archivers/libarchive/files/doc/man/cpio.5 index 481f775d55d..23d4ab2f90e 100644 --- a/archivers/libarchive/files/doc/man/cpio.5 +++ b/archivers/libarchive/files/doc/man/cpio.5 @@ -244,7 +244,7 @@ Note that this format supports only 4 gigabyte files (unlike the older ASCII format, which supports 8 gigabyte files). .PP In this format, hardlinked files are handled by setting the -filesize to zero for each entry except the last one that +filesize to zero for each entry except the first one that appears in the archive. .SS New CRC Format The CRC format is identical to the new ASCII format described diff --git a/archivers/libarchive/files/doc/man/libarchive_changes.3 b/archivers/libarchive/files/doc/man/libarchive_changes.3 index 15e14d1596f..a1e233071cd 100644 --- a/archivers/libarchive/files/doc/man/libarchive_changes.3 +++ b/archivers/libarchive/files/doc/man/libarchive_changes.3 @@ -8,7 +8,6 @@ This page describes user-visible changes in libarchive3, and lists public functions and other symbols changed, deprecated or removed in libarchive3, along with their replacements if any. -.PP .SS Multiple Filters Libarchive2 permitted a single (input or output) filter active on an archive. @@ -329,13 +328,13 @@ or .RE .SH SEE ALSO .ad l -\fBlibarchive\fP(3), \fBarchive_read\fP(3), \fBarchive_read_filter\fP(3), \fBarchive_read_format\fP(3), \fBarchive_read_set_options\fP(3), +\fBarchive_util\fP(3), \fBarchive_write\fP(3), \fBarchive_write_filter\fP(3), \fBarchive_write_format\fP(3), \fBarchive_write_set_options\fP(3), -\fBarchive_util\fP(3) +\fBlibarchive\fP(3) diff --git a/archivers/libarchive/files/doc/man/libarchive_internals.3 b/archivers/libarchive/files/doc/man/libarchive_internals.3 index b55fb14c3bd..05337ad9243 100644 --- a/archivers/libarchive/files/doc/man/libarchive_internals.3 +++ b/archivers/libarchive/files/doc/man/libarchive_internals.3 @@ -342,8 +342,8 @@ as a dedicated ZIP program. \fBarchive_entry\fP(3), \fBarchive_read\fP(3), \fBarchive_write\fP(3), -\fBarchive_write_disk\fP(3) -\fBlibarchive\fP(3), +\fBarchive_write_disk\fP(3), +\fBlibarchive\fP(3) .SH HISTORY .ad l The diff --git a/archivers/libarchive/files/doc/man/mtree.5 b/archivers/libarchive/files/doc/man/mtree.5 index e53f97c3f1d..8e333098813 100644 --- a/archivers/libarchive/files/doc/man/mtree.5 +++ b/archivers/libarchive/files/doc/man/mtree.5 @@ -113,7 +113,6 @@ or .B char file types. The value must be one of the following forms: -.PP .RS 5 .TP \fIformat\fP, \fImajor\fP, \fIminor\fP Bo, \fIsubunit\fP Bc @@ -147,8 +146,8 @@ are recognized: .B solaris , .B sunos , .B svr3 , -.B svr4 , -and +.B svr4 , +and .B ultrix . .PP See @@ -307,14 +306,11 @@ The file owner as a numeric value. \fBuname\fP The file owner as a symbolic name. .RE -.PP .SH SEE ALSO .ad l \fBcksum\fP(1), \fBfind\fP(1), \fBmtree\fP(8) -.SH BUGS -.ad l .SH HISTORY .ad l The diff --git a/archivers/libarchive/files/doc/man/tar.5 b/archivers/libarchive/files/doc/man/tar.5 index 153b7c3eecc..e8fed3e6b09 100644 --- a/archivers/libarchive/files/doc/man/tar.5 +++ b/archivers/libarchive/files/doc/man/tar.5 @@ -449,7 +449,7 @@ Vendor-specific attributes used by Joerg Schilling's \fB\%star\fP implementation. .TP -\fBSCHILY.acl.access\fP, \fBSCHILY.acl.default,\fP \fBSCHILY.acl.ace\fP +\fBSCHILY.acl.access\fP, \fBSCHILY.acl.default\fP, \fBSCHILY.acl.ace\fP Stores the access, default and NFSv4 ACLs as textual strings in a format that is an extension of the format specified by POSIX.1e draft 17. In particular, each user or group access specification can include @@ -468,7 +468,7 @@ The file flags. The full size of the file on disk. XXX explain? XXX .TP -\fBSCHILY.dev,\fP \fBSCHILY.ino\fP, \fBSCHILY.nlinks\fP +\fBSCHILY.dev\fP, \fBSCHILY.ino\fP, \fBSCHILY.nlinks\fP The device number, inode number, and link count for the entry. In particular, note that a pax interchange format archive using Joerg Schilling's @@ -488,7 +488,7 @@ The time when the file was created. attribute, which refers to the time when the file metadata was last changed.) .TP -\fBLIBARCHIVE.xattr.\fP \fInamespace\fP.\fIkey\fP +\fBLIBARCHIVE.xattr\fP. \fInamespace\fP. \fIkey\fP Libarchive stores POSIX.1e-style extended attributes using keys of this form. The @@ -944,7 +944,8 @@ GNU tar long pathname for the following header. GNU tar multivolume marker, indicating the file is a continuation of a file from the previous volume. .TP \fBN\fP -GNU tar long filename support. Deprecated. +GNU tar long filename support. +Deprecated. .TP \fBS\fP GNU tar sparse regular file. diff --git a/archivers/libarchive/files/doc/pdf/Makefile b/archivers/libarchive/files/doc/pdf/Makefile index 48a53116b74..b5bf21e2937 100644 --- a/archivers/libarchive/files/doc/pdf/Makefile +++ b/archivers/libarchive/files/doc/pdf/Makefile @@ -107,15 +107,15 @@ archive_write_set_passphrase.3.pdf: ../../libarchive/archive_write_set_passphras cpio.5.pdf: ../../libarchive/cpio.5 groff -mdoc -T ps ../../libarchive/cpio.5 | ps2pdf - - > cpio.5.pdf +libarchive-formats.5.pdf: ../../libarchive/libarchive-formats.5 + groff -mdoc -T ps ../../libarchive/libarchive-formats.5 | ps2pdf - - > libarchive-formats.5.pdf + libarchive.3.pdf: ../../libarchive/libarchive.3 groff -mdoc -T ps ../../libarchive/libarchive.3 | ps2pdf - - > libarchive.3.pdf libarchive_changes.3.pdf: ../../libarchive/libarchive_changes.3 groff -mdoc -T ps ../../libarchive/libarchive_changes.3 | ps2pdf - - > libarchive_changes.3.pdf -libarchive-formats.5.pdf: ../../libarchive/libarchive-formats.5 - groff -mdoc -T ps ../../libarchive/libarchive-formats.5 | ps2pdf - - > libarchive-formats.5.pdf - libarchive_internals.3.pdf: ../../libarchive/libarchive_internals.3 groff -mdoc -T ps ../../libarchive/libarchive_internals.3 | ps2pdf - - > libarchive_internals.3.pdf @@ -130,4 +130,4 @@ bsdtar.1.pdf: ../../tar/bsdtar.1 bsdcpio.1.pdf: ../../cpio/bsdcpio.1 groff -mdoc -T ps ../../cpio/bsdcpio.1 | ps2pdf - - > bsdcpio.1.pdf -all: archive_entry.3.pdf archive_entry_acl.3.pdf archive_entry_linkify.3.pdf archive_entry_misc.3.pdf archive_entry_paths.3.pdf archive_entry_perms.3.pdf archive_entry_stat.3.pdf archive_entry_time.3.pdf archive_read.3.pdf archive_read_add_passphrase.3.pdf archive_read_data.3.pdf archive_read_disk.3.pdf archive_read_extract.3.pdf archive_read_filter.3.pdf archive_read_format.3.pdf archive_read_free.3.pdf archive_read_header.3.pdf archive_read_new.3.pdf archive_read_open.3.pdf archive_read_set_options.3.pdf archive_util.3.pdf archive_write.3.pdf archive_write_blocksize.3.pdf archive_write_data.3.pdf archive_write_disk.3.pdf archive_write_filter.3.pdf archive_write_finish_entry.3.pdf archive_write_format.3.pdf archive_write_free.3.pdf archive_write_header.3.pdf archive_write_new.3.pdf archive_write_open.3.pdf archive_write_set_options.3.pdf archive_write_set_passphrase.3.pdf cpio.5.pdf libarchive.3.pdf libarchive_changes.3.pdf libarchive-formats.5.pdf libarchive_internals.3.pdf mtree.5.pdf tar.5.pdf bsdtar.1.pdf bsdcpio.1.pdf +all: archive_entry.3.pdf archive_entry_acl.3.pdf archive_entry_linkify.3.pdf archive_entry_misc.3.pdf archive_entry_paths.3.pdf archive_entry_perms.3.pdf archive_entry_stat.3.pdf archive_entry_time.3.pdf archive_read.3.pdf archive_read_add_passphrase.3.pdf archive_read_data.3.pdf archive_read_disk.3.pdf archive_read_extract.3.pdf archive_read_filter.3.pdf archive_read_format.3.pdf archive_read_free.3.pdf archive_read_header.3.pdf archive_read_new.3.pdf archive_read_open.3.pdf archive_read_set_options.3.pdf archive_util.3.pdf archive_write.3.pdf archive_write_blocksize.3.pdf archive_write_data.3.pdf archive_write_disk.3.pdf archive_write_filter.3.pdf archive_write_finish_entry.3.pdf archive_write_format.3.pdf archive_write_free.3.pdf archive_write_header.3.pdf archive_write_new.3.pdf archive_write_open.3.pdf archive_write_set_options.3.pdf archive_write_set_passphrase.3.pdf cpio.5.pdf libarchive-formats.5.pdf libarchive.3.pdf libarchive_changes.3.pdf libarchive_internals.3.pdf mtree.5.pdf tar.5.pdf bsdtar.1.pdf bsdcpio.1.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf Binary files differindex bece47ef694..d8342ee89c2 100644 --- a/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf Binary files differindex a1c27610f41..3280f47dfba 100644 --- a/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf Binary files differindex e511e2d5fc2..d6b19ae681e 100644 --- a/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_misc.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_misc.3.pdf Binary files differindex 7d7e4629f56..9c29aedb0f9 100644 --- a/archivers/libarchive/files/doc/pdf/archive_entry_misc.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_entry_misc.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf Binary files differindex bed05e272cd..f7e59775905 100644 --- a/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf Binary files differindex 5b78462915f..701c65f6f17 100644 --- a/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf Binary files differindex 9ed3428f008..165f377a721 100644 --- a/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf Binary files differindex 5bbb64e315f..ea3b4fe0e4e 100644 --- a/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read.3.pdf Binary files differindex 820efdaa4df..94d132f2e0b 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read.3.pdf 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 Binary files differindex 037df6fb8c4..f7fd4043ed5 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 diff --git a/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf Binary files differindex cd36ea29563..6a0bc2122b2 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf Binary files differindex 2b2260d4bfd..40b45b57c5b 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf Binary files differindex 325f619cf95..81cdebd1e34 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf Binary files differindex c6c0b0f649f..2bf97d6efdf 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf Binary files differindex cbc89d6afd3..d318edc7589 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf Binary files differindex a2c77b5b674..62d7cd6dd03 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf Binary files differindex 32f71713b4f..4ca1ce3e6e3 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf Binary files differindex 37db620e202..9fd39ff2998 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf Binary files differindex fe4cbf7aa7b..6ae00325c24 100644 --- a/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf 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 Binary files differindex a34f2371868..8d3d4ecbd4c 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 diff --git a/archivers/libarchive/files/doc/pdf/archive_util.3.pdf b/archivers/libarchive/files/doc/pdf/archive_util.3.pdf Binary files differindex dd0bd370cff..fb325982367 100644 --- a/archivers/libarchive/files/doc/pdf/archive_util.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_util.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write.3.pdf Binary files differindex 5b83a10d146..de34811fc3f 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf Binary files differindex 229723b3c00..0d8cf6a6139 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf Binary files differindex 09073878093..d6d9e5be1ab 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf Binary files differindex 25d7957c24b..7f53b743bf6 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf Binary files differindex 150cd373dfa..d4ebed5237e 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf 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 Binary files differindex 0b8ccfb9eb0..2b9c96a7af9 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 diff --git a/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf Binary files differindex f629b2199ca..b9fd3249418 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf Binary files differindex 3538377fa63..f64a0cd85e9 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf Binary files differindex 1ee09e9ec32..32d34cd44b2 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf Binary files differindex 7caf709a7fc..7a03f1ef1bc 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf Binary files differindex 6ddc837b0eb..e1b3c6295d1 100644 --- a/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf +++ b/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf 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 Binary files differindex ebb34c07e31..291492118ee 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 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 Binary files differindex f92398ed3a5..82b74c5e76e 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 diff --git a/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf b/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf Binary files differindex e6f25acbe66..d09065d4f74 100644 --- a/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf +++ b/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf diff --git a/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf b/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf Binary files differindex 7662ec44cb5..a9c24fbbb2d 100644 --- a/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf +++ b/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf diff --git a/archivers/libarchive/files/doc/pdf/cpio.5.pdf b/archivers/libarchive/files/doc/pdf/cpio.5.pdf Binary files differindex 2f3ef9bfedd..ac8713ccc4b 100644 --- a/archivers/libarchive/files/doc/pdf/cpio.5.pdf +++ b/archivers/libarchive/files/doc/pdf/cpio.5.pdf diff --git a/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf b/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf Binary files differindex 114336357b9..a2fb90c5105 100644 --- a/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf +++ b/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf diff --git a/archivers/libarchive/files/doc/pdf/libarchive.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive.3.pdf Binary files differindex e1adb601ddc..b349aca0be2 100644 --- a/archivers/libarchive/files/doc/pdf/libarchive.3.pdf +++ b/archivers/libarchive/files/doc/pdf/libarchive.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf Binary files differindex 443515f058f..3db5b53a4eb 100644 --- a/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf +++ b/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf Binary files differindex 7a646cc6e98..67a1abb6f56 100644 --- a/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf +++ b/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf diff --git a/archivers/libarchive/files/doc/pdf/mtree.5.pdf b/archivers/libarchive/files/doc/pdf/mtree.5.pdf Binary files differindex 6a58caee645..816dc9badd1 100644 --- a/archivers/libarchive/files/doc/pdf/mtree.5.pdf +++ b/archivers/libarchive/files/doc/pdf/mtree.5.pdf diff --git a/archivers/libarchive/files/doc/pdf/tar.5.pdf b/archivers/libarchive/files/doc/pdf/tar.5.pdf Binary files differindex e92f0d0762a..0f2f1b5d7d1 100644 --- a/archivers/libarchive/files/doc/pdf/tar.5.pdf +++ b/archivers/libarchive/files/doc/pdf/tar.5.pdf diff --git a/archivers/libarchive/files/doc/text/Makefile b/archivers/libarchive/files/doc/text/Makefile index d533e84adf6..cace75d8f59 100644 --- a/archivers/libarchive/files/doc/text/Makefile +++ b/archivers/libarchive/files/doc/text/Makefile @@ -107,15 +107,15 @@ archive_write_set_passphrase.3.txt: ../../libarchive/archive_write_set_passphras cpio.5.txt: ../../libarchive/cpio.5 nroff -mdoc ../../libarchive/cpio.5 | col -b > cpio.5.txt +libarchive-formats.5.txt: ../../libarchive/libarchive-formats.5 + nroff -mdoc ../../libarchive/libarchive-formats.5 | col -b > libarchive-formats.5.txt + libarchive.3.txt: ../../libarchive/libarchive.3 nroff -mdoc ../../libarchive/libarchive.3 | col -b > libarchive.3.txt libarchive_changes.3.txt: ../../libarchive/libarchive_changes.3 nroff -mdoc ../../libarchive/libarchive_changes.3 | col -b > libarchive_changes.3.txt -libarchive-formats.5.txt: ../../libarchive/libarchive-formats.5 - nroff -mdoc ../../libarchive/libarchive-formats.5 | col -b > libarchive-formats.5.txt - libarchive_internals.3.txt: ../../libarchive/libarchive_internals.3 nroff -mdoc ../../libarchive/libarchive_internals.3 | col -b > libarchive_internals.3.txt @@ -130,4 +130,4 @@ bsdtar.1.txt: ../../tar/bsdtar.1 bsdcpio.1.txt: ../../cpio/bsdcpio.1 nroff -mdoc ../../cpio/bsdcpio.1 | col -b > bsdcpio.1.txt -all: archive_entry.3.txt archive_entry_acl.3.txt archive_entry_linkify.3.txt archive_entry_misc.3.txt archive_entry_paths.3.txt archive_entry_perms.3.txt archive_entry_stat.3.txt archive_entry_time.3.txt archive_read.3.txt archive_read_add_passphrase.3.txt archive_read_data.3.txt archive_read_disk.3.txt archive_read_extract.3.txt archive_read_filter.3.txt archive_read_format.3.txt archive_read_free.3.txt archive_read_header.3.txt archive_read_new.3.txt archive_read_open.3.txt archive_read_set_options.3.txt archive_util.3.txt archive_write.3.txt archive_write_blocksize.3.txt archive_write_data.3.txt archive_write_disk.3.txt archive_write_filter.3.txt archive_write_finish_entry.3.txt archive_write_format.3.txt archive_write_free.3.txt archive_write_header.3.txt archive_write_new.3.txt archive_write_open.3.txt archive_write_set_options.3.txt archive_write_set_passphrase.3.txt cpio.5.txt libarchive.3.txt libarchive_changes.3.txt libarchive-formats.5.txt libarchive_internals.3.txt mtree.5.txt tar.5.txt bsdtar.1.txt bsdcpio.1.txt +all: archive_entry.3.txt archive_entry_acl.3.txt archive_entry_linkify.3.txt archive_entry_misc.3.txt archive_entry_paths.3.txt archive_entry_perms.3.txt archive_entry_stat.3.txt archive_entry_time.3.txt archive_read.3.txt archive_read_add_passphrase.3.txt archive_read_data.3.txt archive_read_disk.3.txt archive_read_extract.3.txt archive_read_filter.3.txt archive_read_format.3.txt archive_read_free.3.txt archive_read_header.3.txt archive_read_new.3.txt archive_read_open.3.txt archive_read_set_options.3.txt archive_util.3.txt archive_write.3.txt archive_write_blocksize.3.txt archive_write_data.3.txt archive_write_disk.3.txt archive_write_filter.3.txt archive_write_finish_entry.3.txt archive_write_format.3.txt archive_write_free.3.txt archive_write_header.3.txt archive_write_new.3.txt archive_write_open.3.txt archive_write_set_options.3.txt archive_write_set_passphrase.3.txt cpio.5.txt libarchive-formats.5.txt libarchive.3.txt libarchive_changes.3.txt libarchive_internals.3.txt mtree.5.txt tar.5.txt bsdtar.1.txt bsdcpio.1.txt diff --git a/archivers/libarchive/files/doc/text/archive_entry.3.txt b/archivers/libarchive/files/doc/text/archive_entry.3.txt index 2d3a65bf0b3..8e4600d84b5 100644 --- a/archivers/libarchive/files/doc/text/archive_entry.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry.3.txt @@ -2,7 +2,7 @@ ARCHIVE_ENTRY(3) BSD Library Functions Manual ARCHIVE_ENTRY(3) NAME archive_entry_clear, archive_entry_clone, archive_entry_free, - archive_entry_new, — functions for managing archive entry descriptions + archive_entry_new -- functions for managing archive entry descriptions LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -65,8 +65,8 @@ DESCRIPTION Stores the provided data in the object. In particular, for strings, the pointer is stored, not the referenced string. archive_entry_copy_XXXX() - As above, except that the referenced data is copied into the ob‐ - ject. + As above, except that the referenced data is copied into the + object. archive_entry_XXXX() Returns the specified data. In the case of strings, a const- qualified pointer to the string is returned. @@ -76,12 +76,12 @@ DESCRIPTION For example, if you store a narrow string and read the corresponding wide string, the object will transparently convert formats using the current locale. Similarly, if you store a wide string and then store a narrow - string for the same data, the previously-set wide string will be dis‐ + string for the same data, the previously-set wide string will be dis- carded in favor of the new data. SEE ALSO archive_entry_acl(3), archive_entry_paths(3), archive_entry_perms(3), - archive_entry_time(3) libarchive(3), + archive_entry_time(3), libarchive(3) HISTORY The libarchive library first appeared in FreeBSD 5.3. diff --git a/archivers/libarchive/files/doc/text/archive_entry_acl.3.txt b/archivers/libarchive/files/doc/text/archive_entry_acl.3.txt index 21818e1773e..34281cf33ce 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_acl.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_acl.3.txt @@ -4,10 +4,10 @@ NAME archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_from_text, archive_entry_acl_from_text_w, - archive_entry_acl_next, archive_entry_acl_next_w, - archive_entry_acl_reset, archive_entry_acl_to_text, - archive_entry_acl_to_text_w, archive_entry_acl_types — functions for ma‐ - nipulating Access Control Lists in archive entry descriptions + archive_entry_acl_next, archive_entry_acl_reset, + archive_entry_acl_to_text, archive_entry_acl_to_text_w, + archive_entry_acl_types -- functions for manipulating Access Control + Lists in archive entry descriptions LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -43,11 +43,6 @@ SYNOPSIS const char **ret_name); int - archive_entry_acl_next_w(struct archive_entry *a, int type, - int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, - const wchar_t **ret_name); - - int archive_entry_acl_reset(struct archive_entry *a, int type); char * @@ -62,15 +57,15 @@ SYNOPSIS archive_entry_acl_types(struct archive_entry *a); DESCRIPTION - The “Access Control Lists (ACLs)” extend the standard Unix perssion + The ``Access Control Lists (ACLs)'' extend the standard Unix permission model. The ACL interface of libarchive supports both POSIX.1e and NFSv4 - style ACLs. Use of ACLs is restricted by various levels of ACL support in - operating systems, file systems and archive formats. + style ACLs. Use of ACLs is restricted by various levels of ACL support + in operating systems, file systems and archive formats. POSIX.1e Access Control Lists A POSIX.1e ACL consists of a number of independent entries. Each entry - specifies the permission set as bitmask of basic permissions. Valid per‐ - missions in the permset are: + specifies the permission set as a bitmask of basic permissions. Valid + permissions in the permset are: ARCHIVE_ENTRY_ACL_READ (r) ARCHIVE_ENTRY_ACL_WRITE (w) ARCHIVE_ENTRY_ACL_EXECUTE (x) @@ -80,45 +75,45 @@ DESCRIPTION values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. - ARCHIVE_ENTRY_ACL_GROUP The group specied by the name field. - ARCHIVE_ENTRY_ACL_GROUP_OBJ The group who owns the file. + ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. + ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. ARCHIVE_ENTRY_ACL_MASK The maximum permissions to be obtained via group permissions. - ARCHIVE_ENTRY_ACL_OTHER Any principal who is not file owner or - a member of the owning group. + ARCHIVE_ENTRY_ACL_OTHER Any principal who is not the file + owner or a member of the owning group. The principals ARCHIVE_ENTRY_ACL_USER_OBJ, ARCHIVE_ENTRY_ACL_GROUP_OBJ and ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries. - All files with have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This - specifies the permissions required for access to the file itself. Direc‐ - tories have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which - controls the initial access ACL for newly created directory entries. + All files have an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This spec- + ifies the permissions required for access to the file itself. Directo- + ries have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which con- + trols the initial access ACL for newly-created directory entries. NFSv4 Access Control Lists A NFSv4 ACL consists of multiple individual entries called Access Control Entries (ACEs). There are four possible types of a NFSv4 ACE: - ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions re‐ - quiring given permissions. - ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing ac‐ - tions requiring given permissions. + ARCHIVE_ENTRY_ACL_TYPE_ALLOW Allow principal to perform actions + requiring given permissions. + ARCHIVE_ENTRY_ACL_TYPE_DENY Prevent principal from performing + actions requiring given permissions. ARCHIVE_ENTRY_ACL_TYPE_AUDIT Log access attempts by principal which require given permissions. - ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access at‐ - tempts by principal which require + ARCHIVE_ENTRY_ACL_TYPE_ALARM Trigger a system alarm on access + attempts by principal which require given permissions. The tag specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. - ARCHIVE_ENTRY_ACL_GROUP The group specied by the name field. - ARCHIVE_ENTRY_ACL_GROUP_OBJ The group who owns the file. - ARCHIVE_ENTRY_ACL_EVERYONE Any principal who is not file owner or - a member of the owning group. + ARCHIVE_ENTRY_ACL_GROUP The group specified by the name field. + ARCHIVE_ENTRY_ACL_GROUP_OBJ The group which owns the file. + ARCHIVE_ENTRY_ACL_EVERYONE Any principal who is not the file + owner or a member of the owning group. Entries with the ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag store the user and group name in the name string and optionally the user @@ -126,7 +121,7 @@ DESCRIPTION NFSv4 ACE permissions and flags are stored in the same permset bitfield. Some permissions share the same constant and permission character but - have different effect on directories than on files. The following ACE + have different effect on directories than on files. The following ACE permissions are supported: ARCHIVE_ENTRY_ACL_READ_DATA (r) Read data (file). @@ -172,7 +167,7 @@ DESCRIPTION Only inherit, do not apply the permission on the directory itself. ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (n) - Do not propagate inherit flags. Only first-level entries + Do not propagate inherit flags. Only first-level entries inherit ACLs. ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (S) Trigger alarm or audit on successful access. @@ -184,10 +179,10 @@ DESCRIPTION Functions archive_entry_acl_add_entry() and archive_entry_acl_add_entry_w() add a single ACL entry. For the access ACL and non-extended principals, the - classic Unix permissions are updated. An archive entry cannot contain + classic Unix permissions are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. - archive_entry_acl_clear() removes all ACL entries and resets the enumera‐ + archive_entry_acl_clear() removes all ACL entries and resets the enumera- tion pointer. archive_entry_acl_count() counts the ACL entries that have the given type @@ -199,39 +194,37 @@ DESCRIPTION ARCHIVE_ENTRY_ACL_TYPE_DENY ARCHIVE_ENTRY_ACL_TYPE_AUDIT ARCHIVE_ENTRY_ACL_TYPE_ALARM - for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is in‐ - cluded and at least one extended ACL entry is found, the three non-ex‐ - tended ACLs are added. + for NFSv4 ACLs. For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is + included and at least one extended ACL entry is found, the three non- + extended ACLs are added. archive_entry_acl_from_text() and archive_entry_acl_from_text_w() add new - (or merge with existing) ACL entries from (wide) text. The argument type + (or merge with existing) ACL entries from (wide) text. The argument type may take one of the following values: ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT ARCHIVE_ENTRY_ACL_TYPE_NFS4 Supports all formats that can be created with archive_entry_acl_to_text() - or respective archive_entry_acl_to_text_w(). Existing ACL entries are - preserved. To get a clean new ACL from text archive_entry_acl_clear() - must be called first. Entries prefixed with “default:” are treated as + or respectively archive_entry_acl_to_text_w(). Existing ACL entries are + preserved. To get a clean new ACL from text archive_entry_acl_clear() + must be called first. Entries prefixed with ``default:'' are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless type is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable ACL entries - and entries beginning with the ‘#’ character (comments) are skipped. + and entries beginning with the '#' character (comments) are skipped. - archive_entry_acl_next() and archive_entry_acl_next_w() return the next - entry of the ACL list. This functions may only be called after - archive_entry_acl_reset() has indicated the presence of extended ACL en‐ - tries. + archive_entry_acl_next() return the next entry of the ACL list. This + functions may only be called after archive_entry_acl_reset() has indi- + cated the presence of extended ACL entries. archive_entry_acl_reset() prepare reading the list of ACL entries with - archive_entry_acl_next() or archive_entry_acl_next_w(). The function re‐ - turns either 0, if no non-extended ACLs are found. In this case, the ac‐ - cess permissions should be obtained by archive_entry_mode(3) or set using - chmod(2). Otherwise, the function returns the same value as - archive_entry_acl_count(). + archive_entry_acl_next(). The function returns 0 if no non-extended ACLs + are found. In this case, the access permissions should be obtained by + archive_entry_mode(3) or set using chmod(2). Otherwise, the function + returns the same value as archive_entry_acl_count(). archive_entry_acl_to_text() and archive_entry_acl_to_text_w() convert the - ACL entries for the given type into a (wide) string of ACL entries sepa‐ - rated by newline. If the pointer len_p is not NULL, then the function + ACL entries for the given type into a (wide) string of ACL entries sepa- + rated by newline. If the pointer len_p is not NULL, then the function shall return the length of the string (not including the NULL terminator) in the location pointed to by len_p. The flag argument is a bitwise-or. @@ -241,7 +234,7 @@ DESCRIPTION ARCHIVE_ENTRY_ACL_TYPE_DEFAULT Output POSIX.1e default ACLs. ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT - Prefix each default ACL entry with the word “default:”. + Prefix each default ACL entry with the word ``default:''. ARCHIVE_ENTRY_ACL_STYLE_SOLARIS The mask and other ACLs don not contain a double colon. @@ -257,30 +250,31 @@ DESCRIPTION ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA Separate ACL entries with comma instead of newline. - If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are re‐ - turned. It the entry contains POSIX.1e ACLs and none of the flags - ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are spec‐ + If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are + returned. It the entry contains POSIX.1e ACLs and none of the flags + ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are spec- ified, both access and default entries are returned and default entries - are prefixed with “default:”. + are prefixed with ``default:''. - archive_entry_acl_types() get ACL entry types contained in an archive en‐ - try's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this func‐ - tion is a very efficient way to detect if an ACL already contains + archive_entry_acl_types() get ACL entry types contained in an archive + entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this + function is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries. RETURN VALUES - archive_entry_acl_count() and archive_entry_acl_reset() returns the num‐ + archive_entry_acl_count() and archive_entry_acl_reset() returns the num- ber of ACL entries that match the given type mask. For POSIX.1e ACLS if - the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one ex‐ - tended ACL entry exists, the three classic Unix permissions are counted. + the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one + extended ACL entry exists, the three classic Unix permissions are + counted. archive_entry_acl_from_text() and archive_entry_acl_from_text_w() return ARCHIVE_OK if all entries were successfully parsed and ARCHIVE_WARN if one or more entries were invalid or non-parseable. - archive_entry_acl_next() and archive_entry_acl_next_w() return ARCHIVE_OK - on success, ARCHIVE_EOF if no more ACL entries exist and ARCHIVE_WARN if - archive_entry_acl_reset() has not been called first. + archive_entry_acl_next() returns ARCHIVE_OK on success, ARCHIVE_EOF if no + more ACL entries exist and ARCHIVE_WARN if archive_entry_acl_reset() has + not been called first. archive_entry_acl_to_text() returns a string representing the ACL entries matching the given type and flags on success or NULL on error. diff --git a/archivers/libarchive/files/doc/text/archive_entry_linkify.3.txt b/archivers/libarchive/files/doc/text/archive_entry_linkify.3.txt index 6c8a5ddc81b..abbcd61de73 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_linkify.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_linkify.3.txt @@ -3,7 +3,7 @@ ARCHIVE_ENTRY_LINKIFY(3) BSD Library Functions Manual ARCHIVE_ENTRY_LINKIFY(3) NAME archive_entry_linkresolver, archive_entry_linkresolver_new, archive_entry_linkresolver_set_strategy, archive_entry_linkresolver_free, - archive_entry_linkify — hardlink resolver functions + archive_entry_linkify -- hardlink resolver functions LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -27,8 +27,8 @@ SYNOPSIS DESCRIPTION Programs that want to create archives have to deal with hardlinks. - Hardlinks are handled in different ways by the archive formats. The ba‐ - sic strategies are: + Hardlinks are handled in different ways by the archive formats. The + basic strategies are: 1. Ignore hardlinks and store the body for each reference (old cpio, zip). @@ -37,23 +37,23 @@ DESCRIPTION 3. Store the body the last time an inode is seen (new cpio). - The archive_entry_linkresolver functions help by providing a unified in‐ - terface and handling the complexity behind the scene. + The archive_entry_linkresolver functions help by providing a unified + interface and handling the complexity behind the scene. - The archive_entry_linkresolver functions assume that archive_entry in‐ - stances have valid nlinks, inode and device values. The inode and device - value is used to match entries. The nlinks value is used to determined - if all references have been found and if the internal references can be - recycled. + The archive_entry_linkresolver functions assume that archive_entry + instances have valid nlinks, inode and device values. The inode and + device value is used to match entries. The nlinks value is used to + determined if all references have been found and if the internal refer- + ences can be recycled. - The archive_entry_linkresolver_new() function allocates a new link re‐ - solver. The instance can be freed using + The archive_entry_linkresolver_new() function allocates a new link + resolver. The instance can be freed using archive_entry_linkresolver_free(). All deferred entries are flushed and the internal storage is freed. - The archive_entry_linkresolver_set_strategy() function selects the opti‐ - mal hardlink strategy for the given format. The format code can be ob‐ - tained from archive_format(3). The function can be called more than + The archive_entry_linkresolver_set_strategy() function selects the opti- + mal hardlink strategy for the given format. The format code can be + obtained from archive_format(3). The function can be called more than once, but it is recommended to flush all deferred entries first. The archive_entry_linkify() function is the core of @@ -66,16 +66,16 @@ DESCRIPTION 2. For tar like archive formats, *sparse is set to NULL. If *entry is NULL, no action is taken. If the hardlink count of *entry is larger - than 1 and the file type is a regular file or symbolic link, the in‐ - ternal list is searched for a matching inode. If such an inode is + than 1 and the file type is a regular file or symbolic link, the + internal list is searched for a matching inode. If such an inode is found, the link count is decremented and the file size of *entry is set to 0 to notify that no body should be written. If no such inode is found, a copy of the entry is added to the internal cache with a link count reduced by one. 3. For new cpio like archive formats a value for *entry of NULL is used - to flush deferred entries. In that case *entry is set to an arbi‐ - trary deferred entry and the entry itself is removed from the inter‐ + to flush deferred entries. In that case *entry is set to an arbi- + trary deferred entry and the entry itself is removed from the inter- nal list. If the internal list is empty, *entry is set to NULL. In either case, *sparse is set to NULL and the function returns. If the hardlink count of *entry is one or the file type is a directory @@ -83,8 +83,8 @@ DESCRIPTION Otherwise, the internal list is searched for a matching inode. If such an inode is not found, the entry is added to the internal list, both *entry and *sparse are set to NULL and the function returns. - If such an inode is found, the link count is decremented. If it re‐ - mains larger than one, the existing entry on the internal list is + If such an inode is found, the link count is decremented. If it + remains larger than one, the existing entry on the internal list is swapped with *entry after retaining the link count. The existing entry is returned in *entry. If the link count reached one, the new entry is also removed from the internal list and returned in @@ -101,8 +101,8 @@ DESCRIPTION 4. If *sparse is not NULL, archive it. 5. After all entries have been written to disk, call - archive_entry_linkify() with *entry set to NULL and archive the re‐ - turned entry as long as it is not NULL. + archive_entry_linkify() with *entry set to NULL and archive the + returned entry as long as it is not NULL. RETURN VALUES archive_entry_linkresolver_new() returns NULL on malloc(3) failures. diff --git a/archivers/libarchive/files/doc/text/archive_entry_misc.3.txt b/archivers/libarchive/files/doc/text/archive_entry_misc.3.txt index d6d888ad674..7cc96763ada 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_misc.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_misc.3.txt @@ -1,8 +1,8 @@ ARCHIVE_ENTRY_MISC(3) BSD Library Functions Manual ARCHIVE_ENTRY_MISC(3) NAME - archive_entry_symlink_type, archive_entry_set_symlink_type — miscella‐ - neous functions for manipulating properties of archive_entry. + archive_entry_symlink_type, archive_entry_set_symlink_type -- miscella- + neous functions for manipulating properties of archive_entry LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -19,13 +19,13 @@ SYNOPSIS DESCRIPTION The function archive_entry_symlink_type() returns and the function archive_entry_set_symlink_type() sets the type of the symbolic link - stored in an archive entry. These functions have special meaning on oper‐ - ating systems that support multiple symbolic link types (e.g. Microsoft - Windows). + stored in an archive entry. These functions have special meaning on + operating systems that support multiple symbolic link types (e.g. Micro- + soft Windows). Supported values are: - AE_SYMLINK_TYPE_UNDEFINED Symbolic link target type is not defined (de‐ - fault on unix systems) + AE_SYMLINK_TYPE_UNDEFINED Symbolic link target type is not defined + (default on unix systems) AE_SYMLINK_TYPE_FILE Symbolic link points to a file AE_SYMLINK_TYPE_DIRECTORY Symbolic link points to a directory diff --git a/archivers/libarchive/files/doc/text/archive_entry_paths.3.txt b/archivers/libarchive/files/doc/text/archive_entry_paths.3.txt index f6fed2868ee..9e639f86da4 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_paths.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_paths.3.txt @@ -12,7 +12,7 @@ NAME archive_entry_sourcepath, archive_entry_copy_sourcepath, archive_entry_symlink, archive_entry_symlink_w, archive_entry_set_symlink, archive_entry_copy_symlink, - archive_entry_copy_symlink_w, archive_entry_update_symlink_utf8 — func‐ + archive_entry_copy_symlink_w, archive_entry_update_symlink_utf8 -- func- tions for manipulating path names in archive entry descriptions LIBRARY @@ -103,7 +103,7 @@ SYNOPSIS DESCRIPTION Path names supported by archive_entry(3): hardlink Destination of the hardlink. - link Update only. For a symlink, update the destination. Other‐ + link Update only. For a symlink, update the destination. Other- wise, make the entry a hardlink and alter the destination for that. pathname Path in the archive @@ -117,20 +117,20 @@ DESCRIPTION wchar_t * Wide character strings in the current locale. The accessor functions are named XXX_w(). - UTF-8 Unicode strings encoded as UTF-8. This are convience func‐ + UTF-8 Unicode strings encoded as UTF-8. These are convenience func- tions to update both the multibyte and wide character strings at the same time. - The sourcepath is a pure filesystem concept and never stored in an ar‐ + The sourcepath is a pure filesystem concept and never stored in an ar- chive directly. For that reason, it is only available as multibyte string. The link path - is a convience function for conditionally setting hardlink or symlink + is a convenience function for conditionally setting hardlink or symlink destination. It doesn't have a corresponding get accessor function. archive_entry_set_XXX() is an alias for archive_entry_copy_XXX(). SEE ALSO - archive_entry(3) libarchive(3), + archive_entry(3), libarchive(3) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_entry_perms.3.txt b/archivers/libarchive/files/doc/text/archive_entry_perms.3.txt index 3c133af7e34..e5b09ec07b9 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_perms.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_perms.3.txt @@ -10,9 +10,9 @@ NAME archive_entry_copy_gname, archive_entry_copy_gname_w, archive_entry_update_gname_utf8, archive_entry_fflags, archive_entry_fflags_text, archive_entry_set_fflags, - archive_entry_copy_fflags_text, archive_entry_copy_fflags_text_w — func‐ - tions for manipulating ownership and permissions in archive entry de‐ - scriptions + archive_entry_copy_fflags_text, archive_entry_copy_fflags_text_w -- func- + tions for manipulating ownership and permissions in archive entry + descriptions LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -105,7 +105,7 @@ DESCRIPTION permission from the given entry. The corresponding functions archive_entry_set_uid(), archive_entry_set_gid(), and archive_entry_set_perm() store the given user id, group id and permission - in the entry. The permission is also set as side effect of calling + in the entry. The permission is also set as a side effect of calling archive_entry_set_mode(). archive_entry_strmode() returns a string representation of the permission @@ -119,7 +119,7 @@ DESCRIPTION wchar_t * Wide character strings in the current locale. The accessor functions are named XXX_w(). - UTF-8 Unicode strings encoded as UTF-8. This are convience func‐ + UTF-8 Unicode strings encoded as UTF-8. These are convenience func- tions to update both the multibyte and wide character strings at the same time. @@ -133,7 +133,7 @@ DESCRIPTION text, even if it is ill-formed. If you need to canonicalize a textual flags string, you should first set the text form, then request the bitmap form, then use that to set the bitmap form. Setting the bitmap format - will clear the internal text representation and force it to be recon‐ + will clear the internal text representation and force it to be recon- structed when you next request the text form. The bitmap format consists of two integers, one containing bits that @@ -148,22 +148,22 @@ DESCRIPTION The canonical text format is a comma-separated list of flag names. The archive_entry_copy_fflags_text() and archive_entry_copy_fflags_text_w() - functions parse the provided text and sets the internal bitmap values. + functions parse the provided text and set the internal bitmap values. This is a platform-specific operation; names that are not meaningful on the current platform will be ignored. The function returns a pointer to the start of the first name that was not recognized, or NULL if every - name was recognized. Note that every name — including names that follow - an unrecognized name — will be evaluated, and the bitmaps will be set to + name was recognized. Note that every name -- including names that follow + an unrecognized name -- will be evaluated, and the bitmaps will be set to reflect every name that is recognized. (In particular, this differs from strtofflags(3), which stops parsing at the first unrecognized name.) SEE ALSO archive_entry(3), archive_entry_acl(3), archive_read_disk(3), - archive_write_disk(3) libarchive(3), + archive_write_disk(3), libarchive(3) BUGS The platform types uid_t and gid_t are often 16 or 32 bit wide. In this - case it is possible that the ids can not be correctly restored from ar‐ + case it is possible that the ids can not be correctly restored from ar- chives and get truncated. BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_entry_stat.3.txt b/archivers/libarchive/files/doc/text/archive_entry_stat.3.txt index 21e180e50d1..467688f8989 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_stat.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_stat.3.txt @@ -11,7 +11,7 @@ NAME archive_entry_ino_is_set, archive_entry_ino64, archive_entry_set_ino64, archive_entry_nlink, archive_entry_rdev, archive_entry_set_rdev, archive_entry_rdevmajor, archive_entry_set_rdevmajor, - archive_entry_rdevminor, archive_entry_set_rdevminor, — accessor func‐ + archive_entry_rdevminor, archive_entry_set_rdevminor -- accessor func- tions for manipulating archive entry descriptions LIBRARY @@ -113,13 +113,14 @@ SYNOPSIS DESCRIPTION Copying to and from struct stat The function archive_entry_stat() converts the various fields stored in - the archive entry to the format used by stat(2). The return value re‐ - mains valid until either archive_entry_clear() or archive_entry_free() is - called. It is not affected by calls to the set accessor functions. It - currently sets the following values in struct stat: st_atime, st_ctime, - st_dev, st_gid, st_ino, st_mode, st_mtime, st_nlink, st_rdev, st_size, - st_uid. In addition, st_birthtime and high-precision information for - time-related fields will be included on platforms that support it. + the archive entry to the format used by stat(2). The return value + remains valid until either archive_entry_clear() or archive_entry_free() + is called. It is not affected by calls to the set accessor functions. + It currently sets the following values in struct stat: st_atime, + st_ctime, st_dev, st_gid, st_ino, st_mode, st_mtime, st_nlink, st_rdev, + st_size, st_uid. In addition, st_birthtime and high-precision informa- + tion for time-related fields will be included on platforms that support + it. The function archive_entry_copy_stat() copies fields from the platform's struct stat. Fields not provided by struct stat are unchanged. @@ -136,7 +137,7 @@ DESCRIPTION AE_IFDIR Directory AE_IFIFO Named pipe (fifo) Not all file types are supported by all platforms. The constants used by - stat(2) may have different numeric values from the corresponding con‐ + stat(2) may have different numeric values from the corresponding con- stants above. The functions archive_entry_mode() and archive_entry_set_mode() get/set a @@ -151,7 +152,7 @@ DESCRIPTION unset the size, respectively. The number of references (hardlinks) can be obtained by calling - archive_entry_nlinks() and set with archive_entry_set_nlinks(). + archive_entry_nlink() and set with archive_entry_set_nlink(). Identifying unique files The functions archive_entry_dev() and archive_entry_ino64() are used by @@ -166,11 +167,11 @@ DESCRIPTION The inode number can be obtained using archive_entry_ino(). This is a legacy interface that uses the platform ino_t, which may be very small. - To set the inode number, archive_entry_set_ino64() is the preferred in‐ - terface. + To set the inode number, archive_entry_set_ino64() is the preferred + interface. Accessor functions for block and character devices - Block and character devices are characterised either using a device num‐ + Block and character devices are characterised either using a device num- ber or a pair of major and minor number. The combined device number can be obtained with archive_device_rdev() and set with archive_device_set_rdev(). The major and minor numbers are accessed by @@ -183,7 +184,7 @@ DESCRIPTION split form. SEE ALSO - archive_entry_acl(3), archive_entry_perms(3), archive_entry_time(3), - libarchive(3), stat(2) + stat(2), archive_entry_acl(3), archive_entry_perms(3), + archive_entry_time(3), libarchive(3) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_entry_time.3.txt b/archivers/libarchive/files/doc/text/archive_entry_time.3.txt index 227a7aa7792..d2d53284d83 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_time.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_time.3.txt @@ -10,7 +10,7 @@ NAME archive_entry_ctime_is_set, archive_entry_set_ctime, archive_entry_unset_ctime, archive_entry_mtime, archive_entry_mtime_nsec, archive_entry_mtime_is_set, archive_entry_set_mtime, - archive_entry_unset_mtime, — functions for manipulating times in archive + archive_entry_unset_mtime -- functions for manipulating times in archive entry descriptions LIBRARY @@ -95,11 +95,11 @@ DESCRIPTION All timestamp fields are optional. The XXX_unset() functions can be used to mark the corresponding field as missing. The current state can be - queried using XXX_is_set(). Unset time fields have a second and nanosec‐ + queried using XXX_is_set(). Unset time fields have a second and nanosec- ond field of 0. SEE ALSO - archive_entry(3) libarchive(3), + archive_entry(3), libarchive(3) HISTORY The libarchive library first appeared in FreeBSD 5.3. diff --git a/archivers/libarchive/files/doc/text/archive_read.3.txt b/archivers/libarchive/files/doc/text/archive_read.3.txt index b38142e45c9..0481d95c9b7 100644 --- a/archivers/libarchive/files/doc/text/archive_read.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read.3.txt @@ -1,7 +1,7 @@ ARCHIVE_READ(3) BSD Library Functions Manual ARCHIVE_READ(3) NAME - archive_read — functions for reading streaming archives + archive_read -- functions for reading streaming archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -11,9 +11,9 @@ SYNOPSIS DESCRIPTION These functions provide a complete API for reading streaming archives. - The general process is to first create the struct archive object, set op‐ - tions, initialize the reader, iterate over the archive headers and asso‐ - ciated data, then close the archive and release all resources. + The general process is to first create the struct archive object, set + options, initialize the reader, iterate over the archive headers and + associated data, then close the archive and release all resources. Create archive object See archive_read_new(3). @@ -24,10 +24,10 @@ DESCRIPTION Enable filters and formats See archive_read_filter(3) and archive_read_format(3). - You can then modify this object for the desired operations with the vari‐ + You can then modify this object for the desired operations with the vari- ous archive_read_set_XXX() and archive_read_support_XXX() functions. In particular, you will need to invoke appropriate - archive_read_support_XXX() functions to enable the corresponding compres‐ + archive_read_support_XXX() functions to enable the corresponding compres- sion and format support. Note that these latter functions perform two distinct operations: they cause the corresponding support code to be linked into your program, and they enable the corresponding auto-detect @@ -43,7 +43,7 @@ DESCRIPTION See archive_read_open(3). Once you have prepared the struct archive object, you call - archive_read_open() to actually open the archive and prepare it for read‐ + archive_read_open() to actually open the archive and prepare it for read- ing. There are several variants of this function; the most basic expects you to provide pointers to several functions that can provide blocks of bytes from the archive. There are convenience forms that allow you to @@ -58,11 +58,11 @@ DESCRIPTION Each archive entry consists of a header followed by a certain amount of data. You can obtain the next header with archive_read_next_header(), - which returns a pointer to an struct archive_entry structure with infor‐ + which returns a pointer to an struct archive_entry structure with infor- mation about the current archive element. If the entry is a regular file, then the header will be followed by the file data. You can use archive_read_data() (which works much like the read(2) system call) to - read this data from the archive, or archive_read_data_block() which pro‐ + read this data from the archive, or archive_read_data_block() which pro- vides a slightly more efficient interface. You may prefer to use the higher-level archive_read_data_skip(), which reads and discards the data for this entry, archive_read_data_into_fd(), which copies the data to the @@ -80,7 +80,7 @@ DESCRIPTION archive_read_close() to close the archive, then call archive_read_free() to release all resources, including all memory allocated by the library. -EXAMPLE +EXAMPLES The following illustrates basic usage of the library. In this example, the callback functions are simply wrappers around the standard open(2), read(2), and close(2) system calls. @@ -135,10 +135,10 @@ EXAMPLE } SEE ALSO - tar(1), libarchive(3), archive_read_new(3), archive_read_data(3), - archive_read_extract(3), archive_read_filter(3), archive_read_format(3), - archive_read_header(3), archive_read_open(3), - archive_read_set_options(3), archive_util(3), tar(5) + tar(1), archive_read_data(3), archive_read_extract(3), + archive_read_filter(3), archive_read_format(3), archive_read_header(3), + archive_read_new(3), archive_read_open(3), archive_read_set_options(3), + archive_util(3), libarchive(3), tar(5) HISTORY The libarchive library first appeared in FreeBSD 5.3. @@ -147,10 +147,10 @@ AUTHORS The libarchive library was written by Tim Kientzle <kientzle@acm.org>. BUGS - Many traditional archiver programs treat empty files as valid empty ar‐ + Many traditional archiver programs treat empty files as valid empty ar- chives. For example, many implementations of tar(1) allow you to append entries to an empty file. Of course, it is impossible to determine the format of an empty file by inspecting the contents, so this library - treats empty files as having a special “empty” format. + treats empty files as having a special ``empty'' format. BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_add_passphrase.3.txt b/archivers/libarchive/files/doc/text/archive_read_add_passphrase.3.txt index 745ada7c9b4..67d572e1691 100644 --- a/archivers/libarchive/files/doc/text/archive_read_add_passphrase.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_add_passphrase.3.txt @@ -1,8 +1,8 @@ ARCHIVE_READ_ADD_PASS... BSD Library Functions Manual ARCHIVE_READ_ADD_PASS... NAME - archive_read_add_passphrase, archive_read_set_passphrase_callback — func‐ - tions for reading encrypted archives + archive_read_add_passphrase, archive_read_set_passphrase_callback -- + functions for reading encrypted archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -25,11 +25,11 @@ DESCRIPTION returned. archive_read_set_passphrase_callback() - Register callback function that will be invoked to get a - passphrase for decrption after trying all passphrases registered - by the archive_read_add_passphrase() function failed. + Register a callback function that will be invoked to get a + passphrase for decryption after trying all the passphrases regis- + tered by the archive_read_add_passphrase() function failed. SEE ALSO - tar(1), libarchive(3), archive_read(3), archive_read_set_options(3) + tar(1), archive_read(3), archive_read_set_options(3), libarchive(3) BSD September 14, 2014 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_data.3.txt b/archivers/libarchive/files/doc/text/archive_read_data.3.txt index c4a2e412c28..9cda859e5f5 100644 --- a/archivers/libarchive/files/doc/text/archive_read_data.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_data.3.txt @@ -1,8 +1,8 @@ ARCHIVE_READ_DATA(3) BSD Library Functions Manual ARCHIVE_READ_DATA(3) NAME - archive_read_data archive_read_data_block, archive_read_data_skip, - archive_read_data_into_fd — functions for reading streaming archives + archive_read_data, archive_read_data_block, archive_read_data_skip, + archive_read_data_into_fd -- functions for reading streaming archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -27,35 +27,35 @@ DESCRIPTION archive_read_data() Read data associated with the header just read. Internally, this is a convenience function that calls archive_read_data_block() - and fills any gaps with nulls so that callers see a single con‐ + and fills any gaps with nulls so that callers see a single con- tinuous stream of data. archive_read_data_block() Return the next available block of data for this entry. Unlike archive_read_data(), the archive_read_data_block() function avoids copying data and allows you to correctly handle sparse - files, as supported by some archive formats. The library guaran‐ + files, as supported by some archive formats. The library guaran- tees that offsets will increase and that blocks will not overlap. Note that the blocks returned from this function can be much larger than the block size read from disk, due to compression and internal buffer optimizations. archive_read_data_skip() A convenience function that repeatedly calls - archive_read_data_block() to skip all of the data for this ar‐ + archive_read_data_block() to skip all of the data for this ar- chive entry. Note that this function is invoked automatically by - archive_read_next_header2() if the previous entry was not com‐ + archive_read_next_header2() if the previous entry was not com- pletely consumed. archive_read_data_into_fd() A convenience function that repeatedly calls - archive_read_data_block() to copy the entire entry to the pro‐ + archive_read_data_block() to copy the entire entry to the pro- vided file descriptor. RETURN VALUES Most functions return zero on success, non-zero on error. The possible return codes include: ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered), - ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera‐ - tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal er‐ - ror; the archive should be closed immediately). + ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera- + tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal + error; the archive should be closed immediately). archive_read_data() returns a count of bytes actually read or zero at the end of the entry. On error, a value of ARCHIVE_FATAL, ARCHIVE_WARN, or @@ -66,9 +66,8 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_read(3), archive_read_extract(3), - archive_read_filter(3), archive_read_format(3), archive_read_header(3), - archive_read_open(3), archive_read_set_options(3), archive_util(3), - tar(5) + tar(1), archive_read(3), archive_read_extract(3), archive_read_filter(3), + archive_read_format(3), archive_read_header(3), archive_read_open(3), + archive_read_set_options(3), archive_util(3), libarchive(3), tar(5) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_disk.3.txt b/archivers/libarchive/files/doc/text/archive_read_disk.3.txt index c3ff4164843..925fa716f83 100644 --- a/archivers/libarchive/files/doc/text/archive_read_disk.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_disk.3.txt @@ -7,7 +7,7 @@ NAME archive_read_disk_set_symlink_hybrid, archive_read_disk_entry_from_file, archive_read_disk_gname, archive_read_disk_uname, archive_read_disk_set_uname_lookup, archive_read_disk_set_gname_lookup, - archive_read_disk_set_standard_lookup — functions for reading objects + archive_read_disk_set_standard_lookup -- functions for reading objects from disk LIBRARY @@ -67,58 +67,58 @@ DESCRIPTION the following values: ARCHIVE_READDISK_HONOR_NODUMP Skip files and directories with the nodump file attribute - (file flag) set. By default, the nodump file atrribute + (file flag) set. By default, the nodump file attribute is ignored. ARCHIVE_READDISK_MAC_COPYFILE - Mac OS X specific. Read metadata (ACLs and extended at‐ - tributes) with copyfile(3). By default, metadata is read - using copyfile(3). + Mac OS X specific. Read metadata (ACLs and extended + attributes) with copyfile(3). By default, metadata is + read using copyfile(3). ARCHIVE_READDISK_NO_ACL Do not read Access Control Lists. By default, ACLs are read from disk. ARCHIVE_READDISK_NO_FFLAGS Do not read file attributes (file flags). By default, file attributes are read from disk. See chattr(1) - (Linux) or chflags(1) (FreeBSD, Mac OS X) for more infor‐ + (Linux) or chflags(1) (FreeBSD, Mac OS X) for more infor- mation on file attributes. ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS - Do not traverse mount points. By defaut, moint points + Do not traverse mount points. By default, mount points are traversed. ARCHIVE_READDISK_NO_XATTR - Do not read extended file attributes (xattrs). By de‐ - fault, extended file attributes are read from disk. See - xattr(7) (Linux), xattr(2) (Mac OS X), or getextattr(8) - (FreeBSD) for more information on extended file at‐ - tributes. + Do not read extended file attributes (xattrs). By + default, extended file attributes are read from disk. + See xattr(7) (Linux), xattr(2) (Mac OS X), or + getextattr(8) (FreeBSD) for more information on extended + file attributes. ARCHIVE_READDISK_RESTORE_ATIME - Restore access time of traversed files. By default, ac‐ - cess time of traversed files is not restored. + Restore access time of traversed files. By default, + access time of traversed files is not restored. archive_read_disk_set_symlink_logical(), archive_read_disk_set_symlink_physical(), archive_read_disk_set_symlink_hybrid() This sets the mode used for handling symbolic links. The - “logical” mode follows all symbolic links. The “physical” mode - does not follow any symbolic links. The “hybrid” mode currently - behaves identically to the “logical” mode. + ``logical'' mode follows all symbolic links. The ``physical'' + mode does not follow any symbolic links. The ``hybrid'' mode + currently behaves identically to the ``logical'' mode. archive_read_disk_gname(), archive_read_disk_uname() - Returns a user or group name given a gid or uid value. By de‐ - fault, these always return a NULL string. + Returns a user or group name given a gid or uid value. By + default, these always return a NULL string. archive_read_disk_set_gname_lookup(), archive_read_disk_set_uname_lookup() These allow you to override the functions used for user and group name lookups. You may also provide a void * pointer to a private data structure and a cleanup function for that data. The cleanup - function will be invoked when the struct archive object is de‐ - stroyed or when new lookup functions are registered. + function will be invoked when the struct archive object is + destroyed or when new lookup functions are registered. archive_read_disk_set_standard_lookup() This convenience function installs a standard set of user and group name lookup functions. These functions use getpwuid(3) and getgrgid(3) to convert ids to names, defaulting to NULL if the - names cannot be looked up. These functions also implement a sim‐ + names cannot be looked up. These functions also implement a sim- ple memory cache to reduce the number of calls to getpwuid(3) and getgrgid(3). @@ -130,25 +130,25 @@ DESCRIPTION source path will be used.) Information is read from disk using the path name from the struct - archive_entry object. If a file descriptor is provided, some in‐ - formation will be obtained using that file descriptor, on plat‐ + archive_entry object. If a file descriptor is provided, some + information will be obtained using that file descriptor, on plat- forms that support the appropriate system calls. If a pointer to a struct stat is provided, information from that - structure will be used instead of reading from the disk where ap‐ - propriate. This can provide performance benefits in scenarios + structure will be used instead of reading from the disk where + appropriate. This can provide performance benefits in scenarios where struct stat information has already been read from the disk - as a side effect of some other operation. (For example, direc‐ + as a side effect of some other operation. (For example, direc- tory traversal libraries often provide this information.) Where necessary, user and group ids are converted to user and - group names using the currently registered lookup functions + group names using the currently-registered lookup functions above. This affects the file ownership fields and ACL values in the struct archive_entry object. More information about the struct archive object and the overall design of the library can be found in the libarchive(3) overview. -EXAMPLE +EXAMPLES The following illustrates basic usage of the library by showing how to use it to copy an item on disk into an archive. @@ -182,14 +182,14 @@ RETURN VALUES negative error codes for errors. Specific error codes include: ARCHIVE_RETRY for operations that might succeed if retried, ARCHIVE_WARN for unusual conditions that do not prevent further operations, and - ARCHIVE_FATAL for serious errors that make remaining operations impossi‐ + ARCHIVE_FATAL for serious errors that make remaining operations impossi- ble. archive_read_disk_new() returns a pointer to a newly-allocated struct archive object or NULL if the allocation failed for any reason. archive_read_disk_gname() and archive_read_disk_uname() return const char - * pointers to the textual name or NULL if the lookup failed for any rea‐ + * pointers to the textual name or NULL if the lookup failed for any rea- son. The returned pointer points to internal storage that may be reused on the next call to either of these functions; callers should copy the string if they need to continue accessing it. @@ -199,35 +199,35 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - archive_read(3), archive_util(3), archive_write(3), - archive_write_disk(3), tar(1), libarchive(3) + tar(1), archive_read(3), archive_util(3), archive_write(3), + archive_write_disk(3), libarchive(3) HISTORY The libarchive library first appeared in FreeBSD 5.3. The - archive_read_disk interface was added to libarchive 2.6 and first ap‐ - peared in FreeBSD 8.0. + archive_read_disk interface was added to libarchive 2.6 and first + appeared in FreeBSD 8.0. AUTHORS The libarchive library was written by Tim Kientzle <kientzle@FreeBSD.org>. BUGS - The “standard” user name and group name lookup functions are not the de‐ - faults because getgrgid(3) and getpwuid(3) are sometimes too large for - particular applications. The current design allows the application au‐ - thor to use a more compact implementation when appropriate. + The ``standard'' user name and group name lookup functions are not the + defaults because getgrgid(3) and getpwuid(3) are sometimes too large for + particular applications. The current design allows the application + author to use a more compact implementation when appropriate. The full list of metadata read from disk by archive_read_disk_entry_from_file() is necessarily system-dependent. - The archive_read_disk_entry_from_file() function reads as much informa‐ + The archive_read_disk_entry_from_file() function reads as much informa- tion as it can from disk. Some method should be provided to limit this so that clients who do not need ACLs, for instance, can avoid the extra work needed to look up such information. This API should provide a set of methods for walking a directory tree. That would make it a direct parallel of the archive_read(3) API. When - such methods are implemented, the “hybrid” symbolic link mode will make + such methods are implemented, the ``hybrid'' symbolic link mode will make sense. BSD April 3, 2017 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_extract.3.txt b/archivers/libarchive/files/doc/text/archive_read_extract.3.txt index 3f58d112ab1..1cccb511523 100644 --- a/archivers/libarchive/files/doc/text/archive_read_extract.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_extract.3.txt @@ -2,7 +2,7 @@ ARCHIVE_READ_EXTRACT(3) BSD Library Functions Manual ARCHIVE_READ_EXTRACT(3) NAME archive_read_extract, archive_read_extract2, - archive_read_extract_set_progress_callback — functions for reading + archive_read_extract_set_progress_callback -- functions for reading streaming archives LIBRARY @@ -29,11 +29,12 @@ DESCRIPTION archive_write_disk(3) interfaces. The first call to archive_read_extract() creates a restore object using archive_write_disk_new(3) and - archive_write_disk_set_standard_lookup(3), then transparently in‐ - vokes archive_write_disk_set_options(3), archive_write_header(3), - archive_write_data(3), and archive_write_finish_entry(3) to cre‐ - ate the entry on disk and copy data into it. The flags argument - is passed unmodified to archive_write_disk_set_options(3). + archive_write_disk_set_standard_lookup(3), then transparently + invokes archive_write_disk_set_options(3), + archive_write_header(3), archive_write_data(3), and + archive_write_finish_entry(3) to create the entry on disk and + copy data into it. The flags argument is passed unmodified to + archive_write_disk_set_options(3). archive_read_extract2() This is another version of archive_read_extract() that allows you to provide your own restore object. In particular, this allows @@ -45,29 +46,29 @@ DESCRIPTION options yourself. archive_read_extract_set_progress_callback() Sets a pointer to a user-defined callback that can be used for - updating progress displays during extraction. The progress func‐ + updating progress displays during extraction. The progress func- tion will be invoked during the extraction of large regular files. The progress function will be invoked with the pointer - provided to this call. Generally, the data pointed to should in‐ - clude a reference to the archive object and the archive_entry ob‐ - ject so that various statistics can be retrieved for the progress - display. + provided to this call. Generally, the data pointed to should + include a reference to the archive object and the archive_entry + object so that various statistics can be retrieved for the + progress display. RETURN VALUES Most functions return zero on success, non-zero on error. The possible return codes include: ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered), - ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera‐ - tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal er‐ - ror; the archive should be closed immediately). + ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera- + tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal + error; the archive should be closed immediately). ERRORS Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_read(3), archive_read_data(3), - archive_read_filter(3), archive_read_format(3), archive_read_open(3), - archive_read_set_options(3), archive_util(3), tar(5) + tar(1), archive_read(3), archive_read_data(3), archive_read_filter(3), + archive_read_format(3), archive_read_open(3), + archive_read_set_options(3), archive_util(3), libarchive(3), tar(5) BSD February 2, 2012 BSD 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 8aee520f267..9cfb5f85a74 100644 --- a/archivers/libarchive/files/doc/text/archive_read_filter.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_filter.3.txt @@ -7,7 +7,7 @@ NAME archive_read_support_filter_none, 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 + archive_read_support_filter_program_signature -- functions for reading streaming archives LIBRARY @@ -83,14 +83,14 @@ DESCRIPTION specified compression. These functions may fall back on external programs if an appropriate library was not available at build time. Decompression using an external program is usually slower - than decompression through built-in libraries. Note that “none” - is always enabled by default. + than decompression through built-in libraries. Note that + ``none'' is always enabled by default. archive_read_support_filter_all() Enables all available decompression filters. archive_read_support_filter_program() Data is fed through the specified external program before being dearchived. Note that this disables automatic detection of the - compression format, so it makes no sense to specify this in con‐ + compression format, so it makes no sense to specify this in con- junction with any other decompression option. archive_read_support_filter_program_signature() This feeds data through the specified external program but only @@ -109,7 +109,7 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - libarchive(3), archive_read(3), archive_read_data(3), - archive_read_format(3), archive_read_format(3) + archive_read(3), archive_read_data(3), archive_read_format(3), + archive_read_format(3), libarchive(3) BSD August 14, 2014 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_format.3.txt b/archivers/libarchive/files/doc/text/archive_read_format.3.txt index 6e8cbf170d9..c5eb5c7477d 100644 --- a/archivers/libarchive/files/doc/text/archive_read_format.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_format.3.txt @@ -8,7 +8,7 @@ NAME archive_read_support_format_lha, archive_read_support_format_mtree, archive_read_support_format_rar, archive_read_support_format_raw, archive_read_support_format_tar, archive_read_support_format_xar, - archive_read_support_format_zip — functions for reading streaming ar‐ + archive_read_support_format_zip -- functions for reading streaming ar- chives LIBRARY @@ -74,33 +74,33 @@ DESCRIPTION archive_read_support_format_tar(), archive_read_support_format_xar(), archive_read_support_format_zip() - Enables support---including auto-detection code---for the speci‐ + Enables support---including auto-detection code---for the speci- fied archive format. For example, archive_read_support_format_tar() enables support for a variety of standard tar formats, old-style tar, ustar, pax interchange format, and many common variants. archive_read_support_format_all() - Enables support for all available formats except the “raw” format - (see below). + Enables support for all available formats except the ``raw'' for- + mat (see below). archive_read_support_format_by_code() Enables a single format specified by the format code. This can be useful when reading a single archive twice; use - archive_format() after reading the first time and pass the re‐ - sulting code to this function to selectively enable only the nec‐ - essary format support. Note: In statically-linked executables, - this will cause your program to include support for every format. - If executable size is a concern, you may wish to avoid using this - function. + archive_format() after reading the first time and pass the + resulting code to this function to selectively enable only the + necessary format support. Note: In statically-linked executa- + bles, this will cause your program to include support for every + format. If executable size is a concern, you may wish to avoid + using this function. archive_read_support_format_empty() - Enables support for treating empty files as empty archives. Be‐ - cause empty files are valid for several different formats, it is - not possible to accurately determine a format for an empty file - based purely on contents. So empty files are treated by + Enables support for treating empty files as empty archives. + Because empty files are valid for several different formats, it + is not possible to accurately determine a format for an empty + file based purely on contents. So empty files are treated by libarchive as a distinct format. archive_read_support_format_raw() - The “raw” format handler allows libarchive to be used to read ar‐ - bitrary data. It treats any data stream as an archive with a - single entry. The pathname of this entry is “data”; all other + The ``raw'' format handler allows libarchive to be used to read + arbitrary data. It treats any data stream as an archive with a + single entry. The pathname of this entry is ``data''; all other entry fields are unset. This is not enabled by archive_read_support_format_all() in order to avoid erroneous handling of damaged archives. @@ -113,17 +113,17 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_read_data(3), archive_read_filter(3), - archive_read_set_options(3), archive_util(3), tar(5) + tar(1), archive_read_data(3), archive_read_filter(3), + archive_read_set_options(3), archive_util(3), libarchive(3), tar(5) BUGS - Many traditional archiver programs treat empty files as valid empty ar‐ + Many traditional archiver programs treat empty files as valid empty ar- chives. For example, many implementations of tar(1) allow you to append entries to an empty file. Of course, it is impossible to determine the format of an empty file by inspecting the contents, so this library - treats empty files as having a special “empty” format. + treats empty files as having a special ``empty'' format. - Using the “raw” handler together with any other handler will often work + Using the ``raw'' handler together with any other handler will often work but can produce surprising results. BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_free.3.txt b/archivers/libarchive/files/doc/text/archive_read_free.3.txt index 2e8c2efe9bc..ae2ea1988de 100644 --- a/archivers/libarchive/files/doc/text/archive_read_free.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_free.3.txt @@ -1,7 +1,7 @@ ARCHIVE_READ_FREE(3) BSD Library Functions Manual ARCHIVE_READ_FREE(3) NAME - archive_read_close, archive_read_finish, archive_read_free — functions + archive_read_close, archive_read_finish, archive_read_free -- functions for reading streaming archives LIBRARY @@ -25,7 +25,7 @@ DESCRIPTION archive_read_finish() This is a deprecated synonym for archive_read_free(). The new name was introduced with libarchive 3.0. Applications that need - to compile with either libarchive 2 or libarchive 3 should con‐ + to compile with either libarchive 2 or libarchive 3 should con- tinue to use the archive_read_finish() name. Both names will be supported until libarchive 4.0 is released, which is not expected to occur earlier than 2013. @@ -45,8 +45,8 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - libarchive(3), archive_read_new(3), archive_read_data(3), - archive_read_filter(3), archive_read_format(3), archive_read_open(3), - archive_read_set_options(3), archive_util(3) + archive_read_data(3), archive_read_filter(3), archive_read_format(3), + archive_read_new(3), archive_read_open(3), archive_read_set_options(3), + archive_util(3), libarchive(3) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_header.3.txt b/archivers/libarchive/files/doc/text/archive_read_header.3.txt index cd53005947d..0998d35c94b 100644 --- a/archivers/libarchive/files/doc/text/archive_read_header.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_header.3.txt @@ -1,8 +1,8 @@ ARCHIVE_READ_HEADER(3) BSD Library Functions Manual ARCHIVE_READ_HEADER(3) NAME - archive_read_next_header, archive_read_next_header2 — functions for read‐ - ing streaming archives + archive_read_next_header, archive_read_next_header2 -- functions for + reading streaming archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -29,18 +29,17 @@ DESCRIPTION RETURN VALUES These functions return ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered), - ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera‐ - tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal er‐ - ror; the archive should be closed immediately). + ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera- + tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal + error; the archive should be closed immediately). ERRORS Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_read(3), archive_read_data(3), - archive_read_extract(3), archive_read_filter(3), archive_read_format(3), - archive_read_open(3), archive_read_set_options(3), archive_util(3), - tar(5) + tar(1), archive_read(3), archive_read_data(3), archive_read_extract(3), + archive_read_filter(3), archive_read_format(3), archive_read_open(3), + archive_read_set_options(3), archive_util(3), libarchive(3), tar(5) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_new.3.txt b/archivers/libarchive/files/doc/text/archive_read_new.3.txt index 5e518f9ee23..302bedd36bd 100644 --- a/archivers/libarchive/files/doc/text/archive_read_new.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_new.3.txt @@ -1,7 +1,7 @@ ARCHIVE_READ_NEW(3) BSD Library Functions Manual ARCHIVE_READ_NEW(3) NAME - archive_read_new — functions for reading streaming archives + archive_read_new -- functions for reading streaming archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -20,8 +20,8 @@ DESCRIPTION overview manual page for libarchive(3). SEE ALSO - tar(1), libarchive(3), archive_read_data(3), archive_read_filter(3), + tar(1), archive_read_data(3), archive_read_filter(3), archive_read_format(3), archive_read_set_options(3), archive_util(3), - tar(5) + libarchive(3), tar(5) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_open.3.txt b/archivers/libarchive/files/doc/text/archive_read_open.3.txt index a6f74566bce..3960485cee0 100644 --- a/archivers/libarchive/files/doc/text/archive_read_open.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_open.3.txt @@ -3,7 +3,7 @@ ARCHIVE_READ_OPEN(3) BSD Library Functions Manual ARCHIVE_READ_OPEN(3) NAME archive_read_open, archive_read_open2, archive_read_open_fd, archive_read_open_FILE, archive_read_open_filename, - archive_read_open_memory — functions for reading streaming archives + archive_read_open_memory -- functions for reading streaming archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -52,7 +52,7 @@ DESCRIPTION pointer. This function should not be used with tape drives or other devices that require strict I/O blocking. archive_read_open_fd() - Like archive_read_open(), except that it accepts a file descrip‐ + Like archive_read_open(), except that it accepts a file descrip- tor and block size rather than a set of function pointers. Note that the file descriptor will not be automatically closed at end- of-archive. This function is safe for use with tape drives or @@ -60,16 +60,16 @@ DESCRIPTION archive_read_open_file() This is a deprecated synonym for archive_read_open_filename(). archive_read_open_filename() - Like archive_read_open(), except that it accepts a simple file‐ - name and a block size. A NULL filename represents standard in‐ - put. This function is safe for use with tape drives or other + Like archive_read_open(), except that it accepts a simple file- + name and a block size. A NULL filename represents standard + input. This function is safe for use with tape drives or other blocked devices. archive_read_open_memory() Like archive_read_open(), except that it accepts a pointer and size of a block of memory containing the archive data. - A complete description of the struct archive and struct archive_entry ob‐ - jects can be found in the overview manual page for libarchive(3). + A complete description of the struct archive and struct archive_entry + objects can be found in the overview manual page for libarchive(3). CLIENT CALLBACKS The callback functions must match the following prototypes: @@ -88,8 +88,8 @@ CLIENT CALLBACKS The open callback is invoked by archive_open(). It should return ARCHIVE_OK if the underlying file or data source is successfully opened. - If the open fails, it should call archive_set_error() to register an er‐ - ror code and message and return ARCHIVE_FATAL. + If the open fails, it should call archive_set_error() to register an + error code and message and return ARCHIVE_FATAL. The read callback is invoked whenever the library requires raw bytes from the archive. The read callback should read data into a buffer, set the @@ -98,8 +98,8 @@ CLIENT CALLBACKS callback again only after it has consumed this data. The library imposes no constraints on the size of the data blocks returned. On end-of-file, the read callback should return zero. On error, the read callback should - invoke archive_set_error() to register an error code and message and re‐ - turn -1. + invoke archive_set_error() to register an error code and message and + return -1. The skip callback is invoked when the library wants to ignore a block of data. The return value is the number of bytes actually skipped, which @@ -110,7 +110,7 @@ CLIENT CALLBACKS gains when reading uncompressed archives from slow disk drives or other media that can skip quickly. - The close callback is invoked by archive_close when the archive process‐ + The close callback is invoked by archive_close when the archive process- ing is complete. The callback should return ARCHIVE_OK on success. On failure, the callback should invoke archive_set_error() to register an error code and message and return ARCHIVE_FATAL. @@ -123,8 +123,8 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_read(3), archive_read_data(3), - archive_read_filter(3), archive_read_format(3), - archive_read_set_options(3), archive_util(3), tar(5) + tar(1), archive_read(3), archive_read_data(3), archive_read_filter(3), + archive_read_format(3), archive_read_set_options(3), archive_util(3), + libarchive(3), tar(5) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_set_options.3.txt b/archivers/libarchive/files/doc/text/archive_read_set_options.3.txt index 8aa919f2873..ff159a23c24 100644 --- a/archivers/libarchive/files/doc/text/archive_read_set_options.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_set_options.3.txt @@ -2,8 +2,8 @@ ARCHIVE_READ_OPTIONS(3) BSD Library Functions Manual ARCHIVE_READ_OPTIONS(3) NAME archive_read_set_filter_option, archive_read_set_format_option, - archive_read_set_option, archive_read_set_options — functions controlling - options for reading archives + archive_read_set_option, archive_read_set_options -- functions control- + ling options for reading archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -25,14 +25,14 @@ SYNOPSIS archive_read_set_options(struct archive *, const char *options); DESCRIPTION - These functions provide a way for libarchive clients to configure spe‐ + These functions provide a way for libarchive clients to configure spe- cific read modules. archive_read_set_filter_option(), archive_read_set_format_option() Specifies an option that will be passed to currently-registered filters (including decompression filters) or format readers. - If option and value are both NULL, these functions will do noth‐ + If option and value are both NULL, these functions will do noth- ing and ARCHIVE_OK will be returned. If option is NULL but value is not, these functions will do nothing and ARCHIVE_FAILED will be returned. @@ -51,7 +51,7 @@ DESCRIPTION archive_read_set_option() Calls archive_read_set_format_option(), then archive_read_set_filter_option(). If either function returns - ARCHIVE_FATAL, ARCHIVE_FATAL will be returned immediately. Oth‐ + ARCHIVE_FATAL, ARCHIVE_FATAL will be returned immediately. Oth- erwise, greater of the two values will be returned. archive_read_set_options() @@ -68,7 +68,7 @@ DESCRIPTION Modules that do not accept an option with this name will ignore it. option The option will be provided to every module with a value - of “1”. + of ``1''. !option The option will be provided to every module with a NULL value. @@ -77,30 +77,50 @@ DESCRIPTION provided only to modules whose name matches module. OPTIONS + Format cab + hdrcharset + The value is used as a character set name that will be + used when translating file names. + Format cpio + hdrcharset + The value is used as a character set name that will be + used when translating file names. Format iso9660 joliet Support Joliet extensions. Defaults to enabled, use !joliet to disable. rockridge Support RockRidge extensions. Defaults to enabled, use !rockridge to disable. + Format lha + hdrcharset + The value is used as a character set name that will be + used when translating file names. + Format mtree + checkfs + Allow reading information missing from the mtree from the + file system. Disabled by default. + Format rar + hdrcharset + The value is used as a character set name that will be + used when translating file names. Format tar compat-2x Libarchive 2.x incorrectly encoded Unicode filenames on some platforms. This option mimics the libarchive 2.x - filename handling so that such archives can be read cor‐ + filename handling so that such archives can be read cor- rectly. hdrcharset The value is used as a character set name that will be - used when translating filenames. + used when translating file names. mac-ext Support Mac OS metadata extension that records data in special files beginning with a period and underscore. - Defaults to enabled on Mac OS, disabled on other plat‐ + Defaults to enabled on Mac OS, disabled on other plat- forms. Use !mac-ext to disable. read_concatenated_archives Ignore zeroed blocks in the archive, which occurs when multiple tar archives have been concatenated together. - Without this option, only the contents of the first con‐ + Without this option, only the contents of the first con- catenated archive would be read. ERRORS @@ -108,6 +128,6 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_write_set_options(3), archive_read(3) + tar(1), archive_read(3), archive_write_set_options(3), libarchive(3) -BSD February 2, 2012 BSD +BSD January 31, 2020 BSD diff --git a/archivers/libarchive/files/doc/text/archive_util.3.txt b/archivers/libarchive/files/doc/text/archive_util.3.txt index b2deb3d1ad2..77c41bd3b66 100644 --- a/archivers/libarchive/files/doc/text/archive_util.3.txt +++ b/archivers/libarchive/files/doc/text/archive_util.3.txt @@ -5,7 +5,7 @@ NAME archive_copy_error, archive_errno, archive_error_string, archive_file_count, archive_filter_code, archive_filter_count, archive_filter_name, archive_format, archive_format_name, - archive_position, archive_set_error — libarchive utility functions + archive_position, archive_set_error -- libarchive utility functions LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -63,15 +63,15 @@ DESCRIPTION Clears any error information left over from a previous call. Not generally used in client code. archive_compression() - Synonym for archive_filter_code(a,(0)). + Synonym for archive_filter_code(a, 0). archive_compression_name() - Synonym for archive_filter_name(a,(0)). + Synonym for archive_filter_name(a, 0). archive_copy_error() Copies error information from one archive to another. archive_errno() Returns a numeric error code (see errno(2)) indicating the reason - for the most recent error return. Note that this can not be re‐ - liably used to detect whether an error has occurred. It should + for the most recent error return. Note that this can not be + reliably used to detect whether an error has occurred. It should be used only after another libarchive function has returned an error status. archive_error_string() @@ -87,30 +87,30 @@ DESCRIPTION archive_filter_count() for details of the numbering. archive_filter_count() Returns the number of filters in the current pipeline. For read - archive handles, these filters are added automatically by the au‐ - tomatic format detection. For write archive handles, these fil‐ - ters are added by calls to the various - archive_write_add_filter_XXX() functions. Filters in the result‐ + archive handles, these filters are added automatically by the + automatic format detection. For write archive handles, these + filters are added by calls to the various + archive_write_add_filter_XXX() functions. Filters in the result- ing pipeline are numbered so that filter 0 is the filter closest to the format handler. As a convenience, functions that expect a - filter number will accept -1 as a synonym for the highest-num‐ + filter number will accept -1 as a synonym for the highest-num- bered filter. For example, when reading a uuencoded gzipped tar archive, there are three filters: filter 0 is the gunzip filter, filter 1 is the uudecode filter, and filter 2 is the pseudo-filter that wraps the archive read functions. In this case, requesting - archive_position(a,(-1)) would be a synonym for - archive_position(a,(2)) which would return the number of bytes - currently read from the archive, while archive_position(a,(1)) + archive_position(a, -1) would be a synonym for + archive_position(a, 2) which would return the number of bytes + currently read from the archive, while archive_position(a, 1) would return the number of bytes after uudecoding, and - archive_position(a,(0)) would return the number of bytes after + archive_position(a, 0) would return the number of bytes after decompression. archive_filter_name() Returns a textual name identifying the indicated filter. See archive_filter_count() for details of the numbering. archive_format() - Returns a numeric code indicating the format of the current ar‐ + Returns a numeric code indicating the format of the current ar- chive entry. This value is set by a successful call to archive_read_next_header(). Note that it is common for this value to change from entry to entry. For example, a tar archive @@ -121,22 +121,22 @@ DESCRIPTION A textual description of the format of the current entry. archive_position() Returns the number of bytes read from or written to the indicated - filter. In particular, archive_position(a,(0)) returns the num‐ - ber of bytes read or written by the format handler, while - archive_position(a,(-1)) returns the number of bytes read or - written to the archive. See archive_filter_count() for details - of the numbering here. + filter. In particular, archive_position(a, 0) returns the number + of bytes read or written by the format handler, while + archive_position(a, -1) returns the number of bytes read or writ- + ten to the archive. See archive_filter_count() for details of + the numbering here. archive_set_error() Sets the numeric error code and error description that will be returned by archive_errno() and archive_error_string(). This - function should be used within I/O callbacks to set system-spe‐ + function should be used within I/O callbacks to set system-spe- cific error codes and error descriptions. This function accepts a printf-like format string and arguments. However, you should be careful to use only the following printf format specifiers: - “%c”, “%d”, “%jd”, “%jo”, “%ju”, “%jx”, “%ld”, “%lo”, “%lu”, - “%lx”, “%o”, “%u”, “%s”, “%x”, “%%”. Field-width specifiers and - other printf features are not uniformly supported and should not - be used. + ``%c'', ``%d'', ``%jd'', ``%jo'', ``%ju'', ``%jx'', ``%ld'', + ``%lo'', ``%lu'', ``%lx'', ``%o'', ``%u'', ``%s'', ``%x'', + ``%%''. Field-width specifiers and other printf features are not + uniformly supported and should not be used. SEE ALSO archive_read(3), archive_write(3), libarchive(3), printf(3) diff --git a/archivers/libarchive/files/doc/text/archive_write.3.txt b/archivers/libarchive/files/doc/text/archive_write.3.txt index cbafabc5a67..ce77dab21ca 100644 --- a/archivers/libarchive/files/doc/text/archive_write.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write.3.txt @@ -1,7 +1,7 @@ ARCHIVE_WRITE(3) BSD Library Functions Manual ARCHIVE_WRITE(3) NAME - archive_write — functions for creating archives + archive_write -- functions for creating archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -25,7 +25,7 @@ DESCRIPTION See archive_write_filter(3), archive_write_format(3) and archive_write_blocksize(3). - You can then modify this object for the desired operations with the vari‐ + You can then modify this object for the desired operations with the vari- ous archive_write_set_XXX() functions. In particular, you will need to invoke appropriate archive_write_add_XXX() and archive_write_set_XXX() functions to enable the corresponding compression and format support. @@ -38,8 +38,8 @@ DESCRIPTION Once you have prepared the struct archive object, you call archive_write_open() to actually open the archive and prepare it for - writing. There are several variants of this function; the most basic ex‐ - pects you to provide pointers to several functions that can provide + writing. There are several variants of this function; the most basic + expects you to provide pointers to several functions that can provide blocks of bytes from the archive. There are convenience forms that allow you to specify a filename, file descriptor, FILE * object, or a block of memory from which to write the archive data. @@ -57,12 +57,12 @@ DESCRIPTION Release resources See archive_write_free(3). - After all entries have been written, use the archive_write_free() func‐ + After all entries have been written, use the archive_write_free() func- tion to release all resources. -EXAMPLE - The following sketch illustrates basic usage of the library. In this ex‐ - ample, the callback functions are simply wrappers around the standard +EXAMPLES + The following sketch illustrates basic usage of the library. In this + example, the callback functions are simply wrappers around the standard open(2), write(2), and close(2) system calls. #ifdef __linux__ @@ -161,7 +161,7 @@ EXAMPLE } SEE ALSO - tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5), + tar(1), archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5) HISTORY @@ -173,20 +173,20 @@ AUTHORS BUGS There are many peculiar bugs in historic tar implementations that may cause certain programs to reject archives written by this library. For - example, several historic implementations calculated header checksums in‐ - correctly and will thus reject valid archives; GNU tar does not fully + example, several historic implementations calculated header checksums + incorrectly and will thus reject valid archives; GNU tar does not fully support pax interchange format; some old tar implementations required specific field terminations. The default pax interchange format eliminates most of the historic tar - limitations and provides a generic key/value attribute facility for ven‐ + limitations and provides a generic key/value attribute facility for ven- dor-defined extensions. One oversight in POSIX is the failure to provide a standard attribute for large device numbers. This library uses - “SCHILY.devminor” and “SCHILY.devmajor” for device numbers that exceed - the range supported by the backwards-compatible ustar header. These keys - are compatible with Joerg Schilling's star archiver. Other implementa‐ - tions may not recognize these keys and will thus be unable to correctly - restore device nodes with large device numbers from archives created by - this library. + ``SCHILY.devminor'' and ``SCHILY.devmajor'' for device numbers that + exceed the range supported by the backwards-compatible ustar header. + These keys are compatible with Joerg Schilling's star archiver. Other + implementations may not recognize these keys and will thus be unable to + correctly restore device nodes with large device numbers from archives + created by this library. BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_blocksize.3.txt b/archivers/libarchive/files/doc/text/archive_write_blocksize.3.txt index d8cf943c55f..ee161af0a28 100644 --- a/archivers/libarchive/files/doc/text/archive_write_blocksize.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_blocksize.3.txt @@ -3,7 +3,7 @@ ARCHIVE_WRITE_BLOCKSI... BSD Library Functions Manual ARCHIVE_WRITE_BLOCKSI... NAME archive_write_get_bytes_per_block, archive_write_set_bytes_per_block, archive_write_get_bytes_in_last_block, - archive_write_set_bytes_in_last_block — functions for creating archives + archive_write_set_bytes_in_last_block -- functions for creating archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -43,11 +43,11 @@ DESCRIPTION the other blocks. Otherwise, the final block will be padded to a multiple of this size. In particular, setting it to 1 will cause the final block to not be padded. For compressed output, any - padding generated by this option is applied only after the com‐ + padding generated by this option is applied only after the com- pression. The uncompressed data is always unpadded. The default is to pad the last block to the full block size (note that archive_write_open_filename() will set this based on the file - type). Unlike the other “set” functions, this function can be + type). Unlike the other ``set'' functions, this function can be called after the archive is opened. archive_write_get_bytes_in_last_block() @@ -68,7 +68,7 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5), + tar(1), archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_data.3.txt b/archivers/libarchive/files/doc/text/archive_write_data.3.txt index dc65e08dd80..b152279dabd 100644 --- a/archivers/libarchive/files/doc/text/archive_write_data.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_data.3.txt @@ -1,8 +1,8 @@ ARCHIVE_WRITE_DATA(3) BSD Library Functions Manual ARCHIVE_WRITE_DATA(3) NAME - archive_write_data, archive_write_data_block — functions for creating ar‐ - chives + archive_write_data, archive_write_data_block -- functions for creating + archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -26,7 +26,7 @@ DESCRIPTION like archive_write_data() except that it performs a seek on the file being written to the specified offset before writing the data. This is useful when restoring sparse files from archive - formats that support sparse files. Returns number of bytes writ‐ + formats that support sparse files. Returns number of bytes writ- ten or -1 on error. (Note: This is currently not supported for archive_write handles, only for archive_write_disk handles. @@ -39,14 +39,14 @@ ERRORS archive_errno() and archive_error_string() functions. BUGS - In libarchive 3.x, this function sometimes returns zero on success in‐ - stead of returning the number of bytes written. Specifically, this oc‐ - curs when writing to an archive_write_disk handle. Clients should treat - any value less than zero as an error and consider any non-negative value - as success. + In libarchive 3.x, this function sometimes returns zero on success + instead of returning the number of bytes written. Specifically, this + occurs when writing to an archive_write_disk handle. Clients should + treat any value less than zero as an error and consider any non-negative + value as success. SEE ALSO - tar(1), libarchive(3), archive_write_finish_entry(3), - archive_write_set_options(3), cpio(5), mtree(5), tar(5) + tar(1), archive_write_finish_entry(3), archive_write_set_options(3), + libarchive(3), cpio(5), mtree(5), tar(5) BSD February 28, 2017 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_disk.3.txt b/archivers/libarchive/files/doc/text/archive_write_disk.3.txt index 1c21375cfe9..d27016e61d5 100644 --- a/archivers/libarchive/files/doc/text/archive_write_disk.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_disk.3.txt @@ -4,7 +4,7 @@ NAME archive_write_disk_new, archive_write_disk_set_options, archive_write_disk_set_skip_file, archive_write_disk_set_group_lookup, archive_write_disk_set_standard_lookup, - archive_write_disk_set_user_lookup — functions for creating objects on + archive_write_disk_set_user_lookup -- functions for creating objects on disk LIBRARY @@ -37,13 +37,13 @@ SYNOPSIS DESCRIPTION These functions provide a complete API for creating objects on disk from - struct archive_entry descriptions. They are most naturally used when ex‐ - tracting objects from an archive using the archive_read() interface. The - general process is to read struct archive_entry objects from an archive, - then write those objects to a struct archive object created using the - archive_write_disk() family functions. This interface is deliberately - very similar to the archive_write() interface used to write objects to a - streaming archive. + struct archive_entry descriptions. They are most naturally used when + extracting objects from an archive using the archive_read() interface. + The general process is to read struct archive_entry objects from an ar- + chive, then write those objects to a struct archive object created using + the archive_write_disk() family functions. This interface is deliber- + ately very similar to the archive_write() interface used to write objects + to a streaming archive. archive_write_disk_new() Allocates and initializes a struct archive object suitable for @@ -52,79 +52,84 @@ DESCRIPTION archive_write_disk_set_skip_file() Records the device and inode numbers of a file that should not be overwritten. This is typically used to ensure that an extraction - process does not overwrite the archive from which objects are be‐ - ing read. This capability is technically unnecessary but can be - a significant performance optimization in practice. + process does not overwrite the archive from which objects are + being read. This capability is technically unnecessary but can + be a significant performance optimization in practice. archive_write_disk_set_options() The options field consists of a bitwise OR of one or more of the following values: ARCHIVE_EXTRACT_ACL - Attempt to restore Access Control Lists. By default, ex‐ - tended ACLs are ignored. + Attempt to restore Access Control Lists. By default, + extended ACLs are ignored. ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS Before removing a file system object prior to replacing - it, clear platform-specific file flags which might pre‐ + it, clear platform-specific file flags which might pre- vent its removal. ARCHIVE_EXTRACT_FFLAGS - Attempt to restore file attributes (file flags). By de‐ - fault, file attributes are ignored. See chattr(1) - (Linux) or chflags(1) (FreeBSD, Mac OS X) for more infor‐ + Attempt to restore file attributes (file flags). By + default, file attributes are ignored. See chattr(1) + (Linux) or chflags(1) (FreeBSD, Mac OS X) for more infor- mation on file attributes. ARCHIVE_EXTRACT_MAC_METADATA - Mac OS X specific. Restore metadata using copyfile(3). + Mac OS X specific. Restore metadata using copyfile(3). By default, copyfile(3) metadata is ignored. ARCHIVE_EXTRACT_NO_OVERWRITE - Existing files on disk will not be overwritten. By de‐ - fault, existing regular files are truncated and overwrit‐ - ten; existing directories will have their permissions up‐ - dated; other pre-existing objects are unlinked and recre‐ - ated from scratch. + Existing files on disk will not be overwritten. By + default, existing regular files are truncated and over- + written; existing directories will have their permissions + updated; other pre-existing objects are unlinked and + recreated from scratch. ARCHIVE_EXTRACT_OWNER The user and group IDs should be set on the restored - file. By default, the user and group IDs are not re‐ - stored. + file. By default, the user and group IDs are not + restored. ARCHIVE_EXTRACT_PERM Full permissions (including SGID, SUID, and sticky bits) should be restored exactly as specified, without obeying the current umask. Note that SUID and SGID bits can only be restored if the user and group ID of the object on - disk are correct. If ARCHIVE_EXTRACT_OWNER is not speci‐ + disk are correct. If ARCHIVE_EXTRACT_OWNER is not speci- fied, then SUID and SGID bits will only be restored if the default user and group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed. + ARCHIVE_EXTRACT_SAFE_WRITES + Extract files atomically, by first creating a unique tem- + porary file and then renaming it to its required destina- + tion name. This avoids a race where an application might + see a partial file (or no file) during extraction. ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS Refuse to extract an absolute path. The default is to not refuse such paths. ARCHIVE_EXTRACT_SECURE_NODOTDOT - Refuse to extract a path that contains a .. element any‐ + Refuse to extract a path that contains a .. element any- where within it. The default is to not refuse such - paths. Note that paths ending in .. always cause an er‐ - ror, regardless of this flag. + paths. Note that paths ending in .. always cause an + error, regardless of this flag. ARCHIVE_EXTRACT_SECURE_SYMLINKS Refuse to extract any object whose final location would be altered by a symlink on disk. This is intended to - help guard against a variety of mischief caused by ar‐ + help guard against a variety of mischief caused by ar- chives that (deliberately or otherwise) extract files outside of the current directory. The default is not to perform this check. If ARCHIVE_EXTRACT_SPARSE Scan data for blocks of NUL bytes and try to recreate - them with holes. This results in sparse files, indepen‐ + them with holes. This results in sparse files, indepen- dent of whether the archive format supports or uses them. ARCHIVE_EXTRACT_UNLINK is specified together with this option, the library will remove any intermediate symlinks it finds and return an error only if such symlink could not be removed. ARCHIVE_EXTRACT_TIME - The timestamps (mtime, ctime, and atime) should be re‐ - stored. By default, they are ignored. Note that restor‐ - ing of atime is not currently supported. + The timestamps (mtime, ctime, and atime) should be + restored. By default, they are ignored. Note that + restoring of atime is not currently supported. ARCHIVE_EXTRACT_UNLINK - Existing files on disk will be unlinked before any at‐ - tempt to create them. In some cases, this can prove to + Existing files on disk will be unlinked before any + attempt to create them. In some cases, this can prove to be a significant performance improvement. By default, existing files are truncated and rewritten, but the file is not recreated. In particular, the default behavior @@ -142,7 +147,7 @@ DESCRIPTION describe the ownership of the file itself and also appear in ACL lists. By default, the library uses the ids and ignores the names, but this can be overridden by registering user and group - lookup functions. To register, you must provide a lookup func‐ + lookup functions. To register, you must provide a lookup func- tion which accepts both a name and id and returns a suitable id. You may also provide a void * pointer to a private data structure and a cleanup function for that data. The cleanup function will @@ -152,7 +157,7 @@ DESCRIPTION This convenience function installs a standard set of user and group lookup functions. These functions use getpwnam(3) and getgrnam(3) to convert names to ids, defaulting to the ids if the - names cannot be looked up. These functions also implement a sim‐ + names cannot be looked up. These functions also implement a sim- ple memory cache to reduce the number of calls to getpwnam(3) and getgrnam(3). More information about the struct archive object and the overall design @@ -164,7 +169,7 @@ RETURN VALUES non-zero error codes for errors. Specific error codes include: ARCHIVE_RETRY for operations that might succeed if retried, ARCHIVE_WARN for unusual conditions that do not prevent further operations, and - ARCHIVE_FATAL for serious errors that make remaining operations impossi‐ + ARCHIVE_FATAL for serious errors that make remaining operations impossi- ble. archive_write_disk_new() returns a pointer to a newly-allocated struct @@ -178,12 +183,12 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - archive_read(3), archive_write(3), tar(1), libarchive(3) + tar(1), archive_read(3), archive_write(3), libarchive(3) HISTORY The libarchive library first appeared in FreeBSD 5.3. The - archive_write_disk interface was added to libarchive 2.0 and first ap‐ - peared in FreeBSD 6.3. + archive_write_disk interface was added to libarchive 2.0 and first + appeared in FreeBSD 6.3. AUTHORS The libarchive library was written by Tim Kientzle <kientzle@acm.org>. @@ -191,13 +196,13 @@ AUTHORS BUGS Directories are actually extracted in two distinct phases. Directories are created during archive_write_header(), but final permissions are not - set until archive_write_close(). This separation is necessary to cor‐ - rectly handle borderline cases such as a non-writable directory contain‐ + set until archive_write_close(). This separation is necessary to cor- + rectly handle borderline cases such as a non-writable directory contain- ing files, but can cause unexpected results. In particular, directory permissions are not fully restored until the archive is closed. If you use chdir(2) to change the current directory between calls to archive_read_extract() or before calling archive_read_close(), you may - confuse the permission-setting logic with the result that directory per‐ + confuse the permission-setting logic with the result that directory per- missions are restored incorrectly. The library attempts to create objects with filenames longer than @@ -212,8 +217,8 @@ BUGS with a single request. Of course, this does not work if the ARCHIVE_EXTRACT_NODOTDOT option is specified. - Implicit directories are always created obeying the current umask. Ex‐ - plicit objects are created obeying the current umask unless + Implicit directories are always created obeying the current umask. + Explicit objects are created obeying the current umask unless ARCHIVE_EXTRACT_PERM is specified, in which case they current umask is ignored. @@ -223,12 +228,12 @@ BUGS only if the user and group of the final object happen to match those specified in the entry. - The “standard” user-id and group-id lookup functions are not the defaults - because getgrnam(3) and getpwnam(3) are sometimes too large for particu‐ - lar applications. The current design allows the application author to - use a more compact implementation when appropriate. + The ``standard'' user-id and group-id lookup functions are not the + defaults because getgrnam(3) and getpwnam(3) are sometimes too large for + particular applications. The current design allows the application + author to use a more compact implementation when appropriate. There should be a corresponding archive_read_disk interface that walks a directory hierarchy and returns archive entry objects. -BSD April 3, 2017 BSD +BSD January 19, 2020 BSD 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 03006fa6abb..341c8bffb2f 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,7 @@ 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, archive_write_add_filter_zstd, — functions + archive_write_add_filter_xz, archive_write_add_filter_zstd -- functions enabling output filters LIBRARY @@ -79,7 +79,7 @@ DESCRIPTION always properly blocked. archive_write_add_filter_none() - This is never necessary. It is provided only for backwards com‐ + This is never necessary. It is provided only for backwards com- patibility. archive_write_add_filter_program() @@ -95,7 +95,7 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_write(3), archive_write_format(3), - archive_write_set_options(3), cpio(5), mtree(5), tar(5) + tar(1), archive_write(3), archive_write_format(3), + archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5) BSD August 14, 2014 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_finish_entry.3.txt b/archivers/libarchive/files/doc/text/archive_write_finish_entry.3.txt index e4c9ec79627..165a60dc2ba 100644 --- a/archivers/libarchive/files/doc/text/archive_write_finish_entry.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_finish_entry.3.txt @@ -1,7 +1,7 @@ ARCHIVE_WRITE_FINISH_... BSD Library Functions Manual ARCHIVE_WRITE_FINISH_... NAME - archive_write_finish_entry — functions for creating archives + archive_write_finish_entry -- functions for creating archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -13,17 +13,17 @@ SYNOPSIS archive_write_finish_entry(struct archive *); DESCRIPTION - Close out the entry just written. In particular, this writes out the fi‐ - nal padding required by some formats. Ordinarily, clients never need to - call this, as it is called automatically by archive_write_header() and + Close out the entry just written. In particular, this writes out the + final padding required by some formats. Ordinarily, clients never need + to call this, as it is called automatically by archive_write_header() and archive_write_close() as needed. For archive_write_disk handles, this flushes pending file attribute changes like modification time. RETURN VALUES This function returns ARCHIVE_OK on success, or one of several non-zero error codes for errors. Specific error codes include: ARCHIVE_RETRY for - operations that might succeed if retried, ARCHIVE_WARN for unusual condi‐ - tions that do not prevent further operations, and ARCHIVE_FATAL for seri‐ + operations that might succeed if retried, ARCHIVE_WARN for unusual condi- + tions that do not prevent further operations, and ARCHIVE_FATAL for seri- ous errors that make remaining operations impossible. ERRORS @@ -31,7 +31,7 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_write_data(3), - archive_write_set_options(3), cpio(5), mtree(5), tar(5) + tar(1), archive_write_data(3), archive_write_set_options(3), + libarchive(3), cpio(5), mtree(5), tar(5) BSD February 28, 2017 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_format.3.txt b/archivers/libarchive/files/doc/text/archive_write_format.3.txt index 1fa0ad1dc82..e45c1e58168 100644 --- a/archivers/libarchive/files/doc/text/archive_write_format.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_format.3.txt @@ -14,7 +14,7 @@ NAME archive_write_set_format_shar, archive_write_set_format_shar_dump, archive_write_set_format_ustar, archive_write_set_format_v7tar, archive_write_set_format_warc, archive_write_set_format_xar, - archive_write_set_format_zip, — functions for creating archives + archive_write_set_format_zip -- functions for creating archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -109,7 +109,7 @@ DESCRIPTION archive_write_set_format_filter_by_ext(), archive_write_set_format_filter_by_ext_def() - Sets both filters and format based on the output filename. Sup‐ + Sets both filters and format based on the output filename. Sup- ported extensions: .7z, .zip, .jar, .cpio, .iso, .a, .ar, .tar, .tgz, .tar.gz, .tar.bz2, .tar.xz @@ -128,7 +128,7 @@ DESCRIPTION archive_write_set_format_ustar() archive_write_set_format_v7tar() archive_write_set_format_warc() archive_write_set_format_xar() archive_write_set_format_zip() - Set the format as specified. More details on the formats sup‐ + Set the format as specified. More details on the formats sup- ported by libarchive can be found in the libarchive-formats(5) manual page. @@ -140,7 +140,7 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_write(3), archive_write_set_options(3), + tar(1), archive_write(3), archive_write_set_options(3), libarchive(3), cpio(5), libarchive-formats(5), mtree(5), tar(5) BSD February 14, 2013 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_free.3.txt b/archivers/libarchive/files/doc/text/archive_write_free.3.txt index b275b67a277..3e4703d94f2 100644 --- a/archivers/libarchive/files/doc/text/archive_write_free.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_free.3.txt @@ -2,7 +2,7 @@ ARCHIVE_WRITE_FREE(3) BSD Library Functions Manual ARCHIVE_WRITE_FREE(3) NAME archive_write_fail, archive_write_close, archive_write_finish, - archive_write_free — functions for creating archives + archive_write_free -- functions for creating archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -28,7 +28,7 @@ DESCRIPTION being unusable; after calling this function, the only call that can succeed is archive_write_free() to release the resources. This can be used to speed recovery when the archive creation must - be aborted. Note that the created archive is likely to be mal‐ + be aborted. Note that the created archive is likely to be mal- formed in this case; archive_write_close() @@ -38,8 +38,8 @@ DESCRIPTION This is a deprecated synonym for archive_write_free(). archive_write_free() - Invokes archive_write_close() if necessary, then releases all re‐ - sources. If you need detailed information about + Invokes archive_write_close() if necessary, then releases all + resources. If you need detailed information about archive_write_close() failures, you should be careful to call it separately, as you cannot obtain error information after archive_write_free() returns. @@ -52,7 +52,7 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5), + tar(1), archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_header.3.txt b/archivers/libarchive/files/doc/text/archive_write_header.3.txt index 4b464330378..9989271dbb2 100644 --- a/archivers/libarchive/files/doc/text/archive_write_header.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_header.3.txt @@ -1,7 +1,7 @@ ARCHIVE_WRITE_HEADER(3) BSD Library Functions Manual ARCHIVE_WRITE_HEADER(3) NAME - archive_write_header — functions for creating archives + archive_write_header -- functions for creating archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -14,14 +14,14 @@ SYNOPSIS DESCRIPTION Build and write a header using the data in the provided struct - archive_entry structure. See archive_entry(3) for information on creat‐ + archive_entry structure. See archive_entry(3) for information on creat- ing and populating struct archive_entry objects. RETURN VALUES This function returns ARCHIVE_OK on success, or one of the following on error: ARCHIVE_RETRY for operations that might succeed if retried, - ARCHIVE_WARN for unusual conditions that do not prevent further opera‐ - tions, and ARCHIVE_FATAL for serious errors that make remaining opera‐ + ARCHIVE_WARN for unusual conditions that do not prevent further opera- + tions, and ARCHIVE_FATAL for serious errors that make remaining opera- tions impossible. ERRORS @@ -29,7 +29,7 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5), + tar(1), archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_new.3.txt b/archivers/libarchive/files/doc/text/archive_write_new.3.txt index 04cfd976173..5b8ac3c10d0 100644 --- a/archivers/libarchive/files/doc/text/archive_write_new.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_new.3.txt @@ -1,7 +1,7 @@ ARCHIVE_WRITE_NEW(3) BSD Library Functions Manual ARCHIVE_WRITE_NEW(3) NAME - archive_write_new — functions for creating archives + archive_write_new -- functions for creating archives LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -20,7 +20,7 @@ DESCRIPTION overview manual page for libarchive(3). SEE ALSO - tar(1), libarchive(3), archive_write(3), archive_write_set_options(3), + tar(1), archive_write(3), archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_open.3.txt b/archivers/libarchive/files/doc/text/archive_write_open.3.txt index 38ad962fcf4..59cfa610408 100644 --- a/archivers/libarchive/files/doc/text/archive_write_open.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_open.3.txt @@ -2,7 +2,7 @@ ARCHIVE_WRITE_OPEN(3) BSD Library Functions Manual ARCHIVE_WRITE_OPEN(3) NAME archive_write_open, archive_write_open_fd, archive_write_open_FILE, - archive_write_open_filename, archive_write_open_memory — functions for + archive_write_open_filename, archive_write_open_memory -- functions for creating archives LIBRARY @@ -33,9 +33,9 @@ DESCRIPTION archive_write_open() Freeze the settings, open the archive, and prepare for writing entries. This is the most generic form of this function, which - accepts pointers to three callback functions which will be in‐ - voked by the compression layer to write the constructed archive. - This does not alter the default archive padding. + accepts pointers to three callback functions which will be + invoked by the compression layer to write the constructed ar- + chive. This does not alter the default archive padding. archive_write_open_fd() A convenience form of archive_write_open() that accepts a file @@ -52,16 +52,16 @@ DESCRIPTION A deprecated synonym for archive_write_open_filename(). archive_write_open_filename() - A convenience form of archive_write_open() that accepts a file‐ - name. A NULL argument indicates that the output should be writ‐ - ten to standard output; an argument of “-” will open a file with - that name. If you have not invoked + A convenience form of archive_write_open() that accepts a file- + name. A NULL argument indicates that the output should be writ- + ten to standard output; an argument of ``-'' will open a file + with that name. If you have not invoked archive_write_set_bytes_in_last_block(), then archive_write_open_filename() will adjust the last-block padding depending on the file: it will enable padding when writing to standard output or to a character or block device node, it will - disable padding otherwise. You can override this by manually in‐ - voking archive_write_set_bytes_in_last_block() before calling + disable padding otherwise. You can override this by manually + invoking archive_write_set_bytes_in_last_block() before calling archive_write_open(). The archive_write_open_filename() function is safe for use with tape drives or other block-oriented devices. @@ -70,8 +70,8 @@ DESCRIPTION to a block of memory that will receive the archive. The final size_t * argument points to a variable that will be updated after each write to reflect how much of the buffer is currently in use. - You should be careful to ensure that this variable remains allo‐ - cated until after the archive is closed. This function will dis‐ + You should be careful to ensure that this variable remains allo- + cated until after the archive is closed. This function will dis- able padding unless you have specifically set the block size. More information about the struct archive object and the overall design of the library can be found in the libarchive(3) overview. @@ -81,7 +81,7 @@ DESCRIPTION for writes or the end-of-file padding behavior. CLIENT CALLBACKS - To use this library, you will need to define and register callback func‐ + To use this library, you will need to define and register callback func- tions that will be invoked to write data to the resulting archive. These functions are registered by calling archive_write_open(): @@ -90,14 +90,14 @@ CLIENT CALLBACKS The open callback is invoked by archive_write_open(). It should return ARCHIVE_OK if the underlying file or data source is successfully opened. - If the open fails, it should call archive_set_error() to register an er‐ - ror code and message and return ARCHIVE_FATAL. + If the open fails, it should call archive_set_error() to register an + error code and message and return ARCHIVE_FATAL. typedef la_ssize_t archive_write_callback(struct archive *, void *client_data, const void *buffer, size_t length) The write callback is invoked whenever the library needs to write raw - bytes to the archive. For correct blocking, each call to the write call‐ + bytes to the archive. For correct blocking, each call to the write call- back function should translate into a single write(2) system call. This is especially critical when writing archives to tape drives. On success, the write callback should return the number of bytes actually written. @@ -107,7 +107,7 @@ CLIENT CALLBACKS typedef int archive_close_callback(struct archive *, void *client_data) - The close callback is invoked by archive_close when the archive process‐ + The close callback is invoked by archive_close when the archive process- ing is complete. The callback should return ARCHIVE_OK on success. On failure, the callback should invoke archive_set_error() to register an error code and message and return ARCHIVE_FATAL. @@ -128,8 +128,8 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_write(3), archive_write_blocksize(3), + tar(1), archive_write(3), archive_write_blocksize(3), archive_write_filter(3), archive_write_format(3), archive_write_new(3), - archive_write_set_options(3), cpio(5), mtree(5), tar(5) + archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt b/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt index 9bf03e2e456..26d2a67572c 100644 --- a/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt @@ -2,7 +2,7 @@ ARCHIVE_WRITE_OPTIONS(3) BSD Library Functions Manual ARCHIVE_WRITE_OPTIONS(3) NAME archive_write_set_filter_option, archive_write_set_format_option, - archive_write_set_option, archive_write_set_options — functions control‐ + archive_write_set_option, archive_write_set_options -- functions control- ling options for writing archives LIBRARY @@ -25,14 +25,15 @@ SYNOPSIS archive_write_set_options(struct archive *, const char *options); DESCRIPTION - These functions provide a way for libarchive clients to configure spe‐ + These functions provide a way for libarchive clients to configure spe- cific write modules. archive_write_set_filter_option(), archive_write_set_format_option() - Specifies an option that will be passed to currently-registered - filters (including decompression filters) or format readers. + Specifies an option that will be passed to the currently-regis- + tered filters (including decompression filters) or format read- + ers. - If option and value are both NULL, these functions will do noth‐ + If option and value are both NULL, these functions will do noth- ing and ARCHIVE_OK will be returned. If option is NULL but value is not, these functions will do nothing and ARCHIVE_FAILED will be returned. @@ -53,8 +54,8 @@ DESCRIPTION archive_write_set_option() Calls archive_write_set_format_option(), then archive_write_set_filter_option(). If either function returns - ARCHIVE_FATAL, ARCHIVE_FATAL will be returned immediately. Oth‐ - erwise, greater of the two values will be returned. + ARCHIVE_FATAL, ARCHIVE_FATAL will be returned immediately. Oth- + erwise, the greater of the two values will be returned. archive_write_set_options() options is a comma-separated list of options. If options is NULL @@ -66,7 +67,7 @@ DESCRIPTION Modules that do not accept an option with this name will ignore it. option The option will be provided to every module with a value - of “1”. + of ``1''. !option The option will be provided to every module with a NULL value. @@ -75,28 +76,91 @@ DESCRIPTION provided only to modules whose name matches module. OPTIONS + Filter b64encode + mode The value is interpreted as octal digits specifying the + file mode. + name The value specifies the file name. + Filter bzip2 + compression-level + The value is interpreted as a decimal integer specifying + the bzip2 compression level. Supported values are from 1 + to 9. Filter gzip compression-level The value is interpreted as a decimal integer specifying - the gzip compression level. + the gzip compression level. Supported values are from 0 + to 9. + timestamp + Store timestamp. This is enabled by default. + Filter lrzip + compression=type + Use type as compression method. Supported values are + ``bzip2'', ``gzipi'', ``lzo'' (ultra fast), and ``zpaq'' + (best, extremely slow). + compression-level + The value is interpreted as a decimal integer specifying + the lrzip compression level. Supported values are from 1 + to 9. + Filter lz4 + compression-level + The value is interpreted as a decimal integer specifying + the lz4 compression level. Supported values are from 0 to + 9. + stream-checksum + Enable stream checksum. This is enabled by default. + block-checksum + Enable block checksum. This is disabled by default. + block-size + The value is interpreted as a decimal integer specifying + the lz4 compression block size. Supported values are from + 4 to 7 (default). + block-dependence + Use the previous block of the block being compressed for + a compression dictionary to improve compression ratio. + This is disabled by default. + Filter lzop + compression-level + The value is interpreted as a decimal integer specifying + the lzop compression level. Supported values are from 1 + to 9. + Filter uuencode + mode The value is interpreted as octal digits specifying the + file mode. + name The value specifies the file name. Filter xz compression-level The value is interpreted as a decimal integer specifying - the compression level. - Format mtree - cksum, device, flags, gid, gname, indent, link, md5, mode, nlink, - rmd160, sha1, sha256, sha384, sha512, size, time, uid, - uname - Enable a particular keyword in the mtree output. Prefix - with an exclamation mark to disable the corresponding - keyword. The default is equivalent to “device, flags, - gid, gname, link, mode, nlink, size, time, type, uid, - uname”. - all Enables all of the above keywords. - use-set - Enables generation of /set lines that specify default - values for the following files and/or directories. - indent XXX needs explanation XXX + the compression level. Supported values are from 0 to 9. + threads + The value is interpreted as a decimal integer specifying + the number of threads for multi-threaded lzma compres- + sion. If supported, the default value is read from + lzma_cputhreads(). + Filter zstd + compression-level + The value is interpreted as a decimal integer specifying + the compression level. Supported values depend on the + library version, common values are from 1 to 22. + Format 7zip + compression + The value is one of ``store'', ``deflate'', ``bzip2'', + ``lzma1'', ``lzma2'' or ``ppmd'' to indicate how the fol- + lowing entries should be compressed. Note that this set- + ting is ignored for directories, symbolic links, and + other special entries. + compression-level + The value is interpreted as a decimal integer specifying + the compression level. Values between 0 and 9 are sup- + ported. The interpretation of the compression level + depends on the chosen compression method. + Format cpio + hdrcharset + The value is used as a character set name that will be + used when translating file names. + Format gnutar + hdrcharset + The value is used as a character set name that will be + used when translating file, group and user names. Format iso9660 - volume metadata These options are used to set standard ISO9660 metadata. abstract-file=filename @@ -105,7 +169,7 @@ OPTIONS volume. Default: none. application-id=filename The file with the specified name will be identified in - the ISO9660 metadata as holding the application identi‐ + the ISO9660 metadata as holding the application identi- fier for this volume. Default: none. biblio-file=filename The file with the specified name will be identified in @@ -120,17 +184,17 @@ OPTIONS the ISO9660 metadata as holding the publisher information for this volume. Default: none. volume-id=string - The specified string will be used as the Volume Identi‐ + The specified string will be used as the Volume Identi- fier in the ISO9660 metadata. It is limited to 32 bytes. Default: none. Format iso9660 - boot support - These options are used to make an ISO9660 image that can be di‐ - rectly booted on various systems. + These options are used to make an ISO9660 image that can be + directly booted on various systems. boot=filename The file matching this name will be used as the El Torito boot image file. boot-catalog=name - The name that will be used for the El Torito boot cata‐ + The name that will be used for the El Torito boot cata- log. Default: boot.catalog boot-info-table The boot image file provided by the boot=filename option @@ -151,38 +215,38 @@ OPTIONS Specifies the boot semantics used by the El Torito boot image: If the value is fd, then the boot image is assumed to be a bootable floppy image. If the value is hd, then - the boot image is assumed to be a bootable hard disk im‐ - age. If the value is no-emulation, the boot image is + the boot image is assumed to be a bootable hard disk + image. If the value is no-emulation, the boot image is used without floppy or hard disk emulation. If the boot - image is exactly 1.2MB, 1.44MB, or 2.88MB, then the de‐ - fault is fd, otherwise the default is no-emulation. + image is exactly 1.2MB, 1.44MB, or 2.88MB, then the + default is fd, otherwise the default is no-emulation. Format iso9660 - filename and size extensions Various extensions to the base ISO9660 format. allow-ldots - If enabled, allows filenames to begin with a leading pe‐ - riod. If disabled, filenames that begin with a leading + If enabled, allows filenames to begin with a leading + period. If disabled, filenames that begin with a leading period will have that period replaced by an underscore character in the standard ISO9660 namespace. This does - not impact names stored in the Rockridge or Joliet exten‐ + not impact names stored in the Rockridge or Joliet exten- sion area. Default: disabled. allow-lowercase - If enabled, allows filenames to contain lowercase charac‐ - ters. If disabled, filenames will be forced to upper‐ + If enabled, allows filenames to contain lowercase charac- + ters. If disabled, filenames will be forced to upper- case. This does not impact names stored in the Rockridge or Joliet extension area. Default: disabled. allow-multidot If enabled, allows filenames to contain multiple period characters, in violation of the ISO9660 specification. - If disabled, additional periods will be converted to un‐ - derscore characters. This does not impact names stored - in the Rockridge or Joliet extension area. Default: dis‐ + If disabled, additional periods will be converted to + underscore characters. This does not impact names stored + in the Rockridge or Joliet extension area. Default: dis- abled. allow-period If enabled, allows filenames to contain trailing period characters, in violation of the ISO9660 specification. - If disabled,trailing periods will be converted to under‐ + If disabled, trailing periods will be converted to under- score characters. This does not impact names stored in - the Rockridge or Joliet extension area. Default: dis‐ + the Rockridge or Joliet extension area. Default: dis- abled. allow-pvd-lowercase If enabled, the Primary Volume Descriptor may contain @@ -192,22 +256,22 @@ OPTIONS allow-sharp-tilde If enabled, sharp and tilde characters will be permitted in filenames, in violation if the ISO9660 specification. - If disabled, such characters will be converted to under‐ + If disabled, such characters will be converted to under- score characters. Default: disabled. allow-vernum If enabled, version numbers will be included with files. - If disabled, version numbers will be suppressed, in vio‐ + If disabled, version numbers will be suppressed, in vio- lation of the ISO9660 standard. This does not impact names stored in the Rockridge or Joliet extension area. Default: enabled. iso-level - This enables support for file size and file name exten‐ + This enables support for file size and file name exten- sions in the core ISO9660 area. The name extensions specified here do not affect the names stored in the Rockridge or Joliet extension areas. iso-level=1 - The most compliant form of ISO9660 image. File‐ - names are limited to 8.3 uppercase format, direc‐ + The most compliant form of ISO9660 image. File- + names are limited to 8.3 uppercase format, direc- tory names are limited to 8 uppercase characters, files are limited to 4 GiB, the complete ISO9660 image cannot exceed 4 GiB. @@ -224,7 +288,7 @@ OPTIONS up to 193 characters and may include arbitrary 8-bit characters. joliet Microsoft's Joliet extensions store a completely separate - set of directory information about each file. In partic‐ + set of directory information about each file. In partic- ular, this information includes Unicode filenames of up to 255 characters. Default: enabled. limit-depth @@ -243,78 +307,148 @@ OPTIONS filenames (except lowercase characters unless allow-lowercase is also specified). This violates ISO9660 standards. This does not impact names stored in - the Rockridge or Joliet extension area. Default: dis‐ + the Rockridge or Joliet extension area. Default: dis- abled. rockridge The Rockridge extensions store an additional set of POSIX-style file information with each file, including mtime, atime, ctime, permissions, and long filenames with - arbitrary 8-bit characters. These extensions also sup‐ + arbitrary 8-bit characters. These extensions also sup- port symbolic links and other POSIX file types. Default: enabled. Format iso9660 - zisofs support - The zisofs extensions permit each file to be independently com‐ + The zisofs extensions permit each file to be independently com- pressed using a gzip-compatible compression. This can provide significant size savings, but requires the reading system to have support for these extensions. These extensions are disabled by default. compression-level=number The compression level used by the deflate compressor. - Ranges from 0 (least effort) to 9 (most effort). De‐ - fault: 6 + Ranges from 0 (least effort) to 9 (most effort). + Default: 6 zisofs Synonym for zisofs=direct. zisofs=direct Compress each file in the archive. Unlike zisofs=indirect, this is handled entirely within libarchive and does not require a separate utility. For best results, libarchive tests each file and will store - the file uncompressed if the compression does not actu‐ + the file uncompressed if the compression does not actu- ally save any space. In particular, files under 2k will never be compressed. Note that boot image files are never compressed. zisofs=indirect Recognizes files that have already been compressed with - the mkzftree utility and sets up the necessary file meta‐ + the mkzftree utility and sets up the necessary file meta- data so that readers will correctly identify these as zisofs-compressed files. zisofs-exclude=filename Specifies a filename that should not be compressed when - using zisofs=direct. This option can be provided multi‐ + using zisofs=direct. This option can be provided multi- ple times to suppress compression on many files. + Format mtree + cksum, device, flags, gid, gname, indent, link, md5, mode, nlink, + rmd160, sha1, sha256, sha384, sha512, size, time, uid, + uname + Enable a particular keyword in the mtree output. Prefix + with an exclamation mark to disable the corresponding + keyword. The default is equivalent to ``device, flags, + gid, gname, link, mode, nlink, size, time, type, uid, + uname''. + all Enables all of the above keywords. + use-set + Enables generation of /set lines that specify default + values for the following files and/or directories. + indent XXX needs explanation XXX + Format newc + hdrcharset + The value is used as a character set name that will be + used when translating file names. + Format pax + hdrcharset + The value is used as a character set name that will be + used when translating file, group and user names. The + value is one of ``BINARY'' or ``UTF-8''. With ``BINARY'' + there is no character conversion, with ``UTF-8'' names + are converted to UTF-8. + xattrheader + When storing extended attributes, this option configures + which headers should be written. The value is one of + ``all'', ``LIBARCHIVE'', or ``SCHILY''. By default, both + ``LIBARCHIVE.xattr'' and ``SCHILY.xattr'' headers are + written. + Format ustar + hdrcharset + The value is used as a character set name that will be + used when translating file, group and user names. + Format v7tar + hdrcharset + The value is used as a character set name that will be + used when translating file, group and user names. + Format warc + omit-warcinfo + Set to ``true'' to disable output of the warcinfo record. + Format xar + checksum=type + Use type as file checksum method. Supported values are + ``none'', ``md5'', and ``sha1'' (default). + compression=type + Use type as compression method. Supported values are + ``none'', ``bzip2'', ``gzip'' (default), ``lzma'' and + ``xz''. + compression_level + The value is a decimal integer from 1 to 9 specifying the + compression level. + toc-checksum=type + Use type as table of contents checksum method. Supported + values are ``none'', ``md5'' and ``sha1'' (default). Format zip compression - The value is either “store” or “deflate” to indicate how - the following entries should be compressed. Note that - this setting is ignored for directories, symbolic links, - and other special entries. + The value is either ``store'' or ``deflate'' to indicate + how the following entries should be compressed. Note + that this setting is ignored for directories, symbolic + links, and other special entries. + compression-level + The value is interpreted as a decimal integer specifying + the compression level. Values between 0 and 9 are sup- + ported. A compression level of 0 switches the compres- + sion method to ``store'', other values will enable + ``deflate'' compression with the given level. + encryption + Enable encryption using traditional zip encryption. + encryption=type + Use type as encryption type. Supported values are + ``zipcrypt'' (traditional zip encryption), ``aes128'' + (WinZip AES-128 encryption) and ``aes256'' (WinZip + AES-256 encryption). experimental This boolean option enables or disables experimental Zip - features that may not be compatible with other Zip imple‐ + features that may not be compatible with other Zip imple- mentations. fakecrc32 This boolean option disables CRC calculations. All CRC fields are set to zero. It should not be used except for testing purposes. hdrcharset - This sets the character set used for filenames. + The value is used as a character set name that will be + used when translating file names. zip64 Zip64 extensions provide additional file size information - for entries larger than 4 GiB. They also provide ex‐ - tended file offset and archive size information when ar‐ - chives exceed 4 GiB. By default, the Zip writer selec‐ - tively enables these extensions only as needed. In par‐ + for entries larger than 4 GiB. They also provide + extended file offset and archive size information when + archives exceed 4 GiB. By default, the Zip writer selec- + tively enables these extensions only as needed. In par- ticular, if the file size is unknown, the Zip writer will include Zip64 extensions to guard against the possibility that the file might be larger than 4 GiB. Setting this boolean option will force the writer to use - Zip64 extensions even for small files that would not oth‐ - erwise require them. This is primarily useful for test‐ + Zip64 extensions even for small files that would not oth- + erwise require them. This is primarily useful for test- ing. Disabling this option with !zip64 will force the Zip writer to avoid Zip64 extensions: It will reject files - with size greater than 4 GiB, it will reject any new en‐ - tries once the total archive size reaches 4 GiB, and it + with size greater than 4 GiB, it will reject any new + entries once the total archive size reaches 4 GiB, and it will not use Zip64 extensions for files with unknown size. In particular, this can improve compatibility when generating archives where the entry sizes are not known @@ -323,7 +457,7 @@ OPTIONS EXAMPLES The following example creates an archive write handle to create a gzip- compressed ISO9660 format image. The two options here specify that the - ISO9660 archive will use kernel.img as the boot image for El Torito boot‐ + ISO9660 archive will use kernel.img as the boot image for El Torito boot- ing, and that the gzip compressor should use the maximum compression level. @@ -338,7 +472,7 @@ ERRORS archive_errno() and archive_error_string() functions. SEE ALSO - tar(1), libarchive(3), archive_read_set_options(3), archive_write(3) + tar(1), archive_read_set_options(3), archive_write(3), libarchive(3) HISTORY The libarchive library first appeared in FreeBSD 5.3. @@ -348,4 +482,4 @@ AUTHORS Michihiro NAKAJIMA. BUGS -BSD February 2, 2012 BSD +BSD January 31, 2020 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_set_passphrase.3.txt b/archivers/libarchive/files/doc/text/archive_write_set_passphrase.3.txt index 75f5cb9dd0a..9717d806530 100644 --- a/archivers/libarchive/files/doc/text/archive_write_set_passphrase.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_set_passphrase.3.txt @@ -1,7 +1,7 @@ ARCHIVE_WRITE_SET_PAS... BSD Library Functions Manual ARCHIVE_WRITE_SET_PAS... NAME - archive_write_set_passphrase, archive_write_set_passphrase_callback — + archive_write_set_passphrase, archive_write_set_passphrase_callback -- functions for writing encrypted archives LIBRARY @@ -19,17 +19,17 @@ SYNOPSIS DESCRIPTION archive_write_set_passphrase() - Set a passphrase for writing an encryption archive. If - passphrase is NULL or empty, this function will do nothing and + Set a passphrase for writing an encrypted archive. If passphrase + is NULL or empty, this function will do nothing and ARCHIVE_FAILED will be returned. Otherwise, ARCHIVE_OK will be returned. archive_write_set_passphrase_callback() - Register callback function that will be invoked to get a - passphrase for encrption if the passphrase was not set by the + Register a callback function that will be invoked to get a + passphrase for encryption if the passphrase was not set by the archive_write_set_passphrase() function. SEE ALSO - tar(1), libarchive(3), archive_write(3), archive_write_set_options(3) + tar(1), archive_write(3), archive_write_set_options(3), libarchive(3) BSD September 21, 2014 BSD diff --git a/archivers/libarchive/files/doc/text/bsdcpio.1.txt b/archivers/libarchive/files/doc/text/bsdcpio.1.txt index 0e069323cc8..78b975737f7 100644 --- a/archivers/libarchive/files/doc/text/bsdcpio.1.txt +++ b/archivers/libarchive/files/doc/text/bsdcpio.1.txt @@ -1,7 +1,7 @@ CPIO(1) BSD General Commands Manual CPIO(1) NAME - cpio — copy files to and from archives + cpio -- copy files to and from archives SYNOPSIS cpio -i [options] [pattern ...] [< archive] @@ -15,7 +15,7 @@ DESCRIPTION The first option to cpio is a mode indicator from the following list: -i Input. Read an archive from standard input (unless overridden) - and extract the contents to disk or (if the -t option is speci‐ + and extract the contents to disk or (if the -t option is speci- fied) list the contents to standard output. If one or more file patterns are specified, only files matching one of the patterns will be extracted. @@ -26,15 +26,15 @@ DESCRIPTION copy the files to the specified directory. OPTIONS - Unless specifically stated otherwise, options are applicable in all oper‐ + Unless specifically stated otherwise, options are applicable in all oper- ating modes. -0, --null Read filenames separated by NUL characters instead of newlines. - This is necessary if any of the filenames being read might con‐ + This is necessary if any of the filenames being read might con- tain newlines. - -A (o mode only) Append to the specified archive. (Not yet imple‐ + -A (o mode only) Append to the specified archive. (Not yet imple- mented.) -a (o and p modes) Reset access times on files after they are read. @@ -67,7 +67,7 @@ OPTIONS cpio Synonym for odc. newc The SVR4 portable cpio format. odc The old POSIX.1 portable octet-oriented cpio format. - pax The POSIX.1 pax format, an extension of the ustar for‐ + pax The POSIX.1 pax format, an extension of the ustar for- mat. ustar The POSIX.1 tar format. @@ -87,7 +87,7 @@ OPTIONS --insecure (i and p mode only) Disable security checks during extraction or copying. This allows extraction via symbolic links, absolute - paths, and path names containing ‘..’ in the name. + paths, and path names containing '..' in the name. -J, --xz (o mode only) Compress the file with xz-compatible compression @@ -102,18 +102,18 @@ OPTIONS instead. -l, --link - (p mode only) Create links from the target directory to the orig‐ + (p mode only) Create links from the target directory to the orig- inal files, instead of copying. --lrzip (o mode only) Compress the resulting archive with lrzip(1). In input mode, this option is ignored. - --lz4 (o mode only) Compress the archive with lz4-compatible compres‐ + --lz4 (o 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. - --zstd (o mode only) Compress the archive with zstd-compatible compres‐ + --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. @@ -183,11 +183,11 @@ OPTIONS restore the contents to disk. -u, --unconditional - (i and p modes) Unconditionally overwrite existing files. Ordi‐ + (i and p modes) Unconditionally overwrite existing files. Ordi- narily, an older file will not overwrite a newer file on disk. -V, --dot - Print a dot to stderr for each file as it is processed. Super‐ + Print a dot to stderr for each file as it is processed. Super- seded by -v. -v, --verbose @@ -197,15 +197,15 @@ OPTIONS --version Print the program version information and exit. - -y (o mode only) Compress the archive with bzip2-compatible compres‐ + -y (o mode only) Compress the archive with bzip2-compatible compres- sion before writing it. In input mode, this option is ignored; bzip2 compression is recognized automatically on input. - -Z (o mode only) Compress the archive with compress-compatible com‐ - pression before writing it. In input mode, this option is ig‐ - nored; compression is recognized automatically on input. + -Z (o mode only) Compress the archive with compress-compatible com- + pression before writing it. In input mode, this option is + ignored; compression is recognized automatically on input. - -z (o mode only) Compress the archive with gzip-compatible compres‐ + -z (o mode only) Compress the archive with gzip-compatible compres- sion before writing it. In input mode, this option is ignored; gzip compression is recognized automatically on input. @@ -221,51 +221,51 @@ ENVIRONMENT more information. EXAMPLES - The cpio command is traditionally used to copy file hierarchies in con‐ + The cpio command is traditionally used to copy file hierarchies in con- junction with the find(1) command. The first example here simply copies all files from src to dest: find src | cpio -pmud dest By carefully selecting options to the find(1) command and combining it - with other standard utilities, it is possible to exercise very fine con‐ + with other standard utilities, it is possible to exercise very fine con- trol over which files are copied. This next example copies files from - src to dest that are more than 2 days old and whose names match a partic‐ + src to dest that are more than 2 days old and whose names match a partic- ular pattern: find src -mtime +2 | grep foo[bar] | cpio -pdmu dest This example copies files from src to dest that are more than 2 days old - and which contain the word “foobar”: + and which contain the word ``foobar'': find src -mtime +2 | xargs grep -l foobar | cpio -pdmu dest COMPATIBILITY The mode options i, o, and p and the options a, B, c, d, f, l, m, r, t, u, and v comply with SUSv2. - The old POSIX.1 standard specified that only -i, -o, and -p were inter‐ + The old POSIX.1 standard specified that only -i, -o, and -p were inter- preted as command-line options. Each took a single argument of a list of modifier characters. For example, the standard syntax allows -imu but does not support -miu or -i -m -u, since m and u are only modifiers to -i, they are not command-line options in their own right. The syntax - supported by this implementation is backwards-compatible with the stan‐ + supported by this implementation is backwards-compatible with the stan- dard. For best compatibility, scripts should limit themselves to the standard syntax. SEE ALSO - bzip2(1), tar(1), gzip(1), mt(1), pax(1), libarchive(3), cpio(5), + bzip2(1), gzip(1), mt(1), pax(1), tar(1), libarchive(3), cpio(5), libarchive-formats(5), tar(5) STANDARDS There is no current POSIX standard for the cpio command; it appeared in - ISO/IEC 9945-1:1996 (“POSIX.1”) but was dropped from IEEE Std 1003.1-2001 - (“POSIX.1”). + ISO/IEC 9945-1:1996 (``POSIX.1'') but was dropped from IEEE Std + 1003.1-2001 (``POSIX.1''). The cpio, ustar, and pax interchange file formats are defined by IEEE Std - 1003.1-2001 (“POSIX.1”) for the pax command. + 1003.1-2001 (``POSIX.1'') for the pax command. HISTORY The original cpio and find utilities were written by Dick Haight while working in AT&T's Unix Support Group. They first appeared in 1977 in - PWB/UNIX 1.0, the “Programmer's Work Bench” system developed for use + PWB/UNIX 1.0, the ``Programmer's Work Bench'' system developed for use within AT&T. They were first released outside of AT&T as part of System III Unix in 1981. As a result, cpio actually predates tar, even though it was not well-known outside of AT&T until some time later. @@ -277,8 +277,8 @@ BUGS user and group names, only numbers. As a result, it cannot be reliably used to transfer files between systems with dissimilar user and group numbering. Older cpio formats limit the user and group numbers to 16 or - 18 bits, which is insufficient for modern systems. The cpio archive for‐ - mats cannot support files over 4 gigabytes, except for the “odc” variant, - which can support files up to 8 gigabytes. + 18 bits, which is insufficient for modern systems. The cpio archive for- + mats cannot support files over 4 gigabytes, except for the ``odc'' vari- + ant, which can support files up to 8 gigabytes. BSD September 16, 2014 BSD diff --git a/archivers/libarchive/files/doc/text/bsdtar.1.txt b/archivers/libarchive/files/doc/text/bsdtar.1.txt index c840c0175f6..b3c5c3bf3d8 100644 --- a/archivers/libarchive/files/doc/text/bsdtar.1.txt +++ b/archivers/libarchive/files/doc/text/bsdtar.1.txt @@ -1,10 +1,10 @@ TAR(1) BSD General Commands Manual TAR(1) NAME - tar — manipulate tape archives + tar -- manipulate tape archives SYNOPSIS - tar [bundled-flags ⟨args⟩] [⟨file⟩ | ⟨pattern⟩ ...] + tar [bundled-flags <args>] [<file> | <pattern> ...] tar {-c} [options] [files | directories] tar {-r | -u} -f archive-file [options] [files | directories] tar {-t | -x} [options] [patterns] @@ -15,8 +15,8 @@ DESCRIPTION 9660 cdrom images and can create tar, pax, cpio, ar, zip, 7-zip, and shar archives. - The first synopsis form shows a “bundled” option word. This usage is - provided for compatibility with historical implementations. See COMPATI‐ + The first synopsis form shows a ``bundled'' option word. This usage is + provided for compatibility with historical implementations. See COMPATI- BILITY below for details. The other synopsis forms show the preferred usage. The first option to @@ -27,68 +27,68 @@ DESCRIPTION this only works on uncompressed archives stored in regular files. The -f option is required. The long option form is --append. -t List archive contents to stdout. The long option form is --list. - -u Like -r, but new entries are added only if they have a modifica‐ + -u Like -r, but new entries are added only if they have a modifica- tion date newer than the corresponding entry in the archive. - Note that this only works on uncompressed archives stored in reg‐ + Note that this only works on uncompressed archives stored in reg- ular files. The -f option is required. The long form is --update. -x Extract to disk from the archive. If a file with the same name - appears more than once in the archive, each copy will be ex‐ - tracted, with later copies overwriting (replacing) earlier + appears more than once in the archive, each copy will be + extracted, with later copies overwriting (replacing) earlier copies. The long option form is --extract. In -c, -r, or -u mode, each specified file or directory is added to the - archive in the order specified on the command line. By default, the con‐ + archive in the order specified on the command line. By default, the con- tents of each directory are also archived. - In extract or list mode, the entire command line is read and parsed be‐ - fore the archive is opened. The pathnames or patterns on the command + In extract or list mode, the entire command line is read and parsed + before the archive is opened. The pathnames or patterns on the command line indicate which items in the archive should be processed. Patterns are shell-style globbing patterns as documented in tcsh(1). OPTIONS - Unless specifically stated otherwise, options are applicable in all oper‐ + Unless specifically stated otherwise, options are applicable in all oper- ating modes. @archive - (c and r modes only) The specified archive is opened and the en‐ - tries in it will be appended to the current archive. As a simple - example, + (c and r modes only) The specified archive is opened and the + entries in it will be appended to the current archive. As a sim- + ple example, tar -c -f - newfile @original.tar writes a new archive to standard output containing a file newfile and all of the entries from original.tar. In contrast, tar -c -f - newfile original.tar creates a new archive with only two entries. Similarly, tar -czf - --format pax @- - reads an archive from standard input (whose format will be deter‐ + reads an archive from standard input (whose format will be deter- mined automatically) and converts it into a gzip-compressed pax- - format archive on stdout. In this way, tar can be used to con‐ + format archive on stdout. In this way, tar can be used to con- vert archives from one format to another. -a, --auto-compress - (c mode only) Use the archive suffix to decide a set of the for‐ + (c mode only) Use the archive suffix to decide a set of the for- mat and the compressions. As a simple example, tar -a -cf archive.tgz source.c source.h - creates a new archive with restricted pax format and gzip com‐ + creates a new archive with restricted pax format and gzip com- pression, tar -a -cf archive.tar.bz2.uu source.c source.h - creates a new archive with restricted pax format and bzip2 com‐ + creates a new archive with restricted pax format and bzip2 com- pression and uuencode compression, tar -a -cf archive.zip source.c source.h creates a new archive with zip format, tar -a -jcf archive.tgz source.c source.h - ignores the “-j” option, and creates a new archive with re‐ - stricted pax format and gzip compression, + ignores the ``-j'' option, and creates a new archive with + restricted pax format and gzip compression, tar -a -jcf archive.xxx source.c source.h if it is unknown suffix or no suffix, creates a new archive with restricted pax format and bzip2 compression. --acls (c, r, u, x modes only) Archive or extract POSIX.1e or NFSv4 - ACLs. This is the reverse of --no-acls and the default behavior + ACLs. This is the reverse of --no-acls and the default behavior in c, r, and u modes (except on Mac OS X) or if tar is run in x - mode as root. On Mac OS X this option translates extended ACLs to - NFSv4 ACLs. To store extended ACLs the --mac-metadata option is - preferred. + mode as root. On Mac OS X this option translates extended ACLs + to NFSv4 ACLs. To store extended ACLs the --mac-metadata option + is preferred. -B, --read-full-blocks Ignored for compatibility with other tar(1) implementations. @@ -114,14 +114,14 @@ OPTIONS might prevent removal. --exclude pattern - Do not process files or directories that match the specified pat‐ + Do not process files or directories that match the specified pat- tern. Note that exclusions take precedence over patterns or filenames specified on the command line. --exclude-vcs - Do not process files or directories internally used by the ver‐ - sion control systems ‘CVS’, ‘RCS’, ‘SCCS’, ‘SVN’, ‘Arch’, - ‘Bazaar’, ‘Mercurial’ and ‘Darcs’. + Do not process files or directories internally used by the ver- + sion control systems 'Arch', 'Bazaar', 'CVS', 'Darcs', + 'Mercurial', 'RCS', 'SCCS', 'SVN' and 'git'. --fflags (c, r, u, x modes only) Archive or extract platform-specific file @@ -130,12 +130,12 @@ OPTIONS mode as root. --format format - (c, r, u mode only) Use the specified format for the created ar‐ - chive. Supported formats include “cpio”, “pax”, “shar”, and - “ustar”. Other formats may also be supported; see - libarchive-formats(5) for more information about currently-sup‐ - ported formats. In r and u modes, when extending an existing ar‐ - chive, the format specified here must be compatible with the for‐ + (c, r, u mode only) Use the specified format for the created ar- + chive. Supported formats include ``cpio'', ``pax'', ``shar'', + and ``ustar''. Other formats may also be supported; see + libarchive-formats(5) for more information about currently-sup- + ported formats. In r and u modes, when extending an existing ar- + chive, the format specified here must be compatible with the for- mat of the existing archive on disk. -f file, --file file @@ -170,29 +170,29 @@ OPTIONS --help Show usage. --hfsCompression - (x mode only) Mac OS X specific (v10.6 or later). Compress ex‐ - tracted regular files with HFS+ compression. + (x mode only) Mac OS X specific (v10.6 or later). Compress + extracted regular files with HFS+ compression. --ignore-zeros - An alias of --options read_concatenated_archives for compatibil‐ + An alias of --options read_concatenated_archives for compatibil- ity with GNU tar. --include pattern - Process only files or directories that match the specified pat‐ - tern. Note that exclusions specified with --exclude take prece‐ - dence over inclusions. If no inclusions are explicitly speci‐ + Process only files or directories that match the specified pat- + tern. Note that exclusions specified with --exclude take prece- + dence over inclusions. If no inclusions are explicitly speci- fied, all entries are processed by default. The --include option is especially useful when filtering archives. For example, the command tar -c -f new.tar --include='*foo*' @old.tgz creates a new archive new.tar containing only the entries from - old.tgz containing the string ‘foo’. + old.tgz containing the string 'foo'. -J, --xz - (c mode only) Compress the resulting archive with xz(1). In ex‐ - tract or list modes, this option is ignored. Note that this tar - implementation recognizes XZ compression automatically when read‐ - ing archives. + (c mode only) Compress the resulting archive with xz(1). In + 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 @@ -210,7 +210,7 @@ OPTIONS the versions appearing in the archive being extracted. -L, --dereference - (c and r modes only) All symbolic links will be followed. Nor‐ + (c and r modes only) All symbolic links will be followed. Nor- mally, symbolic links are archived as such. With this option, the target of the link will be archived instead. @@ -224,21 +224,22 @@ OPTIONS tar implementation recognizes lrzip compression automatically when reading archives. - --lz4 (c mode only) Compress the archive with lz4-compatible compres‐ + --lz4 (c mode only) Compress the archive with lz4-compatible compres- sion before writing it. In extract or list modes, this option is - ignored. Note that this tar implementation recognizes lz4 com‐ + 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‐ + --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‐ + 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. In extract or list modes, this option is ig‐ - nored. Use of this option is discouraged and new archives should - be created with --xz instead. Note that this tar 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. Note that this @@ -250,9 +251,9 @@ OPTIONS modification time is set to the time stored in the archive. --mac-metadata - (c, r, u and x mode only) Mac OS X specific. Archive or extract + (c, r, u and x mode only) Mac OS X specific. Archive or extract extended ACLs and extended file attributes using copyfile(3) in - AppleDouble format. This is the reverse of --no-mac-metadata. + AppleDouble format. This is the reverse of --no-mac-metadata. and the default behavior in c, r, and u modes or if tar is run in x mode as root. @@ -264,8 +265,8 @@ OPTIONS than the specified date. This compares ctime entries. --newer-mtime date - (c, r, u modes only) Like --newer, except it compares mtime en‐ - tries instead of ctime entries. + (c, r, u modes only) Like --newer, except it compares mtime + entries instead of ctime entries. --newer-than file (c, r, u modes only) Only include files and directories newer @@ -281,31 +282,35 @@ OPTIONS --nopreserveHFSCompression (x mode only) Mac OS X specific (v10.6 or later). Do not compress - extracted regular files which were compressed with HFS+ compres‐ + extracted regular files which were compressed with HFS+ compres- sion before archived. By default, compress the regular files again with HFS+ compression. --null (use with -I or -T) Filenames or patterns are separated by null - characters, not by newlines. This is often used to read file‐ + characters, not by newlines. This is often used to read file- names output by the -print0 option to find(1). --no-acls (c, r, u, x modes only) Do not archive or extract POSIX.1e or - NFSv4 ACLs. This is the reverse of --acls and the default behav‐ + NFSv4 ACLs. This is the reverse of --acls and the default behav- ior if tar is run as non-root in x mode (on Mac OS X as any user in c, r, u and x modes). --no-fflags (c, r, u, x modes only) Do not archive or extract file attributes - or file flags. This is the reverse of --fflags and the default + or file flags. This is the reverse of --fflags and the default behavior if tar is run as non-root in x mode. --no-mac-metadata - (x mode only) Mac OS X specific. Do not archive or extract ACLs + (x mode only) Mac OS X specific. Do not archive or extract ACLs and extended file attributes using copyfile(3) in AppleDouble - format. This is the reverse of --mac-metadata. and the default + format. This is the reverse of --mac-metadata. and the default behavior if tar is run as non-root in x mode. + --no-safe-writes + (x mode only) Do not create temporary files and use rename(2) to + replace the original ones. This is the reverse of --safe-writes. + --no-same-owner (x mode only) Do not extract owner and group IDs. This is the reverse of --same-owner and the default behavior if tar is run as @@ -319,8 +324,8 @@ OPTIONS --no-xattrs (c, r, u, x modes only) Do not archive or extract extended file - attributes. This is the reverse of --xattrs and the default be‐ - havior if tar is run as non-root in x mode. + attributes. This is the reverse of --xattrs and the default + behavior if tar is run as non-root in x mode. --numeric-owner This is equivalent to --uname "" --gname "". On extract, it @@ -348,8 +353,8 @@ OPTIONS than the specified date. This compares ctime entries. --older-mtime date - (c, r, u modes only) Like --older, except it compares mtime en‐ - tries instead of ctime entries. + (c, r, u modes only) Like --older, except it compares mtime + entries instead of ctime entries. --older-than file (c, r, u modes only) Only include files and directories older @@ -369,7 +374,7 @@ OPTIONS control how those formats will behave. Each option has one of the following forms: key=value - The key will be set to the specified value in every mod‐ + The key will be set to the specified value in every mod- ule that supports it. Modules that do not support this key will ignore it. key The key will be enabled in every module that supports it. @@ -379,57 +384,63 @@ OPTIONS module:key=value, module:key, module:!key As above, but the corresponding key and value will be provided only to modules whose name matches module. - The currently supported modules and keys are: + + The complete list of supported modules and keys for create and + append modes is in archive_write_set_options(3) and for extract + and list modes in archive_read_set_options(3). + + Examples of supported options: iso9660:joliet Support Joliet extensions. This is enabled by default, use !joliet or iso9660:!joliet to disable. iso9660:rockridge - Support Rock Ridge extensions. This is enabled by de‐ - fault, use !rockridge or iso9660:!rockridge to disable. + Support Rock Ridge extensions. This is enabled by + default, use !rockridge or iso9660:!rockridge to disable. gzip:compression-level - A decimal integer from 1 to 9 specifying the gzip com‐ + A decimal integer from 1 to 9 specifying the gzip com- pression level. gzip:timestamp - Store timestamp. This is enabled by default, use + Store timestamp. This is enabled by default, use !timestamp or gzip:!timestamp to disable. lrzip:compression=type Use type as compression method. Supported values are bzip2, gzip, lzo (ultra fast), and zpaq (best, extremely slow). lrzip:compression-level - A decimal integer from 1 to 9 specifying the lrzip com‐ + A decimal integer from 1 to 9 specifying the lrzip com- pression level. lz4:compression-level - A decimal integer from 1 to 9 specifying the lzop com‐ + A decimal integer from 1 to 9 specifying the lzop com- pression level. lz4:stream-checksum - Enable stream checksum. This is by default, use + Enable stream checksum. This is by default, use lz4:!stream-checksum to disable. lz4:block-checksum Enable block checksum (Disabled by default). lz4:block-size - A decimal integer from 4 to 7 specifying the lz4 compres‐ + A decimal integer from 4 to 7 specifying the lz4 compres- sion block size (7 is set by default). 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. + A decimal integer specifying the zstd compression level. + Supported values depend on the library version, common + values are from 1 to 22. lzop:compression-level - A decimal integer from 1 to 9 specifying the lzop com‐ + A decimal integer from 1 to 9 specifying the lzop com- pression level. xz:compression-level - A decimal integer from 0 to 9 specifying the xz compres‐ + A decimal integer from 0 to 9 specifying the xz compres- sion level. mtree:keyword The mtree writer module allows you to specify which mtree - keywords will be included in the output. Supported key‐ + keywords will be included in the output. Supported key- words include: cksum, device, flags, gid, gname, indent, link, md5, mode, nlink, rmd160, sha1, sha256, sha384, - sha512, size, time, uid, uname. The default is equiva‐ - lent to: “device, flags, gid, gname, link, mode, nlink, - size, time, type, uid, uname”. + sha512, size, time, uid, uname. The default is equiva- + lent to: ``device, flags, gid, gname, link, mode, nlink, + size, time, type, uid, uname''. mtree:all Enables all of the above keywords. You can also use mtree:!all to disable all keywords. @@ -446,13 +457,13 @@ OPTIONS zip:encryption=type Use type as encryption type. Supported values are zipcrypt (traditional zip encryption), aes128 (WinZip - AES-128 encryption) and aes256 (WinZip AES-256 encryp‐ + AES-128 encryption) and aes256 (WinZip AES-256 encryp- tion). read_concatenated_archives Ignore zeroed blocks in the archive, which occurs when multiple tar archives have been concatenated together. - Without this option, only the contents of the first con‐ - catenated archive would be read. This option is compara‐ + Without this option, only the contents of the first con- + catenated archive would be read. This option is compara- ble to the -i, --ignore-zeros option of GNU tar. If a provided option is not supported by any module, that is a fatal error. @@ -462,22 +473,22 @@ OPTIONS begin with a / character) have the leading slash removed both when creating archives and extracting from them. Also, tar will refuse to extract archive entries whose pathnames contain .. or - whose target directory would be altered by a symlink. This op‐ - tion suppresses these behaviors. + whose target directory would be altered by a symlink. This + option suppresses these behaviors. -p, --insecure, --preserve-permissions (x mode only) Preserve file permissions. Attempt to restore the full permissions, including file modes, file attributes or file flags, extended file attributes and ACLs, if available, for each - item extracted from the archive. This is the reverse of + item extracted from the archive. This is the reverse of --no-same-permissions and the default if tar is being run as - root. It can be partially overridden by also specifying + root. It can be partially overridden by also specifying --no-acls, --no-fflags, --no-mac-metadata or --no-xattrs. --passphrase passphrase The passphrase is used to extract or create an encrypted archive. - Currently, zip is the only supported format that supports encryp‐ - tion. You shouldn't use this option unless you realize how inse‐ + Currently, zip is the only supported format that supports encryp- + tion. You shouldn't use this option unless you realize how inse- cure use of this option is. --posix @@ -488,8 +499,8 @@ OPTIONS that matches each pattern or filename operand. Exit as soon as each specified pattern or filename has been matched. By default, the archive is always read to the very end, since there can be - multiple entries with the same name and, by convention, later en‐ - tries overwrite earlier entries. This option is provided as a + multiple entries with the same name and, by convention, later + entries overwrite earlier entries. This option is provided as a performance optimization. -S (x mode only) Extract files as sparse files. For every block on @@ -500,10 +511,10 @@ OPTIONS Modify file or archive member names according to pattern. The pattern has the format /old/new/[ghHprRsS] where old is a basic regular expression, new is the replacement string of the matched - part, and the optional trailing letters modify how the replace‐ + part, and the optional trailing letters modify how the replace- ment is handled. If old is not matched, the pattern is skipped. Within new, ~ is substituted with the match, \1 to \9 with the - content of the corresponding captured group. The optional trail‐ + content of the corresponding captured group. The optional trail- ing g specifies that matching should continue after the matched part and stop on the first unmatched pattern. The optional trailing s specifies that the pattern applies to the value of @@ -517,6 +528,19 @@ OPTIONS The default is hrs which applies substitutions to all names. In particular, it is never necessary to specify h, r, or s. + --safe-writes + (x mode only) Extract files atomically. By default tar unlinks + the original file with the same name as the extracted file (if it + exists), and then creates it immediately under the same name and + writes to it. For a short period of time, applications trying to + access the file might not find it, or see incomplete results. If + --safe-writes is enabled, tar first creates a unique temporary + file, then writes the new contents to the temporary file, and + finally renames the temporary file to its final name atomically + using rename(2). This guarantees that an application accessing + the file, will either see the old contents or the new contents at + all times. + --same-owner (x mode only) Extract owner and group IDs. This is the reverse of --no-same-owner and the default behavior if tar is run as @@ -531,11 +555,11 @@ OPTIONS -T filename, --files-from filename In x or t mode, tar will read the list of names to be extracted from filename. In c mode, tar will read names to be archived - from filename. The special name “-C” on a line by itself will - cause the current directory to be changed to the directory speci‐ - fied on the following line. Names are terminated by newlines un‐ - less --null is specified. Note that --null also disables the - special handling of lines containing “-C”. Note: If you are + from filename. The special name ``-C'' on a line by itself will + cause the current directory to be changed to the directory speci- + fied on the following line. Names are terminated by newlines + unless --null is specified. Note that --null also disables the + special handling of lines containing ``-C''. Note: If you are generating lists of files using find(1), you probably want to use -n as well. @@ -547,9 +571,9 @@ OPTIONS (x mode only) Unlink files before creating them. This can be a minor performance optimization if most files already exist, but can make things slower if most files do not already exist. This - flag also causes tar to remove intervening directory symlinks in‐ - stead of reporting an error. See the SECURITY section below for - more details. + flag also causes tar to remove intervening directory symlinks + instead of reporting an error. See the SECURITY section below + for more details. --uid id Use the provided user id number and ignore the user name from the @@ -572,7 +596,7 @@ OPTIONS Produce verbose output. In create and extract modes, tar will list each file name as it is read from or written to the archive. In list mode, tar will produce output similar to that of ls(1). - An additional -v option will also provide ls-like details in cre‐ + An additional -v option will also provide ls-like details in cre- ate and extract mode. --version @@ -586,9 +610,9 @@ OPTIONS --exclude for more information about the handling of exclusions. --xattrs - (c, r, u, x modes only) Archive or extract extended file at‐ - tributes. This is the reverse of --no-xattrs and the default be‐ - havior in c, r, and u modes or if tar is run in x mode as root. + (c, r, u, x modes only) Archive or extract extended file + attributes. This is the reverse of --no-xattrs and the default + behavior in c, 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 this @@ -611,11 +635,11 @@ ENVIRONMENT The following environment variables affect the execution of tar: TAR_READER_OPTIONS - The default options for format readers and compression read‐ + The default options for format readers and compression read- ers. The --options option overrides this. TAR_WRITER_OPTIONS - The default options for format writers and compression writ‐ + The default options for format writers and compression writ- ers. The --options option overrides this. LANG The locale to use. See environ(7) for more information. @@ -654,8 +678,8 @@ EXAMPLES tar -c -f new.tar foo1 @old.tgz -C/tmp foo2 will create a new archive new.tar. tar will read the file foo1 from the current directory and add it to the output archive. It will then read - each entry from old.tgz and add those entries to the output archive. Fi‐ - nally, it will switch to the /tmp directory and add foo2 to the output + each entry from old.tgz and add those entries to the output archive. + Finally, it will switch to the /tmp directory and add foo2 to the output archive. An input file in mtree(5) format can be used to create an output archive @@ -669,8 +693,8 @@ EXAMPLES $ tar -cvf output.tar @input.mtree The --newer and --newer-mtime switches accept a variety of common date - and time specifications, including “12 Mar 2005 7:14:29pm”, “2005-03-12 - 19:14”, “5 minutes ago”, and “19:14 PST May 1”. + and time specifications, including ``12 Mar 2005 7:14:29pm'', + ``2005-03-12 19:14'', ``5 minutes ago'', and ``19:14 PST May 1''. The --options argument can be used to control various details of archive generation or reading. For example, you can generate mtree output which @@ -684,12 +708,12 @@ EXAMPLES COMPATIBILITY The bundled-arguments format is supported for compatibility with historic - implementations. It consists of an initial word (with no leading - char‐ + implementations. It consists of an initial word (with no leading - char- acter) in which each character indicates an option. Arguments follow as separate words. The order of the arguments must match the order of the corresponding characters in the bundled command word. For example, tar tbf 32 file.tar - specifies three flags t, b, and f. The b and f flags both require argu‐ + specifies three flags t, b, and f. The b and f flags both require argu- ments, so there must be two additional items on the command line. The 32 is the argument to the b flag, and file.tar is the argument to the f flag. @@ -706,25 +730,25 @@ COMPATIBILITY SECURITY Certain security issues are common to many archiving programs, including - tar. In particular, carefully-crafted archives can request that tar ex‐ - tract files to locations outside of the target directory. This can po‐ - tentially be used to cause unwitting users to overwrite files they did - not intend to overwrite. If the archive is being extracted by the supe‐ + tar. In particular, carefully-crafted archives can request that tar + extract files to locations outside of the target directory. This can + potentially be used to cause unwitting users to overwrite files they did + not intend to overwrite. If the archive is being extracted by the supe- ruser, any file on the system can potentially be overwritten. There are three ways this can happen. Although tar has mechanisms to protect against each one, savvy users should be aware of the implications: - • Archive entries can have absolute pathnames. By default, tar re‐ - moves the leading / character from filenames before restoring + o Archive entries can have absolute pathnames. By default, tar + removes the leading / character from filenames before restoring them to guard against this problem. - • Archive entries can have pathnames that include .. components. + o Archive entries can have pathnames that include .. components. By default, tar will not extract files containing .. components in their pathname. - • Archive entries can exploit symbolic links to restore files to - other directories. An archive can restore a symbolic link to an‐ - other directory, then use that link to restore a file into that + o Archive entries can exploit symbolic links to restore files to + other directories. An archive can restore a symbolic link to + another directory, then use that link to restore a file into that directory. To guard against this, tar checks each extracted path for symlinks. If the final path element is a symlink, it will be removed and replaced with the archive entry. If -U is specified, @@ -735,11 +759,11 @@ SECURITY untrusted sources. You should examine the contents of an archive with tar -tf filename before extraction. You should use the -k option to ensure that tar will - not overwrite any existing files or the -U option to remove any pre-ex‐ - isting files. You should generally not extract archives while running + not overwrite any existing files or the -U option to remove any pre- + existing files. You should generally not extract archives while running with super-user privileges. Note that the -P option to tar disables the - security checks above and allows you to extract an archive while preserv‐ - ing any absolute pathnames, .. components, or symlinks to other directo‐ + security checks above and allows you to extract an archive while preserv- + ing any absolute pathnames, .. components, or symlinks to other directo- ries. SEE ALSO @@ -748,39 +772,40 @@ SEE ALSO STANDARDS There is no current POSIX standard for the tar command; it appeared in - ISO/IEC 9945-1:1996 (“POSIX.1”) but was dropped from IEEE Std 1003.1-2001 - (“POSIX.1”). The options supported by this implementation were developed - by surveying a number of existing tar implementations as well as the old - POSIX specification for tar and the current POSIX specification for pax. + ISO/IEC 9945-1:1996 (``POSIX.1'') but was dropped from IEEE Std + 1003.1-2001 (``POSIX.1''). The options supported by this implementation + were developed by surveying a number of existing tar implementations as + well as the old POSIX specification for tar and the current POSIX speci- + fication for pax. The ustar and pax interchange file formats are defined by IEEE Std - 1003.1-2001 (“POSIX.1”) for the pax command. + 1003.1-2001 (``POSIX.1'') for the pax command. HISTORY A tar command appeared in Seventh Edition Unix, which was released in January, 1979. There have been numerous other implementations, many of - which extended the file format. John Gilmore's pdtar public-domain im‐ - plementation (circa November, 1987) was quite influential, and formed the - basis of GNU tar. GNU tar was included as the standard system tar in + which extended the file format. John Gilmore's pdtar public-domain + implementation (circa November, 1987) was quite influential, and formed + the basis of GNU tar. GNU tar was included as the standard system tar in FreeBSD beginning with FreeBSD 1.0. This is a complete re-implementation based on the libarchive(3) library. It was first released with FreeBSD 5.4 in May, 2005. BUGS - This program follows ISO/IEC 9945-1:1996 (“POSIX.1”) for the definition + This program follows ISO/IEC 9945-1:1996 (``POSIX.1'') for the definition of the -l option. Note that GNU tar prior to version 1.15 treated -l as a synonym for the --one-file-system option. The -C dir option may differ from historic implementations. - All archive output is written in correctly-sized blocks, even if the out‐ + All archive output is written in correctly-sized blocks, even if the out- put is being compressed. Whether or not the last output block is padded - to a full block size varies depending on the format and the output de‐ - vice. For tar and cpio formats, the last block of output is padded to a - full block size if the output is being written to standard output or to a - character or block device such as a tape drive. If the output is being - written to a regular file, the last block will not be padded. Many com‐ + to a full block size varies depending on the format and the output + device. For tar and cpio formats, the last block of output is padded to + a full block size if the output is being written to standard output or to + a character or block device such as a tape drive. If the output is being + written to a regular file, the last block will not be padded. Many com- pressors, including gzip(1) and bzip2(1), complain about the null padding when decompressing an archive created by tar, although they still extract it correctly. @@ -809,9 +834,9 @@ BUGS There is not yet any support for multi-volume archives. - Converting between dissimilar archive formats (such as tar and cpio) us‐ - ing the @- convention can cause hard link information to be lost. (This - is a consequence of the incompatible ways that different archive formats - store hardlink information.) + Converting between dissimilar archive formats (such as tar and cpio) + using the @- convention can cause hard link information to be lost. + (This is a consequence of the incompatible ways that different archive + formats store hardlink information.) -BSD June 3, 2019 BSD +BSD January 31, 2020 BSD diff --git a/archivers/libarchive/files/doc/text/cpio.5.txt b/archivers/libarchive/files/doc/text/cpio.5.txt index 1862129dc93..ae9522f2ff1 100644 --- a/archivers/libarchive/files/doc/text/cpio.5.txt +++ b/archivers/libarchive/files/doc/text/cpio.5.txt @@ -1,7 +1,7 @@ CPIO(5) BSD File Formats Manual CPIO(5) NAME - cpio — format of cpio archive files + cpio -- format of cpio archive files DESCRIPTION The cpio archive format collects any number of files, directories, and @@ -11,13 +11,13 @@ DESCRIPTION General Format Each file system object in a cpio archive comprises a header record with basic numeric metadata followed by the full pathname of the entry and the - file data. The header record stores a series of integer values that gen‐ + file data. The header record stores a series of integer values that gen- erally follow the fields in struct stat. (See stat(2) for details.) The - variants differ primarily in how they store those integers (binary, oc‐ - tal, or hexadecimal). The header is followed by the pathname of the en‐ - try (the length of the pathname is stored in the header) and any file + variants differ primarily in how they store those integers (binary, + octal, or hexadecimal). The header is followed by the pathname of the + entry (the length of the pathname is stored in the header) and any file data. The end of the archive is indicated by a special record with the - pathname “TRAILER!!!”. + pathname ``TRAILER!!!''. PWB format XXX Any documentation of the original PWB/UNIX 1.0 format? XXX @@ -43,7 +43,7 @@ DESCRIPTION The unsigned short fields here are 16-bit integer values; the unsigned int fields are 32-bit integer values. The fields are as follows - magic The integer value octal 070707. This value can be used to deter‐ + magic The integer value octal 070707. This value can be used to deter- mine whether this archive is written with little-endian or big- endian integers. @@ -69,7 +69,7 @@ DESCRIPTION 0001000 Sticky bit. On some systems, this modifies the behavior of executables and/or directories. 0000777 The lower 9 bits specify read/write/execute permissions - for world, group, and user following standard POSIX con‐ + for world, group, and user following standard POSIX con- ventions. uid, gid @@ -79,7 +79,7 @@ DESCRIPTION value of at least two here. Note that hardlinked files include file data with every copy in the archive. - rdev For block special and character special entries, this field con‐ + rdev For block special and character special entries, this field con- tains the associated device number. For all other entry types, it should be set to zero by writers and ignored by readers. @@ -106,11 +106,11 @@ DESCRIPTION are included with each copy of the file. Portable ASCII Format - Version 2 of the Single UNIX Specification (“SUSv2”) standardized an + Version 2 of the Single UNIX Specification (``SUSv2'') standardized an ASCII variant that is portable across all platforms. It is commonly - known as the “old character” format or as the “odc” format. It stores - the same numeric fields as the old binary format, but represents them as - 6-character or 11-character octal values. + known as the ``old character'' format or as the ``odc'' format. It + stores the same numeric fields as the old binary format, but represents + them as 6-character or 11-character octal values. struct cpio_odc_header { char c_magic[6]; @@ -135,7 +135,7 @@ DESCRIPTION New ASCII Format The "new" ASCII format uses 8-byte hexadecimal fields for all numbers and - separates device numbers into separate fields for major and minor num‐ + separates device numbers into separate fields for major and minor num- bers. struct cpio_newc_header { @@ -158,25 +158,25 @@ DESCRIPTION Except as specified below, the fields here match those specified for the old binary format above. - magic The string “070701”. + magic The string ``070701''. - check This field is always set to zero by writers and ignored by read‐ + check This field is always set to zero by writers and ignored by read- ers. See the next section for more details. The pathname is followed by NUL bytes so that the total size of the fixed header plus pathname is a multiple of four. Likewise, the file data is padded to a multiple of four bytes. Note that this format supports only - 4 gigabyte files (unlike the older ASCII format, which supports 8 giga‐ + 4 gigabyte files (unlike the older ASCII format, which supports 8 giga- byte files). In this format, hardlinked files are handled by setting the filesize to - zero for each entry except the last one that appears in the archive. + zero for each entry except the first one that appears in the archive. New CRC Format - The CRC format is identical to the new ASCII format described in the pre‐ - vious section except that the magic field is set to “070702” and the + The CRC format is identical to the new ASCII format described in the pre- + vious section except that the magic field is set to ``070702'' and the check field is set to the sum of all bytes in the file data. This sum is - computed treating all bytes as unsigned values and using unsigned arith‐ + computed treating all bytes as unsigned values and using unsigned arith- metic. Only the least-significant 32 bits of the sum are stored. HP variants @@ -184,8 +184,8 @@ DESCRIPTION numbers differently XXX. Other Extensions and Variants - Sun Solaris uses additional file types to store extended file data, in‐ - cluding ACLs and extended attributes, as special entries in cpio ar‐ + Sun Solaris uses additional file types to store extended file data, + including ACLs and extended attributes, as special entries in cpio ar- chives. XXX Others? XXX @@ -194,37 +194,37 @@ SEE ALSO cpio(1), tar(5) STANDARDS - The cpio utility is no longer a part of POSIX or the Single Unix Stan‐ + The cpio utility is no longer a part of POSIX or the Single Unix Stan- dard. It last appeared in Version 2 of the Single UNIX Specification - (“SUSv2”). It has been supplanted in subsequent standards by pax(1). + (``SUSv2''). It has been supplanted in subsequent standards by pax(1). The portable ASCII format is currently part of the specification for the pax(1) utility. HISTORY The original cpio utility was written by Dick Haight while working in AT&T's Unix Support Group. It appeared in 1977 as part of PWB/UNIX 1.0, - the “Programmer's Work Bench” derived from Version 6 AT&T UNIX that was + the ``Programmer's Work Bench'' derived from Version 6 AT&T UNIX that was used internally at AT&T. Both the old binary and old character formats were in use by 1980, according to the System III source released by SCO - under their “Ancient Unix” license. The character format was adopted as - part of IEEE Std 1003.1-1988 (“POSIX.1”). XXX when did "newc" appear? - Who invented it? When did HP come out with their variant? When did Sun - introduce ACLs and extended attributes? XXX + under their ``Ancient Unix'' license. The character format was adopted + as part of IEEE Std 1003.1-1988 (``POSIX.1''). XXX when did "newc" + appear? Who invented it? When did HP come out with their variant? When + did Sun introduce ACLs and extended attributes? XXX BUGS - The “CRC” format is mis-named, as it uses a simple checksum and not a + The ``CRC'' format is mis-named, as it uses a simple checksum and not a cyclic redundancy check. - The old binary format is limited to 16 bits for user id, group id, de‐ - vice, and inode numbers. It is limited to 4 gigabyte file sizes. + The old binary format is limited to 16 bits for user id, group id, + device, and inode numbers. It is limited to 4 gigabyte file sizes. - The old ASCII format is limited to 18 bits for the user id, group id, de‐ - vice, and inode numbers. It is limited to 8 gigabyte file sizes. + The old ASCII format is limited to 18 bits for the user id, group id, + device, and inode numbers. It is limited to 8 gigabyte file sizes. The new ASCII format is limited to 4 gigabyte file sizes. None of the cpio formats store user or group names, which are essential - when moving files between systems with dissimilar user or group number‐ + when moving files between systems with dissimilar user or group number- ing. Especially when writing older cpio variants, it may be necessary to map diff --git a/archivers/libarchive/files/doc/text/libarchive-formats.5.txt b/archivers/libarchive/files/doc/text/libarchive-formats.5.txt index 253bd3d62c9..18e0dc483a1 100644 --- a/archivers/libarchive/files/doc/text/libarchive-formats.5.txt +++ b/archivers/libarchive/files/doc/text/libarchive-formats.5.txt @@ -1,16 +1,16 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) NAME - libarchive-formats — archive formats supported by the libarchive library + libarchive-formats -- archive formats supported by the libarchive library DESCRIPTION The libarchive(3) library reads and writes a variety of streaming archive formats. Generally speaking, all of these archive formats consist of a - series of “entries”. Each entry stores a single file system object, such - as a file, directory, or symbolic link. + series of ``entries''. Each entry stores a single file system object, + such as a file, directory, or symbolic link. The following provides a brief description of each format supported by - libarchive, with some information about recognized extensions or limita‐ + libarchive, with some information about recognized extensions or limita- tions of the current library support. Note that just because a format is supported by libarchive does not imply that a program that uses libarchive will support that format. Applications that use libarchive @@ -19,16 +19,16 @@ DESCRIPTION Tar Formats The libarchive(3) library can read most tar archives. It can write - POSIX-standard “ustar” and “pax interchange” formats as well as v7 tar - format and a subset of the legacy GNU tar format. + POSIX-standard ``ustar'' and ``pax interchange'' formats as well as v7 + tar format and a subset of the legacy GNU tar format. All tar formats store each entry in one or more 512-byte records. The first record is used for file metadata, including filename, timestamp, and mode information, and the file data is stored in subsequent records. Later variants have extended this by either appropriating undefined areas of the header record, extending the header to multiple records, or by - storing special entries that modify the interpretation of subsequent en‐ - tries. + storing special entries that modify the interpretation of subsequent + entries. gnutar The libarchive(3) library can read most GNU-format tar archives. It currently supports the most popular GNU extensions, including @@ -45,69 +45,70 @@ DESCRIPTION interchange format archives. Pax interchange format archives are an extension of the older ustar format that adds a separate entry with additional attributes stored as key/value pairs immediately - before each regular entry. The presence of these additional en‐ - tries is the only difference between pax interchange format and + before each regular entry. The presence of these additional + entries is the only difference between pax interchange format and the older ustar format. The extended attributes are of unlimited length and are stored as UTF-8 Unicode strings. Keywords defined - in the standard are in all lowercase; vendors are allowed to de‐ - fine custom keys by preceding them with the vendor name in all + in the standard are in all lowercase; vendors are allowed to + define custom keys by preceding them with the vendor name in all uppercase. When writing pax archives, libarchive uses many of - the SCHILY keys defined by Joerg Schilling's “star” archiver and - a few LIBARCHIVE keys. The libarchive library can read most of - the SCHILY keys and most of the GNU keys introduced by GNU tar. - It silently ignores any keywords that it does not understand. + the SCHILY keys defined by Joerg Schilling's ``star'' archiver + and a few LIBARCHIVE keys. The libarchive library can read most + of the SCHILY keys and most of the GNU keys introduced by GNU + tar. It silently ignores any keywords that it does not under- + stand. The pax interchange format converts filenames to Unicode and stores them using the UTF-8 encoding. Prior to libarchive 3.0, libarchive erroneously assumed that the system wide-character - routines natively supported Unicode. This caused it to mis-han‐ - dle non-ASCII filenames on systems that did not satisfy this as‐ - sumption. + routines natively supported Unicode. This caused it to mis-han- + dle non-ASCII filenames on systems that did not satisfy this + assumption. restricted pax The libarchive library can also write pax archives in which it - attempts to suppress the extended attributes entry whenever pos‐ + attempts to suppress the extended attributes entry whenever pos- sible. The result will be identical to a ustar archive unless the extended attributes entry is required to store a long file name, long linkname, extended ACL, file flags, or if any of the standard ustar data (user name, group name, UID, GID, etc) cannot - be fully represented in the ustar header. In all cases, the re‐ - sult can be dearchived by any program that can read POSIX-compli‐ - ant pax interchange format archives. Programs that correctly - read ustar format (see below) will also be able to read this for‐ + be fully represented in the ustar header. In all cases, the + result can be dearchived by any program that can read POSIX-com- + pliant pax interchange format archives. Programs that correctly + read ustar format (see below) will also be able to read this for- mat; any extended attributes will be extracted as separate files stored in PaxHeader directories. ustar The libarchive library can both read and write this format. This format has the following limitations: - • Device major and minor numbers are limited to 21 bits. Nodes + o Device major and minor numbers are limited to 21 bits. Nodes with larger numbers will not be added to the archive. - • Path names in the archive are limited to 255 bytes. (Shorter + o Path names in the archive are limited to 255 bytes. (Shorter if there is no / character in exactly the right place.) - • Symbolic links and hard links are stored in the archive with + o Symbolic links and hard links are stored in the archive with the name of the referenced file. This name is limited to 100 bytes. - • Extended attributes, file flags, and other extended security + o Extended attributes, file flags, and other extended security information cannot be stored. - • Archive entries are limited to 8 gigabytes in size. - Note that the pax interchange format has none of these restric‐ - tions. The ustar format is old and widely supported. It is rec‐ + o Archive entries are limited to 8 gigabytes in size. + Note that the pax interchange format has none of these restric- + tions. The ustar format is old and widely supported. It is rec- ommended when compatibility is the primary concern. - v7 The libarchive library can read and write the legacy v7 tar for‐ + v7 The libarchive library can read and write the legacy v7 tar for- mat. This format has the following limitations: - • Only regular files, directories, and symbolic links can be - archived. Block and character device nodes, FIFOs, and sock‐ + o Only regular files, directories, and symbolic links can be + archived. Block and character device nodes, FIFOs, and sock- ets cannot be archived. - • Path names in the archive are limited to 100 bytes. - • Symbolic links and hard links are stored in the archive with + o Path names in the archive are limited to 100 bytes. + o Symbolic links and hard links are stored in the archive with the name of the referenced file. This name is limited to 100 bytes. - • User and group information are stored as numeric IDs; there + o User and group information are stored as numeric IDs; there is no provision for storing user or group names. - • Extended attributes, file flags, and other extended security + o Extended attributes, file flags, and other extended security information cannot be stored. - • Archive entries are limited to 8 gigabytes in size. + o Archive entries are limited to 8 gigabytes in size. Generally, users should prefer the ustar format for portability as the v7 tar format is both less useful and less portable. @@ -119,9 +120,9 @@ DESCRIPTION The POSIX standards require fixed-length numeric fields to be written with some character position reserved for terminators. Libarchive allows these fields to be written without terminator - characters. This extends the allowable range; in particular, us‐ - tar archives with this extension can support entries up to 64 gi‐ - gabytes in size. Libarchive also recognizes base-256 values in + characters. This extends the allowable range; in particular, + ustar archives with this extension can support entries up to 64 + gigabytes in size. Libarchive also recognizes base-256 values in most numeric fields. This essentially removes all limitations on file size, modification time, and device numbers. @@ -130,31 +131,31 @@ DESCRIPTION by Solaris tar. The first tar program appeared in Seventh Edition Unix in 1979. The - first official standard for the tar file format was the “ustar” (Unix + first official standard for the tar file format was the ``ustar'' (Unix Standard Tar) format defined by POSIX in 1988. POSIX.1-2001 extended the - ustar format to create the “pax interchange” format. + ustar format to create the ``pax interchange'' format. Cpio Formats The libarchive library can read a number of common cpio variants and can - write “odc” and “newc” format archives. A cpio archive stores each entry - as a fixed-size header followed by a variable-length filename and vari‐ - able-length data. Unlike the tar format, the cpio format does only mini‐ - mal padding of the header or file data. There are several cpio variants, - which differ primarily in how they store the initial header: some store - the values as octal or hexadecimal numbers in ASCII, others as binary - values of varying byte order and length. + write ``odc'' and ``newc'' format archives. A cpio archive stores each + entry as a fixed-size header followed by a variable-length filename and + variable-length data. Unlike the tar format, the cpio format does only + minimal padding of the header or file data. There are several cpio vari- + ants, which differ primarily in how they store the initial header: some + store the values as octal or hexadecimal numbers in ASCII, others as + binary values of varying byte order and length. binary The libarchive library transparently reads both big-endian and little-endian variants of the original binary cpio format. This format used 32-bit binary values for file size and mtime, and 16-bit binary values for the other fields. - odc The libarchive library can both read and write this POSIX-stan‐ - dard format, which is officially known as the “cpio interchange - format” or the “octet-oriented cpio archive format” and sometimes - unofficially referred to as the “old character format”. This - format stores the header contents as octal values in ASCII. It - is standard, portable, and immune from byte-order confusion. + odc The libarchive library can both read and write this POSIX-stan- + dard format, which is officially known as the ``cpio interchange + format'' or the ``octet-oriented cpio archive format'' and some- + times unofficially referred to as the ``old character format''. + This format stores the header contents as octal values in ASCII. + It is standard, portable, and immune from byte-order confusion. File sizes and mtime are limited to 33 bits (8GB file size), other fields are limited to 18 bits. @@ -172,32 +173,32 @@ DESCRIPTION included in Version 7 AT&T Unix. As a result, the tar command became much better known in universities and research groups that used Version 7. The combination of the find and cpio utilities provided very precise - control over file selection. Unfortunately, the format has many limita‐ + control over file selection. Unfortunately, the format has many limita- tions that make it unsuitable for widespread use. Only the POSIX format permits files over 4GB, and its 18-bit limit for most other fields makes it unsuitable for modern systems. In addition, cpio formats only store numeric UID/GID values (not usernames and group names), which can make it - very difficult to correctly transfer archives across systems with dissim‐ + very difficult to correctly transfer archives across systems with dissim- ilar user numbering. Shar Formats - A “shell archive” is a shell script that, when executed on a POSIX-com‐ + A ``shell archive'' is a shell script that, when executed on a POSIX-com- pliant system, will recreate a collection of file system objects. The libarchive library can write two different kinds of shar archives: shar The traditional shar format uses a limited set of POSIX commands, including echo(1), mkdir(1), and sed(1). It is suitable for - portably archiving small collections of plain text files. How‐ + portably archiving small collections of plain text files. How- ever, it is not generally well-suited for large archives (many implementations of sh(1) have limits on the size of a script) nor should it be used with non-text files. shardump This format is similar to shar but encodes files using - uuencode(1) so that the result will be a plain text file regard‐ + uuencode(1) so that the result will be a plain text file regard- less of the file contents. It also includes additional shell commands that attempt to reproduce as many file attributes as - possible, including owner, mode, and flags. The additional com‐ + possible, including owner, mode, and flags. The additional com- mands used to restore file attributes make shardump archives less portable than plain shar archives. @@ -206,55 +207,56 @@ DESCRIPTION CDROM images. In many cases, this can remove the need to burn a physical CDROM just in order to read the files contained in an ISO9660 image. It also avoids security and complexity issues that come with virtual mounts - and loopback devices. Libarchive supports the most common Rockridge ex‐ - tensions and has partial support for Joliet extensions. If both exten‐ + and loopback devices. Libarchive supports the most common Rockridge + extensions and has partial support for Joliet extensions. If both exten- sions are present, the Joliet extensions will be used and the Rockridge extensions will be ignored. In particular, this can create problems with hardlinks and symlinks, which are supported by Rockridge but not by Joliet. Libarchive reads ISO9660 images using a streaming strategy. This allows - it to read compressed images directly (decompressing on the fly) and al‐ - lows it to read images directly from network sockets, pipes, and other + it to read compressed images directly (decompressing on the fly) and + allows it to read images directly from network sockets, pipes, and other non-seekable data sources. This strategy works well for optimized ISO9660 images created by many popular programs. Such programs collect all directory information at the beginning of the ISO9660 image so it can be read from a physical disk with a minimum of seeking. However, not all ISO9660 images can be read in this fashion. - Libarchive can also write ISO9660 images. Such images are fully opti‐ + Libarchive can also write ISO9660 images. Such images are fully opti- mized with the directory information preceding all file data. This is - done by storing all file data to a temporary file while collecting direc‐ + done by storing all file data to a temporary file while collecting direc- tory information in memory. When the image is finished, libarchive - writes out the directory structure followed by the file data. The loca‐ + writes out the directory structure followed by the file data. The loca- tion used for the temporary file can be changed by the usual environment variables. Zip format Libarchive can read and write zip format archives that have uncompressed - entries and entries compressed with the “deflate” algorithm. Other zip + entries and entries compressed with the ``deflate'' algorithm. Other zip compression algorithms are not supported. It can extract jar archives, archives that use Zip64 extensions and self-extracting zip archives. - Libarchive can use either of two different strategies for reading Zip ar‐ + Libarchive can use either of two different strategies for reading Zip ar- chives: a streaming strategy which is fast and can handle extremely large - archives, and a seeking strategy which can correctly process self-ex‐ - tracting Zip archives and archives with deleted members or other in-place - modifications. + archives, and a seeking strategy which can correctly process self- + extracting Zip archives and archives with deleted members or other in- + place modifications. The streaming reader processes Zip archives as they are read. It can - read archives of arbitrary size from tape or network sockets, and can de‐ - code Zip archives that have been separately compressed or encoded. How‐ - ever, self-extracting Zip archives and archives with certain types of + read archives of arbitrary size from tape or network sockets, and can + decode Zip archives that have been separately compressed or encoded. + However, self-extracting Zip archives and archives with certain types of modifications cannot be correctly handled. Such archives require that - the reader first process the Central Directory, which is ordinarily lo‐ - cated at the end of a Zip archive and is thus inaccessible to the stream‐ - ing reader. If the program using libarchive has enabled seek support, - then libarchive will use this to processes the central directory first. + the reader first process the Central Directory, which is ordinarily + located at the end of a Zip archive and is thus inaccessible to the + streaming reader. If the program using libarchive has enabled seek sup- + port, then libarchive will use this to processes the central directory + first. In particular, the seeking reader must be used to correctly handle self- extracting archives. Such archives consist of a program followed by a - regular Zip archive. The streaming reader cannot parse the initial pro‐ - gram portion, but the seeking reader starts by reading the Central Direc‐ + regular Zip archive. The streaming reader cannot parse the initial pro- + gram portion, but the seeking reader starts by reading the Central Direc- tory from the end of the archive. Similarly, Zip archives that have been modified in-place can have deleted entries or other garbage data that can only be accurately detected by first reading the Central Directory. @@ -262,7 +264,7 @@ DESCRIPTION Archive (library) file format The Unix archive format (commonly created by the ar(1) archiver) is a general-purpose format which is used almost exclusively for object files - to be read by the link editor ld(1). The ar format has never been stan‐ + to be read by the link editor ld(1). The ar format has never been stan- dardised. There are two common variants: the GNU format derived from SVR4, and the BSD format, which first appeared in 4.4BSD. The two differ primarily in their handling of filenames longer than 15 characters: the @@ -272,18 +274,18 @@ DESCRIPTION may include both types of long filenames. Programs using libarchive can write GNU/SVR4 format if they provide an entry called // containing a filename table to be written into the archive before any of the entries. - Any entries whose names are not in the filename table will be written us‐ - ing BSD-style long filenames. This can cause problems for programs such - as GNU ld that do not support the BSD-style long filenames. + Any entries whose names are not in the filename table will be written + using BSD-style long filenames. This can cause problems for programs + such as GNU ld that do not support the BSD-style long filenames. mtree Libarchive can read and write files in mtree(5) format. This format is - not a true archive format, but rather a textual description of a file hi‐ - erarchy in which each line specifies the name of a file and provides spe‐ - cific metadata about that file. Libarchive can read all of the keywords - supported by both the NetBSD and FreeBSD versions of mtree(8), although - many of the keywords cannot currently be stored in an archive_entry ob‐ - ject. When writing, libarchive supports use of the + not a true archive format, but rather a textual description of a file + hierarchy in which each line specifies the name of a file and provides + specific metadata about that file. Libarchive can read all of the key- + words supported by both the NetBSD and FreeBSD versions of mtree(8), + although many of the keywords cannot currently be stored in an + archive_entry object. When writing, libarchive supports use of the archive_write_set_options(3) interface to specify which keywords should be included in the output. If libarchive was compiled with access to suitable cryptographic libraries (such as the OpenSSL libraries), it can @@ -291,33 +293,33 @@ DESCRIPTION to the mtree writer. When reading an mtree file, libarchive will locate the corresponding - files on disk using the contents keyword if present or the regular file‐ + files on disk using the contents keyword if present or the regular file- name. If it can locate and open the file on disk, it will use that to fill in any metadata that is missing from the mtree file and will read the file contents and return those to the program using libarchive. If - it cannot locate and open the file on disk, libarchive will return an er‐ - ror for any attempt to read the entry body. + it cannot locate and open the file on disk, libarchive will return an + error for any attempt to read the entry body. 7-Zip - Libarchive can read and write 7-Zip format archives. TODO: Need more in‐ - formation + Libarchive can read and write 7-Zip format archives. TODO: Need more + information CAB - Libarchive can read Microsoft Cabinet ( “CAB”) format archives. TODO: + Libarchive can read Microsoft Cabinet ( ``CAB'') format archives. TODO: Need more information. LHA TODO: Information about libarchive's LHA support RAR - Libarchive has limited support for reading RAR format archives. Cur‐ + Libarchive has limited support for reading RAR format archives. Cur- rently, libarchive can read RARv3 format archives which have been either created uncompressed, or compressed using any of the compression methods supported by the RARv3 format. Libarchive can also read self-extracting RAR archives. Warc - Libarchive can read and write “web archives”. TODO: Need more informa‐ + Libarchive can read and write ``web archives''. TODO: Need more informa- tion XAR diff --git a/archivers/libarchive/files/doc/text/libarchive.3.txt b/archivers/libarchive/files/doc/text/libarchive.3.txt index 0e23b188bd6..3f461d860b4 100644 --- a/archivers/libarchive/files/doc/text/libarchive.3.txt +++ b/archivers/libarchive/files/doc/text/libarchive.3.txt @@ -1,63 +1,63 @@ LIBARCHIVE(3) BSD Library Functions Manual LIBARCHIVE(3) NAME - libarchive — functions for reading and writing streaming archives + libarchive -- functions for reading and writing streaming archives OVERVIEW The libarchive library provides a flexible interface for reading and writing archives in various formats such as tar and cpio. libarchive - also supports reading and writing archives compressed using various com‐ + also supports reading and writing archives compressed using various com- pression filters such as gzip and bzip2. The library is inherently stream-oriented; readers serially iterate through the archive, writers serially add things to the archive. In particular, note that there is - currently no built-in support for random access nor for in-place modifi‐ + currently no built-in support for random access nor for in-place modifi- cation. When reading an archive, the library automatically detects the format and the compression. The library currently has read support for: - • old-style tar archives, - • most variants of the POSIX “ustar” format, - • the POSIX “pax interchange” format, - • GNU-format tar archives, - • most common cpio archive formats, - • ISO9660 CD images (including RockRidge and Joliet extensions), - • Zip archives, - • ar archives (including GNU/SysV and BSD extensions), - • Microsoft CAB archives, - • LHA archives, - • mtree file tree descriptions, - • RAR archives, - • XAR archives. + o old-style tar archives, + o most variants of the POSIX ``ustar'' format, + o the POSIX ``pax interchange'' format, + o GNU-format tar archives, + o most common cpio archive formats, + o ISO9660 CD images (including RockRidge and Joliet extensions), + o Zip archives, + o ar archives (including GNU/SysV and BSD extensions), + o Microsoft CAB archives, + o LHA archives, + o mtree file tree descriptions, + o RAR archives, + o XAR archives. The library automatically detects archives compressed with gzip(1), - bzip2(1), xz(1), lzip(1), or compress(1) and decompresses them transpar‐ + bzip2(1), xz(1), lzip(1), or compress(1) and decompresses them transpar- ently. It can similarly detect and decode archives processed with uuencode(1) or which have an rpm(1) header. When writing an archive, you can specify the compression to be used and the format to use. The library can write - • POSIX-standard “ustar” archives, - • POSIX “pax interchange format” archives, - • POSIX octet-oriented cpio archives, - • Zip archive, - • two different variants of shar archives, - • ISO9660 CD images, - • 7-Zip archives, - • ar archives, - • mtree file tree descriptions, - • XAR archives. + o POSIX-standard ``ustar'' archives, + o POSIX ``pax interchange format'' archives, + o POSIX octet-oriented cpio archives, + o Zip archive, + o two different variants of shar archives, + o ISO9660 CD images, + o 7-Zip archives, + o ar archives, + o mtree file tree descriptions, + o XAR archives. Pax interchange format is an extension of the tar archive format that eliminates essentially all of the limitations of historic tar formats in - a standard fashion that is supported by POSIX-compliant pax(1) implemen‐ + a standard fashion that is supported by POSIX-compliant pax(1) implemen- tations on many systems as well as several newer implementations of - tar(1). Note that the default write format will suppress the pax ex‐ - tended attributes for most entries; explicitly requesting pax format will - enable those attributes for all entries. + tar(1). Note that the default write format will suppress the pax + extended attributes for most entries; explicitly requesting pax format + will enable those attributes for all entries. - The read and write APIs are accessed through the archive_read_XXX() func‐ + The read and write APIs are accessed through the archive_read_XXX() func- tions and the archive_write_XXX() functions, respectively, and either can be used independently of the other. - The rest of this manual page provides an overview of the library opera‐ + The rest of this manual page provides an overview of the library opera- tion. More detailed information can be found in the individual manual pages for each API or utility function. @@ -68,16 +68,16 @@ WRITING AN ARCHIVE See archive_write(3). WRITING ENTRIES TO DISK - The archive_write_disk(3) API allows you to write archive_entry(3) ob‐ - jects to disk using the same API used by archive_write(3). The + The archive_write_disk(3) API allows you to write archive_entry(3) + objects to disk using the same API used by archive_write(3). The archive_write_disk(3) API is used internally by archive_read_extract(); - using it directly can provide greater control over how entries get writ‐ - ten to disk. This API also makes it possible to share code between ar‐ + using it directly can provide greater control over how entries get writ- + ten to disk. This API also makes it possible to share code between ar- chive-to-archive copy and archive-to-disk extraction operations. READING ENTRIES FROM DISK The archive_read_disk(3) supports for populating archive_entry(3) objects - from information in the filesystem. This includes the information acces‐ + from information in the filesystem. This includes the information acces- sible from the stat(2) system call as well as ACLs, extended attributes, and other metadata. The archive_read_disk(3) API also supports iterating over directory trees, which allows directories of files to be read using @@ -87,14 +87,14 @@ DESCRIPTION Detailed descriptions of each function are provided by the corresponding manual pages. - All of the functions utilize an opaque struct archive datatype that pro‐ + All of the functions utilize an opaque struct archive datatype that pro- vides access to the archive contents. The struct archive_entry structure contains a complete description of a - single archive entry. It uses an opaque interface that is fully docu‐ + single archive entry. It uses an opaque interface that is fully docu- mented in archive_entry(3). - Users familiar with historic formats should be aware that the newer vari‐ + Users familiar with historic formats should be aware that the newer vari- ants have eliminated most restrictions on the length of textual fields. Clients should not assume that filenames, link names, user names, or group names are limited in length. In particular, pax interchange format @@ -106,12 +106,12 @@ RETURN VALUES The return value indicates the general severity of the error, ranging from ARCHIVE_WARN, which indicates a minor problem that should probably be reported to the user, to ARCHIVE_FATAL, which indicates a serious - problem that will prevent any further operations on this archive. On er‐ - ror, the archive_errno() function can be used to retrieve a numeric error - code (see errno(2)). The archive_error_string() returns a textual error - message suitable for display. + problem that will prevent any further operations on this archive. On + error, the archive_errno() function can be used to retrieve a numeric + error code (see errno(2)). The archive_error_string() returns a textual + error message suitable for display. - archive_read_new() and archive_write_new() return pointers to an allo‐ + archive_read_new() and archive_write_new() return pointers to an allo- cated and initialized struct archive object. archive_read_data() and archive_write_data() return a count of the number @@ -137,14 +137,14 @@ AUTHORS BUGS Some archive formats support information that is not supported by struct - archive_entry. Such information cannot be fully archived or restored us‐ - ing this library. This includes, for example, comments, character sets, - or the arbitrary key/value pairs that can appear in pax interchange for‐ - mat archives. + archive_entry. Such information cannot be fully archived or restored + using this library. This includes, for example, comments, character + sets, or the arbitrary key/value pairs that can appear in pax interchange + format archives. Conversely, of course, not all of the information that can be stored in an struct archive_entry is supported by all formats. For example, cpio - formats do not support nanosecond timestamps; old tar formats do not sup‐ + formats do not support nanosecond timestamps; old tar formats do not sup- port large device numbers. The ISO9660 reader cannot yet read all ISO9660 images; it should learn diff --git a/archivers/libarchive/files/doc/text/libarchive_changes.3.txt b/archivers/libarchive/files/doc/text/libarchive_changes.3.txt index a52a742b905..54b6bb819bc 100644 --- a/archivers/libarchive/files/doc/text/libarchive_changes.3.txt +++ b/archivers/libarchive/files/doc/text/libarchive_changes.3.txt @@ -1,7 +1,7 @@ LIBARCHIVE_CHANGES(3) BSD Library Functions Manual LIBARCHIVE_CHANGES(3) NAME - libarchive_changes — changes in libarchive interface + libarchive_changes -- changes in libarchive interface CHANGES IN LIBARCHIVE 3 This page describes user-visible changes in libarchive3, and lists public @@ -9,7 +9,7 @@ CHANGES IN LIBARCHIVE 3 libarchive3, along with their replacements if any. Multiple Filters - Libarchive2 permitted a single (input or output) filter active on an ar‐ + Libarchive2 permitted a single (input or output) filter active on an ar- chive. Libarchive3 extends this into a variable-length stack. Where archive_write_set_compression_XXX() would replace any existing filter, archive_write_add_filter_XXX() extends the write pipeline with another @@ -18,28 +18,28 @@ CHANGES IN LIBARCHIVE 3 Character Set Handling Libarchive2 assumed that the local platform uses Unicode as the native wchar_t encoding, which is true on Windows, modern Linux, and a few other - systems, but is certainly not universal. As a result, pax format ar‐ - chives were written incorrectly on some systems, since pax format re‐ - quires UTF-8 and libarchive 2 incorrectly assumed that wchar_t strings + systems, but is certainly not universal. As a result, pax format ar- + chives were written incorrectly on some systems, since pax format + requires UTF-8 and libarchive 2 incorrectly assumed that wchar_t strings can be easily converted to UTF-8. Libarchive3 uses the standard iconv library to convert between character - sets and is introducing the notion of a “default character set for the - archive”. To support this, archive_entry objects can now be bound to a + sets and is introducing the notion of a ``default character set for the + archive''. To support this, archive_entry objects can now be bound to a particular archive when they are created. The automatic character set conversions performed by archive_entry objects when reading and writing - filenames, usernames, and other strings will now use an appropriate de‐ - fault character set: + filenames, usernames, and other strings will now use an appropriate + default character set: - If the archive_entry object is bound to an archive, it will use the de‐ - fault character set for that archive. + If the archive_entry object is bound to an archive, it will use the + default character set for that archive. The platform default character encoding (as returned by nl_langinfo(CHARSET)) will be used if nothing else is specified. - Libarchive3 also introduces charset options to many of the archive read‐ - ers and writers to control the character set that will be used for file‐ - names written in those archives. When possible, this will be set auto‐ + Libarchive3 also introduces charset options to many of the archive read- + ers and writers to control the character set that will be used for file- + names written in those archives. When possible, this will be set auto- matically based on information in the archive itself. Combining this with the notion of a default character set for the archive should allow you to configure libarchive to read archives from other platforms and @@ -54,13 +54,13 @@ CHANGES IN LIBARCHIVE 3 There are a few cases where these changes will affect your source code: - • In some cases, libarchive's wider types will introduce the possibil‐ + o In some cases, libarchive's wider types will introduce the possibil- ity of truncation: for example, on a system with a 16-bit uid_t, you risk having uid 65536 be truncated to uid 0, which can cause serious security problems. - • Typedef function pointer types will be incompatible. For example, - if you define custom skip callbacks, you may have to use code simi‐ + o Typedef function pointer types will be incompatible. For example, + if you define custom skip callbacks, you may have to use code simi- lar to the following if you want to support building against libarchive2 and libarchive3: @@ -78,19 +78,19 @@ CHANGES IN LIBARCHIVE 3 Affected functions: - • archive_entry_gid(), archive_entry_set_gid() - • archive_entry_uid(), archive_entry_set_uid() - • archive_entry_ino(), archive_entry_set_ino() - • archive_read_data_block(), archive_write_data_block() - • archive_read_disk_gname(), archive_read_disk_uname() - • archive_read_disk_set_gname_lookup(), + o archive_entry_gid(), archive_entry_set_gid() + o archive_entry_uid(), archive_entry_set_uid() + o archive_entry_ino(), archive_entry_set_ino() + o archive_read_data_block(), archive_write_data_block() + o archive_read_disk_gname(), archive_read_disk_uname() + o archive_read_disk_set_gname_lookup(), archive_read_disk_set_group_lookup(), archive_read_disk_set_uname_lookup(), archive_read_disk_set_user_lookup() - • archive_skip_callback() - • archive_read_extract_set_skip_file(), + o archive_skip_callback() + o archive_read_extract_set_skip_file(), archive_write_disk_set_skip_file(), archive_write_set_skip_file() - • archive_write_disk_set_group_lookup(), + o archive_write_disk_set_group_lookup(), archive_write_disk_set_user_lookup() Where these functions or their arguments took or returned gid_t, ino_t, @@ -252,9 +252,9 @@ CHANGES IN LIBARCHIVE 3 10240 SEE ALSO - libarchive(3), archive_read(3), archive_read_filter(3), - archive_read_format(3), archive_read_set_options(3), archive_write(3), + archive_read(3), archive_read_filter(3), archive_read_format(3), + archive_read_set_options(3), archive_util(3), archive_write(3), archive_write_filter(3), archive_write_format(3), - archive_write_set_options(3), archive_util(3) + archive_write_set_options(3), libarchive(3) BSD December 23, 2011 BSD diff --git a/archivers/libarchive/files/doc/text/libarchive_internals.3.txt b/archivers/libarchive/files/doc/text/libarchive_internals.3.txt index 0d4a58bec81..e58faae44ae 100644 --- a/archivers/libarchive/files/doc/text/libarchive_internals.3.txt +++ b/archivers/libarchive/files/doc/text/libarchive_internals.3.txt @@ -1,12 +1,12 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) NAME - libarchive_internals — description of libarchive internal interfaces + libarchive_internals -- description of libarchive internal interfaces OVERVIEW The libarchive library provides a flexible interface for reading and writing streaming archive files such as tar and cpio. Internally, it - follows a modular layered design that should make it easy to add new ar‐ + follows a modular layered design that should make it easy to add new ar- chive and compression formats. GENERAL ARCHITECTURE @@ -17,7 +17,7 @@ GENERAL ARCHITECTURE files, and write them to disk. (There are plans to add a facility to read archive_entry(3) objects from disk as well.) - The read and write APIs each have four layers: a public API layer, a for‐ + The read and write APIs each have four layers: a public API layer, a for- mat layer that understands the archive file format, a compression layer, and an I/O layer. The I/O layer is completely exposed to clients who can replace it entirely with their own functions. @@ -29,24 +29,24 @@ GENERAL ARCHITECTURE READ ARCHITECTURE From the outside, clients use the archive_read(3) API to manipulate an - archive object to read entries and bodies from an archive stream. Inter‐ + archive object to read entries and bodies from an archive stream. Inter- nally, the archive object is cast to an archive_read object, which holds all read-specific data. The API has four layers: The lowest layer is the I/O layer. This layer can be overridden by clients, but most clients use the packaged I/O callbacks provided, for example, by - archive_read_open_memory(3), and archive_read_open_fd(3). The compres‐ + archive_read_open_memory(3), and archive_read_open_fd(3). The compres- sion layer calls the I/O layer to read bytes and decompresses them for the format layer. The format layer unpacks a stream of uncompressed bytes and creates archive_entry objects from the incoming data. The API layer tracks overall state (for example, it prevents clients from reading data before reading a header) and invokes the format and compression layer operations through registered function pointers. In particular, - the API layer drives the format-detection process: When opening the ar‐ + the API layer drives the format-detection process: When opening the ar- chive, it reads an initial block of data and offers it to each registered compression handler. The one with the highest bid is initialized with the first block. Similarly, the format handlers are polled to see which - handler is the best for each archive. (Prior to 2.4.0, the format bid‐ - ders were invoked for each entry, but this design hindered error recov‐ + handler is the best for each archive. (Prior to 2.4.0, the format bid- + ders were invoked for each entry, but this design hindered error recov- ery.) I/O Layer and Client Callbacks @@ -61,7 +61,7 @@ READ ARCHITECTURE The client skip callback returns the number of bytes actually skipped, which may be much smaller than the skip requested. The only requirement is that the skip not be larger. In particular, clients are allowed to - return zero for any skip that they don't want to handle. The skip call‐ + return zero for any skip that they don't want to handle. The skip call- back must never be invoked with a negative value. Keep in mind that not all clients are reading from disk: clients reading @@ -73,10 +73,10 @@ READ ARCHITECTURE Decompresssion Layer The decompression layer not only handles decompression, it also buffers - data so that the format handlers see a much nicer I/O model. The decom‐ + data so that the format handlers see a much nicer I/O model. The decom- pression API is a two stage peek/consume model. A read_ahead request specifies a minimum read amount; the decompression layer must provide a - pointer to at least that much data. If more data is immediately avail‐ + pointer to at least that much data. If more data is immediately avail- able, it should return more: the format layer handles bulk data reads by asking for a minimum of one byte and then copying as much data as is available. @@ -92,28 +92,28 @@ READ ARCHITECTURE A decompression handler has a specific lifecycle: Registration/Configuration - When the client invokes the public support function, the decom‐ + When the client invokes the public support function, the decom- pression handler invokes the internal __archive_read_register_compression() function to provide bid and initialization functions. This function returns NULL on error or - else a pointer to a struct decompressor_t. This structure con‐ - tains a void * config slot that can be used for storing any cus‐ + else a pointer to a struct decompressor_t. This structure con- + tains a void * config slot that can be used for storing any cus- tomization information. Bid The bid function is invoked with a pointer and size of a block of data. The decompressor can access its config data through the - decompressor element of the archive_read object. The bid func‐ + decompressor element of the archive_read object. The bid func- tion is otherwise stateless. In particular, it must not perform any I/O operations. The value returned by the bid function indicates its suitability for handling this data stream. A bid of zero will ensure that this decompressor is never invoked. Return zero if magic number - checks fail. Otherwise, your initial implementation should re‐ - turn the number of bits actually checked. For example, if you + checks fail. Otherwise, your initial implementation should + return the number of bits actually checked. For example, if you verify two full bytes and three bits of another byte, bid 19. Note that the initial block may be very short; be careful to only - inspect the data you are given. (The current decompressors re‐ - quire two bytes for correct bidding.) + inspect the data you are given. (The current decompressors + require two bytes for correct bidding.) Initialize The winning bidder will have its init function called. This function should initialize the remaining slots of the struct @@ -139,9 +139,9 @@ READ ARCHITECTURE Bid Formats bid by invoking the read_ahead() decompression method but not calling the consume() method. This allows each bidder to look ahead in the input stream. Bidders should not look further - ahead than necessary, as long look aheads put pressure on the de‐ - compression layer to buffer lots of data. Most formats only re‐ - quire a few hundred bytes of look ahead; look aheads of a few + ahead than necessary, as long look aheads put pressure on the + decompression layer to buffer lots of data. Most formats only + require a few hundred bytes of look ahead; look aheads of a few kilobytes are reasonable. (The ISO9660 reader sometimes looks ahead by 48k, which should be considered an upper limit.) Read header @@ -158,7 +158,7 @@ READ ARCHITECTURE The read data interface supports sparse files; this requires that each call return a block of data specifying the file offset and size. This may require you to carefully track the location so - that you can return accurate file offsets for each read. Remem‐ + that you can return accurate file offsets for each read. Remem- ber that the decompressor will return as much data as it has. Generally, you will want to request one byte, examine the return value to see how much data is available, and possibly trim that @@ -166,11 +166,11 @@ READ ARCHITECTURE block just before you return it. Skip All Data The skip data call should skip over all file data and trailing - padding. This is called automatically by the API layer just be‐ - fore each header read. It is also called in response to the + padding. This is called automatically by the API layer just + before each header read. It is also called in response to the client calling the public data_skip() function. Cleanup - On cleanup, the format should release all of its allocated mem‐ + On cleanup, the format should release all of its allocated mem- ory. API Layer @@ -179,7 +179,7 @@ READ ARCHITECTURE WRITE ARCHITECTURE The write API has a similar set of four layers: an API layer, a format layer, a compression layer, and an I/O layer. The registration here is - much simpler because only one format and one compression can be regis‐ + much simpler because only one format and one compression can be regis- tered at a time. I/O Layer and Client Callbacks @@ -200,13 +200,13 @@ WRITE_DISK ARCHITECTURE not layered internally. GENERAL SERVICES - The archive_read, archive_write, and archive_write_disk objects all con‐ + The archive_read, archive_write, and archive_write_disk objects all con- tain an initial archive object which provides common support for a set of standard services. (Recall that ANSI/ISO C90 guarantees that you can cast freely between a pointer to a structure and a pointer to the first element of that structure.) The archive object has a magic value that - indicates which API this object is associated with, slots for storing er‐ - ror information, and function pointers for virtualized API functions. + indicates which API this object is associated with, slots for storing + error information, and function pointers for virtualized API functions. MISCELLANEOUS NOTES Connecting existing archiving libraries into libarchive is generally @@ -217,12 +217,12 @@ MISCELLANEOUS NOTES very different approaches. For example, libarchive's ISO9660 support operates very differently from - most ISO9660 readers. The libarchive support utilizes a work-queue de‐ - sign that keeps a list of known entries sorted by their location in the + most ISO9660 readers. The libarchive support utilizes a work-queue + design that keeps a list of known entries sorted by their location in the input. Whenever libarchive's ISO9660 implementation is asked for the - next header, checks this list to find the next item on the disk. Direc‐ + next header, checks this list to find the next item on the disk. Direc- tories are parsed when they are encountered and new items are added to - the list. This design relies heavily on the ISO9660 image being opti‐ + the list. This design relies heavily on the ISO9660 image being opti- mized so that directories always occur earlier on the disk than the files they describe. @@ -236,7 +236,7 @@ MISCELLANEOUS NOTES SEE ALSO archive_entry(3), archive_read(3), archive_write(3), - archive_write_disk(3) libarchive(3), + archive_write_disk(3), libarchive(3) HISTORY The libarchive library first appeared in FreeBSD 5.3. diff --git a/archivers/libarchive/files/doc/text/mtree.5.txt b/archivers/libarchive/files/doc/text/mtree.5.txt index 22e4e2b2eee..f4558d59121 100644 --- a/archivers/libarchive/files/doc/text/mtree.5.txt +++ b/archivers/libarchive/files/doc/text/mtree.5.txt @@ -1,7 +1,7 @@ MTREE(5) BSD File Formats Manual MTREE(5) NAME - mtree — format of mtree dir hierarchy files + mtree -- format of mtree dir hierarchy files DESCRIPTION The mtree format is a textual format that describes a collection of @@ -13,9 +13,9 @@ DESCRIPTION about a single filesystem object. Leading whitespace is always ignored. When encoding file or pathnames, any backslash character or character - outside of the 95 printable ASCII characters must be encoded as a back‐ - slash followed by three octal digits. When reading mtree files, any ap‐ - pearance of a backslash followed by three octal digits should be con‐ + outside of the 95 printable ASCII characters must be encoded as a back- + slash followed by three octal digits. When reading mtree files, any + appearance of a backslash followed by three octal digits should be con- verted into the corresponding character. Each line is interpreted independently as one of the following types: @@ -28,23 +28,23 @@ DESCRIPTION the interpretation of later lines. Relative If the first whitespace-delimited word has no / characters, - it is the name of a file in the current directory. Any rela‐ - tive entry that describes a directory changes the current di‐ - rectory. + it is the name of a file in the current directory. Any rela- + tive entry that describes a directory changes the current + directory. dot-dot As a special case, a relative entry with the filename .. - changes the current directory to the parent directory. Op‐ - tions on dot-dot entries are always ignored. + changes the current directory to the parent directory. + Options on dot-dot entries are always ignored. - Full If the first whitespace-delimited word has a / character af‐ - ter the first character, it is the pathname of a file rela‐ + Full If the first whitespace-delimited word has a / character + after the first character, it is the pathname of a file rela- tive to the starting directory. There can be multiple full entries describing the same file. - Some tools that process mtree files may require that multiple lines de‐ - scribing the same file occur consecutively. It is not permitted for the - same file to be mentioned using both a relative and a full file specifi‐ - cation. + Some tools that process mtree files may require that multiple lines + describing the same file occur consecutively. It is not permitted for + the same file to be mentioned using both a relative and a full file spec- + ification. Special commands Two special commands are currently defined: @@ -52,23 +52,23 @@ DESCRIPTION /set This command defines default values for one or more keywords. It is followed on the same line by one or more whitespace- separated keyword definitions. These definitions apply to - all following files that do not specify a value for that key‐ + all following files that do not specify a value for that key- word. /unset This command removes any default value set by a previous /set - command. It is followed on the same line by one or more key‐ + command. It is followed on the same line by one or more key- words separated by whitespace. Keywords After the filename, a full or relative entry consists of zero or more whitespace-separated keyword definitions. Each such definition consists of a key from the following list immediately followed by an '=' sign and - a value. Software programs reading mtree files should warn about unrec‐ + a value. Software programs reading mtree files should warn about unrec- ognized keywords. Currently supported keywords are as follows: - cksum The checksum of the file using the default algorithm speci‐ + cksum The checksum of the file using the default algorithm speci- fied by the cksum(1) utility. device The device number for block or char file types. The value @@ -91,9 +91,9 @@ DESCRIPTION contents The full pathname of a file that holds the contents of this file. - flags The file flags as a symbolic name. See chflags(1) for infor‐ + flags The file flags as a symbolic name. See chflags(1) for infor- mation on these names. If no flags are to be set the string - “none” may be used to override the current default. + ``none'' may be used to override the current default. gid The file group as a numeric value. @@ -109,7 +109,7 @@ DESCRIPTION md5digest A synonym for md5. - mode The current file's permissions as a numeric (octal) or sym‐ + mode The current file's permissions as a numeric (octal) or sym- bolic value. nlink The number of hard links the file is expected to have. @@ -120,9 +120,9 @@ DESCRIPTION optional The file is optional; do not complain about the file if it is not in the file hierarchy. - resdevice The “resident” device number of the file, e.g. the ID of the - device that contains the file. Its format is the same as the - one for device. + resdevice The ``resident'' device number of the file, e.g. the ID of + the device that contains the file. Its format is the same as + the one for device. ripemd160digest The RIPEMD160 message digest of the file. @@ -132,21 +132,21 @@ DESCRIPTION rmd160digest A synonym for ripemd160digest. - sha1 The FIPS 160-1 (“SHA-1”) message digest of the file. + sha1 The FIPS 160-1 (``SHA-1'') message digest of the file. sha1digest A synonym for sha1. - sha256 The FIPS 180-2 (“SHA-256”) message digest of the file. + sha256 The FIPS 180-2 (``SHA-256'') message digest of the file. sha256digest A synonym for sha256. - sha384 The FIPS 180-2 (“SHA-384”) message digest of the file. + sha384 The FIPS 180-2 (``SHA-384'') message digest of the file. sha384digest A synonym for sha384. - sha512 The FIPS 180-2 (“SHA-512”) message digest of the file. + sha512 The FIPS 180-2 (``SHA-512'') message digest of the file. sha512digest A synonym for sha512. @@ -172,14 +172,13 @@ DESCRIPTION SEE ALSO cksum(1), find(1), mtree(8) -BUGS HISTORY The mtree utility appeared in 4.3BSD-Reno. The MD5 digest capability was added in FreeBSD 2.1, in response to the widespread use of programs which can spoof cksum(1). The SHA-1 and RIPEMD160 digests were added in FreeBSD 4.0, as new attacks have demonstrated weaknesses in MD5. The SHA-256 digest was added in FreeBSD 6.0. Support for file flags was - added in FreeBSD 4.0, and mostly comes from NetBSD. The “full” entry + added in FreeBSD 4.0, and mostly comes from NetBSD. The ``full'' entry format was added by NetBSD. BSD September 4, 2013 BSD diff --git a/archivers/libarchive/files/doc/text/tar.5.txt b/archivers/libarchive/files/doc/text/tar.5.txt index 72aaee19cec..6d3c762ce9e 100644 --- a/archivers/libarchive/files/doc/text/tar.5.txt +++ b/archivers/libarchive/files/doc/text/tar.5.txt @@ -1,7 +1,7 @@ TAR(5) BSD File Formats Manual TAR(5) NAME - tar — format of tape archive files + tar -- format of tape archive files DESCRIPTION The tar archive format collects any number of files, directories, and @@ -14,18 +14,19 @@ DESCRIPTION A tar archive consists of a series of 512-byte records. Each file system object requires a header record which stores basic metadata (pathname, owner, permissions, etc.) and zero or more records containing any file - data. The end of the archive is indicated by two records consisting en‐ - tirely of zero bytes. + data. The end of the archive is indicated by two records consisting + entirely of zero bytes. For compatibility with tape drives that use fixed block sizes, programs that read or write tar files always read or write a fixed number of - records with each I/O operation. These “blocks” are always a multiple of - the record size. The maximum block size supported by early implementa‐ - tions was 10240 bytes or 20 records. This is still the default for most - implementations although block sizes of 1MiB (2048 records) or larger are - commonly used with modern high-speed tape drives. (Note: the terms - “block” and “record” here are not entirely standard; this document fol‐ - lows the convention established by John Gilmore in documenting pdtar.) + records with each I/O operation. These ``blocks'' are always a multiple + of the record size. The maximum block size supported by early implemen- + tations was 10240 bytes or 20 records. This is still the default for + most implementations although block sizes of 1MiB (2048 records) or + larger are commonly used with modern high-speed tape drives. (Note: the + terms ``block'' and ``record'' here are not entirely standard; this docu- + ment follows the convention established by John Gilmore in documenting + pdtar.) Old-Style Archive Format The original tar archive format has been extended many times to include @@ -50,10 +51,10 @@ DESCRIPTION }; All unused bytes in the header record are filled with nulls. - name Pathname, stored as a null-terminated string. Early tar imple‐ + name Pathname, stored as a null-terminated string. Early tar imple- mentations only stored regular files (including hardlinks to those files). One common early convention used a trailing "/" - character to indicate a directory name, allowing directory per‐ + character to indicate a directory name, allowing directory per- missions and owner information to be archived and restored. mode File mode, stored as an octal number in ASCII. @@ -67,8 +68,8 @@ DESCRIPTION when extracting hardlinks. Modern writers should always store a zero length for hardlink entries. - mtime Modification time of file, as an octal number in ASCII. This in‐ - dicates the number of seconds since the start of the epoch, + mtime Modification time of file, as an octal number in ASCII. This + indicates the number of seconds since the start of the epoch, 00:00:00 UTC January 1, 1970. Note that negative values should be avoided here, as they are handled inconsistently. @@ -78,7 +79,7 @@ DESCRIPTION bytes in the header using unsigned arithmetic. This field should be stored as six octal digits followed by a null and a space character. Note that many early implementations of tar used - signed arithmetic for the checksum field, which can cause inter‐ + signed arithmetic for the checksum field, which can cause inter- operability problems when transferring archives between systems. Modern robust readers compute the checksum both ways and accept the header if either computation matches. @@ -87,7 +88,7 @@ DESCRIPTION In order to preserve hardlinks and conserve tape, a file with multiple links is only written to the archive the first time it is encountered. The next time it is encountered, the linkflag is - set to an ASCII ‘1’ and the linkname field holds the first name + set to an ASCII '1' and the linkname field holds the first name under which this file appears. (Note that regular files have a null value in the linkflag field.) @@ -96,30 +97,30 @@ DESCRIPTION (this is also documented in early BSD manpages): the pathname must be null-terminated; the mode, uid, and gid fields must end in a space and a null byte; the size and mtime fields must end in a space; the checksum is - terminated by a null and a space. Early implementations filled the nu‐ - meric fields with leading spaces. This seems to have been common prac‐ - tice until the IEEE Std 1003.1-1988 (“POSIX.1”) standard was released. + terminated by a null and a space. Early implementations filled the + numeric fields with leading spaces. This seems to have been common prac- + tice until the IEEE Std 1003.1-1988 (``POSIX.1'') standard was released. For best portability, modern implementations should fill the numeric fields with leading zeros. Pre-POSIX Archives - An early draft of IEEE Std 1003.1-1988 (“POSIX.1”) served as the basis + An early draft of IEEE Std 1003.1-1988 (``POSIX.1'') served as the basis for John Gilmore's pdtar program and many system implementations from the late 1980s and early 1990s. These archives generally follow the POSIX ustar format described below with the following variations: - • The magic value consists of the five characters “ustar” followed - by a space. The version field contains a space character fol‐ - lowed by a null. - • The numeric fields are generally filled with leading spaces (not + o The magic value consists of the five characters ``ustar'' fol- + lowed by a space. The version field contains a space character + followed by a null. + o The numeric fields are generally filled with leading spaces (not leading zeros as recommended in the final standard). - • The prefix field is often not used, limiting pathnames to the 100 + o The prefix field is often not used, limiting pathnames to the 100 characters of old-style archives. POSIX ustar Archives - IEEE Std 1003.1-1988 (“POSIX.1”) defined a standard tar file format to be - read and written by compliant implementations of tar(1). This format is - often called the “ustar” format, after the magic value used in the - header. (The name is an acronym for “Unix Standard TAR”.) It extends + IEEE Std 1003.1-1988 (``POSIX.1'') defined a standard tar file format to + be read and written by compliant implementations of tar(1). This format + is often called the ``ustar'' format, after the magic value used in the + header. (The name is an acronym for ``Unix Standard TAR''.) It extends the historic format with new fields: struct header_posix_ustar { @@ -145,36 +146,36 @@ DESCRIPTION typeflag Type of entry. POSIX extended the earlier linkflag field with several new type values: - “0” Regular file. NUL should be treated as a synonym, for + ``0'' Regular file. NUL should be treated as a synonym, for compatibility purposes. - “1” Hard link. - “2” Symbolic link. - “3” Character device node. - “4” Block device node. - “5” Directory. - “6” FIFO node. - “7” Reserved. - Other A POSIX-compliant implementation must treat any unrecog‐ + ``1'' Hard link. + ``2'' Symbolic link. + ``3'' Character device node. + ``4'' Block device node. + ``5'' Directory. + ``6'' FIFO node. + ``7'' Reserved. + Other A POSIX-compliant implementation must treat any unrecog- nized typeflag value as a regular file. In particular, - writers should ensure that all entries have a valid file‐ + writers should ensure that all entries have a valid file- name so that they can be restored by readers that do not support the corresponding extension. Uppercase letters "A" through "Z" are reserved for custom extensions. Note that sockets and whiteout entries are not archivable. - It is worth noting that the size field, in particular, has dif‐ + It is worth noting that the size field, in particular, has dif- ferent meanings depending on the type. For regular files, of course, it indicates the amount of data following the header. For directories, it may be used to indicate the total size of all - files in the directory, for use by operating systems that pre-al‐ - locate directory space. For all other types, it should be set to - zero by writers and ignored by readers. + files in the directory, for use by operating systems that pre- + allocate directory space. For all other types, it should be set + to zero by writers and ignored by readers. - magic Contains the magic value “ustar” followed by a NUL byte to indi‐ - cate that this is a POSIX standard archive. Full compliance re‐ - quires the uname and gname fields be properly set. + magic Contains the magic value ``ustar'' followed by a NUL byte to + indicate that this is a POSIX standard archive. Full compliance + requires the uname and gname fields be properly set. version - Version. This should be “00” (two copies of the ASCII digit + Version. This should be ``00'' (two copies of the ASCII digit zero) for POSIX standard archives. uname, gname @@ -183,8 +184,8 @@ DESCRIPTION set and the corresponding names exist on the system. devmajor, devminor - Major and minor numbers for character device or block device en‐ - try. + Major and minor numbers for character device or block device + entry. name, prefix If the pathname is too long to fit in the 100 bytes provided by @@ -193,12 +194,12 @@ DESCRIPTION is not empty, the reader will prepend the prefix value and a / character to the regular name field to obtain the full pathname. The standard does not require a trailing / character on directory - names, though most implementations still include this for compat‐ + names, though most implementations still include this for compat- ibility reasons. Note that all unused bytes must be set to NUL. - Field termination is specified slightly differently by POSIX than by pre‐ + Field termination is specified slightly differently by POSIX than by pre- vious implementations. The magic, uname, and gname fields must have a trailing NUL. The pathname, linkname, and prefix fields must have a trailing NUL unless they fill the entire field. (In particular, it is @@ -207,7 +208,7 @@ DESCRIPTION the front, and requires them to be terminated with either space or NUL characters. - Currently, most tar implementations comply with the ustar format, occa‐ + Currently, most tar implementations comply with the ustar format, occa- sionally extending it by adding new fields to the blank area at the end of the header record. @@ -221,37 +222,37 @@ DESCRIPTION the twelfth byte for a trailing NUL character. Allowing 12 octal digits allows file sizes up to 64 GB. - Another extension, utilized by GNU tar, star, and other newer tar imple‐ + Another extension, utilized by GNU tar, star, and other newer tar imple- mentations, permits binary numbers in the standard numeric fields. This is flagged by setting the high bit of the first byte. The remainder of the field is treated as a signed twos-complement value. This permits 95-bit values for the length and time fields and 63-bit values for the uid, gid, and device numbers. In particular, this provides a consistent way to handle negative time values. GNU tar supports this extension for - the length, mtime, ctime, and atime fields. Joerg Schilling's star pro‐ + the length, mtime, ctime, and atime fields. Joerg Schilling's star pro- gram and the libarchive library support this extension for all numeric fields. Note that this extension is largely obsoleted by the extended attribute record provided by the pax interchange format. Another early GNU extension allowed base-64 values rather than octal. - This extension was short-lived and is no longer supported by any imple‐ + This extension was short-lived and is no longer supported by any imple- mentation. Pax Interchange Format There are many attributes that cannot be portably stored in a POSIX ustar - archive. IEEE Std 1003.1-2001 (“POSIX.1”) defined a “pax interchange - format” that uses two new types of entries to hold text-formatted meta‐ - data that applies to following entries. Note that a pax interchange for‐ + archive. IEEE Std 1003.1-2001 (``POSIX.1'') defined a ``pax interchange + format'' that uses two new types of entries to hold text-formatted meta- + data that applies to following entries. Note that a pax interchange for- mat archive is a ustar archive in every respect. The new data is stored - in ustar-compatible archive entries that use the “x” or “g” typeflag. In - particular, older implementations that do not fully support these exten‐ - sions will extract the metadata into regular files, where the metadata - can be examined as necessary. - - An entry in a pax interchange format archive consists of one or two stan‐ - dard ustar entries, each with its own header and data. The first op‐ - tional entry stores the extended attributes for the following entry. - This optional first entry has an "x" typeflag and a size field that indi‐ + in ustar-compatible archive entries that use the ``x'' or ``g'' typeflag. + In particular, older implementations that do not fully support these + extensions will extract the metadata into regular files, where the meta- + data can be examined as necessary. + + An entry in a pax interchange format archive consists of one or two stan- + dard ustar entries, each with its own header and data. The first + optional entry stores the extended attributes for the following entry. + This optional first entry has an "x" typeflag and a size field that indi- cates the total size of the extended attributes. The extended attributes themselves are stored as a series of text-format lines encoded in the portable UTF-8 encoding. Each line consists of a decimal number, a @@ -262,7 +263,7 @@ DESCRIPTION 25 ctime=1084839148.1212\n Keys in all lowercase are standard keys. Vendors can add their own keys by prefixing them with an all uppercase vendor name and a period. Note - that, unlike the historic header, numeric values are stored using deci‐ + that, unlike the historic header, numeric values are stored using deci- mal, not octal. A description of some common keys follows: atime, ctime, mtime @@ -276,13 +277,13 @@ DESCRIPTION be in UTF-8, including pathnames, user names, and group names. In some cases, it is not possible to translate local conventions into UTF-8. If this key is present and the value is the six- - character ASCII string “BINARY”, then all textual values are as‐ - sumed to be in a platform-dependent multi-byte encoding. Note - that there are only two valid values for this key: “BINARY” or - “ISO-IR 10646 2000 UTF-8”. No other values are permitted by the - standard, and the latter value should generally not be used as it - is the default when this key is not specified. In particular, - this flag should not be used as a general mechanism to allow + character ASCII string ``BINARY'', then all textual values are + assumed to be in a platform-dependent multi-byte encoding. Note + that there are only two valid values for this key: ``BINARY'' or + ``ISO-IR 10646 2000 UTF-8''. No other values are permitted by + the standard, and the latter value should generally not be used + as it is the default when this key is not specified. In particu- + lar, this flag should not be used as a general mechanism to allow filenames to be stored in arbitrary encodings. uname, uid, gname, gid @@ -299,7 +300,7 @@ DESCRIPTION UTF8 and can thus include non-ASCII characters. realtime.*, security.* - These keys are reserved and may be used for future standardiza‐ + These keys are reserved and may be used for future standardiza- tion. size The size of the file. Note that there is no length limit on this @@ -307,7 +308,7 @@ DESCRIPTION than the historic 8GB limit. SCHILY.* - Vendor-specific attributes used by Joerg Schilling's star imple‐ + Vendor-specific attributes used by Joerg Schilling's star imple- mentation. SCHILY.acl.access, SCHILY.acl.default, SCHILY.acl.ace @@ -340,35 +341,35 @@ DESCRIPTION LIBARCHIVE.creationtime The time when the file was created. (This should not be confused - with the POSIX “ctime” attribute, which refers to the time when + with the POSIX ``ctime'' attribute, which refers to the time when the file metadata was last changed.) LIBARCHIVE.xattr.namespace.key Libarchive stores POSIX.1e-style extended attributes using keys - of this form. The key value is URL-encoded: All non-ASCII char‐ - acters and the two special characters “=” and “%” are encoded as - “%” followed by two uppercase hexadecimal digits. The value of - this key is the extended attribute value encoded in base 64. XXX - Detail the base-64 format here XXX + of this form. The key value is URL-encoded: All non-ASCII char- + acters and the two special characters ``='' and ``%'' are encoded + as ``%'' followed by two uppercase hexadecimal digits. The value + of this key is the extended attribute value encoded in base 64. + XXX Detail the base-64 format here XXX VENDOR.* XXX document other vendor-specific extensions XXX Any values stored in an extended attribute override the corresponding - values in the regular tar header. Note that compliant readers should ig‐ - nore the regular fields when they are overridden. This is important, as - existing archivers are known to store non-compliant values in the stan‐ - dard header fields in this situation. There are no limits on length for - any of these fields. In particular, numeric fields can be arbitrarily - large. All text fields are encoded in UTF8. Compliant writers should - store only portable 7-bit ASCII characters in the standard ustar header - and use extended attributes whenever a text value contains non-ASCII - characters. + values in the regular tar header. Note that compliant readers should + ignore the regular fields when they are overridden. This is important, + as existing archivers are known to store non-compliant values in the + standard header fields in this situation. There are no limits on length + for any of these fields. In particular, numeric fields can be arbitrar- + ily large. All text fields are encoded in UTF8. Compliant writers + should store only portable 7-bit ASCII characters in the standard ustar + header and use extended attributes whenever a text value contains non- + ASCII characters. In addition to the x entry described above, the pax interchange format - also supports a g entry. The g entry is identical in format, but speci‐ - fies attributes that serve as defaults for all subsequent archive en‐ - tries. The g entry is not widely used. + also supports a g entry. The g entry is identical in format, but speci- + fies attributes that serve as defaults for all subsequent archive + entries. The g entry is not widely used. Besides the new x and g entries, the pax interchange format has a few other minor variations from the earlier ustar format. The most troubling @@ -379,16 +380,16 @@ DESCRIPTION ignore the size field for hardlink entries. GNU Tar Archives - The GNU tar program started with a pre-POSIX format similar to that de‐ - scribed earlier and has extended it using several different mechanisms: + The GNU tar program started with a pre-POSIX format similar to that + described earlier and has extended it using several different mechanisms: It added new fields to the empty space in the header (some of which was later used by POSIX for conflicting purposes); it allowed the header to - be continued over multiple records; and it defined new entries that mod‐ + be continued over multiple records; and it defined new entries that mod- ify following entries (similar in principle to the x entry described above, but each GNU special entry is single-purpose, unlike the general- - purpose x entry). As a result, GNU tar archives are not POSIX compati‐ - ble, although more lenient POSIX-compliant readers can successfully ex‐ - tract most GNU tar archives. + purpose x entry). As a result, GNU tar archives are not POSIX compati- + ble, although more lenient POSIX-compliant readers can successfully + extract most GNU tar archives. struct header_gnu_tar { char name[100]; @@ -429,17 +430,17 @@ DESCRIPTION to indicate the pre-allocation of a contiguous file on disk. - D This indicates a directory entry. Unlike the POSIX-stan‐ + D This indicates a directory entry. Unlike the POSIX-stan- dard "5" typeflag, the header is followed by data records listing the names of files in this directory. Each name is preceded by an ASCII "Y" if the file is stored in this archive or "N" if the file is not stored in this archive. Each name is terminated with a null, and an extra null - marks the end of the name list. The purpose of this en‐ - try is to support incremental backups; a program restor‐ - ing from such an archive may wish to delete files on disk - that did not exist in the directory when the archive was - made. + marks the end of the name list. The purpose of this + entry is to support incremental backups; a program + restoring from such an archive may wish to delete files + on disk that did not exist in the directory when the ar- + chive was made. Note that the "D" typeflag specifically violates POSIX, which requires that unrecognized typeflags be restored as @@ -447,58 +448,58 @@ DESCRIPTION file could interfere with subsequent creation of the like-named directory. - K The data for this entry is a long linkname for the fol‐ + K The data for this entry is a long linkname for the fol- lowing regular entry. - L The data for this entry is a long pathname for the fol‐ + L The data for this entry is a long pathname for the fol- lowing regular entry. M This is a continuation of the last file on the previous volume. GNU multi-volume archives guarantee that each volume begins with a valid entry header. To ensure this, a file may be split, with part stored at the end of one - volume, and part stored at the beginning of the next vol‐ - ume. The "M" typeflag indicates that this entry contin‐ + volume, and part stored at the beginning of the next vol- + ume. The "M" typeflag indicates that this entry contin- ues an existing file. Such entries can only occur as the first or second entry in an archive (the latter only if - the first entry is a volume label). The size field spec‐ + the first entry is a volume label). The size field spec- ifies the size of this entry. The offset field at bytes - 369-380 specifies the offset where this file fragment be‐ - gins. The realsize field specifies the total size of the - file (which must equal size plus offset). When extract‐ - ing, GNU tar checks that the header file name is the one - it is expecting, that the header offset is in the correct - sequence, and that the sum of offset and size is equal to - realsize. + 369-380 specifies the offset where this file fragment + begins. The realsize field specifies the total size of + the file (which must equal size plus offset). When + extracting, GNU tar checks that the header file name is + the one it is expecting, that the header offset is in the + correct sequence, and that the sum of offset and size is + equal to realsize. N Type "N" records are no longer generated by GNU tar. They contained a list of files to be renamed or symlinked after extraction; this was originally used to support - long names. The contents of this record are a text de‐ - scription of the operations to be done, in the form - “Rename %s to %s\n” or “Symlink %s to %s\n”; in either - case, both filenames are escaped using K&R C syntax. Due - to security concerns, "N" records are now generally ig‐ - nored when reading archives. - - S This is a “sparse” regular file. Sparse files are stored - as a series of fragments. The header contains a list of - fragment offset/length pairs. If more than four such en‐ - tries are required, the header is extended as necessary - with “extra” header extensions (an older format that is - no longer used), or “sparse” extensions. + long names. The contents of this record are a text + description of the operations to be done, in the form + ``Rename %s to %s\n'' or ``Symlink %s to %s\n''; in + either case, both filenames are escaped using K&R C syn- + tax. Due to security concerns, "N" records are now gen- + erally ignored when reading archives. + + S This is a ``sparse'' regular file. Sparse files are + stored as a series of fragments. The header contains a + list of fragment offset/length pairs. If more than four + such entries are required, the header is extended as nec- + essary with ``extra'' header extensions (an older format + that is no longer used), or ``sparse'' extensions. V The name field should be interpreted as a tape/volume header name. This entry should generally be ignored on extraction. - magic The magic field holds the five characters “ustar” followed by a + magic The magic field holds the five characters ``ustar'' followed by a space. Note that POSIX ustar archives have a trailing null. version The version field holds a space character followed by a null. Note that POSIX ustar archives use two copies of the ASCII digit - “0”. + ``0''. atime, ctime The time the file was last accessed and the time of last change @@ -510,15 +511,15 @@ DESCRIPTION Sparse offset / numbytes Each such structure specifies a single fragment of a sparse file. The two fields store values as octal numbers. The fragments are - each padded to a multiple of 512 bytes in the archive. On ex‐ - traction, the list of fragments is collected from the header (in‐ - cluding any extension headers), and the data is then read and + each padded to a multiple of 512 bytes in the archive. On + extraction, the list of fragments is collected from the header + (including any extension headers), and the data is then read and written to the file at appropriate offsets. isextended - If this is set to non-zero, the header will be followed by addi‐ - tional “sparse header” records. Each such record contains infor‐ - mation about as many as 21 additional sparse blocks as shown + If this is set to non-zero, the header will be followed by addi- + tional ``sparse header'' records. Each such record contains + information about as many as 21 additional sparse blocks as shown here: struct gnu_sparse_header { @@ -541,14 +542,14 @@ DESCRIPTION GNU tar pax archives GNU tar 1.14 (XXX check this XXX) and later will write pax interchange format archives when you specify the --posix flag. This format follows - the pax interchange format closely, using some SCHILY tags and introduc‐ + the pax interchange format closely, using some SCHILY tags and introduc- ing new keywords to store sparse file information. There have been three - iterations of the sparse file support, referred to as “0.0”, “0.1”, and - “1.0”. + iterations of the sparse file support, referred to as ``0.0'', ``0.1'', + and ``1.0''. GNU.sparse.numblocks, GNU.sparse.offset, GNU.sparse.numbytes, GNU.sparse.size - The “0.0” format used an initial GNU.sparse.numblocks attribute + The ``0.0'' format used an initial GNU.sparse.numblocks attribute to indicate the number of blocks in the file, a pair of GNU.sparse.offset and GNU.sparse.numbytes to indicate the offset and size of each block, and a single GNU.sparse.size to indicate @@ -560,36 +561,36 @@ DESCRIPTION the standards. GNU.sparse.map - The “0.1” format used a single attribute that stored a comma-sep‐ - arated list of decimal numbers. Each pair of numbers indicated - the offset and size, respectively, of a block of data. This does - not work well if the archive is extracted by an archiver that - does not recognize this extension, since many pax implementations - simply discard unrecognized attributes. + The ``0.1'' format used a single attribute that stored a comma- + separated list of decimal numbers. Each pair of numbers indi- + cated the offset and size, respectively, of a block of data. + This does not work well if the archive is extracted by an + archiver that does not recognize this extension, since many pax + implementations simply discard unrecognized attributes. GNU.sparse.major, GNU.sparse.minor, GNU.sparse.name, GNU.sparse.realsize - The “1.0” format stores the sparse block map in one or more + The ``1.0'' format stores the sparse block map in one or more 512-byte blocks prepended to the file data in the entry body. The pax attributes indicate the existence of this map (via the GNU.sparse.major and GNU.sparse.minor fields) and the full size of the file. The GNU.sparse.name holds the true name of the file. To avoid confusion, the name stored in the regular tar - header is a modified name so that extraction errors will be ap‐ - parent to users. + header is a modified name so that extraction errors will be + apparent to users. Solaris Tar XXX More Details Needed XXX - Solaris tar (beginning with SunOS XXX 5.7 ?? XXX) supports an “extended” - format that is fundamentally similar to pax interchange format, with the - following differences: - • Extended attributes are stored in an entry whose type is X, not + Solaris tar (beginning with SunOS XXX 5.7 ?? XXX) supports an + ``extended'' format that is fundamentally similar to pax interchange for- + mat, with the following differences: + o Extended attributes are stored in an entry whose type is X, not x, as used by pax interchange format. The detailed format of - this entry appears to be the same as detailed above for the x en‐ - try. - • An additional A header is used to store an ACL for the following - regular entry. The body of this entry contains a seven-digit oc‐ - tal number followed by a zero byte, followed by the textual ACL + this entry appears to be the same as detailed above for the x + entry. + o An additional A header is used to store an ACL for the following + regular entry. The body of this entry contains a seven-digit + octal number followed by a zero byte, followed by the textual ACL description. The octal value is the number of ACL entries plus a constant that indicates the ACL type: 01000000 for POSIX.1e ACLs and 03000000 for NFSv4 ACLs. @@ -606,17 +607,17 @@ DESCRIPTION Mac OS X Tar The tar distributed with Apple's Mac OS X stores most regular files as two separate files in the tar archive. The two files have the same name - except that the first one has “._” prepended to the last path element. - This special file stores an AppleDouble-encoded binary blob with addi‐ - tional metadata about the second file, including ACL, extended at‐ - tributes, and resources. To recreate the original file on disk, each + except that the first one has ``._'' prepended to the last path element. + This special file stores an AppleDouble-encoded binary blob with addi- + tional metadata about the second file, including ACL, extended + attributes, and resources. To recreate the original file on disk, each separate file can be extracted and the Mac OS X copyfile() function can be used to unpack the separate metadata file and apply it to th regular - file. Conversely, the same function provides a “pack” option to encode + file. Conversely, the same function provides a ``pack'' option to encode the extended metadata from a file into a separate file whose contents can then be put into a tar archive. - Note that the Apple extended attributes interact badly with long file‐ + Note that the Apple extended attributes interact badly with long file- names. Since each file is stored with the full name, a separate set of extensions needs to be included in the archive for each one, doubling the overhead required for files with long names. @@ -654,10 +655,11 @@ SEE ALSO STANDARDS The tar utility is no longer a part of POSIX or the Single Unix Standard. - It last appeared in Version 2 of the Single UNIX Specification (“SUSv2”). - It has been supplanted in subsequent standards by pax(1). The ustar for‐ - mat is currently part of the specification for the pax(1) utility. The - pax interchange file format is new with IEEE Std 1003.1-2001 (“POSIX.1”). + It last appeared in Version 2 of the Single UNIX Specification + (``SUSv2''). It has been supplanted in subsequent standards by pax(1). + The ustar format is currently part of the specification for the pax(1) + utility. The pax interchange file format is new with IEEE Std + 1003.1-2001 (``POSIX.1''). HISTORY A tar command appeared in Seventh Edition Unix, which was released in diff --git a/archivers/libarchive/files/doc/wiki/Makefile b/archivers/libarchive/files/doc/wiki/Makefile index 206afa130cc..0b8cb5deda3 100644 --- a/archivers/libarchive/files/doc/wiki/Makefile +++ b/archivers/libarchive/files/doc/wiki/Makefile @@ -107,15 +107,15 @@ ManPageArchiveWriteSetPassphrase3.wiki: ../mdoc2wiki.awk ../../libarchive/archiv ManPageCpio5.wiki: ../mdoc2wiki.awk ../../libarchive/cpio.5 awk -f ../mdoc2wiki.awk < ../../libarchive/cpio.5 > ManPageCpio5.wiki +ManPageLibarchiveFormats5.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive-formats.5 + awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive-formats.5 > ManPageLibarchiveFormats5.wiki + ManPageLibarchive3.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive.3 awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive.3 > ManPageLibarchive3.wiki ManPageLibarchiveChanges3.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive_changes.3 awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive_changes.3 > ManPageLibarchiveChanges3.wiki -ManPageLibarchiveFormats5.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive-formats.5 - awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive-formats.5 > ManPageLibarchiveFormats5.wiki - ManPageLibarchiveInternals3.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive_internals.3 awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive_internals.3 > ManPageLibarchiveInternals3.wiki @@ -130,4 +130,4 @@ ManPageBsdtar1.wiki: ../mdoc2wiki.awk ../../tar/bsdtar.1 ManPageBsdcpio1.wiki: ../mdoc2wiki.awk ../../cpio/bsdcpio.1 awk -f ../mdoc2wiki.awk < ../../cpio/bsdcpio.1 > ManPageBsdcpio1.wiki -all: ManPageArchiveEntry3.wiki ManPageArchiveEntryAcl3.wiki ManPageArchiveEntryLinkify3.wiki ManPageArchiveEntryMisc3.wiki ManPageArchiveEntryPaths3.wiki ManPageArchiveEntryPerms3.wiki ManPageArchiveEntryStat3.wiki ManPageArchiveEntryTime3.wiki ManPageArchiveRead3.wiki ManPageArchiveReadAddPassphrase3.wiki ManPageArchiveReadData3.wiki ManPageArchiveReadDisk3.wiki ManPageArchiveReadExtract3.wiki ManPageArchiveReadFilter3.wiki ManPageArchiveReadFormat3.wiki ManPageArchiveReadFree3.wiki ManPageArchiveReadHeader3.wiki ManPageArchiveReadNew3.wiki ManPageArchiveReadOpen3.wiki ManPageArchiveReadSetOptions3.wiki ManPageArchiveUtil3.wiki ManPageArchiveWrite3.wiki ManPageArchiveWriteBlocksize3.wiki ManPageArchiveWriteData3.wiki ManPageArchiveWriteDisk3.wiki ManPageArchiveWriteFilter3.wiki ManPageArchiveWriteFinishEntry3.wiki ManPageArchiveWriteFormat3.wiki ManPageArchiveWriteFree3.wiki ManPageArchiveWriteHeader3.wiki ManPageArchiveWriteNew3.wiki ManPageArchiveWriteOpen3.wiki ManPageArchiveWriteSetOptions3.wiki ManPageArchiveWriteSetPassphrase3.wiki ManPageCpio5.wiki ManPageLibarchive3.wiki ManPageLibarchiveChanges3.wiki ManPageLibarchiveFormats5.wiki ManPageLibarchiveInternals3.wiki ManPageMtree5.wiki ManPageTar5.wiki ManPageBsdtar1.wiki ManPageBsdcpio1.wiki +all: ManPageArchiveEntry3.wiki ManPageArchiveEntryAcl3.wiki ManPageArchiveEntryLinkify3.wiki ManPageArchiveEntryMisc3.wiki ManPageArchiveEntryPaths3.wiki ManPageArchiveEntryPerms3.wiki ManPageArchiveEntryStat3.wiki ManPageArchiveEntryTime3.wiki ManPageArchiveRead3.wiki ManPageArchiveReadAddPassphrase3.wiki ManPageArchiveReadData3.wiki ManPageArchiveReadDisk3.wiki ManPageArchiveReadExtract3.wiki ManPageArchiveReadFilter3.wiki ManPageArchiveReadFormat3.wiki ManPageArchiveReadFree3.wiki ManPageArchiveReadHeader3.wiki ManPageArchiveReadNew3.wiki ManPageArchiveReadOpen3.wiki ManPageArchiveReadSetOptions3.wiki ManPageArchiveUtil3.wiki ManPageArchiveWrite3.wiki ManPageArchiveWriteBlocksize3.wiki ManPageArchiveWriteData3.wiki ManPageArchiveWriteDisk3.wiki ManPageArchiveWriteFilter3.wiki ManPageArchiveWriteFinishEntry3.wiki ManPageArchiveWriteFormat3.wiki ManPageArchiveWriteFree3.wiki ManPageArchiveWriteHeader3.wiki ManPageArchiveWriteNew3.wiki ManPageArchiveWriteOpen3.wiki ManPageArchiveWriteSetOptions3.wiki ManPageArchiveWriteSetPassphrase3.wiki ManPageCpio5.wiki ManPageLibarchiveFormats5.wiki ManPageLibarchive3.wiki ManPageLibarchiveChanges3.wiki ManPageLibarchiveInternals3.wiki ManPageMtree5.wiki ManPageTar5.wiki ManPageBsdtar1.wiki ManPageBsdcpio1.wiki diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki index 83d692f01f0..db4177c2f96 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki @@ -3,7 +3,7 @@ ARCHIVE_ENTRY(3) manual page '''archive_entry_clear''', '''archive_entry_clone''', '''archive_entry_free''', -'''archive_entry_new''', +'''archive_entry_new''' - functions for managing archive entry descriptions == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -36,7 +36,7 @@ it includes everything from '''struct stat''' plus associated pathname, textual group and user names, etc. These objects are used by -[[ManPageLibarchive3]] +[[ManPageibarchive3]] to represent the metadata associated with a particular entry in an archive. === Create and Destroy=== @@ -64,16 +64,16 @@ object. Due to high number of functions, the accessor functions can be found in man pages grouped by the purpose. <dl> -<dt>[[ManPageArchiveEntryAcl3]]</dt><dd> +<dt>[[ManPagerchiventrycl3]]</dt><dd> Access Control List manipulation -</dd><dt>[[ManPageArchiveEntryPaths3]]</dt><dd> +</dd><dt>[[ManPagerchiventryaths3]]</dt><dd> Path name manipulation -</dd><dt>[[ManPageArchiveEntryPerms3]]</dt><dd> +</dd><dt>[[ManPagerchiventryerms3]]</dt><dd> User, group and mode manipulation -</dd><dt>[[ManPageArchiveEntryStat3]]</dt><dd> +</dd><dt>[[ManPagerchiventrytat3]]</dt><dd> Functions not in the other groups and copying to/from ''struct'' stat. -</dd><dt>[[ManPageArchiveEntryTime3]]</dt><dd> +</dd><dt>[[ManPagerchiventryime3]]</dt><dd> Time field manipulation </dd></dl> @@ -105,13 +105,12 @@ using the current locale. Similarly, if you store a wide string and then store a narrow string for the same data, the previously-set wide string will be discarded in favor of the new data. - == SEE ALSO == -[[ManPageArchiveEntryAcl3]], -[[ManPageArchiveEntryPaths3]], -[[ManPageArchiveEntryPerms3]], -[[ManPageArchiveEntryTime3]] -[[ManPageLibarchive3]], +[[ManPagerchiventrycl3]], +[[ManPagerchiventryaths3]], +[[ManPagerchiventryerms3]], +[[ManPagerchiventryime3]], +[[ManPageibarchive3]] == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryAcl3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryAcl3.wiki index 158bc66ff34..7e7ed259e33 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryAcl3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryAcl3.wiki @@ -7,7 +7,6 @@ ARCHIVE_ENTRY_ACL(3) manual page '''archive_entry_acl_from_text''', '''archive_entry_acl_from_text_w''', '''archive_entry_acl_next''', -'''archive_entry_acl_next_w''', '''archive_entry_acl_reset''', '''archive_entry_acl_to_text''', '''archive_entry_acl_to_text_w''', @@ -48,10 +47,6 @@ Streaming Archive Library (libarchive, -larchive) <br> ''int'' <br> -'''archive_entry_acl_next_w'''(''struct archive_entry *a'', ''int type'', ''int *ret_type'', ''int *ret_permset'', ''int *ret_tag'', ''int *ret_qual'', ''const wchar_t **ret_name''); -<br> -''int'' -<br> '''archive_entry_acl_reset'''(''struct archive_entry *a'', ''int type''); <br> ''char *'' @@ -68,15 +63,16 @@ Streaming Archive Library (libarchive, -larchive) == DESCRIPTION == The "Access Control Lists (ACLs)" -extend the standard Unix perssion model. +extend the standard Unix permission model. The ACL interface of '''libarchive''' -supports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by +supports both POSIX.1e and NFSv4 style ACLs. +Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. === POSIX.1e Access Control Lists=== A POSIX.1e ACL consists of a number of independent entries. -Each entry specifies the permission set as bitmask of basic permissions. +Each entry specifies the permission set as a bitmask of basic permissions. Valid permissions in the are: <dl> @@ -100,16 +96,16 @@ ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_GROUP -The group specied by the name field. +The group specified by the name field. </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_GROUP_OBJ -The group who owns the file. +The group which owns the file. </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_MASK The maximum permissions to be obtained via group permissions. </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_OTHER -Any principal who is not file owner or a member of the owning group. +Any principal who is not the file owner or a member of the owning group. </dd> The principals @@ -120,14 +116,14 @@ ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries. -All files with have an access ACL +All files have an access ACL () ARCHIVE_ENTRY_ACL_TYPE_ACCESS. This specifies the permissions required for access to the file itself. Directories have an additional ACL () ARCHIVE_ENTRY_ACL_TYPE_DEFAULT, -which controls the initial access ACL for newly created directory entries. +which controls the initial access ACL for newly-created directory entries. === NFSv4 Access Control Lists=== A NFSv4 ACL consists of multiple individual entries called Access Control Entries (ACEs). @@ -159,13 +155,13 @@ ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_GROUP -The group specied by the name field. +The group specified by the name field. </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_GROUP_OBJ -The group who owns the file. +The group which owns the file. </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_EVERYONE -Any principal who is not file owner or a member of the owning group. +Any principal who is not the file owner or a member of the owning group. </dd> Entries with the @@ -177,9 +173,10 @@ string and optionally the user or group ID in the integer. NFSv4 ACE permissions and flags are stored in the same -bitfield. Some permissions share the same constant and permission character but -have different effect on directories than on files. The following ACE -permissions are supported: +bitfield. +Some permissions share the same constant and permission character +but have different effect on directories than on files. +The following ACE permissions are supported: <dl> <dt></dt><dd> ARCHIVE_ENTRY_ACL_READ_DATA (.B r ) @@ -245,7 +242,8 @@ ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (.B i ) Only inherit, do not apply the permission on the directory itself. </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (.B n ) -Do not propagate inherit flags. Only first-level entries inherit ACLs. +Do not propagate inherit flags. +Only first-level entries inherit ACLs. </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (.B S ) Trigger alarm or audit on successful access. @@ -262,8 +260,8 @@ and '''archive_entry_acl_add_entry_w'''() add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions -are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL -entries. +are updated. +An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. '''archive_entry_acl_clear'''() removes all ACL entries and resets the enumeration pointer. @@ -288,7 +286,8 @@ ARCHIVE_ENTRY_ACL_TYPE_AUDIT </dd><dt></dt><dd> ARCHIVE_ENTRY_ACL_TYPE_ALARM </dd></dl> -for NFSv4 ACLs. For POSIX.1e ACLs if +for NFSv4 ACLs. +For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non-extended ACLs are added. @@ -300,7 +299,8 @@ add new (or merge with existing) ACL entries from (wide) -text. The argument +text. +The argument may take one of the following values: <dl> <dt></dt><dd> @@ -312,11 +312,13 @@ ARCHIVE_ENTRY_ACL_TYPE_NFS4 </dd></dl> Supports all formats that can be created with '''archive_entry_acl_to_text'''() -or respective +or respectively '''archive_entry_acl_to_text_w'''(). -Existing ACL entries are preserved. To get a clean new ACL from text +Existing ACL entries are preserved. +To get a clean new ACL from text '''archive_entry_acl_clear'''() -must be called first. Entries prefixed with +must be called first. +Entries prefixed with "default:" are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT @@ -331,8 +333,6 @@ character are skipped. '''archive_entry_acl_next'''() -and -'''archive_entry_acl_next_w'''() return the next entry of the ACL list. This functions may only be called after '''archive_entry_acl_reset'''() @@ -340,12 +340,10 @@ has indicated the presence of extended ACL entries. '''archive_entry_acl_reset'''() prepare reading the list of ACL entries with -'''archive_entry_acl_next'''() -or -'''archive_entry_acl_next_w'''(). -The function returns either 0, if no non-extended ACLs are found. +'''archive_entry_acl_next'''(). +The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be obtained by -[[ManPageArchiveEntryMode3]] +[[ManPagerchiventryode3]] or set using [[chmod(2)|http://www.freebsd.org/cgi/man.cgi?query=chmod&sektion=2]]. Otherwise, the function returns the same value as @@ -356,7 +354,8 @@ and '''archive_entry_acl_to_text_w'''() convert the ACL entries for the given type into a (wide) -string of ACL entries separated by newline. If the pointer +string of ACL entries separated by newline. +If the pointer is not NULL, then the function shall return the length of the string (not including the NULL terminator) in the location pointed to by @@ -409,7 +408,8 @@ are prefixed with "default:". '''archive_entry_acl_types'''() -get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 +get ACL entry types contained in an archive entry's ACL. +As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries. == RETURN VALUES == @@ -432,9 +432,7 @@ ARCHIVE_WARN if one or more entries were invalid or non-parseable. '''archive_entry_acl_next'''() -and -'''archive_entry_acl_next_w'''() -return +returns ARCHIVE_OK on success, ARCHIVE_EOF @@ -456,5 +454,5 @@ and flags on success or NULL on error. '''archive_entry_acl_types'''() returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries. == SEE ALSO == -[[ManPageArchiveEntry3]], -[[ManPageLibarchive3]] +[[ManPagerchiventry3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryLinkify3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryLinkify3.wiki index a94b398c97e..1e35c5984c0 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryLinkify3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryLinkify3.wiki @@ -64,7 +64,7 @@ The '''archive_entry_linkresolver_set_strategy'''() function selects the optimal hardlink strategy for the given format. The format code can be obtained from -[[ManPageArchiveFormat3]]. +[[ManPagerchiveormat3]]. The function can be called more than once, but it is recommended to flush all deferred entries first. @@ -194,4 +194,4 @@ on [[malloc(3)|http://www.freebsd.org/cgi/man.cgi?query=malloc&sektion=3]] failures. == SEE ALSO == -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryMisc3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryMisc3.wiki index 9987c945067..02a91fdd11e 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryMisc3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryMisc3.wiki @@ -2,7 +2,7 @@ ARCHIVE_ENTRY_MISC(3) manual page == NAME == '''archive_entry_symlink_type''', '''archive_entry_set_symlink_type''' -- miscellaneous functions for manipulating properties of archive_entry. +- miscellaneous functions for manipulating properties of archive_entry == LIBRARY == Streaming Archive Library (libarchive, -larchive) == SYNOPSIS == @@ -20,7 +20,8 @@ The function '''archive_entry_symlink_type'''() returns and the function '''archive_entry_set_symlink_type'''() -sets the type of the symbolic link stored in an archive entry. These functions +sets the type of the symbolic link stored in an archive entry. +These functions have special meaning on operating systems that support multiple symbolic link types (e.g. Microsoft Windows). @@ -34,7 +35,7 @@ Symbolic link points to a file Symbolic link points to a directory </dd></dl> == SEE ALSO == -[[ManPageArchiveEntry3]], -[[ManPageArchiveEntryPaths3]], -[[ManPageArchiveEntryStat3]], -[[ManPageLibarchive3]] +[[ManPagerchiventry3]], +[[ManPagerchiventryaths3]], +[[ManPagerchiventrytat3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPaths3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPaths3.wiki index ea8a8f29253..64ccef956d8 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPaths3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPaths3.wiki @@ -127,7 +127,7 @@ Streaming Archive Library (libarchive, -larchive) '''archive_entry_update_symlink_utf8'''(''struct archive_entry *a'', ''const char *path''); == DESCRIPTION == Path names supported by -[[ManPageArchiveEntry3]]: +[[ManPagerchiventry3]]: <dl> <dt>hardlink</dt><dd> Destination of the hardlink. @@ -140,7 +140,7 @@ the destination for that. Path in the archive </dd><dt>sourcepath</dt><dd> Path on the disk for use by -[[ManPageArchiveReadDisk3]]. +[[ManPagerchiveeadisk3]]. </dd><dt>symlink</dt><dd> Destination of the symbolic link. </dd></dl> @@ -155,7 +155,7 @@ The accessor functions are named '''XXX_w'''(). </dd><dt>UTF-8</dt><dd> Unicode strings encoded as UTF-8. -This are convience functions to update both the multibyte and wide +These are convenience functions to update both the multibyte and wide character strings at the same time. </dd></dl> @@ -163,13 +163,13 @@ The sourcepath is a pure filesystem concept and never stored in an archive directly. For that reason, it is only available as multibyte string. -The link path is a convience function for conditionally setting +The link path is a convenience function for conditionally setting hardlink or symlink destination. It doesn't have a corresponding get accessor function. '''archive_entry_set_XXX'''() -is an alias for +is an alias for '''archive_entry_copy_XXX'''(). == SEE ALSO == -[[ManPageArchiveEntry3]] -[[ManPageLibarchive3]], +[[ManPagerchiventry3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPerms3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPerms3.wiki index 39c67c3c548..f18ee605f13 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPerms3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPerms3.wiki @@ -139,7 +139,7 @@ The corresponding functions and '''archive_entry_set_perm'''() store the given user id, group id and permission in the entry. -The permission is also set as side effect of calling +The permission is also set as a side effect of calling '''archive_entry_set_mode'''(). '''archive_entry_strmode'''() @@ -156,12 +156,12 @@ The accessor functions are named '''XXX_w'''(). </dd><dt>UTF-8</dt><dd> Unicode strings encoded as UTF-8. -This are convience functions to update both the multibyte and wide +These are convenience functions to update both the multibyte and wide character strings at the same time. </dd></dl> '''archive_entry_set_XXX'''() -is an alias for +is an alias for '''archive_entry_copy_XXX'''(). === File Flags=== File flags are transparently converted between a bitmap @@ -195,7 +195,7 @@ The '''archive_entry_copy_fflags_text'''() and '''archive_entry_copy_fflags_text_w'''() -functions parse the provided text and sets the internal bitmap values. +functions parse the provided text and set the internal bitmap values. This is a platform-specific operation; names that are not meaningful on the current platform will be ignored. The function returns a pointer to the start of the first name that was not @@ -207,11 +207,11 @@ every name that is recognized. [[strtofflags(3)|http://www.freebsd.org/cgi/man.cgi?query=strtofflags&sektion=3]], which stops parsing at the first unrecognized name.) == SEE ALSO == -[[ManPageArchiveEntry3]], -[[ManPageArchiveEntryAcl3]], -[[ManPageArchiveReadDisk3]], -[[ManPageArchiveWriteDisk3]] -[[ManPageLibarchive3]], +[[ManPagerchiventry3]], +[[ManPagerchiventrycl3]], +[[ManPagerchiveeadisk3]], +[[ManPagerchiveriteisk3]], +[[ManPageibarchive3]] == BUGS == The platform types ''uid_t'' diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryStat3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryStat3.wiki index e96169f1c32..f597dab95d3 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryStat3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryStat3.wiki @@ -28,7 +28,7 @@ ARCHIVE_ENTRY_STAT(3) manual page '''archive_entry_rdevmajor''', '''archive_entry_set_rdevmajor''', '''archive_entry_rdevminor''', -'''archive_entry_set_rdevminor''', +'''archive_entry_set_rdevminor''' - accessor functions for manipulating archive entry descriptions == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -249,16 +249,16 @@ and set and unset the size, respectively. The number of references (hardlinks) can be obtained by calling -'''archive_entry_nlinks'''() +'''archive_entry_nlink'''() and set with -'''archive_entry_set_nlinks'''(). +'''archive_entry_set_nlink'''(). === Identifying unique files=== The functions '''archive_entry_dev'''() and '''archive_entry_ino64'''() are used by -[[ManPageArchiveEntryLinkify3]] +[[ManPagerchiventryinkify3]] to find hardlinks. The pair of device and inode is supposed to identify hardlinked files. @@ -301,8 +301,8 @@ platforms. Some archive formats use the combined form, while other formats use the split form. == SEE ALSO == -[[ManPageArchiveEntryAcl3]], -[[ManPageArchiveEntryPerms3]], -[[ManPageArchiveEntryTime3]], -[[ManPageLibarchive3]], -[[stat(2)|http://www.freebsd.org/cgi/man.cgi?query=stat&sektion=2]] +[[stat(2)|http://www.freebsd.org/cgi/man.cgi?query=stat&sektion=2]], +[[ManPagerchiventrycl3]], +[[ManPagerchiventryerms3]], +[[ManPagerchiventryime3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryTime3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryTime3.wiki index bff82575627..f46aa849f33 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryTime3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryTime3.wiki @@ -19,7 +19,7 @@ ARCHIVE_ENTRY_TIME(3) manual page '''archive_entry_mtime_nsec''', '''archive_entry_mtime_is_set''', '''archive_entry_set_mtime''', -'''archive_entry_unset_mtime''', +'''archive_entry_unset_mtime''' - functions for manipulating times in archive entry descriptions == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -111,7 +111,7 @@ These functions create and manipulate the time fields in an Supported time fields are atime (access time), birthtime (creation time), ctime (last time an inode property was changed) and mtime (modification time). -[[ManPageLibarchive3]] +[[ManPageibarchive3]] provides a high-resolution interface. The timestamps are truncated automatically depending on the archive format (for archiving) or the filesystem capabilities (for restoring). @@ -124,8 +124,8 @@ The current state can be queried using '''XXX_is_set'''(). Unset time fields have a second and nanosecond field of 0. == SEE ALSO == -[[ManPageArchiveEntry3]] -[[ManPageLibarchive3]], +[[ManPagerchiventry3]], +[[ManPageibarchive3]] == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki index 0b6e08d283d..34cdb7f098a 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki @@ -15,7 +15,7 @@ headers and associated data, then close the archive and release all resources. === Create archive object=== See -[[ManPageArchiveReadNew3]]. +[[ManPagerchiveeadew3]]. To read an archive, you must first obtain an initialized '''struct archive''' @@ -23,9 +23,9 @@ object from '''archive_read_new'''(). === Enable filters and formats=== See -[[ManPageArchiveReadFilter3]] +[[ManPagerchiveeadilter3]] and -[[ManPageArchiveReadFormat3]]. +[[ManPagerchiveeadormat3]]. You can then modify this object for the desired operations with the various @@ -49,10 +49,10 @@ to enable auto-detect for all formats and compression types currently supported by the library. === Set options=== See -[[ManPageArchiveReadSetOptions3]]. +[[ManPagerchiveeadetptions3]]. === Open archive=== See -[[ManPageArchiveReadOpen3]]. +[[ManPagerchiveeadpen3]]. Once you have prepared the '''struct archive''' @@ -72,10 +72,10 @@ callback functions are free to read whatever block size is most appropriate for the medium. === Consume archive=== See -[[ManPageArchiveReadHeader3]], -[[ManPageArchiveReadData3]] +[[ManPagerchiveeadeader3]], +[[ManPagerchiveeadata3]] and -[[ManPageArchiveReadExtract3]]. +[[ManPagerchiveeadxtract3]]. Each archive entry consists of a header followed by a certain amount of data. @@ -112,7 +112,7 @@ In particular, many applications will want to override the pathname, file permissions, or ownership. === Release resources=== See -[[ManPageArchiveReadFree3]]. +[[ManPagerchiveeadree3]]. Once you have finished reading data from the archive, you should call @@ -120,7 +120,7 @@ should call to close the archive, then call '''archive_read_free'''() to release all resources, including all memory allocated by the library. -== EXAMPLE == +== EXAMPLES == The following illustrates basic usage of the library. In this example, the callback functions are simply wrappers around the standard @@ -174,16 +174,16 @@ myclose(struct archive *a, void *client_data) ``` == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveReadNew3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadExtract3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadHeader3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadxtract3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadeader3]], +[[ManPagerchiveeadew3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], +[[ManPageibarchive3]], [[ManPageTar5]] == HISTORY == The diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadAddPassphrase3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadAddPassphrase3.wiki index 466505c5522..f05a683e2cd 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadAddPassphrase3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadAddPassphrase3.wiki @@ -28,15 +28,15 @@ or empty, this function will do nothing and will be returned. Otherwise, '''ARCHIVE_OK''' -will be returned. +will be returned. </dd><dt>'''archive_read_set_passphrase_callback'''()</dt><dd> -Register callback function that will be invoked to get a passphrase -for decrption after trying all passphrases registered by the +Register a callback function that will be invoked to get a passphrase +for decryption after trying all the passphrases registered by the '''archive_read_add_passphrase'''() function failed. </dd></dl> == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadSetOptions3]] +[[ManPagerchiveead3]], +[[ManPagerchiveeadetptions3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadData3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadData3.wiki index da4647cf141..e39bbdc9cbe 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadData3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadData3.wiki @@ -1,6 +1,6 @@ ARCHIVE_READ_DATA(3) manual page == NAME == -'''archive_read_data''' +'''archive_read_data''', '''archive_read_data_block''', '''archive_read_data_skip''', '''archive_read_data_into_fd''' @@ -89,13 +89,13 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadExtract3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadHeader3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadxtract3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadeader3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], +[[ManPageibarchive3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki index 06288ef960b..238274c4f2e 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki @@ -78,9 +78,10 @@ following values: <dl> <dt>'''ARCHIVE_READDISK_HONOR_NODUMP'''</dt><dd> Skip files and directories with the nodump file attribute (file flag) set. -By default, the nodump file atrribute is ignored. +By default, the nodump file attribute is ignored. </dd><dt>'''ARCHIVE_READDISK_MAC_COPYFILE'''</dt><dd> -Mac OS X specific. Read metadata (ACLs and extended attributes) with +Mac OS X specific. +Read metadata (ACLs and extended attributes) with [[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]]. By default, metadata is read using [[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]]. @@ -99,7 +100,7 @@ or for more information on file attributes. </dd><dt>'''ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS'''</dt><dd> Do not traverse mount points. -By defaut, moint points are traversed. +By default, mount points are traversed. </dd><dt>'''ARCHIVE_READDISK_NO_XATTR'''</dt><dd> Do not read extended file attributes (xattrs). By default, extended file attributes are read from disk. @@ -173,7 +174,7 @@ object with information about a particular file. The '''archive_entry''' object must have already been created with -[[ManPageArchiveEntryNew3]] +[[ManPagerchiventryew3]] and at least one of the source path or path fields must already be set. (If both are set, the source path will be used.) @@ -195,7 +196,7 @@ of some other operation. (For example, directory traversal libraries often provide this information.) Where necessary, user and group ids are converted to user and group names -using the currently registered lookup functions above. +using the currently-registered lookup functions above. This affects the file ownership fields and ACL values in the '''struct archive_entry''' object. @@ -203,9 +204,9 @@ object. More information about the ''struct'' archive object and the overall design of the library can be found in the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] overview. -== EXAMPLE == +== EXAMPLES == The following illustrates basic usage of the library by showing how to use it to copy an item on disk into an archive. ```text @@ -267,12 +268,12 @@ and '''archive_error_string'''() functions. == SEE ALSO == -[[ManPageArchiveRead3]], -[[ManPageArchiveUtil3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteDisk3]], [[ManPageBsdtar1]], -[[ManPageLibarchive3]] +[[ManPagerchiveead3]], +[[ManPagerchivetil3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteisk3]], +[[ManPageibarchive3]] == HISTORY == The '''libarchive''' @@ -313,7 +314,7 @@ to look up such information. This API should provide a set of methods for walking a directory tree. That would make it a direct parallel of the -[[ManPageArchiveRead3]] +[[ManPagerchiveead3]] API. When such methods are implemented, the "hybrid" diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadExtract3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadExtract3.wiki index e3ec018be18..9a5b82bf6f8 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadExtract3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadExtract3.wiki @@ -24,34 +24,34 @@ Streaming Archive Library (libarchive, -larchive) <dl> <dt>'''archive_read_extract'''(), '''archive_read_extract_set_skip_file'''()</dt><dd> A convenience function that wraps the corresponding -[[ManPageArchiveWriteDisk3]] +[[ManPagerchiveriteisk3]] interfaces. The first call to '''archive_read_extract'''() creates a restore object using -[[ManPageArchiveWriteDiskNew3]] +[[ManPagerchiveriteiskew3]] and -[[ManPageArchiveWriteDiskSetStandardLookup3]], +[[ManPagerchiveriteiskettandardookup3]], then transparently invokes -[[ManPageArchiveWriteDiskSetOptions3]], -[[ManPageArchiveWriteHeader3]], -[[ManPageArchiveWriteData3]], +[[ManPagerchiveriteisketptions3]], +[[ManPagerchiveriteeader3]], +[[ManPagerchiveriteata3]], and -[[ManPageArchiveWriteFinishEntry3]] +[[ManPagerchiveriteinishntry3]] to create the entry on disk and copy data into it. The ''flags'' argument is passed unmodified to -[[ManPageArchiveWriteDiskSetOptions3]]. +[[ManPagerchiveriteisketptions3]]. </dd><dt>'''archive_read_extract2'''()</dt><dd> This is another version of '''archive_read_extract'''() that allows you to provide your own restore object. In particular, this allows you to override the standard lookup functions using -[[ManPageArchiveWriteDiskSetGroupLookup3]], +[[ManPagerchiveriteisketroupookup3]], and -[[ManPageArchiveWriteDiskSetUserLookup3]]. +[[ManPagerchiveriteisketserookup3]]. Note that '''archive_read_extract2'''() does not accept a @@ -91,12 +91,12 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], +[[ManPageibarchive3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki index 9005be9991c..85b0cd30477 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki @@ -136,8 +136,8 @@ and '''archive_error_string'''() functions. == SEE ALSO == -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadFormat3]] +[[ManPagerchiveead3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadormat3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki index 0d2955476db..13d17ad2d6c 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki @@ -150,11 +150,11 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], +[[ManPageibarchive3]], [[ManPageTar5]] == BUGS == Many traditional archiver programs treat diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFree3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFree3.wiki index 90b094922ac..d85030d0bf9 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFree3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFree3.wiki @@ -58,11 +58,11 @@ and '''archive_error_string'''() functions. == SEE ALSO == -[[ManPageLibarchive3]], -[[ManPageArchiveReadNew3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]] +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadew3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadHeader3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadHeader3.wiki index 7eb59499f56..f2d39a8c6e2 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadHeader3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadHeader3.wiki @@ -51,13 +51,13 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadExtract3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadxtract3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], +[[ManPageibarchive3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadNew3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadNew3.wiki index 70c3cfd3fd7..67c4f1fd7f1 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadNew3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadNew3.wiki @@ -20,13 +20,13 @@ is returned on error. A complete description of the '''struct archive''' object can be found in the overview manual page for -[[ManPageLibarchive3]]. +[[ManPageibarchive3]]. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], +[[ManPageibarchive3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadOpen3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadOpen3.wiki index d2f6b333e51..afaca2ba5f6 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadOpen3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadOpen3.wiki @@ -92,7 +92,7 @@ A complete description of the and '''struct archive_entry''' objects can be found in the overview manual page for -[[ManPageLibarchive3]]. +[[ManPageibarchive3]]. == CLIENT CALLBACKS == The callback functions must match the following prototypes: <ul> @@ -166,7 +166,7 @@ On failure, the callback should invoke '''archive_set_error'''() to register an error code and message and return -'''ARCHIVE_FATAL.''' +'''ARCHIVE_FATAL'''. == RETURN VALUES == These functions return '''ARCHIVE_OK''' @@ -180,11 +180,11 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], +[[ManPageibarchive3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadSetOptions3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadSetOptions3.wiki index b2bca417c4b..bb739bc105f 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadSetOptions3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadSetOptions3.wiki @@ -138,7 +138,19 @@ only to modules whose name matches </dd></dl> == OPTIONS == <dl> -<dt>Format iso9660</dt><dd> +<dt>Format cab</dt><dd> +<dl> +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file names. +</dd></dl> +</dd><dt>Format cpio</dt><dd> +<dl> +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file names. +</dd></dl> +</dd><dt>Format iso9660</dt><dd> <dl> <dt>'''joliet'''</dt><dd> Support Joliet extensions. @@ -151,6 +163,24 @@ Defaults to enabled, use '''!rockridge''' to disable. </dd></dl> +</dd><dt>Format lha</dt><dd> +<dl> +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file names. +</dd></dl> +</dd><dt>Format mtree</dt><dd> +<dl> +<dt>'''checkfs'''</dt><dd> +Allow reading information missing from the mtree from the file system. +Disabled by default. +</dd></dl> +</dd><dt>Format rar</dt><dd> +<dl> +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file names. +</dd></dl> </dd><dt>Format tar</dt><dd> <dl> <dt>'''compat-2x'''</dt><dd> @@ -160,7 +190,7 @@ This option mimics the libarchive 2.x filename handling so that such archives can be read correctly. </dd><dt>'''hdrcharset'''</dt><dd> The value is used as a character set name that will be -used when translating filenames. +used when translating file names. </dd><dt>'''mac-ext'''</dt><dd> Support Mac OS metadata extension that records data in special files beginning with a period and underscore. @@ -170,7 +200,8 @@ Use to disable. </dd><dt>'''read_concatenated_archives'''</dt><dd> Ignore zeroed blocks in the archive, which occurs when multiple tar archives -have been concatenated together. Without this option, only the contents of +have been concatenated together. +Without this option, only the contents of the first concatenated archive would be read. </dd></dl> </dd></dl> @@ -182,6 +213,6 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], -[[ManPageArchiveRead3]] +[[ManPagerchiveead3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki index 2f07b658add..8869fbb60b0 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki @@ -79,7 +79,7 @@ Streaming Archive Library (libarchive, -larchive) These functions provide access to various information about the '''struct archive''' object used in the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library. <dl> <dt>'''archive_clear_error'''()</dt><dd> @@ -87,10 +87,10 @@ Clears any error information left over from a previous call. Not generally used in client code. </dd><dt>'''archive_compression'''()</dt><dd> Synonym for -'''archive_filter_code(a,'''(''0)''). +'''archive_filter_code'''(''a'', ''0''). </dd><dt>'''archive_compression_name'''()</dt><dd> Synonym for -'''archive_filter_name(a,'''(''0)''). +'''archive_filter_name'''(''a'', ''0''). </dd><dt>'''archive_copy_error'''()</dt><dd> Copies error information from one archive to another. </dd><dt>'''archive_errno'''()</dt><dd> @@ -111,9 +111,9 @@ to </dd><dt>'''archive_file_count'''()</dt><dd> Returns a count of the number of files processed by this archive object. The count is incremented by calls to -[[ManPageArchiveWriteHeader3]] +[[ManPagerchiveriteeader3]] or -[[ManPageArchiveReadNextHeader3]]. +[[ManPagerchiveeadexteader3]]. </dd><dt>'''archive_filter_code'''()</dt><dd> Returns a numeric code identifying the indicated filter. See @@ -137,13 +137,13 @@ filter 0 is the gunzip filter, filter 1 is the uudecode filter, and filter 2 is the pseudo-filter that wraps the archive read functions. In this case, requesting -'''archive_position(a,'''(''-1)'') +'''archive_position'''(''a'', ''-1'') would be a synonym for -'''archive_position(a,'''(''2)'') +'''archive_position'''(''a'', ''2'') which would return the number of bytes currently read from the archive, while -'''archive_position(a,'''(''1)'') +'''archive_position'''(''a'', ''1'') would return the number of bytes after uudecoding, and -'''archive_position(a,'''(''0)'') +'''archive_position'''(''a'', ''0'') would return the number of bytes after decompression. </dd><dt>'''archive_filter_name'''()</dt><dd> Returns a textual name identifying the indicated filter. @@ -165,9 +165,9 @@ A textual description of the format of the current entry. </dd><dt>'''archive_position'''()</dt><dd> Returns the number of bytes read from or written to the indicated filter. In particular, -'''archive_position(a,'''(''0)'') +'''archive_position'''(''a'', ''0'') returns the number of bytes read or written by the format handler, while -'''archive_position(a,'''(''-1)'') +'''archive_position'''(''a'', ''-1'') returns the number of bytes read or written to the archive. See '''archive_filter_count'''() @@ -202,9 +202,9 @@ Field-width specifiers and other printf features are not uniformly supported and should not be used. </dd></dl> == SEE ALSO == -[[ManPageArchiveRead3]], -[[ManPageArchiveWrite3]], -[[ManPageLibarchive3]], +[[ManPagerchiveead3]], +[[ManPagerchiverite3]], +[[ManPageibarchive3]], [[printf(3)|http://www.freebsd.org/cgi/man.cgi?query=printf&sektion=3]] == HISTORY == The diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki index 01349133c08..708ec27c2c6 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki @@ -15,7 +15,7 @@ object, set any desired options, initialize the archive, append entries, then close the archive and release all resources. === Create archive object=== See -[[ManPageArchiveWriteNew3]]. +[[ManPagerchiveriteew3]]. To write an archive, you must first obtain an initialized '''struct archive''' @@ -23,10 +23,10 @@ object from '''archive_write_new'''(). === Enable filters and formats, configure block size and padding=== See -[[ManPageArchiveWriteFilter3]], -[[ManPageArchiveWriteFormat3]] +[[ManPagerchiveriteilter3]], +[[ManPagerchiveriteormat3]] and -[[ManPageArchiveWriteBlocksize3]]. +[[ManPagerchiveritelocksize3]]. You can then modify this object for the desired operations with the various @@ -40,10 +40,10 @@ functions to enable the corresponding compression and format support. === Set options=== See -[[ManPageArchiveWriteSetOptions3]]. +[[ManPagerchiveriteetptions3]]. === Open archive=== See -[[ManPageArchiveWriteOpen3]]. +[[ManPagerchiveritepen3]]. Once you have prepared the '''struct archive''' @@ -59,9 +59,9 @@ specify a filename, file descriptor, object, or a block of memory from which to write the archive data. === Produce archive=== See -[[ManPageArchiveWriteHeader3]] +[[ManPagerchiveriteeader3]] and -[[ManPageArchiveWriteData3]]. +[[ManPagerchiveriteata3]]. Individual archive entries are written in a three-step process: @@ -78,12 +78,12 @@ field, which specifies the type of object and field, which specifies the size of the data portion of the object. === Release resources=== See -[[ManPageArchiveWriteFree3]]. +[[ManPagerchiveriteree3]]. After all entries have been written, use the '''archive_write_free'''() function to release all resources. -== EXAMPLE == +== EXAMPLES == The following sketch illustrates basic usage of the library. In this example, the callback functions are simply wrappers around the standard @@ -148,7 +148,7 @@ write_archive(const char *outname, const char **filename) if (archive_write_set_format_filter_by_ext(a, outname) != ARCHIVE_OK) { archive_write_add_filter_gzip(a); archive_write_set_format_ustar(a); - } + } archive_write_open(a, mydata, myopen, mywrite, myclose); while (*filename) { stat(*filename, &st); @@ -180,8 +180,8 @@ int main(int argc, const char **argv) ``` == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteBlocksize3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteBlocksize3.wiki index 7975a5a3e16..00beced7121 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteBlocksize3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteBlocksize3.wiki @@ -86,8 +86,8 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteData3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteData3.wiki index 7cde09f5e8b..8670f8a7ec5 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteData3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteData3.wiki @@ -53,9 +53,9 @@ Clients should treat any value less than zero as an error and consider any non-negative value as success. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteFinishEntry3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiveriteinishntry3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki index d3e1a4e1624..e3eea00ca51 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki @@ -87,7 +87,8 @@ or (FreeBSD, Mac OS X) for more information on file attributes. </dd><dt>'''ARCHIVE_EXTRACT_MAC_METADATA'''</dt><dd> -Mac OS X specific. Restore metadata using +Mac OS X specific. +Restore metadata using [[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]]. By default, [[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]] @@ -112,6 +113,11 @@ is not specified, then SUID and SGID bits will only be restored if the default user and group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed. +</dd><dt>'''ARCHIVE_EXTRACT_SAFE_WRITES'''</dt><dd> +Extract files atomically, by first creating a unique temporary file and then +renaming it to its required destination name. +This avoids a race where an application might see a partial file (or no +file) during extraction. </dd><dt>'''ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS'''</dt><dd> Refuse to extract an absolute path. The default is to not refuse such paths. @@ -202,10 +208,10 @@ and More information about the ''struct'' archive object and the overall design of the library can be found in the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] overview. Many of these functions are also documented under -[[ManPageArchiveWrite3]]. +[[ManPagerchiverite3]]. == RETURN VALUES == Most functions return '''ARCHIVE_OK''' @@ -238,10 +244,10 @@ and '''archive_error_string'''() functions. == SEE ALSO == -[[ManPageArchiveRead3]], -[[ManPageArchiveWrite3]], [[ManPageBsdtar1]], -[[ManPageLibarchive3]] +[[ManPagerchiveead3]], +[[ManPagerchiverite3]], +[[ManPageibarchive3]] == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki index e82588f2e76..84d78162911 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki @@ -15,7 +15,7 @@ ARCHIVE_WRITE_FILTER(3) manual page '''archive_write_add_filter_program''', '''archive_write_add_filter_uuencode''', '''archive_write_add_filter_xz''', -'''archive_write_add_filter_zstd''', +'''archive_write_add_filter_zstd''' - functions enabling output filters == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -125,10 +125,10 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteFormat3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteormat3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFinishEntry3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFinishEntry3.wiki index 6d33560e675..a1f2a32aca3 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFinishEntry3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFinishEntry3.wiki @@ -42,9 +42,9 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteData3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiveriteata3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFormat3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFormat3.wiki index 60fa69c54b6..2a92d7926f8 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFormat3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFormat3.wiki @@ -24,7 +24,7 @@ ARCHIVE_WRITE_FORMAT(3) manual page '''archive_write_set_format_v7tar''', '''archive_write_set_format_warc''', '''archive_write_set_format_xar''', -'''archive_write_set_format_zip''', +'''archive_write_set_format_zip''' - functions for creating archives == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -165,7 +165,7 @@ Supported extensions: .7z, .zip, .jar, .cpio, .iso, .a, .ar, .tar, .tgz, .tar.gz </dt> <dd> Set the format as specified. More details on the formats supported by libarchive can be found in the -[[ManPageLibarchiveFormats5]] +[[ManPageibarchiveormats5]] manual page. </dd></dl> == RETURN VALUES == @@ -181,10 +181,10 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], -[[ManPageLibarchiveFormats5]], +[[ManPageibarchiveormats5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFree3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFree3.wiki index 1d94a56b16f..06341bf4dab 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFree3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFree3.wiki @@ -36,7 +36,7 @@ after calling this function, the only call that can succeed is to release the resources. This can be used to speed recovery when the archive creation must be aborted. -Note that the created archive is likely to be malformed in this case; +Note that the created archive is likely to be malformed in this case; </dd><dt>'''archive_write_close'''()</dt><dd> Complete the archive and invoke the close callback. </dd><dt>'''archive_write_finish'''()</dt><dd> @@ -66,8 +66,8 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteHeader3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteHeader3.wiki index 412db20eddd..7087eded0fb 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteHeader3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteHeader3.wiki @@ -15,7 +15,7 @@ Build and write a header using the data in the provided '''struct archive_entry''' structure. See -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] for information on creating and populating '''struct archive_entry''' objects. @@ -37,8 +37,8 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteNew3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteNew3.wiki index b8c311f7012..b9c787c756f 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteNew3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteNew3.wiki @@ -20,12 +20,12 @@ is returned on error. A complete description of the '''struct archive''' object can be found in the overview manual page for -[[ManPageLibarchive3]]. +[[ManPageibarchive3]]. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteOpen3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteOpen3.wiki index 369d7554a6d..579aaf36eaf 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteOpen3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteOpen3.wiki @@ -101,13 +101,13 @@ have specifically set the block size. More information about the ''struct'' archive object and the overall design of the library can be found in the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] overview. Note that the convenience forms above vary in how they block the output. See -[[ManPageArchiveWriteBlocksize3]] +[[ManPagerchiveritelocksize3]] if you need to control the block size used for writes or the end-of-file padding behavior. == CLIENT CALLBACKS == @@ -165,7 +165,7 @@ On failure, the callback should invoke '''archive_set_error'''() to register an error code and message and return -'''ARCHIVE_FATAL.''' +'''ARCHIVE_FATAL'''. Note that if the client-provided write callback function returns a non-zero value, that error will be propagated back to the caller @@ -196,13 +196,13 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteBlocksize3]], -[[ManPageArchiveWriteFilter3]], -[[ManPageArchiveWriteFormat3]], -[[ManPageArchiveWriteNew3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPagerchiverite3]], +[[ManPagerchiveritelocksize3]], +[[ManPagerchiveriteilter3]], +[[ManPagerchiveriteormat3]], +[[ManPagerchiveriteew3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki index f2c60fc073e..dc9a4809b01 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki @@ -32,7 +32,7 @@ specific write modules. '''archive_write_set_filter_option'''(), '''archive_write_set_format_option'''() </dt> <dd> -Specifies an option that will be passed to currently-registered +Specifies an option that will be passed to the currently-registered filters (including decompression filters) or format readers. If @@ -99,7 +99,7 @@ If either function returns '''ARCHIVE_FATAL''' will be returned immediately. -Otherwise, greater of the two values will be returned. +Otherwise, the greater of the two values will be returned. </dd><dt>'''archive_write_set_options'''()</dt><dd> ''options'' is a comma-separated list of options. @@ -129,55 +129,154 @@ only to modules whose name matches </dd></dl> == OPTIONS == <dl> -<dt>Filter gzip</dt><dd> +<dt>Filter b64encode</dt><dd> +<dl> +<dt>'''mode'''</dt><dd> +The value is interpreted as octal digits specifying the file mode. +</dd><dt>'''name'''</dt><dd> +The value specifies the file name. +</dd></dl> +</dd><dt>Filter bzip2</dt><dd> +<dl> +<dt>'''compression-level'''</dt><dd> +The value is interpreted as a decimal integer specifying the +bzip2 compression level. Supported values are from 1 to 9. +</dd></dl> +</dd><dt>Filter gzip</dt><dd> +<dl> +<dt>'''compression-level'''</dt><dd> +The value is interpreted as a decimal integer specifying the +gzip compression level. Supported values are from 0 to 9. +</dd><dt>'''timestamp'''</dt><dd> +Store timestamp. This is enabled by default. +</dd></dl> +</dd><dt>Filter lrzip</dt><dd> +<dl> +<dt>'''compression'''=''type''</dt><dd> +Use +''type'' +as compression method. +Supported values are +"bzip2", +"gzipi", +"lzo" +(ultra fast,) +and +"zpaq" +(best, extremely slow.) +</dd><dt>'''compression-level'''</dt><dd> +The value is interpreted as a decimal integer specifying the +lrzip compression level. Supported values are from 1 to 9. +</dd></dl> +</dd><dt>Filter lz4</dt><dd> <dl> <dt>'''compression-level'''</dt><dd> The value is interpreted as a decimal integer specifying the -gzip compression level. +lz4 compression level. Supported values are from 0 to 9. +</dd><dt>'''stream-checksum'''</dt><dd> +Enable stream checksum. This is enabled by default. +</dd><dt>'''block-checksum'''</dt><dd> +Enable block checksum. This is disabled by default. +</dd><dt>'''block-size'''</dt><dd> +The value is interpreted as a decimal integer specifying the +lz4 compression block size. Supported values are from 4 to 7 +(default.) +</dd><dt>'''block-dependence'''</dt><dd> +Use the previous block of the block being compressed for +a compression dictionary to improve compression ratio. +This is disabled by default. +</dd></dl> +</dd><dt>Filter lzop</dt><dd> +<dl> +<dt>'''compression-level'''</dt><dd> +The value is interpreted as a decimal integer specifying the +lzop compression level. Supported values are from 1 to 9. +</dd></dl> +</dd><dt>Filter uuencode</dt><dd> +<dl> +<dt>'''mode'''</dt><dd> +The value is interpreted as octal digits specifying the file mode. +</dd><dt>'''name'''</dt><dd> +The value specifies the file name. </dd></dl> </dd><dt>Filter xz</dt><dd> <dl> <dt>'''compression-level'''</dt><dd> The value is interpreted as a decimal integer specifying the +compression level. Supported values are from 0 to 9. +</dd><dt>'''threads'''</dt><dd> +The value is interpreted as a decimal integer specifying the +number of threads for multi-threaded lzma compression. +If supported, the default value is read from +'''lzma_cputhreads'''(). +</dd></dl> +</dd><dt>Filter zstd</dt><dd> +<dl> +<dt>'''compression-level'''</dt><dd> +The value is interpreted as a decimal integer specifying the +compression level. Supported values depend on the library version, +common values are from 1 to 22. +</dd></dl> +</dd><dt>Format 7zip</dt><dd> +<dl> +<dt>'''compression'''</dt><dd> +The value is one of +"store", +"deflate", +"bzip2", +"lzma1", +"lzma2" +or +"ppmd" +to indicate how the following entries should be compressed. +Note that this setting is ignored for directories, symbolic links, +and other special entries. +</dd><dt>'''compression-level'''</dt><dd> +The value is interpreted as a decimal integer specifying the compression level. +Values between 0 and 9 are supported. +The interpretation of the compression level depends on the chosen +compression method. </dd></dl> -</dd><dt>Format mtree</dt><dd> +</dd><dt>Format cpio</dt><dd> <dl> -<dt>'''cksum''', '''device''', '''flags''', '''gid''', '''gname''', '''indent''', '''link''', '''md5''', '''mode''', '''nlink''', '''rmd160''', '''sha1''', '''sha256''', '''sha384''', '''sha512''', '''size''', '''time''', '''uid''', '''uname'''</dt><dd> -Enable a particular keyword in the mtree output. -Prefix with an exclamation mark to disable the corresponding keyword. -The default is equivalent to -"device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname". -</dd><dt>'''all'''</dt><dd> -Enables all of the above keywords. -</dd><dt>'''use-set'''</dt><dd> -Enables generation of -'''/set''' -lines that specify default values for the following files and/or directories. -</dd><dt>'''indent'''</dt><dd> -XXX needs explanation XXX +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file names. +</dd></dl> +</dd><dt>Format gnutar</dt><dd> +<dl> +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file, group and user names. </dd></dl> </dd><dt>Format iso9660 - volume metadata</dt><dd> These options are used to set standard ISO9660 metadata. <dl> <dt>'''abstract-file'''=''filename''</dt><dd> The file with the specified name will be identified in the ISO9660 metadata -as holding the abstract for this volume. Default: none. +as holding the abstract for this volume. +Default: none. </dd><dt>'''application-id'''=''filename''</dt><dd> The file with the specified name will be identified in the ISO9660 metadata -as holding the application identifier for this volume. Default: none. +as holding the application identifier for this volume. +Default: none. </dd><dt>'''biblio-file'''=''filename''</dt><dd> The file with the specified name will be identified in the ISO9660 metadata -as holding the bibliography for this volume. Default: none. +as holding the bibliography for this volume. +Default: none. </dd><dt>'''copyright-file'''=''filename''</dt><dd> The file with the specified name will be identified in the ISO9660 metadata -as holding the copyright for this volume. Default: none. +as holding the copyright for this volume. +Default: none. </dd><dt>'''publisher'''=''filename''</dt><dd> The file with the specified name will be identified in the ISO9660 metadata -as holding the publisher information for this volume. Default: none. +as holding the publisher information for this volume. +Default: none. </dd><dt>'''volume-id'''=''string''</dt><dd> The specified string will be used as the Volume Identifier in the ISO9660 metadata. -It is limited to 32 bytes. Default: none. +It is limited to 32 bytes. +Default: none. </dd></dl> </dd><dt>Format iso9660 - boot support</dt><dd> These options are used to make an ISO9660 image that can be directly @@ -225,7 +324,7 @@ If the boot image is exactly 1.2MB, 1.44MB, or 2.88MB, then the default is '''fd''', otherwise the default is -'''no-emulation.''' +'''no-emulation'''. </dd></dl> </dd><dt>Format iso9660 - filename and size extensions</dt><dd> Various extensions to the base ISO9660 format. @@ -249,7 +348,7 @@ This does not impact names stored in the Rockridge or Joliet extension area. Default: disabled. </dd><dt>'''allow-period'''</dt><dd> If enabled, allows filenames to contain trailing period characters, in violation of the ISO9660 specification. -If disabled,trailing periods will be converted to underscore characters. +If disabled, trailing periods will be converted to underscore characters. This does not impact names stored in the Rockridge or Joliet extension area. Default: disabled. </dd><dt>'''allow-pvd-lowercase'''</dt><dd> @@ -357,6 +456,111 @@ Specifies a filename that should not be compressed when using This option can be provided multiple times to suppress compression on many files. </dd></dl> +</dd><dt>Format mtree</dt><dd> +<dl> +<dt>'''cksum''', '''device''', '''flags''', '''gid''', '''gname''', '''indent''', '''link''', '''md5''', '''mode''', '''nlink''', '''rmd160''', '''sha1''', '''sha256''', '''sha384''', '''sha512''', '''size''', '''time''', '''uid''', '''uname'''</dt><dd> +Enable a particular keyword in the mtree output. +Prefix with an exclamation mark to disable the corresponding keyword. +The default is equivalent to +"device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname". +</dd><dt>'''all'''</dt><dd> +Enables all of the above keywords. +</dd><dt>'''use-set'''</dt><dd> +Enables generation of +'''/set''' +lines that specify default values for the following files and/or directories. +</dd><dt>'''indent'''</dt><dd> +XXX needs explanation XXX +</dd></dl> +</dd><dt>Format newc</dt><dd> +<dl> +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file names. +</dd></dl> +</dd><dt>Format pax</dt><dd> +<dl> +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file, group and user names. +The value is one of +"BINARY" +or +"UTF-8". +With +"BINARY" +there is no character conversion, with +"UTF-8" +names are converted to UTF-8. +</dd><dt>'''xattrheader'''</dt><dd> +When storing extended attributes, this option configures which +headers should be written. The value is one of +"all", +"LIBARCHIVE", +or +"SCHILY". +By default, both +"LIBARCHIVE.xattr" +and +"SCHILY.xattr" +headers are written. +</dd></dl> +</dd><dt>Format ustar</dt><dd> +<dl> +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file, group and user names. +</dd></dl> +</dd><dt>Format v7tar</dt><dd> +<dl> +<dt>'''hdrcharset'''</dt><dd> +The value is used as a character set name that will be +used when translating file, group and user names. +</dd></dl> +</dd><dt>Format warc</dt><dd> +<dl> +<dt>'''omit-warcinfo'''</dt><dd> +Set to +"true" +to disable output of the warcinfo record. +</dd></dl> +</dd><dt>Format xar</dt><dd> +<dl> +<dt>'''checksum'''=''type''</dt><dd> +Use +''type'' +as file checksum method. +Supported values are +"none", +"md5", +and +"sha1" +(default.) +</dd><dt>'''compression'''=''type''</dt><dd> +Use +''type'' +as compression method. +Supported values are +"none", +"bzip2", +"gzip" +(default,) +"lzma" +and +"xz". +</dd><dt>'''compression_level'''</dt><dd> +The value is a decimal integer from 1 to 9 specifying the compression level. +</dd><dt>'''toc-checksum'''=''type''</dt><dd> +Use +''type'' +as table of contents checksum method. +Supported values are +"none", +"md5" +and +"sha1" +(default.) +</dd></dl> </dd><dt>Format zip</dt><dd> <dl> <dt>'''compression'''</dt><dd> @@ -367,6 +571,29 @@ or to indicate how the following entries should be compressed. Note that this setting is ignored for directories, symbolic links, and other special entries. +</dd><dt>'''compression-level'''</dt><dd> +The value is interpreted as a decimal integer specifying the +compression level. +Values between 0 and 9 are supported. +A compression level of 0 switches the compression method to +"store", +other values will enable +"deflate" +compression with the given level. +</dd><dt>'''encryption'''</dt><dd> +Enable encryption using traditional zip encryption. +</dd><dt>'''encryption'''=''type''</dt><dd> +Use +''type'' +as encryption type. +Supported values are +"zipcrypt" +(traditional zip encryption,) +"aes128" +(WinZip AES-128 encryption) +and +"aes256" +(WinZip AES-256 encryption.) </dd><dt>'''experimental'''</dt><dd> This boolean option enables or disables experimental Zip features that may not be compatible with other Zip implementations. @@ -375,7 +602,8 @@ This boolean option disables CRC calculations. All CRC fields are set to zero. It should not be used except for testing purposes. </dd><dt>'''hdrcharset'''</dt><dd> -This sets the character set used for filenames. +The value is used as a character set name that will be +used when translating file names. </dd><dt>'''zip64'''</dt><dd> Zip64 extensions provide additional file size information for entries larger than 4 GiB. @@ -422,9 +650,9 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveWrite3]] +[[ManPagerchiveeadetptions3]], +[[ManPagerchiverite3]], +[[ManPageibarchive3]] == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetPassphrase3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetPassphrase3.wiki index 4f6a97cc846..f61d67cb764 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetPassphrase3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetPassphrase3.wiki @@ -18,7 +18,7 @@ Streaming Archive Library (libarchive, -larchive) == DESCRIPTION == <dl> <dt>'''archive_write_set_passphrase'''()</dt><dd> -Set a passphrase for writing an encryption archive. +Set a passphrase for writing an encrypted archive. If ''passphrase'' is @@ -28,15 +28,15 @@ or empty, this function will do nothing and will be returned. Otherwise, '''ARCHIVE_OK''' -will be returned. +will be returned. </dd><dt>'''archive_write_set_passphrase_callback'''()</dt><dd> -Register callback function that will be invoked to get a passphrase -for encrption if the passphrase was not set by the +Register a callback function that will be invoked to get a passphrase +for encryption if the passphrase was not set by the '''archive_write_set_passphrase'''() function. </dd></dl> == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteSetOptions3]] +[[ManPagerchiverite3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki b/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki index 2821c9eab68..fce973eb456 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki @@ -50,7 +50,6 @@ Pass-through. Read a list of filenames from standard input and copy the files to the specified directory. </dd></dl> - == OPTIONS == Unless specifically stated otherwise, options are applicable in all operating modes. @@ -115,10 +114,10 @@ The POSIX.1 tar format. The default format is ''odc''. See -[[ManPageLibarchiveFormats5]] +[[ManPageibarchiveormats5]] for more complete information about the formats currently supported by the underlying -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library. </dd><dt>-h, --help</dt><dd> Print usage information. @@ -366,13 +365,13 @@ For best compatibility, scripts should limit themselves to the standard syntax. == SEE ALSO == [[bzip2(1)|http://www.freebsd.org/cgi/man.cgi?query=bzip2&sektion=1]], -[[ManPageBsdtar1]], [[gzip(1)|http://www.freebsd.org/cgi/man.cgi?query=gzip&sektion=1]], [[mt(1)|http://www.freebsd.org/cgi/man.cgi?query=mt&sektion=1]], [[pax(1)|http://www.freebsd.org/cgi/man.cgi?query=pax&sektion=1]], -[[ManPageLibarchive3]], +[[ManPageBsdtar1]], +[[ManPageibarchive3]], [[ManPageCpio5]], -[[ManPageLibarchiveFormats5]], +[[ManPageibarchiveormats5]], [[ManPageTar5]] == STANDARDS == There is no current POSIX standard for the cpio command; it appeared @@ -402,7 +401,7 @@ actually predates even though it was not well-known outside of AT&T until some time later. This is a complete re-implementation based on the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library. == BUGS == The cpio archive format has several basic limitations: diff --git a/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki b/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki index 4e521eebbee..056e52d3644 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki @@ -158,12 +158,14 @@ if it is unknown suffix or no suffix, creates a new archive with restricted pax format and bzip2 compression. </dd><dt>--acls</dt><dd> (c, r, u, x modes only) -Archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of +Archive or extract POSIX.1e or NFSv4 ACLs. +This is the reverse of --no-acls and the default behavior in c, r, and u modes (except on Mac OS X) or if '''tar''' -is run in x mode as root. On Mac OS X this option translates extended ACLs -to NFSv4 ACLs. To store extended ACLs the +is run in x mode as root. +On Mac OS X this option translates extended ACLs to NFSv4 ACLs. +To store extended ACLs the --mac-metadata option is preferred. </dd><dt>-B, --read-full-blocks</dt><dd> @@ -198,15 +200,16 @@ specified on the command line. </dd><dt>--exclude-vcs</dt><dd> Do not process files or directories internally used by the version control systems +Sq Arch, +Sq Bazaar, Sq CVS, +Sq Darcs, +Sq Mercurial, Sq RCS, Sq SCCS, -Sq SVN, -Sq Arch, -Sq Bazaar, -Sq Mercurial +Sq SVN and -Sq Darcs. +Sq git. </dd><dt>--fflags</dt><dd> (c, r, u, x modes only) Archive or extract platform-specific file attributes or file flags. @@ -225,7 +228,7 @@ Supported formats include and "ustar". Other formats may also be supported; see -[[ManPageLibarchiveFormats5]] +[[ManPageibarchiveormats5]] for more information about currently-supported formats. In r and u modes, when extending an existing archive, the format specified here must be compatible with the format of the existing archive on disk. @@ -383,10 +386,12 @@ Do not extract modification time. By default, the modification time is set to the time stored in the archive. </dd><dt>--mac-metadata</dt><dd> (c, r, u and x mode only) -Mac OS X specific. Archive or extract extended ACLs and extended file +Mac OS X specific. +Archive or extract extended ACLs and extended file attributes using [[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]] -in AppleDouble format. This is the reverse of +in AppleDouble format. +This is the reverse of --no-mac-metadata. and the default behavior in c, r, and u modes or if '''tar''' @@ -432,28 +437,39 @@ option to [[find(1)|http://www.freebsd.org/cgi/man.cgi?query=find&sektion=1]]. </dd><dt>--no-acls</dt><dd> (c, r, u, x modes only) -Do not archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of +Do not archive or extract POSIX.1e or NFSv4 ACLs. +This is the reverse of --acls and the default behavior if '''tar''' is run as non-root in x mode (on Mac OS X as any user in c, r, u and x modes). </dd><dt>--no-fflags</dt><dd> (c, r, u, x modes only) -Do not archive or extract file attributes or file flags. This is the reverse of +Do not archive or extract file attributes or file flags. +This is the reverse of --fflags and the default behavior if '''tar''' is run as non-root in x mode. </dd><dt>--no-mac-metadata</dt><dd> (x mode only) -Mac OS X specific. Do not archive or extract ACLs and extended file attributes +Mac OS X specific. +Do not archive or extract ACLs and extended file attributes using [[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]] -in AppleDouble format. This is the reverse of +in AppleDouble format. +This is the reverse of --mac-metadata. and the default behavior if '''tar''' is run as non-root in x mode. +</dd><dt>--no-safe-writes</dt><dd> +(x mode only) +Do not create temporary files and use +[[rename(2)|http://www.freebsd.org/cgi/man.cgi?query=rename&sektion=2]] +to replace the original ones. +This is the reverse of +--safe-writes. </dd><dt>--no-same-owner</dt><dd> (x mode only) Do not extract owner and group IDs. @@ -473,7 +489,8 @@ and the default behavior if is run as non-root. </dd><dt>--no-xattrs</dt><dd> (c, r, u, x modes only) -Do not archive or extract extended file attributes. This is the reverse of +Do not archive or extract extended file attributes. +This is the reverse of --xattrs and the default behavior if '''tar''' @@ -551,7 +568,14 @@ As above, but the corresponding key and value will be provided only to modules whose name matches ''module''. </dd></dl> -The currently supported modules and keys are: + +The complete list of supported modules and keys +for create and append modes is in +[[ManPagerchiveriteetptions3]] +and for extract and list modes in +[[ManPagerchiveeadetptions3]]. + +Examples of supported options: <dl> <dt>'''iso9660:joliet'''</dt><dd> Support Joliet extensions. @@ -570,7 +594,8 @@ to disable. </dd><dt>'''gzip:compression-level'''</dt><dd> A decimal integer from 1 to 9 specifying the gzip compression level. </dd><dt>'''gzip:timestamp'''</dt><dd> -Store timestamp. This is enabled by default, use +Store timestamp. +This is enabled by default, use '''!timestamp''' or '''gzip:!timestamp''' @@ -586,7 +611,8 @@ A decimal integer from 1 to 9 specifying the lrzip compression level. </dd><dt>'''lz4:compression-level'''</dt><dd> A decimal integer from 1 to 9 specifying the lzop compression level. </dd><dt>'''lz4:stream-checksum'''</dt><dd> -Enable stream checksum. This is by default, use +Enable stream checksum. +This is by default, use '''lz4:!stream-checksum''' to disable. </dd><dt>'''lz4:block-checksum'''</dt><dd> @@ -598,7 +624,8 @@ 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. </dd><dt>'''zstd:compression-level'''</dt><dd> -A decimal integer from 1 to 22 specifying the zstd compression level. +A decimal integer specifying the zstd compression level. Supported values depend +on the library version, common values are from 1 to 22. </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> @@ -639,9 +666,10 @@ Supported values are zipcrypt (traditional zip encryption), aes128 (WinZip AES-128 encryption) and aes256 (WinZip AES-256 encryption). </dd><dt>'''read_concatenated_archives'''</dt><dd> Ignore zeroed blocks in the archive, which occurs when multiple tar archives -have been concatenated together. Without this option, only the contents of -the first concatenated archive would be read. This option is comparable to -the +have been concatenated together. +Without this option, only the contents of +the first concatenated archive would be read. +This option is comparable to the -i, --ignore-zeros option of GNU tar. </dd></dl> @@ -663,11 +691,13 @@ This option suppresses these behaviors. Preserve file permissions. Attempt to restore the full permissions, including file modes, file attributes or file flags, extended file attributes and ACLs, if available, for each item -extracted from the archive. This is the reverse of +extracted from the archive. +This is the reverse of --no-same-permissions and the default if '''tar''' -is being run as root. It can be partially overridden by also specifying +is being run as root. +It can be partially overridden by also specifying --no-acls, --no-fflags, --no-mac-metadata @@ -735,6 +765,26 @@ The default is ''hrs'' which applies substitutions to all names. In particular, it is never necessary to specify h, r, or s. +</dd><dt>--safe-writes</dt><dd> +(x mode only) +Extract files atomically. +By default +'''tar''' +unlinks the original file with the same name as the extracted file (if it +exists), and then creates it immediately under the same name and writes to +it. +For a short period of time, applications trying to access the file might +not find it, or see incomplete results. +If +--safe-writes +is enabled, +'''tar''' +first creates a unique temporary file, then writes the new contents to +the temporary file, and finally renames the temporary file to its final +name atomically using +[[rename(2)|http://www.freebsd.org/cgi/man.cgi?query=rename&sektion=2]]. +This guarantees that an application accessing the file, will either see +the old contents or the new contents at all times. </dd><dt>--same-owner</dt><dd> (x mode only) Extract owner and group IDs. @@ -838,7 +888,8 @@ See for more information about the handling of exclusions. </dd><dt>--xattrs</dt><dd> (c, r, u, x modes only) -Archive or extract extended file attributes. This is the reverse of +Archive or extract extended file attributes. +This is the reverse of --no-xattrs and the default behavior in c, r, and u modes or if '''tar''' @@ -939,11 +990,11 @@ To move file hierarchies, invoke '''tar''' as ```text -tar -cf - -C srcdir\. | tar -xpf - -C destdir +tar -cf - -C srcdir . | tar -xpf - -C destdir ``` or more traditionally ```text -cd srcdir ; tar -cf -\. | (cd destdir ; tar -xpf -) +cd srcdir ; tar -cf - . | (cd destdir ; tar -xpf -) ``` In create mode, the list of files and directories to be archived @@ -974,7 +1025,6 @@ An input file in [[ManPageMtree5]] format can be used to create an output archive with arbitrary ownership, permissions, or names that differ from existing data on disk: - ```text $ cat input.mtree #mtree @@ -1015,9 +1065,9 @@ For more details, see the explanation of the and '''archive_write_set_options'''() API calls that are described in -[[ManPageArchiveRead3]] +[[ManPagerchiveead3]] and -[[ManPageArchiveWrite3]]. +[[ManPagerchiverite3]]. == COMPATIBILITY == The bundled-arguments format is supported for compatibility with historic implementations. @@ -1160,8 +1210,8 @@ components, or symlinks to other directories. [[pax(1)|http://www.freebsd.org/cgi/man.cgi?query=pax&sektion=1]], [[shar(1)|http://www.freebsd.org/cgi/man.cgi?query=shar&sektion=1]], [[xz(1)|http://www.freebsd.org/cgi/man.cgi?query=xz&sektion=1]], -[[ManPageLibarchive3]], -[[ManPageLibarchiveFormats5]], +[[ManPageibarchive3]], +[[ManPageibarchiveormats5]], [[ManPageTar5]] == STANDARDS == There is no current POSIX standard for the tar command; it appeared @@ -1193,7 +1243,7 @@ beginning with FreeBSD 1.0. This is a complete re-implementation based on the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library. It was first released with FreeBSD 5.4 diff --git a/archivers/libarchive/files/doc/wiki/ManPageCpio5.wiki b/archivers/libarchive/files/doc/wiki/ManPageCpio5.wiki index 3835302f1aa..7f74b44cd2e 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageCpio5.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageCpio5.wiki @@ -216,7 +216,7 @@ Note that this format supports only 4 gigabyte files (unlike the older ASCII format, which supports 8 gigabyte files). In this format, hardlinked files are handled by setting the -filesize to zero for each entry except the last one that +filesize to zero for each entry except the first one that appears in the archive. === New CRC Format=== The CRC format is identical to the new ASCII format described diff --git a/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki b/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki index 3cb828b9443..2d7ae34b925 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki @@ -117,19 +117,19 @@ More detailed information can be found in the individual manual pages for each API or utility function. == READING AN ARCHIVE == See -[[ManPageArchiveRead3]]. +[[ManPagerchiveead3]]. == WRITING AN ARCHIVE == See -[[ManPageArchiveWrite3]]. +[[ManPagerchiverite3]]. == WRITING ENTRIES TO DISK == The -[[ManPageArchiveWriteDisk3]] +[[ManPagerchiveriteisk3]] API allows you to write -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects to disk using the same API used by -[[ManPageArchiveWrite3]]. +[[ManPagerchiverite3]]. The -[[ManPageArchiveWriteDisk3]] +[[ManPagerchiveriteisk3]] API is used internally by '''archive_read_extract'''('';'') using it directly can provide greater control over how entries @@ -139,21 +139,21 @@ archive-to-archive copy and archive-to-disk extraction operations. == READING ENTRIES FROM DISK == The -[[ManPageArchiveReadDisk3]] +[[ManPagerchiveeadisk3]] supports for populating -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects from information in the filesystem. This includes the information accessible from the [[stat(2)|http://www.freebsd.org/cgi/man.cgi?query=stat&sektion=2]] system call as well as ACLs, extended attributes, and other metadata. The -[[ManPageArchiveReadDisk3]] +[[ManPagerchiveeadisk3]] API also supports iterating over directory trees, which allows directories of files to be read using an API compatible with the -[[ManPageArchiveRead3]] +[[ManPagerchiveead3]] API. == DESCRIPTION == Detailed descriptions of each function are provided by the @@ -168,7 +168,7 @@ The structure contains a complete description of a single archive entry. It uses an opaque interface that is fully documented in -[[ManPageArchiveEntry3]]. +[[ManPagerchiventry3]]. Users familiar with historic formats should be aware that the newer variants have eliminated most restrictions on the length of textual fields. @@ -216,14 +216,14 @@ and functions can be used to obtain more information. == ENVIRONMENT == There are character set conversions within the -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] functions that are impacted by the currently-selected locale. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageArchiveEntry3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveUtil3]], -[[ManPageArchiveWrite3]], +[[ManPagerchiventry3]], +[[ManPagerchiveead3]], +[[ManPagerchivetil3]], +[[ManPagerchiverite3]], [[ManPageTar5]] == HISTORY == The diff --git a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveChanges3.wiki b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveChanges3.wiki index c73e9b21d37..2ccb83cb23c 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveChanges3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveChanges3.wiki @@ -6,7 +6,6 @@ LIBARCHIVE_CHANGES(3) manual page This page describes user-visible changes in libarchive3, and lists public functions and other symbols changed, deprecated or removed in libarchive3, along with their replacements if any. - === Multiple Filters=== Libarchive2 permitted a single (input or output) filter active on an archive. @@ -292,13 +291,13 @@ ARCHIVE_DEFAULT_BYTES_PER_BLOCK ``` </dd></dl> == SEE ALSO == -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteFilter3]], -[[ManPageArchiveWriteFormat3]], -[[ManPageArchiveWriteSetOptions3]], -[[ManPageArchiveUtil3]] +[[ManPagerchiveead3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteilter3]], +[[ManPagerchiveriteormat3]], +[[ManPagerchiveriteetptions3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki index 54663b2094d..7623d919822 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki @@ -4,7 +4,7 @@ LIBARCHIVE-FORMATS(5) manual page - archive formats supported by the libarchive library == DESCRIPTION == The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library reads and writes a variety of streaming archive formats. Generally speaking, all of these archive formats consist of a series of "entries". @@ -21,7 +21,7 @@ to support, though many programs do use libarchive convenience functions to enable all supported formats. === Tar Formats=== The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library can read most tar archives. It can write POSIX-standard "ustar" @@ -40,7 +40,7 @@ subsequent entries. <dl> <dt>'''gnutar'''</dt><dd> The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library can read most GNU-format tar archives. It currently supports the most popular GNU extensions, including modern long filename and linkname support, as well as atime and ctime data. @@ -50,12 +50,12 @@ It can read GNU sparse file entries, including the new POSIX-based formats. The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library can write GNU tar format, including long filename and linkname support, as well as atime and ctime data. </dd><dt>'''pax'''</dt><dd> The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library can read and write POSIX-compliant pax interchange format archives. Pax interchange format archives are an extension of the older ustar @@ -379,7 +379,7 @@ although many of the keywords cannot currently be stored in an '''archive_entry''' object. When writing, libarchive supports use of the -[[ManPageArchiveWriteSetOptions3]] +[[ManPagerchiveriteetptions3]] interface to specify which keywords should be included in the output. If libarchive was compiled with access to suitable diff --git a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki index c7841683462..cf913b7bbe0 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki @@ -13,15 +13,15 @@ make it easy to add new archive and compression formats. Externally, libarchive exposes most operations through an opaque, object-style interface. The -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects store information about a single filesystem object. The rest of the library provides facilities to write -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects to archive files, read them from archive files, and write them to disk. (There are plans to add a facility to read -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects from disk as well.) The read and write APIs each have four layers: a public API @@ -37,7 +37,7 @@ an archive or disk writer, and then use a single set of code to select and write entries, regardless of the target. == READ ARCHITECTURE == From the outside, clients use the -[[ManPageArchiveRead3]] +[[ManPagerchiveead3]] API to manipulate an '''archive''' object to read entries and bodies from an archive stream. @@ -50,9 +50,9 @@ The API has four layers: The lowest layer is the I/O layer. This layer can be overridden by clients, but most clients use the packaged I/O callbacks provided, for example, by -[[ManPageArchiveReadOpenMemory3]], +[[ManPagerchiveeadpenemory3]], and -[[ManPageArchiveReadOpenFd3]]. +[[ManPagerchiveeadpend3]]. The compression layer calls the I/O layer to read bytes and decompresses them for the format layer. The format layer unpacks a stream of uncompressed bytes and @@ -319,11 +319,11 @@ Fortunately, such archives are very rare, and libarchive can read most ZIP archives, though it cannot always extract as much information as a dedicated ZIP program. == SEE ALSO == -[[ManPageArchiveEntry3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteDisk3]] -[[ManPageLibarchive3]], +[[ManPagerchiventry3]], +[[ManPagerchiveead3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteisk3]], +[[ManPageibarchive3]] == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki b/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki index c8c486a1f62..c761e910eed 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki @@ -101,7 +101,6 @@ or .B char file types. The value must be one of the following forms: - <dl> <dt>''format'',''major'',''minor''Bo,''subunit'' Bc</dt><dd> A device with @@ -133,8 +132,8 @@ are recognized: .B solaris , .B sunos , .B svr3 , -.B svr4 , -and +.B svr4 , +and .B ultrix . See @@ -256,12 +255,10 @@ The file owner as a numeric value. </dd><dt>'''uname'''</dt><dd> The file owner as a symbolic name. </dd></dl> - == SEE ALSO == [[cksum(1)|http://www.freebsd.org/cgi/man.cgi?query=cksum&sektion=1]], [[find(1)|http://www.freebsd.org/cgi/man.cgi?query=find&sektion=1]], [[mtree(8)|http://www.freebsd.org/cgi/man.cgi?query=mtree&sektion=8]] -== BUGS == == HISTORY == The '''mtree''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageTar5.wiki b/archivers/libarchive/files/doc/wiki/ManPageTar5.wiki index 249152dbadf..c705a2669d9 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageTar5.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageTar5.wiki @@ -414,7 +414,7 @@ archives to store files much larger than the historic 8GB limit. Vendor-specific attributes used by Joerg Schilling's '''star''' implementation. -</dd><dt>'''SCHILY.acl.access''', '''SCHILY.acl.default,''' '''SCHILY.acl.ace'''</dt><dd> +</dd><dt>'''SCHILY.acl.access''', '''SCHILY.acl.default''', '''SCHILY.acl.ace'''</dt><dd> Stores the access, default and NFSv4 ACLs as textual strings in a format that is an extension of the format specified by POSIX.1e draft 17. In particular, each user or group access specification can include @@ -429,7 +429,7 @@ The file flags. </dd><dt>'''SCHILY.realsize'''</dt><dd> The full size of the file on disk. XXX explain? XXX -</dd><dt>'''SCHILY.dev,''' '''SCHILY.ino''', '''SCHILY.nlinks'''</dt><dd> +</dd><dt>'''SCHILY.dev''', '''SCHILY.ino''', '''SCHILY.nlinks'''</dt><dd> The device number, inode number, and link count for the entry. In particular, note that a pax interchange format archive using Joerg Schilling's @@ -446,7 +446,7 @@ The time when the file was created. "ctime" attribute, which refers to the time when the file metadata was last changed.) -</dd><dt>'''LIBARCHIVE.xattr.'''''namespace''.''key''</dt><dd> +</dd><dt>'''LIBARCHIVE.xattr'''.''namespace''.''key''</dt><dd> Libarchive stores POSIX.1e-style extended attributes using keys of this form. The @@ -863,7 +863,8 @@ GNU tar long pathname for the following header. </dd><dt>'''M'''</dt><dd> GNU tar multivolume marker, indicating the file is a continuation of a file from the previous volume. </dd><dt>'''N'''</dt><dd> -GNU tar long filename support. Deprecated. +GNU tar long filename support. +Deprecated. </dd><dt>'''S'''</dt><dd> GNU tar sparse regular file. </dd><dt>'''V'''</dt><dd> diff --git a/archivers/libarchive/files/examples/minitar/minitar.c b/archivers/libarchive/files/examples/minitar/minitar.c index 0b4b4147ca9..881f94b2d33 100644 --- a/archivers/libarchive/files/examples/minitar/minitar.c +++ b/archivers/libarchive/files/examples/minitar/minitar.c @@ -398,6 +398,9 @@ extract(const char *filename, int do_extract, int flags) } archive_read_close(a); archive_read_free(a); + + archive_write_close(ext); + archive_write_free(ext); exit(0); } diff --git a/archivers/libarchive/files/libarchive/CMakeLists.txt b/archivers/libarchive/files/libarchive/CMakeLists.txt index ec775bb4993..9389bbc9a95 100644 --- a/archivers/libarchive/files/libarchive/CMakeLists.txt +++ b/archivers/libarchive/files/libarchive/CMakeLists.txt @@ -150,6 +150,7 @@ SET(libarchive_SOURCES archive_write_set_format_iso9660.c archive_write_set_format_mtree.c archive_write_set_format_pax.c + archive_write_set_format_private.h archive_write_set_format_raw.c archive_write_set_format_shar.c archive_write_set_format_ustar.c diff --git a/archivers/libarchive/files/libarchive/archive.h b/archivers/libarchive/files/libarchive/archive.h index 9ad9260b41a..9791eb3876e 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 3004000 +#define ARCHIVE_VERSION_NUMBER 3004003 #include <sys/stat.h> #include <stddef.h> /* for wchar_t */ @@ -52,7 +52,7 @@ */ #if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 # include <stdint.h> -#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) && !defined(_SCO_DS) && !defined(__osf__) +#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) && !defined(_SCO_DS) && !defined(__osf__) && !defined(__CLANG_INTTYPES_H) # include <inttypes.h> #endif @@ -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.4.0" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.3" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); @@ -693,6 +693,8 @@ __LA_DECL int archive_read_set_passphrase_callback(struct archive *, #define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000) /* Default: Do not clear no-change flags when unlinking object */ #define ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS (0x20000) +/* Default: Do not extract atomically (using rename) */ +#define ARCHIVE_EXTRACT_SAFE_WRITES (0x40000) __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *, int flags); diff --git a/archivers/libarchive/files/libarchive/archive_acl_private.h b/archivers/libarchive/files/libarchive/archive_acl_private.h index ef0b0234cc1..af108162c66 100644 --- a/archivers/libarchive/files/libarchive/archive_acl_private.h +++ b/archivers/libarchive/files/libarchive/archive_acl_private.h @@ -25,13 +25,13 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED +#define ARCHIVE_ACL_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED -#define ARCHIVE_ACL_PRIVATE_H_INCLUDED - #include "archive_string.h" struct archive_acl_entry { diff --git a/archivers/libarchive/files/libarchive/archive_blake2.h b/archivers/libarchive/files/libarchive/archive_blake2.h index 337be194654..dd6fe6fe5a9 100644 --- a/archivers/libarchive/files/libarchive/archive_blake2.h +++ b/archivers/libarchive/files/libarchive/archive_blake2.h @@ -12,8 +12,9 @@ More information about the BLAKE2 hash function can be found at https://blake2.net. */ -#ifndef BLAKE2_H -#define BLAKE2_H + +#ifndef ARCHIVE_BLAKE2_H +#define ARCHIVE_BLAKE2_H #include <stddef.h> #include <stdint.h> diff --git a/archivers/libarchive/files/libarchive/archive_blake2_impl.h b/archivers/libarchive/files/libarchive/archive_blake2_impl.h index c1df82e0c95..0f05defea36 100644 --- a/archivers/libarchive/files/libarchive/archive_blake2_impl.h +++ b/archivers/libarchive/files/libarchive/archive_blake2_impl.h @@ -12,8 +12,9 @@ More information about the BLAKE2 hash function can be found at https://blake2.net. */ -#ifndef BLAKE2_IMPL_H -#define BLAKE2_IMPL_H + +#ifndef ARCHIVE_BLAKE2_IMPL_H +#define ARCHIVE_BLAKE2_IMPL_H #include <stdint.h> #include <string.h> diff --git a/archivers/libarchive/files/libarchive/archive_cmdline_private.h b/archivers/libarchive/files/libarchive/archive_cmdline_private.h index 4e409e81481..57a19494fd7 100644 --- a/archivers/libarchive/files/libarchive/archive_cmdline_private.h +++ b/archivers/libarchive/files/libarchive/archive_cmdline_private.h @@ -25,15 +25,15 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_CMDLINE_PRIVATE_H +#define ARCHIVE_CMDLINE_PRIVATE_H + #ifndef __LIBARCHIVE_BUILD #ifndef __LIBARCHIVE_TEST #error This header is only to be used internally to libarchive. #endif #endif -#ifndef ARCHIVE_CMDLINE_PRIVATE_H -#define ARCHIVE_CMDLINE_PRIVATE_H - struct archive_cmdline { char *path; char **argv; diff --git a/archivers/libarchive/files/libarchive/archive_crc32.h b/archivers/libarchive/files/libarchive/archive_crc32.h index cd633af89b4..4f1aed30593 100644 --- a/archivers/libarchive/files/libarchive/archive_crc32.h +++ b/archivers/libarchive/files/libarchive/archive_crc32.h @@ -25,6 +25,9 @@ * $FreeBSD: head/lib/libarchive/archive_crc32.h 201102 2009-12-28 03:11:36Z kientzle $ */ +#ifndef ARCHIVE_CRC32_H +#define ARCHIVE_CRC32_H + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif @@ -76,3 +79,5 @@ crc32(unsigned long crc, const void *_p, size_t len) crc = crc_tbl[(crc ^ *p++) & 0xff] ^ (crc >> 8); return (crc ^ 0xffffffffUL); } + +#endif diff --git a/archivers/libarchive/files/libarchive/archive_cryptor.c b/archivers/libarchive/files/libarchive/archive_cryptor.c index 74df5c405b0..8ab2b097967 100644 --- a/archivers/libarchive/files/libarchive/archive_cryptor.c +++ b/archivers/libarchive/files/libarchive/archive_cryptor.c @@ -85,6 +85,35 @@ pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt, return (BCRYPT_SUCCESS(status)) ? 0: -1; } +#elif defined(HAVE_LIBMBEDCRYPTO) && defined(HAVE_MBEDTLS_PKCS5_H) + +static int +pbkdf2_sha1(const char *pw, size_t pw_len, const uint8_t *salt, + size_t salt_len, unsigned rounds, uint8_t *derived_key, + size_t derived_key_len) +{ + mbedtls_md_context_t ctx; + const mbedtls_md_info_t *info; + int ret; + + mbedtls_md_init(&ctx); + info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA1); + if (info == NULL) { + mbedtls_md_free(&ctx); + return (-1); + } + ret = mbedtls_md_setup(&ctx, info, 1); + if (ret != 0) { + mbedtls_md_free(&ctx); + return (-1); + } + ret = mbedtls_pkcs5_pbkdf2_hmac(&ctx, (const unsigned char *)pw, + pw_len, salt, salt_len, rounds, derived_key_len, derived_key); + + mbedtls_md_free(&ctx); + return (ret); +} + #elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_PBKDF2_H) static int @@ -269,6 +298,39 @@ aes_ctr_release(archive_crypto_ctx *ctx) return 0; } +#elif defined(HAVE_LIBMBEDCRYPTO) && defined(HAVE_MBEDTLS_AES_H) + +static int +aes_ctr_init(archive_crypto_ctx *ctx, const uint8_t *key, size_t key_len) +{ + mbedtls_aes_init(&ctx->ctx); + ctx->key_len = key_len; + memcpy(ctx->key, key, key_len); + memset(ctx->nonce, 0, sizeof(ctx->nonce)); + ctx->encr_pos = AES_BLOCK_SIZE; + return 0; +} + +static int +aes_ctr_encrypt_counter(archive_crypto_ctx *ctx) +{ + if (mbedtls_aes_setkey_enc(&ctx->ctx, ctx->key, + ctx->key_len * 8) != 0) + return (-1); + if (mbedtls_aes_crypt_ecb(&ctx->ctx, MBEDTLS_AES_ENCRYPT, ctx->nonce, + ctx->encr_buf) != 0) + return (-1); + return 0; +} + +static int +aes_ctr_release(archive_crypto_ctx *ctx) +{ + mbedtls_aes_free(&ctx->ctx); + memset(ctx, 0, sizeof(*ctx)); + return 0; +} + #elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_AES_H) static int diff --git a/archivers/libarchive/files/libarchive/archive_cryptor_private.h b/archivers/libarchive/files/libarchive/archive_cryptor_private.h index b9759220df6..64a20556a39 100644 --- a/archivers/libarchive/files/libarchive/archive_cryptor_private.h +++ b/archivers/libarchive/files/libarchive/archive_cryptor_private.h @@ -23,13 +23,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif - #ifndef ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED #define ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * On systems that do not support any recognized crypto libraries, * the archive_cryptor.c file will normally define no usable symbols. @@ -83,6 +82,23 @@ typedef struct { unsigned encr_pos; } archive_crypto_ctx; +#elif defined(HAVE_LIBMBEDCRYPTO) && defined(HAVE_MBEDTLS_AES_H) +#include <mbedtls/aes.h> +#include <mbedtls/md.h> +#include <mbedtls/pkcs5.h> + +#define AES_MAX_KEY_SIZE 32 +#define AES_BLOCK_SIZE 16 + +typedef struct { + mbedtls_aes_context ctx; + uint8_t key[AES_MAX_KEY_SIZE]; + unsigned key_len; + uint8_t nonce[AES_BLOCK_SIZE]; + uint8_t encr_buf[AES_BLOCK_SIZE]; + unsigned encr_pos; +} archive_crypto_ctx; + #elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_AES_H) #if defined(HAVE_NETTLE_PBKDF2_H) #include <nettle/pbkdf2.h> diff --git a/archivers/libarchive/files/libarchive/archive_digest.c b/archivers/libarchive/files/libarchive/archive_digest.c index 41539230314..410df01563d 100644 --- a/archivers/libarchive/files/libarchive/archive_digest.c +++ b/archivers/libarchive/files/libarchive/archive_digest.c @@ -109,14 +109,14 @@ win_crypto_Final(unsigned char *buf, size_t bufsize, Digest_CTX *ctx) #if defined(ARCHIVE_CRYPTO_MD5_LIBC) static int -__archive_libc_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { MD5Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { MD5Update(ctx, indata, insize); @@ -124,7 +124,7 @@ __archive_libc_md5update(archive_md5_ctx *ctx, const void *indata, } static int -__archive_libc_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { MD5Final(md, ctx); return (ARCHIVE_OK); @@ -133,14 +133,14 @@ __archive_libc_md5final(archive_md5_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) static int -__archive_libmd_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { MD5Init(ctx); return (ARCHIVE_OK); } static int -__archive_libmd_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { MD5Update(ctx, indata, insize); @@ -148,7 +148,7 @@ __archive_libmd_md5update(archive_md5_ctx *ctx, const void *indata, } static int -__archive_libmd_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { MD5Final(md, ctx); return (ARCHIVE_OK); @@ -157,14 +157,14 @@ __archive_libmd_md5final(archive_md5_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) static int -__archive_libsystem_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { CC_MD5_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libsystem_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { CC_MD5_Update(ctx, indata, insize); @@ -172,23 +172,57 @@ __archive_libsystem_md5update(archive_md5_ctx *ctx, const void *indata, } static int -__archive_libsystem_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { CC_MD5_Final(md, ctx); return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) + +static int +__archive_md5init(archive_md5_ctx *ctx) +{ + mbedtls_md5_init(ctx); + if (mbedtls_md5_starts_ret(ctx) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_md5update(archive_md5_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_md5_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_md5final(archive_md5_ctx *ctx, void *md) +{ + if (mbedtls_md5_finish_ret(ctx, md) == 0) { + mbedtls_md5_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_md5_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) static int -__archive_nettle_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { md5_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { md5_update(ctx, insize, indata); @@ -196,7 +230,7 @@ __archive_nettle_md5update(archive_md5_ctx *ctx, const void *indata, } static int -__archive_nettle_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { md5_digest(ctx, MD5_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -205,7 +239,7 @@ __archive_nettle_md5final(archive_md5_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) static int -__archive_openssl_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -214,7 +248,7 @@ __archive_openssl_md5init(archive_md5_ctx *ctx) } static int -__archive_openssl_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -222,7 +256,7 @@ __archive_openssl_md5update(archive_md5_ctx *ctx, const void *indata, } static int -__archive_openssl_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so * this is meant to cope with that. Real fix is probably to fix @@ -239,20 +273,20 @@ __archive_openssl_md5final(archive_md5_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_MD5_WIN) static int -__archive_windowsapi_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { return (win_crypto_init(ctx, CALG_MD5)); } static int -__archive_windowsapi_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { return (win_crypto_Update(ctx, indata, insize)); } static int -__archive_windowsapi_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { return (win_crypto_Final(md, 16, ctx)); } @@ -260,14 +294,14 @@ __archive_windowsapi_md5final(archive_md5_ctx *ctx, void *md) #else static int -__archive_stub_md5init(archive_md5_ctx *ctx) +__archive_md5init(archive_md5_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_md5update(archive_md5_ctx *ctx, const void *indata, +__archive_md5update(archive_md5_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -277,7 +311,7 @@ __archive_stub_md5update(archive_md5_ctx *ctx, const void *indata, } static int -__archive_stub_md5final(archive_md5_ctx *ctx, void *md) +__archive_md5final(archive_md5_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -290,14 +324,14 @@ __archive_stub_md5final(archive_md5_ctx *ctx, void *md) #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) static int -__archive_libc_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { RMD160Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { RMD160Update(ctx, indata, insize); @@ -305,7 +339,7 @@ __archive_libc_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, } static int -__archive_libc_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { RMD160Final(md, ctx); return (ARCHIVE_OK); @@ -314,14 +348,14 @@ __archive_libc_ripemd160final(archive_rmd160_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) static int -__archive_libmd_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { RIPEMD160_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libmd_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { RIPEMD160_Update(ctx, indata, insize); @@ -329,23 +363,57 @@ __archive_libmd_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, } static int -__archive_libmd_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { RIPEMD160_Final(md, ctx); return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) + +static int +__archive_ripemd160init(archive_rmd160_ctx *ctx) +{ + mbedtls_ripemd160_init(ctx); + if (mbedtls_ripemd160_starts_ret(ctx) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) +{ + if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) { + mbedtls_ripemd160_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_ripemd160_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) static int -__archive_nettle_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { ripemd160_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { ripemd160_update(ctx, insize, indata); @@ -353,7 +421,7 @@ __archive_nettle_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, } static int -__archive_nettle_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { ripemd160_digest(ctx, RIPEMD160_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -362,7 +430,7 @@ __archive_nettle_ripemd160final(archive_rmd160_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) static int -__archive_openssl_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -371,7 +439,7 @@ __archive_openssl_ripemd160init(archive_rmd160_ctx *ctx) } static int -__archive_openssl_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -379,7 +447,7 @@ __archive_openssl_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, } static int -__archive_openssl_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { if (*ctx) { EVP_DigestFinal(*ctx, md, NULL); @@ -392,14 +460,14 @@ __archive_openssl_ripemd160final(archive_rmd160_ctx *ctx, void *md) #else static int -__archive_stub_ripemd160init(archive_rmd160_ctx *ctx) +__archive_ripemd160init(archive_rmd160_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, +__archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -409,7 +477,7 @@ __archive_stub_ripemd160update(archive_rmd160_ctx *ctx, const void *indata, } static int -__archive_stub_ripemd160final(archive_rmd160_ctx *ctx, void *md) +__archive_ripemd160final(archive_rmd160_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -422,14 +490,14 @@ __archive_stub_ripemd160final(archive_rmd160_ctx *ctx, void *md) #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) static int -__archive_libc_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { SHA1Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { SHA1Update(ctx, indata, insize); @@ -437,7 +505,7 @@ __archive_libc_sha1update(archive_sha1_ctx *ctx, const void *indata, } static int -__archive_libc_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { SHA1Final(md, ctx); return (ARCHIVE_OK); @@ -446,14 +514,14 @@ __archive_libc_sha1final(archive_sha1_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) static int -__archive_libmd_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { SHA1_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libmd_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { SHA1_Update(ctx, indata, insize); @@ -461,7 +529,7 @@ __archive_libmd_sha1update(archive_sha1_ctx *ctx, const void *indata, } static int -__archive_libmd_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { SHA1_Final(md, ctx); return (ARCHIVE_OK); @@ -470,14 +538,14 @@ __archive_libmd_sha1final(archive_sha1_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) static int -__archive_libsystem_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { CC_SHA1_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libsystem_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { CC_SHA1_Update(ctx, indata, insize); @@ -485,23 +553,57 @@ __archive_libsystem_sha1update(archive_sha1_ctx *ctx, const void *indata, } static int -__archive_libsystem_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { CC_SHA1_Final(md, ctx); return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) + +static int +__archive_sha1init(archive_sha1_ctx *ctx) +{ + mbedtls_sha1_init(ctx); + if (mbedtls_sha1_starts_ret(ctx) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_sha1final(archive_sha1_ctx *ctx, void *md) +{ + if (mbedtls_sha1_finish_ret(ctx, md) == 0) { + mbedtls_sha1_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_sha1_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) static int -__archive_nettle_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { sha1_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { sha1_update(ctx, insize, indata); @@ -509,7 +611,7 @@ __archive_nettle_sha1update(archive_sha1_ctx *ctx, const void *indata, } static int -__archive_nettle_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { sha1_digest(ctx, SHA1_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -518,7 +620,7 @@ __archive_nettle_sha1final(archive_sha1_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) static int -__archive_openssl_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -527,7 +629,7 @@ __archive_openssl_sha1init(archive_sha1_ctx *ctx) } static int -__archive_openssl_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -535,7 +637,7 @@ __archive_openssl_sha1update(archive_sha1_ctx *ctx, const void *indata, } static int -__archive_openssl_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { /* HACK: archive_write_set_format_xar.c is finalizing empty contexts, so * this is meant to cope with that. Real fix is probably to fix @@ -552,20 +654,20 @@ __archive_openssl_sha1final(archive_sha1_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA1_WIN) static int -__archive_windowsapi_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { return (win_crypto_init(ctx, CALG_SHA1)); } static int -__archive_windowsapi_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { return (win_crypto_Update(ctx, indata, insize)); } static int -__archive_windowsapi_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { return (win_crypto_Final(md, 20, ctx)); } @@ -573,14 +675,14 @@ __archive_windowsapi_sha1final(archive_sha1_ctx *ctx, void *md) #else static int -__archive_stub_sha1init(archive_sha1_ctx *ctx) +__archive_sha1init(archive_sha1_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_sha1update(archive_sha1_ctx *ctx, const void *indata, +__archive_sha1update(archive_sha1_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -590,7 +692,7 @@ __archive_stub_sha1update(archive_sha1_ctx *ctx, const void *indata, } static int -__archive_stub_sha1final(archive_sha1_ctx *ctx, void *md) +__archive_sha1final(archive_sha1_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -603,14 +705,14 @@ __archive_stub_sha1final(archive_sha1_ctx *ctx, void *md) #if defined(ARCHIVE_CRYPTO_SHA256_LIBC) static int -__archive_libc_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { SHA256_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { SHA256_Update(ctx, indata, insize); @@ -618,7 +720,7 @@ __archive_libc_sha256update(archive_sha256_ctx *ctx, const void *indata, } static int -__archive_libc_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { SHA256_Final(md, ctx); return (ARCHIVE_OK); @@ -627,14 +729,14 @@ __archive_libc_sha256final(archive_sha256_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) static int -__archive_libc2_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { SHA256Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc2_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { SHA256Update(ctx, indata, insize); @@ -642,7 +744,7 @@ __archive_libc2_sha256update(archive_sha256_ctx *ctx, const void *indata, } static int -__archive_libc2_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { SHA256Final(md, ctx); return (ARCHIVE_OK); @@ -651,14 +753,14 @@ __archive_libc2_sha256final(archive_sha256_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) static int -__archive_libc3_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { SHA256Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc3_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { SHA256Update(ctx, indata, insize); @@ -666,7 +768,7 @@ __archive_libc3_sha256update(archive_sha256_ctx *ctx, const void *indata, } static int -__archive_libc3_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { SHA256Final(md, ctx); return (ARCHIVE_OK); @@ -675,14 +777,14 @@ __archive_libc3_sha256final(archive_sha256_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) static int -__archive_libmd_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { SHA256_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libmd_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { SHA256_Update(ctx, indata, insize); @@ -690,7 +792,7 @@ __archive_libmd_sha256update(archive_sha256_ctx *ctx, const void *indata, } static int -__archive_libmd_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { SHA256_Final(md, ctx); return (ARCHIVE_OK); @@ -699,14 +801,14 @@ __archive_libmd_sha256final(archive_sha256_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) static int -__archive_libsystem_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { CC_SHA256_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libsystem_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { CC_SHA256_Update(ctx, indata, insize); @@ -714,23 +816,57 @@ __archive_libsystem_sha256update(archive_sha256_ctx *ctx, const void *indata, } static int -__archive_libsystem_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { CC_SHA256_Final(md, ctx); return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) + +static int +__archive_sha256init(archive_sha256_ctx *ctx) +{ + mbedtls_sha256_init(ctx); + if (mbedtls_sha256_starts_ret(ctx, 0) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_sha256final(archive_sha256_ctx *ctx, void *md) +{ + if (mbedtls_sha256_finish_ret(ctx, md) == 0) { + mbedtls_sha256_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_sha256_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) static int -__archive_nettle_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { sha256_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { sha256_update(ctx, insize, indata); @@ -738,7 +874,7 @@ __archive_nettle_sha256update(archive_sha256_ctx *ctx, const void *indata, } static int -__archive_nettle_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { sha256_digest(ctx, SHA256_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -747,7 +883,7 @@ __archive_nettle_sha256final(archive_sha256_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) static int -__archive_openssl_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -756,7 +892,7 @@ __archive_openssl_sha256init(archive_sha256_ctx *ctx) } static int -__archive_openssl_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -764,7 +900,7 @@ __archive_openssl_sha256update(archive_sha256_ctx *ctx, const void *indata, } static int -__archive_openssl_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { if (*ctx) { EVP_DigestFinal(*ctx, md, NULL); @@ -777,20 +913,20 @@ __archive_openssl_sha256final(archive_sha256_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA256_WIN) static int -__archive_windowsapi_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { return (win_crypto_init(ctx, CALG_SHA_256)); } static int -__archive_windowsapi_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { return (win_crypto_Update(ctx, indata, insize)); } static int -__archive_windowsapi_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { return (win_crypto_Final(md, 32, ctx)); } @@ -798,14 +934,14 @@ __archive_windowsapi_sha256final(archive_sha256_ctx *ctx, void *md) #else static int -__archive_stub_sha256init(archive_sha256_ctx *ctx) +__archive_sha256init(archive_sha256_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_sha256update(archive_sha256_ctx *ctx, const void *indata, +__archive_sha256update(archive_sha256_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -815,7 +951,7 @@ __archive_stub_sha256update(archive_sha256_ctx *ctx, const void *indata, } static int -__archive_stub_sha256final(archive_sha256_ctx *ctx, void *md) +__archive_sha256final(archive_sha256_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -828,14 +964,14 @@ __archive_stub_sha256final(archive_sha256_ctx *ctx, void *md) #if defined(ARCHIVE_CRYPTO_SHA384_LIBC) static int -__archive_libc_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { SHA384_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { SHA384_Update(ctx, indata, insize); @@ -843,7 +979,7 @@ __archive_libc_sha384update(archive_sha384_ctx *ctx, const void *indata, } static int -__archive_libc_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { SHA384_Final(md, ctx); return (ARCHIVE_OK); @@ -852,14 +988,14 @@ __archive_libc_sha384final(archive_sha384_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) static int -__archive_libc2_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { SHA384Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc2_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { SHA384Update(ctx, indata, insize); @@ -867,7 +1003,7 @@ __archive_libc2_sha384update(archive_sha384_ctx *ctx, const void *indata, } static int -__archive_libc2_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { SHA384Final(md, ctx); return (ARCHIVE_OK); @@ -876,14 +1012,14 @@ __archive_libc2_sha384final(archive_sha384_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) static int -__archive_libc3_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { SHA384Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc3_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { SHA384Update(ctx, indata, insize); @@ -891,7 +1027,7 @@ __archive_libc3_sha384update(archive_sha384_ctx *ctx, const void *indata, } static int -__archive_libc3_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { SHA384Final(md, ctx); return (ARCHIVE_OK); @@ -900,14 +1036,14 @@ __archive_libc3_sha384final(archive_sha384_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) static int -__archive_libsystem_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { CC_SHA384_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libsystem_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { CC_SHA384_Update(ctx, indata, insize); @@ -915,23 +1051,57 @@ __archive_libsystem_sha384update(archive_sha384_ctx *ctx, const void *indata, } static int -__archive_libsystem_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { CC_SHA384_Final(md, ctx); return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) + +static int +__archive_sha384init(archive_sha384_ctx *ctx) +{ + mbedtls_sha512_init(ctx); + if (mbedtls_sha512_starts_ret(ctx, 1) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_sha384final(archive_sha384_ctx *ctx, void *md) +{ + if (mbedtls_sha512_finish_ret(ctx, md) == 0) { + mbedtls_sha512_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_sha512_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) static int -__archive_nettle_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { sha384_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { sha384_update(ctx, insize, indata); @@ -939,7 +1109,7 @@ __archive_nettle_sha384update(archive_sha384_ctx *ctx, const void *indata, } static int -__archive_nettle_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { sha384_digest(ctx, SHA384_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -948,7 +1118,7 @@ __archive_nettle_sha384final(archive_sha384_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) static int -__archive_openssl_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -957,7 +1127,7 @@ __archive_openssl_sha384init(archive_sha384_ctx *ctx) } static int -__archive_openssl_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -965,7 +1135,7 @@ __archive_openssl_sha384update(archive_sha384_ctx *ctx, const void *indata, } static int -__archive_openssl_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { if (*ctx) { EVP_DigestFinal(*ctx, md, NULL); @@ -978,20 +1148,20 @@ __archive_openssl_sha384final(archive_sha384_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA384_WIN) static int -__archive_windowsapi_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { return (win_crypto_init(ctx, CALG_SHA_384)); } static int -__archive_windowsapi_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { return (win_crypto_Update(ctx, indata, insize)); } static int -__archive_windowsapi_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { return (win_crypto_Final(md, 48, ctx)); } @@ -999,14 +1169,14 @@ __archive_windowsapi_sha384final(archive_sha384_ctx *ctx, void *md) #else static int -__archive_stub_sha384init(archive_sha384_ctx *ctx) +__archive_sha384init(archive_sha384_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_sha384update(archive_sha384_ctx *ctx, const void *indata, +__archive_sha384update(archive_sha384_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -1016,7 +1186,7 @@ __archive_stub_sha384update(archive_sha384_ctx *ctx, const void *indata, } static int -__archive_stub_sha384final(archive_sha384_ctx *ctx, void *md) +__archive_sha384final(archive_sha384_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -1029,14 +1199,14 @@ __archive_stub_sha384final(archive_sha384_ctx *ctx, void *md) #if defined(ARCHIVE_CRYPTO_SHA512_LIBC) static int -__archive_libc_sha512init(archive_sha512_ctx *ctx) +__archive_sha512init(archive_sha512_ctx *ctx) { SHA512_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc_sha512update(archive_sha512_ctx *ctx, const void *indata, +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { SHA512_Update(ctx, indata, insize); @@ -1044,7 +1214,7 @@ __archive_libc_sha512update(archive_sha512_ctx *ctx, const void *indata, } static int -__archive_libc_sha512final(archive_sha512_ctx *ctx, void *md) +__archive_sha512final(archive_sha512_ctx *ctx, void *md) { SHA512_Final(md, ctx); return (ARCHIVE_OK); @@ -1053,14 +1223,14 @@ __archive_libc_sha512final(archive_sha512_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) static int -__archive_libc2_sha512init(archive_sha512_ctx *ctx) +__archive_sha512init(archive_sha512_ctx *ctx) { SHA512Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc2_sha512update(archive_sha512_ctx *ctx, const void *indata, +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { SHA512Update(ctx, indata, insize); @@ -1068,7 +1238,7 @@ __archive_libc2_sha512update(archive_sha512_ctx *ctx, const void *indata, } static int -__archive_libc2_sha512final(archive_sha512_ctx *ctx, void *md) +__archive_sha512final(archive_sha512_ctx *ctx, void *md) { SHA512Final(md, ctx); return (ARCHIVE_OK); @@ -1077,14 +1247,14 @@ __archive_libc2_sha512final(archive_sha512_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) static int -__archive_libc3_sha512init(archive_sha512_ctx *ctx) +__archive_sha512init(archive_sha512_ctx *ctx) { SHA512Init(ctx); return (ARCHIVE_OK); } static int -__archive_libc3_sha512update(archive_sha512_ctx *ctx, const void *indata, +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { SHA512Update(ctx, indata, insize); @@ -1092,7 +1262,7 @@ __archive_libc3_sha512update(archive_sha512_ctx *ctx, const void *indata, } static int -__archive_libc3_sha512final(archive_sha512_ctx *ctx, void *md) +__archive_sha512final(archive_sha512_ctx *ctx, void *md) { SHA512Final(md, ctx); return (ARCHIVE_OK); @@ -1101,14 +1271,14 @@ __archive_libc3_sha512final(archive_sha512_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) static int -__archive_libmd_sha512init(archive_sha512_ctx *ctx) +__archive_sha512init(archive_sha512_ctx *ctx) { SHA512_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libmd_sha512update(archive_sha512_ctx *ctx, const void *indata, +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { SHA512_Update(ctx, indata, insize); @@ -1116,7 +1286,7 @@ __archive_libmd_sha512update(archive_sha512_ctx *ctx, const void *indata, } static int -__archive_libmd_sha512final(archive_sha512_ctx *ctx, void *md) +__archive_sha512final(archive_sha512_ctx *ctx, void *md) { SHA512_Final(md, ctx); return (ARCHIVE_OK); @@ -1125,14 +1295,14 @@ __archive_libmd_sha512final(archive_sha512_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) static int -__archive_libsystem_sha512init(archive_sha512_ctx *ctx) +__archive_sha512init(archive_sha512_ctx *ctx) { CC_SHA512_Init(ctx); return (ARCHIVE_OK); } static int -__archive_libsystem_sha512update(archive_sha512_ctx *ctx, const void *indata, +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { CC_SHA512_Update(ctx, indata, insize); @@ -1140,23 +1310,57 @@ __archive_libsystem_sha512update(archive_sha512_ctx *ctx, const void *indata, } static int -__archive_libsystem_sha512final(archive_sha512_ctx *ctx, void *md) +__archive_sha512final(archive_sha512_ctx *ctx, void *md) { CC_SHA512_Final(md, ctx); return (ARCHIVE_OK); } +#elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) + +static int +__archive_sha512init(archive_sha512_ctx *ctx) +{ + mbedtls_sha512_init(ctx); + if (mbedtls_sha512_starts_ret(ctx, 0) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, + size_t insize) +{ + if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0) + return (ARCHIVE_OK); + else + return (ARCHIVE_FATAL); +} + +static int +__archive_sha512final(archive_sha512_ctx *ctx, void *md) +{ + if (mbedtls_sha512_finish_ret(ctx, md) == 0) { + mbedtls_sha512_free(ctx); + return (ARCHIVE_OK); + } else { + mbedtls_sha512_free(ctx); + return (ARCHIVE_FATAL); + } +} + #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) static int -__archive_nettle_sha512init(archive_sha512_ctx *ctx) +__archive_sha512init(archive_sha512_ctx *ctx) { sha512_init(ctx); return (ARCHIVE_OK); } static int -__archive_nettle_sha512update(archive_sha512_ctx *ctx, const void *indata, +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { sha512_update(ctx, insize, indata); @@ -1164,7 +1368,7 @@ __archive_nettle_sha512update(archive_sha512_ctx *ctx, const void *indata, } static int -__archive_nettle_sha512final(archive_sha512_ctx *ctx, void *md) +__archive_sha512final(archive_sha512_ctx *ctx, void *md) { sha512_digest(ctx, SHA512_DIGEST_SIZE, md); return (ARCHIVE_OK); @@ -1173,7 +1377,7 @@ __archive_nettle_sha512final(archive_sha512_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) static int -__archive_openssl_sha512init(archive_sha512_ctx *ctx) +__archive_sha512init(archive_sha512_ctx *ctx) { if ((*ctx = EVP_MD_CTX_new()) == NULL) return (ARCHIVE_FAILED); @@ -1182,7 +1386,7 @@ __archive_openssl_sha512init(archive_sha512_ctx *ctx) } static int -__archive_openssl_sha512update(archive_sha512_ctx *ctx, const void *indata, +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { EVP_DigestUpdate(*ctx, indata, insize); @@ -1190,7 +1394,7 @@ __archive_openssl_sha512update(archive_sha512_ctx *ctx, const void *indata, } static int -__archive_openssl_sha512final(archive_sha512_ctx *ctx, void *md) +__archive_sha512final(archive_sha512_ctx *ctx, void *md) { if (*ctx) { EVP_DigestFinal(*ctx, md, NULL); @@ -1203,20 +1407,20 @@ __archive_openssl_sha512final(archive_sha512_ctx *ctx, void *md) #elif defined(ARCHIVE_CRYPTO_SHA512_WIN) static int -__archive_windowsapi_sha512init(archive_sha512_ctx *ctx) +__archive_sha512init(archive_sha512_ctx *ctx) { return (win_crypto_init(ctx, CALG_SHA_512)); } static int -__archive_windowsapi_sha512update(archive_sha512_ctx *ctx, const void *indata, +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { return (win_crypto_Update(ctx, indata, insize)); } static int -__archive_windowsapi_sha512final(archive_sha512_ctx *ctx, void *md) +__archive_sha512final(archive_sha512_ctx *ctx, void *md) { return (win_crypto_Final(md, 64, ctx)); } @@ -1224,14 +1428,14 @@ __archive_windowsapi_sha512final(archive_sha512_ctx *ctx, void *md) #else static int -__archive_stub_sha512init(archive_sha512_ctx *ctx) +__archive_sha512init(archive_sha512_ctx *ctx) { (void)ctx; /* UNUSED */ return (ARCHIVE_FAILED); } static int -__archive_stub_sha512update(archive_sha512_ctx *ctx, const void *indata, +__archive_sha512update(archive_sha512_ctx *ctx, const void *indata, size_t insize) { (void)ctx; /* UNUSED */ @@ -1241,7 +1445,7 @@ __archive_stub_sha512update(archive_sha512_ctx *ctx, const void *indata, } static int -__archive_stub_sha512final(archive_sha512_ctx *ctx, void *md) +__archive_sha512final(archive_sha512_ctx *ctx, void *md) { (void)ctx; /* UNUSED */ (void)md; /* UNUSED */ @@ -1264,200 +1468,32 @@ __archive_stub_sha512final(archive_sha512_ctx *ctx, void *md) const struct archive_digest __archive_digest = { /* MD5 */ -#if defined(ARCHIVE_CRYPTO_MD5_LIBC) - &__archive_libc_md5init, - &__archive_libc_md5update, - &__archive_libc_md5final, -#elif defined(ARCHIVE_CRYPTO_MD5_LIBMD) - &__archive_libmd_md5init, - &__archive_libmd_md5update, - &__archive_libmd_md5final, -#elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) - &__archive_libsystem_md5init, - &__archive_libsystem_md5update, - &__archive_libsystem_md5final, -#elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) - &__archive_nettle_md5init, - &__archive_nettle_md5update, - &__archive_nettle_md5final, -#elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) - &__archive_openssl_md5init, - &__archive_openssl_md5update, - &__archive_openssl_md5final, -#elif defined(ARCHIVE_CRYPTO_MD5_WIN) - &__archive_windowsapi_md5init, - &__archive_windowsapi_md5update, - &__archive_windowsapi_md5final, -#elif !defined(ARCHIVE_MD5_COMPILE_TEST) - &__archive_stub_md5init, - &__archive_stub_md5update, - &__archive_stub_md5final, -#endif + &__archive_md5init, + &__archive_md5update, + &__archive_md5final, /* RIPEMD160 */ -#if defined(ARCHIVE_CRYPTO_RMD160_LIBC) - &__archive_libc_ripemd160init, - &__archive_libc_ripemd160update, - &__archive_libc_ripemd160final, -#elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) - &__archive_libmd_ripemd160init, - &__archive_libmd_ripemd160update, - &__archive_libmd_ripemd160final, -#elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) - &__archive_nettle_ripemd160init, - &__archive_nettle_ripemd160update, - &__archive_nettle_ripemd160final, -#elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) - &__archive_openssl_ripemd160init, - &__archive_openssl_ripemd160update, - &__archive_openssl_ripemd160final, -#elif !defined(ARCHIVE_RMD160_COMPILE_TEST) - &__archive_stub_ripemd160init, - &__archive_stub_ripemd160update, - &__archive_stub_ripemd160final, -#endif + &__archive_ripemd160init, + &__archive_ripemd160update, + &__archive_ripemd160final, /* SHA1 */ -#if defined(ARCHIVE_CRYPTO_SHA1_LIBC) - &__archive_libc_sha1init, - &__archive_libc_sha1update, - &__archive_libc_sha1final, -#elif defined(ARCHIVE_CRYPTO_SHA1_LIBMD) - &__archive_libmd_sha1init, - &__archive_libmd_sha1update, - &__archive_libmd_sha1final, -#elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) - &__archive_libsystem_sha1init, - &__archive_libsystem_sha1update, - &__archive_libsystem_sha1final, -#elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) - &__archive_nettle_sha1init, - &__archive_nettle_sha1update, - &__archive_nettle_sha1final, -#elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) - &__archive_openssl_sha1init, - &__archive_openssl_sha1update, - &__archive_openssl_sha1final, -#elif defined(ARCHIVE_CRYPTO_SHA1_WIN) - &__archive_windowsapi_sha1init, - &__archive_windowsapi_sha1update, - &__archive_windowsapi_sha1final, -#elif !defined(ARCHIVE_SHA1_COMPILE_TEST) - &__archive_stub_sha1init, - &__archive_stub_sha1update, - &__archive_stub_sha1final, -#endif + &__archive_sha1init, + &__archive_sha1update, + &__archive_sha1final, /* SHA256 */ -#if defined(ARCHIVE_CRYPTO_SHA256_LIBC) - &__archive_libc_sha256init, - &__archive_libc_sha256update, - &__archive_libc_sha256final, -#elif defined(ARCHIVE_CRYPTO_SHA256_LIBC2) - &__archive_libc2_sha256init, - &__archive_libc2_sha256update, - &__archive_libc2_sha256final, -#elif defined(ARCHIVE_CRYPTO_SHA256_LIBC3) - &__archive_libc3_sha256init, - &__archive_libc3_sha256update, - &__archive_libc3_sha256final, -#elif defined(ARCHIVE_CRYPTO_SHA256_LIBMD) - &__archive_libmd_sha256init, - &__archive_libmd_sha256update, - &__archive_libmd_sha256final, -#elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) - &__archive_libsystem_sha256init, - &__archive_libsystem_sha256update, - &__archive_libsystem_sha256final, -#elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) - &__archive_nettle_sha256init, - &__archive_nettle_sha256update, - &__archive_nettle_sha256final, -#elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) - &__archive_openssl_sha256init, - &__archive_openssl_sha256update, - &__archive_openssl_sha256final, -#elif defined(ARCHIVE_CRYPTO_SHA256_WIN) - &__archive_windowsapi_sha256init, - &__archive_windowsapi_sha256update, - &__archive_windowsapi_sha256final, -#elif !defined(ARCHIVE_SHA256_COMPILE_TEST) - &__archive_stub_sha256init, - &__archive_stub_sha256update, - &__archive_stub_sha256final, -#endif + &__archive_sha256init, + &__archive_sha256update, + &__archive_sha256final, /* SHA384 */ -#if defined(ARCHIVE_CRYPTO_SHA384_LIBC) - &__archive_libc_sha384init, - &__archive_libc_sha384update, - &__archive_libc_sha384final, -#elif defined(ARCHIVE_CRYPTO_SHA384_LIBC2) - &__archive_libc2_sha384init, - &__archive_libc2_sha384update, - &__archive_libc2_sha384final, -#elif defined(ARCHIVE_CRYPTO_SHA384_LIBC3) - &__archive_libc3_sha384init, - &__archive_libc3_sha384update, - &__archive_libc3_sha384final, -#elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) - &__archive_libsystem_sha384init, - &__archive_libsystem_sha384update, - &__archive_libsystem_sha384final, -#elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) - &__archive_nettle_sha384init, - &__archive_nettle_sha384update, - &__archive_nettle_sha384final, -#elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) - &__archive_openssl_sha384init, - &__archive_openssl_sha384update, - &__archive_openssl_sha384final, -#elif defined(ARCHIVE_CRYPTO_SHA384_WIN) - &__archive_windowsapi_sha384init, - &__archive_windowsapi_sha384update, - &__archive_windowsapi_sha384final, -#elif !defined(ARCHIVE_SHA384_COMPILE_TEST) - &__archive_stub_sha384init, - &__archive_stub_sha384update, - &__archive_stub_sha384final, -#endif + &__archive_sha384init, + &__archive_sha384update, + &__archive_sha384final, /* SHA512 */ -#if defined(ARCHIVE_CRYPTO_SHA512_LIBC) - &__archive_libc_sha512init, - &__archive_libc_sha512update, - &__archive_libc_sha512final -#elif defined(ARCHIVE_CRYPTO_SHA512_LIBC2) - &__archive_libc2_sha512init, - &__archive_libc2_sha512update, - &__archive_libc2_sha512final -#elif defined(ARCHIVE_CRYPTO_SHA512_LIBC3) - &__archive_libc3_sha512init, - &__archive_libc3_sha512update, - &__archive_libc3_sha512final -#elif defined(ARCHIVE_CRYPTO_SHA512_LIBMD) - &__archive_libmd_sha512init, - &__archive_libmd_sha512update, - &__archive_libmd_sha512final -#elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) - &__archive_libsystem_sha512init, - &__archive_libsystem_sha512update, - &__archive_libsystem_sha512final -#elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) - &__archive_nettle_sha512init, - &__archive_nettle_sha512update, - &__archive_nettle_sha512final -#elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) - &__archive_openssl_sha512init, - &__archive_openssl_sha512update, - &__archive_openssl_sha512final -#elif defined(ARCHIVE_CRYPTO_SHA512_WIN) - &__archive_windowsapi_sha512init, - &__archive_windowsapi_sha512update, - &__archive_windowsapi_sha512final -#elif !defined(ARCHIVE_SHA512_COMPILE_TEST) - &__archive_stub_sha512init, - &__archive_stub_sha512update, - &__archive_stub_sha512final -#endif + &__archive_sha512init, + &__archive_sha512update, + &__archive_sha512final }; diff --git a/archivers/libarchive/files/libarchive/archive_digest_private.h b/archivers/libarchive/files/libarchive/archive_digest_private.h index b4fd6ca2252..15312ee9a07 100644 --- a/archivers/libarchive/files/libarchive/archive_digest_private.h +++ b/archivers/libarchive/files/libarchive/archive_digest_private.h @@ -24,13 +24,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef ARCHIVE_DIGEST_PRIVATE_H_INCLUDED +#define ARCHIVE_DIGEST_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif - -#ifndef ARCHIVE_CRYPTO_PRIVATE_H_INCLUDED -#define ARCHIVE_CRYPTO_PRIVATE_H_INCLUDED - /* * Crypto support in various Operating Systems: * @@ -112,6 +111,24 @@ #include <CommonCrypto/CommonDigest.h> #endif +/* mbed TLS crypto headers */ +#if defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) +#include <mbedtls/md5.h> +#endif +#if defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) +#include <mbedtls/ripemd160.h> +#endif +#if defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) +#include <mbedtls/sha1.h> +#endif +#if defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) +#include <mbedtls/sha256.h> +#endif +#if defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) ||\ + defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) +#include <mbedtls/sha512.h> +#endif + /* Nettle crypto headers */ #if defined(ARCHIVE_CRYPTO_MD5_NETTLE) #include <nettle/md5.h> @@ -159,6 +176,8 @@ typedef MD5_CTX archive_md5_ctx; typedef MD5_CTX archive_md5_ctx; #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) typedef CC_MD5_CTX archive_md5_ctx; +#elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) +typedef mbedtls_md5_context archive_md5_ctx; #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE) typedef struct md5_ctx archive_md5_ctx; #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL) @@ -173,6 +192,8 @@ typedef unsigned char archive_md5_ctx; typedef RMD160_CTX archive_rmd160_ctx; #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD) typedef RIPEMD160_CTX archive_rmd160_ctx; +#elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) +typedef mbedtls_ripemd160_context archive_rmd160_ctx; #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE) typedef struct ripemd160_ctx archive_rmd160_ctx; #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) @@ -187,6 +208,8 @@ typedef SHA1_CTX archive_sha1_ctx; typedef SHA1_CTX archive_sha1_ctx; #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) typedef CC_SHA1_CTX archive_sha1_ctx; +#elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) +typedef mbedtls_sha1_context archive_sha1_ctx; #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE) typedef struct sha1_ctx archive_sha1_ctx; #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) @@ -207,6 +230,8 @@ typedef SHA2_CTX archive_sha256_ctx; typedef SHA256_CTX archive_sha256_ctx; #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) typedef CC_SHA256_CTX archive_sha256_ctx; +#elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) +typedef mbedtls_sha256_context archive_sha256_ctx; #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE) typedef struct sha256_ctx archive_sha256_ctx; #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) @@ -225,6 +250,8 @@ typedef SHA384_CTX archive_sha384_ctx; typedef SHA2_CTX archive_sha384_ctx; #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) typedef CC_SHA512_CTX archive_sha384_ctx; +#elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) +typedef mbedtls_sha512_context archive_sha384_ctx; #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE) typedef struct sha384_ctx archive_sha384_ctx; #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) @@ -245,6 +272,8 @@ typedef SHA2_CTX archive_sha512_ctx; typedef SHA512_CTX archive_sha512_ctx; #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) typedef CC_SHA512_CTX archive_sha512_ctx; +#elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) +typedef mbedtls_sha512_context archive_sha512_ctx; #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE) typedef struct sha512_ctx archive_sha512_ctx; #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) @@ -259,6 +288,7 @@ typedef unsigned char archive_sha512_ctx; #if defined(ARCHIVE_CRYPTO_MD5_LIBC) ||\ defined(ARCHIVE_CRYPTO_MD5_LIBMD) || \ defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_MD5_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_MD5_NETTLE) ||\ defined(ARCHIVE_CRYPTO_MD5_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_MD5_WIN) @@ -272,6 +302,7 @@ typedef unsigned char archive_sha512_ctx; __archive_digest.md5update(ctx, buf, n) #if defined(ARCHIVE_CRYPTO_RMD160_LIBC) ||\ + defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_RMD160_NETTLE) ||\ defined(ARCHIVE_CRYPTO_RMD160_OPENSSL) #define ARCHIVE_HAS_RMD160 @@ -286,6 +317,7 @@ typedef unsigned char archive_sha512_ctx; #if defined(ARCHIVE_CRYPTO_SHA1_LIBC) ||\ defined(ARCHIVE_CRYPTO_SHA1_LIBMD) || \ defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_SHA1_NETTLE) ||\ defined(ARCHIVE_CRYPTO_SHA1_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_SHA1_WIN) @@ -303,6 +335,7 @@ typedef unsigned char archive_sha512_ctx; defined(ARCHIVE_CRYPTO_SHA256_LIBC3) ||\ defined(ARCHIVE_CRYPTO_SHA256_LIBMD) ||\ defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_SHA256_NETTLE) ||\ defined(ARCHIVE_CRYPTO_SHA256_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_SHA256_WIN) @@ -319,6 +352,7 @@ typedef unsigned char archive_sha512_ctx; defined(ARCHIVE_CRYPTO_SHA384_LIBC2) ||\ defined(ARCHIVE_CRYPTO_SHA384_LIBC3) ||\ defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_SHA384_NETTLE) ||\ defined(ARCHIVE_CRYPTO_SHA384_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_SHA384_WIN) @@ -336,6 +370,7 @@ typedef unsigned char archive_sha512_ctx; defined(ARCHIVE_CRYPTO_SHA512_LIBC3) ||\ defined(ARCHIVE_CRYPTO_SHA512_LIBMD) ||\ defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM) ||\ + defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS) ||\ defined(ARCHIVE_CRYPTO_SHA512_NETTLE) ||\ defined(ARCHIVE_CRYPTO_SHA512_OPENSSL) ||\ defined(ARCHIVE_CRYPTO_SHA512_WIN) diff --git a/archivers/libarchive/files/libarchive/archive_endian.h b/archivers/libarchive/files/libarchive/archive_endian.h index 1c48563b137..e6d3f2ce5e7 100644 --- a/archivers/libarchive/files/libarchive/archive_endian.h +++ b/archivers/libarchive/files/libarchive/archive_endian.h @@ -28,16 +28,15 @@ * Borrowed from FreeBSD's <sys/endian.h> */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif +#ifndef ARCHIVE_ENDIAN_H_INCLUDED +#define ARCHIVE_ENDIAN_H_INCLUDED /* Note: This is a purely internal header! */ /* Do not use this outside of libarchive internal code! */ -#ifndef ARCHIVE_ENDIAN_H_INCLUDED -#define ARCHIVE_ENDIAN_H_INCLUDED - +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * Disabling inline keyword for compilers known to choke on it: diff --git a/archivers/libarchive/files/libarchive/archive_entry.3 b/archivers/libarchive/files/libarchive/archive_entry.3 index f75916c9e41..2f62a4be233 100644 --- a/archivers/libarchive/files/libarchive/archive_entry.3 +++ b/archivers/libarchive/files/libarchive/archive_entry.3 @@ -32,7 +32,7 @@ .Nm archive_entry_clear , .Nm archive_entry_clone , .Nm archive_entry_free , -.Nm archive_entry_new , +.Nm archive_entry_new .Nd functions for managing archive entry descriptions .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -126,7 +126,6 @@ using the current locale. Similarly, if you store a wide string and then store a narrow string for the same data, the previously-set wide string will be discarded in favor of the new data. -.Pp .\" .Sh EXAMPLE .\" .Sh RETURN VALUES .\" .Sh ERRORS @@ -134,8 +133,8 @@ be discarded in favor of the new data. .Xr archive_entry_acl 3 , .Xr archive_entry_paths 3 , .Xr archive_entry_perms 3 , -.Xr archive_entry_time 3 -.Xr libarchive 3 , +.Xr archive_entry_time 3 , +.Xr libarchive 3 .Sh HISTORY The .Nm libarchive diff --git a/archivers/libarchive/files/libarchive/archive_entry.c b/archivers/libarchive/files/libarchive/archive_entry.c index 72c644e6079..124600c983d 100644 --- a/archivers/libarchive/files/libarchive/archive_entry.c +++ b/archivers/libarchive/files/libarchive/archive_entry.c @@ -353,7 +353,7 @@ archive_entry_devminor(struct archive_entry *entry) return minor(entry->ae_stat.aest_dev); } -mode_t +__LA_MODE_T archive_entry_filetype(struct archive_entry *entry) { return (AE_IFMT & entry->acl.mode); @@ -525,7 +525,7 @@ archive_entry_ino64(struct archive_entry *entry) return (entry->ae_stat.aest_ino); } -mode_t +__LA_MODE_T archive_entry_mode(struct archive_entry *entry) { return (entry->acl.mode); @@ -598,7 +598,7 @@ _archive_entry_pathname_l(struct archive_entry *entry, return (archive_mstring_get_mbs_l(&entry->ae_pathname, p, len, sc)); } -mode_t +__LA_MODE_T archive_entry_perm(struct archive_entry *entry) { return (~AE_IFMT & entry->acl.mode); @@ -1699,7 +1699,7 @@ static const struct flag { const wchar_t *wname; unsigned long set; unsigned long clear; -} flags[] = { +} fileflags[] = { /* Preferred (shorter) names per flag first, all prefixed by "no" */ #ifdef SF_APPEND { "nosappnd", L"nosappnd", SF_APPEND, 0}, @@ -1876,7 +1876,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bitclear) bits = bitset | bitclear; length = 0; - for (flag = flags; flag->name != NULL; flag++) + for (flag = fileflags; flag->name != NULL; flag++) if (bits & (flag->set | flag->clear)) { length += strlen(flag->name) + 1; bits &= ~(flag->set | flag->clear); @@ -1889,7 +1889,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bitclear) return (NULL); dp = string; - for (flag = flags; flag->name != NULL; flag++) { + for (flag = fileflags; flag->name != NULL; flag++) { if (bitset & flag->set || bitclear & flag->clear) { sp = flag->name + 2; } else if (bitset & flag->clear || bitclear & flag->set) { @@ -1941,7 +1941,7 @@ ae_strtofflags(const char *s, unsigned long *setp, unsigned long *clrp) *end != ' ' && *end != ',') end++; length = end - start; - for (flag = flags; flag->name != NULL; flag++) { + for (flag = fileflags; flag->name != NULL; flag++) { size_t flag_length = strlen(flag->name); if (length == flag_length && memcmp(start, flag->name, length) == 0) { @@ -2009,7 +2009,7 @@ ae_wcstofflags(const wchar_t *s, unsigned long *setp, unsigned long *clrp) *end != L' ' && *end != L',') end++; length = end - start; - for (flag = flags; flag->wname != NULL; flag++) { + for (flag = fileflags; flag->wname != NULL; flag++) { size_t flag_length = wcslen(flag->wname); if (length == flag_length && wmemcmp(start, flag->wname, length) == 0) { diff --git a/archivers/libarchive/files/libarchive/archive_entry.h b/archivers/libarchive/files/libarchive/archive_entry.h index 71cc63653b9..90768256eff 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 3004000 +#define ARCHIVE_VERSION_NUMBER 3004003 /* * Note: archive_entry.h is for use outside of libarchive; the @@ -524,9 +524,6 @@ __LA_DECL int archive_entry_acl_reset(struct archive_entry *, int /* want_type __LA_DECL int archive_entry_acl_next(struct archive_entry *, int /* want_type */, int * /* type */, int * /* permset */, int * /* tag */, int * /* qual */, const char ** /* name */); -__LA_DECL int archive_entry_acl_next_w(struct archive_entry *, int /* want_type */, - int * /* type */, int * /* permset */, int * /* tag */, - int * /* qual */, const wchar_t ** /* name */); /* * Construct a text-format ACL. The flags argument is a bitmask that diff --git a/archivers/libarchive/files/libarchive/archive_entry_acl.3 b/archivers/libarchive/files/libarchive/archive_entry_acl.3 index 534dbfac6ef..50dd642c20c 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_acl.3 +++ b/archivers/libarchive/files/libarchive/archive_entry_acl.3 @@ -34,7 +34,6 @@ .Nm archive_entry_acl_from_text , .Nm archive_entry_acl_from_text_w , .Nm archive_entry_acl_next , -.Nm archive_entry_acl_next_w , .Nm archive_entry_acl_reset , .Nm archive_entry_acl_to_text , .Nm archive_entry_acl_to_text_w , @@ -89,16 +88,6 @@ Streaming Archive Library (libarchive, -larchive) .Fa "const char **ret_name" .Fc .Ft int -.Fo archive_entry_acl_next_w -.Fa "struct archive_entry *a" -.Fa "int type" -.Fa "int *ret_type" -.Fa "int *ret_permset" -.Fa "int *ret_tag" -.Fa "int *ret_qual" -.Fa "const wchar_t **ret_name" -.Fc -.Ft int .Fn archive_entry_acl_reset "struct archive_entry *a" "int type" .Ft char * .Fo archive_entry_acl_to_text @@ -118,15 +107,16 @@ Streaming Archive Library (libarchive, -larchive) .Sh DESCRIPTION The .Dq Access Control Lists (ACLs) -extend the standard Unix perssion model. +extend the standard Unix permission model. The ACL interface of .Nm libarchive -supports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by +supports both POSIX.1e and NFSv4 style ACLs. +Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. .Ss POSIX.1e Access Control Lists A POSIX.1e ACL consists of a number of independent entries. -Each entry specifies the permission set as bitmask of basic permissions. +Each entry specifies the permission set as a bitmask of basic permissions. Valid permissions in the .Fa permset are: @@ -147,13 +137,13 @@ The user specified by the name field. .It Dv ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. .It Dv ARCHIVE_ENTRY_ACL_GROUP -The group specied by the name field. +The group specified by the name field. .It Dv ARCHIVE_ENTRY_ACL_GROUP_OBJ -The group who owns the file. +The group which owns the file. .It Dv ARCHIVE_ENTRY_ACL_MASK The maximum permissions to be obtained via group permissions. .It Dv ARCHIVE_ENTRY_ACL_OTHER -Any principal who is not file owner or a member of the owning group. +Any principal who is not the file owner or a member of the owning group. .El .Pp The principals @@ -164,12 +154,12 @@ and are equivalent to user, group and other in the classic Unix permission model and specify non-extended ACL entries. .Pp -All files with have an access ACL +All files have an access ACL .Pq Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS . This specifies the permissions required for access to the file itself. Directories have an additional ACL .Pq Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT , -which controls the initial access ACL for newly created directory entries. +which controls the initial access ACL for newly-created directory entries. .Ss NFSv4 Access Control Lists A NFSv4 ACL consists of multiple individual entries called Access Control Entries (ACEs). @@ -197,11 +187,11 @@ The user specified by the name field. .It Dv ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. .It Dv ARCHIVE_ENTRY_ACL_GROUP -The group specied by the name field. +The group specified by the name field. .It Dv ARCHIVE_ENTRY_ACL_GROUP_OBJ -The group who owns the file. +The group which owns the file. .It Dv ARCHIVE_ENTRY_ACL_EVERYONE -Any principal who is not file owner or a member of the owning group. +Any principal who is not the file owner or a member of the owning group. .El .Pp Entries with the @@ -216,9 +206,10 @@ integer. .Pp NFSv4 ACE permissions and flags are stored in the same .Fa permset -bitfield. Some permissions share the same constant and permission character but -have different effect on directories than on files. The following ACE -permissions are supported: +bitfield. +Some permissions share the same constant and permission character +but have different effect on directories than on files. +The following ACE permissions are supported: .Bl -tag -offset indent -compact -width ARCHIV .It Dv ARCHIVE_ENTRY_ACL_READ_DATA ( Sy r ) Read data (file). @@ -265,7 +256,8 @@ Inherit parent directory ACE to subdirectories. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY ( Sy i ) Only inherit, do not apply the permission on the directory itself. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT ( Sy n ) -Do not propagate inherit flags. Only first-level entries inherit ACLs. +Do not propagate inherit flags. +Only first-level entries inherit ACLs. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS ( Sy S ) Trigger alarm or audit on successful access. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS ( Sy F ) @@ -279,8 +271,8 @@ and .Fn archive_entry_acl_add_entry_w add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions -are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL -entries. +are updated. +An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. .Pp .Fn archive_entry_acl_clear removes all ACL entries and resets the enumeration pointer. @@ -300,7 +292,8 @@ for POSIX.1e ACLs and .It Dv ARCHIVE_ENTRY_ACL_TYPE_AUDIT .It Dv ARCHIVE_ENTRY_ACL_TYPE_ALARM .El -for NFSv4 ACLs. For POSIX.1e ACLs if +for NFSv4 ACLs. +For POSIX.1e ACLs if .Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, the three non-extended ACLs are added. @@ -312,7 +305,8 @@ add new .Pq or merge with existing ACL entries from .Pq wide -text. The argument +text. +The argument .Fa type may take one of the following values: .Bl -tag -offset indent -compact -width "ARCHIVE_ENTRY_ACL_TYPE_DEFAULT" @@ -322,11 +316,13 @@ may take one of the following values: .El Supports all formats that can be created with .Fn archive_entry_acl_to_text -or respective +or respectively .Fn archive_entry_acl_to_text_w . -Existing ACL entries are preserved. To get a clean new ACL from text +Existing ACL entries are preserved. +To get a clean new ACL from text .Fn archive_entry_acl_clear -must be called first. Entries prefixed with +must be called first. +Entries prefixed with .Dq default: are treated as .Dv ARCHIVE_ENTRY_ACL_TYPE_DEFAULT @@ -342,8 +338,6 @@ character are skipped. .Pp .Fn archive_entry_acl_next -and -.Fn archive_entry_acl_next_w return the next entry of the ACL list. This functions may only be called after .Fn archive_entry_acl_reset @@ -351,10 +345,8 @@ has indicated the presence of extended ACL entries. .Pp .Fn archive_entry_acl_reset prepare reading the list of ACL entries with -.Fn archive_entry_acl_next -or -.Fn archive_entry_acl_next_w . -The function returns either 0, if no non-extended ACLs are found. +.Fn archive_entry_acl_next . +The function returns 0 if no non-extended ACLs are found. In this case, the access permissions should be obtained by .Xr archive_entry_mode 3 or set using @@ -367,7 +359,8 @@ and .Fn archive_entry_acl_to_text_w convert the ACL entries for the given type into a .Pq wide -string of ACL entries separated by newline. If the pointer +string of ACL entries separated by newline. +If the pointer .Fa len_p is not NULL, then the function shall return the length of the string .Pq not including the NULL terminator @@ -415,7 +408,8 @@ are prefixed with .Dq default: . .Pp .Fn archive_entry_acl_types -get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 +get ACL entry types contained in an archive entry's ACL. +As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries. .Sh RETURN VALUES @@ -438,9 +432,7 @@ if all entries were successfully parsed and if one or more entries were invalid or non-parseable. .Pp .Fn archive_entry_acl_next -and -.Fn archive_entry_acl_next_w -return +returns .Dv ARCHIVE_OK on success, .Dv ARCHIVE_EOF diff --git a/archivers/libarchive/files/libarchive/archive_entry_locale.h b/archivers/libarchive/files/libarchive/archive_entry_locale.h index 44550c51ec6..803c0368bb6 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_locale.h +++ b/archivers/libarchive/files/libarchive/archive_entry_locale.h @@ -25,13 +25,13 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED +#define ARCHIVE_ENTRY_LOCALE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_ENTRY_LOCALE_H_INCLUDED -#define ARCHIVE_ENTRY_LOCALE_H_INCLUDED - struct archive_entry; struct archive_string_conv; diff --git a/archivers/libarchive/files/libarchive/archive_entry_misc.3 b/archivers/libarchive/files/libarchive/archive_entry_misc.3 index 9b1e3ea207d..dfab7ddb559 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_misc.3 +++ b/archivers/libarchive/files/libarchive/archive_entry_misc.3 @@ -28,7 +28,7 @@ .Sh NAME .Nm archive_entry_symlink_type , .Nm archive_entry_set_symlink_type -.Nd miscellaneous functions for manipulating properties of archive_entry. +.Nd miscellaneous functions for manipulating properties of archive_entry .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) .Sh SYNOPSIS @@ -42,7 +42,8 @@ The function .Fn archive_entry_symlink_type returns and the function .Fn archive_entry_set_symlink_type -sets the type of the symbolic link stored in an archive entry. These functions +sets the type of the symbolic link stored in an archive entry. +These functions have special meaning on operating systems that support multiple symbolic link types (e.g. Microsoft Windows). .Pp diff --git a/archivers/libarchive/files/libarchive/archive_entry_paths.3 b/archivers/libarchive/files/libarchive/archive_entry_paths.3 index f647212a98b..0f849c9ebb3 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_paths.3 +++ b/archivers/libarchive/files/libarchive/archive_entry_paths.3 @@ -133,7 +133,7 @@ The accessor functions are named .Fn XXX_w . .It UTF-8 Unicode strings encoded as UTF-8. -This are convience functions to update both the multibyte and wide +These are convenience functions to update both the multibyte and wide character strings at the same time. .El .Pp @@ -141,13 +141,13 @@ The sourcepath is a pure filesystem concept and never stored in an archive directly. .Pp For that reason, it is only available as multibyte string. -The link path is a convience function for conditionally setting +The link path is a convenience function for conditionally setting hardlink or symlink destination. It doesn't have a corresponding get accessor function. .Pp .Fn archive_entry_set_XXX -is an alias for +is an alias for .Fn archive_entry_copy_XXX . .Sh SEE ALSO -.Xr archive_entry 3 -.Xr libarchive 3 , +.Xr archive_entry 3 , +.Xr libarchive 3 diff --git a/archivers/libarchive/files/libarchive/archive_entry_perms.3 b/archivers/libarchive/files/libarchive/archive_entry_perms.3 index aae3648bb21..0291b7b4988 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_perms.3 +++ b/archivers/libarchive/files/libarchive/archive_entry_perms.3 @@ -126,7 +126,7 @@ The corresponding functions and .Fn archive_entry_set_perm store the given user id, group id and permission in the entry. -The permission is also set as side effect of calling +The permission is also set as a side effect of calling .Fn archive_entry_set_mode . .Pp .Fn archive_entry_strmode @@ -143,12 +143,12 @@ The accessor functions are named .Fn XXX_w . .It UTF-8 Unicode strings encoded as UTF-8. -This are convience functions to update both the multibyte and wide +These are convenience functions to update both the multibyte and wide character strings at the same time. .El .Pp .Fn archive_entry_set_XXX -is an alias for +is an alias for .Fn archive_entry_copy_XXX . .Ss File Flags File flags are transparently converted between a bitmap @@ -182,7 +182,7 @@ The .Fn archive_entry_copy_fflags_text and .Fn archive_entry_copy_fflags_text_w -functions parse the provided text and sets the internal bitmap values. +functions parse the provided text and set the internal bitmap values. This is a platform-specific operation; names that are not meaningful on the current platform will be ignored. The function returns a pointer to the start of the first name that was not @@ -197,8 +197,8 @@ which stops parsing at the first unrecognized name.) .Xr archive_entry 3 , .Xr archive_entry_acl 3 , .Xr archive_read_disk 3 , -.Xr archive_write_disk 3 -.Xr libarchive 3 , +.Xr archive_write_disk 3 , +.Xr libarchive 3 .Sh BUGS The platform types .Vt uid_t diff --git a/archivers/libarchive/files/libarchive/archive_entry_private.h b/archivers/libarchive/files/libarchive/archive_entry_private.h index 3d569bbfc6b..2b9a084ca15 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_private.h +++ b/archivers/libarchive/files/libarchive/archive_entry_private.h @@ -25,13 +25,13 @@ * $FreeBSD: head/lib/libarchive/archive_entry_private.h 201096 2009-12-28 02:41:27Z kientzle $ */ +#ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED +#define ARCHIVE_ENTRY_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_ENTRY_PRIVATE_H_INCLUDED -#define ARCHIVE_ENTRY_PRIVATE_H_INCLUDED - #include "archive_acl_private.h" #include "archive_string.h" diff --git a/archivers/libarchive/files/libarchive/archive_entry_stat.3 b/archivers/libarchive/files/libarchive/archive_entry_stat.3 index 26611e4c62e..29a53f75607 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_stat.3 +++ b/archivers/libarchive/files/libarchive/archive_entry_stat.3 @@ -54,7 +54,7 @@ .Nm archive_entry_rdevmajor , .Nm archive_entry_set_rdevmajor , .Nm archive_entry_rdevminor , -.Nm archive_entry_set_rdevminor , +.Nm archive_entry_set_rdevminor .Nd accessor functions for manipulating archive entry descriptions .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -215,9 +215,9 @@ and set and unset the size, respectively. .Pp The number of references (hardlinks) can be obtained by calling -.Fn archive_entry_nlinks +.Fn archive_entry_nlink and set with -.Fn archive_entry_set_nlinks . +.Fn archive_entry_set_nlink . .Ss Identifying unique files The functions .Fn archive_entry_dev @@ -267,8 +267,8 @@ platforms. Some archive formats use the combined form, while other formats use the split form. .Sh SEE ALSO +.Xr stat 2 , .Xr archive_entry_acl 3 , .Xr archive_entry_perms 3 , .Xr archive_entry_time 3 , -.Xr libarchive 3 , -.Xr stat 2 +.Xr libarchive 3 diff --git a/archivers/libarchive/files/libarchive/archive_entry_time.3 b/archivers/libarchive/files/libarchive/archive_entry_time.3 index 18645215937..d0563eaef43 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_time.3 +++ b/archivers/libarchive/files/libarchive/archive_entry_time.3 @@ -48,7 +48,7 @@ .Nm archive_entry_mtime_nsec , .Nm archive_entry_mtime_is_set , .Nm archive_entry_set_mtime , -.Nm archive_entry_unset_mtime , +.Nm archive_entry_unset_mtime .Nd functions for manipulating times in archive entry descriptions .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -113,8 +113,8 @@ The current state can be queried using .Fn XXX_is_set . Unset time fields have a second and nanosecond field of 0. .Sh SEE ALSO -.Xr archive_entry 3 -.Xr libarchive 3 , +.Xr archive_entry 3 , +.Xr libarchive 3 .Sh HISTORY The .Nm libarchive diff --git a/archivers/libarchive/files/libarchive/archive_getdate.c b/archivers/libarchive/files/libarchive/archive_getdate.c index 030c083ce71..3ec5bba8889 100644 --- a/archivers/libarchive/files/libarchive/archive_getdate.c +++ b/archivers/libarchive/files/libarchive/archive_getdate.c @@ -27,6 +27,7 @@ ** This code is in the public domain and has no copyright. */ +#include "archive_platform.h" #ifdef __FreeBSD__ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -694,8 +695,16 @@ Convert(time_t Month, time_t Day, time_t Year, signed char DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; - time_t Julian; - int i; + time_t Julian; + int i; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (Year < 69) Year += 2000; @@ -722,21 +731,64 @@ Convert(time_t Month, time_t Day, time_t Year, Julian *= DAY; Julian += Timezone; Julian += Hours * HOUR + Minutes * MINUTE + Seconds; +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&Julian, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Julian; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&Julian); +#endif if (DSTmode == DSTon - || (DSTmode == DSTmaybe && localtime(&Julian)->tm_isdst)) + || (DSTmode == DSTmaybe && ltime->tm_isdst)) Julian -= HOUR; return Julian; } - static time_t DSTcorrect(time_t Start, time_t Future) { - time_t StartDay; - time_t FutureDay; + time_t StartDay; + time_t FutureDay; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif - StartDay = (localtime(&Start)->tm_hour + 1) % 24; - FutureDay = (localtime(&Future)->tm_hour + 1) % 24; +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&Start, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Start; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&Start); +#endif + StartDay = (ltime->tm_hour + 1) % 24; +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&Future, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Future; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&Future); +#endif + FutureDay = (ltime->tm_hour + 1) % 24; return (Future - Start) + (StartDay - FutureDay) * HOUR; } @@ -747,9 +799,27 @@ RelativeDate(time_t Start, time_t zone, int dstmode, { struct tm *tm; time_t t, now; +#if defined(HAVE_GMTIME_R) || defined(HAVE__GMTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__GMTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif t = Start - zone; +#if defined(HAVE_GMTIME_R) + tm = gmtime_r(&t, &tmbuf); +#elif defined(HAVE__GMTIME64_S) + tmptime = t; + terr = _gmtime64_s(&tmbuf, &tmptime); + if (terr) + tm = NULL; + else + tm = &tmbuf; +#else tm = gmtime(&t); +#endif now = Start; now += DAY * ((DayNumber - tm->tm_wday + 7) % 7); now += 7 * DAY * (DayOrdinal <= 0 ? DayOrdinal : DayOrdinal - 1); @@ -765,10 +835,28 @@ RelativeMonth(time_t Start, time_t Timezone, time_t RelMonth) struct tm *tm; time_t Month; time_t Year; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (RelMonth == 0) return 0; +#if defined(HAVE_LOCALTIME_R) + tm = localtime_r(&Start, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = Start; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + tm = NULL; + else + tm = &tmbuf; +#else tm = localtime(&Start); +#endif Month = 12 * (tm->tm_year + 1900) + tm->tm_mon + RelMonth; Year = Month / 12; Month = Month % 12 + 1; @@ -905,6 +993,10 @@ __archive_get_date(time_t now, const char *p) time_t Start; time_t tod; long tzone; +#if defined(HAVE__LOCALTIME64_S) || defined(HAVE__GMTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif /* Clear out the parsed token array. */ memset(tokens, 0, sizeof(tokens)); @@ -913,20 +1005,44 @@ __archive_get_date(time_t now, const char *p) gds = &_gds; /* Look up the current time. */ +#if defined(HAVE_LOCALTIME_R) + tm = localtime_r(&now, &local); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = now; + terr = _localtime64_s(&local, &tmptime); + if (terr) + tm = NULL; + else + tm = &local; +#else memset(&local, 0, sizeof(local)); - tm = localtime (&now); + tm = localtime(&now); +#endif if (tm == NULL) return -1; +#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE__LOCALTIME64_S) local = *tm; +#endif /* Look up UTC if we can and use that to determine the current * timezone offset. */ +#if defined(HAVE_GMTIME_R) + gmt_ptr = gmtime_r(&now, &gmt); +#elif defined(HAVE__GMTIME64_S) + tmptime = now; + terr = _gmtime64_s(&gmt, &tmptime); + if (terr) + gmt_ptr = NULL; + else + gmt_ptr = &gmt; +#else memset(&gmt, 0, sizeof(gmt)); - gmt_ptr = gmtime (&now); + gmt_ptr = gmtime(&now); if (gmt_ptr != NULL) { /* Copy, in case localtime and gmtime use the same buffer. */ gmt = *gmt_ptr; } +#endif if (gmt_ptr != NULL) tzone = difftm (&gmt, &local); else @@ -960,7 +1076,18 @@ __archive_get_date(time_t now, const char *p) * time components instead of the local timezone. */ if (gds->HaveZone && gmt_ptr != NULL) { now -= gds->Timezone; - gmt_ptr = gmtime (&now); +#if defined(HAVE_GMTIME_R) + gmt_ptr = gmtime_r(&now, &gmt); +#elif defined(HAVE__GMTIME64_S) + tmptime = now; + terr = _gmtime64_s(&gmt, &tmptime); + if (terr) + gmt_ptr = NULL; + else + gmt_ptr = &gmt; +#else + gmt_ptr = gmtime(&now); +#endif if (gmt_ptr != NULL) local = *gmt_ptr; now += gds->Timezone; diff --git a/archivers/libarchive/files/libarchive/archive_getdate.h b/archivers/libarchive/files/libarchive/archive_getdate.h index 666ff5ff78b..900a8f692e9 100644 --- a/archivers/libarchive/files/libarchive/archive_getdate.h +++ b/archivers/libarchive/files/libarchive/archive_getdate.h @@ -25,13 +25,13 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_GETDATE_H_INCLUDED +#define ARCHIVE_GETDATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_GETDATE_H_INCLUDED -#define ARCHIVE_GETDATE_H_INCLUDED - #include <time.h> time_t __archive_get_date(time_t now, const char *); diff --git a/archivers/libarchive/files/libarchive/archive_hmac.c b/archivers/libarchive/files/libarchive/archive_hmac.c index 392916de5b7..2a9d04c8d8f 100644 --- a/archivers/libarchive/files/libarchive/archive_hmac.c +++ b/archivers/libarchive/files/libarchive/archive_hmac.c @@ -83,7 +83,9 @@ __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx) static int __hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len) { +#ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wcast-qual" +#endif BCRYPT_ALG_HANDLE hAlg; BCRYPT_HASH_HANDLE hHash; DWORD hash_len; @@ -148,6 +150,53 @@ __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx) } } +#elif defined(HAVE_LIBMBEDCRYPTO) && defined(HAVE_MBEDTLS_MD_H) + +static int +__hmac_sha1_init(archive_hmac_sha1_ctx *ctx, const uint8_t *key, size_t key_len) +{ + const mbedtls_md_info_t *info; + int ret; + + mbedtls_md_init(ctx); + info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA1); + if (info == NULL) { + mbedtls_md_free(ctx); + return (-1); + } + ret = mbedtls_md_setup(ctx, info, 1); + if (ret != 0) { + mbedtls_md_free(ctx); + return (-1); + } + ret = mbedtls_md_hmac_starts(ctx, key, key_len); + if (ret != 0) { + mbedtls_md_free(ctx); + return (-1); + } + return 0; +} + +static void +__hmac_sha1_update(archive_hmac_sha1_ctx *ctx, const uint8_t *data, + size_t data_len) +{ + mbedtls_md_hmac_update(ctx, data, data_len); +} + +static void __hmac_sha1_final(archive_hmac_sha1_ctx *ctx, uint8_t *out, size_t *out_len) +{ + (void)out_len; /* UNUSED */ + + mbedtls_md_hmac_finish(ctx, out); +} + +static void __hmac_sha1_cleanup(archive_hmac_sha1_ctx *ctx) +{ + mbedtls_md_free(ctx); + memset(ctx, 0, sizeof(*ctx)); +} + #elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_HMAC_H) static int @@ -199,6 +248,7 @@ static void __hmac_sha1_final(archive_hmac_sha1_ctx *ctx, uint8_t *out, size_t *out_len) { unsigned int len = (unsigned int)*out_len; + HMAC_Final(*ctx, out, &len); *out_len = len; } diff --git a/archivers/libarchive/files/libarchive/archive_hmac_private.h b/archivers/libarchive/files/libarchive/archive_hmac_private.h index eb45c4ef21b..13a67d4955a 100644 --- a/archivers/libarchive/files/libarchive/archive_hmac_private.h +++ b/archivers/libarchive/files/libarchive/archive_hmac_private.h @@ -23,13 +23,12 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif - #ifndef ARCHIVE_HMAC_PRIVATE_H_INCLUDED #define ARCHIVE_HMAC_PRIVATE_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif /* * On systems that do not support any recognized crypto libraries, * the archive_hmac.c file is expected to define no usable symbols. @@ -64,6 +63,11 @@ typedef struct { } archive_hmac_sha1_ctx; +#elif defined(HAVE_LIBMBEDCRYPTO) && defined(HAVE_MBEDTLS_MD_H) +#include <mbedtls/md.h> + +typedef mbedtls_md_context_t archive_hmac_sha1_ctx; + #elif defined(HAVE_LIBNETTLE) && defined(HAVE_NETTLE_HMAC_H) #include <nettle/hmac.h> diff --git a/archivers/libarchive/files/libarchive/archive_openssl_evp_private.h b/archivers/libarchive/files/libarchive/archive_openssl_evp_private.h index 43a3ccc52a1..ebb06702d0c 100644 --- a/archivers/libarchive/files/libarchive/archive_openssl_evp_private.h +++ b/archivers/libarchive/files/libarchive/archive_openssl_evp_private.h @@ -22,9 +22,14 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef ARCHIVE_OPENSSL_EVP_PRIVATE_H_INCLUDED #define ARCHIVE_OPENSSL_EVP_PRIVATE_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif + #include <openssl/evp.h> #include <openssl/opensslv.h> diff --git a/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h b/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h index 921249bb945..25c8dda654f 100644 --- a/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h +++ b/archivers/libarchive/files/libarchive/archive_openssl_hmac_private.h @@ -22,9 +22,14 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef ARCHIVE_OPENSSL_HMAC_PRIVATE_H_INCLUDED #define ARCHIVE_OPENSSL_HMAC_PRIVATE_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif + #include <openssl/hmac.h> #include <openssl/opensslv.h> diff --git a/archivers/libarchive/files/libarchive/archive_options_private.h b/archivers/libarchive/files/libarchive/archive_options_private.h index 6ef0165aff6..9a7f8080d2f 100644 --- a/archivers/libarchive/files/libarchive/archive_options_private.h +++ b/archivers/libarchive/files/libarchive/archive_options_private.h @@ -23,6 +23,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef ARCHIVE_OPTIONS_PRIVATE_H_INCLUDED +#define ARCHIVE_OPTIONS_PRIVATE_H_INCLUDED + #include "archive_platform.h" __FBSDID("$FreeBSD$"); @@ -45,3 +48,4 @@ _archive_set_either_option(struct archive *a, const char *m, const char *o, const char *v, option_handler use_format_option, option_handler use_filter_option); +#endif diff --git a/archivers/libarchive/files/libarchive/archive_pack_dev.c b/archivers/libarchive/files/libarchive/archive_pack_dev.c index 5c18f96ce9b..379cdcd7cb0 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.7 2019/09/22 09:55:08 joerg Exp $ */ +/* $NetBSD: archive_pack_dev.c,v 1.8 2020/05/26 09:16:42 nia 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.7 2019/09/22 09:55:08 joerg Exp $"); +__RCSID("$NetBSD: archive_pack_dev.c,v 1.8 2020/05/26 09:16:42 nia Exp $"); #endif /* not lint */ #ifdef HAVE_LIMITS_H @@ -57,11 +57,12 @@ __RCSID("$NetBSD: archive_pack_dev.c,v 1.7 2019/09/22 09:55:08 joerg Exp $"); #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif -#ifdef HAVE_SYS_SYSMACROS_H -#include <sys/sysmacros.h> -#endif -#ifdef HAVE_SYS_MKDEV_H +#if MAJOR_IN_MKDEV #include <sys/mkdev.h> +#define HAVE_MAJOR +#elif MAJOR_IN_SYSMACROS +#include <sys/sysmacros.h> +#define HAVE_MAJOR #endif #ifdef HAVE_UNISTD_H #include <unistd.h> diff --git a/archivers/libarchive/files/libarchive/archive_pack_dev.h b/archivers/libarchive/files/libarchive/archive_pack_dev.h index 48b5feccdcc..45cfce6b338 100644 --- a/archivers/libarchive/files/libarchive/archive_pack_dev.h +++ b/archivers/libarchive/files/libarchive/archive_pack_dev.h @@ -1,4 +1,4 @@ -/* $NetBSD: archive_pack_dev.h,v 1.6 2019/09/22 09:55:08 joerg Exp $ */ +/* $NetBSD: archive_pack_dev.h,v 1.7 2020/05/26 09:16:42 nia Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -31,8 +31,8 @@ /* Originally from NetBSD's mknod(8) source. */ -#ifndef _PACK_DEV_H -#define _PACK_DEV_H +#ifndef ARCHIVE_PACK_DEV_H +#define ARCHIVE_PACK_DEV_H typedef dev_t pack_t(int, unsigned long [], const char **); @@ -46,4 +46,4 @@ pack_t pack_native; (((y) << 12) & 0xfff00000) | \ (((y) << 0) & 0x000000ff))) -#endif /* _PACK_DEV_H */ +#endif /* ARCHIVE_PACK_DEV_H */ diff --git a/archivers/libarchive/files/libarchive/archive_pathmatch.h b/archivers/libarchive/files/libarchive/archive_pathmatch.h index e6901774ddd..9995142921e 100644 --- a/archivers/libarchive/files/libarchive/archive_pathmatch.h +++ b/archivers/libarchive/files/libarchive/archive_pathmatch.h @@ -26,15 +26,15 @@ * $FreeBSD$ */ +#ifndef ARCHIVE_PATHMATCH_H +#define ARCHIVE_PATHMATCH_H + #ifndef __LIBARCHIVE_BUILD #ifndef __LIBARCHIVE_TEST #error This header is only to be used internally to libarchive. #endif #endif -#ifndef ARCHIVE_PATHMATCH_H -#define ARCHIVE_PATHMATCH_H - /* Don't anchor at beginning unless the pattern starts with "^" */ #define PATHMATCH_NO_ANCHOR_START 1 /* Don't anchor at end unless the pattern ends with "$" */ diff --git a/archivers/libarchive/files/libarchive/archive_platform_acl.h b/archivers/libarchive/files/libarchive/archive_platform_acl.h index 3498f78b3c8..264e6de375a 100644 --- a/archivers/libarchive/files/libarchive/archive_platform_acl.h +++ b/archivers/libarchive/files/libarchive/archive_platform_acl.h @@ -30,6 +30,12 @@ #ifndef ARCHIVE_PLATFORM_ACL_H_INCLUDED #define ARCHIVE_PLATFORM_ACL_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#ifndef __LIBARCHIVE_TEST_COMMON +#error This header is only to be used internally to libarchive. +#endif +#endif + /* * Determine what ACL types are supported */ diff --git a/archivers/libarchive/files/libarchive/archive_platform_xattr.h b/archivers/libarchive/files/libarchive/archive_platform_xattr.h index 4edfecfdbdf..ad4b90ab7b2 100644 --- a/archivers/libarchive/files/libarchive/archive_platform_xattr.h +++ b/archivers/libarchive/files/libarchive/archive_platform_xattr.h @@ -30,6 +30,12 @@ #ifndef ARCHIVE_PLATFORM_XATTR_H_INCLUDED #define ARCHIVE_PLATFORM_XATTR_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#ifndef __LIBARCHIVE_TEST_COMMON +#error This header is only to be used internally to libarchive. +#endif +#endif + /* * Determine if we support extended attributes */ diff --git a/archivers/libarchive/files/libarchive/archive_ppmd7.c b/archivers/libarchive/files/libarchive/archive_ppmd7.c index d0bacc68cd7..4029395b4c7 100644 --- a/archivers/libarchive/files/libarchive/archive_ppmd7.c +++ b/archivers/libarchive/files/libarchive/archive_ppmd7.c @@ -1000,7 +1000,7 @@ static void RangeEnc_ShiftLow(CPpmd7z_RangeEnc *p) static void RangeEnc_Encode(CPpmd7z_RangeEnc *p, UInt32 start, UInt32 size, UInt32 total) { - p->Low += start * (p->Range /= total); + p->Low += (UInt64)start * (UInt64)(p->Range /= total); p->Range *= size; while (p->Range < kTopValue) { diff --git a/archivers/libarchive/files/libarchive/archive_ppmd7_private.h b/archivers/libarchive/files/libarchive/archive_ppmd7_private.h index 577d6fb43d0..71b954458c6 100644 --- a/archivers/libarchive/files/libarchive/archive_ppmd7_private.h +++ b/archivers/libarchive/files/libarchive/archive_ppmd7_private.h @@ -6,13 +6,13 @@ This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ of RangeCoder from 7z, instead of RangeCoder from original PPMd var.H. If you need the compatibility with original PPMd var.H, you can use external RangeDecoder */ +#ifndef ARCHIVE_PPMD7_PRIVATE_H_INCLUDED +#define ARCHIVE_PPMD7_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_PPMD7_PRIVATE_H_INCLUDED -#define ARCHIVE_PPMD7_PRIVATE_H_INCLUDED - #include "archive_ppmd_private.h" #define PPMD7_MIN_ORDER 2 diff --git a/archivers/libarchive/files/libarchive/archive_ppmd8_private.h b/archivers/libarchive/files/libarchive/archive_ppmd8_private.h index 534927860eb..454b75f41f2 100644 --- a/archivers/libarchive/files/libarchive/archive_ppmd8_private.h +++ b/archivers/libarchive/files/libarchive/archive_ppmd8_private.h @@ -4,8 +4,8 @@ This code is based on: PPMd var.I (2002): Dmitry Shkarin : Public domain Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ -#ifndef __PPMD8_H -#define __PPMD8_H +#ifndef ARCHIVE_PPMD8_PRIVATE_H_INCLUDED +#define ARCHIVE_PPMD8_PRIVATE_H_INCLUDED #include "archive_ppmd_private.h" diff --git a/archivers/libarchive/files/libarchive/archive_ppmd_private.h b/archivers/libarchive/files/libarchive/archive_ppmd_private.h index a83b8514d87..582803e5fd0 100644 --- a/archivers/libarchive/files/libarchive/archive_ppmd_private.h +++ b/archivers/libarchive/files/libarchive/archive_ppmd_private.h @@ -2,13 +2,13 @@ 2010-03-12 : Igor Pavlov : Public domain This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ +#ifndef ARCHIVE_PPMD_PRIVATE_H_INCLUDED +#define ARCHIVE_PPMD_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_PPMD_PRIVATE_H_INCLUDED -#define ARCHIVE_PPMD_PRIVATE_H_INCLUDED - #include <stddef.h> #include "archive_read_private.h" diff --git a/archivers/libarchive/files/libarchive/archive_private.h b/archivers/libarchive/files/libarchive/archive_private.h index 4b4be9796df..937a87bb1ef 100644 --- a/archivers/libarchive/files/libarchive/archive_private.h +++ b/archivers/libarchive/files/libarchive/archive_private.h @@ -25,13 +25,13 @@ * $FreeBSD: head/lib/libarchive/archive_private.h 201098 2009-12-28 02:58:14Z kientzle $ */ +#ifndef ARCHIVE_PRIVATE_H_INCLUDED +#define ARCHIVE_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_PRIVATE_H_INCLUDED -#define ARCHIVE_PRIVATE_H_INCLUDED - #if HAVE_ICONV_H #include <iconv.h> #endif @@ -153,6 +153,11 @@ void __archive_errx(int retvalue, const char *msg) __LA_DEAD; void __archive_ensure_cloexec_flag(int fd); int __archive_mktemp(const char *tmpdir); +#if defined(_WIN32) && !defined(__CYGWIN__) +int __archive_mkstemp(wchar_t *template); +#else +int __archive_mkstemp(char *template); +#endif int __archive_clean(struct archive *); diff --git a/archivers/libarchive/files/libarchive/archive_random_private.h b/archivers/libarchive/files/libarchive/archive_random_private.h index c414779f8d4..08b91b3b7a3 100644 --- a/archivers/libarchive/files/libarchive/archive_random_private.h +++ b/archivers/libarchive/files/libarchive/archive_random_private.h @@ -23,13 +23,13 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef ARCHIVE_RANDOM_PRIVATE_H_INCLUDED +#define ARCHIVE_RANDOM_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_RANDOM_PRIVATE_H_INCLUDED -#define ARCHIVE_RANDOM_PRIVATE_H_INCLUDED - /* Random number generator. */ int archive_random(void *buf, size_t nbytes); diff --git a/archivers/libarchive/files/libarchive/archive_rb.h b/archivers/libarchive/files/libarchive/archive_rb.h index 4562e9ebc41..8851f108186 100644 --- a/archivers/libarchive/files/libarchive/archive_rb.h +++ b/archivers/libarchive/files/libarchive/archive_rb.h @@ -28,8 +28,9 @@ * * Based on NetBSD: rb.h,v 1.13 2009/08/16 10:57:01 yamt Exp */ -#ifndef ARCHIVE_RB_H_ -#define ARCHIVE_RB_H_ + +#ifndef ARCHIVE_RB_H_INCLUDED +#define ARCHIVE_RB_H_INCLUDED struct archive_rb_node { struct archive_rb_node *rb_nodes[2]; @@ -48,12 +49,24 @@ struct archive_rb_node { __archive_rb_tree_iterate((T), NULL, ARCHIVE_RB_DIR_LEFT) #define ARCHIVE_RB_TREE_MAX(T) \ __archive_rb_tree_iterate((T), NULL, ARCHIVE_RB_DIR_RIGHT) +#define ARCHIVE_RB_TREE_NEXT(T, N) \ + __archive_rb_tree_iterate((T), (N), ARCHIVE_RB_DIR_RIGHT) +#define ARCHIVE_RB_TREE_PREV(T, N) \ + __archive_rb_tree_iterate((T), (N), ARCHIVE_RB_DIR_LEFT) #define ARCHIVE_RB_TREE_FOREACH(N, T) \ for ((N) = ARCHIVE_RB_TREE_MIN(T); (N); \ - (N) = __archive_rb_tree_iterate((T), (N), ARCHIVE_RB_DIR_RIGHT)) + (N) = ARCHIVE_RB_TREE_NEXT((T), (N))) #define ARCHIVE_RB_TREE_FOREACH_REVERSE(N, T) \ for ((N) = ARCHIVE_RB_TREE_MAX(T); (N); \ - (N) = __archive_rb_tree_iterate((T), (N), ARCHIVE_RB_DIR_LEFT)) + (N) = ARCHIVE_RB_TREE_PREV((T), (N))) +#define ARCHIVE_RB_TREE_FOREACH_SAFE(N, T, S) \ + for ((N) = ARCHIVE_RB_TREE_MIN(T); \ + (N) && ((S) = ARCHIVE_RB_TREE_NEXT((T), (N)), 1); \ + (N) = (S)) +#define ARCHIVE_RB_TREE_FOREACH_REVERSE_SAFE(N, T, S) \ + for ((N) = ARCHIVE_RB_TREE_MAX(T); \ + (N) && ((S) = ARCHIVE_RB_TREE_PREV((T), (N)), 1); \ + (N) = (S)) /* * archive_rbto_compare_nodes_fn: diff --git a/archivers/libarchive/files/libarchive/archive_read.3 b/archivers/libarchive/files/libarchive/archive_read.3 index d37e7327cb5..cbedd0a1912 100644 --- a/archivers/libarchive/files/libarchive/archive_read.3 +++ b/archivers/libarchive/files/libarchive/archive_read.3 @@ -155,7 +155,7 @@ to close the archive, then call .Fn archive_read_free to release all resources, including all memory allocated by the library. .\" -.Sh EXAMPLE +.Sh EXAMPLES The following illustrates basic usage of the library. In this example, the callback functions are simply wrappers around the standard @@ -217,16 +217,16 @@ myclose(struct archive *a, void *client_data) .\" .Sh ERRORS .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , -.Xr archive_read_new 3 , .Xr archive_read_data 3 , .Xr archive_read_extract 3 , .Xr archive_read_filter 3 , .Xr archive_read_format 3 , .Xr archive_read_header 3 , +.Xr archive_read_new 3 , .Xr archive_read_open 3 , .Xr archive_read_set_options 3 , .Xr archive_util 3 , +.Xr libarchive 3 , .Xr tar 5 .Sh HISTORY The diff --git a/archivers/libarchive/files/libarchive/archive_read.c b/archivers/libarchive/files/libarchive/archive_read.c index de964f25328..c59f0515349 100644 --- a/archivers/libarchive/files/libarchive/archive_read.c +++ b/archivers/libarchive/files/libarchive/archive_read.c @@ -433,7 +433,7 @@ archive_read_add_callback_data(struct archive *_a, void *client_data, return ARCHIVE_FATAL; } a->client.dataset = (struct archive_read_data_node *)p; - for (i = a->client.nodes - 1; i > iindex && i > 0; i--) { + for (i = a->client.nodes - 1; i > iindex; i--) { a->client.dataset[i].data = a->client.dataset[i-1].data; a->client.dataset[i].begin_position = -1; a->client.dataset[i].total_size = -1; @@ -844,7 +844,8 @@ archive_read_data(struct archive *_a, void *buff, size_t s) dest = (char *)buff; while (s > 0) { - if (a->read_data_remaining == 0) { + if (a->read_data_offset == a->read_data_output_offset && + a->read_data_remaining == 0) { read_buf = a->read_data_block; a->read_data_is_posix_read = 1; a->read_data_requested = s; @@ -891,15 +892,16 @@ archive_read_data(struct archive *_a, void *buff, size_t s) len = a->read_data_remaining; if (len > s) len = s; - if (len) + if (len) { memcpy(dest, a->read_data_block, len); - s -= len; - a->read_data_block += len; - a->read_data_remaining -= len; - a->read_data_output_offset += len; - a->read_data_offset += len; - dest += len; - bytes_read += len; + s -= len; + a->read_data_block += len; + a->read_data_remaining -= len; + a->read_data_output_offset += len; + a->read_data_offset += len; + dest += len; + bytes_read += len; + } } } a->read_data_is_posix_read = 0; diff --git a/archivers/libarchive/files/libarchive/archive_read_add_passphrase.3 b/archivers/libarchive/files/libarchive/archive_read_add_passphrase.3 index 8b242ea79b1..ca60d4fc62f 100644 --- a/archivers/libarchive/files/libarchive/archive_read_add_passphrase.3 +++ b/archivers/libarchive/files/libarchive/archive_read_add_passphrase.3 @@ -59,16 +59,16 @@ or empty, this function will do nothing and will be returned. Otherwise, .Cm ARCHIVE_OK -will be returned. +will be returned. .It Fn archive_read_set_passphrase_callback -Register callback function that will be invoked to get a passphrase -for decrption after trying all passphrases registered by the +Register a callback function that will be invoked to get a passphrase +for decryption after trying all the passphrases registered by the .Fn archive_read_add_passphrase function failed. .El .\" .Sh ERRORS .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_read 3 , -.Xr archive_read_set_options 3 +.Xr archive_read_set_options 3 , +.Xr libarchive 3 diff --git a/archivers/libarchive/files/libarchive/archive_read_add_passphrase.c b/archivers/libarchive/files/libarchive/archive_read_add_passphrase.c index cf821b5d483..f0b1ab93300 100644 --- a/archivers/libarchive/files/libarchive/archive_read_add_passphrase.c +++ b/archivers/libarchive/files/libarchive/archive_read_add_passphrase.c @@ -57,6 +57,10 @@ insert_passphrase_to_head(struct archive_read *a, { p->next = a->passphrases.first; a->passphrases.first = p; + if (&a->passphrases.first == a->passphrases.last) { + a->passphrases.last = &p->next; + p->next = NULL; + } } static struct archive_read_passphrase * diff --git a/archivers/libarchive/files/libarchive/archive_read_data.3 b/archivers/libarchive/files/libarchive/archive_read_data.3 index c1bc15d7cc8..78c0c900041 100644 --- a/archivers/libarchive/files/libarchive/archive_read_data.3 +++ b/archivers/libarchive/files/libarchive/archive_read_data.3 @@ -28,7 +28,7 @@ .Dt ARCHIVE_READ_DATA 3 .Os .Sh NAME -.Nm archive_read_data +.Nm archive_read_data , .Nm archive_read_data_block , .Nm archive_read_data_skip , .Nm archive_read_data_into_fd @@ -118,7 +118,6 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_read 3 , .Xr archive_read_extract 3 , .Xr archive_read_filter 3 , @@ -127,4 +126,5 @@ functions. .Xr archive_read_open 3 , .Xr archive_read_set_options 3 , .Xr archive_util 3 , +.Xr libarchive 3 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_read_disk.3 b/archivers/libarchive/files/libarchive/archive_read_disk.3 index 027f63cb630..82d6a5c8562 100644 --- a/archivers/libarchive/files/libarchive/archive_read_disk.3 +++ b/archivers/libarchive/files/libarchive/archive_read_disk.3 @@ -99,9 +99,10 @@ following values: .Bl -tag -compact -width "indent" .It Cm ARCHIVE_READDISK_HONOR_NODUMP Skip files and directories with the nodump file attribute (file flag) set. -By default, the nodump file atrribute is ignored. +By default, the nodump file attribute is ignored. .It Cm ARCHIVE_READDISK_MAC_COPYFILE -Mac OS X specific. Read metadata (ACLs and extended attributes) with +Mac OS X specific. +Read metadata (ACLs and extended attributes) with .Xr copyfile 3 . By default, metadata is read using .Xr copyfile 3 . @@ -120,7 +121,7 @@ or for more information on file attributes. .It Cm ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS Do not traverse mount points. -By defaut, moint points are traversed. +By default, mount points are traversed. .It Cm ARCHIVE_READDISK_NO_XATTR Do not read extended file attributes (xattrs). By default, extended file attributes are read from disk. @@ -216,7 +217,7 @@ of some other operation. (For example, directory traversal libraries often provide this information.) .Pp Where necessary, user and group ids are converted to user and group names -using the currently registered lookup functions above. +using the currently-registered lookup functions above. This affects the file ownership fields and ACL values in the .Tn struct archive_entry object. @@ -226,7 +227,7 @@ More information about the object and the overall design of the library can be found in the .Xr libarchive 3 overview. -.Sh EXAMPLE +.Sh EXAMPLES The following illustrates basic usage of the library by showing how to use it to copy an item on disk into an archive. .Bd -literal -offset indent @@ -291,11 +292,11 @@ and functions. .\" .Sh SEE ALSO +.Xr tar 1 , .Xr archive_read 3 , .Xr archive_util 3 , .Xr archive_write 3 , .Xr archive_write_disk 3 , -.Xr tar 1 , .Xr libarchive 3 .Sh HISTORY The 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 45417e9ac76..2a8cec8d117 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 @@ -249,11 +249,11 @@ archive_read_disk_entry_from_file(struct archive *_a, #if defined(HAVE_READLINK) || defined(HAVE_READLINKAT) if (S_ISLNK(st->st_mode)) { - size_t linkbuffer_len = st->st_size + 1; + size_t linkbuffer_len = st->st_size; char *linkbuffer; int lnklen; - linkbuffer = malloc(linkbuffer_len); + linkbuffer = malloc(linkbuffer_len + 1); if (linkbuffer == NULL) { archive_set_error(&a->archive, ENOMEM, "Couldn't read link data"); @@ -280,7 +280,7 @@ archive_read_disk_entry_from_file(struct archive *_a, free(linkbuffer); return (ARCHIVE_FAILED); } - linkbuffer[lnklen] = 0; + linkbuffer[lnklen] = '\0'; archive_entry_set_symlink(entry, linkbuffer); free(linkbuffer); } diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_posix.c b/archivers/libarchive/files/libarchive/archive_read_disk_posix.c index c4df6c9436b..2898206951d 100644 --- a/archivers/libarchive/files/libarchive/archive_read_disk_posix.c +++ b/archivers/libarchive/files/libarchive/archive_read_disk_posix.c @@ -694,6 +694,7 @@ _archive_read_data_block(struct archive *_a, const void **buff, struct tree *t = a->tree; int r; ssize_t bytes; + int64_t sparse_bytes; size_t buffbytes; int empty_sparse_region = 0; @@ -728,27 +729,23 @@ _archive_read_data_block(struct archive *_a, const void **buff, if ((t->flags & needsRestoreTimes) != 0 && t->restore_time.noatime == 0) flags |= O_NOATIME; - do { #endif - t->entry_fd = open_on_current_dir(t, - tree_current_access_path(t), flags); - __archive_ensure_cloexec_flag(t->entry_fd); + t->entry_fd = open_on_current_dir(t, + tree_current_access_path(t), flags); + __archive_ensure_cloexec_flag(t->entry_fd); #if defined(O_NOATIME) - /* - * When we did open the file with O_NOATIME flag, - * if successful, set 1 to t->restore_time.noatime - * not to restore an atime of the file later. - * if failed by EPERM, retry it without O_NOATIME flag. - */ - if (flags & O_NOATIME) { - if (t->entry_fd >= 0) - t->restore_time.noatime = 1; - else if (errno == EPERM) { - flags &= ~O_NOATIME; - continue; - } - } - } while (0); + /* + * When we did open the file with O_NOATIME flag, + * if successful, set 1 to t->restore_time.noatime + * not to restore an atime of the file later. + * if failed by EPERM, retry it without O_NOATIME flag. + */ + if (flags & O_NOATIME) { + if (t->entry_fd >= 0) + t->restore_time.noatime = 1; + else if (errno == EPERM) + flags &= ~O_NOATIME; + } #endif if (t->entry_fd < 0) { archive_set_error(&a->archive, errno, @@ -792,9 +789,9 @@ _archive_read_data_block(struct archive *_a, const void **buff, a->archive.state = ARCHIVE_STATE_FATAL; goto abort_read_data; } - bytes = t->current_sparse->offset - t->entry_total; - t->entry_remaining_bytes -= bytes; - t->entry_total += bytes; + sparse_bytes = t->current_sparse->offset - t->entry_total; + t->entry_remaining_bytes -= sparse_bytes; + t->entry_total += sparse_bytes; } /* @@ -1109,8 +1106,7 @@ next_entry(struct archive_read_disk *a, struct tree *t, "%s", delayed_str.s); } } - if (!archive_string_empty(&delayed_str)) - archive_string_free(&delayed_str); + archive_string_free(&delayed_str); return (r); } @@ -1143,6 +1139,8 @@ _archive_read_next_header2(struct archive *_a, struct archive_entry *entry) t->entry_fd = -1; } + archive_entry_clear(entry); + for (;;) { r = next_entry(a, t, entry); if (t->entry_fd >= 0) { @@ -1660,7 +1658,7 @@ static int setup_current_filesystem(struct archive_read_disk *a) { struct tree *t = a->tree; - struct statvfs sfs; + struct statvfs svfs; int r, xr = 0; t->current_filesystem->synthetic = -1; @@ -1669,16 +1667,16 @@ setup_current_filesystem(struct archive_read_disk *a) return (ARCHIVE_FAILED); } if (tree_current_is_symblic_link_target(t)) { - r = statvfs(tree_current_access_path(t), &sfs); + r = statvfs(tree_current_access_path(t), &svfs); if (r == 0) xr = get_xfer_size(t, -1, tree_current_access_path(t)); } else { #ifdef HAVE_FSTATVFS - r = fstatvfs(tree_current_dir_fd(t), &sfs); + r = fstatvfs(tree_current_dir_fd(t), &svfs); if (r == 0) xr = get_xfer_size(t, tree_current_dir_fd(t), NULL); #else - r = statvfs(".", &sfs); + r = statvfs(".", &svfs); if (r == 0) xr = get_xfer_size(t, -1, "."); #endif @@ -1690,30 +1688,30 @@ setup_current_filesystem(struct archive_read_disk *a) } else if (xr == 1) { /* Usually come here unless NetBSD supports _PC_REC_XFER_ALIGN * for pathconf() function. */ - t->current_filesystem->xfer_align = sfs.f_frsize; + t->current_filesystem->xfer_align = svfs.f_frsize; t->current_filesystem->max_xfer_size = -1; #if defined(HAVE_STRUCT_STATVFS_F_IOSIZE) - t->current_filesystem->min_xfer_size = sfs.f_iosize; - t->current_filesystem->incr_xfer_size = sfs.f_iosize; + t->current_filesystem->min_xfer_size = svfs.f_iosize; + t->current_filesystem->incr_xfer_size = svfs.f_iosize; #else - t->current_filesystem->min_xfer_size = sfs.f_bsize; - t->current_filesystem->incr_xfer_size = sfs.f_bsize; + t->current_filesystem->min_xfer_size = svfs.f_bsize; + t->current_filesystem->incr_xfer_size = svfs.f_bsize; #endif } - if (sfs.f_flag & ST_LOCAL) + if (svfs.f_flag & ST_LOCAL) t->current_filesystem->remote = 0; else t->current_filesystem->remote = 1; #if defined(ST_NOATIME) - if (sfs.f_flag & ST_NOATIME) + if (svfs.f_flag & ST_NOATIME) t->current_filesystem->noatime = 1; else #endif t->current_filesystem->noatime = 0; /* Set maximum filename length. */ - t->current_filesystem->name_max = sfs.f_namemax; + t->current_filesystem->name_max = svfs.f_namemax; return (ARCHIVE_OK); } @@ -1842,7 +1840,7 @@ setup_current_filesystem(struct archive_read_disk *a) #if defined(HAVE_STATVFS) if (svfs.f_flag & ST_NOATIME) #else - if (sfs.f_flag & ST_NOATIME) + if (sfs.f_flags & ST_NOATIME) #endif t->current_filesystem->noatime = 1; else @@ -1866,7 +1864,7 @@ static int setup_current_filesystem(struct archive_read_disk *a) { struct tree *t = a->tree; - struct statvfs sfs; + struct statvfs svfs; int r, xr = 0; t->current_filesystem->synthetic = -1;/* Not supported */ @@ -1885,7 +1883,7 @@ setup_current_filesystem(struct archive_read_disk *a) "openat failed"); return (ARCHIVE_FAILED); } - r = fstatvfs(fd, &sfs); + r = fstatvfs(fd, &svfs); if (r == 0) xr = get_xfer_size(t, fd, NULL); close(fd); @@ -1894,13 +1892,13 @@ setup_current_filesystem(struct archive_read_disk *a) archive_set_error(&a->archive, errno, "fchdir failed"); return (ARCHIVE_FAILED); } - r = statvfs(tree_current_access_path(t), &sfs); + r = statvfs(tree_current_access_path(t), &svfs); if (r == 0) xr = get_xfer_size(t, -1, tree_current_access_path(t)); #endif } else { #ifdef HAVE_FSTATVFS - r = fstatvfs(tree_current_dir_fd(t), &sfs); + r = fstatvfs(tree_current_dir_fd(t), &svfs); if (r == 0) xr = get_xfer_size(t, tree_current_dir_fd(t), NULL); #else @@ -1908,7 +1906,7 @@ setup_current_filesystem(struct archive_read_disk *a) archive_set_error(&a->archive, errno, "fchdir failed"); return (ARCHIVE_FAILED); } - r = statvfs(".", &sfs); + r = statvfs(".", &svfs); if (r == 0) xr = get_xfer_size(t, -1, "."); #endif @@ -1920,14 +1918,14 @@ setup_current_filesystem(struct archive_read_disk *a) return (ARCHIVE_FAILED); } else if (xr == 1) { /* pathconf(_PC_REX_*) operations are not supported. */ - t->current_filesystem->xfer_align = sfs.f_frsize; + t->current_filesystem->xfer_align = svfs.f_frsize; t->current_filesystem->max_xfer_size = -1; - t->current_filesystem->min_xfer_size = sfs.f_bsize; - t->current_filesystem->incr_xfer_size = sfs.f_bsize; + t->current_filesystem->min_xfer_size = svfs.f_bsize; + t->current_filesystem->incr_xfer_size = svfs.f_bsize; } #if defined(ST_NOATIME) - if (sfs.f_flag & ST_NOATIME) + if (svfs.f_flag & ST_NOATIME) t->current_filesystem->noatime = 1; else #endif @@ -1935,7 +1933,7 @@ setup_current_filesystem(struct archive_read_disk *a) #if defined(USE_READDIR_R) /* Set maximum filename length. */ - t->current_filesystem->name_max = sfs.f_namemax; + t->current_filesystem->name_max = svfs.f_namemax; #endif return (ARCHIVE_OK); } @@ -2170,7 +2168,7 @@ tree_reopen(struct tree *t, const char *path, int restore_time) #elif defined(O_SEARCH) /* SunOS */ const int o_flag = O_SEARCH; -#elif defined(O_EXEC) +#elif defined(__FreeBSD__) && defined(O_EXEC) /* FreeBSD */ const int o_flag = O_EXEC; #endif @@ -2196,7 +2194,8 @@ tree_reopen(struct tree *t, const char *path, int restore_time) t->stack->flags = needsFirstVisit; t->maxOpenCount = t->openCount = 1; t->initial_dir_fd = open(".", O_RDONLY | O_CLOEXEC); -#if defined(O_PATH) || defined(O_SEARCH) || defined(O_EXEC) +#if defined(O_PATH) || defined(O_SEARCH) || \ + (defined(__FreeBSD__) && defined(O_EXEC)) /* * Most likely reason to fail opening "." is that it's not readable, * so try again for execute. The consequences of not opening this are diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_private.h b/archivers/libarchive/files/libarchive/archive_read_disk_private.h index f03a0a9cc30..bc8abc15d15 100644 --- a/archivers/libarchive/files/libarchive/archive_read_disk_private.h +++ b/archivers/libarchive/files/libarchive/archive_read_disk_private.h @@ -26,13 +26,13 @@ * $FreeBSD: head/lib/libarchive/archive_read_disk_private.h 201105 2009-12-28 03:20:54Z kientzle $ */ +#ifndef ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED +#define ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED -#define ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED - #include "archive_platform_acl.h" struct tree; diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_windows.c b/archivers/libarchive/files/libarchive/archive_read_disk_windows.c index 4a5421f8f30..fdd376f9b94 100644 --- a/archivers/libarchive/files/libarchive/archive_read_disk_windows.c +++ b/archivers/libarchive/files/libarchive/archive_read_disk_windows.c @@ -1126,6 +1126,8 @@ _archive_read_next_header2(struct archive *_a, struct archive_entry *entry) t->entry_fh = INVALID_HANDLE_VALUE; } + archive_entry_clear(entry); + while ((r = next_entry(a, t, entry)) == ARCHIVE_RETRY) archive_entry_clear(entry); diff --git a/archivers/libarchive/files/libarchive/archive_read_extract.3 b/archivers/libarchive/files/libarchive/archive_read_extract.3 index 6ec0ced939b..858f3974255 100644 --- a/archivers/libarchive/files/libarchive/archive_read_extract.3 +++ b/archivers/libarchive/files/libarchive/archive_read_extract.3 @@ -126,7 +126,6 @@ and functions. .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_read 3 , .Xr archive_read_data 3 , .Xr archive_read_filter 3 , @@ -134,4 +133,5 @@ functions. .Xr archive_read_open 3 , .Xr archive_read_set_options 3 , .Xr archive_util 3 , +.Xr libarchive 3 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_read_filter.3 b/archivers/libarchive/files/libarchive/archive_read_filter.3 index ef0a7017533..1ba5fcbd6ef 100644 --- a/archivers/libarchive/files/libarchive/archive_read_filter.3 +++ b/archivers/libarchive/files/libarchive/archive_read_filter.3 @@ -147,8 +147,8 @@ and functions. .\" .Sh SEE ALSO -.Xr libarchive 3 , .Xr archive_read 3 , .Xr archive_read_data 3 , .Xr archive_read_format 3 , -.Xr archive_read_format 3 +.Xr archive_read_format 3 , +.Xr libarchive 3 diff --git a/archivers/libarchive/files/libarchive/archive_read_format.3 b/archivers/libarchive/files/libarchive/archive_read_format.3 index 91c5d2cfd4b..f3804ce3796 100644 --- a/archivers/libarchive/files/libarchive/archive_read_format.3 +++ b/archivers/libarchive/files/libarchive/archive_read_format.3 @@ -102,7 +102,7 @@ For example, .Fn archive_read_support_format_tar enables support for a variety of standard tar formats, old-style tar, ustar, pax interchange format, and many common variants. -.It Fn archive_read_support_format_all +.It Fn archive_read_support_format_all Enables support for all available formats except the .Dq raw format (see below). @@ -125,7 +125,7 @@ it is not possible to accurately determine a format for an empty file based purely on contents. So empty files are treated by libarchive as a distinct format. -.It Fn archive_read_support_format_raw +.It Fn archive_read_support_format_raw The .Dq raw format handler allows libarchive to be used to read arbitrary data. @@ -153,11 +153,11 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_read_data 3 , .Xr archive_read_filter 3 , .Xr archive_read_set_options 3 , .Xr archive_util 3 , +.Xr libarchive 3 , .Xr tar 5 .Sh BUGS Many traditional archiver programs treat diff --git a/archivers/libarchive/files/libarchive/archive_read_free.3 b/archivers/libarchive/files/libarchive/archive_read_free.3 index 5b218225ba0..8371c3a0c60 100644 --- a/archivers/libarchive/files/libarchive/archive_read_free.3 +++ b/archivers/libarchive/files/libarchive/archive_read_free.3 @@ -83,11 +83,11 @@ and functions. .\" .Sh SEE ALSO -.Xr libarchive 3 , -.Xr archive_read_new 3 , .Xr archive_read_data 3 , .Xr archive_read_filter 3 , .Xr archive_read_format 3 , +.Xr archive_read_new 3 , .Xr archive_read_open 3 , .Xr archive_read_set_options 3 , -.Xr archive_util 3 +.Xr archive_util 3 , +.Xr libarchive 3 diff --git a/archivers/libarchive/files/libarchive/archive_read_header.3 b/archivers/libarchive/files/libarchive/archive_read_header.3 index 480a666ca39..1e97f3a2750 100644 --- a/archivers/libarchive/files/libarchive/archive_read_header.3 +++ b/archivers/libarchive/files/libarchive/archive_read_header.3 @@ -79,7 +79,6 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_read 3 , .Xr archive_read_data 3 , .Xr archive_read_extract 3 , @@ -88,4 +87,5 @@ functions. .Xr archive_read_open 3 , .Xr archive_read_set_options 3 , .Xr archive_util 3 , +.Xr libarchive 3 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_read_new.3 b/archivers/libarchive/files/libarchive/archive_read_new.3 index 0c9d1a7fbb2..8bb6b848b06 100644 --- a/archivers/libarchive/files/libarchive/archive_read_new.3 +++ b/archivers/libarchive/files/libarchive/archive_read_new.3 @@ -50,10 +50,10 @@ object can be found in the overview manual page for .\" .Sh ERRORS .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_read_data 3 , .Xr archive_read_filter 3 , .Xr archive_read_format 3 , .Xr archive_read_set_options 3 , .Xr archive_util 3 , +.Xr libarchive 3 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_read_open.3 b/archivers/libarchive/files/libarchive/archive_read_open.3 index 2278ebc330c..f67677823bd 100644 --- a/archivers/libarchive/files/libarchive/archive_read_open.3 +++ b/archivers/libarchive/files/libarchive/archive_read_open.3 @@ -205,7 +205,7 @@ On failure, the callback should invoke .Fn archive_set_error to register an error code and message and return -.Cm ARCHIVE_FATAL. +.Cm ARCHIVE_FATAL . .\" .Sh EXAMPLE .\" .Sh RETURN VALUES @@ -223,11 +223,11 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_read 3 , .Xr archive_read_data 3 , .Xr archive_read_filter 3 , .Xr archive_read_format 3 , .Xr archive_read_set_options 3 , .Xr archive_util 3 , +.Xr libarchive 3 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_read_open_filename.c b/archivers/libarchive/files/libarchive/archive_read_open_filename.c index 86635e21928..561289b694b 100644 --- a/archivers/libarchive/files/libarchive/archive_read_open_filename.c +++ b/archivers/libarchive/files/libarchive/archive_read_open_filename.c @@ -221,7 +221,9 @@ file_open(struct archive *a, void *client_data) struct read_file_data *mine = (struct read_file_data *)client_data; void *buffer; const char *filename = NULL; +#if defined(_WIN32) && !defined(__CYGWIN__) const wchar_t *wfilename = NULL; +#endif int fd = -1; int is_disk_like = 0; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -281,10 +283,12 @@ file_open(struct archive *a, void *client_data) #endif } if (fstat(fd, &st) != 0) { +#if defined(_WIN32) && !defined(__CYGWIN__) if (mine->filename_type == FNT_WCS) archive_set_error(a, errno, "Can't stat '%S'", wfilename); else +#endif archive_set_error(a, errno, "Can't stat '%s'", filename); goto fail; diff --git a/archivers/libarchive/files/libarchive/archive_read_private.h b/archivers/libarchive/files/libarchive/archive_read_private.h index bf04f641043..c842e6f09ad 100644 --- a/archivers/libarchive/files/libarchive/archive_read_private.h +++ b/archivers/libarchive/files/libarchive/archive_read_private.h @@ -25,15 +25,15 @@ * $FreeBSD: head/lib/libarchive/archive_read_private.h 201088 2009-12-28 02:18:55Z kientzle $ */ +#ifndef ARCHIVE_READ_PRIVATE_H_INCLUDED +#define ARCHIVE_READ_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #ifndef __LIBARCHIVE_TEST #error This header is only to be used internally to libarchive. #endif #endif -#ifndef ARCHIVE_READ_PRIVATE_H_INCLUDED -#define ARCHIVE_READ_PRIVATE_H_INCLUDED - #include "archive.h" #include "archive_string.h" #include "archive_private.h" diff --git a/archivers/libarchive/files/libarchive/archive_read_set_options.3 b/archivers/libarchive/files/libarchive/archive_read_set_options.3 index 1a251cefecd..78d99999cf8 100644 --- a/archivers/libarchive/files/libarchive/archive_read_set_options.3 +++ b/archivers/libarchive/files/libarchive/archive_read_set_options.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 2, 2012 +.Dd January 31, 2020 .Dt ARCHIVE_READ_OPTIONS 3 .Os .Sh NAME @@ -180,6 +180,18 @@ only to modules whose name matches .\" .Sh OPTIONS .Bl -tag -compact -width indent +.It Format cab +.Bl -tag -compact -width indent +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file names. +.El +.It Format cpio +.Bl -tag -compact -width indent +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file names. +.El .It Format iso9660 .Bl -tag -compact -width indent .It Cm joliet @@ -193,6 +205,24 @@ Defaults to enabled, use .Cm !rockridge to disable. .El +.It Format lha +.Bl -tag -compact -width indent +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file names. +.El +.It Format mtree +.Bl -tag -compact -width indent +.It Cm checkfs +Allow reading information missing from the mtree from the file system. +Disabled by default. +.El +.It Format rar +.Bl -tag -compact -width indent +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file names. +.El .It Format tar .Bl -tag -compact -width indent .It Cm compat-2x @@ -202,7 +232,7 @@ This option mimics the libarchive 2.x filename handling so that such archives can be read correctly. .It Cm hdrcharset The value is used as a character set name that will be -used when translating filenames. +used when translating file names. .It Cm mac-ext Support Mac OS metadata extension that records data in special files beginning with a period and underscore. @@ -212,7 +242,8 @@ Use to disable. .It Cm read_concatenated_archives Ignore zeroed blocks in the archive, which occurs when multiple tar archives -have been concatenated together. Without this option, only the contents of +have been concatenated together. +Without this option, only the contents of the first concatenated archive would be read. .El .El @@ -226,6 +257,6 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , +.Xr archive_read 3 , .Xr archive_write_set_options 3 , -.Xr archive_read 3 +.Xr libarchive 3 diff --git a/archivers/libarchive/files/libarchive/archive_read_support_filter_lz4.c b/archivers/libarchive/files/libarchive/archive_read_support_filter_lz4.c index 147f5027ff4..43ee6c2b726 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_filter_lz4.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_filter_lz4.c @@ -460,7 +460,7 @@ lz4_filter_read_descriptor(struct archive_read_filter *self) __archive_read_filter_consume(self->upstream, descriptor_bytes); - /* Make sure we have an enough buffer for uncompressed data. */ + /* Make sure we have a large enough buffer for uncompressed data. */ if (lz4_allocate_out_block(self) != ARCHIVE_OK) return (ARCHIVE_FATAL); if (state->flags.stream_checksum) @@ -520,7 +520,7 @@ lz4_filter_read_data_block(struct archive_read_filter *self, const void **p) if (read_buf == NULL) goto truncated_error; - /* Optional process, checking a block sum. */ + /* Optional processing, checking a block sum. */ if (checksum_size) { unsigned int chsum = __archive_xxhash.XXH32( read_buf + 4, (int)compressed_size, 0); @@ -640,7 +640,7 @@ lz4_filter_read_default_stream(struct archive_read_filter *self, const void **p) if (ret == 0 && *p == NULL) state->stage = SELECT_STREAM; - /* Optional process, checking a stream sum. */ + /* Optional processing, checking a stream sum. */ if (state->flags.stream_checksum) { if (state->stage == SELECT_STREAM) { unsigned int checksum; @@ -660,7 +660,7 @@ lz4_filter_read_default_stream(struct archive_read_filter *self, const void **p) if (checksum != checksum_stream) { archive_set_error(&self->archive->archive, ARCHIVE_ERRNO_MISC, - "lz4 stream cheksum error"); + "lz4 stream checksum error"); return (ARCHIVE_FATAL); } } else if (ret > 0) @@ -674,7 +674,7 @@ static ssize_t lz4_filter_read_legacy_stream(struct archive_read_filter *self, const void **p) { struct private_data *state = (struct private_data *)self->data; - int compressed; + uint32_t compressed; const char *read_buf; ssize_t ret; diff --git a/archivers/libarchive/files/libarchive/archive_read_support_filter_program.c b/archivers/libarchive/files/libarchive/archive_read_support_filter_program.c index b8bf12886f3..bf5b6f2b3c8 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_filter_program.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_filter_program.c @@ -400,7 +400,7 @@ __archive_read_program(struct archive_read_filter *self, const char *cmd) static const size_t out_buf_len = 65536; char *out_buf; const char *prefix = "Program: "; - pid_t child; + int ret; size_t l; l = strlen(prefix) + strlen(cmd) + 1; @@ -426,9 +426,9 @@ __archive_read_program(struct archive_read_filter *self, const char *cmd) state->out_buf = out_buf; state->out_buf_len = out_buf_len; - child = __archive_create_child(cmd, &state->child_stdin, - &state->child_stdout); - if (child == -1) { + ret = __archive_create_child(cmd, &state->child_stdin, + &state->child_stdout, &state->child); + if (ret != ARCHIVE_OK) { free(state->out_buf); archive_string_free(&state->description); free(state); @@ -437,21 +437,6 @@ __archive_read_program(struct archive_read_filter *self, const char *cmd) cmd); return (ARCHIVE_FATAL); } -#if defined(_WIN32) && !defined(__CYGWIN__) - state->child = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, child); - if (state->child == NULL) { - child_stop(self, state); - free(state->out_buf); - archive_string_free(&state->description); - free(state); - archive_set_error(&self->archive->archive, EINVAL, - "Can't initialize filter; unable to run program \"%s\"", - cmd); - return (ARCHIVE_FATAL); - } -#else - state->child = child; -#endif self->data = state; self->read = program_filter_read; diff --git a/archivers/libarchive/files/libarchive/archive_read_support_filter_uu.c b/archivers/libarchive/files/libarchive/archive_read_support_filter_uu.c index 641297990d2..67ddffb0694 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_filter_uu.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_filter_uu.c @@ -574,14 +574,13 @@ read_more: while (l > 0) { int n = 0; - if (l > 0) { - if (!uuchar[b[0]] || !uuchar[b[1]]) - break; - n = UUDECODE(*b++) << 18; - n |= UUDECODE(*b++) << 12; - *out++ = n >> 16; total++; - --l; - } + if (!uuchar[b[0]] || !uuchar[b[1]]) + break; + n = UUDECODE(*b++) << 18; + n |= UUDECODE(*b++) << 12; + *out++ = n >> 16; total++; + --l; + if (l > 0) { if (!uuchar[b[0]]) break; @@ -626,14 +625,13 @@ read_more: while (l > 0) { int n = 0; - if (l > 0) { - if (!base64[b[0]] || !base64[b[1]]) - break; - n = base64num[*b++] << 18; - n |= base64num[*b++] << 12; - *out++ = n >> 16; total++; - l -= 2; - } + if (!base64[b[0]] || !base64[b[1]]) + break; + n = base64num[*b++] << 18; + n |= base64num[*b++] << 12; + *out++ = n >> 16; total++; + l -= 2; + if (l > 0) { if (*b == '=') break; diff --git a/archivers/libarchive/files/libarchive/archive_read_support_filter_zstd.c b/archivers/libarchive/files/libarchive/archive_read_support_filter_zstd.c index c8bb36be703..af7eeb7c1e2 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_filter_zstd.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_filter_zstd.c @@ -119,6 +119,8 @@ zstd_bidder_bid(struct archive_read_filter_bidder *self, /* Zstd frame magic values */ const unsigned zstd_magic = 0xFD2FB528U; + const unsigned zstd_magic_skippable_start = 0x184D2A50U; + const unsigned zstd_magic_skippable_mask = 0xFFFFFFF0; (void) self; /* UNUSED */ @@ -129,6 +131,8 @@ zstd_bidder_bid(struct archive_read_filter_bidder *self, prefix = archive_le32dec(buffer); if (prefix == zstd_magic) return (32); + if ((prefix & zstd_magic_skippable_mask) == zstd_magic_skippable_start) + return (32); return (0); } 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 8ca422ec066..6ce9d1a0e1b 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c @@ -1086,10 +1086,17 @@ init_decompression(struct archive_read *a, struct _7zip *zip, zip->bcj_state = 0; break; case _7Z_DELTA: + if (coder2->propertiesSize != 1) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Delta parameter"); + return (ARCHIVE_FAILED); + } filters[fi].id = LZMA_FILTER_DELTA; memset(&delta_opt, 0, sizeof(delta_opt)); delta_opt.type = LZMA_DELTA_TYPE_BYTE; - delta_opt.dist = 1; + delta_opt.dist = + (uint32_t)coder2->properties[0] + 1; filters[fi].options = &delta_opt; fi++; break; @@ -1787,7 +1794,7 @@ read_PackInfo(struct archive_read *a, struct _7z_pack_info *pi) return (0); } - if (*p != kSize) + if (*p != kCRC) return (-1); if (read_Digests(a, &(pi->digest), (size_t)pi->numPackStreams) < 0) 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 95c99bb1f31..bff0f01f41c 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c @@ -175,7 +175,9 @@ struct lha { struct archive_string gname; uint16_t header_crc; uint16_t crc; - struct archive_string_conv *sconv; + /* dirname and filename could be in different codepages */ + struct archive_string_conv *sconv_dir; + struct archive_string_conv *sconv_fname; struct archive_string_conv *opt_sconv; struct archive_string dirname; @@ -232,8 +234,8 @@ static time_t lha_dos_time(const unsigned char *); static time_t lha_win_time(uint64_t, long *); static unsigned char lha_calcsum(unsigned char, const void *, int, size_t); -static int lha_parse_linkname(struct archive_string *, - struct archive_string *); +static int lha_parse_linkname(struct archive_wstring *, + struct archive_wstring *); static int lha_read_data_none(struct archive_read *, const void **, size_t *, int64_t *); static int lha_read_data_lzh(struct archive_read *, const void **, @@ -473,13 +475,15 @@ static int archive_read_format_lha_read_header(struct archive_read *a, struct archive_entry *entry) { - struct archive_string linkname; - struct archive_string pathname; + struct archive_wstring linkname; + struct archive_wstring pathname; struct lha *lha; const unsigned char *p; const char *signature; int err; - + struct archive_mstring conv_buffer; + const wchar_t *conv_buffer_p; + lha_crc16_init(); a->archive.archive_format = ARCHIVE_FORMAT_LHA; @@ -561,10 +565,13 @@ archive_read_format_lha_read_header(struct archive_read *a, archive_string_empty(&lha->dirname); archive_string_empty(&lha->filename); lha->dos_attr = 0; - if (lha->opt_sconv != NULL) - lha->sconv = lha->opt_sconv; - else - lha->sconv = NULL; + if (lha->opt_sconv != NULL) { + lha->sconv_dir = lha->opt_sconv; + lha->sconv_fname = lha->opt_sconv; + } else { + lha->sconv_dir = NULL; + lha->sconv_fname = NULL; + } switch (p[H_LEVEL_OFFSET]) { case 0: @@ -594,12 +601,54 @@ archive_read_format_lha_read_header(struct archive_read *a, return (truncated_error(a)); /* - * Make a pathname from a dirname and a filename. - */ - archive_string_concat(&lha->dirname, &lha->filename); + * Make a pathname from a dirname and a filename, after converting to Unicode. + * This is because codepages might differ between dirname and filename. + */ archive_string_init(&pathname); archive_string_init(&linkname); - archive_string_copy(&pathname, &lha->dirname); + archive_string_init(&conv_buffer.aes_mbs); + archive_string_init(&conv_buffer.aes_mbs_in_locale); + archive_string_init(&conv_buffer.aes_utf8); + archive_string_init(&conv_buffer.aes_wcs); + if (0 != archive_mstring_copy_mbs_len_l(&conv_buffer, lha->dirname.s, lha->dirname.length, lha->sconv_dir)) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Pathname cannot be converted " + "from %s to Unicode.", + archive_string_conversion_charset_name(lha->sconv_dir)); + err = ARCHIVE_FATAL; + } else if (0 != archive_mstring_get_wcs(&a->archive, &conv_buffer, &conv_buffer_p)) + err = ARCHIVE_FATAL; + if (err == ARCHIVE_FATAL) { + archive_mstring_clean(&conv_buffer); + archive_wstring_free(&pathname); + archive_wstring_free(&linkname); + return (err); + } + archive_wstring_copy(&pathname, &conv_buffer.aes_wcs); + + archive_string_empty(&conv_buffer.aes_mbs); + archive_string_empty(&conv_buffer.aes_mbs_in_locale); + archive_string_empty(&conv_buffer.aes_utf8); + archive_wstring_empty(&conv_buffer.aes_wcs); + if (0 != archive_mstring_copy_mbs_len_l(&conv_buffer, lha->filename.s, lha->filename.length, lha->sconv_fname)) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Pathname cannot be converted " + "from %s to Unicode.", + archive_string_conversion_charset_name(lha->sconv_fname)); + err = ARCHIVE_FATAL; + } + else if (0 != archive_mstring_get_wcs(&a->archive, &conv_buffer, &conv_buffer_p)) + err = ARCHIVE_FATAL; + if (err == ARCHIVE_FATAL) { + archive_mstring_clean(&conv_buffer); + archive_wstring_free(&pathname); + archive_wstring_free(&linkname); + return (err); + } + archive_wstring_concat(&pathname, &conv_buffer.aes_wcs); + archive_mstring_clean(&conv_buffer); if ((lha->mode & AE_IFMT) == AE_IFLNK) { /* @@ -610,8 +659,8 @@ archive_read_format_lha_read_header(struct archive_read *a, archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Unknown symlink-name"); - archive_string_free(&pathname); - archive_string_free(&linkname); + archive_wstring_free(&pathname); + archive_wstring_free(&linkname); return (ARCHIVE_FAILED); } } else { @@ -629,39 +678,13 @@ archive_read_format_lha_read_header(struct archive_read *a, /* * Set basic file parameters. */ - if (archive_entry_copy_pathname_l(entry, pathname.s, - pathname.length, lha->sconv) != 0) { - if (errno == ENOMEM) { - archive_set_error(&a->archive, ENOMEM, - "Can't allocate memory for Pathname"); - return (ARCHIVE_FATAL); - } - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "Pathname cannot be converted " - "from %s to current locale.", - archive_string_conversion_charset_name(lha->sconv)); - err = ARCHIVE_WARN; - } - archive_string_free(&pathname); + archive_entry_copy_pathname_w(entry, pathname.s); + archive_wstring_free(&pathname); if (archive_strlen(&linkname) > 0) { - if (archive_entry_copy_symlink_l(entry, linkname.s, - linkname.length, lha->sconv) != 0) { - if (errno == ENOMEM) { - archive_set_error(&a->archive, ENOMEM, - "Can't allocate memory for Linkname"); - return (ARCHIVE_FATAL); - } - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "Linkname cannot be converted " - "from %s to current locale.", - archive_string_conversion_charset_name(lha->sconv)); - err = ARCHIVE_WARN; - } + archive_entry_copy_symlink_w(entry, linkname.s); } else archive_entry_set_symlink(entry, NULL); - archive_string_free(&linkname); + archive_wstring_free(&linkname); /* * When a header level is 0, there is a possibility that * a pathname and a symlink has '\' character, a directory @@ -1208,6 +1231,27 @@ lha_read_file_extended_header(struct archive_read *a, struct lha *lha, archive_strncpy(&lha->filename, (const char *)extdheader, datasize); break; + case EXT_UTF16_FILENAME: + if (datasize == 0) { + /* maybe directory header */ + archive_string_empty(&lha->filename); + break; + } else if (datasize & 1) { + /* UTF-16 characters take always 2 or 4 bytes */ + goto invalid; + } + if (extdheader[0] == '\0') + goto invalid; + archive_string_empty(&lha->filename); + archive_array_append(&lha->filename, + (const char *)extdheader, datasize); + /* Setup a string conversion for a filename. */ + lha->sconv_fname = + archive_string_conversion_from_charset(&a->archive, + "UTF-16LE", 1); + if (lha->sconv_fname == NULL) + return (ARCHIVE_FATAL); + break; case EXT_DIRECTORY: if (datasize == 0 || extdheader[0] == '\0') /* no directory name data. exit this case. */ @@ -1228,6 +1272,50 @@ lha_read_file_extended_header(struct archive_read *a, struct lha *lha, /* invalid directory data */ goto invalid; break; + case EXT_UTF16_DIRECTORY: + /* UTF-16 characters take always 2 or 4 bytes */ + if (datasize == 0 || (datasize & 1) || + extdheader[0] == '\0') { + /* no directory name data. exit this case. */ + goto invalid; + } + + archive_string_empty(&lha->dirname); + archive_array_append(&lha->dirname, + (const char *)extdheader, datasize); + lha->sconv_dir = + archive_string_conversion_from_charset(&a->archive, + "UTF-16LE", 1); + if (lha->sconv_dir == NULL) + return (ARCHIVE_FATAL); + else { + /* + * Convert directory delimiter from 0xFFFF + * to '/' for local system. + */ + uint16_t dirSep; + uint16_t d = 1; + if (archive_be16dec(&d) == 1) + dirSep = 0x2F00; + else + dirSep = 0x002F; + + /* UTF-16LE character */ + uint16_t *utf16name = + (uint16_t *)lha->dirname.s; + for (i = 0; i < lha->dirname.length / 2; i++) { + if (utf16name[i] == 0xFFFF) { + utf16name[i] = dirSep; + } + } + /* Is last character directory separator? */ + if (utf16name[lha->dirname.length / 2 - 1] != + dirSep) { + /* invalid directory data */ + goto invalid; + } + } + break; case EXT_DOS_ATTR: if (datasize == 2) lha->dos_attr = (unsigned char) @@ -1276,11 +1364,16 @@ lha_read_file_extended_header(struct archive_read *a, struct lha *lha, charset = cp.s; break; } - lha->sconv = + lha->sconv_dir = + archive_string_conversion_from_charset( + &(a->archive), charset, 1); + lha->sconv_fname = archive_string_conversion_from_charset( &(a->archive), charset, 1); archive_string_free(&cp); - if (lha->sconv == NULL) + if (lha->sconv_dir == NULL) + return (ARCHIVE_FATAL); + if (lha->sconv_fname == NULL) return (ARCHIVE_FATAL); } break; @@ -1336,8 +1429,7 @@ lha_read_file_extended_header(struct archive_read *a, struct lha *lha, } break; case EXT_TIMEZONE: /* Not supported */ - case EXT_UTF16_FILENAME: /* Not supported */ - case EXT_UTF16_DIRECTORY: /* Not supported */ + break; default: break; } @@ -1600,19 +1692,19 @@ archive_read_format_lha_cleanup(struct archive_read *a) * then a archived pathname is 'xxx/bbb|aaa/bb/cc' */ static int -lha_parse_linkname(struct archive_string *linkname, - struct archive_string *pathname) +lha_parse_linkname(struct archive_wstring *linkname, + struct archive_wstring *pathname) { - char * linkptr; + wchar_t * linkptr; size_t symlen; - linkptr = strchr(pathname->s, '|'); + linkptr = wcschr(pathname->s, L'|'); if (linkptr != NULL) { - symlen = strlen(linkptr + 1); - archive_strncpy(linkname, linkptr+1, symlen); + symlen = wcslen(linkptr + 1); + archive_wstrncpy(linkname, linkptr+1, symlen); *linkptr = 0; - pathname->length = strlen(pathname->s); + pathname->length = wcslen(pathname->s); return (1); } 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 a7331a2672c..332944ac51b 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c @@ -258,6 +258,7 @@ archive_read_support_format_mtree(struct archive *_a) "Can't allocate mtree data"); return (ARCHIVE_FATAL); } + mtree->checkfs = 0; mtree->fd = -1; __archive_rb_tree_init(&mtree->rbtree, &rb_ops); 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 49360876c2a..98efbb1a6c4 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c @@ -148,6 +148,9 @@ #define FILE_ATTRIBUTE_DIRECTORY 0x10 #endif +#undef minimum +#define minimum(a, b) ((a)<(b)?(a):(b)) + /* Fields common to all headers */ struct rar_header { @@ -1027,6 +1030,7 @@ archive_read_format_rar_read_data(struct archive_read *a, const void **buff, if (ret != ARCHIVE_OK && ret != ARCHIVE_WARN) { __archive_ppmd7_functions.Ppmd7_Free(&rar->ppmd7_context); rar->start_new_table = 1; + rar->ppmd_valid = 0; } break; @@ -1721,6 +1725,13 @@ read_exttime(const char *p, struct rar *rar, const char *endp) struct tm *tm; time_t t; long nsec; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif if (p + 2 > endp) return (-1); @@ -1752,7 +1763,18 @@ read_exttime(const char *p, struct rar *rar, const char *endp) rem = (((unsigned)(unsigned char)*p) << 16) | (rem >> 8); p++; } +#if defined(HAVE_LOCALTIME_R) + tm = localtime_r(&t, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = t; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + tm = NULL; + else + tm = &tmbuf; +#else tm = localtime(&t); +#endif nsec = tm->tm_sec + rem / NS_UNIT; if (rmode & 4) { @@ -2451,8 +2473,11 @@ create_code(struct archive_read *a, struct huffman_code *code, if (add_value(a, code, j, codebits, i) != ARCHIVE_OK) return (ARCHIVE_FATAL); codebits++; - if (--symbolsleft <= 0) { break; break; } + if (--symbolsleft <= 0) + break; } + if (symbolsleft <= 0) + break; codebits <<= 1; } return (ARCHIVE_OK); @@ -2462,7 +2487,8 @@ static int add_value(struct archive_read *a, struct huffman_code *code, int value, int codebits, int length) { - int repeatpos, lastnode, bitpos, bit, repeatnode, nextnode; + int lastnode, bitpos, bit; + /* int repeatpos, repeatnode, nextnode; */ free(code->table); code->table = NULL; @@ -2472,6 +2498,9 @@ add_value(struct archive_read *a, struct huffman_code *code, int value, if(length < code->minlength) code->minlength = length; + /* + * Dead code, repeatpos was is -1 + * repeatpos = -1; if (repeatpos == 0 || (repeatpos >= 0 && (((codebits >> (repeatpos - 1)) & 3) == 0 @@ -2481,6 +2510,7 @@ add_value(struct archive_read *a, struct huffman_code *code, int value, "Invalid repeat position"); return (ARCHIVE_FATAL); } + */ lastnode = 0; for (bitpos = length - 1; bitpos >= 0; bitpos--) @@ -2496,9 +2526,12 @@ add_value(struct archive_read *a, struct huffman_code *code, int value, return (ARCHIVE_FATAL); } + /* + * Dead code, repeatpos was -1, bitpos >=0 + * if (bitpos == repeatpos) { - /* Open branch check */ + * Open branch check * if (!(code->tree[lastnode].branches[bit] < 0)) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, @@ -2517,16 +2550,17 @@ add_value(struct archive_read *a, struct huffman_code *code, int value, return (ARCHIVE_FATAL); } - /* Set branches */ + * Set branches * code->tree[lastnode].branches[bit] = repeatnode; code->tree[repeatnode].branches[bit] = repeatnode; code->tree[repeatnode].branches[bit^1] = nextnode; lastnode = nextnode; - bitpos++; /* terminating bit already handled, skip it */ + bitpos++; * terminating bit already handled, skip it * } else { + */ /* Open branch check */ if (code->tree[lastnode].branches[bit] < 0) { @@ -2540,7 +2574,7 @@ add_value(struct archive_read *a, struct huffman_code *code, int value, /* set to branch */ lastnode = code->tree[lastnode].branches[bit]; - } + /* } */ } if (!(code->tree[lastnode].branches[0] == -1 @@ -2624,11 +2658,15 @@ make_table_recurse(struct archive_read *a, struct huffman_code *code, int node, table[i].value = code->tree[node].branches[0]; } } + /* + * Dead code, node >= 0 + * else if (node < 0) { for(i = 0; i < currtablesize; i++) table[i].length = -1; } + */ else { if(depth == maxdepth) @@ -2660,6 +2698,10 @@ expand(struct archive_read *a, int64_t end) 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5 }; + static const int lengthb_min = minimum( + (int)(sizeof(lengthbases)/sizeof(lengthbases[0])), + (int)(sizeof(lengthbits)/sizeof(lengthbits[0])) + ); static const unsigned int offsetbases[] = { 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, @@ -2677,6 +2719,10 @@ expand(struct archive_read *a, int64_t end) 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18 }; + static const int offsetb_min = minimum( + (int)(sizeof(offsetbases)/sizeof(offsetbases[0])), + (int)(sizeof(offsetbits)/sizeof(offsetbits[0])) + ); static const unsigned char shortbases[] = { 0, 4, 8, 16, 32, 64, 128, 192 }; static const unsigned char shortbits[] = @@ -2756,9 +2802,7 @@ expand(struct archive_read *a, int64_t end) if ((lensymbol = read_next_symbol(a, &rar->lengthcode)) < 0) goto bad_data; - if (lensymbol > (int)(sizeof(lengthbases)/sizeof(lengthbases[0]))) - goto bad_data; - if (lensymbol > (int)(sizeof(lengthbits)/sizeof(lengthbits[0]))) + if (lensymbol > lengthb_min) goto bad_data; len = lengthbases[lensymbol] + 2; if (lengthbits[lensymbol] > 0) { @@ -2790,9 +2834,7 @@ expand(struct archive_read *a, int64_t end) } else { - if (symbol-271 > (int)(sizeof(lengthbases)/sizeof(lengthbases[0]))) - goto bad_data; - if (symbol-271 > (int)(sizeof(lengthbits)/sizeof(lengthbits[0]))) + if (symbol-271 > lengthb_min) goto bad_data; len = lengthbases[symbol-271]+3; if(lengthbits[symbol-271] > 0) { @@ -2804,9 +2846,7 @@ expand(struct archive_read *a, int64_t end) if ((offssymbol = read_next_symbol(a, &rar->offsetcode)) < 0) goto bad_data; - if (offssymbol > (int)(sizeof(offsetbases)/sizeof(offsetbases[0]))) - goto bad_data; - if (offssymbol > (int)(sizeof(offsetbits)/sizeof(offsetbits[0]))) + if (offssymbol > offsetb_min) goto bad_data; offs = offsetbases[offssymbol]+1; if(offsetbits[offssymbol] > 0) diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c b/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c index 7c24627b186..7a308a8d8a7 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c @@ -63,6 +63,7 @@ #if defined DEBUG #define DEBUG_CODE if(1) +#define LOG(...) do { printf("rar5: " __VA_ARGS__); puts(""); } while(0) #else #define DEBUG_CODE if(0) #endif @@ -72,15 +73,14 @@ * 0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x01, 0x00 * "Rar!→•☺·\x00" * - * It's stored in `rar5_signature` after XOR'ing it with 0xA1, because I don't + * Retrieved with `rar5_signature()` by XOR'ing it with 0xA1, because I don't * want to put this magic sequence in each binary that uses libarchive, so * applications that scan through the file for this marker won't trigger on * this "false" one. * * The array itself is decrypted in `rar5_init` function. */ -static unsigned char rar5_signature[] = { 243, 192, 211, 128, 187, 166, 160, 161 }; -static const ssize_t rar5_signature_size = sizeof(rar5_signature); +static unsigned char rar5_signature_xor[] = { 243, 192, 211, 128, 187, 166, 160, 161 }; static const size_t g_unpack_window_size = 0x20000; /* These could have been static const's, but they aren't, because of @@ -115,6 +115,8 @@ struct file_header { /* Optional redir fields */ uint64_t redir_type; uint64_t redir_flags; + + ssize_t solid_window_size; /* Used in file format check. */ }; enum EXTRA { @@ -208,7 +210,7 @@ struct comp_state { or just a part of it. */ uint8_t block_parsing_finished : 1; - int notused : 4; + signed int notused : 4; int flags; /* Uncompression flags. */ int method; /* Uncompression algorithm method. */ @@ -354,6 +356,7 @@ struct rar5 { /* Forward function declarations. */ +static void rar5_signature(char *buf); static int verify_global_checksums(struct archive_read* a); static int rar5_read_data_skip(struct archive_read *a); static int push_data_ready(struct archive_read* a, struct rar5* rar, @@ -381,7 +384,7 @@ static int cdeque_init(struct cdeque* d, int max_capacity_power_of_2) { d->cap_mask = max_capacity_power_of_2 - 1; d->arr = NULL; - if((max_capacity_power_of_2 & d->cap_mask) > 0) + if((max_capacity_power_of_2 & d->cap_mask) != 0) return CDE_PARAM; cdeque_clear(d); @@ -623,9 +626,9 @@ static int run_arm_filter(struct rar5* rar, struct filter_info* flt) { for(i = 0; i < flt->block_length - 3; i += 4) { uint8_t* b = &rar->cstate.window_buf[ (rar->cstate.solid_offset + - flt->block_start + i) & rar->cstate.window_mask]; + flt->block_start + i + 3) & rar->cstate.window_mask]; - if(b[3] == 0xEB) { + if(*b == 0xEB) { /* 0xEB = ARM's BL (branch + link) instruction. */ offset = read_filter_data(rar, (rar->cstate.solid_offset + flt->block_start + i) & @@ -878,10 +881,10 @@ static inline int get_archive_read(struct archive* a, static int read_ahead(struct archive_read* a, size_t how_many, const uint8_t** ptr) { + ssize_t avail = -1; if(!ptr) return 0; - ssize_t avail = -1; *ptr = __archive_read_ahead(a, how_many, &avail); if(*ptr == NULL) { return 0; @@ -1083,11 +1086,14 @@ static int read_u64(struct archive_read* a, uint64_t* pvalue) { static int bid_standard(struct archive_read* a) { const uint8_t* p; + char signature[sizeof(rar5_signature_xor)]; - if(!read_ahead(a, rar5_signature_size, &p)) + rar5_signature(signature); + + if(!read_ahead(a, sizeof(rar5_signature_xor), &p)) return -1; - if(!memcmp(rar5_signature, p, rar5_signature_size)) + if(!memcmp(signature, p, sizeof(rar5_signature_xor))) return 30; return -1; @@ -1125,6 +1131,13 @@ static void init_header(struct archive_read* a) { a->archive.archive_format_name = "RAR5"; } +static void init_window_mask(struct rar5* rar) { + if (rar->cstate.window_size) + rar->cstate.window_mask = rar->cstate.window_size - 1; + else + rar->cstate.window_mask = 0; +} + enum HEADER_FLAGS { HFL_EXTRA_DATA = 0x0001, HFL_DATA = 0x0002, @@ -1140,14 +1153,14 @@ static int process_main_locator_extra_block(struct archive_read* a, { uint64_t locator_flags; - if(!read_var(a, &locator_flags, NULL)) { - return ARCHIVE_EOF; - } - enum LOCATOR_FLAGS { QLIST = 0x01, RECOVERY = 0x02, }; + if(!read_var(a, &locator_flags, NULL)) { + return ARCHIVE_EOF; + } + if(locator_flags & QLIST) { if(!read_var(a, &rar->qlist_offset, NULL)) { return ARCHIVE_EOF; @@ -1170,9 +1183,13 @@ static int process_main_locator_extra_block(struct archive_read* a, static int parse_file_extra_hash(struct archive_read* a, struct rar5* rar, ssize_t* extra_data_size) { - size_t hash_type; + size_t hash_type = 0; size_t value_len; + enum HASH_TYPE { + BLAKE2sp = 0x00 + }; + if(!read_var_sized(a, &hash_type, &value_len)) return ARCHIVE_EOF; @@ -1181,10 +1198,6 @@ static int parse_file_extra_hash(struct archive_read* a, struct rar5* rar, return ARCHIVE_EOF; } - enum HASH_TYPE { - BLAKE2sp = 0x00 - }; - /* The file uses BLAKE2sp checksum algorithm instead of plain old * CRC32. */ if(hash_type == BLAKE2sp) { @@ -1247,6 +1260,7 @@ static int parse_file_extra_version(struct archive_read* a, size_t value_len = 0; struct archive_string version_string; struct archive_string name_utf8_string; + const char* cur_filename; /* Flags are ignored. */ if(!read_var_sized(a, &flags, &value_len)) @@ -1265,7 +1279,7 @@ static int parse_file_extra_version(struct archive_read* a, /* extra_data_size should be zero here. */ - const char* cur_filename = archive_entry_pathname_utf8(e); + cur_filename = archive_entry_pathname_utf8(e); if(cur_filename == NULL) { archive_set_error(&a->archive, ARCHIVE_ERRNO_PROGRAMMER, "Version entry without file name"); @@ -1296,7 +1310,7 @@ static int parse_file_extra_htime(struct archive_read* a, struct archive_entry* e, struct rar5* rar, ssize_t* extra_data_size) { char unix_time = 0; - size_t flags; + size_t flags = 0; size_t value_len; enum HTIME_FLAGS { @@ -1576,6 +1590,25 @@ static int process_head_file(struct archive_read* a, struct rar5* rar, char name_utf8_buf[MAX_NAME_IN_BYTES]; const uint8_t* p; + enum FILE_FLAGS { + DIRECTORY = 0x0001, UTIME = 0x0002, CRC32 = 0x0004, + UNKNOWN_UNPACKED_SIZE = 0x0008, + }; + + enum FILE_ATTRS { + ATTR_READONLY = 0x1, ATTR_HIDDEN = 0x2, ATTR_SYSTEM = 0x4, + ATTR_DIRECTORY = 0x10, + }; + + enum COMP_INFO_FLAGS { + SOLID = 0x0040, + }; + + enum HOST_OS { + HOST_WINDOWS = 0, + HOST_UNIX = 1, + }; + archive_entry_clear(entry); /* Do not reset file context if we're switching archives. */ @@ -1605,20 +1638,6 @@ static int process_head_file(struct archive_read* a, struct rar5* rar, return ARCHIVE_FATAL; } - enum FILE_FLAGS { - DIRECTORY = 0x0001, UTIME = 0x0002, CRC32 = 0x0004, - UNKNOWN_UNPACKED_SIZE = 0x0008, - }; - - enum FILE_ATTRS { - ATTR_READONLY = 0x1, ATTR_HIDDEN = 0x2, ATTR_SYSTEM = 0x4, - ATTR_DIRECTORY = 0x10, - }; - - enum COMP_INFO_FLAGS { - SOLID = 0x0040, - }; - if(!read_var_sized(a, &file_flags, NULL)) return ARCHIVE_EOF; @@ -1658,6 +1677,17 @@ static int process_head_file(struct archive_read* a, struct rar5* rar, g_unpack_window_size << ((compression_info >> 10) & 15); rar->cstate.method = c_method; rar->cstate.version = c_version + 50; + rar->file.solid = (compression_info & SOLID) > 0; + + /* Archives which declare solid files without initializing the window + * buffer first are invalid. */ + + if(rar->file.solid > 0 && rar->cstate.window_buf == NULL) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Declared solid file, but no window buffer " + "initialized yet."); + return ARCHIVE_FATAL; + } /* Check if window_size is a sane value. Also, if the file is not * declared as a directory, disallow window_size == 0. */ @@ -1669,21 +1699,41 @@ static int process_head_file(struct archive_read* a, struct rar5* rar, return ARCHIVE_FATAL; } - /* Values up to 64M should fit into ssize_t on every - * architecture. */ - rar->cstate.window_size = (ssize_t) window_size; + if(rar->file.solid > 0) { + /* Re-check if current window size is the same as previous + * window size (for solid files only). */ + if(rar->file.solid_window_size > 0 && + rar->file.solid_window_size != (ssize_t) window_size) + { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Window size for this solid file doesn't match " + "the window size used in previous solid file. "); + return ARCHIVE_FATAL; + } + } + + /* If we're currently switching volumes, ignore the new definition of + * window_size. */ + if(rar->cstate.switch_multivolume == 0) { + /* Values up to 64M should fit into ssize_t on every + * architecture. */ + rar->cstate.window_size = (ssize_t) window_size; + } + + if(rar->file.solid > 0 && rar->file.solid_window_size == 0) { + /* Solid files have to have the same window_size across + whole archive. Remember the window_size parameter + for first solid file found. */ + rar->file.solid_window_size = rar->cstate.window_size; + } + + init_window_mask(rar); - rar->file.solid = (compression_info & SOLID) > 0; rar->file.service = 0; if(!read_var_sized(a, &host_os, NULL)) return ARCHIVE_EOF; - enum HOST_OS { - HOST_WINDOWS = 0, - HOST_UNIX = 1, - }; - if(host_os == HOST_WINDOWS) { /* Host OS is Windows */ @@ -1775,12 +1825,16 @@ static int process_head_file(struct archive_read* a, struct rar5* rar, int ret = process_head_file_extra(a, entry, rar, extra_data_size); - /* Sanity check. */ + /* + * TODO: rewrite or remove useless sanity check + * as extra_data_size is not passed as a pointer + * if(extra_data_size < 0) { archive_set_error(&a->archive, ARCHIVE_ERRNO_PROGRAMMER, "File extra data size is not zero"); return ARCHIVE_FATAL; } + */ if(ret != ARCHIVE_OK) return ret; @@ -1845,14 +1899,28 @@ static int process_head_service(struct archive_read* a, struct rar5* rar, static int process_head_main(struct archive_read* a, struct rar5* rar, struct archive_entry* entry, size_t block_flags) { - (void) entry; - int ret; size_t extra_data_size = 0; size_t extra_field_size = 0; size_t extra_field_id = 0; size_t archive_flags = 0; + enum MAIN_FLAGS { + VOLUME = 0x0001, /* multi-volume archive */ + VOLUME_NUMBER = 0x0002, /* volume number, first vol doesn't + * have it */ + SOLID = 0x0004, /* solid archive */ + PROTECT = 0x0008, /* contains Recovery info */ + LOCK = 0x0010, /* readonly flag, not used */ + }; + + enum MAIN_EXTRA { + // Just one attribute here. + LOCATOR = 0x01, + }; + + (void) entry; + if(block_flags & HFL_EXTRA_DATA) { if(!read_var_sized(a, &extra_data_size, NULL)) return ARCHIVE_EOF; @@ -1864,15 +1932,6 @@ static int process_head_main(struct archive_read* a, struct rar5* rar, return ARCHIVE_EOF; } - enum MAIN_FLAGS { - VOLUME = 0x0001, /* multi-volume archive */ - VOLUME_NUMBER = 0x0002, /* volume number, first vol doesn't - * have it */ - SOLID = 0x0004, /* solid archive */ - PROTECT = 0x0008, /* contains Recovery info */ - LOCK = 0x0010, /* readonly flag, not used */ - }; - rar->main.volume = (archive_flags & VOLUME) > 0; rar->main.solid = (archive_flags & SOLID) > 0; @@ -1924,11 +1983,6 @@ static int process_head_main(struct archive_read* a, struct rar5* rar, return ARCHIVE_FATAL; } - enum MAIN_EXTRA { - // Just one attribute here. - LOCATOR = 0x01, - }; - switch(extra_field_id) { case LOCATOR: ret = process_main_locator_extra_block(a, rar); @@ -2034,6 +2088,8 @@ static int scan_for_signature(struct archive_read* a); static int process_base_block(struct archive_read* a, struct archive_entry* entry) { + const size_t SMALLEST_RAR5_BLOCK_SIZE = 3; + struct rar5* rar = get_context(a); uint32_t hdr_crc, computed_crc; size_t raw_hdr_size = 0, hdr_size_len, hdr_size; @@ -2042,6 +2098,12 @@ static int process_base_block(struct archive_read* a, const uint8_t* p; int ret; + enum HEADER_TYPE { + HEAD_MARK = 0x00, HEAD_MAIN = 0x01, HEAD_FILE = 0x02, + HEAD_SERVICE = 0x03, HEAD_CRYPT = 0x04, HEAD_ENDARC = 0x05, + HEAD_UNKNOWN = 0xff, + }; + /* Skip any unprocessed data for this file. */ ret = skip_unprocessed_bytes(a); if(ret != ARCHIVE_OK) @@ -2057,15 +2119,26 @@ static int process_base_block(struct archive_read* a, return ARCHIVE_EOF; } + hdr_size = raw_hdr_size + hdr_size_len; + /* Sanity check, maximum header size for RAR5 is 2MB. */ - if(raw_hdr_size > (2 * 1024 * 1024)) { + if(hdr_size > (2 * 1024 * 1024)) { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Base block header is too large"); return ARCHIVE_FATAL; } - hdr_size = raw_hdr_size + hdr_size_len; + /* Additional sanity checks to weed out invalid files. */ + if(raw_hdr_size == 0 || hdr_size_len == 0 || + hdr_size < SMALLEST_RAR5_BLOCK_SIZE) + { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Too small block encountered (%zu bytes)", + raw_hdr_size); + + return ARCHIVE_FATAL; + } /* Read the whole header data into memory, maximum memory use here is * 2MB. */ @@ -2100,12 +2173,6 @@ static int process_base_block(struct archive_read* a, rar->main.endarc = 0; /* Those are possible header ids in RARv5. */ - enum HEADER_TYPE { - HEAD_MARK = 0x00, HEAD_MAIN = 0x01, HEAD_FILE = 0x02, - HEAD_SERVICE = 0x03, HEAD_CRYPT = 0x04, HEAD_ENDARC = 0x05, - HEAD_UNKNOWN = 0xff, - }; - switch(header_id) { case HEAD_MAIN: ret = process_head_main(a, rar, entry, header_flags); @@ -2218,7 +2285,7 @@ static int rar5_read_header(struct archive_read *a, } if(rar->skipped_magic == 0) { - if(ARCHIVE_OK != consume(a, rar5_signature_size)) { + if(ARCHIVE_OK != consume(a, sizeof(rar5_signature_xor))) { return ARCHIVE_EOF; } @@ -2235,10 +2302,7 @@ static int rar5_read_header(struct archive_read *a, static void init_unpack(struct rar5* rar) { rar->file.calculated_crc32 = 0; - if (rar->cstate.window_size) - rar->cstate.window_mask = rar->cstate.window_size - 1; - else - rar->cstate.window_mask = 0; + init_window_mask(rar); free(rar->cstate.window_buf); free(rar->cstate.filtered_buf); @@ -2493,12 +2557,10 @@ static int parse_tables(struct archive_read* a, struct rar5* rar, /* 0..15: store directly */ table[i] = (uint8_t) num; i++; - continue; - } - - if(num < 18) { + } else if(num < 18) { /* 16..17: repeat previous code */ uint16_t n; + if(ARCHIVE_OK != read_bits_16(rar, p, &n)) return ARCHIVE_EOF; @@ -2524,27 +2586,26 @@ static int parse_tables(struct archive_read* a, struct rar5* rar, "huffman tables"); return ARCHIVE_FATAL; } + } else { + /* other codes: fill with zeroes `n` times */ + uint16_t n; - continue; - } + if(ARCHIVE_OK != read_bits_16(rar, p, &n)) + return ARCHIVE_EOF; - /* other codes: fill with zeroes `n` times */ - uint16_t n; - if(ARCHIVE_OK != read_bits_16(rar, p, &n)) - return ARCHIVE_EOF; + if(num == 18) { + n >>= 13; + n += 3; + skip_bits(rar, 3); + } else { + n >>= 9; + n += 11; + skip_bits(rar, 7); + } - if(num == 18) { - n >>= 13; - n += 3; - skip_bits(rar, 3); - } else { - n >>= 9; - n += 11; - skip_bits(rar, 7); + while(n-- > 0 && i < HUFF_TABLE_SIZE) + table[i++] = 0; } - - while(n-- > 0 && i < HUFF_TABLE_SIZE) - table[i++] = 0; } ret = create_decode_tables(&table[idx], &rar->cstate.ld, HUFF_NC); @@ -2589,6 +2650,7 @@ static int parse_tables(struct archive_read* a, struct rar5* rar, static int parse_block_header(struct archive_read* a, const uint8_t* p, ssize_t* block_size, struct compressed_block_header* hdr) { + uint8_t calculated_cksum; memcpy(hdr, p, sizeof(struct compressed_block_header)); if(bf_byte_count(hdr) > 2) { @@ -2627,7 +2689,7 @@ static int parse_block_header(struct archive_read* a, const uint8_t* p, /* Verify the block header checksum. 0x5A is a magic value and is * always * constant. */ - uint8_t calculated_cksum = 0x5A + calculated_cksum = 0x5A ^ (uint8_t) hdr->block_flags_u8 ^ (uint8_t) *block_size ^ (uint8_t) (*block_size >> 8) @@ -2701,6 +2763,7 @@ static int is_valid_filter_block_start(struct rar5* rar, static int parse_filter(struct archive_read* ar, const uint8_t* p) { uint32_t block_start, block_length; uint16_t filter_type; + struct filter_info* filt = NULL; struct rar5* rar = get_context(ar); /* Read the parameters from the input stream. */ @@ -2731,7 +2794,7 @@ static int parse_filter(struct archive_read* ar, const uint8_t* p) { } /* Allocate a new filter. */ - struct filter_info* filt = add_new_filter(rar); + filt = add_new_filter(rar); if(filt == NULL) { archive_set_error(&ar->archive, ENOMEM, "Can't allocate memory for a filter descriptor."); @@ -2851,7 +2914,7 @@ static int do_uncompress_block(struct archive_read* a, const uint8_t* p) { * - Values lower than 256 are just bytes. Those codes * can be stored in the output buffer directly. * - * - Code 256 defines a new filter, which is later used to + * - Code 256 defines a new filter, which is later used to * ransform the data block accordingly to the filter type. * The data block needs to be fully uncompressed first. * @@ -3000,7 +3063,8 @@ static int do_uncompress_block(struct archive_read* a, const uint8_t* p) { } continue; - } else if(num < 262) { + } else { + /* num < 262 */ const int idx = num - 258; const int dist = dist_cache_touch(rar, idx); @@ -3020,12 +3084,6 @@ static int do_uncompress_block(struct archive_read* a, const uint8_t* p) { continue; } - - /* The program counter shouldn't reach here. */ - archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Unsupported block code: 0x%x", num); - - return ARCHIVE_FATAL; } return ARCHIVE_OK; @@ -3036,6 +3094,7 @@ static int scan_for_signature(struct archive_read* a) { const uint8_t* p; const int chunk_size = 512; ssize_t i; + char signature[sizeof(rar5_signature_xor)]; /* If we're here, it means we're on an 'unknown territory' data. * There's no indication what kind of data we're reading here. @@ -3049,19 +3108,23 @@ static int scan_for_signature(struct archive_read* a) { * end of the file? If so, it would be a better approach than the * current implementation of this function. */ + rar5_signature(signature); + while(1) { if(!read_ahead(a, chunk_size, &p)) return ARCHIVE_EOF; - for(i = 0; i < chunk_size - rar5_signature_size; i++) { - if(memcmp(&p[i], rar5_signature, - rar5_signature_size) == 0) { + for(i = 0; i < chunk_size - (int)sizeof(rar5_signature_xor); + i++) { + if(memcmp(&p[i], signature, + sizeof(rar5_signature_xor)) == 0) { /* Consume the number of bytes we've used to * search for the signature, as well as the * number of bytes used by the signature * itself. After this we should be standing * on a valid base block header. */ - (void) consume(a, i + rar5_signature_size); + (void) consume(a, + i + sizeof(rar5_signature_xor)); return ARCHIVE_OK; } } @@ -3271,6 +3334,8 @@ static int process_block(struct archive_read* a) { if(rar->cstate.block_parsing_finished) { ssize_t block_size; + ssize_t to_skip; + ssize_t cur_block_size; /* The header size won't be bigger than 6 bytes. */ if(!read_ahead(a, 6, &p)) { @@ -3294,7 +3359,7 @@ static int process_block(struct archive_read* a) { /* Skip block header. Next data is huffman tables, * if present. */ - ssize_t to_skip = sizeof(struct compressed_block_header) + + to_skip = sizeof(struct compressed_block_header) + bf_byte_count(&rar->last_block_hdr) + 1; if(ARCHIVE_OK != consume(a, to_skip)) @@ -3308,7 +3373,7 @@ static int process_block(struct archive_read* a) { * bigger than the actual data stored in this file. Remaining * part of the data will be in another file. */ - ssize_t cur_block_size = + cur_block_size = rar5_min(rar->file.bytes_remaining, block_size); if(block_size > rar->file.bytes_remaining) { @@ -3636,6 +3701,7 @@ static int uncompress_file(struct archive_read* a) { static int do_unstore_file(struct archive_read* a, struct rar5* rar, const void** buf, size_t* size, int64_t* offset) { + size_t to_read; const uint8_t* p; if(rar->file.bytes_remaining == 0 && rar->main.volume > 0 && @@ -3654,7 +3720,7 @@ static int do_unstore_file(struct archive_read* a, } } - size_t to_read = rar5_min(rar->file.bytes_remaining, 64 * 1024); + to_read = rar5_min(rar->file.bytes_remaining, 64 * 1024); if(to_read == 0) { return ARCHIVE_EOF; } @@ -3823,6 +3889,18 @@ static int verify_global_checksums(struct archive_read* a) { return verify_checksums(a); } +/* + * Decryption function for the magic signature pattern. Check the comment near + * the `rar5_signature_xor` symbol to read the rationale behind this. + */ +static void rar5_signature(char *buf) { + size_t i; + + for(i = 0; i < sizeof(rar5_signature_xor); i++) { + buf[i] = rar5_signature_xor[i] ^ 0xA1; + } +} + static int rar5_read_data(struct archive_read *a, const void **buff, size_t *size, int64_t *offset) { int ret; @@ -3906,7 +3984,7 @@ static int rar5_read_data_skip(struct archive_read *a) { /* Turn off "skip mode". */ rar->skip_mode--; - if(ret < 0) { + if(ret < 0 || ret == ARCHIVE_EOF) { /* Propagate any potential error conditions * to the caller. */ return ret; @@ -3969,19 +4047,8 @@ static int rar5_has_encrypted_entries(struct archive_read *_a) { } static int rar5_init(struct rar5* rar) { - ssize_t i; - memset(rar, 0, sizeof(struct rar5)); - /* Decrypt the magic signature pattern. Check the comment near the - * `rar5_signature` symbol to read the rationale behind this. */ - - if(rar5_signature[0] == 243) { - for(i = 0; i < rar5_signature_size; i++) { - rar5_signature[i] ^= 0xA1; - } - } - if(CDE_OK != cdeque_init(&rar->cstate.filters, 8192)) return ARCHIVE_FATAL; 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 c63d46fc0ce..96d8101844f 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c @@ -1797,6 +1797,16 @@ pax_attribute_schily_xattr(struct archive_entry *entry, } static int +pax_attribute_rht_security_selinux(struct archive_entry *entry, + const char *value, size_t value_length) +{ + archive_entry_xattr_add_entry(entry, "security.selinux", + value, value_length); + + return 0; +} + +static int pax_attribute_acl(struct archive_read *a, struct tar *tar, struct archive_entry *entry, const char *value, int type) { @@ -1966,6 +1976,14 @@ pax_attribute(struct archive_read *a, struct tar *tar, if (memcmp(key, "LIBARCHIVE.xattr.", 17) == 0) pax_attribute_xattr(entry, key, value); break; + case 'R': + /* GNU tar uses RHT.security header to store SELinux xattrs + * SCHILY.xattr.security.selinux == RHT.security.selinux */ + if (strcmp(key, "RHT.security.selinux") == 0) { + pax_attribute_rht_security_selinux(entry, value, + value_length); + } + break; case 'S': /* We support some keys used by the "star" archiver */ if (strcmp(key, "SCHILY.acl.access") == 0) { diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c b/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c index c1c54450c39..72977b8e073 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c @@ -626,7 +626,8 @@ _warc_rdver(const char *buf, size_t bsz) if (ver >= 1200U) { if (memcmp(c, "\r\n", 2U) != 0) ver = 0U; - } else if (ver < 1200U) { + } else { + /* ver < 1200U */ if (*c != ' ' && *c != '\t') ver = 0U; } 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 34253a52fb7..503ff58b91d 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c @@ -458,6 +458,11 @@ archive_read_support_format_xar(struct archive *_a) return (ARCHIVE_FATAL); } + /* initialize xar->file_queue */ + xar->file_queue.allocated = 0; + xar->file_queue.used = 0; + xar->file_queue.files = NULL; + r = __archive_read_register_format(a, xar, "xar", @@ -1221,10 +1226,12 @@ heap_add_entry(struct archive_read *a, /* Expand our pending files list as necessary. */ if (heap->used >= heap->allocated) { struct xar_file **new_pending_files; - int new_size = heap->allocated * 2; + int new_size; if (heap->allocated < 1024) new_size = 1024; + else + new_size = heap->allocated * 2; /* Overflow might keep us from growing the list. */ if (new_size <= heap->allocated) { archive_set_error(&a->archive, @@ -1238,9 +1245,11 @@ heap_add_entry(struct archive_read *a, ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); - free(heap->files); + if (heap->allocated) { + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); + free(heap->files); + } heap->files = new_pending_files; heap->allocated = new_size; } @@ -2613,15 +2622,14 @@ strappend_base64(struct xar *xar, while (l > 0) { int n = 0; - if (l > 0) { - if (base64[b[0]] < 0 || base64[b[1]] < 0) - break; - n = base64[*b++] << 18; - n |= base64[*b++] << 12; - *out++ = n >> 16; - len++; - l -= 2; - } + if (base64[b[0]] < 0 || base64[b[1]] < 0) + break; + n = base64[*b++] << 18; + n |= base64[*b++] << 12; + *out++ = n >> 16; + len++; + l -= 2; + if (l > 0) { if (base64[*b] < 0) break; 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 ab21e222f5a..6581ca0acf6 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c @@ -487,7 +487,7 @@ process_extra(struct archive_read *a, struct archive_entry *entry, /* Some ZIP files may have trailing 0 bytes. Let's check they * are all 0 and ignore them instead of returning an error. * - * This is not techincally correct, but some ZIP files look + * This is not technically correct, but some ZIP files look * like this and other tools support those files - so let's * also support them. */ @@ -1053,7 +1053,7 @@ zip_read_local_file_header(struct archive_read *a, struct archive_entry *entry, /* 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. */ + * is not a directory and there is no type, assume a regular file. */ if ((zip_entry->mode & AE_IFMT) != AE_IFDIR) { int has_slash; @@ -1104,7 +1104,7 @@ zip_read_local_file_header(struct archive_read *a, struct archive_entry *entry, } if (zip_entry->flags & LA_FROM_CENTRAL_DIRECTORY) { - /* If this came from the central dir, it's size info + /* If this came from the central dir, its size info * is definitive, so ignore the length-at-end flag. */ zip_entry->zip_flags &= ~ZIP_LENGTH_AT_END; /* If local header is missing a value, use the one from @@ -1797,6 +1797,23 @@ zip_read_data_zipx_lzma_alone(struct archive_read *a, const void **buff, "lzma data error (error %d)", (int) lz_ret); return (ARCHIVE_FATAL); + /* This case is optional in lzma alone format. It can happen, + * but most of the files don't have it. (GitHub #1257) */ + case LZMA_STREAM_END: + lzma_end(&zip->zipx_lzma_stream); + zip->zipx_lzma_valid = 0; + if((int64_t) zip->zipx_lzma_stream.total_in != + zip->entry_bytes_remaining) + { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "lzma alone premature end of stream"); + return (ARCHIVE_FATAL); + } + + zip->end_of_entry = 1; + break; + case LZMA_OK: break; diff --git a/archivers/libarchive/files/libarchive/archive_string.c b/archivers/libarchive/files/libarchive/archive_string.c index 76a1624043f..c77dcf52c25 100644 --- a/archivers/libarchive/files/libarchive/archive_string.c +++ b/archivers/libarchive/files/libarchive/archive_string.c @@ -75,6 +75,9 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_string.c 201095 2009-12-28 02:33 #define wmemmove(a,b,i) (wchar_t *)memmove((a), (b), (i) * sizeof(wchar_t)) #endif +#undef max +#define max(a, b) ((a)>(b)?(a):(b)) + struct archive_string_conv { struct archive_string_conv *next; char *from_charset; @@ -458,7 +461,7 @@ archive_wstring_append_from_mbs_in_codepage(struct archive_wstring *dest, if (from_cp == CP_C_LOCALE) { /* - * "C" locale special process. + * "C" locale special processing. */ wchar_t *ws; const unsigned char *mp; @@ -591,7 +594,7 @@ archive_wstring_append_from_mbs(struct archive_wstring *dest, * No single byte will be more than one wide character, * so this length estimate will always be big enough. */ - size_t wcs_length = len; + // size_t wcs_length = len; size_t mbs_length = len; const char *mbs = p; wchar_t *wcs; @@ -600,7 +603,11 @@ archive_wstring_append_from_mbs(struct archive_wstring *dest, memset(&shift_state, 0, sizeof(shift_state)); #endif - if (NULL == archive_wstring_ensure(dest, dest->length + wcs_length + 1)) + /* + * As we decided to have wcs_length == mbs_length == len + * we can use len here instead of wcs_length + */ + if (NULL == archive_wstring_ensure(dest, dest->length + len + 1)) return (-1); wcs = dest->s + dest->length; /* @@ -609,6 +616,12 @@ archive_wstring_append_from_mbs(struct archive_wstring *dest, * multi bytes. */ while (*mbs && mbs_length > 0) { + /* + * The buffer we allocated is always big enough. + * Keep this code path in a comment if we decide to choose + * smaller wcs_length in the future + */ +/* if (wcs_length == 0) { dest->length = wcs - dest->s; dest->s[dest->length] = L'\0'; @@ -618,24 +631,20 @@ archive_wstring_append_from_mbs(struct archive_wstring *dest, return (-1); wcs = dest->s + dest->length; } +*/ #if HAVE_MBRTOWC - r = mbrtowc(wcs, mbs, wcs_length, &shift_state); + r = mbrtowc(wcs, mbs, mbs_length, &shift_state); #else - r = mbtowc(wcs, mbs, wcs_length); + r = mbtowc(wcs, mbs, mbs_length); #endif if (r == (size_t)-1 || r == (size_t)-2) { ret_val = -1; - if (errno == EILSEQ) { - ++mbs; - --mbs_length; - continue; - } else - break; + break; } if (r == 0 || r > mbs_length) break; wcs++; - wcs_length--; + // wcs_length--; mbs += r; mbs_length -= r; } @@ -680,7 +689,7 @@ archive_string_append_from_wcs_in_codepage(struct archive_string *as, if (to_cp == CP_C_LOCALE) { /* - * "C" locale special process. + * "C" locale special processing. */ const wchar_t *wp = ws; char *p; @@ -735,7 +744,8 @@ archive_string_append_from_wcs_in_codepage(struct archive_string *as, else dp = &defchar_used; count = WideCharToMultiByte(to_cp, 0, ws, wslen, - as->s + as->length, (int)as->buffer_length-1, NULL, dp); + as->s + as->length, + (int)as->buffer_length - as->length - 1, NULL, dp); if (count == 0 && GetLastError() == ERROR_INSUFFICIENT_BUFFER) { /* Expand the MBS buffer and retry. */ @@ -798,7 +808,8 @@ archive_string_append_from_wcs(struct archive_string *as, as->s[as->length] = '\0'; /* Re-allocate buffer for MBS. */ if (archive_string_ensure(as, - as->length + len * 2 + 1) == NULL) + as->length + max(len * 2, + (size_t)MB_CUR_MAX) + 1) == NULL) return (-1); p = as->s + as->length; end = as->s + as->buffer_length - MB_CUR_MAX -1; @@ -889,7 +900,7 @@ add_converter(struct archive_string_conv *sc, int (*converter) struct archive_string_conv *)) { if (sc == NULL || sc->nconverter >= 2) - __archive_errx(1, "Programing error"); + __archive_errx(1, "Programming error"); sc->converter[sc->nconverter++] = converter; } @@ -3440,7 +3451,8 @@ strncat_from_utf8_libarchive2(struct archive_string *as, as->length = p - as->s; /* Re-allocate buffer for MBS. */ if (archive_string_ensure(as, - as->length + len * 2 + 1) == NULL) + as->length + max(len * 2, + (size_t)MB_CUR_MAX) + 1) == NULL) return (-1); p = as->s + as->length; end = as->s + as->buffer_length - MB_CUR_MAX -1; diff --git a/archivers/libarchive/files/libarchive/archive_string.h b/archivers/libarchive/files/libarchive/archive_string.h index 56dfbb28f28..27e1ad69c56 100644 --- a/archivers/libarchive/files/libarchive/archive_string.h +++ b/archivers/libarchive/files/libarchive/archive_string.h @@ -26,15 +26,15 @@ * */ +#ifndef ARCHIVE_STRING_H_INCLUDED +#define ARCHIVE_STRING_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #ifndef __LIBARCHIVE_TEST #error This header is only to be used internally to libarchive. #endif #endif -#ifndef ARCHIVE_STRING_H_INCLUDED -#define ARCHIVE_STRING_H_INCLUDED - #include <stdarg.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> /* required for wchar_t on some systems */ diff --git a/archivers/libarchive/files/libarchive/archive_string_composition.h b/archivers/libarchive/files/libarchive/archive_string_composition.h index 8902ac1f7f3..d0ac340961a 100644 --- a/archivers/libarchive/files/libarchive/archive_string_composition.h +++ b/archivers/libarchive/files/libarchive/archive_string_composition.h @@ -34,13 +34,13 @@ * See also http://unicode.org/report/tr15/ */ +#ifndef ARCHIVE_STRING_COMPOSITION_H_INCLUDED +#define ARCHIVE_STRING_COMPOSITION_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_STRING_COMPOSITION_H_INCLUDED -#define ARCHIVE_STRING_COMPOSITION_H_INCLUDED - struct unicode_composition_table { uint32_t cp1; uint32_t cp2; diff --git a/archivers/libarchive/files/libarchive/archive_util.3 b/archivers/libarchive/files/libarchive/archive_util.3 index 99ab842a28c..d5d4e7dfd7d 100644 --- a/archivers/libarchive/files/libarchive/archive_util.3 +++ b/archivers/libarchive/files/libarchive/archive_util.3 @@ -92,10 +92,10 @@ Clears any error information left over from a previous call. Not generally used in client code. .It Fn archive_compression Synonym for -.Fn archive_filter_code(a, 0) . +.Fn archive_filter_code a 0 . .It Fn archive_compression_name Synonym for -.Fn archive_filter_name(a, 0) . +.Fn archive_filter_name a 0 . .It Fn archive_copy_error Copies error information from one archive to another. .It Fn archive_errno @@ -142,13 +142,13 @@ filter 0 is the gunzip filter, filter 1 is the uudecode filter, and filter 2 is the pseudo-filter that wraps the archive read functions. In this case, requesting -.Fn archive_position(a, -1) +.Fn archive_position a -1 would be a synonym for -.Fn archive_position(a, 2) +.Fn archive_position a 2 which would return the number of bytes currently read from the archive, while -.Fn archive_position(a, 1) +.Fn archive_position a 1 would return the number of bytes after uudecoding, and -.Fn archive_position(a, 0) +.Fn archive_position a 0 would return the number of bytes after decompression. .It Fn archive_filter_name Returns a textual name identifying the indicated filter. @@ -170,9 +170,9 @@ A textual description of the format of the current entry. .It Fn archive_position Returns the number of bytes read from or written to the indicated filter. In particular, -.Fn archive_position(a, 0) +.Fn archive_position a 0 returns the number of bytes read or written by the format handler, while -.Fn archive_position(a, -1) +.Fn archive_position a -1 returns the number of bytes read or written to the archive. See .Fn archive_filter_count diff --git a/archivers/libarchive/files/libarchive/archive_util.c b/archivers/libarchive/files/libarchive/archive_util.c index 3399c0b5f49..c76ecc5b05b 100644 --- a/archivers/libarchive/files/libarchive/archive_util.c +++ b/archivers/libarchive/files/libarchive/archive_util.c @@ -218,8 +218,8 @@ __archive_errx(int retvalue, const char *msg) * Also Windows version of mktemp family including _mktemp_s * are not secure. */ -int -__archive_mktemp(const char *tmpdir) +static int +__archive_mktempx(const char *tmpdir, wchar_t *template) { static const wchar_t prefix[] = L"libarchive_"; static const wchar_t suffix[] = L"XXXXXXXXXX"; @@ -243,64 +243,76 @@ __archive_mktemp(const char *tmpdir) hProv = (HCRYPTPROV)NULL; fd = -1; ws = NULL; - archive_string_init(&temp_name); - /* Get a temporary directory. */ - if (tmpdir == NULL) { - size_t l; - wchar_t *tmp; + if (template == NULL) { + archive_string_init(&temp_name); - l = GetTempPathW(0, NULL); - if (l == 0) { - la_dosmaperr(GetLastError()); - goto exit_tmpfile; - } - tmp = malloc(l*sizeof(wchar_t)); - if (tmp == NULL) { - errno = ENOMEM; - goto exit_tmpfile; - } - GetTempPathW((DWORD)l, tmp); - archive_wstrcpy(&temp_name, tmp); - free(tmp); - } else { - if (archive_wstring_append_from_mbs(&temp_name, tmpdir, - strlen(tmpdir)) < 0) - goto exit_tmpfile; - if (temp_name.s[temp_name.length-1] != L'/') - archive_wstrappend_wchar(&temp_name, L'/'); - } + /* Get a temporary directory. */ + if (tmpdir == NULL) { + size_t l; + wchar_t *tmp; - /* Check if temp_name is a directory. */ - attr = GetFileAttributesW(temp_name.s); - if (attr == (DWORD)-1) { - if (GetLastError() != ERROR_FILE_NOT_FOUND) { - la_dosmaperr(GetLastError()); - goto exit_tmpfile; - } - ws = __la_win_permissive_name_w(temp_name.s); - if (ws == NULL) { - errno = EINVAL; - goto exit_tmpfile; + l = GetTempPathW(0, NULL); + if (l == 0) { + la_dosmaperr(GetLastError()); + goto exit_tmpfile; + } + tmp = malloc(l*sizeof(wchar_t)); + if (tmp == NULL) { + errno = ENOMEM; + goto exit_tmpfile; + } + GetTempPathW((DWORD)l, tmp); + archive_wstrcpy(&temp_name, tmp); + free(tmp); + } else { + if (archive_wstring_append_from_mbs(&temp_name, tmpdir, + strlen(tmpdir)) < 0) + goto exit_tmpfile; + if (temp_name.s[temp_name.length-1] != L'/') + archive_wstrappend_wchar(&temp_name, L'/'); } - attr = GetFileAttributesW(ws); + + /* Check if temp_name is a directory. */ + attr = GetFileAttributesW(temp_name.s); if (attr == (DWORD)-1) { - la_dosmaperr(GetLastError()); + if (GetLastError() != ERROR_FILE_NOT_FOUND) { + la_dosmaperr(GetLastError()); + goto exit_tmpfile; + } + ws = __la_win_permissive_name_w(temp_name.s); + if (ws == NULL) { + errno = EINVAL; + goto exit_tmpfile; + } + attr = GetFileAttributesW(ws); + if (attr == (DWORD)-1) { + la_dosmaperr(GetLastError()); + goto exit_tmpfile; + } + } + if (!(attr & FILE_ATTRIBUTE_DIRECTORY)) { + errno = ENOTDIR; goto exit_tmpfile; } - } - if (!(attr & FILE_ATTRIBUTE_DIRECTORY)) { - errno = ENOTDIR; - goto exit_tmpfile; - } - /* - * Create a temporary file. - */ - archive_wstrcat(&temp_name, prefix); - archive_wstrcat(&temp_name, suffix); - ep = temp_name.s + archive_strlen(&temp_name); - xp = ep - wcslen(suffix); + /* + * Create a temporary file. + */ + archive_wstrcat(&temp_name, prefix); + archive_wstrcat(&temp_name, suffix); + ep = temp_name.s + archive_strlen(&temp_name); + xp = ep - wcslen(suffix); + template = temp_name.s; + } else { + xp = wcschr(template, L'X'); + if (xp == NULL) /* No X, programming error */ + abort(); + for (ep = xp; *ep == L'X'; ep++) + continue; + if (*ep) /* X followed by non X, programming error */ + abort(); + } if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { @@ -323,20 +335,24 @@ __archive_mktemp(const char *tmpdir) *p = num[((DWORD)*p) % (sizeof(num)/sizeof(num[0]))]; free(ws); - ws = __la_win_permissive_name_w(temp_name.s); + ws = __la_win_permissive_name_w(template); if (ws == NULL) { errno = EINVAL; goto exit_tmpfile; } - /* Specifies FILE_FLAG_DELETE_ON_CLOSE flag is to - * delete this temporary file immediately when this - * file closed. */ + if (template == temp_name.s) { + attr = FILE_ATTRIBUTE_TEMPORARY | + FILE_FLAG_DELETE_ON_CLOSE; + } else { + /* mkstemp */ + attr = FILE_ATTRIBUTE_NORMAL; + } h = CreateFileW(ws, GENERIC_READ | GENERIC_WRITE | DELETE, 0,/* Not share */ NULL, CREATE_NEW,/* Create a new file only */ - FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE, + attr, NULL); if (h == INVALID_HANDLE_VALUE) { /* The same file already exists. retry with @@ -349,6 +365,7 @@ __archive_mktemp(const char *tmpdir) } fd = _open_osfhandle((intptr_t)h, _O_BINARY | _O_RDWR); if (fd == -1) { + la_dosmaperr(GetLastError()); CloseHandle(h); goto exit_tmpfile; } else @@ -358,10 +375,23 @@ exit_tmpfile: if (hProv != (HCRYPTPROV)NULL) CryptReleaseContext(hProv, 0); free(ws); - archive_wstring_free(&temp_name); + if (template == temp_name.s) + archive_wstring_free(&temp_name); return (fd); } +int +__archive_mktemp(const char *tmpdir) +{ + return __archive_mktempx(tmpdir, NULL); +} + +int +__archive_mkstemp(wchar_t *template) +{ + return __archive_mktempx(NULL, template); +} + #else static int @@ -414,14 +444,24 @@ exit_tmpfile: return (fd); } -#else +int +__archive_mkstemp(char *template) +{ + int fd = -1; + fd = mkstemp(template); + if (fd >= 0) + __archive_ensure_cloexec_flag(fd); + return (fd); +} + +#else /* !HAVE_MKSTEMP */ /* * We use a private routine. */ -int -__archive_mktemp(const char *tmpdir) +static int +__archive_mktempx(const char *tmpdir, char *template) { static const char num[] = { '0', '1', '2', '3', '4', '5', '6', '7', @@ -439,26 +479,37 @@ __archive_mktemp(const char *tmpdir) char *tp, *ep; fd = -1; - archive_string_init(&temp_name); - if (tmpdir == NULL) { - if (get_tempdir(&temp_name) != ARCHIVE_OK) + if (template == NULL) { + archive_string_init(&temp_name); + if (tmpdir == NULL) { + if (get_tempdir(&temp_name) != ARCHIVE_OK) + goto exit_tmpfile; + } else + archive_strcpy(&temp_name, tmpdir); + if (temp_name.s[temp_name.length-1] == '/') { + temp_name.s[temp_name.length-1] = '\0'; + temp_name.length --; + } + if (la_stat(temp_name.s, &st) < 0) goto exit_tmpfile; - } else - archive_strcpy(&temp_name, tmpdir); - if (temp_name.s[temp_name.length-1] == '/') { - temp_name.s[temp_name.length-1] = '\0'; - temp_name.length --; - } - if (la_stat(temp_name.s, &st) < 0) - goto exit_tmpfile; - if (!S_ISDIR(st.st_mode)) { - errno = ENOTDIR; - goto exit_tmpfile; + if (!S_ISDIR(st.st_mode)) { + errno = ENOTDIR; + goto exit_tmpfile; + } + archive_strcat(&temp_name, "/libarchive_"); + tp = temp_name.s + archive_strlen(&temp_name); + archive_strcat(&temp_name, "XXXXXXXXXX"); + ep = temp_name.s + archive_strlen(&temp_name); + template = temp_name.s; + } else { + tp = strchr(template, 'X'); + if (tp == NULL) /* No X, programming error */ + abort(); + for (ep = tp; *ep == 'X'; ep++) + continue; + if (*ep) /* X followed by non X, programming error */ + abort(); } - archive_strcat(&temp_name, "/libarchive_"); - tp = temp_name.s + archive_strlen(&temp_name); - archive_strcat(&temp_name, "XXXXXXXXXX"); - ep = temp_name.s + archive_strlen(&temp_name); do { char *p; @@ -469,19 +520,33 @@ __archive_mktemp(const char *tmpdir) int d = *((unsigned char *)p) % sizeof(num); *p++ = num[d]; } - fd = open(temp_name.s, O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC, + fd = open(template, O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC, 0600); } while (fd < 0 && errno == EEXIST); if (fd < 0) goto exit_tmpfile; __archive_ensure_cloexec_flag(fd); - unlink(temp_name.s); + if (template == temp_name.s) + unlink(temp_name.s); exit_tmpfile: - archive_string_free(&temp_name); + if (template == temp_name.s) + archive_string_free(&temp_name); return (fd); } -#endif /* HAVE_MKSTEMP */ +int +__archive_mktemp(const char *tmpdir) +{ + return __archive_mktempx(tmpdir, NULL); +} + +int +__archive_mkstemp(char *template) +{ + return __archive_mktempx(NULL, template); +} + +#endif /* !HAVE_MKSTEMP */ #endif /* !_WIN32 || __CYGWIN__ */ /* diff --git a/archivers/libarchive/files/libarchive/archive_windows.h b/archivers/libarchive/files/libarchive/archive_windows.h index 87d8c891bb0..47b7cb8e379 100644 --- a/archivers/libarchive/files/libarchive/archive_windows.h +++ b/archivers/libarchive/files/libarchive/archive_windows.h @@ -27,10 +27,6 @@ * $FreeBSD$ */ -#ifndef __LIBARCHIVE_BUILD -#error This header is only to be used internally to libarchive. -#endif - /* * TODO: A lot of stuff in here isn't actually used by libarchive and * can be trimmed out. Note that this file is used by libarchive and @@ -48,6 +44,10 @@ #ifndef LIBARCHIVE_ARCHIVE_WINDOWS_H_INCLUDED #define LIBARCHIVE_ARCHIVE_WINDOWS_H_INCLUDED +#ifndef __LIBARCHIVE_BUILD +#error This header is only to be used internally to libarchive. +#endif + /* Start of configuration for native Win32 */ #ifndef MINGW_HAS_SECURE_API #define MINGW_HAS_SECURE_API 1 diff --git a/archivers/libarchive/files/libarchive/archive_write.3 b/archivers/libarchive/files/libarchive/archive_write.3 index c1164f5b5fd..e7f7f1384ee 100644 --- a/archivers/libarchive/files/libarchive/archive_write.3 +++ b/archivers/libarchive/files/libarchive/archive_write.3 @@ -118,7 +118,7 @@ After all entries have been written, use the .Fn archive_write_free function to release all resources. .\" -.Sh EXAMPLE +.Sh EXAMPLES The following sketch illustrates basic usage of the library. In this example, the callback functions are simply wrappers around the standard @@ -192,7 +192,7 @@ write_archive(const char *outname, const char **filename) if (archive_write_set_format_filter_by_ext(a, outname) != ARCHIVE_OK) { archive_write_add_filter_gzip(a); archive_write_set_format_ustar(a); - } + } archive_write_open(a, mydata, myopen, mywrite, myclose); while (*filename) { stat(*filename, &st); @@ -225,8 +225,8 @@ int main(int argc, const char **argv) .Ed .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr mtree 5 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_write.c b/archivers/libarchive/files/libarchive/archive_write.c index e8daf530d26..98a55fb2aa0 100644 --- a/archivers/libarchive/files/libarchive/archive_write.c +++ b/archivers/libarchive/files/libarchive/archive_write.c @@ -212,6 +212,7 @@ __archive_write_allocate_filter(struct archive *_a) f = calloc(1, sizeof(*f)); f->archive = _a; + f->state = ARCHIVE_WRITE_FILTER_STATE_NEW; if (a->filter_first == NULL) a->filter_first = f; else @@ -228,6 +229,9 @@ __archive_write_filter(struct archive_write_filter *f, const void *buff, size_t length) { int r; + /* Never write to non-open filters */ + if (f->state != ARCHIVE_WRITE_FILTER_STATE_OPEN) + return(ARCHIVE_FATAL); if (length == 0) return(ARCHIVE_OK); if (f->write == NULL) @@ -240,27 +244,70 @@ __archive_write_filter(struct archive_write_filter *f, } /* - * Open a filter. + * Recursive function for opening the filter chain + * Last filter is opened first */ -int +static int __archive_write_open_filter(struct archive_write_filter *f) { - if (f->open == NULL) + int ret; + + ret = ARCHIVE_OK; + if (f->next_filter != NULL) + ret = __archive_write_open_filter(f->next_filter); + if (ret != ARCHIVE_OK) + return (ret); + if (f->state != ARCHIVE_WRITE_FILTER_STATE_NEW) + return (ARCHIVE_FATAL); + if (f->open == NULL) { + f->state = ARCHIVE_WRITE_FILTER_STATE_OPEN; return (ARCHIVE_OK); - return (f->open)(f); + } + ret = (f->open)(f); + if (ret == ARCHIVE_OK) + f->state = ARCHIVE_WRITE_FILTER_STATE_OPEN; + else + f->state = ARCHIVE_WRITE_FILTER_STATE_FATAL; + return (ret); } /* - * Close a filter. + * Open all filters */ -int -__archive_write_close_filter(struct archive_write_filter *f) +static int +__archive_write_filters_open(struct archive_write *a) { - if (f->close != NULL) - return (f->close)(f); - if (f->next_filter != NULL) - return (__archive_write_close_filter(f->next_filter)); - return (ARCHIVE_OK); + return (__archive_write_open_filter(a->filter_first)); +} + +/* + * Close all filtes + */ +static int +__archive_write_filters_close(struct archive_write *a) +{ + struct archive_write_filter *f; + int ret, ret1; + ret = ARCHIVE_OK; + for (f = a->filter_first; f != NULL; f = f->next_filter) { + /* Do not close filters that are not open */ + if (f->state == ARCHIVE_WRITE_FILTER_STATE_OPEN) { + if (f->close != NULL) { + ret1 = (f->close)(f); + if (ret1 < ret) + ret = ret1; + if (ret1 == ARCHIVE_OK) { + f->state = + ARCHIVE_WRITE_FILTER_STATE_CLOSED; + } else { + f->state = + ARCHIVE_WRITE_FILTER_STATE_FATAL; + } + } else + f->state = ARCHIVE_WRITE_FILTER_STATE_CLOSED; + } + } + return (ret); } int @@ -292,6 +339,7 @@ archive_write_client_open(struct archive_write_filter *f) struct archive_none *state; void *buffer; size_t buffer_size; + int ret; f->bytes_per_block = archive_write_get_bytes_per_block(f->archive); f->bytes_in_last_block = @@ -316,7 +364,13 @@ archive_write_client_open(struct archive_write_filter *f) if (a->client_opener == NULL) return (ARCHIVE_OK); - return (a->client_opener(f->archive, a->client_data)); + ret = a->client_opener(f->archive, a->client_data); + if (ret != ARCHIVE_OK) { + free(state->buffer); + free(state); + f->data = NULL; + } + return (ret); } static int @@ -439,8 +493,6 @@ archive_write_client_close(struct archive_write_filter *f) (*a->client_closer)(&a->archive, a->client_data); free(state->buffer); free(state); - /* Clear the close handler myself not to be called again. */ - f->close = NULL; a->client_data = NULL; /* Clear passphrase. */ if (a->passphrase != NULL) { @@ -448,6 +500,8 @@ archive_write_client_close(struct archive_write_filter *f) free(a->passphrase); a->passphrase = NULL; } + /* Clear the close handler myself not to be called again. */ + f->state = ARCHIVE_WRITE_FILTER_STATE_CLOSED; return (ret); } @@ -477,9 +531,10 @@ archive_write_open(struct archive *_a, void *client_data, client_filter->write = archive_write_client_write; client_filter->close = archive_write_client_close; - ret = __archive_write_open_filter(a->filter_first); + ret = __archive_write_filters_open(a); if (ret < ARCHIVE_WARN) { - r1 = __archive_write_close_filter(a->filter_first); + r1 = __archive_write_filters_close(a); + __archive_write_filters_free(_a); return (r1 < ret ? r1 : ret); } @@ -521,7 +576,7 @@ _archive_write_close(struct archive *_a) } /* Finish the compression and close the stream. */ - r1 = __archive_write_close_filter(a->filter_first); + r1 = __archive_write_filters_close(a); if (r1 < r) r = r1; diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_b64encode.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_b64encode.c index b46b19a0c74..87fdb73ecb0 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_b64encode.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_b64encode.c @@ -149,11 +149,6 @@ archive_filter_b64encode_open(struct archive_write_filter *f) { struct private_b64encode *state = (struct private_b64encode *)f->data; size_t bs = 65536, bpb; - int ret; - - ret = __archive_write_open_filter(f->next_filter); - if (ret != ARCHIVE_OK) - return (ret); if (f->archive->magic == ARCHIVE_WRITE_MAGIC) { /* Buffer size should be a multiple number of the of bytes @@ -266,7 +261,6 @@ static int archive_filter_b64encode_close(struct archive_write_filter *f) { struct private_b64encode *state = (struct private_b64encode *)f->data; - int ret, ret2; /* Flush remaining bytes. */ if (state->hold_len != 0) @@ -274,12 +268,8 @@ archive_filter_b64encode_close(struct archive_write_filter *f) archive_string_sprintf(&state->encoded_buff, "====\n"); /* Write the last block */ archive_write_set_bytes_in_last_block(f->archive, 1); - ret = __archive_write_filter(f->next_filter, + return __archive_write_filter(f->next_filter, state->encoded_buff.s, archive_strlen(&state->encoded_buff)); - ret2 = __archive_write_close_filter(f->next_filter); - if (ret > ret2) - ret = ret2; - return (ret); } static int diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_bzip2.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_bzip2.c index 68ed9579b02..7001e9c6b30 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_bzip2.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_bzip2.c @@ -167,10 +167,6 @@ archive_compressor_bzip2_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 != 0) - return (ret); - if (data->compressed == NULL) { size_t bs = 65536, bpb; if (f->archive->magic == ARCHIVE_WRITE_MAGIC) { @@ -262,7 +258,7 @@ static int archive_compressor_bzip2_close(struct archive_write_filter *f) { struct private_data *data = (struct private_data *)f->data; - int ret, r1; + int ret; /* Finish compression cycle. */ ret = drive_compressor(f, data, 1); @@ -281,9 +277,7 @@ archive_compressor_bzip2_close(struct archive_write_filter *f) "Failed to clean up compressor"); ret = ARCHIVE_FATAL; } - - r1 = __archive_write_close_filter(f->next_filter); - return (r1 < ret ? r1 : ret); + return ret; } static int diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_compress.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_compress.c index 26fcef4d42b..d404fae7dba 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_compress.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_compress.c @@ -146,17 +146,12 @@ archive_write_add_filter_compress(struct archive *_a) static int archive_compressor_compress_open(struct archive_write_filter *f) { - int ret; struct private_data *state; size_t bs = 65536, bpb; f->code = ARCHIVE_FILTER_COMPRESS; f->name = "compress"; - ret = __archive_write_open_filter(f->next_filter); - if (ret != ARCHIVE_OK) - return (ret); - state = (struct private_data *)calloc(1, sizeof(*state)); if (state == NULL) { archive_set_error(f->archive, ENOMEM, @@ -426,30 +421,27 @@ static int archive_compressor_compress_close(struct archive_write_filter *f) { struct private_data *state = (struct private_data *)f->data; - int ret, ret2; + int ret; ret = output_code(f, state->cur_code); if (ret != ARCHIVE_OK) - goto cleanup; + return ret; ret = output_flush(f); if (ret != ARCHIVE_OK) - goto cleanup; + return ret; /* Write the last block */ ret = __archive_write_filter(f->next_filter, state->compressed, state->compressed_offset); -cleanup: - ret2 = __archive_write_close_filter(f->next_filter); - if (ret > ret2) - ret = ret2; - free(state->compressed); - free(state); return (ret); } static int archive_compressor_compress_free(struct archive_write_filter *f) { - (void)f; /* UNUSED */ + struct private_data *state = (struct private_data *)f->data; + + free(state->compressed); + free(state); return (ARCHIVE_OK); } 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 e4b3435e420..8670d5ca740 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c @@ -184,10 +184,6 @@ archive_compressor_gzip_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->compressed == NULL) { size_t bs = 65536, bpb; if (f->archive->magic == ARCHIVE_WRITE_MAGIC) { @@ -307,7 +303,7 @@ archive_compressor_gzip_close(struct archive_write_filter *f) { unsigned char trailer[8]; struct private_data *data = (struct private_data *)f->data; - int ret, r1; + int ret; /* Finish compression cycle */ ret = drive_compressor(f, data, 1); @@ -338,8 +334,7 @@ archive_compressor_gzip_close(struct archive_write_filter *f) "Failed to clean up compressor"); ret = ARCHIVE_FATAL; } - r1 = __archive_write_close_filter(f->next_filter); - return (r1 < ret ? r1 : ret); + return ret; } /* diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_lz4.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_lz4.c index 15fd494a419..cf19fadd563 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_lz4.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_lz4.c @@ -223,16 +223,11 @@ static int archive_filter_lz4_open(struct archive_write_filter *f) { struct private_data *data = (struct private_data *)f->data; - int ret; size_t required_size; static size_t const bkmap[] = { 64 * 1024, 256 * 1024, 1 * 1024 * 1024, 4 * 1024 * 1024 }; size_t pre_block_size; - ret = __archive_write_open_filter(f->next_filter); - if (ret != 0) - return (ret); - if (data->block_maximum_size < 4) data->block_size = bkmap[0]; else @@ -343,7 +338,7 @@ static int archive_filter_lz4_close(struct archive_write_filter *f) { struct private_data *data = (struct private_data *)f->data; - int ret, r1; + int ret; /* Finish compression cycle. */ ret = (int)lz4_write_one_block(f, NULL, 0); @@ -366,9 +361,7 @@ archive_filter_lz4_close(struct archive_write_filter *f) ret = __archive_write_filter(f->next_filter, data->out_buffer, data->out - data->out_buffer); } - - r1 = __archive_write_close_filter(f->next_filter); - return (r1 < ret ? r1 : ret); + return ret; } static int diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_lzop.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_lzop.c index ad705c4a068..3bd9062e4d3 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_lzop.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_lzop.c @@ -228,11 +228,6 @@ static int archive_write_lzop_open(struct archive_write_filter *f) { struct write_lzop *data = (struct write_lzop *)f->data; - int ret; - - ret = __archive_write_open_filter(f->next_filter); - if (ret != ARCHIVE_OK) - return (ret); switch (data->compression_level) { case 1: @@ -439,10 +434,7 @@ archive_write_lzop_close(struct archive_write_filter *f) } /* Write a zero uncompressed size as the end mark of the series of * compressed block. */ - r = __archive_write_filter(f->next_filter, &endmark, sizeof(endmark)); - if (r != ARCHIVE_OK) - return (r); - return (__archive_write_close_filter(f->next_filter)); + return __archive_write_filter(f->next_filter, &endmark, sizeof(endmark)); } #else diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_program.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_program.c index 660f693f29d..c096e7227ba 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_program.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_program.c @@ -196,10 +196,6 @@ __archive_write_program_free(struct archive_write_program_data *data) { if (data) { -#if defined(_WIN32) && !defined(__CYGWIN__) - if (data->child) - CloseHandle(data->child); -#endif free(data->program_name); free(data->child_buf); free(data); @@ -211,13 +207,8 @@ int __archive_write_program_open(struct archive_write_filter *f, struct archive_write_program_data *data, const char *cmd) { - pid_t child; int ret; - ret = __archive_write_open_filter(f->next_filter); - if (ret != ARCHIVE_OK) - return (ret); - if (data->child_buf == NULL) { data->child_buf_len = 65536; data->child_buf_avail = 0; @@ -230,27 +221,13 @@ __archive_write_program_open(struct archive_write_filter *f, } } - child = __archive_create_child(cmd, &data->child_stdin, - &data->child_stdout); - if (child == -1) { - archive_set_error(f->archive, EINVAL, - "Can't launch external program: %s", cmd); - return (ARCHIVE_FATAL); - } -#if defined(_WIN32) && !defined(__CYGWIN__) - data->child = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, child); - if (data->child == NULL) { - close(data->child_stdin); - data->child_stdin = -1; - close(data->child_stdout); - data->child_stdout = -1; + ret = __archive_create_child(cmd, &data->child_stdin, + &data->child_stdout, &data->child); + if (ret != ARCHIVE_OK) { archive_set_error(f->archive, EINVAL, "Can't launch external program: %s", cmd); return (ARCHIVE_FATAL); } -#else - data->child = child; -#endif return (ARCHIVE_OK); } @@ -353,11 +330,11 @@ int __archive_write_program_close(struct archive_write_filter *f, struct archive_write_program_data *data) { - int ret, r1, status; + int ret, status; ssize_t bytes_read; if (data->child == 0) - return __archive_write_close_filter(f->next_filter); + return ARCHIVE_OK; ret = 0; close(data->child_stdin); @@ -409,7 +386,6 @@ cleanup: "Error closing program: %s", data->program_name); ret = ARCHIVE_FATAL; } - r1 = __archive_write_close_filter(f->next_filter); - return (r1 < ret ? r1 : ret); + return ret; } diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_uuencode.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_uuencode.c index 23d9c150d17..1ad45892192 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_uuencode.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_uuencode.c @@ -138,11 +138,6 @@ archive_filter_uuencode_open(struct archive_write_filter *f) { struct private_uuencode *state = (struct private_uuencode *)f->data; size_t bs = 65536, bpb; - int ret; - - ret = __archive_write_open_filter(f->next_filter); - if (ret != ARCHIVE_OK) - return (ret); if (f->archive->magic == ARCHIVE_WRITE_MAGIC) { /* Buffer size should be a multiple number of the of bytes @@ -257,7 +252,6 @@ static int archive_filter_uuencode_close(struct archive_write_filter *f) { struct private_uuencode *state = (struct private_uuencode *)f->data; - int ret, ret2; /* Flush remaining bytes. */ if (state->hold_len != 0) @@ -265,12 +259,8 @@ archive_filter_uuencode_close(struct archive_write_filter *f) archive_string_sprintf(&state->encoded_buff, "`\nend\n"); /* Write the last block */ archive_write_set_bytes_in_last_block(f->archive, 1); - ret = __archive_write_filter(f->next_filter, + return __archive_write_filter(f->next_filter, state->encoded_buff.s, archive_strlen(&state->encoded_buff)); - ret2 = __archive_write_close_filter(f->next_filter); - if (ret > ret2) - ret = ret2; - return (ret); } static int diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_xz.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_xz.c index 0f7c8cfc31a..8c1ebb805b1 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_xz.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_xz.c @@ -309,10 +309,6 @@ archive_compressor_xz_open(struct archive_write_filter *f) struct private_data *data = f->data; int ret; - ret = __archive_write_open_filter(f->next_filter); - if (ret != ARCHIVE_OK) - return (ret); - if (data->compressed == NULL) { size_t bs = 65536, bpb; if (f->archive->magic == ARCHIVE_WRITE_MAGIC) { @@ -448,7 +444,7 @@ static int archive_compressor_xz_close(struct archive_write_filter *f) { struct private_data *data = (struct private_data *)f->data; - int ret, r1; + int ret; ret = drive_compressor(f, data, 1); if (ret == ARCHIVE_OK) { @@ -466,8 +462,7 @@ archive_compressor_xz_close(struct archive_write_filter *f) } } lzma_end(&(data->stream)); - r1 = __archive_write_close_filter(f->next_filter); - return (r1 < ret ? r1 : ret); + return ret; } static int diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_zstd.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_zstd.c index 671fc6affba..c74a35cded2 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_zstd.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_zstd.c @@ -59,6 +59,16 @@ struct private_data { #endif }; +/* If we don't have the library use default range values (zstdcli.c v1.4.0) */ +#define CLEVEL_MIN -99 +#define CLEVEL_STD_MIN 0 /* prior to 1.3.4 and more recent without using --fast */ +#define CLEVEL_DEFAULT 3 +#define CLEVEL_STD_MAX 19 /* without using --ultra */ +#define CLEVEL_MAX 22 + +#define MINVER_NEGCLEVEL 10304 +#define MINVER_MINCLEVEL 10306 + static int archive_compressor_zstd_options(struct archive_write_filter *, const char *, const char *); static int archive_compressor_zstd_open(struct archive_write_filter *); @@ -96,7 +106,7 @@ archive_write_add_filter_zstd(struct archive *_a) 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 */ + data->compression_level = CLEVEL_DEFAULT; #if HAVE_ZSTD_H && HAVE_LIBZSTD data->cstream = ZSTD_createCStream(); if (data->cstream == NULL) { @@ -135,6 +145,31 @@ archive_compressor_zstd_free(struct archive_write_filter *f) return (ARCHIVE_OK); } +static int string_is_numeric (const char* value) +{ + size_t len = strlen(value); + size_t i; + + if (len == 0) { + return (ARCHIVE_WARN); + } + else if (len == 1 && !(value[0] >= '0' && value[0] <= '9')) { + return (ARCHIVE_WARN); + } + else if (!(value[0] >= '0' && value[0] <= '9') && + value[0] != '-' && value[0] != '+') { + return (ARCHIVE_WARN); + } + + for (i = 1; i < len; i++) { + if (!(value[i] >= '0' && value[i] <= '9')) { + return (ARCHIVE_WARN); + } + } + + return (ARCHIVE_OK); +} + /* * Set write options. */ @@ -146,12 +181,25 @@ archive_compressor_zstd_options(struct archive_write_filter *f, const char *key, 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) { + int minimum = CLEVEL_MIN; + int maximum = CLEVEL_MAX; + if (string_is_numeric(value) != ARCHIVE_OK) { + return (ARCHIVE_WARN); + } +#if HAVE_ZSTD_H && HAVE_LIBZSTD + maximum = ZSTD_maxCLevel(); +#if ZSTD_VERSION_NUMBER >= MINVER_MINCLEVEL + if (ZSTD_versionNumber() >= MINVER_MINCLEVEL) { + minimum = ZSTD_minCLevel(); + } + else #endif + if (ZSTD_versionNumber() < MINVER_NEGCLEVEL) { + minimum = CLEVEL_STD_MIN; + } +#endif + if (level < minimum || level > maximum) { return (ARCHIVE_WARN); } data->compression_level = level; @@ -172,11 +220,6 @@ 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; @@ -238,14 +281,9 @@ 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; + return drive_compressor(f, data, 1, NULL, 0); } /* @@ -307,7 +345,26 @@ archive_compressor_zstd_open(struct archive_write_filter *f) int r; archive_string_init(&as); - archive_string_sprintf(&as, "zstd -%d", data->compression_level); + /* --no-check matches library default */ + archive_strcpy(&as, "zstd --no-check"); + + if (data->compression_level < CLEVEL_STD_MIN) { + struct archive_string as2; + archive_string_init(&as2); + archive_string_sprintf(&as2, " --fast=%d", -data->compression_level); + archive_string_concat(&as, &as2); + archive_string_free(&as2); + } else { + struct archive_string as2; + archive_string_init(&as2); + archive_string_sprintf(&as2, " -%d", data->compression_level); + archive_string_concat(&as, &as2); + archive_string_free(&as2); + } + + if (data->compression_level > CLEVEL_STD_MAX) { + archive_strcat(&as, " --ultra"); + } f->write = archive_compressor_zstd_write; r = __archive_write_program_open(f, data->pdata, as.s); diff --git a/archivers/libarchive/files/libarchive/archive_write_blocksize.3 b/archivers/libarchive/files/libarchive/archive_write_blocksize.3 index afd84ea4d39..4973f999056 100644 --- a/archivers/libarchive/files/libarchive/archive_write_blocksize.3 +++ b/archivers/libarchive/files/libarchive/archive_write_blocksize.3 @@ -107,8 +107,8 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr mtree 5 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_write_data.3 b/archivers/libarchive/files/libarchive/archive_write_data.3 index 9c16cd9b4f7..bc208b45d53 100644 --- a/archivers/libarchive/files/libarchive/archive_write_data.3 +++ b/archivers/libarchive/files/libarchive/archive_write_data.3 @@ -82,9 +82,9 @@ and consider any non-negative value as success. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write_finish_entry 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr mtree 5 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_write_disk.3 b/archivers/libarchive/files/libarchive/archive_write_disk.3 index 949c9ef106f..2fa016e4547 100644 --- a/archivers/libarchive/files/libarchive/archive_write_disk.3 +++ b/archivers/libarchive/files/libarchive/archive_write_disk.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 3, 2017 +.Dd January 19, 2020 .Dt ARCHIVE_WRITE_DISK 3 .Os .Sh NAME @@ -113,7 +113,8 @@ or .Pq FreeBSD, Mac OS X for more information on file attributes. .It Cm ARCHIVE_EXTRACT_MAC_METADATA -Mac OS X specific. Restore metadata using +Mac OS X specific. +Restore metadata using .Xr copyfile 3 . By default, .Xr copyfile 3 @@ -138,6 +139,11 @@ is not specified, then SUID and SGID bits will only be restored if the default user and group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed. +.It Cm ARCHIVE_EXTRACT_SAFE_WRITES +Extract files atomically, by first creating a unique temporary file and then +renaming it to its required destination name. +This avoids a race where an application might see a partial file (or no +file) during extraction. .It Cm ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS Refuse to extract an absolute path. The default is to not refuse such paths. @@ -264,9 +270,9 @@ and functions. .\" .Sh SEE ALSO +.Xr tar 1 , .Xr archive_read 3 , .Xr archive_write 3 , -.Xr tar 1 , .Xr libarchive 3 .Sh HISTORY The diff --git a/archivers/libarchive/files/libarchive/archive_write_disk_posix.c b/archivers/libarchive/files/libarchive/archive_write_disk_posix.c index b1a0bb3843a..0168d0d411b 100644 --- a/archivers/libarchive/files/libarchive/archive_write_disk_posix.c +++ b/archivers/libarchive/files/libarchive/archive_write_disk_posix.c @@ -253,6 +253,8 @@ struct archive_write_disk { struct archive_entry *entry; /* Entry being extracted. */ char *name; /* Name of entry, possibly edited. */ struct archive_string _name_data; /* backing store for 'name' */ + char *tmpname; /* Temporary name * */ + struct archive_string _tmpname_data; /* backing store for 'tmpname' */ /* Tasks remaining for this object. */ int todo; /* Tasks deferred until end-of-archive. */ @@ -354,6 +356,7 @@ struct archive_write_disk { static int la_opendirat(int, const char *); +static int la_mktemp(struct archive_write_disk *); static void fsobj_error(int *, struct archive_string *, int, const char *, const char *); static int check_symlinks_fsobj(char *, int *, struct archive_string *, @@ -407,6 +410,30 @@ static ssize_t _archive_write_disk_data_block(struct archive *, const void *, size_t, int64_t); static int +la_mktemp(struct archive_write_disk *a) +{ + int oerrno, fd; + mode_t mode; + + archive_string_empty(&a->_tmpname_data); + archive_string_sprintf(&a->_tmpname_data, "%s.XXXXXX", a->name); + a->tmpname = a->_tmpname_data.s; + + fd = __archive_mkstemp(a->tmpname); + if (fd == -1) + return -1; + + mode = a->mode & 0777 & ~a->user_umask; + if (fchmod(fd, mode) == -1) { + oerrno = errno; + close(fd); + errno = oerrno; + return -1; + } + return fd; +} + +static int la_opendirat(int fd, const char *path) { const int flags = O_CLOEXEC #if defined(O_BINARY) @@ -419,7 +446,7 @@ la_opendirat(int fd, const char *path) { | O_PATH #elif defined(O_SEARCH) | O_SEARCH -#elif defined(O_EXEC) +#elif defined(__FreeBSD__) && defined(O_EXEC) | O_EXEC #else | O_RDONLY @@ -431,7 +458,7 @@ la_opendirat(int fd, const char *path) { errno = ENOTSUP; return (-1); } else - return (open(fd, path, flags)); + return (open(path, flags)); #else return (openat(fd, path, flags)); #endif @@ -1826,6 +1853,15 @@ finish_metadata: if (a->fd >= 0) { close(a->fd); a->fd = -1; + if (a->tmpname) { + if (rename(a->tmpname, a->name) == -1) { + archive_set_error(&a->archive, errno, + "Failed to rename temporary file"); + ret = ARCHIVE_FAILED; + unlink(a->tmpname); + } + a->tmpname = NULL; + } } /* If there's an entry, we can release it now. */ archive_entry_free(a->entry); @@ -2103,17 +2139,31 @@ restore_entry(struct archive_write_disk *a) } if (!S_ISDIR(a->st.st_mode)) { - /* A non-dir is in the way, unlink it. */ if (a->flags & ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS) (void)clear_nochange_fflags(a); - if (unlink(a->name) != 0) { - archive_set_error(&a->archive, errno, - "Can't unlink already-existing object"); - return (ARCHIVE_FAILED); + + if ((a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) && + S_ISREG(a->st.st_mode)) { + /* Use a temporary file to extract */ + if ((a->fd = la_mktemp(a)) == -1) { + archive_set_error(&a->archive, errno, + "Can't create temporary file"); + return ARCHIVE_FAILED; + } + a->pst = NULL; + en = 0; + } else { + /* A non-dir is in the way, unlink it. */ + if (unlink(a->name) != 0) { + archive_set_error(&a->archive, errno, + "Can't unlink already-existing " + "object"); + return (ARCHIVE_FAILED); + } + a->pst = NULL; + /* Try again. */ + en = create_filesystem_object(a); } - a->pst = NULL; - /* Try again. */ - en = create_filesystem_object(a); } else if (!S_ISDIR(a->mode)) { /* A dir is in the way of a non-dir, rmdir it. */ if (a->flags & ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS) @@ -2215,6 +2265,13 @@ create_filesystem_object(struct archive_write_disk *a) } free(linkname_copy); archive_string_free(&error_string); + /* + * Unlinking and linking here is really not atomic, + * but doing it right, would require us to construct + * an mktemplink() function, and then use rename(2). + */ + if (a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) + unlink(a->name); r = link(linkname, a->name) ? errno : 0; /* * New cpio and pax formats allow hardlink entries @@ -2253,6 +2310,13 @@ create_filesystem_object(struct archive_write_disk *a) linkname = archive_entry_symlink(a->entry); if (linkname != NULL) { #if HAVE_SYMLINK + /* + * Unlinking and linking here is really not atomic, + * but doing it right, would require us to construct + * an mktempsymlink() function, and then use rename(2). + */ + if (a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) + unlink(a->name); return symlink(linkname, a->name) ? errno : 0; #else return (EPERM); @@ -2288,6 +2352,7 @@ create_filesystem_object(struct archive_write_disk *a) /* POSIX requires that we fall through here. */ /* FALLTHROUGH */ case AE_IFREG: + a->tmpname = NULL; a->fd = open(a->name, O_WRONLY | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, mode); __archive_ensure_cloexec_flag(a->fd); @@ -2449,6 +2514,7 @@ _archive_write_disk_free(struct archive *_a) archive_write_disk_set_user_lookup(&a->archive, NULL, NULL, NULL); archive_entry_free(a->entry); archive_string_free(&a->_name_data); + archive_string_free(&a->_tmpname_data); archive_string_free(&a->archive.error_string); archive_string_free(&a->path_safe); a->archive.magic = 0; @@ -3544,26 +3610,16 @@ set_mode(struct archive_write_disk *a, int mode) } if (S_ISLNK(a->mode)) { +#ifdef HAVE_LCHMOD /* - * If this is a symlink, use fchmod() or lchmod(). If the + * If this is a symlink, use lchmod(). If the * platform doesn't support lchmod(), just skip it. A * platform that doesn't provide a way to set * permissions on symlinks probably ignores * permissions on symlinks, so a failure here has no * impact. */ -#ifdef HAVE_FCHMOD - if (a->fd > 0) - r2 = fchmod(a->fd, mode); - else -#endif -#ifdef HAVE_LCHMOD - r2 = lchmod(a->name, mode); -#else - /* We don't have lchmod() here and a fd is not given */ - r2 = 0; -#endif - if (r2 != 0) { + if (lchmod(a->name, mode) != 0) { switch (errno) { case ENOTSUP: case ENOSYS: @@ -3582,6 +3638,7 @@ set_mode(struct archive_write_disk *a, int mode) r = ARCHIVE_WARN; } } +#endif } else if (!S_ISDIR(a->mode)) { /* * If it's not a symlink and not a dir, then use diff --git a/archivers/libarchive/files/libarchive/archive_write_disk_private.h b/archivers/libarchive/files/libarchive/archive_write_disk_private.h index b655dea2b65..557d7e2bf34 100644 --- a/archivers/libarchive/files/libarchive/archive_write_disk_private.h +++ b/archivers/libarchive/files/libarchive/archive_write_disk_private.h @@ -26,13 +26,13 @@ * $FreeBSD: head/lib/libarchive/archive_write_disk_private.h 201086 2009-12-28 02:17:53Z kientzle $ */ +#ifndef ARCHIVE_WRITE_DISK_PRIVATE_H_INCLUDED +#define ARCHIVE_WRITE_DISK_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_WRITE_DISK_PRIVATE_H_INCLUDED -#define ARCHIVE_WRITE_DISK_PRIVATE_H_INCLUDED - #include "archive_platform_acl.h" #include "archive_acl_private.h" #include "archive_entry.h" diff --git a/archivers/libarchive/files/libarchive/archive_write_disk_windows.c b/archivers/libarchive/files/libarchive/archive_write_disk_windows.c index 8b947304bd6..0c600176cd5 100644 --- a/archivers/libarchive/files/libarchive/archive_write_disk_windows.c +++ b/archivers/libarchive/files/libarchive/archive_write_disk_windows.c @@ -165,6 +165,8 @@ struct archive_write_disk { struct archive_entry *entry; /* Entry being extracted. */ wchar_t *name; /* Name of entry, possibly edited. */ struct archive_wstring _name_data; /* backing store for 'name' */ + wchar_t *tmpname; /* Temporary name */ + struct archive_wstring _tmpname_data; /* backing store for 'tmpname' */ /* Tasks remaining for this object. */ int todo; /* Tasks deferred until end-of-archive. */ @@ -215,6 +217,7 @@ static int cleanup_pathname(struct archive_write_disk *); static int create_dir(struct archive_write_disk *, wchar_t *); static int create_parent_dir(struct archive_write_disk *, wchar_t *); static int la_chmod(const wchar_t *, mode_t); +static int la_mktemp(struct archive_write_disk *); static int older(BY_HANDLE_FILE_INFORMATION *, struct archive_entry *); static int permissive_name_w(struct archive_write_disk *); static int restore_entry(struct archive_write_disk *); @@ -534,6 +537,30 @@ exit_chmode: return (ret); } +static int +la_mktemp(struct archive_write_disk *a) +{ + int fd; + mode_t mode; + + archive_wstring_empty(&(a->_tmpname_data)); + archive_wstrcpy(&(a->_tmpname_data), a->name); + archive_wstrcat(&(a->_tmpname_data), L".XXXXXX"); + a->tmpname = a->_tmpname_data.s; + + fd = __archive_mkstemp(a->tmpname); + if (fd == -1) + return -1; + + mode = a->mode & 0777 & ~a->user_umask; + if (la_chmod(a->tmpname, mode) == -1) { + la_dosmaperr(GetLastError()); + _close(fd); + return -1; + } + return (fd); +} + static void * la_GetFunctionKernel32(const char *name) { @@ -1252,6 +1279,18 @@ _archive_write_disk_finish_entry(struct archive *_a) if (a->fh != INVALID_HANDLE_VALUE) { CloseHandle(a->fh); a->fh = INVALID_HANDLE_VALUE; + if (a->tmpname) { + /* Windows does not support atomic rename */ + disk_unlink(a->name); + if (_wrename(a->tmpname, a->name) != 0) { + la_dosmaperr(GetLastError()); + archive_set_error(&a->archive, errno, + "Failed to rename temporary file"); + ret = ARCHIVE_FAILED; + disk_unlink(a->tmpname); + } + a->tmpname = NULL; + } } /* If there's an entry, we can release it now. */ archive_entry_free(a->entry); @@ -1530,26 +1569,51 @@ restore_entry(struct archive_write_disk *a) } if (!S_ISDIR(st_mode)) { - /* Edge case: a directory symlink pointing to a file */ if (a->flags & ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS) { (void)clear_nochange_fflags(a); } - if (dirlnk) { - if (disk_rmdir(a->name) != 0) { + if ((a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) && + S_ISREG(st_mode)) { + int fd = la_mktemp(a); + + if (fd == -1) { + la_dosmaperr(GetLastError()); archive_set_error(&a->archive, errno, - "Can't unlink directory symlink"); + "Can't create temporary file"); return (ARCHIVE_FAILED); } - } else if (disk_unlink(a->name) != 0) { - /* A non-dir is in the way, unlink it. */ - archive_set_error(&a->archive, errno, - "Can't unlink already-existing object"); - return (ARCHIVE_FAILED); + a->fh = (HANDLE)_get_osfhandle(fd); + if (a->fh == INVALID_HANDLE_VALUE) { + la_dosmaperr(GetLastError()); + return (ARCHIVE_FAILED); + } + a->pst = NULL; + en = 0; + } else { + if (dirlnk) { + /* Edge case: dir symlink pointing + * to a file */ + if (disk_rmdir(a->name) != 0) { + archive_set_error(&a->archive, + errno, "Can't unlink " + "directory symlink"); + return (ARCHIVE_FAILED); + } + } else { + if (disk_unlink(a->name) != 0) { + /* A non-dir is in the way, + * unlink it. */ + archive_set_error(&a->archive, + errno, "Can't unlink " + "already-existing object"); + return (ARCHIVE_FAILED); + } + } + a->pst = NULL; + /* Try again. */ + en = create_filesystem_object(a); } - a->pst = NULL; - /* Try again. */ - en = create_filesystem_object(a); } else if (!S_ISDIR(a->mode)) { /* A dir is in the way of a non-dir, rmdir it. */ if (a->flags & ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS) @@ -1601,6 +1665,7 @@ create_filesystem_object(struct archive_write_disk *a) wchar_t *fullname; mode_t final_mode, mode; int r; + DWORD attrs = 0; /* We identify hard/symlinks according to the link names. */ /* Since link(2) and symlink(2) don't handle modes, we're done here. */ @@ -1614,6 +1679,20 @@ create_filesystem_object(struct archive_write_disk *a) errno = EINVAL; r = -1; } else { + /* + * Unlinking and linking here is really not atomic, + * but doing it right, would require us to construct + * an mktemplink() function, and then use _wrename(). + */ + if (a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) { + attrs = GetFileAttributesW(namefull); + if (attrs != INVALID_FILE_ATTRIBUTES) { + if (attrs & FILE_ATTRIBUTE_DIRECTORY) + disk_rmdir(namefull); + else + disk_unlink(namefull); + } + } r = la_CreateHardLinkW(namefull, linkfull); if (r == 0) { la_dosmaperr(GetLastError()); @@ -1650,6 +1729,18 @@ create_filesystem_object(struct archive_write_disk *a) } linkname = archive_entry_symlink_w(a->entry); if (linkname != NULL) { + /* + * Unlinking and linking here is really not atomic, + * but doing it right, would require us to construct + * an mktemplink() function, and then use _wrename(). + */ + attrs = GetFileAttributesW(a->name); + if (attrs != INVALID_FILE_ATTRIBUTES) { + if (attrs & FILE_ATTRIBUTE_DIRECTORY) + disk_rmdir(a->name); + else + disk_unlink(a->name); + } #if HAVE_SYMLINK return symlink(linkname, a->name) ? errno : 0; #else @@ -1686,6 +1777,7 @@ create_filesystem_object(struct archive_write_disk *a) /* POSIX requires that we fall through here. */ /* FALLTHROUGH */ case AE_IFREG: + a->tmpname = NULL; fullname = a->name; /* O_WRONLY | O_CREAT | O_EXCL */ a->fh = CreateFileW(fullname, GENERIC_WRITE, 0, NULL, @@ -1842,6 +1934,7 @@ _archive_write_disk_free(struct archive *_a) archive_write_disk_set_user_lookup(&a->archive, NULL, NULL, NULL); archive_entry_free(a->entry); archive_wstring_free(&a->_name_data); + archive_wstring_free(&a->_tmpname_data); archive_string_free(&a->archive.error_string); archive_wstring_free(&a->path_safe); a->archive.magic = 0; diff --git a/archivers/libarchive/files/libarchive/archive_write_filter.3 b/archivers/libarchive/files/libarchive/archive_write_filter.3 index d6fa07131a8..c83eb77b6a5 100644 --- a/archivers/libarchive/files/libarchive/archive_write_filter.3 +++ b/archivers/libarchive/files/libarchive/archive_write_filter.3 @@ -43,7 +43,7 @@ .Nm archive_write_add_filter_program , .Nm archive_write_add_filter_uuencode , .Nm archive_write_add_filter_xz , -.Nm archive_write_add_filter_zstd , +.Nm archive_write_add_filter_zstd .Nd functions enabling output filters .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -125,10 +125,10 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write 3 , .Xr archive_write_format 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr mtree 5 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_write_finish_entry.3 b/archivers/libarchive/files/libarchive/archive_write_finish_entry.3 index dc1b94b82a5..5797e16a6db 100644 --- a/archivers/libarchive/files/libarchive/archive_write_finish_entry.3 +++ b/archivers/libarchive/files/libarchive/archive_write_finish_entry.3 @@ -71,9 +71,9 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write_data 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr mtree 5 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_write_format.3 b/archivers/libarchive/files/libarchive/archive_write_format.3 index aaafb0a8617..47a74033962 100644 --- a/archivers/libarchive/files/libarchive/archive_write_format.3 +++ b/archivers/libarchive/files/libarchive/archive_write_format.3 @@ -52,7 +52,7 @@ .Nm archive_write_set_format_v7tar , .Nm archive_write_set_format_warc , .Nm archive_write_set_format_xar , -.Nm archive_write_set_format_zip , +.Nm archive_write_set_format_zip .Nd functions for creating archives .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -166,9 +166,9 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr libarchive-formats 5 , .Xr mtree 5 , diff --git a/archivers/libarchive/files/libarchive/archive_write_free.3 b/archivers/libarchive/files/libarchive/archive_write_free.3 index 1b2d07131d8..5210e2a633d 100644 --- a/archivers/libarchive/files/libarchive/archive_write_free.3 +++ b/archivers/libarchive/files/libarchive/archive_write_free.3 @@ -56,7 +56,7 @@ after calling this function, the only call that can succeed is to release the resources. This can be used to speed recovery when the archive creation must be aborted. -Note that the created archive is likely to be malformed in this case; +Note that the created archive is likely to be malformed in this case; .It Fn archive_write_close Complete the archive and invoke the close callback. .It Fn archive_write_finish @@ -89,8 +89,8 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr mtree 5 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_write_header.3 b/archivers/libarchive/files/libarchive/archive_write_header.3 index 4de58f3b9f3..2217b1871bb 100644 --- a/archivers/libarchive/files/libarchive/archive_write_header.3 +++ b/archivers/libarchive/files/libarchive/archive_write_header.3 @@ -66,8 +66,8 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr mtree 5 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_write_new.3 b/archivers/libarchive/files/libarchive/archive_write_new.3 index f05d269d3e8..788cbb85598 100644 --- a/archivers/libarchive/files/libarchive/archive_write_new.3 +++ b/archivers/libarchive/files/libarchive/archive_write_new.3 @@ -50,9 +50,9 @@ object can be found in the overview manual page for .\" .Sh ERRORS .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr mtree 5 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_write_open.3 b/archivers/libarchive/files/libarchive/archive_write_open.3 index 457873e6148..0129d10b7f2 100644 --- a/archivers/libarchive/files/libarchive/archive_write_open.3 +++ b/archivers/libarchive/files/libarchive/archive_write_open.3 @@ -200,7 +200,7 @@ On failure, the callback should invoke .Fn archive_set_error to register an error code and message and return -.Cm ARCHIVE_FATAL. +.Cm ARCHIVE_FATAL . .Pp Note that if the client-provided write callback function returns a non-zero value, that error will be propagated back to the caller @@ -234,13 +234,13 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write 3 , .Xr archive_write_blocksize 3 , .Xr archive_write_filter 3 , .Xr archive_write_format 3 , .Xr archive_write_new 3 , .Xr archive_write_set_options 3 , +.Xr libarchive 3 , .Xr cpio 5 , .Xr mtree 5 , .Xr tar 5 diff --git a/archivers/libarchive/files/libarchive/archive_write_private.h b/archivers/libarchive/files/libarchive/archive_write_private.h index 0dfd1b1bca9..27cba0392ce 100644 --- a/archivers/libarchive/files/libarchive/archive_write_private.h +++ b/archivers/libarchive/files/libarchive/archive_write_private.h @@ -25,19 +25,24 @@ * $FreeBSD: head/lib/libarchive/archive_write_private.h 201155 2009-12-29 05:20:12Z kientzle $ */ +#ifndef ARCHIVE_WRITE_PRIVATE_H_INCLUDED +#define ARCHIVE_WRITE_PRIVATE_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #ifndef __LIBARCHIVE_TEST #error This header is only to be used internally to libarchive. #endif #endif -#ifndef ARCHIVE_WRITE_PRIVATE_H_INCLUDED -#define ARCHIVE_WRITE_PRIVATE_H_INCLUDED - #include "archive.h" #include "archive_string.h" #include "archive_private.h" +#define ARCHIVE_WRITE_FILTER_STATE_NEW 1U +#define ARCHIVE_WRITE_FILTER_STATE_OPEN 2U +#define ARCHIVE_WRITE_FILTER_STATE_CLOSED 4U +#define ARCHIVE_WRITE_FILTER_STATE_FATAL 0x8000U + struct archive_write; struct archive_write_filter { @@ -55,6 +60,7 @@ struct archive_write_filter { int code; int bytes_per_block; int bytes_in_last_block; + int state; }; #if ARCHIVE_VERSION < 4000000 @@ -66,8 +72,6 @@ struct archive_write_filter *__archive_write_allocate_filter(struct archive *); int __archive_write_output(struct archive_write *, const void *, size_t); int __archive_write_nulls(struct archive_write *, size_t); int __archive_write_filter(struct archive_write_filter *, const void *, size_t); -int __archive_write_open_filter(struct archive_write_filter *); -int __archive_write_close_filter(struct archive_write_filter *); struct archive_write { struct archive archive; diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format.c b/archivers/libarchive/files/libarchive/archive_write_set_format.c index 0f706231add..7dbe7b9a2c1 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format.c 201168 2009-1 #include "archive.h" #include "archive_private.h" +#include "archive_write_set_format_private.h" /* A table that maps format codes to functions. */ static const @@ -76,3 +77,47 @@ archive_write_set_format(struct archive *a, int code) archive_set_error(a, EINVAL, "No such format"); return (ARCHIVE_FATAL); } + +void +__archive_write_entry_filetype_unsupported(struct archive *a, + struct archive_entry *entry, const char *format) +{ + const char *name = NULL; + + switch (archive_entry_filetype(entry)) { + /* + * All formats should be able to archive regular files (AE_IFREG) + */ + case AE_IFDIR: + name = "directories"; + break; + case AE_IFLNK: + name = "symbolic links"; + break; + case AE_IFCHR: + name = "character devices"; + break; + case AE_IFBLK: + name = "block devices"; + break; + case AE_IFIFO: + name = "named pipes"; + break; + case AE_IFSOCK: + name = "sockets"; + break; + default: + break; + } + + if (name != NULL) { + archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, + "%s: %s format cannot archive %s", + archive_entry_pathname(entry), format, name); + } else { + archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, + "%s: %s format cannot archive files with mode 0%lo", + archive_entry_pathname(entry), format, + (unsigned long)archive_entry_mode(entry)); + } +} 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 92a87f74e62..fb7697f659c 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include "archive_rb.h" #include "archive_string.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" /* * Codec ID @@ -164,7 +165,7 @@ struct file { mode_t mode; uint32_t crc32; - int dir:1; + signed int dir:1; }; struct _7zip { 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 253cac82efe..fc0de1e9f6f 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_ar.c 201108 200 #include "archive_entry.h" #include "archive_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" struct ar_w { uint64_t entry_bytes_remaining; diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_cpio.c b/archivers/libarchive/files/libarchive/archive_write_set_format_cpio.c index 16cefad7b5b..729f9c77559 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_cpio.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_cpio.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_cpio.c 201170 2 #include "archive_entry_locale.h" #include "archive_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" static ssize_t archive_write_cpio_data(struct archive_write *, const void *buff, size_t s); diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_cpio_newc.c b/archivers/libarchive/files/libarchive/archive_write_set_format_cpio_newc.c index 2d923cc3306..172fda62f0b 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_cpio_newc.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_cpio_newc.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_cpio_newc.c 201 #include "archive_entry_locale.h" #include "archive_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" static ssize_t archive_write_newc_data(struct archive_write *, const void *buff, size_t s); diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c b/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c index e7757c22bad..ec29c5c418e 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_gnu_tar.c 19157 #include "archive_entry_locale.h" #include "archive_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" struct gnutar { uint64_t entry_bytes_remaining; @@ -534,17 +535,9 @@ archive_write_gnutar_header(struct archive_write *a, case AE_IFBLK: tartype = '4' ; break; case AE_IFDIR: tartype = '5' ; break; case AE_IFIFO: tartype = '6' ; break; - case AE_IFSOCK: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive socket"); - ret = ARCHIVE_FAILED; - goto exit_write_header; - default: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive this (mode=0%lo)", - (unsigned long)archive_entry_mode(entry)); + default: /* AE_IFSOCK and unknown */ + __archive_write_entry_filetype_unsupported( + &a->archive, entry, "gnutar"); ret = ARCHIVE_FAILED; goto exit_write_header; } diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_iso9660.c b/archivers/libarchive/files/libarchive/archive_write_set_format_iso9660.c index badc88bad0c..7cde44c34f7 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_iso9660.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_iso9660.c @@ -289,12 +289,12 @@ struct isoent { struct extr_rec *current; } extr_rec_list; - int virtual:1; + signed int virtual:1; /* If set to one, this file type is a directory. * A convenience flag to be used as * "archive_entry_filetype(isoent->file->entry) == AE_IFDIR". */ - int dir:1; + signed int dir:1; }; struct hardlink { @@ -755,9 +755,9 @@ struct iso9660 { /* Used for making zisofs. */ struct { - int detect_magic:1; - int making:1; - int allzero:1; + signed int detect_magic:1; + signed int making:1; + signed int allzero:1; unsigned char magic_buffer[64]; int magic_cnt; @@ -3650,7 +3650,7 @@ wb_consume(struct archive_write *a, size_t size) if (size > iso9660->wbuff_remaining || iso9660->wbuff_remaining == 0) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Internal Programing error: iso9660:wb_consume()" + "Internal Programming error: iso9660:wb_consume()" " size=%jd, wbuff_remaining=%jd", (intmax_t)size, (intmax_t)iso9660->wbuff_remaining); return (ARCHIVE_FATAL); @@ -3671,7 +3671,7 @@ wb_set_offset(struct archive_write *a, int64_t off) if (iso9660->wbuff_type != WB_TO_TEMP) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Internal Programing error: iso9660:wb_set_offset()"); + "Internal Programming error: iso9660:wb_set_offset()"); return (ARCHIVE_FATAL); } @@ -5094,13 +5094,11 @@ isofile_init_hardlinks(struct iso9660 *iso9660) static void isofile_free_hardlinks(struct iso9660 *iso9660) { - struct archive_rb_node *n, *next; + struct archive_rb_node *n, *tmp; - for (n = ARCHIVE_RB_TREE_MIN(&(iso9660->hardlink_rbtree)); n;) { - next = __archive_rb_tree_iterate(&(iso9660->hardlink_rbtree), - n, ARCHIVE_RB_DIR_RIGHT); + ARCHIVE_RB_TREE_FOREACH_SAFE(n, &(iso9660->hardlink_rbtree), tmp) { + __archive_rb_tree_remove_node(&(iso9660->hardlink_rbtree), n); free(n); - n = next; } } @@ -7801,8 +7799,8 @@ struct zisofs_extract { uint64_t pz_uncompressed_size; size_t uncompressed_buffer_size; - int initialized:1; - int header_passed:1; + signed int initialized:1; + signed int header_passed:1; uint32_t pz_offset; unsigned char *block_pointers; @@ -8128,7 +8126,7 @@ zisofs_write_to_temp(struct archive_write *a, const void *buff, size_t s) { (void)buff; /* UNUSED */ (void)s; /* UNUSED */ - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Programing error"); + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Programming error"); return (ARCHIVE_FATAL); } diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c b/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c index 0f2431e6abe..aa41e9acc22 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c @@ -186,7 +186,7 @@ struct mtree_writer { #endif /* Keyword options */ int keys; -#define F_CKSUM 0x00000001 /* check sum */ +#define F_CKSUM 0x00000001 /* checksum */ #define F_DEV 0x00000002 /* device type */ #define F_DONE 0x00000004 /* directory done */ #define F_FLAGS 0x00000008 /* file flags */ @@ -371,7 +371,7 @@ mtree_quote(struct archive_string *s, const char *str) } /* - * Indent a line as mtree utility to be readable for people. + * Indent a line as the mtree utility does so it is readable for people. */ static void mtree_indent(struct mtree_writer *mtree) @@ -446,8 +446,8 @@ mtree_indent(struct mtree_writer *mtree) /* * Write /set keyword. - * Set most used value of uid,gid,mode and fflags, which are - * collected by attr_counter_set_collect() function. + * Set the most used value of uid, gid, mode and fflags, which are + * collected by the attr_counter_set_collect() function. */ static void write_global(struct mtree_writer *mtree) @@ -649,7 +649,7 @@ attr_counter_inc(struct attr_counter **top, struct attr_counter *ac, } /* - * Tabulate uid,gid,mode and fflags of a entry in order to be used for /set. + * Tabulate uid, gid, mode and fflags of a entry in order to be used for /set. */ static int attr_counter_set_collect(struct mtree_writer *mtree, struct mtree_entry *me) @@ -912,7 +912,7 @@ archive_write_mtree_header(struct archive_write *a, /* If the current file is a regular file, we have to * compute the sum of its content. - * Initialize a bunch of sum check context. */ + * Initialize a bunch of checksum context. */ if (mtree_entry->reg_info) sum_init(mtree); @@ -1265,7 +1265,7 @@ archive_write_mtree_free(struct archive_write *a) if (mtree == NULL) return (ARCHIVE_OK); - /* Make sure we dot not leave any entries. */ + /* Make sure we do not leave any entries. */ mtree_entry_register_free(mtree); archive_string_free(&mtree->cur_dirstr); archive_string_free(&mtree->ebuf); @@ -2024,7 +2024,7 @@ mtree_entry_tree_add(struct archive_write *a, struct mtree_entry **filep) if (file->parentdir.length == 0) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Internal programing error " + "Internal programming error " "in generating canonical name for %s", file->pathname.s); return (ARCHIVE_FAILED); 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 cf2a1f959e3..a2b27107195 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_pax.c 201162 20 #include "archive_entry_locale.h" #include "archive_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" struct sparse_block { struct sparse_block *next; @@ -199,6 +200,28 @@ archive_write_pax_options(struct archive_write *a, const char *key, archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "pax: invalid charset name"); return (ret); + } else if (strcmp(key, "xattrheader") == 0) { + if (val == NULL || val[0] == 0) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "pax: xattrheader requires a value"); + } else if (strcmp(val, "ALL") == 0 || + strcmp(val, "all") == 0) { + pax->flags |= WRITE_LIBARCHIVE_XATTR | WRITE_SCHILY_XATTR; + ret = ARCHIVE_OK; + } else if (strcmp(val, "SCHILY") == 0 || + strcmp(val, "schily") == 0) { + pax->flags |= WRITE_SCHILY_XATTR; + pax->flags &= ~WRITE_LIBARCHIVE_XATTR; + ret = ARCHIVE_OK; + } else if (strcmp(val, "LIBARCHIVE") == 0 || + strcmp(val, "libarchive") == 0) { + pax->flags |= WRITE_LIBARCHIVE_XATTR; + pax->flags &= ~WRITE_SCHILY_XATTR; + ret = ARCHIVE_OK; + } else + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "pax: invalid xattr header name"); + return (ret); } /* Note: The "warn" return is just to inform the options @@ -691,17 +714,9 @@ archive_write_pax_header(struct archive_write *a, } break; } - case AE_IFSOCK: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive socket"); - return (ARCHIVE_FAILED); - default: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive this (type=0%lo)", - (unsigned long) - archive_entry_filetype(entry_original)); + default: /* AE_IFSOCK and unknown */ + __archive_write_entry_filetype_unsupported( + &a->archive, entry_original, "pax"); return (ARCHIVE_FAILED); } } @@ -837,13 +852,16 @@ archive_write_pax_header(struct archive_write *a, * them do. */ r = get_entry_pathname(a, entry_main, &path, &path_length, sconv); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); - else if (r != ARCHIVE_OK) { + } else if (r != ARCHIVE_OK) { r = get_entry_pathname(a, entry_main, &path, &path_length, NULL); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); + } archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Can't translate pathname '%s' to %s", path, archive_string_conversion_charset_name(sconv)); @@ -851,12 +869,15 @@ archive_write_pax_header(struct archive_write *a, sconv = NULL;/* The header charset switches to binary mode. */ } r = get_entry_uname(a, entry_main, &uname, &uname_length, sconv); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); - else if (r != ARCHIVE_OK) { + } else if (r != ARCHIVE_OK) { r = get_entry_uname(a, entry_main, &uname, &uname_length, NULL); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); + } archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Can't translate uname '%s' to %s", uname, archive_string_conversion_charset_name(sconv)); @@ -864,12 +885,15 @@ archive_write_pax_header(struct archive_write *a, sconv = NULL;/* The header charset switches to binary mode. */ } r = get_entry_gname(a, entry_main, &gname, &gname_length, sconv); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); - else if (r != ARCHIVE_OK) { + } else if (r != ARCHIVE_OK) { r = get_entry_gname(a, entry_main, &gname, &gname_length, NULL); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); + } archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Can't translate gname '%s' to %s", gname, archive_string_conversion_charset_name(sconv)); @@ -881,13 +905,16 @@ archive_write_pax_header(struct archive_write *a, if (linkpath == NULL) { r = get_entry_symlink(a, entry_main, &linkpath, &linkpath_length, sconv); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); - else if (r != ARCHIVE_OK) { + } else if (r != ARCHIVE_OK) { r = get_entry_symlink(a, entry_main, &linkpath, &linkpath_length, NULL); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); + } archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, "Can't translate linkname '%s' to %s", linkpath, @@ -903,21 +930,29 @@ archive_write_pax_header(struct archive_write *a, if (hardlink != NULL) { r = get_entry_hardlink(a, entry_main, &hardlink, &hardlink_length, NULL); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); + } linkpath = hardlink; linkpath_length = hardlink_length; } r = get_entry_pathname(a, entry_main, &path, &path_length, NULL); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); + } r = get_entry_uname(a, entry_main, &uname, &uname_length, NULL); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); + } r = get_entry_gname(a, entry_main, &gname, &gname_length, NULL); - if (r == ARCHIVE_FATAL) + if (r == ARCHIVE_FATAL) { + archive_entry_free(entry_main); return (r); + } } /* Store the header encoding first, to be nice to readers. */ @@ -1174,24 +1209,33 @@ archive_write_pax_header(struct archive_write *a, ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID | ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA | ARCHIVE_ENTRY_ACL_STYLE_COMPACT); - if (ret == ARCHIVE_FATAL) + if (ret == ARCHIVE_FATAL) { + archive_entry_free(entry_main); + archive_string_free(&entry_name); return (ARCHIVE_FATAL); + } } if (acl_types & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) { ret = add_pax_acl(a, entry_original, pax, ARCHIVE_ENTRY_ACL_TYPE_ACCESS | ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID | ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA); - if (ret == ARCHIVE_FATAL) + if (ret == ARCHIVE_FATAL) { + archive_entry_free(entry_main); + archive_string_free(&entry_name); return (ARCHIVE_FATAL); + } } if (acl_types & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) { ret = add_pax_acl(a, entry_original, pax, ARCHIVE_ENTRY_ACL_TYPE_DEFAULT | ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID | ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA); - if (ret == ARCHIVE_FATAL) + if (ret == ARCHIVE_FATAL) { + archive_entry_free(entry_main); + archive_string_free(&entry_name); return (ARCHIVE_FATAL); + } } /* We use GNU-tar-compatible sparse attributes. */ @@ -1330,8 +1374,11 @@ archive_write_pax_header(struct archive_write *a, * numeric fields, though they're less critical. */ if (__archive_write_format_header_ustar(a, ustarbuff, entry_main, -1, 0, - NULL) == ARCHIVE_FATAL) + NULL) == ARCHIVE_FATAL) { + archive_entry_free(entry_main); + archive_string_free(&entry_name); return (ARCHIVE_FATAL); + } /* If we built any extended attributes, write that entry first. */ if (archive_strlen(&(pax->pax_header)) > 0) { @@ -1396,6 +1443,8 @@ archive_write_pax_header(struct archive_write *a, archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "archive_write_pax_header: " "'x' header failed?! This can't happen.\n"); + archive_entry_free(entry_main); + archive_string_free(&entry_name); return (ARCHIVE_FATAL); } else if (r < ret) ret = r; @@ -1404,6 +1453,8 @@ archive_write_pax_header(struct archive_write *a, sparse_list_clear(pax); pax->entry_bytes_remaining = 0; pax->entry_padding = 0; + archive_entry_free(entry_main); + archive_string_free(&entry_name); return (ARCHIVE_FATAL); } @@ -1415,12 +1466,16 @@ archive_write_pax_header(struct archive_write *a, archive_strlen(&(pax->pax_header))); if (r != ARCHIVE_OK) { /* If a write fails, we're pretty much toast. */ + archive_entry_free(entry_main); + archive_string_free(&entry_name); return (ARCHIVE_FATAL); } /* Pad out the end of the entry. */ r = __archive_write_nulls(a, (size_t)pax->entry_padding); if (r != ARCHIVE_OK) { /* If a write fails, we're pretty much toast. */ + archive_entry_free(entry_main); + archive_string_free(&entry_name); return (ARCHIVE_FATAL); } pax->entry_bytes_remaining = pax->entry_padding = 0; @@ -1428,8 +1483,11 @@ archive_write_pax_header(struct archive_write *a, /* Write the header for main entry. */ r = __archive_write_output(a, ustarbuff, 512); - if (r != ARCHIVE_OK) + if (r != ARCHIVE_OK) { + archive_entry_free(entry_main); + archive_string_free(&entry_name); return (r); + } /* * Inform the client of the on-disk size we're using, so diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_private.h b/archivers/libarchive/files/libarchive/archive_write_set_format_private.h new file mode 100644 index 00000000000..e20022755f8 --- /dev/null +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_private.h @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2020 Martin Matuska + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef ARCHIVE_WRITE_SET_FORMAT_PRIVATE_H_INCLUDED +#define ARCHIVE_WRITE_SET_FORMAT_PRIVATE_H_INCLUDED + +#ifndef __LIBARCHIVE_BUILD +#ifndef __LIBARCHIVE_TEST +#error This header is only to be used internally to libarchive. +#endif +#endif + +#include "archive.h" +#include "archive_entry.h" + +void __archive_write_entry_filetype_unsupported(struct archive *a, + struct archive_entry *entry, const char *format); +#endif diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c b/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c index 600c88257a0..9e4931c95c1 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_shar.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_shar.c 189438 2 #include "archive_entry.h" #include "archive_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" struct shar { int dump; @@ -194,8 +195,8 @@ archive_write_shar_header(struct archive_write *a, struct archive_entry *entry) archive_entry_set_size(entry, 0); if (archive_entry_hardlink(entry) == NULL && archive_entry_symlink(entry) == NULL) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "shar format cannot archive this"); + __archive_write_entry_filetype_unsupported( + &a->archive, entry, "shar"); return (ARCHIVE_WARN); } } diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c b/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c index ad4ccb77ea5..d1a06bc4f7e 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_ustar.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_ustar.c 191579 #include "archive_entry_locale.h" #include "archive_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" struct ustar { uint64_t entry_bytes_remaining; @@ -512,9 +513,11 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512], } if (copy_length > 0) { if (copy_length > USTAR_uname_size) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Username too long"); - ret = ARCHIVE_FAILED; + if (tartype != 'x') { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, "Username too long"); + ret = ARCHIVE_FAILED; + } copy_length = USTAR_uname_size; } memcpy(h + USTAR_uname_offset, p, copy_length); @@ -535,9 +538,11 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512], } if (copy_length > 0) { if (strlen(p) > USTAR_gname_size) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Group name too long"); - ret = ARCHIVE_FAILED; + if (tartype != 'x') { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, "Group name too long"); + ret = ARCHIVE_FAILED; + } copy_length = USTAR_gname_size; } memcpy(h + USTAR_gname_offset, p, copy_length); @@ -609,16 +614,9 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512], case AE_IFBLK: h[USTAR_typeflag_offset] = '4' ; break; case AE_IFDIR: h[USTAR_typeflag_offset] = '5' ; break; case AE_IFIFO: h[USTAR_typeflag_offset] = '6' ; break; - case AE_IFSOCK: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive socket"); - return (ARCHIVE_FAILED); - default: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive this (mode=0%lo)", - (unsigned long)archive_entry_mode(entry)); + default: /* AE_IFSOCK and unknown */ + __archive_write_entry_filetype_unsupported( + &a->archive, entry, "ustar"); ret = ARCHIVE_FAILED; } } diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_v7tar.c b/archivers/libarchive/files/libarchive/archive_write_set_format_v7tar.c index 1fdaafd2a93..59940714412 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_v7tar.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_v7tar.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include "archive_entry_locale.h" #include "archive_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" struct v7tar { uint64_t entry_bytes_remaining; @@ -491,31 +492,11 @@ format_header_v7tar(struct archive_write *a, char h[512], case AE_IFLNK: h[V7TAR_typeflag_offset] = '2'; break; - case AE_IFCHR: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive character device"); - return (ARCHIVE_FAILED); - case AE_IFBLK: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive block device"); - return (ARCHIVE_FAILED); - case AE_IFIFO: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive fifo"); - return (ARCHIVE_FAILED); - case AE_IFSOCK: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive socket"); - return (ARCHIVE_FAILED); default: - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "tar format cannot archive this (mode=0%lo)", - (unsigned long)archive_entry_mode(entry)); + /* AE_IFBLK, AE_IFCHR, AE_IFIFO, AE_IFSOCK + * and unknown */ + __archive_write_entry_filetype_unsupported( + &a->archive, entry, "v7tar"); ret = ARCHIVE_FAILED; } } diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_warc.c b/archivers/libarchive/files/libarchive/archive_write_set_format_warc.c index edad072cf77..46b05734121 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_warc.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_warc.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include "archive_private.h" #include "archive_random_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" struct warc_s { unsigned int omit_warcinfo:1; @@ -259,10 +260,8 @@ _warc_header(struct archive_write *a, struct archive_entry *entry) return (ARCHIVE_OK); } /* just resort to erroring as per Tim's advice */ - archive_set_error( - &a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "WARC can only process regular files"); + __archive_write_entry_filetype_unsupported( + &a->archive, entry, "WARC"); return (ARCHIVE_FAILED); } @@ -333,6 +332,10 @@ xstrftime(struct archive_string *as, const char *fmt, time_t t) #if defined(HAVE_GMTIME_R) || defined(HAVE__GMTIME64_S) struct tm timeHere; #endif +#if defined(HAVE__GMTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif char strtime[100]; size_t len; @@ -340,7 +343,12 @@ xstrftime(struct archive_string *as, const char *fmt, time_t t) if ((rt = gmtime_r(&t, &timeHere)) == NULL) return; #elif defined(HAVE__GMTIME64_S) - _gmtime64_s(&timeHere, &t); + tmptime = t; + terr = _gmtime64_s(&timeHere, &tmptime); + if (terr) + rt = NULL; + else + rt = &timeHere; #else if ((rt = gmtime(&t)) == NULL) return; diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c b/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c index 5e4b90e06b3..e1c7f3a96d4 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c @@ -212,8 +212,8 @@ struct file { struct heap_data data; struct archive_string script; - int virtual:1; - int dir:1; + signed int virtual:1; + signed int dir:1; }; struct hardlink { @@ -411,6 +411,8 @@ xar_options(struct archive_write *a, const char *key, const char *value) if (strcmp(key, "checksum") == 0) { if (value == NULL) xar->opt_sumalg = CKSUM_NONE; + else if (strcmp(value, "none") == 0) + xar->opt_sumalg = CKSUM_NONE; else if (strcmp(value, "sha1") == 0) xar->opt_sumalg = CKSUM_SHA1; else if (strcmp(value, "md5") == 0) @@ -429,6 +431,8 @@ xar_options(struct archive_write *a, const char *key, const char *value) if (value == NULL) xar->opt_compression = NONE; + else if (strcmp(value, "none") == 0) + xar->opt_compression = NONE; else if (strcmp(value, "gzip") == 0) xar->opt_compression = GZIP; else if (strcmp(value, "bzip2") == 0) @@ -482,6 +486,8 @@ xar_options(struct archive_write *a, const char *key, const char *value) if (strcmp(key, "toc-checksum") == 0) { if (value == NULL) xar->opt_toc_sumalg = CKSUM_NONE; + else if (strcmp(value, "none") == 0) + xar->opt_toc_sumalg = CKSUM_NONE; else if (strcmp(value, "sha1") == 0) xar->opt_toc_sumalg = CKSUM_SHA1; else if (strcmp(value, "md5") == 0) @@ -675,7 +681,8 @@ xar_write_data(struct archive_write *a, const void *buff, size_t s) { struct xar *xar; enum la_zaction run; - size_t size, rsize; + size_t size = 0; + size_t rsize; int r; xar = (struct xar *)a->format_data; @@ -696,13 +703,37 @@ xar_write_data(struct archive_write *a, const void *buff, size_t s) else run = ARCHIVE_Z_FINISH; /* Compress file data. */ - r = compression_code(&(a->archive), &(xar->stream), run); - if (r != ARCHIVE_OK && r != ARCHIVE_EOF) - return (ARCHIVE_FATAL); + for (;;) { + r = compression_code(&(a->archive), &(xar->stream), + run); + if (r != ARCHIVE_OK && r != ARCHIVE_EOF) + return (ARCHIVE_FATAL); + if (xar->stream.avail_out == 0 || + run == ARCHIVE_Z_FINISH) { + size = sizeof(xar->wbuff) - + xar->stream.avail_out; + checksum_update(&(xar->a_sumwrk), xar->wbuff, + size); + xar->cur_file->data.length += size; + if (write_to_temp(a, xar->wbuff, + size) != ARCHIVE_OK) + return (ARCHIVE_FATAL); + if (r == ARCHIVE_OK) { + /* Output buffer was full */ + xar->stream.next_out = xar->wbuff; + xar->stream.avail_out = + sizeof(xar->wbuff); + } else { + /* ARCHIVE_EOF - We are done */ + break; + } + } else { + /* Compressor wants more input */ + break; + } + } rsize = s - xar->stream.avail_in; checksum_update(&(xar->e_sumwrk), buff, rsize); - size = sizeof(xar->wbuff) - xar->stream.avail_out; - checksum_update(&(xar->a_sumwrk), xar->wbuff, size); } #if !defined(_WIN32) || defined(__CYGWIN__) if (xar->bytes_remaining == @@ -739,12 +770,9 @@ xar_write_data(struct archive_write *a, const void *buff, size_t s) if (xar->cur_file->data.compression == NONE) { if (write_to_temp(a, buff, size) != ARCHIVE_OK) return (ARCHIVE_FATAL); - } else { - if (write_to_temp(a, xar->wbuff, size) != ARCHIVE_OK) - return (ARCHIVE_FATAL); + xar->cur_file->data.length += size; } xar->bytes_remaining -= rsize; - xar->cur_file->data.length += size; return (rsize); } @@ -878,11 +906,15 @@ xmlwrite_time(struct archive_write *a, xmlTextWriterPtr writer, { char timestr[100]; struct tm tm; +#if defined(HAVE__GMTIME64_S) + __time64_t tmptime; +#endif #if defined(HAVE_GMTIME_R) gmtime_r(&t, &tm); #elif defined(HAVE__GMTIME64_S) - _gmtime64_s(&tm, &t); + tmptime = t; + _gmtime64_s(&tm, &tmptime); #else memcpy(&tm, gmtime(&t), sizeof(tm)); #endif @@ -2103,7 +2135,7 @@ file_gen_utility_names(struct archive_write *a, struct file *file) while (len > 0) { size_t ll = len; - if (len > 0 && p[len-1] == '/') { + if (p[len-1] == '/') { p[len-1] = '\0'; len--; } @@ -2532,13 +2564,11 @@ file_init_hardlinks(struct xar *xar) static void file_free_hardlinks(struct xar *xar) { - struct archive_rb_node *n, *next; + struct archive_rb_node *n, *tmp; - for (n = ARCHIVE_RB_TREE_MIN(&(xar->hardlink_rbtree)); n;) { - next = __archive_rb_tree_iterate(&(xar->hardlink_rbtree), - n, ARCHIVE_RB_DIR_RIGHT); + ARCHIVE_RB_TREE_FOREACH_SAFE(n, &(xar->hardlink_rbtree), tmp) { + __archive_rb_tree_remove_node(&(xar->hardlink_rbtree), n); free(n); - n = next; } } diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c b/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c index 7fcd1a07b3f..6d485295d50 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_zip.c 201168 20 #include "archive_private.h" #include "archive_random_private.h" #include "archive_write_private.h" +#include "archive_write_set_format_private.h" #ifndef HAVE_ZLIB_H #include "archive_crc32.h" @@ -526,8 +527,8 @@ archive_write_zip_header(struct archive_write *a, struct archive_entry *entry) /* Ignore types of entries that we don't support. */ type = archive_entry_filetype(entry); if (type != AE_IFREG && type != AE_IFDIR && type != AE_IFLNK) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Filetype not supported"); + __archive_write_entry_filetype_unsupported( + &a->archive, entry, "zip"); return ARCHIVE_FAILED; }; @@ -1372,10 +1373,28 @@ dos_time(const time_t unix_time) { struct tm *t; unsigned int dt; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif /* This will not preserve time when creating/extracting the archive * on two systems with different time zones. */ +#if defined(HAVE_LOCALTIME_R) + t = localtime_r(&unix_time, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = unix_time; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + t = NULL; + else + t = &tmbuf; +#else t = localtime(&unix_time); +#endif /* MSDOS-style date/time is only between 1980-01-01 and 2107-12-31 */ if (t->tm_year < 1980 - 1900) @@ -1402,18 +1421,17 @@ path_length(struct archive_entry *entry) { mode_t type; const char *path; + size_t len; type = archive_entry_filetype(entry); path = archive_entry_pathname(entry); if (path == NULL) return (0); - if (type == AE_IFDIR && - (path[0] == '\0' || path[strlen(path) - 1] != '/')) { - return strlen(path) + 1; - } else { - return strlen(path); - } + len = strlen(path); + if (type == AE_IFDIR && (path[0] == '\0' || path[len - 1] != '/')) + ++len; /* Space for the trailing / */ + return len; } static int @@ -1461,10 +1479,8 @@ copy_path(struct archive_entry *entry, unsigned char *p) memcpy(p, path, pathlen); /* Folders are recognized by a trailing slash. */ - if ((type == AE_IFDIR) & (path[pathlen - 1] != '/')) { + if ((type == AE_IFDIR) && (path[pathlen - 1] != '/')) p[pathlen] = '/'; - p[pathlen + 1] = '\0'; - } } diff --git a/archivers/libarchive/files/libarchive/archive_write_set_options.3 b/archivers/libarchive/files/libarchive/archive_write_set_options.3 index aeb7a184865..d4a52e322ea 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_options.3 +++ b/archivers/libarchive/files/libarchive/archive_write_set_options.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 2, 2012 +.Dd January 31, 2020 .Dt ARCHIVE_WRITE_OPTIONS 3 .Os .Sh NAME @@ -70,7 +70,7 @@ specific write modules. .Fn archive_write_set_filter_option , .Fn archive_write_set_format_option .Xc -Specifies an option that will be passed to currently-registered +Specifies an option that will be passed to the currently-registered filters (including decompression filters) or format readers. .Pp If @@ -138,7 +138,7 @@ If either function returns .Cm ARCHIVE_FATAL will be returned immediately. -Otherwise, greater of the two values will be returned. +Otherwise, the greater of the two values will be returned. .\" .It Fn archive_write_set_options .Ar options @@ -170,55 +170,154 @@ only to modules whose name matches .\" .Sh OPTIONS .Bl -tag -compact -width indent +.It Filter b64encode +.Bl -tag -compact -width indent +.It Cm mode +The value is interpreted as octal digits specifying the file mode. +.It Cm name +The value specifies the file name. +.El +.It Filter bzip2 +.Bl -tag -compact -width indent +.It Cm compression-level +The value is interpreted as a decimal integer specifying the +bzip2 compression level. Supported values are from 1 to 9. +.El .It Filter gzip .Bl -tag -compact -width indent .It Cm compression-level The value is interpreted as a decimal integer specifying the -gzip compression level. +gzip compression level. Supported values are from 0 to 9. +.It Cm timestamp +Store timestamp. This is enabled by default. +.El +.It Filter lrzip +.Bl -tag -compact -width indent +.It Cm compression Ns = Ns Ar type +Use +.Ar type +as compression method. +Supported values are +.Dq bzip2 , +.Dq gzipi , +.Dq lzo +.Pq ultra fast , +and +.Dq zpaq +.Pq best, extremely slow . +.It Cm compression-level +The value is interpreted as a decimal integer specifying the +lrzip compression level. Supported values are from 1 to 9. +.El +.It Filter lz4 +.Bl -tag -compact -width indent +.It Cm compression-level +The value is interpreted as a decimal integer specifying the +lz4 compression level. Supported values are from 0 to 9. +.It Cm stream-checksum +Enable stream checksum. This is enabled by default. +.It Cm block-checksum +Enable block checksum. This is disabled by default. +.It Cm block-size +The value is interpreted as a decimal integer specifying the +lz4 compression block size. Supported values are from 4 to 7 +.Pq default . +.It Cm block-dependence +Use the previous block of the block being compressed for +a compression dictionary to improve compression ratio. +This is disabled by default. +.El +.It Filter lzop +.Bl -tag -compact -width indent +.It Cm compression-level +The value is interpreted as a decimal integer specifying the +lzop compression level. Supported values are from 1 to 9. +.El +.It Filter uuencode +.Bl -tag -compact -width indent +.It Cm mode +The value is interpreted as octal digits specifying the file mode. +.It Cm name +The value specifies the file name. .El .It Filter xz .Bl -tag -compact -width indent .It Cm compression-level The value is interpreted as a decimal integer specifying the +compression level. Supported values are from 0 to 9. +.It Cm threads +The value is interpreted as a decimal integer specifying the +number of threads for multi-threaded lzma compression. +If supported, the default value is read from +.Fn lzma_cputhreads . +.El +.It Filter zstd +.Bl -tag -compact -width indent +.It Cm compression-level +The value is interpreted as a decimal integer specifying the +compression level. Supported values depend on the library version, +common values are from 1 to 22. +.El +.It Format 7zip +.Bl -tag -compact -width indent +.It Cm compression +The value is one of +.Dq store , +.Dq deflate , +.Dq bzip2 , +.Dq lzma1 , +.Dq lzma2 +or +.Dq ppmd +to indicate how the following entries should be compressed. +Note that this setting is ignored for directories, symbolic links, +and other special entries. +.It Cm compression-level +The value is interpreted as a decimal integer specifying the compression level. +Values between 0 and 9 are supported. +The interpretation of the compression level depends on the chosen +compression method. .El -.It Format mtree +.It Format cpio .Bl -tag -compact -width indent -.It Cm cksum , Cm device , Cm flags , Cm gid , Cm gname , Cm indent , Cm link , Cm md5 , Cm mode , Cm nlink , Cm rmd160 , Cm sha1 , Cm sha256 , Cm sha384 , Cm sha512 , Cm size , Cm time , Cm uid , Cm uname -Enable a particular keyword in the mtree output. -Prefix with an exclamation mark to disable the corresponding keyword. -The default is equivalent to -.Dq device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname . -.It Cm all -Enables all of the above keywords. -.It Cm use-set -Enables generation of -.Cm /set -lines that specify default values for the following files and/or directories. -.It Cm indent -XXX needs explanation XXX +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file names. +.El +.It Format gnutar +.Bl -tag -compact -width indent +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file, group and user names. .El .It Format iso9660 - volume metadata These options are used to set standard ISO9660 metadata. .Bl -tag -compact -width indent .It Cm abstract-file Ns = Ns Ar filename The file with the specified name will be identified in the ISO9660 metadata -as holding the abstract for this volume. Default: none. +as holding the abstract for this volume. +Default: none. .It Cm application-id Ns = Ns Ar filename The file with the specified name will be identified in the ISO9660 metadata -as holding the application identifier for this volume. Default: none. +as holding the application identifier for this volume. +Default: none. .It Cm biblio-file Ns = Ns Ar filename The file with the specified name will be identified in the ISO9660 metadata -as holding the bibliography for this volume. Default: none. +as holding the bibliography for this volume. +Default: none. .It Cm copyright-file Ns = Ns Ar filename The file with the specified name will be identified in the ISO9660 metadata -as holding the copyright for this volume. Default: none. +as holding the copyright for this volume. +Default: none. .It Cm publisher Ns = Ns Ar filename The file with the specified name will be identified in the ISO9660 metadata -as holding the publisher information for this volume. Default: none. +as holding the publisher information for this volume. +Default: none. .It Cm volume-id Ns = Ns Ar string The specified string will be used as the Volume Identifier in the ISO9660 metadata. -It is limited to 32 bytes. Default: none. +It is limited to 32 bytes. +Default: none. .El .It Format iso9660 - boot support These options are used to make an ISO9660 image that can be directly @@ -266,7 +365,7 @@ If the boot image is exactly 1.2MB, 1.44MB, or 2.88MB, then the default is .Cm fd , otherwise the default is -.Cm no-emulation. +.Cm no-emulation . .El .It Format iso9660 - filename and size extensions Various extensions to the base ISO9660 format. @@ -290,7 +389,7 @@ This does not impact names stored in the Rockridge or Joliet extension area. Default: disabled. .It Cm allow-period If enabled, allows filenames to contain trailing period characters, in violation of the ISO9660 specification. -If disabled,trailing periods will be converted to underscore characters. +If disabled, trailing periods will be converted to underscore characters. This does not impact names stored in the Rockridge or Joliet extension area. Default: disabled. .It Cm allow-pvd-lowercase @@ -398,6 +497,111 @@ Specifies a filename that should not be compressed when using This option can be provided multiple times to suppress compression on many files. .El +.It Format mtree +.Bl -tag -compact -width indent +.It Cm cksum , Cm device , Cm flags , Cm gid , Cm gname , Cm indent , Cm link , Cm md5 , Cm mode , Cm nlink , Cm rmd160 , Cm sha1 , Cm sha256 , Cm sha384 , Cm sha512 , Cm size , Cm time , Cm uid , Cm uname +Enable a particular keyword in the mtree output. +Prefix with an exclamation mark to disable the corresponding keyword. +The default is equivalent to +.Dq device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname . +.It Cm all +Enables all of the above keywords. +.It Cm use-set +Enables generation of +.Cm /set +lines that specify default values for the following files and/or directories. +.It Cm indent +XXX needs explanation XXX +.El +.It Format newc +.Bl -tag -compact -width indent +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file names. +.El +.It Format pax +.Bl -tag -compact -width indent +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file, group and user names. +The value is one of +.Dq BINARY +or +.Dq UTF-8 . +With +.Dq BINARY +there is no character conversion, with +.Dq UTF-8 +names are converted to UTF-8. +.It Cm xattrheader +When storing extended attributes, this option configures which +headers should be written. The value is one of +.Dq all , +.Dq LIBARCHIVE , +or +.Dq SCHILY . +By default, both +.Dq LIBARCHIVE.xattr +and +.Dq SCHILY.xattr +headers are written. +.El +.It Format ustar +.Bl -tag -compact -width indent +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file, group and user names. +.El +.It Format v7tar +.Bl -tag -compact -width indent +.It Cm hdrcharset +The value is used as a character set name that will be +used when translating file, group and user names. +.El +.It Format warc +.Bl -tag -compact -width indent +.It Cm omit-warcinfo +Set to +.Dq true +to disable output of the warcinfo record. +.El +.It Format xar +.Bl -tag -compact -width indent +.It Cm checksum Ns = Ns Ar type +Use +.Ar type +as file checksum method. +Supported values are +.Dq none , +.Dq md5 , +and +.Dq sha1 +.Pq default . +.It Cm compression Ns = Ns Ar type +Use +.Ar type +as compression method. +Supported values are +.Dq none , +.Dq bzip2 , +.Dq gzip +.Pq default , +.Dq lzma +and +.Dq xz . +.It Cm compression_level +The value is a decimal integer from 1 to 9 specifying the compression level. +.It Cm toc-checksum Ns = Ns Ar type +Use +.Ar type +as table of contents checksum method. +Supported values are +.Dq none , +.Dq md5 +and +.Dq sha1 +.Pq default . +.El .It Format zip .Bl -tag -compact -width indent .It Cm compression @@ -408,6 +612,29 @@ or to indicate how the following entries should be compressed. Note that this setting is ignored for directories, symbolic links, and other special entries. +.It Cm compression-level +The value is interpreted as a decimal integer specifying the +compression level. +Values between 0 and 9 are supported. +A compression level of 0 switches the compression method to +.Dq store , +other values will enable +.Dq deflate +compression with the given level. +.It Cm encryption +Enable encryption using traditional zip encryption. +.It Cm encryption Ns = Ns Ar type +Use +.Ar type +as encryption type. +Supported values are +.Dq zipcrypt +.Pq traditional zip encryption , +.Dq aes128 +.Pq WinZip AES-128 encryption +and +.Dq aes256 +.Pq WinZip AES-256 encryption . .It Cm experimental This boolean option enables or disables experimental Zip features that may not be compatible with other Zip implementations. @@ -416,7 +643,8 @@ This boolean option disables CRC calculations. All CRC fields are set to zero. It should not be used except for testing purposes. .It Cm hdrcharset -This sets the character set used for filenames. +The value is used as a character set name that will be +used when translating file names. .It Cm zip64 Zip64 extensions provide additional file size information for entries larger than 4 GiB. @@ -465,9 +693,9 @@ functions. .\" .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_read_set_options 3 , -.Xr archive_write 3 +.Xr archive_write 3 , +.Xr libarchive 3 .Sh HISTORY The .Nm libarchive diff --git a/archivers/libarchive/files/libarchive/archive_write_set_passphrase.3 b/archivers/libarchive/files/libarchive/archive_write_set_passphrase.3 index 2585595e331..2db77034c76 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_passphrase.3 +++ b/archivers/libarchive/files/libarchive/archive_write_set_passphrase.3 @@ -49,7 +49,7 @@ Streaming Archive Library (libarchive, -larchive) .Sh DESCRIPTION .Bl -tag -width indent .It Fn archive_write_set_passphrase -Set a passphrase for writing an encryption archive. +Set a passphrase for writing an encrypted archive. If .Ar passphrase is @@ -59,16 +59,16 @@ or empty, this function will do nothing and will be returned. Otherwise, .Cm ARCHIVE_OK -will be returned. +will be returned. .It Fn archive_write_set_passphrase_callback -Register callback function that will be invoked to get a passphrase -for encrption if the passphrase was not set by the +Register a callback function that will be invoked to get a passphrase +for encryption if the passphrase was not set by the .Fn archive_write_set_passphrase function. .El .\" .Sh ERRORS .Sh SEE ALSO .Xr tar 1 , -.Xr libarchive 3 , .Xr archive_write 3 , -.Xr archive_write_set_options 3 +.Xr archive_write_set_options 3 , +.Xr libarchive 3 diff --git a/archivers/libarchive/files/libarchive/archive_xxhash.h b/archivers/libarchive/files/libarchive/archive_xxhash.h index 427241641a0..1c7131ca1e7 100644 --- a/archivers/libarchive/files/libarchive/archive_xxhash.h +++ b/archivers/libarchive/files/libarchive/archive_xxhash.h @@ -24,12 +24,13 @@ * */ +#ifndef ARCHIVE_XXHASH_H_INCLUDED +#define ARCHIVE_XXHASH_H_INCLUDED + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef ARCHIVE_XXHASH_H -#define ARCHIVE_XXHASH_H typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode; diff --git a/archivers/libarchive/files/libarchive/config_freebsd.h b/archivers/libarchive/files/libarchive/config_freebsd.h index be25258f946..f16fd3495ed 100644 --- a/archivers/libarchive/files/libarchive/config_freebsd.h +++ b/archivers/libarchive/files/libarchive/config_freebsd.h @@ -210,6 +210,7 @@ #define HAVE_TZSET 1 #define HAVE_UINTMAX_T 1 #define HAVE_UNISTD_H 1 +#define HAVE_UNLINKAT 1 #define HAVE_UNSETENV 1 #define HAVE_UNSIGNED_LONG_LONG 1 #define HAVE_UNSIGNED_LONG_LONG_INT 1 diff --git a/archivers/libarchive/files/libarchive/cpio.5 b/archivers/libarchive/files/libarchive/cpio.5 index 1a2886f0867..a91f0c596d2 100644 --- a/archivers/libarchive/files/libarchive/cpio.5 +++ b/archivers/libarchive/files/libarchive/cpio.5 @@ -244,7 +244,7 @@ Note that this format supports only 4 gigabyte files (unlike the older ASCII format, which supports 8 gigabyte files). .Pp In this format, hardlinked files are handled by setting the -filesize to zero for each entry except the last one that +filesize to zero for each entry except the first one that appears in the archive. .Ss New CRC Format The CRC format is identical to the new ASCII format described diff --git a/archivers/libarchive/files/libarchive/filter_fork.h b/archivers/libarchive/files/libarchive/filter_fork.h index a28272bee33..2bf290c4d9e 100644 --- a/archivers/libarchive/files/libarchive/filter_fork.h +++ b/archivers/libarchive/files/libarchive/filter_fork.h @@ -25,15 +25,20 @@ * $FreeBSD: head/lib/libarchive/filter_fork.h 201087 2009-12-28 02:18:26Z kientzle $ */ +#ifndef FILTER_FORK_H +#define FILTER_FORK_H + #ifndef __LIBARCHIVE_BUILD #error This header is only to be used internally to libarchive. #endif -#ifndef FILTER_FORK_H -#define FILTER_FORK_H - -pid_t -__archive_create_child(const char *cmd, int *child_stdin, int *child_stdout); +int +__archive_create_child(const char *cmd, int *child_stdin, int *child_stdout, +#if defined(_WIN32) && !defined(__CYGWIN__) + HANDLE *out_child); +#else + pid_t *out_child); +#endif void __archive_check_child(int in, int out); diff --git a/archivers/libarchive/files/libarchive/filter_fork_posix.c b/archivers/libarchive/files/libarchive/filter_fork_posix.c index 02dbd4bb436..ac255c4f8b2 100644 --- a/archivers/libarchive/files/libarchive/filter_fork_posix.c +++ b/archivers/libarchive/files/libarchive/filter_fork_posix.c @@ -72,8 +72,9 @@ __FBSDID("$FreeBSD: head/lib/libarchive/filter_fork.c 182958 2008-09-12 05:33:00 #include "filter_fork.h" -pid_t -__archive_create_child(const char *cmd, int *child_stdin, int *child_stdout) +int +__archive_create_child(const char *cmd, int *child_stdin, int *child_stdout, + pid_t *out_child) { pid_t child; int stdin_pipe[2], stdout_pipe[2], tmp; @@ -177,7 +178,8 @@ __archive_create_child(const char *cmd, int *child_stdin, int *child_stdout) fcntl(*child_stdout, F_SETFL, O_NONBLOCK); __archive_cmdline_free(cmdline); - return child; + *out_child = child; + return ARCHIVE_OK; #if HAVE_POSIX_SPAWNP actions_inited: @@ -192,7 +194,7 @@ stdin_opened: close(stdin_pipe[1]); state_allocated: __archive_cmdline_free(cmdline); - return -1; + return ARCHIVE_FAILED; } void diff --git a/archivers/libarchive/files/libarchive/filter_fork_windows.c b/archivers/libarchive/files/libarchive/filter_fork_windows.c index ad271fe68a1..8d11179f307 100644 --- a/archivers/libarchive/files/libarchive/filter_fork_windows.c +++ b/archivers/libarchive/files/libarchive/filter_fork_windows.c @@ -31,8 +31,9 @@ #include "filter_fork.h" -pid_t -__archive_create_child(const char *cmd, int *child_stdin, int *child_stdout) +int +__archive_create_child(const char *cmd, int *child_stdin, int *child_stdout, + HANDLE *out_child) { HANDLE childStdout[2], childStdin[2],childStderr; SECURITY_ATTRIBUTES secAtts; @@ -44,6 +45,7 @@ __archive_create_child(const char *cmd, int *child_stdin, int *child_stdout) char *arg0, *ext; int i, l; DWORD fl, fl_old; + HANDLE child; childStdout[0] = childStdout[1] = INVALID_HANDLE_VALUE; childStdin[0] = childStdin[1] = INVALID_HANDLE_VALUE; @@ -154,13 +156,20 @@ __archive_create_child(const char *cmd, int *child_stdin, int *child_stdout) *child_stdout = _open_osfhandle((intptr_t)childStdout[0], _O_RDONLY); *child_stdin = _open_osfhandle((intptr_t)childStdin[1], _O_WRONLY); + child = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, + childInfo.dwProcessId); + if (child == NULL) // INVALID_HANDLE_VALUE ? + goto fail; + + *out_child = child; + CloseHandle(childStdout[1]); CloseHandle(childStdin[0]); archive_string_free(&cmdline); archive_string_free(&fullpath); __archive_cmdline_free(acmd); - return (childInfo.dwProcessId); + return ARCHIVE_OK; fail: if (childStdout[0] != INVALID_HANDLE_VALUE) @@ -176,7 +185,7 @@ fail: archive_string_free(&cmdline); archive_string_free(&fullpath); __archive_cmdline_free(acmd); - return (-1); + return ARCHIVE_FAILED; } void diff --git a/archivers/libarchive/files/libarchive/libarchive_changes.3 b/archivers/libarchive/files/libarchive/libarchive_changes.3 index adc87febd71..6bf8db038c7 100644 --- a/archivers/libarchive/files/libarchive/libarchive_changes.3 +++ b/archivers/libarchive/files/libarchive/libarchive_changes.3 @@ -35,7 +35,6 @@ This page describes user-visible changes in libarchive3, and lists public functions and other symbols changed, deprecated or removed in libarchive3, along with their replacements if any. -.Pp .\" .Ss Multiple Filters .\" @@ -330,13 +329,13 @@ or .Li 10240 .El .Sh SEE ALSO -.Xr libarchive 3 , .Xr archive_read 3 , .Xr archive_read_filter 3 , .Xr archive_read_format 3 , .Xr archive_read_set_options 3 , +.Xr archive_util 3 , .Xr archive_write 3 , .Xr archive_write_filter 3 , .Xr archive_write_format 3 , .Xr archive_write_set_options 3 , -.Xr archive_util 3 +.Xr libarchive 3 diff --git a/archivers/libarchive/files/libarchive/libarchive_internals.3 b/archivers/libarchive/files/libarchive/libarchive_internals.3 index 8275d66e68f..d672f3e8a64 100644 --- a/archivers/libarchive/files/libarchive/libarchive_internals.3 +++ b/archivers/libarchive/files/libarchive/libarchive_internals.3 @@ -350,8 +350,8 @@ as a dedicated ZIP program. .Xr archive_entry 3 , .Xr archive_read 3 , .Xr archive_write 3 , -.Xr archive_write_disk 3 -.Xr libarchive 3 , +.Xr archive_write_disk 3 , +.Xr libarchive 3 .Sh HISTORY The .Nm libarchive diff --git a/archivers/libarchive/files/libarchive/mtree.5 b/archivers/libarchive/files/libarchive/mtree.5 index e607e4a8197..8147796f310 100644 --- a/archivers/libarchive/files/libarchive/mtree.5 +++ b/archivers/libarchive/files/libarchive/mtree.5 @@ -133,7 +133,6 @@ or .Sy char file types. The value must be one of the following forms: -.Pp .Bl -tag -width 4n .It Ar format , Ns Ar major , Ns Ar minor Ns Bo , Ns Ar subunit Bc A device with @@ -165,8 +164,8 @@ are recognized: .Sy solaris , .Sy sunos , .Sy svr3 , -.Sy svr4 , -and +.Sy svr4 , +and .Sy ultrix . .Pp See @@ -288,12 +287,10 @@ The file owner as a numeric value. .It Cm uname The file owner as a symbolic name. .El -.Pp .Sh SEE ALSO .Xr cksum 1 , .Xr find 1 , .Xr mtree 8 -.Sh BUGS .Sh HISTORY The .Nm diff --git a/archivers/libarchive/files/libarchive/tar.5 b/archivers/libarchive/files/libarchive/tar.5 index 30b837dc413..34ad4f79315 100644 --- a/archivers/libarchive/files/libarchive/tar.5 +++ b/archivers/libarchive/files/libarchive/tar.5 @@ -441,7 +441,7 @@ archives to store files much larger than the historic 8GB limit. Vendor-specific attributes used by Joerg Schilling's .Nm star implementation. -.It Cm SCHILY.acl.access , Cm SCHILY.acl.default, Cm SCHILY.acl.ace +.It Cm SCHILY.acl.access , Cm SCHILY.acl.default , Cm SCHILY.acl.ace Stores the access, default and NFSv4 ACLs as textual strings in a format that is an extension of the format specified by POSIX.1e draft 17. In particular, each user or group access specification can include @@ -456,7 +456,7 @@ The file flags. .It Cm SCHILY.realsize The full size of the file on disk. XXX explain? XXX -.It Cm SCHILY.dev, Cm SCHILY.ino , Cm SCHILY.nlinks +.It Cm SCHILY.dev , Cm SCHILY.ino , Cm SCHILY.nlinks The device number, inode number, and link count for the entry. In particular, note that a pax interchange format archive using Joerg Schilling's @@ -473,7 +473,7 @@ The time when the file was created. .Dq ctime attribute, which refers to the time when the file metadata was last changed.) -.It Cm LIBARCHIVE.xattr. Ns Ar namespace Ns . Ns Ar key +.It Cm LIBARCHIVE.xattr . Ns Ar namespace . Ns Ar key Libarchive stores POSIX.1e-style extended attributes using keys of this form. The @@ -890,7 +890,8 @@ GNU tar long pathname for the following header. .It Cm M GNU tar multivolume marker, indicating the file is a continuation of a file from the previous volume. .It Cm N -GNU tar long filename support. Deprecated. +GNU tar long filename support. +Deprecated. .It Cm S GNU tar sparse regular file. .It Cm V diff --git a/archivers/libarchive/files/libarchive/test/CMakeLists.txt b/archivers/libarchive/files/libarchive/test/CMakeLists.txt index 2f451d2a064..4be5bf4cd96 100644 --- a/archivers/libarchive/files/libarchive/test/CMakeLists.txt +++ b/archivers/libarchive/files/libarchive/test/CMakeLists.txt @@ -82,6 +82,7 @@ IF(ENABLE_TEST) test_open_file.c test_open_filename.c test_pax_filename_encoding.c + test_pax_xattr_header.c test_read_data_large.c test_read_disk.c test_read_disk_directory_traversals.c @@ -101,6 +102,7 @@ IF(ENABLE_TEST) test_read_format_7zip_encryption_header.c test_read_format_7zip_encryption_partially.c test_read_format_7zip_malformed.c + test_read_format_7zip_packinfo_digests.c test_read_format_ar.c test_read_format_cab.c test_read_format_cab_filename.c @@ -141,6 +143,7 @@ IF(ENABLE_TEST) test_read_format_lha.c test_read_format_lha_bugfix_0.c test_read_format_lha_filename.c + test_read_format_lha_filename_utf16.c test_read_format_mtree.c test_read_format_mtree_crash747.c test_read_format_pax_bz2.c @@ -188,7 +191,8 @@ IF(ENABLE_TEST) test_read_format_zip_zip64.c test_read_format_zip_with_invalid_traditional_eocd.c test_read_large.c - test_read_pax_schily_xattr.c + test_read_pax_xattr_rht_security_selinux.c + test_read_pax_xattr_schily.c test_read_pax_truncated.c test_read_position.c test_read_set_format.c diff --git a/archivers/libarchive/files/libarchive/test/list.h b/archivers/libarchive/files/libarchive/test/list.h index 0ff60e145e5..790a24ed4f4 100644 --- a/archivers/libarchive/files/libarchive/test/list.h +++ b/archivers/libarchive/files/libarchive/test/list.h @@ -170,6 +170,7 @@ DEFINE_TEST(test_pax_filename_encoding_CP932) DEFINE_TEST(test_pax_filename_encoding_KOI8R_BINARY) DEFINE_TEST(test_pax_filename_encoding_KOI8R_CP1251) DEFINE_TEST(test_pax_filename_encoding) +DEFINE_TEST(test_pax_xattr_header) DEFINE_TEST(test_read_data_large) DEFINE_TEST(test_read_disk) DEFINE_TEST(test_read_disk_directory_traversals) @@ -200,19 +201,20 @@ DEFINE_TEST(test_read_format_7zip_encryption_data) DEFINE_TEST(test_read_format_7zip_encryption_header) DEFINE_TEST(test_read_format_7zip_encryption_partially) DEFINE_TEST(test_read_format_7zip_malformed) +DEFINE_TEST(test_read_format_7zip_packinfo_digests) DEFINE_TEST(test_read_format_ar) DEFINE_TEST(test_read_format_cab) DEFINE_TEST(test_read_format_cab_filename) DEFINE_TEST(test_read_format_cpio_afio) +DEFINE_TEST(test_read_format_cpio_bin) +DEFINE_TEST(test_read_format_cpio_bin_Z) DEFINE_TEST(test_read_format_cpio_bin_be) DEFINE_TEST(test_read_format_cpio_bin_bz2) -DEFINE_TEST(test_read_format_cpio_bin) DEFINE_TEST(test_read_format_cpio_bin_gz) DEFINE_TEST(test_read_format_cpio_bin_le) DEFINE_TEST(test_read_format_cpio_bin_lzip) DEFINE_TEST(test_read_format_cpio_bin_lzma) DEFINE_TEST(test_read_format_cpio_bin_xz) -DEFINE_TEST(test_read_format_cpio_bin_Z) DEFINE_TEST(test_read_format_cpio_filename_eucJP_UTF8) DEFINE_TEST(test_read_format_cpio_filename_UTF8_eucJP) DEFINE_TEST(test_read_format_cpio_filename_UTF8_UTF8_jp) @@ -231,9 +233,9 @@ DEFINE_TEST(test_read_format_cpio_filename_KOI8R_CP1251) DEFINE_TEST(test_read_format_cpio_filename_UTF8_CP1251) DEFINE_TEST(test_read_format_cpio_odc) DEFINE_TEST(test_read_format_cpio_svr4_bzip2_rpm) -DEFINE_TEST(test_read_format_cpio_svr4c_Z) DEFINE_TEST(test_read_format_cpio_svr4_gzip) DEFINE_TEST(test_read_format_cpio_svr4_gzip_rpm) +DEFINE_TEST(test_read_format_cpio_svr4c_Z) DEFINE_TEST(test_read_format_empty) DEFINE_TEST(test_read_format_gtar_filename_eucJP_UTF8) DEFINE_TEST(test_read_format_gtar_filename_CP866_KOI8R) @@ -248,21 +250,22 @@ DEFINE_TEST(test_read_format_gtar_gz) DEFINE_TEST(test_read_format_gtar_lzma) DEFINE_TEST(test_read_format_gtar_sparse) DEFINE_TEST(test_read_format_gtar_sparse_skip_entry) +DEFINE_TEST(test_read_format_iso_Z) +DEFINE_TEST(test_read_format_iso_multi_extent) +DEFINE_TEST(test_read_format_iso_xorriso) DEFINE_TEST(test_read_format_isojoliet_bz2) DEFINE_TEST(test_read_format_isojoliet_long) DEFINE_TEST(test_read_format_isojoliet_rr) DEFINE_TEST(test_read_format_isojoliet_versioned) -DEFINE_TEST(test_read_format_iso_multi_extent) DEFINE_TEST(test_read_format_isorr_bz2) DEFINE_TEST(test_read_format_isorr_ce) DEFINE_TEST(test_read_format_isorr_new_bz2) DEFINE_TEST(test_read_format_isorr_rr_moved) -DEFINE_TEST(test_read_format_iso_xorriso) -DEFINE_TEST(test_read_format_iso_Z) DEFINE_TEST(test_read_format_isozisofs_bz2) -DEFINE_TEST(test_read_format_lha_bugfix_0) DEFINE_TEST(test_read_format_lha) +DEFINE_TEST(test_read_format_lha_bugfix_0) DEFINE_TEST(test_read_format_lha_filename) +DEFINE_TEST(test_read_format_lha_filename_UTF16) DEFINE_TEST(test_read_format_mtree) DEFINE_TEST(test_read_format_mtree_filenames_only) DEFINE_TEST(test_read_format_mtree_nochange) @@ -273,6 +276,28 @@ DEFINE_TEST(test_read_format_mtree_nonexistent_contents_file) DEFINE_TEST(test_read_format_mtree_noprint) DEFINE_TEST(test_read_format_mtree_crash747) DEFINE_TEST(test_read_format_pax_bz2) +DEFINE_TEST(test_read_format_rar_set_format) +DEFINE_TEST(test_read_format_rar_basic) +DEFINE_TEST(test_read_format_rar_subblock) +DEFINE_TEST(test_read_format_rar_noeof) +DEFINE_TEST(test_read_format_rar_unicode_UTF8) +DEFINE_TEST(test_read_format_rar_unicode_CP932) +DEFINE_TEST(test_read_format_rar_compress_normal) +DEFINE_TEST(test_read_format_rar_multi_lzss_blocks) +DEFINE_TEST(test_read_format_rar_compress_best) +DEFINE_TEST(test_read_format_rar_ppmd_lzss_conversion) +DEFINE_TEST(test_read_format_rar_binary) +DEFINE_TEST(test_read_format_rar_windows) +DEFINE_TEST(test_read_format_rar_multivolume) +DEFINE_TEST(test_read_format_rar_multivolume_skip) +DEFINE_TEST(test_read_format_rar_sfx) +DEFINE_TEST(test_read_format_rar_multivolume_stored_file) +DEFINE_TEST(test_read_format_rar_multivolume_stored_file_skip) +DEFINE_TEST(test_read_format_rar_multivolume_seek_data) +DEFINE_TEST(test_read_format_rar_multivolume_seek_multiple_files) +DEFINE_TEST(test_read_format_rar_multivolume_uncompressed_files) +DEFINE_TEST(test_read_format_rar_ppmd_use_after_free) +DEFINE_TEST(test_read_format_rar_ppmd_use_after_free2) DEFINE_TEST(test_read_format_rar5_set_format) DEFINE_TEST(test_read_format_rar5_stored) DEFINE_TEST(test_read_format_rar5_compressed) @@ -311,27 +336,11 @@ DEFINE_TEST(test_read_format_rar5_invalid_dict_reference) DEFINE_TEST(test_read_format_rar5_distance_overflow) DEFINE_TEST(test_read_format_rar5_nonempty_dir_stream) DEFINE_TEST(test_read_format_rar5_fileattr) -DEFINE_TEST(test_read_format_rar_set_format) -DEFINE_TEST(test_read_format_rar_basic) -DEFINE_TEST(test_read_format_rar_subblock) -DEFINE_TEST(test_read_format_rar_noeof) -DEFINE_TEST(test_read_format_rar_unicode_UTF8) -DEFINE_TEST(test_read_format_rar_unicode_CP932) -DEFINE_TEST(test_read_format_rar_compress_normal) -DEFINE_TEST(test_read_format_rar_multi_lzss_blocks) -DEFINE_TEST(test_read_format_rar_compress_best) -DEFINE_TEST(test_read_format_rar_ppmd_lzss_conversion) -DEFINE_TEST(test_read_format_rar_binary) -DEFINE_TEST(test_read_format_rar_windows) -DEFINE_TEST(test_read_format_rar_multivolume) -DEFINE_TEST(test_read_format_rar_multivolume_skip) -DEFINE_TEST(test_read_format_rar_sfx) -DEFINE_TEST(test_read_format_rar_multivolume_stored_file) -DEFINE_TEST(test_read_format_rar_multivolume_stored_file_skip) -DEFINE_TEST(test_read_format_rar_multivolume_seek_data) -DEFINE_TEST(test_read_format_rar_multivolume_seek_multiple_files) -DEFINE_TEST(test_read_format_rar_multivolume_uncompressed_files) -DEFINE_TEST(test_read_format_rar_ppmd_use_after_free) +DEFINE_TEST(test_read_format_rar5_different_window_size) +DEFINE_TEST(test_read_format_rar5_arm_filter_on_window_boundary) +DEFINE_TEST(test_read_format_rar5_different_solid_window_size) +DEFINE_TEST(test_read_format_rar5_different_winsize_on_merge) +DEFINE_TEST(test_read_format_rar5_block_size_is_too_small) DEFINE_TEST(test_read_format_rar_encryption_data) DEFINE_TEST(test_read_format_rar_encryption_header) DEFINE_TEST(test_read_format_rar_encryption_partially) @@ -351,7 +360,6 @@ DEFINE_TEST(test_read_format_tz) DEFINE_TEST(test_read_format_ustar_filename) DEFINE_TEST(test_read_format_warc) DEFINE_TEST(test_read_format_xar) -DEFINE_TEST(test_read_format_zip_utf8_paths) DEFINE_TEST(test_read_format_zip) DEFINE_TEST(test_read_format_zip_ppmd_one_file) DEFINE_TEST(test_read_format_zip_ppmd_one_file_blockread) @@ -371,6 +379,9 @@ DEFINE_TEST(test_read_format_zip_ppmd8_crash_1) DEFINE_TEST(test_read_format_zip_bz2_hang_on_invalid) DEFINE_TEST(test_read_format_zip_ppmd8_crash_2) DEFINE_TEST(test_read_format_zip_lzma_alone_leak) +DEFINE_TEST(test_read_format_zip_lzma_stream_end) +DEFINE_TEST(test_read_format_zip_lzma_stream_end_blockread) +DEFINE_TEST(test_read_format_zip_utf8_paths) DEFINE_TEST(test_read_format_zip_comment_stored) DEFINE_TEST(test_read_format_zip_encryption_data) DEFINE_TEST(test_read_format_zip_encryption_header) @@ -415,8 +426,9 @@ DEFINE_TEST(test_read_format_zip_with_invalid_traditional_eocd) DEFINE_TEST(test_read_format_zip_zip64a) DEFINE_TEST(test_read_format_zip_zip64b) DEFINE_TEST(test_read_large) -DEFINE_TEST(test_schily_xattr_pax) DEFINE_TEST(test_read_pax_truncated) +DEFINE_TEST(test_read_pax_xattr_rht_security_selinux) +DEFINE_TEST(test_read_pax_xattr_schily) DEFINE_TEST(test_read_position) DEFINE_TEST(test_read_set_format) DEFINE_TEST(test_read_set_wrong_format) @@ -448,8 +460,8 @@ DEFINE_TEST(test_ustar_filename_encoding_EUCJP_CP932) DEFINE_TEST(test_ustar_filename_encoding_CP932_UTF8) DEFINE_TEST(test_ustar_filenames) DEFINE_TEST(test_warn_missing_hardlink_target) -DEFINE_TEST(test_write_disk_appledouble) DEFINE_TEST(test_write_disk) +DEFINE_TEST(test_write_disk_appledouble) DEFINE_TEST(test_write_disk_failures) DEFINE_TEST(test_write_disk_hardlink) DEFINE_TEST(test_write_disk_hfs_compression) @@ -457,11 +469,11 @@ DEFINE_TEST(test_write_disk_lookup) DEFINE_TEST(test_write_disk_mac_metadata) DEFINE_TEST(test_write_disk_no_hfs_compression) DEFINE_TEST(test_write_disk_perms) +DEFINE_TEST(test_write_disk_secure) DEFINE_TEST(test_write_disk_secure744) DEFINE_TEST(test_write_disk_secure745) DEFINE_TEST(test_write_disk_secure746a) DEFINE_TEST(test_write_disk_secure746b) -DEFINE_TEST(test_write_disk_secure) DEFINE_TEST(test_write_disk_sparse) DEFINE_TEST(test_write_disk_symlink) DEFINE_TEST(test_write_disk_times) @@ -508,22 +520,22 @@ DEFINE_TEST(test_write_format_cpio_odc) DEFINE_TEST(test_write_format_gnutar) DEFINE_TEST(test_write_format_gnutar_filenames) DEFINE_TEST(test_write_format_gnutar_linknames) -DEFINE_TEST(test_write_format_iso9660_boot) DEFINE_TEST(test_write_format_iso9660) +DEFINE_TEST(test_write_format_iso9660_boot) DEFINE_TEST(test_write_format_iso9660_empty) DEFINE_TEST(test_write_format_iso9660_filename) DEFINE_TEST(test_write_format_iso9660_zisofs) -DEFINE_TEST(test_write_format_mtree_absolute_path) DEFINE_TEST(test_write_format_mtree) DEFINE_TEST(test_write_format_mtree_no_leading_dotslash) +DEFINE_TEST(test_write_format_mtree_absolute_path) DEFINE_TEST(test_write_format_mtree_classic) DEFINE_TEST(test_write_format_mtree_classic_indent) DEFINE_TEST(test_write_format_mtree_fflags) DEFINE_TEST(test_write_format_mtree_no_separator) DEFINE_TEST(test_write_format_mtree_quoted_filename) DEFINE_TEST(test_write_format_pax) -DEFINE_TEST(test_write_format_raw_b64) DEFINE_TEST(test_write_format_raw) +DEFINE_TEST(test_write_format_raw_b64) DEFINE_TEST(test_write_format_shar_empty) DEFINE_TEST(test_write_format_tar) DEFINE_TEST(test_write_format_tar_empty) 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 410582bfc7b..ae4bb5a1012 100644 --- a/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c +++ b/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c @@ -634,9 +634,11 @@ acl_match(acl_entry_t aclent, struct myacl_t *myacl) case ACL_ENTRY_TYPE_AUDIT: if (myacl->type != ARCHIVE_ENTRY_ACL_TYPE_AUDIT) return (0); + break; case ACL_ENTRY_TYPE_ALARM: if (myacl->type != ARCHIVE_ENTRY_ACL_TYPE_ALARM) return (0); + break; default: return (0); } diff --git a/archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c b/archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c index 801a7acfc85..c34f7c2e299 100644 --- a/archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c +++ b/archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c @@ -364,8 +364,8 @@ DEFINE_TEST(test_acl_platform_posix1e_read) struct archive *a; struct archive_entry *ae; int n, fd, flags, dflags; - char *func, *acl_text; - const char *acl1_text, *acl2_text, *acl3_text; + char *acl_text; + const char *func, *acl1_text, *acl2_text, *acl3_text; #if ARCHIVE_ACL_SUNOS void *aclp; int aclcnt; 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 d962af92311..ba8c1d0472f 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 @@ -48,7 +48,7 @@ test_filter_by_name(const char *filter_name, int filter_code, r = archive_write_add_filter_by_name(a, filter_name); if (r == ARCHIVE_WARN) { if (!can_filter_prog()) { - skipping("%s filter not suported on this platform", + skipping("%s filter not supported on this platform", filter_name); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); free(buff); @@ -59,7 +59,7 @@ test_filter_by_name(const char *filter_name, int filter_code, "lzma compression not supported on this platform") == 0 || strcmp(archive_error_string(a), "xz compression not supported on this platform") == 0)) { - skipping("%s filter not suported on this platform", filter_name); + skipping("%s filter not supported on this platform", filter_name); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); free(buff); return; diff --git a/archivers/libarchive/files/libarchive/test/test_archive_write_set_format_filter_by_ext.c b/archivers/libarchive/files/libarchive/test/test_archive_write_set_format_filter_by_ext.c index c073505f7c9..22345038609 100644 --- a/archivers/libarchive/files/libarchive/test/test_archive_write_set_format_filter_by_ext.c +++ b/archivers/libarchive/files/libarchive/test/test_archive_write_set_format_filter_by_ext.c @@ -30,7 +30,7 @@ __FBSDID("$FreeBSD$"); static void test_format_filter_by_ext(const char *output_file, - int format_id, int filter_id, int dot_stored, char * def_ext) + int format_id, int filter_id, int dot_stored, const char * def_ext) { struct archive_entry *ae; struct archive *a; @@ -61,7 +61,7 @@ test_format_filter_by_ext(const char *output_file, strcmp(archive_error_string(a), "xz compression not supported on this platform") == 0)) { const char *filter_name = archive_filter_name(a, 0); - skipping("%s filter not suported on this platform", filter_name); + skipping("%s filter not supported on this platform", filter_name); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); free(buff); return; diff --git a/archivers/libarchive/files/libarchive/test/test_compat_zip.c b/archivers/libarchive/files/libarchive/test/test_compat_zip.c index 39152206c1b..813ea5dc670 100644 --- a/archivers/libarchive/files/libarchive/test/test_compat_zip.c +++ b/archivers/libarchive/files/libarchive/test/test_compat_zip.c @@ -156,7 +156,7 @@ DEFINE_TEST(test_compat_zip_4) size_t s; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); /* SFX files require seek support. */ assert((a = archive_read_new()) != NULL); @@ -214,7 +214,7 @@ DEFINE_TEST(test_compat_zip_5) size_t s; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); /* Verify with seek support. * Everything works correctly here. */ @@ -370,7 +370,7 @@ DEFINE_TEST(test_compat_zip_6) size_t s; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); @@ -402,7 +402,7 @@ DEFINE_TEST(test_compat_zip_7) int i; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); for (i = 1; i < 1000; ++i) { assert((a = archive_read_new()) != NULL); @@ -436,7 +436,7 @@ DEFINE_TEST(test_compat_zip_8) size_t s; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_compat_zstd.c b/archivers/libarchive/files/libarchive/test/test_compat_zstd.c index 1d63a2845ff..134775816a9 100644 --- a/archivers/libarchive/files/libarchive/test/test_compat_zstd.c +++ b/archivers/libarchive/files/libarchive/test/test_compat_zstd.c @@ -79,4 +79,7 @@ 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"); + + /* The same sample compressed with pzstd */ + compat_zstd("test_compat_zstd_2.tar.zst"); } diff --git a/archivers/libarchive/files/libarchive/test/test_compat_zstd_2.tar.zst.uu b/archivers/libarchive/files/libarchive/test/test_compat_zstd_2.tar.zst.uu new file mode 100644 index 00000000000..6c3636c1381 --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_compat_zstd_2.tar.zst.uu @@ -0,0 +1,8 @@ +begin 664 test_compat_zstd_2.tar.zst +M4"I-&`0```"J````*+4O_018[00`\L41%I`I!%(KMV]N7BR&@9(I29\:P8D9 +ML"GMK=GZS(ZZ!!ZT[%K7J3*`"W$0PR(Y((0".0A!DE`,:6K4D_ZNQG_J=DP. +M&<:1G$L?`/U!!?M`/3*@&,!$`:C[!RHC`TH`#!.`8O]`%61`!UAQ`E"Z#U1& +M!E0#@C0`=?Q`961`"<#N`;(9'$PC'ZA$`A16ZL#%$IP``!*"=UWAE$]@"$B5 +"Q>,` +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_fuzz.c b/archivers/libarchive/files/libarchive/test/test_fuzz.c index d02fd993f97..b2654c4a339 100644 --- a/archivers/libarchive/files/libarchive/test/test_fuzz.c +++ b/archivers/libarchive/files/libarchive/test/test_fuzz.c @@ -119,7 +119,8 @@ test_fuzz(const struct files *filesets) for (i = 0; filesets[n].names[i] != NULL; ++i) { char *newraw; - tmp = slurpfile(&size, filesets[n].names[i]); + tmp = slurpfile(&size, "%s", + filesets[n].names[i]); newraw = realloc(rawimage, oldsize + size); if (!assert(newraw != NULL)) { diff --git a/archivers/libarchive/files/libarchive/test/test_open_failure.c b/archivers/libarchive/files/libarchive/test/test_open_failure.c index 845486cf921..5316a872b6a 100644 --- a/archivers/libarchive/files/libarchive/test/test_open_failure.c +++ b/archivers/libarchive/files/libarchive/test/test_open_failure.c @@ -160,11 +160,11 @@ DEFINE_TEST(test_open_failure) archive_write_open(a, &private, my_open, my_write, my_close)); assertEqualInt(1, private.open_called); assertEqualInt(0, private.write_called); - assertEqualInt(1, private.close_called); + assertEqualInt(0, private.close_called); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); assertEqualInt(1, private.open_called); assertEqualInt(0, private.write_called); - assertEqualInt(1, private.close_called); + assertEqualInt(0, private.close_called); memset(&private, 0, sizeof(private)); private.magic = MAGIC; @@ -177,11 +177,11 @@ DEFINE_TEST(test_open_failure) archive_write_open(a, &private, my_open, my_write, my_close)); assertEqualInt(1, private.open_called); assertEqualInt(0, private.write_called); - assertEqualInt(1, private.close_called); + assertEqualInt(0, private.close_called); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); assertEqualInt(1, private.open_called); assertEqualInt(0, private.write_called); - assertEqualInt(1, private.close_called); + assertEqualInt(0, private.close_called); memset(&private, 0, sizeof(private)); private.magic = MAGIC; @@ -193,11 +193,11 @@ DEFINE_TEST(test_open_failure) archive_write_open(a, &private, my_open, my_write, my_close)); assertEqualInt(1, private.open_called); assertEqualInt(0, private.write_called); - assertEqualInt(1, private.close_called); + assertEqualInt(0, private.close_called); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); assertEqualInt(1, private.open_called); assertEqualInt(0, private.write_called); - assertEqualInt(1, private.close_called); + assertEqualInt(0, private.close_called); memset(&private, 0, sizeof(private)); private.magic = MAGIC; @@ -209,10 +209,10 @@ DEFINE_TEST(test_open_failure) archive_write_open(a, &private, my_open, my_write, my_close)); assertEqualInt(1, private.open_called); assertEqualInt(0, private.write_called); - assertEqualInt(1, private.close_called); + assertEqualInt(0, private.close_called); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); assertEqualInt(1, private.open_called); assertEqualInt(0, private.write_called); - assertEqualInt(1, private.close_called); + assertEqualInt(0, private.close_called); } diff --git a/archivers/libarchive/files/libarchive/test/test_open_fd.c b/archivers/libarchive/files/libarchive/test/test_open_fd.c index ff5fab1ad45..7da8b5ebcb5 100644 --- a/archivers/libarchive/files/libarchive/test/test_open_fd.c +++ b/archivers/libarchive/files/libarchive/test/test_open_fd.c @@ -42,6 +42,7 @@ DEFINE_TEST(test_open_fd) struct archive_entry *ae; struct archive *a; int fd; + const char *skip_open_fd_err_test; #if defined(__BORLANDC__) fd = open("test.tar", O_RDWR | O_CREAT | O_BINARY); @@ -116,16 +117,18 @@ DEFINE_TEST(test_open_fd) assertEqualInt(ARCHIVE_OK, archive_read_free(a)); close(fd); - - /* - * Verify some of the error handling. - */ - 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)); - /* FD 100 shouldn't be open. */ - assertEqualIntA(a, ARCHIVE_FATAL, - archive_read_open_fd(a, 100, 512)); - assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); - assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + skip_open_fd_err_test = getenv("SKIP_OPEN_FD_ERR_TEST"); + if(skip_open_fd_err_test == NULL) { + /* + * Verify some of the error handling. + */ + 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)); + /* FD 100 shouldn't be open. */ + assertEqualIntA(a, ARCHIVE_FATAL, + archive_read_open_fd(a, 100, 512)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + } } diff --git a/archivers/libarchive/files/libarchive/test/test_pax_xattr_header.c b/archivers/libarchive/files/libarchive/test/test_pax_xattr_header.c new file mode 100644 index 00000000000..d0394aa09ed --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_pax_xattr_header.c @@ -0,0 +1,130 @@ +/*- + * Copyright (c) 2019 Martin Matuska + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "test.h" +__FBSDID("$FreeBSD$"); + +static struct archive_entry* +create_archive_entry(void) { + struct archive_entry *ae; + + assert((ae = archive_entry_new()) != NULL); + archive_entry_set_atime(ae, 2, 20); + archive_entry_set_ctime(ae, 4, 40); + archive_entry_set_mtime(ae, 5, 50); + archive_entry_copy_pathname(ae, "file"); + archive_entry_set_mode(ae, AE_IFREG | 0755); + archive_entry_set_nlink(ae, 2); + archive_entry_set_size(ae, 8); + archive_entry_xattr_add_entry(ae, "user.data1", "ABCDEFG", 7); + archive_entry_xattr_add_entry(ae, "user.data2", "XYZ", 3); + + return (ae); +} + +DEFINE_TEST(test_pax_xattr_header) +{ + static const char *reffiles[] = { + "test_pax_xattr_header_all.tar", + "test_pax_xattr_header_libarchive.tar", + "test_pax_xattr_header_schily.tar", + NULL + }; + struct archive *a; + struct archive_entry *ae; + + extract_reference_files(reffiles); + + /* First archive, no options */ + assert((a = archive_write_new()) != NULL); + assertEqualIntA(a, 0, archive_write_set_format_pax(a)); + assertEqualIntA(a, 0, archive_write_add_filter_none(a)); + assertEqualInt(0, + archive_write_open_filename(a, "test1.tar")); + ae = create_archive_entry(); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae)); + archive_entry_free(ae); + assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9)); + + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_free(a)); + + assertEqualFile("test1.tar","test_pax_xattr_header_all.tar"); + + /* Second archive, xattrheader=SCHILY */ + assert((a = archive_write_new()) != NULL); + assertEqualIntA(a, 0, archive_write_set_format_pax(a)); + assertEqualIntA(a, 0, archive_write_add_filter_none(a)); + assertEqualIntA(a, 0, archive_write_set_options(a, + "xattrheader=SCHILY")); + assertEqualInt(0, + archive_write_open_filename(a, "test2.tar")); + + ae = create_archive_entry(); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae)); + archive_entry_free(ae); + assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9)); + + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_free(a)); + + assertEqualFile("test2.tar","test_pax_xattr_header_schily.tar"); + + /* Third archive, xattrheader=LIBARCHIVE */ + assert((a = archive_write_new()) != NULL); + assertEqualIntA(a, 0, archive_write_set_format_pax(a)); + assertEqualIntA(a, 0, archive_write_add_filter_none(a)); + assertEqualIntA(a, 0, archive_write_set_options(a, + "xattrheader=LIBARCHIVE")); + assertEqualInt(0, + archive_write_open_filename(a, "test3.tar")); + + ae = create_archive_entry(); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae)); + archive_entry_free(ae); + assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9)); + + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_free(a)); + + assertEqualFile("test3.tar","test_pax_xattr_header_libarchive.tar"); + + /* Fourth archive, xattrheader=ALL */ + assert((a = archive_write_new()) != NULL); + assertEqualIntA(a, 0, archive_write_set_format_pax(a)); + assertEqualIntA(a, 0, archive_write_add_filter_none(a)); + assertEqualIntA(a, 0, archive_write_set_options(a, "xattrheader=ALL")); + assertEqualInt(0, + archive_write_open_filename(a, "test4.tar")); + + ae = create_archive_entry(); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae)); + archive_entry_free(ae); + assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9)); + + assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_write_free(a)); + + assertEqualFile("test4.tar","test_pax_xattr_header_all.tar"); +} diff --git a/archivers/libarchive/files/libarchive/test/test_pax_xattr_header_all.tar.uu b/archivers/libarchive/files/libarchive/test/test_pax_xattr_header_all.tar.uu new file mode 100644 index 00000000000..086428e7144 --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_pax_xattr_header_all.tar.uu @@ -0,0 +1,72 @@ +begin 644 test_pax_xattr_header_all.tar +M4&%X2&5A9&5R+V9I;&4````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#<U-2``,#`P,#`P(``P,#`P,#`@`#`P,#`P,#`P,S$T +M(#`P,#`P,#`P,#`U(#`Q,C`P-@`@>``````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!U<W1A<@`P,``````` +M```````````````````````````````````````````````````````````` +M```````````````````P,#`P,#`@`#`P,#`P,"`````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````R,"!C=&EM93TT+C`P,#`P,#`T"C(P(&%T:6UE +M/3(N,#`P,#`P,#(*,C`@;71I;64]-2XP,#`P,#`P-0HS-B!,24)!4D-(259% +M+GAA='1R+G5S97(N9&%T83(]5T9L80HS,2!30TA)3%DN>&%T='(N=7-E<BYD +M871A,CU865H*-#(@3$E"05)#2$E612YX871T<BYU<V5R+F1A=&$Q/5%52D12 +M159'4G<*,S4@4T-(24Q9+GAA='1R+G5S97(N9&%T83$]04)#1$5&1PH````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````&9I;&4````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````P +M,#`W-34@`#`P,#`P,"``,#`P,#`P(``P,#`P,#`P,#`Q,"`P,#`P,#`P,#`P +M-2`P,3`P,C8`(#`````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````=7-T87(`,#`````````````````````` +M```````````````````````````````````````````````````````````` +M````,#`P,#`P(``P,#`P,#`@```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````,3(S-#4V-S@````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +,```````````````` +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_pax_xattr_header_libarchive.tar.uu b/archivers/libarchive/files/libarchive/test/test_pax_xattr_header_libarchive.tar.uu new file mode 100644 index 00000000000..1d15980365c --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_pax_xattr_header_libarchive.tar.uu @@ -0,0 +1,72 @@ +begin 644 test_pax_xattr_header_libarchive.tar +M4&%X2&5A9&5R+V9I;&4````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#<U-2``,#`P,#`P(``P,#`P,#`@`#`P,#`P,#`P,C$R +M(#`P,#`P,#`P,#`U(#`Q,C`P,P`@>``````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!U<W1A<@`P,``````` +M```````````````````````````````````````````````````````````` +M```````````````````P,#`P,#`@`#`P,#`P,"`````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````R,"!C=&EM93TT+C`P,#`P,#`T"C(P(&%T:6UE +M/3(N,#`P,#`P,#(*,C`@;71I;64]-2XP,#`P,#`P-0HS-B!,24)!4D-(259% +M+GAA='1R+G5S97(N9&%T83(]5T9L80HT,B!,24)!4D-(259%+GAA='1R+G5S +M97(N9&%T83$]455*1%)%5D=2=PH````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````&9I;&4````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````P +M,#`W-34@`#`P,#`P,"``,#`P,#`P(``P,#`P,#`P,#`Q,"`P,#`P,#`P,#`P +M-2`P,3`P,C8`(#`````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````=7-T87(`,#`````````````````````` +M```````````````````````````````````````````````````````````` +M````,#`P,#`P(``P,#`P,#`@```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````,3(S-#4V-S@````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +,```````````````` +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_pax_xattr_header_schily.tar.uu b/archivers/libarchive/files/libarchive/test/test_pax_xattr_header_schily.tar.uu new file mode 100644 index 00000000000..aafea17c54d --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_pax_xattr_header_schily.tar.uu @@ -0,0 +1,72 @@ +begin 644 test_pax_xattr_header_schily.tar +M4&%X2&5A9&5R+V9I;&4````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````#`P,#<U-2``,#`P,#`P(``P,#`P,#`@`#`P,#`P,#`P,3<V +M(#`P,#`P,#`P,#`U(#`Q,C`Q-``@>``````````````````````````````` +M```````````````````````````````````````````````````````````` +M``````````````````````````````````````````!U<W1A<@`P,``````` +M```````````````````````````````````````````````````````````` +M```````````````````P,#`P,#`@`#`P,#`P,"`````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````R,"!C=&EM93TT+C`P,#`P,#`T"C(P(&%T:6UE +M/3(N,#`P,#`P,#(*,C`@;71I;64]-2XP,#`P,#`P-0HS,2!30TA)3%DN>&%T +M='(N=7-E<BYD871A,CU865H*,S4@4T-(24Q9+GAA='1R+G5S97(N9&%T83$] +M04)#1$5&1PH````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M`````````````````````````````````````````````&9I;&4````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````P +M,#`W-34@`#`P,#`P,"``,#`P,#`P(``P,#`P,#`P,#`Q,"`P,#`P,#`P,#`P +M-2`P,3`P,C8`(#`````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````````````````````````=7-T87(`,#`````````````````````` +M```````````````````````````````````````````````````````````` +M````,#`P,#`P(``P,#`P,#`@```````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M````````,3(S-#4V-S@````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +M```````````````````````````````````````````````````````````` +,```````````````` +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_read_disk_directory_traversals.c b/archivers/libarchive/files/libarchive/test/test_read_disk_directory_traversals.c index 7dd19157d4d..bbfe91ab8e5 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_disk_directory_traversals.c +++ b/archivers/libarchive/files/libarchive/test/test_read_disk_directory_traversals.c @@ -1775,7 +1775,8 @@ test_parent(void) archive_entry_clear(ae); r = archive_read_next_header2(a, ae); if (r == ARCHIVE_FAILED) { -#if defined(O_PATH) || defined(O_SEARCH) || defined(O_EXEC) +#if defined(O_PATH) || defined(O_SEARCH) || \ + (defined(__FreeBSD__) && defined(O_EXEC)) assertEqualIntA(a, ARCHIVE_OK, r); #endif /* Close the disk object. */ diff --git a/archivers/libarchive/files/libarchive/test/test_read_extract.c b/archivers/libarchive/files/libarchive/test/test_read_extract.c index cd06096eff6..2b1a21e4715 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_extract.c +++ b/archivers/libarchive/files/libarchive/test/test_read_extract.c @@ -120,7 +120,7 @@ DEFINE_TEST(test_read_extract) assertA(0 == archive_read_support_filter_all(a)); assertA(0 == archive_read_open_memory(a, buff, BUFF_SIZE)); /* Restore first entry with _EXTRACT_PERM. */ - failure("Error reading first entry", i); + failure("Error reading first entry"); assertA(0 == archive_read_next_header(a, &ae)); assertA(0 == archive_read_extract(a, ae, ARCHIVE_EXTRACT_PERM)); /* Rest of entries get restored with no flags. */ diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c b/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c index 1d1e4c75d2d..3c72595aeef 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c @@ -87,7 +87,7 @@ test_copy(int use_open_fd) * An archive file has no entry. */ static void -test_empty_archive() +test_empty_archive(void) { const char *refname = "test_read_format_7zip_empty_archive.7z"; struct archive_entry *ae; @@ -119,7 +119,7 @@ test_empty_archive() * in the archive file except for a header. */ static void -test_empty_file() +test_empty_file(void) { const char *refname = "test_read_format_7zip_empty_file.7z"; struct archive_entry *ae; @@ -609,7 +609,7 @@ test_bcj(const char *refname) * Extract a file compressed with PPMd. */ static void -test_ppmd() +test_ppmd(void) { const char *refname = "test_read_format_7zip_ppmd.7z"; struct archive_entry *ae; @@ -663,7 +663,7 @@ test_ppmd() } static void -test_symname() +test_symname(void) { const char *refname = "test_read_format_7zip_symbolic_name.7z"; struct archive_entry *ae; @@ -720,7 +720,8 @@ DEFINE_TEST(test_read_format_7zip) /* Extracting with liblzma */ if (ARCHIVE_OK != archive_read_support_filter_xz(a)) { - skipping("7zip:lzma decoding is not supported on this platform"); + skipping("7zip:lzma decoding is not supported on this " + "platform"); } else { test_symname(); test_extract_all_files("test_read_format_7zip_copy_2.7z"); @@ -795,7 +796,8 @@ DEFINE_TEST(test_read_format_7zip_lzma1) /* Extracting with liblzma */ if (ARCHIVE_OK != archive_read_support_filter_xz(a)) { - skipping("7zip:lzma decoding is not supported on this platform"); + skipping("7zip:lzma decoding is not supported on this " + "platform"); } else { test_plain_header("test_read_format_7zip_lzma1.7z"); test_extract_all_files("test_read_format_7zip_lzma1_2.7z"); @@ -804,6 +806,7 @@ DEFINE_TEST(test_read_format_7zip_lzma1) test_bcj("test_read_format_7zip_bcj2_lzma1_1.7z"); test_bcj("test_read_format_7zip_bcj2_lzma1_2.7z"); test_delta_lzma("test_read_format_7zip_delta_lzma1.7z"); + test_delta_lzma("test_read_format_7zip_delta4_lzma1.7z"); } assertEqualInt(ARCHIVE_OK, archive_read_free(a)); } @@ -816,13 +819,15 @@ DEFINE_TEST(test_read_format_7zip_lzma2) /* Extracting with liblzma */ if (ARCHIVE_OK != archive_read_support_filter_xz(a)) { - skipping("7zip:lzma decoding is not supported on this platform"); + skipping("7zip:lzma decoding is not supported on this " + "platform"); } else { test_plain_header("test_read_format_7zip_lzma2.7z"); test_bcj("test_read_format_7zip_bcj_lzma2.7z"); test_bcj("test_read_format_7zip_bcj2_lzma2_1.7z"); test_bcj("test_read_format_7zip_bcj2_lzma2_2.7z"); test_delta_lzma("test_read_format_7zip_delta_lzma2.7z"); + test_delta_lzma("test_read_format_7zip_delta4_lzma2.7z"); } assertEqualInt(ARCHIVE_OK, archive_read_free(a)); } diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu b/archivers/libarchive/files/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu new file mode 100644 index 00000000000..750769c3e4f --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu @@ -0,0 +1,407 @@ +begin 664 test_read_format_7zip_delta4_lzma1.7z +M-WJ\KR<<``2BP`@-648```````!B`````````'T^3LD`)QO*P@;2+(;6`.G? +M97%G65J_4ERCV:^K1%6D4`M822)8PY<D^7G/"B('W#;A;/.<=2:F/\-O87SZ +MD&`;L&),.K'5%'\0+@/P0N8HLMJO&R0YO^&>*%1<PY8IPQ5"L/NPIF49[<&@ +M"%+UW+)Y@7Q(U>4J=_<,7#6T/3RFH$9!9G6HOBE'<!.D2&1'&GJT+"P_(<MZ +M`E8JLGT2IS"#`;@H/"BUVB1G3$?]A%,'`E0\0[C^JNSB$5;G;,N*`A>E<0M' +M0-5!6&]I9Q(LNP>FO1,4C"0-HJF]E+UO?$`OP,0L]9]-?IRQ"#_84'^\-:$G +MT3JIHJE5;*\M)]-TIEK1=3?[2#(5!+N!_HL=H!H_R)BU+F9HX\D5.\?T=(M` +M=9=W4SJW579?/KS>1Y+'M^%0#4C+X<'3U$3C&%='!5[\EF[@4#2B9^U]FY)? +M`J8B_0+7B.I$N.X)PP3;'V&J*6VY.!&;Q7R,;M8N$$GCE7A'DD("6>XDN+^7 +M'[7.>5XJAT[)1$"IP%"H\ENNG?(IVD$"4B#R#;E,KWX0"(+I)G\I;FDXUW0: +MG\77W)*"$2C1DY7G2A@X<7?HF<0(324$@RQ94+EXCPV;A\!J_=-IO`P<X"C3 +M`+$L8ZZ:\JV3LS0*:G6F+AR0L6IX'^[L:]N:Z=&=(51-/.G$CEYV0@H!!KIF +MW3Z0MFD7TPSI]&Q#KG@:<^Q]ZTV_R*Y,>B]JI0O;215>3NFC>&L@A8ZVO8G: +M(Z+'4*>R53SX'U!L=#-R5/?1CX"K49RW+6#"?:O9#&F-VU+]XA>-H/+P67D. +MZN0JL<P5M0F:<+A7$U=BY`C.[<MC1".["0V(23:JG:K@&F!2UWA[3G$1/!0S +MU]HW$&2P6AZ[,U/^@"OI,L=T+YD1'G#E-N7LGRP%W`('P.S<3;]<Q'O"=):1 +M?9CGJ0>3&7/ST/0,:N;-K'@%MH5*U@'\5C)M\[!]I6*3,C]3NA^OCP?_.^L? +M=17`;X\L"SHC@$#^"05.3&=DUY$\848Q-SC.@/%KQ:P`5J3YZ^,Q\-/Y(6LQ +MP?6TCO<V>52!37-BUF`NWYVMM2?O%GP33Q3P%?#">B/A<F`UW*<2BE`1<1&@ +M09D(J$H;9TU5T2U3KU_+[JZ<K.89%>68F2MV1P'<E&E<GB>FKVPF);5);K1B +M>8HI`'2@,V/:[^SK\W]3Z;KMD.*+:9B<=!"$;J;;UE<C;8=?7>5*DM)][UB? +M]6V.JGB<\EVIL3WF^NX79\"D2_^:2*;[&U%K7_@JZDKEF1,3>-*</L@/V:<X +M2!F4;L)[]D>2=:I*Z6Q%6C)N$U>TY<X8KHV!/+V\1O5)$(:6W,3Z243&%"&G +MH`^,TV"5IEW!P,+V!E,XP`T[66G;>[(C`P/L=7ANK-S3-TT\L:SL.T*&Y0>E +M.GQ/D;-/0XPRM5SL()'1_^7U(H`O&?G,YY4X%=>F@:@Z-KF"#'$:)WGH[<$, +M.1GS0RT6+#EYTEZ8W(/*D52"P-B('Z;VJ('L\]<W(DA>V;[3YB+264VOM'M9 +M/U7+D0$Z>XTT<XH\N5"P5U'64)_&HM@Y-CZJ]/19H*%A!N>R0PP685OJ%/<& +MJ2F(<2MA[/"%RY6$59Q4^<^.2E4`K*^\*=EF4`D<\@V"R2>@9+%ND3R*?DVC +MY?U5RIHO)]4_)8R<3XLHQ<G@]%#MSDNL[TO%4-:H;[\*$Z@@'J><U*%_PKX_ +MM,LTP$2ITA\+->:ARO&7:7!:VK==FV^WJ;$;UM<&(,B#=E*6P*"V"T5QBA@I +M!4R$!8.UO\`TE@9K9&W_'H:$?K3:4(%MF):*_OVK^A>=63C@11U@T1I"1Q?# +M6CJRJNUTIW9D'7P=!P341-$$(0GVW+S/D5NL-H62CQW"4(";.>F1#VI1`S<B +M,>N^2//BUZ2!*N-S5?\L%+&&+]KQ%-VW#[C)/0LX@$90T;HK*16"?-10DTO0 +M>).+H4UE!^5"8EZY\AI;S5W!&-W_GR_7YP*YD*]*(84G3+C"6?R[@K<$M+8" +M'9V'M]T:$P]LZQ6A3#<)_X2D.=BY9BP7WN:17-HZ=K8E9V9>'#%.R$L/'`U2 +M%RBA6\@>;DV"%M-2Z_VL]=$Z/^)=`$-)$CDP#?3I3M&Q"21C?*R@#L:;1=** +M>6J6M\$JO&[IM%E1\K(KV#CK]1!0:?M>([H%FUMVGTU,`#D*,+%)&$FT""V` +M3=1]S*'&PDK^6@#Z,&X][V6I0Z^[B8*7P?4_5N'E9`)5*.4!K2G`=(U@/RV> +M"C?],9@_Q]#\G67)I_,)+$U?R>51LS+,1<0/C$RW$8A_)U)K0:!3GQA004^( +M:U*X8T!*T_1#W1V4@<A`6'AI=",RL"`GZ,YA>6DMD&89Q$$,KQ\3F%!52496 +M3-!]GJ5^KWZP[LWX!PPEUI'YM$#^I_KLT9X0#)6@K!PWB_<QZLHG"[`1>NF@ +MWT8/RU2Z8]AY4K"=0@6$,M"\?8/]ZFR2&1&`_!3U=IC.6Y0BN!TA.6C(>Y)E +MI%0?'CJGYHT2-)@CS.KV"@Y<=3%Z4N%FE7E--^Y651G3+2.IEL@BMU6O&1?8 +MX45]0!(O%9X!M:1>K`YGV^_O%/GM_5>+640WA4F9R0420YS<L32-@S18$%NF +MA>.DVJ\99T+VE?TO``CRDOS!&U(=)T6!7O'S!QZ!/&Z+KD=FN8U)\$M19IA^ +ME8N&#-K%0\KB=RE(0WMKCWNFP/9(//7_,0.J@:`(8F,M63OAJPG&`F/$\U>\ +ME?3``?\,Q!FODDU".=+F\0>6-QN([3HC%L$7E(5*FNR9B/R`O\&8;<:8U"H- +ML?X;3TE6(>O0>/9T)7AX+(SZ6/D?FA(.D-JE)"38_Z9*0\%&R+`7Y%"/I@__ +MWF;"!AYKPC`NQ$A]4AFT!ZXW6G-CK3HE&(*Y:LP^FG8;+QYXJBN"!P9@CWYC +MNX@XHZ>]I0YW[,6RH'.JY%\J&"UI8,UC!6+9BR$8ISK9U>KC)*JZYH[[*<QC +MTT<A4?T6`$8!BX]_4']+F5?V,'CH>XDY9`UXU/1_KC'"'5G'Y"&QDW`4H^?0 +M0ZOI`F$V4_#7+OH<),CK;&JU[^F#;AL<5FW0%]&2.AG#K,3E8:ZI<KLW\_WV +M=)NY%7GWEI3O<KB4.E5WH>WK+P[/`-['JND8[[^DAI`"ZV>]]YO#83_2-Z63 +M%G!2V?XI;66V?((CDM$I#793L`;V]-/[,8_!%6_S2H=<W4B1[TE&?Z1R!4ZK +M_C$?\(:1`K:,%VEPLT0J8!IK-A<KD[1P_OPXFC#C#'NO$B.-Q`-Y.>/G`\M6 +MQU;]^=M/BMU/?,EQBMJY>6@=21H3LPE5LF9XL/AB4+8E.WGE6X2T!O\'-(WM +M<B>EO'%E0`NU;*PKPV$PR-M9Y%1`&/MC941*O9L=CM/9_A8#*38Y6[=4E-`I +M(M2?3[;8&3''0#RMMF'CW$_6L@E1\V%9^U]/F&G=&[-!=R-XO]=I0<E&<T_3 +MQ:BT^DG<5:!YP,XAV[&\W?6]]DUG^S5*TY+'-^I%U"5F-:XH9$;N18EL##]R +M&*Z,M$RQY0!P(SM,7>O55K3CBY:66KWS>^MJQ\9$VL_2VB<H&:/P4-PM5#_E +M-C`_U3*W3=2IBPFI,OOP1,LA),&:2=E3C<<,*D#3U8E)?]Q1LEK\&D)S%$'3 +M9_$CW;D5^3-,S&`,N^G:8-B^WLX`!MB(RP@&%A!*_P\B4-+M7!NG4O9PO#Q# +MWIRFGEJ^/&ND]MB(?"XQ>B\1W1^A>=][1UMIL$].A,T,W?A5IA:W@/'.WAF: +M2*K;Y']X8D/,;&X,YW-(C:O>"*@5_EZP#J]'/X,'`OZU=@2/&;O@ZX(!^<W6 +M,[L5G.J6WH5B^T[6FA/N8A:&[R(Q$6VLXH-0/6;6$$IZ]N-Y@5-7.6T+7V3, +MB$"^W3#.)N=[LT;K+D5%Y"P:3\\,MM;I*?U<,WJ&I?:)X$.2'VJ-JV7D$#@I +M[+N(X*_K3H6VVM/:HYJ55!JMR_-:8"\$*Q>?H\7>I'OPXHV(.@N6[6&;7[<H +MR>*G'YH*M+W>S84F&^UQP/>!^$/*J6#8P);S!S3ALHDN3_BL+3>:8#XL,V3. +M:69'F<4LN!:2(9RP#:V#A)'<`%`CMNJ[^WMKOCK^K.%J_T`@RA.`LPH:_W`3 +M-#"&2!B6PZ&30#4F:E.)@1&KRIB,&JIR13OQ<O9[5)3H#B#6)W6;:MW`J;DR +M%_87)Z/4?M<):/,71H9ZX&9R*N"=NUF,PR_XZX)[YA\83\#N(HY9JGCBIHJK +MZBZ@F/;"-+]?48E)+EW<JPHTM%MZ&@*I9DZMF+S_F3?&2<)U<9^N#8#V.=`4 +M&V2/.J\8N05'<6P*\L[F$UMU,B5_X?H@'M]8O)48@N[Y;<]L-F6T[?XQ@8L8 +M4+,5<WNH^*!8&<:02,I*U*\(LEYPI^1+"KD80K7E;K.BT](QC3_6WE;7RUTA +M_>Y'R]Y(%?<G\8UK<AO2!T.D1D]PM.13C^!Z0W'Y:6TC_=>K\"/VL'(M&JII +M'VO>J3U#_:[LB-JQZ9>*2.D]2_@U1`>CDQ"L3M0W(D09XTJ$>+T)\6[8[0.P +MPWSWY$R7A.VC[]3SC&-%I$,#)0V$A_%KF."AMKSX/IG2T%BRNZHN$2<VE#E( +M[3G!!S04BNTJW@6S\:A)KUF](D.9W_C\X$/(C,,`VVE_ZPD@K"?G2:]:6',2 +M?SB?S3^L>`W]O[,:4=$*F=AM(#HRD(`[!&`Y3>]="+V`@C<5[5D6J?GMYQ<" +MDEL"N&A@L)PW_T=K7L6HBC3@-5W`S9W2DU9A5/'LQGM4*9TW[;#=LDKA[Q`H +M(XK*DP6REW[4U@-<@"%&K4^-I5Q]W>)[+33W#8X5-LY0(6)P"*H]IT$=PL2; +MV7]>=7S>WGG?H%DV>=ROMC->C]6<Q\A:ZM:$6ZH)H)>8@]YF;!!6F53BEQ_L +M`0$I*5WKS*W7G>]2<LGF0NAD39YP4B!U#9(D)7_T?!(>YHHA1A)DI11RZNU3 +M(HXMRO2C5)*;!Z4_Z_S;E66MJ<G>%"%X@KZ)>2,IA:E+O:9F4EHL#'D0U](# +MZ$1=A(5"RQPB"W:DCM$M957$TTX]?;_"W]'#,<K-C56D31@!3CIMP<@4P.@C +M&)^$879%@&@$NT3=,IL-W0I6LG.+@3EX`]MOKA_*:OFL^)?3U195&.<Y&<=; +M];J5$8N#KT/SY3^V0-1=O(@CE]CM)V>6[#T%:=BU%45@G>`(0W8HH;2WP.:> +M7X.^L`0,QC6'QB.4'<:H_;?[HH55KK+ZZ(K(<SO](B?%V$!U@[12>;#4BU/6 +MM]A-C0R[-7?A!\A$XV)ZV<;3>(#PWJ'G`A1H^M73&2TBW80SG"6\;_OXLLVX +MYX"RW]>A3W+`BH'-7?H)$L"JS&0PLA@6NZ_KV+$G$NV'N&&+PN)M'G5`7X^S +MMS8K5ANE%#L&\;1RA3@"QV;B\,S=(VM7*6P.8;7>YK]SQZ5)/T5IW\X7J/F) +MNH5RK0RF!YFU;``:"/K48?)96)H:VL/W<?PU]J@P.^#:(\"ZM-*>CSBK@FI: +MEG7O*9+W1\`<L4U>4#U^CUUD)[A!W)[`::QDFW6+FWM<ERCD02,)&UZ7;TM5 +M*>>5AA<VCW?X!"OZ#"60(=861Q^2*\?SFCX%$)RW4`T/.[ZR"=J5F<!Z^/NO +M"Z9F$W>5A[NZ/@G]K[-;E=Q/+VX04AU1D3SFJ35+AHSQ.:LL*B@;,;S@)LR> +M(C]7B^7VTH$RLX+1JGD;-V!+R,*5G%7QY<!?_`>Y`>AG>9RA"1YQOM]^O*Z# +M^.F?[5K(S6HC:U-CI\J@^=LXH<]U0=.?[:QWLN2_*H:.S/\_)XG%V<6-"3:+ +M\(K_EQVPN-IU^YY=#6Q+')ZE(BAR.DE[]QV?,&/$]UVN:H$VV&H!3S]=(Y88 +M^?CP.6IHOHQ&NT/)MOK%$E90.VO&>3\%W`0*6I@[$&"OKU1<XXJ!%;&+F'N? +M42)P4(5Y[E/)MSSU"3,$LC(B_ZG*F`]NJ2^*1*\>/Q,"7YI)EYL2Y461?+1& +MM2<\%E#K*'87RWDOF@X<;E4-LEBB$0?(CH5(ULI^S.D9:)O9D\52XM*N7>?_ +M&UEV@C3$3(!N;`>4-CU_ZCX?WFHBV"K[,!:08Q[@@`Z%).)!O>(H__Y12NQO +MV+%>&TZS;9\1Q@D3WF_'37E%S"6@N;K@^&PS;2PQY\,DRW>;X^MK/*[QW(:@ +M-`IW$&7U>3@IG%W\HDOMTO*UU>-<KLSO1="-/)L+6;]RWXB538B74Q%:O@9= +M^JQ<7M#I&^QJ+*+DYMF[5#)).:.`WF>>\P).[R-8?@JD?K.5T:8`V,N8_^@0 +MC=YQ'VNPS%3#"4\BVSY5-VJ&*D6Q(C1_0B#@<7A?>/-_Y:F^S;O4J8-0->_C +ME`/I>\%4@M:.9?:,@/`*M6]4[_H#":*BPKM&-*.XBF\WHW,P,D71^62[3?"9 +M<L,?=<]IOM0:3@4<@LFF?6R!K&7`\X'.!5Y@!0A+4ZK%VT>0>H01XC.;&/,& +MY1^?\5W9A*]LMIDHV:MDE@%?@SG"L<H?.*45[&[6FUTNP-]-4TI7=[<S`C7Z +MM/E"VL=P?'1J1N>)XLS]6;!X8B-#.%83SI.T-!WH_OZ*]6.6"(DJZB8:+4[# +MBI35;.F)C)J#^-Y1G_\/1-2Z%/^WML]Y`U`(!\%AO+R*+ROH'68P#W$]LNW4 +MN$23ZM0$*FWW>5==F.;B1#(4J&&7G;4?$7KD[4_0Y-S;G`<%O5PS_M[2\-]A +M4-EF1<XX\#Y.D=7D:R'MG"W5/4D.RD(8E:?Y;WL30A;A`9/%LS9D)W25`[DZ +M`T;[H9F\O"RXFOI;6G5TM;7&YQ;"M8Y)GD0/OI=_$1>&L$-Q)`*YG38`;^"` +MQ$&?&V04*(>I(MSZJU>0BGD$KM,FR7P<TQA*BE*6-\71#M&=H8=-H9YT+:#& +M^<+`)!Z>5Q[#<VZRRLC0>/HCE9-_]AY)VF?;R%-I!%14OB]F^RU,^&Q-2<E* +MF(9E./YP`7O;O"&*E6B3%Y6LU=*]\!K'5.7W7#M>>*XPN!&O""WQHB?EB7MV +M"*:BJ"UO6@U5(I]FX^]WAR+(*+TWZY(07;Z4;JMJ/35+;LRL*`0;'E87GUX1 +MXXBG5K!JQN^86V)%,-@BZR([\L(;]<B:I;AFK-ICT:'7K%T@(<8_(+`8#%C% +MW?](G8]V]DA1W(\%9B5`H4,.PO8FVNI>/"@FT*\#TS]UJ9&<IM:PSMDR1XK" +MS9MI2'6?<*-?A<-S;?=T)L@;U1(!>="`[]&@CSZ!CU9]Y8>(V&PIMKA*-%[A +M.67]I'72](-.H6+$I]S=NVIW&?Y9CMBGC'^U.[=+F9W5IW?X:BY$Q&7VE5VM +M."JPM-ZU!X?$YEQ#SCP3=H.3WDSV'JL[*^ZBU)2:QC=4$)*LG\18N&6#B&.) +MSF`5A9(^F60I>/Y7)YC:\(HQWGPH1@I?8*&>QP5[T*!'9^EMJ`[I9^%_[>G8 +M.$Y1V9$HT_(QKYGJ(Q=,;J0:<]2/0.4D[5M#XB\("W)S?WHS&%5W\Q0*)24B +MW47>9%4PG-92JL+CJHF("1+\P\??,G2>F"LZR<Z:>360WKT.5XQDK@/Q@U0- +MMH2GF"N[F,E`U%<H['A&#\*1)RN+!#1[I3="Y2`P0F;0;(6/2,4^U`1[ZYOT +M[-IXOO]%HY#?W^Q_5B#`&Z^<-M>L/3>U.^+SOM)/[Y!#H8(WNN56"1M)7)+9 +MZX^`QY$)VY<W<N,E/>V&C4A@5$MV6)N5QO5N[,XFLTN5(_Z/W.V2(MCY_4U9 +MIU'0<=YJOE&61^+4(+]"K%=,748Y;3;C(SRFD*LA,`Y\6%4DL!^'FUY8A-L1 +M'A)`Z#TQ@VO28XW:]>[$--59(S74PX(BG7CH3N:@MK<*!Y5*.77(A@:><URV +MPV=&._:R\RR"F<P;IIVEPID67H5RQWZ4AT^'"/1)E**TC74<E%H;U^-AHB`O +M*X>[^FTV$+8V(Z[4+?PC-,N^K%$@->=:5KJ:(4\,*H6:W#Q87-,*CL\45D1I +MZ-<BK<HP\Q6)>BH)<:H'4<L.5M9DM"OR(1L@E,X(D'J*_9*<%]'S,[&0*;== +MZ9X%/B"P\E^Y=4PE":33%BO9>=BMW(;TV+LNXVB`&U-JGZ)9"1_1ZC#<?9)% +M--<TR,M+)A"Q!SMIJ;1OZR2U\#N>T-+E@,QT][:&5UOYS^Q__\X[:=U5C&&: +MYL?V6CRK"/?%X=\K&]FRL\WD*$I@M8W=LTVS@EHN"BH,`&/65-=R2M6F,'&H +M&C=6_(_'8,6H5_55K>K#]2Q$82F7NP1[ULZOQH/Y$K[I-5A!=P?E1?;("/:_ +M=K^,`P316_*N15(@$('MM6YT^>[-&<\01RX!A_]AW?NVY%T;Q:,O8&"A&$\0 +M)C`VM8:WDF"6>H8JHDE&JL1!D]Y:50%*>`?_Y759$N'X8%38HE4P:<'N_DL. +M:E<2\AHV_WNS-O?Z=IZ].=Q$&Y4H.UK^.08H_V6/@LPF2'G2XMK#U]$I7NE[ +M2-ALYI2\T$TRJKUG1(BOH/"JEWN\O4AF3O)O0&J#796>G&/`5Z$/%]8Z(0.' +MS6T2$U5H=9/6>/9UR>'3NX\7\T:9F>I`2[!9>1:[PU"U(]\9DL8I[,YI]IMA +MN,8K3-\IIPCNL;*93)O"Z+*>_K%9]KYKY1O*,IF0@#V6E_:]3<!F`<$\)"$. +M%0_[5)7NMA,_(S_PL,.EZ?,,[P("K9ND/0Y#(*#6KS`.8)(!KXB7LQI8GG8X +M4CN_I_D5J$_+/RQ*R41OF\TO@W,&&Q*L9C2H:3BE4:M5-ZDND+G>+1`>0<W* +MWID$F/+-Z'2$)3)I<I"<[I:[)$/M_V!3&+9B/)U`^U"SC"JV)/2@L[/Y13)0 +MX5243>IHIAVI!\T@MGNU7BK43RFW^X>!9-'$VON:PR,#VU]^!"O6V)V%*\OX +M80:!WXNCD!!SGY!E[,C)SK::L-;*TB7S'WNS62B1&)[PC>U.Z;EA"H16D<#Z +M1"C/>M8$_ZR*#;#\>*DO))@"]4Q;K?[W>?2\#B)9&YH&&1#*4)FXIV_7-.FV +M-EF]2(:P=SUY3G]8)6KO"J'#(.7L'W"^#SYQN!I`DCF4>4-!'`C/*/`%23(Y +M3O=L^=4*9VE-#4"46RX(!\_7L8'%,;'G".''P\#FK=7C#D>*[,3I?%LS=8H6 +MD>]BOWEC@)*B=YI)M;#!]<(!6"SM(<J=V^+JZ(L<-@[87]4Z%H[LI[`(V0W_ +MB$;G(([?UW0C5&+W4T8S*T7`T^2')U#6.5XF%ETU3C78VL9_H`_!Y!JQW:+, +M#.'I(D'<D7,C;NAUK]S-*X@U;`8%Y;-MDVS;D=05<%'P0N>`HS*7>1R(,]:S +MIXBX8:"N7'.PR2<.)P=%[</5)4\14^$UU!%5PI5>(/N6R(C:!=!&D.O4LCN[ +M$0U4^%:/8&>*MF/8G>+`]+D0%1W=LR&O#\BPED>!L%)0@)9C][;4@>XSM\9. +M:)@-;`P;C2R[(9V``#!;2B#!((RQ_=Z6A8FC13AC)KPFS,2C#KC@0,,!=4?R +MNT"$]8]=HQTZL(EN1[58BJV!V[57>%W%7X>JOLBE`M$2#H$]D*^XG5$W&.Z" +M,UMY\(ZZ?PZ2Q8I97T1HY31%^T?DEJD<Z7><3B#IQ[R'N(RF;7Y5?FA:X>SN +M(7R,Y(H;,A)1F"=-US`;XC%_I3B;D?T7FD;8![YAU#I-;%CXW7JK^PX\LV7F +MA2=25.UV<CG/W"3W'#15S+7BC#`?A[.D85>$OSP6%60;NVVTJ4.A4_NXC%ZG +M@OV7P!"@KL+@[/0<S#`>U@YU0RLHH(\`D2/S8NE73/1759@?VG-[#^5K)-V( +MKC6BB"B-J9LJ?F(BIO&UP^-/FN6/E+:U3+;`=]/`ZK5#%!T+@O#UKQQ$3>V` +M#?N3<3,8.])L;@N:L<PP:!_I3)0*#PS*Z$5)+V'2:-IQJ7/]*Z%B^[BW>%8V +M%G.KOPN7][!"[<'*KR+>`%0ZO_69&<X]_7-J7<Q]!FHUBB8MH)@U!L-?Y6?F +M;KTS*:`0%'GP$]UKT5(^/H&%X#)>2QU.UUBS4>G2\R`)1#0[B9[]O"E4N)/X +M/RH)DT><1X-KU`4F93].H>N,X2VLZ]+;::6/Q72]V6FY42.I'7X@@09-A],I +M3!,:C#/^]1Z>LS"7-]A3=Z.>]>)V>F1T\KH9=\5.07;*4JCJA"%Z`\C>PA3V +MS>5?9UUE[S7/+R7B>K_&UGZ!Y7%0@A(T?$I=:6GZDM:)'2;2-S9/LO8OQ31K +M(M^>-'.XA.G'!TF$BW7LCL,IF@6.0JR#Y.\(P;V!X74=#QH1T0%T%C&SCI$* +M^'_2-=-9JNC"#ZJ",4\]LE*,%0[5'O<QUX8F@G5?`X=M]9X<!/&V]M1A/@YE +M1%J`V1:5]4W_(5,"GK)AJ186[YJ,VPCJ!PXM7TH[M+(-1_->KA9P\,%&QZ%F +MX`35=#VBJ>BXGVQA2XH#.SYX`),GM0SI9](2TZX1LH!+S*$BXB()*)C5L;LD +MEB6YHX1"HN4=2%H*$Y:LNC^=5-M>#$I5YA)@WM].QN[0];"PJ&F#?,.BVJRM +M27FN=O8,P?\`P=*M!EM!DGG[H_UZ8<,B>%`A%P!,O[/%@[8_5"DYRX51)=.` +M\PHFMJ90"*@XI.^8F,9'T%FYMW\E%H5.4L`XRO\.=X.+42F7Z?%=UH.#\WWG +MJ#_"]0F<4,V6G#T<7-ZA*MP+`CZ:N`KRI$N5NP1N%\2=SNAY40I2%KO\6QHG +MQF4KH'C;5@VCGO(394<E)\^B>SKUP$USQF?(B`3ZU:FP9BR)&K,KC1`$X./> +MF-TOJ2C,?Y!9K!B:J`Z''=?RG,I%\TB)I;KUTT-A66=SHB=B`D57L*\B9X:Y +M]7CA-Z&[`7"=9Y`<"1V08NK?,;CS*5A#>0SOT29]?W+:$2WP(IR`6#;7(U"U +M5?H&ZQM#?;Q$RJ0!JKC2I#K3/(!P6;2EU!<A".-P0K-/%"(7!SA[6EK5`N64 +M9'N`_$]G<@N1Q5_F?LY!<#D5Y?<>O,1:,2B%@4-;YL>TXPH0)@I7`P+BM<:Z +MD'A$\_+O7XXGNHD20)0N--U#>LA+8IBW&@FWGG%SU[A%"$$L2560DF&G&SS- +M9'V/_$0KPRN_X[QMJ^@2SK,YT4RYG,Y[19OVYO,1[RM8HV4X+<>8GD%0#9>. +M\[9%/ZMK<@#&:I79^69,&>(IMYR7E>\;$&:&@S;'?%=7X3)7J$BT>)0U_TYQ +M9<N(J7S!'3,IB>ZE9!;>)S@$)V(2M7+YD#U6:R9XKNH58<R'8@F7-BTPEP_/ +MF`KC"<%S`7Y-]7&?4P<#+0S$!JP/O[&5FD%[,9@*(NNT)10$ET-2T7_^4OF^ +MEW%<%7&+2_YN]%DT;^2/!(DKVQHU7T`DBCI5DMP!N1UP-/.%DS.IX6=F7(21 +MC!!Z46S4T0C=]3?)_&$4-L^BOAY@NH="?;*&T@MQ#X%X3=8JW1PL`_+KN!'7 +MX1OD=%E$1KNY9>$`Y0[?!,!E_%;P$@9M[J4!2V;?7J9KR@DK_5&0Z4D%.>R% +MZ):(=I#:@8@P47-WUYI]GC3)=ZHM-RGW3DV4RF-N:;/ZC;F,`%XF:J3$DR^- +MUO.%<GS)1\1P;8UU'OBOC?\<^=2>(6\"F@9D]+N>"<P#3!;2=!/R'(N%D*;8 +M4]\CEGA@NE<;-,:/$'33T&;T/G;G6%-[9M:`]Z$)2_30/>M+.`UPM7OEQ]FL +M=+*8#`?/-V6:^@Y%SEG(<..;Y;(H^$H,G%&\,DFEB?*"!6]@VYG!GOOC!NCP +M3GP'Y[:+1P$N#*F?6(UV)A?.XYS62=)&BQR:)TO^'6L6:O?TNGOHF>AE>VW3 +MQ+^7)L[9\V>8!"AT@0<?+C$:.0]9=72(O!%>/(5?/]9""`>7U]FAMD(3>IHQ +MFM)CGJ,V"3X.3!Y`BWH9:/`L%%IV03`3"CB*>Q[@>,M.GO%(M,16IR[4N-H7 +M0_F1S`[>>ZR>0L8I<U,:Q3_4^.7&63KUH)6\K"_#_F@PB\/8Y?,^,=3(C!HN +MX9QR(4UY\44.A2.<K9(VF/INB`(6+BI,.Q(<,(0_/]1ZM!+4)>041N/:1`ON +M)P)JZ15?2%&?).C&0JD<30`?_:NO=WD!HX_O;?[SFKQE1X-)C<B`>%\Z\("^ +M.SP??@UG)[9(>E$''Z.VX4CG=W5`"XDM.(ZO43K*UNWT/9:2?8AT(),]T]8S +M(D-VQM8A9O)O0Z%6U-FQA`CSH)+QSN1O#H]&B%7JS5]TDHP%/><[;6<SM.?$ +M"YJ+UXL3M\PPST(Q0!M!.RY''%!I*NXCX<!#]&CH!2[$H7T'MEYCY+3Y%0N_ +MLN2%:@61_+]T0KVU,0Q;NHPRZC.DPV8D&X4_K3.I,@^0,,F;5N.`.G0S8">B +MV#FV<S8@?^Q!%QCP9/8/A!U3IJA?9#/(',N-S,F5K-^@SO`%E$G3U!=D)M'R +M!S8S2TJA8TO1TN$UR\VRQMP,BA[PW,WF\S:KZ8%ZC^(YZDTZ19*`)CG,S]YO +MN1Z,RQI>W&`*ZQGAFSV!#"#H/B=8Q&%J\"SR8@&8<U&T34*Q^CW\/YTJI4X' +M6T7N,":9,R6EF+,"8^ZEU2+P+G5>R;`P1+6\A(\8QC/%$/.?1ITG^19+V--7 +M7A8J0;PBPT,)1REB/^984W3T;E'-EF6/QO\N<>WJ-M6\MK//H)=__J-E`'17 +M:M=Y]>J5K`:?=";=62H6^%BEO%*IF.JF`/4N_R7<1IW&[@#EJYZ"_S\W<^%B +MDRHSI!"+1=?<+J0,I-+A,Q?:K.?FGHOT-M#2;F\(-L_L:"48C+`"W#!ZU&0J +M^B)6X;P)5=7&#^E5`-:Y>[.UFGM#3X+KP1-W>^F,Q:;@T:YOV?Y]J4CIVM2L +MO(/=LOCHY@R&HP3IP9LR))TK:`OW/A=H4-HSPI."(I`[)R&CI6[4)!1J3"3F +ML;%]WD8X8O^[L1T$1#(2V;+(X&L$\F\8:>>KQ8:IB#.F).O(1L3JB^MW&%<X +M\V`EKLQ%5>F`99/E<I;2\]<O;NTK-PJ4V)5C1C<C1^O*3E%A!.[;GGAJV:,5 +MC$3OJO(,/5JI'"V@^E$2]D,&E-(@170/](9NKTG1PP#D^20MV!3!(88O[G2` +M,#<TZ#DAE1F8?@@]*!A-\^V?O'T3ZH6HT/.TL3L24HC[I;2[K@SOS-GIAIT& +MGN>XP1-^>*@"NT3'^,,:C>*E=#?-$'-P+W*?DFGG+RV(V7Y1DD%^13&2K\[( +MW6&D;*IGQGN@/@75IQI3B\.R$[WG%`][8JZONR"G!MD>;DO`M#S7.#F+2*EP +M\)D<(Z)5E6_\NX<U$Q.L^`3OA1E76'9436-]U"U)WJQA<>RI#.8FPSMY[SR1 +M_Q!M@A"1["=3C!MC$\I=D&4_,LZ6.VB#9(R-0:RC7N#H)8`X;.R(OOI>%0(- +MA^G"&8WSYE=:$LH&KI0R8\A\(245F%S>,>*@!\DIFN2D8>UUFRG,DY/3B"QY +M%R^8%]#BE*SP\LA-J#*BHOP^KL!#4'S@7K:BXOM6>]K(\:Q-Y#9M&:0''!W1 +M2).:.8;W=B;:*A7[8UE/I^#OS#!+K-%75./$>*Z/-R$5FY_2"9%Q%+IGF-,8 +M.*!/U+B49C6!7B9CFH3^#$0IUM\_EL[I;^:[K^$7E\.0B/0U::D"<)>I!H=4 +MT#D:R$E]*;2(U2?8>I2IO<-9=&##O32K$-T=0#`6I@L3"W*;&YZ21.V`TE." +M&42I%D-,[&UY!L>A:]Z)MW,9(#X)6@3*40H\EU5C!:"1]KT_2Q+9W9)HD):2 +M==I=*F'KQUX_VQB00Z2)COJ$;..3>7=7="`"^CY+(%/>)=4@"<1L;*;0`D_2 +M[PS93J2SI=MS)=:<N'HW86LNB2+(WZP%R@K&0HB_^<ZAO>M=P`7"*CE@##"6 +MJZ&B:%LTQI65O^3"$0@KN6.+'+98S#SRV?B;N/Z3833[SOG(O]W?(!3SSB'C +MU7R"-#6+C'Z^/>6D/4Z"<\%G;E:.+1#F/4R.=BU3_1&FE**#EX6'J4E?-)\- +M"O*X52TK19<%1A'L$4O:<"H"D;RD[`>S3ARV(4)/F%<J2V)Z=G9/GG?X^KL( +M!Q.A%IY27DF$HXAKM1MX<B;A+',$)G(A.?]!]"=R&?+G3&H_^2]PHJ8EG;_, +MIN%90GE.J\7VZ5(+3"JVZ)";]]-#N%X3"GZ:;$'38&IC_X"X#YH523L.>J;! +M\I$,R!+>M8+'/K3SSZD/"3Y(01+;E1L,G1YU-?,T^"4:!!^$PKA7T[ENIM$P +M]888.#/ZFXZ9Q8&&BNJ]O68EJ^6D12?)S1HDFSH:C$\'LW"DB%7QB;=I$X'F +M,#-2AV!Y:FS]=QDPR51@_7=7,H,P_X6AR#'*VQC$3@?/;KZ@$RT%+>)?!"1K +M5XH^VQ&9SQ<WU9":+D)-(O5C)$%4A'JSNHWK5UIIXS?Z=V/9MR?>E^1NL[GQ +MWX4^.,=&6A()!6RP1%Q+U"K)'U8C:BC`Q1"_NKW_Y#R@='88JUY7_"F##Z&5 +M94Q?2'(A"$PQ%%\;_\2:3:ZFA6%?8PY97Y9N;2`+BG@0;>B[[`;7MH$T7XB_ +M>M]K821YHVV6#)5`2CQW.EK4:LPGE.!4J:W#X13RQOA7"NY$)-%M]\R'VH1< +M3GYYF"S2`%941%][8L@\,,VZT\+0#:?FNF'-ZV*->]#M3PN2>M'7ZA!2V*`& +M`J@;^%INM4.S]N+M@TXT9[]P6]Y!3-4\VC^MM)E]GMP)'D+1&R\FAS'C2S,P +M3/SNG2`;)J9(`HJ&#XJ^(T81,J2[H4Y"!($_@$X4!+E0`(:7F_'=A4Z5YLF( +M3L%Q.UKWM%E$$YD<=JZVX2:3`6F2@M(O"&T_"/!5&'-E3=++;:#0D1=?U*_Q +M?]5%7@%IJ3R=)`0TDKU"D=SG"[K1'M5R/710FDWP[',9W$JLL)-,?L<F[;,9 +M9N;BSJ?%:[:ETY]7IL0V)S_OW2F[((-+6F]Y:,8D/W&SYSGW%*@U2`P)_J;P +MI6M%0?[SMRLND+X;W1DEO9ALCPODL76W<]8D/8;9S+<Y2;H_%VB_[QK&CC`T +M7"H-D5+8@4#A&N^V7:2SH9`KSL$GP>K4;\Y2B/&2"XF?9<?AK=NTO0<*^]&_ +M8<&H8RNP,ML<1+_1"^?+;H2GQP4'G$5R2$CA47GA1_:A:2`-CPZOAJ-;<QM! +M?HE_];^6K)8?Z_F^5C,WA@P5Q!?O=-&6'?_BIC0'^=:/MTW5BK#__<FRTK`[ +M;7*P?U>MK[48':8.M^0Y/H-Q(H>00X.;">\'%$"@;DL.)[:*R5]V!W*N4")7 +M**KA;-."B]"3`R4)5TMDL$Z=BUGN^'/UJ.,&N-T:(E$'X"HFS'.(F7U%N@]2 +MRP4&YHX`8\^M)$$[#?U,&WK68/#!.[]+Y`+;Q@DXORL?,"^]*I;[I]YDMX&Z +M2%/6I]O,]R>\&JA^Y%Z@WFL]TMS/VX]*VJQ)FQ>(N&'@$WW7VHC5/ZK,QL3A +M`D[`7@WAN34HL2U:U?I[&O$1^,(-]$6(!E56K&>](Y%IYD:-'L!:.^A][3AY +MBX+Y;0A`W-)")Z^PM!W4(3&M\1K!42/KVXK?&`_#>$(+)N";"DQ;S9A\0%+N +M4LP93U4+7)B];I)0,SR"9^BU"H9H!%F='-GP(=5>U:7@D>ITZG&0SPI9"@:$ +M(;D.M$PIWS]._CP#+!L<&!@K/&QW\>'&\DAZ14_EV"FT0RL9U!;G`.&G$5'Q +M*H<;>XEOE+M?```ZPK@`B<OS[4U0&1Q.8TQ-9QQD1!HBZ^#\+BF=?'ICJW_Z +MOU>.JJ]H]EB+!K>0-;.2-,>[(V1T0-'NIXE'OD%]TZ+>2:"TE?K1#Y:&=@0@ +M0<8"CL@H)5G*2_8GG&B6UN[&]?B)]O_D>2%)UIU_';T.!GV+=4(NH1YJ"5.R +MK6VT]E)]M%&H*,9-H1^S&J)ZD?P@P_=:/BF7`2V0BZ^GV?O#8^F58L:)OPXS +MT#X'.''TMY!JTO<?:?M=3?(7/P?@;Z7P+>-(C6YUWA68@2VX6@+UQB[3#QIZ +MGZO?T9/<_!I,F[MV(=L+3R-@,63-I,1XX>?[N9!BR0=O-Z@&0TW&B7[VM'Q< +MDS,^-V\NCX:D!F;?7Z\6?`J@3-S'Q)>HU"10U;L^^;0'X!N*BLI[`%X^/X;D +M![C/25?/J8J1$PW6D[UJ[C0LV6<(QV*(L-LPG/!,_^\C1J7YYOE_O'>9,LI! +M!@YK6$%OD\O,>HRNU=KFN(7#2U8WTF_PS^*%C+O>-*NN0P0$'%>QQHA]Q;)B +MF*J!C4?H,CAB><5PO"E>@FT0@+VEJY?F.^GD8P28:?QJ`8*GZQ.I9P"V"APO +M/_7RBZ\VNE=ZW.@J4;21,]B$=33[D21X`-]08D;V+'[I4K<.0QLX,D@"9<(- +M^Z#1#-&\.)4[6DX]^@=-;'NT`1.^N@N*LGW&9E>DYBAX4N4\6\T_T'ITL6^= +M83<]PJP560@+SXZ\S++[:V@R[C9G;K"E.R5BUC@BX#X$1,R5]L'*HLO2+(:+ +M8:=@06<]YQA"U&>&7%ML#I?*Y3(SO$1!B`3_+P!X\9GO4B$M"(S=;F<OC)D_ +MW?$4<+BSW-;>;_UU9T*`FOU>O)\/_$4"M@C1K7K^)_4CBMCK0M3B].-[>G0) +MZZVJ/=4.8Z>?(248O?);T8WJAMTCN0[%PTWU[.-CUO'5>4$T75'Q)O5".',A +MGT!WALW&R8DV>TY,J6^NQ?*=BLL^?G,#U3'U;#1NN,RZ7'HC@#5?(D:X!;Y` +M\&6!WI[+ODO46HR("Z.4'3LK^KO&$ZFS,WE?,DYJ>#DK4';BH'!]D&?X]\YC +ML>[%;DF;E$"#%"@M8LQ#H2]K.E2K^Z"ZG8YC$\IN88<0E>>;``"ZH1*XN8)D +MX*'L[KI)>'W6L__0P*T(I_4693<;@A%\-#A6\H*XGJ#/2T46JOAK+^YGH`;F +M<P@2W0]L#]#E:;/C?-,6FEB`E^7QTN"([H(C*`/Y?IKS2#/I6M`AL#NRR4.\ +M0@L#<?T$(A66+XHPGK=:2P4?2J*Q9?J)@,]V:G&A]6='Q([?R5*A<U?RF(N! +MQWV^#[*9N?9BH%+7T/<T.$;.)F!2,#%56E3`H^'NTOFE-$.1]`SMP>I=\"5S +M0"FO5T"UX#J-Y#.SW'\YOS/@H6I('!`YJXDZT&`K$"A7USET[I3/+RU#9]ZL +M6,(TT&9!TY,]1FG=_^:X987GD_2DY[[GWK19QP.39)F7:#P9`&=(.K5Y`CC" +MDWW/9"P%48&0'VD8$%HTHNVG.Q%O]/.<^_)P0J\C(.IAY/;-!]6(=#/O'C2\ +MIBR:31K8@[[QY<;Q\1=A5[QSR"8B2-A/F1)3G$?91>KY_[94@'N33WWK%.M$ +MPR-G$YCMD;W7S[?]<2V4^=NS!V0SG8%&!T-^5&QL]BLV49Q+21RT7-<@&M;& +M;B^Y$&YDVO301F&2C2_?`7=#ZFGY'TDZO;AF9_\9)65?9]V#>`NK:&'^?!"I +M\/W08`7$K?_^S=FA3-2_H.^K1.%[X%VBHIMRS924QBI5M29].U@D[CR>\LY9 +MFCH"/RB?/8KRL7>1<V2-_].AVAL#(1@%TM[?^3GA"(P?O4%32";.&Q4/\QD6 +M#/-O6$_G(-K#`QN*J%FCCD(=U!)P[0G]7=L0)?'E[5]$%L=0AUE'>K?D;!CK +M2JFRV+?#2"/_X5W]-J('=:Y=YXT>)V*&&^\]E$Z*?W"N+H1_S+2)"H3&@;4/ +M*](.UZR,;LITE-#=%EIO@6%T%VR9)*LCQV=&T_7S%_;%%L_JSSM4YW'=$C^' +M(]#AS$97_A3&IZ"$+':9E%^'7]1?^:'!@U7[Z5$IXAPZFLR^ZC+=0H+(Z&M[ +M4WH0O\;*[V%&.:C-W.1Q;].Z>PWGQM/Y!=`?/+!#[B]:3839+81=@G<M4XGX +MZH7,X)"<FV0_;%U->M//`3BP$']S^^2NH^K"Q[AZT"AK36LR\;WPW."@%Y_F +MT3>FH?8UMQCKAO]LV%%IK2:_C@.;@6"LT_IV2K!2EYX(!K]6027B#J#P4C+; +M[;>%TLKN3']+5?HCUK'Z5Q4DO!61L0H>D4'1^9&M'Q?E"MSHE/-4,=8MJ/$2 +M(C&0OV6H`*50KKOLVM-XB_5>-]==):(Z'$ZF3%COR%=S,7Z7/&9K=3/7>R`( +M#I$$ZF_YC]W%\%J#$%R"/`5#0-V_6S-^C5EV9*;%L)G::QU\GY]D(H@5AC3Y +M4R*.IX/!N"R99ZFT?@3$7D@>P]]=,\#"WTH$EB,Y[H0_0\Z_H<7[Q/<%($H8 +M\RZ3@,Q[!SKSV4]QXCB*3GIZR;M>OZT,YGZ$@?QT<;CSYT4*!!)F9F3-^\!Z +M(EFOXEYT&%J8U<%T"HNK'$9AQ=D)Q90RC4!OJ]-1.Q0EGQ1QY<,QX\A;J2XL +M@(@5#\!`)/)88#'LT$IT?\F8*%_&@1W^N&(PSJ$+<)M[`F@NVC91DB7)+;3' +MZ'K4Q=ZQWU8YRVC_VR;'EA@%8U]=#2G)W(2XE0`AU(\%/OC9H5"/;&7KXE\W +M?.8XVL<-,[,I\)HD=MS=Y2THV(3)!9-(E+.NU.DWMSN]L_/#NVH+?XJSH_0A +M@8%X-`4)9ZL`J_A78C'DF;G"VB"?P$O&ZQ=Q.0%'6P`N\GOZC0*)=4L'JVO; +M[-8=?M`X>;>X'ZO42T*L'SVG26!RP%RFHTXITO7+J8%U_U;6]2K#?8BB;JS; +MT:%^:II9#9NP`&"(M*-G;17!KI]F28/&7+TLGK"6<E`?6H(=-WZ?D[TZT',8 +MF<6J84S6V!0$DF2YQ[7$/<_JW^6(S)NA5RG/7`>?\4=@<O[*Y,=6M:PS;AO@ +M?UG*63L`,AI=Q&%=P>T/>TPH$5F(FPD"]OW<XN%>-9JX@E$!`V0L1:-'V3Y% +M/-P1(CGA/<#AS@)>J+:>E?K,$S=\WS+#<W0C;R;7W2(^Y^6F`YM/X4CN.`R^ +M315+13O97L!_/0D4C`O[>W^KIDQ>>YXE80`\NTRO%0%F?DL@O9.'[8HK&NW. +MJ-U"#/7M=^=+H1@.R48J4L&BPI,+7UJ/X%"W]K[%K2*`&5_9387H7!P'SL(O +M@+]D4VV'`$]+\!"'M.FT!@5XVZ(]!$$]4,/;Z90?;94YG%5D(0"PSRIDG(]_ +M!404$.3*!<^K"A^IN?(-?<Z[,["4H=5I5:#@)*[APC"H-:1J[)3=HN^&_U$^ +M/48/\U1]D>#M2F-U,5_W`(B9E+MTAY%-5CRLQ^(.H*0PW/1R=]4)?8MVX(N1 +MT0'<,8)MN9_Y3_&G!V,YHH$!<_:>=;HA^AYX`KLQ^097HXMTQC-ZPC>!P*W$ +M"G$]P0K%2R!NI6;K??%9@$A?&<FO]H`5E*INUJ`HM;<(/D.1"K'0\DVBC9*K +MPJFN8K\Z6(;*ZKP:%KQ(#2F)SL2(1,O,],'FCFP8"$1#9M.^)Q?]IFJ]QQ;= +M=@%XZRO:+6.*5_("7SD,.Z"X*M%>>7-:<-W1TB;V0]U=$6HT@5@V]EAI(<!` +M`'\`O4VDC(I``]"G'[7]%0'!HD6#K:55%CBOBX]$XP6#NDJL)H$^(](E[W## +MZ"<9#A@76BRWF]7@<`']B*]U?RQ.JVC<3#>F#:W=T:HH#2G44M_AZS.IHW4E +MQ]?O%PPW9S&1?%5F@JHU@AX5T8$A(L:RP]A41DR`@<;V++D!O'G21X],J*MM +M?8JF).WJU!H'X5:L\?JAF(=`^2:$DW6V=+84UTU>%5_\@:3KH\02U!LM^M3% +M:)_4/GM"^_=M?]=>!K^L\R_<^VU!FDS]Y*,PF>NB"IR@!NVP'3@A*7VA%VA0 +M/XX(;+U[82(4]!.:]?2\SA,3BYL]I5DO<YG?"TP.3B-F!#T*F%#[FD0&<NA8 +M:RBO_(M*27Q`<&/D$Z+]V.KGIO?PKL4V^Z70^K5*7=DU/B^[[3\[7?X6?<`Y +M4;3Z&U":>5*NB3(N$E=C;.A$O+9(-8HD\<)ZTJP!O#0\LV*%!3*)Z>\KUXQR +M5/VO#I"EAZ6[2^=M@3B4<Z]W^`VX%">W[`"-+^69K#M*/UN)=P;*$PRK;8); +M*&-+!7WXR4ZW;\2<CVK`C?8^I&]D>?2X?0M?@77]Y9IGT#LIQ0SCI>G=3($J +M%#M3&-6[J"N'BA1/T*=AW1N\8IXP)ZZ>"CJ;<K,J^/%'$(H=Q8E96\7'P4'= +MU#71R$X?>$KZU3-FDZ\:ZZ4^7`\$#-38V!_53T>Y<#VN7T<?YVHFHX[&D0F8 +M%8D5OPHK3VE\5\-YUJRK"6SZ:WNSJ-*G!N*`0ZVBA[%``ZC@>L4!-#1#OSMC +M9Z#15ND>K9:PI@(KN=/GBSH4%S`&]2+3_8^#E\$3OBQWH'MWU6T;\Q=EP@_# +MH>O6BB#6M^"MN3!^=RE]MRZ"VEWQ'$D>@++.[("^\LQ,T*SX`6?\!+7*`*7? +M)]B=1!^YI&86T*6-0.GM[.*7M(>QE[HO'8,%S)947!AAL$+3%*]9Q.<J-F-P +ML)ZLU3ZO*B(T(3]K$N"T`92-7\J2W3DEY+*DD?2U%Y<57>><O?A3%%%/0['; +M)</*OE@5:*75\`#&-\;3T^@Z$9(E1=^_7@$WSKUZI6N\I*X+03=?/:K;7J[& +MSC91K,7RR6E^'1!58JPFL?V4-"I/6^@M.LW,[1=<T8V4C^7D[7'KSE7ZJ3C, +M6KK,L#]^QO_OA.;C3;P,`*%;-#2^/$J.#"(58,Y<R5DDQ77HH:[,>TZLE#68 +M2XK1;PK=54+\A4J[L'=#`@2$XV'.6)DCM7*!+-I=LEGZO'+O3"B5@&=#-MP? +MIXE5:9*Q%S$#0+3OYZ#:GU,#ZA'*H6H"9S#%8='*\L%2)=QG?AB+[Q\CFIQ^ +M&^GX_?+E=EIL_=UM"@F58*?A*`YO`X?O4<#+Z!R`Z#,HD_<@3.W:]T"4_$>3 +M@[.U&%JEV-%KZ(L<-X?*5AEO2#F&@"YXX!=T)Q+HO2*T*,[<[O9VLTVTKD9R +ML:4S"ER16"LL+0(MC&_*DSQ?MZ1.G)2LAFM";J;(RE1>!<$-=GR&6]JN;T/D +M:'#_JP004=/^\0WT`J8T?(V05T_<["1R9KGA1WP@YBF85J;6R"9R^0=;3T6/ +M0L/M7[8S7Y4/B%[:L_-`$'G(#9E<^DS_,HE14SH&;%`F!<8(%[%W$9],MG>' +M-%6S!I<*40F<$$*85-P6Q!9B]&"VU^R&K$LLQF_&\Q^H-?=05=-H&25;A<5@ +MFKGV5>BK_JOD]'8DYH1C&>8?S(X4,.AK7*(0B86_\`T'&'=D62W;(.=92\<^ +MQPNGQ<$QDL>PVLPJ0"Q!71D)]MM!JV?"!,GOMMI+]ZK=85$Z"4V<<8'RT<2, +MX%W@\GJRS/B4_W4XS-8N%.J#$,6LT2)V>X?I3H?*K*83&3J=-<@A7%N'6#QG +M[*XC&=@%O=^!AJZTE$>VCH5%B$,%,,YS!UB3K\:[__U_/?W_L^9=+$0[]%34 +M$%2A`I$X_W$51X*$Y]?)/CQX'%U'2W`E#Z&.'5)\N^35,U"1;LY%E*C6[(NX +MNI%F&E9B(R19Y]:6\_A/!(>;^%9]LF./CM)1G`TT"Y=]=(8/X5N.70L*B$*; +M.8/6<F^?EA!840;"VFDVS1:-RSS:M^%N-BM?KOBL^BYI<>-;0\5)V^)[P(ON +MAA0'%ZWQG,!H&+GT"UYVTWI#G'6J:H`LK]COP.Q-+1Q)9N8]8YYYD^I+K;^R +MU`7(;"V/W//3P5I:!AX'0>XL:H`*B*>:.^LA0W'"I5YI;T+Q6+1(%+[VJ+)9 +MN<B7U;$3KYWV-TIP17!]]G<KXYL\.>^7\BFZ^U"$2)%5*7BK9-VI2N06O@'1 +M\')`*S#DBK>)L],YQ!G$#2#?*#E+K]?(?@;JW1@]6N1XNW&USE=O`<?JHVJR +MJ&7%T5^TE(FN&]JZ)L"3LIP:S'Y@\,87<^*Q=DXLP`TAPE7'8>IRR$#%_S(^ +MLQ.?0ZVF@+88#8L>CE[7&[I;2\I2=%DR+MR$-:4QV#A94_)A&,+FQ=UN6_>P +M989E%2:S:SVHZ2#*#`+*,X*NAX>"NF4YS9;V$<#)'L\R_8;51*F1>3X`,L8S +MM]]V4(%%6D1WU\7>+)7*/+EOW@S!/D57QR9#R3M:&N6SJB!B.5%AY20`P\UP +M12;DPNX'ER`G4E,87<\@D(.0#:7.%-H+V'&"M[!JAM<S_?3RFXL,&S^#OW2$ +MQ/1SQ&9(&N&`(+J0_$WMN+RC(R2H43>&<MI[#5/_=W@+IA)`;&DZ;*;B.MS_ +M=Z\TOLU5$('I6T"Y=Z+%:M;PGC@-26;5]V!&QO];/&2$D(&*+NR:0-:`O8)F +MJLQ9PZ&HO,U2SAI.4#!><:4P,F[,3*)CK>5KUU^MZCY>>NH`H'[3A'K]=&Z6 +M!?G>SAB]^W8W0HK)%-\4LG?10`A,G0;XZ]1S'[-7(T^>16]B0LC!;<PTDM0) +MB^S?*)HB'%2&"E$9BW<'"TY5HX2C_\&!;E62Q#J<G&R[^JL!28<X`XLS3/'[ +MA"J,CA_IQ_$:II!$(*WLG1J3JY0;-<0AI^![.26&7BT4`U5;JZG]G>`3D<YO +M0S$S[)$LA<2T0OS6'*@A)RE%U$8]2HPX'20D,O*FH+6B2;RJ^>.DE<H@)F(7 +M1:ZO='*P+F>;'FEC90`JK::$Y[8`U(2T6H@BUF`)8-PPZ`/`4+NB,Q5;.$^Q +MD+O=>N+^"6'X[=A2O5D5;IU-M,KP^N783S%ZE\C,*\X;@P5X:QV^;T1Y#)%* +MLC@7GEE.\,]*4<[3!;`7GH#8/E]72:C]TCTEL:;387`2P+CB-^H*J!1^[C@4 +M%!55-B[<$[F!I*EX]=<5W0W=NP9ICH*JN4V6O1ZA4Z=4H_&GR`PS1]7GE:AO +M]?39:FOK'Q%GNE)%^FH>-98O$#/U?2`B@GD.G&L4_7`B`41A..V_D!!G3_8^ +M>G^$CBM*_#@W@>@0\#W#5\X1\&C*R#&=EZ(HU`90ZB6^9I*4Z'FH_\,L_5*= +M!$IL#Q7A3S!IYO!P]T5%9EMB7DM:A_78]9YN_[]+RZFJ4V>J@0SA#[NP-D#1 +M:C"-(%KC&'R>WHUS>%I2?_`H,_NJQ.C'4QLJS'XVE\)HT#0_.?[$2%/[!=K2 +MHK47V@L3JAGSL0&6M_HO>!KX61&'6#G;RZ<P'^UGB'^.H%\C5P1X7+-'XK>? +M!%%NBHU2-_V7X.*[9ZK;\N0N=9M\=$>EL7#]NHAD\7*FJKU.^E:()]6(2ZR! +M3PPIS`"1YC$SY8Z/])K`#883#9&Z8:`W63_'WC1\^#.6!H\='78>HD(7]:M% +M]K(`0J,F>L/0N2LE$+;>/(89ZDD\U6W+CA<+.S'I_G+-S,*@N,HYR3:4#@,@ +M`MG2V"[EA$K`^P:O`^(.:(.B'FK@-M[`S"I$9W/**,=?C>5;I/!L0OST&X.D +M(&ZI*&\4M8D5B3-S,33)*R>/*X4I<8!V0>6YW'<TJ='#^5D)K\QGY`>57OY? +M@S$?1(MILODT@KL2K2^^_L(;43,(W==PA>",I\?COZUI5C^UB6&B,[(<^_$+ +MYKU8,9";R/_2@+9D#WQ=@^0G*EM'TC-58)&V8JBD=]VJUMURJQH2=RE]&2WB +MN<V%+DPI@B2[H45_?I0K>^;BIA!)ROUGE4Q"T3`@"TK6XT8E,^W0'N<*(4;R +ME=TAXS8SQMYES6>SPIVB!EOVR0I36T/D1_]WL5W#5N<`=^C(QRWIE?N@3?TG +M_Y8__>U%Z?BL^N9Z;F\<<F4NF,P?P:N-C"O#`<"C*)HTR^Z:^WEX\NMTCSM; +MSHS/LITHL/^[G-6>Y53SON2&L61A<]!T_4?%:EC9&GU84U/1A-[?4#[-9J%Y +MPD30#+9`6#_G+]%`";]Y\D6(OWXAZ)]]K%`D[B*+H]V2=^]M&[:Y_^L?94I= +M=M2U@)%LT]N%GV]=<R&2>\A3GBB-K>A2PTBJE%<,<4XPGA)C(/1+S1*(E3&P +MA@6$5)V",Q[0E6;-*E0=*A6T5U.KY^_C66Y'44^BP3<AK\LQD2S'`VS?:$': +MR4U`;#YH=@7NV&I@Q$%Q&B].NS@\SH$F'NBG'1]7H3(-W@@/F_9_4D9&*394 +MUH7-0PS.R0>5>=31^5S>,T3;IH^"$4%^3OM/P796=[G_HXE!"5@1+V#?H6"# +M[49)5#Z-6K_XMB;K;,MGSN_&I4"VT%%A9#$J&FMN>8)_\(G6@-]ERD58.OQ" +M_PZ@>Y'+TPY0Y2T3%TMN/,V\.16J8&X"5;AMM)85SNS$6Q[_8+2A9^V[>0T4 +MZNHACJ&`])R!9R7BFS=:[OL:HPQ@V'KC?/.[0-)\/2GV<5=TTD@X$``!!`8` +M`0G`648`!PL!``(C`P$!!5T`@```(0,!`P$`#,#K:\#K:P`("@$6V^8W```% +M`1D)````````````$0T`9@!I`&P`90`Q````%`H!```M0RMQLYT!%08!`""` +$I($````` +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu b/archivers/libarchive/files/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu new file mode 100644 index 00000000000..951da15ec6f --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu @@ -0,0 +1,407 @@ +begin 664 test_read_format_7zip_delta4_lzma2.7z +M-WJ\KR<<``1,P\W78$8```````!B`````````-6%26G@:^I&6%T`)QO*P@;2 +M+(;6`.G?97%G65J_4ERCV:^K1%6D4`M822)8PY<D^7G/"B('W#;A;/.<=2:F +M/\-O87SZD&`;L&),.K'5%'\0+@/P0N8HLMJO&R0YO^&>*%1<PY8IPQ5"L/NP +MIF49[<&@"%+UW+)Y@7Q(U>4J=_<,7#6T/3RFH$9!9G6HOBE'<!.D2&1'&GJT +M+"P_(<MZ`E8JLGT2IS"#`;@H/"BUVB1G3$?]A%,'`E0\0[C^JNSB$5;G;,N* +M`A>E<0M'0-5!6&]I9Q(LNP>FO1,4C"0-HJF]E+UO?$`OP,0L]9]-?IRQ"#_8 +M4'^\-:$GT3JIHJE5;*\M)]-TIEK1=3?[2#(5!+N!_HL=H!H_R)BU+F9HX\D5 +M.\?T=(M`=9=W4SJW579?/KS>1Y+'M^%0#4C+X<'3U$3C&%='!5[\EF[@4#2B +M9^U]FY)?`J8B_0+7B.I$N.X)PP3;'V&J*6VY.!&;Q7R,;M8N$$GCE7A'DD(" +M6>XDN+^7'[7.>5XJAT[)1$"IP%"H\ENNG?(IVD$"4B#R#;E,KWX0"(+I)G\I +M;FDXUW0:G\77W)*"$2C1DY7G2A@X<7?HF<0(324$@RQ94+EXCPV;A\!J_=-I +MO`P<X"C3`+$L8ZZ:\JV3LS0*:G6F+AR0L6IX'^[L:]N:Z=&=(51-/.G$CEYV +M0@H!!KIFW3Z0MFD7TPSI]&Q#KG@:<^Q]ZTV_R*Y,>B]JI0O;215>3NFC>&L@ +MA8ZVO8G:(Z+'4*>R53SX'U!L=#-R5/?1CX"K49RW+6#"?:O9#&F-VU+]XA>- +MH/+P67D.ZN0JL<P5M0F:<+A7$U=BY`C.[<MC1".["0V(23:JG:K@&F!2UWA[ +M3G$1/!0SU]HW$&2P6AZ[,U/^@"OI,L=T+YD1'G#E-N7LGRP%W`('P.S<3;]< +MQ'O"=):1?9CGJ0>3&7/ST/0,:N;-K'@%MH5*U@'\5C)M\[!]I6*3,C]3NA^O +MCP?_.^L?=17`;X\L"SHC@$#^"05.3&=DUY$\848Q-SC.@/%KQ:P`5J3YZ^,Q +M\-/Y(6LQP?6TCO<V>52!37-BUF`NWYVMM2?O%GP33Q3P%?#">B/A<F`UW*<2 +MBE`1<1&@09D(J$H;9TU5T2U3KU_+[JZ<K.89%>68F2MV1P'<E&E<GB>FKVPF +M);5);K1B>8HI`'2@,V/:[^SK\W]3Z;KMD.*+:9B<=!"$;J;;UE<C;8=?7>5* +MDM)][UB?]6V.JGB<\EVIL3WF^NX79\"D2_^:2*;[&U%K7_@JZDKEF1,3>-*< +M/L@/V:<X2!F4;L)[]D>2=:I*Z6Q%6C)N$U>TY<X8KHV!/+V\1O5)$(:6W,3Z +M243&%"&GH`^,TV"5IEW!P,+V!E,XP`T[66G;>[(C`P/L=7ANK-S3-TT\L:SL +M.T*&Y0>E.GQ/D;-/0XPRM5SL()'1_^7U(H`O&?G,YY4X%=>F@:@Z-KF"#'$: +M)WGH[<$,.1GS0RT6+#EYTEZ8W(/*D52"P-B('Z;VJ('L\]<W(DA>V;[3YB+2 +M64VOM'M9/U7+D0$Z>XTT<XH\N5"P5U'64)_&HM@Y-CZJ]/19H*%A!N>R0PP6 +M85OJ%/<&J2F(<2MA[/"%RY6$59Q4^<^.2E4`K*^\*=EF4`D<\@V"R2>@9+%N +MD3R*?DVCY?U5RIHO)]4_)8R<3XLHQ<G@]%#MSDNL[TO%4-:H;[\*$Z@@'J>< +MU*%_PKX_M,LTP$2ITA\+->:ARO&7:7!:VK==FV^WJ;$;UM<&(,B#=E*6P*"V +M"T5QBA@I!4R$!8.UO\`TE@9K9&W_'H:$?K3:4(%MF):*_OVK^A>=63C@11U@ +MT1I"1Q?#6CJRJNUTIW9D'7P=!P341-$$(0GVW+S/D5NL-H62CQW"4(";.>F1 +M#VI1`S<B,>N^2//BUZ2!*N-S5?\L%+&&+]KQ%-VW#[C)/0LX@$90T;HK*16" +M?-10DTO0>).+H4UE!^5"8EZY\AI;S5W!&-W_GR_7YP*YD*]*(84G3+C"6?R[ +M@K<$M+8"'9V'M]T:$P]LZQ6A3#<)_X2D.=BY9BP7WN:17-HZ=K8E9V9>'#%. +MR$L/'`U2%RBA6\@>;DV"%M-2Z_VL]=$Z/^)=`$-)$CDP#?3I3M&Q"21C?*R@ +M#L:;1=**>6J6M\$JO&[IM%E1\K(KV#CK]1!0:?M>([H%FUMVGTU,`#D*,+%) +M&$FT""V`3=1]S*'&PDK^6@#Z,&X][V6I0Z^[B8*7P?4_5N'E9`)5*.4!K2G` +M=(U@/RV>"C?],9@_Q]#\G67)I_,)+$U?R>51LS+,1<0/C$RW$8A_)U)K0:!3 +MGQA004^(:U*X8T!*T_1#W1V4@<A`6'AI=",RL"`GZ,YA>6DMD&89Q$$,KQ\3 +MF%!524963-!]GJ5^KWZP[LWX!PPEUI'YM$#^I_KLT9X0#)6@K!PWB_<QZLHG +M"[`1>NF@WT8/RU2Z8]AY4K"=0@6$,M"\?8/]ZFR2&1&`_!3U=IC.6Y0BN!TA +M.6C(>Y)EI%0?'CJGYHT2-)@CS.KV"@Y<=3%Z4N%FE7E--^Y651G3+2.IEL@B +MMU6O&1?8X45]0!(O%9X!M:1>K`YGV^_O%/GM_5>+640WA4F9R0420YS<L32- +M@S18$%NFA>.DVJ\99T+VE?TO``CRDOS!&U(=)T6!7O'S!QZ!/&Z+KD=FN8U) +M\$M19IA^E8N&#-K%0\KB=RE(0WMKCWNFP/9(//7_,0.J@:`(8F,M63OAJPG& +M`F/$\U>\E?3``?\,Q!FODDU".=+F\0>6-QN([3HC%L$7E(5*FNR9B/R`O\&8 +M;<:8U"H-L?X;3TE6(>O0>/9T)7AX+(SZ6/D?FA(.D-JE)"38_Z9*0\%&R+`7 +MY%"/I@__WF;"!AYKPC`NQ$A]4AFT!ZXW6G-CK3HE&(*Y:LP^FG8;+QYXJBN" +M!P9@CWYCNX@XHZ>]I0YW[,6RH'.JY%\J&"UI8,UC!6+9BR$8ISK9U>KC)*JZ +MYH[[*<QCTT<A4?T6`$8!BX]_4']+F5?V,'CH>XDY9`UXU/1_KC'"'5G'Y"&Q +MDW`4H^?00ZOI`F$V4_#7+OH<),CK;&JU[^F#;AL<5FW0%]&2.AG#K,3E8:ZI +M<KLW\_WV=)NY%7GWEI3O<KB4.E5WH>WK+P[/`-['JND8[[^DAI`"ZV>]]YO# +M83_2-Z63%G!2V?XI;66V?((CDM$I#793L`;V]-/[,8_!%6_S2H=<W4B1[TE& +M?Z1R!4ZK_C$?\(:1`K:,%VEPLT0J8!IK-A<KD[1P_OPXFC#C#'NO$B.-Q`-Y +M.>/G`\M6QU;]^=M/BMU/?,EQBMJY>6@=21H3LPE5LF9XL/AB4+8E.WGE6X2T +M!O\'-(WM<B>EO'%E0`NU;*PKPV$PR-M9Y%1`&/MC941*O9L=CM/9_A8#*38Y +M6[=4E-`I(M2?3[;8&3''0#RMMF'CW$_6L@E1\V%9^U]/F&G=&[-!=R-XO]=I +M0<E&<T_3Q:BT^DG<5:!YP,XAV[&\W?6]]DUG^S5*TY+'-^I%U"5F-:XH9$;N +M18EL##]R&*Z,M$RQY0!P(SM,7>O55K3CBY:66KWS>^MJQ\9$VL_2VB<H&:/P +M4-PM5#_E-C`_U3*W3=2IBPFI,OOP1,LA),&:2=E3C<<,*D#3U8E)?]Q1LEK\ +M&D)S%$'39_$CW;D5^3-,S&`,N^G:8-B^WLX`!MB(RP@&%A!*_P\B4-+M7!NG +M4O9PO#Q#WIRFGEJ^/&ND]MB(?"XQ>B\1W1^A>=][1UMIL$].A,T,W?A5IA:W +M@/'.WAF:2*K;Y']X8D/,;&X,YW-(C:O>"*@5_EZP#J]'/X,'`OZU=@2/&;O@ +MZX(!^<W6,[L5G.J6WH5B^T[6FA/N8A:&[R(Q$6VLXH-0/6;6$$IZ]N-Y@5-7 +M.6T+7V3,B$"^W3#.)N=[LT;K+D5%Y"P:3\\,MM;I*?U<,WJ&I?:)X$.2'VJ- +MJV7D$#@I[+N(X*_K3H6VVM/:HYJ55!JMR_-:8"\$*Q>?H\7>I'OPXHV(.@N6 +M[6&;7[<HR>*G'YH*M+W>S84F&^UQP/>!^$/*J6#8P);S!S3ALHDN3_BL+3>: +M8#XL,V3.:69'F<4LN!:2(9RP#:V#A)'<`%`CMNJ[^WMKOCK^K.%J_T`@RA.` +MLPH:_W`3-#"&2!B6PZ&30#4F:E.)@1&KRIB,&JIR13OQ<O9[5)3H#B#6)W6; +M:MW`J;DR%_87)Z/4?M<):/,71H9ZX&9R*N"=NUF,PR_XZX)[YA\83\#N(HY9 +MJGCBIHJKZBZ@F/;"-+]?48E)+EW<JPHTM%MZ&@*I9DZMF+S_F3?&2<)U<9^N +M#8#V.=`4&V2/.J\8N05'<6P*\L[F$UMU,B5_X?H@'M]8O)48@N[Y;<]L-F6T +M[?XQ@8L84+,5<WNH^*!8&<:02,I*U*\(LEYPI^1+"KD80K7E;K.BT](QC3_6 +MWE;7RUTA_>Y'R]Y(%?<G\8UK<AO2!T.D1D]PM.13C^!Z0W'Y:6TC_=>K\"/V +ML'(M&JII'VO>J3U#_:[LB-JQZ9>*2.D]2_@U1`>CDQ"L3M0W(D09XTJ$>+T) +M\6[8[0.PPWSWY$R7A.VC[]3SC&-%I$,#)0V$A_%KF."AMKSX/IG2T%BRNZHN +M$2<VE#E([3G!!S04BNTJW@6S\:A)KUF](D.9W_C\X$/(C,,`VVE_ZPD@K"?G +M2:]:6',2?SB?S3^L>`W]O[,:4=$*F=AM(#HRD(`[!&`Y3>]="+V`@C<5[5D6 +MJ?GMYQ<"DEL"N&A@L)PW_T=K7L6HBC3@-5W`S9W2DU9A5/'LQGM4*9TW[;#= +MLDKA[Q`H(XK*DP6REW[4U@-<@"%&K4^-I5Q]W>)[+33W#8X5-LY0(6)P"*H] +MIT$=PL2;V7]>=7S>WGG?H%DV>=ROMC->C]6<Q\A:ZM:$6ZH)H)>8@]YF;!!6 +MF53BEQ_L`0$I*5WKS*W7G>]2<LGF0NAD39YP4B!U#9(D)7_T?!(>YHHA1A)D +MI11RZNU3(HXMRO2C5)*;!Z4_Z_S;E66MJ<G>%"%X@KZ)>2,IA:E+O:9F4EHL +M#'D0U](#Z$1=A(5"RQPB"W:DCM$M957$TTX]?;_"W]'#,<K-C56D31@!3CIM +MP<@4P.@C&)^$879%@&@$NT3=,IL-W0I6LG.+@3EX`]MOKA_*:OFL^)?3U195 +M&.<Y&<=;];J5$8N#KT/SY3^V0-1=O(@CE]CM)V>6[#T%:=BU%45@G>`(0W8H +MH;2WP.:>7X.^L`0,QC6'QB.4'<:H_;?[HH55KK+ZZ(K(<SO](B?%V$!U@[12 +M>;#4BU/6M]A-C0R[-7?A!\A$XV)ZV<;3>(#PWJ'G`A1H^M73&2TBW80SG"6\ +M;_OXLLVXYX"RW]>A3W+`BH'-7?H)$L"JS&0PLA@6NZ_KV+$G$NV'N&&+PN)M +M'G5`7X^SMS8K5ANE%#L&\;1RA3@"QV;B\,S=(VM7*6P.8;7>YK]SQZ5)/T5I +MW\X7J/F)NH5RK0RF!YFU;``:"/K48?)96)H:VL/W<?PU]J@P.^#:(\"ZM-*> +MCSBK@FI:EG7O*9+W1\`<L4U>4#U^CUUD)[A!W)[`::QDFW6+FWM<ERCD02,) +M&UZ7;TM5*>>5AA<VCW?X!"OZ#"60(=861Q^2*\?SFCX%$)RW4`T/.[ZR"=J5 +MF<!Z^/NO"Z9F$W>5A[NZ/@G]K[-;E=Q/+VX04AU1D3SFJ35+AHSQ.:LL*B@; +M,;S@)LR>(C]7B^7VTH$RLX+1JGD;-V!+R,*5G%7QY<!?_`>Y`>AG>9RA"1YQ +MOM]^O*Z#^.F?[5K(S6HC:U-CI\J@^=LXH<]U0=.?[:QWLN2_*H:.S/\_)XG% +MV<6-"3:+\(K_EQVPN-IU^YY=#6Q+')ZE(BAR.DE[]QV?,&/$]UVN:H$VV&H! +M3S]=(Y88^?CP.6IHOHQ&NT/)MOK%$E90.VO&>3\%W`0*6I@[$&"OKU1<XXJ! +M%;&+F'N?42)P4(5Y[E/)MSSU"3,$LC(B_ZG*F`]NJ2^*1*\>/Q,"7YI)EYL2 +MY461?+1&M2<\%E#K*'87RWDOF@X<;E4-LEBB$0?(CH5(ULI^S.D9:)O9D\52 +MXM*N7>?_&UEV@C3$3(!N;`>4-CU_ZCX?WFHBV"K[,!:08Q[@@`Z%).)!O>(H +M__Y12NQOV+%>&TZS;9\1Q@D3WF_'37E%S"6@N;K@^&PS;2PQY\,DRW>;X^MK +M/*[QW(:@-`IW$&7U>3@IG%W\HDOMTO*UU>-<KLSO1="-/)L+6;]RWXB538B7 +M4Q%:O@9=^JQ<7M#I&^QJ+*+DYMF[5#)).:.`WF>>\P).[R-8?@JD?K.5T:8` +MV,N8_^@0C=YQ'VNPS%3#"4\BVSY5-VJ&*D6Q(C1_0B#@<7A?>/-_Y:F^S;O4 +MJ8-0->_CE`/I>\%4@M:.9?:,@/`*M6]4[_H#":*BPKM&-*.XBF\WHW,P,D71 +M^62[3?"9<L,?=<]IOM0:3@4<@LFF?6R!K&7`\X'.!5Y@!0A+4ZK%VT>0>H01 +MXC.;&/,&Y1^?\5W9A*]LMIDHV:MDE@%?@SG"L<H?.*45[&[6FUTNP-]-4TI7 +M=[<S`C7ZM/E"VL=P?'1J1N>)XLS]6;!X8B-#.%83SI.T-!WH_OZ*]6.6"(DJ +MZB8:+4[#BI35;.F)C)J#^-Y1G_\/1-2Z%/^WML]Y`U`(!\%AO+R*+ROH'68P +M#W$]LNW4N$23ZM0$*FWW>5==F.;B1#(4J&&7G;4?$7KD[4_0Y-S;G`<%O5PS +M_M[2\-]A4-EF1<XX\#Y.D=7D:R'MG"W5/4D.RD(8E:?Y;WL30A;A`9/%LS9D +M)W25`[DZ`T;[H9F\O"RXFOI;6G5TM;7&YQ;"M8Y)GD0/OI=_$1>&L$-Q)`*Y +MG38`;^"`Q$&?&V04*(>I(MSZJU>0BGD$KM,FR7P<TQA*BE*6-\71#M&=H8=- +MH9YT+:#&^<+`)!Z>5Q[#<VZRRLC0>/HCE9-_]AY)VF?;R%-I!%14OB]F^RU, +M^&Q-2<E*F(9E./YP`7O;O"&*E6B3%Y6LU=*]\!K'5.7W7#M>>*XPN!&O""WQ +MHB?EB7MV"*:BJ"UO6@U5(I]FX^]WAR+(*+TWZY(07;Z4;JMJ/35+;LRL*`0; +M'E87GUX1XXBG5K!JQN^86V)%,-@BZR([\L(;]<B:I;AFK-ICT:'7K%T@(<8_ +M(+`8#%C%W?](G8]V]DA1W(\%9B5`H4,.PO8FVNI>/"@FT*\#TS]UJ9&<IM:P +MSMDR1XK"S9MI2'6?<*-?A<-S;?=T)L@;U1(!>="`[]&@CSZ!CU9]Y8>(V&PI +MMKA*-%[A.67]I'72](-.H6+$I]S=NVIW&?Y9CMBGC'^U.[=+F9W5IW?X:BY$ +MQ&7VE5VM."JPM-ZU!X?$YEQ#SCP3=H.3WDSV'JL[*^ZBU)2:QC=4$)*LG\18 +MN&6#B&.)SF`5A9(^F60I>/Y7)YC:\(HQWGPH1@I?8*&>QP5[T*!'9^EMJ`[I +M9^%_[>G8.$Y1V9$HT_(QKYGJ(Q=,;J0:<]2/0.4D[5M#XB\("W)S?WHS&%5W +M\Q0*)24BW47>9%4PG-92JL+CJHF("1+\P\??,G2>F"LZR<Z:>360WKT.5XQD +MK@/Q@U0-MH2GF"N[F,E`U%<H['A&#\*1)RN+!#1[I3="Y2`P0F;0;(6/2,4^ +MU`1[ZYOT[-IXOO]%HY#?W^Q_5B#`&Z^<-M>L/3>U.^+SOM)/[Y!#H8(WNN56 +M"1M)7)+9ZX^`QY$)VY<W<N,E/>V&C4A@5$MV6)N5QO5N[,XFLTN5(_Z/W.V2 +M(MCY_4U9IU'0<=YJOE&61^+4(+]"K%=,748Y;3;C(SRFD*LA,`Y\6%4DL!^' +MFUY8A-L1'A)`Z#TQ@VO28XW:]>[$--59(S74PX(BG7CH3N:@MK<*!Y5*.77( +MA@:><URVPV=&._:R\RR"F<P;IIVEPID67H5RQWZ4AT^'"/1)E**TC74<E%H; +MU^-AHB`O*X>[^FTV$+8V(Z[4+?PC-,N^K%$@->=:5KJ:(4\,*H6:W#Q87-,* +MCL\45D1IZ-<BK<HP\Q6)>BH)<:H'4<L.5M9DM"OR(1L@E,X(D'J*_9*<%]'S +M,[&0*;==Z9X%/B"P\E^Y=4PE":33%BO9>=BMW(;TV+LNXVB`&U-JGZ)9"1_1 +MZC#<?9)%--<TR,M+)A"Q!SMIJ;1OZR2U\#N>T-+E@,QT][:&5UOYS^Q__\X[ +M:=U5C&&:YL?V6CRK"/?%X=\K&]FRL\WD*$I@M8W=LTVS@EHN"BH,`&/65-=R +M2M6F,'&H&C=6_(_'8,6H5_55K>K#]2Q$82F7NP1[ULZOQH/Y$K[I-5A!=P?E +M1?;("/:_=K^,`P316_*N15(@$('MM6YT^>[-&<\01RX!A_]AW?NVY%T;Q:,O +M8&"A&$\0)C`VM8:WDF"6>H8JHDE&JL1!D]Y:50%*>`?_Y759$N'X8%38HE4P +M:<'N_DL.:E<2\AHV_WNS-O?Z=IZ].=Q$&Y4H.UK^.08H_V6/@LPF2'G2XMK# +MU]$I7NE[2-ALYI2\T$TRJKUG1(BOH/"JEWN\O4AF3O)O0&J#796>G&/`5Z$/ +M%]8Z(0.'S6T2$U5H=9/6>/9UR>'3NX\7\T:9F>I`2[!9>1:[PU"U(]\9DL8I +M[,YI]IMAN,8K3-\IIPCNL;*93)O"Z+*>_K%9]KYKY1O*,IF0@#V6E_:]3<!F +M`<$\)"$.%0_[5)7NMA,_(S_PL,.EZ?,,[P("K9ND/0Y#(*#6KS`.8)(!KXB7 +MLQI8GG8X4CN_I_D5J$_+/RQ*R41OF\TO@W,&&Q*L9C2H:3BE4:M5-ZDND+G> +M+1`>0<W*WID$F/+-Z'2$)3)I<I"<[I:[)$/M_V!3&+9B/)U`^U"SC"JV)/2@ +ML[/Y13)0X5243>IHIAVI!\T@MGNU7BK43RFW^X>!9-'$VON:PR,#VU]^!"O6 +MV)V%*\OX80:!WXNCD!!SGY!E[,C)SK::L-;*TB7S'WNS62B1&)[PC>U.Z;EA +M"H16D<#Z1"C/>M8$_ZR*#;#\>*DO))@"]4Q;K?[W>?2\#B)9&YH&&1#*4)FX +MIV_7-.FV-EF]2(:P=SUY3G]8)6KO"J'#(.7L'W"^#SYQN!I`DCF4>4-!'`C/ +M*/`%23(Y3O=L^=4*9VE-#4"46RX(!\_7L8'%,;'G".''P\#FK=7C#D>*[,3I +M?%LS=8H6D>]BOWEC@)*B=YI)M;#!]<(!6"SM(<J=V^+JZ(L<-@[87]4Z%H[L +MI[`(V0W_B$;G(([?UW0C5&+W4T8S*T7`T^2')U#6.5XF%ETU3C78VL9_H`_! +MY!JQW:+,#.'I(D'<D7,C;NAUK]S-*X@U;`8%Y;-MDVS;D=05<%'P0N>`HS*7 +M>1R(,]:SIXBX8:"N7'.PR2<.)P=%[</5)4\14^$UU!%5PI5>(/N6R(C:!=!& +MD.O4LCN[$0U4^%:/8&>*MF/8G>+`]+D0%1W=LR&O#\BPED>!L%)0@)9C][;4 +M@>XSM\9.:)@-;`P;C2R[(9V``#!;2B#!((RQ_=Z6A8FC13AC)KPFS,2C#KC@ +M0,,!=4?RNT"$]8]=HQTZL(EN1[58BJV!V[57>%W%7X>JOLBE`M$2#H$]D*^X +MG5$W&.Z",UMY\(ZZ?PZ2Q8I97T1HY31%^T?DEJD<Z7><3B#IQ[R'N(RF;7Y5 +M?FA:X>SN(7R,Y(H;,A)1F"=-US`;XC%_I3B;D?T7FD;8![YAU#I-;%CXW7JK +M^PX\LV7FA2=25.UV<CG/W"3W'#15S+7BC#`?A[.D85>$OSP6%60;NVVTJ4.A +M4_NXC%ZG@OV7P!"@KL+@[/0<S#`>U@YU0RLHH(\`D2/S8NE73/1759@?VG-[ +M#^5K)-V(KC6BB"B-J9LJ?F(BIO&UP^-/FN6/E+:U3+;`=]/`ZK5#%!T+@O#U +MKQQ$3>V`#?N3<3,8.])L;@N:L<PP:!_I3)0*#PS*Z$5)+V'2:-IQJ7/]*Z%B +M^[BW>%8V%G.KOPN7][!"[<'*KR+>`%0ZO_69&<X]_7-J7<Q]!FHUBB8MH)@U +M!L-?Y6?F;KTS*:`0%'GP$]UKT5(^/H&%X#)>2QU.UUBS4>G2\R`)1#0[B9[] +MO"E4N)/X/RH)DT><1X-KU`4F93].H>N,X2VLZ]+;::6/Q72]V6FY42.I'7X@ +M@09-A],I3!,:C#/^]1Z>LS"7-]A3=Z.>]>)V>F1T\KH9=\5.07;*4JCJA"%Z +M`\C>PA3VS>5?9UUE[S7/+R7B>K_&UGZ!Y7%0@A(T?$I=:6GZDM:)'2;2-S9/ +MLO8OQ31K(M^>-'.XA.G'!TF$BW7LCL,IF@6.0JR#Y.\(P;V!X74=#QH1T0%T +M%C&SCI$*^'_2-=-9JNC"#ZJ",4\]LE*,%0[5'O<QUX8F@G5?`X=M]9X<!/&V +M]M1A/@YE1%J`V1:5]4W_(5,"GK)AJ186[YJ,VPCJ!PXM7TH[M+(-1_->KA9P +M\,%&QZ%FX`35=#VBJ>BXGVQA2XH#.SYX`),GM0SI9](2TZX1LH!+S*$BXB() +M*)C5L;LDEB6YHX1"HN4=2%H*$Y:LNC^=5-M>#$I5YA)@WM].QN[0];"PJ&F# +M?,.BVJRM27FN=O8,P?\`P=*M!EM!DGG[H_UZ8<,B>%`A%P!,O[/%@[8_5"DY +MRX51)=.`\PHFMJ90"*@XI.^8F,9'T%FYMW\E%H5.4L`XRO\.=X.+42F7Z?%= +MUH.#\WWGJ#_"]0F<4,V6G#T<7-ZA*MP+`CZ:N`KRI$N5NP1N%\2=SNAY40I2 +M%KO\6QHGQF4KH'C;5@VCGO(394<E)\^B>SKUP$USQF?(B`3ZU:FP9BR)&K,K +MC1`$X./>F-TOJ2C,?Y!9K!B:J`Z''=?RG,I%\TB)I;KUTT-A66=SHB=B`D57 +ML*\B9X:Y]7CA-Z&[`7"=9Y`<"1V08NK?,;CS*5A#>0SOT29]?W+:$2WP(IR` +M6#;7(U"U5?H&ZQM#?;Q$RJ0!JKC2I#K3/(!P6;2EU!<A".-P0K-/%"(7!SA[ +M6EK5`N649'N`_$]G<@N1Q5_F?LY!<#D5Y?<>O,1:,2B%@4-;YL>TXPH0)@I7 +M`P+BM<:ZD'A$\_+O7XXGNHD20)0N--U#>LA+8IBW&@FWGG%SU[A%"$$L2560 +MDF&G&SS-9'V/_$0KPRN_X[QMJ^@2SK,YT4RYG,Y[19OVYO,1[RM8HV4X+<>8 +MGD%0#9>.\[9%/ZMK<@#&:I79^69,&>(IMYR7E>\;$&:&@S;'?%=7X3)7J$BT +M>)0U_TYQ9<N(J7S!'3,IB>ZE9!;>)S@$)V(2M7+YD#U6:R9XKNH58<R'8@F7 +M-BTPEP_/F`KC"<%S`7Y-]7&?4P<#+0S$!JP/O[&5FD%[,9@*(NNT)10$ET-2 +MT7_^4OF^EW%<%7&+2_YN]%DT;^2/!(DKVQHU7T`DBCI5DMP!N1UP-/.%DS.I +MX6=F7(21C!!Z46S4T0C=]3?)_&$4-L^BOAY@NH="?;*&T@MQ#X%X3=8JW1PL +M`_+KN!'7X1OD=%E$1KNY9>$`Y0[?!,!E_%;P$@9M[J4!2V;?7J9KR@DK_5&0 +MZ4D%.>R%Z):(=I#:@8@P47-WUYI]GC3)=ZHM-RGW3DV4RF-N:;/ZC;F,`%XF +M:J3$DR^-UO.%<GS)1\1P;8UU'OBOC?\<^=2>(6\"F@9D]+N>"<P#3!;2=!/R +M'(N%D*;84]\CEGA@NE<;-,:/$'33T&;T/G;G6%-[9M:`]Z$)2_30/>M+.`UP +MM7OEQ]FL=+*8#`?/-V6:^@Y%SEG(<..;Y;(H^$H,G%&\,DFEB?*"!6]@VYG! +MGOOC!NCP3GP'Y[:+1P$N#*F?6(UV)A?.XYS62=)&BQR:)TO^'6L6:O?TNGOH +MF>AE>VW3Q+^7)L[9\V>8!"AT@0<?+C$:.0]9=72(O!%>/(5?/]9""`>7U]FA +MMD(3>IHQFM)CGJ,V"3X.3!Y`BWH9:/`L%%IV03`3"CB*>Q[@>,M.GO%(M,16 +MIR[4N-H70_F1S`[>>ZR>0L8I<U,:Q3_4^.7&63KUH)6\K"_#_F@PB\/8Y?,^ +M,=3(C!HNX9QR(4UY\44.A2.<K9(VF/INB`(6+BI,.Q(<,(0_/]1ZM!+4)>04 +M1N/:1`ON)P)JZ15?2%&?).C&0JD<30`?_:NO=WD!HX_O;?[SFKQE1X-)C<B` +M>%\Z\("^.SP??@UG)[9(>E$''Z.VX4CG=W5`"XDM.(ZO43K*UNWT/9:2?8AT +M(),]T]8S(D-VQM8A9O)O0Z%6U-FQA`CSH)+QSN1O#H]&B%7JS5]TDHP%/><[ +M;6<SM.?$"YJ+UXL3M\PPST(Q0!M!.RY''%!I*NXCX<!#]&CH!2[$H7T'MEYC +MY+3Y%0N_LN2%:@61_+]T0KVU,0Q;NHPRZC.DPV8D&X4_K3.I,@^0,,F;5N.` +M.G0S8">BV#FV<S8@?^Q!%QCP9/8/A!U3IJA?9#/(',N-S,F5K-^@SO`%E$G3 +MU!=D)M'R!S8S2TJA8TO1TN$UR\VRQMP,BA[PW,WF\S:KZ8%ZC^(YZDTZ19*` +M)CG,S]YON1Z,RQI>W&`*ZQGAFSV!#"#H/B=8Q&%J\"SR8@&8<U&T34*Q^CW\ +M/YTJI4X'6T7N,":9,R6EF+,"8^ZEU2+P+G5>R;`P1+6\A(\8QC/%$/.?1ITG +M^19+V--77A8J0;PBPT,)1REB/^984W3T;E'-EF6/QO\N<>WJ-M6\MK//H)=_ +M_J-E`'17:M=Y]>J5K`:?=";=62H6^%BEO%*IF.JF`/4N_R7<1IW&[@#EJYZ" +M_S\W<^%BDRHSI!"+1=?<+J0,I-+A,Q?:K.?FGHOT-M#2;F\(-L_L:"48C+`" +MW#!ZU&0J^B)6X;P)5=7&#^E5`-:Y>[.UFGM#3X+KP1-W>^F,Q:;@T:YOV?Y] +MJ4CIVM2LO(/=LOCHY@R&HP3IP9LR))TK:`OW/A=H4-HSPI."(I`[)R&CI6[4 +M)!1J3"3FL;%]WD8X8O^[L1T$1#(2V;+(X&L$\F\8:>>KQ8:IB#.F).O(1L3J +MB^MW&%<X\V`EKLQ%5>F`99/E<I;2\]<O;NTK-PJ4V)5C1C<C1^O*3E%A!.[; +MGGAJV:,5C$3OJO(,/5JI'"V@^E$2]D,&E-(@170/](9NKTG1PP#D^20MV!3! +M(88O[G2`,#<TZ#DAE1F8?@@]*!A-\^V?O'T3ZH6HT/.TL3L24HC[I;2[K@SO +MS-GIAIT&GN>XP1-^>*@"NT3'^,,:C>*E=#?-$'-P+W*?DFGG+RV(V7Y1DD%^ +M13&2K\[(W6&D;*IGQGN@/@75IQI3B\.R$[WG%`][8JZONR"G!MD>;DO`M#S7 +M.#F+2*EP\)D<(Z)5E6_\NX<U$Q.L^`3OA1E76'9436-]U"U)WJQA<>RI#.8F +MPSMY[SR1_Q!M@A"1["=3C!MC$\I=D&4_,LZ6.VB#9(R-0:RC7N#H)8`X;.R( +MOOI>%0(-A^G"&8WSYE=:$LH&KI0R8\A\(245F%S>,>*@!\DIFN2D8>UUFRG, +MDY/3B"QY%R^8%]#BE*SP\LA-J#*BHOP^KL!#4'S@7K:BXOM6>]K(\:Q-Y#9M +M&:0''!W12).:.8;W=B;:*A7[8UE/I^#OS#!+K-%75./$>*Z/-R$5FY_2"9%Q +M%+IGF-,8.*!/U+B49C6!7B9CFH3^#$0IUM\_EL[I;^:[K^$7E\.0B/0U::D" +M<)>I!H=4T#D:R$E]*;2(U2?8>I2IO<-9=&##O32K$-T=0#`6I@L3"W*;&YZ2 +M1.V`TE."&42I%D-,[&UY!L>A:]Z)MW,9(#X)6@3*40H\EU5C!:"1]KT_2Q+9 +MW9)HD):2==I=*F'KQUX_VQB00Z2)COJ$;..3>7=7="`"^CY+(%/>)=4@"<1L +M;*;0`D_2[PS93J2SI=MS)=:<N'HW86LNB2+(WZP%R@K&0HB_^<ZAO>M=P`7" +M*CE@##"6JZ&B:%LTQI65O^3"$0@KN6.+'+98S#SRV?B;N/Z3833[SOG(O]W? +M(!3SSB'CU7R"-#6+C'Z^/>6D/4Z"<\%G;E:.+1#F/4R.=BU3_1&FE**#EX6' +MJ4E?-)\-"O*X52TK19<%1A'L$4O:<"H"D;RD[`>S3ARV(4)/F%<J2V)Z=G9/ +MGG?X^KL(!Q.A%IY27DF$HXAKM1MX<B;A+',$)G(A.?]!]"=R&?+G3&H_^2]P +MHJ8EG;_,IN%90GE.J\7VZ5(+3"JVZ)";]]-#N%X3"GZ:;$'38&IC_X"X#YH5 +M23L.>J;!\I$,R!+>M8+'/K3SSZD/"3Y(01+;E1L,G1YU-?,T^"4:!!^$PKA7 +MT[ENIM$P]888.#/ZFXZ9Q8&&BNJ]O68EJ^6D12?)S1HDFSH:C$\'LW"DB%7Q +MB;=I$X'F,#-2AV!Y:FS]=QDPR51@_7=7,H,P_X6AR#'*VQC$3@?/;KZ@$RT% +M+>)?!"1K5XH^VQ&9SQ<WU9":+D)-(O5C)$%4A'JSNHWK5UIIXS?Z=V/9MR?> +ME^1NL[GQWX4^.,=&6A()!6RP1%Q+U"K)'U8C:BC`Q1"_NKW_Y#R@='88JUY7 +M_"F##Z&594Q?2'(A"$PQ%%\;_\2:3:ZFA6%?8PY97Y9N;2`+BG@0;>B[[`;7 +MMH$T7XB_>M]K821YHVV6#)5`2CQW.EK4:LPGE.!4J:W#X13RQOA7"NY$)-%M +M]\R'VH1<3GYYF"S2`%941%][8L@\,,VZT\+0#:?FNF'-ZV*->]#M3PN2>M'7 +MZA!2V*`&`J@;^%INM4.S]N+M@TXT9[]P6]Y!3-4\VC^MM)E]GMP)'D+1&R\F +MAS'C2S,P3/SNG2`;)J9(`HJ&#XJ^(T81,J2[H4Y"!($_@$X4!+E0`(:7F_'= +MA4Z5YLF(3L%Q.UKWM%E$$YD<=JZVX2:3`6F2@M(O"&T_"/!5&'-E3=++;:#0 +MD1=?U*_Q?]5%7@%IJ3R=)`0TDKU"D=SG"[K1'M5R/710FDWP[',9W$JLL)-, +M?L<F[;,99N;BSJ?%:[:ETY]7IL0V)S_OW2F[((-+6F]Y:,8D/W&SYSGW%*@U +M2`P)_J;PI6M%0?[SMRLND+X;W1DEO9ALCPODL76W<]8D/8;9S+<Y2;H_%VB_ +M[QK&CC`T7"H-D5+8@4#A&N^V7:2SH9`KSL$GP>K4;\Y2B/&2"XF?9<?AK=NT +MO0<*^]&_8<&H8RNP,ML<1+_1"^?+;H2GQP4'G$5R2$CA47GA1_:A:2`-CPZO +MAJ-;<QM!?HE_];^6K)8?Z_F^5C,WA@P5Q!?O=-&6'?_BIC0'^=:/MTW5BK#_ +M_<FRTK`[;7*P?U>MK[48':8.M^0Y/H-Q(H>00X.;">\'%$"@;DL.)[:*R5]V +M!W*N4")7**KA;-."B]"3`R4)5TMDL$Z=BUGN^'/UJ.,&N-T:(E$'X"HFS'.( +MF7U%N@]2RP4&YHX`8\^M)$$[#?U,&WK68/#!.[]+Y`+;Q@DXORL?,"^]*I;[ +MI]YDMX&Z2%/6I]O,]R>\&JA^Y%Z@WFL]TMS/VX]*VJQ)FQ>(N&'@$WW7VHC5 +M/ZK,QL3A`D[`7@WAN34HL2U:U?I[&O$1^,(-]$6(!E56K&>](Y%IYD:-'L!: +M.^A][3AYBX+Y;0A`W-)")Z^PM!W4(3&M\1K!42/KVXK?&`_#>$(+)N";"DQ; +MS9A\0%+N4LP93U4+7)B];I)0,SR"9^BU"H9H!%F='-GP(=5>U:7@D>ITZG&0 +MSPI9"@:$(;D.M$PIWS]._CP#+!L<&!@K/&QW\>'&\DAZ14_EV"FT0RL9U!;G +M`.&G$5'Q*H<;>XEOE+M?```ZPK@`B<OS[4U0&1Q.8TQ-9QQD1!HBZ^#\+BF= +M?'ICJW_ZOU>.JJ]H]EB+!K>0-;.2-,>[(V1T0-'NIXE'OD%]TZ+>2:"TE?K1 +M#Y:&=@0@0<8"CL@H)5G*2_8GG&B6UN[&]?B)]O_D>2%)UIU_';T.!GV+=4(N +MH1YJ"5.RK6VT]E)]M%&H*,9-H1^S&J)ZD?P@P_=:/BF7`2V0BZ^GV?O#8^F5 +M8L:)OPXST#X'.''TMY!JTO<?:?M=3?(7/P?@;Z7P+>-(C6YUWA68@2VX6@+U +MQB[3#QIZGZO?T9/<_!I,F[MV(=L+3R-@,63-I,1XX>?[N9!BR0=O-Z@&0TW& +MB7[VM'Q<DS,^-V\NCX:D!F;?7Z\6?`J@3-S'Q)>HU"10U;L^^;0'X!N*BLI[ +M`%X^/X;D![C/25?/J8J1$PW6D[UJ[C0LV6<(QV*(L-LPG/!,_^\C1J7YYOE_ +MO'>9,LI!!@YK6$%OD\O,>HRNU=KFN(7#2U8WTF_PS^*%C+O>-*NN0P0$'%>Q +MQHA]Q;)BF*J!C4?H,CAB><5PO"E>@FT0@+VEJY?F.^GD8P28:?QJ`8*GZQ.I +M9P"V"APO/_7RBZ\VNE=ZW.@J4;21,]B$=33[D21X`-]08D;V+'[I4K<.0QLX +M,D@"9<(-^Z#1#-&\.)4[6DX]^@=-;'NT`1.^N@N*LGW&9E>DYBAX4N4\6\T_ +MT'ITL6^=83<]PJP560@+SXZ\S++[:V@R[C9G;K"E.R5BUC@BX#X$1,R5]L'* +MHLO2+(:+8:=@06<]YQA"U&>&7%ML#I?*Y3(SO$1!B`3_+P!X\9GO4B$M"(S= +M;F<OC)D_W?$4<+BSW-;>;_UU9T*`FOU>O)\/_$4"M@C1K7K^)_4CBMCK0M3B +M].-[>G0)ZZVJ/=4.8Z>?(248O?);T8WJAMTCN0[%PTWU[.-CUO'5>4$T75'Q +M)O5".',AGT!WALW&R8DV>TY,J6^NQ?*=BLL^?G,#U3'U;#1NN,RZ7'HC@#5? +M(D:X!;Y`\&6!WI[+ODO46HR("Z.4'3LK^KO&$ZFS,WE?,DYJ>#DK4';BH'!] +MD&?X]\YCL>[%;DF;E$"#%"@M8LQ#H2]K.E2K^Z"ZG8YC$\IN88<0E>>;``"Z +MH1*XN8)DX*'L[KI)>'W6L__0P*T(I_4693<;@A%\-#A6\H*XGJ#/2T46JOAK +M+^YGH`;F<P@2W0]L#]#E:;/C?-,6FEB`E^7QTN"([H(C*`/Y?IKS2#/I6M`A +ML#NRR4.\0@L#<?T$(A66+XHPGK=:2P4?2J*Q9?J)@,]V:G&A]6='Q([?R5*A +M<U?RF(N!QWV^#[*9N?9BH%+7T/<T.$;.)F!2,#%56E3`H^'NTOFE-$.1]`SM +MP>I=\"5S0"FO5T"UX#J-Y#.SW'\YOS/@H6I('!`YJXDZT&`K$"A7USET[I3/ +M+RU#9]ZL6,(TT&9!TY,]1FG=_^:X987GD_2DY[[GWK19QP.39)F7:#P9`&=( +M.K5Y`CC"DWW/9"P%48&0'VD8$%HTHNVG.Q%O]/.<^_)P0J\C(.IAY/;-!]6( +M=#/O'C2\IBR:31K8@[[QY<;Q\1=A5[QSR"8B2-A/F1)3G$?91>KY_[94@'N3 +M3WWK%.M$PR-G$YCMD;W7S[?]<2V4^=NS!V0SG8%&!T-^5&QL]BLV49Q+21RT +M7-<@&M;&;B^Y$&YDVO301F&2C2_?`7=#ZFGY'TDZO;AF9_\9)65?9]V#>`NK +M:&'^?!"I\/W08`7$K?_^S=FA3-2_H.^K1.%[X%VBHIMRS924QBI5M29].U@D +M[CR>\LY9FCH"/RB?/8KRL7>1<V2-_].AVAL#(1@%TM[?^3GA"(P?O4%32";. +M&Q4/\QD6#/-O6$_G(-K#`QN*J%FCCD(=U!)P[0G]7=L0)?'E[5]$%L=0AUE' +M>K?D;!CK2JFRV+?#2"/_X5W]-J('=:Y=YXT>)V*&&^\]E$Z*?W"N+H1_S+2) +M"H3&@;4/*](.UZR,;LITE-#=%EIO@6%T%VR9)*LCQV=&T_7S%_;%%L_JSSM4 +MYW'=$C^'(]#AS$97_A3&IZ"$+':9E%^'7]1?^:'!@U7[Z5$IXAPZFLR^ZC+= +M0H+(Z&M[4WH0O\;*[V%&.:C-W.1Q;].Z>PWGQM/Y!=`?/+!#[B]:3839+81= +M@G<M4XGXZH7,X)"<FV0_;%U->M//`3BP$']S^^2NH^K"Q[AZT"AK36LR\;WP +MW."@%Y_FT3>FH?8UMQCKAO]LV%%IK2:_C@.;@6"LT_IV2K!2EYX(!K]6027B +M#J#P4C+;[;>%TLKN3']+5?HCUK'Z5Q4DO!61L0H>D4'1^9&M'Q?E"MSHE/-4 +M,=8MJ/$2(C&0OV6H`*50KKOLVM-XB_5>-]==):(Z'$ZF3%COR%=S,7Z7/&9K +M=3/7>R`(#I$$ZF_YC]W%\%J#$%R"/`5#0-V_6S-^C5EV9*;%L)G::QU\GY]D +M(H@5AC3Y4R*.IX/!N"R99ZFT?@3$7D@>P]]=,\#"WTH$EB,Y[H0_0\Z_H<7[ +MQ/<%($H8\RZ3@,Q[!SKSV4]QXCB*3GIZR;M>OZT,YGZ$@?QT<;CSYT4*!!)F +M9F3-^\!Z(EFOXEYT&%J8U<%T"HNK'$9AQ=D)Q90RC4!OJ]-1.Q0EGQ1QY<,Q +MX\A;J2XL@(@5#\!`)/)88#'LT$IT?\F8*%_&@1W^N&(PSJ$+<)M[`F@NVC91 +MDB7)+;3'Z'K4Q=ZQWU8YRVC_VR;'EA@%8U]=#2G)W(2XE0`AU(\%/OC9H5"/ +M;&7KXE\W?.8XVL<-,[,I\)HD=MS=Y2THV(3)!9-(E+.NU.DWMSN]L_/#NVH+ +M?XJSH_0A@8%X-`4)9ZL`J_A78C'DF;G"VB"?P$O&ZQ=Q.0%'6P`N\GOZC0*) +M=4L'JVO;[-8=?M`X>;>X'ZO42T*L'SVG26!RP%RFHTXITO7+J8%U_U;6]2K# +M?8BB;JS;T:%^:II9#9NP`&"(M*-G;17!KI]F28/&7+TLGK"6<E`?6H(=-WZ? +MD[TZT',8F<6J84S6V!0$DF2YQ[7$/<_JW^6(S)NA5RG/7`>?\4=@<O[*Y,=6 +MM:PS;AO@?UG*63L`,AI=Q&%=P>T/>TPH$5F(FPD"]OW<XN%>-9JX@E$!`V0L +M1:-'V3Y%/-P1(CGA/<#AS@)>J+:>E?K,$S=\WS+#<W0C;R;7W2(^Y^6F`YM/ +MX4CN.`R^315+13O97L!_/0D4C`O[>W^KIDQ>>YXE80`\NTRO%0%F?DL@O9.' +M[8HK&NW.J-U"#/7M=^=+H1@.R48J4L&BPI,+7UJ/X%"W]K[%K2*`&5_9387H +M7!P'SL(O@+]D4VV'`$]+\!"'M.FT!@5XVZ(]!$$]4,/;Z90?;94YG%5D(0"P +MSRIDG(]_!404$.3*!<^K"A^IN?(-?<Z[,["4H=5I5:#@)*[APC"H-:1J[)3= +MHN^&_U$^/48/\U1]D>#M2F-U,5_W`(B9E+MTAY%-5CRLQ^(.H*0PW/1R=]4) +M?8MVX(N1T0'<,8)MN9_Y3_&G!V,YHH$!<_:>=;HA^AYX`KLQ^097HXMTQC-Z +MPC>!P*W$"G$]P0K%2R!NI6;K??%9@$A?&<FO]H`5E*INUJ`HM;<(/D.1"K'0 +M\DVBC9*KPJFN8K\Z6(;*ZKP:%KQ(#2F)SL2(1,O,],'FCFP8"$1#9M.^)Q?] +MIFJ]QQ;==@%XZRO:+6.*5_("7SD,.Z"X*M%>>7-:<-W1TB;V0]U=$6HT@5@V +M]EAI(<!``'\`O4VDC(I``]"G'[7]%0'!HD6#K:55%CBOBX]$XP6#NDJL)H$^ +M(](E[W##Z"<9#A@76BRWF]7@<`']B*]U?RQ.JVC<3#>F#:W=T:HH#2G44M_A +MZS.IHW4EQ]?O%PPW9S&1?%5F@JHU@AX5T8$A(L:RP]A41DR`@<;V++D!O'G2 +M1X],J*MM?8JF).WJU!H'X5:L\?JAF(=`^2:$DW6V=+84UTU>%5_\@:3KH\02 +MU!LM^M3%:)_4/GM"^_=M?]=>!K^L\R_<^VU!FDS]Y*,PF>NB"IR@!NVP'3@A +M*7VA%VA0/XX(;+U[82(4]!.:]?2\SA,3BYL]I5DO<YG?"TP.3B-F!#T*F%#[ +MFD0&<NA8:RBO_(M*27Q`<&/D$Z+]V.KGIO?PKL4V^Z70^K5*7=DU/B^[[3\[ +M7?X6?<`Y4;3Z&U":>5*NB3(N$E=C;.A$O+9(-8HD\<)ZTJP!O#0\LV*%!3*) +MZ>\KUXQR5/VO#I"EAZ6[2^=M@3B4<Z]W^`VX%">W[`"-+^69K#M*/UN)=P;* +M$PRK;8);*&-+!7WXR4ZW;\2<CVK`C?8^I&]D>?2X?0M?@77]Y9IGT#LIQ0SC +MI>G=3($J%#M3&-6[J"N'BA1/T*=AW1N\8IXP)ZZ>"CJ;<K,J^/%'$(H=Q8E9 +M6\7'P4'=U#71R$X?>$KZU3-FDZ\:ZZ4^7`\$#-38V!_53T>Y<#VN7T<?YVHF +MHX[&D0F8%8D5OPHK3VE\5\-YUJRK"6SZ:WNSJ-*G!N*`0ZVBA[%``ZC@>L4! +M-#1#OSMC9Z#15ND>K9:PI@(KN=/GBSH4%S`&]2+3_8^#E\$3OBQWH'MWU6T; +M\Q=EP@_#H>O6BB#6M^"MN3!^=RE]MRZ"VEWQ'$D>@++.[("^\LQ,T*SX`6?\ +M!+7*`*7?)]B=1!^YI&86T*6-0.GM[.*7M(>QE[HO'8,%S)947!AAL$+3%*]9 +MQ.<J-F-PL)ZLU3ZO*B(T(3]K$N"T`92-7\J2W3DEY+*DD?2U%Y<57>><O?A3 +M%%%/0[';)</*OE@5:*75\`#&-\;3T^@Z$9(E1=^_7@$WSKUZI6N\I*X+03=? +M/:K;7J[&SC91K,7RR6E^'1!58JPFL?V4-"I/6^@M.LW,[1=<T8V4C^7D[7'K +MSE7ZJ3C,6KK,L#]^QO_OA.;C3;P,`*%;-#2^/$J.#"(58,Y<R5DDQ77HH:[, +M>TZLE#682XK1;PK=54+\A4J[L'=#`@2$XV'.6)DCM7*!+-I=LEGZO'+O3"B5 +M@&=#-MP?IXE5:9*Q%S$#0+3OYZ#:GU,#ZA'*H6H"9S#%8='*\L%2)=QG?AB+ +M[Q\CFIQ^&^GX_?+E=EIL_=UM"@F58*?A*`YO`X?O4<#+Z!R`Z#,HD_<@3.W: +M]T"4_$>3@[.U&%JEV-%KZ(L<-X?*5AEO2#F&@"YXX!=T)Q+HO2*T*,[<[O9V +MLTVTKD9RL:4S"ER16"LL+0(MC&_*DSQ?MZ1.G)2LAFM";J;(RE1>!<$-=GR& +M6]JN;T/D:'#_JP004=/^\0WT`J8T?(V05T_<["1R9KGA1WP@YBF85J;6R"9R +M^0=;3T6/0L/M7[8S7Y4/B%[:L_-`$'G(#9E<^DS_,HE14SH&;%`F!<8(%[%W +M$9],MG>'-%6S!I<*40F<$$*85-P6Q!9B]&"VU^R&K$LLQF_&\Q^H-?=05=-H +M&25;A<5@FKGV5>BK_JOD]'8DYH1C&>8?S(X4,.AK7*(0B86_\`T'&'=D62W; +M(.=92\<^QPNGQ<$QDL>PVLPJ0"Q!71D)]MM!JV?"!,GOMMI+]ZK=85$Z"4V< +M<8'RT<2,X%W@\GJRS/B4_W4XS-8N%.J#$,6LT2)V>X?I3H?*K*83&3J=-<@A +M7%N'6#QG[*XC&=@%O=^!AJZTE$>VCH5%B$,%,,YS!UB3K\:[__U_/?W_L^9= +M+$0[]%34$%2A`I$X_W$51X*$Y]?)/CQX'%U'2W`E#Z&.'5)\N^35,U"1;LY% +ME*C6[(NXNI%F&E9B(R19Y]:6\_A/!(>;^%9]LF./CM)1G`TT"Y=]=(8/X5N. +M70L*B$*;.8/6<F^?EA!840;"VFDVS1:-RSS:M^%N-BM?KOBL^BYI<>-;0\5) +MV^)[P(ONAA0'%ZWQG,!H&+GT"UYVTWI#G'6J:H`LK]COP.Q-+1Q)9N8]8YYY +MD^I+K;^RU`7(;"V/W//3P5I:!AX'0>XL:H`*B*>:.^LA0W'"I5YI;T+Q6+1( +M%+[VJ+)9N<B7U;$3KYWV-TIP17!]]G<KXYL\.>^7\BFZ^U"$2)%5*7BK9-VI +M2N06O@'1\')`*S#DBK>)L],YQ!G$#2#?*#E+K]?(?@;JW1@]6N1XNW&USE=O +M`<?JHVJRJ&7%T5^TE(FN&]JZ)L"3LIP:S'Y@\,87<^*Q=DXLP`TAPE7'8>IR +MR$#%_S(^LQ.?0ZVF@+88#8L>CE[7&[I;2\I2=%DR+MR$-:4QV#A94_)A&,+F +MQ=UN6_>P989E%2:S:SVHZ2#*#`+*,X*NAX>"NF4YS9;V$<#)'L\R_8;51*F1 +M>3X`,L8SM]]V4(%%6D1WU\7>+)7*/+EOW@S!/D57QR9#R3M:&N6SJB!B.5%A +MY20`P\UP12;DPNX'ER`G4E,87<\@D(.0#:7.%-H+V'&"M[!JAM<S_?3RFXL, +M&S^#OW2$Q/1SQ&9(&N&`(+J0_$WMN+RC(R2H43>&<MI[#5/_=W@+IA)`;&DZ +M;*;B.MS_=Z\TOLU5$('I6T"Y=Z+%:M;PGC@-26;5]V!&QO];/&2$D(&*+NR: +M0-:`O8)FJLQ9PZ&HO,U2SAI.4#!><:4P,F[,3*)CK>5KUU^MZCY>>NH`H'[3 +MA'K]=&Z6!?G>SAB]^W8W0HK)%-\4LG?10`A,G0;XZ]1S'[-7(T^>16]B0LC! +M;<PTDM0)B^S?*)HB'%2&"E$9BW<'"TY5HX2C_\&!;E62Q#J<G&R[^JL!28<X +M`XLS3/'[A"J,CA_IQ_$:II!$(*WLG1J3JY0;-<0AI^![.26&7BT4`U5;JZG] +MG>`3D<YO0S$S[)$LA<2T0OS6'*@A)RE%U$8]2HPX'20D,O*FH+6B2;RJ^>.D +ME<H@)F(71:ZO='*P+F>;'FEC90`JK::$Y[8`U(2T6H@BUF`)8-PPZ`/`4+NB +M,Q5;.$^QD+O=>N+^"6'X[=A2O5D5;IU-M,KP^N783S%ZE\C,*\X;@P5X:QV^ +M;T1Y#)%*LC@7GEE.\,]*4<[3!;`7GH#8/E]72:C]TCTEL:;387`2P+CB-^H* +MJ!1^[C@4%!55-B[<$[F!I*EX]=<5W0W=NP9ICH*JN4V6O1ZA4Z=4H_&GR`PS +M1]7GE:AO]?39:FOK'Q%GNE)%^FH>-98O$#/U?2`B@GD.G&L4_7`B`41A..V_ +MD!!G3_8^>G^$CBM*_#@W@>@0\#W#5\X1\&C*R#&=EZ(HU`90ZB6^9I*4Z'FH +M_\,L_5*=!$IL#Q7A3S!IYO!P]T5%9EMB7DM:A_78]9YN_[]+RZFJ4V>J@0SA +M#[NP-D#1:C"-(%KC&'R>WHUS>%I2?_`H,_NJQ.C'4QLJS'XVE\)HT#0_.?[$ +M2%/[!=K2HK47V@L3JAGSL0&6M_HO>!KX61&'6#G;RZ<P'^UGB'^.H%\C5P1X +M7+-'XK>?!%%NBHU2-_V7X.*[9ZK;\N0N=9M\=$>EL7#]NHAD\7*FJKU.^E:( +M)]6(2ZR!3PPIS`"1YC$SY8Z/])K`#883#9&Z8:`W63_'WC1\^#.6!H\='78> +MHD(7]:M%]K(`0J,F>L/0N2LE$+;>/(89ZDD\U6W+CA<+.S'I_G+-S,*@N,HY +MR3:4#@,@`MG2V"[EA$K`^P:O`^(.:(.B'FK@-M[`S"I$9W/**,=?C>5;I/!L +M0OST&X.D(&ZI*&\4M8D5B3-S,33)*R>/*X4I<8!V0>6YW'<TJ='#^5D)K\QG +MY`>57OY?@S$?1(MILODT@KL2K2^^_L(;43,(W==PA>",I\?COZUI5C^UB6&B +M,[(<^_$+YKU8,9";R/_2@+9D#WQ=@^0G*EM'TC-58)&V8JBD=]VJUMURJQH2 +M=RE]&2WBN<V%+DPI@B2[H45_?I0K>^;BIA!)ROUGE4Q"T3`@"TK6XT8E,^W0 +M'N<*(4;RE=TAXS8SQMYES6>SPIVB!EOVR0I36T/D1_]WL5W#5N<`=^C(QRWI +ME?N@3?TG_Y8__>U%Z?BL^N9Z;F\<<F4NF,P?P:N-C"O#`<"C*)HTR^Z:^WEX +M\NMTCSM;SHS/LITHL/^[G-6>Y53SON2&L61A<]!T_4?%:EC9&GU84U/1A-[? +M4#[-9J%YPD30#+9`6#_G+]%`";]Y\D6(OWXAZ)]]K%`D[B*+H]V2=^]M&[:Y +M_^L?94I==M2U@)%LT]N%GV]=<R&2>\A3GBB-K>A2PTBJE%<,<4XPGA)C(/1+ +MS1*(E3&PA@6$5)V",Q[0E6;-*E0=*A6T5U.KY^_C66Y'44^BP3<AK\LQD2S' +M`VS?:$':R4U`;#YH=@7NV&I@Q$%Q&B].NS@\SH$F'NBG'1]7H3(-W@@/F_9_ +M4D9&*394UH7-0PS.R0>5>=31^5S>,T3;IH^"$4%^3OM/P796=[G_HXE!"5@1 +M+V#?H6"#[49)5#Z-6K_XMB;K;,MGSN_&I4"VT%%A9#$J&FMN>8)_\(G6@-]E +MRD58.OQ"_PZ@>Y'+TPY0Y2T3%TMN/,V\.16J8&X"5;AMM)85SNS$6Q[_8+2A +M9^V[>0T4ZNHACJ&`])R!9R7BFS=:[OL:HPQ@V'KC?/.[0-)\/2GV<5=TTD@X +M$````00&``$)P&!&``<+`0`"(2$!!B$#`0,!``S`ZVO`ZVL`"`H!%MOF-P`` +M!0$9#P```````````````````!$-`&8`:0!L`&4`,0```!0*`0``+4,K<;.= ++`14&`0`@@*2!```` +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_7zip_packinfo_digests.7z.uu b/archivers/libarchive/files/libarchive/test/test_read_format_7zip_packinfo_digests.7z.uu new file mode 100644 index 00000000000..4c216170a8e --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_read_format_7zip_packinfo_digests.7z.uu @@ -0,0 +1,7 @@ +begin 644 test_read_format_7zip_packinfo_digests.7z +M-WJ\KR<<``*^Y_3?$`````````!E`````````&/C(9T!``-A86$*``$``V)B +M8@H``00&``()"`@*`5\J+KLX07WL``<+`@`!(2$!%@$A(0$6#`0$"@&57?AW +MX1\F3``(```%`A$9`&$`+@!T`'@`=````&(`+@!T`'@`=````!02`0"`FYCT +.W+;5`8";F/3<MM4!```` +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_7zip_packinfo_digests.c b/archivers/libarchive/files/libarchive/test/test_read_format_7zip_packinfo_digests.c new file mode 100644 index 00000000000..7f105d1f280 --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_read_format_7zip_packinfo_digests.c @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2019 Martin Matuska + * 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"); + +/* Read archive with digests in PackInfo */ +DEFINE_TEST(test_read_format_7zip_packinfo_digests) +{ + struct archive_entry *ae; + struct archive *a; + char buff[4]; + const char *refname = "test_read_format_7zip_packinfo_digests.7z"; + + extract_reference_file(refname); + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_xz(a)) { + skipping("7zip:lzma decoding is not supported on this " + "platform"); + } else { + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_filter_all(a)); + assertEqualIntA(a, ARCHIVE_OK, + archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_filename(a, refname, 10240)); + + /* Verify regular file1. */ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_next_header(a, &ae)); + assertEqualInt((AE_IFREG | 0666), archive_entry_mode(ae)); + assertEqualString("a.txt", archive_entry_pathname(ae)); + assertEqualInt(1576808819, archive_entry_mtime(ae)); + assertEqualInt(4, archive_entry_size(ae)); + assertEqualInt(archive_entry_is_encrypted(ae), 0); + assertEqualIntA(a, archive_read_has_encrypted_entries(a), 0); + assertEqualInt(4, archive_read_data(a, buff, sizeof(buff))); + assertEqualMem(buff, "aaa\n", 4); + + /* Verify regular file2. */ + assertEqualIntA(a, ARCHIVE_OK, + archive_read_next_header(a, &ae)); + assertEqualInt((AE_IFREG | 0666), archive_entry_mode(ae)); + assertEqualString("b.txt", archive_entry_pathname(ae)); + assertEqualInt(1576808819, archive_entry_mtime(ae)); + assertEqualInt(4, archive_entry_size(ae)); + assertEqualInt(archive_entry_is_encrypted(ae), 0); + assertEqualIntA(a, archive_read_has_encrypted_entries(a), 0); + assertEqualInt(4, archive_read_data(a, buff, sizeof(buff))); + assertEqualMem(buff, "bbb\n", 4); + + assertEqualInt(2, archive_file_count(a)); + + /* End of archive. */ + assertEqualIntA(a, ARCHIVE_EOF, + archive_read_next_header(a, &ae)); + + /* Verify archive format. */ + assertEqualIntA(a, ARCHIVE_FILTER_NONE, + archive_filter_code(a, 0)); + assertEqualIntA(a, ARCHIVE_FORMAT_7ZIP, + archive_format(a)); + + /* Close the archive. */ + assertEqualInt(ARCHIVE_OK, archive_read_close(a)); + } + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); +} diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse.c b/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse.c index 7ab13c1109a..6d15a4745f9 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_gtar_sparse.c @@ -214,8 +214,9 @@ verify_archive_file(const char *name, struct archive_contents *ac) * Any byte before the expected * data must be NULL. */ - failure("%s: pad at offset %d " - "should be zero", name, actual.o); + failure("%s: pad at offset %jd " + "should be zero", name, + (intmax_t)actual.o); assertEqualInt(c, 0); } else if (actual.o == expect.o) { /* diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_lha_filename_utf16.c b/archivers/libarchive/files/libarchive/test/test_read_format_lha_filename_utf16.c new file mode 100644 index 00000000000..7ab13e43bdd --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_read_format_lha_filename_utf16.c @@ -0,0 +1,143 @@ +/*- + * Copyright (c) 2019 Martin Matuska + * 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"); + +#include <locale.h> + +static void +test_read_format_lha_filename_UTF16_UTF8(const char *refname) +{ + struct archive *a; + struct archive_entry *ae; + + /* + * Read LHA filename in en_US.UTF-8. + */ + if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) { + skipping("en_US.UTF-8 locale not available on this system."); + return; + } + /* + * Create a read object only for a test that platform support + * a character-set conversion because we can read a character-set + * of filenames from the header of an lha archive file and so we + * want to test that it works well. + */ + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); + if (ARCHIVE_OK != archive_read_set_options(a, "hdrcharset=CP932")) { + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + skipping("This system cannot convert character-set" + " from CP932 to UTF-8."); + return; + } + if (ARCHIVE_OK != archive_read_set_options(a, "hdrcharset=UTF-16")) { + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + skipping("This system cannot convert character-set" + " from UTF-16 to UTF-8."); + return; + } + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); + assertEqualIntA(a, ARCHIVE_OK, + archive_read_open_filename(a, refname, 10240)); + + /* Note that usual Japanese filenames are tested in other cases */ +#if defined(__APPLE__) + /* NFD normalization */ + /* U:O:A:u:o:a: */ + #define UMLAUT_DIRNAME "\x55\xcc\x88\x4f\xcc\x88\x41\xcc\x88\x75\xcc\x88\x6f"\ + "\xcc\x88\x61\xcc\x88/" + /* a:o:u:A:O:U:.txt */ + #define UMLAUT_FNAME "\x61\xcc\x88\x6f\xcc\x88\x75\xcc\x88\x41\xcc\x88"\ + "\x4f\xcc\x88\x55\xcc\x88.txt" +#else + /* NFC normalization */ + /* U:O:A:u:o:a: */ + #define UMLAUT_DIRNAME "\xc3\x9c\xc3\x96\xc3\x84\xc3\xbc\xc3\xb6\xc3\xa4/" + /* a:o:u:A:O:U:.txt */ + #define UMLAUT_FNAME "\xc3\xa4\xc3\xb6\xc3\xbc\xc3\x84\xc3\x96\xc3\x9c.txt" +#endif + +/* "Test" in Japanese Katakana */ +#define KATAKANA_FNAME "\xe3\x83\x86\xe3\x82\xb9\xe3\x83\x88.txt" +#define KATAKANA_DIRNAME "\xe3\x83\x86\xe3\x82\xb9\xe3\x83\x88/" + + /* Verify regular file. U:O:A:u:o:a:/a:o:u:A:O:U:.txt */ + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(UMLAUT_DIRNAME UMLAUT_FNAME, archive_entry_pathname(ae)); + assertEqualInt(12, archive_entry_size(ae)); + + /* Verify directory. U:O:A:u:o:a:/ */ + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(UMLAUT_DIRNAME, archive_entry_pathname(ae)); + assertEqualInt(0, archive_entry_size(ae)); + + /* Verify regular file. U:O:A:u:o:a:/("Test" in Japanese).txt */ + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(UMLAUT_DIRNAME KATAKANA_FNAME, + archive_entry_pathname(ae)); + assertEqualInt(25, archive_entry_size(ae)); + + /* Verify regular file. ("Test" in Japanese)/a:o:u:A:O:U:.txt */ + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(KATAKANA_DIRNAME UMLAUT_FNAME, + archive_entry_pathname(ae)); + assertEqualInt(12, archive_entry_size(ae)); + + /* Verify directory. ("Test" in Japanese)/ */ + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(KATAKANA_DIRNAME, archive_entry_pathname(ae)); + assertEqualInt(0, archive_entry_size(ae)); + + /* Verify regular file. a:o:u:A:O:U:.txt */ + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString(UMLAUT_FNAME, archive_entry_pathname(ae)); + assertEqualInt(12, archive_entry_size(ae)); + + /* End of archive. */ + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + + /* Verify archive format. */ + assertEqualIntA(a, ARCHIVE_FILTER_NONE, archive_filter_code(a, 0)); + assertEqualIntA(a, ARCHIVE_FORMAT_LHA, archive_format(a)); + + /* Close the archive. */ + assertEqualInt(ARCHIVE_OK, archive_read_close(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); +} + +DEFINE_TEST(test_read_format_lha_filename_UTF16) +{ + /* A sample file was created with Unlha32.dll. */ + const char *refname = "test_read_format_lha_filename_utf16.lzh"; + extract_reference_file(refname); + + test_read_format_lha_filename_UTF16_UTF8(refname); +} + diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_lha_filename_utf16.lzh.uu b/archivers/libarchive/files/libarchive/test/test_read_format_lha_filename_utf16.lzh.uu new file mode 100644 index 00000000000..ca5da7a64e5 --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_read_format_lha_filename_utf16.lzh.uu @@ -0,0 +1,19 @@ +begin 644 test_read_format_lha_filename_utf16.lzh
+M@0`M;&@P+0P````,````L/5872`"IW%-!P!&I`,```T``5]?7U]?7RYT>'0*
+M``)?7U]?7U__%P!$Y`#V`/P`Q`#6`-P`+@!T`'@`=``1`$7<`-8`Q`#\`/8`
+MY`#__QL`078S<F.15=4!]0V8@I%5U0'U#9B"D575`08```\:!P``PZ3#ML.\
+MPX3#EL.<90`M;&AD+0``````````PX"D72`"``!-!P!&I`,```,``0H``E]?
+M7U]?7_\%`$`0`!$`1=P`U@#$`/P`]@#D`/__&P!!FDHB>9B"U0$H^DQ_F(+5
+M`2CZ3'^8@M4!!@``GW<'``!J`"UL:#`M&0```!D```!V)L1=(`*CNTT'`$:D
+M`P``#0`!@V6#6(-G+G1X=`H``E]?7U]?7_\1`$7<`-8`Q`#\`/8`Y`#__QL`
+M00IF#4J@E-4!L"5C?'65U0&P)6-\=975`08``$%^!P``5&5S="!I;B!*87!A
+M;F5S92!+871A:V%N87L`+6QH,"T,````#````+#U6%T@`J=Q30<`1J0#```-
+M``%?7U]?7U\N='AT"@`"@V6#6(-G_Q<`1.0`]@#\`,0`U@#<`"X`=`!X`'0`
+M"P!%QC"Y,,@P__\;`$'D5O!-H)35`?4-F(*15=4!Y%;P3:"4U0$&``"A+0<`
+M`,.DP[;#O,.$PY;#G%0`+6QH9"T``````````-3`PET@`@``30<`1J0#```#
+M``$*``*#98-8@V?_!0!`$``;`$%%!\Y.H)35`3/_]%&@E-4!,__T4:"4U0$&
+M``!>;@<``&8`+6QH,"T,````#````+#U6%T@`J=Q30<`1J0#```-``%?7U]?
+M7U\N='AT%P!$Y`#V`/P`Q`#6`-P`+@!T`'@`=``;`$'D5O!-H)35`?4-F(*1
+@5=4!Y%;P3:"4U0$&``"M>`<``,.DP[;#O,.$PY;#G`#D
+`
+end
diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_rar.c b/archivers/libarchive/files/libarchive/test/test_read_format_rar.c index f08b06bc69a..1425eb9a457 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_rar.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_rar.c @@ -3776,6 +3776,35 @@ DEFINE_TEST(test_read_format_rar_ppmd_use_after_free) assertA(ARCHIVE_OK == archive_read_next_header(a, &ae)); assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); + /* Test EOF */ + assertA(1 == archive_read_next_header(a, &ae)); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); +} + +DEFINE_TEST(test_read_format_rar_ppmd_use_after_free2) +{ + uint8_t buf[16]; + const char* reffile = "test_read_format_rar_ppmd_use_after_free2.rar"; + + struct archive_entry *ae; + struct archive *a; + + extract_reference_file(reffile); + assert((a = archive_read_new()) != NULL); + assertA(0 == archive_read_support_filter_all(a)); + assertA(0 == archive_read_support_format_all(a)); + assertA(0 == archive_read_open_filename(a, reffile, 10240)); + + assertA(ARCHIVE_OK == archive_read_next_header(a, &ae)); + assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); + assertA(ARCHIVE_OK == archive_read_next_header(a, &ae)); + assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); + + /* Test EOF */ + assertA(1 == archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); assertEqualInt(ARCHIVE_OK, archive_read_free(a)); } diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c b/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c index 1408f37c49d..f91521e72f8 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c @@ -969,13 +969,12 @@ DEFINE_TEST(test_read_format_rar5_readtables_overflow) PROLOGUE("test_read_format_rar5_readtables_overflow.rar"); - assertA(0 == archive_read_next_header(a, &ae)); /* This archive is invalid. However, processing it shouldn't cause any * buffer overflow errors during reading rar5 tables. */ - assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); - /* This test only cares about not returning success here. */ - assertA(ARCHIVE_OK != archive_read_next_header(a, &ae)); + (void) archive_read_next_header(a, &ae); + (void) archive_read_data(a, buf, sizeof(buf)); + (void) archive_read_next_header(a, &ae); EPILOGUE(); } @@ -986,13 +985,12 @@ DEFINE_TEST(test_read_format_rar5_leftshift1) PROLOGUE("test_read_format_rar5_leftshift1.rar"); - assertA(0 == archive_read_next_header(a, &ae)); /* This archive is invalid. However, processing it shouldn't cause any * errors related to undefined operations when using -fsanitize. */ - assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); - /* This test only cares about not returning success here. */ - assertA(ARCHIVE_OK != archive_read_next_header(a, &ae)); + (void) archive_read_next_header(a, &ae); + (void) archive_read_data(a, buf, sizeof(buf)); + (void) archive_read_next_header(a, &ae); EPILOGUE(); } @@ -1003,14 +1001,12 @@ DEFINE_TEST(test_read_format_rar5_leftshift2) PROLOGUE("test_read_format_rar5_leftshift2.rar"); - assertA(0 == archive_read_next_header(a, &ae)); - /* This archive is invalid. However, processing it shouldn't cause any * errors related to undefined operations when using -fsanitize. */ - assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); - /* This test only cares about not returning success here. */ - assertA(ARCHIVE_OK != archive_read_next_header(a, &ae)); + (void) archive_read_next_header(a, &ae); + (void) archive_read_data(a, buf, sizeof(buf)); + (void) archive_read_next_header(a, &ae); EPILOGUE(); } @@ -1021,14 +1017,12 @@ DEFINE_TEST(test_read_format_rar5_truncated_huff) PROLOGUE("test_read_format_rar5_truncated_huff.rar"); - assertA(0 == archive_read_next_header(a, &ae)); - /* This archive is invalid. However, processing it shouldn't cause any * errors related to undefined operations when using -fsanitize. */ - assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); - /* This test only cares about not returning success here. */ - assertA(ARCHIVE_OK != archive_read_next_header(a, &ae)); + (void) archive_read_next_header(a, &ae); + (void) archive_read_data(a, buf, sizeof(buf)); + (void) archive_read_next_header(a, &ae); EPILOGUE(); } @@ -1058,14 +1052,12 @@ DEFINE_TEST(test_read_format_rar5_distance_overflow) PROLOGUE("test_read_format_rar5_distance_overflow.rar"); - assertA(0 == archive_read_next_header(a, &ae)); - /* This archive is invalid. However, processing it shouldn't cause any * errors related to variable overflows when using -fsanitize. */ - assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); - /* This test only cares about not returning success here. */ - assertA(ARCHIVE_OK != archive_read_next_header(a, &ae)); + (void) archive_read_next_header(a, &ae); + (void) archive_read_data(a, buf, sizeof(buf)); + (void) archive_read_next_header(a, &ae); EPILOGUE(); } @@ -1076,14 +1068,12 @@ DEFINE_TEST(test_read_format_rar5_nonempty_dir_stream) PROLOGUE("test_read_format_rar5_nonempty_dir_stream.rar"); - assertA(0 == archive_read_next_header(a, &ae)); - /* This archive is invalid. However, processing it shouldn't cause any * errors related to buffer overflows when using -fsanitize. */ - assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); - /* This test only cares about not returning success here. */ - assertA(ARCHIVE_OK != archive_read_next_header(a, &ae)); + (void) archive_read_next_header(a, &ae); + (void) archive_read_data(a, buf, sizeof(buf)); + (void) archive_read_next_header(a, &ae); EPILOGUE(); } @@ -1194,3 +1184,90 @@ DEFINE_TEST(test_read_format_rar5_fileattr) EPILOGUE(); } + +DEFINE_TEST(test_read_format_rar5_different_window_size) +{ + char buf[4096]; + PROLOGUE("test_read_format_rar5_different_window_size.rar"); + + /* Return codes of those calls are ignored, because this sample file + * is invalid. However, the unpacker shouldn't produce any SIGSEGV + * errors during processing. */ + + (void) archive_read_next_header(a, &ae); + while(0 < archive_read_data(a, buf, sizeof(buf))) {} + + (void) archive_read_next_header(a, &ae); + while(0 < archive_read_data(a, buf, sizeof(buf))) {} + + (void) archive_read_next_header(a, &ae); + while(0 < archive_read_data(a, buf, sizeof(buf))) {} + + EPILOGUE(); +} + +DEFINE_TEST(test_read_format_rar5_arm_filter_on_window_boundary) +{ + char buf[4096]; + PROLOGUE("test_read_format_rar5_arm_filter_on_window_boundary.rar"); + + /* Return codes of those calls are ignored, because this sample file + * is invalid. However, the unpacker shouldn't produce any SIGSEGV + * errors during processing. */ + + (void) archive_read_next_header(a, &ae); + while(0 < archive_read_data(a, buf, sizeof(buf))) {} + + EPILOGUE(); +} + +DEFINE_TEST(test_read_format_rar5_different_solid_window_size) +{ + char buf[4096]; + PROLOGUE("test_read_format_rar5_different_solid_window_size.rar"); + + /* Return codes of those calls are ignored, because this sample file + * is invalid. However, the unpacker shouldn't produce any SIGSEGV + * errors during processing. */ + + (void) archive_read_next_header(a, &ae); + while(0 < archive_read_data(a, buf, sizeof(buf))) {} + + (void) archive_read_next_header(a, &ae); + while(0 < archive_read_data(a, buf, sizeof(buf))) {} + + (void) archive_read_next_header(a, &ae); + while(0 < archive_read_data(a, buf, sizeof(buf))) {} + + EPILOGUE(); +} + +DEFINE_TEST(test_read_format_rar5_different_winsize_on_merge) +{ + char buf[4096]; + PROLOGUE("test_read_format_rar5_different_winsize_on_merge.rar"); + + /* Return codes of those calls are ignored, because this sample file + * is invalid. However, the unpacker shouldn't produce any SIGSEGV + * errors during processing. */ + + (void) archive_read_next_header(a, &ae); + while(0 < archive_read_data(a, buf, sizeof(buf))) {} + + EPILOGUE(); +} + +DEFINE_TEST(test_read_format_rar5_block_size_is_too_small) +{ + char buf[4096]; + PROLOGUE("test_read_format_rar5_block_size_is_too_small.rar"); + + /* This file is damaged, so those functions should return failure. + * Additionally, SIGSEGV shouldn't be raised during execution + * of those functions. */ + + assertA(archive_read_next_header(a, &ae) != ARCHIVE_OK); + assertA(archive_read_data(a, buf, sizeof(buf)) <= 0); + + EPILOGUE(); +} diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu b/archivers/libarchive/files/libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu new file mode 100644 index 00000000000..b2b9fdb6087 --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_read_format_rar5_arm_filter_on_window_boundary.rar.uu @@ -0,0 +1,9 @@ +begin 600 test_read_format_rar5_arm_filter_on_window_boundary.rar +M4F%R(1H'`0"-[P+2``(''(`'`/[_(`#_!``"(0$``/X(TB`!'O___P@``/W_ +M_Q``_]U84%"0_P1LAFVQ9,S,M[$`20"#__\`_P#_`/G___!DSR0V2+$`20`Z +M@R[_______\I:!<**-@P70D`KB1!<YOZFQ/___^<`^5L*0```/________\_ +M`0#__RE@%PHHV#!="0"N)$%S"```_?]84/7___]0D/\$;(9ML63,S/\R'Q\? +M'Q\?'Q\?'Q\?'Q\?'[$`20"#__\`_P#_`/G___!DSR0V2+$`20`Z@R[_____ +0_Q\?'Q\?'Q\?'Q]5"E`*4``` +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu b/archivers/libarchive/files/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu new file mode 100644 index 00000000000..5cad2194ee1 --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu @@ -0,0 +1,8 @@ +begin 644 test_read_format_rar5_block_size_is_too_small.rar +M4F%R(1H'`0"-[P+2``+'(!P,("`@N`,!`B`@("`@("`@("`@("`@("#_("`@ +M("`@("`@("`@((:Q;2!4-'-^4B`!((WO`M(``O\@$/\@-R`@("`@("`@("`@ +M``X@("`@("`@____("`@("`@(/\@("`@("`@("`@("#_(+6U,2"UM;6UM[CU +M)B`@*(0G(`!.`#D\3R``(/__(,+_````-0#_($&%*/HE=C+N`"```"```"`D +J`)$#("#_("#__P`@__\@_R#_("`@("`@("#_("#__R`@(/__("#__R`" +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_rar5_different_solid_window_size.rar.uu b/archivers/libarchive/files/libarchive/test/test_read_format_rar5_different_solid_window_size.rar.uu new file mode 100644 index 00000000000..b131e6f00c8 --- /dev/null +++ b/archivers/libarchive/files/libarchive/test/test_read_format_rar5_different_solid_window_size.rar.uu @@ -0,0 +1,73 @@ +begin 644 test_read_format_rar5_different_solid_window_size.rar +M4F%R(1H'`0"-[P+2``'#M#P\7P$'`0"-[P+2``7#````1H68F`#___\````` +M```0^OKZ^OJ%F)B8F)A)`)@"F-(%87)4`,.T/#Q?`0<!`(WO`M(`4F%R(1H' +M`0"-[P+2``+'#PD`<@$A!QH:(](M``$:(](M``(:!P$`C>\"T@`"QP\`"7(A +MFC$!$AHCTBT``B@A4F%2(1H'&.D````!`(WO`M(`!<-%````1A?'#P`)<B$: +M!P$:T@7"F!=A_________P$$____,/__F!=A)F%R*%)8(W=T4F%R(1H'`0"- +M[P+2``+'#PD`<@$A!QH:(](M``$:(](M``(:!P$`C>\"T@`"QP\`"7(AFC$! +M$AHCTBT``B@A4F%2(1H'&.D````!`(WO`M(`!<-%````1A?'#P`)<B$:!P$: +MT@7"F!=A_________P$$____,/__F!=A)B8(<@IE`.\*"7(````````````` +M=O____________________\`!<-%````1A?'#_\P__\$(DT89%`(`0(`@$U3 +M0T8`````Y!]W__\;-A8T``````"!`$#U`@`!`&@````!]9^?```5`"T-```` +M`6QT(%P*"75I9%P*"75I9%P*"75I9%P*"75I9%P*"75I9%P*"7456BUL:#4M +M#0````%L<0!SI/\````!]9^?```5`"T-`````6P56BUL:#4M#0````%L<0!S +MI/\````!]9^?```5`"T-``#_``#J`"L-"E=!`````````````````````!$` +M`!04%!04%!06`O__%*"@H*"@H*"@_PIW\M$"+@L*+@I&"@HV"BX*"BXH"F0* +M+@H*+@HNYWJ""BX*"C?^___L+H`NCPHNMX*"@H*"@H*"@H*"@H*"@H*"@H*" +M@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*" +M"@HV"BX*"BXH"F0*+@H*+@HNYWJ""BX*"C?^___L+H`N"BZW"F?_&_9<9``` +M@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"`/\G`)$` +M@`#L`!OV7&0```%L%5HM;&@U+0T````!;'$`<Z3_`````71Y<&4];`HN"BX* +M+@HN"BX*+FIJ:FIJ:@HN,#@T279R(&1E=FEC93US=B]S964];`HN"BX*+G0@ +M9'!Y93UL"BX*+@HN"BX*+@HN:FIJ:E)#)R\V,#@U+W-E="!\>7!E/6P*+@HN +M"BYT('1Y<&4];`HN,"X*+@HN="!T>7!E/2X*+@HN"BYJ:FHP+W-E93UL"BX* +M+@HN="!T>7!E+W-E="!T>7!E/6P*+@HN"BYT+G0@='G^6_]P9</#P\/#P\/# +MP\/#P\/#P\/#P\/#P\/"P\/#P\/#+W-E="!D979I8V4]8G-D<V5T(&1E=FEC +M93UB<V1O<RPM9"PN9"PN"BX*<R=D+2PL+F0L+@HN"B=S+"UD+"X*+@HN"BX* +M+@HN"BL*70I="ET*70I="ET*70I="ET*70I="ET*70I="ET*70I="ET*70I= +M"B%="ET*70I="ET*70I="ET*70I="ET*70I="@I="ET*70I="ET*70I="ET* +M70I="ET*70I="ET*70I="ET*70I="ET*70H*70I="ET*70I="ET*70I="ET* +M70I="ET*70I="ET*70I="ET*70I="ET*70I="ET*70I="ET*70I="ET*70I= +M"ET*70I="ET*75T*70I="ET*70I="ET*9"PN"BX*+@HN"BX*"BX*+BYS9&7_ +M]P```````,/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\,``"D(-```!0`!``$` +M@A8!!0`````````````````!```(\/#P\/!A\/#P\/#P\.+P\/#P\/#P,O#P +M\%!+`P1.`%IB#B@!`/P```#M@!4```###P\/#V?QZ@\/#P\/#P\/#P\/#P\/ +M#P\/#P\/#P\/#P\/#P\/#U37[OL```!02R&PHU:*0,/#)\+#S</#0\/#PP\` +M#P\!]9^?```5`"T-`````6P56BUL:#4M#0````%L<0!SI/\````!]9^?```5 +M`"T-`````6P56BUL:#4M#0````%L<0!SI/\````!]9^?```5`"T-`````6P5 +M6BUL:#4M#0````%L<0!SI/\````!]9^?```5`"T-`````6P56BUL:#4M#0`` +M``%L<0!SI/\````!]9^?```%`"T-`````8Z.CHXICHZ.K0'H```````````` +M`````/]L%5HM;&@U+0T````!;'$`<Z3_`````?6?GP``%0`M#0````%L%5HM +M;&@U+0T````!;'$`<Z3_`````?6?GP``%0`M#0````%L%5HM;&@U+0T````` +M;'$`<Z3_`````?6?GP``%0`M#0````%L%5HM;&@U+=(``0!R(8WO`M(`M`%? +MC>\"T@`"TGX!M,-'4CQ2:7`)20`&`````````(WO`M(``0!R(8WO`M(``0!R +M(8WO`M(``0!R(8WO`M(`M`%?C>\"T@`"TGX!M,-'4CQ:!@!I`'`)20`````` +M`(WO`M(``0!R(8WO`M(``0!R(8WO`M(``0!R(8WO`M(`M`%?C>^NT@`"TGX! +MM%)A<B$:!P$`C>\"T@`"PP<<@`<`_O__T?___^@@JP#_Q00``B$<`0(`#@`` +M`0``_@C2(`$>____"```_?__$`#_W5A04)#_!&R&;;%DS,RWL0!)`(/__P#_ +M`/\`^?__\&3/)#)(L0!)`#J#+O_______REH%PHHV#!="0"N)$%SF_J;$___ +M_YP#%9,I````_________Q/_____________________________________ +M_RC_____`P````````#_____*/]!04%!0=U891/_9?]0/2[_______\I:!<* +M*-@P70D`KB1!<YOZFQ/___^<_^5L*0```/________\3________________ +M______________________\H____/0T.#0I5"E!!W5AE$_]E_U`]/0T.#0I5 +M"E#;V^+;V]O;V____________W________________________________W_ +ME/\56BUL:#4M#0````%L<0!SI/\````!]9^?```5`"T-`````6P56BUL:#4M +M#0````%L<0!SI/\````!]9^?```5`"T-`````6P56BUL:#4M#0````%L<0!S +MI/\````!]9^?```5`"T-`````6P56BUL:#4M#0````%L<0!SI/\````!]9^? +M```5`"T-`````6P56BUL:#4M#0````%L<0!SI/\````!]9^?```5`"T-```` +M`6P56BUL:#4M#0````%L<0!SI/\````!]9^?```5`"T-`````6P56BUL:#4M +M#0````%L<0!SI/\````!]9^?8C,*-`HN"EQ<7%Q<7%Q<7%Q<7%Q<7%Q<7%Q< +M7`3_________`F@`!+_)_P\LL`#__V%R(1H'``1G=$Q24``0````(`$````` +M```,J7\`+@TU'`#]_P`!````````!EQ<8C<*-`HN"EQ<7%Q<7%Q<7%Q<7%Q< +M7%Q<7%Q<7`3__RTQ#0I#;U!+`P31!-'1!-$$*%+KZB$6____[``````````` +M-WJ\KR<<\9WSM=;L```````````V``````#___^"@H(!!0("`@("`@("`@(" +M`@(/#P\/#P\/#P\/#U0ZS<@`_\/_/\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/# +MP\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/#P\/'P\/#PT```(F?GY_RGP&? +MWY^?]4```(F?GY_RGP&?WY^?]4```(DO<V5T(&9L86=S/0HN"BX*+@HN"BX* +M+@HN"BXN"BX*+@HN"BX*+@HN"BX*"BX*+@HN"BX*)@HN"BX*+@HN"BX*+@HN +M"BX*+@HN"BX*+@HN"BX*+@HN"BX*+@HN"BX*+@`*+@HN"BY^+@HN"BX*+@HN +M"BX*+@HN"@HN"BX*+@HN"BX*+@HN"BX*+@HA&@<`!&=T3%)0`!`````@4$L# +M!#$`</^I?P`N#34<`/W_``$7%@I<7"Y<7%RT`5^-[P+2```$O\FTPT=2/%II +9<`E)``8`````````C>\"T@`````````````` +` +end diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_raw.c b/archivers/libarchive/files/libarchive/test/test_read_format_raw.c index 0dac8bfbab4..3961723b48a 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_raw.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_raw.c @@ -36,7 +36,9 @@ DEFINE_TEST(test_read_format_raw) const char *reffile1 = "test_read_format_raw.data"; const char *reffile2 = "test_read_format_raw.data.Z"; const char *reffile3 = "test_read_format_raw.bufr"; +#ifdef HAVE_ZLIB_H const char *reffile4 = "test_read_format_raw.data.gz"; +#endif /* First, try pulling data out of an uninterpretable file. */ extract_reference_file(reffile1); @@ -119,6 +121,7 @@ DEFINE_TEST(test_read_format_raw) assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); assertEqualInt(ARCHIVE_OK, archive_read_free(a)); +#ifdef HAVE_ZLIB_H /* Fourth, try with gzip which has metadata. */ extract_reference_file(reffile4); assert((a = archive_read_new()) != NULL); @@ -144,4 +147,5 @@ DEFINE_TEST(test_read_format_raw) assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); assertEqualInt(ARCHIVE_OK, archive_read_free(a)); +#endif } 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 b6e957a96ce..04dfecb015f 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip.c @@ -139,7 +139,7 @@ verify_basic(struct archive *a, int seek_checks) } else { assertEqualInt(ARCHIVE_FAILED, archive_read_data(a, buff, 19)); assertEqualString(archive_error_string(a), - "Unsupported ZIP compression method (deflation)"); + "Unsupported ZIP compression method (8: deflation)"); assert(archive_errno(a) != 0); } @@ -162,7 +162,7 @@ verify_basic(struct archive *a, int seek_checks) } else { assertEqualInt(ARCHIVE_FAILED, archive_read_data(a, buff, 19)); assertEqualString(archive_error_string(a), - "Unsupported ZIP compression method (deflation)"); + "Unsupported ZIP compression method (8: deflation)"); assert(archive_errno(a) != 0); } assertEqualInt(ARCHIVE_EOF, archive_read_next_header(a, &ae)); @@ -194,7 +194,7 @@ test_basic(void) verify_basic(a, 1); /* Verify with streaming reader. */ - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); @@ -231,7 +231,7 @@ verify_info_zip_ux(struct archive *a, int seek_checks) } else { assertEqualInt(ARCHIVE_FAILED, archive_read_data(a, buff, 19)); assertEqualString(archive_error_string(a), - "Unsupported ZIP compression method (deflation)"); + "Unsupported ZIP compression method (8: deflation)"); assert(archive_errno(a) != 0); } assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); @@ -264,7 +264,7 @@ test_info_zip_ux(void) verify_info_zip_ux(a, 1); /* Verify with streaming reader. */ - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); @@ -302,7 +302,7 @@ verify_extract_length_at_end(struct archive *a, int seek_checks) } else { assertEqualIntA(a, ARCHIVE_FAILED, archive_read_extract(a, ae, 0)); assertEqualString(archive_error_string(a), - "Unsupported ZIP compression method (deflation)"); + "Unsupported ZIP compression method (8: deflation)"); assert(archive_errno(a) != 0); } @@ -328,7 +328,7 @@ test_extract_length_at_end(void) verify_extract_length_at_end(a, 1); /* Verify extraction with streaming reader. */ - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); @@ -347,7 +347,7 @@ test_symlink(void) struct archive_entry *ae; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); /* Symlinks can only be extracted with the seeking reader. */ assert((a = archive_read_new()) != NULL); @@ -916,3 +916,53 @@ DEFINE_TEST(test_read_format_zip_lzma_alone_leak) * suite under Valgrind or ASan, the test runner won't return with * exit code 0 in case if a memory leak. */ } + +DEFINE_TEST(test_read_format_zip_lzma_stream_end) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one(a, ae, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} + +DEFINE_TEST(test_read_format_zip_lzma_stream_end_blockread) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one_using_blocks(a, 13, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_7075_utf8_paths.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_7075_utf8_paths.c index 7b78770aae4..a0a510c8f29 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_7075_utf8_paths.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_7075_utf8_paths.c @@ -90,7 +90,7 @@ DEFINE_TEST(test_read_format_zip_utf8_paths) assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); /* Verify with streaming reader. */ - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_comment_stored.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_comment_stored.c index b92b2886cdd..95df0107fec 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_comment_stored.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_comment_stored.c @@ -38,7 +38,7 @@ verify(const char *refname) struct archive_entry *ae; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); /* Symlinks can only be extracted with the seeking reader. */ assert((a = archive_read_new()) != NULL); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_extra_padding.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_extra_padding.c index 54f7fa04ee8..6e2f836f16e 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_extra_padding.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_extra_padding.c @@ -80,7 +80,7 @@ DEFINE_TEST(test_read_format_zip_extra_padding) assertEqualInt(ARCHIVE_OK, archive_read_free(a)); /* Verify with streaming reader. */ - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_high_compression.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_high_compression.c index 42faed378f6..16cfbb18289 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_high_compression.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_high_compression.c @@ -56,7 +56,7 @@ DEFINE_TEST(test_read_format_zip_high_compression) } extract_reference_file(refname); - p = slurpfile(&archive_size, refname); + p = slurpfile(&archive_size, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_jar.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_jar.c index ffb520eb83c..912e6713770 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_jar.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_jar.c @@ -40,7 +40,7 @@ DEFINE_TEST(test_read_format_zip_jar) char data[16]; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip_seekable(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_mac_metadata.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_mac_metadata.c index 99b7012328c..3f2813cc989 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_mac_metadata.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_mac_metadata.c @@ -76,7 +76,7 @@ DEFINE_TEST(test_read_format_zip_mac_metadata) }; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); /* Mac metadata can only be extracted with the seeking reader. */ assert((a = archive_read_new()) != NULL); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_malformed.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_malformed.c index e14a3f5660d..f1160648e75 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_malformed.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_malformed.c @@ -46,7 +46,7 @@ test_malformed1(void) assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); /* Verify with streaming reader. */ - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_msdos.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_msdos.c index 5f147d55778..1867204bb6e 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_msdos.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_msdos.c @@ -103,7 +103,7 @@ DEFINE_TEST(test_read_format_zip_msdos) assertEqualInt(ARCHIVE_OK, archive_read_free(a)); /* Verify with streaming reader. */ - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_nested.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_nested.c index 5f6edf26744..4418fc4f250 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_nested.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_nested.c @@ -34,7 +34,7 @@ DEFINE_TEST(test_read_format_zip_nested) struct archive_entry *ae; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); /* Inspect outer Zip */ assert((a = archive_read_new()) != NULL); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_nofiletype.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_nofiletype.c index b01afabe953..b3260fa7563 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_nofiletype.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_nofiletype.c @@ -40,7 +40,7 @@ DEFINE_TEST(test_read_format_zip_nofiletype) char data[16]; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip_seekable(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_padded.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_padded.c index 2094eca3557..d8c694bae5e 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_padded.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_padded.c @@ -34,7 +34,7 @@ verify_padded_archive(const char *refname) struct archive_entry *ae; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip_seekable(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_sfx.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_sfx.c index dc76ef9b382..a33c1b808c5 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_sfx.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_sfx.c @@ -37,7 +37,7 @@ DEFINE_TEST(test_read_format_zip_sfx) struct archive_entry *ae; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); /* Symlinks can only be extracted with the seeking reader. */ assert((a = archive_read_new()) != NULL); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_traditional_encryption_data.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_traditional_encryption_data.c index 305261567ec..20e55bbc694 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_traditional_encryption_data.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_traditional_encryption_data.c @@ -130,7 +130,7 @@ DEFINE_TEST(test_read_format_zip_traditional_encryption_data) assertEqualInt(ARCHIVE_FAILED, archive_read_data(a, buff, sizeof(buff))); assertEqualString(archive_error_string(a), - "Unsupported ZIP compression method (deflation)"); + "Unsupported ZIP compression method (8: deflation)"); assert(archive_errno(a) != 0); } @@ -148,7 +148,7 @@ DEFINE_TEST(test_read_format_zip_traditional_encryption_data) assertEqualInt(ARCHIVE_FAILED, archive_read_data(a, buff, sizeof(buff))); assertEqualString(archive_error_string(a), - "Unsupported ZIP compression method (deflation)"); + "Unsupported ZIP compression method (8: deflation)"); assert(archive_errno(a) != 0); } diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c index dc94f94f157..aca8bed6094 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c @@ -39,7 +39,7 @@ DEFINE_TEST(test_read_format_zip_with_invalid_traditional_eocd) struct archive_entry *ae; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip_seekable(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_zip_zip64.c b/archivers/libarchive/files/libarchive/test/test_read_format_zip_zip64.c index ac3789f46b8..bd2324e549b 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_zip_zip64.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_zip_zip64.c @@ -88,7 +88,7 @@ DEFINE_TEST(test_read_format_zip_zip64a) size_t s; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); /* First read with seeking. */ assert((a = archive_read_new()) != NULL); @@ -112,7 +112,7 @@ DEFINE_TEST(test_read_format_zip_zip64b) size_t s; extract_reference_file(refname); - p = slurpfile(&s, refname); + p = slurpfile(&s, "%s", refname); /* First read with seeking. */ assert((a = archive_read_new()) != NULL); diff --git a/archivers/libarchive/files/libarchive/test/test_read_pax_schily_xattr.c b/archivers/libarchive/files/libarchive/test/test_read_pax_schily_xattr.c deleted file mode 100644 index 7554f6d5d12..00000000000 --- a/archivers/libarchive/files/libarchive/test/test_read_pax_schily_xattr.c +++ /dev/null @@ -1,70 +0,0 @@ -/*- - * Copyright (c) 2016 IBM Corporation - * Copyright (c) 2003-2007 Tim Kientzle - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This test case's code has been derived from test_entry.c - */ -#include "test.h" - -DEFINE_TEST(test_schily_xattr_pax) -{ - struct archive *a; - struct archive_entry *ae; - const char *refname = "test_read_pax_schily_xattr.tar"; - const char *xname; /* For xattr tests. */ - const void *xval; /* For xattr tests. */ - size_t xsize; /* For xattr tests. */ - const char *string, *array; - - assert((a = archive_read_new()) != NULL); - assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a)); - assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a)); - - extract_reference_file(refname); - assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_filename(a, refname, 10240)); - - assertEqualInt(ARCHIVE_OK, archive_read_next_header(a, &ae)); - assertEqualInt(2, archive_entry_xattr_count(ae)); - assertEqualInt(2, archive_entry_xattr_reset(ae)); - - assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize)); - assertEqualString(xname, "security.selinux"); - string = "system_u:object_r:unlabeled_t:s0"; - assertEqualString(xval, string); - /* the xattr's value also contains the terminating \0 */ - assertEqualInt((int)xsize, strlen(string) + 1); - - assertEqualInt(0, archive_entry_xattr_next(ae, &xname, &xval, &xsize)); - assertEqualString(xname, "security.ima"); - assertEqualInt((int)xsize, 265); - /* we only compare the first 12 bytes */ - array = "\x03\x02\x04\xb0\xe9\xd6\x79\x01\x00\x2b\xad\x1e"; - assertEqualMem(xval, array, 12); - - /* Close the archive. */ - assertEqualInt(ARCHIVE_OK, archive_read_close(a)); - assertEqualInt(ARCHIVE_OK, archive_read_free(a)); -} diff --git a/archivers/libarchive/files/libarchive/test/test_read_pax_schily_xattr.tar.uu b/archivers/libarchive/files/libarchive/test/test_read_pax_schily_xattr.tar.uu deleted file mode 100644 index 52f7a8f0dc0..00000000000 --- a/archivers/libarchive/files/libarchive/test/test_read_pax_schily_xattr.tar.uu +++ /dev/null @@ -1,231 +0,0 @@ -begin 644 test_schily_xattr_pax.tar -M+B]087A(96%D97)S+C$U,C4O8V]N9F9I;&5S```````````````````````` -M```````````````````````````````````````````````````````````` -M`````````````#`P,#`V-#0`,#`P,#`P,``P,#`P,#`P`#`P,#`P,#`P-C0W -M`#$R-S$R,C$P-3`V`#`Q,C4V-@`@>``````````````````````````````` -M```````````````````````````````````````````````````````````` -M``````````````````````````````````````````!U<W1A<@`P,``````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````S,"!A=&EM93TQ-#8R,S`Y,S8Y+C<Q-#DW-3DP -M.0HS,"!C=&EM93TQ-#8R,S`Y,S8Y+C<W.#DW-C(Q,PHR.38@4T-(24Q9+GAA -M='1R+G-E8W5R:71Y+FEM83T#`@2PZ=9Y`0`KK1Z%635)4!FT,I"<49LTXR`' -M@42;2R:POQ9`JQA=+16.AY^<_[XK597$><QT!GLCT8_IF@@:/Z<?]<HQ0T7I -MO&87D9-4,L'!GUG'K%=]KEPC<<)&@`J)'T89MBPB7],R(#&7"#>W6X5O?Y6: -M9^':P2MZR[4)$@W<NV(VUT&(R0R-_S>?)B6GX0U@<,0M%6YNMO%OG+IS%/.< -M,"A(N&S.F9]=!*5=\).X."2$GUGJ,0C:@+G#$M_E8UQP,LU-G(8IKW^K^<8* -M*3_.N0'%8.^$8S$`D9XOF+DK<<)U34U'_"O5/2<N#T*!'!4Z73X-X4W!/LCF -M/,721A`CQF:PGDD/"C8W(%-#2$E,62YX871T<BYS96-U<FET>2YS96QI;G5X -M/7-Y<W1E;5]U.F]B:F5C=%]R.G5N;&%B96QE9%]T.G,P``H````````````` -M```````````````````````````````````````````````````````````` -M`````````````````````````````````````````````"XO8V]N9F9I;&5S -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````P -M,#`P-C0T`#`P,#`P,#``,#`P,#`P,``P,#`P,#`P,#`T,0`Q,C<Q,C(Q,#4P -M-@`P,3,P-S,`(#`````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````````````````````````=7-T87(`,#!R;V]T```````````````` -M`````````````````````')O;W0````````````````````````````````` -M````,#`P,#`P,``P,#`P,#`P```````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M````````+V5T8R]D969A=6QT+VEM82UP;VQI8WDN:6YA8W1I=F4*```````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -M```````````````````````````````````````````````````````````` -9```````````````````````````````````` -` -end diff --git a/archivers/libarchive/files/libarchive/test/test_read_pax_truncated.c b/archivers/libarchive/files/libarchive/test/test_read_pax_truncated.c index bc5d74d5bdb..1f6e78ace20 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_pax_truncated.c +++ b/archivers/libarchive/files/libarchive/test/test_read_pax_truncated.c @@ -82,7 +82,7 @@ DEFINE_TEST(test_read_pax_truncated) assertEqualIntA(a, ARCHIVE_FATAL, archive_read_next_header(a, &ae)); goto wrap_up; } else { - failure("Archive truncated to %d bytes", i); + failure("Archive truncated to %zu bytes", i); assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); } @@ -91,7 +91,7 @@ DEFINE_TEST(test_read_pax_truncated) assertEqualIntA(a, ARCHIVE_FATAL, archive_read_data(a, filedata, filedata_size)); goto wrap_up; } else { - failure("Archive truncated to %d bytes", i); + failure("Archive truncated to %zu bytes", i); assertEqualIntA(a, filedata_size, archive_read_data(a, filedata, filedata_size)); } @@ -103,7 +103,7 @@ DEFINE_TEST(test_read_pax_truncated) * does not return an error if it can't consume * it.) */ if (i < 1536 + 512*((filedata_size + 511)/512) + 512) { - failure("i=%d minsize=%d", i, + failure("i=%zu minsize=%zu", i, 1536 + 512*((filedata_size + 511)/512) + 512); assertEqualIntA(a, ARCHIVE_FATAL, archive_read_next_header(a, &ae)); diff --git a/archivers/libarchive/files/libarchive/test/test_read_truncated_filter.c b/archivers/libarchive/files/libarchive/test/test_read_truncated_filter.c index 6cc91e347a2..632638d6fe9 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_truncated_filter.c +++ b/archivers/libarchive/files/libarchive/test/test_read_truncated_filter.c @@ -83,7 +83,7 @@ test_truncation(const char *compression, for (i = 0; i < 100; i++) { sprintf(path, "%s%d", compression, i); archive_entry_copy_pathname(ae, path); - failure(path); + failure("%s", path); if (!assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae))) { archive_write_free(a); @@ -94,7 +94,7 @@ test_truncation(const char *compression, for (j = 0; j < (int)datasize; ++j) { data[j] = (char)(rand() % 256); } - failure(path); + failure("%s", path); if (!assertEqualIntA(a, datasize, archive_write_data(a, data, datasize))) { archive_write_free(a); diff --git a/archivers/libarchive/files/libarchive/test/test_sparse_basic.c b/archivers/libarchive/files/libarchive/test/test_sparse_basic.c index f12b6af4862..0fbb7f7bf46 100644 --- a/archivers/libarchive/files/libarchive/test/test_sparse_basic.c +++ b/archivers/libarchive/files/libarchive/test/test_sparse_basic.c @@ -127,7 +127,7 @@ create_sparse_file(const char *path, const struct sparse *s) assert(DeviceIoControl(handle, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, &dmy, NULL) != 0); - size_t offsetSoFar = 0; + uint64_t offsetSoFar = 0; while (s->type != END) { if (s->type == HOLE) { @@ -282,7 +282,7 @@ create_sparse_file(const char *path, const struct sparse *s) { char buff[1024]; int fd; - size_t total_size = 0; + uint64_t total_size = 0; const struct sparse *cur = s; memset(buff, ' ', sizeof(buff)); @@ -430,7 +430,7 @@ verify_sparse_file(struct archive *a, const char *path, assert(sparse->type == END); assertEqualInt(expected_offset, archive_entry_size(ae)); - failure(path); + failure("%s", path); assertEqualInt(holes_seen, expected_holes); assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); @@ -466,13 +466,13 @@ verify_sparse_file2(struct archive *a, const char *path, /* Verify the number of holes only, not its offset nor its * length because those alignments are deeply dependence on * its filesystem. */ - failure(path); + failure("%s", path); assertEqualInt(blocks, archive_entry_sparse_count(ae)); archive_entry_free(ae); } static void -test_sparse_whole_file_data() +test_sparse_whole_file_data(void) { struct archive_entry *ae; int64_t offset; @@ -555,6 +555,12 @@ DEFINE_TEST(test_sparse_basic) { HOLE, 1 }, { DATA, 10240 }, { END, 0 } }; + const struct sparse sparse_file4[] = { + { DATA, 4096 }, { HOLE, 0xc0000000 }, + /* This hole overflows the offset if stored in 32 bits. */ + { DATA, 4096 }, { HOLE, 0x50000000 }, + { END, 0 } + }; /* * Test for the case that sparse data indicates just the whole file @@ -596,6 +602,7 @@ DEFINE_TEST(test_sparse_basic) verify_sparse_file(a, "file2", sparse_file2, 20); /* Encoded non sparse; expect a data block but no sparse entries. */ verify_sparse_file(a, "file3", sparse_file3, 0); + verify_sparse_file(a, "file4", sparse_file4, 2); assertEqualInt(ARCHIVE_OK, archive_read_free(a)); diff --git a/archivers/libarchive/files/libarchive/test/test_write_disk.c b/archivers/libarchive/files/libarchive/test/test_write_disk.c index 60bcdc24edf..e38dbc78ff4 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_disk.c +++ b/archivers/libarchive/files/libarchive/test/test_write_disk.c @@ -186,7 +186,7 @@ static void create_reg_file4(struct archive_entry *ae, const char *msg) #if !defined(_WIN32) || defined(__CYGWIN__) assertEqualInt(st.st_mode, (archive_entry_mode(ae) & ~UMASK)); #endif - failure(msg); + failure("%s", msg); assertEqualInt(st.st_size, sizeof(data)); } diff --git a/archivers/libarchive/files/libarchive/test/test_write_filter_zstd.c b/archivers/libarchive/files/libarchive/test/test_write_filter_zstd.c index da3c806671a..b5f061a001a 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_filter_zstd.c +++ b/archivers/libarchive/files/libarchive/test/test_write_filter_zstd.c @@ -34,7 +34,7 @@ DEFINE_TEST(test_write_filter_zstd) char *buff, *data; size_t buffsize, datasize; char path[16]; - size_t used1, used2; + size_t used1, used2, used3; int i, r; buffsize = 2000000; @@ -124,8 +124,11 @@ DEFINE_TEST(test_write_filter_zstd) 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")); + /* Following is disabled as it will fail on library versions < 1.3.4 */ + /* assertEqualIntA(a, ARCHIVE_OK, + archive_write_set_filter_option(a, NULL, "compression-level", "-1")); */ assertEqualIntA(a, ARCHIVE_OK, - archive_write_set_filter_option(a, NULL, "compression-level", "6")); + archive_write_set_filter_option(a, NULL, "compression-level", "7")); assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, buffsize, &used2)); for (i = 0; i < 100; i++) { sprintf(path, "file%03d", i); @@ -140,10 +143,6 @@ DEFINE_TEST(test_write_filter_zstd) 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); @@ -168,6 +167,64 @@ DEFINE_TEST(test_write_filter_zstd) assertEqualInt(ARCHIVE_OK, archive_read_free(a)); /* + * One more time at level 1 + */ + 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_OK, + archive_write_set_filter_option(a, NULL, "compression-level", "1")); + assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, buffsize, &used3)); + 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("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, used3)); + 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)); + + /* + * Check output sizes for various compression levels, expectation + * is that archive size for level=7 < default < level=1 + */ + failure("compression-level=7 wrote %d bytes, default wrote %d bytes", + (int)used2, (int)used1); + assert(used2 < used1); + failure("compression-level=1 wrote %d bytes, default wrote %d bytes", + (int)used3, (int)used1); + assert(used1 < used3); + + /* * Test various premature shutdown scenarios to make sure we * don't crash or leak memory. */ diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_cpio_empty.c b/archivers/libarchive/files/libarchive/test/test_write_format_cpio_empty.c index 60fb2834013..2ba415c7b98 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_format_cpio_empty.c +++ b/archivers/libarchive/files/libarchive/test/test_write_format_cpio_empty.c @@ -64,7 +64,7 @@ DEFINE_TEST(test_write_format_cpio_empty) assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); - failure("Empty cpio archive should be exactly 87 bytes, was %d.", used); + failure("Empty cpio archive should be exactly 87 bytes, was %zu.", used); assert(used == 87); failure("Empty cpio archive is incorrectly formatted."); assertEqualMem(buff, ref, 87); diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_pax.c b/archivers/libarchive/files/libarchive/test/test_write_format_pax.c index 41a423a96a0..4538aac8241 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_format_pax.c +++ b/archivers/libarchive/files/libarchive/test/test_write_format_pax.c @@ -105,6 +105,28 @@ DEFINE_TEST(test_write_format_pax) assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9)); /* + * "file4" is similar to "file1" but has a large uid, large gid, + * uname and gname are longer than 32 characters + */ + assert((ae = archive_entry_new()) != NULL); + archive_entry_set_atime(ae, 2, 20); + archive_entry_set_birthtime(ae, 3, 30); + archive_entry_set_ctime(ae, 4, 40); + archive_entry_set_mtime(ae, 5, 50); + archive_entry_copy_pathname(ae, "file4"); + archive_entry_set_mode(ae, S_IFREG | 0755); + archive_entry_set_size(ae, 8); + archive_entry_copy_uname(ae, + "long-uname123456789012345678901234567890"); + archive_entry_copy_gname(ae, + "long-gname123456789012345678901234567890"); + archive_entry_set_uid(ae, 536870912); + archive_entry_set_gid(ae, 536870913); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae)); + archive_entry_free(ae); + assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9)); + + /* * XXX TODO XXX Archive directory, other file types. * Archive extended attributes, ACLs, other metadata. * Verify they get read back correctly. @@ -199,6 +221,30 @@ DEFINE_TEST(test_write_format_pax) assertEqualMem(buff2, "12345678", 8); /* + * Read "file4 + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(2, archive_entry_atime(ae)); + assertEqualInt(20, archive_entry_atime_nsec(ae)); + assertEqualInt(3, archive_entry_birthtime(ae)); + assertEqualInt(30, archive_entry_birthtime_nsec(ae)); + assertEqualInt(4, archive_entry_ctime(ae)); + assertEqualInt(40, archive_entry_ctime_nsec(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualInt(50, archive_entry_mtime_nsec(ae)); + assertEqualString("file4", archive_entry_pathname(ae)); + assertEqualString("long-uname123456789012345678901234567890", + archive_entry_uname(ae)); + assertEqualString("long-gname123456789012345678901234567890", + archive_entry_gname(ae)); + assertEqualInt(536870912, archive_entry_uid(ae)); + assertEqualInt(536870913, archive_entry_gid(ae)); + assert((S_IFREG | 0755) == archive_entry_mode(ae)); + assertEqualInt(8, archive_entry_size(ae)); + assertEqualIntA(a, 8, archive_read_data(a, buff2, 10)); + assertEqualMem(buff2, "12345678", 8); + + /* * Verify the end of the archive. */ assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_shar_empty.c b/archivers/libarchive/files/libarchive/test/test_write_format_shar_empty.c index 03d70a3b5fa..13794b02bb0 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_format_shar_empty.c +++ b/archivers/libarchive/files/libarchive/test/test_write_format_shar_empty.c @@ -49,6 +49,6 @@ DEFINE_TEST(test_write_format_shar_empty) assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a)); assertEqualInt(ARCHIVE_OK, archive_write_free(a)); - failure("Empty shar archive should be exactly 0 bytes, was %d.", used); + failure("Empty shar archive should be exactly 0 bytes, was %zu.", used); assert(used == 0); } diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_tar.c b/archivers/libarchive/files/libarchive/test/test_write_format_tar.c index 3588e8fe2d9..a5ccdc0115b 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_format_tar.c +++ b/archivers/libarchive/files/libarchive/test/test_write_format_tar.c @@ -81,7 +81,7 @@ DEFINE_TEST(test_write_format_tar) /* This calculation gives "the smallest multiple of * the block size that is at least 2048 bytes". */ - failure("blocksize=%d", blocksize); + failure("blocksize=%zu", blocksize); assertEqualInt(((2048 - 1)/blocksize+1)*blocksize, used); /* diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_tar_sparse.c b/archivers/libarchive/files/libarchive/test/test_write_format_tar_sparse.c index cc725a9a72e..54ac00988e3 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_format_tar_sparse.c +++ b/archivers/libarchive/files/libarchive/test/test_write_format_tar_sparse.c @@ -94,7 +94,7 @@ test_1(void) /* This calculation gives "the smallest multiple of * the block size that is at least 11264 bytes". */ - failure("blocksize=%d", blocksize); + failure("blocksize=%zu", blocksize); assertEqualInt(((11264 - 1)/blocksize+1)*blocksize, used); /* @@ -229,7 +229,7 @@ test_2(void) /* This calculation gives "the smallest multiple of * the block size that is at least 11264 bytes". */ - failure("blocksize=%d", blocksize); + failure("blocksize=%zu", blocksize); assertEqualInt(((11264 - 1)/blocksize+1)*blocksize, used); /* diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_xar.c b/archivers/libarchive/files/libarchive/test/test_write_format_xar.c index 7cfdbcf4d17..02fd2c0e35a 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_format_xar.c +++ b/archivers/libarchive/files/libarchive/test/test_write_format_xar.c @@ -279,6 +279,7 @@ DEFINE_TEST(test_write_format_xar) /* Disable TOC checksum. */ test_xar("!toc-checksum"); + test_xar("toc-checksum=none"); /* Specify TOC checksum type to sha1. */ test_xar("toc-checksum=sha1"); /* Specify TOC checksum type to md5. */ @@ -286,6 +287,7 @@ DEFINE_TEST(test_write_format_xar) /* Disable file checksum. */ test_xar("!checksum"); + test_xar("checksum=none"); /* Specify file checksum type to sha1. */ test_xar("checksum=sha1"); /* Specify file checksum type to md5. */ @@ -293,6 +295,7 @@ DEFINE_TEST(test_write_format_xar) /* Disable compression. */ test_xar("!compression"); + test_xar("compression=none"); /* Specify compression type to gzip. */ test_xar("compression=gzip"); test_xar("compression=gzip,compression-level=1"); diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c b/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c index efac7d883d9..2868123b08b 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c +++ b/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c @@ -84,7 +84,7 @@ DEFINE_TEST(test_write_format_zip_file) unsigned char *central_header, *local_header, *eocd, *eocd_record; unsigned char *extension_start, *extension_end; char file_data[] = {'1', '2', '3', '4', '5', '6', '7', '8'}; - char *file_name = "file"; + const char *file_name = "file"; #ifndef HAVE_ZLIB_H zip_version = 10; diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c b/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c index def6809a46b..71da98668d8 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c +++ b/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c @@ -86,7 +86,7 @@ DEFINE_TEST(test_write_format_zip_file_zip64) unsigned char *central_header, *local_header, *eocd, *eocd_record; unsigned char *extension_start, *extension_end; char file_data[] = {'1', '2', '3', '4', '5', '6', '7', '8'}; - char *file_name = "file"; + const char *file_name = "file"; #ifndef HAVE_ZLIB_H zip_compression = 0; diff --git a/archivers/libarchive/files/libarchive_fe/err.h b/archivers/libarchive/files/libarchive_fe/err.h index ebf5de814f5..c663103b0b4 100644 --- a/archivers/libarchive/files/libarchive_fe/err.h +++ b/archivers/libarchive/files/libarchive_fe/err.h @@ -35,9 +35,14 @@ #if defined(__GNUC__) && (__GNUC__ > 2 || \ (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) -#define __LA_PRINTFLIKE(f,a) __attribute__((__format__(__printf__, f, a))) +# ifdef __MINGW_PRINTF_FORMAT +# define __LA_PRINTF_FORMAT __MINGW_PRINTF_FORMAT +# else +# define __LA_PRINTF_FORMAT __printf__ +# endif +# define __LA_PRINTFLIKE(f,a) __attribute__((__format__(__LA_PRINTF_FORMAT, f, a))) #else -#define __LA_PRINTFLIKE(f,a) +# define __LA_PRINTFLIKE(f,a) #endif void lafe_warnc(int code, const char *fmt, ...) __LA_PRINTFLIKE(2, 3); diff --git a/archivers/libarchive/files/tar/bsdtar.1 b/archivers/libarchive/files/tar/bsdtar.1 index 6d8d6d3d617..86a06bbd13b 100644 --- a/archivers/libarchive/files/tar/bsdtar.1 +++ b/archivers/libarchive/files/tar/bsdtar.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2019 +.Dd January 31, 2020 .Dt TAR 1 .Os .Sh NAME @@ -167,12 +167,14 @@ if it is unknown suffix or no suffix, creates a new archive with restricted pax format and bzip2 compression. .It Fl Fl acls (c, r, u, x modes only) -Archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of +Archive or extract POSIX.1e or NFSv4 ACLs. +This is the reverse of .Fl Fl no-acls and the default behavior in c, r, and u modes (except on Mac OS X) or if .Nm -is run in x mode as root. On Mac OS X this option translates extended ACLs -to NFSv4 ACLs. To store extended ACLs the +is run in x mode as root. +On Mac OS X this option translates extended ACLs to NFSv4 ACLs. +To store extended ACLs the .Fl Fl mac-metadata option is preferred. .It Fl B , Fl Fl read-full-blocks @@ -207,15 +209,16 @@ specified on the command line. .It Fl Fl exclude-vcs Do not process files or directories internally used by the version control systems +.Sq Arch , +.Sq Bazaar , .Sq CVS , +.Sq Darcs , +.Sq Mercurial , .Sq RCS , .Sq SCCS , -.Sq SVN , -.Sq Arch , -.Sq Bazaar , -.Sq Mercurial +.Sq SVN and -.Sq Darcs . +.Sq git . .It Fl Fl fflags (c, r, u, x modes only) Archive or extract platform-specific file attributes or file flags. @@ -390,10 +393,12 @@ Do not extract modification time. By default, the modification time is set to the time stored in the archive. .It Fl Fl mac-metadata (c, r, u and x mode only) -Mac OS X specific. Archive or extract extended ACLs and extended file +Mac OS X specific. +Archive or extract extended ACLs and extended file attributes using .Xr copyfile 3 -in AppleDouble format. This is the reverse of +in AppleDouble format. +This is the reverse of .Fl Fl no-mac-metadata . and the default behavior in c, r, and u modes or if .Nm @@ -439,28 +444,39 @@ option to .Xr find 1 . .It Fl Fl no-acls (c, r, u, x modes only) -Do not archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of +Do not archive or extract POSIX.1e or NFSv4 ACLs. +This is the reverse of .Fl Fl acls and the default behavior if .Nm is run as non-root in x mode (on Mac OS X as any user in c, r, u and x modes). .It Fl Fl no-fflags (c, r, u, x modes only) -Do not archive or extract file attributes or file flags. This is the reverse of +Do not archive or extract file attributes or file flags. +This is the reverse of .Fl Fl fflags and the default behavior if .Nm is run as non-root in x mode. .It Fl Fl no-mac-metadata (x mode only) -Mac OS X specific. Do not archive or extract ACLs and extended file attributes +Mac OS X specific. +Do not archive or extract ACLs and extended file attributes using .Xr copyfile 3 -in AppleDouble format. This is the reverse of +in AppleDouble format. +This is the reverse of .Fl Fl mac-metadata . and the default behavior if .Nm is run as non-root in x mode. +.It Fl Fl no-safe-writes +(x mode only) +Do not create temporary files and use +.Xr rename 2 +to replace the original ones. +This is the reverse of +.Fl Fl safe-writes . .It Fl Fl no-same-owner (x mode only) Do not extract owner and group IDs. @@ -480,7 +496,8 @@ and the default behavior if is run as non-root. .It Fl Fl no-xattrs (c, r, u, x modes only) -Do not archive or extract extended file attributes. This is the reverse of +Do not archive or extract extended file attributes. +This is the reverse of .Fl Fl xattrs and the default behavior if .Nm @@ -558,7 +575,14 @@ As above, but the corresponding key and value will be provided only to modules whose name matches .Ar module . .El -The currently supported modules and keys are: +.Pp +The complete list of supported modules and keys +for create and append modes is in +.Xr archive_write_set_options 3 +and for extract and list modes in +.Xr archive_read_set_options 3 . +.Pp +Examples of supported options: .Bl -tag -compact -width indent .It Cm iso9660:joliet Support Joliet extensions. @@ -577,7 +601,8 @@ to disable. .It Cm gzip:compression-level A decimal integer from 1 to 9 specifying the gzip compression level. .It Cm gzip:timestamp -Store timestamp. This is enabled by default, use +Store timestamp. +This is enabled by default, use .Cm !timestamp or .Cm gzip:!timestamp @@ -593,7 +618,8 @@ A decimal integer from 1 to 9 specifying the lrzip compression level. .It Cm lz4:compression-level A decimal integer from 1 to 9 specifying the lzop compression level. .It Cm lz4:stream-checksum -Enable stream checksum. This is by default, use +Enable stream checksum. +This is by default, use .Cm lz4:!stream-checksum to disable. .It Cm lz4:block-checksum @@ -605,7 +631,8 @@ 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. .It Cm zstd:compression-level -A decimal integer from 1 to 22 specifying the zstd compression level. +A decimal integer specifying the zstd compression level. Supported values depend +on the library version, common values are from 1 to 22. .It Cm lzop:compression-level A decimal integer from 1 to 9 specifying the lzop compression level. .It Cm xz:compression-level @@ -646,9 +673,10 @@ Supported values are zipcrypt (traditional zip encryption), aes128 (WinZip AES-128 encryption) and aes256 (WinZip AES-256 encryption). .It Cm read_concatenated_archives Ignore zeroed blocks in the archive, which occurs when multiple tar archives -have been concatenated together. Without this option, only the contents of -the first concatenated archive would be read. This option is comparable to -the +have been concatenated together. +Without this option, only the contents of +the first concatenated archive would be read. +This option is comparable to the .Fl i , Fl Fl ignore-zeros option of GNU tar. .El @@ -670,11 +698,13 @@ This option suppresses these behaviors. Preserve file permissions. Attempt to restore the full permissions, including file modes, file attributes or file flags, extended file attributes and ACLs, if available, for each item -extracted from the archive. This is the reverse of +extracted from the archive. +This is the reverse of .Fl Fl no-same-permissions and the default if .Nm -is being run as root. It can be partially overridden by also specifying +is being run as root. +It can be partially overridden by also specifying .Fl Fl no-acls , .Fl Fl no-fflags , .Fl Fl no-mac-metadata @@ -742,6 +772,26 @@ The default is .Ar hrs which applies substitutions to all names. In particular, it is never necessary to specify h, r, or s. +.It Fl Fl safe-writes +(x mode only) +Extract files atomically. +By default +.Nm +unlinks the original file with the same name as the extracted file (if it +exists), and then creates it immediately under the same name and writes to +it. +For a short period of time, applications trying to access the file might +not find it, or see incomplete results. +If +.Fl Fl safe-writes +is enabled, +.Nm +first creates a unique temporary file, then writes the new contents to +the temporary file, and finally renames the temporary file to its final +name atomically using +.Xr rename 2 . +This guarantees that an application accessing the file, will either see +the old contents or the new contents at all times. .It Fl Fl same-owner (x mode only) Extract owner and group IDs. @@ -845,7 +895,8 @@ See for more information about the handling of exclusions. .It Fl Fl xattrs (c, r, u, x modes only) -Archive or extract extended file attributes. This is the reverse of +Archive or extract extended file attributes. +This is the reverse of .Fl Fl no-xattrs and the default behavior in c, r, and u modes or if .Nm @@ -937,9 +988,9 @@ To examine the contents of an ISO 9660 cdrom image: To move file hierarchies, invoke .Nm as -.Dl Nm Fl cf Pa - Fl C Pa srcdir\ . | Nm Fl xpf Pa - Fl C Pa destdir +.Dl Nm Fl cf Pa - Fl C Pa srcdir \&. | Nm Fl xpf Pa - Fl C Pa destdir or more traditionally -.Dl cd srcdir \&; Nm Fl cf Pa -\ . | ( cd destdir \&; Nm Fl xpf Pa - ) +.Dl cd srcdir \&; Nm Fl cf Pa - \&. | ( cd destdir \&; Nm Fl xpf Pa - ) .Pp In create mode, the list of files and directories to be archived can also include directory change instructions of the form @@ -967,7 +1018,6 @@ An input file in .Xr mtree 5 format can be used to create an output archive with arbitrary ownership, permissions, or names that differ from existing data on disk: -.Pp .Bd -literal -offset indent $ cat input.mtree #mtree diff --git a/archivers/libarchive/files/tar/bsdtar.c b/archivers/libarchive/files/tar/bsdtar.c index b59963d0f82..af41be5e4e2 100644 --- a/archivers/libarchive/files/tar/bsdtar.c +++ b/archivers/libarchive/files/tar/bsdtar.c @@ -542,6 +542,9 @@ main(int argc, char **argv) bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_MAC_METADATA; bsdtar->flags |= OPTFLAG_NO_MAC_METADATA; break; + case OPTION_NO_SAFE_WRITES: + bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_SAFE_WRITES; + break; case OPTION_NO_SAME_OWNER: /* GNU tar */ bsdtar->extract_flags &= ~ARCHIVE_EXTRACT_OWNER; break; @@ -658,6 +661,9 @@ main(int argc, char **argv) usage(); #endif break; + case OPTION_SAFE_WRITES: + bsdtar->extract_flags |= ARCHIVE_EXTRACT_SAFE_WRITES; + break; case OPTION_SAME_OWNER: /* GNU tar */ bsdtar->extract_flags |= ARCHIVE_EXTRACT_OWNER; break; diff --git a/archivers/libarchive/files/tar/bsdtar.h b/archivers/libarchive/files/tar/bsdtar.h index c61d568fd74..89aa3aa9198 100644 --- a/archivers/libarchive/files/tar/bsdtar.h +++ b/archivers/libarchive/files/tar/bsdtar.h @@ -25,6 +25,9 @@ * $FreeBSD: src/usr.bin/tar/bsdtar.h,v 1.37 2008/12/06 07:37:14 kientzle Exp $ */ +#ifndef BSDTAR_H_INCLUDED +#define BSDTAR_H_INCLUDED + #include "bsdtar_platform.h" #include <stdio.h> @@ -161,6 +164,7 @@ enum { OPTION_NO_ACLS, OPTION_NO_FFLAGS, OPTION_NO_MAC_METADATA, + OPTION_NO_SAFE_WRITES, OPTION_NO_SAME_OWNER, OPTION_NO_SAME_PERMISSIONS, OPTION_NO_XATTRS, @@ -174,6 +178,7 @@ enum { OPTION_OPTIONS, OPTION_PASSPHRASE, OPTION_POSIX, + OPTION_SAFE_WRITES, OPTION_SAME_OWNER, OPTION_STRIP_COMPONENTS, OPTION_TOTALS, @@ -224,3 +229,5 @@ const char * passphrase_callback(struct archive *, void *); void passphrase_free(char *); void list_item_verbose(struct bsdtar *, FILE *, struct archive_entry *); + +#endif diff --git a/archivers/libarchive/files/tar/cmdline.c b/archivers/libarchive/files/tar/cmdline.c index 21558e12df4..b80937ffcb6 100644 --- a/archivers/libarchive/files/tar/cmdline.c +++ b/archivers/libarchive/files/tar/cmdline.c @@ -123,6 +123,7 @@ static const struct bsdtar_option { { "no-fflags", 0, OPTION_NO_FFLAGS }, { "no-mac-metadata", 0, OPTION_NO_MAC_METADATA }, { "no-recursion", 0, 'n' }, + { "no-safe-writes", 0, OPTION_NO_SAFE_WRITES }, { "no-same-owner", 0, OPTION_NO_SAME_OWNER }, { "no-same-permissions", 0, OPTION_NO_SAME_PERMISSIONS }, { "no-xattr", 0, OPTION_NO_XATTRS }, @@ -144,6 +145,7 @@ static const struct bsdtar_option { { "posix", 0, OPTION_POSIX }, { "preserve-permissions", 0, 'p' }, { "read-full-blocks", 0, 'B' }, + { "safe-writes", 0, OPTION_SAFE_WRITES }, { "same-owner", 0, OPTION_SAME_OWNER }, { "same-permissions", 0, 'p' }, { "strip-components", 1, OPTION_STRIP_COMPONENTS }, diff --git a/archivers/libarchive/files/tar/test/CMakeLists.txt b/archivers/libarchive/files/tar/test/CMakeLists.txt index 459d9dcb1ef..2cd573acfaa 100644 --- a/archivers/libarchive/files/tar/test/CMakeLists.txt +++ b/archivers/libarchive/files/tar/test/CMakeLists.txt @@ -59,6 +59,7 @@ IF(ENABLE_TAR AND ENABLE_TEST) test_option_q.c test_option_r.c test_option_s.c + test_option_safe_writes.c test_option_uid_uname.c test_option_uuencode.c test_option_xattrs.c diff --git a/archivers/libarchive/files/tar/test/list.h b/archivers/libarchive/files/tar/test/list.h index 08f346cdf1d..01e6721eca1 100644 --- a/archivers/libarchive/files/tar/test/list.h +++ b/archivers/libarchive/files/tar/test/list.h @@ -2,38 +2,42 @@ DEFINE_TEST(test_0) DEFINE_TEST(test_basic) DEFINE_TEST(test_copy) DEFINE_TEST(test_empty_mtree) +DEFINE_TEST(test_extract_tar_Z) DEFINE_TEST(test_extract_tar_bz2) DEFINE_TEST(test_extract_tar_grz) DEFINE_TEST(test_extract_tar_gz) DEFINE_TEST(test_extract_tar_lrz) -DEFINE_TEST(test_extract_tar_lz4) DEFINE_TEST(test_extract_tar_lz) +DEFINE_TEST(test_extract_tar_lz4) 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) DEFINE_TEST(test_missing_file) +DEFINE_TEST(test_option_C_mtree) +DEFINE_TEST(test_option_C_upper) +DEFINE_TEST(test_option_H_upper) +DEFINE_TEST(test_option_L_upper) +DEFINE_TEST(test_option_O_upper) +DEFINE_TEST(test_option_T_upper) +DEFINE_TEST(test_option_U_upper) +DEFINE_TEST(test_option_X_upper) 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_b64encode) DEFINE_TEST(test_option_exclude) DEFINE_TEST(test_option_exclude_vcs) DEFINE_TEST(test_option_fflags) DEFINE_TEST(test_option_gid_gname) DEFINE_TEST(test_option_grzip) -DEFINE_TEST(test_option_H_upper) DEFINE_TEST(test_option_j) DEFINE_TEST(test_option_k) DEFINE_TEST(test_option_keep_newer_files) DEFINE_TEST(test_option_lrzip) -DEFINE_TEST(test_option_L_upper) DEFINE_TEST(test_option_lz4) DEFINE_TEST(test_option_lzma) DEFINE_TEST(test_option_lzop) @@ -41,17 +45,14 @@ DEFINE_TEST(test_option_n) DEFINE_TEST(test_option_newer_than) DEFINE_TEST(test_option_nodump) DEFINE_TEST(test_option_older_than) -DEFINE_TEST(test_option_O_upper) DEFINE_TEST(test_option_passphrase) DEFINE_TEST(test_option_q) DEFINE_TEST(test_option_r) DEFINE_TEST(test_option_s) -DEFINE_TEST(test_option_T_upper) +DEFINE_TEST(test_option_safe_writes) DEFINE_TEST(test_option_uid_uname) DEFINE_TEST(test_option_uuencode) -DEFINE_TEST(test_option_U_upper) 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) diff --git a/archivers/libarchive/files/tar/test/test_basic.c b/archivers/libarchive/files/tar/test/test_basic.c index 9bb966a0cf8..b1c49834a45 100644 --- a/archivers/libarchive/files/tar/test/test_basic.c +++ b/archivers/libarchive/files/tar/test/test_basic.c @@ -96,7 +96,7 @@ run_tar(const char *target, const char *pack_options, /* Use the tar program to create an archive. */ r = systemf("%s cf - %s %s >%s/archive 2>%s/pack.err", testprog, pack_options, flist, target, target); - failure("Error invoking %s cf -", testprog, pack_options); + failure("Error invoking %s cf -%s", testprog, pack_options); assertEqualInt(r, 0); assertChdir(target); diff --git a/archivers/libarchive/files/tar/test/test_copy.c b/archivers/libarchive/files/tar/test/test_copy.c index b828666b93f..d618e45ca36 100644 --- a/archivers/libarchive/files/tar/test/test_copy.c +++ b/archivers/libarchive/files/tar/test/test_copy.c @@ -256,13 +256,13 @@ verify_tree(size_t limit) continue; switch(dp[0]) { case 'l': case 'm': case 'd': - failure("strlen(p)=%d", strlen(p)); + failure("strlen(p)=%zu", strlen(p)); assert(strlen(p) < limit); assertEqualString(p, filenames[strlen(p)]); break; case 'f': case 's': - failure("strlen(p)=%d", strlen(p)); + failure("strlen(p)=%zu", strlen(p)); assert(strlen(p) < limit + 1); assertEqualString(p, filenames[strlen(p)]); diff --git a/archivers/libarchive/files/tar/test/test_option_C_upper.c b/archivers/libarchive/files/tar/test/test_option_C_upper.c index dae98544689..538890f5817 100644 --- a/archivers/libarchive/files/tar/test/test_option_C_upper.c +++ b/archivers/libarchive/files/tar/test/test_option_C_upper.c @@ -117,7 +117,7 @@ DEFINE_TEST(test_option_C_upper) assertMakeDir("test6", 0755); assertChdir("test6"); r = systemf("%s -cf archive.tar -C XXX -C ../d1 file1 2>write.err", - testprog, testworkdir); + testprog); assert(r != 0); assertNonEmptyFile("write.err"); assertEqualInt(0, diff --git a/archivers/libarchive/files/tar/test/test_option_n.c b/archivers/libarchive/files/tar/test/test_option_n.c index e474ac1d575..f36658ef165 100644 --- a/archivers/libarchive/files/tar/test/test_option_n.c +++ b/archivers/libarchive/files/tar/test/test_option_n.c @@ -120,7 +120,7 @@ DEFINE_TEST(test_option_n) "d2/file4\n", "test5.out"); - /* Test 6: -t without -n and non-existant directory selected */ + /* Test 6: -t without -n and non-existent directory selected */ assertEqualInt(0, systemf("%s -tf partial-archive.tar d2 >test6.out 2>test6.err", testprog)); @@ -128,7 +128,7 @@ DEFINE_TEST(test_option_n) assertTextFileContents("d2/file4\n", "test6.out"); - /* Test 7: -t with -n and non-existant directory selected */ + /* Test 7: -t with -n and non-existent directory selected */ status = systemf("%s -tnf partial-archive.tar d2 " ">test7.out 2>test7.err", testprog); assert(status); diff --git a/archivers/libarchive/files/tar/test/test_option_s.c b/archivers/libarchive/files/tar/test/test_option_s.c index 09c72ee7d63..fa799a295d0 100644 --- a/archivers/libarchive/files/tar/test/test_option_s.c +++ b/archivers/libarchive/files/tar/test/test_option_s.c @@ -92,10 +92,8 @@ DEFINE_TEST(test_option_s) * Test 5: Name-switching substitutions when extracting archive. */ assertMakeDir("test5", 0755); - systemf("%s -cf test5.tar in/d1/foo in/d1/bar", - testprog, testprog); - systemf("%s -xf test5.tar -s /foo/bar/ -s }bar}foo} -C test5", - testprog, testprog); + systemf("%s -cf test5.tar in/d1/foo in/d1/bar", testprog); + systemf("%s -xf test5.tar -s /foo/bar/ -s }bar}foo} -C test5", testprog); assertFileContents("foo", 3, "test5/in/d1/bar"); assertFileContents("bar", 3, "test5/in/d1/foo"); diff --git a/archivers/libarchive/files/tar/test/test_option_xattrs.c b/archivers/libarchive/files/tar/test/test_option_xattrs.c index bce8a94e4dd..79dfff52830 100644 --- a/archivers/libarchive/files/tar/test/test_option_xattrs.c +++ b/archivers/libarchive/files/tar/test/test_option_xattrs.c @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); DEFINE_TEST(test_option_xattrs) { #if !ARCHIVE_XATTR_SUPPORT - skipping("Extended atributes are not supported on this platform"); + skipping("Extended attributes are not supported on this platform"); #else /* ARCHIVE_XATTR_SUPPORT */ const char *testattr = "user.libarchive.test"; diff --git a/archivers/libarchive/files/tar/util.c b/archivers/libarchive/files/tar/util.c index 662db5baa79..8ebec64c48d 100644 --- a/archivers/libarchive/files/tar/util.c +++ b/archivers/libarchive/files/tar/util.c @@ -666,6 +666,14 @@ list_item_verbose(struct bsdtar *bsdtar, FILE *out, struct archive_entry *entry) const char *fmt; time_t tim; static time_t now; + struct tm *ltime; +#if defined(HAVE_LOCALTIME_R) || defined(HAVE__LOCALTIME64_S) + struct tm tmbuf; +#endif +#if defined(HAVE__LOCALTIME64_S) + errno_t terr; + __time64_t tmptime; +#endif /* * We avoid collecting the entire list in memory at once by @@ -737,7 +745,19 @@ list_item_verbose(struct bsdtar *bsdtar, FILE *out, struct archive_entry *entry) fmt = bsdtar->day_first ? DAY_FMT " %b %Y" : "%b " DAY_FMT " %Y"; else fmt = bsdtar->day_first ? DAY_FMT " %b %H:%M" : "%b " DAY_FMT " %H:%M"; - strftime(tmp, sizeof(tmp), fmt, localtime(&tim)); +#if defined(HAVE_LOCALTIME_R) + ltime = localtime_r(&tim, &tmbuf); +#elif defined(HAVE__LOCALTIME64_S) + tmptime = tim; + terr = _localtime64_s(&tmbuf, &tmptime); + if (terr) + ltime = NULL; + else + ltime = &tmbuf; +#else + ltime = localtime(&tim); +#endif + strftime(tmp, sizeof(tmp), fmt, ltime); fprintf(out, " %s ", tmp); safe_fprintf(out, "%s", archive_entry_pathname(entry)); diff --git a/archivers/libarchive/files/test_utils/test_common.h b/archivers/libarchive/files/test_utils/test_common.h index 7538d8cb7b5..80d54f0a450 100644 --- a/archivers/libarchive/files/test_utils/test_common.h +++ b/archivers/libarchive/files/test_utils/test_common.h @@ -38,6 +38,9 @@ #elif defined(__FreeBSD__) /* Building as part of FreeBSD system requires a pre-built config.h. */ #include "config_freebsd.h" +#elif defined(__NetBSD__) +/* Building as part of NetBSD system requires a pre-built config.h. */ +#include "config_netbsd.h" #elif defined(_WIN32) && !defined(__CYGWIN__) /* Win32 can't run the 'configure' script. */ #include "config_windows.h" @@ -112,6 +115,19 @@ #pragma warn -8068 /* Constant out of range in comparison. */ #endif + +#if defined(__GNUC__) && (__GNUC__ > 2 || \ + (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) +# ifdef __MINGW_PRINTF_FORMAT +# define __LA_PRINTF_FORMAT __MINGW_PRINTF_FORMAT +# else +# define __LA_PRINTF_FORMAT __printf__ +# endif +# define __LA_PRINTFLIKE(f,a) __attribute__((__format__(__LA_PRINTF_FORMAT, f, a))) +#else +# define __LA_PRINTFLIKE(f,a) +#endif + /* Haiku OS and QNX */ #if defined(__HAIKU__) || defined(__QNXNTO__) /* Haiku and QNX have typedefs in stdint.h (needed for int64_t) */ @@ -132,6 +148,10 @@ #define O_BINARY 0 #endif +#ifndef __LIBARCHIVE_TEST_COMMON +#define __LIBARCHIVE_TEST_COMMON +#endif + #include "archive_platform_acl.h" #define ARCHIVE_TEST_ACL_TYPE_POSIX1E 1 #define ARCHIVE_TEST_ACL_TYPE_NFS4 2 @@ -259,7 +279,7 @@ skipping_setup(__FILE__, __LINE__);test_skipping /* Function declarations. These are defined in test_utility.c. */ -void failure(const char *fmt, ...); +void failure(const char *fmt, ...) __LA_PRINTFLIKE(1, 2); int assertion_assert(const char *, int, int, const char *, void *); int assertion_chdir(const char *, int, const char *); int assertion_compare_fflags(const char *, int, const char *, const char *, @@ -302,10 +322,10 @@ int assertion_utimes(const char *, int, const char *, long, long, long, long ); int assertion_version(const char*, int, const char *, const char *); void skipping_setup(const char *, int); -void test_skipping(const char *fmt, ...); +void test_skipping(const char *fmt, ...) __LA_PRINTFLIKE(1, 2); /* Like sprintf, then system() */ -int systemf(const char * fmt, ...); +int systemf(const char *fmt, ...) __LA_PRINTFLIKE(1, 2); /* Delay until time() returns a value after this. */ void sleepUntilAfter(time_t); @@ -368,7 +388,7 @@ void *sunacl_get(int cmd, int *aclcnt, int fd, const char *path); /* Suck file into string allocated via malloc(). Call free() when done. */ /* Supports printf-style args: slurpfile(NULL, "%s/myfile", refdir); */ -char *slurpfile(size_t *, const char *fmt, ...); +char *slurpfile(size_t *, const char *fmt, ...) __LA_PRINTFLIKE(2, 3); /* Dump block of bytes to a file. */ void dumpfile(const char *filename, void *, size_t); diff --git a/archivers/libarchive/files/test_utils/test_main.c b/archivers/libarchive/files/test_utils/test_main.c index 59c835ba81f..7b8aa70fac2 100644 --- a/archivers/libarchive/files/test_utils/test_main.c +++ b/archivers/libarchive/files/test_utils/test_main.c @@ -298,7 +298,7 @@ my_CreateSymbolicLinkA(const char *linkname, const char *target, ret = (*f)(src, tgt, tmpflags); /* * Prior to Windows 10 the SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE - * is not undestood + * is not understood */ if (!ret) ret = (*f)(src, tgt, flags); @@ -388,7 +388,7 @@ static const char *refdir; */ static int log_console = 0; static FILE *logfile; -static void +static void __LA_PRINTFLIKE(1, 0) vlogprintf(const char *fmt, va_list ap) { #ifdef va_copy @@ -406,7 +406,7 @@ vlogprintf(const char *fmt, va_list ap) #endif } -static void +static void __LA_PRINTFLIKE(1, 2) logprintf(const char *fmt, ...) { va_list ap; @@ -478,7 +478,7 @@ static struct line { const char *failed_filename; /* Count this failure, setup up log destination and handle initial report. */ -static void +static void __LA_PRINTFLIKE(3, 4) failure_start(const char *filename, int line, const char *fmt, ...) { va_list ap; @@ -751,7 +751,7 @@ static void strdump(const char *e, const char *p, int ewidth, int utf8) logprintf("]"); logprintf(" (count %d", cnt); if (n < 0) { - logprintf(",unknown %d bytes", len); + logprintf(",unknown %zu bytes", len); } logprintf(")"); @@ -1167,7 +1167,7 @@ assertion_text_file_contents(const char *filename, int line, const char *buff, c logprintf(" file=\"%s\"\n", fn); if (n > 0) { hexdump(contents, buff, n, 0); - logprintf(" expected\n", fn); + logprintf(" expected\n"); hexdump(buff, contents, s, 0); } else { logprintf(" File empty, contents should be:\n"); @@ -1497,7 +1497,7 @@ assertion_file_time(const char *file, int line, } } else if (filet != t || filet_nsec != nsec) { failure_start(file, line, - "File %s has %ctime %lld.%09lld, expected %lld.%09lld", + "File %s has %ctime %lld.%09lld, expected %ld.%09ld", pathname, type, filet, filet_nsec, t, nsec); failure_finish(NULL); return (0); @@ -1593,8 +1593,8 @@ assertion_file_nlinks(const char *file, int line, r = my_GetFileInformationByName(pathname, &bhfi); if (r != 0 && bhfi.nNumberOfLinks == (DWORD)nlinks) return (1); - failure_start(file, line, "File %s has %d links, expected %d", - pathname, bhfi.nNumberOfLinks, nlinks); + failure_start(file, line, "File %s has %jd links, expected %d", + pathname, (intmax_t)bhfi.nNumberOfLinks, nlinks); failure_finish(NULL); return (0); #else @@ -1605,8 +1605,8 @@ assertion_file_nlinks(const char *file, int line, r = lstat(pathname, &st); if (r == 0 && (int)st.st_nlink == nlinks) return (1); - failure_start(file, line, "File %s has %d links, expected %d", - pathname, st.st_nlink, nlinks); + failure_start(file, line, "File %s has %jd links, expected %d", + pathname, (intmax_t)st.st_nlink, nlinks); failure_finish(NULL); return (0); #endif @@ -1863,7 +1863,7 @@ is_symlink(const char *file, int line, return (0); if (contents == NULL) return (1); - linklen = readlink(pathname, buff, sizeof(buff)); + linklen = readlink(pathname, buff, sizeof(buff) - 1); if (linklen < 0) { failure_start(file, line, "Can't read symlink %s", pathname); failure_finish(NULL); @@ -2480,7 +2480,7 @@ canBzip2(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("bzip2 -d -V %s", redirectArgs) == 0) + if (systemf("bzip2 --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2510,7 +2510,7 @@ canGzip(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("gzip -V %s", redirectArgs) == 0) + if (systemf("gzip --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2552,7 +2552,7 @@ canLz4(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("lz4 -V %s", redirectArgs) == 0) + if (systemf("lz4 --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2567,7 +2567,7 @@ canZstd(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("zstd -V %s", redirectArgs) == 0) + if (systemf("zstd --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2582,7 +2582,7 @@ canLzip(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("lzip -V %s", redirectArgs) == 0) + if (systemf("lzip --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2597,7 +2597,7 @@ canLzma(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("lzma -V %s", redirectArgs) == 0) + if (systemf("lzma %s", redirectArgs) == 0) value = 1; } return (value); @@ -2612,7 +2612,7 @@ canLzop(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("lzop -V %s", redirectArgs) == 0) + if (systemf("lzop --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2627,7 +2627,7 @@ canXz(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("xz -V %s", redirectArgs) == 0) + if (systemf("xz --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -3271,7 +3271,7 @@ assertion_entry_set_acls(const char *file, int line, struct archive_entry *ae, acls[i].qual, acls[i].name); if (r != 0) { ret = 1; - failure_start(file, line, "type=%#010x, ", + failure_start(file, line, "type=%#010x, " "permset=%#010x, tag=%d, qual=%d name=%s", acls[i].type, acls[i].permset, acls[i].tag, acls[i].qual, acls[i].name); @@ -3499,9 +3499,9 @@ static int test_run(int i, const char *tmpdir) { #ifdef PATH_MAX - char workdir[PATH_MAX]; + char workdir[PATH_MAX * 2]; #else - char workdir[1024]; + char workdir[1024 * 2]; #endif char logfilename[64]; int failures_before = failures; |