Import libarchive 3.7.2
This commit is contained in:
parent
85efd7f875
commit
93ad2ca3d0
|
@ -1,5 +1,8 @@
|
|||
#
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
|
||||
if(POLICY CMP0065)
|
||||
cmake_policy(SET CMP0065 NEW) #3.4 don't use `-rdynamic` with executables
|
||||
endif()
|
||||
if(POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW) #3.12.0 `find_package()`` uses ``<PackageName>_ROOT`` variables.
|
||||
endif()
|
||||
|
@ -62,6 +65,7 @@ SET(VERSION "${_major}.${_trimmed_minor}.${_trimmed_revision}
|
|||
SET(BSDCPIO_VERSION_STRING "${VERSION}")
|
||||
SET(BSDTAR_VERSION_STRING "${VERSION}")
|
||||
SET(BSDCAT_VERSION_STRING "${VERSION}")
|
||||
SET(BSDUNZIP_VERSION_STRING "${VERSION}")
|
||||
SET(LIBARCHIVE_VERSION_NUMBER "${_version_number}")
|
||||
SET(LIBARCHIVE_VERSION_STRING "${VERSION}")
|
||||
|
||||
|
@ -77,7 +81,7 @@ math(EXPR INTERFACE_VERSION "13 + ${_minor}")
|
|||
# ?? Should there be more here ??
|
||||
SET(SOVERSION "${INTERFACE_VERSION}")
|
||||
|
||||
# Enalbe CMAKE_PUSH_CHECK_STATE() and CMAKE_POP_CHECK_STATE() macros
|
||||
# Enable CMAKE_PUSH_CHECK_STATE() and CMAKE_POP_CHECK_STATE() macros
|
||||
# saving and restoring the state of the variables.
|
||||
INCLUDE(CMakePushCheckState)
|
||||
|
||||
|
@ -96,24 +100,8 @@ endif ()
|
|||
# Especially for early development, we want to be a little
|
||||
# aggressive about diagnosing build problems; this can get
|
||||
# relaxed somewhat in final shipping versions.
|
||||
IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$")
|
||||
SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security")
|
||||
#################################################################
|
||||
# Set compile flags for all build types.
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat -Wformat-security")
|
||||
if (ENABLE_WERROR)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||
endif ()
|
||||
#################################################################
|
||||
# Set compile flags for debug build.
|
||||
# This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug"
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wextra")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wunused")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wmissing-prototypes")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wcast-qual")
|
||||
ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$")
|
||||
IF (CMAKE_C_COMPILER_ID MATCHES "^Clang$")
|
||||
IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
|
||||
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
|
||||
SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security")
|
||||
#################################################################
|
||||
# Set compile flags for all build types.
|
||||
|
@ -130,7 +118,26 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^Clang$")
|
|||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wshadow")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wmissing-prototypes")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wcast-qual")
|
||||
ENDIF (CMAKE_C_COMPILER_ID MATCHES "^Clang$")
|
||||
# Ideally this will be a compile/link time check, yet there's no obvious way
|
||||
# how considering how old our minimum required cmake version is. The official
|
||||
# cmake.org side does not host the manual pages even. Normally we can use
|
||||
# either of the following two, yet neither is supported as of 3.0.2
|
||||
# - check_linker_flag - does not exist
|
||||
# - try_compile - does not support linker flags
|
||||
#
|
||||
# The CI fails with this on MacOS
|
||||
IF(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
# Place the functions and data into separate sections, allowing the linker
|
||||
# to garbage collect the unused ones.
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections")
|
||||
# Printing the discarded section is "too much", so enable on demand.
|
||||
#SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Wl,--print-gc-sections")
|
||||
#SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -Wl,--print-gc-sections")
|
||||
ENDIF(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
|
||||
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
|
||||
IF (CMAKE_C_COMPILER_ID MATCHES "^XL$")
|
||||
SET(CMAKE_C_COMPILER "xlc_r")
|
||||
SET(CMAKE_REQUIRED_FLAGS "-qflag=e:e -qformat=sec")
|
||||
|
@ -155,34 +162,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 +200,10 @@ ENDIF (MSVC)
|
|||
# Enable CTest/CDash support
|
||||
include(CTest)
|
||||
|
||||
OPTION(ENABLE_NETTLE "Enable use of Nettle" ON)
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" 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)
|
||||
|
@ -206,7 +216,7 @@ OPTION(ENABLE_BZip2 "Enable the use of the system BZip2 library if found" ON)
|
|||
OPTION(ENABLE_LIBXML2 "Enable the use of the system libxml2 library if found" ON)
|
||||
OPTION(ENABLE_EXPAT "Enable the use of the system EXPAT library if found" ON)
|
||||
OPTION(ENABLE_PCREPOSIX "Enable the use of the system PCREPOSIX library if found" ON)
|
||||
OPTION(ENABLE_LibGCC "Enable the use of the system LibGCC library if found" ON)
|
||||
OPTION(ENABLE_LIBGCC "Enable the use of the system LibGCC library if found" ON)
|
||||
# CNG is used for encrypt/decrypt Zip archives on Windows.
|
||||
OPTION(ENABLE_CNG "Enable the use of CNG(Crypto Next Generation)" ON)
|
||||
|
||||
|
@ -216,6 +226,13 @@ OPTION(ENABLE_CPIO "Enable cpio building" ON)
|
|||
OPTION(ENABLE_CPIO_SHARED "Enable dynamic build of cpio" FALSE)
|
||||
OPTION(ENABLE_CAT "Enable cat building" ON)
|
||||
OPTION(ENABLE_CAT_SHARED "Enable dynamic build of cat" FALSE)
|
||||
IF(WIN32 AND NOT CYGWIN)
|
||||
SET(ENABLE_UNZIP FALSE)
|
||||
SET(ENABLE_UNZIP_SHARED FALSE)
|
||||
ELSE()
|
||||
OPTION(ENABLE_UNZIP "Enable unzip building" ON)
|
||||
OPTION(ENABLE_UNZIP_SHARED "Enable dynamic build of unzip" FALSE)
|
||||
ENDIF()
|
||||
OPTION(ENABLE_XATTR "Enable extended attribute support" ON)
|
||||
OPTION(ENABLE_ACL "Enable ACL support" ON)
|
||||
OPTION(ENABLE_ICONV "Enable iconv support" ON)
|
||||
|
@ -225,7 +242,7 @@ OPTION(ENABLE_INSTALL "Enable installing of libraries" ON)
|
|||
|
||||
SET(POSIX_REGEX_LIB "AUTO" CACHE STRING "Choose what library should provide POSIX regular expression support")
|
||||
SET(ENABLE_SAFESEH "AUTO" CACHE STRING "Enable use of /SAFESEH linker flag (MSVC only)")
|
||||
SET(WINDOWS_VERSION "WIN7" CACHE STRING "Set Windows version to use (Windows only)")
|
||||
SET(WINDOWS_VERSION "WIN10" CACHE STRING "Set Windows version to use (Windows only)")
|
||||
|
||||
IF(ENABLE_COVERAGE)
|
||||
include(LibarchiveCodeCoverage)
|
||||
|
@ -236,7 +253,11 @@ IF(ENABLE_TEST)
|
|||
ENDIF(ENABLE_TEST)
|
||||
|
||||
IF(WIN32)
|
||||
IF(WINDOWS_VERSION STREQUAL "WIN8")
|
||||
IF(WINDOWS_VERSION STREQUAL "WIN10")
|
||||
SET(NTDDI_VERSION 0x0A000000)
|
||||
SET(_WIN32_WINNT 0x0A00)
|
||||
SET(WINVER 0x0A00)
|
||||
ELSEIF(WINDOWS_VERSION STREQUAL "WIN8")
|
||||
SET(NTDDI_VERSION 0x06020000)
|
||||
SET(_WIN32_WINNT 0x0602)
|
||||
SET(WINVER 0x0602)
|
||||
|
@ -260,12 +281,12 @@ IF(WIN32)
|
|||
SET(NTDDI_VERSION 0x05010000)
|
||||
SET(_WIN32_WINNT 0x0501)
|
||||
SET(WINVER 0x0501)
|
||||
ELSE(WINDOWS_VERSION STREQUAL "WIN8")
|
||||
ELSE(WINDOWS_VERSION STREQUAL "WIN10")
|
||||
# Default to Windows Server 2003 API if we don't recognize the specifier
|
||||
SET(NTDDI_VERSION 0x05020000)
|
||||
SET(_WIN32_WINNT 0x0502)
|
||||
SET(WINVER 0x0502)
|
||||
ENDIF(WINDOWS_VERSION STREQUAL "WIN8")
|
||||
ENDIF(WINDOWS_VERSION STREQUAL "WIN10")
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(MSVC)
|
||||
|
@ -286,6 +307,11 @@ 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)
|
||||
ADD_DEFINITIONS(-D__MINGW_USE_VC2005_COMPAT)
|
||||
ENDIF()
|
||||
|
||||
#
|
||||
INCLUDE(CheckCSourceCompiles)
|
||||
INCLUDE(CheckCSourceRuns)
|
||||
|
@ -354,7 +380,11 @@ MACRO (TRY_MACRO_FOR_LIBRARY INCLUDES LIBRARIES
|
|||
IF("${TRY_TYPE}" MATCHES "COMPILES")
|
||||
CHECK_C_SOURCE_COMPILES("${SAMPLE_SOURCE}" ${VAR})
|
||||
ELSEIF("${TRY_TYPE}" MATCHES "RUNS")
|
||||
CHECK_C_SOURCE_RUNS("${SAMPLE_SOURCE}" ${VAR})
|
||||
IF(CMAKE_CROSSCOMPILING)
|
||||
MESSAGE(WARNING "Cannot test run \"${VAR}\" when cross-compiling")
|
||||
ELSE(CMAKE_CROSSCOMPILING)
|
||||
CHECK_C_SOURCE_RUNS("${SAMPLE_SOURCE}" ${VAR})
|
||||
ENDIF(CMAKE_CROSSCOMPILING)
|
||||
ELSE("${TRY_TYPE}" MATCHES "COMPILES")
|
||||
MESSAGE(FATAL_ERROR "UNKNOWN KEYWORD \"${TRY_TYPE}\" FOR TRY_TYPE")
|
||||
ENDIF("${TRY_TYPE}" MATCHES "COMPILES")
|
||||
|
@ -373,7 +403,7 @@ IF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN)
|
|||
SET(__GNUWIN32PATH "C:/Program Files/GnuWin32")
|
||||
ENDIF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN)
|
||||
IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}")
|
||||
# You have to add a path availabel DLL file into PATH environment variable.
|
||||
# You have to add a path available DLL file into PATH environment variable.
|
||||
# Maybe DLL path is "C:/Program Files/GnuWin32/bin".
|
||||
# The zlib and the bzip2 Setup program have installed programs and DLLs into
|
||||
# "C:/Program Files/GnuWin32" by default.
|
||||
|
@ -492,12 +522,16 @@ IF(LIBLZMA_FOUND)
|
|||
COMPILES
|
||||
"#include <lzma.h>\nint main() {return (int)lzma_version_number(); }"
|
||||
"WITHOUT_LZMA_API_STATIC;LZMA_API_STATIC")
|
||||
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)
|
||||
IF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC)
|
||||
ADD_DEFINITIONS(-DLZMA_API_STATIC)
|
||||
ENDIF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC)
|
||||
CMAKE_POP_CHECK_STATE()
|
||||
ELSE(LIBLZMA_FOUND)
|
||||
# LZMA not found and will not be used.
|
||||
SET(HAVE_LZMA_STREAM_ENCODER_MT 0)
|
||||
ENDIF(LIBLZMA_FOUND)
|
||||
MARK_AS_ADVANCED(CLEAR LIBLZMA_INCLUDE_DIR)
|
||||
MARK_AS_ADVANCED(CLEAR LIBLZMA_LIBRARY)
|
||||
|
@ -551,6 +585,7 @@ IF(LIBB2_FOUND)
|
|||
SET(HAVE_BLAKE2_H 1)
|
||||
SET(ARCHIVE_BLAKE2 FALSE)
|
||||
LIST(APPEND ADDITIONAL_LIBS ${LIBB2_LIBRARY})
|
||||
INCLUDE_DIRECTORIES(${LIBB2_INCLUDE_DIR})
|
||||
CMAKE_PUSH_CHECK_STATE()
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${LIBB2_LIBRARY})
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${LIBB2_INCLUDE_DIR})
|
||||
|
@ -599,8 +634,13 @@ IF(ENABLE_ZSTD)
|
|||
SET(ZSTD_FIND_QUIETLY TRUE)
|
||||
ENDIF (ZSTD_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(ZSTD_INCLUDE_DIR zstd.h)
|
||||
FIND_LIBRARY(ZSTD_LIBRARY NAMES zstd libzstd)
|
||||
IF(UNIX)
|
||||
FIND_PACKAGE(PkgConfig QUIET)
|
||||
PKG_SEARCH_MODULE(PC_ZSTD libzstd)
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(ZSTD_INCLUDE_DIR zstd.h HINTS ${PC_ZSTD_INCLUDEDIR} ${PC_ZSTD_INCLUDE_DIRS})
|
||||
FIND_LIBRARY(ZSTD_LIBRARY NAMES zstd libzstd HINTS ${PC_ZSTD_LIBDIR} ${PC_ZSTD_LIBRARY_DIRS})
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZSTD DEFAULT_MSG ZSTD_LIBRARY ZSTD_INCLUDE_DIR)
|
||||
ELSE(ENABLE_ZSTD)
|
||||
|
@ -613,7 +653,8 @@ IF(ZSTD_FOUND)
|
|||
CMAKE_PUSH_CHECK_STATE()
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${ZSTD_LIBRARY})
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${ZSTD_INCLUDE_DIR})
|
||||
CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_LIBZSTD)
|
||||
CHECK_FUNCTION_EXISTS(ZSTD_decompressStream HAVE_LIBZSTD)
|
||||
CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_LIBZSTD_COMPRESSOR)
|
||||
#
|
||||
# TODO: test for static library.
|
||||
#
|
||||
|
@ -654,6 +695,7 @@ CHECK_C_SOURCE_COMPILES("#include <sys/ioctl.h>
|
|||
int main(void) { return EXT2_IOC_GETFLAGS; }" HAVE_WORKING_EXT2_IOC_GETFLAGS)
|
||||
|
||||
LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
|
||||
LA_CHECK_INCLUDE_FILE("fnmatch.h" HAVE_FNMATCH_H)
|
||||
LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H)
|
||||
LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
|
||||
LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H)
|
||||
|
@ -693,6 +735,7 @@ LA_CHECK_INCLUDE_FILE("sys/mkdev.h" HAVE_SYS_MKDEV_H)
|
|||
LA_CHECK_INCLUDE_FILE("sys/mount.h" HAVE_SYS_MOUNT_H)
|
||||
LA_CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H)
|
||||
LA_CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H)
|
||||
LA_CHECK_INCLUDE_FILE("sys/queue.h" HAVE_SYS_QUEUE_H)
|
||||
LA_CHECK_INCLUDE_FILE("sys/richacl.h" HAVE_SYS_RICHACL_H)
|
||||
LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H)
|
||||
LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
|
||||
|
@ -712,9 +755,9 @@ LA_CHECK_INCLUDE_FILE("wchar.h" HAVE_WCHAR_H)
|
|||
LA_CHECK_INCLUDE_FILE("wctype.h" HAVE_WCTYPE_H)
|
||||
LA_CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H)
|
||||
IF(ENABLE_CNG)
|
||||
LA_CHECK_INCLUDE_FILE("Bcrypt.h" HAVE_BCRYPT_H)
|
||||
LA_CHECK_INCLUDE_FILE("bcrypt.h" HAVE_BCRYPT_H)
|
||||
IF(HAVE_BCRYPT_H)
|
||||
LIST(APPEND ADDITIONAL_LIBS "Bcrypt")
|
||||
LIST(APPEND ADDITIONAL_LIBS "bcrypt")
|
||||
ENDIF(HAVE_BCRYPT_H)
|
||||
ELSE(ENABLE_CNG)
|
||||
UNSET(HAVE_BCRYPT_H CACHE)
|
||||
|
@ -738,6 +781,26 @@ CHECK_C_SOURCE_COMPILES(
|
|||
int main() { return 0;}"
|
||||
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
|
||||
#
|
||||
|
@ -771,6 +834,10 @@ IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|||
SET(HAVE_LIBCRYPTO 1)
|
||||
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
|
||||
LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_CRYPTO_LIBRARY})
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
|
||||
LA_CHECK_INCLUDE_FILE("openssl/evp.h" HAVE_OPENSSL_EVP_H)
|
||||
CHECK_FUNCTION_EXISTS(PKCS5_PBKDF2_HMAC_SHA1 HAVE_PKCS5_PBKDF2_HMAC_SHA1)
|
||||
ENDIF(OPENSSL_FOUND)
|
||||
ELSE()
|
||||
SET(OPENSSL_FOUND FALSE) # Override cached value
|
||||
|
@ -800,6 +867,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 +884,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}")
|
||||
|
@ -983,7 +1057,7 @@ MACRO(CHECK_ICONV LIB TRY_ICONV_CONST)
|
|||
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
|
||||
#
|
||||
# During checking iconv proto type, we should use -Werror to avoid the
|
||||
# success of iconv detection with a warnig which success is a miss
|
||||
# success of iconv detection with a warning which success is a miss
|
||||
# detection. So this needs for all build mode(even it's a release mode).
|
||||
#
|
||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
|
||||
|
@ -1216,9 +1290,10 @@ IF(NOT FOUND_POSIX_REGEX_LIB AND POSIX_REGEX_LIB MATCHES "^(AUTO|LIBPCREPOSIX)$"
|
|||
#
|
||||
# If requested, try finding library for PCREPOSIX
|
||||
#
|
||||
IF(ENABLE_LibGCC)
|
||||
FIND_PACKAGE(LibGCC)
|
||||
IF(ENABLE_LIBGCC)
|
||||
FIND_PACKAGE(LIBGCC)
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "libgcc not found.")
|
||||
SET(LIBGCC_FOUND FALSE) # Override cached value
|
||||
ENDIF()
|
||||
IF(ENABLE_PCREPOSIX)
|
||||
|
@ -1299,6 +1374,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(fchmod HAVE_FCHMOD)
|
|||
CHECK_FUNCTION_EXISTS_GLIBC(fchown HAVE_FCHOWN)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(fcntl HAVE_FCNTL)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(fdopendir HAVE_FDOPENDIR)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(fnmatch HAVE_FNMATCH)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(fork HAVE_FORK)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(fstat HAVE_FSTAT)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(fstatat HAVE_FSTATAT)
|
||||
|
@ -1311,6 +1387,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(futimesat HAVE_FUTIMESAT)
|
|||
CHECK_FUNCTION_EXISTS_GLIBC(geteuid HAVE_GETEUID)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(getgrgid_r HAVE_GETGRGID_R)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(getgrnam_r HAVE_GETGRNAM_R)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(getline HAVE_GETLINE)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(getpwnam_r HAVE_GETPWNAM_R)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(getpwuid_r HAVE_GETPWUID_R)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(getpid HAVE_GETPID)
|
||||
|
@ -1320,6 +1397,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(lchflags HAVE_LCHFLAGS)
|
|||
CHECK_FUNCTION_EXISTS_GLIBC(lchmod HAVE_LCHMOD)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(lchown HAVE_LCHOWN)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(link HAVE_LINK)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(linkat HAVE_LINKAT)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES)
|
||||
|
@ -1346,6 +1424,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(strchr HAVE_STRCHR)
|
|||
CHECK_FUNCTION_EXISTS_GLIBC(strdup HAVE_STRDUP)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(strerror HAVE_STRERROR)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(strncpy_s HAVE_STRNCPY_S)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(strnlen HAVE_STRNLEN)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(strrchr HAVE_STRRCHR)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(symlink HAVE_SYMLINK)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(timegm HAVE_TIMEGM)
|
||||
|
@ -1361,11 +1440,12 @@ CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP)
|
|||
CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN)
|
||||
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(_localtime64_s HAVE__LOCALTIME64_S)
|
||||
CHECK_FUNCTION_EXISTS_GLIBC(_mkgmtime64 HAVE__MKGMTIME64)
|
||||
CHECK_SYMBOL_EXISTS(ctime_s "time.h" HAVE_CTIME_S)
|
||||
CHECK_SYMBOL_EXISTS(gmtime_s "time.h" HAVE_GMTIME_S)
|
||||
CHECK_SYMBOL_EXISTS(localtime_s "time.h" HAVE_LOCALTIME_S)
|
||||
CHECK_SYMBOL_EXISTS(_mkgmtime "time.h" HAVE__MKGMTIME)
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "")
|
||||
CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH)
|
||||
|
@ -1387,6 +1467,10 @@ CHECK_C_SOURCE_COMPILES(
|
|||
"#include <sys/types.h>\n#include <sys/mount.h>\nint main(void) { struct xvfsconf v; return sizeof(v);}"
|
||||
HAVE_STRUCT_XVFSCONF)
|
||||
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"#include <sys/types.h>\n#include <sys/mount.h>\nint main(void) { struct statfs s; return sizeof(s);}"
|
||||
HAVE_STRUCT_STATFS)
|
||||
|
||||
# Make sure we have the POSIX version of readdir_r, not the
|
||||
# older 2-argument version.
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
|
@ -1404,7 +1488,6 @@ CHECK_C_SOURCE_COMPILES(
|
|||
"#include <fcntl.h>\n#include <unistd.h>\nint main() {char buf[10]; return readlinkat(AT_FDCWD, \"\", buf, 0);}"
|
||||
HAVE_READLINKAT)
|
||||
|
||||
|
||||
# To verify major(), we need to both include the header
|
||||
# of interest and verify that the result can be linked.
|
||||
# CHECK_FUNCTION_EXISTS doesn't accept a header argument,
|
||||
|
@ -1416,10 +1499,6 @@ CHECK_C_SOURCE_COMPILES(
|
|||
"#include <sys/sysmacros.h>\nint main() { return major(256); }"
|
||||
MAJOR_IN_SYSMACROS)
|
||||
|
||||
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)
|
||||
|
||||
IF(HAVE_STRERROR_R)
|
||||
SET(HAVE_DECL_STRERROR_R 1)
|
||||
ENDIF(HAVE_STRERROR_R)
|
||||
|
@ -1458,9 +1537,14 @@ CHECK_STRUCT_HAS_MEMBER("struct tm" tm_gmtoff
|
|||
CHECK_STRUCT_HAS_MEMBER("struct tm" __tm_gmtoff
|
||||
"time.h" HAVE_STRUCT_TM___TM_GMTOFF)
|
||||
|
||||
IF(HAVE_STRUCT_STATFS)
|
||||
# Check for f_namemax in struct statfs
|
||||
CHECK_STRUCT_HAS_MEMBER("struct statfs" f_namemax
|
||||
"sys/param.h;sys/mount.h" HAVE_STRUCT_STATFS_F_NAMEMAX)
|
||||
# Check for f_iosize in struct statfs
|
||||
CHECK_STRUCT_HAS_MEMBER("struct statfs" f_iosize
|
||||
"sys/param.h;sys/mount.h" HAVE_STRUCT_STATFS_F_IOSIZE)
|
||||
ENDIF(HAVE_STRUCT_STATFS)
|
||||
|
||||
# Check for birthtime in struct stat
|
||||
CHECK_STRUCT_HAS_MEMBER("struct stat" st_birthtime
|
||||
|
@ -1494,21 +1578,21 @@ ENDIF()
|
|||
#
|
||||
#
|
||||
CHECK_STRUCT_HAS_MEMBER("struct tm" tm_sec
|
||||
"sys/types.h;sys/time.h;time.h" TIME_WITH_SYS_TIME)
|
||||
"sys/types.h;sys/time.h;time.h" HAVE_SYS_TIME_H)
|
||||
|
||||
#
|
||||
# Check for integer types
|
||||
#
|
||||
#
|
||||
CHECK_TYPE_SIZE("short" SIZE_OF_SHORT)
|
||||
CHECK_TYPE_SIZE("int" SIZE_OF_INT)
|
||||
CHECK_TYPE_SIZE("long" SIZE_OF_LONG)
|
||||
CHECK_TYPE_SIZE("long long" SIZE_OF_LONG_LONG)
|
||||
CHECK_TYPE_SIZE("short" SIZEOF_SHORT)
|
||||
CHECK_TYPE_SIZE("int" SIZEOF_INT)
|
||||
CHECK_TYPE_SIZE("long" SIZEOF_LONG)
|
||||
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
|
||||
|
||||
CHECK_TYPE_SIZE("unsigned short" SIZE_OF_UNSIGNED_SHORT)
|
||||
CHECK_TYPE_SIZE("unsigned" SIZE_OF_UNSIGNED)
|
||||
CHECK_TYPE_SIZE("unsigned long" SIZE_OF_UNSIGNED_LONG)
|
||||
CHECK_TYPE_SIZE("unsigned long long" SIZE_OF_UNSIGNED_LONG_LONG)
|
||||
CHECK_TYPE_SIZE("unsigned short" SIZEOF_UNSIGNED_SHORT)
|
||||
CHECK_TYPE_SIZE("unsigned" SIZEOF_UNSIGNED)
|
||||
CHECK_TYPE_SIZE("unsigned long" SIZEOF_UNSIGNED_LONG)
|
||||
CHECK_TYPE_SIZE("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
|
||||
|
||||
CHECK_TYPE_SIZE("__int64" __INT64)
|
||||
CHECK_TYPE_SIZE("unsigned __int64" UNSIGNED___INT64)
|
||||
|
@ -1960,6 +2044,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)
|
||||
|
||||
|
@ -1968,6 +2053,17 @@ CHECK_CRYPTO("MD5;RMD160;SHA1;SHA256;SHA512" LIBMD)
|
|||
|
||||
CHECK_CRYPTO_WIN("MD5;SHA1;SHA256;SHA384;SHA512")
|
||||
|
||||
# Check visibility annotations
|
||||
SET(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fvisibility=hidden -Werror")
|
||||
CHECK_C_SOURCE_COMPILES("void __attribute__((visibility(\"default\"))) foo(void);
|
||||
int main() { return 0; }" HAVE_VISIBILITY_ATTR)
|
||||
IF (HAVE_VISIBILITY_ATTR)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
||||
ADD_DEFINITIONS(-D__LIBARCHIVE_ENABLE_VISIBILITY)
|
||||
ENDIF(HAVE_VISIBILITY_ATTR)
|
||||
SET(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQUIRED_FLAGS}")
|
||||
|
||||
# Generate "config.h" from "build/cmake/config.h.in"
|
||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
@ -2002,6 +2098,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)
|
||||
|
@ -2010,3 +2111,4 @@ add_subdirectory(libarchive)
|
|||
add_subdirectory(cat)
|
||||
add_subdirectory(tar)
|
||||
add_subdirectory(cpio)
|
||||
add_subdirectory(unzip)
|
||||
|
|
|
@ -15,7 +15,6 @@ the actual statements in the files are controlling.
|
|||
* The following source files are also subject in whole or in part to
|
||||
a 3-clause UC Regents copyright; please read the individual source
|
||||
files for details:
|
||||
libarchive/archive_entry.c
|
||||
libarchive/archive_read_support_filter_compress.c
|
||||
libarchive/archive_write_add_filter_compress.c
|
||||
libarchive/mtree.5
|
||||
|
|
|
@ -8,17 +8,17 @@ ACLOCAL_AMFLAGS = -I build/autoconf
|
|||
#
|
||||
lib_LTLIBRARIES= libarchive.la
|
||||
noinst_LTLIBRARIES= libarchive_fe.la
|
||||
bin_PROGRAMS= $(bsdtar_programs) $(bsdcpio_programs) $(bsdcat_programs)
|
||||
man_MANS= $(libarchive_man_MANS) $(bsdtar_man_MANS) $(bsdcpio_man_MANS) $(bsdcat_man_MANS)
|
||||
BUILT_SOURCES= libarchive/test/list.h tar/test/list.h cpio/test/list.h cat/test/list.h
|
||||
bin_PROGRAMS= $(bsdtar_programs) $(bsdcpio_programs) $(bsdcat_programs) $(bsdunzip_programs)
|
||||
man_MANS= $(libarchive_man_MANS) $(bsdtar_man_MANS) $(bsdcpio_man_MANS) $(bsdcat_man_MANS) $(bsdunzip_man_MANS)
|
||||
BUILT_SOURCES= libarchive/test/list.h tar/test/list.h cpio/test/list.h cat/test/list.h unzip/test/list.h
|
||||
|
||||
#
|
||||
# What to test: We always test libarchive, test bsdtar and bsdcpio only
|
||||
# if we built them.
|
||||
#
|
||||
check_PROGRAMS= libarchive_test $(bsdtar_test_programs) $(bsdcpio_test_programs) $(bsdcat_test_programs)
|
||||
TESTS= libarchive_test $(bsdtar_test_programs) $(bsdcpio_test_programs) $(bsdcat_test_programs)
|
||||
TESTS_ENVIRONMENT= $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $(bsdcpio_TESTS_ENVIRONMENT) $(bsdcat_TESTS_ENVIRONMENT)
|
||||
check_PROGRAMS= libarchive_test $(bsdtar_test_programs) $(bsdcpio_test_programs) $(bsdcat_test_programs) $(bsdunzip_test_programs)
|
||||
TESTS= libarchive_test $(bsdtar_test_programs) $(bsdcpio_test_programs) $(bsdcat_test_programs) $(bsdunzip_test_programs)
|
||||
TESTS_ENVIRONMENT= $(libarchive_TESTS_ENVIRONMENT) $(bsdtar_TESTS_ENVIRONMENT) $(bsdcpio_TESTS_ENVIRONMENT) $(bsdcat_TESTS_ENVIRONMENT) $(bsdunzip_TESTS_ENVIRONMENT)
|
||||
# Always build and test both bsdtar and bsdcpio as part of 'distcheck'
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio
|
||||
# The next line is commented out by default in shipping libarchive releases.
|
||||
|
@ -49,7 +49,9 @@ EXTRA_DIST= \
|
|||
$(bsdcpio_EXTRA_DIST) \
|
||||
$(bsdcpio_test_EXTRA_DIST) \
|
||||
$(bsdcat_EXTRA_DIST) \
|
||||
$(bsdcat_test_EXTRA_DIST)
|
||||
$(bsdcat_test_EXTRA_DIST) \
|
||||
$(bsdunzip_EXTRA_DIST) \
|
||||
$(bsdunzip_test_EXTRA_DIST)
|
||||
|
||||
# a) Clean out some unneeded files and directories
|
||||
# b) Collect all documentation and format it for distribution.
|
||||
|
@ -69,7 +71,8 @@ DISTCLEANFILES= \
|
|||
libarchive/test/list.h \
|
||||
tar/test/list.h \
|
||||
cpio/test/list.h \
|
||||
cat/test/list.h
|
||||
cat/test/list.h \
|
||||
unzip/test/list.h
|
||||
|
||||
distclean-local:
|
||||
-rm -rf .ref
|
||||
|
@ -82,7 +85,9 @@ distclean-local:
|
|||
-[ -f cpio/Makefile ] && cd cpio && make clean
|
||||
-[ -f cpio/test/Makefile ] && cd cpio/test && make clean
|
||||
-[ -f cat/Makefile ] && cd cat && make clean
|
||||
-[ -f cpio/test/Makefile ] && cd cat/test && make clean
|
||||
-[ -f cat/test/Makefile ] && cd cat/test && make clean
|
||||
-[ -f unzip/Makefile ] && cd unzip && make clean
|
||||
-[ -f unzip/test/Makefile ] && cd unzip/test && make clean
|
||||
|
||||
#
|
||||
# Libarchive headers, source, etc.
|
||||
|
@ -158,6 +163,7 @@ libarchive_la_SOURCES= \
|
|||
libarchive/archive_read_set_options.c \
|
||||
libarchive/archive_read_support_filter_all.c \
|
||||
libarchive/archive_read_support_filter_bzip2.c \
|
||||
libarchive/archive_read_support_filter_by_code.c \
|
||||
libarchive/archive_read_support_filter_compress.c \
|
||||
libarchive/archive_read_support_filter_grzip.c \
|
||||
libarchive/archive_read_support_filter_gzip.c \
|
||||
|
@ -223,11 +229,14 @@ libarchive_la_SOURCES= \
|
|||
libarchive/archive_write_set_format_ar.c \
|
||||
libarchive/archive_write_set_format_by_name.c \
|
||||
libarchive/archive_write_set_format_cpio.c \
|
||||
libarchive/archive_write_set_format_cpio_binary.c \
|
||||
libarchive/archive_write_set_format_cpio_newc.c \
|
||||
libarchive/archive_write_set_format_cpio_odc.c \
|
||||
libarchive/archive_write_set_format_filter_by_ext.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 \
|
||||
|
@ -280,7 +289,7 @@ endif
|
|||
|
||||
# -no-undefined marks that libarchive doesn't rely on symbols
|
||||
# defined in the application. This is mandatory for cygwin.
|
||||
libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION)
|
||||
libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION) $(GC_SECTIONS)
|
||||
libarchive_la_LIBADD= $(LTLIBICONV)
|
||||
|
||||
# Manpages to install
|
||||
|
@ -410,6 +419,7 @@ libarchive_test_SOURCES= \
|
|||
libarchive/test/test_compat_solaris_tar_acl.c \
|
||||
libarchive/test/test_compat_solaris_pax_sparse.c \
|
||||
libarchive/test/test_compat_star_acl.c \
|
||||
libarchive/test/test_compat_tar_directory.c \
|
||||
libarchive/test/test_compat_tar_hardlink.c \
|
||||
libarchive/test/test_compat_uudecode.c \
|
||||
libarchive/test/test_compat_uudecode_large.c \
|
||||
|
@ -429,6 +439,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 \
|
||||
|
@ -443,11 +454,13 @@ libarchive_test_SOURCES= \
|
|||
libarchive/test/test_read_filter_program.c \
|
||||
libarchive/test/test_read_filter_program_signature.c \
|
||||
libarchive/test/test_read_filter_uudecode.c \
|
||||
libarchive/test/test_read_filter_uudecode_raw.c \
|
||||
libarchive/test/test_read_format_7zip.c \
|
||||
libarchive/test/test_read_format_7zip_encryption_data.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 \
|
||||
|
@ -488,6 +501,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 \
|
||||
|
@ -495,6 +509,7 @@ libarchive_test_SOURCES= \
|
|||
libarchive/test/test_read_format_rar_encryption_data.c \
|
||||
libarchive/test/test_read_format_rar_encryption_partially.c \
|
||||
libarchive/test/test_read_format_rar_encryption_header.c \
|
||||
libarchive/test/test_read_format_rar_filter.c \
|
||||
libarchive/test/test_read_format_rar_invalid1.c \
|
||||
libarchive/test/test_read_format_rar5.c \
|
||||
libarchive/test/test_read_format_raw.c \
|
||||
|
@ -504,6 +519,7 @@ libarchive_test_SOURCES= \
|
|||
libarchive/test/test_read_format_tar_empty_filename.c \
|
||||
libarchive/test/test_read_format_tar_empty_with_gnulabel.c \
|
||||
libarchive/test/test_read_format_tar_filename.c \
|
||||
libarchive/test/test_read_format_tar_invalid_pax_size.c \
|
||||
libarchive/test/test_read_format_tbz.c \
|
||||
libarchive/test/test_read_format_tgz.c \
|
||||
libarchive/test/test_read_format_tlz.c \
|
||||
|
@ -535,13 +551,15 @@ 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 \
|
||||
libarchive/test/test_read_too_many_filters.c \
|
||||
libarchive/test/test_read_truncated.c \
|
||||
libarchive/test/test_read_truncated_filter.c \
|
||||
libarchive/test/test_short_writes.c \
|
||||
libarchive/test/test_sparse_basic.c \
|
||||
libarchive/test/test_tar_filenames.c \
|
||||
libarchive/test/test_tar_large.c \
|
||||
|
@ -551,6 +569,7 @@ libarchive_test_SOURCES= \
|
|||
libarchive/test/test_write_disk.c \
|
||||
libarchive/test/test_write_disk_appledouble.c \
|
||||
libarchive/test/test_write_disk_failures.c \
|
||||
libarchive/test/test_write_disk_fixup.c \
|
||||
libarchive/test/test_write_disk_hardlink.c \
|
||||
libarchive/test/test_write_disk_hfs_compression.c \
|
||||
libarchive/test/test_write_disk_lookup.c \
|
||||
|
@ -615,6 +634,7 @@ libarchive_test_SOURCES= \
|
|||
libarchive/test/test_write_format_xar_empty.c \
|
||||
libarchive/test/test_write_format_zip.c \
|
||||
libarchive/test/test_write_format_zip_compression_store.c \
|
||||
libarchive/test/test_write_format_zip_entry_size_unset.c \
|
||||
libarchive/test/test_write_format_zip_empty.c \
|
||||
libarchive/test/test_write_format_zip_empty_zip64.c \
|
||||
libarchive/test/test_write_format_zip_file.c \
|
||||
|
@ -685,6 +705,7 @@ libarchive_test_EXTRA_DIST=\
|
|||
libarchive/test/test_compat_solaris_tar_acl.tar.uu \
|
||||
libarchive/test/test_compat_star_acl_nfs4.tar.uu \
|
||||
libarchive/test/test_compat_star_acl_posix1e.tar.uu \
|
||||
libarchive/test/test_compat_tar_directory_1.tar.uu \
|
||||
libarchive/test/test_compat_tar_hardlink_1.tar.uu \
|
||||
libarchive/test/test_compat_uudecode_large.tar.Z.uu \
|
||||
libarchive/test/test_compat_xz_1.txz.uu \
|
||||
|
@ -697,10 +718,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 \
|
||||
|
@ -724,6 +749,8 @@ libarchive_test_EXTRA_DIST=\
|
|||
libarchive/test/test_read_filter_lrzip.tar.lrz.uu \
|
||||
libarchive/test/test_read_filter_lzop.tar.lzo.uu \
|
||||
libarchive/test/test_read_filter_lzop_multiple_parts.tar.lzo.uu \
|
||||
libarchive/test/test_read_filter_uudecode_raw.uu \
|
||||
libarchive/test/test_read_filter_uudecode_base64_raw.uu \
|
||||
libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu \
|
||||
libarchive/test/test_read_format_mtree_noprint.mtree.uu \
|
||||
libarchive/test/test_read_format_7zip_bcj2_bzip2.7z.uu \
|
||||
|
@ -744,8 +771,11 @@ libarchive_test_EXTRA_DIST=\
|
|||
libarchive/test/test_read_format_7zip_copy.7z.uu \
|
||||
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_deflate_arm64.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 \
|
||||
|
@ -755,10 +785,19 @@ libarchive_test_EXTRA_DIST=\
|
|||
libarchive/test/test_read_format_7zip_lzma1_2.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_lzma1_lzma2.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_lzma2.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_lzma2_arm64.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_lzma2_arm.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_solid_zstd.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_symbolic_name.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_win_attrib.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_zstd_arm.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_zstd_bcj.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_zstd_nobcj.7z.uu \
|
||||
libarchive/test/test_read_format_7zip_zstd.7z.uu \
|
||||
libarchive/test/test_read_format_ar.ar.uu \
|
||||
libarchive/test/test_read_format_cab_1.cab.uu \
|
||||
libarchive/test/test_read_format_cab_2.cab.uu \
|
||||
|
@ -798,6 +837,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 \
|
||||
|
@ -817,6 +857,7 @@ libarchive_test_EXTRA_DIST=\
|
|||
libarchive/test/test_read_format_rar_encryption_data.rar.uu \
|
||||
libarchive/test/test_read_format_rar_encryption_header.rar.uu \
|
||||
libarchive/test/test_read_format_rar_encryption_partially.rar.uu \
|
||||
libarchive/test/test_read_format_rar_filter.rar.uu \
|
||||
libarchive/test/test_read_format_rar_invalid1.rar.uu \
|
||||
libarchive/test/test_read_format_rar_multi_lzss_blocks.rar.uu \
|
||||
libarchive/test/test_read_format_rar_multivolume.part0001.rar.uu \
|
||||
|
@ -826,6 +867,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 +875,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 \
|
||||
|
@ -857,12 +901,19 @@ libarchive_test_EXTRA_DIST=\
|
|||
libarchive/test/test_read_format_rar5_nonempty_dir_stream.rar.uu \
|
||||
libarchive/test/test_read_format_rar5_owner.rar.uu \
|
||||
libarchive/test/test_read_format_rar5_readtables_overflow.rar.uu \
|
||||
libarchive/test/test_read_format_rar5_sfx.exe.uu \
|
||||
libarchive/test/test_read_format_rar5_solid.rar.uu \
|
||||
libarchive/test/test_read_format_rar5_stored.rar.uu \
|
||||
libarchive/test/test_read_format_rar5_stored_manyfiles.rar.uu \
|
||||
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_rar5_decode_number_out_of_bounds_read.rar.uu \
|
||||
libarchive/test/test_read_format_rar5_window_buf_and_size_desync.rar.uu \
|
||||
libarchive/test/test_read_format_rar5_bad_window_sz_in_mltarc_file.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 \
|
||||
|
@ -872,12 +923,15 @@ libarchive_test_EXTRA_DIST=\
|
|||
libarchive/test/test_read_format_tar_empty_with_gnulabel.tar.uu \
|
||||
libarchive/test/test_read_format_tar_empty_pax.tar.Z.uu \
|
||||
libarchive/test/test_read_format_tar_filename_koi8r.tar.Z.uu \
|
||||
libarchive/test/test_read_format_tar_invalid_pax_size.tar.uu \
|
||||
libarchive/test/test_read_format_ustar_filename_cp866.tar.Z.uu \
|
||||
libarchive/test/test_read_format_ustar_filename_eucjp.tar.Z.uu \
|
||||
libarchive/test/test_read_format_ustar_filename_koi8r.tar.Z.uu \
|
||||
libarchive/test/test_read_format_warc.warc.uu \
|
||||
libarchive/test/test_read_format_zip.zip.uu \
|
||||
libarchive/test/test_read_format_zip_7075_utf8_paths.zip.uu \
|
||||
libarchive/test/test_read_format_zip_7z_deflate.zip.uu \
|
||||
libarchive/test/test_read_format_zip_7z_lzma.zip.uu \
|
||||
libarchive/test/test_read_format_zip_bz2_hang.zip.uu \
|
||||
libarchive/test/test_read_format_zip_bzip2.zipx.uu \
|
||||
libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu \
|
||||
|
@ -898,6 +952,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 \
|
||||
|
@ -923,12 +978,15 @@ libarchive_test_EXTRA_DIST=\
|
|||
libarchive/test/test_read_format_zip_xz_multi.zipx.uu \
|
||||
libarchive/test/test_read_format_zip_zip64a.zip.uu \
|
||||
libarchive/test/test_read_format_zip_zip64b.zip.uu \
|
||||
libarchive/test/test_read_format_zip_zstd.zipx.uu \
|
||||
libarchive/test/test_read_format_zip_zstd_multi.zipx.uu \
|
||||
libarchive/test/test_read_large_splitted_rar_aa.uu \
|
||||
libarchive/test/test_read_large_splitted_rar_ab.uu \
|
||||
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 \
|
||||
|
@ -992,7 +1050,7 @@ endif
|
|||
|
||||
bsdtar_LDADD= libarchive.la libarchive_fe.la $(LTLIBICONV)
|
||||
bsdtar_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdtar_ccstatic) $(PLATFORMCPPFLAGS)
|
||||
bsdtar_LDFLAGS= $(bsdtar_ldstatic)
|
||||
bsdtar_LDFLAGS= $(bsdtar_ldstatic) $(GC_SECTIONS)
|
||||
|
||||
bsdtar_EXTRA_DIST= \
|
||||
tar/bsdtar.1 \
|
||||
|
@ -1053,6 +1111,7 @@ bsdtar_test_SOURCES= \
|
|||
tar/test/test_option_fflags.c \
|
||||
tar/test/test_option_gid_gname.c \
|
||||
tar/test/test_option_grzip.c \
|
||||
tar/test/test_option_ignore_zeros.c \
|
||||
tar/test/test_option_j.c \
|
||||
tar/test/test_option_k.c \
|
||||
tar/test/test_option_keep_newer_files.c \
|
||||
|
@ -1068,6 +1127,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 \
|
||||
|
@ -1156,7 +1216,7 @@ endif
|
|||
|
||||
bsdcpio_LDADD= libarchive_fe.la libarchive.la $(LTLIBICONV)
|
||||
bsdcpio_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdcpio_ccstatic) $(PLATFORMCPPFLAGS)
|
||||
bsdcpio_LDFLAGS= $(bsdcpio_ldstatic)
|
||||
bsdcpio_LDFLAGS= $(bsdcpio_ldstatic) $(GC_SECTIONS)
|
||||
|
||||
bsdcpio_EXTRA_DIST= \
|
||||
cpio/bsdcpio.1 \
|
||||
|
@ -1310,7 +1370,7 @@ endif
|
|||
|
||||
bsdcat_LDADD= libarchive_fe.la libarchive.la $(LTLIBICONV)
|
||||
bsdcat_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdcat_ccstatic) $(PLATFORMCPPFLAGS)
|
||||
bsdcat_LDFLAGS= $(bsdcat_ldstatic)
|
||||
bsdcat_LDFLAGS= $(bsdcat_ldstatic) $(GC_SECTIONS)
|
||||
|
||||
bsdcat_EXTRA_DIST= \
|
||||
cat/bsdcat.1 \
|
||||
|
@ -1361,6 +1421,7 @@ bsdcat_test_CPPFLAGS= \
|
|||
bsdcat_test_LDADD=libarchive_fe.la
|
||||
|
||||
cat/test/list.h: Makefile
|
||||
$(MKDIR_P) cat/test
|
||||
cat $(top_srcdir)/cat/test/test_*.c | grep '^DEFINE_TEST' > cat/test/list.h
|
||||
|
||||
if BUILD_BSDCAT
|
||||
|
@ -1385,3 +1446,105 @@ bsdcat_test_EXTRA_DIST= \
|
|||
cat/test/test_expand.plain.uu \
|
||||
cat/test/test_expand.xz.uu \
|
||||
cat/test/CMakeLists.txt
|
||||
|
||||
#
|
||||
#
|
||||
# bsdunzip source, docs, etc.
|
||||
#
|
||||
#
|
||||
|
||||
bsdunzip_SOURCES= \
|
||||
unzip/bsdunzip.c \
|
||||
unzip/bsdunzip.h \
|
||||
unzip/bsdunzip_platform.h \
|
||||
unzip/cmdline.c \
|
||||
unzip/la_getline.c \
|
||||
unzip/la_queue.h
|
||||
|
||||
if INC_WINDOWS_FILES
|
||||
bsdunzip_SOURCES+=
|
||||
endif
|
||||
|
||||
bsdunzip_DEPENDENCIES = libarchive.la libarchive_fe.la
|
||||
|
||||
|
||||
if STATIC_BSDUNZIP
|
||||
bsdunzip_ldstatic= -static
|
||||
bsdunzip_ccstatic= -DLIBARCHIVE_STATIC
|
||||
else
|
||||
bsdunzip_ldstatic=
|
||||
bsdunzip_ccstatic=
|
||||
endif
|
||||
|
||||
bsdunzip_LDADD= libarchive_fe.la libarchive.la $(LTLIBICONV)
|
||||
bsdunzip_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdunzip_ccstatic) $(PLATFORMCPPFLAGS)
|
||||
bsdunzip_LDFLAGS= $(bsdunzip_ldstatic) $(GC_SECTIONS)
|
||||
|
||||
bsdunzip_EXTRA_DIST= \
|
||||
unzip/bsdunzip.1 \
|
||||
unzip/CMakeLists.txt
|
||||
|
||||
|
||||
if BUILD_BSDUNZIP
|
||||
# Manpages to install
|
||||
bsdunzip_man_MANS= unzip/bsdunzip.1
|
||||
bsdunzip_programs= bsdunzip
|
||||
else
|
||||
bsdunzip_man_MANS=
|
||||
bsdunzip_programs=
|
||||
endif
|
||||
|
||||
#
|
||||
# bsdunzip_test
|
||||
#
|
||||
|
||||
bsdunzip_test_SOURCES= \
|
||||
$(test_utils_SOURCES) \
|
||||
unzip/test/test.h \
|
||||
unzip/test/test_0.c \
|
||||
unzip/test/test_basic.c \
|
||||
unzip/test/test_glob.c \
|
||||
unzip/test/test_not_exist.c \
|
||||
unzip/test/test_singlefile.c \
|
||||
unzip/test/test_C.c \
|
||||
unzip/test/test_p.c \
|
||||
unzip/test/test_d.c \
|
||||
unzip/test/test_j.c \
|
||||
unzip/test/test_L.c \
|
||||
unzip/test/test_n.c \
|
||||
unzip/test/test_o.c \
|
||||
unzip/test/test_q.c \
|
||||
unzip/test/test_t.c \
|
||||
unzip/test/test_t_bad.c \
|
||||
unzip/test/test_version.c \
|
||||
unzip/test/test_x.c \
|
||||
unzip/test/test_Z1.c \
|
||||
unzip/test/test_P_encryption.c
|
||||
|
||||
bsdunzip_test_CPPFLAGS= \
|
||||
-I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \
|
||||
-I$(top_srcdir)/test_utils \
|
||||
-I$(top_srcdir)/unzip -I$(top_srcdir)/unzip/test \
|
||||
-I$(top_builddir)/unzip/test \
|
||||
$(PLATFORMCPPFLAGS)
|
||||
bsdunzip_test_LDADD=libarchive_fe.la
|
||||
|
||||
unzip/test/list.h: Makefile
|
||||
$(MKDIR_P) unzip/test
|
||||
cat $(top_srcdir)/unzip/test/test_*.c | grep '^DEFINE_TEST' > unzip/test/list.h
|
||||
|
||||
if BUILD_BSDUNZIP
|
||||
bsdunzip_test_programs= bsdunzip_test
|
||||
bsdunzip_TESTS_ENVIRONMENT= BSDUNZIP=`cd $(top_builddir);/bin/pwd`/bsdunzip$(EXEEXT) BSDUNZIP_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/unzip/test
|
||||
else
|
||||
bsdunzip_test_programs=
|
||||
bsdunzip_TESTS_ENVIRONMENT=
|
||||
endif
|
||||
|
||||
bsdunzip_test_EXTRA_DIST= \
|
||||
unzip/test/list.h \
|
||||
unzip/test/test_basic.zip.uu \
|
||||
unzip/test/test_encrypted.zip.uu \
|
||||
unzip/test/test_singlefile.zip.uu \
|
||||
unzip/test/test_t_bad.zip.uu \
|
||||
unzip/test/CMakeLists.txt
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,47 @@
|
|||
Sep 12, 2023: libarchive 3.7.2 released
|
||||
|
||||
Jul 29, 2023: libarchive 3.7.1 released
|
||||
|
||||
Jul 18, 2023: libarchive 3.7.0 released
|
||||
|
||||
Jul 14, 2023: bsdunzip port from FreeBSD
|
||||
|
||||
Dec 07, 2022: libarchive 3.6.2 released
|
||||
|
||||
Apr 08, 2022: libarchive 3.6.1 released
|
||||
|
||||
Feb 09, 2022: libarchive 3.6.0 released
|
||||
|
||||
Feb 08, 2022: libarchive 3.5.3 released
|
||||
|
||||
Aug 22, 2021: libarchive 3.5.2 released
|
||||
|
||||
Dec 26, 2020: libarchive 3.5.1 released
|
||||
|
||||
Dec 01, 2020: libarchive 3.5.0 released
|
||||
|
||||
Oct 14, 2020: Support for system extended attributes
|
||||
|
||||
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
|
||||
|
|
|
@ -7,7 +7,7 @@ command-line tools that use the libarchive library.
|
|||
|
||||
## Questions? Issues?
|
||||
|
||||
* http://www.libarchive.org is the home for ongoing
|
||||
* https://www.libarchive.org is the home for ongoing
|
||||
libarchive development, including documentation,
|
||||
and links to the libarchive mailing lists.
|
||||
* To report an issue, use the issue tracker at
|
||||
|
@ -23,6 +23,7 @@ This distribution bundle includes the following major components:
|
|||
* **tar**: the 'bsdtar' program is a full-featured 'tar' implementation built on libarchive
|
||||
* **cpio**: the 'bsdcpio' program is a different interface to essentially the same functionality
|
||||
* **cat**: the 'bsdcat' program is a simple replacement tool for zcat, bzcat, xzcat, and such
|
||||
* **unzip**: the 'bsdunzip' program is a simple replacement tool for Info-ZIP's unzip
|
||||
* **examples**: Some small example programs that you may find useful.
|
||||
* **examples/minitar**: a compact sample demonstrating use of libarchive.
|
||||
* **contrib**: Various items sent to me by third parties; please contact the authors with any questions.
|
||||
|
@ -37,6 +38,7 @@ The top-level directory contains the following information files:
|
|||
* **configure** - configuration script, see INSTALL for details. If your copy of the source lacks a `configure` script, you can try to construct it by running the script in `build/autogen.sh` (or use `cmake`).
|
||||
|
||||
The following files in the top-level directory are used by the 'configure' script:
|
||||
|
||||
* `Makefile.am`, `aclocal.m4`, `configure.ac` - used to build this distribution, only needed by maintainers
|
||||
* `Makefile.in`, `config.h.in` - templates used by configure script
|
||||
|
||||
|
@ -70,7 +72,8 @@ 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)
|
||||
|
@ -79,18 +82,20 @@ Currently, the library automatically detects and reads the following fomats:
|
|||
* POSIX octet-oriented cpio
|
||||
* SVR4 ASCII cpio
|
||||
* Binary cpio (big-endian or little-endian)
|
||||
* PWB binary cpio
|
||||
* ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
|
||||
* ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives)
|
||||
* ZIPX archives (with support for bzip2, ppmd8, lzma and xz compressed entries)
|
||||
* GNU and BSD 'ar' archives
|
||||
* 'mtree' format
|
||||
* 7-Zip archives
|
||||
* 7-Zip archives (including archives that use zstandard compression)
|
||||
* Microsoft CAB format
|
||||
* LHA and LZH archives
|
||||
* RAR and RAR 5.0 archives (with some limitations due to RAR's proprietary status)
|
||||
* XAR archives
|
||||
|
||||
The library also detects and handles any of the following before evaluating the archive:
|
||||
|
||||
* uuencoded files
|
||||
* files with RPM wrapper
|
||||
* gzip compression
|
||||
|
@ -102,6 +107,7 @@ The library also detects and handles any of the following before evaluating the
|
|||
* zstandard compression
|
||||
|
||||
The library can create archives in any of the following formats:
|
||||
|
||||
* POSIX ustar
|
||||
* POSIX pax interchange format
|
||||
* "restricted" pax format, which will create ustar archives except for
|
||||
|
@ -110,6 +116,8 @@ The library can create archives in any of the following formats:
|
|||
* Old V7 tar format
|
||||
* POSIX octet-oriented cpio
|
||||
* SVR4 "newc" cpio
|
||||
* Binary cpio (little-endian)
|
||||
* PWB binary cpio
|
||||
* shar archives
|
||||
* ZIP archives (with uncompressed or "deflate" compressed entries)
|
||||
* GNU and BSD 'ar' archives
|
||||
|
@ -119,6 +127,7 @@ The library can create archives in any of the following formats:
|
|||
* XAR archives
|
||||
|
||||
When creating archives, the result can be filtered with any of the following:
|
||||
|
||||
* uuencode
|
||||
* gzip compression
|
||||
* bzip2 compression
|
||||
|
@ -184,6 +193,17 @@ questions we are asked about libarchive:
|
|||
functions. On those platforms, libarchive will use the non-thread-safe
|
||||
functions. Patches to improve this are of great interest to us.
|
||||
|
||||
* The function `archive_write_disk_header()` is _not_ thread safe on
|
||||
POSIX machines and could lead to security issue resulting in world
|
||||
writeable directories. Thus it must be mutexed by the calling code.
|
||||
This is due to calling `umask(oldumask = umask(0))`, which sets the
|
||||
umask for the whole process to 0 for a short time frame.
|
||||
In case other thread calls the same function in parallel, it might
|
||||
get interrupted by it and cause the executable to use umask=0 for the
|
||||
remaining execution.
|
||||
This will then lead to implicitely created directories to have 777
|
||||
permissions without sticky bit.
|
||||
|
||||
* In particular, libarchive's modules to read or write a directory
|
||||
tree do use `chdir()` to optimize the directory traversals. This
|
||||
can cause problems for programs that expect to do disk access from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -14,8 +14,8 @@
|
|||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
||||
[m4_warning([this file was generated for autoconf 2.69.
|
||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
|
||||
[m4_warning([this file was generated for autoconf 2.71.
|
||||
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'.])])
|
||||
|
@ -1055,8 +1055,8 @@ 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 "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
|
||||
$AR cr 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
|
||||
|
@ -1085,11 +1085,11 @@ _LT_EOF
|
|||
# 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]]*)
|
||||
10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
10.[[012]][[,.]]*)
|
||||
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
|
||||
10.*)
|
||||
10.*|11.*)
|
||||
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
|
||||
esac
|
||||
;;
|
||||
|
@ -1506,7 +1506,7 @@ need_locks=$enable_libtool_lock
|
|||
m4_defun([_LT_PROG_AR],
|
||||
[AC_CHECK_TOOLS(AR, [ar], false)
|
||||
: ${AR=ar}
|
||||
: ${AR_FLAGS=cru}
|
||||
: ${AR_FLAGS=cr}
|
||||
_LT_DECL([], [AR], [1], [The archiver])
|
||||
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
|
||||
|
||||
|
@ -9074,9 +9074,9 @@ 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
|
||||
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
# serial 12 (pkg-config-0.29.2)
|
||||
|
||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||
dnl
|
||||
|
@ -9117,7 +9117,7 @@ dnl
|
|||
dnl See the "Since" comment for each macro you use to see what version
|
||||
dnl of the macros you require.
|
||||
m4_defun([PKG_PREREQ],
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.1])
|
||||
[m4_define([PKG_MACROS_VERSION], [0.29.2])
|
||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||
])dnl PKG_PREREQ
|
||||
|
@ -9218,7 +9218,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
|||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $1])
|
||||
AC_MSG_CHECKING([for $2])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
@ -9228,11 +9228,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
|
|||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_RESULT([no])
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||
else
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
|
@ -9249,7 +9249,7 @@ installed software in a non-standard prefix.
|
|||
_PKG_TEXT])[]dnl
|
||||
])
|
||||
elif test $pkg_failed = untried; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_RESULT([no])
|
||||
m4_default([$4], [AC_MSG_FAILURE(
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
|
@ -9350,7 +9350,7 @@ 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.
|
||||
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9365,7 +9365,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.5], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
|
@ -9381,14 +9381,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.5])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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9440,7 +9440,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
|||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9471,7 +9471,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9662,7 +9662,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9701,7 +9701,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 +9730,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9756,6 +9758,10 @@ m4_defn([AC_PROG_CC])
|
|||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.65])dnl
|
||||
m4_ifdef([_$0_ALREADY_INIT],
|
||||
[m4_fatal([$0 expanded multiple times
|
||||
]m4_defn([_$0_ALREADY_INIT]))],
|
||||
[m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
|
@ -9792,7 +9798,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
|||
[_AM_SET_OPTIONS([$1])dnl
|
||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||
m4_if(
|
||||
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
|
||||
m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
|
||||
[ok:ok],,
|
||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
|
@ -9844,6 +9850,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
|||
[m4_define([AC_PROG_OBJCXX],
|
||||
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
||||
])
|
||||
# Variables for tags utilities; see am/tags.am
|
||||
if test -z "$CTAGS"; then
|
||||
CTAGS=ctags
|
||||
fi
|
||||
AC_SUBST([CTAGS])
|
||||
if test -z "$ETAGS"; then
|
||||
ETAGS=etags
|
||||
fi
|
||||
AC_SUBST([ETAGS])
|
||||
if test -z "$CSCOPE"; then
|
||||
CSCOPE=cscope
|
||||
fi
|
||||
AC_SUBST([CSCOPE])
|
||||
|
||||
AC_REQUIRE([AM_SILENT_RULES])dnl
|
||||
dnl The testsuite driver may need to know about EXEEXT, so add the
|
||||
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
||||
|
@ -9925,7 +9945,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9946,7 +9966,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -9968,7 +9988,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10003,7 +10023,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10046,7 +10066,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10067,12 +10087,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
|
|||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
if test x"${MISSING+set}" != xset; then
|
||||
case $am_aux_dir in
|
||||
*\ * | *\ *)
|
||||
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
||||
*)
|
||||
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
||||
esac
|
||||
MISSING="\${SHELL} '$am_aux_dir/missing'"
|
||||
fi
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --is-lightweight"; then
|
||||
|
@ -10085,7 +10100,7 @@ fi
|
|||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10114,7 +10129,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10161,7 +10176,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10180,7 +10195,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10261,7 +10276,7 @@ AC_CONFIG_COMMANDS_PRE(
|
|||
rm -f conftest.file
|
||||
])
|
||||
|
||||
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2009-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10321,7 +10336,7 @@ AC_SUBST([AM_BACKSLASH])dnl
|
|||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||
])
|
||||
|
||||
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10349,7 +10364,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10368,7 +10383,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-2021 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -10509,3 +10524,4 @@ 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/m4_ax_compile_check_sizeof.m4])
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2021 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/*)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -3,7 +3,7 @@
|
|||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1999-2021 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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2018-03-11.20; # UTC
|
||||
scriptversion=2020-11-14.01; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
|
@ -69,6 +69,11 @@ posix_mkdir=
|
|||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
# Create dirs (including intermediate dirs) using mode 755.
|
||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
||||
mkdir_umask=22
|
||||
|
||||
backupsuffix=
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
|
@ -99,18 +104,28 @@ Options:
|
|||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-C install only if different (preserve 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.
|
||||
-p pass -p to $cpprog.
|
||||
-s $stripprog installed files.
|
||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
|
||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
||||
it's up to you to specify -f if you want it.
|
||||
|
||||
If -S is not specified, no backups are attempted.
|
||||
|
||||
Email bug reports to bug-automake@gnu.org.
|
||||
Automake home page: https://www.gnu.org/software/automake/
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
|
@ -137,8 +152,13 @@ while test $# -ne 0; do
|
|||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-p) cpprog="$cpprog -p";;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-S) backupsuffix="$2"
|
||||
shift;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
|
@ -255,6 +275,10 @@ do
|
|||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
# Don't chown directories that already exist.
|
||||
if test $dstdir_status = 0; then
|
||||
chowncmd=""
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
|
@ -301,22 +325,6 @@ do
|
|||
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
|
||||
|
@ -326,52 +334,49 @@ do
|
|||
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-$$
|
||||
# The $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
|
||||
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;;
|
||||
# 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'.
|
||||
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
|
||||
|
||||
if
|
||||
|
@ -382,7 +387,7 @@ do
|
|||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# 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.
|
||||
|
||||
|
@ -411,7 +416,7 @@ do
|
|||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
(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
|
||||
|
@ -451,7 +456,18 @@ do
|
|||
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") &&
|
||||
(umask $cp_umask &&
|
||||
{ test -z "$stripcmd" || {
|
||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
||||
# which would cause strip to fail.
|
||||
if test -z "$doit"; then
|
||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
||||
else
|
||||
$doit touch "$dsttmp"
|
||||
fi
|
||||
}
|
||||
} &&
|
||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
|
@ -477,6 +493,13 @@ do
|
|||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# If $backupsuffix is set, and the file being installed
|
||||
# already exists, attempt a backup. Don't worry if it fails,
|
||||
# e.g., if mv doesn't support -f.
|
||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
||||
fi
|
||||
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
|
@ -491,9 +514,9 @@ do
|
|||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
PROGRAM=libtool
|
||||
PACKAGE=libtool
|
||||
VERSION="2.4.6 Debian-2.4.6-10"
|
||||
VERSION="2.4.6 Debian-2.4.6-15build2"
|
||||
package_revision=2.4.6
|
||||
|
||||
|
||||
|
@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
|
|||
# putting '$debug_cmd' at the start of all your functions, you can get
|
||||
# bash to show function call trace with:
|
||||
#
|
||||
# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
|
||||
# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
|
||||
debug_cmd=${debug_cmd-":"}
|
||||
exit_cmd=:
|
||||
|
||||
|
@ -2141,7 +2141,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 $scriptversion Debian-2.4.6-15build2
|
||||
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
|
||||
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
|
||||
|
||||
|
@ -7368,10 +7368,12 @@ func_mode_link ()
|
|||
# -stdlib=* select c++ std lib with clang
|
||||
# -fsanitize=* Clang/GCC memory and address sanitizer
|
||||
# -fuse-ld=* Linker select flags for GCC
|
||||
# -static-* direct GCC to link specific libraries statically
|
||||
# -fcilkplus Cilk Plus language extension features for C/C++
|
||||
-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=*)
|
||||
-specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
|
||||
func_quote_for_eval "$arg"
|
||||
arg=$func_quote_for_eval_result
|
||||
func_append compile_command " $arg"
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
# ============================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_compile_check_sizeof.html
|
||||
# ============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro checks for the size of TYPE using compile checks, not run
|
||||
# checks. You can supply extra HEADERS to look into. the check will cycle
|
||||
# through 1 2 4 8 16 and any EXTRA_SIZES the user supplies. If a match is
|
||||
# found, it will #define SIZEOF_`TYPE' to that value. Otherwise it will
|
||||
# emit a configure time error indicating the size of the type could not be
|
||||
# determined.
|
||||
#
|
||||
# The trick is that C will not allow duplicate case labels. While this is
|
||||
# valid C code:
|
||||
#
|
||||
# switch (0) case 0: case 1:;
|
||||
#
|
||||
# The following is not:
|
||||
#
|
||||
# switch (0) case 0: case 0:;
|
||||
#
|
||||
# Thus, the AC_COMPILE_IFELSE will fail if the currently tried size does
|
||||
# not match.
|
||||
#
|
||||
# Here is an example skeleton configure.in script, demonstrating the
|
||||
# macro's usage:
|
||||
#
|
||||
# AC_PROG_CC
|
||||
# AC_CHECK_HEADERS(stddef.h unistd.h)
|
||||
# AC_TYPE_SIZE_T
|
||||
# AC_CHECK_TYPE(ssize_t, int)
|
||||
#
|
||||
# headers='#ifdef HAVE_STDDEF_H
|
||||
# #include <stddef.h>
|
||||
# #endif
|
||||
# #ifdef HAVE_UNISTD_H
|
||||
# #include <unistd.h>
|
||||
# #endif
|
||||
# '
|
||||
#
|
||||
# AX_COMPILE_CHECK_SIZEOF(char)
|
||||
# AX_COMPILE_CHECK_SIZEOF(short)
|
||||
# AX_COMPILE_CHECK_SIZEOF(int)
|
||||
# AX_COMPILE_CHECK_SIZEOF(long)
|
||||
# AX_COMPILE_CHECK_SIZEOF(unsigned char *)
|
||||
# AX_COMPILE_CHECK_SIZEOF(void *)
|
||||
# AX_COMPILE_CHECK_SIZEOF(size_t, $headers)
|
||||
# AX_COMPILE_CHECK_SIZEOF(ssize_t, $headers)
|
||||
# AX_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers)
|
||||
# AX_COMPILE_CHECK_SIZEOF(off_t, $headers)
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Kaveh Ghazi <ghazi@caip.rutgers.edu>
|
||||
# Copyright (c) 2017 Reini Urban <rurban@cpan.org>
|
||||
#
|
||||
# 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 the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program 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 <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 8
|
||||
|
||||
AU_ALIAS([AC_COMPILE_CHECK_SIZEOF], [AX_COMPILE_CHECK_SIZEOF])
|
||||
AC_DEFUN([AX_COMPILE_CHECK_SIZEOF],
|
||||
[changequote(<<, >>)dnl
|
||||
dnl The name to #define.
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
||||
dnl The cache variable name.
|
||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
||||
changequote([, ])dnl
|
||||
AC_MSG_CHECKING(size of $1)
|
||||
AC_CACHE_VAL(AC_CV_NAME,
|
||||
[for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence.
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
$2
|
||||
]], [[switch (0) case 0: case (sizeof ($1) == $ac_size):;]])], [AC_CV_NAME=$ac_size])
|
||||
if test x$AC_CV_NAME != x ; then break; fi
|
||||
done
|
||||
])
|
||||
if test x$AC_CV_NAME = x ; then
|
||||
AC_MSG_ERROR([cannot determine a size for $1])
|
||||
fi
|
||||
AC_MSG_RESULT($AC_CV_NAME)
|
||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
||||
undefine([AC_TYPE_NAME])dnl
|
||||
undefine([AC_CV_NAME])dnl
|
||||
])
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996-2021 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
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 2011-2018 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2011-2021 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
|
||||
|
@ -42,11 +42,13 @@ print_usage ()
|
|||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--]
|
||||
test-driver --test-name NAME --log-file PATH --trs-file PATH
|
||||
[--expect-failure {yes|no}] [--color-tests {yes|no}]
|
||||
[--enable-hard-errors {yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
See the GNU Automake documentation for information.
|
||||
END
|
||||
}
|
||||
|
||||
|
@ -103,8 +105,11 @@ trap "st=130; $do_exit" 2
|
|||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
# Test script is run here. We create the file first, then append to it,
|
||||
# to ameliorate tests themselves also writing to the log file. Our tests
|
||||
# don't, but others can (automake bug#35762).
|
||||
: >"$log_file"
|
||||
"$@" >>"$log_file" 2>&1
|
||||
estatus=$?
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
|
@ -126,7 +131,7 @@ esac
|
|||
# know whether the test passed or failed simply by looking at the '.log'
|
||||
# file, without the need of also peaking into the corresponding '.trs'
|
||||
# file (automake bug#11814).
|
||||
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||
echo "$res $test_name (exit status: $estatus)" >>"$log_file"
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# - Find libgcc
|
||||
# Find the libgcc library.
|
||||
#
|
||||
# LIBGCC_LIBRARIES - List of libraries when using libgcc
|
||||
# LIBGCC_FOUND - True if libgcc found.
|
||||
|
||||
IF (LIBGCC_LIBRARY)
|
||||
# Already in cache, be silent
|
||||
SET(LIBGCC_FIND_QUIETLY TRUE)
|
||||
ENDIF (LIBGCC_LIBRARY)
|
||||
|
||||
FIND_LIBRARY(LIBGCC_LIBRARY NAMES gcc libgcc)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBGCC_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBGCC DEFAULT_MSG LIBGCC_LIBRARY)
|
||||
|
||||
IF(LIBGCC_FOUND)
|
||||
SET(LIBGCC_LIBRARIES ${LIBGCC_LIBRARY})
|
||||
SET(HAVE_LIBGCC 1)
|
||||
ENDIF(LIBGCC_FOUND)
|
|
@ -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)
|
|
@ -1,4 +1,5 @@
|
|||
/* config.h. Generated from build/cmake/config.h.in by cmake configure */
|
||||
#define __LIBARCHIVE_CONFIG_H_INCLUDED 1
|
||||
|
||||
/*
|
||||
* Ensure we have C99-style int64_t, etc, all defined.
|
||||
|
@ -22,14 +23,14 @@
|
|||
#cmakedefine HAVE_UNSIGNED___INT64
|
||||
|
||||
/* The sizes of various standard integer types. */
|
||||
@SIZE_OF_SHORT_CODE@
|
||||
@SIZE_OF_INT_CODE@
|
||||
@SIZE_OF_LONG_CODE@
|
||||
@SIZE_OF_LONG_LONG_CODE@
|
||||
@SIZE_OF_UNSIGNED_SHORT_CODE@
|
||||
@SIZE_OF_UNSIGNED_CODE@
|
||||
@SIZE_OF_UNSIGNED_LONG_CODE@
|
||||
@SIZE_OF_UNSIGNED_LONG_LONG_CODE@
|
||||
@SIZEOF_SHORT_CODE@
|
||||
@SIZEOF_INT_CODE@
|
||||
@SIZEOF_LONG_CODE@
|
||||
@SIZEOF_LONG_LONG_CODE@
|
||||
@SIZEOF_UNSIGNED_SHORT_CODE@
|
||||
@SIZEOF_UNSIGNED_CODE@
|
||||
@SIZEOF_UNSIGNED_LONG_CODE@
|
||||
@SIZEOF_UNSIGNED_LONG_LONG_CODE@
|
||||
|
||||
/*
|
||||
* If we lack int64_t, define it to the first of __int64, int, long, and long long
|
||||
|
@ -40,17 +41,17 @@ typedef __int64 int64_t;
|
|||
#define HAVE_INT64_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_INT64_T) && SIZE_OF_INT == 8
|
||||
#if !defined(HAVE_INT64_T) && SIZEOF_INT == 8
|
||||
typedef int int64_t;
|
||||
#define HAVE_INT64_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_INT64_T) && SIZE_OF_LONG == 8
|
||||
#if !defined(HAVE_INT64_T) && SIZEOF_LONG == 8
|
||||
typedef long int64_t;
|
||||
#define HAVE_INT64_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_INT64_T) && SIZE_OF_LONG_LONG == 8
|
||||
#if !defined(HAVE_INT64_T) && SIZEOF_LONG_LONG == 8
|
||||
typedef long long int64_t;
|
||||
#define HAVE_INT64_T
|
||||
#endif
|
||||
|
@ -62,12 +63,12 @@ typedef long long int64_t;
|
|||
/*
|
||||
* Similarly for int32_t
|
||||
*/
|
||||
#if !defined(HAVE_INT32_T) && SIZE_OF_INT == 4
|
||||
#if !defined(HAVE_INT32_T) && SIZEOF_INT == 4
|
||||
typedef int int32_t;
|
||||
#define HAVE_INT32_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_INT32_T) && SIZE_OF_LONG == 4
|
||||
#if !defined(HAVE_INT32_T) && SIZEOF_LONG == 4
|
||||
typedef long int32_t;
|
||||
#define HAVE_INT32_T
|
||||
#endif
|
||||
|
@ -79,12 +80,12 @@ typedef long int32_t;
|
|||
/*
|
||||
* Similarly for int16_t
|
||||
*/
|
||||
#if !defined(HAVE_INT16_T) && SIZE_OF_INT == 2
|
||||
#if !defined(HAVE_INT16_T) && SIZEOF_INT == 2
|
||||
typedef int int16_t;
|
||||
#define HAVE_INT16_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_INT16_T) && SIZE_OF_SHORT == 2
|
||||
#if !defined(HAVE_INT16_T) && SIZEOF_SHORT == 2
|
||||
typedef short int16_t;
|
||||
#define HAVE_INT16_T
|
||||
#endif
|
||||
|
@ -101,17 +102,17 @@ typedef unsigned __int64 uint64_t;
|
|||
#define HAVE_UINT64_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED == 8
|
||||
#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED == 8
|
||||
typedef unsigned uint64_t;
|
||||
#define HAVE_UINT64_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG == 8
|
||||
#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED_LONG == 8
|
||||
typedef unsigned long uint64_t;
|
||||
#define HAVE_UINT64_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG_LONG == 8
|
||||
#if !defined(HAVE_UINT64_T) && SIZEOF_UNSIGNED_LONG_LONG == 8
|
||||
typedef unsigned long long uint64_t;
|
||||
#define HAVE_UINT64_T
|
||||
#endif
|
||||
|
@ -124,12 +125,12 @@ typedef unsigned long long uint64_t;
|
|||
/*
|
||||
* Similarly for uint32_t
|
||||
*/
|
||||
#if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED == 4
|
||||
#if !defined(HAVE_UINT32_T) && SIZEOF_UNSIGNED == 4
|
||||
typedef unsigned uint32_t;
|
||||
#define HAVE_UINT32_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED_LONG == 4
|
||||
#if !defined(HAVE_UINT32_T) && SIZEOF_UNSIGNED_LONG == 4
|
||||
typedef unsigned long uint32_t;
|
||||
#define HAVE_UINT32_T
|
||||
#endif
|
||||
|
@ -141,12 +142,12 @@ typedef unsigned long uint32_t;
|
|||
/*
|
||||
* Similarly for uint16_t
|
||||
*/
|
||||
#if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED == 2
|
||||
#if !defined(HAVE_UINT16_T) && SIZEOF_UNSIGNED == 2
|
||||
typedef unsigned uint16_t;
|
||||
#define HAVE_UINT16_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED_SHORT == 2
|
||||
#if !defined(HAVE_UINT16_T) && SIZEOF_UNSIGNED_SHORT == 2
|
||||
typedef unsigned short uint16_t;
|
||||
#define HAVE_UINT16_T
|
||||
#endif
|
||||
|
@ -163,7 +164,7 @@ typedef unsigned char uint8_t;
|
|||
#define HAVE_UINT8_T
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UINT16_T)
|
||||
#if !defined(HAVE_UINT8_T)
|
||||
#error No 8-bit unsigned integer type was found.
|
||||
#endif
|
||||
|
||||
|
@ -206,6 +207,9 @@ typedef uint64_t uintmax_t;
|
|||
/* MD5 via ARCHIVE_CRYPTO_MD5_LIBSYSTEM supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_MD5_LIBSYSTEM 1
|
||||
|
||||
/* MD5 via ARCHIVE_CRYPTO_MD5_MBEDTLS supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_MD5_MBEDTLS 1
|
||||
|
||||
/* MD5 via ARCHIVE_CRYPTO_MD5_NETTLE supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_MD5_NETTLE 1
|
||||
|
||||
|
@ -221,6 +225,9 @@ typedef uint64_t uintmax_t;
|
|||
/* RMD160 via ARCHIVE_CRYPTO_RMD160_NETTLE supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_RMD160_NETTLE 1
|
||||
|
||||
/* RMD160 via ARCHIVE_CRYPTO_RMD160_MBEDTLS supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_RMD160_MBEDTLS 1
|
||||
|
||||
/* RMD160 via ARCHIVE_CRYPTO_RMD160_OPENSSL supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_RMD160_OPENSSL 1
|
||||
|
||||
|
@ -230,6 +237,9 @@ typedef uint64_t uintmax_t;
|
|||
/* SHA1 via ARCHIVE_CRYPTO_SHA1_LIBSYSTEM supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA1_LIBSYSTEM 1
|
||||
|
||||
/* SHA1 via ARCHIVE_CRYPTO_SHA1_MBEDTLS supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA1_MBEDTLS 1
|
||||
|
||||
/* SHA1 via ARCHIVE_CRYPTO_SHA1_NETTLE supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA1_NETTLE 1
|
||||
|
||||
|
@ -251,6 +261,9 @@ typedef uint64_t uintmax_t;
|
|||
/* SHA256 via ARCHIVE_CRYPTO_SHA256_LIBSYSTEM supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA256_LIBSYSTEM 1
|
||||
|
||||
/* SHA256 via ARCHIVE_CRYPTO_SHA256_MBEDTLS supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA256_MBEDTLS 1
|
||||
|
||||
/* SHA256 via ARCHIVE_CRYPTO_SHA256_NETTLE supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA256_NETTLE 1
|
||||
|
||||
|
@ -272,6 +285,9 @@ typedef uint64_t uintmax_t;
|
|||
/* SHA384 via ARCHIVE_CRYPTO_SHA384_LIBSYSTEM supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA384_LIBSYSTEM 1
|
||||
|
||||
/* SHA384 via ARCHIVE_CRYPTO_SHA384_MBEDTLS supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA384_MBEDTLS 1
|
||||
|
||||
/* SHA384 via ARCHIVE_CRYPTO_SHA384_NETTLE supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA384_NETTLE 1
|
||||
|
||||
|
@ -293,6 +309,9 @@ typedef uint64_t uintmax_t;
|
|||
/* SHA512 via ARCHIVE_CRYPTO_SHA512_LIBSYSTEM supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA512_LIBSYSTEM 1
|
||||
|
||||
/* SHA512 via ARCHIVE_CRYPTO_SHA512_MBEDTLS supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA512_MBEDTLS 1
|
||||
|
||||
/* SHA512 via ARCHIVE_CRYPTO_SHA512_NETTLE supported. */
|
||||
#cmakedefine ARCHIVE_CRYPTO_SHA512_NETTLE 1
|
||||
|
||||
|
@ -315,13 +334,16 @@ typedef uint64_t uintmax_t;
|
|||
#cmakedefine ARCHIVE_XATTR_LINUX 1
|
||||
|
||||
/* Version number of bsdcpio */
|
||||
#cmakedefine BSDCPIO_VERSION_STRING "${BSDCPIO_VERSION_STRING}"
|
||||
#cmakedefine BSDCPIO_VERSION_STRING "@BSDCPIO_VERSION_STRING@"
|
||||
|
||||
/* Version number of bsdtar */
|
||||
#cmakedefine BSDTAR_VERSION_STRING "${BSDTAR_VERSION_STRING}"
|
||||
#cmakedefine BSDTAR_VERSION_STRING "@BSDTAR_VERSION_STRING@"
|
||||
|
||||
/* Version number of bsdcat */
|
||||
#cmakedefine BSDCAT_VERSION_STRING "${BSDCAT_VERSION_STRING}"
|
||||
#cmakedefine BSDCAT_VERSION_STRING "@BSDCAT_VERSION_STRING@"
|
||||
|
||||
/* Version number of bsdunzip */
|
||||
#cmakedefine BSDUNZIP_VERSION_STRING "@BSDUNZIP_VERSION_STRING@"
|
||||
|
||||
/* Define to 1 if you have the `acl_create_entry' function. */
|
||||
#cmakedefine HAVE_ACL_CREATE_ENTRY 1
|
||||
|
@ -365,7 +387,7 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the <attr/xattr.h> header file. */
|
||||
#cmakedefine HAVE_ATTR_XATTR_H 1
|
||||
|
||||
/* Define to 1 if you have the <Bcrypt.h> header file. */
|
||||
/* Define to 1 if you have the <bcrypt.h> header file. */
|
||||
#cmakedefine HAVE_BCRYPT_H 1
|
||||
|
||||
/* Define to 1 if you have the <bsdxml.h> header file. */
|
||||
|
@ -569,6 +591,12 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the `flistxattr' function. */
|
||||
#cmakedefine HAVE_FLISTXATTR 1
|
||||
|
||||
/* Define to 1 if you have the `fnmatch' function. */
|
||||
#cmakedefine HAVE_FNMATCH 1
|
||||
|
||||
/* Define to 1 if you have the <fnmatch.h> header file. */
|
||||
#cmakedefine HAVE_FNMATCH_H 1
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
#cmakedefine HAVE_FORK 1
|
||||
|
||||
|
@ -617,6 +645,9 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the `getgrnam_r' function. */
|
||||
#cmakedefine HAVE_GETGRNAM_R 1
|
||||
|
||||
/* Define to 1 if you have the `getline' function. */
|
||||
#cmakedefine HAVE_GETLINE 1
|
||||
|
||||
/* Define to 1 if you have the `getpid' function. */
|
||||
#cmakedefine HAVE_GETPID 1
|
||||
|
||||
|
@ -710,6 +741,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
|
||||
|
||||
|
@ -734,12 +768,19 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the `zstd' library (-lzstd). */
|
||||
#cmakedefine HAVE_LIBZSTD 1
|
||||
|
||||
/* Define to 1 if you have the `zstd' library (-lzstd) with compression
|
||||
support. */
|
||||
#cmakedefine HAVE_LIBZSTD_COMPRESSOR 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#cmakedefine HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the `link' function. */
|
||||
#cmakedefine HAVE_LINK 1
|
||||
|
||||
/* Define to 1 if you have the `linkat' function. */
|
||||
#cmakedefine HAVE_LINKAT 1
|
||||
|
||||
/* Define to 1 if you have the <linux/fiemap.h> header file. */
|
||||
#cmakedefine HAVE_LINUX_FIEMAP_H 1
|
||||
|
||||
|
@ -816,6 +857,15 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the <lzo/lzoconf.h> header file. */
|
||||
#cmakedefine HAVE_LZO_LZOCONF_H 1
|
||||
|
||||
/* Define to 1 if you have the <mbedtls/aes.h> header file. */
|
||||
#cmakedefine HAVE_MBEDTLS_AES_H 1
|
||||
|
||||
/* Define to 1 if you have the <mbedtls/md.h> header file. */
|
||||
#cmakedefine HAVE_MBEDTLS_MD_H 1
|
||||
|
||||
/* Define to 1 if you have the <mbedtls/pkcs5.h> header file. */
|
||||
#cmakedefine HAVE_MBEDTLS_PKCS5_H 1
|
||||
|
||||
/* Define to 1 if you have the `mbrtowc' function. */
|
||||
#cmakedefine HAVE_MBRTOWC 1
|
||||
|
||||
|
@ -867,6 +917,9 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the `openat' function. */
|
||||
#cmakedefine HAVE_OPENAT 1
|
||||
|
||||
/* Define to 1 if you have the <openssl/evp.h> header file. */
|
||||
#cmakedefine HAVE_OPENSSL_EVP_H 1
|
||||
|
||||
/* Define to 1 if you have the <paths.h> header file. */
|
||||
#cmakedefine HAVE_PATHS_H 1
|
||||
|
||||
|
@ -955,6 +1008,9 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the `strchr' function. */
|
||||
#cmakedefine HAVE_STRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strnlen' function. */
|
||||
#cmakedefine HAVE_STRNLEN 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#cmakedefine HAVE_STRDUP 1
|
||||
|
||||
|
@ -976,6 +1032,12 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#cmakedefine HAVE_STRRCHR 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct statfs'. */
|
||||
#cmakedefine HAVE_STRUCT_STATFS 1
|
||||
|
||||
/* Define to 1 if `f_iosize' is a member of `struct statfs'. */
|
||||
#cmakedefine HAVE_STRUCT_STATFS_F_IOSIZE 1
|
||||
|
||||
/* Define to 1 if `f_namemax' is a member of `struct statfs'. */
|
||||
#cmakedefine HAVE_STRUCT_STATFS_F_NAMEMAX 1
|
||||
|
||||
|
@ -1059,6 +1121,9 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#cmakedefine HAVE_SYS_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/queue.h> header file. */
|
||||
#cmakedefine HAVE_SYS_QUEUE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/richacl.h> header file. */
|
||||
#cmakedefine HAVE_SYS_RICHACL_H 1
|
||||
|
||||
|
@ -1198,8 +1263,8 @@ typedef uint64_t uintmax_t;
|
|||
/* Define to 1 if you have the <zstd.h> header file. */
|
||||
#cmakedefine HAVE_ZSTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `_ctime64_s' function. */
|
||||
#cmakedefine HAVE__CTIME64_S 1
|
||||
/* Define to 1 if you have the `ctime_s' function. */
|
||||
#cmakedefine HAVE_CTIME_S 1
|
||||
|
||||
/* Define to 1 if you have the `_fseeki64' function. */
|
||||
#cmakedefine HAVE__FSEEKI64 1
|
||||
|
@ -1207,20 +1272,23 @@ 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 `_localtime64_s' function. */
|
||||
#cmakedefine HAVE__LOCALTIME64_S 1
|
||||
/* Define to 1 if you have the `gmtime_s' function. */
|
||||
#cmakedefine HAVE_GMTIME_S 1
|
||||
|
||||
/* Define to 1 if you have the `_mkgmtime64' function. */
|
||||
#cmakedefine HAVE__MKGMTIME64 1
|
||||
/* Define to 1 if you have the `localtime_s' function. */
|
||||
#cmakedefine HAVE_LOCALTIME_S 1
|
||||
|
||||
/* Define to 1 if you have the `_mkgmtime' function. */
|
||||
#cmakedefine HAVE__MKGMTIME 1
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#define ICONV_CONST ${ICONV_CONST}
|
||||
#define ICONV_CONST @ICONV_CONST@
|
||||
|
||||
/* Version number of libarchive as a single integer */
|
||||
#cmakedefine LIBARCHIVE_VERSION_NUMBER "${LIBARCHIVE_VERSION_NUMBER}"
|
||||
#cmakedefine LIBARCHIVE_VERSION_NUMBER "@LIBARCHIVE_VERSION_NUMBER@"
|
||||
|
||||
/* Version number of libarchive */
|
||||
#cmakedefine LIBARCHIVE_VERSION_STRING "${LIBARCHIVE_VERSION_STRING}"
|
||||
#cmakedefine LIBARCHIVE_VERSION_STRING "@LIBARCHIVE_VERSION_STRING@"
|
||||
|
||||
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
|
||||
slash. */
|
||||
|
@ -1238,7 +1306,7 @@ typedef uint64_t uintmax_t;
|
|||
#cmakedefine NO_MINUS_C_MINUS_O 1
|
||||
|
||||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#cmakedefine SIZEOF_WCHAR_T ${SIZEOF_WCHAR_T}
|
||||
#cmakedefine SIZEOF_WCHAR_T @SIZEOF_WCHAR_T@
|
||||
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
#cmakedefine STRERROR_R_CHAR_P 1
|
||||
|
@ -1274,59 +1342,59 @@ typedef uint64_t uintmax_t;
|
|||
#endif /* SAFE_TO_DEFINE_EXTENSIONS */
|
||||
|
||||
/* Version number of package */
|
||||
#cmakedefine VERSION "${VERSION}"
|
||||
#cmakedefine VERSION "@VERSION@"
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#cmakedefine _FILE_OFFSET_BITS ${_FILE_OFFSET_BITS}
|
||||
#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
|
||||
|
||||
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
|
||||
#cmakedefine _LARGEFILE_SOURCE 1
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#cmakedefine _LARGE_FILES ${_LARGE_FILES}
|
||||
#cmakedefine _LARGE_FILES @_LARGE_FILES@
|
||||
|
||||
/* Define to control Windows SDK version */
|
||||
#ifndef NTDDI_VERSION
|
||||
#cmakedefine NTDDI_VERSION ${NTDDI_VERSION}
|
||||
#cmakedefine NTDDI_VERSION @NTDDI_VERSION@
|
||||
#endif // NTDDI_VERSION
|
||||
|
||||
#ifndef _WIN32_WINNT
|
||||
#cmakedefine _WIN32_WINNT ${_WIN32_WINNT}
|
||||
#cmakedefine _WIN32_WINNT @_WIN32_WINNT@
|
||||
#endif // _WIN32_WINNT
|
||||
|
||||
#ifndef WINVER
|
||||
#cmakedefine WINVER ${WINVER}
|
||||
#cmakedefine WINVER @WINVER@
|
||||
#endif // WINVER
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#cmakedefine const ${const}
|
||||
#cmakedefine const @const@
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#cmakedefine gid_t ${gid_t}
|
||||
#cmakedefine gid_t @gid_t@
|
||||
|
||||
/* Define to `unsigned long' if <sys/types.h> does not define. */
|
||||
#cmakedefine id_t ${id_t}
|
||||
#cmakedefine id_t @id_t@
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#cmakedefine mode_t ${mode_t}
|
||||
#cmakedefine mode_t @mode_t@
|
||||
|
||||
/* Define to `long long' if <sys/types.h> does not define. */
|
||||
#cmakedefine off_t ${off_t}
|
||||
#cmakedefine off_t @off_t@
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#cmakedefine pid_t ${pid_t}
|
||||
#cmakedefine pid_t @pid_t@
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#cmakedefine size_t ${size_t}
|
||||
#cmakedefine size_t @size_t@
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#cmakedefine ssize_t ${ssize_t}
|
||||
#cmakedefine ssize_t @ssize_t@
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#cmakedefine uid_t ${uid_t}
|
||||
#cmakedefine uid_t @uid_t@
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#cmakedefine intptr_t ${intptr_t}
|
||||
#cmakedefine intptr_t @intptr_t@
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#cmakedefine uintptr_t ${uintptr_t}
|
||||
#cmakedefine uintptr_t @uintptr_t@
|
||||
|
|
|
@ -10,3 +10,4 @@ Cflags: -I${includedir}
|
|||
Cflags.private: -DLIBARCHIVE_STATIC
|
||||
Libs: -L${libdir} -larchive
|
||||
Libs.private: @LIBS@
|
||||
Requires.private: @LIBSREQUIRED@
|
||||
|
|
|
@ -1 +1 @@
|
|||
3004000
|
||||
3007002
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Command line parser for tar.
|
||||
* Command line parser for bsdcat.
|
||||
*/
|
||||
|
||||
#include "bsdcat_platform.h"
|
||||
|
@ -44,12 +44,12 @@ __FBSDID("$FreeBSD$");
|
|||
#include "err.h"
|
||||
|
||||
/*
|
||||
* Short options for tar. Please keep this sorted.
|
||||
* Short options for bsdcat. Please keep this sorted.
|
||||
*/
|
||||
static const char *short_options = "h";
|
||||
|
||||
/*
|
||||
* Long options for tar. Please keep this list sorted.
|
||||
* Long options for bsdcat. Please keep this list sorted.
|
||||
*
|
||||
* The symbolic names for options that lack a short equivalent are
|
||||
* defined in bsdcat.h. Also note that so far I've found no need
|
||||
|
@ -61,7 +61,7 @@ static const struct bsdcat_option {
|
|||
const char *name;
|
||||
int required; /* 1 if this option requires an argument. */
|
||||
int equivalent; /* Equivalent short option. */
|
||||
} tar_longopts[] = {
|
||||
} bsdcat_longopts[] = {
|
||||
{ "help", 0, 'h' },
|
||||
{ "version", 0, OPTION_VERSION },
|
||||
{ NULL, 0, 0 }
|
||||
|
@ -90,7 +90,7 @@ static const struct bsdcat_option {
|
|||
* -W long options: There's an obscure GNU convention (only rarely
|
||||
* supported even there) that allows "-W option=argument" as an
|
||||
* alternative way to support long options. This was supported in
|
||||
* early bsdcat as a way to access long options on platforms that did
|
||||
* early bsdtar as a way to access long options on platforms that did
|
||||
* not support getopt_long() and is preserved here for backwards
|
||||
* compatibility. (Of course, if I'd started with a custom
|
||||
* command-line parser from the beginning, I would have had normal
|
||||
|
@ -223,7 +223,7 @@ bsdcat_getopt(struct bsdcat *bsdcat)
|
|||
}
|
||||
|
||||
/* Search the table for an unambiguous match. */
|
||||
for (popt = tar_longopts; popt->name != NULL; popt++) {
|
||||
for (popt = bsdcat_longopts; popt->name != NULL; popt++) {
|
||||
/* Short-circuit if first chars don't match. */
|
||||
if (popt->name[0] != bsdcat->getopt_word[0])
|
||||
continue;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -159,6 +177,9 @@
|
|||
/* Version number of bsdtar */
|
||||
#undef BSDTAR_VERSION_STRING
|
||||
|
||||
/* Version number of bsdunzip */
|
||||
#undef BSDUNZIP_VERSION_STRING
|
||||
|
||||
/* Define to 1 if the system has the type `ace_t'. */
|
||||
#undef HAVE_ACE_T
|
||||
|
||||
|
@ -297,6 +318,9 @@
|
|||
/* Define to 1 if you have the `chroot' function. */
|
||||
#undef HAVE_CHROOT
|
||||
|
||||
/* cmtime_s function */
|
||||
#undef HAVE_CMTIME_S
|
||||
|
||||
/* Define to 1 if you have the <copyfile.h> header file. */
|
||||
#undef HAVE_COPYFILE_H
|
||||
|
||||
|
@ -496,6 +520,12 @@
|
|||
/* Define to 1 if you have the `flistxattr' function. */
|
||||
#undef HAVE_FLISTXATTR
|
||||
|
||||
/* Define to 1 if you have the `fnmatch' function. */
|
||||
#undef HAVE_FNMATCH
|
||||
|
||||
/* Define to 1 if you have the <fnmatch.h> header file. */
|
||||
#undef HAVE_FNMATCH_H
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
#undef HAVE_FORK
|
||||
|
||||
|
@ -544,6 +574,9 @@
|
|||
/* Define to 1 if you have the `getgrnam_r' function. */
|
||||
#undef HAVE_GETGRNAM_R
|
||||
|
||||
/* Define to 1 if you have the `getline' function. */
|
||||
#undef HAVE_GETLINE
|
||||
|
||||
/* Define to 1 if you have the `getpid' function. */
|
||||
#undef HAVE_GETPID
|
||||
|
||||
|
@ -562,6 +595,9 @@
|
|||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
#undef HAVE_GMTIME_R
|
||||
|
||||
/* gmtime_s function */
|
||||
#undef HAVE_GMTIME_S
|
||||
|
||||
/* Define to 1 if you have the <grp.h> header file. */
|
||||
#undef HAVE_GRP_H
|
||||
|
||||
|
@ -613,12 +649,6 @@
|
|||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||
#undef HAVE_LIBCRYPTO
|
||||
|
||||
/* Define to 1 if you have the `eay32' library (-leay32). */
|
||||
#undef HAVE_LIBEAY32
|
||||
|
||||
/* Define to 1 if you have the `eay64' library (-leay64). */
|
||||
#undef HAVE_LIBEAY64
|
||||
|
||||
/* Define to 1 if you have the `expat' library (-lexpat). */
|
||||
#undef HAVE_LIBEXPAT
|
||||
|
||||
|
@ -631,6 +661,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
|
||||
|
||||
|
@ -664,12 +697,19 @@
|
|||
/* Define to 1 if you have the `zstd' library (-lzstd). */
|
||||
#undef HAVE_LIBZSTD
|
||||
|
||||
/* Define to 1 if you have the `zstd' library (-lzstd) with compression
|
||||
support. */
|
||||
#undef HAVE_LIBZSTD_COMPRESSOR
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the `link' function. */
|
||||
#undef HAVE_LINK
|
||||
|
||||
/* Define to 1 if you have the `linkat' function. */
|
||||
#undef HAVE_LINKAT
|
||||
|
||||
/* Define to 1 if you have the <linux/fiemap.h> header file. */
|
||||
#undef HAVE_LINUX_FIEMAP_H
|
||||
|
||||
|
@ -706,6 +746,9 @@
|
|||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* localtime_s function */
|
||||
#undef HAVE_LOCALTIME_S
|
||||
|
||||
/* Define to 1 if the system has the type `long long int'. */
|
||||
#undef HAVE_LONG_LONG_INT
|
||||
|
||||
|
@ -731,6 +774,9 @@
|
|||
/* Define to 1 if you have the <lz4.h> header file. */
|
||||
#undef HAVE_LZ4_H
|
||||
|
||||
/* Define to 1 if you have the `LZMA_FILTER_ARM64' macro. */
|
||||
#undef HAVE_LZMA_FILTER_ARM64
|
||||
|
||||
/* Define to 1 if you have the <lzma.h> header file. */
|
||||
#undef HAVE_LZMA_H
|
||||
|
||||
|
@ -743,6 +789,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
|
||||
|
||||
|
@ -764,12 +819,12 @@
|
|||
/* Define to 1 if you have the `memmove' function. */
|
||||
#undef HAVE_MEMMOVE
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||
#undef HAVE_MINIX_CONFIG_H
|
||||
|
||||
/* Define to 1 if you have the `mkdir' function. */
|
||||
#undef HAVE_MKDIR
|
||||
|
||||
|
@ -927,6 +982,9 @@
|
|||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
|
@ -939,7 +997,7 @@
|
|||
/* Define to 1 if you have the `strerror' function. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define to 1 if you have the `strerror_r' function. */
|
||||
/* Define if you have `strerror_r'. */
|
||||
#undef HAVE_STRERROR_R
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
|
@ -954,6 +1012,9 @@
|
|||
/* Define to 1 if you have the `strncpy_s' function. */
|
||||
#undef HAVE_STRNCPY_S
|
||||
|
||||
/* Define to 1 if you have the `strnlen' function. */
|
||||
#undef HAVE_STRNLEN
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#undef HAVE_STRRCHR
|
||||
|
||||
|
@ -963,6 +1024,12 @@
|
|||
/* Define to 1 if the system has the type `struct richacl'. */
|
||||
#undef HAVE_STRUCT_RICHACL
|
||||
|
||||
/* Define to 1 if the system has the type `struct statfs'. */
|
||||
#undef HAVE_STRUCT_STATFS
|
||||
|
||||
/* Define to 1 if `f_iosize' is a member of `struct statfs'. */
|
||||
#undef HAVE_STRUCT_STATFS_F_IOSIZE
|
||||
|
||||
/* Define to 1 if `f_namemax' is a member of `struct statfs'. */
|
||||
#undef HAVE_STRUCT_STATFS_F_NAMEMAX
|
||||
|
||||
|
@ -1046,6 +1113,9 @@
|
|||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#undef HAVE_SYS_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/queue.h> header file. */
|
||||
#undef HAVE_SYS_QUEUE_H
|
||||
|
||||
/* Define to 1 if you have the <sys/richacl.h> header file. */
|
||||
#undef HAVE_SYS_RICHACL_H
|
||||
|
||||
|
@ -1184,20 +1254,14 @@
|
|||
/* Define to 1 if you have the <zstd.h> header file. */
|
||||
#undef HAVE_ZSTD_H
|
||||
|
||||
/* Define to 1 if you have the `_ctime64_s' function. */
|
||||
#undef HAVE__CTIME64_S
|
||||
|
||||
/* Define to 1 if you have the `_fseeki64' function. */
|
||||
#undef HAVE__FSEEKI64
|
||||
|
||||
/* Define to 1 if you have the `_get_timezone' function. */
|
||||
#undef HAVE__GET_TIMEZONE
|
||||
|
||||
/* Define to 1 if you have the `_localtime64_s' function. */
|
||||
#undef HAVE__LOCALTIME64_S
|
||||
|
||||
/* Define to 1 if you have the `_mkgmtime64' function. */
|
||||
#undef HAVE__MKGMTIME64
|
||||
/* _mkgmtime function */
|
||||
#undef HAVE__MKGMTIME
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#undef ICONV_CONST
|
||||
|
@ -1250,37 +1314,108 @@
|
|||
/* Define to 1 if PCRE_STATIC needs to be defined. */
|
||||
#undef PCRE_STATIC
|
||||
|
||||
/* The number of bytes in type int */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The number of bytes in type long */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of `wchar_t', as computed by sizeof. */
|
||||
#undef SIZEOF_WCHAR_T
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
backward compatibility; new code need not use it. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
#undef STRERROR_R_CHAR_P
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on macOS. */
|
||||
#ifndef _DARWIN_C_SOURCE
|
||||
# undef _DARWIN_C_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
/* Enable X/Open compliant socket functions that do not require linking
|
||||
with -lxnet on HP-UX 11.11. */
|
||||
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
|
||||
# undef _HPUX_ALT_XOPEN_SOCKET_API
|
||||
#endif
|
||||
/* Identify the host operating system as Minix.
|
||||
This macro does not affect the system headers' behavior.
|
||||
A future release of Autoconf may stop defining this macro. */
|
||||
#ifndef _MINIX
|
||||
# undef _MINIX
|
||||
#endif
|
||||
/* Enable general extensions on NetBSD.
|
||||
Enable NetBSD compatibility extensions on Minix. */
|
||||
#ifndef _NETBSD_SOURCE
|
||||
# undef _NETBSD_SOURCE
|
||||
#endif
|
||||
/* Enable OpenBSD compatibility extensions on NetBSD.
|
||||
Oddly enough, this does nothing on OpenBSD. */
|
||||
#ifndef _OPENBSD_SOURCE
|
||||
# undef _OPENBSD_SOURCE
|
||||
#endif
|
||||
/* Define to 1 if needed for POSIX-compatible behavior. */
|
||||
#ifndef _POSIX_SOURCE
|
||||
# undef _POSIX_SOURCE
|
||||
#endif
|
||||
/* Define to 2 if needed for POSIX-compatible behavior. */
|
||||
#ifndef _POSIX_1_SOURCE
|
||||
# undef _POSIX_1_SOURCE
|
||||
#endif
|
||||
/* Enable POSIX-compatible threading on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
|
||||
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
|
||||
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
|
||||
#ifndef __STDC_WANT_LIB_EXT2__
|
||||
# undef __STDC_WANT_LIB_EXT2__
|
||||
#endif
|
||||
/* Enable extensions specified by ISO/IEC 24747:2009. */
|
||||
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||
# undef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
/* Enable X/Open extensions. Define to 500 only if necessary
|
||||
to make mbstate_t available. */
|
||||
#ifndef _XOPEN_SOURCE
|
||||
# undef _XOPEN_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1290,11 +1425,6 @@
|
|||
/* Define to '0x0502' for Windows Server 2003 APIs. */
|
||||
#undef WINVER
|
||||
|
||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
||||
#ifndef _DARWIN_USE_64_BIT_INODE
|
||||
# define _DARWIN_USE_64_BIT_INODE 1
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
|
@ -1304,16 +1434,6 @@
|
|||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
|
@ -1332,6 +1452,9 @@
|
|||
/* Define to '0x0502' for Windows Server 2003 APIs. */
|
||||
#undef _WIN32_WINNT
|
||||
|
||||
/* Internal macro for sanity checks */
|
||||
#undef __LIBARCHIVE_CONFIG_H_INCLUDED
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,15 +4,16 @@ 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.7.2])
|
||||
m4_define([LIBARCHIVE_VERSION_N],[3007002])
|
||||
|
||||
dnl bsdtar and bsdcpio versioning tracks libarchive
|
||||
m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
|
||||
m4_define([BSDCPIO_VERSION_S],LIBARCHIVE_VERSION_S())
|
||||
m4_define([BSDCAT_VERSION_S],LIBARCHIVE_VERSION_S())
|
||||
m4_define([BSDUNZIP_VERSION_S],LIBARCHIVE_VERSION_S())
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_PREREQ([2.71])
|
||||
|
||||
#
|
||||
# Now starts the "real" configure script.
|
||||
|
@ -26,7 +27,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])])
|
||||
|
||||
|
@ -47,6 +48,8 @@ ARCHIVE_REVISION=$(( LIBARCHIVE_VERSION_N() % 1000 ))
|
|||
ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_INTERFACE:$ARCHIVE_REVISION:$ARCHIVE_MINOR
|
||||
|
||||
# Stick the version numbers into config.h
|
||||
AC_DEFINE([__LIBARCHIVE_CONFIG_H_INCLUDED], [1],
|
||||
[Internal macro for sanity checks])
|
||||
AC_DEFINE([LIBARCHIVE_VERSION_STRING],"LIBARCHIVE_VERSION_S()",
|
||||
[Version number of libarchive])
|
||||
AC_DEFINE_UNQUOTED([LIBARCHIVE_VERSION_NUMBER],"LIBARCHIVE_VERSION_N()",
|
||||
|
@ -57,6 +60,8 @@ AC_DEFINE([BSDTAR_VERSION_STRING],"BSDTAR_VERSION_S()",
|
|||
[Version number of bsdtar])
|
||||
AC_DEFINE([BSDCAT_VERSION_STRING],"BSDTAR_VERSION_S()",
|
||||
[Version number of bsdcat])
|
||||
AC_DEFINE([BSDUNZIP_VERSION_STRING],"BSDUNZIP_VERSION_S()",
|
||||
[Version number of bsdunzip])
|
||||
|
||||
# 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
|
||||
|
@ -64,6 +69,7 @@ AC_DEFINE([BSDCAT_VERSION_STRING],"BSDTAR_VERSION_S()",
|
|||
BSDCPIO_VERSION_STRING=BSDCPIO_VERSION_S()
|
||||
BSDTAR_VERSION_STRING=BSDTAR_VERSION_S()
|
||||
BSDCAT_VERSION_STRING=BSDCAT_VERSION_S()
|
||||
BSDUNZIP_VERSION_STRING=BSDUNZIP_VERSION_S()
|
||||
LIBARCHIVE_VERSION_STRING=LIBARCHIVE_VERSION_S()
|
||||
LIBARCHIVE_VERSION_NUMBER=LIBARCHIVE_VERSION_N()
|
||||
|
||||
|
@ -74,6 +80,7 @@ AC_SUBST(ARCHIVE_LIBTOOL_VERSION)
|
|||
AC_SUBST(BSDCPIO_VERSION_STRING)
|
||||
AC_SUBST(BSDTAR_VERSION_STRING)
|
||||
AC_SUBST(BSDCAT_VERSION_STRING)
|
||||
AC_SUBST(BSDUNZIP_VERSION_STRING)
|
||||
AC_SUBST(LIBARCHIVE_VERSION_STRING)
|
||||
AC_SUBST(LIBARCHIVE_VERSION_NUMBER)
|
||||
|
||||
|
@ -97,13 +104,14 @@ AM_CONDITIONAL([INC_CYGWIN_FILES], [test $inc_cygwin_files = yes])
|
|||
dnl Defines that are required for specific platforms (e.g. -D_POSIX_SOURCE, etc)
|
||||
PLATFORMCPPFLAGS=
|
||||
case "$host_os" in
|
||||
*mingw* ) PLATFORMCPPFLAGS=-D__USE_MINGW_ANSI_STDIO ;;
|
||||
*mingw* ) PLATFORMCPPFLAGS=-D__USE_MINGW_ANSI_STDIO -D__MINGW_USE_VC2005_COMPAT ;;
|
||||
esac
|
||||
AC_SUBST(PLATFORMCPPFLAGS)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CPP
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AC_PROG_LIBTOOL
|
||||
|
@ -244,18 +252,84 @@ AM_CONDITIONAL([STATIC_BSDCPIO], [ test "$static_bsdcpio" = yes ])
|
|||
# Set up defines needed before including any headers
|
||||
case $host in
|
||||
*mingw* | *cygwin* | *msys* )
|
||||
AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
|
||||
AC_DEFINE([WINVER], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
|
||||
AC_DEFINE([NTDDI_VERSION], 0x05020000, [Define to '0x05020000' for Windows Server 2003 APIs.])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#ifdef _WIN32_WINNT
|
||||
# error _WIN32_WINNT already defined
|
||||
#endif
|
||||
]],[[;]])
|
||||
],[
|
||||
AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
|
||||
AC_DEFINE([NTDDI_VERSION], 0x05020000, [Define to '0x05020000' for Windows Server 2003 APIs.])
|
||||
])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#ifdef WINVER
|
||||
# error WINVER already defined
|
||||
#endif
|
||||
]],[[;]])
|
||||
],[
|
||||
AC_DEFINE([WINVER], 0x0502, [Define to '0x0502' for Windows Server 2003 APIs.])
|
||||
])
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Options for building bsdunzip.
|
||||
#
|
||||
# Default is to build bsdunzip, but allow people to override that.
|
||||
# Bsdunzip has not yet been ported for Windows
|
||||
#
|
||||
case "$host_os" in
|
||||
*mingw* | *msys*)
|
||||
enable_bsdunzip=no
|
||||
;;
|
||||
*)
|
||||
AC_ARG_ENABLE([bsdunzip],
|
||||
[AS_HELP_STRING([--enable-bsdunzip], [enable build of bsdunzip (default)])
|
||||
AS_HELP_STRING([--enable-bsdunzip=static], [force static build of bsdunzip])
|
||||
AS_HELP_STRING([--enable-bsdunzip=shared], [force dynamic build of bsdunzip])
|
||||
AS_HELP_STRING([--disable-bsdunzip], [disable build of bsdunzip])],
|
||||
[], [enable_bsdunzip=yes])
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$enable_bsdunzip" in
|
||||
yes)
|
||||
if test "$enable_static" = "no"; then
|
||||
static_bsdunzip=no
|
||||
else
|
||||
static_bsdunzip=yes
|
||||
fi
|
||||
build_bsdunzip=yes
|
||||
;;
|
||||
dynamic|shared)
|
||||
if test "$enable_shared" = "no"; then
|
||||
AC_MSG_FAILURE([Shared linking of bsdunzip requires shared libarchive])
|
||||
fi
|
||||
build_bsdunzip=yes
|
||||
static_bsdunzip=no
|
||||
;;
|
||||
static)
|
||||
build_bsdunzip=yes
|
||||
static_bsdunzip=yes
|
||||
;;
|
||||
no)
|
||||
build_bsdunzip=no
|
||||
static_bsdunzip=no
|
||||
;;
|
||||
*)
|
||||
AC_MSG_FAILURE([Unsupported value for --enable-bsdunzip])
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL([BUILD_BSDUNZIP], [ test "$build_bsdunzip" = yes ])
|
||||
AM_CONDITIONAL([STATIC_BSDUNZIP], [ test "$static_bsdunzip" = yes ])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS([acl/libacl.h attr/xattr.h])
|
||||
AC_CHECK_HEADERS([copyfile.h ctype.h])
|
||||
AC_CHECK_HEADERS([errno.h ext2fs/ext2_fs.h fcntl.h grp.h])
|
||||
AC_CHECK_HEADERS([errno.h ext2fs/ext2_fs.h fcntl.h fnmatch.h grp.h])
|
||||
|
||||
AC_CACHE_CHECK([whether EXT2_IOC_GETFLAGS is usable],
|
||||
[ac_cv_have_decl_EXT2_IOC_GETFLAGS],
|
||||
|
@ -288,7 +362,7 @@ AC_CHECK_HEADERS([locale.h membership.h paths.h poll.h pthread.h pwd.h])
|
|||
AC_CHECK_HEADERS([readpassphrase.h signal.h spawn.h])
|
||||
AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h])
|
||||
AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/ea.h sys/extattr.h])
|
||||
AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h])
|
||||
AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h sys/queue.h])
|
||||
AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/richacl.h])
|
||||
AC_CHECK_HEADERS([sys/select.h sys/statfs.h sys/statvfs.h sys/sysmacros.h])
|
||||
AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h sys/xattr.h])
|
||||
|
@ -360,10 +434,13 @@ if test "x$with_iconv" != "xno"; then
|
|||
AC_CHECK_HEADERS([localcharset.h])
|
||||
am_save_LIBS="$LIBS"
|
||||
LIBS="${LIBS} ${LIBICONV}"
|
||||
if test -n "$LIBICONV"; then
|
||||
LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv"
|
||||
fi
|
||||
AC_CHECK_FUNCS([locale_charset])
|
||||
LIBS="${am_save_LIBS}"
|
||||
if test "x$ac_cv_func_locale_charset" != "xyes"; then
|
||||
# If locale_charset() is not in libiconv, we have to find libcharset.
|
||||
# If locale_charset() is not in libiconv, we have to find libcharset.
|
||||
AC_CHECK_LIB(charset,locale_charset)
|
||||
fi
|
||||
fi
|
||||
|
@ -382,7 +459,9 @@ AC_ARG_WITH([zstd],
|
|||
|
||||
if test "x$with_zstd" != "xno"; then
|
||||
AC_CHECK_HEADERS([zstd.h])
|
||||
AC_CHECK_LIB(zstd,ZSTD_compressStream)
|
||||
AC_CHECK_LIB(zstd,ZSTD_decompressStream)
|
||||
AC_CHECK_LIB(zstd,ZSTD_compressStream,
|
||||
AC_DEFINE([HAVE_LIBZSTD_COMPRESSOR], [1], [Define to 1 if you have the `zstd' library (-lzstd) with compression support.]))
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([lzma],
|
||||
|
@ -408,6 +487,19 @@ if test "x$with_lzma" != "xno"; then
|
|||
if test "x$ac_cv_lzma_has_mt" != xno; then
|
||||
AC_DEFINE([HAVE_LZMA_STREAM_ENCODER_MT], [1], [Define to 1 if you have the `lzma_stream_encoder_mt' function.])
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(
|
||||
[whether we have ARM64 filter support in lzma],
|
||||
ac_cv_lzma_has_arm64,
|
||||
[AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([[#include <lzma.h>]
|
||||
[#ifndef LZMA_FILTER_ARM64]
|
||||
[#error unsupported]
|
||||
[#endif]])],
|
||||
[ac_cv_lzma_has_arm64=yes], [ac_cv_lzma_has_arm64=no])])
|
||||
if test "x$ac_cv_lzma_has_arm64" != xno; then
|
||||
AC_DEFINE([HAVE_LZMA_FILTER_ARM64], [1], [Define to 1 if you have the `LZMA_FILTER_ARM64' macro.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([lzo2],
|
||||
|
@ -421,8 +513,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
|
||||
|
@ -520,6 +614,22 @@ fi
|
|||
# Checks for supported compiler flags
|
||||
AX_APPEND_COMPILE_FLAGS([-Wall -Wformat -Wformat-security])
|
||||
|
||||
# Place the functions and data into separate sections, allowing the linker
|
||||
# to garbage collect the unused ones.
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,--gc-sections"
|
||||
AC_MSG_CHECKING([whether ld supports --gc-sections])
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_SOURCE([static char UnusedFunc() { return 5; } int main() { return 0;}])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
GC_SECTIONS="-Wl,--gc-sections";
|
||||
AX_APPEND_COMPILE_FLAGS([-ffunction-sections -fdata-sections])],
|
||||
[AC_MSG_RESULT([no])
|
||||
GC_SECTIONS="";])
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
|
||||
AC_SUBST(GC_SECTIONS)
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
# la_TYPE_UID_T defaults to "int", which is incorrect for MinGW
|
||||
|
@ -546,6 +656,13 @@ AC_CHECK_MEMBERS([struct statfs.f_namemax],,,
|
|||
#include <sys/mount.h>
|
||||
])
|
||||
|
||||
# Check for f_iosize in struct statfs
|
||||
AC_CHECK_MEMBERS([struct statfs.f_iosize],,,
|
||||
[
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
])
|
||||
|
||||
# Check for f_iosize in struct statvfs
|
||||
AC_CHECK_MEMBERS([struct statvfs.f_iosize],,,
|
||||
[
|
||||
|
@ -606,7 +723,10 @@ AC_CHECK_TYPE([wchar_t],
|
|||
AC_CHECK_SIZEOF([wchar_t])],
|
||||
[])
|
||||
|
||||
AC_HEADER_TIME
|
||||
AX_COMPILE_CHECK_SIZEOF(int)
|
||||
AX_COMPILE_CHECK_SIZEOF(long)
|
||||
|
||||
AC_CHECK_HEADERS_ONCE([sys/time.h])
|
||||
|
||||
# Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
|
@ -624,22 +744,38 @@ AC_FUNC_VPRINTF
|
|||
# workarounds, we use 'void *' for 'struct SECURITY_ATTRIBUTES *'
|
||||
AC_CHECK_STDCALL_FUNC([CreateHardLinkA],[const char *, const char *, void *])
|
||||
AC_CHECK_FUNCS([arc4random_buf chflags chown chroot ctime_r])
|
||||
AC_CHECK_FUNCS([fchdir fchflags fchmod fchown fcntl fdopendir fork])
|
||||
AC_CHECK_FUNCS([fchdir fchflags fchmod fchown fcntl fdopendir fnmatch fork])
|
||||
AC_CHECK_FUNCS([fstat fstatat fstatfs fstatvfs ftruncate])
|
||||
AC_CHECK_FUNCS([futimens futimes futimesat])
|
||||
AC_CHECK_FUNCS([geteuid getpid getgrgid_r getgrnam_r])
|
||||
AC_CHECK_FUNCS([geteuid getline getpid getgrgid_r getgrnam_r])
|
||||
AC_CHECK_FUNCS([getpwnam_r getpwuid_r getvfsbyname gmtime_r])
|
||||
AC_CHECK_FUNCS([lchflags lchmod lchown link localtime_r lstat lutimes])
|
||||
AC_CHECK_FUNCS([lchflags lchmod lchown link linkat localtime_r lstat lutimes])
|
||||
AC_CHECK_FUNCS([mbrtowc memmove memset])
|
||||
AC_CHECK_FUNCS([mkdir mkfifo mknod mkstemp])
|
||||
AC_CHECK_FUNCS([nl_langinfo openat pipe poll posix_spawnp readlink readlinkat])
|
||||
AC_CHECK_FUNCS([readpassphrase])
|
||||
AC_CHECK_FUNCS([select setenv setlocale sigaction statfs statvfs])
|
||||
AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strrchr symlink timegm])
|
||||
AC_CHECK_FUNCS([tzset unlinkat unsetenv utime utimensat utimes vfork])
|
||||
AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strnlen strrchr symlink])
|
||||
AC_CHECK_FUNCS([timegm 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([_fseeki64 _get_timezone])
|
||||
AC_CHECK_DECL([cmtime_s],
|
||||
[AC_DEFINE(HAVE_CMTIME_S, 1, [cmtime_s function])],
|
||||
[],
|
||||
[#include <time.h>])
|
||||
AC_CHECK_DECL([gmtime_s],
|
||||
[AC_DEFINE(HAVE_GMTIME_S, 1, [gmtime_s function])],
|
||||
[],
|
||||
[#include <time.h>])
|
||||
AC_CHECK_TYPE([localtime_s],
|
||||
[AC_DEFINE(HAVE_LOCALTIME_S, 1, [localtime_s function])],
|
||||
[],
|
||||
[#include <time.h>])
|
||||
AC_CHECK_DECL([_mkgmtime],
|
||||
[AC_DEFINE(HAVE__MKGMTIME, 1, [_mkgmtime function])],
|
||||
[],
|
||||
[#include <time.h>])
|
||||
|
||||
# detects cygwin-1.7, as opposed to older versions
|
||||
AC_CHECK_FUNCS([cygwin_conv_path])
|
||||
|
||||
|
@ -658,16 +794,23 @@ AC_CHECK_TYPES(struct xvfsconf,,,
|
|||
#include <sys/mount.h>
|
||||
])
|
||||
|
||||
AC_CHECK_TYPES(struct statfs,,,
|
||||
[#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/mount.h>
|
||||
])
|
||||
|
||||
# There are several variants of readdir_r around; we only
|
||||
# accept the POSIX-compliant version.
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <dirent.h>]],
|
||||
[[DIR *dir; struct dirent e, *r;
|
||||
return(readdir_r(dir, &e, &r));]])],
|
||||
[AC_DEFINE(HAVE_READDIR_R,1,[Define to 1 if you have a POSIX compatible readdir_r])]
|
||||
)
|
||||
# dirfd can be either a function or a macro.
|
||||
AC_COMPILE_IFELSE(
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <dirent.h>
|
||||
DIR *dir;]],
|
||||
[[return(dirfd(dir));]])],
|
||||
|
@ -1120,7 +1263,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
|
||||
|
@ -1139,24 +1297,8 @@ fi
|
|||
if test "x$with_openssl" != "xno"; then
|
||||
AC_CHECK_HEADERS([openssl/evp.h])
|
||||
saved_LIBS=$LIBS
|
||||
case "$host_os" in
|
||||
*mingw* | *cygwin* | *msys*)
|
||||
case "$host_cpu" in
|
||||
x86_64)
|
||||
AC_CHECK_LIB(eay64,OPENSSL_config)
|
||||
if test "x$ac_cv_lib_eay64_main" != "xyes"; then
|
||||
AC_CHECK_LIB(eay32,OPENSSL_config)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(eay32,OPENSSL_config)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(crypto,OPENSSL_config)
|
||||
;;
|
||||
esac
|
||||
LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }libcrypto"
|
||||
AC_CHECK_LIB(crypto,OPENSSL_config)
|
||||
CRYPTO_CHECK(MD5, OPENSSL, md5)
|
||||
CRYPTO_CHECK(RMD160, OPENSSL, rmd160)
|
||||
CRYPTO_CHECK(SHA1, OPENSSL, sha1)
|
||||
|
@ -1166,6 +1308,8 @@ if test "x$with_openssl" != "xno"; then
|
|||
AC_CHECK_FUNCS([PKCS5_PBKDF2_HMAC_SHA1])
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBSREQUIRED)
|
||||
|
||||
# Probe libmd AFTER OpenSSL/libcrypto.
|
||||
# The two are incompatible and OpenSSL is more complete.
|
||||
AC_CHECK_HEADERS([md5.h ripemd.h sha.h sha256.h sha512.h])
|
||||
|
@ -1190,6 +1334,18 @@ case "$host_os" in
|
|||
;;
|
||||
esac
|
||||
|
||||
dnl Visibility annotations...
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden -Werror"
|
||||
AC_MSG_CHECKING(whether compiler supports visibility annotations)
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||
int foo( void ) __attribute__((visibility("default")));
|
||||
])],
|
||||
[CFLAGS="$saved_CFLAGS -fvisibility=hidden -D__LIBARCHIVE_ENABLE_VISIBILITY";
|
||||
AC_MSG_RESULT(yes)],
|
||||
[CFLAGS="$saved_CFLAGS"
|
||||
AC_MSG_RESULT(no)])
|
||||
|
||||
# Ensure test directories are present if building out-of-tree
|
||||
AC_CONFIG_COMMANDS([mkdirs],
|
||||
[mkdir -p libarchive/test tar/test cat/test cpio/test])
|
||||
|
|
|
@ -180,5 +180,5 @@
|
|||
#define SIZEOF_WCHAR_T 4
|
||||
#define STDC_HEADERS 1
|
||||
#define STRERROR_R_CHAR_P 1
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#endif
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
#define SIZEOF_WCHAR_T 4
|
||||
#define STDC_HEADERS 1
|
||||
#define STRERROR_R_CHAR_P 1
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
#endif
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
/* Define to 1 if you have the <attr/xattr.h> header file. */
|
||||
/* #undef HAVE_ATTR_XATTR_H */
|
||||
|
||||
/* Define to 1 if you have the <Bcrypt.h> header file. */
|
||||
/* Define to 1 if you have the <bcrypt.h> header file. */
|
||||
#define HAVE_BCRYPT_H
|
||||
|
||||
/* Define to 1 if you have the <bzlib.h> header file. */
|
||||
|
@ -905,8 +905,8 @@
|
|||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
/* #undef HAVE_ZLIB_H */
|
||||
|
||||
/* Define to 1 if you have the `_ctime64_s' function. */
|
||||
#define HAVE__CTIME64_S 1
|
||||
/* Define to 1 if you have the `ctime_s' function. */
|
||||
#define HAVE_CTIME_S 1
|
||||
|
||||
/* Define to 1 if you have the `_fseeki64' function. */
|
||||
#define HAVE__FSEEKI64 1
|
||||
|
@ -914,11 +914,11 @@
|
|||
/* Define to 1 if you have the `_get_timezone' function. */
|
||||
/* #undef HAVE__GET_TIMEZONE */
|
||||
|
||||
/* Define to 1 if you have the `_localtime64_s' function. */
|
||||
#define HAVE__LOCALTIME64_S 1
|
||||
/* Define to 1 if you have the `localtime_s' function. */
|
||||
#define HAVE_LOCALTIME_S 1
|
||||
|
||||
/* Define to 1 if you have the `_mkgmtime64' function. */
|
||||
/* #define HAVE__MKGMTIME64 1 */
|
||||
/* Define to 1 if you have the `_mkgmtime' function. */
|
||||
/* #define HAVE__MKGMTIME 1 */
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
/* #undef ICONV_CONST */
|
||||
|
@ -952,7 +952,7 @@
|
|||
/* #undef STRERROR_R_CHAR_P */
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
@ -79,12 +83,13 @@ void printhelp()
|
|||
" -f filename Filename to verify\n"
|
||||
" -h Show this help\n"
|
||||
" -q Quiet mode\n"
|
||||
" -r Enforce raw archive format\n"
|
||||
" -s Verify only headers (skip data)\n\n"
|
||||
"If no filename is specified, data is read from standard input.\n"
|
||||
"\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;
|
||||
|
||||
|
@ -106,15 +111,17 @@ int main(int argc, char *argv[])
|
|||
const char *p;
|
||||
char buffer[4096];
|
||||
int c;
|
||||
int v, skip_data;
|
||||
int v, skip_data, raw;
|
||||
int r = ARCHIVE_OK;
|
||||
int format_printed;
|
||||
mode_t mode;
|
||||
|
||||
filename = NULL;
|
||||
skip_data = 0;
|
||||
raw = 0;
|
||||
v = 1;
|
||||
|
||||
while ((c = getopt (argc, argv, "f:hqs")) != -1) {
|
||||
while ((c = getopt (argc, argv, "f:hrqs")) != -1) {
|
||||
switch (c) {
|
||||
case 'f':
|
||||
filename = optarg;
|
||||
|
@ -125,6 +132,9 @@ int main(int argc, char *argv[])
|
|||
case 'q':
|
||||
v = 0;
|
||||
break;
|
||||
case 'r':
|
||||
raw = 1;
|
||||
break;
|
||||
case 's':
|
||||
skip_data = 1;
|
||||
break;
|
||||
|
@ -139,6 +149,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);
|
||||
}
|
||||
|
@ -147,7 +159,10 @@ int main(int argc, char *argv[])
|
|||
a = archive_read_new();
|
||||
|
||||
archive_read_support_filter_all(a);
|
||||
archive_read_support_format_all(a);
|
||||
if (raw)
|
||||
archive_read_support_format_raw(a);
|
||||
else
|
||||
archive_read_support_format_all(a);
|
||||
|
||||
v_print(v, "Data source: ");
|
||||
|
||||
|
@ -185,16 +200,18 @@ int main(int argc, char *argv[])
|
|||
if (r == ARCHIVE_EOF)
|
||||
break;
|
||||
p = archive_entry_pathname(entry);
|
||||
mode = archive_entry_mode(entry);
|
||||
v_print(v, "Entry %d: %s, pathname", c, errnostr(r));
|
||||
if (p == NULL || p[0] == '\0')
|
||||
v_print(v, " unreadable");
|
||||
else
|
||||
v_print(v, ": %s", p);
|
||||
v_print(v, ", mode: %o", mode);
|
||||
v_print(v, ", data: ");
|
||||
if (skip_data) {
|
||||
v_print(v, "skipping");
|
||||
} else {
|
||||
while ((r = archive_read_data(a, buffer, 4096) > 0))
|
||||
while ((r = archive_read_data(a, buffer, 4096)) > 0)
|
||||
;
|
||||
if (r == ARCHIVE_FATAL) {
|
||||
v_print(v, "ERROR\nError string: %s\n",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Name: {{{ git_name }}}
|
||||
Version: {{{ git_version lead=3 follow=4 }}}
|
||||
Version: {{{ git_version lead=3 follow=5 }}}
|
||||
Release: 1%{?dist}
|
||||
Summary: A library for handling streaming archive formats
|
||||
|
||||
|
@ -99,7 +99,7 @@ replace ()
|
|||
print \".Dt ${binary^^} 1\";
|
||||
next;
|
||||
}
|
||||
# replace the first occurence of \"$pattern\" by \"$binary\"
|
||||
# replace the first occurrence of \"$pattern\" by \"$binary\"
|
||||
!stop && /^.Nm $pattern/ {
|
||||
print \".Nm $binary\" ;
|
||||
stop = 1 ;
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,49 @@
|
|||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <vector>
|
||||
|
||||
#include "archive.h"
|
||||
|
||||
struct Buffer {
|
||||
const uint8_t *buf;
|
||||
size_t len;
|
||||
};
|
||||
|
||||
ssize_t reader_callback(struct archive *a, void *client_data,
|
||||
const void **block) {
|
||||
Buffer *buffer = reinterpret_cast<Buffer *>(client_data);
|
||||
*block = buffer->buf;
|
||||
ssize_t len = buffer->len;
|
||||
buffer->len = 0;
|
||||
return len;
|
||||
}
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) {
|
||||
int ret;
|
||||
ssize_t r;
|
||||
struct archive *a = archive_read_new();
|
||||
|
||||
archive_read_support_filter_all(a);
|
||||
archive_read_support_format_all(a);
|
||||
|
||||
Buffer buffer = {buf, len};
|
||||
archive_read_open(a, &buffer, NULL, reader_callback, NULL);
|
||||
|
||||
std::vector<uint8_t> data_buffer(getpagesize(), 0);
|
||||
struct archive_entry *entry;
|
||||
while(1) {
|
||||
ret = archive_read_next_header(a, &entry);
|
||||
if (ret == ARCHIVE_EOF || ret == ARCHIVE_FATAL)
|
||||
break;
|
||||
if (ret == ARCHIVE_RETRY)
|
||||
continue;
|
||||
while ((r = archive_read_data(a, data_buffer.data(),
|
||||
data_buffer.size())) > 0)
|
||||
;
|
||||
if (r == ARCHIVE_FATAL)
|
||||
break;
|
||||
}
|
||||
|
||||
archive_read_free(a);
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
# build the project
|
||||
./build/autogen.sh
|
||||
./configure
|
||||
make -j$(nproc) all
|
||||
|
||||
# build seed
|
||||
cp $SRC/libarchive/contrib/oss-fuzz/corpus.zip\
|
||||
$OUT/libarchive_fuzzer_seed_corpus.zip
|
||||
|
||||
# build fuzzer(s)
|
||||
$CXX $CXXFLAGS -Ilibarchive \
|
||||
$SRC/libarchive/contrib/oss-fuzz/libarchive_fuzzer.cc \
|
||||
-o $OUT/libarchive_fuzzer $LIB_FUZZING_ENGINE \
|
||||
.libs/libarchive.a -Wl,-Bstatic -lbz2 -llzo2 \
|
||||
-lxml2 -llzma -lz -lcrypto -llz4 -licuuc \
|
||||
-licudata -Wl,-Bdynamic
|
|
@ -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
|
||||
|
|
|
@ -170,7 +170,7 @@ out:
|
|||
}
|
||||
|
||||
/*
|
||||
* Write singe path to the archive. The path can be a regular file, directory
|
||||
* Write single path to the archive. The path can be a regular file, directory
|
||||
* or device. Symbolic links are followed.
|
||||
*/
|
||||
static int
|
||||
|
|
|
@ -36,6 +36,18 @@
|
|||
/* This is for mkdir(); this may need to be changed for some platforms. */
|
||||
#include <sys/stat.h> /* For mkdir() */
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
#define NUM_FORMAT "zu"
|
||||
#include <direct.h>
|
||||
#elif defined(__linux__) || defined(linux) || defined(__linux)
|
||||
#define NUM_FORMAT "d"
|
||||
#else
|
||||
#define NUM_FORMAT "lu"
|
||||
#endif /* defined(_WIN32) && !defined(__CYGWIN__) */
|
||||
|
||||
#define TO_STRING(x) #x
|
||||
#define STR(x) TO_STRING(x)
|
||||
|
||||
/* Parse an octal number, ignoring leading and trailing nonsense. */
|
||||
static int
|
||||
parseoct(const char *p, size_t n)
|
||||
|
@ -78,7 +90,11 @@ create_dir(char *pathname, int mode)
|
|||
pathname[strlen(pathname) - 1] = '\0';
|
||||
|
||||
/* Try creating the directory. */
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
r = _mkdir(pathname);
|
||||
#else
|
||||
r = mkdir(pathname, mode);
|
||||
#endif
|
||||
|
||||
if (r != 0) {
|
||||
/* On failure, try creating parent directory. */
|
||||
|
@ -87,7 +103,11 @@ create_dir(char *pathname, int mode)
|
|||
*p = '\0';
|
||||
create_dir(pathname, 0755);
|
||||
*p = '/';
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
r = _mkdir(pathname);
|
||||
#else
|
||||
r = mkdir(pathname, mode);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (r != 0)
|
||||
|
@ -133,18 +153,19 @@ verify_checksum(const char *p)
|
|||
static void
|
||||
untar(FILE *a, const char *path)
|
||||
{
|
||||
char buff[512];
|
||||
enum { BUF_SIZE=512 };
|
||||
char buff[BUF_SIZE];
|
||||
FILE *f = NULL;
|
||||
size_t bytes_read;
|
||||
int filesize;
|
||||
off_t filesize;
|
||||
|
||||
printf("Extracting from %s\n", path);
|
||||
for (;;) {
|
||||
bytes_read = fread(buff, 1, 512, a);
|
||||
if (bytes_read < 512) {
|
||||
bytes_read = fread(buff, 1, BUF_SIZE, a);
|
||||
if (bytes_read < BUF_SIZE) {
|
||||
fprintf(stderr,
|
||||
"Short read on %s: expected 512, got %d\n",
|
||||
path, (int)bytes_read);
|
||||
"Short read on %s: expected " STR(BUF_SIZE) ", got %"NUM_FORMAT"\n",
|
||||
path, bytes_read);
|
||||
return;
|
||||
}
|
||||
if (is_end_of_archive(buff)) {
|
||||
|
@ -157,51 +178,51 @@ untar(FILE *a, const char *path)
|
|||
}
|
||||
filesize = parseoct(buff + 124, 12);
|
||||
switch (buff[156]) {
|
||||
case '1':
|
||||
printf(" Ignoring hardlink %s\n", buff);
|
||||
break;
|
||||
case '2':
|
||||
printf(" Ignoring symlink %s\n", buff);
|
||||
break;
|
||||
case '3':
|
||||
printf(" Ignoring character device %s\n", buff);
|
||||
case '1':
|
||||
printf(" Ignoring hardlink %s\n", buff);
|
||||
break;
|
||||
case '2':
|
||||
printf(" Ignoring symlink %s\n", buff);
|
||||
break;
|
||||
case '3':
|
||||
printf(" Ignoring character device %s\n", buff);
|
||||
break;
|
||||
case '4':
|
||||
printf(" Ignoring block device %s\n", buff);
|
||||
break;
|
||||
case '5':
|
||||
printf(" Extracting dir %s\n", buff);
|
||||
create_dir(buff, parseoct(buff + 100, 8));
|
||||
filesize = 0;
|
||||
break;
|
||||
case '6':
|
||||
printf(" Ignoring FIFO %s\n", buff);
|
||||
break;
|
||||
default:
|
||||
printf(" Extracting file %s\n", buff);
|
||||
f = create_file(buff, parseoct(buff + 100, 8));
|
||||
break;
|
||||
case '4':
|
||||
printf(" Ignoring block device %s\n", buff);
|
||||
break;
|
||||
case '5':
|
||||
printf(" Extracting dir %s\n", buff);
|
||||
create_dir(buff, parseoct(buff + 100, 8));
|
||||
filesize = 0;
|
||||
break;
|
||||
case '6':
|
||||
printf(" Ignoring FIFO %s\n", buff);
|
||||
break;
|
||||
default:
|
||||
printf(" Extracting file %s\n", buff);
|
||||
f = create_file(buff, parseoct(buff + 100, 8));
|
||||
break;
|
||||
}
|
||||
while (filesize > 0) {
|
||||
bytes_read = fread(buff, 1, 512, a);
|
||||
if (bytes_read < 512) {
|
||||
bytes_read = fread(buff, 1, BUF_SIZE, a);
|
||||
if (bytes_read < BUF_SIZE) {
|
||||
fprintf(stderr,
|
||||
"Short read on %s: Expected 512, got %d\n",
|
||||
path, (int)bytes_read);
|
||||
"Short read on %s: Expected " STR(BUF_SIZE) ", got %"NUM_FORMAT"\n",
|
||||
path, bytes_read);
|
||||
return;
|
||||
}
|
||||
if (filesize < 512)
|
||||
if (filesize < BUF_SIZE)
|
||||
bytes_read = filesize;
|
||||
if (f != NULL) {
|
||||
if (fwrite(buff, 1, bytes_read, f)
|
||||
!= bytes_read)
|
||||
!= bytes_read)
|
||||
{
|
||||
fprintf(stderr, "Failed write\n");
|
||||
fclose(f);
|
||||
f = NULL;
|
||||
}
|
||||
}
|
||||
filesize -= bytes_read;
|
||||
filesize -= (off_t)bytes_read;
|
||||
}
|
||||
if (f != NULL) {
|
||||
fclose(f);
|
||||
|
|
|
@ -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.
|
||||
|
@ -83,6 +82,13 @@ all operating modes.
|
|||
.It Fl 0 , Fl Fl null
|
||||
Read filenames separated by NUL characters instead of newlines.
|
||||
This is necessary if any of the filenames being read might contain newlines.
|
||||
.It Fl 6 , Fl Fl pwb
|
||||
When reading a binary format archive, assume it's the earlier one,
|
||||
from the PWB variant of 6th Edition UNIX.
|
||||
When writing a cpio archive, use the PWB format.
|
||||
.It Fl 7 , Fl Fl binary
|
||||
(o mode only)
|
||||
When writing a cpio archive, use the (newer, non-PWB) binary format.
|
||||
.It Fl A
|
||||
(o mode only)
|
||||
Append to the specified archive.
|
||||
|
@ -385,10 +391,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 ,
|
||||
|
|
|
@ -51,7 +51,7 @@ __FBSDID("$FreeBSD: src/usr.bin/cpio/cmdline.c,v 1.5 2008/12/06 07:30:40 kientzl
|
|||
/*
|
||||
* Short options for cpio. Please keep this sorted.
|
||||
*/
|
||||
static const char *short_options = "0AaBC:cdE:F:f:H:hI:iJjLlmnO:opR:rtuVvW:yZz";
|
||||
static const char *short_options = "067AaBC:cdE:F:f:H:hI:iJjLlmnO:opR:rtuVvW:yZz";
|
||||
|
||||
/*
|
||||
* Long options for cpio. Please keep this sorted.
|
||||
|
@ -62,6 +62,7 @@ static const struct option {
|
|||
int equivalent; /* Equivalent short option. */
|
||||
} cpio_longopts[] = {
|
||||
{ "b64encode", 0, OPTION_B64ENCODE },
|
||||
{ "binary", 0, '7' },
|
||||
{ "create", 0, 'o' },
|
||||
{ "dereference", 0, 'L' },
|
||||
{ "dot", 0, 'V' },
|
||||
|
@ -86,6 +87,7 @@ static const struct option {
|
|||
{ "pass-through", 0, 'p' },
|
||||
{ "preserve-modification-time", 0, 'm' },
|
||||
{ "preserve-owner", 0, OPTION_PRESERVE_OWNER },
|
||||
{ "pwb", 0, '6' },
|
||||
{ "quiet", 0, OPTION_QUIET },
|
||||
{ "unconditional", 0, 'u' },
|
||||
{ "uuencode", 0, OPTION_UUENCODE },
|
||||
|
|
|
@ -192,6 +192,12 @@ main(int argc, char *argv[])
|
|||
case '0': /* GNU convention: --null, -0 */
|
||||
cpio->option_null = 1;
|
||||
break;
|
||||
case '6': /* in/out: assume/create 6th edition (PWB) format */
|
||||
cpio->option_pwb = 1;
|
||||
break;
|
||||
case '7': /* out: create archive using 7th Edition binary format */
|
||||
cpio->format = "bin";
|
||||
break;
|
||||
case 'A': /* NetBSD/OpenBSD */
|
||||
cpio->option_append = 1;
|
||||
break;
|
||||
|
@ -400,11 +406,12 @@ main(int argc, char *argv[])
|
|||
|
||||
switch (cpio->mode) {
|
||||
case 'o':
|
||||
/* TODO: Implement old binary format in libarchive,
|
||||
use that here. */
|
||||
if (cpio->format == NULL)
|
||||
cpio->format = "odc"; /* Default format */
|
||||
|
||||
if (cpio->format == NULL) {
|
||||
if (cpio->option_pwb)
|
||||
cpio->format = "pwb";
|
||||
else
|
||||
cpio->format = "cpio";
|
||||
}
|
||||
mode_out(cpio);
|
||||
break;
|
||||
case 'i':
|
||||
|
@ -435,6 +442,8 @@ main(int argc, char *argv[])
|
|||
archive_match_free(cpio->matching);
|
||||
free_cache(cpio->gname_cache);
|
||||
free_cache(cpio->uname_cache);
|
||||
archive_read_close(cpio->archive_read_disk);
|
||||
archive_read_free(cpio->archive_read_disk);
|
||||
free(cpio->destdir);
|
||||
passphrase_free(cpio->ppbuff);
|
||||
return (cpio->return_value);
|
||||
|
@ -462,7 +471,7 @@ static const char *long_help_msg =
|
|||
" -v Verbose filenames -V one dot per file\n"
|
||||
"Create: %p -o [options] < [list of files] > [archive]\n"
|
||||
" -J,-y,-z,--lzma Compress archive with xz/bzip2/gzip/lzma\n"
|
||||
" --format {odc|newc|ustar} Select archive format\n"
|
||||
" --format {pwb|bin|odc|newc|ustar} Select archive format\n"
|
||||
"List: %p -it < [archive]\n"
|
||||
"Extract: %p -i [options] < [archive]\n";
|
||||
|
||||
|
@ -737,7 +746,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;
|
||||
|
@ -970,6 +979,8 @@ mode_in(struct cpio *cpio)
|
|||
lafe_errc(1, 0, "Couldn't allocate archive object");
|
||||
archive_read_support_filter_all(a);
|
||||
archive_read_support_format_all(a);
|
||||
if (cpio->option_pwb)
|
||||
archive_read_set_options(a, "pwb");
|
||||
if (cpio->passphrase != NULL)
|
||||
r = archive_read_add_passphrase(a, cpio->passphrase);
|
||||
else
|
||||
|
@ -1080,6 +1091,8 @@ mode_list(struct cpio *cpio)
|
|||
lafe_errc(1, 0, "Couldn't allocate archive object");
|
||||
archive_read_support_filter_all(a);
|
||||
archive_read_support_format_all(a);
|
||||
if (cpio->option_pwb)
|
||||
archive_read_set_options(a, "pwb");
|
||||
if (cpio->passphrase != NULL)
|
||||
r = archive_read_add_passphrase(a, cpio->passphrase);
|
||||
else
|
||||
|
@ -1133,12 +1146,16 @@ list_item_verbose(struct cpio *cpio, struct archive_entry *entry)
|
|||
{
|
||||
char size[32];
|
||||
char date[32];
|
||||
char uids[16], gids[16];
|
||||
char uids[22], gids[22];
|
||||
const char *uname, *gname;
|
||||
FILE *out = stdout;
|
||||
const char *fmt;
|
||||
time_t mtime;
|
||||
static time_t now;
|
||||
struct tm *ltime;
|
||||
#if defined(HAVE_LOCALTIME_R) || defined(HAVE_LOCALTIME_S)
|
||||
struct tm tmbuf;
|
||||
#endif
|
||||
|
||||
if (!now)
|
||||
time(&now);
|
||||
|
@ -1186,7 +1203,17 @@ 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_S)
|
||||
ltime = localtime_s(&tmbuf, &mtime) ? NULL : &tmbuf;
|
||||
#elif defined(HAVE_LOCALTIME_R)
|
||||
ltime = localtime_r(&mtime, &tmbuf);
|
||||
#else
|
||||
ltime = localtime(&mtime);
|
||||
#endif
|
||||
if (ltime != NULL)
|
||||
strftime(date, sizeof(date), fmt, ltime);
|
||||
else
|
||||
strcpy(date, "invalid mtime");
|
||||
|
||||
fprintf(out, "%s%3d %-8s %-8s %8s %12s %s",
|
||||
archive_entry_strmode(entry),
|
||||
|
@ -1208,15 +1235,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)
|
||||
|
|
|
@ -62,8 +62,10 @@ struct cpio {
|
|||
int option_list; /* -t */
|
||||
char option_null; /* --null */
|
||||
int option_numeric_uid_gid; /* -n */
|
||||
int option_pwb; /* -6 */
|
||||
int option_rename; /* -r */
|
||||
char *destdir;
|
||||
size_t destdir_len;
|
||||
size_t pass_destpath_alloc;
|
||||
char *pass_destpath;
|
||||
int uid_override;
|
||||
|
|
|
@ -156,7 +156,11 @@ cpio_CreateFile(const char *path, DWORD dwDesiredAccess, DWORD dwShareMode,
|
|||
{
|
||||
wchar_t *wpath;
|
||||
HANDLE handle;
|
||||
# if _WIN32_WINNT >= 0x0602 /* _WIN32_WINNT_WIN8 */
|
||||
CREATEFILE2_EXTENDED_PARAMETERS createExParams;
|
||||
#endif
|
||||
|
||||
#if !defined(WINAPI_FAMILY_PARTITION) || WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
|
||||
handle = CreateFileA(path, dwDesiredAccess, dwShareMode,
|
||||
lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes,
|
||||
hTemplateFile);
|
||||
|
@ -164,12 +168,25 @@ cpio_CreateFile(const char *path, DWORD dwDesiredAccess, DWORD dwShareMode,
|
|||
return (handle);
|
||||
if (GetLastError() != ERROR_PATH_NOT_FOUND)
|
||||
return (handle);
|
||||
#endif
|
||||
wpath = permissive_name(path);
|
||||
if (wpath == NULL)
|
||||
return (handle);
|
||||
return INVALID_HANDLE_VALUE;
|
||||
# if _WIN32_WINNT >= 0x0602 /* _WIN32_WINNT_WIN8 */
|
||||
ZeroMemory(&createExParams, sizeof(createExParams));
|
||||
createExParams.dwSize = sizeof(createExParams);
|
||||
createExParams.dwFileAttributes = dwFlagsAndAttributes & 0xFFFF;
|
||||
createExParams.dwFileFlags = dwFlagsAndAttributes & 0xFFF00000;
|
||||
createExParams.dwSecurityQosFlags = dwFlagsAndAttributes & 0x000F0000;
|
||||
createExParams.lpSecurityAttributes = lpSecurityAttributes;
|
||||
createExParams.hTemplateFile = hTemplateFile;
|
||||
handle = CreateFile2(wpath, dwDesiredAccess, dwShareMode,
|
||||
dwCreationDisposition, &createExParams);
|
||||
#else
|
||||
handle = CreateFileW(wpath, dwDesiredAccess, dwShareMode,
|
||||
lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes,
|
||||
hTemplateFile);
|
||||
#endif
|
||||
free(wpath);
|
||||
return (handle);
|
||||
}
|
||||
|
|
|
@ -13,17 +13,17 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
|
|||
test_0.c
|
||||
test_basic.c
|
||||
test_cmdline.c
|
||||
test_extract_cpio_Z
|
||||
test_extract_cpio_bz2
|
||||
test_extract_cpio_grz
|
||||
test_extract_cpio_gz
|
||||
test_extract_cpio_lrz
|
||||
test_extract_cpio_lz
|
||||
test_extract_cpio_lz4
|
||||
test_extract_cpio_lzma
|
||||
test_extract_cpio_lzo
|
||||
test_extract_cpio_xz
|
||||
test_extract_cpio_zstd
|
||||
test_extract_cpio_Z.c
|
||||
test_extract_cpio_bz2.c
|
||||
test_extract_cpio_grz.c
|
||||
test_extract_cpio_gz.c
|
||||
test_extract_cpio_lrz.c
|
||||
test_extract_cpio_lz.c
|
||||
test_extract_cpio_lz4.c
|
||||
test_extract_cpio_lzma.c
|
||||
test_extract_cpio_lzo.c
|
||||
test_extract_cpio_xz.c
|
||||
test_extract_cpio_zstd.c
|
||||
test_format_newc.c
|
||||
test_gcpio_compat.c
|
||||
test_missing_file.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 */
|
||||
|
@ -230,6 +230,8 @@ DEFINE_TEST(test_basic)
|
|||
basic_cpio("copy_odc", "--format=odc", "", msg, msg);
|
||||
basic_cpio("copy_newc", "-H newc", "", result, "2 blocks\n");
|
||||
basic_cpio("copy_cpio", "-H odc", "", msg, msg);
|
||||
msg = "1 block\n";
|
||||
basic_cpio("copy_bin", "-H bin", "", msg, msg);
|
||||
msg = canSymlink() ? "9 blocks\n" : "8 blocks\n";
|
||||
basic_cpio("copy_ustar", "-H ustar", "", msg, msg);
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -43,6 +43,7 @@ DEFINE_TEST(test_option_J_upper)
|
|||
if (strstr(p, "compression not available") != NULL) {
|
||||
skipping("This version of bsdcpio was compiled "
|
||||
"without xz support");
|
||||
free(p);
|
||||
return;
|
||||
}
|
||||
failure("-J option is broken");
|
||||
|
|
|
@ -37,10 +37,10 @@ is_octal(const char *p, size_t l)
|
|||
return (1);
|
||||
}
|
||||
|
||||
static int
|
||||
static long long int
|
||||
from_octal(const char *p, size_t l)
|
||||
{
|
||||
int r = 0;
|
||||
long long int r = 0;
|
||||
|
||||
while (l > 0) {
|
||||
r *= 8;
|
||||
|
@ -161,7 +161,7 @@ DEFINE_TEST(test_option_c)
|
|||
assertEqualInt(from_octal(e + 24, 6), uid); /* uid */
|
||||
assertEqualInt(gid, from_octal(e + 30, 6)); /* gid */
|
||||
assertEqualMem(e + 36, "000001", 6); /* nlink */
|
||||
failure("file entries should have rdev == 0 (dev was 0%o)",
|
||||
failure("file entries should have rdev == 0 (dev was 0%llo)",
|
||||
from_octal(e + 6, 6));
|
||||
assertEqualMem(e + 42, "000000", 6); /* rdev */
|
||||
t = from_octal(e + 48, 11); /* mtime */
|
||||
|
|
|
@ -36,6 +36,10 @@ DEFINE_TEST(test_option_t)
|
|||
time_t mtime;
|
||||
char date[32];
|
||||
char date2[32];
|
||||
struct tm *tmptr;
|
||||
#if defined(HAVE_LOCALTIME_R) || defined(HAVE_LOCALTIME_S)
|
||||
struct tm tmbuf;
|
||||
#endif
|
||||
|
||||
/* List reference archive, make sure the TOC is correct. */
|
||||
extract_reference_file("test_option_t.cpio");
|
||||
|
@ -87,11 +91,18 @@ DEFINE_TEST(test_option_t)
|
|||
#ifdef HAVE_LOCALE_H
|
||||
setlocale(LC_ALL, "");
|
||||
#endif
|
||||
#if defined(HAVE_LOCALTIME_S)
|
||||
tmptr = localtime_s(&tmbuf, &mtime) ? NULL : &tmbuf;
|
||||
#elif defined(HAVE_LOCALTIME_R)
|
||||
tmptr = localtime_r(&mtime, &tmbuf);
|
||||
#else
|
||||
tmptr = localtime(&mtime);
|
||||
#endif
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
strftime(date2, sizeof(date2)-1, "%b %d %Y", localtime(&mtime));
|
||||
strftime(date2, sizeof(date2)-1, "%b %d %Y", tmptr);
|
||||
_snprintf(date, sizeof(date)-1, "%12.12s file", date2);
|
||||
#else
|
||||
strftime(date2, sizeof(date2)-1, "%b %e %Y", localtime(&mtime));
|
||||
strftime(date2, sizeof(date2)-1, "%b %e %Y", tmptr);
|
||||
snprintf(date, sizeof(date)-1, "%12.12s file", date2);
|
||||
#endif
|
||||
assertEqualMem(p + 42, date, strlen(date));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:14 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:18 2023 -->
|
||||
<!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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:14 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:18 2023 -->
|
||||
<!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>
|
||||
|
||||
|
@ -138,7 +128,7 @@ 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
|
||||
(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
|
||||
|
@ -147,8 +137,8 @@ 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,7 +426,7 @@ 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.
|
||||
|
@ -448,21 +438,18 @@ 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>()
|
||||
|
@ -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>()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:15 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:18 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:15 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:18 2023 -->
|
||||
<!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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:15 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:18 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:15 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:18 2023 -->
|
||||
<!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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:15 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:15 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:15 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:15 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:15 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -26,6 +26,8 @@ ARCHIVE_READ_DISK(3)</p>
|
|||
<p style="margin-top: 1em"><b>NAME</b></p>
|
||||
|
||||
<p style="margin-left:6%;"><b>archive_read_disk_new</b>,
|
||||
<b>archive_read_disk_open</b>,
|
||||
<b>archive_read_disk_open_w</b>,
|
||||
<b>archive_read_disk_set_behavior</b>,
|
||||
<b>archive_read_disk_set_symlink_logical</b>,
|
||||
<b>archive_read_disk_set_symlink_physical</b>,
|
||||
|
@ -35,8 +37,15 @@ ARCHIVE_READ_DISK(3)</p>
|
|||
<b>archive_read_disk_uname</b>,
|
||||
<b>archive_read_disk_set_uname_lookup</b>,
|
||||
<b>archive_read_disk_set_gname_lookup</b>,
|
||||
<b>archive_read_disk_set_standard_lookup</b> —
|
||||
functions for reading objects from disk</p>
|
||||
<b>archive_read_disk_set_standard_lookup</b>,
|
||||
<b>archive_read_disk_descend</b>,
|
||||
<b>archive_read_disk_can_descend</b>,
|
||||
<b>archive_read_disk_current_filesystem</b>,
|
||||
<b>archive_read_disk_current_filesystem_is_synthetic</b>,
|
||||
<b>archive_read_disk_current_filesystem_is_remote</b>,
|
||||
<b>archive_read_disk_set_matching</b>,
|
||||
<b>archive_read_disk_set_metadata_filter_callback</b>,
|
||||
— functions for reading objects from disk</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
||||
|
||||
|
@ -57,6 +66,18 @@ archive *</i></p>
|
|||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_disk_open</b>(<i>struct archive *</i>,
|
||||
<i>const char *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_disk_open_w</b>(<i>struct archive *</i>,
|
||||
<i>const wchar_t *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_disk_set_behavior</b>(<i>struct archive *</i>,
|
||||
<i>int</i>);</p>
|
||||
|
||||
|
@ -117,6 +138,46 @@ archive *</i></p>
|
|||
<i>struct archive_entry *</i>, <i>int fd</i>,
|
||||
<i>const struct stat *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_disk_descend</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_disk_can_descend</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem_is_synthetic</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem_is_remote</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p><b>archive_read_disk_set_matching</b>(<i>struct archive *</i>,
|
||||
<i>struct archive *</i>,
|
||||
<i>void (*excluded_func)(struct archive *, void *, struct archive entry *)</i>,
|
||||
<i>void *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p><b>archive_read_disk_set_metadata_filter_callback</b>(<i>struct archive *</i>,
|
||||
<i>int (*metadata_filter_func)(struct archive *, void*, struct archive_entry *)</i>,
|
||||
<i>void *</i>);</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
||||
|
||||
<p style="margin-left:6%;">These functions provide an API
|
||||
|
@ -132,6 +193,20 @@ struct archive object suitable for reading object
|
|||
information from disk.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_open</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Opens the file or directory
|
||||
from the given path and prepares the struct archive to read
|
||||
it from disk.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_open_w</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Opens the file or directory
|
||||
from the given path as a wide character string and prepares
|
||||
the struct archive to read it from disk.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_set_behavior</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Configures various behavior
|
||||
|
@ -143,7 +218,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 +241,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>
|
||||
|
||||
|
@ -182,6 +257,12 @@ extended file attributes.</p>
|
|||
traversed files. By default, access time of traversed files
|
||||
is not restored.</p>
|
||||
|
||||
<p><b>ARCHIVE_READDISK_NO_SPARSE</b></p>
|
||||
|
||||
<p style="margin-left:27%;">Do not read sparse file
|
||||
information. By default, sparse file information is read
|
||||
from disk.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_set_symlink_logical</b>(),
|
||||
<b>archive_read_disk_set_symlink_physical</b>(),
|
||||
|
@ -251,15 +332,74 @@ 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>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_descend</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">If the current entry can be
|
||||
descended, this function will mark the directory as the next
|
||||
entry for archive_read_header(3) to visit.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_can_descend</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Returns 1 if the current entry
|
||||
is an unvisited directory and 0 otherwise.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Returns the index of the most
|
||||
recent filesystem entry that has been visited through
|
||||
archive_read_disk</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem_is_synthetic</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Returns 1 if the current
|
||||
filesystem is a virtual filesystem. Returns 0 if the current
|
||||
filesystem is not a virtual filesystem. Returns -1 if it is
|
||||
unknown.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem_is_remote</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Returns 1 if the current
|
||||
filesystem is a remote filesystem. Returns 0 if the current
|
||||
filesystem is not a remote filesystem. Returns -1 if it is
|
||||
unknown.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_set_matching</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Allows the caller to set struct
|
||||
archive *_ma to compare each entry during
|
||||
archive_read_header(3) calls. If matched based on calls to
|
||||
archive_match_path_excluded, archive_match_time_excluded, or
|
||||
archive_match_owner_excluded, then the callback function
|
||||
specified by the _excluded_func parameter will execute. This
|
||||
function will recieve data provided to the fourth parameter,
|
||||
void *_client_data.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_read_disk_set_metadata_filter_callback</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Allows the caller to set a
|
||||
callback function during calls to archive_read_header(3) to
|
||||
filter out metadata for each entry. The callback function
|
||||
recieves the struct archive object, void* custom filter
|
||||
data, and the struct archive_entry. If the callback function
|
||||
returns an error, ARCHIVE_RETRY will be returned and the
|
||||
entry will not be further processed.</p>
|
||||
|
||||
<p style="margin-left:6%;">More information about the
|
||||
<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 +466,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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -59,6 +59,12 @@ functions for reading streaming archives</p>
|
|||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_support_filter_by_code</b>(<i>struct archive *</i>,
|
||||
<i>int</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_read_support_filter_bzip2</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
@ -163,6 +169,15 @@ than decompression through built-in libraries. Note that
|
|||
<p style="margin-left:17%;">Enables all available
|
||||
decompression filters.</p>
|
||||
|
||||
<p><b>archive_read_support_filter_by_code</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Enables a single filter
|
||||
specified by the filter code. This function does not work
|
||||
with <b>ARCHIVE_FILTER_PROGRAM</b>. Note: In
|
||||
statically-linked executables, this will cause your program
|
||||
to include support for every filter. If executable size is a
|
||||
concern, you may wish to avoid using this function.</p>
|
||||
|
||||
<p><b>archive_read_support_filter_program</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Data is fed through the
|
||||
|
@ -197,12 +212,12 @@ 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>
|
||||
<p style="margin-left:6%; margin-top: 1em">BSD June 9,
|
||||
2020 BSD</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -200,9 +200,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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:19 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -157,7 +157,35 @@ 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>
|
||||
compat-2x</b></p>
|
||||
|
||||
<p style="margin-left:27%;">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 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 file
|
||||
names.</p>
|
||||
|
||||
<p><b>pwb</b></p>
|
||||
|
||||
<p style="margin-left:27%; margin-top: 1em">When reading a
|
||||
binary CPIO archive, assume that it is in the original PWB
|
||||
cpio format, and handle file mode bits accordingly. The
|
||||
default is to assume v7 format.</p>
|
||||
|
||||
<p>Format iso9660 <b><br>
|
||||
joliet</b></p>
|
||||
|
||||
<p style="margin-left:27%; margin-top: 1em">Support Joliet
|
||||
|
@ -169,6 +197,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 +229,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>
|
||||
|
||||
|
@ -199,6 +248,33 @@ concatenated together. Without this option, only the
|
|||
contents of the first concatenated archive would be
|
||||
read.</p>
|
||||
|
||||
<p>Format zip <b><br>
|
||||
compat-2x</b></p>
|
||||
|
||||
<p style="margin-left:27%;">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 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 file
|
||||
names.</p>
|
||||
|
||||
<p><b>ignorecrc32</b></p>
|
||||
|
||||
<p style="margin-left:27%;">Skip the CRC32 check. Mostly
|
||||
used for testing.</p>
|
||||
|
||||
<p><b>mac-ext</b></p>
|
||||
|
||||
<p style="margin-left:27%;">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 platforms. Use <b>!mac-ext</b> to
|
||||
disable.</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
||||
|
||||
<p style="margin-left:6%;">Detailed error codes and textual
|
||||
|
@ -207,11 +283,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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:16 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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
|
||||
|
@ -190,17 +198,17 @@ whose final location would be altered by a symlink on disk.
|
|||
This is intended to help guard against a variety of mischief
|
||||
caused by archives that (deliberately or otherwise) extract
|
||||
files outside of the current directory. The default is not
|
||||
to perform this check. If</p>
|
||||
to perform this check. If <b>ARCHIVE_EXTRACT_UNLINK</b> 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.</p>
|
||||
|
||||
<p><b>ARCHIVE_EXTRACT_SPARSE</b></p>
|
||||
|
||||
<p style="margin-left:27%;">Scan data for blocks of NUL
|
||||
bytes and try to recreate them with holes. This results in
|
||||
sparse files, independent of whether the archive format
|
||||
supports or uses them. <b>ARCHIVE_EXTRACT_UNLINK</b> 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.</p>
|
||||
supports or uses them.</p>
|
||||
|
||||
<p><b>ARCHIVE_EXTRACT_TIME</b></p>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -362,7 +370,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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -33,7 +33,10 @@ ARCHIVE_WRITE_FORMAT(3)</p>
|
|||
<b>archive_write_set_format_ar_svr4</b>,
|
||||
<b>archive_write_set_format_by_name</b>,
|
||||
<b>archive_write_set_format_cpio</b>,
|
||||
<b>archive_write_set_format_cpio_bin</b>,
|
||||
<b>archive_write_set_format_cpio_newc</b>,
|
||||
<b>archive_write_set_format_cpio_odc</b>,
|
||||
<b>archive_write_set_format_cpio_pwb</b>,
|
||||
<b>archive_write_set_format_filter_by_ext</b>,
|
||||
<b>archive_write_set_format_filter_by_ext_def</b>,
|
||||
<b>archive_write_set_format_gnutar</b>,
|
||||
|
@ -50,7 +53,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>
|
||||
|
@ -103,11 +106,26 @@ creating archives</p>
|
|||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_write_set_format_cpio_bin</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_write_set_format_cpio_newc</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_write_set_format_cpio_odc</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_write_set_format_cpio_pwb</b>(<i>struct archive *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_write_set_format_filter_by_ext</b>(<i>struct archive *</i>,
|
||||
<i>const char *filename</i>);</p>
|
||||
|
||||
|
@ -207,7 +225,7 @@ archive with the same format as an existing archive.</p>
|
|||
based on the common name.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_write_set_format_filter_by_ext</b>(),
|
||||
<p style="margin-top: 1em"><b>archive_write_set_format_filter_by_ext</b>()
|
||||
<b>archive_write_set_format_filter_by_ext_def</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Sets both filters and format
|
||||
|
@ -217,10 +235,13 @@ based on the output filename. Supported extensions: .7z,
|
|||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_write_set_format_7zip</b>()
|
||||
<b>archive_write_set_format_ar_bsd</b>(),
|
||||
<b>archive_write_set_format_ar_svr4</b>(),
|
||||
<b>archive_write_set_format_ar_bsd</b>()
|
||||
<b>archive_write_set_format_ar_svr4</b>()
|
||||
<b>archive_write_set_format_cpio</b>()
|
||||
<b>archive_write_set_format_cpio_bin</b>()
|
||||
<b>archive_write_set_format_cpio_newc</b>()
|
||||
<b>archive_write_set_format_cpio_odc</b>()
|
||||
<b>archive_write_set_format_cpio_pwb</b>()
|
||||
<b>archive_write_set_format_gnutar</b>()
|
||||
<b>archive_write_set_format_iso9660</b>()
|
||||
<b>archive_write_set_format_mtree</b>()
|
||||
|
@ -253,8 +274,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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:20 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:21 2023 -->
|
||||
<!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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:21 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -26,7 +26,7 @@ ARCHIVE_WRITE_OPEN(3)</p>
|
|||
<p style="margin-top: 1em"><b>NAME</b></p>
|
||||
|
||||
<p style="margin-left:6%;"><b>archive_write_open</b>,
|
||||
<b>archive_write_open_fd</b>,
|
||||
<b>archive_write_open2</b>, <b>archive_write_open_fd</b>,
|
||||
<b>archive_write_open_FILE</b>,
|
||||
<b>archive_write_open_filename</b>,
|
||||
<b>archive_write_open_memory</b> — functions for
|
||||
|
@ -54,6 +54,16 @@ creating archives</p>
|
|||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p><b>archive_write_open2</b>(<i>struct archive *</i>,
|
||||
<i>void *client_data</i>,
|
||||
<i>archive_open_callback *</i>,
|
||||
<i>archive_write_callback *</i>,
|
||||
<i>archive_close_callback *</i>,
|
||||
<i>archive_free_callback *</i>);</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
||||
|
||||
|
||||
<p style="margin-left:12%;"><b>archive_write_open_fd</b>(<i>struct archive *</i>,
|
||||
<i>int fd</i>);</p>
|
||||
|
||||
|
@ -87,6 +97,14 @@ compression layer to write the constructed archive. This
|
|||
does not alter the default archive padding.</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_write_open2</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">Same as
|
||||
<b>archive_write_open</b>() with an additional fourth free
|
||||
callback. This function should be preferred to
|
||||
<b>archive_write_open</b>().</p>
|
||||
|
||||
|
||||
<p style="margin-top: 1em"><b>archive_write_open_fd</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">A convenience form of
|
||||
|
@ -124,7 +142,7 @@ 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 invoking
|
||||
<b>archive_write_set_bytes_in_last_block</b>() before
|
||||
calling <b>archive_write_open</b>(). The
|
||||
calling <b>archive_write_open2</b>(). The
|
||||
<b>archive_write_open_filename</b>() function is safe for
|
||||
use with tape drives or other block-oriented devices.</p>
|
||||
|
||||
|
@ -132,7 +150,7 @@ use with tape drives or other block-oriented devices.</p>
|
|||
<p style="margin-top: 1em"><b>archive_write_open_memory</b>()</p>
|
||||
|
||||
<p style="margin-left:17%;">A convenience form of
|
||||
<b>archive_write_open</b>() that accepts a pointer to a
|
||||
<b>archive_write_open2</b>() that accepts a pointer to a
|
||||
block of memory that will receive the archive. The final
|
||||
<i>size_t *</i> argument points to a variable that will be
|
||||
updated after each write to reflect how much of the buffer
|
||||
|
@ -157,7 +175,7 @@ behavior.</p>
|
|||
need to define and register callback functions that will be
|
||||
invoked to write data to the resulting archive. These
|
||||
functions are registered by calling
|
||||
<b>archive_write_open</b>():</p>
|
||||
<b>archive_write_open2</b>():</p>
|
||||
|
||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
||||
int</i> <b>archive_open_callback</b>(<i>struct archive
|
||||
|
@ -168,7 +186,10 @@ callback is invoked by <b>archive_write_open</b>(). It
|
|||
should return <b>ARCHIVE_OK</b> if the underlying file or
|
||||
data source is successfully opened. If the open fails, it
|
||||
should call <b>archive_set_error</b>() to register an error
|
||||
code and message and return <b>ARCHIVE_FATAL</b>.</p>
|
||||
code and message and return <b>ARCHIVE_FATAL</b>. Please
|
||||
note that if open fails, close is not called and resources
|
||||
must be freed inside the open callback or with the free
|
||||
callback.</p>
|
||||
|
||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
||||
la_ssize_t</i></p>
|
||||
|
@ -196,10 +217,19 @@ int</i> <b>archive_close_callback</b>(<i>struct archive
|
|||
|
||||
<p style="margin-left:6%; margin-top: 1em">The close
|
||||
callback is invoked by archive_close when the archive
|
||||
processing is complete. The callback should return
|
||||
processing is complete. If the open callback fails, the
|
||||
close callback is not invoked. 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:14%; margin-top: 1em"><i>typedef
|
||||
int</i> <b>archive_free_callback</b>(<i>struct archive
|
||||
*</i>, <i>void *client_data</i>)</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">The free
|
||||
callback is always invoked on archive_free. The return code
|
||||
of this callback is not processed.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Note that if the
|
||||
client-provided write callback function returns a non-zero
|
||||
|
@ -226,14 +256,14 @@ 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
|
||||
February 2, 2012 BSD</p>
|
||||
November 12, 2020 BSD</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:18 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:21 2023 -->
|
||||
<!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>
|
||||
|
@ -153,46 +153,166 @@ 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 gzip compression level.</p>
|
||||
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.
|
||||
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><b>long</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%; margin-top: 1em">Enables long
|
||||
distance matching. The value is interpreted as a decimal
|
||||
integer specifying log2 window size in bytes. Values from 10
|
||||
to 30 for 32 bit, or 31 for 64 bit, are supported.</p>
|
||||
|
||||
<p><b>indent</b></p>
|
||||
<p><b>threads</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 number of threads for
|
||||
multi-threaded zstd compression. If set to 0, zstd will
|
||||
attempt to detect and use the number of physical CPU
|
||||
cores.</p>
|
||||
|
||||
<p>Format 7zip <b><br>
|
||||
compression</b></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>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. The interpretation of the
|
||||
compression level depends on the chosen compression
|
||||
method.</p>
|
||||
|
||||
<p>Format bin <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 +408,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 +445,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,6 +599,121 @@ 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 odc <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 pwb <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>
|
||||
|
||||
|
@ -488,6 +723,28 @@ 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 +759,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 +815,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 +832,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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:18 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:21 2023 -->
|
||||
<!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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:19 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:22 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -81,6 +81,18 @@ modes.</p>
|
|||
characters instead of newlines. This is necessary if any of
|
||||
the filenames being read might contain newlines.</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>-6</b>, <b>--pwb</b></p>
|
||||
|
||||
<p style="margin-left:17%;">When reading a binary format
|
||||
archive, assume it’s the earlier one, from the PWB
|
||||
variant of 6th Edition UNIX. When writing a cpio archive,
|
||||
use the PWB format.</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>-7</b>, <b>--binary</b></p>
|
||||
|
||||
<p style="margin-left:17%;">(o mode only) When writing a
|
||||
cpio archive, use the (newer, non-PWB) binary format.</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>-A</b></p>
|
||||
|
||||
<p style="margin-left:17%; margin-top: 1em">(o mode only)
|
||||
|
@ -458,8 +470,8 @@ 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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:19 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:22 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -246,9 +246,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>
|
||||
|
||||
|
@ -533,6 +534,18 @@ 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-read-sparse</b></p>
|
||||
|
||||
<p style="margin-left:17%;">(c, r, u modes only) Do not
|
||||
read sparse file information from disk. This is the reverse
|
||||
of <b>--read-sparse</b>.</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 +667,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 +738,33 @@ 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>zstd:threads</b></p>
|
||||
|
||||
<p style="margin-left:27%;">Specify the number of worker
|
||||
threads to use. Setting threads to a special value 0 makes
|
||||
zstd(1) use as many threads as there are CPU cores on the
|
||||
system.</p>
|
||||
|
||||
<p><b>zstd:frame-per-file</b></p>
|
||||
|
||||
<p style="margin-left:27%;">Start a new compression frame
|
||||
at the beginning of each file in the archive.</p>
|
||||
|
||||
<p><b>zstd:min-frame-size</b>=<i>N</i></p>
|
||||
|
||||
<p style="margin-left:27%;">In combination with
|
||||
<b>zstd:frame-per-file</b>, do not start a new compression
|
||||
frame unless the current frame is at least <i>N</i>
|
||||
bytes.</p>
|
||||
|
||||
<p><b>zstd:max-frame-size</b>=<i>N</i></p>
|
||||
|
||||
<p style="margin-left:27%;">Start a new compression frame
|
||||
as soon as the current frame exceeds <i>N</i> bytes.</p>
|
||||
|
||||
<p><b>lzop:compression-level</b></p>
|
||||
|
||||
|
@ -733,6 +776,13 @@ specifying the lzop compression level.</p>
|
|||
<p style="margin-left:27%;">A decimal integer from 0 to 9
|
||||
specifying the xz compression level.</p>
|
||||
|
||||
<p><b>xz:threads</b></p>
|
||||
|
||||
<p style="margin-left:27%;">Specify the number of worker
|
||||
threads to use. Setting threads to a special value 0 makes
|
||||
xz(1) use as many threads as there are CPU cores on the
|
||||
system.</p>
|
||||
|
||||
<p><b>mtree:</b><i>keyword</i></p>
|
||||
|
||||
<p style="margin-left:27%;">The mtree writer module allows
|
||||
|
@ -843,6 +893,12 @@ entries with the same name and, by convention, later entries
|
|||
overwrite earlier entries. This option is provided as a
|
||||
performance optimization.</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>--read-sparse</b></p>
|
||||
|
||||
<p style="margin-left:17%;">(c, r, u modes only) Read
|
||||
sparse file information from disk. This is the reverse of
|
||||
<b>--no-read-sparse</b> and the default behavior.</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>-S</b></p>
|
||||
|
||||
<p style="margin-left:17%; margin-top: 1em">(x mode only)
|
||||
|
@ -877,6 +933,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
|
||||
|
@ -1014,31 +1086,31 @@ variables affect the execution of <b>tar</b>:</p>
|
|||
|
||||
<p style="margin-top: 1em">TAR_READER_OPTIONS</p>
|
||||
|
||||
<p style="margin-left:21%;">The default options for format
|
||||
<p style="margin-left:17%;">The default options for format
|
||||
readers and compression readers. The <b>--options</b> option
|
||||
overrides this.</p>
|
||||
|
||||
<p style="margin-top: 1em">TAR_WRITER_OPTIONS</p>
|
||||
|
||||
<p style="margin-left:21%;">The default options for format
|
||||
<p style="margin-left:17%;">The default options for format
|
||||
writers and compression writers. The <b>--options</b> option
|
||||
overrides this.</p>
|
||||
|
||||
<p style="margin-top: 1em">LANG</p>
|
||||
|
||||
<p style="margin-left:21%; margin-top: 1em">The locale to
|
||||
<p style="margin-left:17%; margin-top: 1em">The locale to
|
||||
use. See environ(7) for more information.</p>
|
||||
|
||||
<p style="margin-top: 1em">TAPE</p>
|
||||
|
||||
<p style="margin-left:21%; margin-top: 1em">The default
|
||||
<p style="margin-left:17%; margin-top: 1em">The default
|
||||
device. The <b>-f</b> option overrides this. Please see the
|
||||
description of the <b>-f</b> option above for more
|
||||
details.</p>
|
||||
|
||||
<p style="margin-top: 1em">TZ</p>
|
||||
|
||||
<p style="margin-left:21%; margin-top: 1em">The timezone to
|
||||
<p style="margin-left:17%; margin-top: 1em">The timezone to
|
||||
use when displaying dates. See environ(7) for more
|
||||
information.</p>
|
||||
|
||||
|
@ -1078,14 +1150,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
|
||||
|
@ -1349,8 +1420,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
|
||||
December 1, 2022 BSD</p>
|
||||
<hr>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:18 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:21 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -50,65 +50,43 @@ pathname “TRAILER!!!”.</p>
|
|||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>PWB
|
||||
format</b> <br>
|
||||
XXX Any documentation of the original PWB/UNIX 1.0 format?
|
||||
XXX</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>Old Binary
|
||||
Format</b> <br>
|
||||
The old binary <b>cpio</b> format stores numbers as 2-byte
|
||||
and 4-byte binary values. Each entry begins with a header in
|
||||
the following format:</p>
|
||||
The PWB binary <b>cpio</b> format is the original format,
|
||||
when cpio was introduced as part of the Programmer’s
|
||||
Work Bench system, a variant of 6th Edition UNIX. It stores
|
||||
numbers as 2-byte and 4-byte binary values. Each entry
|
||||
begins with a header in the following format:</p>
|
||||
|
||||
<p style="margin-left:14%; margin-top: 1em">struct
|
||||
header_old_cpio { <br>
|
||||
unsigned short c_magic; <br>
|
||||
unsigned short c_dev; <br>
|
||||
unsigned short c_ino; <br>
|
||||
unsigned short c_mode; <br>
|
||||
unsigned short c_uid; <br>
|
||||
unsigned short c_gid; <br>
|
||||
unsigned short c_nlink; <br>
|
||||
unsigned short c_rdev;</p>
|
||||
header_pwb_cpio { <br>
|
||||
short h_magic; <br>
|
||||
short h_dev; <br>
|
||||
short h_ino; <br>
|
||||
short h_mode; <br>
|
||||
short h_uid; <br>
|
||||
short h_gid; <br>
|
||||
short h_nlink; <br>
|
||||
short h_majmin; <br>
|
||||
long h_mtime; <br>
|
||||
short h_namesize; <br>
|
||||
long h_filesize; <br>
|
||||
};</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="24%"></td>
|
||||
<td width="11%">
|
||||
<p style="margin-left:6%; margin-top: 1em">The <i>short</i>
|
||||
fields here are 16-bit integer values, while the <i>long</i>
|
||||
fields are 32 bit integers. Since PWB UNIX, like the 6th
|
||||
Edition UNIX it was based on, only ran on PDP-11 computers,
|
||||
they are in PDP-endian format, which has little-endian
|
||||
shorts, and big-endian longs. That is, the long integer
|
||||
whose hexadecimal representation is 0x12345678 would be
|
||||
stored in four successive bytes as 0x34, 0x12, 0x78, 0x56.
|
||||
The fields are as follows:</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>h_magic</i></p>
|
||||
|
||||
<p>unsigned short c_mtime[2];</p></td>
|
||||
<td width="65%">
|
||||
</td></tr>
|
||||
</table>
|
||||
<p style="margin-left:17%;">The integer value octal
|
||||
070707.</p>
|
||||
|
||||
<p style="margin-left:14%;">unsigned short c_namesize;</p>
|
||||
|
||||
<table width="100%" border="0" rules="none" frame="void"
|
||||
cellspacing="0" cellpadding="0">
|
||||
<tr valign="top" align="left">
|
||||
<td width="24%"></td>
|
||||
<td width="76%">
|
||||
|
||||
|
||||
<p>unsigned short c_filesize[2];</p></td></tr>
|
||||
</table>
|
||||
|
||||
<p style="margin-left:14%;">};</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">The <i>unsigned
|
||||
short</i> fields here are 16-bit integer values; the
|
||||
<i>unsigned int</i> fields are 32-bit integer values. The
|
||||
fields are as follows</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>magic</i></p>
|
||||
|
||||
<p style="margin-left:17%; margin-top: 1em">The integer
|
||||
value octal 070707. This value can be used to determine
|
||||
whether this archive is written with little-endian or
|
||||
big-endian integers.</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>dev</i>, <i>ino</i></p>
|
||||
<p style="margin-top: 1em"><i>h_dev</i>, <i>h_ino</i></p>
|
||||
|
||||
<p style="margin-left:17%;">The device and inode numbers
|
||||
from the disk. These are used by programs that read
|
||||
|
@ -117,37 +95,27 @@ the same file. Programs that synthesize <b>cpio</b> archives
|
|||
should be careful to set these to distinct values for each
|
||||
entry.</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>mode</i></p>
|
||||
<p style="margin-top: 1em"><i>h_mode</i></p>
|
||||
|
||||
<p style="margin-left:17%; margin-top: 1em">The mode
|
||||
specifies both the regular permissions and the file type. It
|
||||
consists of several bit fields as follows:</p>
|
||||
specifies both the regular permissions and the file type,
|
||||
and it also holds a couple of bits that are irrelevant to
|
||||
the cpio format, because the field is actually a raw copy of
|
||||
the mode field in the inode representing the file. These are
|
||||
the IALLOC flag, which shows that the inode entry is in use,
|
||||
and the ILARG flag, which shows that the file it represents
|
||||
is large enough to have indirect blocks pointers in the
|
||||
inode. The mode is decoded as follows:</p>
|
||||
|
||||
<p>0170000</p>
|
||||
<p style="margin-top: 1em">0100000</p>
|
||||
|
||||
<p style="margin-left:28%; margin-top: 1em">This masks the
|
||||
file type bits.</p>
|
||||
|
||||
<p>0140000</p>
|
||||
|
||||
<p style="margin-left:28%; margin-top: 1em">File type value
|
||||
for sockets.</p>
|
||||
|
||||
<p>0120000</p>
|
||||
|
||||
<p style="margin-left:28%; margin-top: 1em">File type value
|
||||
for symbolic links. For symbolic links, the link body is
|
||||
stored as file data.</p>
|
||||
|
||||
<p>0100000</p>
|
||||
|
||||
<p style="margin-left:28%; margin-top: 1em">File type value
|
||||
for regular files.</p>
|
||||
<p style="margin-left:28%; margin-top: 1em">IALLOC flag -
|
||||
irrelevant to cpio.</p>
|
||||
|
||||
<p>0060000</p>
|
||||
|
||||
<p style="margin-left:28%; margin-top: 1em">File type value
|
||||
for block special devices.</p>
|
||||
<p style="margin-left:28%; margin-top: 1em">This masks the
|
||||
file type bits.</p>
|
||||
|
||||
<p>0040000</p>
|
||||
|
||||
|
@ -159,10 +127,15 @@ for directories.</p>
|
|||
<p style="margin-left:28%; margin-top: 1em">File type value
|
||||
for character special devices.</p>
|
||||
|
||||
<p>0010000</p>
|
||||
<p>0060000</p>
|
||||
|
||||
<p style="margin-left:28%; margin-top: 1em">File type value
|
||||
for named pipes or FIFOs.</p>
|
||||
for block special devices.</p>
|
||||
|
||||
<p>0010000</p>
|
||||
|
||||
<p style="margin-left:28%; margin-top: 1em">ILARG flag -
|
||||
irrelevant to cpio.</p>
|
||||
|
||||
<p>0004000</p>
|
||||
|
||||
|
@ -174,9 +147,7 @@ for named pipes or FIFOs.</p>
|
|||
|
||||
<p>0001000</p>
|
||||
|
||||
<p style="margin-left:28%; margin-top: 1em">Sticky bit. On
|
||||
some systems, this modifies the behavior of executables
|
||||
and/or directories.</p>
|
||||
<p style="margin-left:28%; margin-top: 1em">Sticky bit.</p>
|
||||
|
||||
<p>0000777</p>
|
||||
|
||||
|
@ -184,58 +155,157 @@ and/or directories.</p>
|
|||
bits specify read/write/execute permissions for world,
|
||||
group, and user following standard POSIX conventions.</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>uid</i>, <i>gid</i></p>
|
||||
<p style="margin-top: 1em"><i>h_uid</i>, <i>h_gid</i></p>
|
||||
|
||||
<p style="margin-left:17%;">The numeric user id and group
|
||||
id of the owner.</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>nlink</i></p>
|
||||
<p style="margin-top: 1em"><i>h_nlink</i></p>
|
||||
|
||||
<p style="margin-left:17%; margin-top: 1em">The number of
|
||||
links to this file. Directories always have a value of at
|
||||
least two here. Note that hardlinked files include file data
|
||||
with every copy in the archive.</p>
|
||||
<p style="margin-left:17%;">The number of links to this
|
||||
file. Directories always have a value of at least two here.
|
||||
Note that hardlinked files include file data with every copy
|
||||
in the archive.</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>rdev</i></p>
|
||||
<p style="margin-top: 1em"><i>h_majmin</i></p>
|
||||
|
||||
<p style="margin-left:17%; margin-top: 1em">For block
|
||||
special and character special entries, this field contains
|
||||
the associated device number. For all other entry types, it
|
||||
<p style="margin-left:17%;">For block special and character
|
||||
special entries, this field contains the associated device
|
||||
number, with the major number in the high byte, and the
|
||||
minor number in the low byte. For all other entry types, it
|
||||
should be set to zero by writers and ignored by readers.</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>mtime</i></p>
|
||||
<p style="margin-top: 1em"><i>h_mtime</i></p>
|
||||
|
||||
<p style="margin-left:17%; margin-top: 1em">Modification
|
||||
time of the file, indicated as the number of seconds since
|
||||
the start of the epoch, 00:00:00 UTC January 1, 1970. The
|
||||
four-byte integer is stored with the most-significant 16
|
||||
bits first followed by the least-significant 16 bits. Each
|
||||
of the two 16 bit values are stored in machine-native byte
|
||||
order.</p>
|
||||
<p style="margin-left:17%;">Modification time of the file,
|
||||
indicated as the number of seconds since the start of the
|
||||
epoch, 00:00:00 UTC January 1, 1970.</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>namesize</i></p>
|
||||
<p style="margin-top: 1em"><i>h_namesize</i></p>
|
||||
|
||||
<p style="margin-left:17%;">The number of bytes in the
|
||||
pathname that follows the header. This count includes the
|
||||
trailing NUL byte.</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>filesize</i></p>
|
||||
<p style="margin-top: 1em"><i>h_filesize</i></p>
|
||||
|
||||
<p style="margin-left:17%;">The size of the file. Note that
|
||||
this archive format is limited to four gigabyte file sizes.
|
||||
See <i>mtime</i> above for a description of the storage of
|
||||
four-byte integers.</p>
|
||||
this archive format is limited to 16 megabyte file sizes,
|
||||
because PWB UNIX, like 6th Edition, only used an unsigned 24
|
||||
bit integer for the file size internally.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">The pathname
|
||||
immediately follows the fixed header. If the <b>namesize</b>
|
||||
immediately follows the fixed header. If <b>h_namesize</b>
|
||||
is odd, an additional NUL byte is added after the pathname.
|
||||
The file data is then appended, padded with NUL bytes to an
|
||||
even length.</p>
|
||||
The file data is then appended, again with an additional NUL
|
||||
appended if needed to get the next header at an even
|
||||
offset.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Hardlinked files
|
||||
are not given special treatment; the full file contents are
|
||||
included with each copy of the file.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>New Binary
|
||||
Format</b> <br>
|
||||
The new binary <b>cpio</b> format showed up when cpio was
|
||||
adopted into late 7th Edition UNIX. It is exactly like the
|
||||
PWB binary format, described above, except for three
|
||||
changes:</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">First, UNIX now
|
||||
ran on more than one hardware type, so the endianness of 16
|
||||
bit integers must be determined by observing the magic
|
||||
number at the start of the header. The 32 bit integers are
|
||||
still always stored with the most significant word first,
|
||||
though, so each of those two, in the struct shown above, was
|
||||
stored as an array of two 16 bit integers, in the
|
||||
traditional order. Those 16 bit integers, like all the
|
||||
others in the struct, were accessed using a macro that byte
|
||||
swapped them if necessary.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Next, 7th
|
||||
Edition had more file types to store, and the IALLOC and
|
||||
ILARG flag bits were re-purposed to accommodate these. The
|
||||
revised use of the various bits is as follows:</p>
|
||||
|
||||
<p style="margin-top: 1em">0170000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">This masks the
|
||||
file type bits.</p>
|
||||
|
||||
<p>0140000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
||||
for sockets.</p>
|
||||
|
||||
<p>0120000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
||||
for symbolic links. For symbolic links, the link body is
|
||||
stored as file data.</p>
|
||||
|
||||
<p>0100000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
||||
for regular files.</p>
|
||||
|
||||
<p>0060000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
||||
for block special devices.</p>
|
||||
|
||||
<p>0040000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
||||
for directories.</p>
|
||||
|
||||
<p>0020000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
||||
for character special devices.</p>
|
||||
|
||||
<p>0010000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
||||
for named pipes or FIFOs.</p>
|
||||
|
||||
<p>0004000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">SUID bit.</p>
|
||||
|
||||
<p>0002000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">SGID bit.</p>
|
||||
|
||||
<p>0001000</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">Sticky bit.</p>
|
||||
|
||||
<p>0000777</p>
|
||||
|
||||
<p style="margin-left:18%; margin-top: 1em">The lower 9
|
||||
bits specify read/write/execute permissions for world,
|
||||
group, and user following standard POSIX conventions.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Finally, the
|
||||
file size field now represents a signed 32 bit integer in
|
||||
the underlying file system, so the maximum file size has
|
||||
increased to 2 gigabytes.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">Note that there
|
||||
is no obvious way to tell which of the two binary formats an
|
||||
archive uses, other than to see which one makes more sense.
|
||||
The typical error scenario is that a PWB format archive
|
||||
unpacked as if it were in the new format will create named
|
||||
sockets instead of directories, and then fail to unpack
|
||||
files that should go in those directories. Running
|
||||
<i>bsdcpio -itv</i> on an unknown archive will make it
|
||||
obvious which it is: if it’s PWB format, directories
|
||||
will be listed with an ’s’ instead of a
|
||||
’d’ as the first character of the mode string,
|
||||
and the larger files will have a ’?’ in that
|
||||
position.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em"><b>Portable
|
||||
ASCII Format</b> <br>
|
||||
Version 2 of the Single UNIX Specification
|
||||
|
@ -262,10 +332,10 @@ char c_filesize[11]; <br>
|
|||
};</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">The fields are
|
||||
identical to those in the old binary format. The name and
|
||||
file body follow the fixed header. Unlike the old binary
|
||||
format, there is no additional padding after the pathname or
|
||||
file contents. If the files being archived are themselves
|
||||
identical to those in the new binary format. The name and
|
||||
file body follow the fixed header. Unlike the binary
|
||||
formats, there is no additional padding after the pathname
|
||||
or file contents. If the files being archived are themselves
|
||||
entirely ASCII, then the resulting archive will be entirely
|
||||
ASCII, except for the NUL byte that terminates the name
|
||||
field.</p>
|
||||
|
@ -296,7 +366,7 @@ char c_check[8]; <br>
|
|||
|
||||
<p style="margin-left:6%; margin-top: 1em">Except as
|
||||
specified below, the fields here match those specified for
|
||||
the old binary format above.</p>
|
||||
the new binary format above.</p>
|
||||
|
||||
<p style="margin-top: 1em"><i>magic</i></p>
|
||||
|
||||
|
@ -318,7 +388,7 @@ 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
|
||||
|
@ -365,7 +435,7 @@ 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
|
||||
at AT&T. Both the new 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
|
||||
|
@ -380,10 +450,11 @@ extended attributes? XXX</p>
|
|||
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,
|
||||
and inode numbers. It is limited to 4 gigabyte file
|
||||
sizes.</p>
|
||||
<p style="margin-left:6%; margin-top: 1em">The binary
|
||||
formats are limited to 16 bits for user id, group id,
|
||||
device, and inode numbers. They are limited to 16 megabyte
|
||||
and 2 gigabyte file sizes for the older and newer variants,
|
||||
respectively.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">The old ASCII
|
||||
format is limited to 18 bits for the user id, group id,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:18 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:22 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -245,38 +245,42 @@ 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
|
||||
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:
|
||||
some store the values as octal or hexadecimal numbers in
|
||||
ASCII, others as binary values of varying byte order and
|
||||
length.</p>
|
||||
The libarchive library can read and write a number of common
|
||||
cpio variants. 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: some store the values as
|
||||
octal or hexadecimal numbers in ASCII, others as binary
|
||||
values of varying byte order and length.</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>binary</b></p>
|
||||
|
||||
<p style="margin-left:17%; margin-top: 1em">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.</p>
|
||||
little-endian variants of the the two binary cpio formats;
|
||||
the original one from PWB/UNIX, and the later, more widely
|
||||
used, variant. This format used 32-bit binary values for
|
||||
file size and mtime, and 16-bit binary values for the other
|
||||
fields. The formats support only the file types present in
|
||||
UNIX at the time of their creation. File sizes are limited
|
||||
to 24 bits in the PWB format, because of the limits of the
|
||||
file system, and to 31 bits in the newer binary format,
|
||||
where signed 32 bit longs were used.</p>
|
||||
|
||||
<p style="margin-top: 1em"><b>odc</b></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>
|
||||
<p style="margin-left:17%; margin-top: 1em">This is the
|
||||
POSIX standardized 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>
|
||||
|
||||
<p style="margin-top: 1em"><b>SVR4/newc</b></p>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:18 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:21 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -71,12 +71,7 @@ formats,</p>
|
|||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">ISO9660 CD images (including
|
||||
RockRidge and Joliet extensions),</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">Zip archives,</p>
|
||||
<p style="margin-left:12%;">7-Zip archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
|
@ -89,6 +84,11 @@ and BSD extensions),</p>
|
|||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">ISO9660 CD images (including
|
||||
RockRidge and Joliet extensions),</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">LHA archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
@ -98,17 +98,28 @@ descriptions,</p>
|
|||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">RAR archives,</p>
|
||||
<p style="margin-left:12%;">RAR and most RAR5 archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">XAR archives.</p>
|
||||
<p style="margin-left:12%;">WARC archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">XAR archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">Zip archives.</p>
|
||||
|
||||
<p style="margin-left:6%;">The library automatically
|
||||
detects archives compressed with gzip(1), bzip2(1), xz(1),
|
||||
lzip(1), or compress(1) and decompresses them transparently.
|
||||
It can similarly detect and decode archives processed with
|
||||
uuencode(1) or which have an rpm(1) header.</p>
|
||||
detects archives compressed with compress(1), bzip2(1),
|
||||
grzip(1), gzip(1), lrzip(1), lz4(1), lzip(1), lzop(1),
|
||||
xz(1), or zstd(1) and decompresses them transparently.
|
||||
Decompression of some formats requires external decompressor
|
||||
utilities. It can similarly detect and decode archives
|
||||
processed with uuencode(1) or which have an rpm(1)
|
||||
header.</p>
|
||||
|
||||
<p style="margin-left:6%; margin-top: 1em">When writing an
|
||||
archive, you can specify the compression to be used and the
|
||||
|
@ -126,12 +137,15 @@ format” archives,</p>
|
|||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">POSIX octet-oriented cpio
|
||||
archives,</p>
|
||||
<p style="margin-left:12%;">cpio archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">Zip archive,</p>
|
||||
<p style="margin-left:12%;">7-Zip archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">ar archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
|
@ -144,20 +158,16 @@ archives,</p>
|
|||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">7-Zip archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">ar archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">mtree file tree
|
||||
descriptions,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">XAR archives.</p>
|
||||
<p style="margin-left:12%;">XAR archives,</p>
|
||||
|
||||
<p><b>•</b></p>
|
||||
|
||||
<p style="margin-left:12%;">Zip archive.</p>
|
||||
|
||||
<p style="margin-left:6%;">Pax interchange format is an
|
||||
extension of the tar archive format that eliminates
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:18 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:21 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:18 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:22 2023 -->
|
||||
<!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>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:19 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:22 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -359,8 +359,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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Creator : groff version 1.22.4 -->
|
||||
<!-- CreationDate: Wed Jun 12 21:10:19 2019 -->
|
||||
<!-- CreationDate: Mon Sep 11 22:06:22 2023 -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
@ -689,7 +689,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 +716,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
|
||||
|
@ -740,7 +740,7 @@ created. (This should not be confused with the POSIX
|
|||
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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue