Merge libarchive-3.3.1.

This commit is contained in:
joerg 2017-02-25 21:11:18 +00:00
parent be60383b38
commit ce4c057b58
306 changed files with 16470 additions and 23531 deletions

View file

@ -15,7 +15,7 @@ endif()
# RelWithDebInfo : Release build with Debug Info
# MinSizeRel : Release Min Size build
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)
# Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the
# value type is "UNINITIALIZED".
@ -44,13 +44,13 @@ SET(CMAKE_MACOSX_RPATH ON)
#
FILE(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/build/version _version)
STRING(REGEX REPLACE
"^([0-9])[0-9][0-9][0-9][0-9][0-9][0-9][a-z]?$" "\\1" _major ${_version})
"^([0-9])[0-9][0-9][0-9][0-9][0-9][0-9][a-z]*$" "\\1" _major ${_version})
STRING(REGEX REPLACE
"^[0-9]([0-9][0-9][0-9])[0-9][0-9][0-9][a-z]?$" "\\1" _minor ${_version})
"^[0-9]([0-9][0-9][0-9])[0-9][0-9][0-9][a-z]*$" "\\1" _minor ${_version})
STRING(REGEX REPLACE
"^[0-9][0-9][0-9][0-9]([0-9][0-9][0-9])[a-z]?$" "\\1" _revision ${_version})
"^[0-9][0-9][0-9][0-9]([0-9][0-9][0-9])[a-z]*$" "\\1" _revision ${_version})
STRING(REGEX REPLACE
"^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]([a-z]?)$" "\\1" _quality ${_version})
"^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]([a-z]*)$" "\\1" _quality ${_version})
SET(_version_number ${_major}${_minor}${_revision})
STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_minor ${_minor})
STRING(REGEX REPLACE "[0]*([^0]*[0-9])$" "\\1" _trimmed_revision ${_revision})
@ -179,13 +179,15 @@ include(CTest)
OPTION(ENABLE_NETTLE "Enable use of Nettle" ON)
OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON)
OPTION(ENABLE_LZMA "Enable the use of the system found LZMA library if found" ON)
OPTION(ENABLE_ZLIB "Enable the use of the system found ZLIB library if found" ON)
OPTION(ENABLE_BZip2 "Enable the use of the system found BZip2 library if found" ON)
OPTION(ENABLE_LIBXML2 "Enable the use of the system found libxml2 library if found" ON)
OPTION(ENABLE_EXPAT "Enable the use of the system found EXPAT library if found" ON)
OPTION(ENABLE_PCREPOSIX "Enable the use of the system found PCREPOSIX library if found" ON)
OPTION(ENABLE_LibGCC "Enable the use of the system found LibGCC library if found" ON)
OPTION(ENABLE_LZO "Enable the use of the system LZO library if found" OFF)
OPTION(ENABLE_LZMA "Enable the use of the system LZMA library if found" ON)
OPTION(ENABLE_ZLIB "Enable the use of the system ZLIB library if found" ON)
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)
# CNG is used for encrypt/decrypt Zip archives on Windows.
OPTION(ENABLE_CNG "Enable the use of CNG(Crypto Next Generation)" ON)
@ -274,7 +276,7 @@ INCLUDE(CheckHeaderDirent)
INCLUDE(CheckIncludeFile)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckLibraryExists)
INCLUDE(CheckStructMember)
INCLUDE(CheckStructHasMember)
INCLUDE(CheckSymbolExists)
INCLUDE(CheckTypeExists)
INCLUDE(CheckTypeSize)
@ -452,46 +454,46 @@ MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARIES)
# Find LZMA
#
IF(ENABLE_LZMA)
FIND_PACKAGE(LZMA)
FIND_PACKAGE(LibLZMA)
ELSE()
SET(LZMA_FOUND FALSE) # Override cached value
SET(LZMADEC_FOUND FALSE) # Override cached value
SET(LIBZMA_FOUND FALSE) # Override cached value
ENDIF()
IF(LZMA_FOUND)
IF(LIBLZMA_FOUND)
SET(HAVE_LIBLZMA 1)
SET(HAVE_LZMA_H 1)
INCLUDE_DIRECTORIES(${LZMA_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${LZMA_LIBRARIES})
SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR})
SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES})
INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS})
LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES})
# Test if a macro is needed for the library.
TRY_MACRO_FOR_LIBRARY(
"${LZMA_INCLUDE_DIR}" "${LZMA_LIBRARIES}"
"${LIBLZMA_INCLUDE_DIRS}" "${LIBLZMA_LIBRARIES}"
COMPILES
"#include <lzma.h>\nint main() {return (int)lzma_version_number(); }"
"WITHOUT_LZMA_API_STATIC;LZMA_API_STATIC")
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)
ELSEIF(LZMADEC_FOUND)
SET(HAVE_LIBLZMADEC 1)
SET(HAVE_LZMADEC_H 1)
INCLUDE_DIRECTORIES(${LZMADEC_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${LZMADEC_LIBRARIES})
ELSE(LZMA_FOUND)
ELSE(LIBLZMA_FOUND)
# LZMA not found and will not be used.
ENDIF(LZMA_FOUND)
ENDIF(LIBLZMA_FOUND)
#
# Find LZO2
#
IF (LZO2_INCLUDE_DIR)
# Already in cache, be silent
SET(LZO2_FIND_QUIETLY TRUE)
ENDIF (LZO2_INCLUDE_DIR)
IF(ENABLE_LZO)
IF (LZO2_INCLUDE_DIR)
# Already in cache, be silent
SET(LZO2_FIND_QUIETLY TRUE)
ENDIF (LZO2_INCLUDE_DIR)
FIND_PATH(LZO2_INCLUDE_DIR lzo/lzoconf.h)
FIND_LIBRARY(LZO2_LIBRARY NAMES lzo2 liblzo2)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO2 DEFAULT_MSG LZO2_LIBRARY LZO2_INCLUDE_DIR)
FIND_PATH(LZO2_INCLUDE_DIR lzo/lzoconf.h)
FIND_LIBRARY(LZO2_LIBRARY NAMES lzo2 liblzo2)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO2 DEFAULT_MSG LZO2_LIBRARY LZO2_INCLUDE_DIR)
ELSE(ENABLE_LZO)
SET(LIBZMA_FOUND FALSE) # Override cached value
ENDIF(ENABLE_LZO)
IF(LZO2_FOUND)
SET(HAVE_LIBLZO2 1)
SET(HAVE_LZO_LZOCONF_H 1)
@ -570,6 +572,11 @@ LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H)
LA_CHECK_INCLUDE_FILE("linux/types.h" HAVE_LINUX_TYPES_H)
LA_CHECK_INCLUDE_FILE("linux/fiemap.h" HAVE_LINUX_FIEMAP_H)
LA_CHECK_INCLUDE_FILE("linux/fs.h" HAVE_LINUX_FS_H)
CHECK_C_SOURCE_COMPILES("#include <sys/ioctl.h>
#include <linux/fs.h>
int main(void) { return FS_IOC_GETFLAGS; }" HAVE_WORKING_FS_IOC_GETFLAGS)
LA_CHECK_INCLUDE_FILE("linux/magic.h" HAVE_LINUX_MAGIC_H)
LA_CHECK_INCLUDE_FILE("locale.h" HAVE_LOCALE_H)
LA_CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H)
@ -614,7 +621,7 @@ IF(ENABLE_CNG)
ELSE(ENABLE_CNG)
UNSET(HAVE_BCRYPT_H CACHE)
ENDIF(ENABLE_CNG)
# Following files need windwos.h, so we should test it after windows.h test.
# Following files need windows.h, so we should test it after windows.h test.
LA_CHECK_INCLUDE_FILE("wincrypt.h" HAVE_WINCRYPT_H)
LA_CHECK_INCLUDE_FILE("winioctl.h" HAVE_WINIOCTL_H)
@ -1274,6 +1281,14 @@ CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE)
CMAKE_POP_CHECK_STATE() # Restore the state of the variables
CHECK_C_SOURCE_COMPILES(
"#include <sys/types.h>\n#include <sys/mount.h>\nint main(void) { struct vfsconf v; return sizeof(v);}"
HAVE_STRUCT_VFSCONF)
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)
# Make sure we have the POSIX version of readdir_r, not the
# older 2-argument version.
CHECK_C_SOURCE_COMPILES(
@ -1299,6 +1314,10 @@ 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)
@ -1332,47 +1351,47 @@ CHECK_SYMBOL_EXISTS(SSIZE_MAX "limits.h" HAVE_DECL_SSIZE_MAX)
# Check struct members
#
# Check for tm_gmtoff in struct tm
CHECK_STRUCT_MEMBER("struct tm" tm_gmtoff
CHECK_STRUCT_HAS_MEMBER("struct tm" tm_gmtoff
"time.h" HAVE_STRUCT_TM_TM_GMTOFF)
CHECK_STRUCT_MEMBER("struct tm" __tm_gmtoff
CHECK_STRUCT_HAS_MEMBER("struct tm" __tm_gmtoff
"time.h" HAVE_STRUCT_TM___TM_GMTOFF)
# Check for f_namemax in struct statfs
CHECK_STRUCT_MEMBER("struct statfs" f_namemax
CHECK_STRUCT_HAS_MEMBER("struct statfs" f_namemax
"sys/param.h;sys/mount.h" HAVE_STRUCT_STATFS_F_NAMEMAX)
# Check for birthtime in struct stat
CHECK_STRUCT_MEMBER("struct stat" st_birthtime
CHECK_STRUCT_HAS_MEMBER("struct stat" st_birthtime
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_BIRTHTIME)
# Check for high-resolution timestamps in struct stat
CHECK_STRUCT_MEMBER("struct stat" st_birthtimespec.tv_nsec
CHECK_STRUCT_HAS_MEMBER("struct stat" st_birthtimespec.tv_nsec
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC)
CHECK_STRUCT_MEMBER("struct stat" st_mtimespec.tv_nsec
CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtimespec.tv_nsec
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC)
CHECK_STRUCT_MEMBER("struct stat" st_mtim.tv_nsec
CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtim.tv_nsec
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC)
CHECK_STRUCT_MEMBER("struct stat" st_mtime_n
CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtime_n
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIME_N)
CHECK_STRUCT_MEMBER("struct stat" st_umtime
CHECK_STRUCT_HAS_MEMBER("struct stat" st_umtime
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_UMTIME)
CHECK_STRUCT_MEMBER("struct stat" st_mtime_usec
CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtime_usec
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIME_USEC)
# Check for block size support in struct stat
CHECK_STRUCT_MEMBER("struct stat" st_blksize
CHECK_STRUCT_HAS_MEMBER("struct stat" st_blksize
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_BLKSIZE)
# Check for st_flags in struct stat (BSD fflags)
CHECK_STRUCT_MEMBER("struct stat" st_flags
CHECK_STRUCT_HAS_MEMBER("struct stat" st_flags
"sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_FLAGS)
IF(HAVE_SYS_STATVFS_H)
CHECK_STRUCT_MEMBER("struct statvfs" f_iosize
CHECK_STRUCT_HAS_MEMBER("struct statvfs" f_iosize
"sys/types.h;sys/statvfs.h" HAVE_STRUCT_STATVFS_F_IOSIZE)
ENDIF()
#
#
CHECK_STRUCT_MEMBER("struct tm" tm_sec
CHECK_STRUCT_HAS_MEMBER("struct tm" tm_sec
"sys/types.h;sys/time.h;time.h" TIME_WITH_SYS_TIME)
#
@ -1592,16 +1611,36 @@ IF(ENABLE_ACL)
# test for specific permissions in a permset.) Linux uses the obvious
# name, FreeBSD adds _np to mark it as "non-Posix extension."
# Test for both as a double-check that we really have POSIX-style ACL support.
CHECK_FUNCTION_EXISTS(acl_get_fd_np HAVE_ACL_GET_FD_NP)
CHECK_FUNCTION_EXISTS(acl_get_perm HAVE_ACL_GET_PERM)
CHECK_FUNCTION_EXISTS(acl_get_perm_np HAVE_ACL_GET_PERM_NP)
CHECK_FUNCTION_EXISTS(acl_get_link HAVE_ACL_GET_LINK)
CHECK_FUNCTION_EXISTS(acl_get_link_np HAVE_ACL_GET_LINK_NP)
CHECK_FUNCTION_EXISTS(acl_is_trivial_np HAVE_ACL_IS_TRIVIAL_NP)
CHECK_FUNCTION_EXISTS(acl_set_link_np HAVE_ACL_SET_LINK_NP)
CHECK_SYMBOL_EXISTS(ACL_TYPE_NFS4 "${INCLUDES}" HAVE_ACL_TYPE_NFS4)
# MacOS has an acl.h that isn't POSIX. It can be detected by
# checking for ACL_USER
CHECK_SYMBOL_EXISTS(ACL_USER "${INCLUDES}" HAVE_ACL_USER)
CHECK_C_SOURCE_COMPILES("#include <sys/types.h>
#include <sys/acl.h>
int main(void) { return ACL_TYPE_EXTENDED; }" HAVE_ACL_TYPE_EXTENDED)
# Solaris and derivates ACLs
CHECK_LIBRARY_EXISTS(sec "acl_get" "" HAVE_LIBSEC)
IF(HAVE_LIBSEC)
SET(CMAKE_REQUIRED_LIBRARIES "sec")
FIND_LIBRARY(SEC_LIBRARY NAMES sec)
LIST(APPEND ADDITIONAL_LIBS ${SEC_LIBRARY})
ENDIF(HAVE_LIBSEC)
#
CHECK_TYPE_EXISTS(aclent_t "${INCLUDES}" HAVE_ACLENT_T)
CHECK_TYPE_EXISTS(ace_t "${INCLUDES}" HAVE_ACE_T)
CHECK_FUNCTION_EXISTS(acl_get HAVE_FACL_GET)
CHECK_FUNCTION_EXISTS(facl_get HAVE_FACL_GET)
CHECK_FUNCTION_EXISTS(acl_set HAVE_FACL_SET)
CHECK_FUNCTION_EXISTS(facl_set HAVE_FACL_SET)
ELSE(ENABLE_ACL)
# If someone runs cmake, then disables ACL support, we need
# to forcibly override the cached values for these.
@ -1616,7 +1655,15 @@ ELSE(ENABLE_ACL)
SET(HAVE_ACL_SET_FD FALSE)
SET(HAVE_ACL_SET_FD_NP FALSE)
SET(HAVE_ACL_SET_FILE FALSE)
SET(HAVE_ACL_TYPE_NFS4 FALSE)
SET(HAVE_ACL_USER FALSE)
SET(HAVE_ACL_TYPE_EXTENDED FALSE)
SET(HAVE_ACL_GET FALSE)
SET(HAVE_ACLENT_T FALSE)
SET(HAVE_ACE_T FALSE)
SET(HAVE_FACL_GET FALSE)
SET(HAVE_ACL_SET FALSE)
SET(HAVE_FACL_SET FALSE)
ENDIF(ENABLE_ACL)
#

View file

@ -33,6 +33,7 @@ AM_CPPFLAGS=$(PLATFORMCPPFLAGS)
#
EXTRA_DIST= \
CMakeLists.txt \
README.md \
build/autogen.sh \
build/bump-version.sh \
build/clean.sh \
@ -117,6 +118,8 @@ libarchive_la_SOURCES= \
libarchive/archive_hmac.c \
libarchive/archive_hmac_private.h \
libarchive/archive_match.c \
libarchive/archive_openssl_evp_private.h \
libarchive/archive_openssl_hmac_private.h \
libarchive/archive_options.c \
libarchive/archive_options_private.h \
libarchive/archive_pack_dev.h \
@ -307,7 +310,9 @@ pkgconfig_DATA = build/pkgconfig/libarchive.pc
# Sources needed by all test programs
test_utils_SOURCES= \
test_utils/test_utils.c \
test_utils/test_utils.h
test_utils/test_utils.h \
test_utils/test_main.c \
test_utils/test_common.h
#
#
@ -317,14 +322,14 @@ test_utils_SOURCES= \
libarchive_test_SOURCES= \
$(libarchive_la_SOURCES) \
$(test_utils_SOURCES) \
libarchive/test/main.c \
libarchive/test/read_open_memory.c \
libarchive/test/test.h \
libarchive/test/test_acl_freebsd_posix1e.c \
libarchive/test/test_acl_freebsd_nfs4.c \
libarchive/test/test_acl_nfs4.c \
libarchive/test/test_acl_pax.c \
libarchive/test/test_acl_platform_nfs4.c \
libarchive/test/test_acl_platform_posix1e.c \
libarchive/test/test_acl_posix1e.c \
libarchive/test/test_acl_text.c \
libarchive/test/test_archive_api_feature.c \
libarchive/test/test_archive_clear_error.c \
libarchive/test/test_archive_cmdline.c \
@ -369,8 +374,11 @@ libarchive_test_SOURCES= \
libarchive/test/test_compat_lzop.c \
libarchive/test/test_compat_mac.c \
libarchive/test/test_compat_pax_libarchive_2x.c \
libarchive/test/test_compat_perl_archive_tar.c \
libarchive/test/test_compat_plexus_archiver_tar.c \
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_hardlink.c \
libarchive/test/test_compat_uudecode.c \
libarchive/test/test_compat_uudecode_large.c \
@ -449,6 +457,7 @@ libarchive_test_SOURCES= \
libarchive/test/test_read_format_lha_bugfix_0.c \
libarchive/test/test_read_format_lha_filename.c \
libarchive/test/test_read_format_mtree.c \
libarchive/test/test_read_format_mtree_crash747.c \
libarchive/test/test_read_format_pax_bz2.c \
libarchive/test/test_read_format_rar.c \
libarchive/test/test_read_format_rar_encryption_data.c \
@ -475,6 +484,8 @@ libarchive_test_SOURCES= \
libarchive/test/test_read_format_zip_encryption_partially.c \
libarchive/test/test_read_format_zip_encryption_header.c \
libarchive/test/test_read_format_zip_filename.c \
libarchive/test/test_read_format_zip_high_compression.c \
libarchive/test/test_read_format_zip_jar.c \
libarchive/test/test_read_format_zip_mac_metadata.c \
libarchive/test/test_read_format_zip_malformed.c \
libarchive/test/test_read_format_zip_msdos.c \
@ -487,6 +498,7 @@ libarchive_test_SOURCES= \
libarchive/test/test_read_format_zip_winzip_aes_large.c \
libarchive/test/test_read_format_zip_zip64.c \
libarchive/test/test_read_large.c \
libarchive/test/test_read_pax_schily_xattr.c \
libarchive/test/test_read_pax_truncated.c \
libarchive/test/test_read_position.c \
libarchive/test/test_read_set_format.c \
@ -509,6 +521,9 @@ libarchive_test_SOURCES= \
libarchive/test/test_write_disk_no_hfs_compression.c \
libarchive/test/test_write_disk_perms.c \
libarchive/test/test_write_disk_secure.c \
libarchive/test/test_write_disk_secure744.c \
libarchive/test/test_write_disk_secure745.c \
libarchive/test/test_write_disk_secure746.c \
libarchive/test/test_write_disk_sparse.c \
libarchive/test/test_write_disk_symlink.c \
libarchive/test/test_write_disk_times.c \
@ -572,7 +587,13 @@ libarchive_test_SOURCES= \
libarchive/test/test_write_read_format_zip.c \
libarchive/test/test_zip_filename_encoding.c
libarchive_test_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/test_utils -I$(top_builddir)/libarchive/test -DLIBARCHIVE_STATIC $(PLATFORMCPPFLAGS)
libarchive_test_CPPFLAGS= \
-I$(top_srcdir)/libarchive \
-I$(top_srcdir)/libarchive/test \
-I$(top_srcdir)/test_utils \
-I$(top_builddir)/libarchive/test \
-DLIBARCHIVE_STATIC $(PLATFORMCPPFLAGS)
libarchive_test_LDADD= $(LTLIBICONV)
# The "list.h" file just lists all of the tests defined in all of the sources.
@ -586,12 +607,14 @@ libarchive_TESTS_ENVIRONMENT= LIBARCHIVE_TEST_FILES=`cd $(top_srcdir);/bin/pwd`/
libarchive_test_EXTRA_DIST=\
libarchive/test/list.h \
libarchive/test/test_acl_pax.tar.uu \
libarchive/test/test_acl_pax_posix1e.tar.uu \
libarchive/test/test_acl_pax_nfs4.tar.uu \
libarchive/test/test_archive_string_conversion.txt.Z.uu \
libarchive/test/test_compat_bzip2_1.tbz.uu \
libarchive/test/test_compat_bzip2_2.tbz.uu \
libarchive/test/test_compat_cpio_1.cpio.uu \
libarchive/test/test_compat_gtar_1.tar.uu \
libarchive/test/test_compat_gtar_2.tar.uu \
libarchive/test/test_compat_gzip_1.tgz.uu \
libarchive/test/test_compat_gzip_2.tgz.uu \
libarchive/test/test_compat_lz4_1.tar.lz4.uu \
@ -617,9 +640,13 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_compat_mac-1.tar.Z.uu \
libarchive/test/test_compat_mac-2.tar.Z.uu \
libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu \
libarchive/test/test_compat_perl_archive_tar.tar.uu \
libarchive/test/test_compat_plexus_archiver_tar.tar.uu \
libarchive/test/test_compat_solaris_pax_sparse_1.pax.Z.uu \
libarchive/test/test_compat_solaris_pax_sparse_2.pax.Z.uu \
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_hardlink_1.tar.uu \
libarchive/test/test_compat_uudecode_large.tar.Z.uu \
libarchive/test/test_compat_xz_1.txz.uu \
@ -657,6 +684,7 @@ 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_format_mtree_crash747.mtree.bz2.uu \
libarchive/test/test_read_format_7zip_bcj2_bzip2.7z.uu \
libarchive/test/test_read_format_7zip_bcj2_copy_1.7z.uu \
libarchive/test/test_read_format_7zip_bcj2_copy_2.7z.uu \
@ -760,6 +788,7 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_read_format_rar_subblock.rar.uu \
libarchive/test/test_read_format_rar_unicode.rar.uu \
libarchive/test/test_read_format_rar_windows.rar.uu \
libarchive/test/test_read_format_raw.bufr.uu \
libarchive/test/test_read_format_raw.data.Z.uu \
libarchive/test/test_read_format_raw.data.uu \
libarchive/test/test_read_format_tar_concatenated.tar.uu \
@ -782,7 +811,9 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_read_format_zip_filename_utf8_jp.zip.uu \
libarchive/test/test_read_format_zip_filename_utf8_ru.zip.uu \
libarchive/test/test_read_format_zip_filename_utf8_ru2.zip.uu \
libarchive/test/test_read_format_zip_high_compression.zip.uu \
libarchive/test/test_read_format_zip_length_at_end.zip.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 \
libarchive/test/test_read_format_zip_msdos.zip.uu \
@ -806,6 +837,7 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_read_large_splitted_rar_ac.uu \
libarchive/test/test_read_large_splitted_rar_ad.uu \
libarchive/test/test_read_large_splitted_rar_ae.uu \
libarchive/test/test_read_pax_schily_xattr.tar.uu \
libarchive/test/test_read_splitted_rar_aa.uu \
libarchive/test/test_read_splitted_rar_ab.uu \
libarchive/test/test_read_splitted_rar_ac.uu \
@ -893,7 +925,6 @@ endif
bsdtar_test_SOURCES= \
$(test_utils_SOURCES) \
tar/test/main.c \
tar/test/test.h \
tar/test/test_0.c \
tar/test/test_basic.c \
@ -956,7 +987,8 @@ bsdtar_test_SOURCES= \
bsdtar_test_CPPFLAGS=\
-I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \
-I$(top_srcdir)/test_utils \
-I$(top_srcdir)/tar -I$(top_builddir)/tar/test \
-I$(top_srcdir)/tar -I$(top_srcdir)/tar/test \
-I$(top_builddir)/tar/test \
$(PLATFORMCPPFLAGS)
tar/test/list.h: Makefile
@ -1051,7 +1083,6 @@ endif
bsdcpio_test_SOURCES= \
$(test_utils_SOURCES) \
cpio/cmdline.c \
cpio/test/main.c \
cpio/test/test.h \
cpio/test/test_0.c \
cpio/test/test_basic.c \
@ -1103,7 +1134,8 @@ bsdcpio_test_SOURCES= \
bsdcpio_test_CPPFLAGS= \
-I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \
-I$(top_srcdir)/test_utils \
-I$(top_srcdir)/cpio -I$(top_builddir)/cpio/test \
-I$(top_srcdir)/cpio -I$(top_srcdir)/cpio/test \
-I$(top_builddir)/cpio/test \
$(PLATFORMCPPFLAGS)
bsdcpio_test_LDADD=libarchive_fe.la
@ -1198,7 +1230,6 @@ endif
bsdcat_test_SOURCES= \
$(test_utils_SOURCES) \
cat/test/main.c \
cat/test/test.h \
cat/test/test_0.c \
cat/test/test_empty_gz.c \
@ -1219,7 +1250,8 @@ bsdcat_test_SOURCES= \
bsdcat_test_CPPFLAGS= \
-I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \
-I$(top_srcdir)/test_utils \
-I$(top_srcdir)/cat -I$(top_builddir)/cat/test \
-I$(top_srcdir)/cat -I$(top_srcdir)/cat/test \
-I$(top_builddir)/cat/test \
$(PLATFORMCPPFLAGS)
bsdcat_test_LDADD=libarchive_fe.la

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,23 @@
Feb 26, 2017: libarchive 3.3.1 released
Security & Feature release
Feb 19, 2017: libarchive 3.3.0 released
Security & Feature release
Jan 29, 2017: Limited NFSv4 ACL support for Mac OS (Darwin)
Jan 10, 2017: POSIX.1e and NFSv4 ACL support for Solaris and derivates
Dec 27, 2016: NFSv4 ACL read and write support for pax
Deprecated functions: archive_entry_acl_text(), archive_entry_acl_text_w()
Nov, 2016: libarchive is now being tested by the OSS-Fuzz project
Oct 26, 2016: Remove liblzmadec support
Oct 23, 2016: libarchive 3.2.2 released
Security release
Jun 20, 2016: libarchive 3.2.1 released
This fixes a handful of security and other critical issues with 3.2.0

View file

@ -1,163 +0,0 @@
README for libarchive bundle.
Questions? Issues?
* http://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
https://github.com/libarchive/libarchive/issues
* To submit an enhancement to libarchive, please submit
a pull request via GitHub.
https://github.com/libarchive/libarchive/pulls
This distribution bundle includes the following components:
* libarchive: a library for reading and writing streaming archives
* 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
* 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.
The top-level directory contains the following information files:
* NEWS - highlights of recent changes
* COPYING - what you can do with this
* INSTALL - installation instructions
* README - this file
* configure - configuration script, see INSTALL for details.
* CMakeLists.txt - input for "cmake" build tool, see INSTALL
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
Guide to Documentation installed by this system:
* bsdtar.1 explains the use of the bsdtar program
* bsdcpio.1 explains the use of the bsdcpio program
* bsdcat.1 explains the use of the bsdcat program
* libarchive.3 gives an overview of the library as a whole
* archive_read.3, archive_write.3, archive_write_disk.3, and
archive_read_disk.3 provide detailed calling sequences for the read
and write APIs
* archive_entry.3 details the "struct archive_entry" utility class
* archive_internals.3 provides some insight into libarchive's
internal structure and operation.
* libarchive-formats.5 documents the file formats supported by the library
* cpio.5, mtree.5, and tar.5 provide detailed information about these
popular archive formats, including hard-to-find details about
modern cpio and tar variants.
The manual pages above are provided in the 'doc' directory in
a number of different formats.
You should also read the copious comments in "archive.h" and the
source code for the sample programs for more details. Please let us
know about any errors or omissions you find.
Currently, the library automatically detects and reads the following fomats:
* GNU tar format (including GNU long filenames, long link names, and sparse files)
* Solaris 9 extended tar format (including ACLs)
* Old V7 tar archives
* POSIX ustar
* POSIX pax interchange format
* POSIX octet-oriented cpio
* SVR4 ASCII cpio
* POSIX octet-oriented cpio
* Binary cpio (big-endian or little-endian)
* ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
* ZIP archives (with uncompressed or "deflate" compressed entries)
* GNU and BSD 'ar' archives
* 'mtree' format
* 7-Zip archives
* Microsoft CAB format
* LHA and LZH archives
* RAR archives
* XAR archives
The library also detects and handles any of the following before evaluating the archive:
* uuencoded files
* files with RPM wrapper
* gzip compression
* bzip2 compression
* compress/LZW compression
* lzma, lzip, and xz compression
* lz4 compression
* lzop 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
entries that require pax extensions (for long filenames, ACLs, etc).
* Old GNU tar format
* Old V7 tar format
* POSIX octet-oriented cpio
* SVR4 "newc" cpio
* shar archives
* ZIP archives (with uncompressed or "deflate" compressed entries)
* GNU and BSD 'ar' archives
* 'mtree' format
* ISO9660 format
* 7-Zip archives
* XAR archives
When creating archives, the result can be filtered with any of the following:
* uuencode
* gzip compression
* bzip2 compression
* compress/LZW compression
* lzma, lzip, and xz compression
* lz4 compression
* lzop compression
Notes about the library architecture:
* This is a heavily stream-oriented system. There is no direct
support for in-place modification or random access.
* The library is designed to be extended with new compression and
archive formats. The only requirement is that the format be
readable or writable as a stream and that each archive entry be
independent. There are articles on the libarchive Wiki explaining
how to extend libarchive.
* On read, compression and format are always detected automatically.
* I've attempted to minimize static link pollution. If you don't
explicitly invoke a particular feature (such as support for a
particular compression or format), it won't get pulled in to
statically-linked programs. In particular, if you don't explicitly
enable a particular compression or decompression support, you won't
need to link against the corresponding compression or decompression
libraries. This also reduces the size of statically-linked
binaries in environments where that matters.
* On read, the library accepts whatever blocks you hand it.
Your read callback is free to pass the library a byte at a time
or mmap the entire archive and give it to the library at once.
On write, the library always produces correctly-blocked output.
* The object-style approach allows you to have multiple archive streams
open at once. bsdtar uses this in its "@archive" extension.
* The archive itself is read/written using callback functions.
You can read an archive directly from an in-memory buffer or
write it to a socket, if you wish. There are some utility
functions to provide easy-to-use "open file," etc, capabilities.
* The read/write APIs are designed to allow individual entries
to be read or written to any data source: You can create
a block of data in memory and add it to a tar archive without
first writing a temporary file. You can also read an entry from
an archive and write the data directly to a socket. If you want
to read/write entries to disk, there are convenience functions to
make this especially easy.
* Note: "pax interchange format" is really an extended tar format,
despite what the name says.

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2016 Free Software Foundation, Inc.
# Copyright 1992-2017 Free Software Foundation, Inc.
timestamp='2016-05-15'
timestamp='2017-02-07'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2016 Free Software Foundation, Inc.
Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -1000,6 +1000,9 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64el:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
@ -1032,6 +1035,9 @@ EOF
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
@ -1337,6 +1343,9 @@ EOF
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
NSX-?:NONSTOP_KERNEL:*:*)
echo nsx-tandem-nsk${UNAME_RELEASE}
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
exit ;;

View file

@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2016 Free Software Foundation, Inc.
# Copyright 1992-2017 Free Software Foundation, Inc.
timestamp='2016-06-20'
timestamp='2017-02-07'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2016 Free Software Foundation, Inc.
Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -117,7 +117,7 @@ case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \
kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@ -301,6 +301,7 @@ case $basic_machine in
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
@ -428,6 +429,7 @@ case $basic_machine in
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pru-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
@ -946,6 +948,9 @@ case $basic_machine in
nsr-tandem)
basic_machine=nsr-tandem
;;
nsx-tandem)
basic_machine=nsx-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
@ -1030,7 +1035,7 @@ case $basic_machine in
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
@ -1040,7 +1045,7 @@ case $basic_machine in
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
@ -1395,7 +1400,7 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
@ -1407,7 +1412,7 @@ case $os in
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos* | -phoenix*)
| -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1636,6 +1641,9 @@ case $basic_machine in
sparc-* | *-sun)
os=-sunos4.1.1
;;
pru-*)
os=-elf
;;
*-be)
os=-beos
;;

View file

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2013-12-25.23; # UTC
scriptversion=2014-09-12.12; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -324,34 +324,41 @@ do
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
# $RANDOM is not portable (e.g. dash); use it when possible to
# lower collision chance
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
# As "mkdir -p" follows symlinks and we work in /tmp possibly; so
# create the $tmpdir first (and fail if unsuccessful) to make sure
# that nobody tries to guess the $tmpdir name.
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
$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.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
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 -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
$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/d" "$tmpdir"
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
fi
trap '' 0;;
esac;;

File diff suppressed because it is too large Load diff

View file

@ -51,6 +51,7 @@ perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_N\]),.*\)/$1,['"$VN"'])/' conf
# Remove developer CFLAGS if a release build is being made
if [ -n "${MAKE_LIBARCHIVE_RELEASE}" ]; then
perl -p -i -e "s/^(DEV_CFLAGS.*)/# \$1/" Makefile.am
perl -p -i -e 's/CMAKE_BUILD_TYPE "[A-Za-z]*"/CMAKE_BUILD_TYPE "Release"/' CMakeLists.txt
fi
set -xe

View file

@ -1,43 +0,0 @@
# - Check if the given struct or class has the specified member variable
# CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE)
#
# STRUCT - the name of the struct or class you are interested in
# MEMBER - the member which existence you want to check
# HEADER - the header(s) where the prototype should be declared
# VARIABLE - variable to store the result
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
INCLUDE(CheckCSourceCompiles)
MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT)
SET(_INCLUDE_FILES)
FOREACH (it ${_HEADER})
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
ENDFOREACH (it)
SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE "
${_INCLUDE_FILES}
int main()
{
static ${_STRUCT} tmp;
if (sizeof(tmp.${_MEMBER}))
return 0;
return 0;
}
")
CHECK_C_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT})
ENDMACRO (CHECK_STRUCT_MEMBER)

View file

@ -1,48 +0,0 @@
# - Find lzma and lzmadec
# Find the native LZMA includes and library
#
# LZMA_INCLUDE_DIR - where to find lzma.h, etc.
# LZMA_LIBRARIES - List of libraries when using liblzma.
# LZMA_FOUND - True if liblzma found.
# LZMADEC_INCLUDE_DIR - where to find lzmadec.h, etc.
# LZMADEC_LIBRARIES - List of libraries when using liblzmadec.
# LZMADEC_FOUND - True if liblzmadec found.
IF (LZMA_INCLUDE_DIR)
# Already in cache, be silent
SET(LZMA_FIND_QUIETLY TRUE)
ENDIF (LZMA_INCLUDE_DIR)
FIND_PATH(LZMA_INCLUDE_DIR lzma.h)
FIND_LIBRARY(LZMA_LIBRARY NAMES lzma liblzma)
# handle the QUIETLY and REQUIRED arguments and set LZMA_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZMA DEFAULT_MSG LZMA_LIBRARY LZMA_INCLUDE_DIR)
IF(LZMA_FOUND)
SET( LZMA_LIBRARIES ${LZMA_LIBRARY} )
ELSE(LZMA_FOUND)
SET( LZMA_LIBRARIES )
IF (LZMADEC_INCLUDE_DIR)
# Already in cache, be silent
SET(LZMADEC_FIND_QUIETLY TRUE)
ENDIF (LZMADEC_INCLUDE_DIR)
FIND_PATH(LZMADEC_INCLUDE_DIR lzmadec.h)
FIND_LIBRARY(LZMADEC_LIBRARY NAMES lzmadec )
# handle the QUIETLY and REQUIRED arguments and set LZMADEC_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZMADEC DEFAULT_MSG LZMADEC_LIBRARY
LZMADEC_INCLUDE_DIR)
IF(LZMADEC_FOUND)
SET( LZMADEC_LIBRARIES ${LZMADEC_LIBRARY} )
ELSE(LZMADEC_FOUND)
SET( LZMADEC_LIBRARIES )
ENDIF(LZMADEC_FOUND)
ENDIF(LZMA_FOUND)

View file

@ -293,6 +293,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `acl_create_entry' function. */
#cmakedefine HAVE_ACL_CREATE_ENTRY 1
/* Define to 1 if you have the `acl_get_fd_np' function. */
#cmakedefine HAVE_ACL_GET_FD_NP 1
/* Define to 1 if you have the `acl_get_link' function. */
#cmakedefine HAVE_ACL_GET_LINK 1
@ -323,6 +326,12 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `acl_set_file' function. */
#cmakedefine HAVE_ACL_SET_FILE 1
/* True for FreeBSD with NFSv4 ACL support */
#cmakedefine HAVE_ACL_TYPE_NFS4 1
/* True for MacOS ACL support */
#cmakedefine HAVE_ACL_TYPE_EXTENDED 1
/* True for systems with POSIX ACL support */
#cmakedefine HAVE_ACL_USER 1
@ -721,6 +730,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the <lzma.h> header file. */
#cmakedefine HAVE_LZMA_H 1
/* Define to 1 if you have a working `lzma_stream_encoder_mt' function. */
#cmakedefine HAVE_LZMA_STREAM_ENCODER_MT 1
/* Define to 1 if you have the <lzo/lzo1x.h> header file. */
#cmakedefine HAVE_LZO_LZO1X_H 1
@ -923,6 +935,12 @@ typedef uint64_t uintmax_t;
/* Define to 1 if `__tm_gmtoff' is a member of `struct tm'. */
#cmakedefine HAVE_STRUCT_TM___TM_GMTOFF 1
/* Define to 1 if you have `struct vfsconf'. */
#cmakedefine HAVE_STRUCT_VFSCONF 1
/* Define to 1 if you have `struct xvfsconf'. */
#cmakedefine HAVE_STRUCT_XVFSCONF 1
/* Define to 1 if you have the `symlink' function. */
#cmakedefine HAVE_SYMLINK 1
@ -1081,6 +1099,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have a working EXT2_IOC_GETFLAGS */
#cmakedefine HAVE_WORKING_EXT2_IOC_GETFLAGS 1
/* Define to 1 if you have a working FS_IOC_GETFLAGS */
#cmakedefine HAVE_WORKING_FS_IOC_GETFLAGS 1
/* Define to 1 if you have the <zlib.h> header file. */
#cmakedefine HAVE_ZLIB_H 1

View file

@ -1 +1 @@
3002001
3003001

File diff suppressed because it is too large Load diff

View file

@ -126,9 +126,21 @@
/* Version number of bsdtar */
#undef BSDTAR_VERSION_STRING
/* Define to 1 if the system has the type `ace_t'. */
#undef HAVE_ACE_T
/* Define to 1 if the system has the type `aclent_t'. */
#undef HAVE_ACLENT_T
/* Define to 1 if you have the `acl_create_entry' function. */
#undef HAVE_ACL_CREATE_ENTRY
/* Define to 1 if you have the `acl_get' function. */
#undef HAVE_ACL_GET
/* Define to 1 if you have the `acl_get_fd_np' function. */
#undef HAVE_ACL_GET_FD_NP
/* Define to 1 if you have the `acl_get_link' function. */
#undef HAVE_ACL_GET_LINK
@ -144,12 +156,18 @@
/* Define to 1 if you have the `acl_init' function. */
#undef HAVE_ACL_INIT
/* Define to 1 if you have the `acl_is_trivial_np' function. */
#undef HAVE_ACL_IS_TRIVIAL_NP
/* Define to 1 if you have the <acl/libacl.h> header file. */
#undef HAVE_ACL_LIBACL_H
/* Define to 1 if the system has the type `acl_permset_t'. */
#undef HAVE_ACL_PERMSET_T
/* Define to 1 if you have the `acl_set' function. */
#undef HAVE_ACL_SET
/* Define to 1 if you have the `acl_set_fd' function. */
#undef HAVE_ACL_SET_FD
@ -159,6 +177,12 @@
/* Define to 1 if you have the `acl_set_file' function. */
#undef HAVE_ACL_SET_FILE
/* True for MacOS ACL support */
#undef HAVE_ACL_TYPE_EXTENDED
/* True for FreeBSD with NFSv4 ACL support */
#undef HAVE_ACL_TYPE_NFS4
/* True for systems with POSIX ACL support */
#undef HAVE_ACL_USER
@ -290,6 +314,12 @@
/* Define to 1 if you have the `extattr_set_file' function. */
#undef HAVE_EXTATTR_SET_FILE
/* Define to 1 if you have the `facl_get' function. */
#undef HAVE_FACL_GET
/* Define to 1 if you have the `facl_set' function. */
#undef HAVE_FACL_SET
/* Define to 1 if you have the `fchdir' function. */
#undef HAVE_FCHDIR
@ -452,9 +482,6 @@
/* Define to 1 if you have the `lzma' library (-llzma). */
#undef HAVE_LIBLZMA
/* Define to 1 if you have the `lzmadec' library (-llzmadec). */
#undef HAVE_LIBLZMADEC
/* Define to 1 if you have the `lzo2' library (-llzo2). */
#undef HAVE_LIBLZO2
@ -473,6 +500,9 @@
/* Define to 1 if you have the `regex' library (-lregex). */
#undef HAVE_LIBREGEX
/* Define to 1 if you have the `sec' library (-lsec). */
#undef HAVE_LIBSEC
/* Define to 1 if you have the `xml2' library (-lxml2). */
#undef HAVE_LIBXML2
@ -552,9 +582,6 @@
/* Define to 1 if you have the <lz4.h> header file. */
#undef HAVE_LZ4_H
/* Define to 1 if you have the <lzmadec.h> header file. */
#undef HAVE_LZMADEC_H
/* Define to 1 if you have the <lzma.h> header file. */
#undef HAVE_LZMA_H
@ -787,6 +814,9 @@
/* Define to 1 if the system has the type `struct vfsconf'. */
#undef HAVE_STRUCT_VFSCONF
/* Define to 1 if the system has the type `struct xvfsconf'. */
#undef HAVE_STRUCT_XVFSCONF
/* Define to 1 if you have the `symlink' function. */
#undef HAVE_SYMLINK
@ -945,6 +975,9 @@
/* Define to 1 if you have a working EXT2_IOC_GETFLAGS */
#undef HAVE_WORKING_EXT2_IOC_GETFLAGS
/* Define to 1 if you have a working FS_IOC_GETFLAGS */
#undef HAVE_WORKING_FS_IOC_GETFLAGS
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
@ -976,8 +1009,7 @@
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.

File diff suppressed because it is too large Load diff

View file

@ -4,8 +4,8 @@ dnl First, define all of the version numbers up front.
dnl In particular, this allows the version macro to be used in AC_INIT
dnl These first two version numbers are updated automatically on each release.
m4_define([LIBARCHIVE_VERSION_S],[3.2.1])
m4_define([LIBARCHIVE_VERSION_N],[3002001])
m4_define([LIBARCHIVE_VERSION_S],[3.3.1])
m4_define([LIBARCHIVE_VERSION_N],[3003001])
dnl bsdtar and bsdcpio versioning tracks libarchive
m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
@ -89,7 +89,7 @@ inc_windows_files=no
inc_cygwin_files=no
case "$host_os" in
*mingw* ) inc_windows_files=yes ;;
*cygwin*) inc_cygwin_files=yes ;;
*cygwin* | *msys*) inc_cygwin_files=yes ;;
esac
AM_CONDITIONAL([INC_WINDOWS_FILES], [test $inc_windows_files = yes])
AM_CONDITIONAL([INC_CYGWIN_FILES], [test $inc_cygwin_files = yes])
@ -243,7 +243,7 @@ AM_CONDITIONAL([STATIC_BSDCPIO], [ test "$static_bsdcpio" = yes ])
# Set up defines needed before including any headers
case $host in
*mingw* | *cygwin* )
*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.])
@ -270,6 +270,19 @@ AS_VAR_IF([ac_cv_have_decl_EXT2_IOC_GETFLAGS], [yes],
AC_CHECK_HEADERS([inttypes.h io.h langinfo.h limits.h])
AC_CHECK_HEADERS([linux/fiemap.h linux/fs.h linux/magic.h linux/types.h])
AC_CACHE_CHECK([whether FS_IOC_GETFLAGS is usable],
[ac_cv_have_decl_FS_IOC_GETFLAGS],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include <sys/ioctl.h>
@%:@include <linux/fs.h>],
[int x = FS_IOC_GETFLAGS])],
[AS_VAR_SET([ac_cv_have_decl_FS_IOC_GETFLAGS], [yes])],
[AS_VAR_SET([ac_cv_have_decl_FS_IOC_GETFLAGS], [no])])])
AS_VAR_IF([ac_cv_have_decl_FS_IOC_GETFLAGS], [yes],
[AC_DEFINE_UNQUOTED([HAVE_WORKING_FS_IOC_GETFLAGS], [1],
[Define to 1 if you have a working FS_IOC_GETFLAGS])])
AC_CHECK_HEADERS([locale.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])
@ -302,7 +315,7 @@ AC_ARG_WITH([bz2lib],
if test "x$with_bz2lib" != "xno"; then
AC_CHECK_HEADERS([bzlib.h])
case "$host_os" in
*mingw* | *cygwin*)
*mingw* | *cygwin* | *msys*)
dnl AC_CHECK_LIB cannot be used on the Windows port of libbz2, therefore
dnl use AC_LINK_IFELSE.
AC_MSG_CHECKING([for BZ2_bzDecompressInit in -lbz2])
@ -326,14 +339,6 @@ if test "x$with_bz2lib" != "xno"; then
esac
fi
AC_ARG_WITH([lzmadec],
AS_HELP_STRING([--without-lzmadec], [Don't build support for lzma through lzmadec]))
if test "x$with_lzmadec" != "xno"; then
AC_CHECK_HEADERS([lzmadec.h])
AC_CHECK_LIB(lzmadec,lzmadec_decode)
fi
AC_ARG_WITH([iconv],
AS_HELP_STRING([--without-iconv], [Don't try to link against iconv]))
@ -387,9 +392,9 @@ if test "x$with_lzma" != "xno"; then
fi
AC_ARG_WITH([lzo2],
AS_HELP_STRING([--without-lzo2], [Don't build support for lzop through liblzo2]))
AS_HELP_STRING([--with-lzo2], [Build with LZO support from liblzo2]))
if test "x$with_lzo2" != "xno"; then
if test "x$with_lzo2" = "xyes"; then
AC_CHECK_HEADERS([lzo/lzoconf.h lzo/lzo1x.h])
AC_CHECK_LIB(lzo2,lzo1x_decompress_safe)
fi
@ -624,6 +629,13 @@ AC_CHECK_TYPES(struct vfsconf,,,
#include <sys/mount.h>
])
AC_CHECK_TYPES(struct xvfsconf,,,
[#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(
@ -688,7 +700,8 @@ if test "x$enable_acl" != "xno"; then
AC_CHECK_HEADERS([acl/libacl.h])
AC_CHECK_HEADERS([sys/acl.h])
AC_CHECK_LIB([acl],[acl_get_file])
AC_CHECK_FUNCS([acl_create_entry acl_init acl_set_fd acl_set_fd_np acl_set_file])
AC_CHECK_FUNCS([acl_create_entry acl_get_fd_np])
AC_CHECK_FUNCS([acl_init acl_set_fd acl_set_fd_np acl_set_file])
AC_CHECK_TYPES(acl_permset_t,,,
[#if HAVE_SYS_TYPES_H
@ -703,7 +716,8 @@ if test "x$enable_acl" != "xno"; then
# (It's a pretty obvious oversight; otherwise, there's no way to
# test for specific permissions in a permset.) Linux uses the obvious
# name, FreeBSD adds _np to mark it as "non-Posix extension."
# Test for both as a double-check that we really have POSIX-style ACL support.
# Test for both as a double-check that we really have POSIX-style ACL
# support.
AC_CHECK_FUNCS(acl_get_perm_np acl_get_perm acl_get_link acl_get_link_np,,,
[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
@ -713,12 +727,41 @@ if test "x$enable_acl" != "xno"; then
#endif
])
# Check for acl_is_trivial_np on FreeBSD
AC_CHECK_FUNCS(acl_is_trivial_np,,,
[#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_ACL_H
#include <sys/acl.h>
#endif
])
# Check for ACL_TYPE_NFS4
AC_CHECK_DECL([ACL_TYPE_NFS4],
[AC_DEFINE(HAVE_ACL_TYPE_NFS4, 1, [True for FreeBSD with NFSv4 ACL support])],
[],
[#include <sys/acl.h>])
# MacOS has an acl.h that isn't POSIX. It can be detected by
# checking for ACL_USER
AC_CHECK_DECL([ACL_USER],
[AC_DEFINE(HAVE_ACL_USER, 1, [True for systems with POSIX ACL support])],
[],
[#include <sys/acl.h>])
# MacOS has ACL_TYPE_EXTENDED instead
AC_CHECK_DECL([ACL_TYPE_EXTENDED],
[AC_DEFINE(HAVE_ACL_TYPE_EXTENDED, 1, [True for MacOS ACL support])],
[],
[#include <sys/types.h>
#include <sys/acl.h>])
# Solaris and derivates ACLs
AC_CHECK_LIB([sec], [acl_get])
AC_CHECK_TYPES([aclent_t], [], [], [[#include <sys/acl.h>]])
AC_CHECK_TYPES([ace_t], [], [], [[#include <sys/acl.h>]])
AC_CHECK_FUNCS(acl_get facl_get acl_set facl_set)
fi
# Additional requirements
@ -786,7 +829,7 @@ main(int argc, char **argv)
])
case "$host_os" in
*mingw* | *cygwin*)
*mingw* | *cygwin* | *msys*)
;;
*)
CRYPTO_CHECK(MD5, LIBC, md5)
@ -829,7 +872,7 @@ if test "x$with_openssl" != "xno"; then
AC_CHECK_HEADERS([openssl/evp.h])
saved_LIBS=$LIBS
case "$host_os" in
*mingw* | *cygwin*)
*mingw* | *cygwin* | *msys*)
case "$host_cpu" in
x86_64)
AC_CHECK_LIB(eay64,OPENSSL_config)
@ -875,7 +918,7 @@ if test "x$found_LIBMD" != "xyes"; then
fi
case "$host_os" in
*mingw* | *cygwin*)
*mingw* | *cygwin* | *msys*)
CRYPTO_CHECK_WIN(MD5, CALG_MD5)
CRYPTO_CHECK_WIN(SHA1, CALG_SHA1)
CRYPTO_CHECK_WIN(SHA256, CALG_SHA_256)

View file

@ -127,8 +127,8 @@ rm -fr %buildroot
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log: libarchive.1aix53.spec,v $
Revision 1.7 2016/06/20 17:24:56 joerg
Update for libarchive 3.2.1.
Revision 1.8 2017/02/25 21:11:19 joerg
Merge libarchive-3.3.1.
Release 1aix53 2006/12/12 rm1023@dcx.com
- tweak for aix-5.3

View file

@ -63,6 +63,7 @@ static const struct option {
} cpio_longopts[] = {
{ "b64encode", 0, OPTION_B64ENCODE },
{ "create", 0, 'o' },
{ "dereference", 0, 'L' },
{ "dot", 0, 'V' },
{ "extract", 0, 'i' },
{ "file", 1, 'F' },

View file

@ -498,7 +498,7 @@ long_help(void)
static void
version(void)
{
fprintf(stdout,"bsdcpio %s -- %s\n",
fprintf(stdout,"bsdcpio %s - %s\n",
BSDCPIO_VERSION_STRING,
archive_version_details());
exit(0);
@ -703,6 +703,7 @@ file_to_archive(struct cpio *cpio, const char *srcpath)
lafe_warnc(0, "%s",
archive_error_string(cpio->archive_read_disk));
if (r <= ARCHIVE_FAILED) {
archive_entry_free(entry);
cpio->return_value = 1;
return (r);
}
@ -1324,10 +1325,9 @@ lookup_name(struct cpio *cpio, struct name_cache **name_cache_variable,
if (*name_cache_variable == NULL) {
*name_cache_variable = malloc(sizeof(struct name_cache));
*name_cache_variable = calloc(1, sizeof(struct name_cache));
if (*name_cache_variable == NULL)
lafe_errc(1, ENOMEM, "No more memory");
memset(*name_cache_variable, 0, sizeof(struct name_cache));
(*name_cache_variable)->size = name_cache_size;
}

View file

@ -8,7 +8,7 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
../cmdline.c
../../libarchive_fe/err.c
../../test_utils/test_utils.c
main.c
../../test_utils/test_main.c
test.h
test_0.c
test_basic.c
@ -87,11 +87,13 @@ IF(ENABLE_CPIO AND ENABLE_TEST)
INCLUDE(${CMAKE_CURRENT_BINARY_DIR}/list.h)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/test_utils)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/cpio/test)
# Experimental new test handling
ADD_CUSTOM_TARGET(run_bsdcpio_test
COMMAND bsdcpio_test -p $<TARGET_FILE:bsdcpio>
-r ${CMAKE_CURRENT_SOURCE_DIR})
-r ${CMAKE_CURRENT_SOURCE_DIR}
-vv)
ADD_DEPENDENCIES(run_bsdcpio_test bsdcpio)
ADD_DEPENDENCIES(run_all_tests run_bsdcpio_test)
ENDIF(ENABLE_CPIO AND ENABLE_TEST)

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003-2006 Tim Kientzle
* Copyright (c) 2003-2017 Tim Kientzle
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -22,323 +22,19 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/cpio/test/test.h,v 1.2 2008/06/21 02:17:18 kientzle Exp $
* $FreeBSD$
*/
/* Every test program should #include "test.h" as the first thing. */
/*
* The goal of this file (and the matching test.c) is to
* simplify the very repetitive test-*.c test programs.
*/
#if defined(HAVE_CONFIG_H)
/* Most POSIX platforms use the 'configure' script to build config.h */
#include "config.h"
#elif defined(__FreeBSD__)
/* Building as part of FreeBSD system requires a pre-built config.h. */
#include "config_freebsd.h"
#elif defined(_WIN32) && !defined(__CYGWIN__)
/* Win32 can't run the 'configure' script. */
#include "config_windows.h"
#else
/* Warn if the library hasn't been (automatically or manually) configured. */
#error Oops: No config.h and no pre-built configuration in test.h.
#endif
#define KNOWNREF "test_option_f.cpio.uu"
#define ENVBASE "BSDCPIO" /* Prefix for environment variables. */
#define PROGRAM "bsdcpio" /* Name of program being tested. */
#define PROGRAM_ALIAS "cpio" /* Generic alias for program */
#undef LIBRARY /* Not testing a library. */
#undef EXTRA_DUMP /* How to dump extra data */
#undef EXTRA_ERRNO /* How to dump errno */
/* How to generate extra version info. */
#define EXTRA_VERSION (systemf("%s --version", testprog) ? "" : "")
#include <sys/types.h> /* Windows requires this before sys/stat.h */
#include <sys/stat.h>
#if HAVE_DIRENT_H
#include <dirent.h>
#endif
#ifdef HAVE_DIRECT_H
#include <direct.h>
#define dirent direct
#endif
#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_IO_H
#include <io.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <wchar.h>
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
/*
* System-specific tweaks. We really want to minimize these
* as much as possible, since they make it harder to understand
* the mainline code.
*/
/* Windows (including Visual Studio and MinGW but not Cygwin) */
#if defined(_WIN32) && !defined(__CYGWIN__)
#if !defined(__BORLANDC__)
#undef chdir
#define chdir _chdir
#define strdup _strdup
#endif
#endif
/* Visual Studio */
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf sprintf_s
#endif
#if defined(__BORLANDC__)
#pragma warn -8068 /* Constant out of range in comparison. */
#endif
/* Haiku OS and QNX */
#if defined(__HAIKU__) || defined(__QNXNTO__)
/* Haiku and QNX have typedefs in stdint.h (needed for int64_t) */
#include <stdint.h>
#endif
/* Get a real definition for __FBSDID if we can */
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
/* If not, define it so as to avoid dangling semicolons. */
#ifndef __FBSDID
#define __FBSDID(a) struct _undefined_hack
#endif
#ifndef O_BINARY
#define O_BINARY 0
#endif
/*
* Redefine DEFINE_TEST for use in defining the test functions.
*/
#undef DEFINE_TEST
#define DEFINE_TEST(name) void name(void); void name(void)
/* An implementation of the standard assert() macro */
#define assert(e) assertion_assert(__FILE__, __LINE__, (e), #e, NULL)
/* chdir() and error if it fails */
#define assertChdir(path) \
assertion_chdir(__FILE__, __LINE__, path)
/* Assert two integers are the same. Reports value of each one if not. */
#define assertEqualInt(v1,v2) \
assertion_equal_int(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL)
/* Assert two strings are the same. Reports value of each one if not. */
#define assertEqualString(v1,v2) \
assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 0)
#define assertEqualUTF8String(v1,v2) \
assertion_equal_string(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL, 1)
/* As above, but v1 and v2 are wchar_t * */
#define assertEqualWString(v1,v2) \
assertion_equal_wstring(__FILE__, __LINE__, (v1), #v1, (v2), #v2, NULL)
/* As above, but raw blocks of bytes. */
#define assertEqualMem(v1, v2, l) \
assertion_equal_mem(__FILE__, __LINE__, (v1), #v1, (v2), #v2, (l), #l, NULL)
/* Assert that memory is full of a specified byte */
#define assertMemoryFilledWith(v1, l, b) \
assertion_memory_filled_with(__FILE__, __LINE__, (v1), #v1, (l), #l, (b), #b, NULL)
/* Assert two files are the same. */
#define assertEqualFile(f1, f2) \
assertion_equal_file(__FILE__, __LINE__, (f1), (f2))
/* Assert that a file is empty. */
#define assertEmptyFile(pathname) \
assertion_empty_file(__FILE__, __LINE__, (pathname))
/* Assert that a file is not empty. */
#define assertNonEmptyFile(pathname) \
assertion_non_empty_file(__FILE__, __LINE__, (pathname))
#define assertFileAtime(pathname, sec, nsec) \
assertion_file_atime(__FILE__, __LINE__, pathname, sec, nsec)
#define assertFileAtimeRecent(pathname) \
assertion_file_atime_recent(__FILE__, __LINE__, pathname)
#define assertFileBirthtime(pathname, sec, nsec) \
assertion_file_birthtime(__FILE__, __LINE__, pathname, sec, nsec)
#define assertFileBirthtimeRecent(pathname) \
assertion_file_birthtime_recent(__FILE__, __LINE__, pathname)
/* Assert that a file exists; supports printf-style arguments. */
#define assertFileExists(pathname) \
assertion_file_exists(__FILE__, __LINE__, pathname)
/* Assert that a file exists. */
#define assertFileNotExists(pathname) \
assertion_file_not_exists(__FILE__, __LINE__, pathname)
/* Assert that file contents match a string. */
#define assertFileContents(data, data_size, pathname) \
assertion_file_contents(__FILE__, __LINE__, data, data_size, pathname)
#define assertFileMtime(pathname, sec, nsec) \
assertion_file_mtime(__FILE__, __LINE__, pathname, sec, nsec)
#define assertFileMtimeRecent(pathname) \
assertion_file_mtime_recent(__FILE__, __LINE__, pathname)
#define assertFileNLinks(pathname, nlinks) \
assertion_file_nlinks(__FILE__, __LINE__, pathname, nlinks)
#define assertFileSize(pathname, size) \
assertion_file_size(__FILE__, __LINE__, pathname, size)
#define assertTextFileContents(text, pathname) \
assertion_text_file_contents(__FILE__, __LINE__, text, pathname)
#define assertFileContainsLinesAnyOrder(pathname, lines) \
assertion_file_contains_lines_any_order(__FILE__, __LINE__, pathname, lines)
#define assertIsDir(pathname, mode) \
assertion_is_dir(__FILE__, __LINE__, pathname, mode)
#define assertIsHardlink(path1, path2) \
assertion_is_hardlink(__FILE__, __LINE__, path1, path2)
#define assertIsNotHardlink(path1, path2) \
assertion_is_not_hardlink(__FILE__, __LINE__, path1, path2)
#define assertIsReg(pathname, mode) \
assertion_is_reg(__FILE__, __LINE__, pathname, mode)
#define assertIsSymlink(pathname, contents) \
assertion_is_symlink(__FILE__, __LINE__, pathname, contents)
/* Create a directory, report error if it fails. */
#define assertMakeDir(dirname, mode) \
assertion_make_dir(__FILE__, __LINE__, dirname, mode)
#define assertMakeFile(path, mode, contents) \
assertion_make_file(__FILE__, __LINE__, path, mode, -1, contents)
#define assertMakeBinFile(path, mode, csize, contents) \
assertion_make_file(__FILE__, __LINE__, path, mode, csize, contents)
#define assertMakeHardlink(newfile, oldfile) \
assertion_make_hardlink(__FILE__, __LINE__, newfile, oldfile)
#define assertMakeSymlink(newfile, linkto) \
assertion_make_symlink(__FILE__, __LINE__, newfile, linkto)
#define assertNodump(path) \
assertion_nodump(__FILE__, __LINE__, path)
#define assertUmask(mask) \
assertion_umask(__FILE__, __LINE__, mask)
#define assertUtimes(pathname, atime, atime_nsec, mtime, mtime_nsec) \
assertion_utimes(__FILE__, __LINE__, pathname, atime, atime_nsec, mtime, mtime_nsec)
/*
* This would be simple with C99 variadic macros, but I don't want to
* require that. Instead, I insert a function call before each
* skipping() call to pass the file and line information down. Crude,
* but effective.
*/
#define skipping \
skipping_setup(__FILE__, __LINE__);test_skipping
/* Function declarations. These are defined in test_utility.c. */
void failure(const char *fmt, ...);
int assertion_assert(const char *, int, int, const char *, void *);
int assertion_chdir(const char *, int, const char *);
int assertion_empty_file(const char *, int, const char *);
int assertion_equal_file(const char *, int, const char *, const char *);
int assertion_equal_int(const char *, int, long long, const char *, long long, const char *, void *);
int assertion_equal_mem(const char *, int, const void *, const char *, const void *, const char *, size_t, const char *, void *);
int assertion_memory_filled_with(const char *, int, const void *, const char *, size_t, const char *, char, const char *, void *);
int assertion_equal_string(const char *, int, const char *v1, const char *, const char *v2, const char *, void *, int);
int assertion_equal_wstring(const char *, int, const wchar_t *v1, const char *, const wchar_t *v2, const char *, void *);
int assertion_file_atime(const char *, int, const char *, long, long);
int assertion_file_atime_recent(const char *, int, const char *);
int assertion_file_birthtime(const char *, int, const char *, long, long);
int assertion_file_birthtime_recent(const char *, int, const char *);
int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **);
int assertion_file_contents(const char *, int, const void *, int, const char *);
int assertion_file_exists(const char *, int, const char *);
int assertion_file_mtime(const char *, int, const char *, long, long);
int assertion_file_mtime_recent(const char *, int, const char *);
int assertion_file_nlinks(const char *, int, const char *, int);
int assertion_file_not_exists(const char *, int, const char *);
int assertion_file_size(const char *, int, const char *, long);
int assertion_is_dir(const char *, int, const char *, int);
int assertion_is_hardlink(const char *, int, const char *, const char *);
int assertion_is_not_hardlink(const char *, int, const char *, const char *);
int assertion_is_reg(const char *, int, const char *, int);
int assertion_is_symlink(const char *, int, const char *, const char *);
int assertion_make_dir(const char *, int, const char *, int);
int assertion_make_file(const char *, int, const char *, int, int, const void *);
int assertion_make_hardlink(const char *, int, const char *newpath, const char *);
int assertion_make_symlink(const char *, int, const char *newpath, const char *);
int assertion_nodump(const char *, int, const char *);
int assertion_non_empty_file(const char *, int, const char *);
int assertion_text_file_contents(const char *, int, const char *buff, const char *f);
int assertion_umask(const char *, int, int);
int assertion_utimes(const char *, int, const char *, long, long, long, long );
void skipping_setup(const char *, int);
void test_skipping(const char *fmt, ...);
/* Like sprintf, then system() */
int systemf(const char * fmt, ...);
/* Delay until time() returns a value after this. */
void sleepUntilAfter(time_t);
/* Return true if this platform can create symlinks. */
int canSymlink(void);
/* Return true if this platform can run the "bzip2" program. */
int canBzip2(void);
/* Return true if this platform can run the "grzip" program. */
int canGrzip(void);
/* Return true if this platform can run the "gzip" program. */
int canGzip(void);
/* Return true if this platform can run the specified command. */
int canRunCommand(const char *);
/* Return true if this platform can run the "lrzip" program. */
int canLrzip(void);
/* Return true if this platform can run the "lz4" program. */
int canLz4(void);
/* Return true if this platform can run the "lzip" program. */
int canLzip(void);
/* Return true if this platform can run the "lzma" program. */
int canLzma(void);
/* Return true if this platform can run the "lzop" program. */
int canLzop(void);
/* Return true if this platform can run the "xz" program. */
int canXz(void);
/* Return true if this filesystem can handle nodump flags. */
int canNodump(void);
/* Return true if the file has large i-node number(>0xffffffff). */
int is_LargeInode(const char *);
/* Suck file into string allocated via malloc(). Call free() when done. */
/* Supports printf-style args: slurpfile(NULL, "%s/myfile", refdir); */
char *slurpfile(size_t *, const char *fmt, ...);
/* Dump block of bytes to a file. */
void dumpfile(const char *filename, void *, size_t);
/* Extracts named reference file to the current directory. */
void extract_reference_file(const char *);
/* Copies named reference file to the current directory. */
void copy_reference_file(const char *);
/* Extracts a list of files to the current directory.
* List must be NULL terminated.
*/
void extract_reference_files(const char **);
/* Path to working directory for current test */
extern const char *testworkdir;
/*
* Special interfaces for program test harness.
*/
/* Pathname of exe to be tested. */
extern const char *testprogfile;
/* Name of exe to use in printf-formatted command strings. */
/* On Windows, this includes leading/trailing quotes. */
extern const char *testprog;
#ifdef USE_DMALLOC
#include <dmalloc.h>
#endif
#include "test_common.h"

View file

@ -49,6 +49,7 @@ DEFINE_TEST(test_option_u)
p = slurpfile(&s, "copy/f");
assertEqualInt(s, 1);
assertEqualMem(p, "a", 1);
free(p);
/* Recreate the file with a single "b" */
assertMakeFile("f", 0644, "b");
@ -68,6 +69,7 @@ DEFINE_TEST(test_option_u)
p = slurpfile(&s, "copy/f");
assertEqualInt(s, 1);
assertEqualMem(p, "a", 1);
free(p);
/* Copy the file to the "copy" dir with -u (force) */
r = systemf("echo f| %s -pud copy >copy.out 2>copy.err",
@ -78,4 +80,5 @@ DEFINE_TEST(test_option_u)
p = slurpfile(&s, "copy/f");
assertEqualInt(s, 1);
assertEqualMem(p, "b", 1);
free(p);
}

View file

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2003-2007 Tim Kientzle
* Copyright (c) 2003-2017 Tim Kientzle
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -23,92 +23,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
/*
* Test that --version option works and generates reasonable output.
*/
static void
verify(const char *p, size_t s)
{
const char *q = p;
/* Version message should start with name of program, then space. */
failure("version message too short:", p);
if (!assert(s > 6))
return;
failure("Version message should begin with 'bsdcpio': %s", p);
if (!assertEqualMem(q, "bsdcpio ", 8))
/* If we're not testing bsdcpio, don't keep going. */
return;
q += 8; s -= 8;
/* Version number is a series of digits and periods. */
while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) {
++q;
--s;
}
/* Version number terminated by space. */
failure("Version: %s", p);
assert(s > 1);
/* Skip a single trailing a,b,c, or d. */
if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd')
++q;
failure("Version: %s", p);
assert(*q == ' ');
++q; --s;
/* Separator. */
failure("Version: %s", p);
assertEqualMem(q, "-- ", 3);
q += 3; s -= 3;
/* libarchive name and version number */
assert(s > 11);
failure("Version: %s", p);
assertEqualMem(q, "libarchive ", 11);
q += 11; s -= 11;
/* Version number is a series of digits and periods. */
while (s > 0 && (*q == '.' || (*q >= '0' && *q <= '9'))) {
++q;
--s;
}
/* Skip a single trailing a,b,c, or d. */
if (*q == 'a' || *q == 'b' || *q == 'c' || *q == 'd')
++q;
/* Skip arbitrary third-party version numbers. */
while (s > 0 && (*q == ' ' || *q == '/' || *q == '.' || isalnum(*q))) {
++q;
--s;
}
/* All terminated by end-of-line: \r, \r\n, or \n */
assert(s >= 1);
failure("Version: %s", p);
if (*q == '\x0d') {
if (q[1] != '\0')
assertEqualMem(q, "\x0d\x0a", 2);
} else
assertEqualMem(q, "\x0a", 1);
}
DEFINE_TEST(test_option_version)
{
int r;
char *p;
size_t s;
r = systemf("%s --version >version.stdout 2>version.stderr", testprog);
if (r != 0)
r = systemf("%s -W version >version.stdout 2>version.stderr",
testprog);
failure("Unable to run either %s --version or %s -W version",
testprog, testprog);
if (!assert(r == 0))
return;
/* --version should generate nothing to stderr. */
assertEmptyFile("version.stderr");
/* Verify format of version message. */
p = slurpfile(&s, "version.stdout");
verify(p, s);
free(p);
assertVersion(testprog, "bsdcpio");
}

View file

@ -46,11 +46,14 @@ DEFINE_TEST(test_option_y)
}
failure("-y option is broken");
assertEqualInt(r, 0);
return;
goto done;
}
assertTextFileContents("1 block\n", "archive.err");
/* Check that the archive file has a bzip2 signature. */
free(p);
p = slurpfile(&s, "archive.out");
assert(s > 2);
assertEqualMem(p, "BZh9", 4);
done:
free(p);
}

View file

@ -38,7 +38,7 @@ static const int root_gids[] = { 0, 1 };
* its primary group membership depends on how the user set up
* their /etc/passwd. Likely values are 513 (None), 545 (Users),
* or 544 (Administrators). Just check for one of those...
* TODO: Handle non-English localizations...e.g. French 'Administrateur'
* TODO: Handle non-English localizations... e.g. French 'Administrateur'
* Use CreateWellKnownSID() and LookupAccountName()?
*/
#define ROOT "Administrator"

View file

@ -104,15 +104,15 @@ archive_write_set_passphrase.3.html: ../../libarchive/archive_write_set_passphra
cpio.5.html: ../../libarchive/cpio.5
groff -mdoc -T html ../../libarchive/cpio.5 > cpio.5.html
libarchive-formats.5.html: ../../libarchive/libarchive-formats.5
groff -mdoc -T html ../../libarchive/libarchive-formats.5 > libarchive-formats.5.html
libarchive.3.html: ../../libarchive/libarchive.3
groff -mdoc -T html ../../libarchive/libarchive.3 > libarchive.3.html
libarchive_changes.3.html: ../../libarchive/libarchive_changes.3
groff -mdoc -T html ../../libarchive/libarchive_changes.3 > libarchive_changes.3.html
libarchive-formats.5.html: ../../libarchive/libarchive-formats.5
groff -mdoc -T html ../../libarchive/libarchive-formats.5 > libarchive-formats.5.html
libarchive_internals.3.html: ../../libarchive/libarchive_internals.3
groff -mdoc -T html ../../libarchive/libarchive_internals.3 > libarchive_internals.3.html
@ -127,4 +127,4 @@ bsdtar.1.html: ../../tar/bsdtar.1
bsdcpio.1.html: ../../cpio/bsdcpio.1
groff -mdoc -T html ../../cpio/bsdcpio.1 > bsdcpio.1.html
all: archive_entry.3.html archive_entry_acl.3.html archive_entry_linkify.3.html archive_entry_paths.3.html archive_entry_perms.3.html archive_entry_stat.3.html archive_entry_time.3.html archive_read.3.html archive_read_add_passphrase.3.html archive_read_data.3.html archive_read_disk.3.html archive_read_extract.3.html archive_read_filter.3.html archive_read_format.3.html archive_read_free.3.html archive_read_header.3.html archive_read_new.3.html archive_read_open.3.html archive_read_set_options.3.html archive_util.3.html archive_write.3.html archive_write_blocksize.3.html archive_write_data.3.html archive_write_disk.3.html archive_write_filter.3.html archive_write_finish_entry.3.html archive_write_format.3.html archive_write_free.3.html archive_write_header.3.html archive_write_new.3.html archive_write_open.3.html archive_write_set_options.3.html archive_write_set_passphrase.3.html cpio.5.html libarchive.3.html libarchive_changes.3.html libarchive-formats.5.html libarchive_internals.3.html mtree.5.html tar.5.html bsdtar.1.html bsdcpio.1.html
all: archive_entry.3.html archive_entry_acl.3.html archive_entry_linkify.3.html archive_entry_paths.3.html archive_entry_perms.3.html archive_entry_stat.3.html archive_entry_time.3.html archive_read.3.html archive_read_add_passphrase.3.html archive_read_data.3.html archive_read_disk.3.html archive_read_extract.3.html archive_read_filter.3.html archive_read_format.3.html archive_read_free.3.html archive_read_header.3.html archive_read_new.3.html archive_read_open.3.html archive_read_set_options.3.html archive_util.3.html archive_write.3.html archive_write_blocksize.3.html archive_write_data.3.html archive_write_disk.3.html archive_write_filter.3.html archive_write_finish_entry.3.html archive_write_format.3.html archive_write_free.3.html archive_write_header.3.html archive_write_new.3.html archive_write_open.3.html archive_write_set_options.3.html archive_write_set_passphrase.3.html cpio.5.html libarchive-formats.5.html libarchive.3.html libarchive_changes.3.html libarchive_internals.3.html mtree.5.html tar.5.html bsdtar.1.html bsdcpio.1.html

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:05 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:01 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:05 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:01 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -30,10 +30,13 @@ ARCHIVE_ENTRY_ACL(3)</p>
<b>archive_entry_acl_add_entry_w</b>,
<b>archive_entry_acl_clear</b>,
<b>archive_entry_acl_count</b>,
<b>archive_entry_acl_next</b>,
<b>archive_entry_acl_next_w</b>,
<b>archive_entry_acl_from_text</b>,
<b>archive_entry_acl_from_text_w,
archive_entry_acl_next</b>, <b>archive_entry_acl_next_w</b>,
<b>archive_entry_acl_reset</b>,
<b>archive_entry_acl_text_w</b> &mdash; functions for
<b>archive_entry_acl_to_text</b>,
<b>archive_entry_acl_to_text_w</b>,
<b>archive_entry_acl_types</b> &mdash; functions for
manipulating Access Control Lists in archive entry
descriptions</p>
@ -77,6 +80,20 @@ descriptions</p>
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
<p><b>archive_entry_acl_from_text</b>(<i>struct&nbsp;archive_entry&nbsp;*a</i>,
<i>const&nbsp;char&nbsp;*text</i>,
<i>int&nbsp;type</i>);</p>
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
<p><b>archive_entry_acl_from_text_w</b>(<i>struct&nbsp;archive_entry&nbsp;*a</i>,
<i>const&nbsp;wchar_t&nbsp;*text</i>,
<i>int&nbsp;type</i>);</p>
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
<p><b>archive_entry_acl_next</b>(<i>struct&nbsp;archive_entry&nbsp;*a</i>,
<i>int&nbsp;type</i>, <i>int&nbsp;*ret_type</i>,
<i>int&nbsp;*ret_permset</i>, <i>int&nbsp;*ret_tag</i>,
@ -98,86 +115,287 @@ descriptions</p>
<p style="margin-left:12%;"><b>archive_entry_acl_reset</b>(<i>struct&nbsp;archive_entry&nbsp;*a</i>,
<i>int&nbsp;type</i>);</p>
<p style="margin-left:6%; margin-top: 1em"><i>const wchar_t
<p style="margin-left:6%; margin-top: 1em"><i>char
*</i></p>
<p style="margin-left:12%;"><b>archive_entry_acl_text_w</b>(<i>struct&nbsp;archive_entry&nbsp;*a</i>,
<i>int&nbsp;flags</i>);</p>
<p><b>archive_entry_acl_to_text</b>(<i>struct&nbsp;archive_entry&nbsp;*a</i>,
<i>ssize_t&nbsp;*len_p</i>, <i>int&nbsp;flags</i>);</p>
<p style="margin-left:6%; margin-top: 1em"><i>wchar_t
*</i></p>
<p><b>archive_entry_acl_to_text_w</b>(<i>struct&nbsp;archive_entry&nbsp;*a</i>,
<i>ssize_t&nbsp;*len_p</i>, <i>int&nbsp;flags</i>);</p>
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
<p style="margin-left:12%;"><b>archive_entry_acl_types</b>(<i>struct&nbsp;archive_entry&nbsp;*a</i>);</p>
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
<p style="margin-left:6%;">An &rsquo;&rsquo;Access Control
List&rsquo;&rsquo; is a generalisation of the classic Unix
permission system. The ACL interface of <b>libarchive</b> is
derived from the POSIX.1e draft, but restricted to simplify
dealing with practical implementations in various Operating
Systems and archive formats.</p>
<p style="margin-left:6%;">The &lsquo;&lsquo;Access Control
Lists (ACLs)&rsquo;&rsquo; extend the standard Unix perssion
model. The ACL interface of <b>libarchive</b> supports both
POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by
various levels of ACL support in operating systems, file
systems and archive formats.</p>
<p style="margin-left:6%; margin-top: 1em">An ACL consists
of a number of independent entries. Each entry specifies the
permission set as bitmask of basic permissions. Valid
permissions are:</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>
are:</p>
<p>ARCHIVE_ENTRY_ACL_EXECUTE <br>
ARCHIVE_ENTRY_ACL_WRITE <br>
ARCHIVE_ENTRY_ACL_READ</p>
<p>ARCHIVE_ENTRY_ACL_READ (<b>r</b>) <br>
ARCHIVE_ENTRY_ACL_WRITE (<b>w</b>) <br>
ARCHIVE_ENTRY_ACL_EXECUTE (<b>x</b>)</p>
<p style="margin-left:6%; margin-top: 1em">The permissions
correspond to the normal Unix permissions.</p>
<p style="margin-left:6%;">The permissions correspond to
the normal Unix permissions.</p>
<p style="margin-left:6%; margin-top: 1em">The tag
<p style="margin-left:6%; margin-top: 1em">The <i>tag</i>
specifies the principal to which the permission applies.
Valid values are:</p>
<p>ARCHIVE_ENTRY_ACL_USER</p>
<p style="margin-left:51%; margin-top: 1em">The user
specified by the name field.</p>
<p style="margin-left:51%;">The user specified by the name
field.</p>
<p>ARCHIVE_ENTRY_ACL_USER_OBJ</p>
<p style="margin-left:51%; margin-top: 1em">The owner of
the file.</p>
<p style="margin-left:51%;">The owner of the file.</p>
<p>ARCHIVE_ENTRY_ACL_GROUP</p>
<p style="margin-left:51%; margin-top: 1em">The group
specied by the name field.</p>
<p style="margin-left:51%;">The group specied by the name
field.</p>
<p>ARCHIVE_ENTRY_ACL_GROUP_OBJ</p>
<p style="margin-left:51%; margin-top: 1em">The group who
owns the file.</p>
<p style="margin-left:51%;">The group who owns the
file.</p>
<p>ARCHIVE_ENTRY_ACL_MASK</p>
<p style="margin-left:51%; margin-top: 1em">The maximum
permissions to be obtained via group permissions.</p>
<p style="margin-left:51%;">The maximum permissions to be
obtained via group permissions.</p>
<p>ARCHIVE_ENTRY_ACL_OTHER</p>
<p style="margin-left:51%; margin-top: 1em">Any principal
who doesn&rsquo;t have a user or group entry.</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:6%;">The principals
<p style="margin-left:6%; margin-top: 1em">The principals
ARCHIVE_ENTRY_ACL_USER_OBJ, ARCHIVE_ENTRY_ACL_GROUP_OBJ and
ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and
other in the classic Unix permission model and specify
non-extended ACL entries.</p>
<p style="margin-left:6%; margin-top: 1em">All files have
an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This
<p style="margin-left:6%; margin-top: 1em">All files with
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>
<p style="margin-left:6%; margin-top: 1em"><b>NFSv4 Access
Control Lists</b> <br>
A NFSv4 ACL consists of multiple individual entries called
Access Control Entries (ACEs).</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_add_entry</b>()
and <b>archive_entry_acl_add_entry_w</b>() add a single ACL
<p style="margin-left:6%; margin-top: 1em">There are four
possible types of a NFSv4 ACE:</p>
<p>ARCHIVE_ENTRY_ACL_TYPE_ALLOW</p>
<p style="margin-left:51%;">Allow principal to perform
actions requiring given permissions.</p>
<p>ARCHIVE_ENTRY_ACL_TYPE_DENY</p>
<p style="margin-left:51%;">Prevent principal from
performing actions requiring given permissions.</p>
<p>ARCHIVE_ENTRY_ACL_TYPE_AUDIT</p>
<p style="margin-left:51%;">Log access attempts by
principal which require given permissions.</p>
<p>ARCHIVE_ENTRY_ACL_TYPE_ALARM</p>
<p style="margin-left:51%;">Trigger a system alarm on
access attempts by principal which require given
permissions.</p>
<p style="margin-left:6%; margin-top: 1em">The <i>tag</i>
specifies the principal to which the permission applies.
Valid values are:</p>
<p>ARCHIVE_ENTRY_ACL_USER</p>
<p style="margin-left:51%;">The user specified by the name
field.</p>
<p>ARCHIVE_ENTRY_ACL_USER_OBJ</p>
<p style="margin-left:51%;">The owner of the file.</p>
<p>ARCHIVE_ENTRY_ACL_GROUP</p>
<p style="margin-left:51%;">The group specied by the name
field.</p>
<p>ARCHIVE_ENTRY_ACL_GROUP_OBJ</p>
<p style="margin-left:51%;">The group who 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:6%; margin-top: 1em">Entries with the
ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag store
the user and group name in the <i>name</i> string and
optionally the user or group ID in the <i>qualifier</i>
integer.</p>
<p style="margin-left:6%; margin-top: 1em">NFSv4 ACE
permissions and flags are stored in the same <i>permset</i>
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:</p>
<p>ARCHIVE_ENTRY_ACL_READ_DATA (<b>r</b>)</p>
<p style="margin-left:24%;">Read data (file).</p>
<p>ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (<b>r</b>)</p>
<p style="margin-left:24%;">List entries (directory).</p>
<p>ARCHIVE_ENTRY_ACL_WRITE_DATA (<b>w</b>)</p>
<p style="margin-left:24%;">Write data (file).</p>
<p>ARCHIVE_ENTRY_ACL_ADD_FILE (<b>w</b>)</p>
<p style="margin-left:24%;">Create files (directory).</p>
<p>ARCHIVE_ENTRY_ACL_EXECUTE (<b>x</b>)</p>
<p style="margin-left:24%;">Execute file or change into a
directory.</p>
<p>ARCHIVE_ENTRY_ACL_APPEND_DATA (<b>p</b>)</p>
<p style="margin-left:24%;">Append data (file).</p>
<p>ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (<b>p</b>)</p>
<p style="margin-left:24%;">Create subdirectories
(directory).</p>
<p>ARCHIVE_ENTRY_ACL_DELETE_CHILD (<b>D</b>)</p>
<p style="margin-left:24%;">Remove files and subdirectories
inside a directory.</p>
<p>ARCHIVE_ENTRY_ACL_DELETE (<b>d</b>)</p>
<p style="margin-left:24%;">Remove file or directory.</p>
<p>ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (<b>a</b>)</p>
<p style="margin-left:24%;">Read file or directory
attributes.</p>
<p>ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (<b>A</b>)</p>
<p style="margin-left:24%;">Write file or directory
attributes.</p>
<p>ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (<b>R</b>)</p>
<p style="margin-left:24%;">Read named file or directory
attributes.</p>
<p>ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (<b>W</b>)</p>
<p style="margin-left:24%;">Write named file or directory
attributes.</p>
<p>ARCHIVE_ENTRY_ACL_READ_ACL (<b>c</b>)</p>
<p style="margin-left:24%;">Read file or directory ACL.</p>
<p>ARCHIVE_ENTRY_ACL_WRITE_ACL (<b>C</b>)</p>
<p style="margin-left:24%;">Write file or directory
ACL.</p>
<p>ARCHIVE_ENTRY_ACL_WRITE_OWNER (<b>o</b>)</p>
<p style="margin-left:24%;">Change owner of a file or
directory.</p>
<p>ARCHIVE_ENTRY_ACL_SYNCHRONIZE (<b>s</b>)</p>
<p style="margin-left:24%;">Use synchronous I/O.</p>
<p style="margin-left:6%; margin-top: 1em">The following
NFSv4 ACL inheritance flags are supported:</p>
<p>ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (<b>f</b>)</p>
<p style="margin-left:24%;">Inherit parent directory ACE to
files.</p>
<p>ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (<b>d</b>)</p>
<p style="margin-left:24%;">Inherit parent directory ACE to
subdirectories.</p>
<p>ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (<b>i</b>)</p>
<p style="margin-left:24%;">Only inherit, do not apply the
permission on the directory itself.</p>
<p>ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT
(<b>n</b>)</p>
<p style="margin-left:24%;">Do not propagate inherit flags.
Only first-level entries inherit ACLs.</p>
<p>ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (<b>S</b>)</p>
<p style="margin-left:24%;">Trigger alarm or audit on
succesful access.</p>
<p>ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (<b>F</b>)</p>
<p style="margin-left:24%;">Trigger alarm or audit on
failed access.</p>
<p>ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (<b>I</b>)</p>
<p style="margin-left:24%;">Mark that ACE was
inherited.</p>
<p style="margin-left:6%; margin-top: 1em"><b>Functions
<br>
archive_entry_acl_add_entry</b>() and
<b>archive_entry_acl_add_entry_w</b>() add a single ACL
entry. For the access ACL and non-extended principals, the
classic Unix permissions are updated.</p>
classic Unix permissions are updated. An archive enry cannot
contain both POSIX.1e and NFSv4 ACL entries.</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_clear</b>()
@ -187,12 +405,45 @@ pointer.</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_count</b>()
counts the ACL entries that have the given type mask.
<i>type</i> can be the bitwise-or of
ARCHIVE_ENTRY_ACL_TYPE_ACCESS and
ARCHIVE_ENTRY_ACL_TYPE_DEFAULT. If
ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one
extended ACL entry is found, the three non-extened ACLs are
added.</p>
<i>type</i> can be the bitwise-or of</p>
<p>ARCHIVE_ENTRY_ACL_TYPE_ACCESS <br>
ARCHIVE_ENTRY_ACL_TYPE_DEFAULT</p>
<p style="margin-left:6%; margin-top: 1em">for POSIX.1e
ACLs and</p>
<p>ARCHIVE_ENTRY_ACL_TYPE_ALLOW <br>
ARCHIVE_ENTRY_ACL_TYPE_DENY <br>
ARCHIVE_ENTRY_ACL_TYPE_AUDIT <br>
ARCHIVE_ENTRY_ACL_TYPE_ALARM</p>
<p style="margin-left:6%; margin-top: 1em">for NFSv4 ACLs.
For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is
included and at least one extended ACL entry is found, the
three non-extened ACLs are added.</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_from_text</b>()
and <b>archive_entry_acl_from_text_w</b>() add new (or merge
with existing) ACL entries from (wide) text. The argument
<i>type</i> may take one of the following values:</p>
<p>ARCHIVE_ENTRY_ACL_TYPE_ACCESS <br>
ARCHIVE_ENTRY_ACL_TYPE_DEFAULT <br>
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_w</b>(). Existing ACL entries
are preserved. To get a clean new ACL from text
<b>archive_entry_acl_clear</b>() must be called first.
Entries prefixed with &lsquo;&lsquo;default:&rsquo;&rsquo;
are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless
<i>type</i> is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries,
non-parseable ACL entries and entries beginning with the
&lsquo;#&rsquo; character (comments) are skipped.</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_next</b>()
@ -213,27 +464,89 @@ 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_text_w</b>()
converts the ACL entries for the given type mask into a wide
string. In addition to the normal type flags,
ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID and
ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT can be specified to
further customize the result. The returned long string is
valid until the next call to
<b>archive_entry_acl_clear</b>(),
<b>archive_entry_acl_add_entry</b>(),
<b>archive_entry_acl_add_entry_w</b>() or
<b>archive_entry_acl_text_w</b>().</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_to_text</b>()
and <b>archive_entry_acl_to_text_w</b>() convert the ACL
entries for the given type into a (wide) string of ACL
entries separated by newline. If the the pointer
<i>len_p</i> is not NULL, then the function shall return the
length of the string (not including the NULL terminator) in
the location pointed to by <i>len_p</i>. The <i>flag</i>
argument is a bitwise-or.</p>
<p style="margin-left:6%; margin-top: 1em">The following
flags are effective only on POSIX.1e ACL:</p>
<p>ARCHIVE_ENTRY_ACL_TYPE_ACCESS</p>
<p style="margin-left:24%;">Output access ACLs.</p>
<p>ARCHIVE_ENTRY_ACL_TYPE_DEFAULT</p>
<p style="margin-left:24%;">Output POSIX.1e default
ACLs.</p>
<p>ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT</p>
<p style="margin-left:24%;">Prefix each default ACL entry
with the word &lsquo;&lsquo;default:&rsquo;&rsquo;.</p>
<p>ARCHIVE_ENTRY_ACL_STYLE_SOLARIS</p>
<p style="margin-left:24%;">The mask and other ACLs don not
contain a double colon.</p>
<p style="margin-left:6%; margin-top: 1em">The following
flags are effecive only on NFSv4 ACL:</p>
<p>ARCHIVE_ENTRY_ACL_STYLE_COMPACT</p>
<p style="margin-left:24%;">Do not output minus characters
for unset permissions and flags in NFSv4 ACL permission and
flag fields.</p>
<p style="margin-left:6%; margin-top: 1em">The following
flags are effective on both POSIX.1e and NFSv4 ACL:</p>
<p>ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID</p>
<p style="margin-left:24%;">Add an additional
colon-separated field containing the user or group id.</p>
<p>ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA</p>
<p style="margin-left:24%;">Separate ACL entries with comma
instead of newline.</p>
<p style="margin-left:6%; margin-top: 1em">If the archive
entry contains NFSv4 ACLs, all types of NFSv4 ACLs are
returned. It the entry contains POSIX.1e ACLs and none of
the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or
ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are specified, both access
and default entries are returned and default entries are
prefixed with &lsquo;&lsquo;default:&rsquo;&rsquo;.</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_types</b>()
get ACL entry types contained in an archive entry&rsquo;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.</p>
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
<p style="margin-left:6%;"><b>archive_entry_acl_count</b>()
and <b>archive_entry_acl_reset</b>() returns the number of
ACL entries that match the given type mask. If the type mask
includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one
extended ACL entry exists, the three classic Unix
permissions are counted.</p>
ACL entries that match the given type mask. For POSIX.1e
ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS
and at least one extended ACL entry exists, the three
classic Unix permissions are counted.</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_from_text</b>()
and <b>archive_entry_acl_from_text_w</b>() return ARCHIVE_OK
if all entries were successfully parsed and ARCHIVE_WARN if
one or more entries were invalid or non-parseable.</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_next</b>()
@ -243,29 +556,27 @@ 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_text_w</b>()
returns a wide string representation of the ACL entrise
matching the given type mask. The returned long string is
valid until the next call to
<b>archive_entry_acl_clear</b>(),
<b>archive_entry_acl_add_entry</b>(),
<b>archive_entry_acl_add_entry_w</b>() or
<b>archive_entry_acl_text_w</b>().</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_to_text</b>()
returns a string representing the ACL entries matching the
given type and flags on success or NULL on error.</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_to_text_w</b>()
returns a wide string representing the ACL entries matching
the given type and flags on success or NULL on error.</p>
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_types</b>()
returns a bitmask of ACL entry types or 0 if archive entry
has no ACL entries.</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-top: 1em"><b>BUGS</b></p>
<p style="margin-left:6%;">ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID
and ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT are not
documented.</p>
<p style="margin-left:6%;">archive_entry(3),
libarchive(3)</p>
<p style="margin-left:6%; margin-top: 1em">BSD
February&nbsp;2, 2012 BSD</p>
February&nbsp;15, 2017 BSD</p>
<hr>
</body>
</html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:01 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:02 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:02 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:02 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:02 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:02 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -224,7 +224,7 @@ example, many implementations of tar(1) allow you to append
entries to an empty file. Of course, it is impossible to
determine the format of an empty file by inspecting the
contents, so this library treats empty files as having a
special &rsquo;&rsquo;empty&rsquo;&rsquo; format.</p>
special &lsquo;&lsquo;empty&rsquo;&rsquo; format.</p>
<p style="margin-left:6%; margin-top: 1em">BSD
February&nbsp;2, 2012 BSD</p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:02 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:03 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -70,13 +70,15 @@ archive *</i></p>
<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
<p style="margin-left:6%; margin-top: 1em"><i>const char
*</i></p>
<p style="margin-left:12%;"><b>archive_read_disk_gname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
<i>gid_t</i>);</p>
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
<p style="margin-left:6%; margin-top: 1em"><i>const char
*</i></p>
<p style="margin-left:12%;"><b>archive_read_disk_uname</b>(<i>struct&nbsp;archive&nbsp;*</i>,
@ -146,11 +148,11 @@ information from disk.</p>
<p style="margin-left:17%;">This sets the mode used for
handling symbolic links. The
&rsquo;&rsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &rsquo;&rsquo;physical&rsquo;&rsquo;
&lsquo;&lsquo;logical&rsquo;&rsquo; mode follows all
symbolic links. The &lsquo;&lsquo;physical&rsquo;&rsquo;
mode does not follow any symbolic links. The
&rsquo;&rsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &rsquo;&rsquo;logical&rsquo;&rsquo;
&lsquo;&lsquo;hybrid&rsquo;&rsquo; mode currently behaves
identically to the &lsquo;&lsquo;logical&rsquo;&rsquo;
mode.</p>
@ -323,7 +325,7 @@ was written by Tim Kientzle
<p style="margin-top: 1em"><b>BUGS</b></p>
<p style="margin-left:6%;">The
&rsquo;&rsquo;standard&rsquo;&rsquo; user name and group
&lsquo;&lsquo;standard&rsquo;&rsquo; user name and group
name lookup functions are not the defaults because
getgrgid(3) and getpwuid(3) are sometimes too large for
particular applications. The current design allows the
@ -346,11 +348,11 @@ such information.</p>
provide a set of methods for walking a directory tree. That
would make it a direct parallel of the archive_read(3) API.
When such methods are implemented, the
&rsquo;&rsquo;hybrid&rsquo;&rsquo; symbolic link mode will
&lsquo;&lsquo;hybrid&rsquo;&rsquo; symbolic link mode will
make sense.</p>
<p style="margin-left:6%; margin-top: 1em">BSD
February&nbsp;2, 2012 BSD</p>
December&nbsp;30, 2016 BSD</p>
<hr>
</body>
</html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:06 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:03 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:03 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -149,7 +149,7 @@ functions may fall back on external programs if an
appropriate library was not available at build time.
Decompression using an external program is usually slower
than decompression through built-in libraries. Note that
&rsquo;&rsquo;none&rsquo;&rsquo; is always enabled by
&lsquo;&lsquo;none&rsquo;&rsquo; is always enabled by
default.</p>
<p><b>archive_read_support_filter_all</b>()</p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:03 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -153,7 +153,7 @@ variants.</p>
<p><b>archive_read_support_format_all</b>()</p>
<p style="margin-left:17%;">Enables support for all
available formats except the &rsquo;&rsquo;raw&rsquo;&rsquo;
available formats except the &lsquo;&lsquo;raw&rsquo;&rsquo;
format (see below).</p>
<p><b>archive_read_support_format_by_code</b>()</p>
@ -180,10 +180,10 @@ distinct format.</p>
<p><b>archive_read_support_format_raw</b>()</p>
<p style="margin-left:17%;">The
&rsquo;&rsquo;raw&rsquo;&rsquo; format handler allows
&lsquo;&lsquo;raw&rsquo;&rsquo; format handler allows
libarchive to be used to read arbitrary data. It treats any
data stream as an archive with a single entry. The pathname
of this entry is &rsquo;&rsquo;data&rsquo;&rsquo;; all other
of this entry is &lsquo;&lsquo;data&rsquo;&rsquo;; all other
entry fields are unset. This is not enabled by
<b>archive_read_support_format_all</b>() in order to avoid
erroneous handling of damaged archives.</p>
@ -213,10 +213,10 @@ example, many implementations of tar(1) allow you to append
entries to an empty file. Of course, it is impossible to
determine the format of an empty file by inspecting the
contents, so this library treats empty files as having a
special &rsquo;&rsquo;empty&rsquo;&rsquo; format.</p>
special &lsquo;&lsquo;empty&rsquo;&rsquo; format.</p>
<p style="margin-left:6%; margin-top: 1em">Using the
&rsquo;&rsquo;raw&rsquo;&rsquo; handler together with any
&lsquo;&lsquo;raw&rsquo;&rsquo; handler together with any
other handler will often work but can produce surprising
results.</p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:03 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:03 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:03 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:04 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:04 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -142,7 +142,7 @@ option with this name will ignore it.</p>
<p style="margin-left:27%; margin-top: 1em">The option will
be provided to every module with a value of
&rsquo;&rsquo;1&rsquo;&rsquo;.</p>
&lsquo;&lsquo;1&rsquo;&rsquo;.</p>
<p><i>!option</i></p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:04 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -253,21 +253,21 @@ This function should be used within I/O callbacks to set
system-specific error codes and error descriptions. This
function accepts a printf-like format string and arguments.
However, you should be careful to use only the following
printf format specifiers: &rsquo;&rsquo;%c&rsquo;&rsquo;,
&rsquo;&rsquo;%d&rsquo;&rsquo;,
&rsquo;&rsquo;%jd&rsquo;&rsquo;,
&rsquo;&rsquo;%jo&rsquo;&rsquo;,
&rsquo;&rsquo;%ju&rsquo;&rsquo;,
&rsquo;&rsquo;%jx&rsquo;&rsquo;,
&rsquo;&rsquo;%ld&rsquo;&rsquo;,
&rsquo;&rsquo;%lo&rsquo;&rsquo;,
&rsquo;&rsquo;%lu&rsquo;&rsquo;,
&rsquo;&rsquo;%lx&rsquo;&rsquo;,
&rsquo;&rsquo;%o&rsquo;&rsquo;,
&rsquo;&rsquo;%u&rsquo;&rsquo;,
&rsquo;&rsquo;%s&rsquo;&rsquo;,
&rsquo;&rsquo;%x&rsquo;&rsquo;,
&rsquo;&rsquo;%%&rsquo;&rsquo;. Field-width specifiers and
printf format specifiers: &lsquo;&lsquo;%c&rsquo;&rsquo;,
&lsquo;&lsquo;%d&rsquo;&rsquo;,
&lsquo;&lsquo;%jd&rsquo;&rsquo;,
&lsquo;&lsquo;%jo&rsquo;&rsquo;,
&lsquo;&lsquo;%ju&rsquo;&rsquo;,
&lsquo;&lsquo;%jx&rsquo;&rsquo;,
&lsquo;&lsquo;%ld&rsquo;&rsquo;,
&lsquo;&lsquo;%lo&rsquo;&rsquo;,
&lsquo;&lsquo;%lu&rsquo;&rsquo;,
&lsquo;&lsquo;%lx&rsquo;&rsquo;,
&lsquo;&lsquo;%o&rsquo;&rsquo;,
&lsquo;&lsquo;%u&rsquo;&rsquo;,
&lsquo;&lsquo;%s&rsquo;&rsquo;,
&lsquo;&lsquo;%x&rsquo;&rsquo;,
&lsquo;&lsquo;%%&rsquo;&rsquo;. Field-width specifiers and
other printf features are not uniformly supported and should
not be used.</p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:04 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -273,8 +273,8 @@ limitations and provides a generic key/value attribute
facility for vendor-defined extensions. One oversight in
POSIX is the failure to provide a standard attribute for
large device numbers. This library uses
&rsquo;&rsquo;SCHILY.devminor&rsquo;&rsquo; and
&rsquo;&rsquo;SCHILY.devmajor&rsquo;&rsquo; for device
&lsquo;&lsquo;SCHILY.devminor&rsquo;&rsquo; and
&lsquo;&lsquo;SCHILY.devmajor&rsquo;&rsquo; for device
numbers that exceed the range supported by the
backwards-compatible ustar header. These keys are compatible
with Joerg Schilling&rsquo;s <b>star</b> archiver. Other

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:04 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -97,7 +97,7 @@ compression. The uncompressed data is always unpadded. The
default is to pad the last block to the full block size
(note that <b>archive_write_open_filename</b>() will set
this based on the file type). Unlike the other
&rsquo;&rsquo;set&rsquo;&rsquo; functions, this function can
&lsquo;&lsquo;set&rsquo;&rsquo; functions, this function can
be called after the archive is opened.</p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:04 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:05 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -450,7 +450,7 @@ of the final object happen to match those specified in the
entry.</p>
<p style="margin-left:6%; margin-top: 1em">The
&rsquo;&rsquo;standard&rsquo;&rsquo; user-id and group-id
&lsquo;&lsquo;standard&rsquo;&rsquo; user-id and group-id
lookup functions are not the defaults because getgrnam(3)
and getpwnam(3) are sometimes too large for particular
applications. The current design allows the application

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:05 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:05 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:05 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:05 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:05 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:05 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:06 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -83,7 +83,8 @@ archive_write_open</b>()</p>
archive, and prepare for writing entries. This is the most
generic form of this function, which accepts pointers to
three callback functions which will be invoked by the
compression layer to write the constructed archive.</p>
compression layer to write the constructed archive. This
does not alter the default archive padding.</p>
<p style="margin-top: 1em"><b>archive_write_open_fd</b>()</p>
@ -115,7 +116,7 @@ require correct blocking.</p>
<b>archive_write_open</b>() that accepts a filename. A NULL
argument indicates that the output should be written to
standard output; an argument of
&rsquo;&rsquo;-&rsquo;&rsquo; will open a file with that
&lsquo;&lsquo;-&rsquo;&rsquo; will open a file with that
name. If you have not invoked
<b>archive_write_set_bytes_in_last_block</b>(), then
<b>archive_write_open_filename</b>() will adjust the
@ -138,12 +139,19 @@ block of memory that will receive the archive. The final
updated after each write to reflect how much of the buffer
is currently in use. You should be careful to ensure that
this variable remains allocated until after the archive is
closed.</p>
closed. This function will disable padding unless you have
specifically set the block size.</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-left:6%; margin-top: 1em">Note that the
convenience forms above vary in how they block the output.
See archive_write_blocksize(3) if you need to control the
block size used for writes or the end-of-file padding
behavior.</p>
<p style="margin-top: 1em"><b>CLIENT CALLBACKS</b></p>
<p style="margin-left:6%;">To use this library, you will
@ -220,9 +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_write(3), archive_write_filter(3),
archive_write_format(3), archive_write_new(3),
archive_write_set_options(3), cpio(5), mtree(5), tar(5)</p>
archive_write(3), archive_write_blocksize(3),
archive_write_filter(3), archive_write_format(3),
archive_write_new(3), archive_write_set_options(3), cpio(5),
mtree(5), tar(5)</p>
<p style="margin-left:6%; margin-top: 1em">BSD
February&nbsp;2, 2012 BSD</p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:06 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -138,7 +138,7 @@ option with this name will ignore it.</p>
<p style="margin-left:27%; margin-top: 1em">The option will
be provided to every module with a value of
&rsquo;&rsquo;1&rsquo;&rsquo;.</p>
&lsquo;&lsquo;1&rsquo;&rsquo;.</p>
<p><i>!option</i></p>
@ -175,7 +175,7 @@ cksum</b>, <b>device</b>, <b>flags</b>, <b>gid</b>,
<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
&rsquo;&rsquo;device, flags, gid, gname, link, mode, nlink,
&lsquo;&lsquo;device, flags, gid, gname, link, mode, nlink,
size, time, type, uid, uname&rsquo;&rsquo;.</p>
<p><b>all</b></p>
@ -483,8 +483,8 @@ compression on many files.</p>
compression</b></p>
<p style="margin-left:27%;">The value is either
&rsquo;&rsquo;store&rsquo;&rsquo; or
&rsquo;&rsquo;deflate&rsquo;&rsquo; to indicate how the
&lsquo;&lsquo;store&rsquo;&rsquo; or
&lsquo;&lsquo;deflate&rsquo;&rsquo; to indicate how the
following entries should be compressed. Note that this
setting is ignored for directories, symbolic links, and
other special entries.</p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:10 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:08 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -191,7 +191,7 @@ description.</p>
<p style="margin-left:17%;">(i and p mode only) Disable
security checks during extraction or copying. This allows
extraction via symbolic links, absolute paths, and path
names containing &rsquo;..&rsquo; in the name.</p>
names containing &lsquo;..&rsquo; in the name.</p>
<p style="margin-top: 1em"><b>&minus;J</b>,
<b>&minus;&minus;xz</b></p>
@ -439,7 +439,7 @@ pattern:</p>
<p style="margin-left:6%; margin-top: 1em">This example
copies files from <i>src</i> to <i>dest</i> that are more
than 2 days old and which contain the word
&rsquo;&rsquo;</p>
&lsquo;&lsquo;</p>
<p>foobar &rsquo;&rsquo;:</p>
@ -477,13 +477,13 @@ libarchive-formats(5), tar(5)</p>
<p style="margin-left:6%;">There is no current POSIX
standard for the cpio command; it appeared in ISO/IEC
9945-1:1996 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) but was
9945-1:1996 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) but was
dropped from IEEE Std 1003.1-2001
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;).</p>
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;).</p>
<p style="margin-left:6%; margin-top: 1em">The cpio, ustar,
and pax interchange file formats are defined by IEEE Std
1003.1-2001 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) for the
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) for the
pax command.</p>
<p style="margin-top: 1em"><b>HISTORY</b></p>
@ -492,7 +492,7 @@ pax command.</p>
<b>find</b> utilities were written by Dick Haight while
working in AT&amp;T&rsquo;s Unix Support Group. They first
appeared in 1977 in PWB/UNIX 1.0, the
&rsquo;&rsquo;Programmer&rsquo;s Work Bench&rsquo;&rsquo;
&lsquo;&lsquo;Programmer&rsquo;s Work Bench&rsquo;&rsquo;
system developed for use within AT&amp;T. They were first
released outside of AT&amp;T as part of System III Unix in
1981. As a result, <b>cpio</b> actually predates <b>tar</b>,
@ -512,7 +512,7 @@ to transfer files between systems with dissimilar user and
group numbering. Older cpio formats limit the user and group
numbers to 16 or 18 bits, which is insufficient for modern
systems. The cpio archive formats cannot support files over
4 gigabytes, except for the &rsquo;&rsquo;odc&rsquo;&rsquo;
4 gigabytes, except for the &lsquo;&lsquo;odc&rsquo;&rsquo;
variant, which can support files up to 8 gigabytes.</p>
<p style="margin-left:6%; margin-top: 1em">BSD

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:10 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:08 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -54,7 +54,7 @@ and ISO 9660 cdrom images and can create tar, pax, cpio, ar,
zip, 7-zip, and shar archives.</p>
<p style="margin-left:6%; margin-top: 1em">The first
synopsis form shows a &rsquo;&rsquo;bundled&rsquo;&rsquo;
synopsis form shows a &lsquo;&lsquo;bundled&rsquo;&rsquo;
option word. This usage is provided for compatibility with
historical implementations. See COMPATIBILITY below for
details.</p>
@ -123,7 +123,7 @@ modes.</p>
<p style="margin-top: 1em"><b>@</b><i>archive</i></p>
<p style="margin-left:17%;">(c and r mode only) The
<p style="margin-left:17%;">(c and r modes only) The
specified archive is opened and the entries in it will be
appended to the current archive. As a simple example,</p>
@ -179,7 +179,7 @@ format,</p>
<i>archive.tgz source.c source.h</i></p>
<p style="margin-left:17%;">ignores the
&rsquo;&rsquo;-j&rsquo;&rsquo; option, and creates a new
&lsquo;&lsquo;-j&rsquo;&rsquo; option, and creates a new
archive with restricted pax format and gzip compression,</p>
<p style="margin-left:24%;"><b>tar &minus;a &minus;jcf</b>
@ -189,6 +189,17 @@ archive with restricted pax format and gzip compression,</p>
suffix, creates a new archive with restricted pax format and
bzip2 compression.</p>
<p style="margin-top: 1em"><b>&minus;&minus;acls</b></p>
<p style="margin-left:17%; margin-top: 1em">(c, r, u, x
modes only) Archive or extract POSIX.1e or NFSv4 ACLs. This
is the reverse of <b>&minus;&minus;no-acls</b> and the
default behavior in c, r, and u modes (except Mac OS X) or
if <b>tar</b> is run in x mode as root. On Mac OS X this
option translates extended ACLs to NFSv4 ACLs. To store
extended ACLs the <b>&minus;&minus;mac-metadata</b> option
is preferred.</p>
<p style="margin-top: 1em"><b>&minus;B</b>,
<b>&minus;&minus;read-full-blocks</b></p>
@ -227,12 +238,6 @@ to the current directory after processing any
file system objects to replace them, clear platform-specific
file flags that might prevent removal.</p>
<p style="margin-top: 1em"><b>&minus;&minus;disable-copyfile</b></p>
<p style="margin-left:17%;">Mac OS X specific. Disable the
use of copyfile(3).</p>
<p style="margin-top: 1em"><b>&minus;&minus;exclude</b>
<i>pattern</i></p>
@ -241,15 +246,23 @@ directories that match the specified pattern. Note that
exclusions take precedence over patterns or filenames
specified on the command line.</p>
<p style="margin-top: 1em"><b>&minus;&minus;fflags</b></p>
<p style="margin-left:17%;">(c, r, u, x modes only) Archive
or extract file flags. This is the reverse of
<b>&minus;&minus;no-fflags</b> and the default behavior in
c, r, and u modes or if <b>tar</b> is run in x mode as
root.</p>
<p style="margin-top: 1em"><b>&minus;&minus;format</b>
<i>format</i></p>
<p style="margin-left:17%;">(c, r, u mode only) Use the
specified format for the created archive. Supported formats
include &rsquo;&rsquo;cpio&rsquo;&rsquo;,
&rsquo;&rsquo;pax&rsquo;&rsquo;,
&rsquo;&rsquo;shar&rsquo;&rsquo;, and
&rsquo;&rsquo;ustar&rsquo;&rsquo;. Other formats may also be
include &lsquo;&lsquo;cpio&rsquo;&rsquo;,
&lsquo;&lsquo;pax&rsquo;&rsquo;,
&lsquo;&lsquo;shar&rsquo;&rsquo;, and
&lsquo;&lsquo;ustar&rsquo;&rsquo;. Other formats may also be
supported; see libarchive-formats(5) for more information
about currently-supported formats. In r and u modes, when
extending an existing archive, the format specified here
@ -290,14 +303,14 @@ group database.</p>
<p style="margin-top: 1em"><b>&minus;H</b></p>
<p style="margin-left:17%; margin-top: 1em">(c and r mode
<p style="margin-left:17%; margin-top: 1em">(c and r modes
only) Symbolic links named on the command line will be
followed; the target of the link will be archived, not the
link itself.</p>
<p style="margin-top: 1em"><b>&minus;h</b></p>
<p style="margin-left:17%; margin-top: 1em">(c and r mode
<p style="margin-left:17%; margin-top: 1em">(c and r modes
only) Synonym for <b>&minus;L</b>.</p>
<p style="margin-top: 1em"><b>&minus;I</b></p>
@ -312,9 +325,9 @@ only) Synonym for <b>&minus;L</b>.</p>
<p style="margin-top: 1em"><b>&minus;&minus;hfsCompression</b></p>
<p style="margin-left:17%;">(x mode only) Mac OS X
specific(v10.6 or later). Compress extracted regular files
with HFS+ compression.</p>
<p style="margin-left:17%;">(x mode only) Mac OS X specific
(v10.6 or later). Compress extracted regular files with HFS+
compression.</p>
<p style="margin-top: 1em"><b>&minus;&minus;ignore-zeros</b></p>
@ -340,7 +353,7 @@ when filtering archives. For example, the command</p>
<p style="margin-left:17%;">creates a new archive
<i>new.tar</i> containing only the entries from
<i>old.tgz</i> containing the string &rsquo;foo&rsquo;.</p>
<i>old.tgz</i> containing the string &lsquo;foo&rsquo;.</p>
<p style="margin-top: 1em"><b>&minus;J</b>,
<b>&minus;&minus;xz</b></p>
@ -379,7 +392,7 @@ the archive being extracted.</p>
<p style="margin-top: 1em"><b>&minus;L</b>,
<b>&minus;&minus;dereference</b></p>
<p style="margin-left:17%;">(c and r mode only) All
<p style="margin-left:17%;">(c and r modes only) All
symbolic links will be followed. Normally, symbolic links
are archived as such. With this option, the target of the
link will be archived instead.</p>
@ -427,6 +440,16 @@ list modes, this option is ignored.</p>
modification time. By default, the modification time is set
to the time stored in the archive.</p>
<p style="margin-top: 1em"><b>&minus;&minus;mac-metadata</b></p>
<p style="margin-left:17%;">(c, r, u and x mode only) Mac
OS X specific. Archive or extract extended ACLs and extended
attributes using copyfile(3) in AppleDouble format. This is
the reverse of <b>&minus;&minus;no-mac-metadata</b>. and the
default behavior in c, r, and u modes or if <b>tar</b> is
run in x mode as root.</p>
<p style="margin-top: 1em"><b>&minus;n</b>,
<b>&minus;&minus;norecurse</b>,
<b>&minus;&minus;no-recursion</b></p>
@ -487,6 +510,37 @@ often used to read filenames output by the
<b>&minus;print0</b> option to find(1).</p>
<p style="margin-top: 1em"><b>&minus;&minus;no-acls</b></p>
<p style="margin-left:17%;">(c, r, u, x modes only) Do not
archive or extract POSIX.1e or NFSv4 ACLs. This is the
reverse of <b>&minus;&minus;acls</b> and the default
behavior if <b>tar</b> is run as non-root in x mode (on Mac
OS X also in c, r and u modes).</p>
<p style="margin-top: 1em"><b>&minus;&minus;no-fflags</b></p>
<p style="margin-left:17%;">(c, r, u, x modes only) Do not
archive or extract file flags. This is the reverse of
<b>&minus;&minus;fflags</b> and the default behavior if
<b>tar</b> is run as non-root in x mode.</p>
<p style="margin-top: 1em"><b>&minus;&minus;no-mac-metadata</b></p>
<p style="margin-left:17%;">(x mode only) Mac OS X
specific. Do not archive or extract ACLs and extended
attributes using copyfile(3) in AppleDouble format. This is
the reverse of <b>&minus;&minus;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>&minus;n</b>,
<b>&minus;&minus;norecurse</b>,
<b>&minus;&minus;no-recursion</b></p>
<p style="margin-top: 1em"><b>&minus;&minus;no-same-owner</b></p>
<p style="margin-left:17%;">(x mode only) Do not extract
@ -501,7 +555,19 @@ owner and group IDs. This is the reverse of
full permissions (SGID, SUID, sticky bit, ACLs, extended
attributes or extended file flags). This is the reverse of
<b>&minus;p</b> and the default behavior if <b>tar</b> is
run as non-root.</p>
run as non-root and can be overridden by also specifying
<b>&minus;&minus;acls</b>, <b>&minus;&minus;fflags</b>,
<b>&minus;&minus;mac-metadata, &minus;&minus;same-owner</b>,
<b>&minus;&minus;same-permissions</b> and
<b>&minus;&minus;xattrs</b>.</p>
<p style="margin-top: 1em"><b>&minus;&minus;no-xattrs</b></p>
<p style="margin-left:17%;">(c, r, u, x modes only) Do not
archive or extract extended attributes. This is the reverse
of <b>&minus;&minus;xattrs</b> and the default behavior if
<b>tar</b> is run as non-root in x mode.</p>
<p style="margin-top: 1em"><b>&minus;&minus;numeric-owner</b></p>
@ -692,7 +758,7 @@ output. Supported keywords include: <b>cksum</b>,
<b>nlink</b>, <b>rmd160</b>, <b>sha1</b>, <b>sha256</b>,
<b>sha384</b>, <b>sha512</b>, <b>size</b>, <b>time</b>,
<b>uid</b>, <b>uname</b>. The default is equivalent to:
&rsquo;&rsquo;device, flags, gid, gname, link, mode, nlink,
&lsquo;&lsquo;device, flags, gid, gname, link, mode, nlink,
size, time, type, uid, uname&rsquo;&rsquo;.</p>
<p><b>mtree:all</b></p>
@ -759,12 +825,16 @@ option suppresses these behaviors.</p>
<p style="margin-left:17%;">(x mode only) Preserve file
permissions. Attempt to restore the full permissions,
including owner, file modes, file flags and ACLs, if
available, for each item extracted from the archive. This is
the default, if <b>tar</b> is being run by root and can be
overridden by also specifying
<b>&minus;&minus;no-same-owner</b> and
<b>&minus;&minus;no-same-permissions</b>.</p>
including owner, file modes, ACLs, extended atributes and
extended file flags, if available, for each item extracted
from the archive. This is the default, if <b>tar</b> is
being run by root and can be overridden by also specifying
<b>&minus;&minus;no-acls</b>,
<b>&minus;&minus;no-fflags</b>,
<b>&minus;&minus;no-mac-metadata,
&minus;&minus;no-same-owner</b>,
<b>&minus;&minus;no-same-permissions</b> and
<b>&minus;&minus;no-xattrs</b>.</p>
<p style="margin-top: 1em"><b>&minus;&minus;passphrase</b>
<i>passphrase</i></p>
@ -852,18 +922,18 @@ checks.</p>
read the list of names to be extracted from <i>filename</i>.
In c mode, <b>tar</b> will read names to be archived from
<i>filename</i>. The special name
&rsquo;&rsquo;-C&rsquo;&rsquo; on a line by itself will
&lsquo;&lsquo;-C&rsquo;&rsquo; on a line by itself will
cause the current directory to be changed to the directory
specified on the following line. Names are terminated by
newlines unless <b>&minus;&minus;null</b> is specified. Note
that <b>&minus;&minus;null</b> also disables the special
handling of lines containing &rsquo;&rsquo;-C&rsquo;&rsquo;.
handling of lines containing &lsquo;&lsquo;-C&rsquo;&rsquo;.
Note: If you are generating lists of files using find(1),
you probably want to use <b>&minus;n</b> as well.</p>
<p style="margin-top: 1em"><b>&minus;&minus;totals</b></p>
<p style="margin-left:17%;">(c, r, u mode only) After
<p style="margin-left:17%;">(c, r, u modes only) After
archiving all files, print a summary to stderr.</p>
<p style="margin-top: 1em"><b>&minus;U</b>,
@ -937,6 +1007,14 @@ patterns from the specified file. See
<b>&minus;&minus;exclude</b> for more information about the
handling of exclusions.</p>
<p style="margin-top: 1em"><b>&minus;&minus;xattrs</b></p>
<p style="margin-left:17%;">(c, r, u, x modes only) Archive
or extract extended attributes. This is the reverse of
<b>&minus;&minus;no-xattrs</b> and the default behavior in
c, r, and u modes or if <b>tar</b> is run in x mode as
root.</p>
<p style="margin-top: 1em"><b>&minus;y</b></p>
<p style="margin-left:17%; margin-top: 1em">(c mode only)
@ -1080,10 +1158,10 @@ $ tar -cvf output.tar @input.mtree</p>
<b>&minus;&minus;newer</b> and
<b>&minus;&minus;newer-mtime</b> switches accept a variety
of common date and time specifications, including
&rsquo;&rsquo;12 Mar 2005 7:14:29pm&rsquo;&rsquo;,
&rsquo;&rsquo;2005-03-12 19:14&rsquo;&rsquo;,
&rsquo;&rsquo;5 minutes ago&rsquo;&rsquo;, and
&rsquo;&rsquo;19:14 PST May 1&rsquo;&rsquo;.</p>
&lsquo;&lsquo;12 Mar 2005 7:14:29pm&rsquo;&rsquo;,
&lsquo;&lsquo;2005-03-12 19:14&rsquo;&rsquo;,
&lsquo;&lsquo;5 minutes ago&rsquo;&rsquo;, and
&lsquo;&lsquo;19:14 PST May 1&rsquo;&rsquo;.</p>
<p style="margin-left:6%; margin-top: 1em">The
<b>&minus;&minus;options</b> argument can be used to control
@ -1213,9 +1291,9 @@ libarchive-formats(5), tar(5)</p>
<p style="margin-left:6%;">There is no current POSIX
standard for the tar command; it appeared in ISO/IEC
9945-1:1996 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) but was
9945-1:1996 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) but was
dropped from IEEE Std 1003.1-2001
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;). The options supported
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;). The options supported
by this implementation were developed by surveying a number
of existing tar implementations as well as the old POSIX
specification for tar and the current POSIX specification
@ -1223,7 +1301,7 @@ for pax.</p>
<p style="margin-left:6%; margin-top: 1em">The ustar and
pax interchange file formats are defined by IEEE Std
1003.1-2001 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) for the
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) for the
pax command.</p>
<p style="margin-top: 1em"><b>HISTORY</b></p>
@ -1245,7 +1323,7 @@ library. It was first released with FreeBSD&nbsp;5.4 in May,
<p style="margin-top: 1em"><b>BUGS</b></p>
<p style="margin-left:6%;">This program follows ISO/IEC
9945-1:1996 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) for the
9945-1:1996 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) for the
definition of the <b>&minus;l</b> option. Note that GNU tar
prior to version 1.15 treated <b>&minus;l</b> as a synonym
for the <b>&minus;&minus;one-file-system</b> option.</p>
@ -1314,7 +1392,7 @@ incompatible ways that different archive formats store
hardlink information.)</p>
<p style="margin-left:6%; margin-top: 1em">BSD
September&nbsp;16, 2014 BSD</p>
February&nbsp;24, 2017 BSD</p>
<hr>
</body>
</html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:08 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:06 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -46,7 +46,7 @@ those integers (binary, octal, or hexadecimal). The header
is followed by the pathname of the entry (the length of the
pathname is stored in the header) and any file data. The end
of the archive is indicated by a special record with the
pathname &rsquo;&rsquo;TRAILER!!!&rsquo;&rsquo;.</p>
pathname &lsquo;&lsquo;TRAILER!!!&rsquo;&rsquo;.</p>
<p style="margin-left:6%; margin-top: 1em"><b>PWB
format</b> <br>
@ -239,11 +239,11 @@ included with each copy of the file.</p>
<p style="margin-left:6%; margin-top: 1em"><b>Portable
ASCII Format</b> <br>
Version&nbsp;2 of the Single UNIX Specification
(&rsquo;&rsquo;SUSv2&rsquo;&rsquo;) standardized an ASCII
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;) standardized an ASCII
variant that is portable across all platforms. It is
commonly known as the &rsquo;&rsquo;old
commonly known as the &lsquo;&lsquo;old
character&rsquo;&rsquo; format or as the
&rsquo;&rsquo;odc&rsquo;&rsquo; format. It stores the same
&lsquo;&lsquo;odc&rsquo;&rsquo; format. It stores the same
numeric fields as the old binary format, but represents them
as 6-character or 11-character octal values.</p>
@ -302,7 +302,7 @@ the old binary format above.</p>
<p style="margin-top: 1em"><i>magic</i></p>
<p style="margin-left:17%; margin-top: 1em">The string
&rsquo;&rsquo;070701&rsquo;&rsquo;.</p>
&lsquo;&lsquo;070701&rsquo;&rsquo;.</p>
<p style="margin-top: 1em"><i>check</i></p>
@ -326,7 +326,7 @@ archive.</p>
Format</b> <br>
The CRC format is identical to the new ASCII format
described in the previous section except that the magic
field is set to &rsquo;&rsquo;070702&rsquo;&rsquo; and the
field is set to &lsquo;&lsquo;070702&rsquo;&rsquo; and the
<i>check</i> field is set to the sum of all bytes in the
file data. This sum is computed treating all bytes as
unsigned values and using unsigned arithmetic. Only the
@ -355,7 +355,7 @@ XXX</p>
<p style="margin-left:6%;">The <b>cpio</b> utility is no
longer a part of POSIX or the Single Unix Standard. It last
appeared in Version&nbsp;2 of the Single UNIX Specification
(&rsquo;&rsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
in subsequent standards by pax(1). The portable ASCII format
is currently part of the specification for the pax(1)
utility.</p>
@ -365,14 +365,14 @@ utility.</p>
<p style="margin-left:6%;">The original cpio utility was
written by Dick Haight while working in AT&amp;T&rsquo;s
Unix Support Group. It appeared in 1977 as part of PWB/UNIX
1.0, the &rsquo;&rsquo;Programmer&rsquo;s Work
1.0, the &lsquo;&lsquo;Programmer&rsquo;s Work
Bench&rsquo;&rsquo; derived from Version&nbsp;6 AT&amp;T
UNIX that was used internally at AT&amp;T. Both the old
binary and old character formats were in use by 1980,
according to the System III source released by SCO under
their &rsquo;&rsquo;Ancient Unix&rsquo;&rsquo; license. The
their &lsquo;&lsquo;Ancient Unix&rsquo;&rsquo; license. The
character format was adopted as part of IEEE Std 1003.1-1988
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;). XXX when did
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;). XXX when did
&quot;newc&quot; appear? Who invented it? When did HP come
out with their variant? When did Sun introduce ACLs and
extended attributes? XXX</p>
@ -380,7 +380,7 @@ extended attributes? XXX</p>
<p style="margin-top: 1em"><b>BUGS</b></p>
<p style="margin-left:6%;">The
&rsquo;&rsquo;CRC&rsquo;&rsquo; format is mis-named, as it
&lsquo;&lsquo;CRC&rsquo;&rsquo; format is mis-named, as it
uses a simple checksum and not a cyclic redundancy
check.</p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:06 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -34,7 +34,7 @@ library</p>
<p style="margin-left:6%;">The libarchive(3) library reads
and writes a variety of streaming archive formats. Generally
speaking, all of these archive formats consist of a series
of &rsquo;&rsquo;entries&rsquo;&rsquo;. Each entry stores a
of &lsquo;&lsquo;entries&rsquo;&rsquo;. Each entry stores a
single file system object, such as a file, directory, or
symbolic link.</p>
@ -52,8 +52,8 @@ all supported formats.</p>
<p style="margin-left:6%; margin-top: 1em"><b>Tar
Formats</b> <br>
The libarchive(3) library can read most tar archives. It can
write POSIX-standard &rsquo;&rsquo;ustar&rsquo;&rsquo; and
&rsquo;&rsquo;pax interchange&rsquo;&rsquo; formats as well
write POSIX-standard &lsquo;&lsquo;ustar&rsquo;&rsquo; and
&lsquo;&lsquo;pax interchange&rsquo;&rsquo; formats as well
as v7 tar format and a subset of the legacy GNU tar
format.</p>
@ -99,7 +99,7 @@ standard are in all lowercase; vendors are allowed to define
custom keys by preceding them with the vendor name in all
uppercase. When writing pax archives, libarchive uses many
of the SCHILY keys defined by Joerg Schilling&rsquo;s
&rsquo;&rsquo;star&rsquo;&rsquo; archiver and a few
&lsquo;&lsquo;star&rsquo;&rsquo; archiver and a few
LIBARCHIVE keys. The libarchive library can read most of the
SCHILY keys and most of the GNU keys introduced by GNU tar.
It silently ignores any keywords that it does not
@ -236,23 +236,21 @@ numbers.</p>
<p style="margin-top: 1em">Solaris extensions</p>
<p style="margin-left:17%;">Libarchive recognizes ACL and
extended attribute records written by Solaris tar.
Currently, libarchive only has support for old-style ACLs;
the newer NFSv4 ACLs are recognized but discarded.</p>
extended attribute records written by Solaris tar.</p>
<p style="margin-left:6%; margin-top: 1em">The first tar
program appeared in Seventh Edition Unix in 1979. The first
official standard for the tar file format was the
&rsquo;&rsquo;ustar&rsquo;&rsquo; (Unix Standard Tar) format
&lsquo;&lsquo;ustar&rsquo;&rsquo; (Unix Standard Tar) format
defined by POSIX in 1988. POSIX.1-2001 extended the ustar
format to create the &rsquo;&rsquo;pax
format to create the &lsquo;&lsquo;pax
interchange&rsquo;&rsquo; 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 &rsquo;&rsquo;odc&rsquo;&rsquo; and
&rsquo;&rsquo;newc&rsquo;&rsquo; format archives. A cpio
variants and can write &lsquo;&lsquo;odc&rsquo;&rsquo; and
&lsquo;&lsquo;newc&rsquo;&rsquo; 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
@ -274,11 +272,11 @@ mtime, and 16-bit binary values for the other fields.</p>
<p style="margin-left:17%; margin-top: 1em">The libarchive
library can both read and write this POSIX-standard format,
which is officially known as the &rsquo;&rsquo;cpio
which is officially known as the &lsquo;&lsquo;cpio
interchange format&rsquo;&rsquo; or the
&rsquo;&rsquo;octet-oriented cpio archive
&lsquo;&lsquo;octet-oriented cpio archive
format&rsquo;&rsquo; and sometimes unofficially referred to
as the &rsquo;&rsquo;old character format&rsquo;&rsquo;.
as the &lsquo;&lsquo;old character format&rsquo;&rsquo;.
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
@ -314,7 +312,7 @@ systems with dissimilar user numbering.</p>
<p style="margin-left:6%; margin-top: 1em"><b>Shar
Formats</b> <br>
A &rsquo;&rsquo;shell archive&rsquo;&rsquo; is a shell
A &lsquo;&lsquo;shell archive&rsquo;&rsquo; is a shell
script that, when executed on a POSIX-compliant system, will
recreate a collection of file system objects. The libarchive
library can write two different kinds of shar archives:</p>
@ -381,7 +379,7 @@ variables.</p>
format</b> <br>
Libarchive can read and write zip format archives that have
uncompressed entries and entries compressed with the
&rsquo;&rsquo;deflate&rsquo;&rsquo; algorithm. Other zip
&lsquo;&lsquo;deflate&rsquo;&rsquo; algorithm. Other zip
compression algorithms are not supported. It can extract jar
archives, archives that use Zip64 extensions and
self-extracting zip archives. Libarchive can use either of
@ -471,7 +469,7 @@ Need more information</p>
<p style="margin-left:6%; margin-top: 1em"><b>CAB</b> <br>
Libarchive can read Microsoft Cabinet (
&rsquo;&rsquo;CAB&rsquo;&rsquo;) format archives. TODO: Need
&lsquo;&lsquo;CAB&rsquo;&rsquo;) format archives. TODO: Need
more information.</p>
<p style="margin-left:6%; margin-top: 1em"><b>LHA</b> <br>
@ -486,7 +484,7 @@ the RARv3 format. Libarchive can also read self-extracting
RAR archives.</p>
<p style="margin-left:6%; margin-top: 1em"><b>Warc</b> <br>
Libarchive can read and write &rsquo;&rsquo;web
Libarchive can read and write &lsquo;&lsquo;web
archives&rsquo;&rsquo;. TODO: Need more information</p>
<p style="margin-left:6%; margin-top: 1em"><b>XAR</b> <br>
@ -500,7 +498,7 @@ shar(1), tar(1), zip(1), zlib(3), cpio(5), mtree(5),
tar(5)</p>
<p style="margin-left:6%; margin-top: 1em">BSD
March&nbsp;18, 2012 BSD</p>
December&nbsp;27, 2016 BSD</p>
<hr>
</body>
</html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:07 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -53,11 +53,11 @@ for:</p>
<p><b>&bull;</b></p>
<p style="margin-left:12%;">most variants of the POSIX
&rsquo;&rsquo;ustar&rsquo;&rsquo; format,</p>
&lsquo;&lsquo;ustar&rsquo;&rsquo; format,</p>
<p><b>&bull;</b></p>
<p style="margin-left:12%;">the POSIX &rsquo;&rsquo;pax
<p style="margin-left:12%;">the POSIX &lsquo;&lsquo;pax
interchange&rsquo;&rsquo; format,</p>
<p><b>&bull;</b></p>
@ -117,11 +117,11 @@ format to use. The library can write</p>
<p><b>&bull;</b></p>
<p style="margin-left:12%;">POSIX-standard
&rsquo;&rsquo;ustar&rsquo;&rsquo; archives,</p>
&lsquo;&lsquo;ustar&rsquo;&rsquo; archives,</p>
<p><b>&bull;</b></p>
<p style="margin-left:12%;">POSIX &rsquo;&rsquo;pax
<p style="margin-left:12%;">POSIX &lsquo;&lsquo;pax
interchange format&rsquo;&rsquo; archives,</p>
<p><b>&bull;</b></p>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:07 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -57,7 +57,7 @@ can be easily converted to UTF-8.</p>
<p style="margin-left:6%; margin-top: 1em">Libarchive3 uses
the standard iconv library to convert between character sets
and is introducing the notion of a &rsquo;&rsquo;default
and is introducing the notion of a &lsquo;&lsquo;default
character set for the archive&rsquo;&rsquo;. To support
this, archive_entry objects can now be bound to a particular
archive when they are created. The automatic character set

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:07 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:07 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -175,7 +175,7 @@ pathname of a file that holds the contents of this file.</p>
<p style="margin-left:22%; margin-top: 1em">The file flags
as a symbolic name. See chflags(1) for information on these
names. If no flags are to be set the string
&rsquo;&rsquo;none&rsquo;&rsquo; may be used to override the
&lsquo;&lsquo;none&rsquo;&rsquo; may be used to override the
current default.</p>
<p style="margin-top: 1em"><b>gid</b></p>
@ -239,7 +239,7 @@ file hierarchy.</p>
<p style="margin-top: 1em"><b>resdevice</b></p>
<p style="margin-left:22%; margin-top: 1em">The
&rsquo;&rsquo;resident&rsquo;&rsquo; device number of the
&lsquo;&lsquo;resident&rsquo;&rsquo; device number of the
file, e.g. the ID of the device that contains the file. Its
format is the same as the one for <b>device</b>.</p>
@ -261,7 +261,7 @@ the file.</p>
<p style="margin-top: 1em"><b>sha1</b></p>
<p style="margin-left:22%; margin-top: 1em">The FIPS 160-1
(&rsquo;&rsquo;SHA-1&rsquo;&rsquo;) message digest of the
(&lsquo;&lsquo;SHA-1&rsquo;&rsquo;) message digest of the
file.</p>
<p style="margin-top: 1em"><b>sha1digest</b></p>
@ -272,7 +272,7 @@ file.</p>
<p style="margin-top: 1em"><b>sha256</b></p>
<p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
(&rsquo;&rsquo;SHA-256&rsquo;&rsquo;) message digest of the
(&lsquo;&lsquo;SHA-256&rsquo;&rsquo;) message digest of the
file.</p>
<p style="margin-top: 1em"><b>sha256digest</b></p>
@ -283,7 +283,7 @@ file.</p>
<p style="margin-top: 1em"><b>sha384</b></p>
<p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
(&rsquo;&rsquo;SHA-384&rsquo;&rsquo;) message digest of the
(&lsquo;&lsquo;SHA-384&rsquo;&rsquo;) message digest of the
file.</p>
<p style="margin-top: 1em"><b>sha384digest</b></p>
@ -294,7 +294,7 @@ file.</p>
<p style="margin-top: 1em"><b>sha512</b></p>
<p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
(&rsquo;&rsquo;SHA-512&rsquo;&rsquo;) message digest of the
(&lsquo;&lsquo;SHA-512&rsquo;&rsquo;) message digest of the
file.</p>
<p style="margin-top: 1em"><b>sha512digest</b></p>
@ -374,7 +374,7 @@ RIPEMD160 digests were added in FreeBSD&nbsp;4.0, as new
attacks have demonstrated weaknesses in MD5. The SHA-256
digest was added in FreeBSD&nbsp;6.0. Support for file flags
was added in FreeBSD&nbsp;4.0, and mostly comes from NetBSD.
The &rsquo;&rsquo;full&rsquo;&rsquo; entry format was added
The &lsquo;&lsquo;full&rsquo;&rsquo; entry format was added
by NetBSD.</p>
<p style="margin-left:6%; margin-top: 1em">BSD

View file

@ -1,5 +1,5 @@
<!-- Creator : groff version 1.22.3 -->
<!-- CreationDate: Sun Jun 19 19:54:09 2016 -->
<!-- CreationDate: Sat Feb 25 11:22:08 2017 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@ -50,14 +50,14 @@ entirely of zero bytes.</p>
compatibility with tape drives that use fixed block sizes,
programs that read or write tar files always read or write a
fixed number of records with each I/O operation. These
&rsquo;&rsquo;blocks&rsquo;&rsquo; are always a multiple of
&lsquo;&lsquo;blocks&rsquo;&rsquo; are always a multiple of
the record size. The maximum block size supported by early
implementations was 10240 bytes or 20 records. This is still
the default for most implementations although block sizes of
1MiB (2048 records) or larger are commonly used with modern
high-speed tape drives. (Note: the terms
&rsquo;&rsquo;block&rsquo;&rsquo; and
&rsquo;&rsquo;record&rsquo;&rsquo; here are not entirely
&lsquo;&lsquo;block&rsquo;&rsquo; and
&lsquo;&lsquo;record&rsquo;&rsquo; here are not entirely
standard; this document follows the convention established
by John Gilmore in documenting <b>pdtar</b>.)</p>
@ -224,7 +224,7 @@ matches.</p>
and conserve tape, a file with multiple links is only
written to the archive the first time it is encountered. The
next time it is encountered, the <i>linkflag</i> is set to
an ASCII &rsquo;1&rsquo; and the <i>linkname</i> field holds
an ASCII &lsquo;1&rsquo; and the <i>linkname</i> field holds
the first name under which this file appears. (Note that
regular files have a null value in the <i>linkflag</i>
field.)</p>
@ -239,14 +239,14 @@ size and mtime fields must end in a space; the checksum is
terminated by a null and a space. Early implementations
filled the numeric fields with leading spaces. This seems to
have been common practice until the IEEE Std 1003.1-1988
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) standard was released.
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) standard was released.
For best portability, modern implementations should fill the
numeric fields with leading zeros.</p>
<p style="margin-left:6%; margin-top: 1em"><b>Pre-POSIX
Archives</b> <br>
An early draft of IEEE Std 1003.1-1988
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) served as the basis
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) served as the basis
for John Gilmore&rsquo;s <b>pdtar</b> program and many
system implementations from the late 1980s and early 1990s.
These archives generally follow the POSIX ustar format
@ -255,7 +255,7 @@ described below with the following variations:</p>
<p><b>&bull;</b></p>
<p style="margin-left:17%;">The magic value consists of the
five characters &rsquo;&rsquo;ustar&rsquo;&rsquo; followed
five characters &lsquo;&lsquo;ustar&rsquo;&rsquo; followed
by a space. The version field contains a space character
followed by a null.</p>
@ -273,12 +273,12 @@ archives.</p>
<p style="margin-left:6%; margin-top: 1em"><b>POSIX ustar
Archives</b> <br>
IEEE Std 1003.1-1988 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;)
IEEE Std 1003.1-1988 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;)
defined a standard tar file format to be read and written by
compliant implementations of tar(1). This format is often
called the &rsquo;&rsquo;ustar&rsquo;&rsquo; format, after
called the &lsquo;&lsquo;ustar&rsquo;&rsquo; format, after
the magic value used in the header. (The name is an acronym
for &rsquo;&rsquo;Unix Standard TAR&rsquo;&rsquo;.) It
for &lsquo;&lsquo;Unix Standard TAR&rsquo;&rsquo;.) It
extends the historic format with new fields:</p>
<p style="margin-left:14%; margin-top: 1em">struct
@ -432,40 +432,40 @@ header_posix_ustar {</p>
the earlier <i>linkflag</i> field with several new type
values:</p>
<p>&rsquo;&rsquo;0&rsquo;&rsquo;</p>
<p>&lsquo;&lsquo;0&rsquo;&rsquo;</p>
<p style="margin-left:27%; margin-top: 1em">Regular file.
NUL should be treated as a synonym, for compatibility
purposes.</p>
<p>&rsquo;&rsquo;1&rsquo;&rsquo;</p>
<p>&lsquo;&lsquo;1&rsquo;&rsquo;</p>
<p style="margin-left:27%; margin-top: 1em">Hard link.</p>
<p>&rsquo;&rsquo;2&rsquo;&rsquo;</p>
<p>&lsquo;&lsquo;2&rsquo;&rsquo;</p>
<p style="margin-left:27%; margin-top: 1em">Symbolic
link.</p>
<p>&rsquo;&rsquo;3&rsquo;&rsquo;</p>
<p>&lsquo;&lsquo;3&rsquo;&rsquo;</p>
<p style="margin-left:27%; margin-top: 1em">Character
device node.</p>
<p>&rsquo;&rsquo;4&rsquo;&rsquo;</p>
<p>&lsquo;&lsquo;4&rsquo;&rsquo;</p>
<p style="margin-left:27%; margin-top: 1em">Block device
node.</p>
<p>&rsquo;&rsquo;5&rsquo;&rsquo;</p>
<p>&lsquo;&lsquo;5&rsquo;&rsquo;</p>
<p style="margin-left:27%; margin-top: 1em">Directory.</p>
<p>&rsquo;&rsquo;6&rsquo;&rsquo;</p>
<p>&lsquo;&lsquo;6&rsquo;&rsquo;</p>
<p style="margin-left:27%; margin-top: 1em">FIFO node.</p>
<p>&rsquo;&rsquo;7&rsquo;&rsquo;</p>
<p>&lsquo;&lsquo;7&rsquo;&rsquo;</p>
<p style="margin-left:27%; margin-top: 1em">Reserved.</p>
@ -493,7 +493,7 @@ should be set to zero by writers and ignored by readers.</p>
<p style="margin-top: 1em"><i>magic</i></p>
<p style="margin-left:17%; margin-top: 1em">Contains the
magic value &rsquo;&rsquo;ustar&rsquo;&rsquo; followed by a
magic value &lsquo;&lsquo;ustar&rsquo;&rsquo; followed by a
NUL byte to indicate that this is a POSIX standard archive.
Full compliance requires the uname and gname fields be
properly set.</p>
@ -501,7 +501,7 @@ properly set.</p>
<p style="margin-top: 1em"><i>version</i></p>
<p style="margin-left:17%;">Version. This should be
&rsquo;&rsquo;00&rsquo;&rsquo; (two copies of the ASCII
&lsquo;&lsquo;00&rsquo;&rsquo; (two copies of the ASCII
digit zero) for POSIX standard archives.</p>
<p style="margin-top: 1em"><i>uname</i>, <i>gname</i></p>
@ -589,14 +589,14 @@ implementation.</p>
Interchange Format</b> <br>
There are many attributes that cannot be portably stored in
a POSIX ustar archive. IEEE Std 1003.1-2001
(&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;) defined a
&rsquo;&rsquo;pax interchange format&rsquo;&rsquo; that uses
(&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;) defined a
&lsquo;&lsquo;pax interchange format&rsquo;&rsquo; that uses
two new types of entries to hold text-formatted metadata
that applies to following entries. Note that a pax
interchange format archive is a ustar archive in every
respect. The new data is stored in ustar-compatible archive
entries that use the &rsquo;&rsquo;x&rsquo;&rsquo; or
&rsquo;&rsquo;g&rsquo;&rsquo; typeflag. In particular, older
entries that use the &lsquo;&lsquo;x&rsquo;&rsquo; or
&lsquo;&lsquo;g&rsquo;&rsquo; typeflag. In particular, older
implementations that do not fully support these extensions
will extract the metadata into regular files, where the
metadata can be examined as necessary.</p>
@ -641,11 +641,11 @@ including pathnames, user names, and group names. In some
cases, it is not possible to translate local conventions
into UTF-8. If this key is present and the value is the
six-character ASCII string
&rsquo;&rsquo;BINARY&rsquo;&rsquo;, then all textual values
&lsquo;&lsquo;BINARY&rsquo;&rsquo;, then all textual values
are assumed to be in a platform-dependent multi-byte
encoding. Note that there are only two valid values for this
key: &rsquo;&rsquo;BINARY&rsquo;&rsquo; or
&rsquo;&rsquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rsquo;&rsquo;.
key: &lsquo;&lsquo;BINARY&rsquo;&rsquo; or
&lsquo;&lsquo;ISO-IR&nbsp;10646&nbsp;2000&nbsp;UTF-8&rsquo;&rsquo;.
No other values are permitted by the standard, and the
latter value should generally not be used as it is the
default when this key is not specified. In particular, this
@ -692,16 +692,17 @@ the historic 8GB limit.</p>
by Joerg Schilling&rsquo;s <b>star</b> implementation.</p>
<p style="margin-top: 1em"><b>SCHILY.acl.access</b>,
<b>SCHILY.acl.default</b></p>
<b>SCHILY.acl.default, SCHILY.acl.ace</b></p>
<p style="margin-left:17%;">Stores the access and default
ACLs as textual strings in a format that is an extension of
the format specified by POSIX.1e draft 17. In particular,
each user or group access specification can include a fourth
colon-separated field with the numeric UID or GID. This
allows ACLs to be restored on systems that may not have
complete user or group information available (such as when
NIS/YP or LDAP services are temporarily unavailable).</p>
<p style="margin-left:17%;">Stores the access, default and
NFSv4 ACLs as textual strings in a format that is an
extension of the format specified by POSIX.1e draft 17. In
particular, each user or group access specification can
include an additional colon-separated field with the numeric
UID or GID. This allows ACLs to be restored on systems that
may not have complete user or group information available
(such as when NIS/YP or LDAP services are temporarily
unavailable).</p>
<p style="margin-top: 1em"><b>SCHILY.devminor</b>,
<b>SCHILY.devmajor</b></p>
@ -738,7 +739,7 @@ it.</p>
<p style="margin-left:17%;">The time when the file was
created. (This should not be confused with the POSIX
&rsquo;&rsquo;ctime&rsquo;&rsquo; attribute, which refers to
&lsquo;&lsquo;ctime&rsquo;&rsquo; attribute, which refers to
the time when the file metadata was last changed.)</p>
@ -748,9 +749,9 @@ the time when the file metadata was last changed.)</p>
POSIX.1e-style extended attributes using keys of this form.
The <i>key</i> value is URL-encoded: All non-ASCII
characters and the two special characters
&rsquo;&rsquo;=&rsquo;&rsquo; and
&rsquo;&rsquo;%&rsquo;&rsquo; are encoded as
&rsquo;&rsquo;%&rsquo;&rsquo; followed by two uppercase
&lsquo;&lsquo;=&rsquo;&rsquo; and
&lsquo;&lsquo;%&rsquo;&rsquo; are encoded as
&lsquo;&lsquo;%&rsquo;&rsquo; followed by two uppercase
hexadecimal digits. The value of this key is the extended
attribute value encoded in base 64. XXX Detail the base-64
format here XXX</p>
@ -1136,8 +1137,8 @@ equal to realsize.</p>
They contained a list of files to be renamed or symlinked
after extraction; this was originally used to support long
names. The contents of this record are a text description of
the operations to be done, in the form &rsquo;&rsquo;Rename
%s to %s\n&rsquo;&rsquo; or &rsquo;&rsquo;Symlink %s to
the operations to be done, in the form &lsquo;&lsquo;Rename
%s to %s\n&rsquo;&rsquo; or &lsquo;&lsquo;Symlink %s to
%s\n&rsquo;&rsquo;; in either case, both filenames are
escaped using K&amp;R C syntax. Due to security concerns,
&quot;N&quot; records are now generally ignored when reading
@ -1146,13 +1147,13 @@ archives.</p>
<p style="margin-top: 1em">S</p>
<p style="margin-left:27%; margin-top: 1em">This is a
&rsquo;&rsquo;sparse&rsquo;&rsquo; regular file. Sparse
&lsquo;&lsquo;sparse&rsquo;&rsquo; regular file. Sparse
files are stored as a series of fragments. The header
contains a list of fragment offset/length pairs. If more
than four such entries are required, the header is extended
as necessary with &rsquo;&rsquo;extra&rsquo;&rsquo; header
as necessary with &lsquo;&lsquo;extra&rsquo;&rsquo; header
extensions (an older format that is no longer used), or
&rsquo;&rsquo;sparse&rsquo;&rsquo; extensions.</p>
&lsquo;&lsquo;sparse&rsquo;&rsquo; extensions.</p>
<p style="margin-top: 1em">V</p>
@ -1163,7 +1164,7 @@ This entry should generally be ignored on extraction.</p>
<p style="margin-top: 1em"><i>magic</i></p>
<p style="margin-left:17%; margin-top: 1em">The magic field
holds the five characters &rsquo;&rsquo;ustar&rsquo;&rsquo;
holds the five characters &lsquo;&lsquo;ustar&rsquo;&rsquo;
followed by a space. Note that POSIX ustar archives have a
trailing null.</p>
@ -1172,7 +1173,7 @@ trailing null.</p>
<p style="margin-left:17%;">The version field holds a space
character followed by a null. Note that POSIX ustar archives
use two copies of the ASCII digit
&rsquo;&rsquo;0&rsquo;&rsquo;.</p>
&lsquo;&lsquo;0&rsquo;&rsquo;.</p>
<p style="margin-top: 1em"><i>atime</i>, <i>ctime</i></p>
@ -1199,7 +1200,7 @@ written to the file at appropriate offsets.</p>
<p style="margin-top: 1em"><i>isextended</i></p>
<p style="margin-left:17%;">If this is set to non-zero, the
header will be followed by additional &rsquo;&rsquo;sparse
header will be followed by additional &lsquo;&lsquo;sparse
header&rsquo;&rsquo; records. Each such record contains
information about as many as 21 additional sparse blocks as
shown here:</p>
@ -1288,16 +1289,16 @@ interchange format closely, using some <b>SCHILY</b> tags
and introducing new keywords to store sparse file
information. There have been three iterations of the sparse
file support, referred to as
&rsquo;&rsquo;0.0&rsquo;&rsquo;,
&rsquo;&rsquo;0.1&rsquo;&rsquo;, and
&rsquo;&rsquo;1.0&rsquo;&rsquo;.</p>
&lsquo;&lsquo;0.0&rsquo;&rsquo;,
&lsquo;&lsquo;0.1&rsquo;&rsquo;, and
&lsquo;&lsquo;1.0&rsquo;&rsquo;.</p>
<p style="margin-top: 1em"><b>GNU.sparse.numblocks</b>,
<b>GNU.sparse.offset</b>, <b>GNU.sparse.numbytes</b>,
<b>GNU.sparse.size</b></p>
<p style="margin-left:17%;">The
&rsquo;&rsquo;0.0&rsquo;&rsquo; format used an initial
&lsquo;&lsquo;0.0&rsquo;&rsquo; format used an initial
<b>GNU.sparse.numblocks</b> attribute to indicate the number
of blocks in the file, a pair of <b>GNU.sparse.offset</b>
and <b>GNU.sparse.numbytes</b> to indicate the offset and
@ -1312,7 +1313,7 @@ which is not officially permitted by the standards.</p>
<p style="margin-top: 1em"><b>GNU.sparse.map</b></p>
<p style="margin-left:17%;">The
&rsquo;&rsquo;0.1&rsquo;&rsquo; format used a single
&lsquo;&lsquo;0.1&rsquo;&rsquo; format used a single
attribute that stored a comma-separated list of decimal
numbers. Each pair of numbers indicated the offset and size,
respectively, of a block of data. This does not work well if
@ -1325,7 +1326,7 @@ simply discard unrecognized attributes.</p>
<b>GNU.sparse.realsize</b></p>
<p style="margin-left:17%;">The
&rsquo;&rsquo;1.0&rsquo;&rsquo; format stores the sparse
&lsquo;&lsquo;1.0&rsquo;&rsquo; format stores the sparse
block map in one or more 512-byte blocks prepended to the
file data in the entry body. The pax attributes indicate the
existence of this map (via the <b>GNU.sparse.major</b> and
@ -1341,7 +1342,7 @@ XXX More Details Needed XXX</p>
<p style="margin-left:6%; margin-top: 1em">Solaris tar
(beginning with SunOS XXX 5.7 ?? XXX) supports an
&rsquo;&rsquo;extended&rsquo;&rsquo; format that is
&lsquo;&lsquo;extended&rsquo;&rsquo; format that is
fundamentally similar to pax interchange format, with the
following differences:</p>
@ -1380,7 +1381,7 @@ Tar</b> <br>
The tar distributed with Apple&rsquo;s Mac OS X stores most
regular files as two separate files in the tar archive. The
two files have the same name except that the first one has
&rsquo;&rsquo;._&rsquo;&rsquo; prepended to the last path
&lsquo;&lsquo;._&rsquo;&rsquo; prepended to the last path
element. This special file stores an AppleDouble-encoded
binary blob with additional metadata about the second file,
including ACL, extended attributes, and resources. To
@ -1388,7 +1389,7 @@ recreate the original file on disk, each separate file can
be extracted and the Mac OS X <b>copyfile</b>() function can
be used to unpack the separate metadata file and apply it to
th regular file. Conversely, the same function provides a
&rsquo;&rsquo;pack&rsquo;&rsquo; option to encode the
&lsquo;&lsquo;pack&rsquo;&rsquo; option to encode the
extended metadata from a file into a separate file whose
contents can then be put into a tar archive.</p>
@ -1526,11 +1527,11 @@ interchange format per-file extensions.</p>
<p style="margin-left:6%;">The <b>tar</b> utility is no
longer a part of POSIX or the Single Unix Standard. It last
appeared in Version&nbsp;2 of the Single UNIX Specification
(&rsquo;&rsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
(&lsquo;&lsquo;SUSv2&rsquo;&rsquo;). It has been supplanted
in subsequent standards by pax(1). The ustar format is
currently part of the specification for the pax(1) utility.
The pax interchange file format is new with IEEE Std
1003.1-2001 (&rsquo;&rsquo;POSIX.1&rsquo;&rsquo;).</p>
1003.1-2001 (&lsquo;&lsquo;POSIX.1&rsquo;&rsquo;).</p>
<p style="margin-top: 1em"><b>HISTORY</b></p>
@ -1552,7 +1553,7 @@ and <b>bsdtar</b> project by Tim Kientzle
&lt;kientzle@FreeBSD.org&gt;.</p>
<p style="margin-left:6%; margin-top: 1em">BSD
December&nbsp;23, 2011 BSD</p>
December&nbsp;27, 2016 BSD</p>
<hr>
</body>
</html>

View file

@ -104,15 +104,15 @@ archive_write_set_passphrase.3: ../mdoc2man.awk ../../libarchive/archive_write_s
cpio.5: ../mdoc2man.awk ../../libarchive/cpio.5
awk -f ../mdoc2man.awk < ../../libarchive/cpio.5 > cpio.5
libarchive-formats.5: ../mdoc2man.awk ../../libarchive/libarchive-formats.5
awk -f ../mdoc2man.awk < ../../libarchive/libarchive-formats.5 > libarchive-formats.5
libarchive.3: ../mdoc2man.awk ../../libarchive/libarchive.3
awk -f ../mdoc2man.awk < ../../libarchive/libarchive.3 > libarchive.3
libarchive_changes.3: ../mdoc2man.awk ../../libarchive/libarchive_changes.3
awk -f ../mdoc2man.awk < ../../libarchive/libarchive_changes.3 > libarchive_changes.3
libarchive-formats.5: ../mdoc2man.awk ../../libarchive/libarchive-formats.5
awk -f ../mdoc2man.awk < ../../libarchive/libarchive-formats.5 > libarchive-formats.5
libarchive_internals.3: ../mdoc2man.awk ../../libarchive/libarchive_internals.3
awk -f ../mdoc2man.awk < ../../libarchive/libarchive_internals.3 > libarchive_internals.3
@ -127,4 +127,4 @@ bsdtar.1: ../mdoc2man.awk ../../tar/bsdtar.1
bsdcpio.1: ../mdoc2man.awk ../../cpio/bsdcpio.1
awk -f ../mdoc2man.awk < ../../cpio/bsdcpio.1 > bsdcpio.1
all: archive_entry.3 archive_entry_acl.3 archive_entry_linkify.3 archive_entry_paths.3 archive_entry_perms.3 archive_entry_stat.3 archive_entry_time.3 archive_read.3 archive_read_add_passphrase.3 archive_read_data.3 archive_read_disk.3 archive_read_extract.3 archive_read_filter.3 archive_read_format.3 archive_read_free.3 archive_read_header.3 archive_read_new.3 archive_read_open.3 archive_read_set_options.3 archive_util.3 archive_write.3 archive_write_blocksize.3 archive_write_data.3 archive_write_disk.3 archive_write_filter.3 archive_write_finish_entry.3 archive_write_format.3 archive_write_free.3 archive_write_header.3 archive_write_new.3 archive_write_open.3 archive_write_set_options.3 archive_write_set_passphrase.3 cpio.5 libarchive.3 libarchive_changes.3 libarchive-formats.5 libarchive_internals.3 mtree.5 tar.5 bsdtar.1 bsdcpio.1
all: archive_entry.3 archive_entry_acl.3 archive_entry_linkify.3 archive_entry_paths.3 archive_entry_perms.3 archive_entry_stat.3 archive_entry_time.3 archive_read.3 archive_read_add_passphrase.3 archive_read_data.3 archive_read_disk.3 archive_read_extract.3 archive_read_filter.3 archive_read_format.3 archive_read_free.3 archive_read_header.3 archive_read_new.3 archive_read_open.3 archive_read_set_options.3 archive_util.3 archive_write.3 archive_write_blocksize.3 archive_write_data.3 archive_write_disk.3 archive_write_filter.3 archive_write_finish_entry.3 archive_write_format.3 archive_write_free.3 archive_write_header.3 archive_write_new.3 archive_write_open.3 archive_write_set_options.3 archive_write_set_passphrase.3 cpio.5 libarchive-formats.5 libarchive.3 libarchive_changes.3 libarchive_internals.3 mtree.5 tar.5 bsdtar.1 bsdcpio.1

View file

@ -1,14 +1,18 @@
.TH ARCHIVE_ENTRY_ACL 3 "February 2, 2012" ""
.TH ARCHIVE_ENTRY_ACL 3 "February 15, 2017" ""
.SH NAME
.ad l
\fB\%archive_entry_acl_add_entry\fP,
\fB\%archive_entry_acl_add_entry_w\fP,
\fB\%archive_entry_acl_clear\fP,
\fB\%archive_entry_acl_count\fP,
\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_text_w\fP
\fB\%archive_entry_acl_to_text\fP,
\fB\%archive_entry_acl_to_text_w\fP,
\fB\%archive_entry_acl_types\fP
\- functions for manipulating Access Control Lists in archive entry descriptions
.SH LIBRARY
.ad l
@ -35,6 +39,14 @@ Streaming Archive Library (libarchive, -larchive)
.br
\fIint\fP
.br
\fB\%archive_entry_acl_from_text\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *text\fP, \fI\%int\ type\fP);
.br
\fIint\fP
.br
\fB\%archive_entry_acl_from_text_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *text\fP, \fI\%int\ type\fP);
.br
\fIint\fP
.br
\fB\%archive_entry_acl_next\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\ char\ **ret_name\fP);
.br
\fIint\fP
@ -45,54 +57,60 @@ Streaming Archive Library (libarchive, -larchive)
.br
\fB\%archive_entry_acl_reset\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\ type\fP);
.br
\fIconst wchar_t *\fP
\fIchar *\fP
.br
\fB\%archive_entry_acl_text_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\ flags\fP);
\fB\%archive_entry_acl_to_text\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%ssize_t\ *len_p\fP, \fI\%int\ flags\fP);
.br
\fIwchar_t *\fP
.br
\fB\%archive_entry_acl_to_text_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%ssize_t\ *len_p\fP, \fI\%int\ flags\fP);
.br
\fIint\fP
.br
\fB\%archive_entry_acl_types\fP(\fI\%struct\ archive_entry\ *a\fP);
.SH DESCRIPTION
.ad l
An
``Access Control List''
is a generalisation of the classic Unix permission system.
The
``Access Control Lists (ACLs)''
extend the standard Unix perssion model.
The ACL interface of
\fB\%libarchive\fP
is derived from the POSIX.1e draft, but restricted to simplify dealing
with practical implementations in various Operating Systems and archive formats.
.PP
An ACL consists of a number of independent entries.
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.
Valid permissions are:
Valid permissions in the
are:
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_EXECUTE
.BR ARCHIVE_ENTRY_ACL_READ (.B r )
.TP
.BR ARCHIVE_ENTRY_ACL_WRITE
.BR ARCHIVE_ENTRY_ACL_WRITE (.B w )
.TP
.BR ARCHIVE_ENTRY_ACL_READ
.BR ARCHIVE_ENTRY_ACL_EXECUTE (.B x )
.RE
The permissions correspond to the normal Unix permissions.
.PP
The tag specifies the principal to which the permission applies.
The
specifies the principal to which the permission applies.
Valid values are:
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_USER
It .BR ARCHIVE_ENTRY_ACL_USER
The user specified by the name field.
.TP
.BR ARCHIVE_ENTRY_ACL_USER_OBJ
It .BR ARCHIVE_ENTRY_ACL_USER_OBJ
The owner of the file.
.TP
.BR ARCHIVE_ENTRY_ACL_GROUP
It .BR ARCHIVE_ENTRY_ACL_GROUP
The group specied by the name field.
.TP
.BR ARCHIVE_ENTRY_ACL_GROUP_OBJ
It .BR ARCHIVE_ENTRY_ACL_GROUP_OBJ
The group who owns the file.
.TP
.BR ARCHIVE_ENTRY_ACL_MASK
It .BR ARCHIVE_ENTRY_ACL_MASK
The maximum permissions to be obtained via group permissions.
.TP
.BR ARCHIVE_ENTRY_ACL_OTHER
Any principal who doesn't have a user or group entry.
It .BR ARCHIVE_ENTRY_ACL_OTHER
Any principal who is not file owner or a member of the owning group.
.RE
.PP
The principals
.BR ARCHIVE_ENTRY_ACL_USER_OBJ,
.BR ARCHIVE_ENTRY_ACL_GROUP_OBJ
@ -101,19 +119,143 @@ and
are equivalent to user, group and other in the classic Unix permission
model and specify non-extended ACL entries.
.PP
All files have an access ACL
All files with 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.
.SS NFSv4 Access Control Lists
A NFSv4 ACL consists of multiple individual entries called Access Control
Entries (ACEs).
.PP
There are four possible types of a NFSv4 ACE:
.RS 5
It .BR ARCHIVE_ENTRY_ACL_TYPE_ALLOW
Allow principal to perform actions requiring given permissions.
It .BR ARCHIVE_ENTRY_ACL_TYPE_DENY
Prevent principal from performing actions requiring given permissions.
It .BR ARCHIVE_ENTRY_ACL_TYPE_AUDIT
Log access attempts by principal which require given permissions.
It .BR ARCHIVE_ENTRY_ACL_TYPE_ALARM
Trigger a system alarm on access attempts by principal which require given
permissions.
.RE
.PP
The
specifies the principal to which the permission applies.
Valid values are:
.RS 5
It .BR ARCHIVE_ENTRY_ACL_USER
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.
It .BR ARCHIVE_ENTRY_ACL_GROUP_OBJ
The group who owns the file.
It .BR ARCHIVE_ENTRY_ACL_EVERYONE
Any principal who is not file owner or a member of the owning group.
.RE
.PP
Entries with the
.BR ARCHIVE_ENTRY_ACL_USER
or
.BR ARCHIVE_ENTRY_ACL_GROUP
tag store the user and group name in the
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:
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_READ_DATA (.B r )
Read data (file).
.TP
.BR ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (.B r )
List entries (directory).
.TP
ARCHIVE_ENTRY_ACL_WRITE_DATA (.B w )
Write data (file).
.TP
ARCHIVE_ENTRY_ACL_ADD_FILE (.B w )
Create files (directory).
.TP
.BR ARCHIVE_ENTRY_ACL_EXECUTE (.B x )
Execute file or change into a directory.
.TP
.BR ARCHIVE_ENTRY_ACL_APPEND_DATA (.B p )
Append data (file).
.TP
.BR ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (.B p )
Create subdirectories (directory).
.TP
.BR ARCHIVE_ENTRY_ACL_DELETE_CHILD (.B D )
Remove files and subdirectories inside a directory.
.TP
.BR ARCHIVE_ENTRY_ACL_DELETE (.B d )
Remove file or directory.
.TP
.BR ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (.B a )
Read file or directory attributes.
.TP
.BR ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (.B A )
Write file or directory attributes.
.TP
.BR ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (.B R )
Read named file or directory attributes.
.TP
.BR ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (.B W )
Write named file or directory attributes.
.TP
.BR ARCHIVE_ENTRY_ACL_READ_ACL (.B c )
Read file or directory ACL.
.TP
.BR ARCHIVE_ENTRY_ACL_WRITE_ACL (.B C )
Write file or directory ACL.
.TP
.BR ARCHIVE_ENTRY_ACL_WRITE_OWNER (.B o )
Change owner of a file or directory.
.TP
.BR ARCHIVE_ENTRY_ACL_SYNCHRONIZE (.B s )
Use synchronous I/O.
.RE
.PP
The following NFSv4 ACL inheritance flags are supported:
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (.B f )
Inherit parent directory ACE to files.
.TP
.BR ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (.B d )
Inherit parent directory ACE to subdirectories.
.TP
.BR ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (.B i )
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.
.TP
.BR ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (.B S )
Trigger alarm or audit on succesful access.
.TP
.BR ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (.B F )
Trigger alarm or audit on failed access.
.TP
.BR ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (.B I )
Mark that ACE was inherited.
.RE
.SS Functions
\fB\%archive_entry_acl_add_entry\fP()
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.
are updated. An archive enry 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.
@ -121,14 +263,65 @@ removes all ACL entries and resets the enumeration pointer.
\fB\%archive_entry_acl_count\fP()
counts the ACL entries that have the given type mask.
can be the bitwise-or of
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
and
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT.
If
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
.RE
for POSIX.1e ACLs and
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_ALLOW
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_DENY
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_AUDIT
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_ALARM
.RE
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-extened ACLs are added.
.PP
\fB\%archive_entry_acl_from_text\fP()
and
\fB\%archive_entry_acl_from_text_w\fP()
add new
(or merge with existing)
ACL entries from
(wide)
text. The argument
may take one of the following values:
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_NFS4
.RE
Supports all formats that can be created with
\fB\%archive_entry_acl_to_text\fP()
or respective
\fB\%archive_entry_acl_to_text_w\fP().
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
``default:''
are treated as
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
unless
is
.BR ARCHIVE_ENTRY_ACL_TYPE_NFS4.
Invalid entries, non-parseable ACL entries and entries beginning with
the
Sq #
character
(comments)
are skipped.
.PP
\fB\%archive_entry_acl_next\fP()
and
\fB\%archive_entry_acl_next_w\fP()
@ -150,30 +343,87 @@ or set using
Otherwise, the function returns the same value as
\fB\%archive_entry_acl_count\fP().
.PP
\fB\%archive_entry_acl_text_w\fP()
converts the ACL entries for the given type mask into a wide string.
In addition to the normal type flags,
.BR ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID
\fB\%archive_entry_acl_to_text\fP()
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 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
.
The
argument is a bitwise-or.
.PP
The following flags are effective only on POSIX.1e ACL:
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
Output access ACLs.
.TP
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
Output POSIX.1e default ACLs.
.TP
.BR ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT
can be specified to further customize the result.
The returned long string is valid until the next call to
\fB\%archive_entry_acl_clear\fP(),
\fB\%archive_entry_acl_add_entry\fP(),
\fB\%archive_entry_acl_add_entry_w\fP()
Prefix each default ACL entry with the word
``default:''.
.TP
.BR ARCHIVE_ENTRY_ACL_STYLE_SOLARIS
The mask and other ACLs don not contain a double colon.
.RE
.PP
The following flags are effecive only on NFSv4 ACL:
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_STYLE_COMPACT
Do not output minus characters for unset permissions and flags in NFSv4 ACL
permission and flag fields.
.RE
.PP
The following flags are effective on both POSIX.1e and NFSv4 ACL:
.RS 5
.TP
.BR ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID
Add an additional colon-separated field containing the user or group id.
.TP
.BR ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA
Separate ACL entries with comma instead of newline.
.RE
.PP
If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned.
It the entry contains POSIX.1e ACLs and none of the flags
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
or
\fB\%archive_entry_acl_text_w\fP().
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
are specified, both access and default entries are returned and default entries
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
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
.ad l
\fB\%archive_entry_acl_count\fP()
and
\fB\%archive_entry_acl_reset\fP()
returns the number of ACL entries that match the given type mask.
If the type mask includes
For POSIX.1e ACLS if the type mask includes
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
and at least one extended ACL entry exists, the three classic Unix
permissions are counted.
.PP
\fB\%archive_entry_acl_from_text\fP()
and
\fB\%archive_entry_acl_from_text_w\fP()
return
.BR ARCHIVE_OK
if all entries were successfully parsed and
.BR ARCHIVE_WARN
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()
@ -188,22 +438,17 @@ if
\fB\%archive_entry_acl_reset\fP()
has not been called first.
.PP
\fB\%archive_entry_text_w\fP()
returns a wide string representation of the ACL entrise matching the
given type mask.
The returned long string is valid until the next call to
\fB\%archive_entry_acl_clear\fP(),
\fB\%archive_entry_acl_add_entry\fP(),
\fB\%archive_entry_acl_add_entry_w\fP()
or
\fB\%archive_entry_acl_text_w\fP().
\fB\%archive_entry_acl_to_text\fP()
returns a string representing the ACL entries matching the given type and
flags on success or NULL on error.
.PP
\fB\%archive_entry_acl_to_text_w\fP()
returns a wide string representing the ACL entries matching the given type
and flags on success or NULL on error.
.PP
\fB\%archive_entry_acl_types\fP()
returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries.
.SH SEE ALSO
.ad l
\fBarchive_entry\fP(3)
\fBlibarchive\fP(3),
.SH BUGS
.ad l
.BR ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID
and
.BR ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT
are not documented.
\fBarchive_entry\fP(3),
\fBlibarchive\fP(3)

View file

@ -1,4 +1,4 @@
.TH ARCHIVE_READ_DISK 3 "February 2, 2012" ""
.TH ARCHIVE_READ_DISK 3 "December 30, 2016" ""
.SH NAME
.ad l
\fB\%archive_read_disk_new\fP,
@ -38,11 +38,11 @@ Streaming Archive Library (libarchive, -larchive)
.br
\fB\%archive_read_disk_set_symlink_hybrid\fP(\fI\%struct\ archive\ *\fP);
.br
\fIint\fP
\fIconst char *\fP
.br
\fB\%archive_read_disk_gname\fP(\fI\%struct\ archive\ *\fP, \fI\%gid_t\fP);
.br
\fIint\fP
\fIconst char *\fP
.br
\fB\%archive_read_disk_uname\fP(\fI\%struct\ archive\ *\fP, \fI\%uid_t\fP);
.br

View file

@ -42,6 +42,7 @@ Freeze the settings, open the archive, and prepare for writing entries.
This is the most generic form of this function, which accepts
pointers to three callback functions which will be invoked by
the compression layer to write the constructed archive.
This does not alter the default archive padding.
.TP
\fB\%archive_write_open_fd\fP()
A convenience form of
@ -104,12 +105,21 @@ is currently in use.
You should be careful to ensure that this variable
remains allocated until after the archive is
closed.
This function will disable padding unless you
have specifically set the block size.
.RE
More information about the
\fIstruct\fP archive
object and the overall design of the library can be found in the
\fBlibarchive\fP(3)
overview.
.PP
Note that the convenience forms above vary in how
they block the output.
See
\fBarchive_write_blocksize\fP(3)
if you need to control the block size used for writes
or the end-of-file padding behavior.
.SH CLIENT CALLBACKS
.ad l
To use this library, you will need to define and register
@ -202,6 +212,7 @@ functions.
\fBtar\fP(1),
\fBlibarchive\fP(3),
\fBarchive_write\fP(3),
\fBarchive_write_blocksize\fP(3),
\fBarchive_write_filter\fP(3),
\fBarchive_write_format\fP(3),
\fBarchive_write_new\fP(3),

View file

@ -1,4 +1,4 @@
.TH TAR 1 "September 16, 2014" ""
.TH TAR 1 "February 24, 2017" ""
.SH NAME
.ad l
\fB\%tar\fP
@ -110,7 +110,7 @@ all operating modes.
.RS 5
.TP
\fB@\fP \fIarchive\fP
(c and r mode only)
(c and r modes only)
The specified archive is opened and the entries
in it will be appended to the current archive.
As a simple example,
@ -168,6 +168,17 @@ and gzip compression,
if it is unknown suffix or no suffix, creates a new archive with
restricted pax format and bzip2 compression.
.TP
\fB\-Fl\fP acls
(c, r, u, x modes only)
Archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of
\fB\-Fl\fP no-acls
and the default behavior in c, r, and u modes (except Mac OS X) or if
\fB\%tar\fP
is run in x mode as root. On Mac OS X this option translates extended ACLs
to NFSv4 ACLs. To store extended ACLs the
\fB\-Fl\fP mac-metadata
option is preferred.
.TP
\fB\-B\fP, \fB\-Fl\fP read-full-blocks
Ignored for compatibility with other
\fBtar\fP(1)
@ -197,17 +208,20 @@ options and before extracting any files.
Before removing file system objects to replace them, clear platform-specific
file flags that might prevent removal.
.TP
\fB\-Fl\fP disable-copyfile
Mac OS X specific.
Disable the use of
\fBcopyfile\fP(3).
.TP
\fB\-Fl\fP exclude \fIpattern\fP
Do not process files or directories that match the
specified pattern.
Note that exclusions take precedence over patterns or filenames
specified on the command line.
.TP
\fB\-Fl\fP fflags
(c, r, u, x modes only)
Archive or extract file flags. This is the reverse of
\fB\-Fl\fP no-fflags
and the default behavior in c, r, and u modes or if
\fB\%tar\fP
is run in x mode as root.
.TP
\fB\-Fl\fP format \fIformat\fP
(c, r, u mode only)
Use the specified format for the created archive.
@ -260,12 +274,12 @@ in the archive;
the name will not be verified against the system group database.
.TP
\fB\-H\fP
(c and r mode only)
(c and r modes only)
Symbolic links named on the command line will be followed; the
target of the link will be archived, not the link itself.
.TP
\fB\-h\fP
(c and r mode only)
(c and r modes only)
Synonym for
\fB\-L\fP.
.TP
@ -278,7 +292,8 @@ Show usage.
.TP
\fB\-Fl\fP hfsCompression
(x mode only)
Mac OS X specific(v10.6 or later). Compress extracted regular files with HFS+ compression.
Mac OS X specific (v10.6 or later). Compress extracted regular files with HFS+
compression.
.TP
\fB\-Fl\fP ignore-zeros
An alias of
@ -338,7 +353,7 @@ Do not overwrite existing files that are newer than the
versions appearing in the archive being extracted.
.TP
\fB\-L\fP, \fB\-Fl\fP dereference
(c and r mode only)
(c and r modes only)
All symbolic links will be followed.
Normally, symbolic links are archived as such.
With this option, the target of the link will be archived instead.
@ -380,6 +395,17 @@ In extract or list modes, this option is ignored.
Do not extract modification time.
By default, the modification time is set to the time stored in the archive.
.TP
\fB\-Fl\fP mac-metadata
(c, r, u and x mode only)
Mac OS X specific. Archive or extract extended ACLs and extended attributes
using
\fBcopyfile\fP(3)
in AppleDouble format. This is the reverse of
\fB\-Fl\fP no-mac-metadata.
and the default behavior in c, r, and u modes or if
\fB\%tar\fP
is run in x mode as root.
.TP
\fB\-n\fP, \fB\-Fl\fP norecurse, \fB\-Fl\fP no-recursion
(c, r, u modes only)
Do not recursively archive the contents of directories.
@ -428,6 +454,34 @@ This is often used to read filenames output by the
option to
\fBfind\fP(1).
.TP
\fB\-Fl\fP no-acls
(c, r, u, x modes only)
Do not archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of
\fB\-Fl\fP acls
and the default behavior if
\fB\%tar\fP
is run as non-root in x mode (on Mac OS X also in c, r and u modes).
.TP
\fB\-Fl\fP no-fflags
(c, r, u, x modes only)
Do not archive or extract file flags. This is the reverse of
\fB\-Fl\fP fflags
and the default behavior if
\fB\%tar\fP
is run as non-root in x mode.
.TP
\fB\-Fl\fP no-mac-metadata
(x mode only)
Mac OS X specific. Do not archive or extract ACLs and extended attributes using
\fBcopyfile\fP(3)
in AppleDouble format. This is the reverse of
\fB\-Fl\fP mac-metadata.
and the default behavior if
\fB\%tar\fP
is run as non-root in x mode.
.TP
\fB\-n\fP, \fB\-Fl\fP norecurse, \fB\-Fl\fP no-recursion
.TP
\fB\-Fl\fP no-same-owner
(x mode only)
Do not extract owner and group IDs.
@ -445,7 +499,22 @@ This is the reverse of
\fB\-p\fP
and the default behavior if
\fB\%tar\fP
is run as non-root.
is run as non-root and can be overridden by also specifying
\fB\-Fl\fP acls,
\fB\-Fl\fP fflags,
\fB\-Fl\fP mac-metadata,
\fB\-Fl\fP same-owner,
\fB\-Fl\fP same-permissions
and
\fB\-Fl\fP xattrs.
.TP
\fB\-Fl\fP no-xattrs
(c, r, u, x modes only)
Do not archive or extract extended attributes. This is the reverse of
\fB\-Fl\fP xattrs
and the default behavior if
\fB\%tar\fP
is run as non-root in x mode.
.TP
\fB\-Fl\fP numeric-owner
This is equivalent to
@ -664,14 +733,18 @@ This option suppresses these behaviors.
\fB\-p\fP, \fB\-Fl\fP insecure, \fB\-Fl\fP preserve-permissions
(x mode only)
Preserve file permissions.
Attempt to restore the full permissions, including owner, file modes, file
flags and ACLs, if available, for each item extracted from the archive.
This is the default, if
Attempt to restore the full permissions, including owner, file modes, ACLs,
extended atributes and extended file flags, if available, for each item
extracted from the archive. This is the default, if
\fB\%tar\fP
is being run by root and can be overridden by also specifying
\fB\-Fl\fP no-same-owner
\fB\-Fl\fP no-acls,
\fB\-Fl\fP no-fflags,
\fB\-Fl\fP no-mac-metadata,
\fB\-Fl\fP no-same-owner,
\fB\-Fl\fP no-same-permissions
and
\fB\-Fl\fP no-same-permissions.
\fB\-Fl\fP no-xattrs.
.TP
\fB\-Fl\fP passphrase \fIpassphrase\fP
The
@ -782,7 +855,7 @@ you probably want to use
as well.
.TP
\fB\-Fl\fP totals
(c, r, u mode only)
(c, r, u modes only)
After archiving all files, print a summary to stderr.
.TP
\fB\-U\fP, \fB\-Fl\fP unlink, \fB\-Fl\fP unlink-first
@ -853,6 +926,14 @@ See
\fB\-Fl\fP exclude
for more information about the handling of exclusions.
.TP
\fB\-Fl\fP xattrs
(c, r, u, x modes only)
Archive or extract extended attributes. This is the reverse of
\fB\-Fl\fP no-xattrs
and the default behavior in c, r, and u modes or if
\fB\%tar\fP
is run in x mode as root.
.TP
\fB\-y\fP
(c mode only)
Compress the resulting archive with

View file

@ -1,4 +1,4 @@
.TH LIBARCHIVE-FORMATS 5 "March 18, 2012" ""
.TH LIBARCHIVE-FORMATS 5 "December 27, 2016" ""
.SH NAME
.ad l
\fB\%libarchive-formats\fP
@ -172,8 +172,6 @@ and device numbers.
Solaris extensions
Libarchive recognizes ACL and extended attribute records written
by Solaris tar.
Currently, libarchive only has support for old-style ACLs; the
newer NFSv4 ACLs are recognized but discarded.
.RE
.PP
The first tar program appeared in Seventh Edition Unix in 1979.

View file

@ -1,4 +1,4 @@
.TH TAR 5 "December 23, 2011" ""
.TH TAR 5 "December 27, 2016" ""
.SH NAME
.ad l
\fB\%tar\fP
@ -449,11 +449,11 @@ Vendor-specific attributes used by Joerg Schilling's
\fB\%star\fP
implementation.
.TP
\fBSCHILY.acl.access\fP, \fBSCHILY.acl.default\fP
Stores the access and default ACLs as textual strings in a format
\fBSCHILY.acl.access\fP, \fBSCHILY.acl.default,\fP \fBSCHILY.acl.ace\fP
Stores the access, default and NFSv4 ACLs as textual strings in a format
that is an extension of the format specified by POSIX.1e draft 17.
In particular, each user or group access specification can include a fourth
colon-separated field with the numeric UID or GID.
In particular, each user or group access specification can include
an additional colon-separated field with the numeric UID or GID.
This allows ACLs to be restored on systems that may not have complete
user or group information available (such as when NIS/YP or LDAP services
are temporarily unavailable).

View file

@ -104,15 +104,15 @@ archive_write_set_passphrase.3.pdf: ../../libarchive/archive_write_set_passphras
cpio.5.pdf: ../../libarchive/cpio.5
groff -mdoc -T ps ../../libarchive/cpio.5 | ps2pdf - - > cpio.5.pdf
libarchive-formats.5.pdf: ../../libarchive/libarchive-formats.5
groff -mdoc -T ps ../../libarchive/libarchive-formats.5 | ps2pdf - - > libarchive-formats.5.pdf
libarchive.3.pdf: ../../libarchive/libarchive.3
groff -mdoc -T ps ../../libarchive/libarchive.3 | ps2pdf - - > libarchive.3.pdf
libarchive_changes.3.pdf: ../../libarchive/libarchive_changes.3
groff -mdoc -T ps ../../libarchive/libarchive_changes.3 | ps2pdf - - > libarchive_changes.3.pdf
libarchive-formats.5.pdf: ../../libarchive/libarchive-formats.5
groff -mdoc -T ps ../../libarchive/libarchive-formats.5 | ps2pdf - - > libarchive-formats.5.pdf
libarchive_internals.3.pdf: ../../libarchive/libarchive_internals.3
groff -mdoc -T ps ../../libarchive/libarchive_internals.3 | ps2pdf - - > libarchive_internals.3.pdf
@ -127,4 +127,4 @@ bsdtar.1.pdf: ../../tar/bsdtar.1
bsdcpio.1.pdf: ../../cpio/bsdcpio.1
groff -mdoc -T ps ../../cpio/bsdcpio.1 | ps2pdf - - > bsdcpio.1.pdf
all: archive_entry.3.pdf archive_entry_acl.3.pdf archive_entry_linkify.3.pdf archive_entry_paths.3.pdf archive_entry_perms.3.pdf archive_entry_stat.3.pdf archive_entry_time.3.pdf archive_read.3.pdf archive_read_add_passphrase.3.pdf archive_read_data.3.pdf archive_read_disk.3.pdf archive_read_extract.3.pdf archive_read_filter.3.pdf archive_read_format.3.pdf archive_read_free.3.pdf archive_read_header.3.pdf archive_read_new.3.pdf archive_read_open.3.pdf archive_read_set_options.3.pdf archive_util.3.pdf archive_write.3.pdf archive_write_blocksize.3.pdf archive_write_data.3.pdf archive_write_disk.3.pdf archive_write_filter.3.pdf archive_write_finish_entry.3.pdf archive_write_format.3.pdf archive_write_free.3.pdf archive_write_header.3.pdf archive_write_new.3.pdf archive_write_open.3.pdf archive_write_set_options.3.pdf archive_write_set_passphrase.3.pdf cpio.5.pdf libarchive.3.pdf libarchive_changes.3.pdf libarchive-formats.5.pdf libarchive_internals.3.pdf mtree.5.pdf tar.5.pdf bsdtar.1.pdf bsdcpio.1.pdf
all: archive_entry.3.pdf archive_entry_acl.3.pdf archive_entry_linkify.3.pdf archive_entry_paths.3.pdf archive_entry_perms.3.pdf archive_entry_stat.3.pdf archive_entry_time.3.pdf archive_read.3.pdf archive_read_add_passphrase.3.pdf archive_read_data.3.pdf archive_read_disk.3.pdf archive_read_extract.3.pdf archive_read_filter.3.pdf archive_read_format.3.pdf archive_read_free.3.pdf archive_read_header.3.pdf archive_read_new.3.pdf archive_read_open.3.pdf archive_read_set_options.3.pdf archive_util.3.pdf archive_write.3.pdf archive_write_blocksize.3.pdf archive_write_data.3.pdf archive_write_disk.3.pdf archive_write_filter.3.pdf archive_write_finish_entry.3.pdf archive_write_format.3.pdf archive_write_free.3.pdf archive_write_header.3.pdf archive_write_new.3.pdf archive_write_open.3.pdf archive_write_set_options.3.pdf archive_write_set_passphrase.3.pdf cpio.5.pdf libarchive-formats.5.pdf libarchive.3.pdf libarchive_changes.3.pdf libarchive_internals.3.pdf mtree.5.pdf tar.5.pdf bsdtar.1.pdf bsdcpio.1.pdf

Some files were not shown because too many files have changed in this diff Show more