From 7cea8776147cd1b3bc3fe08ec78b0a132054e4d3 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 1 Aug 2017 22:26:22 +0000 Subject: Merge for libarchive-3.3.2. --- archivers/libarchive/files/CMakeLists.txt | 409 ++++-- archivers/libarchive/files/Makefile.am | 26 +- archivers/libarchive/files/Makefile.in | 325 ++++- archivers/libarchive/files/NEWS | 6 +- .../libarchive/files/build/autoconf/config.guess | 26 +- .../libarchive/files/build/autoconf/config.sub | 11 +- archivers/libarchive/files/build/cmake/config.h.in | 43 + archivers/libarchive/files/build/version | 2 +- archivers/libarchive/files/config.h.in | 175 ++- archivers/libarchive/files/configure | 984 ++++++++++---- archivers/libarchive/files/configure.ac | 396 +++++- .../files/contrib/libarchive.1aix53.spec | 4 +- archivers/libarchive/files/cpio/cpio.c | 69 +- .../libarchive/files/cpio/test/CMakeLists.txt | 10 + .../libarchive/files/cpio/test/test_option_a.c | 3 +- .../libarchive/files/cpio/test/test_option_y.c | 6 +- .../libarchive/files/cpio/test/test_option_z.c | 3 +- archivers/libarchive/files/doc/html/Makefile | 8 +- .../libarchive/files/doc/html/archive_entry.3.html | 4 +- .../files/doc/html/archive_entry_acl.3.html | 35 +- .../files/doc/html/archive_entry_linkify.3.html | 2 +- .../files/doc/html/archive_entry_paths.3.html | 15 +- .../files/doc/html/archive_entry_perms.3.html | 6 +- .../files/doc/html/archive_entry_stat.3.html | 2 +- .../files/doc/html/archive_entry_time.3.html | 2 +- .../libarchive/files/doc/html/archive_read.3.html | 4 +- .../files/doc/html/archive_read_data.3.html | 2 +- .../files/doc/html/archive_read_disk.3.html | 112 +- .../files/doc/html/archive_read_extract.3.html | 2 +- .../files/doc/html/archive_read_filter.3.html | 4 +- .../files/doc/html/archive_read_format.3.html | 20 +- .../files/doc/html/archive_read_free.3.html | 2 +- .../files/doc/html/archive_read_header.3.html | 2 +- .../files/doc/html/archive_read_new.3.html | 2 +- .../files/doc/html/archive_read_open.3.html | 7 +- .../files/doc/html/archive_read_set_options.3.html | 4 +- .../libarchive/files/doc/html/archive_util.3.html | 32 +- .../libarchive/files/doc/html/archive_write.3.html | 6 +- .../files/doc/html/archive_write_blocksize.3.html | 4 +- .../files/doc/html/archive_write_data.3.html | 35 +- .../files/doc/html/archive_write_disk.3.html | 240 +--- .../files/doc/html/archive_write_filter.3.html | 2 +- .../doc/html/archive_write_finish_entry.3.html | 8 +- .../files/doc/html/archive_write_format.3.html | 2 +- .../files/doc/html/archive_write_free.3.html | 2 +- .../files/doc/html/archive_write_header.3.html | 2 +- .../files/doc/html/archive_write_new.3.html | 2 +- .../files/doc/html/archive_write_open.3.html | 4 +- .../doc/html/archive_write_set_options.3.html | 10 +- archivers/libarchive/files/doc/html/bsdcpio.1.html | 217 ++- archivers/libarchive/files/doc/html/bsdtar.1.html | 695 +++++----- archivers/libarchive/files/doc/html/cpio.5.html | 24 +- .../files/doc/html/libarchive-formats.5.html | 32 +- .../libarchive/files/doc/html/libarchive.3.html | 10 +- .../files/doc/html/libarchive_changes.3.html | 8 +- .../files/doc/html/libarchive_internals.3.html | 2 +- archivers/libarchive/files/doc/html/mtree.5.html | 40 +- archivers/libarchive/files/doc/html/tar.5.html | 111 +- archivers/libarchive/files/doc/man/Makefile | 8 +- archivers/libarchive/files/doc/man/archive_entry.3 | 2 +- .../libarchive/files/doc/man/archive_entry_acl.3 | 10 +- .../libarchive/files/doc/man/archive_entry_paths.3 | 12 +- .../libarchive/files/doc/man/archive_entry_perms.3 | 4 +- .../libarchive/files/doc/man/archive_read_disk.3 | 91 +- .../libarchive/files/doc/man/archive_read_open.3 | 4 +- .../libarchive/files/doc/man/archive_write_data.3 | 28 +- .../libarchive/files/doc/man/archive_write_disk.3 | 219 +-- .../files/doc/man/archive_write_finish_entry.3 | 5 +- archivers/libarchive/files/doc/man/bsdtar.1 | 31 +- .../libarchive/files/doc/man/libarchive_changes.3 | 1 + archivers/libarchive/files/doc/man/mtree.5 | 2 +- archivers/libarchive/files/doc/pdf/Makefile | 8 +- .../libarchive/files/doc/pdf/archive_entry.3.pdf | Bin 28720 -> 28719 bytes .../files/doc/pdf/archive_entry_acl.3.pdf | Bin 38510 -> 38486 bytes .../files/doc/pdf/archive_entry_linkify.3.pdf | Bin 27964 -> 27964 bytes .../files/doc/pdf/archive_entry_paths.3.pdf | Bin 24916 -> 24868 bytes .../files/doc/pdf/archive_entry_perms.3.pdf | Bin 29428 -> 29411 bytes .../files/doc/pdf/archive_entry_stat.3.pdf | Bin 32905 -> 32905 bytes .../files/doc/pdf/archive_entry_time.3.pdf | Bin 23120 -> 23120 bytes .../libarchive/files/doc/pdf/archive_read.3.pdf | Bin 32552 -> 32552 bytes .../files/doc/pdf/archive_read_data.3.pdf | Bin 26044 -> 26044 bytes .../files/doc/pdf/archive_read_disk.3.pdf | Bin 37817 -> 39936 bytes .../files/doc/pdf/archive_read_extract.3.pdf | Bin 28295 -> 28295 bytes .../files/doc/pdf/archive_read_filter.3.pdf | Bin 24756 -> 24756 bytes .../files/doc/pdf/archive_read_format.3.pdf | Bin 27055 -> 27000 bytes .../files/doc/pdf/archive_read_free.3.pdf | Bin 22608 -> 22608 bytes .../files/doc/pdf/archive_read_header.3.pdf | Bin 22805 -> 22805 bytes .../files/doc/pdf/archive_read_new.3.pdf | Bin 19965 -> 19965 bytes .../files/doc/pdf/archive_read_open.3.pdf | Bin 29930 -> 29934 bytes .../files/doc/pdf/archive_read_set_options.3.pdf | Bin 26705 -> 26705 bytes .../libarchive/files/doc/pdf/archive_util.3.pdf | Bin 28862 -> 28862 bytes .../libarchive/files/doc/pdf/archive_write.3.pdf | Bin 37430 -> 37430 bytes .../files/doc/pdf/archive_write_blocksize.3.pdf | Bin 25697 -> 25697 bytes .../files/doc/pdf/archive_write_data.3.pdf | Bin 21486 -> 22898 bytes .../files/doc/pdf/archive_write_disk.3.pdf | Bin 41725 -> 39794 bytes .../files/doc/pdf/archive_write_filter.3.pdf | Bin 24639 -> 24639 bytes .../files/doc/pdf/archive_write_finish_entry.3.pdf | Bin 23127 -> 23584 bytes .../files/doc/pdf/archive_write_format.3.pdf | Bin 27035 -> 27030 bytes .../files/doc/pdf/archive_write_free.3.pdf | Bin 22423 -> 22423 bytes .../files/doc/pdf/archive_write_header.3.pdf | Bin 22296 -> 22296 bytes .../files/doc/pdf/archive_write_new.3.pdf | Bin 19953 -> 19953 bytes .../files/doc/pdf/archive_write_open.3.pdf | Bin 33080 -> 33080 bytes .../files/doc/pdf/archive_write_set_options.3.pdf | Bin 41905 -> 41905 bytes archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf | Bin 38675 -> 38675 bytes archivers/libarchive/files/doc/pdf/bsdtar.1.pdf | Bin 71677 -> 71703 bytes archivers/libarchive/files/doc/pdf/cpio.5.pdf | Bin 35762 -> 35762 bytes .../files/doc/pdf/libarchive-formats.5.pdf | Bin 42402 -> 42402 bytes .../libarchive/files/doc/pdf/libarchive.3.pdf | Bin 31378 -> 31378 bytes .../files/doc/pdf/libarchive_changes.3.pdf | Bin 35340 -> 35353 bytes .../files/doc/pdf/libarchive_internals.3.pdf | Bin 39553 -> 39553 bytes archivers/libarchive/files/doc/pdf/mtree.5.pdf | Bin 32396 -> 32398 bytes archivers/libarchive/files/doc/pdf/tar.5.pdf | Bin 68753 -> 68753 bytes archivers/libarchive/files/doc/text/Makefile | 8 +- .../libarchive/files/doc/text/archive_entry.3.txt | 68 +- .../files/doc/text/archive_entry_acl.3.txt | 228 ++-- .../files/doc/text/archive_entry_linkify.3.txt | 94 +- .../files/doc/text/archive_entry_paths.3.txt | 150 +-- .../files/doc/text/archive_entry_perms.3.txt | 168 +-- .../files/doc/text/archive_entry_stat.3.txt | 218 +-- .../files/doc/text/archive_entry_time.3.txt | 134 +- .../libarchive/files/doc/text/archive_read.3.txt | 68 +- .../files/doc/text/archive_read_data.3.txt | 70 +- .../files/doc/text/archive_read_disk.3.txt | 181 +-- .../files/doc/text/archive_read_extract.3.txt | 62 +- .../files/doc/text/archive_read_filter.3.txt | 130 +- .../files/doc/text/archive_read_format.3.txt | 134 +- .../files/doc/text/archive_read_free.3.txt | 50 +- .../files/doc/text/archive_read_header.3.txt | 40 +- .../files/doc/text/archive_read_new.3.txt | 18 +- .../files/doc/text/archive_read_open.3.txt | 125 +- .../files/doc/text/archive_read_set_options.3.txt | 112 +- .../libarchive/files/doc/text/archive_util.3.txt | 148 +-- .../libarchive/files/doc/text/archive_write.3.txt | 56 +- .../files/doc/text/archive_write_blocksize.3.txt | 62 +- .../files/doc/text/archive_write_data.3.txt | 47 +- .../files/doc/text/archive_write_disk.3.txt | 294 ++--- .../files/doc/text/archive_write_filter.3.txt | 114 +- .../doc/text/archive_write_finish_entry.3.txt | 41 +- .../files/doc/text/archive_write_format.3.txt | 189 ++- .../files/doc/text/archive_write_free.3.txt | 60 +- .../files/doc/text/archive_write_header.3.txt | 32 +- .../files/doc/text/archive_write_new.3.txt | 18 +- .../files/doc/text/archive_write_open.3.txt | 128 +- .../files/doc/text/archive_write_set_options.3.txt | 226 ++-- archivers/libarchive/files/doc/text/bsdcpio.1.txt | 206 +-- archivers/libarchive/files/doc/text/bsdtar.1.txt | 621 +++++---- archivers/libarchive/files/doc/text/cpio.5.txt | 78 +- .../files/doc/text/libarchive-formats.5.txt | 86 +- .../libarchive/files/doc/text/libarchive.3.txt | 106 +- .../files/doc/text/libarchive_changes.3.txt | 188 +-- .../files/doc/text/libarchive_internals.3.txt | 96 +- archivers/libarchive/files/doc/text/mtree.5.txt | 144 +- archivers/libarchive/files/doc/text/tar.5.txt | 284 ++-- archivers/libarchive/files/doc/wiki/Makefile | 8 +- .../files/doc/wiki/ManPageArchiveEntry3.wiki | 22 +- .../files/doc/wiki/ManPageArchiveEntryAcl3.wiki | 16 +- .../doc/wiki/ManPageArchiveEntryLinkify3.wiki | 4 +- .../files/doc/wiki/ManPageArchiveEntryPaths3.wiki | 20 +- .../files/doc/wiki/ManPageArchiveEntryPerms3.wiki | 14 +- .../files/doc/wiki/ManPageArchiveEntryStat3.wiki | 10 +- .../files/doc/wiki/ManPageArchiveEntryTime3.wiki | 6 +- .../files/doc/wiki/ManPageArchiveRead3.wiki | 38 +- .../files/doc/wiki/ManPageArchiveReadData3.wiki | 18 +- .../files/doc/wiki/ManPageArchiveReadDisk3.wiki | 94 +- .../files/doc/wiki/ManPageArchiveReadExtract3.wiki | 36 +- .../files/doc/wiki/ManPageArchiveReadFilter3.wiki | 10 +- .../files/doc/wiki/ManPageArchiveReadFormat3.wiki | 16 +- .../files/doc/wiki/ManPageArchiveReadFree3.wiki | 16 +- .../files/doc/wiki/ManPageArchiveReadHeader3.wiki | 18 +- .../files/doc/wiki/ManPageArchiveReadNew3.wiki | 14 +- .../files/doc/wiki/ManPageArchiveReadOpen3.wiki | 20 +- .../doc/wiki/ManPageArchiveReadSetOptions3.wiki | 6 +- .../files/doc/wiki/ManPageArchiveUtil3.wiki | 12 +- .../files/doc/wiki/ManPageArchiveWrite3.wiki | 22 +- .../doc/wiki/ManPageArchiveWriteBlocksize3.wiki | 4 +- .../files/doc/wiki/ManPageArchiveWriteData3.wiki | 30 +- .../files/doc/wiki/ManPageArchiveWriteDisk3.wiki | 209 +-- .../files/doc/wiki/ManPageArchiveWriteFilter3.wiki | 8 +- .../doc/wiki/ManPageArchiveWriteFinishEntry3.wiki | 9 +- .../files/doc/wiki/ManPageArchiveWriteFormat3.wiki | 10 +- .../files/doc/wiki/ManPageArchiveWriteFree3.wiki | 4 +- .../files/doc/wiki/ManPageArchiveWriteHeader3.wiki | 6 +- .../files/doc/wiki/ManPageArchiveWriteNew3.wiki | 8 +- .../files/doc/wiki/ManPageArchiveWriteOpen3.wiki | 18 +- .../doc/wiki/ManPageArchiveWriteSetOptions3.wiki | 6 +- .../libarchive/files/doc/wiki/ManPageBsdcpio1.wiki | 10 +- .../libarchive/files/doc/wiki/ManPageBsdtar1.wiki | 41 +- .../files/doc/wiki/ManPageLibarchive3.wiki | 32 +- .../files/doc/wiki/ManPageLibarchiveChanges3.wiki | 21 +- .../files/doc/wiki/ManPageLibarchiveFormats5.wiki | 12 +- .../doc/wiki/ManPageLibarchiveInternals3.wiki | 22 +- .../libarchive/files/doc/wiki/ManPageMtree5.wiki | 2 +- .../libarchive/files/libarchive/CMakeLists.txt | 15 +- archivers/libarchive/files/libarchive/archive.h | 4 +- .../files/libarchive/archive_check_magic.c | 2 +- .../libarchive/files/libarchive/archive_entry.3 | 2 +- .../libarchive/files/libarchive/archive_entry.c | 11 +- .../libarchive/files/libarchive/archive_entry.h | 2 +- .../files/libarchive/archive_entry_acl.3 | 10 +- .../files/libarchive/archive_entry_paths.3 | 12 +- .../files/libarchive/archive_entry_perms.3 | 4 +- .../files/libarchive/archive_entry_sparse.c | 4 +- .../libarchive/files/libarchive/archive_getdate.c | 2 +- .../libarchive/files/libarchive/archive_pack_dev.c | 6 +- .../libarchive/files/libarchive/archive_pack_dev.h | 2 +- .../libarchive/files/libarchive/archive_platform.h | 34 - .../libarchive/files/libarchive/archive_read.c | 3 +- .../files/libarchive/archive_read_disk.3 | 72 +- .../libarchive/archive_read_disk_entry_from_file.c | 1395 +++----------------- .../files/libarchive/archive_read_disk_private.h | 9 + .../files/libarchive/archive_read_open.3 | 4 +- .../libarchive/archive_read_support_format_cab.c | 156 +-- .../libarchive/archive_read_support_format_cpio.c | 2 +- .../archive_read_support_format_iso9660.c | 5 +- .../libarchive/archive_read_support_format_lha.c | 2 +- .../libarchive/archive_read_support_format_mtree.c | 180 +-- .../libarchive/archive_read_support_format_rar.c | 2 +- .../libarchive/archive_read_support_format_tar.c | 18 +- .../libarchive/archive_read_support_format_warc.c | 9 +- .../libarchive/archive_read_support_format_zip.c | 39 +- .../libarchive/files/libarchive/archive_string.c | 6 +- .../files/libarchive/archive_string_sprintf.c | 2 +- .../libarchive/files/libarchive/archive_util.c | 88 +- .../files/libarchive/archive_write_add_filter.c | 2 +- .../libarchive/archive_write_add_filter_by_name.c | 2 +- .../libarchive/archive_write_add_filter_program.c | 2 +- .../files/libarchive/archive_write_data.3 | 24 +- .../files/libarchive/archive_write_disk.3 | 185 +-- .../files/libarchive/archive_write_disk_posix.c | 296 +++-- .../files/libarchive/archive_write_disk_private.h | 6 +- .../files/libarchive/archive_write_finish_entry.3 | 5 +- .../files/libarchive/archive_write_format.3 | 1 - .../files/libarchive/archive_write_set_format.c | 2 +- .../files/libarchive/archive_write_set_format_ar.c | 5 +- .../libarchive/archive_write_set_format_by_name.c | 2 +- .../libarchive/archive_write_set_format_pax.c | 17 +- .../libarchive/files/libarchive/config_freebsd.h | 351 +++-- .../files/libarchive/libarchive_changes.3 | 1 + archivers/libarchive/files/libarchive/mtree.5 | 2 +- .../files/libarchive/test/CMakeLists.txt | 2 + archivers/libarchive/files/libarchive/test/list.h | 2 + .../files/libarchive/test/test_acl_platform_nfs4.c | 633 ++++----- .../libarchive/test/test_acl_platform_posix1e.c | 288 ++-- .../test/test_read_disk_directory_traversals.c | 6 +- .../files/libarchive/test/test_read_format_mtree.c | 2 +- .../files/libarchive/test/test_write_format_pax.c | 14 +- archivers/libarchive/files/tar/bsdtar.1 | 31 +- archivers/libarchive/files/tar/bsdtar.c | 4 +- archivers/libarchive/files/tar/bsdtar.h | 6 +- archivers/libarchive/files/tar/test/CMakeLists.txt | 13 + archivers/libarchive/files/tar/test/list.h | 3 + .../libarchive/files/test_utils/test_common.h | 73 +- 252 files changed, 7447 insertions(+), 7435 deletions(-) diff --git a/archivers/libarchive/files/CMakeLists.txt b/archivers/libarchive/files/CMakeLists.txt index 1c84870f2f7..73bf07b34b4 100644 --- a/archivers/libarchive/files/CMakeLists.txt +++ b/archivers/libarchive/files/CMakeLists.txt @@ -552,6 +552,7 @@ LA_CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) # Alphabetize the rest unless there's a compelling reason LA_CHECK_INCLUDE_FILE("acl/libacl.h" HAVE_ACL_LIBACL_H) +LA_CHECK_INCLUDE_FILE("attr/xattr.h" HAVE_ATTR_XATTR_H) LA_CHECK_INCLUDE_FILE("ctype.h" HAVE_CTYPE_H) LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H) LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H) @@ -579,6 +580,7 @@ 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("membership.h" HAVE_MEMBERSHIP_H) LA_CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H) LA_CHECK_INCLUDE_FILE("paths.h" HAVE_PATHS_H) LA_CHECK_INCLUDE_FILE("poll.h" HAVE_POLL_H) @@ -596,11 +598,13 @@ LA_CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H) LA_CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H) LA_CHECK_INCLUDE_FILE("sys/acl.h" HAVE_SYS_ACL_H) LA_CHECK_INCLUDE_FILE("sys/cdefs.h" HAVE_SYS_CDEFS_H) +LA_CHECK_INCLUDE_FILE("sys/extattr.h" HAVE_SYS_EXTATTR_H) LA_CHECK_INCLUDE_FILE("sys/ioctl.h" HAVE_SYS_IOCTL_H) LA_CHECK_INCLUDE_FILE("sys/mkdev.h" HAVE_SYS_MKDEV_H) LA_CHECK_INCLUDE_FILE("sys/mount.h" HAVE_SYS_MOUNT_H) LA_CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H) LA_CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H) +LA_CHECK_INCLUDE_FILE("sys/richacl.h" HAVE_SYS_RICHACL_H) LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H) LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H) LA_CHECK_INCLUDE_FILE("sys/statfs.h" HAVE_SYS_STATFS_H) @@ -610,6 +614,7 @@ LA_CHECK_INCLUDE_FILE("sys/utime.h" HAVE_SYS_UTIME_H) LA_CHECK_INCLUDE_FILE("sys/utsname.h" HAVE_SYS_UTSNAME_H) LA_CHECK_INCLUDE_FILE("sys/vfs.h" HAVE_SYS_VFS_H) LA_CHECK_INCLUDE_FILE("sys/wait.h" HAVE_SYS_WAIT_H) +LA_CHECK_INCLUDE_FILE("sys/xattr.h" HAVE_SYS_XATTR_H) LA_CHECK_INCLUDE_FILE("time.h" HAVE_TIME_H) LA_CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H) LA_CHECK_INCLUDE_FILE("utime.h" HAVE_UTIME_H) @@ -618,6 +623,9 @@ LA_CHECK_INCLUDE_FILE("wctype.h" HAVE_WCTYPE_H) LA_CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H) IF(ENABLE_CNG) LA_CHECK_INCLUDE_FILE("Bcrypt.h" HAVE_BCRYPT_H) + IF(HAVE_BCRYPT_H) + LIST(APPEND ADDITIONAL_LIBS "Bcrypt") + ENDIF(HAVE_BCRYPT_H) ELSE(ENABLE_CNG) UNSET(HAVE_BCRYPT_H CACHE) ENDIF(ENABLE_CNG) @@ -1195,7 +1203,6 @@ CHECK_FUNCTION_EXISTS_GLIBC(chflags HAVE_CHFLAGS) CHECK_FUNCTION_EXISTS_GLIBC(chown HAVE_CHOWN) CHECK_FUNCTION_EXISTS_GLIBC(chroot HAVE_CHROOT) CHECK_FUNCTION_EXISTS_GLIBC(ctime_r HAVE_CTIME_R) -CHECK_FUNCTION_EXISTS_GLIBC(dirfd HAVE_DIRFD) CHECK_FUNCTION_EXISTS_GLIBC(fchdir HAVE_FCHDIR) CHECK_FUNCTION_EXISTS_GLIBC(fchflags HAVE_FCHFLAGS) CHECK_FUNCTION_EXISTS_GLIBC(fchmod HAVE_FCHMOD) @@ -1295,6 +1302,10 @@ CHECK_C_SOURCE_COMPILES( "#include \nint main() {DIR *d = opendir(\".\"); struct dirent e,*r; return readdir_r(d,&e,&r);}" HAVE_READDIR_R) +# dirfd can be either a function or a macro. +CHECK_C_SOURCE_COMPILES( + "#include \nint main() {DIR *d = opendir(\".\"); return dirfd(d);}" + HAVE_DIRFD) # Only detect readlinkat() if we also have AT_FDCWD in unistd.h. # NOTE: linux requires fcntl.h for AT_FDCWD. @@ -1527,60 +1538,105 @@ CHECK_FILE_OFFSET_BITS() # Check for Extended Attribute libraries, headers, and functions # IF(ENABLE_XATTR) - LA_CHECK_INCLUDE_FILE(attr/xattr.h HAVE_ATTR_XATTR_H) - LA_CHECK_INCLUDE_FILE(sys/xattr.h HAVE_SYS_XATTR_H) - LA_CHECK_INCLUDE_FILE(sys/extattr.h HAVE_SYS_EXTATTR_H) CHECK_LIBRARY_EXISTS(attr "setxattr" "" HAVE_LIBATTR) IF(HAVE_LIBATTR) SET(CMAKE_REQUIRED_LIBRARIES "attr") ENDIF(HAVE_LIBATTR) CHECK_SYMBOL_EXISTS(EXTATTR_NAMESPACE_USER "sys/types.h;sys/extattr.h" HAVE_DECL_EXTATTR_NAMESPACE_USER) - CHECK_FUNCTION_EXISTS_GLIBC(extattr_get_file HAVE_EXTATTR_GET_FILE) - CHECK_FUNCTION_EXISTS_GLIBC(extattr_list_file HAVE_EXTATTR_LIST_FILE) - CHECK_FUNCTION_EXISTS_GLIBC(extattr_set_fd HAVE_EXTATTR_SET_FD) - CHECK_FUNCTION_EXISTS_GLIBC(extattr_set_file HAVE_EXTATTR_SET_FILE) - CHECK_FUNCTION_EXISTS_GLIBC(fgetxattr HAVE_FGETXATTR) - CHECK_FUNCTION_EXISTS_GLIBC(flistxattr HAVE_FLISTXATTR) - CHECK_FUNCTION_EXISTS_GLIBC(fsetxattr HAVE_FSETXATTR) - CHECK_FUNCTION_EXISTS_GLIBC(getxattr HAVE_GETXATTR) - CHECK_FUNCTION_EXISTS_GLIBC(lgetxattr HAVE_LGETXATTR) - CHECK_FUNCTION_EXISTS_GLIBC(listxattr HAVE_LISTXATTR) - CHECK_FUNCTION_EXISTS_GLIBC(llistxattr HAVE_LLISTXATTR) - CHECK_FUNCTION_EXISTS_GLIBC(lsetxattr HAVE_LSETXATTR) - CHECK_FUNCTION_EXISTS_GLIBC(fgetea HAVE_FGETEA) - CHECK_FUNCTION_EXISTS_GLIBC(flistea HAVE_FLISTEA) - CHECK_FUNCTION_EXISTS_GLIBC(fsetea HAVE_FSETEA) - CHECK_FUNCTION_EXISTS_GLIBC(getea HAVE_GETEA) - CHECK_FUNCTION_EXISTS_GLIBC(lgetea HAVE_LGETEA) - CHECK_FUNCTION_EXISTS_GLIBC(listea HAVE_LISTEA) - CHECK_FUNCTION_EXISTS_GLIBC(llistea HAVE_LLISTEA) - CHECK_FUNCTION_EXISTS_GLIBC(lsetea HAVE_LSETEA) + CHECK_SYMBOL_EXISTS(XATTR_NOFOLLOW "sys/xattr.h" HAVE_DECL_XATTR_NOFOLLOW) + IF(HAVE_SYS_XATTR_H AND HAVE_DECL_XATTR_NOFOLLOW) + CHECK_FUNCTION_EXISTS(fgetxattr HAVE_FGETXATTR) + CHECK_FUNCTION_EXISTS(flistxattr HAVE_FLISTXATTR) + CHECK_FUNCTION_EXISTS(fsetxattr HAVE_FSETXATTR) + CHECK_FUNCTION_EXISTS(getxattr HAVE_GETXATTR) + CHECK_FUNCTION_EXISTS(listxattr HAVE_LISTXATTR) + CHECK_FUNCTION_EXISTS(setxattr HAVE_SETXATTR) + IF(HAVE_FGETXATTR AND + HAVE_FLISTXATTR AND + HAVE_FSETXATTR AND + HAVE_GETXATTR AND + HAVE_LISTXATTR AND + HAVE_SETXATTR) + SET(ARCHIVE_XATTR_DARWIN TRUE) + ENDIF() + ELSEIF(HAVE_SYS_EXTATTR_H AND HAVE_DECL_EXTATTR_NAMESPACE_USER) + # FreeBSD xattr support + CHECK_FUNCTION_EXISTS(extattr_get_fd HAVE_EXTATTR_GET_FD) + CHECK_FUNCTION_EXISTS(extattr_get_file HAVE_EXTATTR_GET_FILE) + CHECK_FUNCTION_EXISTS(extattr_get_link HAVE_EXTATTR_GET_LINK) + CHECK_FUNCTION_EXISTS(extattr_list_fd HAVE_EXTATTR_LIST_FD) + CHECK_FUNCTION_EXISTS(extattr_list_file HAVE_EXTATTR_LIST_FILE) + CHECK_FUNCTION_EXISTS(extattr_list_link HAVE_EXTATTR_LIST_LINK) + CHECK_FUNCTION_EXISTS(extattr_set_fd HAVE_EXTATTR_SET_FD) + CHECK_FUNCTION_EXISTS(extattr_set_link HAVE_EXTATTR_SET_LINK) + IF(HAVE_EXTATTR_GET_FD AND + HAVE_EXTATTR_GET_FILE AND + HAVE_EXTATTR_GET_LINK AND + HAVE_EXTATTR_LIST_FD AND + HAVE_EXTATTR_LIST_FILE AND + HAVE_EXTATTR_LIST_LINK AND + HAVE_EXTATTR_SET_FD AND + HAVE_EXTATTR_SET_LINK) + SET(ARCHIVE_XATTR_FREEBSD TRUE) + ENDIF() + ELSEIF(HAVE_SYS_XATTR_H OR HAVE_ATTR_XATTR_H) + # Linux xattr support + CHECK_FUNCTION_EXISTS_GLIBC(fgetxattr HAVE_FGETXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(flistxattr HAVE_FLISTXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(fsetxattr HAVE_FSETXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(getxattr HAVE_GETXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(lgetxattr HAVE_LGETXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(listxattr HAVE_LISTXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(llistxattr HAVE_LLISTXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(lsetxattr HAVE_LSETXATTR) + IF(HAVE_FGETXATTR AND + HAVE_FLISTXATTR AND + HAVE_FSETXATTR AND + HAVE_GETXATTR AND + HAVE_LGETXATTR AND + HAVE_LISTXATTR AND + HAVE_LLISTXATTR AND + HAVE_LSETXATTR) + SET(ARCHIVE_XATTR_LINUX TRUE) + ENDIF() + ELSEIF(HAVE_SYS_EA_H) + # AIX xattr support + CHECK_FUNCTION_EXISTS(fgetea HAVE_FGETEA) + CHECK_FUNCTION_EXISTS(flistea HAVE_FLISTEA) + CHECK_FUNCTION_EXISTS(fsetea HAVE_FSETEA) + CHECK_FUNCTION_EXISTS(getea HAVE_GETEA) + CHECK_FUNCTION_EXISTS(lgetea HAVE_LGETEA) + CHECK_FUNCTION_EXISTS(listea HAVE_LISTEA) + CHECK_FUNCTION_EXISTS(llistea HAVE_LLISTEA) + CHECK_FUNCTION_EXISTS(lsetea HAVE_LSETEA) + IF(HAVE_FGETEA AND + HAVE_FLISTEA AND + HAVE_FSETEA AND + HAVE_GETEA AND + HAVE_LGETEA AND + HAVE_LISTEA AND + HAVE_LLISTEA AND + HAVE_LSETEA) + SET(ARCHIVE_XATTR_AIX TRUE) + ENDIF() + ENDIF() + + IF(ARCHIVE_XATTR_DARWIN) + MESSAGE(STATUS "Extended attributes support: Darwin") + ELSEIF(ARCHIVE_XATTR_FREEBSD) + MESSAGE(STATUS "Extended attributes support: FreeBSD") + ELSEIF(ARCHIVE_XATTR_LINUX) + MESSAGE(STATUS "Extended attributes support: Linux") + ELSEIF(ARCHIVE_XATTR_AIX) + MESSAGE(STATUS "Extended attributes support: AIX") + ELSE() + MESSAGE(STATUS "Extended attributes support: none") + ENDIF() ELSE(ENABLE_XATTR) - SET(HAVE_ATTR_LIB FALSE) - SET(HAVE_ATTR_XATTR_H FALSE) - SET(HAVE_DECL_EXTATTR_NAMESPACE_USER FALSE) - SET(HAVE_EXTATTR_GET_FILE FALSE) - SET(HAVE_EXTATTR_LIST_FILE FALSE) - SET(HAVE_EXTATTR_SET_FD FALSE) - SET(HAVE_EXTATTR_SET_FILE FALSE) - SET(HAVE_FGETEA FALSE) - SET(HAVE_FGETXATTR FALSE) - SET(HAVE_FLISTEA FALSE) - SET(HAVE_FLISTXATTR FALSE) - SET(HAVE_FSETEA FALSE) - SET(HAVE_FSETXATTR FALSE) - SET(HAVE_GETEA FALSE) - SET(HAVE_GETXATTR FALSE) - SET(HAVE_LGETEA FALSE) - SET(HAVE_LGETXATTR FALSE) - SET(HAVE_LISTEA FALSE) - SET(HAVE_LISTXATTR FALSE) - SET(HAVE_LLISTEA FALSE) - SET(HAVE_LLISTXATTR FALSE) - SET(HAVE_LSETEA FALSE) - SET(HAVE_LSETXATTR FALSE) - SET(HAVE_SYS_EXTATTR_H FALSE) - SET(HAVE_SYS_XATTR_H FALSE) + SET(ARCHIVE_XATTR_DARWIN FALSE) + SET(ARCHIVE_XATTR_FREEBSD FALSE) + SET(ARCHIVE_XATTR_LINUX FALSE) + SET(ARCHIVE_XATTR_AIX FALSE) ENDIF(ENABLE_XATTR) # @@ -1592,83 +1648,212 @@ ENDIF(ENABLE_XATTR) # which makes the following checks rather more complex than I would like. # IF(ENABLE_ACL) + # Solaris and derivates ACLs + CHECK_FUNCTION_EXISTS(acl HAVE_ACL) + CHECK_FUNCTION_EXISTS(facl HAVE_FACL) + + # Libacl CHECK_LIBRARY_EXISTS(acl "acl_get_file" "" HAVE_LIBACL) IF(HAVE_LIBACL) SET(CMAKE_REQUIRED_LIBRARIES "acl") FIND_LIBRARY(ACL_LIBRARY NAMES acl) LIST(APPEND ADDITIONAL_LIBS ${ACL_LIBRARY}) ENDIF(HAVE_LIBACL) - # - CHECK_FUNCTION_EXISTS_GLIBC(acl_create_entry HAVE_ACL_CREATE_ENTRY) - CHECK_FUNCTION_EXISTS_GLIBC(acl_init HAVE_ACL_INIT) - CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd HAVE_ACL_SET_FD) - CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd_np HAVE_ACL_SET_FD_NP) - CHECK_FUNCTION_EXISTS_GLIBC(acl_set_file HAVE_ACL_SET_FILE) - CHECK_TYPE_EXISTS(acl_permset_t "${INCLUDES}" HAVE_ACL_PERMSET_T) - - # The "acl_get_perm()" function was omitted from the POSIX draft. - # (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. - 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_DECL_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_DECL_ACL_USER) - CHECK_C_SOURCE_COMPILES("#include + + CHECK_TYPE_EXISTS(acl_t "sys/types.h;sys/acl.h" HAVE_ACL_T) + CHECK_TYPE_EXISTS(acl_entry_t "sys/types.h;sys/acl.h" HAVE_ACL_ENTRY_T) + CHECK_TYPE_EXISTS(acl_permset_t "sys/types.h;sys/acl.h" HAVE_ACL_PERMSET_T) + CHECK_TYPE_EXISTS(acl_tag_t "sys/types.h;sys/acl.h" HAVE_ACL_TAG_T) + + IF(HAVE_ACL AND HAVE_FACL) + CHECK_TYPE_EXISTS(aclent_t "sys/acl.h" HAVE_ACLENT_T) + IF(HAVE_ACLENT_T) + CHECK_SYMBOL_EXISTS(GETACL "sys/acl.h" HAVE_DECL_GETACL) + CHECK_SYMBOL_EXISTS(GETACLCNT "sys/acl.h" HAVE_DECL_GETACLCNT) + CHECK_SYMBOL_EXISTS(SETACL "sys/acl.h" HAVE_DECL_SETACL) + IF(HAVE_DECL_GETACL AND + HAVE_DECL_GETACLCNT AND + HAVE_DECL_SETACL) + SET(ARCHIVE_ACL_SUNOS TRUE) + ENDIF() + CHECK_TYPE_EXISTS(ace_t "sys/acl.h" HAVE_ACE_T) + IF(HAVE_ACE_T) + CHECK_SYMBOL_EXISTS(ACE_GETACL "sys/acl.h" HAVE_DECL_ACE_GETACL) + CHECK_SYMBOL_EXISTS(ACE_GETACLCNT "sys/acl.h" HAVE_DECL_ACE_GETACLCNT) + CHECK_SYMBOL_EXISTS(ACE_SETACL "sys/acl.h" HAVE_DECL_ACE_SETACL) + IF(HAVE_DECL_ACE_GETACL AND + HAVE_DECL_ACE_GETACLCNT AND + HAVE_DECL_ACE_SETACL) + SET(ARCHIVE_ACL_SUNOS_NFS4 TRUE) + ENDIF() + ENDIF(HAVE_ACE_T) + ENDIF(HAVE_ACLENT_T) + ENDIF(HAVE_ACL AND HAVE_FACL) + + IF(HAVE_ACL_T AND HAVE_ACL_ENTRY_T AND HAVE_ACL_PERMSET_T AND HAVE_ACL_TAG_T) + CHECK_FUNCTION_EXISTS_GLIBC(acl_add_perm HAVE_ACL_ADD_PERM) + CHECK_FUNCTION_EXISTS_GLIBC(acl_clear_perms HAVE_ACL_CLEAR_PERMS) + CHECK_FUNCTION_EXISTS_GLIBC(acl_create_entry HAVE_ACL_CREATE_ENTRY) + CHECK_FUNCTION_EXISTS_GLIBC(acl_delete_def_file HAVE_ACL_DELETE_DEF_FILE) + CHECK_FUNCTION_EXISTS_GLIBC(acl_free HAVE_ACL_FREE) + CHECK_FUNCTION_EXISTS_GLIBC(acl_get_entry HAVE_ACL_GET_ENTRY) + CHECK_FUNCTION_EXISTS_GLIBC(acl_get_fd HAVE_ACL_GET_FD) + CHECK_FUNCTION_EXISTS_GLIBC(acl_get_file HAVE_ACL_GET_FILE) + CHECK_FUNCTION_EXISTS_GLIBC(acl_get_permset HAVE_ACL_GET_PERMSET) + CHECK_FUNCTION_EXISTS_GLIBC(acl_get_qualifier HAVE_ACL_GET_QUALIFIER) + CHECK_FUNCTION_EXISTS_GLIBC(acl_get_tag_type HAVE_ACL_GET_TAG_TYPE) + CHECK_FUNCTION_EXISTS_GLIBC(acl_init HAVE_ACL_INIT) + CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd HAVE_ACL_SET_FD) + CHECK_FUNCTION_EXISTS_GLIBC(acl_set_file HAVE_ACL_SET_FILE) + CHECK_FUNCTION_EXISTS_GLIBC(acl_set_qualifier HAVE_ACL_SET_QUALIFIER) + CHECK_FUNCTION_EXISTS_GLIBC(acl_set_tag_type HAVE_ACL_SET_TAG_TYPE) + IF(HAVE_ACL_ADD_PERM AND + HAVE_ACL_CLEAR_PERMS AND + HAVE_ACL_CREATE_ENTRY AND + HAVE_ACL_DELETE_DEF_FILE AND + HAVE_ACL_FREE AND + HAVE_ACL_GET_ENTRY AND + HAVE_ACL_GET_FD AND + HAVE_ACL_GET_FILE AND + HAVE_ACL_GET_PERMSET AND + HAVE_ACL_GET_QUALIFIER AND + HAVE_ACL_GET_TAG_TYPE AND + HAVE_ACL_INIT AND + HAVE_ACL_SET_FD AND + HAVE_ACL_SET_FILE AND + HAVE_ACL_SET_QUALIFIER AND + HAVE_ACL_SET_TAG_TYPE) + SET(HAVE_POSIX_ACL_FUNCS 1) + ENDIF() + + CHECK_FUNCTION_EXISTS_GLIBC(acl_get_perm HAVE_ACL_GET_PERM) + + IF(HAVE_POSIX_ACL_FUNCS AND HAVE_ACL_LIBACL_H AND HAVE_LIBACL AND + HAVE_ACL_GET_PERM) + SET(ARCHIVE_ACL_LIBACL TRUE) + ELSE() + CHECK_FUNCTION_EXISTS(acl_add_flag_np HAVE_ACL_ADD_FLAG_NP) + CHECK_FUNCTION_EXISTS(acl_clear_flags_np HAVE_ACL_CLEAR_FLAGS_NP) + CHECK_FUNCTION_EXISTS(acl_get_brand_np HAVE_ACL_GET_BRAND_NP) + CHECK_FUNCTION_EXISTS(acl_get_entry_type_np HAVE_ACL_GET_ENTRY_TYPE_NP) + CHECK_FUNCTION_EXISTS(acl_get_flag_np HAVE_ACL_GET_FLAG_NP) + CHECK_FUNCTION_EXISTS(acl_get_flagset_np HAVE_ACL_GET_FLAGSET_NP) + CHECK_FUNCTION_EXISTS(acl_get_fd_np HAVE_ACL_GET_FD_NP) + CHECK_FUNCTION_EXISTS(acl_get_link_np HAVE_ACL_GET_LINK_NP) + CHECK_FUNCTION_EXISTS(acl_get_perm_np HAVE_ACL_GET_PERM_NP) + CHECK_FUNCTION_EXISTS(acl_is_trivial_np HAVE_ACL_IS_TRIVIAL_NP) + CHECK_FUNCTION_EXISTS(acl_set_entry_type_np HAVE_ACL_SET_ENTRY_TYPE_NP) + CHECK_FUNCTION_EXISTS(acl_set_fd_np HAVE_ACL_SET_FD_NP) + CHECK_FUNCTION_EXISTS(acl_set_link_np HAVE_ACL_SET_LINK_NP) + CHECK_FUNCTION_EXISTS(mbr_gid_to_uuid HAVE_MBR_GID_TO_UUID) + CHECK_FUNCTION_EXISTS(mbr_uid_to_uuid HAVE_MBR_UID_TO_UUID) + CHECK_FUNCTION_EXISTS(mbr_uuid_to_id HAVE_MBR_UUID_TO_ID) + + CHECK_C_SOURCE_COMPILES("#include #include int main(void) { return ACL_TYPE_EXTENDED; }" HAVE_DECL_ACL_TYPE_EXTENDED) - CHECK_C_SOURCE_COMPILES("#include + CHECK_C_SOURCE_COMPILES("#include #include int main(void) { return ACL_SYNCHRONIZE; }" HAVE_DECL_ACL_SYNCHRONIZE) + CHECK_SYMBOL_EXISTS(ACL_TYPE_NFS4 "sys/acl.h" HAVE_DECL_ACL_TYPE_NFS4) + CHECK_SYMBOL_EXISTS(ACL_USER "sys/acl.h" HAVE_DECL_ACL_USER) + + IF(HAVE_POSIX_ACL_FUNCS AND + HAVE_ACL_GET_FD_NP AND + HAVE_ACL_GET_PERM_NP AND + NOT HAVE_ACL_GET_PERM AND + HAVE_ACL_SET_FD_NP) + IF(HAVE_DECL_ACL_USER) + SET(ARCHIVE_ACL_FREEBSD TRUE) + IF(HAVE_DECL_ACL_TYPE_NFS4 AND + HAVE_ACL_ADD_FLAG_NP AND + HAVE_ACL_CLEAR_FLAGS_NP AND + HAVE_ACL_GET_BRAND_NP AND + HAVE_ACL_GET_ENTRY_TYPE_NP AND + HAVE_ACL_GET_FLAGSET_NP AND + HAVE_ACL_SET_ENTRY_TYPE_NP) + SET(ARCHIVE_ACL_FREEBSD_NFS4 TRUE) + ENDIF() + ELSEIF(HAVE_DECL_ACL_TYPE_EXTENDED AND + HAVE_MEMBERSHIP_H AND + HAVE_ACL_ADD_FLAG_NP AND + HAVE_ACL_CLEAR_FLAGS_NP AND + HAVE_ACL_GET_FLAGSET_NP AND + HAVE_ACL_GET_LINK_NP AND + HAVE_ACL_SET_LINK_NP AND + HAVE_MBR_UID_TO_UUID AND + HAVE_MBR_GID_TO_UUID AND + HAVE_MBR_UUID_TO_ID) + SET(ARCHIVE_ACL_DARWIN TRUE) + ENDIF() + ENDIF() + ENDIF() + ENDIF(HAVE_ACL_T AND HAVE_ACL_ENTRY_T AND HAVE_ACL_PERMSET_T AND + HAVE_ACL_TAG_T) + + # Richacl + CHECK_LIBRARY_EXISTS(richacl "richacl_get_file" "" HAVE_LIBRICHACL) + IF(HAVE_LIBRICHACL) + SET(CMAKE_REQUIRED_LIBRARIES "richacl") + FIND_LIBRARY(RICHACL_LIBRARY NAMES richacl) + LIST(APPEND ADDITIONAL_LIBS ${RICHACL_LIBRARY}) + ENDIF(HAVE_LIBRICHACL) + + CHECK_STRUCT_HAS_MEMBER("struct richace" e_type "sys/richacl.h" + HAVE_STRUCT_RICHACE) + CHECK_STRUCT_HAS_MEMBER("struct richacl" a_flags "sys/richacl.h" + HAVE_STRUCT_RICHACL) + + IF(HAVE_LIBRICHACL AND HAVE_STRUCT_RICHACL AND HAVE_STRUCT_RICHACE) + CHECK_FUNCTION_EXISTS_GLIBC(richacl_alloc HAVE_RICHACL_ALLOC) + CHECK_FUNCTION_EXISTS_GLIBC(richacl_equiv_mode HAVE_RICHACL_EQUIV_MODE) + CHECK_FUNCTION_EXISTS_GLIBC(richacl_free HAVE_RICHACL_FREE) + CHECK_FUNCTION_EXISTS_GLIBC(richacl_get_fd HAVE_RICHACL_GET_FD) + CHECK_FUNCTION_EXISTS_GLIBC(richacl_get_file HAVE_RICHACL_GET_FILE) + CHECK_FUNCTION_EXISTS_GLIBC(richacl_set_fd HAVE_RICHACL_SET_FD) + CHECK_FUNCTION_EXISTS_GLIBC(richacl_set_file HAVE_RICHACL_SET_FILE) + IF(HAVE_RICHACL_ALLOC AND + HAVE_RICHACL_EQUIV_MODE AND + HAVE_RICHACL_FREE AND + HAVE_RICHACL_GET_FD AND + HAVE_RICHACL_GET_FILE AND + HAVE_RICHACL_SET_FD AND + HAVE_RICHACL_SET_FILE) + SET(ARCHIVE_ACL_LIBRICHACL TRUE) + ENDIF() + ENDIF(HAVE_LIBRICHACL AND HAVE_STRUCT_RICHACL AND HAVE_STRUCT_RICHACE) + + IF(ARCHIVE_ACL_DARWIN) + MESSAGE(STATUS "ACL support: Darwin (limited NFSv4)") + ELSEIF(ARCHIVE_ACL_FREEBSD_NFS4) + MESSAGE(STATUS "ACL support: FreeBSD (POSIX.1e and NFSv4)") + ELSEIF(ARCHIVE_ACL_FREEBSD) + MESSAGE(STATUS "ACL support: FreeBSD (POSIX.1e)") + ELSEIF(ARCHIVE_ACL_LIBACL OR ARCHIVE_ACL_LIBRICHACL) + IF(ARCHIVE_ACL_LIBACL AND ARCHIVE_ACL_LIBRICHACL) + MESSAGE(STATUS "ACL support: libacl (POSIX.1e) + librichacl (NFSv4)") + ELSEIF(ARCHIVE_ACL_LIBRICHACL) + MESSAGE(STATUS "ACL support: librichacl (NFSv4)") + ELSE() + MESSAGE(STATUS "ACL support: libacl (POSIX.1e)") + ENDIF() + ELSEIF(ARCHIVE_ACL_SUNOS_NFS4) + MESSAGE(STATUS "ACL support: Solaris (POSIX.1e and NFSv4)") + ELSEIF(ARCHIVE_ACL_SUNOS) + MESSAGE(STATUS "ACL support: Solaris (POSIX.1e)") + ELSE() + MESSAGE(STATUS "ACL support: none") + ENDIF() - # Solaris and derivates ACLs - CHECK_TYPE_EXISTS(aclent_t "${INCLUDES}" HAVE_ACLENT_T) - CHECK_TYPE_EXISTS(ace_t "${INCLUDES}" HAVE_ACE_T) - CHECK_FUNCTION_EXISTS(acl HAVE_ACL) - CHECK_FUNCTION_EXISTS(facl HAVE_FACL) - CHECK_SYMBOL_EXISTS(GETACL "${INCLUDES}" HAVE_DECL_GETACL) - CHECK_SYMBOL_EXISTS(GETACLCNT "${INCLUDES}" HAVE_DECL_GETACLCNT) - CHECK_SYMBOL_EXISTS(SETACL "${INCLUDES}" HAVE_DECL_SETACL) - CHECK_SYMBOL_EXISTS(ACE_GETACL "${INCLUDES}" HAVE_DECL_ACE_GETACL) - CHECK_SYMBOL_EXISTS(ACE_GETACLCNT "${INCLUDES}" HAVE_DECL_ACE_GETACLCNT) - CHECK_SYMBOL_EXISTS(ACE_SETACL "${INCLUDES}" HAVE_DECL_ACE_SETACL) ELSE(ENABLE_ACL) # If someone runs cmake, then disables ACL support, we need # to forcibly override the cached values for these. - SET(HAVE_ACL_CREATE_ENTRY FALSE) - SET(HAVE_ACL_GET_LINK FALSE) - SET(HAVE_ACL_GET_LINK_NP FALSE) - SET(HAVE_ACL_GET_PERM FALSE) - SET(HAVE_ACL_GET_PERM_NP FALSE) - SET(HAVE_ACL_INIT FALSE) - SET(HAVE_ACL_LIB FALSE) - SET(HAVE_ACL_PERMSET_T FALSE) - SET(HAVE_ACL_SET_FD FALSE) - SET(HAVE_ACL_SET_FD_NP FALSE) - SET(HAVE_ACL_SET_FILE FALSE) - SET(HAVE_ACL_TYPE_EXTENDED FALSE) - SET(HAVE_ACLENT_T FALSE) - SET(HAVE_ACE_T FALSE) - SET(HAVE_DECL_ACL_TYPE_NFS4 FALSE) - SET(HAVE_DECL_ACL_USER FALSE) - SET(HAVE_DECL_ACL_SYNCHRONIZE FALSE) - SET(HAVE_DECL_GETACL FALSE) - SET(HAVE_DECL_GETACLCNT FALSE) - SET(HAVE_DECL_SETACL FALSE) - SET(HAVE_DECL_ACE_GETACL FALSE) - SET(HAVE_DECL_ACE_GETACLCNT FALSE) - SET(HAVE_DECL_ACE_SETACL FALSE) - SET(HAVE_ACL FALSE) - SET(HAVE_FACL FALSE) + SET(ARCHIVE_ACL_DARWIN FALSE) + SET(ARCHIVE_ACL_FREEBSD FALSE) + SET(ARCHIVE_ACL_FREEBSD_NFS4 FALSE) + SET(ARCHIVE_ACL_LIBACL FALSE) + SET(ARCHIVE_ACL_SUNOS FALSE) + SET(ARCHIVE_ACL_SUNOS_NFS4 FALSE) ENDIF(ENABLE_ACL) # diff --git a/archivers/libarchive/files/Makefile.am b/archivers/libarchive/files/Makefile.am index f22a918729a..63d7cc7913a 100644 --- a/archivers/libarchive/files/Makefile.am +++ b/archivers/libarchive/files/Makefile.am @@ -127,6 +127,8 @@ libarchive_la_SOURCES= \ libarchive/archive_pathmatch.c \ libarchive/archive_pathmatch.h \ libarchive/archive_platform.h \ + libarchive/archive_platform_acl.h \ + libarchive/archive_platform_xattr.h \ libarchive/archive_ppmd_private.h \ libarchive/archive_ppmd7.c \ libarchive/archive_ppmd7_private.h \ @@ -186,9 +188,9 @@ libarchive_la_SOURCES= \ libarchive/archive_string_composition.h \ libarchive/archive_string_sprintf.c \ libarchive/archive_util.c \ + libarchive/archive_version_details.c \ libarchive/archive_virtual.c \ libarchive/archive_write.c \ - libarchive/archive_write_disk_acl.c \ libarchive/archive_write_disk_posix.c \ libarchive/archive_write_disk_private.h \ libarchive/archive_write_disk_set_standard_lookup.c \ @@ -247,6 +249,22 @@ libarchive_la_SOURCES+= \ libarchive/filter_fork_windows.c endif +if INC_LINUX_ACL +libarchive_la_SOURCES+= libarchive/archive_disk_acl_linux.c +else +if INC_SUNOS_ACL +libarchive_la_SOURCES+= libarchive/archive_disk_acl_sunos.c +else +if INC_DARWIN_ACL +libarchive_la_SOURCES+= libarchive/archive_disk_acl_darwin.c +else +if INC_FREEBSD_ACL +libarchive_la_SOURCES+= libarchive/archive_disk_acl_freebsd.c +endif +endif +endif +endif + # -no-undefined marks that libarchive doesn't rely on symbols # defined in the application. This is mandatory for cygwin. libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION) @@ -497,6 +515,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_read_format_zip_winzip_aes.c \ libarchive/test/test_read_format_zip_winzip_aes_large.c \ libarchive/test/test_read_format_zip_zip64.c \ + libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c \ libarchive/test/test_read_large.c \ libarchive/test/test_read_pax_schily_xattr.c \ libarchive/test/test_read_pax_truncated.c \ @@ -585,6 +604,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_write_format_zip_zip64.c \ libarchive/test/test_write_open_memory.c \ libarchive/test/test_write_read_format_zip.c \ + libarchive/test/test_xattr_platform.c \ libarchive/test/test_zip_filename_encoding.c libarchive_test_CPPFLAGS= \ @@ -830,6 +850,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_zip_winzip_aes256.zip.uu \ libarchive/test/test_read_format_zip_winzip_aes256_large.zip.uu \ libarchive/test/test_read_format_zip_winzip_aes256_stored.zip.uu \ + libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu \ libarchive/test/test_read_format_zip_zip64a.zip.uu \ libarchive/test/test_read_format_zip_zip64b.zip.uu \ libarchive/test/test_read_large_splitted_rar_aa.uu \ @@ -951,10 +972,12 @@ bsdtar_test_SOURCES= \ tar/test/test_option_T_upper.c \ tar/test/test_option_U_upper.c \ tar/test/test_option_X_upper.c \ + tar/test/test_option_acls.c \ tar/test/test_option_a.c \ tar/test/test_option_b.c \ tar/test/test_option_b64encode.c \ tar/test/test_option_exclude.c \ + tar/test/test_option_fflags.c \ tar/test/test_option_gid_gname.c \ tar/test/test_option_grzip.c \ tar/test/test_option_j.c \ @@ -974,6 +997,7 @@ bsdtar_test_SOURCES= \ tar/test/test_option_s.c \ tar/test/test_option_uid_uname.c \ tar/test/test_option_uuencode.c \ + tar/test/test_option_xattrs.c \ tar/test/test_option_xz.c \ tar/test/test_option_z.c \ tar/test/test_patterns.c \ diff --git a/archivers/libarchive/files/Makefile.in b/archivers/libarchive/files/Makefile.in index 3755fabd163..a7f7ae9528a 100644 --- a/archivers/libarchive/files/Makefile.in +++ b/archivers/libarchive/files/Makefile.in @@ -104,15 +104,19 @@ TESTS = libarchive_test$(EXEEXT) $(am__EXEEXT_4) $(am__EXEEXT_5) \ @INC_WINDOWS_FILES_TRUE@ libarchive/archive_write_disk_windows.c \ @INC_WINDOWS_FILES_TRUE@ libarchive/filter_fork_windows.c -@INC_WINDOWS_FILES_TRUE@am__append_2 = \ +@INC_LINUX_ACL_TRUE@am__append_2 = libarchive/archive_disk_acl_linux.c +@INC_LINUX_ACL_FALSE@@INC_SUNOS_ACL_TRUE@am__append_3 = libarchive/archive_disk_acl_sunos.c +@INC_DARWIN_ACL_TRUE@@INC_LINUX_ACL_FALSE@@INC_SUNOS_ACL_FALSE@am__append_4 = libarchive/archive_disk_acl_darwin.c +@INC_DARWIN_ACL_FALSE@@INC_FREEBSD_ACL_TRUE@@INC_LINUX_ACL_FALSE@@INC_SUNOS_ACL_FALSE@am__append_5 = libarchive/archive_disk_acl_freebsd.c +@INC_WINDOWS_FILES_TRUE@am__append_6 = \ @INC_WINDOWS_FILES_TRUE@ tar/bsdtar_windows.h \ @INC_WINDOWS_FILES_TRUE@ tar/bsdtar_windows.c -@INC_WINDOWS_FILES_TRUE@am__append_3 = \ +@INC_WINDOWS_FILES_TRUE@am__append_7 = \ @INC_WINDOWS_FILES_TRUE@ cpio/cpio_windows.h \ @INC_WINDOWS_FILES_TRUE@ cpio/cpio_windows.c -@INC_WINDOWS_FILES_TRUE@am__append_4 = +@INC_WINDOWS_FILES_TRUE@am__append_8 = subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = \ @@ -198,6 +202,8 @@ am__libarchive_la_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/archive_pack_dev.h libarchive/archive_pack_dev.c \ libarchive/archive_pathmatch.c libarchive/archive_pathmatch.h \ libarchive/archive_platform.h \ + libarchive/archive_platform_acl.h \ + libarchive/archive_platform_xattr.h \ libarchive/archive_ppmd_private.h libarchive/archive_ppmd7.c \ libarchive/archive_ppmd7_private.h \ libarchive/archive_private.h libarchive/archive_random.c \ @@ -251,8 +257,8 @@ am__libarchive_la_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/archive_string.c libarchive/archive_string.h \ libarchive/archive_string_composition.h \ libarchive/archive_string_sprintf.c libarchive/archive_util.c \ + libarchive/archive_version_details.c \ libarchive/archive_virtual.c libarchive/archive_write.c \ - libarchive/archive_write_disk_acl.c \ libarchive/archive_write_disk_posix.c \ libarchive/archive_write_disk_private.h \ libarchive/archive_write_disk_set_standard_lookup.c \ @@ -301,7 +307,11 @@ am__libarchive_la_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/archive_read_disk_windows.c \ libarchive/archive_windows.h libarchive/archive_windows.c \ libarchive/archive_write_disk_windows.c \ - libarchive/filter_fork_windows.c + libarchive/filter_fork_windows.c \ + libarchive/archive_disk_acl_linux.c \ + libarchive/archive_disk_acl_sunos.c \ + libarchive/archive_disk_acl_darwin.c \ + libarchive/archive_disk_acl_freebsd.c am__dirstamp = $(am__leading_dot)dirstamp @INC_WINDOWS_FILES_TRUE@am__objects_1 = \ @INC_WINDOWS_FILES_TRUE@ libarchive/archive_entry_copy_bhfi.lo \ @@ -309,6 +319,11 @@ am__dirstamp = $(am__leading_dot)dirstamp @INC_WINDOWS_FILES_TRUE@ libarchive/archive_windows.lo \ @INC_WINDOWS_FILES_TRUE@ libarchive/archive_write_disk_windows.lo \ @INC_WINDOWS_FILES_TRUE@ libarchive/filter_fork_windows.lo +@INC_LINUX_ACL_TRUE@am__objects_2 = \ +@INC_LINUX_ACL_TRUE@ libarchive/archive_disk_acl_linux.lo +@INC_LINUX_ACL_FALSE@@INC_SUNOS_ACL_TRUE@am__objects_3 = libarchive/archive_disk_acl_sunos.lo +@INC_DARWIN_ACL_TRUE@@INC_LINUX_ACL_FALSE@@INC_SUNOS_ACL_FALSE@am__objects_4 = libarchive/archive_disk_acl_darwin.lo +@INC_DARWIN_ACL_FALSE@@INC_FREEBSD_ACL_TRUE@@INC_LINUX_ACL_FALSE@@INC_SUNOS_ACL_FALSE@am__objects_5 = libarchive/archive_disk_acl_freebsd.lo am_libarchive_la_OBJECTS = libarchive/archive_acl.lo \ libarchive/archive_check_magic.lo \ libarchive/archive_cmdline.lo libarchive/archive_cryptor.lo \ @@ -369,9 +384,9 @@ am_libarchive_la_OBJECTS = libarchive/archive_acl.lo \ libarchive/archive_read_support_format_zip.lo \ libarchive/archive_string.lo \ libarchive/archive_string_sprintf.lo \ - libarchive/archive_util.lo libarchive/archive_virtual.lo \ - libarchive/archive_write.lo \ - libarchive/archive_write_disk_acl.lo \ + libarchive/archive_util.lo \ + libarchive/archive_version_details.lo \ + libarchive/archive_virtual.lo libarchive/archive_write.lo \ libarchive/archive_write_disk_posix.lo \ libarchive/archive_write_disk_set_standard_lookup.lo \ libarchive/archive_write_open_fd.lo \ @@ -413,7 +428,8 @@ am_libarchive_la_OBJECTS = libarchive/archive_acl.lo \ libarchive/archive_write_set_options.lo \ libarchive/archive_write_set_passphrase.lo \ libarchive/filter_fork_posix.lo libarchive/xxhash.lo \ - $(am__objects_1) + $(am__objects_1) $(am__objects_2) $(am__objects_3) \ + $(am__objects_4) $(am__objects_5) libarchive_la_OBJECTS = $(am_libarchive_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -434,16 +450,16 @@ libarchive_fe_la_OBJECTS = $(am_libarchive_fe_la_OBJECTS) @BUILD_BSDCPIO_TRUE@am__EXEEXT_5 = bsdcpio_test$(EXEEXT) @BUILD_BSDCAT_TRUE@am__EXEEXT_6 = bsdcat_test$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) -am__objects_2 = +am__objects_6 = am_bsdcat_OBJECTS = cat/bsdcat-bsdcat.$(OBJEXT) \ - cat/bsdcat-cmdline.$(OBJEXT) $(am__objects_2) + cat/bsdcat-cmdline.$(OBJEXT) $(am__objects_6) bsdcat_OBJECTS = $(am_bsdcat_OBJECTS) bsdcat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(bsdcat_LDFLAGS) $(LDFLAGS) -o $@ -am__objects_3 = test_utils/bsdcat_test-test_utils.$(OBJEXT) \ +am__objects_7 = test_utils/bsdcat_test-test_utils.$(OBJEXT) \ test_utils/bsdcat_test-test_main.$(OBJEXT) -am_bsdcat_test_OBJECTS = $(am__objects_3) \ +am_bsdcat_test_OBJECTS = $(am__objects_7) \ cat/test/bsdcat_test-test_0.$(OBJEXT) \ cat/test/bsdcat_test-test_empty_gz.$(OBJEXT) \ cat/test/bsdcat_test-test_empty_lz4.$(OBJEXT) \ @@ -463,17 +479,17 @@ bsdcat_test_OBJECTS = $(am_bsdcat_test_OBJECTS) bsdcat_test_DEPENDENCIES = libarchive_fe.la am__bsdcpio_SOURCES_DIST = cpio/cmdline.c cpio/cpio.c cpio/cpio.h \ cpio/cpio_platform.h cpio/cpio_windows.h cpio/cpio_windows.c -@INC_WINDOWS_FILES_TRUE@am__objects_4 = \ +@INC_WINDOWS_FILES_TRUE@am__objects_8 = \ @INC_WINDOWS_FILES_TRUE@ cpio/bsdcpio-cpio_windows.$(OBJEXT) am_bsdcpio_OBJECTS = cpio/bsdcpio-cmdline.$(OBJEXT) \ - cpio/bsdcpio-cpio.$(OBJEXT) $(am__objects_4) + cpio/bsdcpio-cpio.$(OBJEXT) $(am__objects_8) bsdcpio_OBJECTS = $(am_bsdcpio_OBJECTS) bsdcpio_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(bsdcpio_LDFLAGS) $(LDFLAGS) -o $@ -am__objects_5 = test_utils/bsdcpio_test-test_utils.$(OBJEXT) \ +am__objects_9 = test_utils/bsdcpio_test-test_utils.$(OBJEXT) \ test_utils/bsdcpio_test-test_main.$(OBJEXT) -am_bsdcpio_test_OBJECTS = $(am__objects_5) \ +am_bsdcpio_test_OBJECTS = $(am__objects_9) \ cpio/bsdcpio_test-cmdline.$(OBJEXT) \ cpio/test/bsdcpio_test-test_0.$(OBJEXT) \ cpio/test/bsdcpio_test-test_basic.$(OBJEXT) \ @@ -527,20 +543,20 @@ am__bsdtar_SOURCES_DIST = tar/bsdtar.c tar/bsdtar.h \ tar/bsdtar_platform.h tar/cmdline.c tar/creation_set.c \ tar/read.c tar/subst.c tar/util.c tar/write.c \ tar/bsdtar_windows.h tar/bsdtar_windows.c -@INC_WINDOWS_FILES_TRUE@am__objects_6 = \ +@INC_WINDOWS_FILES_TRUE@am__objects_10 = \ @INC_WINDOWS_FILES_TRUE@ tar/bsdtar-bsdtar_windows.$(OBJEXT) am_bsdtar_OBJECTS = tar/bsdtar-bsdtar.$(OBJEXT) \ tar/bsdtar-cmdline.$(OBJEXT) tar/bsdtar-creation_set.$(OBJEXT) \ tar/bsdtar-read.$(OBJEXT) tar/bsdtar-subst.$(OBJEXT) \ tar/bsdtar-util.$(OBJEXT) tar/bsdtar-write.$(OBJEXT) \ - $(am__objects_6) + $(am__objects_10) bsdtar_OBJECTS = $(am_bsdtar_OBJECTS) bsdtar_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(bsdtar_LDFLAGS) $(LDFLAGS) -o $@ -am__objects_7 = test_utils/bsdtar_test-test_utils.$(OBJEXT) \ +am__objects_11 = test_utils/bsdtar_test-test_utils.$(OBJEXT) \ test_utils/bsdtar_test-test_main.$(OBJEXT) -am_bsdtar_test_OBJECTS = $(am__objects_7) \ +am_bsdtar_test_OBJECTS = $(am__objects_11) \ tar/test/bsdtar_test-test_0.$(OBJEXT) \ tar/test/bsdtar_test-test_basic.$(OBJEXT) \ tar/test/bsdtar_test-test_copy.$(OBJEXT) \ @@ -566,10 +582,12 @@ am_bsdtar_test_OBJECTS = $(am__objects_7) \ tar/test/bsdtar_test-test_option_T_upper.$(OBJEXT) \ tar/test/bsdtar_test-test_option_U_upper.$(OBJEXT) \ tar/test/bsdtar_test-test_option_X_upper.$(OBJEXT) \ + tar/test/bsdtar_test-test_option_acls.$(OBJEXT) \ tar/test/bsdtar_test-test_option_a.$(OBJEXT) \ tar/test/bsdtar_test-test_option_b.$(OBJEXT) \ tar/test/bsdtar_test-test_option_b64encode.$(OBJEXT) \ tar/test/bsdtar_test-test_option_exclude.$(OBJEXT) \ + tar/test/bsdtar_test-test_option_fflags.$(OBJEXT) \ tar/test/bsdtar_test-test_option_gid_gname.$(OBJEXT) \ tar/test/bsdtar_test-test_option_grzip.$(OBJEXT) \ tar/test/bsdtar_test-test_option_j.$(OBJEXT) \ @@ -589,6 +607,7 @@ am_bsdtar_test_OBJECTS = $(am__objects_7) \ tar/test/bsdtar_test-test_option_s.$(OBJEXT) \ tar/test/bsdtar_test-test_option_uid_uname.$(OBJEXT) \ tar/test/bsdtar_test-test_option_uuencode.$(OBJEXT) \ + tar/test/bsdtar_test-test_option_xattrs.$(OBJEXT) \ tar/test/bsdtar_test-test_option_xz.$(OBJEXT) \ tar/test/bsdtar_test-test_option_z.$(OBJEXT) \ tar/test/bsdtar_test-test_patterns.$(OBJEXT) \ @@ -627,6 +646,8 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/archive_pack_dev.h libarchive/archive_pack_dev.c \ libarchive/archive_pathmatch.c libarchive/archive_pathmatch.h \ libarchive/archive_platform.h \ + libarchive/archive_platform_acl.h \ + libarchive/archive_platform_xattr.h \ libarchive/archive_ppmd_private.h libarchive/archive_ppmd7.c \ libarchive/archive_ppmd7_private.h \ libarchive/archive_private.h libarchive/archive_random.c \ @@ -680,8 +701,8 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/archive_string.c libarchive/archive_string.h \ libarchive/archive_string_composition.h \ libarchive/archive_string_sprintf.c libarchive/archive_util.c \ + libarchive/archive_version_details.c \ libarchive/archive_virtual.c libarchive/archive_write.c \ - libarchive/archive_write_disk_acl.c \ libarchive/archive_write_disk_posix.c \ libarchive/archive_write_disk_private.h \ libarchive/archive_write_disk_set_standard_lookup.c \ @@ -730,7 +751,11 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/archive_read_disk_windows.c \ libarchive/archive_windows.h libarchive/archive_windows.c \ libarchive/archive_write_disk_windows.c \ - libarchive/filter_fork_windows.c test_utils/test_utils.c \ + libarchive/filter_fork_windows.c \ + libarchive/archive_disk_acl_linux.c \ + libarchive/archive_disk_acl_sunos.c \ + libarchive/archive_disk_acl_darwin.c \ + libarchive/archive_disk_acl_freebsd.c test_utils/test_utils.c \ test_utils/test_utils.h test_utils/test_main.c \ test_utils/test_common.h libarchive/test/read_open_memory.c \ libarchive/test/test.h libarchive/test/test_acl_nfs4.c \ @@ -906,6 +931,7 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/test/test_read_format_zip_winzip_aes.c \ libarchive/test/test_read_format_zip_winzip_aes_large.c \ libarchive/test/test_read_format_zip_zip64.c \ + libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c \ libarchive/test/test_read_large.c \ libarchive/test/test_read_pax_schily_xattr.c \ libarchive/test/test_read_pax_truncated.c \ @@ -994,13 +1020,18 @@ am__libarchive_test_SOURCES_DIST = libarchive/archive_acl.c \ libarchive/test/test_write_format_zip_zip64.c \ libarchive/test/test_write_open_memory.c \ libarchive/test/test_write_read_format_zip.c \ + libarchive/test/test_xattr_platform.c \ libarchive/test/test_zip_filename_encoding.c -@INC_WINDOWS_FILES_TRUE@am__objects_8 = libarchive/libarchive_test-archive_entry_copy_bhfi.$(OBJEXT) \ +@INC_WINDOWS_FILES_TRUE@am__objects_12 = libarchive/libarchive_test-archive_entry_copy_bhfi.$(OBJEXT) \ @INC_WINDOWS_FILES_TRUE@ libarchive/libarchive_test-archive_read_disk_windows.$(OBJEXT) \ @INC_WINDOWS_FILES_TRUE@ libarchive/libarchive_test-archive_windows.$(OBJEXT) \ @INC_WINDOWS_FILES_TRUE@ libarchive/libarchive_test-archive_write_disk_windows.$(OBJEXT) \ @INC_WINDOWS_FILES_TRUE@ libarchive/libarchive_test-filter_fork_windows.$(OBJEXT) -am__objects_9 = libarchive/libarchive_test-archive_acl.$(OBJEXT) \ +@INC_LINUX_ACL_TRUE@am__objects_13 = libarchive/libarchive_test-archive_disk_acl_linux.$(OBJEXT) +@INC_LINUX_ACL_FALSE@@INC_SUNOS_ACL_TRUE@am__objects_14 = libarchive/libarchive_test-archive_disk_acl_sunos.$(OBJEXT) +@INC_DARWIN_ACL_TRUE@@INC_LINUX_ACL_FALSE@@INC_SUNOS_ACL_FALSE@am__objects_15 = libarchive/libarchive_test-archive_disk_acl_darwin.$(OBJEXT) +@INC_DARWIN_ACL_FALSE@@INC_FREEBSD_ACL_TRUE@@INC_LINUX_ACL_FALSE@@INC_SUNOS_ACL_FALSE@am__objects_16 = libarchive/libarchive_test-archive_disk_acl_freebsd.$(OBJEXT) +am__objects_17 = libarchive/libarchive_test-archive_acl.$(OBJEXT) \ libarchive/libarchive_test-archive_check_magic.$(OBJEXT) \ libarchive/libarchive_test-archive_cmdline.$(OBJEXT) \ libarchive/libarchive_test-archive_cryptor.$(OBJEXT) \ @@ -1068,9 +1099,9 @@ am__objects_9 = libarchive/libarchive_test-archive_acl.$(OBJEXT) \ libarchive/libarchive_test-archive_string.$(OBJEXT) \ libarchive/libarchive_test-archive_string_sprintf.$(OBJEXT) \ libarchive/libarchive_test-archive_util.$(OBJEXT) \ + libarchive/libarchive_test-archive_version_details.$(OBJEXT) \ libarchive/libarchive_test-archive_virtual.$(OBJEXT) \ libarchive/libarchive_test-archive_write.$(OBJEXT) \ - libarchive/libarchive_test-archive_write_disk_acl.$(OBJEXT) \ libarchive/libarchive_test-archive_write_disk_posix.$(OBJEXT) \ libarchive/libarchive_test-archive_write_disk_set_standard_lookup.$(OBJEXT) \ libarchive/libarchive_test-archive_write_open_fd.$(OBJEXT) \ @@ -1112,10 +1143,12 @@ am__objects_9 = libarchive/libarchive_test-archive_acl.$(OBJEXT) \ libarchive/libarchive_test-archive_write_set_options.$(OBJEXT) \ libarchive/libarchive_test-archive_write_set_passphrase.$(OBJEXT) \ libarchive/libarchive_test-filter_fork_posix.$(OBJEXT) \ - libarchive/libarchive_test-xxhash.$(OBJEXT) $(am__objects_8) -am__objects_10 = test_utils/libarchive_test-test_utils.$(OBJEXT) \ + libarchive/libarchive_test-xxhash.$(OBJEXT) $(am__objects_12) \ + $(am__objects_13) $(am__objects_14) $(am__objects_15) \ + $(am__objects_16) +am__objects_18 = test_utils/libarchive_test-test_utils.$(OBJEXT) \ test_utils/libarchive_test-test_main.$(OBJEXT) -am_libarchive_test_OBJECTS = $(am__objects_9) $(am__objects_10) \ +am_libarchive_test_OBJECTS = $(am__objects_17) $(am__objects_18) \ libarchive/test/libarchive_test-read_open_memory.$(OBJEXT) \ libarchive/test/libarchive_test-test_acl_nfs4.$(OBJEXT) \ libarchive/test/libarchive_test-test_acl_pax.$(OBJEXT) \ @@ -1290,6 +1323,7 @@ am_libarchive_test_OBJECTS = $(am__objects_9) $(am__objects_10) \ libarchive/test/libarchive_test-test_read_format_zip_winzip_aes.$(OBJEXT) \ libarchive/test/libarchive_test-test_read_format_zip_winzip_aes_large.$(OBJEXT) \ libarchive/test/libarchive_test-test_read_format_zip_zip64.$(OBJEXT) \ + libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.$(OBJEXT) \ libarchive/test/libarchive_test-test_read_large.$(OBJEXT) \ libarchive/test/libarchive_test-test_read_pax_schily_xattr.$(OBJEXT) \ libarchive/test/libarchive_test-test_read_pax_truncated.$(OBJEXT) \ @@ -1378,6 +1412,7 @@ am_libarchive_test_OBJECTS = $(am__objects_9) $(am__objects_10) \ libarchive/test/libarchive_test-test_write_format_zip_zip64.$(OBJEXT) \ libarchive/test/libarchive_test-test_write_open_memory.$(OBJEXT) \ libarchive/test/libarchive_test-test_write_read_format_zip.$(OBJEXT) \ + libarchive/test/libarchive_test-test_xattr_platform.$(OBJEXT) \ libarchive/test/libarchive_test-test_zip_filename_encoding.$(OBJEXT) libarchive_test_OBJECTS = $(am_libarchive_test_OBJECTS) libarchive_test_DEPENDENCIES = $(am__DEPENDENCIES_1) @@ -1883,6 +1918,8 @@ libarchive_la_SOURCES = libarchive/archive_acl.c \ libarchive/archive_pack_dev.h libarchive/archive_pack_dev.c \ libarchive/archive_pathmatch.c libarchive/archive_pathmatch.h \ libarchive/archive_platform.h \ + libarchive/archive_platform_acl.h \ + libarchive/archive_platform_xattr.h \ libarchive/archive_ppmd_private.h libarchive/archive_ppmd7.c \ libarchive/archive_ppmd7_private.h \ libarchive/archive_private.h libarchive/archive_random.c \ @@ -1936,8 +1973,8 @@ libarchive_la_SOURCES = libarchive/archive_acl.c \ libarchive/archive_string.c libarchive/archive_string.h \ libarchive/archive_string_composition.h \ libarchive/archive_string_sprintf.c libarchive/archive_util.c \ + libarchive/archive_version_details.c \ libarchive/archive_virtual.c libarchive/archive_write.c \ - libarchive/archive_write_disk_acl.c \ libarchive/archive_write_disk_posix.c \ libarchive/archive_write_disk_private.h \ libarchive/archive_write_disk_set_standard_lookup.c \ @@ -1982,7 +2019,8 @@ libarchive_la_SOURCES = libarchive/archive_acl.c \ libarchive/archive_write_set_passphrase.c \ libarchive/archive_xxhash.h libarchive/config_freebsd.h \ libarchive/filter_fork_posix.c libarchive/filter_fork.h \ - libarchive/xxhash.c $(am__append_1) + libarchive/xxhash.c $(am__append_1) $(am__append_2) \ + $(am__append_3) $(am__append_4) $(am__append_5) # -no-undefined marks that libarchive doesn't rely on symbols # defined in the application. This is mandatory for cygwin. @@ -2237,6 +2275,7 @@ libarchive_test_SOURCES = \ libarchive/test/test_read_format_zip_winzip_aes.c \ libarchive/test/test_read_format_zip_winzip_aes_large.c \ libarchive/test/test_read_format_zip_zip64.c \ + libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c \ libarchive/test/test_read_large.c \ libarchive/test/test_read_pax_schily_xattr.c \ libarchive/test/test_read_pax_truncated.c \ @@ -2325,6 +2364,7 @@ libarchive_test_SOURCES = \ libarchive/test/test_write_format_zip_zip64.c \ libarchive/test/test_write_open_memory.c \ libarchive/test/test_write_read_format_zip.c \ + libarchive/test/test_xattr_platform.c \ libarchive/test/test_zip_filename_encoding.c libarchive_test_CPPFLAGS = \ @@ -2561,6 +2601,7 @@ libarchive_test_EXTRA_DIST = \ libarchive/test/test_read_format_zip_winzip_aes256.zip.uu \ libarchive/test/test_read_format_zip_winzip_aes256_large.zip.uu \ libarchive/test/test_read_format_zip_winzip_aes256_stored.zip.uu \ + libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu \ libarchive/test/test_read_format_zip_zip64a.zip.uu \ libarchive/test/test_read_format_zip_zip64b.zip.uu \ libarchive/test/test_read_large_splitted_rar_aa.uu \ @@ -2605,7 +2646,7 @@ libarchive_fe_la_CPPFLAGS = -I$(top_srcdir)/libarchive # bsdtar_SOURCES = tar/bsdtar.c tar/bsdtar.h tar/bsdtar_platform.h \ tar/cmdline.c tar/creation_set.c tar/read.c tar/subst.c \ - tar/util.c tar/write.c $(am__append_2) + tar/util.c tar/write.c $(am__append_6) bsdtar_DEPENDENCIES = libarchive.la libarchive_fe.la @STATIC_BSDTAR_FALSE@bsdtar_ldstatic = @STATIC_BSDTAR_TRUE@bsdtar_ldstatic = -static @@ -2657,10 +2698,12 @@ bsdtar_test_SOURCES = \ tar/test/test_option_T_upper.c \ tar/test/test_option_U_upper.c \ tar/test/test_option_X_upper.c \ + tar/test/test_option_acls.c \ tar/test/test_option_a.c \ tar/test/test_option_b.c \ tar/test/test_option_b64encode.c \ tar/test/test_option_exclude.c \ + tar/test/test_option_fflags.c \ tar/test/test_option_gid_gname.c \ tar/test/test_option_grzip.c \ tar/test/test_option_j.c \ @@ -2680,6 +2723,7 @@ bsdtar_test_SOURCES = \ tar/test/test_option_s.c \ tar/test/test_option_uid_uname.c \ tar/test/test_option_uuencode.c \ + tar/test/test_option_xattrs.c \ tar/test/test_option_xz.c \ tar/test/test_option_z.c \ tar/test/test_patterns.c \ @@ -2730,7 +2774,7 @@ bsdtar_test_EXTRA_DIST = \ # # bsdcpio_SOURCES = cpio/cmdline.c cpio/cpio.c cpio/cpio.h \ - cpio/cpio_platform.h $(am__append_3) + cpio/cpio_platform.h $(am__append_7) bsdcpio_DEPENDENCIES = libarchive.la libarchive_fe.la @STATIC_BSDCPIO_FALSE@bsdcpio_ldstatic = @STATIC_BSDCPIO_TRUE@bsdcpio_ldstatic = -static @@ -2854,7 +2898,7 @@ bsdcpio_test_EXTRA_DIST = \ # # bsdcat_SOURCES = cat/bsdcat.c cat/bsdcat.h cat/bsdcat_platform.h \ - cat/cmdline.c $(am__append_4) + cat/cmdline.c $(am__append_8) bsdcat_DEPENDENCIES = libarchive.la libarchive_fe.la @STATIC_BSDCAT_FALSE@bsdcat_ldstatic = @STATIC_BSDCAT_TRUE@bsdcat_ldstatic = -static @@ -3195,12 +3239,12 @@ libarchive/archive_string_sprintf.lo: libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) libarchive/archive_util.lo: libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) +libarchive/archive_version_details.lo: libarchive/$(am__dirstamp) \ + libarchive/$(DEPDIR)/$(am__dirstamp) libarchive/archive_virtual.lo: libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) libarchive/archive_write.lo: libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) -libarchive/archive_write_disk_acl.lo: libarchive/$(am__dirstamp) \ - libarchive/$(DEPDIR)/$(am__dirstamp) libarchive/archive_write_disk_posix.lo: libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) libarchive/archive_write_disk_set_standard_lookup.lo: \ @@ -3325,6 +3369,14 @@ libarchive/archive_write_disk_windows.lo: libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) libarchive/filter_fork_windows.lo: libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) +libarchive/archive_disk_acl_linux.lo: libarchive/$(am__dirstamp) \ + libarchive/$(DEPDIR)/$(am__dirstamp) +libarchive/archive_disk_acl_sunos.lo: libarchive/$(am__dirstamp) \ + libarchive/$(DEPDIR)/$(am__dirstamp) +libarchive/archive_disk_acl_darwin.lo: libarchive/$(am__dirstamp) \ + libarchive/$(DEPDIR)/$(am__dirstamp) +libarchive/archive_disk_acl_freebsd.lo: libarchive/$(am__dirstamp) \ + libarchive/$(DEPDIR)/$(am__dirstamp) libarchive.la: $(libarchive_la_OBJECTS) $(libarchive_la_DEPENDENCIES) $(EXTRA_libarchive_la_DEPENDENCIES) $(AM_V_CCLD)$(libarchive_la_LINK) -rpath $(libdir) $(libarchive_la_OBJECTS) $(libarchive_la_LIBADD) $(LIBS) @@ -3683,6 +3735,8 @@ tar/test/bsdtar_test-test_option_U_upper.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_X_upper.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) +tar/test/bsdtar_test-test_option_acls.$(OBJEXT): \ + tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_a.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_b.$(OBJEXT): \ @@ -3691,6 +3745,8 @@ tar/test/bsdtar_test-test_option_b64encode.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_exclude.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) +tar/test/bsdtar_test-test_option_fflags.$(OBJEXT): \ + tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_gid_gname.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_grzip.$(OBJEXT): \ @@ -3729,6 +3785,8 @@ tar/test/bsdtar_test-test_option_uid_uname.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_uuencode.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) +tar/test/bsdtar_test-test_option_xattrs.$(OBJEXT): \ + tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_xz.$(OBJEXT): \ tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp) tar/test/bsdtar_test-test_option_z.$(OBJEXT): \ @@ -3955,13 +4013,13 @@ libarchive/libarchive_test-archive_string_sprintf.$(OBJEXT): \ libarchive/libarchive_test-archive_util.$(OBJEXT): \ libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) -libarchive/libarchive_test-archive_virtual.$(OBJEXT): \ +libarchive/libarchive_test-archive_version_details.$(OBJEXT): \ libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) -libarchive/libarchive_test-archive_write.$(OBJEXT): \ +libarchive/libarchive_test-archive_virtual.$(OBJEXT): \ libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) -libarchive/libarchive_test-archive_write_disk_acl.$(OBJEXT): \ +libarchive/libarchive_test-archive_write.$(OBJEXT): \ libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) libarchive/libarchive_test-archive_write_disk_posix.$(OBJEXT): \ @@ -4105,6 +4163,18 @@ libarchive/libarchive_test-archive_write_disk_windows.$(OBJEXT): \ libarchive/libarchive_test-filter_fork_windows.$(OBJEXT): \ libarchive/$(am__dirstamp) \ libarchive/$(DEPDIR)/$(am__dirstamp) +libarchive/libarchive_test-archive_disk_acl_linux.$(OBJEXT): \ + libarchive/$(am__dirstamp) \ + libarchive/$(DEPDIR)/$(am__dirstamp) +libarchive/libarchive_test-archive_disk_acl_sunos.$(OBJEXT): \ + libarchive/$(am__dirstamp) \ + libarchive/$(DEPDIR)/$(am__dirstamp) +libarchive/libarchive_test-archive_disk_acl_darwin.$(OBJEXT): \ + libarchive/$(am__dirstamp) \ + libarchive/$(DEPDIR)/$(am__dirstamp) +libarchive/libarchive_test-archive_disk_acl_freebsd.$(OBJEXT): \ + libarchive/$(am__dirstamp) \ + libarchive/$(DEPDIR)/$(am__dirstamp) test_utils/libarchive_test-test_utils.$(OBJEXT): \ test_utils/$(am__dirstamp) \ test_utils/$(DEPDIR)/$(am__dirstamp) @@ -4639,6 +4709,9 @@ libarchive/test/libarchive_test-test_read_format_zip_winzip_aes_large.$(OBJEXT): libarchive/test/libarchive_test-test_read_format_zip_zip64.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) +libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.$(OBJEXT): \ + libarchive/test/$(am__dirstamp) \ + libarchive/test/$(DEPDIR)/$(am__dirstamp) libarchive/test/libarchive_test-test_read_large.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) @@ -4903,6 +4976,9 @@ libarchive/test/libarchive_test-test_write_open_memory.$(OBJEXT): \ libarchive/test/libarchive_test-test_write_read_format_zip.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) +libarchive/test/libarchive_test-test_xattr_platform.$(OBJEXT): \ + libarchive/test/$(am__dirstamp) \ + libarchive/test/$(DEPDIR)/$(am__dirstamp) libarchive/test/libarchive_test-test_zip_filename_encoding.$(OBJEXT): \ libarchive/test/$(am__dirstamp) \ libarchive/test/$(DEPDIR)/$(am__dirstamp) @@ -5001,6 +5077,10 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_cmdline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_cryptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_digest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_disk_acl_darwin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_disk_acl_freebsd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_disk_acl_linux.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_disk_acl_sunos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry_copy_bhfi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry_copy_stat.Plo@am__quote@ @@ -5066,6 +5146,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_string_sprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_util.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_version_details.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_virtual.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_windows.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write.Plo@am__quote@ @@ -5083,7 +5164,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_add_filter_program.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_add_filter_uuencode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_add_filter_xz.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_disk_acl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_disk_posix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_disk_set_standard_lookup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_write_disk_windows.Plo@am__quote@ @@ -5118,6 +5198,10 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_cmdline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_cryptor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_digest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_darwin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_freebsd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_linux.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_sunos.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_entry.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_entry_copy_bhfi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_entry_copy_stat.Po@am__quote@ @@ -5183,6 +5267,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_string_sprintf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_version_details.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_virtual.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_windows.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write.Po@am__quote@ @@ -5200,7 +5285,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_program.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_uuencode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_add_filter_xz.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_acl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_posix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_set_standard_lookup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_windows.Po@am__quote@ @@ -5405,6 +5489,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_traditional_encryption_data.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_winzip_aes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_winzip_aes_large.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_zip64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_large.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_read_pax_schily_xattr.Po@am__quote@ @@ -5494,6 +5579,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_format_zip_zip64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_open_memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_write_read_format_zip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_xattr_platform.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/libarchive_test-test_zip_filename_encoding.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive_fe/$(DEPDIR)/libarchive_fe_la-err.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libarchive_fe/$(DEPDIR)/libarchive_fe_la-line_reader.Plo@am__quote@ @@ -5532,9 +5618,11 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_U_upper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_X_upper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_a.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_acls.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_b.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_b64encode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_exclude.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_fflags.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_gid_gname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_grzip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_j.Po@am__quote@ @@ -5554,6 +5642,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_s.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_uid_uname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_uuencode.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_xz.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_z.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_patterns.Po@am__quote@ @@ -7101,6 +7190,20 @@ tar/test/bsdtar_test-test_option_X_upper.obj: tar/test/test_option_X_upper.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_X_upper.obj `if test -f 'tar/test/test_option_X_upper.c'; then $(CYGPATH_W) 'tar/test/test_option_X_upper.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_X_upper.c'; fi` +tar/test/bsdtar_test-test_option_acls.o: tar/test/test_option_acls.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_acls.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_acls.Tpo -c -o tar/test/bsdtar_test-test_option_acls.o `test -f 'tar/test/test_option_acls.c' || echo '$(srcdir)/'`tar/test/test_option_acls.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_acls.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_acls.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_acls.c' object='tar/test/bsdtar_test-test_option_acls.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_acls.o `test -f 'tar/test/test_option_acls.c' || echo '$(srcdir)/'`tar/test/test_option_acls.c + +tar/test/bsdtar_test-test_option_acls.obj: tar/test/test_option_acls.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_acls.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_acls.Tpo -c -o tar/test/bsdtar_test-test_option_acls.obj `if test -f 'tar/test/test_option_acls.c'; then $(CYGPATH_W) 'tar/test/test_option_acls.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_acls.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_acls.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_acls.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_acls.c' object='tar/test/bsdtar_test-test_option_acls.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_acls.obj `if test -f 'tar/test/test_option_acls.c'; then $(CYGPATH_W) 'tar/test/test_option_acls.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_acls.c'; fi` + tar/test/bsdtar_test-test_option_a.o: tar/test/test_option_a.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_a.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_a.Tpo -c -o tar/test/bsdtar_test-test_option_a.o `test -f 'tar/test/test_option_a.c' || echo '$(srcdir)/'`tar/test/test_option_a.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_a.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_a.Po @@ -7157,6 +7260,20 @@ tar/test/bsdtar_test-test_option_exclude.obj: tar/test/test_option_exclude.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_exclude.obj `if test -f 'tar/test/test_option_exclude.c'; then $(CYGPATH_W) 'tar/test/test_option_exclude.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_exclude.c'; fi` +tar/test/bsdtar_test-test_option_fflags.o: tar/test/test_option_fflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_fflags.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_fflags.Tpo -c -o tar/test/bsdtar_test-test_option_fflags.o `test -f 'tar/test/test_option_fflags.c' || echo '$(srcdir)/'`tar/test/test_option_fflags.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_fflags.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_fflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_fflags.c' object='tar/test/bsdtar_test-test_option_fflags.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_fflags.o `test -f 'tar/test/test_option_fflags.c' || echo '$(srcdir)/'`tar/test/test_option_fflags.c + +tar/test/bsdtar_test-test_option_fflags.obj: tar/test/test_option_fflags.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_fflags.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_fflags.Tpo -c -o tar/test/bsdtar_test-test_option_fflags.obj `if test -f 'tar/test/test_option_fflags.c'; then $(CYGPATH_W) 'tar/test/test_option_fflags.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_fflags.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_fflags.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_fflags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_fflags.c' object='tar/test/bsdtar_test-test_option_fflags.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_fflags.obj `if test -f 'tar/test/test_option_fflags.c'; then $(CYGPATH_W) 'tar/test/test_option_fflags.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_fflags.c'; fi` + tar/test/bsdtar_test-test_option_gid_gname.o: tar/test/test_option_gid_gname.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_gid_gname.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_gid_gname.Tpo -c -o tar/test/bsdtar_test-test_option_gid_gname.o `test -f 'tar/test/test_option_gid_gname.c' || echo '$(srcdir)/'`tar/test/test_option_gid_gname.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_gid_gname.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_gid_gname.Po @@ -7423,6 +7540,20 @@ tar/test/bsdtar_test-test_option_uuencode.obj: tar/test/test_option_uuencode.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_uuencode.obj `if test -f 'tar/test/test_option_uuencode.c'; then $(CYGPATH_W) 'tar/test/test_option_uuencode.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_uuencode.c'; fi` +tar/test/bsdtar_test-test_option_xattrs.o: tar/test/test_option_xattrs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_xattrs.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Tpo -c -o tar/test/bsdtar_test-test_option_xattrs.o `test -f 'tar/test/test_option_xattrs.c' || echo '$(srcdir)/'`tar/test/test_option_xattrs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_xattrs.c' object='tar/test/bsdtar_test-test_option_xattrs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_xattrs.o `test -f 'tar/test/test_option_xattrs.c' || echo '$(srcdir)/'`tar/test/test_option_xattrs.c + +tar/test/bsdtar_test-test_option_xattrs.obj: tar/test/test_option_xattrs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_xattrs.obj -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Tpo -c -o tar/test/bsdtar_test-test_option_xattrs.obj `if test -f 'tar/test/test_option_xattrs.c'; then $(CYGPATH_W) 'tar/test/test_option_xattrs.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_xattrs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_xattrs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tar/test/test_option_xattrs.c' object='tar/test/bsdtar_test-test_option_xattrs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_xattrs.obj `if test -f 'tar/test/test_option_xattrs.c'; then $(CYGPATH_W) 'tar/test/test_option_xattrs.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_xattrs.c'; fi` + tar/test/bsdtar_test-test_option_xz.o: tar/test/test_option_xz.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_xz.o -MD -MP -MF tar/test/$(DEPDIR)/bsdtar_test-test_option_xz.Tpo -c -o tar/test/bsdtar_test-test_option_xz.o `test -f 'tar/test/test_option_xz.c' || echo '$(srcdir)/'`tar/test/test_option_xz.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_xz.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_xz.Po @@ -8501,6 +8632,20 @@ libarchive/libarchive_test-archive_util.obj: libarchive/archive_util.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_util.obj `if test -f 'libarchive/archive_util.c'; then $(CYGPATH_W) 'libarchive/archive_util.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_util.c'; fi` +libarchive/libarchive_test-archive_version_details.o: libarchive/archive_version_details.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_version_details.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_version_details.Tpo -c -o libarchive/libarchive_test-archive_version_details.o `test -f 'libarchive/archive_version_details.c' || echo '$(srcdir)/'`libarchive/archive_version_details.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_version_details.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_version_details.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_version_details.c' object='libarchive/libarchive_test-archive_version_details.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_version_details.o `test -f 'libarchive/archive_version_details.c' || echo '$(srcdir)/'`libarchive/archive_version_details.c + +libarchive/libarchive_test-archive_version_details.obj: libarchive/archive_version_details.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_version_details.obj -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_version_details.Tpo -c -o libarchive/libarchive_test-archive_version_details.obj `if test -f 'libarchive/archive_version_details.c'; then $(CYGPATH_W) 'libarchive/archive_version_details.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_version_details.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_version_details.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_version_details.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_version_details.c' object='libarchive/libarchive_test-archive_version_details.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_version_details.obj `if test -f 'libarchive/archive_version_details.c'; then $(CYGPATH_W) 'libarchive/archive_version_details.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_version_details.c'; fi` + libarchive/libarchive_test-archive_virtual.o: libarchive/archive_virtual.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_virtual.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_virtual.Tpo -c -o libarchive/libarchive_test-archive_virtual.o `test -f 'libarchive/archive_virtual.c' || echo '$(srcdir)/'`libarchive/archive_virtual.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_virtual.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_virtual.Po @@ -8529,20 +8674,6 @@ libarchive/libarchive_test-archive_write.obj: libarchive/archive_write.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_write.obj `if test -f 'libarchive/archive_write.c'; then $(CYGPATH_W) 'libarchive/archive_write.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_write.c'; fi` -libarchive/libarchive_test-archive_write_disk_acl.o: libarchive/archive_write_disk_acl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_write_disk_acl.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_acl.Tpo -c -o libarchive/libarchive_test-archive_write_disk_acl.o `test -f 'libarchive/archive_write_disk_acl.c' || echo '$(srcdir)/'`libarchive/archive_write_disk_acl.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_acl.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_acl.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_write_disk_acl.c' object='libarchive/libarchive_test-archive_write_disk_acl.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_write_disk_acl.o `test -f 'libarchive/archive_write_disk_acl.c' || echo '$(srcdir)/'`libarchive/archive_write_disk_acl.c - -libarchive/libarchive_test-archive_write_disk_acl.obj: libarchive/archive_write_disk_acl.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_write_disk_acl.obj -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_acl.Tpo -c -o libarchive/libarchive_test-archive_write_disk_acl.obj `if test -f 'libarchive/archive_write_disk_acl.c'; then $(CYGPATH_W) 'libarchive/archive_write_disk_acl.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_write_disk_acl.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_acl.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_acl.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_write_disk_acl.c' object='libarchive/libarchive_test-archive_write_disk_acl.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_write_disk_acl.obj `if test -f 'libarchive/archive_write_disk_acl.c'; then $(CYGPATH_W) 'libarchive/archive_write_disk_acl.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_write_disk_acl.c'; fi` - libarchive/libarchive_test-archive_write_disk_posix.o: libarchive/archive_write_disk_posix.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_write_disk_posix.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_posix.Tpo -c -o libarchive/libarchive_test-archive_write_disk_posix.o `test -f 'libarchive/archive_write_disk_posix.c' || echo '$(srcdir)/'`libarchive/archive_write_disk_posix.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_posix.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_write_disk_posix.Po @@ -9201,6 +9332,62 @@ libarchive/libarchive_test-filter_fork_windows.obj: libarchive/filter_fork_windo @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-filter_fork_windows.obj `if test -f 'libarchive/filter_fork_windows.c'; then $(CYGPATH_W) 'libarchive/filter_fork_windows.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/filter_fork_windows.c'; fi` +libarchive/libarchive_test-archive_disk_acl_linux.o: libarchive/archive_disk_acl_linux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_disk_acl_linux.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_linux.Tpo -c -o libarchive/libarchive_test-archive_disk_acl_linux.o `test -f 'libarchive/archive_disk_acl_linux.c' || echo '$(srcdir)/'`libarchive/archive_disk_acl_linux.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_linux.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_linux.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_disk_acl_linux.c' object='libarchive/libarchive_test-archive_disk_acl_linux.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_disk_acl_linux.o `test -f 'libarchive/archive_disk_acl_linux.c' || echo '$(srcdir)/'`libarchive/archive_disk_acl_linux.c + +libarchive/libarchive_test-archive_disk_acl_linux.obj: libarchive/archive_disk_acl_linux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_disk_acl_linux.obj -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_linux.Tpo -c -o libarchive/libarchive_test-archive_disk_acl_linux.obj `if test -f 'libarchive/archive_disk_acl_linux.c'; then $(CYGPATH_W) 'libarchive/archive_disk_acl_linux.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_disk_acl_linux.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_linux.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_linux.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_disk_acl_linux.c' object='libarchive/libarchive_test-archive_disk_acl_linux.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_disk_acl_linux.obj `if test -f 'libarchive/archive_disk_acl_linux.c'; then $(CYGPATH_W) 'libarchive/archive_disk_acl_linux.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_disk_acl_linux.c'; fi` + +libarchive/libarchive_test-archive_disk_acl_sunos.o: libarchive/archive_disk_acl_sunos.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_disk_acl_sunos.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_sunos.Tpo -c -o libarchive/libarchive_test-archive_disk_acl_sunos.o `test -f 'libarchive/archive_disk_acl_sunos.c' || echo '$(srcdir)/'`libarchive/archive_disk_acl_sunos.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_sunos.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_sunos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_disk_acl_sunos.c' object='libarchive/libarchive_test-archive_disk_acl_sunos.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_disk_acl_sunos.o `test -f 'libarchive/archive_disk_acl_sunos.c' || echo '$(srcdir)/'`libarchive/archive_disk_acl_sunos.c + +libarchive/libarchive_test-archive_disk_acl_sunos.obj: libarchive/archive_disk_acl_sunos.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_disk_acl_sunos.obj -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_sunos.Tpo -c -o libarchive/libarchive_test-archive_disk_acl_sunos.obj `if test -f 'libarchive/archive_disk_acl_sunos.c'; then $(CYGPATH_W) 'libarchive/archive_disk_acl_sunos.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_disk_acl_sunos.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_sunos.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_sunos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_disk_acl_sunos.c' object='libarchive/libarchive_test-archive_disk_acl_sunos.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_disk_acl_sunos.obj `if test -f 'libarchive/archive_disk_acl_sunos.c'; then $(CYGPATH_W) 'libarchive/archive_disk_acl_sunos.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_disk_acl_sunos.c'; fi` + +libarchive/libarchive_test-archive_disk_acl_darwin.o: libarchive/archive_disk_acl_darwin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_disk_acl_darwin.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_darwin.Tpo -c -o libarchive/libarchive_test-archive_disk_acl_darwin.o `test -f 'libarchive/archive_disk_acl_darwin.c' || echo '$(srcdir)/'`libarchive/archive_disk_acl_darwin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_darwin.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_darwin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_disk_acl_darwin.c' object='libarchive/libarchive_test-archive_disk_acl_darwin.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_disk_acl_darwin.o `test -f 'libarchive/archive_disk_acl_darwin.c' || echo '$(srcdir)/'`libarchive/archive_disk_acl_darwin.c + +libarchive/libarchive_test-archive_disk_acl_darwin.obj: libarchive/archive_disk_acl_darwin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_disk_acl_darwin.obj -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_darwin.Tpo -c -o libarchive/libarchive_test-archive_disk_acl_darwin.obj `if test -f 'libarchive/archive_disk_acl_darwin.c'; then $(CYGPATH_W) 'libarchive/archive_disk_acl_darwin.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_disk_acl_darwin.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_darwin.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_darwin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_disk_acl_darwin.c' object='libarchive/libarchive_test-archive_disk_acl_darwin.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_disk_acl_darwin.obj `if test -f 'libarchive/archive_disk_acl_darwin.c'; then $(CYGPATH_W) 'libarchive/archive_disk_acl_darwin.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_disk_acl_darwin.c'; fi` + +libarchive/libarchive_test-archive_disk_acl_freebsd.o: libarchive/archive_disk_acl_freebsd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_disk_acl_freebsd.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_freebsd.Tpo -c -o libarchive/libarchive_test-archive_disk_acl_freebsd.o `test -f 'libarchive/archive_disk_acl_freebsd.c' || echo '$(srcdir)/'`libarchive/archive_disk_acl_freebsd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_freebsd.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_freebsd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_disk_acl_freebsd.c' object='libarchive/libarchive_test-archive_disk_acl_freebsd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_disk_acl_freebsd.o `test -f 'libarchive/archive_disk_acl_freebsd.c' || echo '$(srcdir)/'`libarchive/archive_disk_acl_freebsd.c + +libarchive/libarchive_test-archive_disk_acl_freebsd.obj: libarchive/archive_disk_acl_freebsd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_test-archive_disk_acl_freebsd.obj -MD -MP -MF libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_freebsd.Tpo -c -o libarchive/libarchive_test-archive_disk_acl_freebsd.obj `if test -f 'libarchive/archive_disk_acl_freebsd.c'; then $(CYGPATH_W) 'libarchive/archive_disk_acl_freebsd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_disk_acl_freebsd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_freebsd.Tpo libarchive/$(DEPDIR)/libarchive_test-archive_disk_acl_freebsd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/archive_disk_acl_freebsd.c' object='libarchive/libarchive_test-archive_disk_acl_freebsd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/libarchive_test-archive_disk_acl_freebsd.obj `if test -f 'libarchive/archive_disk_acl_freebsd.c'; then $(CYGPATH_W) 'libarchive/archive_disk_acl_freebsd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_disk_acl_freebsd.c'; fi` + test_utils/libarchive_test-test_utils.o: test_utils/test_utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_utils/libarchive_test-test_utils.o -MD -MP -MF test_utils/$(DEPDIR)/libarchive_test-test_utils.Tpo -c -o test_utils/libarchive_test-test_utils.o `test -f 'test_utils/test_utils.c' || echo '$(srcdir)/'`test_utils/test_utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test_utils/$(DEPDIR)/libarchive_test-test_utils.Tpo test_utils/$(DEPDIR)/libarchive_test-test_utils.Po @@ -11665,6 +11852,20 @@ libarchive/test/libarchive_test-test_read_format_zip_zip64.obj: libarchive/test/ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_read_format_zip_zip64.obj `if test -f 'libarchive/test/test_read_format_zip_zip64.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_zip_zip64.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_zip_zip64.c'; fi` +libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.o: libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.Tpo -c -o libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.o `test -f 'libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c' object='libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.o `test -f 'libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c + +libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.obj: libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.obj -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.Tpo -c -o libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.obj `if test -f 'libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c' object='libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_read_format_zip_with_invalid_traditional_eocd.obj `if test -f 'libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c'; fi` + libarchive/test/libarchive_test-test_read_large.o: libarchive/test/test_read_large.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_read_large.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_read_large.Tpo -c -o libarchive/test/libarchive_test-test_read_large.o `test -f 'libarchive/test/test_read_large.c' || echo '$(srcdir)/'`libarchive/test/test_read_large.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_read_large.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_read_large.Po @@ -12897,6 +13098,20 @@ libarchive/test/libarchive_test-test_write_read_format_zip.obj: libarchive/test/ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_write_read_format_zip.obj `if test -f 'libarchive/test/test_write_read_format_zip.c'; then $(CYGPATH_W) 'libarchive/test/test_write_read_format_zip.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_read_format_zip.c'; fi` +libarchive/test/libarchive_test-test_xattr_platform.o: libarchive/test/test_xattr_platform.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_xattr_platform.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_xattr_platform.Tpo -c -o libarchive/test/libarchive_test-test_xattr_platform.o `test -f 'libarchive/test/test_xattr_platform.c' || echo '$(srcdir)/'`libarchive/test/test_xattr_platform.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_xattr_platform.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_xattr_platform.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_xattr_platform.c' object='libarchive/test/libarchive_test-test_xattr_platform.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_xattr_platform.o `test -f 'libarchive/test/test_xattr_platform.c' || echo '$(srcdir)/'`libarchive/test/test_xattr_platform.c + +libarchive/test/libarchive_test-test_xattr_platform.obj: libarchive/test/test_xattr_platform.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_xattr_platform.obj -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_xattr_platform.Tpo -c -o libarchive/test/libarchive_test-test_xattr_platform.obj `if test -f 'libarchive/test/test_xattr_platform.c'; then $(CYGPATH_W) 'libarchive/test/test_xattr_platform.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_xattr_platform.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_xattr_platform.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_xattr_platform.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libarchive/test/test_xattr_platform.c' object='libarchive/test/libarchive_test-test_xattr_platform.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test/libarchive_test-test_xattr_platform.obj `if test -f 'libarchive/test/test_xattr_platform.c'; then $(CYGPATH_W) 'libarchive/test/test_xattr_platform.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_xattr_platform.c'; fi` + libarchive/test/libarchive_test-test_zip_filename_encoding.o: libarchive/test/test_zip_filename_encoding.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/libarchive_test-test_zip_filename_encoding.o -MD -MP -MF libarchive/test/$(DEPDIR)/libarchive_test-test_zip_filename_encoding.Tpo -c -o libarchive/test/libarchive_test-test_zip_filename_encoding.o `test -f 'libarchive/test/test_zip_filename_encoding.c' || echo '$(srcdir)/'`libarchive/test/test_zip_filename_encoding.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/libarchive_test-test_zip_filename_encoding.Tpo libarchive/test/$(DEPDIR)/libarchive_test-test_zip_filename_encoding.Po diff --git a/archivers/libarchive/files/NEWS b/archivers/libarchive/files/NEWS index 281c1768c30..9527e662a86 100644 --- a/archivers/libarchive/files/NEWS +++ b/archivers/libarchive/files/NEWS @@ -1,3 +1,7 @@ +Jul 09, 2017: libarchive 3.3.2 released + +Mar 16, 2017: NFSv4 ACL support for Linux (librichacl) + Feb 26, 2017: libarchive 3.3.1 released Security & Feature release @@ -293,7 +297,7 @@ May 04, 2008: libarchive 2.5.3b released * libarchive: Mark which entry strings are set; be accurate about distinguishing empty strings ("") from unset ones (NULL) * tar: Don't crash reading entries with empty filenames - * libarchive_test, bsdtar_test, bsdcpio_test: Better detaults: + * libarchive_test, bsdtar_test, bsdcpio_test: Better defaults: run all tests, delete temp dirs, summarize repeated failures * -no-undefined to libtool for Cygwin * libarchive_test: Skip large file tests on systems with 32-bit off_t diff --git a/archivers/libarchive/files/build/autoconf/config.guess b/archivers/libarchive/files/build/autoconf/config.guess index 1000e2bd92e..2193702b12a 100755 --- a/archivers/libarchive/files/build/autoconf/config.guess +++ b/archivers/libarchive/files/build/autoconf/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-02-07' +timestamp='2017-05-27' # 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 @@ -837,10 +837,11 @@ EOF UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -1303,14 +1304,21 @@ EOF if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub @@ -1334,16 +1342,16 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) + NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; - NSR-?:NONSTOP_KERNEL:*:*) + NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; - NSX-?:NONSTOP_KERNEL:*:*) + NSX-*:NONSTOP_KERNEL:*:*) echo nsx-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) diff --git a/archivers/libarchive/files/build/autoconf/config.sub b/archivers/libarchive/files/build/autoconf/config.sub index 87abeab6cdf..40ea5dfe115 100755 --- a/archivers/libarchive/files/build/autoconf/config.sub +++ b/archivers/libarchive/files/build/autoconf/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-02-07' +timestamp='2017-04-02' # 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 @@ -263,7 +263,7 @@ case $basic_machine in | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ @@ -315,6 +315,7 @@ case $basic_machine in | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ + | wasm32 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -388,7 +389,7 @@ case $basic_machine in | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ @@ -446,6 +447,7 @@ case $basic_machine in | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -1246,6 +1248,9 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; + wasm32) + basic_machine=wasm32-unknown + ;; w65*) basic_machine=w65-wdc os=-none diff --git a/archivers/libarchive/files/build/cmake/config.h.in b/archivers/libarchive/files/build/cmake/config.h.in index fd4fbdcd8ff..e646213d4bf 100644 --- a/archivers/libarchive/files/build/cmake/config.h.in +++ b/archivers/libarchive/files/build/cmake/config.h.in @@ -179,6 +179,27 @@ typedef uint64_t uintmax_t; /* Define ZLIB_WINAPI if zlib was built on Visual Studio. */ #cmakedefine ZLIB_WINAPI 1 +/* Darwin ACL support */ +#cmakedefine ARCHIVE_ACL_DARWIN 1 + +/* FreeBSD ACL support */ +#cmakedefine ARCHIVE_ACL_FREEBSD 1 + +/* FreeBSD NFSv4 ACL support */ +#cmakedefine ARCHIVE_ACL_FREEBSD_NFS4 1 + +/* Linux POSIX.1e ACL support via libacl */ +#cmakedefine ARCHIVE_ACL_LIBACL 1 + +/* Linux NFSv4 ACL support via librichacl */ +#cmakedefine ARCHIVE_ACL_LIBRICHACL 1 + +/* Solaris ACL support */ +#cmakedefine ARCHIVE_ACL_SUNOS 1 + +/* Solaris NFSv4 ACL support */ +#cmakedefine ARCHIVE_ACL_SUNOS_NFS4 1 + /* MD5 via ARCHIVE_CRYPTO_MD5_LIBC supported. */ #cmakedefine ARCHIVE_CRYPTO_MD5_LIBC 1 @@ -281,6 +302,18 @@ typedef uint64_t uintmax_t; /* SHA512 via ARCHIVE_CRYPTO_SHA512_WIN supported. */ #cmakedefine ARCHIVE_CRYPTO_SHA512_WIN 1 +/* AIX xattr support */ +#cmakedefine ARCHIVE_XATTR_AIX 1 + +/* Darwin xattr support */ +#cmakedefine ARCHIVE_XATTR_DARWIN 1 + +/* FreeBSD xattr support */ +#cmakedefine ARCHIVE_XATTR_FREEBSD 1 + +/* Linux xattr support */ +#cmakedefine ARCHIVE_XATTR_LINUX 1 + /* Version number of bsdcpio */ #cmakedefine BSDCPIO_VERSION_STRING "${BSDCPIO_VERSION_STRING}" @@ -442,6 +475,10 @@ typedef uint64_t uintmax_t; don't. */ #cmakedefine HAVE_DECL_UINTMAX_MAX 1 +/* Define to 1 if you have the declaration of `XATTR_NOFOLLOW', and to 0 if + you don't. */ +#cmakedefine HAVE_DECL_XATTR_NOFOLLOW 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_DIRECT_H 1 @@ -773,6 +810,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the `mbrtowc' function. */ #cmakedefine HAVE_MBRTOWC 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMBERSHIP_H 1 + /* Define to 1 if you have the `memmove' function. */ #cmakedefine HAVE_MEMMOVE 1 @@ -1010,6 +1050,9 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_POLL_H 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_RICHACL_H 1 + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_SELECT_H 1 diff --git a/archivers/libarchive/files/build/version b/archivers/libarchive/files/build/version index ef8345726c8..2dd08397476 100644 --- a/archivers/libarchive/files/build/version +++ b/archivers/libarchive/files/build/version @@ -1 +1 @@ -3003001 +3003002 diff --git a/archivers/libarchive/files/config.h.in b/archivers/libarchive/files/config.h.in index 68e3062cb9e..39aa933cacf 100644 --- a/archivers/libarchive/files/config.h.in +++ b/archivers/libarchive/files/config.h.in @@ -1,5 +1,26 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Darwin ACL support */ +#undef ARCHIVE_ACL_DARWIN + +/* FreeBSD ACL support */ +#undef ARCHIVE_ACL_FREEBSD + +/* FreeBSD NFSv4 ACL support */ +#undef ARCHIVE_ACL_FREEBSD_NFS4 + +/* Linux POSIX.1e ACL support via libacl */ +#undef ARCHIVE_ACL_LIBACL + +/* Linux NFSv4 ACL support via librichacl */ +#undef ARCHIVE_ACL_LIBRICHACL + +/* Solaris ACL support */ +#undef ARCHIVE_ACL_SUNOS + +/* Solaris NFSv4 ACL support */ +#undef ARCHIVE_ACL_SUNOS_NFS4 + /* MD5 via ARCHIVE_CRYPTO_MD5_LIBC supported. */ #undef ARCHIVE_CRYPTO_MD5_LIBC @@ -117,6 +138,18 @@ /* SHA512 via ARCHIVE_CRYPTO_SHA512_WIN supported. */ #undef ARCHIVE_CRYPTO_SHA512_WIN +/* AIX xattr support */ +#undef ARCHIVE_XATTR_AIX + +/* Darwin xattr support */ +#undef ARCHIVE_XATTR_DARWIN + +/* FreeBSD xattr support */ +#undef ARCHIVE_XATTR_FREEBSD + +/* Linux xattr support */ +#undef ARCHIVE_XATTR_LINUX + /* Version number of bsdcat */ #undef BSDCAT_VERSION_STRING @@ -135,14 +168,53 @@ /* Define to 1 if the system has the type `aclent_t'. */ #undef HAVE_ACLENT_T +/* Define to 1 if you have the `acl_add_flag_np' function. */ +#undef HAVE_ACL_ADD_FLAG_NP + +/* Define to 1 if you have the `acl_add_perm' function. */ +#undef HAVE_ACL_ADD_PERM + +/* Define to 1 if you have the `acl_clear_flags_np' function. */ +#undef HAVE_ACL_CLEAR_FLAGS_NP + +/* Define to 1 if you have the `acl_clear_perms' function. */ +#undef HAVE_ACL_CLEAR_PERMS + /* Define to 1 if you have the `acl_create_entry' function. */ #undef HAVE_ACL_CREATE_ENTRY +/* Define to 1 if you have the `acl_delete_def_file' function. */ +#undef HAVE_ACL_DELETE_DEF_FILE + +/* Define to 1 if the system has the type `acl_entry_t'. */ +#undef HAVE_ACL_ENTRY_T + +/* Define to 1 if you have the `acl_free' function. */ +#undef HAVE_ACL_FREE + +/* Define to 1 if you have the `acl_get_brand_np' function. */ +#undef HAVE_ACL_GET_BRAND_NP + +/* Define to 1 if you have the `acl_get_entry' function. */ +#undef HAVE_ACL_GET_ENTRY + +/* Define to 1 if you have the `acl_get_entry_type_np' function. */ +#undef HAVE_ACL_GET_ENTRY_TYPE_NP + +/* Define to 1 if you have the `acl_get_fd' function. */ +#undef HAVE_ACL_GET_FD + /* 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 +/* Define to 1 if you have the `acl_get_file' function. */ +#undef HAVE_ACL_GET_FILE + +/* Define to 1 if you have the `acl_get_flagset_np' function. */ +#undef HAVE_ACL_GET_FLAGSET_NP + +/* Define to 1 if you have the `acl_get_flag_np' function. */ +#undef HAVE_ACL_GET_FLAG_NP /* Define to 1 if you have the `acl_get_link_np' function. */ #undef HAVE_ACL_GET_LINK_NP @@ -150,9 +222,18 @@ /* Define to 1 if you have the `acl_get_perm' function. */ #undef HAVE_ACL_GET_PERM +/* Define to 1 if you have the `acl_get_permset' function. */ +#undef HAVE_ACL_GET_PERMSET + /* Define to 1 if you have the `acl_get_perm_np' function. */ #undef HAVE_ACL_GET_PERM_NP +/* Define to 1 if you have the `acl_get_qualifier' function. */ +#undef HAVE_ACL_GET_QUALIFIER + +/* Define to 1 if you have the `acl_get_tag_type' function. */ +#undef HAVE_ACL_GET_TAG_TYPE + /* Define to 1 if you have the `acl_init' function. */ #undef HAVE_ACL_INIT @@ -165,6 +246,9 @@ /* 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_entry_type_np' function. */ +#undef HAVE_ACL_SET_ENTRY_TYPE_NP + /* Define to 1 if you have the `acl_set_fd' function. */ #undef HAVE_ACL_SET_FD @@ -174,13 +258,28 @@ /* Define to 1 if you have the `acl_set_file' function. */ #undef HAVE_ACL_SET_FILE +/* Define to 1 if you have the `acl_set_link_np' function. */ +#undef HAVE_ACL_SET_LINK_NP + +/* Define to 1 if you have the `acl_set_qualifier' function. */ +#undef HAVE_ACL_SET_QUALIFIER + +/* Define to 1 if you have the `acl_set_tag_type' function. */ +#undef HAVE_ACL_SET_TAG_TYPE + +/* Define to 1 if the system has the type `acl_t'. */ +#undef HAVE_ACL_T + +/* Define to 1 if the system has the type `acl_tag_t'. */ +#undef HAVE_ACL_TAG_T + /* Define to 1 if you have the `arc4random_buf' function. */ #undef HAVE_ARC4RANDOM_BUF /* Define to 1 if you have the header file. */ #undef HAVE_ATTR_XATTR_H -/* Define to 1 if you have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_BCRYPT_H /* Define to 1 if you have the header file. */ @@ -299,11 +398,15 @@ don't. */ #undef HAVE_DECL_UINTMAX_MAX +/* Define to 1 if you have the declaration of `XATTR_NOFOLLOW', and to 0 if + you don't. */ +#undef HAVE_DECL_XATTR_NOFOLLOW + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H -/* Define to 1 if you have the `dirfd' function. */ +/* Define to 1 if you have a dirfd function or macro */ #undef HAVE_DIRFD /* Define to 1 if you have the header file. */ @@ -330,17 +433,29 @@ /* Define to 1 if you have the header file. */ #undef HAVE_EXT2FS_EXT2_FS_H +/* Define to 1 if you have the `extattr_get_fd' function. */ +#undef HAVE_EXTATTR_GET_FD + /* Define to 1 if you have the `extattr_get_file' function. */ #undef HAVE_EXTATTR_GET_FILE +/* Define to 1 if you have the `extattr_get_link' function. */ +#undef HAVE_EXTATTR_GET_LINK + +/* Define to 1 if you have the `extattr_list_fd' function. */ +#undef HAVE_EXTATTR_LIST_FD + /* Define to 1 if you have the `extattr_list_file' function. */ #undef HAVE_EXTATTR_LIST_FILE +/* Define to 1 if you have the `extattr_list_link' function. */ +#undef HAVE_EXTATTR_LIST_LINK + /* Define to 1 if you have the `extattr_set_fd' function. */ #undef HAVE_EXTATTR_SET_FD -/* Define to 1 if you have the `extattr_set_file' function. */ -#undef HAVE_EXTATTR_SET_FILE +/* Define to 1 if you have the `extattr_set_link' function. */ +#undef HAVE_EXTATTR_SET_LINK /* Define to 1 if you have the `facl' function. */ #undef HAVE_FACL @@ -525,6 +640,9 @@ /* Define to 1 if you have the `regex' library (-lregex). */ #undef HAVE_LIBREGEX +/* Define to 1 if you have the `richacl' library (-lrichacl). */ +#undef HAVE_LIBRICHACL + /* Define to 1 if you have the `xml2' library (-lxml2). */ #undef HAVE_LIBXML2 @@ -619,9 +737,21 @@ /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC +/* Define to 1 if you have the `mbr_gid_to_uuid' function. */ +#undef HAVE_MBR_GID_TO_UUID + +/* Define to 1 if you have the `mbr_uid_to_uuid' function. */ +#undef HAVE_MBR_UID_TO_UUID + +/* Define to 1 if you have the `mbr_uuid_to_id' function. */ +#undef HAVE_MBR_UUID_TO_ID + /* Define to 1 if you have the header file. */ #undef HAVE_MD5_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMBERSHIP_H + /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE @@ -718,6 +848,27 @@ /* Define to 1 if you have the header file. */ #undef HAVE_REGEX_H +/* Define to 1 if you have the `richacl_alloc' function. */ +#undef HAVE_RICHACL_ALLOC + +/* Define to 1 if you have the `richacl_equiv_mode' function. */ +#undef HAVE_RICHACL_EQUIV_MODE + +/* Define to 1 if you have the `richacl_free' function. */ +#undef HAVE_RICHACL_FREE + +/* Define to 1 if you have the `richacl_get_fd' function. */ +#undef HAVE_RICHACL_GET_FD + +/* Define to 1 if you have the `richacl_get_file' function. */ +#undef HAVE_RICHACL_GET_FILE + +/* Define to 1 if you have the `richacl_set_fd' function. */ +#undef HAVE_RICHACL_SET_FD + +/* Define to 1 if you have the `richacl_set_file' function. */ +#undef HAVE_RICHACL_SET_FILE + /* Define to 1 if you have the header file. */ #undef HAVE_RIPEMD_H @@ -730,6 +881,9 @@ /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE +/* Define to 1 if you have the `setxattr' function. */ +#undef HAVE_SETXATTR + /* Define to 1 if you have the header file. */ #undef HAVE_SHA256_H @@ -794,6 +948,12 @@ /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR +/* Define to 1 if the system has the type `struct richace'. */ +#undef HAVE_STRUCT_RICHACE + +/* Define to 1 if the system has the type `struct richacl'. */ +#undef HAVE_STRUCT_RICHACL + /* Define to 1 if `f_namemax' is a member of `struct statfs'. */ #undef HAVE_STRUCT_STATFS_F_NAMEMAX @@ -877,6 +1037,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_POLL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_RICHACL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H diff --git a/archivers/libarchive/files/configure b/archivers/libarchive/files/configure index 11231be6abb..91bee3bde3f 100755 --- a/archivers/libarchive/files/configure +++ b/archivers/libarchive/files/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libarchive 3.3.1. +# Generated by GNU Autoconf 2.69 for libarchive 3.3.2. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libarchive' PACKAGE_TARNAME='libarchive' -PACKAGE_VERSION='3.3.1' -PACKAGE_STRING='libarchive 3.3.1' +PACKAGE_VERSION='3.3.2' +PACKAGE_STRING='libarchive 3.3.2' PACKAGE_BUGREPORT='libarchive-discuss@googlegroups.com' PACKAGE_URL='' @@ -635,6 +635,14 @@ ac_includes_default="\ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +INC_FREEBSD_ACL_FALSE +INC_FREEBSD_ACL_TRUE +INC_DARWIN_ACL_FALSE +INC_DARWIN_ACL_TRUE +INC_SUNOS_ACL_FALSE +INC_SUNOS_ACL_TRUE +INC_LINUX_ACL_FALSE +INC_LINUX_ACL_TRUE LIBOBJS LIBXML2_PC_LIBS LIBXML2_PC_CFLAGS @@ -764,6 +772,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -808,6 +817,7 @@ with_libiconv_prefix with_lz4 with_lzma with_lzo2 +with_cng with_nettle with_openssl with_xml2 @@ -870,6 +880,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1122,6 +1133,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1259,7 +1279,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1372,7 +1392,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libarchive 3.3.1 to adapt to many kinds of systems. +\`configure' configures libarchive 3.3.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,6 +1432,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1442,7 +1463,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libarchive 3.3.1:";; + short | recursive ) echo "Configuration of libarchive 3.3.2:";; esac cat <<\_ACEOF @@ -1512,6 +1533,7 @@ Optional Packages: --without-lz4 Don't build support for lz4 through liblz4 --without-lzma Don't build support for xz through lzma --with-lzo2 Build with LZO support from liblzo2 + --without-cng Don't build support of CNG(Crypto Next Generation) --without-nettle Don't build with crypto support from Nettle --without-openssl Don't build support for mtree and xar hashes through openssl @@ -1605,7 +1627,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libarchive configure 3.3.1 +libarchive configure 3.3.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2444,7 +2466,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libarchive $as_me 3.3.1, which was +It was created by libarchive $as_me 3.3.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3313,7 +3335,7 @@ fi # Define the identity of the package. PACKAGE='libarchive' - VERSION='3.3.1' + VERSION='3.3.2' cat >>confdefs.h <<_ACEOF @@ -3473,7 +3495,7 @@ AM_BACKSLASH='\' # Libtool interface version bumps on any API change, so increments # whenever libarchive minor version does. -ARCHIVE_MINOR=$(( (3003001 / 1000) % 1000 )) +ARCHIVE_MINOR=$(( (3003002 / 1000) % 1000 )) # Libarchive 2.7 == libtool interface 9 = 2 + 7 # Libarchive 2.8 == libtool interface 10 = 2 + 8 # Libarchive 2.9 == libtool interface 11 = 2 + 8 @@ -3481,37 +3503,37 @@ ARCHIVE_MINOR=$(( (3003001 / 1000) % 1000 )) # Libarchive 3.1 == libtool interface 13 ARCHIVE_INTERFACE=`echo $((13 + ${ARCHIVE_MINOR}))` # Libarchive revision is bumped on any source change === libtool revision -ARCHIVE_REVISION=$(( 3003001 % 1000 )) +ARCHIVE_REVISION=$(( 3003002 % 1000 )) # Libarchive minor is bumped on any interface addition === libtool age ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_INTERFACE:$ARCHIVE_REVISION:$ARCHIVE_MINOR # Stick the version numbers into config.h -$as_echo "#define LIBARCHIVE_VERSION_STRING \"3.3.1\"" >>confdefs.h +$as_echo "#define LIBARCHIVE_VERSION_STRING \"3.3.2\"" >>confdefs.h cat >>confdefs.h <<_ACEOF -#define LIBARCHIVE_VERSION_NUMBER "3003001" +#define LIBARCHIVE_VERSION_NUMBER "3003002" _ACEOF -$as_echo "#define BSDCPIO_VERSION_STRING \"3.3.1\"" >>confdefs.h +$as_echo "#define BSDCPIO_VERSION_STRING \"3.3.2\"" >>confdefs.h -$as_echo "#define BSDTAR_VERSION_STRING \"3.3.1\"" >>confdefs.h +$as_echo "#define BSDTAR_VERSION_STRING \"3.3.2\"" >>confdefs.h -$as_echo "#define BSDCAT_VERSION_STRING \"3.3.1\"" >>confdefs.h +$as_echo "#define BSDCAT_VERSION_STRING \"3.3.2\"" >>confdefs.h # The shell variables here must be the same as the AC_SUBST() variables # below, but the shell variable names apparently cannot be the same as # the m4 macro names above. Why? Ask autoconf. -BSDCPIO_VERSION_STRING=3.3.1 -BSDTAR_VERSION_STRING=3.3.1 -BSDCAT_VERSION_STRING=3.3.1 -LIBARCHIVE_VERSION_STRING=3.3.1 -LIBARCHIVE_VERSION_NUMBER=3003001 +BSDCPIO_VERSION_STRING=3.3.2 +BSDTAR_VERSION_STRING=3.3.2 +BSDCAT_VERSION_STRING=3.3.2 +LIBARCHIVE_VERSION_STRING=3.3.2 +LIBARCHIVE_VERSION_NUMBER=3003002 # Substitute the above version numbers into the various files below. # Yes, I believe this is the fourth time we define what are essentially @@ -13542,6 +13564,19 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi +for ac_header in acl/libacl.h attr/xattr.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + for ac_header in copyfile.h ctype.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -13666,7 +13701,7 @@ _ACEOF fi -for ac_header in locale.h paths.h poll.h pthread.h pwd.h +for ac_header in locale.h membership.h paths.h poll.h pthread.h pwd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -13705,7 +13740,7 @@ fi done -for ac_header in sys/cdefs.h sys/extattr.h +for ac_header in sys/acl.h sys/cdefs.h sys/ea.h sys/extattr.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -13731,7 +13766,7 @@ fi done -for ac_header in sys/param.h sys/poll.h sys/select.h sys/statfs.h sys/statvfs.h +for ac_header in sys/param.h sys/poll.h sys/richacl.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -13744,7 +13779,7 @@ fi done -for ac_header in sys/time.h sys/utime.h sys/utsname.h sys/vfs.h +for ac_header in sys/select.h sys/statfs.h sys/statvfs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -13757,7 +13792,7 @@ fi done -for ac_header in time.h unistd.h utime.h wchar.h wctype.h +for ac_header in sys/time.h sys/utime.h sys/utsname.h sys/vfs.h sys/xattr.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -13770,24 +13805,25 @@ fi done -for ac_header in windows.h +for ac_header in time.h unistd.h utime.h wchar.h wctype.h do : - ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" -if test "x$ac_cv_header_windows_h" = xyes; then : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_WINDOWS_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done -for ac_header in Bcrypt.h +for ac_header in windows.h do : - ac_fn_c_check_header_mongrel "$LINENO" "Bcrypt.h" "ac_cv_header_Bcrypt_h" "$ac_includes_default" -if test "x$ac_cv_header_Bcrypt_h" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" +if test "x$ac_cv_header_windows_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_BCRYPT_H 1 +#define HAVE_WINDOWS_H 1 _ACEOF fi @@ -15323,6 +15359,13 @@ fi fi +# Check whether --with-cng was given. +if test "${with_cng+set}" = set; then : + withval=$with_cng; +fi + + + # Check whether --with-nettle was given. if test "${with_nettle+set}" = set; then : withval=$with_nettle; @@ -17526,7 +17569,7 @@ $as_echo "$ac_cv_func_CreateHardLinkA" >&6; } if test $ac_cv_func_CreateHardLinkA = yes; then : fi -for ac_func in arc4random_buf chflags chown chroot ctime_r dirfd +for ac_func in arc4random_buf chflags chown chroot ctime_r do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -17794,6 +17837,26 @@ if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_READDIR_R 1" >>confdefs.h +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# dirfd can be either a function or a macro. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + DIR *dir; +int +main () +{ +return(dirfd(dir)); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_DIRFD 1" >>confdefs.h + + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -17833,32 +17896,7 @@ fi if test "x$enable_xattr" != "xno"; then - for ac_header in attr/xattr.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default" -if test "x$ac_cv_header_attr_xattr_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ATTR_XATTR_H 1 -_ACEOF - -fi - -done - - for ac_header in sys/xattr.h sys/ea.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setxattr" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setxattr" >&5 $as_echo_n "checking for library containing setxattr... " >&6; } if ${ac_cv_search_setxattr+:} false; then : $as_echo_n "(cached) " >&6 @@ -17914,31 +17952,45 @@ if test "$ac_res" != no; then : fi - for ac_func in extattr_get_file extattr_list_file -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_decl "$LINENO" "EXTATTR_NAMESPACE_USER" "ac_cv_have_decl_EXTATTR_NAMESPACE_USER" "#include +#include +" +if test "x$ac_cv_have_decl_EXTATTR_NAMESPACE_USER" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -done - for ac_func in extattr_set_fd extattr_set_file -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_EXTATTR_NAMESPACE_USER $ac_have_decl _ACEOF + ac_fn_c_check_decl "$LINENO" "XATTR_NOFOLLOW" "ac_cv_have_decl_XATTR_NOFOLLOW" "#include + +" +if test "x$ac_cv_have_decl_XATTR_NOFOLLOW" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 fi -done - for ac_func in fgetxattr flistxattr fsetxattr getxattr +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_XATTR_NOFOLLOW $ac_have_decl +_ACEOF + + if test "x$ac_cv_header_sys_xattr_h" = "xyes" \ + -a "x$ac_cv_have_decl_XATTR_NOFOLLOW" = "xyes"; then + # Darwin extended attributes support + if ${ac_cv_archive_xattr_darwin+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_func in fgetxattr \ + flistxattr \ + fsetxattr \ + getxattr \ + listxattr \ + setxattr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -17946,11 +17998,30 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - + ac_cv_archive_xattr_darwin=yes +else + ac_cv_archive_xattr_darwin=no fi done - for ac_func in lgetxattr listxattr llistxattr lsetxattr + + +fi + + elif test "x$ac_cv_header_sys_extattr_h" = "xyes" \ + -a "x$ac_cv_have_decl_EXTATTR_NAMESPACE_USER" = "xyes"; then + # FreeBSD extended attributes support + if ${ac_cv_archive_xattr_freebsd+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_func in extattr_get_fd \ + extattr_get_file \ + extattr_get_link \ + extattr_list_fd \ + extattr_list_file \ + extattr_list_link \ + extattr_set_fd \ + extattr_set_link do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -17958,11 +18029,30 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - + ac_cv_archive_xattr_freebsd=yes +else + ac_cv_archive_xattr_freebsd=no fi done - for ac_func in fgetea flistea fsetea getea + + +fi + + elif test "x$ac_cv_header_sys_xattr_h" = "xyes" \ + -o "x$ac_cv_header_attr_xattr_h" = "xyes"; then + # Linux extended attributes support + if ${ac_cv_archive_xattr_linux+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_func in fgetxattr \ + flistxattr \ + fsetxattr \ + getxattr \ + lgetxattr \ + listxattr \ + llistxattr \ + lsetxattr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -17970,11 +18060,29 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - + ac_cv_archive_xattr_linux=yes +else + ac_cv_archive_xattr_linux=no fi done - for ac_func in lgetea listea llistea lsetea + + +fi + + elif test "x$ac_cv_header_sys_ea_h" = "xyes"; then + # AIX extended attributes support + if ${ac_cv_archive_xattr_aix+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_func in fgetea \ + flistea \ + fsetea \ + getea \ + lgetea \ + listea \ + llistea \ + lsetea do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -17982,24 +18090,48 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - + ac_cv_archive_xattr_aix=yes +else + ac_cv_archive_xattr_aix=no fi done - ac_fn_c_check_decl "$LINENO" "EXTATTR_NAMESPACE_USER" "ac_cv_have_decl_EXTATTR_NAMESPACE_USER" "#include -#include -" -if test "x$ac_cv_have_decl_EXTATTR_NAMESPACE_USER" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 + fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_EXTATTR_NAMESPACE_USER $ac_have_decl -_ACEOF + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extended attributes support" >&5 +$as_echo_n "checking for extended attributes support... " >&6; } + if test "x$ac_cv_archive_xattr_linux" = "xyes"; then + +$as_echo "#define ARCHIVE_XATTR_LINUX 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 +$as_echo "Linux" >&6; } + elif test "x$ac_cv_archive_xattr_darwin" = "xyes"; then + +$as_echo "#define ARCHIVE_XATTR_DARWIN 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 +$as_echo "Darwin" >&6; } + elif test "x$ac_cv_archive_xattr_freebsd" = "xyes"; then + +$as_echo "#define ARCHIVE_XATTR_FREEBSD 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FreeBSD" >&5 +$as_echo "FreeBSD" >&6; } + elif test "x$ac_cv_archive_xattr_aix" = "xyes"; then + +$as_echo "#define ARCHIVE_XATTR_AIX 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: AIX" >&5 +$as_echo "AIX" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + fi fi # Check for ACL support @@ -18016,31 +18148,8 @@ fi if test "x$enable_acl" != "xno"; then - for ac_header in acl/libacl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default" -if test "x$ac_cv_header_acl_libacl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ACL_LIBACL_H 1 -_ACEOF - -fi - -done - - for ac_header in sys/acl.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_acl_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_ACL_H 1 -_ACEOF - -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5 + # Libacl + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5 $as_echo_n "checking for acl_get_file in -lacl... " >&6; } if ${ac_cv_lib_acl_acl_get_file+:} false; then : $as_echo_n "(cached) " >&6 @@ -18085,56 +18194,155 @@ _ACEOF fi - for ac_func in acl_create_entry acl_get_fd_np -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + + ac_fn_c_check_type "$LINENO" "acl_t" "ac_cv_type_acl_t" " + #if HAVE_SYS_TYPES_H + #include + #endif + #if HAVE_SYS_ACL_H + #include + #endif + +" +if test "x$ac_cv_type_acl_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ACL_T 1 _ACEOF + fi -done +ac_fn_c_check_type "$LINENO" "acl_entry_t" "ac_cv_type_acl_entry_t" " + #if HAVE_SYS_TYPES_H + #include + #endif + #if HAVE_SYS_ACL_H + #include + #endif - for ac_func in acl_init acl_set_fd acl_set_fd_np acl_set_file -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +" +if test "x$ac_cv_type_acl_entry_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ACL_ENTRY_T 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "acl_permset_t" "ac_cv_type_acl_permset_t" " + #if HAVE_SYS_TYPES_H + #include + #endif + #if HAVE_SYS_ACL_H + #include + #endif + +" +if test "x$ac_cv_type_acl_permset_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ACL_PERMSET_T 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "acl_tag_t" "ac_cv_type_acl_tag_t" " + #if HAVE_SYS_TYPES_H + #include + #endif + #if HAVE_SYS_ACL_H + #include + #endif + +" +if test "x$ac_cv_type_acl_tag_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ACL_TAG_T 1 +_ACEOF + + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for richacl_get_file in -lrichacl" >&5 +$as_echo_n "checking for richacl_get_file in -lrichacl... " >&6; } +if ${ac_cv_lib_richacl_richacl_get_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrichacl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char richacl_get_file (); +int +main () +{ +return richacl_get_file (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_richacl_richacl_get_file=yes +else + ac_cv_lib_richacl_richacl_get_file=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_richacl_richacl_get_file" >&5 +$as_echo "$ac_cv_lib_richacl_richacl_get_file" >&6; } +if test "x$ac_cv_lib_richacl_richacl_get_file" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_LIBRICHACL 1 _ACEOF + LIBS="-lrichacl $LIBS" + fi -done - ac_fn_c_check_type "$LINENO" "acl_permset_t" "ac_cv_type_acl_permset_t" "#if HAVE_SYS_TYPES_H - #include - #endif - #if HAVE_SYS_ACL_H - #include - #endif + ac_fn_c_check_type "$LINENO" "struct richace" "ac_cv_type_struct_richace" " + #if HAVE_SYS_RICHACL_H + #include + #endif " -if test "x$ac_cv_type_acl_permset_t" = xyes; then : +if test "x$ac_cv_type_struct_richace" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_ACL_PERMSET_T 1 +#define HAVE_STRUCT_RICHACE 1 _ACEOF fi +ac_fn_c_check_type "$LINENO" "struct richacl" "ac_cv_type_struct_richacl" " + #if HAVE_SYS_RICHACL_H + #include + #endif + +" +if test "x$ac_cv_type_struct_richacl" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_RICHACL 1 +_ACEOF - # The "acl_get_perm()" function was omitted from the POSIX draft. - # (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. - for ac_func in acl_get_perm_np acl_get_perm acl_get_link acl_get_link_np +fi + + + # Solaris and derivates ACLs + for ac_func in acl facl do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -18147,98 +18355,268 @@ fi done - # Check for acl_is_trivial_np on FreeBSD - for ac_func in acl_is_trivial_np + if test "x$ac_cv_lib_richacl_richacl_get_file" = "xyes" \ + -a "x$ac_cv_type_struct_richace" = "xyes" \ + -a "x$ac_cv_type_struct_richacl" = "xyes"; then + if ${ac_cv_archive_acl_librichacl+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_func in richacl_alloc \ + richacl_equiv_mode \ + richacl_free \ + richacl_get_fd \ + richacl_get_file \ + richacl_set_fd \ + richacl_set_file do : - ac_fn_c_check_func "$LINENO" "acl_is_trivial_np" "ac_cv_func_acl_is_trivial_np" -if test "x$ac_cv_func_acl_is_trivial_np" = xyes; then : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define HAVE_ACL_IS_TRIVIAL_NP 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - + ac_cv_archive_acl_librichacl=yes +else + ac_cv_archive_acl_librichacl=no fi done +fi + + fi - # FreeBSD and POSIX - # MacOS has no ACL_USER in acl.h - ac_fn_c_check_decl "$LINENO" "ACL_TYPE_NFS4" "ac_cv_have_decl_ACL_TYPE_NFS4" "#include - #include + if test "x$ac_cv_func_acl" = "xyes" \ + -a "x$ac_cv_func_facl" = "xyes"; then + ac_fn_c_check_type "$LINENO" "aclent_t" "ac_cv_type_aclent_t" "#include " -if test "x$ac_cv_have_decl_ACL_TYPE_NFS4" = xyes; then : +if test "x$ac_cv_type_aclent_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ACLENT_T 1 +_ACEOF + + +fi + + if test "x$ac_cv_type_aclent_t" = "xyes"; then + if ${ac_cv_archive_acl_sunos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_fn_c_check_decl "$LINENO" "GETACL" "ac_cv_have_decl_GETACL" "#include +" +if test "x$ac_cv_have_decl_GETACL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ACL_TYPE_NFS4 $ac_have_decl +#define HAVE_DECL_GETACL $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "ACL_USER" "ac_cv_have_decl_ACL_USER" "#include - #include +if test $ac_have_decl = 1; then : + ac_cv_archive_acl_sunos=yes +else + ac_cv_archive_acl_sunos=no +fi +ac_fn_c_check_decl "$LINENO" "SETACL" "ac_cv_have_decl_SETACL" "#include " -if test "x$ac_cv_have_decl_ACL_USER" = xyes; then : +if test "x$ac_cv_have_decl_SETACL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ACL_USER $ac_have_decl +#define HAVE_DECL_SETACL $ac_have_decl _ACEOF +if test $ac_have_decl = 1; then : + ac_cv_archive_acl_sunos=yes +else + ac_cv_archive_acl_sunos=no +fi +ac_fn_c_check_decl "$LINENO" "GETACLCNT" "ac_cv_have_decl_GETACLCNT" "#include +" +if test "x$ac_cv_have_decl_GETACLCNT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETACLCNT $ac_have_decl +_ACEOF +if test $ac_have_decl = 1; then : + ac_cv_archive_acl_sunos=yes +else + ac_cv_archive_acl_sunos=no +fi - # MacOS ACL support - ac_fn_c_check_decl "$LINENO" "ACL_TYPE_EXTENDED" "ac_cv_have_decl_ACL_TYPE_EXTENDED" "#include - #include +fi + + ac_fn_c_check_type "$LINENO" "ace_t" "ac_cv_type_ace_t" "#include " -if test "x$ac_cv_have_decl_ACL_TYPE_EXTENDED" = xyes; then : +if test "x$ac_cv_type_ace_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ACE_T 1 +_ACEOF + + +fi + + if test "x$ac_cv_type_ace_t" = "xyes"; then + if ${ac_cv_archive_acl_sunos_nfs4+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_fn_c_check_decl "$LINENO" "ACE_GETACL" "ac_cv_have_decl_ACE_GETACL" "#include +" +if test "x$ac_cv_have_decl_ACE_GETACL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ACL_TYPE_EXTENDED $ac_have_decl +#define HAVE_DECL_ACE_GETACL $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "ACL_SYNCHRONIZE" "ac_cv_have_decl_ACL_SYNCHRONIZE" "#include - #include +if test $ac_have_decl = 1; then : + ac_cv_archive_acl_sunos_nfs4=yes +else + ac_cv_archive_acl_sonos_nfs4=no +fi +ac_fn_c_check_decl "$LINENO" "ACE_SETACL" "ac_cv_have_decl_ACE_SETACL" "#include " -if test "x$ac_cv_have_decl_ACL_SYNCHRONIZE" = xyes; then : +if test "x$ac_cv_have_decl_ACE_SETACL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ACL_SYNCHRONIZE $ac_have_decl +#define HAVE_DECL_ACE_SETACL $ac_have_decl _ACEOF - - - # Solaris and derivates ACLs - ac_fn_c_check_type "$LINENO" "aclent_t" "ac_cv_type_aclent_t" "#include +if test $ac_have_decl = 1; then : + ac_cv_archive_acl_sunos_nfs4=yes +else + ac_cv_archive_acl_sonos_nfs4=no +fi +ac_fn_c_check_decl "$LINENO" "ACE_GETACLCNT" "ac_cv_have_decl_ACE_GETACLCNT" "#include " -if test "x$ac_cv_type_aclent_t" = xyes; then : +if test "x$ac_cv_have_decl_ACE_GETACLCNT" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi cat >>confdefs.h <<_ACEOF -#define HAVE_ACLENT_T 1 +#define HAVE_DECL_ACE_GETACLCNT $ac_have_decl _ACEOF +if test $ac_have_decl = 1; then : + ac_cv_archive_acl_sunos_nfs4=yes +else + ac_cv_archive_acl_sonos_nfs4=no +fi +fi + fi + fi + elif test "x$ac_cv_type_acl_t" = "xyes" \ + -a "x$ac_cv_type_acl_entry_t" = "xyes" \ + -a "x$ac_cv_type_acl_permset_t" = "xyes" \ + -a "x$ac_cv_type_acl_tag_t" = "xyes"; then + # POSIX.1e ACL functions + if ${ac_cv_posix_acl_funcs+:} false; then : + $as_echo_n "(cached) " >&6 +else + for ac_func in acl_add_perm \ + acl_clear_perms \ + acl_create_entry \ + acl_delete_def_file \ + acl_free \ + acl_get_entry \ + acl_get_fd \ + acl_get_file \ + acl_get_permset \ + acl_get_qualifier \ + acl_get_tag_type \ + acl_init \ + acl_set_fd \ + acl_set_file \ + acl_set_qualifier \ + acl_set_tag_type +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + ac_cv_posix_acl_funcs=yes +else + ac_cv_posix_acl_funcs=no fi +done - ac_fn_c_check_type "$LINENO" "ace_t" "ac_cv_type_ace_t" "#include -" -if test "x$ac_cv_type_ace_t" = xyes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_ACE_T 1 +fi + + + for ac_func in acl_get_perm +do : + ac_fn_c_check_func "$LINENO" "acl_get_perm" "ac_cv_func_acl_get_perm" +if test "x$ac_cv_func_acl_get_perm" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ACL_GET_PERM 1 _ACEOF +fi +done + + if test "x$ac_cv_posix_acl_funcs" = "xyes" \ + -a "x$ac_cv_header_acl_libacl_h" = "xyes" \ + -a "x$ac_cv_lib_acl_acl_get_file" = "xyes" \ + -a "x$ac_cv_func_acl_get_perm"; then + if ${ac_cv_archive_acl_libacl+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_archive_acl_libacl=yes fi - for ac_func in acl facl + +$as_echo "#define ARCHIVE_ACL_LIBACL 1" >>confdefs.h + + else + # FreeBSD/Darwin + for ac_func in acl_add_flag_np \ + acl_clear_flags_np \ + acl_get_brand_np \ + acl_get_entry_type_np \ + acl_get_flag_np \ + acl_get_flagset_np \ + acl_get_fd_np \ + acl_get_link_np \ + acl_get_perm_np \ + acl_is_trivial_np \ + acl_set_entry_type_np \ + acl_set_fd_np \ + acl_set_link_np +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + for ac_func in mbr_uid_to_uuid \ + mbr_uuid_to_id \ + mbr_gid_to_uuid do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -18250,75 +18628,198 @@ _ACEOF fi done - ac_fn_c_check_decl "$LINENO" "GETACL" "ac_cv_have_decl_GETACL" "#include + + ac_fn_c_check_decl "$LINENO" "ACL_TYPE_EXTENDED" "ac_cv_have_decl_ACL_TYPE_EXTENDED" "#include + #include " -if test "x$ac_cv_have_decl_GETACL" = xyes; then : +if test "x$ac_cv_have_decl_ACL_TYPE_EXTENDED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETACL $ac_have_decl +#define HAVE_DECL_ACL_TYPE_EXTENDED $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "SETACL" "ac_cv_have_decl_SETACL" "#include +ac_fn_c_check_decl "$LINENO" "ACL_TYPE_NFS4" "ac_cv_have_decl_ACL_TYPE_NFS4" "#include + #include " -if test "x$ac_cv_have_decl_SETACL" = xyes; then : +if test "x$ac_cv_have_decl_ACL_TYPE_NFS4" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SETACL $ac_have_decl +#define HAVE_DECL_ACL_TYPE_NFS4 $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "GETACLCNT" "ac_cv_have_decl_GETACLCNT" "#include +ac_fn_c_check_decl "$LINENO" "ACL_USER" "ac_cv_have_decl_ACL_USER" "#include + #include " -if test "x$ac_cv_have_decl_GETACLCNT" = xyes; then : +if test "x$ac_cv_have_decl_ACL_USER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETACLCNT $ac_have_decl +#define HAVE_DECL_ACL_USER $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "ACE_GETACL" "ac_cv_have_decl_ACE_GETACL" "#include +ac_fn_c_check_decl "$LINENO" "ACL_SYNCHRONIZE" "ac_cv_have_decl_ACL_SYNCHRONIZE" "#include + #include " -if test "x$ac_cv_have_decl_ACE_GETACL" = xyes; then : +if test "x$ac_cv_have_decl_ACL_SYNCHRONIZE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ACE_GETACL $ac_have_decl +#define HAVE_DECL_ACL_SYNCHRONIZE $ac_have_decl _ACEOF -ac_fn_c_check_decl "$LINENO" "ACE_SETACL" "ac_cv_have_decl_ACE_SETACL" "#include -" -if test "x$ac_cv_have_decl_ACE_SETACL" = xyes; then : - ac_have_decl=1 + + if test "x$ac_cv_posix_acl_funcs" = "xyes" \ + -a "x$ac_cv_func_acl_get_fd_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_perm" != "xyes" \ + -a "x$ac_cv_func_acl_get_perm_np" = "xyes" \ + -a "x$ac_cv_func_acl_set_fd_np" = "xyes"; then + if test "x$ac_cv_have_decl_ACL_USER" = "xyes"; then + if ${ac_cv_archive_acl_freebsd+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_have_decl=0 + ac_cv_archive_acl_freebsd=yes fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ACE_SETACL $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "ACE_GETACLCNT" "ac_cv_have_decl_ACE_GETACLCNT" "#include -" -if test "x$ac_cv_have_decl_ACE_GETACLCNT" = xyes; then : - ac_have_decl=1 + if test "x$ac_cv_have_decl_ACL_TYPE_NFS4" = "xyes" \ + -a "x$ac_cv_func_acl_add_flag_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_brand_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_entry_type_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_flagset_np" = "xyes" \ + -a "x$ac_cv_func_acl_set_entry_type_np" = "xyes"; then + if ${ac_cv_archive_acl_freebsd_nfs4+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_have_decl=0 + ac_cv_archive_acl_freebsd_nfs4=yes fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ACE_GETACLCNT $ac_have_decl -_ACEOF + fi + elif test "x$ac_cv_have_decl_ACL_TYPE_EXTENDED" = "xyes" \ + -a "x$ac_cv_func_acl_add_flag_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_flagset_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_link_np" = "xyes" \ + -a "x$ac_cv_func_acl_set_link_np" = "xyes" \ + -a "x$ac_cv_func_mbr_uid_to_uuid" = "xyes" \ + -a "x$ac_cv_func_mbr_uuid_to_id" = "xyes" \ + -a "x$ac_cv_func_mbr_gid_to_uuid" = "xyes"; then + if ${ac_cv_archive_acl_darwin+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_archive_acl_darwin=yes +fi + fi + fi + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL support" >&5 +$as_echo_n "checking for ACL support... " >&6; } + if test "x$ac_cv_archive_acl_libacl" = "xyes" \ + -a "x$ac_cv_archive_acl_librichacl" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libacl (POSIX.1e) + librichacl (NFSv4)" >&5 +$as_echo "libacl (POSIX.1e) + librichacl (NFSv4)" >&6; } + +$as_echo "#define ARCHIVE_ACL_LIBACL 1" >>confdefs.h + + +$as_echo "#define ARCHIVE_ACL_LIBRICHACL 1" >>confdefs.h + + elif test "x$ac_cv_archive_acl_libacl" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libacl (POSIX.1e)" >&5 +$as_echo "libacl (POSIX.1e)" >&6; } + +$as_echo "#define ARCHIVE_ACL_LIBACL 1" >>confdefs.h + + elif test "x$ac_cv_archive_acl_librichacl" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: librichacl (NFSv4)" >&5 +$as_echo "librichacl (NFSv4)" >&6; } + +$as_echo "#define ARCHIVE_ACL_LIBRICHACL 1" >>confdefs.h + + elif test "x$ac_cv_archive_acl_darwin" = "xyes"; then + +$as_echo "#define ARCHIVE_ACL_DARWIN 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin (limited NFSv4)" >&5 +$as_echo "Darwin (limited NFSv4)" >&6; } + elif test "x$ac_cv_archive_acl_sunos" = "xyes"; then + +$as_echo "#define ARCHIVE_ACL_SUNOS 1" >>confdefs.h + + if test "x$ac_cv_archive_acl_sunos_nfs4" = "xyes"; then + +$as_echo "#define ARCHIVE_ACL_SUNOS_NFS4 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris (POSIX.1e and NFSv4)" >&5 +$as_echo "Solaris (POSIX.1e and NFSv4)" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Solaris (POSIX.1e)" >&5 +$as_echo "Solaris (POSIX.1e)" >&6; } + fi + elif test "x$ac_cv_archive_acl_freebsd" = "xyes"; then + +$as_echo "#define ARCHIVE_ACL_FREEBSD 1" >>confdefs.h + + if test "x$ac_cv_archive_acl_freebsd_nfs4" = "xyes"; then + +$as_echo "#define ARCHIVE_ACL_FREEBSD_NFS4 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FreeBSD (POSIX.1e and NFSv4)" >&5 +$as_echo "FreeBSD (POSIX.1e and NFSv4)" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: FreeBSD (POSIX.1e)" >&5 +$as_echo "FreeBSD (POSIX.1e)" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + fi fi + + if test "x$ac_cv_archive_acl_libacl" = "xyes" \ + -o "x$ac_cv_archive_acl_librichacl" = "xyes"; then + INC_LINUX_ACL_TRUE= + INC_LINUX_ACL_FALSE='#' +else + INC_LINUX_ACL_TRUE='#' + INC_LINUX_ACL_FALSE= +fi + + if test "x$ac_cv_archive_acl_sunos" = "xyes"; then + INC_SUNOS_ACL_TRUE= + INC_SUNOS_ACL_FALSE='#' +else + INC_SUNOS_ACL_TRUE='#' + INC_SUNOS_ACL_FALSE= +fi + + if test "x$ac_cv_archive_acl_darwin" = "xyes"; then + INC_DARWIN_ACL_TRUE= + INC_DARWIN_ACL_FALSE='#' +else + INC_DARWIN_ACL_TRUE='#' + INC_DARWIN_ACL_FALSE= +fi + + if test "x$ac_cv_archive_acl_freebsd" = "xyes"; then + INC_FREEBSD_ACL_TRUE= + INC_FREEBSD_ACL_FALSE='#' +else + INC_FREEBSD_ACL_TRUE='#' + INC_FREEBSD_ACL_FALSE= +fi + + # Additional requirements # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : @@ -18345,7 +18846,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -18391,7 +18892,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -18415,7 +18916,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -18460,7 +18961,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -18484,7 +18985,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -19314,6 +19815,27 @@ rm -f core conftest.err conftest.$ac_objext \ ;; esac +if test "x$with_cng" != "xno"; then + for ac_header in bcrypt.h +do : + ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#ifdef HAVE_WINDOWS_H + # include + #endif + +" +if test "x$ac_cv_header_bcrypt_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BCRYPT_H 1 +_ACEOF + + LIBS="$LIBS -lbcrypt" + +fi + +done + +fi + if test "x$with_nettle" != "xno"; then for ac_header in nettle/md5.h nettle/ripemd160.h nettle/sha.h do : @@ -20877,6 +21399,22 @@ if test -z "${STATIC_BSDCPIO_TRUE}" && test -z "${STATIC_BSDCPIO_FALSE}"; then as_fn_error $? "conditional \"STATIC_BSDCPIO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${INC_LINUX_ACL_TRUE}" && test -z "${INC_LINUX_ACL_FALSE}"; then + as_fn_error $? "conditional \"INC_LINUX_ACL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INC_SUNOS_ACL_TRUE}" && test -z "${INC_SUNOS_ACL_FALSE}"; then + as_fn_error $? "conditional \"INC_SUNOS_ACL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INC_DARWIN_ACL_TRUE}" && test -z "${INC_DARWIN_ACL_FALSE}"; then + as_fn_error $? "conditional \"INC_DARWIN_ACL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INC_FREEBSD_ACL_TRUE}" && test -z "${INC_FREEBSD_ACL_FALSE}"; then + as_fn_error $? "conditional \"INC_FREEBSD_ACL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -21274,7 +21812,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libarchive $as_me 3.3.1, which was +This file was extended by libarchive $as_me 3.3.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21340,7 +21878,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libarchive config.status 3.3.1 +libarchive config.status 3.3.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/archivers/libarchive/files/configure.ac b/archivers/libarchive/files/configure.ac index e9df0a6a090..ba3cfdafcdb 100644 --- a/archivers/libarchive/files/configure.ac +++ b/archivers/libarchive/files/configure.ac @@ -4,8 +4,8 @@ dnl First, define all of the version numbers up front. dnl In particular, this allows the version macro to be used in AC_INIT dnl These first two version numbers are updated automatically on each release. -m4_define([LIBARCHIVE_VERSION_S],[3.3.1]) -m4_define([LIBARCHIVE_VERSION_N],[3003001]) +m4_define([LIBARCHIVE_VERSION_S],[3.3.2]) +m4_define([LIBARCHIVE_VERSION_N],[3003002]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) @@ -253,6 +253,7 @@ esac # Checks for header files. AC_HEADER_DIRENT AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([acl/libacl.h attr/xattr.h]) AC_CHECK_HEADERS([copyfile.h ctype.h]) AC_CHECK_HEADERS([errno.h ext2fs/ext2_fs.h fcntl.h grp.h]) @@ -283,16 +284,16 @@ 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([locale.h membership.h paths.h poll.h pthread.h pwd.h]) AC_CHECK_HEADERS([readpassphrase.h signal.h spawn.h]) AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h]) -AC_CHECK_HEADERS([sys/cdefs.h sys/extattr.h]) +AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/ea.h sys/extattr.h]) AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h]) -AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/select.h sys/statfs.h sys/statvfs.h]) -AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h]) +AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/richacl.h]) +AC_CHECK_HEADERS([sys/select.h sys/statfs.h sys/statvfs.h]) +AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h sys/xattr.h]) AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h wctype.h]) AC_CHECK_HEADERS([windows.h]) -AC_CHECK_HEADERS([Bcrypt.h]) # check windows.h first; the other headers require it. AC_CHECK_HEADERS([wincrypt.h winioctl.h],[],[], [[#ifdef HAVE_WINDOWS_H @@ -399,6 +400,9 @@ if test "x$with_lzo2" = "xyes"; then AC_CHECK_LIB(lzo2,lzo1x_decompress_safe) fi +AC_ARG_WITH([cng], + AS_HELP_STRING([--without-cng], [Don't build support of CNG(Crypto Next Generation)])) + AC_ARG_WITH([nettle], AS_HELP_STRING([--without-nettle], [Don't build with crypto support from Nettle])) AC_ARG_WITH([openssl], @@ -601,7 +605,7 @@ AC_FUNC_VPRINTF # To avoid necessity for including windows.h or special forward declaration # workarounds, we use 'void *' for 'struct SECURITY_ATTRIBUTES *' AC_CHECK_STDCALL_FUNC([CreateHardLinkA],[const char *, const char *, void *]) -AC_CHECK_FUNCS([arc4random_buf chflags chown chroot ctime_r dirfd]) +AC_CHECK_FUNCS([arc4random_buf chflags chown chroot ctime_r]) AC_CHECK_FUNCS([fchdir fchflags fchmod fchown fcntl fdopendir fork]) AC_CHECK_FUNCS([fstat fstatat fstatfs fstatvfs ftruncate]) AC_CHECK_FUNCS([futimens futimes futimesat]) @@ -644,6 +648,13 @@ AC_COMPILE_IFELSE( return(readdir_r(dir, &e, &r));]])], [AC_DEFINE(HAVE_READDIR_R,1,[Define to 1 if you have a POSIX compatible readdir_r])] ) +# dirfd can be either a function or a macro. +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include + DIR *dir;]], + [[return(dirfd(dir));]])], + [AC_DEFINE(HAVE_DIRFD,1,[Define to 1 if you have a dirfd function or macro])] +) # FreeBSD's nl_langinfo supports an option to specify whether the # current locale uses month/day or day/month ordering. It makes the @@ -671,18 +682,108 @@ AC_ARG_ENABLE([xattr], [Disable Extended Attributes support (default: check)])) if test "x$enable_xattr" != "xno"; then - AC_CHECK_HEADERS([attr/xattr.h]) - AC_CHECK_HEADERS([sys/xattr.h sys/ea.h]) - AC_SEARCH_LIBS([setxattr], [attr]) - AC_CHECK_FUNCS([extattr_get_file extattr_list_file]) - AC_CHECK_FUNCS([extattr_set_fd extattr_set_file]) - AC_CHECK_FUNCS([fgetxattr flistxattr fsetxattr getxattr]) - AC_CHECK_FUNCS([lgetxattr listxattr llistxattr lsetxattr]) - AC_CHECK_FUNCS([fgetea flistea fsetea getea]) - AC_CHECK_FUNCS([lgetea listea llistea lsetea]) - AC_CHECK_DECLS([EXTATTR_NAMESPACE_USER], [], [], [#include + AC_SEARCH_LIBS([setxattr], [attr]) + AC_CHECK_DECLS([EXTATTR_NAMESPACE_USER], [], [], [#include +#include +]) + AC_CHECK_DECLS([XATTR_NOFOLLOW], [], [], [#include +]) + if test "x$ac_cv_header_sys_xattr_h" = "xyes" \ + -a "x$ac_cv_have_decl_XATTR_NOFOLLOW" = "xyes"; then + # Darwin extended attributes support + AC_CACHE_VAL([ac_cv_archive_xattr_darwin], + [AC_CHECK_FUNCS(fgetxattr \ + flistxattr \ + fsetxattr \ + getxattr \ + listxattr \ + setxattr, + [ac_cv_archive_xattr_darwin=yes], + [ac_cv_archive_xattr_darwin=no], + [#include +]) + ] + ) + elif test "x$ac_cv_header_sys_extattr_h" = "xyes" \ + -a "x$ac_cv_have_decl_EXTATTR_NAMESPACE_USER" = "xyes"; then + # FreeBSD extended attributes support + AC_CACHE_VAL([ac_cv_archive_xattr_freebsd], + [AC_CHECK_FUNCS(extattr_get_fd \ + extattr_get_file \ + extattr_get_link \ + extattr_list_fd \ + extattr_list_file \ + extattr_list_link \ + extattr_set_fd \ + extattr_set_link, + [ac_cv_archive_xattr_freebsd=yes], + [ac_cv_archive_xattr_freebsd=no], + [#include #include ]) + ] + ) + elif test "x$ac_cv_header_sys_xattr_h" = "xyes" \ + -o "x$ac_cv_header_attr_xattr_h" = "xyes"; then + # Linux extended attributes support + AC_CACHE_VAL([ac_cv_archive_xattr_linux], + [AC_CHECK_FUNCS(fgetxattr \ + flistxattr \ + fsetxattr \ + getxattr \ + lgetxattr \ + listxattr \ + llistxattr \ + lsetxattr, + [ac_cv_archive_xattr_linux=yes], + [ac_cv_archive_xattr_linux=no], + [#if HAVE_SYS_TYPES_H +#include +#endif +#if HAVE_SYS_XATTR_H +#include +#endif +#if HAVE_ATTR_XATTR_H +#include +#endif +]) + ] + ) + elif test "x$ac_cv_header_sys_ea_h" = "xyes"; then + # AIX extended attributes support + AC_CACHE_VAL([ac_cv_archive_xattr_aix], + [AC_CHECK_FUNCS(fgetea \ + flistea \ + fsetea \ + getea \ + lgetea \ + listea \ + llistea \ + lsetea, + [ac_cv_archive_xattr_aix=yes], + [ac_cv_archive_xattr_aix=no], + [#include +]) + ] + ) + fi + + AC_MSG_CHECKING([for extended attributes support]) + if test "x$ac_cv_archive_xattr_linux" = "xyes"; then + AC_DEFINE([ARCHIVE_XATTR_LINUX], [1], [Linux xattr support]) + AC_MSG_RESULT([Linux]) + elif test "x$ac_cv_archive_xattr_darwin" = "xyes"; then + AC_DEFINE([ARCHIVE_XATTR_DARWIN], [1], [Darwin xattr support]) + AC_MSG_RESULT([Darwin]) + elif test "x$ac_cv_archive_xattr_freebsd" = "xyes"; then + AC_DEFINE([ARCHIVE_XATTR_FREEBSD], [1], [FreeBSD xattr support]) + AC_MSG_RESULT([FreeBSD]) + elif test "x$ac_cv_archive_xattr_aix" = "xyes"; then + AC_DEFINE([ARCHIVE_XATTR_AIX], [1], [AIX xattr support]) + AC_MSG_RESULT([AIX]) + else + AC_MSG_RESULT([none]) + fi fi # Check for ACL support @@ -697,65 +798,212 @@ AC_ARG_ENABLE([acl], [Disable ACL support (default: check)])) 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_get_fd_np]) - AC_CHECK_FUNCS([acl_init acl_set_fd acl_set_fd_np acl_set_file]) + # Libacl + AC_CHECK_LIB([acl], [acl_get_file]) + + AC_CHECK_TYPES([acl_t, acl_entry_t, acl_permset_t, acl_tag_t], [], [], [ + #if HAVE_SYS_TYPES_H + #include + #endif + #if HAVE_SYS_ACL_H + #include + #endif + ]) + + AC_CHECK_LIB([richacl], [richacl_get_file]) + + AC_CHECK_TYPES([[struct richace], [struct richacl]], [], [], [ + #if HAVE_SYS_RICHACL_H + #include + #endif + ]) - AC_CHECK_TYPES(acl_permset_t,,, - [#if HAVE_SYS_TYPES_H - #include - #endif - #if HAVE_SYS_ACL_H - #include - #endif - ]) + # Solaris and derivates ACLs + AC_CHECK_FUNCS(acl facl) - # The "acl_get_perm()" function was omitted from the POSIX draft. - # (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. - AC_CHECK_FUNCS(acl_get_perm_np acl_get_perm acl_get_link acl_get_link_np,,, - [#if HAVE_SYS_TYPES_H - #include - #endif - #if HAVE_SYS_ACL_H - #include - #endif - ]) + if test "x$ac_cv_lib_richacl_richacl_get_file" = "xyes" \ + -a "x$ac_cv_type_struct_richace" = "xyes" \ + -a "x$ac_cv_type_struct_richacl" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_librichacl], + [AC_CHECK_FUNCS(richacl_alloc \ + richacl_equiv_mode \ + richacl_free \ + richacl_get_fd \ + richacl_get_file \ + richacl_set_fd \ + richacl_set_file, + [ac_cv_archive_acl_librichacl=yes], [ac_cv_archive_acl_librichacl=no], [#include ])]) + fi - # Check for acl_is_trivial_np on FreeBSD - AC_CHECK_FUNCS(acl_is_trivial_np,,, - [#if HAVE_SYS_TYPES_H - #include - #endif - #if HAVE_SYS_ACL_H - #include - #endif + if test "x$ac_cv_func_acl" = "xyes" \ + -a "x$ac_cv_func_facl" = "xyes"; then + AC_CHECK_TYPES([aclent_t], [], [], [[#include ]]) + if test "x$ac_cv_type_aclent_t" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_sunos], + [AC_CHECK_DECLS([GETACL, SETACL, GETACLCNT], + [ac_cv_archive_acl_sunos=yes], [ac_cv_archive_acl_sunos=no], + [#include ])]) + AC_CHECK_TYPES([ace_t], [], [], [[#include ]]) + if test "x$ac_cv_type_ace_t" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_sunos_nfs4], + [AC_CHECK_DECLS([ACE_GETACL, ACE_SETACL, ACE_GETACLCNT], + [ac_cv_archive_acl_sunos_nfs4=yes], + [ac_cv_archive_acl_sonos_nfs4=no], + [#include ])]) + fi + fi + elif test "x$ac_cv_type_acl_t" = "xyes" \ + -a "x$ac_cv_type_acl_entry_t" = "xyes" \ + -a "x$ac_cv_type_acl_permset_t" = "xyes" \ + -a "x$ac_cv_type_acl_tag_t" = "xyes"; then + # POSIX.1e ACL functions + AC_CACHE_VAL([ac_cv_posix_acl_funcs], + [AC_CHECK_FUNCS(acl_add_perm \ + acl_clear_perms \ + acl_create_entry \ + acl_delete_def_file \ + acl_free \ + acl_get_entry \ + acl_get_fd \ + acl_get_file \ + acl_get_permset \ + acl_get_qualifier \ + acl_get_tag_type \ + acl_init \ + acl_set_fd \ + acl_set_file \ + acl_set_qualifier \ + acl_set_tag_type, + [ac_cv_posix_acl_funcs=yes], [ac_cv_posix_acl_funcs=no], + [#if HAVE_SYS_TYPES_H + #include + #endif + #if HAVE_SYS_ACL_H + #include + #endif + ]) ]) - # FreeBSD and POSIX - # MacOS has no ACL_USER in acl.h - AC_CHECK_DECLS([ACL_TYPE_NFS4, ACL_USER], - [], [], - [#include - #include ]) - - # MacOS ACL support - AC_CHECK_DECLS([ACL_TYPE_EXTENDED, ACL_SYNCHRONIZE], [], [], - [#include - #include ]) + AC_CHECK_FUNCS(acl_get_perm) - # Solaris and derivates ACLs - AC_CHECK_TYPES([aclent_t], [], [], [[#include ]]) - AC_CHECK_TYPES([ace_t], [], [], [[#include ]]) - AC_CHECK_FUNCS(acl facl) - AC_CHECK_DECLS([GETACL, SETACL, GETACLCNT, ACE_GETACL, ACE_SETACL, ACE_GETACLCNT], [], [], [#include ]) + if test "x$ac_cv_posix_acl_funcs" = "xyes" \ + -a "x$ac_cv_header_acl_libacl_h" = "xyes" \ + -a "x$ac_cv_lib_acl_acl_get_file" = "xyes" \ + -a "x$ac_cv_func_acl_get_perm"; then + AC_CACHE_VAL([ac_cv_archive_acl_libacl], + [ac_cv_archive_acl_libacl=yes]) + AC_DEFINE([ARCHIVE_ACL_LIBACL], [1], + [POSIX.1e ACL support via libacl]) + else + # FreeBSD/Darwin + AC_CHECK_FUNCS(acl_add_flag_np \ + acl_clear_flags_np \ + acl_get_brand_np \ + acl_get_entry_type_np \ + acl_get_flag_np \ + acl_get_flagset_np \ + acl_get_fd_np \ + acl_get_link_np \ + acl_get_perm_np \ + acl_is_trivial_np \ + acl_set_entry_type_np \ + acl_set_fd_np \ + acl_set_link_np,,, + [#include + #include ]) + + AC_CHECK_FUNCS(mbr_uid_to_uuid \ + mbr_uuid_to_id \ + mbr_gid_to_uuid,,, + [#include ]) + + AC_CHECK_DECLS([ACL_TYPE_EXTENDED, ACL_TYPE_NFS4, ACL_USER, + ACL_SYNCHRONIZE], [], [], + [#include + #include ]) + if test "x$ac_cv_posix_acl_funcs" = "xyes" \ + -a "x$ac_cv_func_acl_get_fd_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_perm" != "xyes" \ + -a "x$ac_cv_func_acl_get_perm_np" = "xyes" \ + -a "x$ac_cv_func_acl_set_fd_np" = "xyes"; then + if test "x$ac_cv_have_decl_ACL_USER" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_freebsd], + [ac_cv_archive_acl_freebsd=yes]) + if test "x$ac_cv_have_decl_ACL_TYPE_NFS4" = "xyes" \ + -a "x$ac_cv_func_acl_add_flag_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_brand_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_entry_type_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_flagset_np" = "xyes" \ + -a "x$ac_cv_func_acl_set_entry_type_np" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_freebsd_nfs4], + [ac_cv_archive_acl_freebsd_nfs4=yes]) + fi + elif test "x$ac_cv_have_decl_ACL_TYPE_EXTENDED" = "xyes" \ + -a "x$ac_cv_func_acl_add_flag_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_flagset_np" = "xyes" \ + -a "x$ac_cv_func_acl_get_link_np" = "xyes" \ + -a "x$ac_cv_func_acl_set_link_np" = "xyes" \ + -a "x$ac_cv_func_mbr_uid_to_uuid" = "xyes" \ + -a "x$ac_cv_func_mbr_uuid_to_id" = "xyes" \ + -a "x$ac_cv_func_mbr_gid_to_uuid" = "xyes"; then + AC_CACHE_VAL([ac_cv_archive_acl_darwin], + [ac_cv_archive_acl_darwin=yes]) + fi + fi + fi + fi + AC_MSG_CHECKING([for ACL support]) + if test "x$ac_cv_archive_acl_libacl" = "xyes" \ + -a "x$ac_cv_archive_acl_librichacl" = "xyes"; then + AC_MSG_RESULT([libacl (POSIX.1e) + librichacl (NFSv4)]) + AC_DEFINE([ARCHIVE_ACL_LIBACL], [1], + [Linux POSIX.1e ACL support via libacl]) + AC_DEFINE([ARCHIVE_ACL_LIBRICHACL], [1], + [Linux NFSv4 ACL support via librichacl]) + elif test "x$ac_cv_archive_acl_libacl" = "xyes"; then + AC_MSG_RESULT([libacl (POSIX.1e)]) + AC_DEFINE([ARCHIVE_ACL_LIBACL], [1], + [Linux POSIX.1e ACL support via libacl]) + elif test "x$ac_cv_archive_acl_librichacl" = "xyes"; then + AC_MSG_RESULT([librichacl (NFSv4)]) + AC_DEFINE([ARCHIVE_ACL_LIBRICHACL], [1], + [Linux NFSv4 ACL support via librichacl]) + elif test "x$ac_cv_archive_acl_darwin" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_DARWIN], [1], [Darwin ACL support]) + AC_MSG_RESULT([Darwin (limited NFSv4)]) + elif test "x$ac_cv_archive_acl_sunos" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_SUNOS], [1], [Solaris ACL support]) + if test "x$ac_cv_archive_acl_sunos_nfs4" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_SUNOS_NFS4], [1], + [Solaris NFSv4 ACL support]) + AC_MSG_RESULT([Solaris (POSIX.1e and NFSv4)]) + else + AC_MSG_RESULT([Solaris (POSIX.1e)]) + fi + elif test "x$ac_cv_archive_acl_freebsd" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_FREEBSD], [1], [FreeBSD ACL support]) + if test "x$ac_cv_archive_acl_freebsd_nfs4" = "xyes"; then + AC_DEFINE([ARCHIVE_ACL_FREEBSD_NFS4], [1], + [FreeBSD NFSv4 ACL support]) + AC_MSG_RESULT([FreeBSD (POSIX.1e and NFSv4)]) + else + AC_MSG_RESULT([FreeBSD (POSIX.1e)]) + fi + else + AC_MSG_RESULT([none]) + fi fi + +AM_CONDITIONAL([INC_LINUX_ACL], + [test "x$ac_cv_archive_acl_libacl" = "xyes" \ + -o "x$ac_cv_archive_acl_librichacl" = "xyes"]) +AM_CONDITIONAL([INC_SUNOS_ACL], [test "x$ac_cv_archive_acl_sunos" = "xyes"]) +AM_CONDITIONAL([INC_DARWIN_ACL], + [test "x$ac_cv_archive_acl_darwin" = "xyes"]) +AM_CONDITIONAL([INC_FREEBSD_ACL], + [test "x$ac_cv_archive_acl_freebsd" = "xyes"]) + # Additional requirements AC_SYS_LARGEFILE @@ -844,6 +1092,16 @@ case "$host_os" in ;; esac +if test "x$with_cng" != "xno"; then + AC_CHECK_HEADERS([bcrypt.h],[ + LIBS="$LIBS -lbcrypt" + ],[], + [[#ifdef HAVE_WINDOWS_H + # include + #endif + ]]) +fi + if test "x$with_nettle" != "xno"; then AC_CHECK_HEADERS([nettle/md5.h nettle/ripemd160.h nettle/sha.h]) AC_CHECK_HEADERS([nettle/pbkdf2.h nettle/aes.h nettle/hmac.h]) diff --git a/archivers/libarchive/files/contrib/libarchive.1aix53.spec b/archivers/libarchive/files/contrib/libarchive.1aix53.spec index 19166cdb3df..9dc4a1ac6da 100644 --- a/archivers/libarchive/files/contrib/libarchive.1aix53.spec +++ b/archivers/libarchive/files/contrib/libarchive.1aix53.spec @@ -127,8 +127,8 @@ rm -fr %buildroot All persons listed below can be reached at @pld-linux.org $Log: libarchive.1aix53.spec,v $ -Revision 1.8 2017/02/25 21:11:19 joerg -Merge libarchive-3.3.1. +Revision 1.9 2017/08/01 22:26:22 joerg +Merge for libarchive-3.3.2. Release 1aix53 2006/12/12 rm1023@dcx.com - tweak for aix-5.3 diff --git a/archivers/libarchive/files/cpio/cpio.c b/archivers/libarchive/files/cpio/cpio.c index 6c20ee68322..5beedd0d16b 100644 --- a/archivers/libarchive/files/cpio/cpio.c +++ b/archivers/libarchive/files/cpio/cpio.c @@ -108,22 +108,22 @@ static int entry_to_archive(struct cpio *, struct archive_entry *); static int file_to_archive(struct cpio *, const char *); static void free_cache(struct name_cache *cache); static void list_item_verbose(struct cpio *, struct archive_entry *); -static void long_help(void); +static void long_help(void) __LA_DEAD; static const char *lookup_gname(struct cpio *, gid_t gid); static int lookup_gname_helper(struct cpio *, const char **name, id_t gid); static const char *lookup_uname(struct cpio *, uid_t uid); static int lookup_uname_helper(struct cpio *, const char **name, id_t uid); -static void mode_in(struct cpio *); -static void mode_list(struct cpio *); +static void mode_in(struct cpio *) __LA_DEAD; +static void mode_list(struct cpio *) __LA_DEAD; static void mode_out(struct cpio *); static void mode_pass(struct cpio *, const char *); static const char *remove_leading_slash(const char *); static int restore_time(struct cpio *, struct archive_entry *, const char *, int fd); -static void usage(void); -static void version(void); +static void usage(void) __LA_DEAD; +static void version(void) __LA_DEAD; static const char * passphrase_callback(struct archive *, void *); static void passphrase_free(char *); @@ -628,6 +628,7 @@ mode_out(struct cpio *cpio) blocks == 1 ? "block" : "blocks"); } archive_write_free(cpio->archive); + archive_entry_linkresolver_free(cpio->linkresolver); } static const char * @@ -1194,12 +1195,15 @@ mode_pass(struct cpio *cpio, const char *destdir) struct lafe_line_reader *lr; const char *p; int r; + size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - cpio->destdir = malloc(strlen(destdir) + 8); - strcpy(cpio->destdir, destdir); - if (destdir[strlen(destdir) - 1] != '/') - strcat(cpio->destdir, "/"); + destdir_len = strlen(destdir); + cpio->destdir = malloc(destdir_len + 8); + memcpy(cpio->destdir, destdir, destdir_len); + if (destdir_len == 0 || destdir[destdir_len - 1] != '/') + cpio->destdir[destdir_len++] = '/'; + cpio->destdir[destdir_len++] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) @@ -1240,6 +1244,7 @@ mode_pass(struct cpio *cpio, const char *destdir) } archive_write_free(cpio->archive); + free(cpio->pass_destpath); } /* @@ -1344,23 +1349,23 @@ lookup_name(struct cpio *cpio, struct name_cache **name_cache_variable, cache->cache[slot].name = NULL; } - if (lookup_fn(cpio, &name, id) == 0) { - if (name == NULL || name[0] == '\0') { - /* If lookup failed, format it as a number. */ - snprintf(asnum, sizeof(asnum), "%u", (unsigned)id); - name = asnum; - } - cache->cache[slot].name = strdup(name); - if (cache->cache[slot].name != NULL) { - cache->cache[slot].id = id; - return (cache->cache[slot].name); - } - /* - * Conveniently, NULL marks an empty slot, so - * if the strdup() fails, we've just failed to - * cache it. No recovery necessary. - */ + if (lookup_fn(cpio, &name, id)) { + /* If lookup failed, format it as a number. */ + snprintf(asnum, sizeof(asnum), "%u", (unsigned)id); + name = asnum; } + + cache->cache[slot].name = strdup(name); + if (cache->cache[slot].name != NULL) { + cache->cache[slot].id = id; + return (cache->cache[slot].name); + } + + /* + * Conveniently, NULL marks an empty slot, so + * if the strdup() fails, we've just failed to + * cache it. No recovery necessary. + */ return (NULL); } @@ -1381,15 +1386,14 @@ lookup_uname_helper(struct cpio *cpio, const char **name, id_t id) errno = 0; pwent = getpwuid((uid_t)id); if (pwent == NULL) { - *name = NULL; - if (errno != 0 && errno != ENOENT) + if (errno && errno != ENOENT) lafe_warnc(errno, "getpwuid(%s) failed", cpio_i64toa((int64_t)id)); - return (errno); + return 1; } *name = pwent->pw_name; - return (0); + return 0; } static const char * @@ -1409,15 +1413,14 @@ lookup_gname_helper(struct cpio *cpio, const char **name, id_t id) errno = 0; grent = getgrgid((gid_t)id); if (grent == NULL) { - *name = NULL; - if (errno != 0) + if (errno && errno != ENOENT) lafe_warnc(errno, "getgrgid(%s) failed", cpio_i64toa((int64_t)id)); - return (errno); + return 1; } *name = grent->gr_name; - return (0); + return 0; } /* diff --git a/archivers/libarchive/files/cpio/test/CMakeLists.txt b/archivers/libarchive/files/cpio/test/CMakeLists.txt index ec9509be98f..4c3fb88a61f 100644 --- a/archivers/libarchive/files/cpio/test/CMakeLists.txt +++ b/archivers/libarchive/files/cpio/test/CMakeLists.txt @@ -62,6 +62,16 @@ IF(ENABLE_CPIO AND ENABLE_TEST) # Register target # ADD_EXECUTABLE(bsdcpio_test ${bsdcpio_test_SOURCES}) + IF(ENABLE_ACL) + SET(TEST_ACL_LIBS "") + IF(HAVE_LIBACL) + LIST(APPEND TEST_ACL_LIBS ${ACL_LIBRARY}) + ENDIF(HAVE_LIBACL) + IF(HAVE_LIBRICHACL) + LIST(APPEND TEST_ACL_LIBS ${RICHACL_LIBRARY}) + ENDIF(HAVE_LIBRICHACL) + TARGET_LINK_LIBRARIES(bsdcpio_test ${TEST_ACL_LIBS}) + ENDIF(ENABLE_ACL) SET_PROPERTY(TARGET bsdcpio_test PROPERTY COMPILE_DEFINITIONS LIST_H) # diff --git a/archivers/libarchive/files/cpio/test/test_option_a.c b/archivers/libarchive/files/cpio/test/test_option_a.c index 606de606e2c..296387777cc 100644 --- a/archivers/libarchive/files/cpio/test/test_option_a.c +++ b/archivers/libarchive/files/cpio/test/test_option_a.c @@ -96,7 +96,8 @@ DEFINE_TEST(test_option_a) test_create(); /* Sanity check; verify that atimes really do get modified. */ - assert((p = slurpfile(NULL, "f0")) != NULL); + p = slurpfile(NULL, "f0"); + assert(p != NULL); free(p); assertEqualInt(0, stat("f0", &st)); if (st.st_atime == files[0].atime_sec) { diff --git a/archivers/libarchive/files/cpio/test/test_option_y.c b/archivers/libarchive/files/cpio/test/test_option_y.c index 0397b3d1bf4..989b5f1aaf6 100644 --- a/archivers/libarchive/files/cpio/test/test_option_y.c +++ b/archivers/libarchive/files/cpio/test/test_option_y.c @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_y) r = systemf("echo f | %s -oy >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canBzip2()) { skipping("bzip2 is not supported on this platform"); @@ -46,14 +46,12 @@ DEFINE_TEST(test_option_y) } failure("-y option is broken"); assertEqualInt(r, 0); - goto done; + return; } 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); } diff --git a/archivers/libarchive/files/cpio/test/test_option_z.c b/archivers/libarchive/files/cpio/test/test_option_z.c index 0b68a42babb..803232d045c 100644 --- a/archivers/libarchive/files/cpio/test/test_option_z.c +++ b/archivers/libarchive/files/cpio/test/test_option_z.c @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_z) r = systemf("echo f | %s -oz >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canGzip()) { skipping("gzip is not supported on this platform"); @@ -52,4 +52,5 @@ DEFINE_TEST(test_option_z) p = slurpfile(&s, "archive.out"); assert(s > 4); assertEqualMem(p, "\x1f\x8b\x08\x00", 4); + free(p); } diff --git a/archivers/libarchive/files/doc/html/Makefile b/archivers/libarchive/files/doc/html/Makefile index c3da36a9d67..e045e7c3ffa 100644 --- a/archivers/libarchive/files/doc/html/Makefile +++ b/archivers/libarchive/files/doc/html/Makefile @@ -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-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 +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 diff --git a/archivers/libarchive/files/doc/html/archive_entry.3.html b/archivers/libarchive/files/doc/html/archive_entry.3.html index fc75a82e5c6..00dd4d7fa8f 100644 --- a/archivers/libarchive/files/doc/html/archive_entry.3.html +++ b/archivers/libarchive/files/doc/html/archive_entry.3.html @@ -1,5 +1,5 @@ - + @@ -181,7 +181,7 @@ first appeared in FreeBSD 5.3.

was written by Tim Kientzle <kientzle@acm.org>.

BSD -Feburary 2, 2012 BSD

+February 2, 2012 BSD


diff --git a/archivers/libarchive/files/doc/html/archive_entry_acl.3.html b/archivers/libarchive/files/doc/html/archive_entry_acl.3.html index 7e76efb9bb8..0765da06e49 100644 --- a/archivers/libarchive/files/doc/html/archive_entry_acl.3.html +++ b/archivers/libarchive/files/doc/html/archive_entry_acl.3.html @@ -1,5 +1,5 @@ - + @@ -31,8 +31,9 @@ ARCHIVE_ENTRY_ACL(3)

archive_entry_acl_clear, archive_entry_acl_count, archive_entry_acl_from_text, -archive_entry_acl_from_text_w, -archive_entry_acl_next, archive_entry_acl_next_w, +archive_entry_acl_from_text_w, +archive_entry_acl_next, +archive_entry_acl_next_w, archive_entry_acl_reset, archive_entry_acl_to_text, archive_entry_acl_to_text_w, @@ -136,7 +137,7 @@ descriptions

DESCRIPTION

-

The ‘‘Access Control +

The ’’Access Control Lists (ACLs)’’ extend the standard Unix perssion model. The ACL interface of libarchive supports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by @@ -377,7 +378,7 @@ Only first-level entries inherit ACLs.

ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (S)

Trigger alarm or audit on -succesful access.

+successful access.

ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (F)

@@ -394,8 +395,8 @@ inherited.

archive_entry_acl_add_entry() and archive_entry_acl_add_entry_w() add a single ACL entry. For the access ACL and non-extended principals, the -classic Unix permissions are updated. An archive enry cannot -contain both POSIX.1e and NFSv4 ACL entries.

+classic Unix permissions are updated. An archive entry +cannot contain both POSIX.1e and NFSv4 ACL entries.

archive_entry_acl_clear() @@ -421,7 +422,7 @@ ARCHIVE_ENTRY_ACL_TYPE_ALARM

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.

+three non-extended ACLs are added.

archive_entry_acl_from_text() @@ -439,11 +440,11 @@ formats that can be created with archive_entry_acl_to_text_w(). Existing ACL entries are preserved. To get a clean new ACL from text archive_entry_acl_clear() must be called first. -Entries prefixed with ‘‘default:’’ +Entries prefixed with ’’default:’’ are treated as ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless type is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable ACL entries and entries beginning with the -‘#’ character (comments) are skipped.

+’#’ character (comments) are skipped.

archive_entry_acl_next() @@ -467,11 +468,11 @@ function returns the same value as

archive_entry_acl_to_text() and archive_entry_acl_to_text_w() convert the ACL entries for the given type into a (wide) string of ACL -entries separated by newline. If the the pointer -len_p is not NULL, then the function shall return the -length of the string (not including the NULL terminator) in -the location pointed to by len_p. The flag -argument is a bitwise-or.

+entries separated by newline. If the pointer len_p is +not NULL, then the function shall return the length of the +string (not including the NULL terminator) in the location +pointed to by len_p. The flag argument is a +bitwise-or.

The following flags are effective only on POSIX.1e ACL:

@@ -488,7 +489,7 @@ ACLs.

ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT

Prefix each default ACL entry -with the word ‘‘default:’’.

+with the word ’’default:’’.

ARCHIVE_ENTRY_ACL_STYLE_SOLARIS

@@ -523,7 +524,7 @@ returned. It the entry contains POSIX.1e ACLs and none of the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are specified, both access and default entries are returned and default entries are -prefixed with ‘‘default:’’.

+prefixed with ’’default:’’.

archive_entry_acl_types() diff --git a/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html b/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html index d0a995565c4..7dfb3571707 100644 --- a/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html +++ b/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_entry_paths.3.html b/archivers/libarchive/files/doc/html/archive_entry_paths.3.html index a431c708074..7554dfa8704 100644 --- a/archivers/libarchive/files/doc/html/archive_entry_paths.3.html +++ b/archivers/libarchive/files/doc/html/archive_entry_paths.3.html @@ -1,5 +1,5 @@ - + @@ -30,24 +30,25 @@ ARCHIVE_ENTRY_PATHS(3)

archive_entry_set_hardlink, archive_entry_copy_hardlink, archive_entry_copy_hardlink_w, -archve_entry_update_hardlink_utf8, +archive_entry_update_hardlink_utf8, archive_entry_set_link, archive_entry_copy_link, archive_entry_copy_link_w, -archve_entry_update_link_utf8, +archive_entry_update_link_utf8, archive_entry_pathname, archive_entry_pathname_w, archive_entry_set_pathname, archive_entry_copy_pathname, archive_entry_copy_pathname_w, -archve_entry_update_pathname_utf8, +archive_entry_update_pathname_utf8, archive_entry_sourcepath, archive_entry_copy_sourcepath, -archive_entry_symlink, archive_entry_symlink_w, -archive_entry_set_symlink, +archive_entry_symlink, +archive_entry_symlink_w, +archive_entry_set_symlink, archive_entry_copy_symlink, archive_entry_copy_symlink_w, -archve_entry_update_symlink_utf8 — functions +archive_entry_update_symlink_utf8 — functions for manipulating path names in archive entry descriptions

diff --git a/archivers/libarchive/files/doc/html/archive_entry_perms.3.html b/archivers/libarchive/files/doc/html/archive_entry_perms.3.html index ba8ed77282a..b7d09b82cb0 100644 --- a/archivers/libarchive/files/doc/html/archive_entry_perms.3.html +++ b/archivers/libarchive/files/doc/html/archive_entry_perms.3.html @@ -1,5 +1,5 @@ - + @@ -29,8 +29,8 @@ ARCHIVE_ENTRY_PERMS(3)

archive_entry_set_gid, archive_entry_uid, archive_entry_set_uid, archive_entry_perm, archive_entry_set_perm, archive_entry_strmode, -archive_entry_uname archive_entry_uname_w -archive_entry_set_uname, +archive_entry_uname, archive_entry_uname_w, +archive_entry_set_uname, archive_entry_copy_uname, archive_entry_copy_uname_w, archive_entry_update_uname_utf8, diff --git a/archivers/libarchive/files/doc/html/archive_entry_stat.3.html b/archivers/libarchive/files/doc/html/archive_entry_stat.3.html index 9716c124f18..462b4cc95da 100644 --- a/archivers/libarchive/files/doc/html/archive_entry_stat.3.html +++ b/archivers/libarchive/files/doc/html/archive_entry_stat.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_entry_time.3.html b/archivers/libarchive/files/doc/html/archive_entry_time.3.html index bac2cb886d8..a7529e47682 100644 --- a/archivers/libarchive/files/doc/html/archive_entry_time.3.html +++ b/archivers/libarchive/files/doc/html/archive_entry_time.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_read.3.html b/archivers/libarchive/files/doc/html/archive_read.3.html index a9b3759131d..c527e6ed48c 100644 --- a/archivers/libarchive/files/doc/html/archive_read.3.html +++ b/archivers/libarchive/files/doc/html/archive_read.3.html @@ -1,5 +1,5 @@ - + @@ -224,7 +224,7 @@ example, many implementations of tar(1) allow you to append entries to an empty file. Of course, it is impossible to determine the format of an empty file by inspecting the contents, so this library treats empty files as having a -special ‘‘empty’’ format.

+special ’’empty’’ format.

BSD February 2, 2012 BSD

diff --git a/archivers/libarchive/files/doc/html/archive_read_data.3.html b/archivers/libarchive/files/doc/html/archive_read_data.3.html index e6b52850bf8..897e7620a9d 100644 --- a/archivers/libarchive/files/doc/html/archive_read_data.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_data.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_read_disk.3.html b/archivers/libarchive/files/doc/html/archive_read_disk.3.html index db78662d4d6..03cd69c36c5 100644 --- a/archivers/libarchive/files/doc/html/archive_read_disk.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_disk.3.html @@ -1,5 +1,5 @@ - + @@ -26,6 +26,7 @@ ARCHIVE_READ_DISK(3)

NAME

archive_read_disk_new, +archive_read_disk_set_behavior, archive_read_disk_set_symlink_logical, archive_read_disk_set_symlink_physical, archive_read_disk_set_symlink_hybrid, @@ -34,10 +35,8 @@ ARCHIVE_READ_DISK(3)

archive_read_disk_uname, archive_read_disk_set_uname_lookup, archive_read_disk_set_gname_lookup, -archive_read_disk_set_standard_lookup, -archive_read_close, archive_read_finish, -archive_read_free — functions for reading -objects from disk

+archive_read_disk_set_standard_lookup — +functions for reading objects from disk

LIBRARY

@@ -58,6 +57,12 @@ archive *

int

+

archive_read_disk_set_behavior(struct archive *, +int);

+ +

int

+ +

archive_read_disk_set_symlink_logical(struct archive *);

int

@@ -112,21 +117,6 @@ archive *

struct archive_entry *, int fd, const struct stat *);

-

int

- - -

archive_read_close(struct archive *);

- -

int

- - -

archive_read_finish(struct archive *);

- -

int

- - -

archive_read_free(struct archive *);

-

DESCRIPTION

These functions provide an API @@ -142,17 +132,68 @@ struct archive object suitable for reading object information from disk.

+

archive_read_disk_set_behavior()

+ +

Configures various behavior +options when reading entries from disk. The flags field +consists of a bitwise OR of one or more of the following +values:

+ +

ARCHIVE_READDISK_HONOR_NODUMP

+ +

Skip files and directories with +the nodump file attribute (file flag) set. By default, the +nodump file atrribute is ignored.

+ +

ARCHIVE_READDISK_MAC_COPYFILE

+ +

Mac OS X specific. Read +metadata (ACLs and extended attributes) with copyfile(3). By +default, metadata is read using copyfile(3).

+ +

ARCHIVE_READDISK_NO_ACL

+ +

Do not read Access Control +Lists. By default, ACLs are read from disk.

+ +

ARCHIVE_READDISK_NO_FFLAGS

+ +

Do not read file attributes +(file flags). By default, file attributes are read from +disk. See chattr(1) (Linux) or chflags(1) (FreeBSD, Mac OS +X) for more information on file attributes.

+ +

ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS

+ +

Do not traverse mount points. +By defaut, moint points are traversed.

+ +

ARCHIVE_READDISK_NO_XATTR

+ +

Do not read extended file +attributes (xattrs). By default, extended file attributes +are read from disk. See xattr(7) (Linux), xattr(2) (Mac OS +X), or getextattr(8) (FreeBSD) for more information on +extended file attributes.

+ +

ARCHIVE_READDISK_RESTORE_ATIME

+ +

Restore access time of +traversed files. By default, access time of traversed files +is not restored.

+ +

archive_read_disk_set_symlink_logical(), archive_read_disk_set_symlink_physical(), archive_read_disk_set_symlink_hybrid()

This sets the mode used for handling symbolic links. The -‘‘logical’’ mode follows all -symbolic links. The ‘‘physical’’ +’’logical’’ mode follows all +symbolic links. The ’’physical’’ mode does not follow any symbolic links. The -‘‘hybrid’’ mode currently behaves -identically to the ‘‘logical’’ +’’hybrid’’ mode currently behaves +identically to the ’’logical’’ mode.

@@ -216,23 +257,6 @@ group names using the currently registered lookup functions above. This affects the file ownership fields and ACL values in the struct archive_entry object.

-

archive_read_close()

- -

Does nothing for -archive_read_disk handles.

- - -

archive_read_finish()

- -

This is a deprecated synonym -for archive_read_free().

- -

archive_read_free()

- -

Invokes -archive_read_close() if it was not invoked manually, -then releases all resources.

-

More information about the struct archive object and the overall design of the library can be found in the libarchive(3) overview.

@@ -325,7 +349,7 @@ was written by Tim Kientzle

BUGS

The -‘‘standard’’ user name and group +’’standard’’ user name and group name lookup functions are not the defaults because getgrgid(3) and getpwuid(3) are sometimes too large for particular applications. The current design allows the @@ -348,11 +372,11 @@ such information.

provide a set of methods for walking a directory tree. That would make it a direct parallel of the archive_read(3) API. When such methods are implemented, the -‘‘hybrid’’ symbolic link mode will +’’hybrid’’ symbolic link mode will make sense.

BSD -December 30, 2016 BSD

+April 3, 2017 BSD


diff --git a/archivers/libarchive/files/doc/html/archive_read_extract.3.html b/archivers/libarchive/files/doc/html/archive_read_extract.3.html index 5c618986917..f9f424f0086 100644 --- a/archivers/libarchive/files/doc/html/archive_read_extract.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_extract.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_read_filter.3.html b/archivers/libarchive/files/doc/html/archive_read_filter.3.html index 837b2083190..47fb7892fea 100644 --- a/archivers/libarchive/files/doc/html/archive_read_filter.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_filter.3.html @@ -1,5 +1,5 @@ - + @@ -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 -‘‘none’’ is always enabled by +’’none’’ is always enabled by default.

archive_read_support_filter_all()

diff --git a/archivers/libarchive/files/doc/html/archive_read_format.3.html b/archivers/libarchive/files/doc/html/archive_read_format.3.html index 31ac3e29b3a..d09ebaa67a8 100644 --- a/archivers/libarchive/files/doc/html/archive_read_format.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_format.3.html @@ -1,5 +1,5 @@ - + @@ -35,10 +35,10 @@ ARCHIVE_READ_FORMAT(3)

archive_read_support_format_empty, archive_read_support_format_iso9660, archive_read_support_format_lha, -archive_read_support_format_mtree, -archive_read_support_format_rar, -archive_read_support_format_raw, -archive_read_support_format_tar, +archive_read_support_format_mtree, +archive_read_support_format_rar, +archive_read_support_format_raw, +archive_read_support_format_tar, archive_read_support_format_xar, archive_read_support_format_zip — functions for reading streaming archives

@@ -153,7 +153,7 @@ variants.

archive_read_support_format_all()

Enables support for all -available formats except the ‘‘raw’’ +available formats except the ’’raw’’ format (see below).

archive_read_support_format_by_code()

@@ -180,10 +180,10 @@ distinct format.

archive_read_support_format_raw()

The -‘‘raw’’ format handler allows +’’raw’’ format handler allows libarchive to be used to read arbitrary data. It treats any data stream as an archive with a single entry. The pathname -of this entry is ‘‘data’’; all other +of this entry is ’’data’’; all other entry fields are unset. This is not enabled by archive_read_support_format_all() in order to avoid erroneous handling of damaged archives.

@@ -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 ‘‘empty’’ format.

+special ’’empty’’ format.

Using the -‘‘raw’’ handler together with any +’’raw’’ handler together with any other handler will often work but can produce surprising results.

diff --git a/archivers/libarchive/files/doc/html/archive_read_free.3.html b/archivers/libarchive/files/doc/html/archive_read_free.3.html index a7336df41b3..927f5f10139 100644 --- a/archivers/libarchive/files/doc/html/archive_read_free.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_free.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_read_header.3.html b/archivers/libarchive/files/doc/html/archive_read_header.3.html index 01aae30c87e..5da9acb25b9 100644 --- a/archivers/libarchive/files/doc/html/archive_read_header.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_header.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_read_new.3.html b/archivers/libarchive/files/doc/html/archive_read_new.3.html index 5c35255a44f..6f5dffa819f 100644 --- a/archivers/libarchive/files/doc/html/archive_read_new.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_new.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_read_open.3.html b/archivers/libarchive/files/doc/html/archive_read_open.3.html index 4e1c7b84f78..9f1c0e03545 100644 --- a/archivers/libarchive/files/doc/html/archive_read_open.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_open.3.html @@ -1,5 +1,5 @@ - + @@ -29,7 +29,7 @@ ARCHIVE_READ_OPEN(3)

archive_read_open2, archive_read_open_fd, archive_read_open_FILE, archive_read_open_filename, -archive_read_open_memory, — functions for +archive_read_open_memory — functions for reading streaming archives

LIBRARY

@@ -84,7 +84,8 @@ reading streaming archives

archive_read_open_memory(struct archive *, -void *buff, size_t size);

+const void *buff, +size_t size);

DESCRIPTION
archive_read_open
()

diff --git a/archivers/libarchive/files/doc/html/archive_read_set_options.3.html b/archivers/libarchive/files/doc/html/archive_read_set_options.3.html index 99049a113d0..8f17c374ab9 100644 --- a/archivers/libarchive/files/doc/html/archive_read_set_options.3.html +++ b/archivers/libarchive/files/doc/html/archive_read_set_options.3.html @@ -1,5 +1,5 @@ - + @@ -142,7 +142,7 @@ option with this name will ignore it.

The option will be provided to every module with a value of -‘‘1’’.

+’’1’’.

!option

diff --git a/archivers/libarchive/files/doc/html/archive_util.3.html b/archivers/libarchive/files/doc/html/archive_util.3.html index 30c0919cbe5..f1798303a67 100644 --- a/archivers/libarchive/files/doc/html/archive_util.3.html +++ b/archivers/libarchive/files/doc/html/archive_util.3.html @@ -1,5 +1,5 @@ - + @@ -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: ‘‘%c’’, -‘‘%d’’, -‘‘%jd’’, -‘‘%jo’’, -‘‘%ju’’, -‘‘%jx’’, -‘‘%ld’’, -‘‘%lo’’, -‘‘%lu’’, -‘‘%lx’’, -‘‘%o’’, -‘‘%u’’, -‘‘%s’’, -‘‘%x’’, -‘‘%%’’. Field-width specifiers and +printf format specifiers: ’’%c’’, +’’%d’’, +’’%jd’’, +’’%jo’’, +’’%ju’’, +’’%jx’’, +’’%ld’’, +’’%lo’’, +’’%lu’’, +’’%lx’’, +’’%o’’, +’’%u’’, +’’%s’’, +’’%x’’, +’’%%’’. Field-width specifiers and other printf features are not uniformly supported and should not be used.

diff --git a/archivers/libarchive/files/doc/html/archive_write.3.html b/archivers/libarchive/files/doc/html/archive_write.3.html index 7c89e153713..87dd69b8cab 100644 --- a/archivers/libarchive/files/doc/html/archive_write.3.html +++ b/archivers/libarchive/files/doc/html/archive_write.3.html @@ -1,5 +1,5 @@ - + @@ -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 -‘‘SCHILY.devminor’’ and -‘‘SCHILY.devmajor’’ for device +’’SCHILY.devminor’’ and +’’SCHILY.devmajor’’ for device numbers that exceed the range supported by the backwards-compatible ustar header. These keys are compatible with Joerg Schilling’s star archiver. Other diff --git a/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html b/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html index 7358c49d83e..399a405504c 100644 --- a/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html @@ -1,5 +1,5 @@ - + @@ -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 archive_write_open_filename() will set this based on the file type). Unlike the other -‘‘set’’ functions, this function can +’’set’’ functions, this function can be called after the archive is opened.

diff --git a/archivers/libarchive/files/doc/html/archive_write_data.3.html b/archivers/libarchive/files/doc/html/archive_write_data.3.html index deceae08bfe..96006a02c85 100644 --- a/archivers/libarchive/files/doc/html/archive_write_data.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_data.3.html @@ -1,5 +1,5 @@ - + @@ -25,8 +25,9 @@ ARCHIVE_WRITE_DATA(3)

NAME

-

archive_write_data -— functions for creating archives

+

archive_write_data, +archive_write_data_block — functions for +creating archives

LIBRARY

@@ -45,11 +46,33 @@ ARCHIVE_WRITE_DATA(3)

archive_write_data(struct archive *, const void *, size_t);

-

DESCRIPTION

-

Write data corresponding to the +

la_ssize_t

+ + +

archive_write_data_block(struct archive *, +const void *, size_t size, +int64_t offset);

+ +

DESCRIPTION
+archive_write_data
()

+ +

Write data corresponding to the header just written.

+ +

archive_write_data_block()

+ +

Write data corresponding to the +header just written. This is like +archive_write_data() except that it performs a seek +on the file being written to the specified offset before +writing the data. This is useful when restoring sparse files +from archive formats that support sparse files. Returns +number of bytes written or -1 on error. (Note: This is +currently not supported for archive_write handles, only for +archive_write_disk handles.

+

RETURN VALUES

This function returns the number @@ -78,7 +101,7 @@ archive_write_finish_entry(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5)

BSD -February 2, 2012 BSD

+February 28, 2017 BSD


diff --git a/archivers/libarchive/files/doc/html/archive_write_disk.3.html b/archivers/libarchive/files/doc/html/archive_write_disk.3.html index 2b909b008c2..c49997e3052 100644 --- a/archivers/libarchive/files/doc/html/archive_write_disk.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_disk.3.html @@ -1,5 +1,5 @@ - + @@ -30,13 +30,8 @@ ARCHIVE_WRITE_DISK(3)

archive_write_disk_set_skip_file, archive_write_disk_set_group_lookup, archive_write_disk_set_standard_lookup, -archive_write_disk_set_user_lookup, -archive_write_header, archive_write_data, -archive_write_data_block, -archive_write_finish_entry, -archive_write_close, archive_write_finish -archive_write_free — functions for creating -objects on disk

+archive_write_disk_set_user_lookup — functions +for creating objects on disk

LIBRARY

@@ -87,47 +82,6 @@ archive *

uid_t (*)(void *, const char *uname, uid_t uid), void (*cleanup)(void *));

-

int

- - -

archive_write_header(struct archive *, -struct archive_entry *);

- - -

la_ssize_t

- - -

archive_write_data(struct archive *, -const void *, size_t);

- - -

la_ssize_t

- - -

archive_write_data_block(struct archive *, -const void *, size_t size, -int64_t offset);

- -

int

- - -

archive_write_finish_entry(struct archive *);

- -

int

- - -

archive_write_close(struct archive *);

- -

int

- - -

archive_write_finish(struct archive *);

- -

int

- - -

archive_write_free(struct archive *);

-

DESCRIPTION

These functions provide a @@ -165,6 +119,38 @@ significant performance optimization in practice.

The options field consists of a bitwise OR of one or more of the following values:

+

ARCHIVE_EXTRACT_ACL

+ +

Attempt to restore Access +Control Lists. By default, extended ACLs are ignored.

+ +

ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS

+ +

Before removing a file system +object prior to replacing it, clear platform-specific file +flags which might prevent its removal.

+ +

ARCHIVE_EXTRACT_FFLAGS

+ +

Attempt to restore file +attributes (file flags). By default, file attributes are +ignored. See chattr(1) (Linux) or chflags(1) (FreeBSD, Mac +OS X) for more information on file attributes.

+ +

ARCHIVE_EXTRACT_MAC_METADATA

+ +

Mac OS X specific. Restore +metadata using copyfile(3). By default, copyfile(3) metadata +is ignored.

+ +

ARCHIVE_EXTRACT_NO_OVERWRITE

+ +

Existing files on disk will not +be overwritten. By default, existing regular files are +truncated and overwritten; existing directories will have +their permissions updated; other pre-existing objects are +unlinked and recreated from scratch.

+

ARCHIVE_EXTRACT_OWNER

The user and group IDs should @@ -184,43 +170,18 @@ group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed.

-

ARCHIVE_EXTRACT_TIME

- -

The timestamps (mtime, ctime, -and atime) should be restored. By default, they are ignored. -Note that restoring of atime is not currently supported.

- -

ARCHIVE_EXTRACT_NO_OVERWRITE

- -

Existing files on disk will not -be overwritten. By default, existing regular files are -truncated and overwritten; existing directories will have -their permissions updated; other pre-existing objects are -unlinked and recreated from scratch.

- -

ARCHIVE_EXTRACT_UNLINK

- -

Existing files on disk will be -unlinked before any attempt to create them. In some cases, -this can prove to be a significant performance improvement. -By default, existing files are truncated and rewritten, but -the file is not recreated. In particular, the default -behavior does not break existing hard links.

- -

ARCHIVE_EXTRACT_ACL

- -

Attempt to restore ACLs. By -default, extended ACLs are ignored.

- -

ARCHIVE_EXTRACT_FFLAGS

+

ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS

-

Attempt to restore extended -file flags. By default, file flags are ignored.

+

Refuse to extract an absolute +path. The default is to not refuse such paths.

-

ARCHIVE_EXTRACT_XATTR

+

ARCHIVE_EXTRACT_SECURE_NODOTDOT

-

Attempt to restore POSIX.1e -extended attributes. By default, they are ignored.

+

Refuse to extract a path that +contains a .. element anywhere within it. The default +is to not refuse such paths. Note that paths ending in +.. always cause an error, regardless of this +flag.

ARCHIVE_EXTRACT_SECURE_SYMLINKS

@@ -229,36 +190,39 @@ whose final location would be altered by a symlink on disk. This is intended to help guard against a variety of mischief caused by archives that (deliberately or otherwise) extract files outside of the current directory. The default is not -to perform this check. If ARCHIVE_EXTRACT_UNLINK is +to perform this check. If

+ +

ARCHIVE_EXTRACT_SPARSE

+ +

Scan data for blocks of NUL +bytes and try to recreate them with holes. This results in +sparse files, independent of whether the archive format +supports or uses them. ARCHIVE_EXTRACT_UNLINK is specified together with this option, the library will remove any intermediate symlinks it finds and return an error only if such symlink could not be removed.

-

ARCHIVE_EXTRACT_SECURE_NODOTDOT

- -

Refuse to extract a path that -contains a .. element anywhere within it. The default -is to not refuse such paths. Note that paths ending in -.. always cause an error, regardless of this -flag.

- -

ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS

+

ARCHIVE_EXTRACT_TIME

-

Refuse to extract an absolute -path. The default is to not refuse such paths.

+

The timestamps (mtime, ctime, +and atime) should be restored. By default, they are ignored. +Note that restoring of atime is not currently supported.

-

ARCHIVE_EXTRACT_SPARSE

+

ARCHIVE_EXTRACT_UNLINK

-

Scan data for blocks of NUL -bytes and try to recreate them with holes. This results in -sparse files, independent of whether the archive format -supports or uses them.

+

Existing files on disk will be +unlinked before any attempt to create them. In some cases, +this can prove to be a significant performance improvement. +By default, existing files are truncated and rewritten, but +the file is not recreated. In particular, the default +behavior does not break existing hard links.

-

ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS

+

ARCHIVE_EXTRACT_XATTR

-

Before removing a file system -object prior to replacing it, clear platform-specific file -flags which might prevent its removal.

+

Attempt to restore extended +file attributes. By default, they are ignored. See xattr(7) +(Linux), xattr(2) (Mac OS X), or getextattr(8) (FreeBSD) for +more information on extended file attributes.

archive_write_disk_set_group_lookup(), @@ -288,70 +252,6 @@ looked up. These functions also implement a simple memory cache to reduce the number of calls to getpwnam(3) and getgrnam(3).

- -

archive_write_header()

- -

Build and write a header using -the data in the provided struct archive_entry structure. See -archive_entry(3) for information on creating and populating -struct archive_entry objects.

- -

archive_write_data()

- -

Write data corresponding to the -header just written. Returns number of bytes written or -1 -on error.

- - -

archive_write_data_block()

- -

Write data corresponding to the -header just written. This is like -archive_write_data() except that it performs a seek -on the file being written to the specified offset before -writing the data. This is useful when restoring sparse files -from archive formats that support sparse files. Returns -number of bytes written or -1 on error. (Note: This is -currently not supported for archive_write handles, only for -archive_write_disk handles.)

- - -

archive_write_finish_entry()

- -

Close out the entry just -written. Ordinarily, clients never need to call this, as it -is called automatically by -archive_write_next_header() and -archive_write_close() as needed. However, some file -attributes are written to disk only after the file is -closed, so this can be necessary if you need to work with -the file on disk right away.

- - -

archive_write_close()

- -

Set any attributes that could -not be set during the initial restore. For example, -directory timestamps are not restored initially because -restoring a subsequent file would alter that timestamp. -Similarly, non-writable directories are initially created -with write permissions (so that their contents can be -restored). The archive_write_disk_new library -maintains a list of all such deferred attributes and sets -them when this function is invoked.

- - -

archive_write_finish()

- -

This is a deprecated synonym -for archive_write_free().

- -

archive_write_free()

- -

Invokes -archive_write_close() if it was not invoked manually, -then releases all resources.

-

More information about the struct archive object and the overall design of the library can be found in the libarchive(3) overview. Many of @@ -450,7 +350,7 @@ of the final object happen to match those specified in the entry.

The -‘‘standard’’ user-id and group-id +’’standard’’ user-id and group-id lookup functions are not the defaults because getgrnam(3) and getpwnam(3) are sometimes too large for particular applications. The current design allows the application @@ -463,7 +363,7 @@ walks a directory hierarchy and returns archive entry objects.

BSD -February 2, 2012 BSD

+April 3, 2017 BSD


diff --git a/archivers/libarchive/files/doc/html/archive_write_filter.3.html b/archivers/libarchive/files/doc/html/archive_write_filter.3.html index 107fb367552..6d0fdce1f17 100644 --- a/archivers/libarchive/files/doc/html/archive_write_filter.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_filter.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html b/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html index 5980913ff57..e394628a8b9 100644 --- a/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html @@ -1,5 +1,5 @@ - + @@ -51,7 +51,9 @@ written. In particular, this writes out the final padding required by some formats. Ordinarily, clients never need to call this, as it is called automatically by archive_write_header() and -archive_write_close() as needed.

+archive_write_close() as needed. For +archive_write_disk handles, this flushes pending file +attribute changes like modification time.

RETURN VALUES

@@ -77,7 +79,7 @@ archive_write_data(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5)

BSD -February 2, 2012 BSD

+February 28, 2017 BSD


diff --git a/archivers/libarchive/files/doc/html/archive_write_format.3.html b/archivers/libarchive/files/doc/html/archive_write_format.3.html index 901a4e461b7..0912509dba1 100644 --- a/archivers/libarchive/files/doc/html/archive_write_format.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_format.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_write_free.3.html b/archivers/libarchive/files/doc/html/archive_write_free.3.html index eabdd7c8b3a..f5c8c687087 100644 --- a/archivers/libarchive/files/doc/html/archive_write_free.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_free.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_write_header.3.html b/archivers/libarchive/files/doc/html/archive_write_header.3.html index 12b39631f17..17941cdb233 100644 --- a/archivers/libarchive/files/doc/html/archive_write_header.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_header.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_write_new.3.html b/archivers/libarchive/files/doc/html/archive_write_new.3.html index 8c459fa5aac..2a12fe61bb9 100644 --- a/archivers/libarchive/files/doc/html/archive_write_new.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_new.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/archive_write_open.3.html b/archivers/libarchive/files/doc/html/archive_write_open.3.html index 3bd43f143d9..6d51e6db453 100644 --- a/archivers/libarchive/files/doc/html/archive_write_open.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_open.3.html @@ -1,5 +1,5 @@ - + @@ -116,7 +116,7 @@ require correct blocking.

archive_write_open() that accepts a filename. A NULL argument indicates that the output should be written to standard output; an argument of -‘‘-’’ will open a file with that +’’-’’ will open a file with that name. If you have not invoked archive_write_set_bytes_in_last_block(), then archive_write_open_filename() will adjust the diff --git a/archivers/libarchive/files/doc/html/archive_write_set_options.3.html b/archivers/libarchive/files/doc/html/archive_write_set_options.3.html index 8ea118926ab..28dcaa0c58f 100644 --- a/archivers/libarchive/files/doc/html/archive_write_set_options.3.html +++ b/archivers/libarchive/files/doc/html/archive_write_set_options.3.html @@ -1,5 +1,5 @@ - + @@ -138,7 +138,7 @@ option with this name will ignore it.

The option will be provided to every module with a value of -‘‘1’’.

+’’1’’.

!option

@@ -175,7 +175,7 @@ cksum, device, flags, gid,

Enable a particular keyword in the mtree output. Prefix with an exclamation mark to disable the corresponding keyword. The default is equivalent to -‘‘device, flags, gid, gname, link, mode, nlink, +’’device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname’’.

all

@@ -483,8 +483,8 @@ compression on many files.

compression

The value is either -‘‘store’’ or -‘‘deflate’’ to indicate how the +’’store’’ or +’’deflate’’ to indicate how the following entries should be compressed. Note that this setting is ignored for directories, symbolic links, and other special entries.

diff --git a/archivers/libarchive/files/doc/html/bsdcpio.1.html b/archivers/libarchive/files/doc/html/bsdcpio.1.html index 8c30ec9d2c3..3ed5a48817f 100644 --- a/archivers/libarchive/files/doc/html/bsdcpio.1.html +++ b/archivers/libarchive/files/doc/html/bsdcpio.1.html @@ -1,5 +1,5 @@ - + @@ -29,12 +29,11 @@ to and from archives

SYNOPSIS

-

cpio −i -[options] [pattern ...] -[< archive]
-cpio −o
[options] < name-list +

cpio -i [options] +[pattern ...] [< archive]
+cpio -o
[options] < name-list [> archive]
-cpio −p
[options] dest-dir < +cpio -p [options] dest-dir < name-list

DESCRIPTION

@@ -48,23 +47,23 @@ and can create tar, pax, cpio, ar, and shar archives.

to cpio is a mode indicator from the following list:

-

−i

+

-i

Input. Read an archive from standard input (unless overridden) and extract -the contents to disk or (if the −t option is +the contents to disk or (if the -t option is specified) list the contents to standard output. If one or more file patterns are specified, only files matching one of the patterns will be extracted.

-

−o

+

-o

Output. Read a list of filenames from standard input and produce a new archive on standard output (unless overridden) containing the specified items.

-

−p

+

-p

Pass-through. Read a list of filenames from standard input and copy the @@ -76,64 +75,62 @@ files to the specified directory.

otherwise, options are applicable in all operating modes.

-

−0, -−−null

+

-0, --null

Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might contain newlines.

-

−A

+

-A

(o mode only) Append to the specified archive. (Not yet implemented.)

-

−a

+

-a

(o and p modes) Reset access times on files after they are read.

-

−B

+

-B

(o mode only) Block output to records of 5120 bytes.

-

−C size

+

-C size

(o mode only) Block output to records of size bytes.

-

−c

+

-c

(o mode only) Use the old POSIX portable character format. Equivalent to -−−format odc.

+--format odc.

-

−d, -−−make-directories

+

-d, +--make-directories

(i and p modes) Create directories as necessary.

-

−E file

+

-E file

(i mode only) Read list of file name patterns from file to list and extract.

-

−F file, -−−file file

+

-F file, +--file file

Read archive from or write archive to file.

-

−f -pattern

+

-f pattern

(i mode only) Ignore files that match pattern.

-

−H format, -−−format format

+

-H format, +--format format

(o mode only) Produce the output archive in the specified format. Supported formats @@ -169,44 +166,40 @@ format is odc. See libarchive-formats(5) for more complete information about the formats currently supported by the underlying libarchive(3) library.

-

−h, -−−help

+

-h, --help

Print usage information.

-

−I file

+

-I file

Read archive from file.

-

−i, -−−extract

+

-i, --extract

Input mode. See above for description.

- -

−−insecure

+

--insecure

(i and p mode only) Disable security checks during extraction or copying. This allows extraction via symbolic links, absolute paths, and path -names containing ‘..’ in the name.

+names containing ’..’ in the name.

-

−J, -−−xz

+

-J, --xz

(o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz compression is recognized automatically on input.

-

−j

+

-j

Synonym for -−y.

+-y.

-

−L

+

-L

(o and p modes) All symbolic links will be followed. Normally, symbolic @@ -214,40 +207,39 @@ links are archived and copied as symbolic links. With this option, the target of the link will be archived or copied instead.

-

−l, -−−link

+

-l, --link

(p mode only) Create links from the target directory to the original files, instead of copying.

-

−−lrzip

+

--lrzip

(o mode only) Compress the resulting archive with lrzip(1). In input mode, this option is ignored.

-

−−lz4

+

--lz4

(o mode only) Compress the archive with lz4-compatible compression before writing it. In input mode, this option is ignored; lz4 compression is recognized automatically on input.

-

−−lzma

+

--lzma

(o mode only) Compress the file with lzma-compatible compression before writing it. In input mode, this option is ignored; lzma compression is recognized automatically on input.

-

−−lzop

+

--lzop

(o mode only) Compress the resulting archive with lzop(1). In input mode, this option is ignored.

-

−−passphrase +

--passphrase passphrase

The passphrase is used @@ -256,79 +248,76 @@ only a format that cpio can handle encrypted archives. You shouldn’t use this option unless you realize how insecure use of this option is.

-

−m, -−−preserve-modification-time

+

-m, +--preserve-modification-time

(i and p modes) Set file modification time on created files to match those in the source.

-

−n, -−−numeric-uid-gid

- -

(i mode, only with -−t) Display numeric uid and gid. By default, -cpio displays the user and group names when they are -provided in the archive, or looks up the user and group -names in the system password database.

+

-n, +--numeric-uid-gid

+

(i mode, only with -t) +Display numeric uid and gid. By default, cpio +displays the user and group names when they are provided in +the archive, or looks up the user and group names in the +system password database.

-

−−no-preserve-owner

+

--no-preserve-owner

(i mode only) Do not attempt to restore file ownership. This is the default when run by non-root users.

-

−O file

+

-O file

Write archive to file.

-

−o, -−−create

+

-o, --create

Output mode. See above for description.

-

−p, -−−pass-through

+

-p, +--pass-through

Pass-through mode. See above for description.

- -

−−preserve-owner

+

--preserve-owner

(i mode only) Restore file ownership. This is the default when run by the root user.

-

−−quiet

+

--quiet

Suppress unnecessary messages.

-

−R [
+

-R [
user][
:][
-group], −−owner [
+group], --owner [
user][
:][
group]

Set the owner and/or group on files in the output. If group is specified with no user (for -example, −R :wheel) then the group will -be set but not the user. If the user is specified with a -trailing colon and no group (for example, −R -root:) then the group will be set to the user’s -default group. If the user is specified with no trailing -colon, then the user will be set but not the group. In -−i and −p modes, this option can -only be used by the super-user. (For compatibility, a period -can be used in place of the colon.)

- -

−r

+example, -R :wheel) then the group will be set +but not the user. If the user is specified with a trailing +colon and no group (for example, -R root:) +then the group will be set to the user’s default +group. If the user is specified with no trailing colon, then +the user will be set but not the group. In -i and +-p modes, this option can only be used by the +super-user. (For compatibility, a period can be used in +place of the colon.)

+ +

-r

(All modes.) Rename files interactively. For each file, a prompt is @@ -338,54 +327,50 @@ blank, the file is skipped. If the line contains a single period, the file is processed normally. Otherwise, the line is taken to be the new name of the file.

-

−t, -−−list

+

-t, --list

(i mode only) List the contents of the archive to stdout; do not restore the contents to disk.

-

−u, -−−unconditional

+

-u, +--unconditional

(i and p modes) Unconditionally overwrite existing files. Ordinarily, an older file will not overwrite a newer file on disk.

-

−V, -−−dot

+

-V, --dot

Print a dot to stderr for each -file as it is processed. Superseded by −v.

+file as it is processed. Superseded by -v.

-

−v, -−−verbose

+

-v, --verbose

Print the name of each file to -stderr as it is processed. With −t, provide a +stderr as it is processed. With -t, provide a detailed listing of each file.

- -

−−version

+

--version

Print the program version information and exit.

-

−y

+

-y

(o mode only) Compress the archive with bzip2-compatible compression before writing it. In input mode, this option is ignored; bzip2 compression is recognized automatically on input.

-

−Z

+

-Z

(o mode only) Compress the archive with compress-compatible compression before writing it. In input mode, this option is ignored; compression is recognized automatically on input.

-

−z

+

-z

(o mode only) Compress the archive with gzip-compatible compression before @@ -422,7 +407,7 @@ with the find(1) command. The first example here simply copies all files from src to dest:

find src | -cpio −pmud dest

+cpio -pmud dest

By carefully selecting options to the find(1) command and combining it @@ -433,19 +418,19 @@ more than 2 days old and whose names match a particular pattern:

find src -−mtime +2 | grep foo[bar] | -cpio −pdmu dest

+-mtime +2 | grep foo[bar] | cpio +-pdmu dest

This example copies files from src to dest that are more than 2 days old and which contain the word -‘‘

+’’

foobar ’’:

find src -−mtime +2 | xargs grep -l foobar -| cpio −pdmu dest

+-mtime +2 | xargs grep -l foobar | +cpio -pdmu dest

COMPATIBILITY

@@ -454,18 +439,16 @@ the options a, B, c, d, f, l, m, r, t, u, and v comply with SUSv2.

The old POSIX.1 -standard specified that only −i, -−o, and −p were interpreted as -command-line options. Each took a single argument of a list -of modifier characters. For example, the standard syntax -allows −imu but does not support -−miu or −i −m −u, -since m and u are only modifiers to -−i, they are not command-line options in their -own right. The syntax supported by this implementation is -backwards-compatible with the standard. For best -compatibility, scripts should limit themselves to the -standard syntax.

+standard specified that only -i, -o, and +-p were interpreted as command-line options. Each +took a single argument of a list of modifier characters. For +example, the standard syntax allows -imu but does not +support -miu or -i -m -u, since m and +u are only modifiers to -i, they are not +command-line options in their own right. The syntax +supported by this implementation is backwards-compatible +with the standard. For best compatibility, scripts should +limit themselves to the standard syntax.

SEE ALSO

@@ -477,13 +460,13 @@ libarchive-formats(5), tar(5)

There is no current POSIX standard for the cpio command; it appeared in ISO/IEC -9945-1:1996 (‘‘POSIX.1’’) but was +9945-1:1996 (’’POSIX.1’’) but was dropped from IEEE Std 1003.1-2001 -(‘‘POSIX.1’’).

+(’’POSIX.1’’).

The cpio, ustar, and pax interchange file formats are defined by IEEE Std -1003.1-2001 (‘‘POSIX.1’’) for the +1003.1-2001 (’’POSIX.1’’) for the pax command.

HISTORY

@@ -492,7 +475,7 @@ pax command.

find utilities were written by Dick Haight while working in AT&T’s Unix Support Group. They first appeared in 1977 in PWB/UNIX 1.0, the -‘‘Programmer’s Work Bench’’ +’’Programmer’s Work Bench’’ system developed for use within AT&T. They were first released outside of AT&T as part of System III Unix in 1981. As a result, cpio actually predates tar, @@ -512,7 +495,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 ‘‘odc’’ +4 gigabytes, except for the ’’odc’’ variant, which can support files up to 8 gigabytes.

BSD diff --git a/archivers/libarchive/files/doc/html/bsdtar.1.html b/archivers/libarchive/files/doc/html/bsdtar.1.html index 8e9edc809a6..d7ad4d87776 100644 --- a/archivers/libarchive/files/doc/html/bsdtar.1.html +++ b/archivers/libarchive/files/doc/html/bsdtar.1.html @@ -1,5 +1,5 @@ - + @@ -36,14 +36,14 @@ tape archives

file
⟩  | ⟨
pattern
⟩  ...]

-

tar {−c} +

tar {-c} [options] [files directories]
-tar
{−r −u} -−f archive-file [options] +tar {-r -u} -f +archive-file [options] [files directories]
-tar
{−t −x} -[options] [patterns]

+tar {-t -x} [options] +[patterns]

DESCRIPTION

@@ -54,7 +54,7 @@ and ISO 9660 cdrom images and can create tar, pax, cpio, ar, zip, 7-zip, and shar archives.

The first -synopsis form shows a ‘‘bundled’’ +synopsis form shows a ’’bundled’’ option word. This usage is provided for compatibility with historical implementations. See COMPATIBILITY below for details.

@@ -63,50 +63,48 @@ details.

synopsis forms show the preferred usage. The first option to tar is a mode indicator from the following list:

-

−c

+

-c

Create a new archive containing the specified items. The long option form -is −−create.

+is --create.

-

−r

+

-r

-

Like -−c, but new entries are appended to the -archive. Note that this only works on uncompressed archives -stored in regular files. The −f option is -required. The long option form is -−−append.

+

Like -c, +but new entries are appended to the archive. Note that this +only works on uncompressed archives stored in regular files. +The -f option is required. The long option form is +--append.

-

−t

+

-t

List archive contents to stdout. The long option form is -−−list.

+--list.

-

−u

+

-u

-

Like -−r, but new entries are added only if they have -a modification date newer than the corresponding entry in -the archive. Note that this only works on uncompressed -archives stored in regular files. The −f option -is required. The long form is -−−update.

+

Like -r, +but new entries are added only if they have a modification +date newer than the corresponding entry in the archive. Note +that this only works on uncompressed archives stored in +regular files. The -f option is required. The long +form is --update.

-

−x

+

-x

Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier copies. The -long option form is −−extract.

+long option form is --extract.

-

In -−c, −r, or −u mode, -each specified file or directory is added to the archive in -the order specified on the command line. By default, the -contents of each directory are also archived.

+

In -c, +-r, or -u mode, each specified file or +directory is added to the archive in the order specified on +the command line. By default, the contents of each directory +are also archived.

In extract or list mode, the entire command line is read and parsed before @@ -127,21 +125,21 @@ modes.

specified archive is opened and the entries in it will be appended to the current archive. As a simple example,

-

tar −c −f -- newfile @original.tar

+

tar -c -f - +newfile @original.tar

writes a new archive to standard output containing a file newfile and all of the entries from original.tar. In contrast,

-

tar −c −f -- newfile original.tar

+

tar -c -f - newfile +original.tar

creates a new archive with only two entries. Similarly,

-

tar −czf - -−−format pax @-

+

tar -czf - +--format pax @-

reads an archive from standard input (whose format will be determined automatically) and @@ -149,66 +147,64 @@ converts it into a gzip-compressed pax-format archive on stdout. In this way, tar can be used to convert archives from one format to another.

-

−a, -−−auto-compress

+

-a, +--auto-compress

(c mode only) Use the archive suffix to decide a set of the format and the compressions. As a simple example,

-

tar −a −cf +

tar -a -cf archive.tgz source.c source.h

creates a new archive with restricted pax format and gzip compression,

-

tar −a −cf +

tar -a -cf archive.tar.bz2.uu source.c source.h

creates a new archive with restricted pax format and bzip2 compression and uuencode compression,

-

tar −a −cf +

tar -a -cf archive.zip source.c source.h

creates a new archive with zip format,

-

tar −a −jcf +

tar -a -jcf archive.tgz source.c source.h

ignores the -‘‘-j’’ option, and creates a new +’’-j’’ option, and creates a new archive with restricted pax format and gzip compression,

-

tar −a −jcf +

tar -a -jcf archive.xxx source.c source.h

if it is unknown suffix or no suffix, creates a new archive with restricted pax format and bzip2 compression.

-

−−acls

+

--acls

(c, r, u, x modes only) Archive or extract POSIX.1e or NFSv4 ACLs. This -is the reverse of −−no-acls and the -default behavior in c, r, and u modes (except Mac OS X) or -if tar is run in x mode as root. On Mac OS X this -option translates extended ACLs to NFSv4 ACLs. To store -extended ACLs the −−mac-metadata option -is preferred.

+is the reverse of --no-acls and the default behavior +in c, r, and u modes (except on Mac OS X) or if tar +is run in x mode as root. On Mac OS X this option translates +extended ACLs to NFSv4 ACLs. To store extended ACLs the +--mac-metadata option is preferred.

-

−B, -−−read-full-blocks

+

-B, +--read-full-blocks

Ignored for compatibility with other tar(1) implementations.

-

−b -blocksize, −−block-size -blocksize

+

-b blocksize, +--block-size blocksize

Specify the block size, in 512-byte records, for tape drive I/O. As a rule, this @@ -216,29 +212,29 @@ argument is only needed when reading from or writing to tape drives, and usually not even then as the default block size of 20 records (10240 bytes) is very common.

-

−C -directory, −−cd directory, -−−directory directory

+

-C directory, +--cd directory, --directory +directory

In c and r mode, this changes the directory before adding the following files. In x mode, change directories after opening the archive but before extracting entries from the archive.

-

−−chroot

+

--chroot

(x mode only) chroot() -to the current directory after processing any -−C options and before extracting any files.

+to the current directory after processing any -C +options and before extracting any files.

-

−−clear-nochange-fflags

+

--clear-nochange-fflags

(x mode only) Before removing file system objects to replace them, clear platform-specific file flags that might prevent removal.

-

−−exclude +

--exclude pattern

Do not process files or @@ -246,31 +242,30 @@ directories that match the specified pattern. Note that exclusions take precedence over patterns or filenames specified on the command line.

-

−−fflags

+

--fflags

(c, r, u, x modes only) Archive or extract file flags. This is the reverse of -−−no-fflags and the default behavior in -c, r, and u modes or if tar is run in x mode as -root.

+--no-fflags and the default behavior in c, r, and u +modes or if tar is run in x mode as root.

-

−−format +

--format format

(c, r, u mode only) Use the specified format for the created archive. Supported formats -include ‘‘cpio’’, -‘‘pax’’, -‘‘shar’’, and -‘‘ustar’’. Other formats may also be +include ’’cpio’’, +’’pax’’, +’’shar’’, and +’’ustar’’. Other formats may also be supported; see libarchive-formats(5) for more information about currently-supported formats. In r and u modes, when extending an existing archive, the format specified here must be compatible with the format of the existing archive on disk.

-

−f file, -−−file file

+

-f file, +--file file

Read the archive from or write the archive to the specified file. The filename can be @@ -279,84 +274,77 @@ varies by system; on FreeBSD, the default is /dev/sa0; on Linux, the default is /dev/st0.

-

−−gid -id

+

--gid id

Use the provided group id number. On extract, this overrides the group id in the archive; the group name in the archive will be ignored. On create, this overrides the group id read from disk; if -−−gname is not also specified, the group -name will be set to match the group id.

+--gname is not also specified, the group name will be +set to match the group id.

-

−−gname -name

+

--gname name

Use the provided group name. On extract, this overrides the group name in the archive; if the provided group name does not exist on the system, the -group id (from the archive or from the -−−gid option) will be used instead. On -create, this sets the group name that will be stored in the -archive; the name will not be verified against the system -group database.

+group id (from the archive or from the --gid option) +will be used instead. On create, this sets the group name +that will be stored in the archive; the name will not be +verified against the system group database.

-

−H

+

-H

(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.

-

−h

+

-h

(c and r modes -only) Synonym for −L.

+only) Synonym for -L.

-

−I

+

-I

Synonym for -−T.

+-T.

-

−−help

+

--help

Show usage.

- -

−−hfsCompression

+

--hfsCompression

(x mode only) Mac OS X specific (v10.6 or later). Compress extracted regular files with HFS+ compression.

+

--ignore-zeros

-

−−ignore-zeros

- -

An alias of -−−options read_concatenated_archives for -compatibility with GNU tar.

+

An alias of --options +read_concatenated_archives for compatibility with GNU +tar.

-

−−include +

--include pattern

Process only files or directories that match the specified pattern. Note that -exclusions specified with −−exclude take -precedence over inclusions. If no inclusions are explicitly -specified, all entries are processed by default. The -−−include option is especially useful -when filtering archives. For example, the command

+exclusions specified with --exclude take precedence +over inclusions. If no inclusions are explicitly specified, +all entries are processed by default. The --include +option is especially useful when filtering archives. For +example, the command

-

tar −c −f -new.tar −−include=’*foo*’ -@old.tgz

+

tar -c -f new.tar +--include=’*foo*’ @old.tgz

creates a new archive new.tar containing only the entries from -old.tgz containing the string ‘foo’.

+old.tgz containing the string ’foo’.

-

−J, -−−xz

+

-J, --xz

(c mode only) Compress the resulting archive with xz(1). In extract or list modes, this @@ -364,9 +352,8 @@ option is ignored. Note that, unlike other tar implementations, this implementation recognizes XZ compression automatically when reading archives.

-

−j, -−−bzip, −−bzip2, -−−bunzip2

+

-j, --bzip, +--bzip2, --bunzip2

(c mode only) Compress the resulting archive with bzip2(1). In extract or list modes, @@ -374,273 +361,249 @@ this option is ignored. Note that, unlike other tar implementations, this implementation recognizes bzip2 compression automatically when reading archives.

-

−k, -−−keep-old-files

+

-k, +--keep-old-files

(x mode only) Do not overwrite existing files. In particular, if a file appears more than once in an archive, later copies will not overwrite earlier copies.

- -

−−keep-newer-files

+

--keep-newer-files

(x mode only) Do not overwrite existing files that are newer than the versions appearing in the archive being extracted.

-

−L, -−−dereference

+

-L, +--dereference

(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.

-

−l, -−−check-links

+

-l, +--check-links

(c and r modes only) Issue a warning message unless all links to each file are archived.

-

−−lrzip

+

--lrzip

(c mode only) Compress the resulting archive with lrzip(1). In extract or list modes, this option is ignored.

-

−−lz4

+

--lz4

(c mode only) Compress the archive with lz4-compatible compression before writing it. In input mode, this option is ignored; lz4 compression is recognized automatically on input.

-

−−lzma

+

--lzma

(c mode only) Compress the resulting archive with the original LZMA algorithm. Use of this option is discouraged and new -archives should be created with −−xz -instead. Note that, unlike other tar implementations, -this implementation recognizes LZMA compression -automatically when reading archives.

+archives should be created with --xz instead. Note +that, unlike other tar implementations, this +implementation recognizes LZMA compression automatically +when reading archives.

-

−−lzop

+

--lzop

(c mode only) Compress the resulting archive with lzop(1). In extract or list modes, this option is ignored.

-

−m, -−−modification-time

+

-m, +--modification-time

(x mode only) Do not extract modification time. By default, the modification time is set to the time stored in the archive.

- -

−−mac-metadata

+

--mac-metadata

(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 −−no-mac-metadata. and the -default behavior in c, r, and u modes or if tar is -run in x mode as root.

+the reverse of --no-mac-metadata. and the default +behavior in c, r, and u modes or if tar is run in x +mode as root.

-

−n, -−−norecurse, -−−no-recursion

+

-n, --norecurse, +--no-recursion

(c, r, u modes only) Do not recursively archive the contents of directories.

-

−−newer -date

+

--newer date

(c, r, u modes only) Only include files and directories newer than the specified date. This compares ctime entries.

- -

−−newer-mtime +

--newer-mtime date

(c, r, u modes only) Like -−−newer, except it compares mtime entries -instead of ctime entries.

+--newer, except it compares mtime entries instead of +ctime entries.

-

−−newer-than +

--newer-than file

(c, r, u modes only) Only include files and directories newer than the specified file. This compares ctime entries.

- -

−−newer-mtime-than +

--newer-mtime-than file

(c, r, u modes only) Like -−−newer-than, except it compares mtime -entries instead of ctime entries.

+--newer-than, except it compares mtime entries +instead of ctime entries.

-

−−nodump

+

--nodump

(c and r modes only) Honor the nodump file flag by skipping this file.

-

−−nopreserveHFSCompression

+

--nopreserveHFSCompression

-

(x mode only) Mac OS X -specific(v10.6 or later). Do not compress extracted regular -files which were compressed with HFS+ compression before -archived. By default, compress the regular files again with -HFS+ compression.

+

(x mode only) Mac OS X specific +(v10.6 or later). Do not compress extracted regular files +which were compressed with HFS+ compression before archived. +By default, compress the regular files again with HFS+ +compression.

-

−−null

+

--null

(use with -−I or −T) Filenames or patterns -are separated by null characters, not by newlines. This is -often used to read filenames output by the -−print0 option to find(1).

+-I or -T) Filenames or patterns are separated +by null characters, not by newlines. This is often used to +read filenames output by the -print0 option to +find(1).

- -

−−no-acls

+

--no-acls

(c, r, u, x modes only) Do not archive or extract POSIX.1e or NFSv4 ACLs. This is the -reverse of −−acls and the default -behavior if tar is run as non-root in x mode (on Mac -OS X also in c, r and u modes).

- +reverse of --acls and the default behavior if +tar is run as non-root in x mode (on Mac OS X as any +user in c, r, u and x modes).

-

−−no-fflags

+

--no-fflags

(c, r, u, x modes only) Do not archive or extract file flags. This is the reverse of -−−fflags and the default behavior if -tar is run as non-root in x mode.

+--fflags and the default behavior if tar is +run as non-root in x mode.

- -

−−no-mac-metadata

+

--no-mac-metadata

(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 −−mac-metadata. and the -default behavior if tar is run as non-root in x -mode.

- -

−n, -−−norecurse, -−−no-recursion

+the reverse of --mac-metadata. and the default +behavior if tar is run as non-root in x mode.

+

-n, --norecurse, +--no-recursion

-

−−no-same-owner

+

--no-same-owner

(x mode only) Do not extract owner and group IDs. This is the reverse of -−−same-owner and the default behavior if -tar is run as non-root.

+--same-owner and the default behavior if tar +is run as non-root.

-

−−no-same-permissions

+

--no-same-permissions

(x mode only) Do not extract full permissions (SGID, SUID, sticky bit, ACLs, extended attributes or extended file flags). This is the reverse of -−p and the default behavior if tar is -run as non-root and can be overridden by also specifying -−−acls, −−fflags, -−−mac-metadata, −−same-owner, -−−same-permissions and -−−xattrs.

+-p and the default behavior if tar is run as +non-root.

- -

−−no-xattrs

+

--no-xattrs

(c, r, u, x modes only) Do not archive or extract extended attributes. This is the reverse -of −−xattrs and the default behavior if -tar is run as non-root in x mode.

- +of --xattrs and the default behavior if tar is +run as non-root in x mode.

-

−−numeric-owner

+

--numeric-owner

This is equivalent to -−−uname "" -−−gname "". On extract, it -causes user and group names in the archive to be ignored in -favor of the numeric user and group ids. On create, it -causes user and group names to not be stored in the -archive.

+--uname "" --gname "". On +extract, it causes user and group names in the archive to be +ignored in favor of the numeric user and group ids. On +create, it causes user and group names to not be stored in +the archive.

-

−O, -−−to-stdout

+

-O, +--to-stdout

(x, t modes only) In extract (-x) mode, files will be written to standard out rather than being extracted to disk. In list (-t) mode, the file listing will be written to stderr rather than the usual stdout.

-

−o

+

-o

(x mode) Use the user and group of the user running the program rather than those specified in the archive. Note that this has no -significance unless −p is specified, and the -program is being run by the root user. In this case, the -file modes and flags from the archive will be restored, but -ACLs or owner information in the archive will be -discarded.

+significance unless -p is specified, and the program +is being run by the root user. In this case, the file modes +and flags from the archive will be restored, but ACLs or +owner information in the archive will be discarded.

-

−o

+

-o

(c, r, u mode) -A synonym for −−format ustar

+A synonym for --format ustar

-

−−older -date

+

--older date

(c, r, u modes only) Only include files and directories older than the specified date. This compares ctime entries.

- -

−−older-mtime +

--older-mtime date

(c, r, u modes only) Like -−−older, except it compares mtime entries -instead of ctime entries.

+--older, except it compares mtime entries instead of +ctime entries.

-

−−older-than +

--older-than file

(c, r, u modes only) Only include files and directories older than the specified file. This compares ctime entries.

- -

−−older-mtime-than +

--older-mtime-than file

(c, r, u modes only) Like -−−older-than, except it compares mtime -entries instead of ctime entries.

- +--older-than, except it compares mtime entries +instead of ctime entries.

-

−−one-file-system

+

--one-file-system

(c, r, and u modes) Do not cross mount points.

-

−−options +

--options options

Select optional behaviors for @@ -758,7 +721,7 @@ output. Supported keywords include: cksum, nlink, rmd160, sha1, sha256, sha384, sha512, size, time, uid, uname. The default is equivalent to: -‘‘device, flags, gid, gname, link, mode, nlink, +’’device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname’’.

mtree:all

@@ -802,14 +765,14 @@ encryption), aes128 (WinZip AES-128 encryption) and aes256 archive, which occurs when multiple tar archives have been concatenated together. Without this option, only the contents of the first concatenated archive would be read. -This option is comparable to the −i, -−−ignore-zeros option of GNU tar.

+This option is comparable to the -i, +--ignore-zeros option of GNU tar.

If a provided option is not supported by any module, that is a fatal error.

-

−P, -−−absolute-paths

+

-P, +--absolute-paths

Preserve pathnames. By default, absolute pathnames (those that begin with a / character) @@ -819,24 +782,20 @@ extract archive entries whose pathnames contain .. or whose target directory would be altered by a symlink. This option suppresses these behaviors.

-

−p, -−−insecure, -−−preserve-permissions

+

-p, --insecure, +--preserve-permissions

(x mode only) Preserve file permissions. Attempt to restore the full permissions, -including owner, file modes, ACLs, extended atributes and +including owner, file modes, ACLs, extended attributes and extended file flags, if available, for each item extracted -from the archive. This is the default, if tar is -being run by root and can be overridden by also specifying -−−no-acls, -−−no-fflags, -−−no-mac-metadata, -−−no-same-owner, -−−no-same-permissions and -−−no-xattrs.

- -

−−passphrase +from the archive. This is te reverse of +--no-same-permissions and the default if tar +is being run by root and can be partially overridden by also +specifying --no-acls, --no-fflags, +--no-mac-metadata or --no-xattrs.

+ +

--passphrase passphrase

The passphrase is used @@ -845,13 +804,13 @@ the only supported format that supports encryption. You shouldn’t use this option unless you realize how insecure use of this option is.

-

−−posix

+

--posix

(c, r, u mode only) Synonym for -−−format pax

+--format pax

-

−q, -−−fast-read

+

-q, +--fast-read

(x and t mode only) Extract or list only the first archive entry that matches each pattern @@ -862,7 +821,7 @@ entries with the same name and, by convention, later entries overwrite earlier entries. This option is provided as a performance optimization.

-

−S

+

-S

(x mode only) Extract files as sparse files. For every block on disk, @@ -870,8 +829,7 @@ check first if it contains only NULL bytes and seek over it otherwise. This works similar to the conv=sparse option of dd.

-

−s -pattern

+

-s pattern

Modify file or archive member names according to pattern. The pattern has the @@ -897,16 +855,13 @@ default is hrs which applies substitutions to all names. In particular, it is never necessary to specify h, r, or s.

- -

−−same-owner

+

--same-owner

(x mode only) Extract owner and -group IDs. This is the reverse of -−−no-same-owner and the default behavior -if tar is run as root.

- +group IDs. This is the reverse of --no-same-owner and +the default behavior if tar is run as root.

-

−−strip-components +

--strip-components count

Remove the specified number of @@ -915,30 +870,29 @@ silently skipped. Note that the pathname is edited after checking inclusion/exclusion patterns but before security checks.

-

−T filename, -−−files-from filename

+

-T filename, +--files-from filename

In x or t mode, tar will read the list of names to be extracted from filename. In c mode, tar will read names to be archived from filename. The special name -‘‘-C’’ on a line by itself will +’’-C’’ on a line by itself will cause the current directory to be changed to the directory specified on the following line. Names are terminated by -newlines unless −−null is specified. Note -that −−null also disables the special -handling of lines containing ‘‘-C’’. -Note: If you are generating lists of files using find(1), -you probably want to use −n as well.

+newlines unless --null is specified. Note that +--null also disables the special handling of lines +containing ’’-C’’. Note: If you are +generating lists of files using find(1), you probably want +to use -n as well.

-

−−totals

+

--totals

(c, r, u modes only) After archiving all files, print a summary to stderr.

-

−U, -−−unlink, -−−unlink-first

+

-U, --unlink, +--unlink-first

(x mode only) Unlink files before creating them. This can be a minor performance @@ -948,74 +902,65 @@ also causes tar to remove intervening directory symlinks instead of reporting an error. See the SECURITY section below for more details.

-

−−uid -id

+

--uid id

Use the provided user id number and ignore the user name from the archive. On create, if -−−uname is not also specified, the user -name will be set to match the user id.

+--uname is not also specified, the user name will be +set to match the user id.

-

−−uname -name

+

--uname name

Use the provided user name. On extract, this overrides the user name in the archive; if the provided user name does not exist on the system, it will be ignored and the user id (from the archive or from the -−−uid option) will be used instead. On -create, this sets the user name that will be stored in the -archive; the name is not verified against the system user -database.

+--uid option) will be used instead. On create, this +sets the user name that will be stored in the archive; the +name is not verified against the system user database.

- -

−−use-compress-program +

--use-compress-program program

Pipe the input (in x or t mode) or the output (in c mode) through program instead of using the builtin compression support.

-

−v, -−−verbose

+

-v, --verbose

Produce verbose output. In create and extract modes, tar will list each file name as it is read from or written to the archive. In list mode, tar will produce output similar to that of -ls(1). An additional −v option will also -provide ls-like details in create and extract mode.

- +ls(1). An additional -v option will also provide +ls-like details in create and extract mode.

-

−−version

+

--version

Print version of tar and libarchive, and exit.

-

−w, -−−confirmation, -−−interactive

+

-w, +--confirmation, --interactive

Ask for confirmation for every action.

-

−X filename, -−−exclude-from filename

+

-X filename, +--exclude-from filename

Read a list of exclusion -patterns from the specified file. See -−−exclude for more information about the -handling of exclusions.

+patterns from the specified file. See --exclude for +more information about the handling of exclusions.

-

−−xattrs

+

--xattrs

(c, r, u, x modes only) Archive or extract extended attributes. This is the reverse of -−−no-xattrs and the default behavior in -c, r, and u modes or if tar is run in x mode as -root.

+--no-xattrs and the default behavior in c, r, and u +modes or if tar is run in x mode as root.

-

−y

+

-y

(c mode only) Compress the resulting archive with bzip2(1). In extract or @@ -1023,9 +968,8 @@ list modes, this option is ignored. Note that, unlike other tar implementations, this implementation recognizes bzip2 compression automatically when reading archives.

-

−Z, -−−compress, -−−uncompress

+

-Z, --compress, +--uncompress

(c mode only) Compress the resulting archive with compress(1). In extract or list @@ -1034,8 +978,8 @@ modes, this option is ignored. Note that, unlike other compress compression automatically when reading archives.

-

−z, -−−gunzip, −−gzip

+

-z, --gunzip, +--gzip

(c mode only) Compress the resulting archive with gzip(1). In extract or list modes, @@ -1051,14 +995,14 @@ variables affect the execution of tar:

TAR_READER_OPTIONS

The default options for format -readers and compression readers. The -−−options option overrides this.

+readers and compression readers. The --options option +overrides this.

TAR_WRITER_OPTIONS

The default options for format -writers and compression writers. The -−−options option overrides this.

+writers and compression writers. The --options option +overrides this.

LANG

@@ -1068,9 +1012,9 @@ use. See environ(7) for more information.

TAPE

The default -device. The −f option overrides this. Please -see the description of the −f option above for -more details.

+device. The -f option overrides this. Please see the +description of the -f option above for more +details.

TZ

@@ -1090,38 +1034,38 @@ occurs.

archive called file.tar.gz that contains two files source.c and source.h:

-

tar −czf -file.tar.gz source.c source.h

+

tar -czf file.tar.gz +source.c source.h

To view a detailed table of contents for this archive:

-

tar −tvf +

tar -tvf file.tar.gz

To extract all entries from the archive on the default tape drive:

-

tar −x

+

tar -x

To examine the contents of an ISO 9660 cdrom image:

-

tar −tf +

tar -tf image.iso

To move file hierarchies, invoke tar as

-

tar −cf - -−C srcdir . | tar −xpf -- −C destdir

+

tar -cf - +-C srcdir . | tar -xpf - +-C destdir

or more traditionally

-

cd srcdir ; tar -−cf - . | (cd destdir ; tar -−xpf -)

+

cd srcdir ; tar -cf +- . | (cd destdir ; tar -xpf +-)

In create mode, the list of files and directories to be archived can also @@ -1130,8 +1074,8 @@ include directory change instructions of the form @archive-file. For example, the command line

-

tar −c −f -new.tar foo1 @old.tgz -C/tmp +

tar -c -f new.tar +foo1 @old.tgz -C/tmp foo2

will create a new archive @@ -1155,31 +1099,29 @@ usr/bin/ls uid=0 gid=0 mode=0755 type=file content=myls
$ tar -cvf output.tar @input.mtree

The -−−newer and -−−newer-mtime switches accept a variety -of common date and time specifications, including -‘‘12 Mar 2005 7:14:29pm’’, -‘‘2005-03-12 19:14’’, -‘‘5 minutes ago’’, and -‘‘19:14 PST May 1’’.

+--newer and --newer-mtime switches accept a +variety of common date and time specifications, including +’’12 Mar 2005 7:14:29pm’’, +’’2005-03-12 19:14’’, +’’5 minutes ago’’, and +’’19:14 PST May 1’’.

The -−−options argument can be used to control -various details of archive generation or reading. For -example, you can generate mtree output which only contains -type, time, and uid keywords:

- -

tar −cf -file.tar −−format=mtree -−−options=’!all,type,time,uid’ +--options argument can be used to control various +details of archive generation or reading. For example, you +can generate mtree output which only contains type, +time, and uid keywords:

+ +

tar -cf file.tar +--format=mtree +--options=’!all,type,time,uid’ dir

or you can set the compression level used by gzip or xz compression:

-

tar −czf -file.tar -−−options=’compression-level=9’.

+

tar -czf file.tar +--options=’compression-level=9’.

For more details, see the explanation of the archive_read_set_options() and @@ -1258,28 +1200,27 @@ then use that link to restore a file into that directory. To guard against this, tar checks each extracted path for symlinks. If the final path element is a symlink, it will be removed and replaced with the archive entry. If -−U is specified, any intermediate symlink will -also be unconditionally removed. If neither −U -nor −P is specified, tar will refuse to -extract the entry.

+-U is specified, any intermediate symlink will also +be unconditionally removed. If neither -U nor +-P is specified, tar will refuse to extract +the entry.

To protect yourself, you should be wary of any archives that come from untrusted sources. You should examine the contents of an archive with

-

tar −tf +

tar -tf filename

before extraction. You should -use the −k option to ensure that tar -will not overwrite any existing files or the −U -option to remove any pre-existing files. You should -generally not extract archives while running with super-user -privileges. Note that the −P option to -tar disables the security checks above and allows you -to extract an archive while preserving any absolute -pathnames, .. components, or symlinks to other -directories.

+use the -k option to ensure that tar will not +overwrite any existing files or the -U option to +remove any pre-existing files. You should generally not +extract archives while running with super-user privileges. +Note that the -P option to tar disables the +security checks above and allows you to extract an archive +while preserving any absolute pathnames, .. +components, or symlinks to other directories.

SEE ALSO

@@ -1291,9 +1232,9 @@ libarchive-formats(5), tar(5)

There is no current POSIX standard for the tar command; it appeared in ISO/IEC -9945-1:1996 (‘‘POSIX.1’’) but was +9945-1:1996 (’’POSIX.1’’) but was dropped from IEEE Std 1003.1-2001 -(‘‘POSIX.1’’). The options supported +(’’POSIX.1’’). The options supported by this implementation were developed by surveying a number of existing tar implementations as well as the old POSIX specification for tar and the current POSIX specification @@ -1301,7 +1242,7 @@ for pax.

The ustar and pax interchange file formats are defined by IEEE Std -1003.1-2001 (‘‘POSIX.1’’) for the +1003.1-2001 (’’POSIX.1’’) for the pax command.

HISTORY

@@ -1323,13 +1264,13 @@ library. It was first released with FreeBSD 5.4 in May,

BUGS

This program follows ISO/IEC -9945-1:1996 (‘‘POSIX.1’’) for the -definition of the −l option. Note that GNU tar -prior to version 1.15 treated −l as a synonym -for the −−one-file-system option.

+9945-1:1996 (’’POSIX.1’’) for the +definition of the -l option. Note that GNU tar prior +to version 1.15 treated -l as a synonym for the +--one-file-system option.

-

The -−C dir option may differ from historic +

The -C +dir option may differ from historic implementations.

All archive @@ -1351,13 +1292,13 @@ and decompression is implemented internally, so there may be insignificant differences between the compressed output generated by

-

tar −czf - +

tar -czf - file

and that generated by

-

tar −cf - -file | gzip

+

tar -cf - file | +gzip

The default should be to read and write archives to the standard I/O @@ -1375,7 +1316,7 @@ as ./@foo or ./-foo, respectively.

In create mode, a leading ./ is always removed. A leading / is -stripped unless the −P option is specified.

+stripped unless the -P option is specified.

There needs to be better support for file selection on both create and @@ -1392,7 +1333,7 @@ incompatible ways that different archive formats store hardlink information.)

BSD -February 24, 2017 BSD

+February 25, 2017 BSD


diff --git a/archivers/libarchive/files/doc/html/cpio.5.html b/archivers/libarchive/files/doc/html/cpio.5.html index af75de4974e..305a5514ba5 100644 --- a/archivers/libarchive/files/doc/html/cpio.5.html +++ b/archivers/libarchive/files/doc/html/cpio.5.html @@ -1,5 +1,5 @@ - + @@ -46,7 +46,7 @@ those integers (binary, octal, or hexadecimal). The header is followed by the pathname of the entry (the length of the pathname is stored in the header) and any file data. The end of the archive is indicated by a special record with the -pathname ‘‘TRAILER!!!’’.

+pathname ’’TRAILER!!!’’.

PWB format
@@ -239,11 +239,11 @@ included with each copy of the file.

Portable ASCII Format
Version 2 of the Single UNIX Specification -(‘‘SUSv2’’) standardized an ASCII +(’’SUSv2’’) standardized an ASCII variant that is portable across all platforms. It is -commonly known as the ‘‘old +commonly known as the ’’old character’’ format or as the -‘‘odc’’ format. It stores the same +’’odc’’ format. It stores the same numeric fields as the old binary format, but represents them as 6-character or 11-character octal values.

@@ -302,7 +302,7 @@ the old binary format above.

magic

The string -‘‘070701’’.

+’’070701’’.

check

@@ -326,7 +326,7 @@ archive.

Format
The CRC format is identical to the new ASCII format described in the previous section except that the magic -field is set to ‘‘070702’’ and the +field is set to ’’070702’’ and the check field is set to the sum of all bytes in the file data. This sum is computed treating all bytes as unsigned values and using unsigned arithmetic. Only the @@ -355,7 +355,7 @@ XXX

The cpio utility is no longer a part of POSIX or the Single Unix Standard. It last appeared in Version 2 of the Single UNIX Specification -(‘‘SUSv2’’). It has been supplanted +(’’SUSv2’’). It has been supplanted in subsequent standards by pax(1). The portable ASCII format is currently part of the specification for the pax(1) utility.

@@ -365,14 +365,14 @@ utility.

The original cpio utility was written by Dick Haight while working in AT&T’s Unix Support Group. It appeared in 1977 as part of PWB/UNIX -1.0, the ‘‘Programmer’s Work +1.0, the ’’Programmer’s Work Bench’’ derived from Version 6 AT&T UNIX that was used internally at AT&T. Both the old binary and old character formats were in use by 1980, according to the System III source released by SCO under -their ‘‘Ancient Unix’’ license. The +their ’’Ancient Unix’’ license. The character format was adopted as part of IEEE Std 1003.1-1988 -(‘‘POSIX.1’’). XXX when did +(’’POSIX.1’’). XXX when did "newc" appear? Who invented it? When did HP come out with their variant? When did Sun introduce ACLs and extended attributes? XXX

@@ -380,7 +380,7 @@ extended attributes? XXX

BUGS

The -‘‘CRC’’ format is mis-named, as it +’’CRC’’ format is mis-named, as it uses a simple checksum and not a cyclic redundancy check.

diff --git a/archivers/libarchive/files/doc/html/libarchive-formats.5.html b/archivers/libarchive/files/doc/html/libarchive-formats.5.html index 3c6df7fc96f..69b77411d39 100644 --- a/archivers/libarchive/files/doc/html/libarchive-formats.5.html +++ b/archivers/libarchive/files/doc/html/libarchive-formats.5.html @@ -1,5 +1,5 @@ - + @@ -34,7 +34,7 @@ library

The libarchive(3) library reads and writes a variety of streaming archive formats. Generally speaking, all of these archive formats consist of a series -of ‘‘entries’’. Each entry stores a +of ’’entries’’. Each entry stores a single file system object, such as a file, directory, or symbolic link.

@@ -52,8 +52,8 @@ all supported formats.

Tar Formats
The libarchive(3) library can read most tar archives. It can -write POSIX-standard ‘‘ustar’’ and -‘‘pax interchange’’ formats as well +write POSIX-standard ’’ustar’’ and +’’pax interchange’’ formats as well as v7 tar format and a subset of the legacy GNU tar format.

@@ -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’s -‘‘star’’ archiver and a few +’’star’’ archiver and a few LIBARCHIVE keys. The libarchive library can read most of the SCHILY keys and most of the GNU keys introduced by GNU tar. It silently ignores any keywords that it does not @@ -241,16 +241,16 @@ extended attribute records written by Solaris tar.

The first tar program appeared in Seventh Edition Unix in 1979. The first official standard for the tar file format was the -‘‘ustar’’ (Unix Standard Tar) format +’’ustar’’ (Unix Standard Tar) format defined by POSIX in 1988. POSIX.1-2001 extended the ustar -format to create the ‘‘pax +format to create the ’’pax interchange’’ format.

Cpio Formats
The libarchive library can read a number of common cpio -variants and can write ‘‘odc’’ and -‘‘newc’’ format archives. A cpio +variants and can write ’’odc’’ and +’’newc’’ format archives. A cpio archive stores each entry as a fixed-size header followed by a variable-length filename and variable-length data. Unlike the tar format, the cpio format does only minimal padding of @@ -272,11 +272,11 @@ mtime, and 16-bit binary values for the other fields.

The libarchive library can both read and write this POSIX-standard format, -which is officially known as the ‘‘cpio +which is officially known as the ’’cpio interchange format’’ or the -‘‘octet-oriented cpio archive +’’octet-oriented cpio archive format’’ and sometimes unofficially referred to -as the ‘‘old character format’’. +as the ’’old character format’’. This format stores the header contents as octal values in ASCII. It is standard, portable, and immune from byte-order confusion. File sizes and mtime are limited to 33 bits (8GB @@ -312,7 +312,7 @@ systems with dissimilar user numbering.

Shar Formats
-A ‘‘shell archive’’ is a shell +A ’’shell archive’’ is a shell script that, when executed on a POSIX-compliant system, will recreate a collection of file system objects. The libarchive library can write two different kinds of shar archives:

@@ -379,7 +379,7 @@ variables.

format
Libarchive can read and write zip format archives that have uncompressed entries and entries compressed with the -‘‘deflate’’ algorithm. Other zip +’’deflate’’ algorithm. Other zip compression algorithms are not supported. It can extract jar archives, archives that use Zip64 extensions and self-extracting zip archives. Libarchive can use either of @@ -469,7 +469,7 @@ Need more information

CAB
Libarchive can read Microsoft Cabinet ( -‘‘CAB’’) format archives. TODO: Need +’’CAB’’) format archives. TODO: Need more information.

LHA
@@ -484,7 +484,7 @@ the RARv3 format. Libarchive can also read self-extracting RAR archives.

Warc
-Libarchive can read and write ‘‘web +Libarchive can read and write ’’web archives’’. TODO: Need more information

XAR
diff --git a/archivers/libarchive/files/doc/html/libarchive.3.html b/archivers/libarchive/files/doc/html/libarchive.3.html index bddaee823aa..80906e3a56a 100644 --- a/archivers/libarchive/files/doc/html/libarchive.3.html +++ b/archivers/libarchive/files/doc/html/libarchive.3.html @@ -1,5 +1,5 @@ - + @@ -53,11 +53,11 @@ for:

most variants of the POSIX -‘‘ustar’’ format,

+’’ustar’’ format,

-

the POSIX ‘‘pax +

the POSIX ’’pax interchange’’ format,

@@ -117,11 +117,11 @@ format to use. The library can write

POSIX-standard -‘‘ustar’’ archives,

+’’ustar’’ archives,

-

POSIX ‘‘pax +

POSIX ’’pax interchange format’’ archives,

diff --git a/archivers/libarchive/files/doc/html/libarchive_changes.3.html b/archivers/libarchive/files/doc/html/libarchive_changes.3.html index 7bf820d2c85..6ccb6795fac 100644 --- a/archivers/libarchive/files/doc/html/libarchive_changes.3.html +++ b/archivers/libarchive/files/doc/html/libarchive_changes.3.html @@ -1,5 +1,5 @@ - + @@ -25,8 +25,8 @@ LIBARCHIVE_CHANGES(3)

NAME

-

— changes in libarchive -interface

+

libarchive_changes +— changes in libarchive interface

CHANGES IN LIBARCHIVE 3

@@ -57,7 +57,7 @@ can be easily converted to UTF-8.

Libarchive3 uses the standard iconv library to convert between character sets -and is introducing the notion of a ‘‘default +and is introducing the notion of a ’’default character set for the archive’’. To support this, archive_entry objects can now be bound to a particular archive when they are created. The automatic character set diff --git a/archivers/libarchive/files/doc/html/libarchive_internals.3.html b/archivers/libarchive/files/doc/html/libarchive_internals.3.html index 8be18c9a099..dccacddecfa 100644 --- a/archivers/libarchive/files/doc/html/libarchive_internals.3.html +++ b/archivers/libarchive/files/doc/html/libarchive_internals.3.html @@ -1,5 +1,5 @@ - + diff --git a/archivers/libarchive/files/doc/html/mtree.5.html b/archivers/libarchive/files/doc/html/mtree.5.html index f7d3fba68d6..6cea6e39824 100644 --- a/archivers/libarchive/files/doc/html/mtree.5.html +++ b/archivers/libarchive/files/doc/html/mtree.5.html @@ -1,5 +1,5 @@ - + @@ -43,10 +43,10 @@ Leading whitespace is always ignored.

When encoding file or pathnames, any backslash character or character outside of the 95 printable ASCII characters must be encoded -as a a backslash followed by three octal digits. When -reading mtree files, any appearance of a backslash followed -by three octal digits should be converted into the -corresponding character.

+as a backslash followed by three octal digits. When reading +mtree files, any appearance of a backslash followed by three +octal digits should be converted into the corresponding +character.

Each line is interpreted independently as one of the following types:

@@ -175,7 +175,7 @@ pathname of a file that holds the contents of this file.

The file flags as a symbolic name. See chflags(1) for information on these names. If no flags are to be set the string -‘‘none’’ may be used to override the +’’none’’ may be used to override the current default.

gid

@@ -239,7 +239,7 @@ file hierarchy.

resdevice

The -‘‘resident’’ device number of the +’’resident’’ device number of the file, e.g. the ID of the device that contains the file. Its format is the same as the one for device.

@@ -261,7 +261,7 @@ the file.

sha1

The FIPS 160-1 -(‘‘SHA-1’’) message digest of the +(’’SHA-1’’) message digest of the file.

sha1digest

@@ -272,7 +272,7 @@ file.

sha256

The FIPS 180-2 -(‘‘SHA-256’’) message digest of the +(’’SHA-256’’) message digest of the file.

sha256digest

@@ -283,7 +283,7 @@ file.

sha384

The FIPS 180-2 -(‘‘SHA-384’’) message digest of the +(’’SHA-384’’) message digest of the file.

sha384digest

@@ -294,7 +294,7 @@ file.

sha512

The FIPS 180-2 -(‘‘SHA-512’’) message digest of the +(’’SHA-512’’) message digest of the file.

sha512digest

@@ -367,15 +367,15 @@ as a symbolic name.

HISTORY

The mtree utility -appeared in 4.3BSD−Reno. The MD5 digest capability was -added in FreeBSD 2.1, in response to the widespread use -of programs which can spoof cksum(1). The SHA-1 and -RIPEMD160 digests were added in FreeBSD 4.0, as new -attacks have demonstrated weaknesses in MD5. The SHA-256 -digest was added in FreeBSD 6.0. Support for file flags -was added in FreeBSD 4.0, and mostly comes from NetBSD. -The ‘‘full’’ entry format was added -by NetBSD.

+appeared in 4.3BSD-Reno. The MD5 digest capability was added +in FreeBSD 2.1, in response to the widespread use of +programs which can spoof cksum(1). The SHA-1 and RIPEMD160 +digests were added in FreeBSD 4.0, as new attacks have +demonstrated weaknesses in MD5. The SHA-256 digest was added +in FreeBSD 6.0. Support for file flags was added in +FreeBSD 4.0, and mostly comes from NetBSD. The +’’full’’ entry format was added by +NetBSD.

BSD September 4, 2013 BSD

diff --git a/archivers/libarchive/files/doc/html/tar.5.html b/archivers/libarchive/files/doc/html/tar.5.html index 692a7993167..2e0969b9dbb 100644 --- a/archivers/libarchive/files/doc/html/tar.5.html +++ b/archivers/libarchive/files/doc/html/tar.5.html @@ -1,5 +1,5 @@ - + @@ -50,14 +50,14 @@ entirely of zero bytes.

compatibility with tape drives that use fixed block sizes, programs that read or write tar files always read or write a fixed number of records with each I/O operation. These -‘‘blocks’’ are always a multiple of +’’blocks’’ are always a multiple of the record size. The maximum block size supported by early implementations was 10240 bytes or 20 records. This is still the default for most implementations although block sizes of 1MiB (2048 records) or larger are commonly used with modern high-speed tape drives. (Note: the terms -‘‘block’’ and -‘‘record’’ here are not entirely +’’block’’ and +’’record’’ here are not entirely standard; this document follows the convention established by John Gilmore in documenting pdtar.)

@@ -224,7 +224,7 @@ matches.

and conserve tape, a file with multiple links is only written to the archive the first time it is encountered. The next time it is encountered, the linkflag is set to -an ASCII ‘1’ and the linkname field holds +an ASCII ’1’ and the linkname field holds the first name under which this file appears. (Note that regular files have a null value in the linkflag field.)

@@ -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 -(‘‘POSIX.1’’) standard was released. +(’’POSIX.1’’) standard was released. For best portability, modern implementations should fill the numeric fields with leading zeros.

Pre-POSIX Archives
An early draft of IEEE Std 1003.1-1988 -(‘‘POSIX.1’’) served as the basis +(’’POSIX.1’’) served as the basis for John Gilmore’s pdtar program and many system implementations from the late 1980s and early 1990s. These archives generally follow the POSIX ustar format @@ -255,7 +255,7 @@ described below with the following variations:

The magic value consists of the -five characters ‘‘ustar’’ followed +five characters ’’ustar’’ followed by a space. The version field contains a space character followed by a null.

@@ -273,12 +273,12 @@ archives.

POSIX ustar Archives
-IEEE Std 1003.1-1988 (‘‘POSIX.1’’) +IEEE Std 1003.1-1988 (’’POSIX.1’’) defined a standard tar file format to be read and written by compliant implementations of tar(1). This format is often -called the ‘‘ustar’’ format, after +called the ’’ustar’’ format, after the magic value used in the header. (The name is an acronym -for ‘‘Unix Standard TAR’’.) It +for ’’Unix Standard TAR’’.) It extends the historic format with new fields:

struct @@ -432,40 +432,40 @@ header_posix_ustar {

the earlier linkflag field with several new type values:

-

‘‘0’’

+

’’0’’

Regular file. NUL should be treated as a synonym, for compatibility purposes.

-

‘‘1’’

+

’’1’’

Hard link.

-

‘‘2’’

+

’’2’’

Symbolic link.

-

‘‘3’’

+

’’3’’

Character device node.

-

‘‘4’’

+

’’4’’

Block device node.

-

‘‘5’’

+

’’5’’

Directory.

-

‘‘6’’

+

’’6’’

FIFO node.

-

‘‘7’’

+

’’7’’

Reserved.

@@ -493,7 +493,7 @@ should be set to zero by writers and ignored by readers.

magic

Contains the -magic value ‘‘ustar’’ followed by a +magic value ’’ustar’’ followed by a NUL byte to indicate that this is a POSIX standard archive. Full compliance requires the uname and gname fields be properly set.

@@ -501,7 +501,7 @@ properly set.

version

Version. This should be -‘‘00’’ (two copies of the ASCII +’’00’’ (two copies of the ASCII digit zero) for POSIX standard archives.

uname, gname

@@ -589,14 +589,14 @@ implementation.

Interchange Format
There are many attributes that cannot be portably stored in a POSIX ustar archive. IEEE Std 1003.1-2001 -(‘‘POSIX.1’’) defined a -‘‘pax interchange format’’ that uses +(’’POSIX.1’’) defined a +’’pax interchange format’’ that uses two new types of entries to hold text-formatted metadata that applies to following entries. Note that a pax interchange format archive is a ustar archive in every respect. The new data is stored in ustar-compatible archive -entries that use the ‘‘x’’ or -‘‘g’’ typeflag. In particular, older +entries that use the ’’x’’ or +’’g’’ typeflag. In particular, older implementations that do not fully support these extensions will extract the metadata into regular files, where the metadata can be examined as necessary.

@@ -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 -‘‘BINARY’’, then all textual values +’’BINARY’’, then all textual values are assumed to be in a platform-dependent multi-byte encoding. Note that there are only two valid values for this -key: ‘‘BINARY’’ or -‘‘ISO-IR 10646 2000 UTF-8’’. +key: ’’BINARY’’ or +’’ISO-IR 10646 2000 UTF-8’’. No other values are permitted by the standard, and the latter value should generally not be used as it is the default when this key is not specified. In particular, this @@ -739,7 +739,7 @@ it.

The time when the file was created. (This should not be confused with the POSIX -‘‘ctime’’ attribute, which refers to +’’ctime’’ attribute, which refers to the time when the file metadata was last changed.)

@@ -749,9 +749,9 @@ the time when the file metadata was last changed.)

POSIX.1e-style extended attributes using keys of this form. The key value is URL-encoded: All non-ASCII characters and the two special characters -‘‘=’’ and -‘‘%’’ are encoded as -‘‘%’’ followed by two uppercase +’’=’’ and +’’%’’ are encoded as +’’%’’ followed by two uppercase hexadecimal digits. The value of this key is the extended attribute value encoded in base 64. XXX Detail the base-64 format here XXX

@@ -1137,8 +1137,8 @@ equal to realsize.

They contained a list of files to be renamed or symlinked after extraction; this was originally used to support long names. The contents of this record are a text description of -the operations to be done, in the form ‘‘Rename -%s to %s\n’’ or ‘‘Symlink %s to +the operations to be done, in the form ’’Rename +%s to %s\n’’ or ’’Symlink %s to %s\n’’; in either case, both filenames are escaped using K&R C syntax. Due to security concerns, "N" records are now generally ignored when reading @@ -1147,13 +1147,13 @@ archives.

S

This is a -‘‘sparse’’ regular file. Sparse +’’sparse’’ regular file. Sparse files are stored as a series of fragments. The header contains a list of fragment offset/length pairs. If more than four such entries are required, the header is extended -as necessary with ‘‘extra’’ header +as necessary with ’’extra’’ header extensions (an older format that is no longer used), or -‘‘sparse’’ extensions.

+’’sparse’’ extensions.

V

@@ -1164,7 +1164,7 @@ This entry should generally be ignored on extraction.

magic

The magic field -holds the five characters ‘‘ustar’’ +holds the five characters ’’ustar’’ followed by a space. Note that POSIX ustar archives have a trailing null.

@@ -1173,7 +1173,7 @@ trailing null.

The version field holds a space character followed by a null. Note that POSIX ustar archives use two copies of the ASCII digit -‘‘0’’.

+’’0’’.

atime, ctime

@@ -1200,7 +1200,7 @@ written to the file at appropriate offsets.

isextended

If this is set to non-zero, the -header will be followed by additional ‘‘sparse +header will be followed by additional ’’sparse header’’ records. Each such record contains information about as many as 21 additional sparse blocks as shown here:

@@ -1284,21 +1284,20 @@ total size of the file.

archives
GNU tar 1.14 (XXX check this XXX) and later will write pax interchange format archives when you specify the -−-posix flag. This format follows the pax -interchange format closely, using some SCHILY tags -and introducing new keywords to store sparse file -information. There have been three iterations of the sparse -file support, referred to as -‘‘0.0’’, -‘‘0.1’’, and -‘‘1.0’’.

+--posix flag. This format follows the pax interchange +format closely, using some SCHILY tags and +introducing new keywords to store sparse file information. +There have been three iterations of the sparse file support, +referred to as ’’0.0’’, +’’0.1’’, and +’’1.0’’.

GNU.sparse.numblocks, GNU.sparse.offset, GNU.sparse.numbytes, GNU.sparse.size

The -‘‘0.0’’ format used an initial +’’0.0’’ format used an initial GNU.sparse.numblocks attribute to indicate the number of blocks in the file, a pair of GNU.sparse.offset and GNU.sparse.numbytes to indicate the offset and @@ -1313,7 +1312,7 @@ which is not officially permitted by the standards.

GNU.sparse.map

The -‘‘0.1’’ format used a single +’’0.1’’ format used a single attribute that stored a comma-separated list of decimal numbers. Each pair of numbers indicated the offset and size, respectively, of a block of data. This does not work well if @@ -1326,7 +1325,7 @@ simply discard unrecognized attributes.

GNU.sparse.realsize

The -‘‘1.0’’ format stores the sparse +’’1.0’’ format stores the sparse block map in one or more 512-byte blocks prepended to the file data in the entry body. The pax attributes indicate the existence of this map (via the GNU.sparse.major and @@ -1342,7 +1341,7 @@ XXX More Details Needed XXX

Solaris tar (beginning with SunOS XXX 5.7 ?? XXX) supports an -‘‘extended’’ format that is +’’extended’’ format that is fundamentally similar to pax interchange format, with the following differences:

@@ -1381,7 +1380,7 @@ Tar
The tar distributed with Apple’s Mac OS X stores most regular files as two separate files in the tar archive. The two files have the same name except that the first one has -‘‘._’’ prepended to the last path +’’._’’ 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 @@ -1389,7 +1388,7 @@ recreate the original file on disk, each separate file can be extracted and the Mac OS X copyfile() function can be used to unpack the separate metadata file and apply it to th regular file. Conversely, the same function provides a -‘‘pack’’ option to encode the +’’pack’’ option to encode the extended metadata from a file into a separate file whose contents can then be put into a tar archive.

@@ -1527,11 +1526,11 @@ interchange format per-file extensions.

The tar utility is no longer a part of POSIX or the Single Unix Standard. It last appeared in Version 2 of the Single UNIX Specification -(‘‘SUSv2’’). It has been supplanted +(’’SUSv2’’). It has been supplanted in subsequent standards by pax(1). The ustar format is currently part of the specification for the pax(1) utility. The pax interchange file format is new with IEEE Std -1003.1-2001 (‘‘POSIX.1’’).

+1003.1-2001 (’’POSIX.1’’).

HISTORY

diff --git a/archivers/libarchive/files/doc/man/Makefile b/archivers/libarchive/files/doc/man/Makefile index 5f05971b71c..0c43b1d0071 100644 --- a/archivers/libarchive/files/doc/man/Makefile +++ b/archivers/libarchive/files/doc/man/Makefile @@ -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-formats.5 libarchive.3 libarchive_changes.3 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.3 libarchive_changes.3 libarchive-formats.5 libarchive_internals.3 mtree.5 tar.5 bsdtar.1 bsdcpio.1 diff --git a/archivers/libarchive/files/doc/man/archive_entry.3 b/archivers/libarchive/files/doc/man/archive_entry.3 index f0031d42dfa..35f2d741edd 100644 --- a/archivers/libarchive/files/doc/man/archive_entry.3 +++ b/archivers/libarchive/files/doc/man/archive_entry.3 @@ -1,4 +1,4 @@ -.TH ARCHIVE_ENTRY 3 "Feburary 2, 2012" "" +.TH ARCHIVE_ENTRY 3 "February 2, 2012" "" .SH NAME .ad l \fB\%archive_entry_clear\fP, diff --git a/archivers/libarchive/files/doc/man/archive_entry_acl.3 b/archivers/libarchive/files/doc/man/archive_entry_acl.3 index 8dd2008d420..52c9b1c5751 100644 --- a/archivers/libarchive/files/doc/man/archive_entry_acl.3 +++ b/archivers/libarchive/files/doc/man/archive_entry_acl.3 @@ -6,7 +6,7 @@ \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_from_text_w\fP, \fB\%archive_entry_acl_next\fP, \fB\%archive_entry_acl_next_w\fP, \fB\%archive_entry_acl_reset\fP, @@ -240,7 +240,7 @@ Only inherit, do not apply the permission on the directory itself. 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. +Trigger alarm or audit on successful access. .TP .BR ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (.B F ) Trigger alarm or audit on failed access. @@ -254,7 +254,7 @@ and \fB\%archive_entry_acl_add_entry_w\fP() add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions -are updated. An archive enry cannot contain both POSIX.1e and NFSv4 ACL +are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. .PP \fB\%archive_entry_acl_clear\fP() @@ -283,7 +283,7 @@ for POSIX.1e ACLs and 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. +the three non-extended ACLs are added. .PP \fB\%archive_entry_acl_from_text\fP() and @@ -348,7 +348,7 @@ 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 +string of ACL entries separated by newline. If the pointer is not NULL, then the function shall return the length of the string (not including the NULL terminator) in the location pointed to by diff --git a/archivers/libarchive/files/doc/man/archive_entry_paths.3 b/archivers/libarchive/files/doc/man/archive_entry_paths.3 index 471632e0600..2468825ee56 100644 --- a/archivers/libarchive/files/doc/man/archive_entry_paths.3 +++ b/archivers/libarchive/files/doc/man/archive_entry_paths.3 @@ -6,25 +6,25 @@ \fB\%archive_entry_set_hardlink\fP, \fB\%archive_entry_copy_hardlink\fP, \fB\%archive_entry_copy_hardlink_w\fP, -\fB\%archve_entry_update_hardlink_utf8\fP, +\fB\%archive_entry_update_hardlink_utf8\fP, \fB\%archive_entry_set_link\fP, \fB\%archive_entry_copy_link\fP, \fB\%archive_entry_copy_link_w\fP, -\fB\%archve_entry_update_link_utf8\fP, +\fB\%archive_entry_update_link_utf8\fP, \fB\%archive_entry_pathname\fP, \fB\%archive_entry_pathname_w\fP, \fB\%archive_entry_set_pathname\fP, \fB\%archive_entry_copy_pathname\fP, \fB\%archive_entry_copy_pathname_w\fP, -\fB\%archve_entry_update_pathname_utf8\fP, +\fB\%archive_entry_update_pathname_utf8\fP, \fB\%archive_entry_sourcepath\fP, \fB\%archive_entry_copy_sourcepath\fP, -\fB\%archive_entry_symlink,\fP -\fB\%archive_entry_symlink_w,\fP +\fB\%archive_entry_symlink\fP, +\fB\%archive_entry_symlink_w\fP, \fB\%archive_entry_set_symlink\fP, \fB\%archive_entry_copy_symlink\fP, \fB\%archive_entry_copy_symlink_w\fP, -\fB\%archve_entry_update_symlink_utf8\fP +\fB\%archive_entry_update_symlink_utf8\fP \- functions for manipulating path names in archive entry descriptions .SH LIBRARY .ad l diff --git a/archivers/libarchive/files/doc/man/archive_entry_perms.3 b/archivers/libarchive/files/doc/man/archive_entry_perms.3 index 294f6989c77..94be16b9a1b 100644 --- a/archivers/libarchive/files/doc/man/archive_entry_perms.3 +++ b/archivers/libarchive/files/doc/man/archive_entry_perms.3 @@ -8,8 +8,8 @@ \fB\%archive_entry_perm\fP, \fB\%archive_entry_set_perm\fP, \fB\%archive_entry_strmode\fP, -\fB\%archive_entry_uname\fP -\fB\%archive_entry_uname_w\fP +\fB\%archive_entry_uname\fP, +\fB\%archive_entry_uname_w\fP, \fB\%archive_entry_set_uname\fP, \fB\%archive_entry_copy_uname\fP, \fB\%archive_entry_copy_uname_w\fP, diff --git a/archivers/libarchive/files/doc/man/archive_read_disk.3 b/archivers/libarchive/files/doc/man/archive_read_disk.3 index 58f31996595..130db8a5331 100644 --- a/archivers/libarchive/files/doc/man/archive_read_disk.3 +++ b/archivers/libarchive/files/doc/man/archive_read_disk.3 @@ -1,7 +1,8 @@ -.TH ARCHIVE_READ_DISK 3 "December 30, 2016" "" +.TH ARCHIVE_READ_DISK 3 "April 3, 2017" "" .SH NAME .ad l \fB\%archive_read_disk_new\fP, +\fB\%archive_read_disk_set_behavior\fP, \fB\%archive_read_disk_set_symlink_logical\fP, \fB\%archive_read_disk_set_symlink_physical\fP, \fB\%archive_read_disk_set_symlink_hybrid\fP, @@ -10,10 +11,7 @@ \fB\%archive_read_disk_uname\fP, \fB\%archive_read_disk_set_uname_lookup\fP, \fB\%archive_read_disk_set_gname_lookup\fP, -\fB\%archive_read_disk_set_standard_lookup\fP, -\fB\%archive_read_close\fP, -\fB\%archive_read_finish\fP, -\fB\%archive_read_free\fP +\fB\%archive_read_disk_set_standard_lookup\fP \- functions for reading objects from disk .SH LIBRARY .ad l @@ -28,6 +26,10 @@ Streaming Archive Library (libarchive, -larchive) .br \fIint\fP .br +\fB\%archive_read_disk_set_behavior\fP(\fI\%struct\ archive\ *\fP, \fI\%int\fP); +.br +\fIint\fP +.br \fB\%archive_read_disk_set_symlink_logical\fP(\fI\%struct\ archive\ *\fP); .br \fIint\fP @@ -61,18 +63,6 @@ Streaming Archive Library (libarchive, -larchive) \fIint\fP .br \fB\%archive_read_disk_entry_from_file\fP(\fI\%struct\ archive\ *\fP, \fI\%struct\ archive_entry\ *\fP, \fI\%int\ fd\fP, \fI\%const\ struct\ stat\ *\fP); -.br -\fIint\fP -.br -\fB\%archive_read_close\fP(\fI\%struct\ archive\ *\fP); -.br -\fIint\fP -.br -\fB\%archive_read_finish\fP(\fI\%struct\ archive\ *\fP); -.br -\fIint\fP -.br -\fB\%archive_read_free\fP(\fI\%struct\ archive\ *\fP); .SH DESCRIPTION .ad l These functions provide an API for reading information about @@ -87,6 +77,59 @@ Allocates and initializes a Tn struct archive object suitable for reading object information from disk. .TP +\fB\%archive_read_disk_set_behavior\fP() +Configures various behavior options when reading entries from disk. +The flags field consists of a bitwise OR of one or more of the +following values: +.RS 5 +.TP +\fBARCHIVE_READDISK_HONOR_NODUMP\fP +Skip files and directories with the nodump file attribute (file flag) set. +By default, the nodump file atrribute is ignored. +.TP +\fBARCHIVE_READDISK_MAC_COPYFILE\fP +Mac OS X specific. Read metadata (ACLs and extended attributes) with +\fBcopyfile\fP(3). +By default, metadata is read using +\fBcopyfile\fP(3). +.TP +\fBARCHIVE_READDISK_NO_ACL\fP +Do not read Access Control Lists. +By default, ACLs are read from disk. +.TP +\fBARCHIVE_READDISK_NO_FFLAGS\fP +Do not read file attributes (file flags). +By default, file attributes are read from disk. +See +\fBchattr\fP(1) +(Linux) +or +\fBchflags\fP(1) +(FreeBSD, Mac OS X) +for more information on file attributes. +.TP +\fBARCHIVE_READDISK_NO_TRAVERSE_MOUNTS\fP +Do not traverse mount points. +By defaut, moint points are traversed. +.TP +\fBARCHIVE_READDISK_NO_XATTR\fP +Do not read extended file attributes (xattrs). +By default, extended file attributes are read from disk. +See +\fBxattr\fP(7) +(Linux,) +\fBxattr\fP(2) +(Mac OS X,) +or +\fBgetextattr\fP(8) +(FreeBSD) +for more information on extended file attributes. +.TP +\fBARCHIVE_READDISK_RESTORE_ATIME\fP +Restore access time of traversed files. +By default, access time of traversed files is not restored. +.RE +.TP \fB\%archive_read_disk_set_symlink_logical\fP(), \fB\%archive_read_disk_set_symlink_physical\fP(), \fB\%archive_read_disk_set_symlink_hybrid\fP() @@ -168,20 +211,6 @@ using the currently registered lookup functions above. This affects the file ownership fields and ACL values in the Tn struct archive_entry object. -.TP -\fB\%archive_read_close\fP() -Does nothing for -Tn archive_read_disk -handles. -.TP -\fB\%archive_read_finish\fP() -This is a deprecated synonym for -\fB\%archive_read_free\fP(). -.TP -\fB\%archive_read_free\fP() -Invokes -\fB\%archive_read_close\fP() -if it was not invoked manually, then releases all resources. .RE More information about the \fIstruct\fP archive diff --git a/archivers/libarchive/files/doc/man/archive_read_open.3 b/archivers/libarchive/files/doc/man/archive_read_open.3 index eaa344bb368..c22c17434cd 100644 --- a/archivers/libarchive/files/doc/man/archive_read_open.3 +++ b/archivers/libarchive/files/doc/man/archive_read_open.3 @@ -6,7 +6,7 @@ \fB\%archive_read_open_fd\fP, \fB\%archive_read_open_FILE\fP, \fB\%archive_read_open_filename\fP, -\fB\%archive_read_open_memory\fP, +\fB\%archive_read_open_memory\fP \- functions for reading streaming archives .SH LIBRARY .ad l @@ -37,7 +37,7 @@ Streaming Archive Library (libarchive, -larchive) .br \fIint\fP .br -\fB\%archive_read_open_memory\fP(\fI\%struct\ archive\ *\fP, \fI\%void\ *buff\fP, \fI\%size_t\ size\fP); +\fB\%archive_read_open_memory\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ void\ *buff\fP, \fI\%size_t\ size\fP); .SH DESCRIPTION .ad l .RS 5 diff --git a/archivers/libarchive/files/doc/man/archive_write_data.3 b/archivers/libarchive/files/doc/man/archive_write_data.3 index aa1992d3de4..9ea9be413dd 100644 --- a/archivers/libarchive/files/doc/man/archive_write_data.3 +++ b/archivers/libarchive/files/doc/man/archive_write_data.3 @@ -1,7 +1,8 @@ -.TH ARCHIVE_WRITE_DATA 3 "February 2, 2012" "" +.TH ARCHIVE_WRITE_DATA 3 "February 28, 2017" "" .SH NAME .ad l -\fB\%archive_write_data\fP +\fB\%archive_write_data\fP, +\fB\%archive_write_data_block\fP \- functions for creating archives .SH LIBRARY .ad l @@ -13,9 +14,32 @@ Streaming Archive Library (libarchive, -larchive) \fIla_ssize_t\fP .br \fB\%archive_write_data\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ void\ *\fP, \fI\%size_t\fP); +.br +\fIla_ssize_t\fP +.br +\fB\%archive_write_data_block\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ void\ *\fP, \fI\%size_t\ size\fP, \fI\%int64_t\ offset\fP); .SH DESCRIPTION .ad l +.RS 5 +.TP +\fB\%archive_write_data\fP() +Write data corresponding to the header just written. +.TP +\fB\%archive_write_data_block\fP() Write data corresponding to the header just written. +This is like +\fB\%archive_write_data\fP() +except that it performs a seek on the file being +written to the specified offset before writing the data. +This is useful when restoring sparse files from archive +formats that support sparse files. +Returns number of bytes written or -1 on error. +(Note: This is currently not supported for +Tn archive_write +handles, only for +Tn archive_write_disk +handles. +.RE .SH RETURN VALUES .ad l This function returns the number of bytes actually written, or diff --git a/archivers/libarchive/files/doc/man/archive_write_disk.3 b/archivers/libarchive/files/doc/man/archive_write_disk.3 index 5ed4c3bafd1..ffc14930bbc 100644 --- a/archivers/libarchive/files/doc/man/archive_write_disk.3 +++ b/archivers/libarchive/files/doc/man/archive_write_disk.3 @@ -1,4 +1,4 @@ -.TH ARCHIVE_WRITE_DISK 3 "February 2, 2012" "" +.TH ARCHIVE_WRITE_DISK 3 "April 3, 2017" "" .SH NAME .ad l \fB\%archive_write_disk_new\fP, @@ -6,14 +6,7 @@ \fB\%archive_write_disk_set_skip_file\fP, \fB\%archive_write_disk_set_group_lookup\fP, \fB\%archive_write_disk_set_standard_lookup\fP, -\fB\%archive_write_disk_set_user_lookup\fP, -\fB\%archive_write_header\fP, -\fB\%archive_write_data\fP, -\fB\%archive_write_data_block\fP, -\fB\%archive_write_finish_entry\fP, -\fB\%archive_write_close\fP, -\fB\%archive_write_finish\fP -\fB\%archive_write_free\fP +\fB\%archive_write_disk_set_user_lookup\fP \- functions for creating objects on disk .SH LIBRARY .ad l @@ -45,34 +38,6 @@ Streaming Archive Library (libarchive, -larchive) \fIint\fP .br \fB\%archive_write_disk_set_user_lookup\fP(\fI\%struct\ archive\ *\fP, \fI\%void\ *\fP, \fI\%uid_t\ (*)(void\ *,\ const\ char\ *uname,\ uid_t\ uid)\fP, \fI\%void\ (*cleanup)(void\ *)\fP); -.br -\fIint\fP -.br -\fB\%archive_write_header\fP(\fI\%struct\ archive\ *\fP, \fI\%struct\ archive_entry\ *\fP); -.br -\fIla_ssize_t\fP -.br -\fB\%archive_write_data\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ void\ *\fP, \fI\%size_t\fP); -.br -\fIla_ssize_t\fP -.br -\fB\%archive_write_data_block\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ void\ *\fP, \fI\%size_t\ size\fP, \fI\%int64_t\ offset\fP); -.br -\fIint\fP -.br -\fB\%archive_write_finish_entry\fP(\fI\%struct\ archive\ *\fP); -.br -\fIint\fP -.br -\fB\%archive_write_close\fP(\fI\%struct\ archive\ *\fP); -.br -\fIint\fP -.br -\fB\%archive_write_finish\fP(\fI\%struct\ archive\ *\fP); -.br -\fIint\fP -.br -\fB\%archive_write_free\fP(\fI\%struct\ archive\ *\fP); .SH DESCRIPTION .ad l These functions provide a complete API for creating objects on @@ -113,6 +78,38 @@ The options field consists of a bitwise OR of one or more of the following values: .RS 5 .TP +\fBARCHIVE_EXTRACT_ACL\fP +Attempt to restore Access Control Lists. +By default, extended ACLs are ignored. +.TP +\fBARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS\fP +Before removing a file system object prior to replacing it, clear +platform-specific file flags which might prevent its removal. +.TP +\fBARCHIVE_EXTRACT_FFLAGS\fP +Attempt to restore file attributes (file flags). +By default, file attributes are ignored. +See +\fBchattr\fP(1) +(Linux) +or +\fBchflags\fP(1) +(FreeBSD, Mac OS X) +for more information on file attributes. +.TP +\fBARCHIVE_EXTRACT_MAC_METADATA\fP +Mac OS X specific. Restore metadata using +\fBcopyfile\fP(3). +By default, +\fBcopyfile\fP(3) +metadata is ignored. +.TP +\fBARCHIVE_EXTRACT_NO_OVERWRITE\fP +Existing files on disk will not be overwritten. +By default, existing regular files are truncated and overwritten; +existing directories will have their permissions updated; +other pre-existing objects are unlinked and recreated from scratch. +.TP \fBARCHIVE_EXTRACT_OWNER\fP The user and group IDs should be set on the restored file. By default, the user and group IDs are not restored. @@ -130,36 +127,18 @@ if the default user and group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed. .TP -\fBARCHIVE_EXTRACT_TIME\fP -The timestamps (mtime, ctime, and atime) should be restored. -By default, they are ignored. -Note that restoring of atime is not currently supported. -.TP -\fBARCHIVE_EXTRACT_NO_OVERWRITE\fP -Existing files on disk will not be overwritten. -By default, existing regular files are truncated and overwritten; -existing directories will have their permissions updated; -other pre-existing objects are unlinked and recreated from scratch. -.TP -\fBARCHIVE_EXTRACT_UNLINK\fP -Existing files on disk will be unlinked before any attempt to -create them. -In some cases, this can prove to be a significant performance improvement. -By default, existing files are truncated and rewritten, but -the file is not recreated. -In particular, the default behavior does not break existing hard links. -.TP -\fBARCHIVE_EXTRACT_ACL\fP -Attempt to restore ACLs. -By default, extended ACLs are ignored. -.TP -\fBARCHIVE_EXTRACT_FFLAGS\fP -Attempt to restore extended file flags. -By default, file flags are ignored. +\fBARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS\fP +Refuse to extract an absolute path. +The default is to not refuse such paths. .TP -\fBARCHIVE_EXTRACT_XATTR\fP -Attempt to restore POSIX.1e extended attributes. -By default, they are ignored. +\fBARCHIVE_EXTRACT_SECURE_NODOTDOT\fP +Refuse to extract a path that contains a +\fI\& ..\fP +element anywhere within it. +The default is to not refuse such paths. +Note that paths ending in +\fI\& ..\fP +always cause an error, regardless of this flag. .TP \fBARCHIVE_EXTRACT_SECURE_SYMLINKS\fP Refuse to extract any object whose final location would be altered @@ -169,32 +148,41 @@ caused by archives that (deliberately or otherwise) extract files outside of the current directory. The default is not to perform this check. If +.TP +\fBARCHIVE_EXTRACT_SPARSE\fP +Scan data for blocks of NUL bytes and try to recreate them with holes. +This results in sparse files, independent of whether the archive format +supports or uses them. \fBARCHIVE_EXTRACT_UNLINK\fP is specified together with this option, the library will remove any intermediate symlinks it finds and return an error only if such symlink could not be removed. .TP -\fBARCHIVE_EXTRACT_SECURE_NODOTDOT\fP -Refuse to extract a path that contains a -\fI\& ..\fP -element anywhere within it. -The default is to not refuse such paths. -Note that paths ending in -\fI\& ..\fP -always cause an error, regardless of this flag. -.TP -\fBARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS\fP -Refuse to extract an absolute path. -The default is to not refuse such paths. +\fBARCHIVE_EXTRACT_TIME\fP +The timestamps (mtime, ctime, and atime) should be restored. +By default, they are ignored. +Note that restoring of atime is not currently supported. .TP -\fBARCHIVE_EXTRACT_SPARSE\fP -Scan data for blocks of NUL bytes and try to recreate them with holes. -This results in sparse files, independent of whether the archive format -supports or uses them. +\fBARCHIVE_EXTRACT_UNLINK\fP +Existing files on disk will be unlinked before any attempt to +create them. +In some cases, this can prove to be a significant performance improvement. +By default, existing files are truncated and rewritten, but +the file is not recreated. +In particular, the default behavior does not break existing hard links. .TP -\fBARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS\fP -Before removing a file system object prior to replacing it, clear -platform-specific file flags which might prevent its removal. +\fBARCHIVE_EXTRACT_XATTR\fP +Attempt to restore extended file attributes. +By default, they are ignored. +See +\fBxattr\fP(7) +(Linux,) +\fBxattr\fP(2) +(Mac OS X,) +or +\fBgetextattr\fP(8) +(FreeBSD) +for more information on extended file attributes. .RE .TP \fB\%archive_write_disk_set_group_lookup\fP(), @@ -231,67 +219,6 @@ the number of calls to \fBgetpwnam\fP(3) and \fBgetgrnam\fP(3). -.TP -\fB\%archive_write_header\fP() -Build and write a header using the data in the provided -Tn struct archive_entry -structure. -See -\fBarchive_entry\fP(3) -for information on creating and populating -Tn struct archive_entry -objects. -.TP -\fB\%archive_write_data\fP() -Write data corresponding to the header just written. -Returns number of bytes written or -1 on error. -.TP -\fB\%archive_write_data_block\fP() -Write data corresponding to the header just written. -This is like -\fB\%archive_write_data\fP() -except that it performs a seek on the file being -written to the specified offset before writing the data. -This is useful when restoring sparse files from archive -formats that support sparse files. -Returns number of bytes written or -1 on error. -(Note: This is currently not supported for -Tn archive_write -handles, only for -Tn archive_write_disk -handles.) -.TP -\fB\%archive_write_finish_entry\fP() -Close out the entry just written. -Ordinarily, clients never need to call this, as it -is called automatically by -\fB\%archive_write_next_header\fP() -and -\fB\%archive_write_close\fP() -as needed. -However, some file attributes are written to disk only -after the file is closed, so this can be necessary -if you need to work with the file on disk right away. -.TP -\fB\%archive_write_close\fP() -Set any attributes that could not be set during the initial restore. -For example, directory timestamps are not restored initially because -restoring a subsequent file would alter that timestamp. -Similarly, non-writable directories are initially created with -write permissions (so that their contents can be restored). -The -\fB\%archive_write_disk_new\fP -library maintains a list of all such deferred attributes and -sets them when this function is invoked. -.TP -\fB\%archive_write_finish\fP() -This is a deprecated synonym for -\fB\%archive_write_free\fP(). -.TP -\fB\%archive_write_free\fP() -Invokes -\fB\%archive_write_close\fP() -if it was not invoked manually, then releases all resources. .RE More information about the \fIstruct\fP archive diff --git a/archivers/libarchive/files/doc/man/archive_write_finish_entry.3 b/archivers/libarchive/files/doc/man/archive_write_finish_entry.3 index b76ac62d9fa..4523f232448 100644 --- a/archivers/libarchive/files/doc/man/archive_write_finish_entry.3 +++ b/archivers/libarchive/files/doc/man/archive_write_finish_entry.3 @@ -1,4 +1,4 @@ -.TH ARCHIVE_WRITE_FINISH_ENTRY 3 "February 2, 2012" "" +.TH ARCHIVE_WRITE_FINISH_ENTRY 3 "February 28, 2017" "" .SH NAME .ad l \fB\%archive_write_finish_entry\fP @@ -23,6 +23,9 @@ is called automatically by and \fB\%archive_write_close\fP() as needed. +For +Tn archive_write_disk +handles, this flushes pending file attribute changes like modification time. .SH RETURN VALUES .ad l This function returns diff --git a/archivers/libarchive/files/doc/man/bsdtar.1 b/archivers/libarchive/files/doc/man/bsdtar.1 index 3b49475a93a..46ebe42e2a6 100644 --- a/archivers/libarchive/files/doc/man/bsdtar.1 +++ b/archivers/libarchive/files/doc/man/bsdtar.1 @@ -1,4 +1,4 @@ -.TH TAR 1 "February 24, 2017" "" +.TH TAR 1 "February 25, 2017" "" .SH NAME .ad l \fB\%tar\fP @@ -172,7 +172,7 @@ restricted pax format and bzip2 compression. (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 +and the default behavior in c, r, and u modes (except on Mac OS X) or if \fB\%tar\fP is run in x mode as root. On Mac OS X this option translates extended ACLs to NFSv4 ACLs. To store extended ACLs the @@ -438,7 +438,7 @@ Honor the nodump file flag by skipping this file. .TP \fB\-Fl\fP nopreserveHFSCompression (x mode only) -Mac OS X specific(v10.6 or later). Do not compress extracted regular files +Mac OS X specific (v10.6 or later). Do not compress extracted regular files which were compressed with HFS+ compression before archived. By default, compress the regular files again with HFS+ compression. .TP @@ -460,7 +460,7 @@ 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). +is run as non-root in x mode (on Mac OS X as any user in c, r, u and x modes). .TP \fB\-Fl\fP no-fflags (c, r, u, x modes only) @@ -499,14 +499,7 @@ This is the reverse of \fB\-p\fP and the default behavior if \fB\%tar\fP -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. +is run as non-root. .TP \fB\-Fl\fP no-xattrs (c, r, u, x modes only) @@ -734,16 +727,16 @@ This option suppresses these behaviors. (x mode only) Preserve file permissions. 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 +extended attributes and extended file flags, if available, for each item +extracted from the archive. This is te reverse of +\fB\-Fl\fP no-same-permissions +and the default if \fB\%tar\fP -is being run by root and can be overridden by also specifying +is being run by root and can be partially overridden by also specifying \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-mac-metadata +or \fB\-Fl\fP no-xattrs. .TP \fB\-Fl\fP passphrase \fIpassphrase\fP diff --git a/archivers/libarchive/files/doc/man/libarchive_changes.3 b/archivers/libarchive/files/doc/man/libarchive_changes.3 index e3ecb318d04..15e14d1596f 100644 --- a/archivers/libarchive/files/doc/man/libarchive_changes.3 +++ b/archivers/libarchive/files/doc/man/libarchive_changes.3 @@ -1,6 +1,7 @@ .TH LIBARCHIVE_CHANGES 3 "December 23, 2011" "" .SH NAME .ad l +\fB\%libarchive_changes\fP \- changes in libarchive interface .SH CHANGES IN LIBARCHIVE 3 .ad l diff --git a/archivers/libarchive/files/doc/man/mtree.5 b/archivers/libarchive/files/doc/man/mtree.5 index 79f05a4c558..e53f97c3f1d 100644 --- a/archivers/libarchive/files/doc/man/mtree.5 +++ b/archivers/libarchive/files/doc/man/mtree.5 @@ -18,7 +18,7 @@ Leading whitespace is always ignored. .PP When encoding file or pathnames, any backslash character or character outside of the 95 printable ASCII characters must be -encoded as a a backslash followed by three +encoded as a backslash followed by three octal digits. When reading mtree files, any appearance of a backslash followed by three octal digits should be converted into the diff --git a/archivers/libarchive/files/doc/pdf/Makefile b/archivers/libarchive/files/doc/pdf/Makefile index c71cb841f80..5e631786cc6 100644 --- a/archivers/libarchive/files/doc/pdf/Makefile +++ b/archivers/libarchive/files/doc/pdf/Makefile @@ -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-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 +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 diff --git a/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf index 128a7643193..3c2a21f3b29 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf index 93103fdd0be..a13889d951b 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf index 25b1d23cdea..54000839774 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf index ae8b20f35db..65b396645e6 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf index 4d1acddd844..920105bb9a7 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf index 724b9952007..b886f9ce8d1 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf b/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf index 731989e5a20..7c96650939e 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read.3.pdf index 631327e856b..47e175f5ada 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf index 5be56a1a170..032adc289f0 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf index 2e76797a662..8984373cf8c 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf index 7aaa41c1088..6c8e0e09e51 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf index 5c0ff378d84..be5daf67838 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf index b82d50dfbf4..f5fa6a2fe20 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf index 943ba6175ac..9ad23301f4a 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf index eafb141a5f9..de829ee8e22 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf index 24d5f1fb0ba..144103d9df8 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf index 96044570dd3..a96e278630a 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf b/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf index c1480717ffc..6685010c46c 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_util.3.pdf b/archivers/libarchive/files/doc/pdf/archive_util.3.pdf index 3ea08605f46..a05f69b0f08 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_util.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_util.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write.3.pdf index ddedac0c062..22e9c173e24 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf index dd4d69762b1..52f369d20ab 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf index c27d764f624..1c700296d6f 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf index a6143170ae5..6250444551c 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf index eaad66579da..db48f2e2ef4 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf index 8140ea0127e..45754911523 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf index ba5073ac7a1..e5affd6126b 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf index 5b4e0393f2d..f1b3ec4827c 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf index 2bec71492a9..3e1cecdfa7f 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf index 996feb57719..b77f9d6bb47 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf index 9723e6b0da0..2b40a0a34d9 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf b/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf index 1d8bfb33914..1808d7033d0 100644 Binary files a/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf and b/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf b/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf index 17e73ffd872..353de24aa22 100644 Binary files a/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf and b/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf b/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf index c48ccc4d8f0..4422988748b 100644 Binary files a/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf and b/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/cpio.5.pdf b/archivers/libarchive/files/doc/pdf/cpio.5.pdf index 974420e2cc3..f35600de14f 100644 Binary files a/archivers/libarchive/files/doc/pdf/cpio.5.pdf and b/archivers/libarchive/files/doc/pdf/cpio.5.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf b/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf index 397de7d95ff..06fb38caec0 100644 Binary files a/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf and b/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/libarchive.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive.3.pdf index db0ba755625..d91e4ec9ff0 100644 Binary files a/archivers/libarchive/files/doc/pdf/libarchive.3.pdf and b/archivers/libarchive/files/doc/pdf/libarchive.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf index a588be4c171..a8698caacc8 100644 Binary files a/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf and b/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf b/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf index ce74db91861..3aff2463924 100644 Binary files a/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf and b/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/mtree.5.pdf b/archivers/libarchive/files/doc/pdf/mtree.5.pdf index c9e55cf752f..07b3d080ce9 100644 Binary files a/archivers/libarchive/files/doc/pdf/mtree.5.pdf and b/archivers/libarchive/files/doc/pdf/mtree.5.pdf differ diff --git a/archivers/libarchive/files/doc/pdf/tar.5.pdf b/archivers/libarchive/files/doc/pdf/tar.5.pdf index 5414efcd63a..1e1975d5fbb 100644 Binary files a/archivers/libarchive/files/doc/pdf/tar.5.pdf and b/archivers/libarchive/files/doc/pdf/tar.5.pdf differ diff --git a/archivers/libarchive/files/doc/text/Makefile b/archivers/libarchive/files/doc/text/Makefile index d5f91ef1d5e..d58f7d94b4e 100644 --- a/archivers/libarchive/files/doc/text/Makefile +++ b/archivers/libarchive/files/doc/text/Makefile @@ -104,15 +104,15 @@ archive_write_set_passphrase.3.txt: ../../libarchive/archive_write_set_passphras cpio.5.txt: ../../libarchive/cpio.5 nroff -mdoc ../../libarchive/cpio.5 | col -b > cpio.5.txt -libarchive-formats.5.txt: ../../libarchive/libarchive-formats.5 - nroff -mdoc ../../libarchive/libarchive-formats.5 | col -b > libarchive-formats.5.txt - libarchive.3.txt: ../../libarchive/libarchive.3 nroff -mdoc ../../libarchive/libarchive.3 | col -b > libarchive.3.txt libarchive_changes.3.txt: ../../libarchive/libarchive_changes.3 nroff -mdoc ../../libarchive/libarchive_changes.3 | col -b > libarchive_changes.3.txt +libarchive-formats.5.txt: ../../libarchive/libarchive-formats.5 + nroff -mdoc ../../libarchive/libarchive-formats.5 | col -b > libarchive-formats.5.txt + libarchive_internals.3.txt: ../../libarchive/libarchive_internals.3 nroff -mdoc ../../libarchive/libarchive_internals.3 | col -b > libarchive_internals.3.txt @@ -127,4 +127,4 @@ bsdtar.1.txt: ../../tar/bsdtar.1 bsdcpio.1.txt: ../../cpio/bsdcpio.1 nroff -mdoc ../../cpio/bsdcpio.1 | col -b > bsdcpio.1.txt -all: archive_entry.3.txt archive_entry_acl.3.txt archive_entry_linkify.3.txt archive_entry_paths.3.txt archive_entry_perms.3.txt archive_entry_stat.3.txt archive_entry_time.3.txt archive_read.3.txt archive_read_add_passphrase.3.txt archive_read_data.3.txt archive_read_disk.3.txt archive_read_extract.3.txt archive_read_filter.3.txt archive_read_format.3.txt archive_read_free.3.txt archive_read_header.3.txt archive_read_new.3.txt archive_read_open.3.txt archive_read_set_options.3.txt archive_util.3.txt archive_write.3.txt archive_write_blocksize.3.txt archive_write_data.3.txt archive_write_disk.3.txt archive_write_filter.3.txt archive_write_finish_entry.3.txt archive_write_format.3.txt archive_write_free.3.txt archive_write_header.3.txt archive_write_new.3.txt archive_write_open.3.txt archive_write_set_options.3.txt archive_write_set_passphrase.3.txt cpio.5.txt libarchive-formats.5.txt libarchive.3.txt libarchive_changes.3.txt libarchive_internals.3.txt mtree.5.txt tar.5.txt bsdtar.1.txt bsdcpio.1.txt +all: archive_entry.3.txt archive_entry_acl.3.txt archive_entry_linkify.3.txt archive_entry_paths.3.txt archive_entry_perms.3.txt archive_entry_stat.3.txt archive_entry_time.3.txt archive_read.3.txt archive_read_add_passphrase.3.txt archive_read_data.3.txt archive_read_disk.3.txt archive_read_extract.3.txt archive_read_filter.3.txt archive_read_format.3.txt archive_read_free.3.txt archive_read_header.3.txt archive_read_new.3.txt archive_read_open.3.txt archive_read_set_options.3.txt archive_util.3.txt archive_write.3.txt archive_write_blocksize.3.txt archive_write_data.3.txt archive_write_disk.3.txt archive_write_filter.3.txt archive_write_finish_entry.3.txt archive_write_format.3.txt archive_write_free.3.txt archive_write_header.3.txt archive_write_new.3.txt archive_write_open.3.txt archive_write_set_options.3.txt archive_write_set_passphrase.3.txt cpio.5.txt libarchive.3.txt libarchive_changes.3.txt libarchive-formats.5.txt libarchive_internals.3.txt mtree.5.txt tar.5.txt bsdtar.1.txt bsdcpio.1.txt diff --git a/archivers/libarchive/files/doc/text/archive_entry.3.txt b/archivers/libarchive/files/doc/text/archive_entry.3.txt index e2ef91952f4..d9dd1c0ed39 100644 --- a/archivers/libarchive/files/doc/text/archive_entry.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry.3.txt @@ -1,28 +1,28 @@ ARCHIVE_ENTRY(3) BSD Library Functions Manual ARCHIVE_ENTRY(3) -1mNAME0m - 1marchive_entry_clear22m, 1marchive_entry_clone22m, 1marchive_entry_free22m, - 1marchive_entry_new22m, — functions for managing archive entry descriptions +NAME + archive_entry_clear, archive_entry_clone, archive_entry_free, + archive_entry_new, — functions for managing archive entry descriptions -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mstruct24m 4marchive_entry24m 4m*0m - 1marchive_entry_clear22m(4mstruct24m 4marchive_entry24m 4m*24m); + struct archive_entry * + archive_entry_clear(struct archive_entry *); - 4mstruct24m 4marchive_entry24m 4m*0m - 1marchive_entry_clone22m(4mstruct24m 4marchive_entry24m 4m*24m); + struct archive_entry * + archive_entry_clone(struct archive_entry *); - 4mvoid0m - 1marchive_entry_free22m(4mstruct24m 4marchive_entry24m 4m*24m); + void + archive_entry_free(struct archive_entry *); - 4mstruct24m 4marchive_entry24m 4m*0m - 1marchive_entry_new22m(4mvoid24m); + struct archive_entry * + archive_entry_new(void); -1mDESCRIPTION0m +DESCRIPTION These functions create and manipulate data objects that represent entries within an archive. You can think of a struct archive_entry as a heavy- duty version of struct stat: it includes everything from struct stat plus @@ -30,21 +30,21 @@ ARCHIVE_ENTRY(3) BSD Library Functions Manual ARCHIVE_ENTRY(3) are used by libarchive(3) to represent the metadata associated with a particular entry in an archive. - 1mCreate and Destroy0m - There are functions to allocate, destroy, clear, and copy 4marchive_entry0m + Create and Destroy + There are functions to allocate, destroy, clear, and copy archive_entry objects: - 1marchive_entry_clear22m() + archive_entry_clear() Erases the object, resetting all internal fields to the same state as a newly-created object. This is provided to allow you to quickly recycle objects without thrashing the heap. - 1marchive_entry_clone22m() + archive_entry_clone() A deep copy operation; all text fields are duplicated. - 1marchive_entry_free22m() + archive_entry_free() Releases the struct archive_entry object. - 1marchive_entry_new22m() + archive_entry_new() Allocate and return a blank struct archive_entry object. - 1mFunction groups0m + Function groups Due to high number of functions, the accessor functions can be found in man pages grouped by the purpose. @@ -55,38 +55,38 @@ ARCHIVE_ENTRY(3) BSD Library Functions Manual ARCHIVE_ENTRY(3) archive_entry_perms(3) User, group and mode manipulation archive_entry_stat(3) Functions not in the other groups and copying - to/from 4mstruct24m 4mstat24m. + to/from struct stat. archive_entry_time(3) Time field manipulation Most of the functions set or read entries in an object. Such functions have one of the following forms: - 1marchive_entry_set_XXXX22m() + archive_entry_set_XXXX() Stores the provided data in the object. In particular, for strings, the pointer is stored, not the referenced string. - 1marchive_entry_copy_XXXX22m() + archive_entry_copy_XXXX() As above, except that the referenced data is copied into the object. - 1marchive_entry_XXXX22m() + archive_entry_XXXX() Returns the specified data. In the case of strings, a const- qualified pointer to the string is returned. String data can be set or accessed as wide character strings or normal - 4mchar24m strings. The functions that use wide character strings are suffixed - with 1m_w22m. Note that these are different representations of the same data: + char strings. The functions that use wide character strings are suffixed + with _w. Note that these are different representations of the same data: For example, if you store a narrow string and read the corresponding wide string, the object will transparently convert formats using the current locale. Similarly, if you store a wide string and then store a narrow string for the same data, the previously-set wide string will be dis‐ carded in favor of the new data. -1mSEE ALSO0m +SEE ALSO archive_entry_acl(3), archive_entry_paths(3), archive_entry_perms(3), archive_entry_time(3) libarchive(3), -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. +HISTORY + The libarchive library first appeared in FreeBSD 5.3. -1mAUTHORS0m - The 1mlibarchive 22mlibrary was written by Tim Kientzle . +AUTHORS + The libarchive library was written by Tim Kientzle . -BSD Feburary 2, 2012 BSD +BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_entry_acl.3.txt b/archivers/libarchive/files/doc/text/archive_entry_acl.3.txt index 53d1c1b961a..429e5d86103 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_acl.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_acl.3.txt @@ -1,82 +1,82 @@ ARCHIVE_ENTRY_ACL(3) BSD Library Functions Manual ARCHIVE_ENTRY_ACL(3) -1mNAME0m - 1marchive_entry_acl_add_entry22m, 1marchive_entry_acl_add_entry_w22m, - 1marchive_entry_acl_clear22m, 1marchive_entry_acl_count22m, - 1marchive_entry_acl_from_text22m, 1marchive_entry_acl_from_text_w,0m - 1marchive_entry_acl_next22m, 1marchive_entry_acl_next_w22m, - 1marchive_entry_acl_reset22m, 1marchive_entry_acl_to_text22m, - 1marchive_entry_acl_to_text_w22m, 1marchive_entry_acl_types 22m— functions for +NAME + archive_entry_acl_add_entry, archive_entry_acl_add_entry_w, + archive_entry_acl_clear, archive_entry_acl_count, + archive_entry_acl_from_text, archive_entry_acl_from_text_w, + archive_entry_acl_next, archive_entry_acl_next_w, + archive_entry_acl_reset, archive_entry_acl_to_text, + archive_entry_acl_to_text_w, archive_entry_acl_types — functions for manipulating Access Control Lists in archive entry descriptions -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mvoid0m - 1marchive_entry_acl_add_entry22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, - 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mchar24m 4m*name24m); + void + archive_entry_acl_add_entry(struct archive_entry *a, int type, + int permset, int tag, int qualifier, const char *name); - 4mvoid0m - 1marchive_entry_acl_add_entry_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, - 4mint24m 4mpermset24m, 4mint24m 4mtag24m, 4mint24m 4mqualifier24m, 4mconst24m 4mwchar_t24m 4m*name24m); + void + archive_entry_acl_add_entry_w(struct archive_entry *a, int type, + int permset, int tag, int qualifier, const wchar_t *name); - 4mvoid0m - 1marchive_entry_acl_clear22m(4mstruct24m 4marchive_entry24m 4m*a24m); + void + archive_entry_acl_clear(struct archive_entry *a); - 4mint0m - 1marchive_entry_acl_count22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); + int + archive_entry_acl_count(struct archive_entry *a, int type); - 4mint0m - 1marchive_entry_acl_from_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*text24m, - 4mint24m 4mtype24m); + int + archive_entry_acl_from_text(struct archive_entry *a, const char *text, + int type); - 4mint0m - 1marchive_entry_acl_from_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mwchar_t24m 4m*text24m, 4mint24m 4mtype24m); + int + archive_entry_acl_from_text_w(struct archive_entry *a, + const wchar_t *text, int type); - 4mint0m - 1marchive_entry_acl_next22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, 4mint24m 4m*ret_type24m, - 4mint24m 4m*ret_permset24m, 4mint24m 4m*ret_tag24m, 4mint24m 4m*ret_qual24m, - 4mconst24m 4mchar24m 4m**ret_name24m); + int + archive_entry_acl_next(struct archive_entry *a, int type, int *ret_type, + int *ret_permset, int *ret_tag, int *ret_qual, + const char **ret_name); - 4mint0m - 1marchive_entry_acl_next_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m, - 4mint24m 4m*ret_type24m, 4mint24m 4m*ret_permset24m, 4mint24m 4m*ret_tag24m, 4mint24m 4m*ret_qual24m, - 4mconst24m 4mwchar_t24m 4m**ret_name24m); + int + archive_entry_acl_next_w(struct archive_entry *a, int type, + int *ret_type, int *ret_permset, int *ret_tag, int *ret_qual, + const wchar_t **ret_name); - 4mint0m - 1marchive_entry_acl_reset22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint24m 4mtype24m); + int + archive_entry_acl_reset(struct archive_entry *a, int type); - 4mchar24m 4m*0m - 1marchive_entry_acl_to_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, - 4mint24m 4mflags24m); + char * + archive_entry_acl_to_text(struct archive_entry *a, ssize_t *len_p, + int flags); - 4mwchar_t24m 4m*0m - 1marchive_entry_acl_to_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mssize_t24m 4m*len_p24m, - 4mint24m 4mflags24m); + wchar_t * + archive_entry_acl_to_text_w(struct archive_entry *a, ssize_t *len_p, + int flags); - 4mint0m - 1marchive_entry_acl_types22m(4mstruct24m 4marchive_entry24m 4m*a24m); + int + archive_entry_acl_types(struct archive_entry *a); -1mDESCRIPTION0m +DESCRIPTION The “Access Control Lists (ACLs)” extend the standard Unix perssion - model. The ACL interface of 1mlibarchive 22msupports both POSIX.1e and NFSv4 + model. The ACL interface of libarchive supports both POSIX.1e and NFSv4 style ACLs. Use of ACLs is restricted by various levels of ACL support in operating systems, file systems and archive formats. - 1mPOSIX.1e Access Control Lists0m + POSIX.1e Access Control Lists A POSIX.1e ACL consists of a number of independent entries. Each entry specifies the permission set as bitmask of basic permissions. Valid per‐ - missions in the 4mpermset24m are: - ARCHIVE_ENTRY_ACL_READ (1mr22m) - ARCHIVE_ENTRY_ACL_WRITE (1mw22m) - ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) + missions in the permset are: + ARCHIVE_ENTRY_ACL_READ (r) + ARCHIVE_ENTRY_ACL_WRITE (w) + ARCHIVE_ENTRY_ACL_EXECUTE (x) The permissions correspond to the normal Unix permissions. - The 4mtag24m specifies the principal to which the permission applies. Valid + The tag specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. @@ -96,7 +96,7 @@ ARCHIVE_ENTRY_ACL(3) BSD Library Functions Manual ARCHIVE_ENTRY_ACL(3) tories have an additional ACL (ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which controls the initial access ACL for newly created directory entries. - 1mNFSv4 Access Control Lists0m + NFSv4 Access Control Lists A NFSv4 ACL consists of multiple individual entries called Access Control Entries (ACEs). @@ -111,7 +111,7 @@ ARCHIVE_ENTRY_ACL(3) BSD Library Functions Manual ARCHIVE_ENTRY_ACL(3) attempts by principal which require given permissions. - The 4mtag24m specifies the principal to which the permission applies. Valid + The tag specifies the principal to which the permission applies. Valid values are: ARCHIVE_ENTRY_ACL_USER The user specified by the name field. ARCHIVE_ENTRY_ACL_USER_OBJ The owner of the file. @@ -121,77 +121,77 @@ ARCHIVE_ENTRY_ACL(3) BSD Library Functions Manual ARCHIVE_ENTRY_ACL(3) a member of the owning group. Entries with the ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag - store the user and group name in the 4mname24m string and optionally the user - or group ID in the 4mqualifier24m integer. + store the user and group name in the name string and optionally the user + or group ID in the qualifier integer. - NFSv4 ACE permissions and flags are stored in the same 4mpermset24m bitfield. + NFSv4 ACE permissions and flags are stored in the same permset bitfield. Some permissions share the same constant and permission character but have different effect on directories than on files. The following ACE permissions are supported: - ARCHIVE_ENTRY_ACL_READ_DATA (1mr22m) + ARCHIVE_ENTRY_ACL_READ_DATA (r) Read data (file). - ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (1mr22m) + ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (r) List entries (directory). - ARCHIVE_ENTRY_ACL_WRITE_DATA (1mw22m) + ARCHIVE_ENTRY_ACL_WRITE_DATA (w) Write data (file). - ARCHIVE_ENTRY_ACL_ADD_FILE (1mw22m) + ARCHIVE_ENTRY_ACL_ADD_FILE (w) Create files (directory). - ARCHIVE_ENTRY_ACL_EXECUTE (1mx22m) + ARCHIVE_ENTRY_ACL_EXECUTE (x) Execute file or change into a directory. - ARCHIVE_ENTRY_ACL_APPEND_DATA (1mp22m) + ARCHIVE_ENTRY_ACL_APPEND_DATA (p) Append data (file). - ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (1mp22m) + ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (p) Create subdirectories (directory). - ARCHIVE_ENTRY_ACL_DELETE_CHILD (1mD22m) + ARCHIVE_ENTRY_ACL_DELETE_CHILD (D) Remove files and subdirectories inside a directory. - ARCHIVE_ENTRY_ACL_DELETE (1md22m) + ARCHIVE_ENTRY_ACL_DELETE (d) Remove file or directory. - ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (1ma22m) + ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (a) Read file or directory attributes. - ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (1mA22m) + ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (A) Write file or directory attributes. - ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (1mR22m) + ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (R) Read named file or directory attributes. - ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (1mW22m) + ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (W) Write named file or directory attributes. - ARCHIVE_ENTRY_ACL_READ_ACL (1mc22m) + ARCHIVE_ENTRY_ACL_READ_ACL (c) Read file or directory ACL. - ARCHIVE_ENTRY_ACL_WRITE_ACL (1mC22m) + ARCHIVE_ENTRY_ACL_WRITE_ACL (C) Write file or directory ACL. - ARCHIVE_ENTRY_ACL_WRITE_OWNER (1mo22m) + ARCHIVE_ENTRY_ACL_WRITE_OWNER (o) Change owner of a file or directory. - ARCHIVE_ENTRY_ACL_SYNCHRONIZE (1ms22m) + ARCHIVE_ENTRY_ACL_SYNCHRONIZE (s) Use synchronous I/O. The following NFSv4 ACL inheritance flags are supported: - ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (1mf22m) + ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (f) Inherit parent directory ACE to files. - ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (1md22m) + ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (d) Inherit parent directory ACE to subdirectories. - ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (1mi22m) + ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (i) Only inherit, do not apply the permission on the directory itself. - ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (1mn22m) + ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (n) Do not propagate inherit flags. Only first-level entries inherit ACLs. - ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (1mS22m) - Trigger alarm or audit on succesful access. - ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (1mF22m) + ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (S) + Trigger alarm or audit on successful access. + ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (F) Trigger alarm or audit on failed access. - ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (1mI22m) + ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (I) Mark that ACE was inherited. - 1mFunctions0m - 1marchive_entry_acl_add_entry22m() and 1marchive_entry_acl_add_entry_w22m() add a + Functions + archive_entry_acl_add_entry() and archive_entry_acl_add_entry_w() add a single ACL entry. For the access ACL and non-extended principals, the - classic Unix permissions are updated. An archive enry cannot contain both - POSIX.1e and NFSv4 ACL entries. + classic Unix permissions are updated. An archive entry cannot contain + both POSIX.1e and NFSv4 ACL entries. - 1marchive_entry_acl_clear22m() removes all ACL entries and resets the enumera‐ + archive_entry_acl_clear() removes all ACL entries and resets the enumera‐ tion pointer. - 1marchive_entry_acl_count22m() counts the ACL entries that have the given type - mask. 4mtype24m can be the bitwise-or of + archive_entry_acl_count() counts the ACL entries that have the given type + mask. type can be the bitwise-or of ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT for POSIX.1e ACLs and @@ -201,39 +201,39 @@ ARCHIVE_ENTRY_ACL(3) BSD Library Functions Manual ARCHIVE_ENTRY_ACL(3) ARCHIVE_ENTRY_ACL_TYPE_ALARM 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. + extended ACLs are added. - 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() add new - (or merge with existing) ACL entries from (wide) text. The argument 4mtype0m + archive_entry_acl_from_text() and archive_entry_acl_from_text_w() add new + (or merge with existing) ACL entries from (wide) text. The argument type may take one of the following values: ARCHIVE_ENTRY_ACL_TYPE_ACCESS ARCHIVE_ENTRY_ACL_TYPE_DEFAULT ARCHIVE_ENTRY_ACL_TYPE_NFS4 - Supports all formats that can be created with 1marchive_entry_acl_to_text22m() - or respective 1marchive_entry_acl_to_text_w22m(). Existing ACL entries are - preserved. To get a clean new ACL from text 1marchive_entry_acl_clear22m() + Supports all formats that can be created with archive_entry_acl_to_text() + or respective archive_entry_acl_to_text_w(). Existing ACL entries are + preserved. To get a clean new ACL from text archive_entry_acl_clear() must be called first. Entries prefixed with “default:” are treated as - ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless 4mtype24m is + ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless type is ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable ACL entries and entries beginning with the ‘#’ character (comments) are skipped. - 1marchive_entry_acl_next22m() and 1marchive_entry_acl_next_w22m() return the next + archive_entry_acl_next() and archive_entry_acl_next_w() return the next entry of the ACL list. This functions may only be called after - 1marchive_entry_acl_reset22m() has indicated the presence of extended ACL + archive_entry_acl_reset() has indicated the presence of extended ACL entries. - 1marchive_entry_acl_reset22m() prepare reading the list of ACL entries with - 1marchive_entry_acl_next22m() or 1marchive_entry_acl_next_w22m(). The function + archive_entry_acl_reset() prepare reading the list of ACL entries with + archive_entry_acl_next() or archive_entry_acl_next_w(). The function returns either 0, if no non-extended ACLs are found. In this case, the access permissions should be obtained by archive_entry_mode(3) or set using chmod(2). Otherwise, the function returns the same value as - 1marchive_entry_acl_count22m(). + archive_entry_acl_count(). - 1marchive_entry_acl_to_text22m() and 1marchive_entry_acl_to_text_w22m() convert the + archive_entry_acl_to_text() and archive_entry_acl_to_text_w() convert the ACL entries for the given type into a (wide) string of ACL entries sepa‐ - rated by newline. If the the pointer 4mlen_p24m is not NULL, then the function + rated by newline. If the pointer len_p is not NULL, then the function shall return the length of the string (not including the NULL terminator) - in the location pointed to by 4mlen_p24m. The 4mflag24m argument is a bitwise-or. + in the location pointed to by len_p. The flag argument is a bitwise-or. The following flags are effective only on POSIX.1e ACL: ARCHIVE_ENTRY_ACL_TYPE_ACCESS @@ -263,36 +263,36 @@ ARCHIVE_ENTRY_ACL(3) BSD Library Functions Manual ARCHIVE_ENTRY_ACL(3) ified, both access and default entries are returned and default entries are prefixed with “default:”. - 1marchive_entry_acl_types22m() get ACL entry types contained in an archive + archive_entry_acl_types() get ACL entry types contained in an archive entry's ACL. As POSIX.1e and NFSv4 ACL entries cannot be mixed, this function is a very efficient way to detect if an ACL already contains POSIX.1e or NFSv4 ACL entries. -1mRETURN VALUES0m - 1marchive_entry_acl_count22m() and 1marchive_entry_acl_reset22m() returns the num‐ +RETURN VALUES + archive_entry_acl_count() and archive_entry_acl_reset() returns the num‐ ber of ACL entries that match the given type mask. For POSIX.1e ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS and at least one extended ACL entry exists, the three classic Unix permissions are counted. - 1marchive_entry_acl_from_text22m() and 1marchive_entry_acl_from_text_w22m() return + archive_entry_acl_from_text() and archive_entry_acl_from_text_w() return ARCHIVE_OK if all entries were successfully parsed and ARCHIVE_WARN if one or more entries were invalid or non-parseable. - 1marchive_entry_acl_next22m() and 1marchive_entry_acl_next_w22m() return ARCHIVE_OK + archive_entry_acl_next() and archive_entry_acl_next_w() return ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL entries exist and ARCHIVE_WARN if - 1marchive_entry_acl_reset22m() has not been called first. + archive_entry_acl_reset() has not been called first. - 1marchive_entry_acl_to_text22m() returns a string representing the ACL entries + archive_entry_acl_to_text() returns a string representing the ACL entries matching the given type and flags on success or NULL on error. - 1marchive_entry_acl_to_text_w22m() returns a wide string representing the ACL + archive_entry_acl_to_text_w() returns a wide string representing the ACL entries matching the given type and flags on success or NULL on error. - 1marchive_entry_acl_types22m() returns a bitmask of ACL entry types or 0 if + archive_entry_acl_types() returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries. -1mSEE ALSO0m +SEE ALSO archive_entry(3), libarchive(3) BSD February 15, 2017 BSD diff --git a/archivers/libarchive/files/doc/text/archive_entry_linkify.3.txt b/archivers/libarchive/files/doc/text/archive_entry_linkify.3.txt index 14ed564920a..62eb5226bf0 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_linkify.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_linkify.3.txt @@ -1,31 +1,31 @@ ARCHIVE_ENTRY_LINKIFY(3) BSD Library Functions Manual ARCHIVE_ENTRY_LINKIFY(3) -1mNAME0m - 1marchive_entry_linkresolver22m, 1marchive_entry_linkresolver_new22m, - 1marchive_entry_linkresolver_set_strategy22m, 1marchive_entry_linkresolver_free22m, - 1marchive_entry_linkify 22m— hardlink resolver functions +NAME + archive_entry_linkresolver, archive_entry_linkresolver_new, + archive_entry_linkresolver_set_strategy, archive_entry_linkresolver_free, + archive_entry_linkify — hardlink resolver functions -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mstruct24m 4marchive_entry_linkresolver24m 4m*0m - 1marchive_entry_linkresolver_new22m(4mvoid24m); + struct archive_entry_linkresolver * + archive_entry_linkresolver_new(void); - 4mvoid0m - 1marchive_entry_linkresolver_set_strategy22m(4mstruct24m 4marchive_entry_linkresolver24m 4m*resolver24m, - 4mint24m 4mformat24m); + void + archive_entry_linkresolver_set_strategy(struct archive_entry_linkresolver *resolver, + int format); - 4mvoid0m - 1marchive_entry_linkresolver_free22m(4mstruct24m 4marchive_entry_linkresolver24m 4m*resolver24m); + void + archive_entry_linkresolver_free(struct archive_entry_linkresolver *resolver); - 4mvoid0m - 1marchive_entry_linkify22m(4mstruct24m 4marchive_entry_linkresolver24m 4m*resolver24m, - 4mstruct24m 4marchive_entry24m 4m**entry24m, 4mstruct24m 4marchive_entry24m 4m**sparse24m); + void + archive_entry_linkify(struct archive_entry_linkresolver *resolver, + struct archive_entry **entry, struct archive_entry **sparse); -1mDESCRIPTION0m +DESCRIPTION Programs that want to create archives have to deal with hardlinks. Hardlinks are handled in different ways by the archive formats. The basic strategies are: @@ -37,77 +37,77 @@ ARCHIVE_ENTRY_LINKIFY(3) BSD Library Functions Manual ARCHIVE_ENTRY_LINKIFY(3) 3. Store the body the last time an inode is seen (new cpio). - The 1marchive_entry_linkresolver 22mfunctions help by providing a unified + The archive_entry_linkresolver functions help by providing a unified interface and handling the complexity behind the scene. - The 1marchive_entry_linkresolver 22mfunctions assume that 4marchive_entry0m + The archive_entry_linkresolver functions assume that archive_entry instances have valid nlinks, inode and device values. The inode and device value is used to match entries. The nlinks value is used to determined if all references have been found and if the internal refer‐ ences can be recycled. - The 1marchive_entry_linkresolver_new22m() function allocates a new link + The archive_entry_linkresolver_new() function allocates a new link resolver. The instance can be freed using - 1marchive_entry_linkresolver_free22m(). All deferred entries are flushed and + archive_entry_linkresolver_free(). All deferred entries are flushed and the internal storage is freed. - The 1marchive_entry_linkresolver_set_strategy22m() function selects the opti‐ + The archive_entry_linkresolver_set_strategy() function selects the opti‐ mal hardlink strategy for the given format. The format code can be obtained from archive_format(3). The function can be called more than once, but it is recommended to flush all deferred entries first. - The 1marchive_entry_linkify22m() function is the core of - 1marchive_entry_linkresolver22m. The 1mentry22m() argument points to the - 4marchive_entry24m that should be written. Depending on the strategy one of + The archive_entry_linkify() function is the core of + archive_entry_linkresolver. The entry() argument points to the + archive_entry that should be written. Depending on the strategy one of the following actions is taken: - 1. For the simple archive formats 4m*entry24m is left unmodified and 4m*sparse0m + 1. For the simple archive formats *entry is left unmodified and *sparse is set to NULL. - 2. For tar like archive formats, 4m*sparse24m is set to NULL. If 4m*entry24m is - NULL, no action is taken. If the hardlink count of 4m*entry24m is larger + 2. For tar like archive formats, *sparse is set to NULL. If *entry is + NULL, no action is taken. If the hardlink count of *entry is larger than 1 and the file type is a regular file or symbolic link, the internal list is searched for a matching inode. If such an inode is - found, the link count is decremented and the file size of 4m*entry24m is + found, the link count is decremented and the file size of *entry is set to 0 to notify that no body should be written. If no such inode is found, a copy of the entry is added to the internal cache with a link count reduced by one. - 3. For new cpio like archive formats a value for 4m*entry24m of NULL is used - to flush deferred entries. In that case 4m*entry24m is set to an arbi‐ + 3. For new cpio like archive formats a value for *entry of NULL is used + to flush deferred entries. In that case *entry is set to an arbi‐ trary deferred entry and the entry itself is removed from the inter‐ - nal list. If the internal list is empty, 4m*entry24m is set to NULL. In - either case, 4m*sparse24m is set to NULL and the function returns. If - the hardlink count of 4m*entry24m is one or the file type is a directory - or device, 4m*sparse24m is set to NULL and no further action is taken. + nal list. If the internal list is empty, *entry is set to NULL. In + either case, *sparse is set to NULL and the function returns. If + the hardlink count of *entry is one or the file type is a directory + or device, *sparse is set to NULL and no further action is taken. Otherwise, the internal list is searched for a matching inode. If such an inode is not found, the entry is added to the internal list, - both 4m*entry24m and 4m*sparse24m are set to NULL and the function returns. + both *entry and *sparse are set to NULL and the function returns. If such an inode is found, the link count is decremented. If it remains larger than one, the existing entry on the internal list is - swapped with 4m*entry24m after retaining the link count. The existing - entry is returned in 4m*entry24m. If the link count reached one, the new + swapped with *entry after retaining the link count. The existing + entry is returned in *entry. If the link count reached one, the new entry is also removed from the internal list and returned in - 4m*sparse24m. Otherwise 4m*sparse24m is set to NULL. + *sparse. Otherwise *sparse is set to NULL. The general usage is therefore: - 1. For each new archive entry, call 1marchive_entry_linkify22m(). + 1. For each new archive entry, call archive_entry_linkify(). 2. Keep in mind that the entries returned may have a size of 0 now. - 3. If 4m*entry24m is not NULL, archive it. + 3. If *entry is not NULL, archive it. - 4. If 4m*sparse24m is not NULL, archive it. + 4. If *sparse is not NULL, archive it. 5. After all entries have been written to disk, call - 1marchive_entry_linkify22m() with 4m*entry24m set to NULL and archive the + archive_entry_linkify() with *entry set to NULL and archive the returned entry as long as it is not NULL. -1mRETURN VALUES0m - 1marchive_entry_linkresolver_new22m() returns NULL on malloc(3) failures. +RETURN VALUES + archive_entry_linkresolver_new() returns NULL on malloc(3) failures. -1mSEE ALSO0m +SEE ALSO archive_entry(3) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_entry_paths.3.txt b/archivers/libarchive/files/doc/text/archive_entry_paths.3.txt index 5fab9487f9f..f6fed2868ee 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_paths.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_paths.3.txt @@ -1,106 +1,106 @@ ARCHIVE_ENTRY_PATHS(3) BSD Library Functions Manual ARCHIVE_ENTRY_PATHS(3) -1mNAME0m - 1marchive_entry_hardlink22m, 1marchive_entry_hardlink_w22m, - 1marchive_entry_set_hardlink22m, 1marchive_entry_copy_hardlink22m, - 1marchive_entry_copy_hardlink_w22m, 1marchve_entry_update_hardlink_utf822m, - 1marchive_entry_set_link22m, 1marchive_entry_copy_link22m, - 1marchive_entry_copy_link_w22m, 1marchve_entry_update_link_utf822m, - 1marchive_entry_pathname22m, 1marchive_entry_pathname_w22m, - 1marchive_entry_set_pathname22m, 1marchive_entry_copy_pathname22m, - 1marchive_entry_copy_pathname_w22m, 1marchve_entry_update_pathname_utf822m, - 1marchive_entry_sourcepath22m, 1marchive_entry_copy_sourcepath22m, - 1marchive_entry_symlink, archive_entry_symlink_w,0m - 1marchive_entry_set_symlink22m, 1marchive_entry_copy_symlink22m, - 1marchive_entry_copy_symlink_w22m, 1marchve_entry_update_symlink_utf8 22m— func‐ +NAME + archive_entry_hardlink, archive_entry_hardlink_w, + archive_entry_set_hardlink, archive_entry_copy_hardlink, + archive_entry_copy_hardlink_w, archive_entry_update_hardlink_utf8, + archive_entry_set_link, archive_entry_copy_link, + archive_entry_copy_link_w, archive_entry_update_link_utf8, + archive_entry_pathname, archive_entry_pathname_w, + archive_entry_set_pathname, archive_entry_copy_pathname, + archive_entry_copy_pathname_w, archive_entry_update_pathname_utf8, + archive_entry_sourcepath, archive_entry_copy_sourcepath, + archive_entry_symlink, archive_entry_symlink_w, + archive_entry_set_symlink, archive_entry_copy_symlink, + archive_entry_copy_symlink_w, archive_entry_update_symlink_utf8 — func‐ tions for manipulating path names in archive entry descriptions -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mconst24m 4mchar24m 4m*0m - 1marchive_entry_hardlink22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const char * + archive_entry_hardlink(struct archive_entry *a); - 4mconst24m 4mwchar_t24m 4m*0m - 1marchive_entry_hardlink_w22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const wchar_t * + archive_entry_hardlink_w(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_hardlink22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*path24m); + void + archive_entry_set_hardlink(struct archive_entry *a, const char *path); - 4mvoid0m - 1marchive_entry_copy_hardlink22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*path24m); + void + archive_entry_copy_hardlink(struct archive_entry *a, const char *path); - 4mvoid0m - 1marchive_entry_copy_hardlink_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m, 4mwchar_t24m, - 4m*path"24m); + void + archive_entry_copy_hardlink_w(struct archive_entry *a, const, wchar_t, + *path"); - 4mint0m - 1marchive_entry_update_hardlink_utf822m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mchar24m 4m*path24m); + int + archive_entry_update_hardlink_utf8(struct archive_entry *a, + const char *path); - 4mvoid0m - 1marchive_entry_set_link22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*path24m); + void + archive_entry_set_link(struct archive_entry *a, const char *path); - 4mvoid0m - 1marchive_entry_copy_link22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*path24m); + void + archive_entry_copy_link(struct archive_entry *a, const char *path); - 4mvoid0m - 1marchive_entry_copy_link_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mwchar_t24m 4m*path24m); + void + archive_entry_copy_link_w(struct archive_entry *a, const wchar_t *path); - 4mint0m - 1marchive_entry_update_link_utf822m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mchar24m 4m*path24m); + int + archive_entry_update_link_utf8(struct archive_entry *a, + const char *path); - 4mconst24m 4mchar24m 4m*0m - 1marchive_entry_pathname22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const char * + archive_entry_pathname(struct archive_entry *a); - 4mconst24m 4mwchar_t24m 4m*0m - 1marchive_entry_pathname_w22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const wchar_t * + archive_entry_pathname_w(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_pathname22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*path24m); + void + archive_entry_set_pathname(struct archive_entry *a, const char *path); - 4mvoid0m - 1marchive_entry_copy_pathname22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*path24m); + void + archive_entry_copy_pathname(struct archive_entry *a, const char *path); - 4mvoid0m - 1marchive_entry_copy_pathname_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mwchar_t24m 4m*path24m); + void + archive_entry_copy_pathname_w(struct archive_entry *a, + const wchar_t *path); - 4mint0m - 1marchive_entry_update_pathname_utf822m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mchar24m 4m*path24m); + int + archive_entry_update_pathname_utf8(struct archive_entry *a, + const char *path); - 4mconst24m 4mchar24m 4m*0m - 1marchive_entry_sourcepath22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const char * + archive_entry_sourcepath(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_copy_sourcepath22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*path24m); + void + archive_entry_copy_sourcepath(struct archive_entry *a, const char *path); - 4mconst24m 4mchar24m 4m*0m - 1marchive_entry_symlink22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const char * + archive_entry_symlink(struct archive_entry *a); - 4mconst24m 4mwchar_t24m 4m*0m - 1marchive_entry_symlink_w22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const wchar_t * + archive_entry_symlink_w(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_symlink22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*path24m); + void + archive_entry_set_symlink(struct archive_entry *a, const char *path); - 4mvoid0m - 1marchive_entry_copy_symlink22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*path24m); + void + archive_entry_copy_symlink(struct archive_entry *a, const char *path); - 4mvoid0m - 1marchive_entry_copy_symlink_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mwchar_t24m 4m*path24m); + void + archive_entry_copy_symlink_w(struct archive_entry *a, + const wchar_t *path); - 4mint0m - 1marchive_entry_update_symlink_utf822m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mchar24m 4m*path24m); + int + archive_entry_update_symlink_utf8(struct archive_entry *a, + const char *path); -1mDESCRIPTION0m +DESCRIPTION Path names supported by archive_entry(3): hardlink Destination of the hardlink. link Update only. For a symlink, update the destination. Other‐ @@ -115,7 +115,7 @@ ARCHIVE_ENTRY_PATHS(3) BSD Library Functions Manual ARCHIVE_ENTRY_PATHS(3) char * Multibyte strings in the current locale. wchar_t * Wide character strings in the current locale. The accessor - functions are named 1mXXX_w22m(). + functions are named XXX_w(). UTF-8 Unicode strings encoded as UTF-8. This are convience func‐ tions to update both the multibyte and wide character strings @@ -128,9 +128,9 @@ ARCHIVE_ENTRY_PATHS(3) BSD Library Functions Manual ARCHIVE_ENTRY_PATHS(3) is a convience function for conditionally setting hardlink or symlink destination. It doesn't have a corresponding get accessor function. - 1marchive_entry_set_XXX22m() is an alias for 1marchive_entry_copy_XXX22m(). + archive_entry_set_XXX() is an alias for archive_entry_copy_XXX(). -1mSEE ALSO0m +SEE ALSO archive_entry(3) libarchive(3), BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_entry_perms.3.txt b/archivers/libarchive/files/doc/text/archive_entry_perms.3.txt index 24c0e84d84f..b0a546f2e22 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_perms.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_perms.3.txt @@ -1,131 +1,131 @@ ARCHIVE_ENTRY_PERMS(3) BSD Library Functions Manual ARCHIVE_ENTRY_PERMS(3) -1mNAME0m - 1marchive_entry_gid22m, 1marchive_entry_set_gid22m, 1marchive_entry_uid22m, - 1marchive_entry_set_uid22m, 1marchive_entry_perm22m, 1marchive_entry_set_perm22m, - 1marchive_entry_strmode22m, 1marchive_entry_uname archive_entry_uname_w0m - 1marchive_entry_set_uname22m, 1marchive_entry_copy_uname22m, - 1marchive_entry_copy_uname_w22m, 1marchive_entry_update_uname_utf822m, - 1marchive_entry_gname22m, 1marchive_entry_gname_w22m, 1marchive_entry_set_gname22m, - 1marchive_entry_copy_gname22m, 1marchive_entry_copy_gname_w22m, - 1marchive_entry_update_gname_utf822m, 1marchive_entry_fflags22m, - 1marchive_entry_fflags_text22m, 1marchive_entry_set_fflags22m, - 1marchive_entry_copy_fflags_text22m, 1marchive_entry_copy_fflags_text_w 22m— func‐ +NAME + archive_entry_gid, archive_entry_set_gid, archive_entry_uid, + archive_entry_set_uid, archive_entry_perm, archive_entry_set_perm, + archive_entry_strmode, archive_entry_uname, archive_entry_uname_w, + archive_entry_set_uname, archive_entry_copy_uname, + archive_entry_copy_uname_w, archive_entry_update_uname_utf8, + archive_entry_gname, archive_entry_gname_w, archive_entry_set_gname, + archive_entry_copy_gname, archive_entry_copy_gname_w, + archive_entry_update_gname_utf8, archive_entry_fflags, + archive_entry_fflags_text, archive_entry_set_fflags, + archive_entry_copy_fflags_text, archive_entry_copy_fflags_text_w — func‐ tions for manipulating ownership and permissions in archive entry descriptions -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mgid_t0m - 1marchive_entry_gid22m(4mstruct24m 4marchive_entry24m 4m*a24m); + gid_t + archive_entry_gid(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_gid22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mgid_t24m 4mgid24m); + void + archive_entry_set_gid(struct archive_entry *a, gid_t gid); - 4muid_t0m - 1marchive_entry_uid22m(4mstruct24m 4marchive_entry24m 4m*a24m); + uid_t + archive_entry_uid(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_uid22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4muid_t24m 4muid24m); + void + archive_entry_set_uid(struct archive_entry *a, uid_t uid); - 4mmode_t0m - 1marchive_entry_perm22m(4mstruct24m 4marchive_entry24m 4m*a24m); + mode_t + archive_entry_perm(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_perm22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mmode_t24m 4mmode24m); + void + archive_entry_set_perm(struct archive_entry *a, mode_t mode); - 4mconst24m 4mchar24m 4m*0m - 1marchive_entry_strmode22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const char * + archive_entry_strmode(struct archive_entry *a); - 4mconst24m 4mchar24m 4m*0m - 1marchive_entry_gname22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const char * + archive_entry_gname(struct archive_entry *a); - 4mconst24m 4mwchar_t24m 4m*0m - 1marchive_entry_gname_w22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const wchar_t * + archive_entry_gname_w(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_gname22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*a24m); + void + archive_entry_set_gname(struct archive_entry *a, const char *a); - 4mvoid0m - 1marchive_entry_copy_gname22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*name24m); + void + archive_entry_copy_gname(struct archive_entry *a, const char *name); - 4mvoid0m - 1marchive_entry_copy_gname_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mwchar_t24m 4m*name24m); + void + archive_entry_copy_gname_w(struct archive_entry *a, const wchar_t *name); - 4mint0m - 1marchive_entry_update_gname_utf822m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mchar24m 4m*name24m); + int + archive_entry_update_gname_utf8(struct archive_entry *a, + const char *name); - 4mconst24m 4mchar24m 4m*0m - 1marchive_entry_uname22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const char * + archive_entry_uname(struct archive_entry *a); - 4mconst24m 4mwchar_t24m 4m*0m - 1marchive_entry_uname_w22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const wchar_t * + archive_entry_uname_w(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_uname22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*name24m); + void + archive_entry_set_uname(struct archive_entry *a, const char *name); - 4mvoid0m - 1marchive_entry_copy_uname22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mchar24m 4m*name24m); + void + archive_entry_copy_uname(struct archive_entry *a, const char *name); - 4mvoid0m - 1marchive_entry_copy_uname_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mwchar_t24m 4m*name24m); + void + archive_entry_copy_uname_w(struct archive_entry *a, const wchar_t *name); - 4mint0m - 1marchive_entry_update_uname_utf822m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mchar24m 4m*name24m); + int + archive_entry_update_uname_utf8(struct archive_entry *a, + const char *name); - 4mvoid0m - 1marchive_entry_fflags22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4munsigned24m 4mlong24m 4m*set_bits24m, - 4munsigned24m 4mlong24m 4m*clear_bits24m); + void + archive_entry_fflags(struct archive_entry *a, unsigned long *set_bits, + unsigned long *clear_bits); - 4mconst24m 4mchar24m 4m*0m - 1marchive_entry_fflags_text22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const char * + archive_entry_fflags_text(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_fflags22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4munsigned24m 4mlong24m 4mset_bits24m, - 4munsigned24m 4mlong24m 4mclear_bits24m); + void + archive_entry_set_fflags(struct archive_entry *a, unsigned long set_bits, + unsigned long clear_bits); - 4mconst24m 4mchar24m 4m*0m - 1marchive_entry_copy_fflags_text22m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mchar24m 4m*text24m); + const char * + archive_entry_copy_fflags_text(struct archive_entry *a, + const char *text); - 4mconst24m 4mwchar_t24m 4m*0m - 1marchive_entry_copy_fflags_text_w22m(4mstruct24m 4marchive_entry24m 4m*a24m, - 4mconst24m 4mwchar_t24m 4m*text24m); + const wchar_t * + archive_entry_copy_fflags_text_w(struct archive_entry *a, + const wchar_t *text); -1mDESCRIPTION0m - 1mUser id, group id and mode0m - The functions 1marchive_entry_uid22m(), 1marchive_entry_gid22m(), and - 1marchive_entry_perm22m() can be used to extract the user id, group id and +DESCRIPTION + User id, group id and mode + The functions archive_entry_uid(), archive_entry_gid(), and + archive_entry_perm() can be used to extract the user id, group id and permission from the given entry. The corresponding functions - 1marchive_entry_set_uid22m(), 1marchive_entry_set_gid22m(), and - 1marchive_entry_set_perm22m() store the given user id, group id and permission + archive_entry_set_uid(), archive_entry_set_gid(), and + archive_entry_set_perm() store the given user id, group id and permission in the entry. The permission is also set as side effect of calling - 1marchive_entry_set_mode22m(). + archive_entry_set_mode(). - 1marchive_entry_strmode22m() returns a string representation of the permission + archive_entry_strmode() returns a string representation of the permission as used by the long mode of ls(1). - 1mUser and group name0m + User and group name User and group names can be provided in one of three different ways: char * Multibyte strings in the current locale. wchar_t * Wide character strings in the current locale. The accessor - functions are named 1mXXX_w22m(). + functions are named XXX_w(). UTF-8 Unicode strings encoded as UTF-8. This are convience func‐ tions to update both the multibyte and wide character strings at the same time. - 1marchive_entry_set_XXX22m() is an alias for 1marchive_entry_copy_XXX22m(). + archive_entry_set_XXX() is an alias for archive_entry_copy_XXX(). - 1mFile Flags0m + File Flags File flags are transparently converted between a bitmap representation and a textual format. For example, if you set the bitmap and ask for text, the library will build a canonical text format. However, if you @@ -147,7 +147,7 @@ ARCHIVE_ENTRY_PERMS(3) BSD Library Functions Manual ARCHIVE_ENTRY_PERMS(3) bits that are not meaningful on the current platform will be ignored. The canonical text format is a comma-separated list of flag names. The - 1marchive_entry_copy_fflags_text22m() and 1marchive_entry_copy_fflags_text_w22m() + archive_entry_copy_fflags_text() and archive_entry_copy_fflags_text_w() functions parse the provided text and sets the internal bitmap values. This is a platform-specific operation; names that are not meaningful on the current platform will be ignored. The function returns a pointer to @@ -157,12 +157,12 @@ ARCHIVE_ENTRY_PERMS(3) BSD Library Functions Manual ARCHIVE_ENTRY_PERMS(3) reflect every name that is recognized. (In particular, this differs from strtofflags(3), which stops parsing at the first unrecognized name.) -1mSEE ALSO0m +SEE ALSO archive_entry(3), archive_entry_acl(3), archive_read_disk(3), archive_write_disk(3) libarchive(3), -1mBUGS0m - The platform types 4muid_t24m and 4mgid_t24m are often 16 or 32 bit wide. In this +BUGS + The platform types uid_t and gid_t are often 16 or 32 bit wide. In this case it is possible that the ids can not be correctly restored from ar‐ chives and get truncated. diff --git a/archivers/libarchive/files/doc/text/archive_entry_stat.3.txt b/archivers/libarchive/files/doc/text/archive_entry_stat.3.txt index 00276602440..32270ed43a7 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_stat.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_stat.3.txt @@ -1,132 +1,132 @@ ARCHIVE_ENTRY_STAT(3) BSD Library Functions Manual ARCHIVE_ENTRY_STAT(3) -1mNAME0m - 1marchive_entry_stat22m, 1marchive_entry_copy_stat22m, 1marchive_entry_filetype22m, - 1marchive_entry_set_filetype22m, 1marchive_entry_mode22m, 1marchive_entry_set_mode22m, - 1marchive_entry_size22m, 1marchive_entry_size_is_set22m, 1marchive_entry_set_size22m, - 1marchive_entry_unset_size22m, 1marchive_entry_dev22m, 1marchive_entry_set_dev22m, - 1marchive_entry_dev_is_set22m, 1marchive_entry_devmajor22m, - 1marchive_entry_set_devmajor22m, 1marchive_entry_devminor22m, - 1marchive_entry_set_devminor22m, 1marchive_entry_ino22m, 1marchive_entry_set_ino22m, - 1marchive_entry_ino_is_set22m, 1marchive_entry_ino6422m, 1marchive_entry_set_ino6422m, - 1marchive_entry_nlink22m, 1marchive_entry_rdev22m, 1marchive_entry_set_rdev22m, - 1marchive_entry_rdevmajor22m, 1marchive_entry_set_rdevmajor22m, - 1marchive_entry_rdevminor22m, 1marchive_entry_set_rdevminor22m, — accessor func‐ +NAME + archive_entry_stat, archive_entry_copy_stat, archive_entry_filetype, + archive_entry_set_filetype, archive_entry_mode, archive_entry_set_mode, + archive_entry_size, archive_entry_size_is_set, archive_entry_set_size, + archive_entry_unset_size, archive_entry_dev, archive_entry_set_dev, + archive_entry_dev_is_set, archive_entry_devmajor, + archive_entry_set_devmajor, archive_entry_devminor, + archive_entry_set_devminor, archive_entry_ino, archive_entry_set_ino, + archive_entry_ino_is_set, archive_entry_ino64, archive_entry_set_ino64, + archive_entry_nlink, archive_entry_rdev, archive_entry_set_rdev, + archive_entry_rdevmajor, archive_entry_set_rdevmajor, + archive_entry_rdevminor, archive_entry_set_rdevminor, — accessor func‐ tions for manipulating archive entry descriptions -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mconst24m 4mstruct24m 4mstat24m 4m*0m - 1marchive_entry_stat22m(4mstruct24m 4marchive_entry24m 4m*a24m); + const struct stat * + archive_entry_stat(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_copy_stat22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mconst24m 4mstruct24m 4mstat24m 4m*sb24m); + void + archive_entry_copy_stat(struct archive_entry *a, const struct stat *sb); - 4mmode_t0m - 1marchive_entry_filetype22m(4mstruct24m 4marchive_entry24m 4m*a24m); + mode_t + archive_entry_filetype(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_filetype22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4munsigned24m 4mint24m 4mtype24m); + void + archive_entry_set_filetype(struct archive_entry *a, unsigned int type); - 4mmode_t0m - 1marchive_entry_mode22m(4mstruct24m 4marchive_entry24m 4m*a24m); + mode_t + archive_entry_mode(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_mode22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mmode_t24m 4mmode24m); + void + archive_entry_set_mode(struct archive_entry *a, mode_t mode); - 4mint64_t0m - 1marchive_entry_size22m(4mstruct24m 4marchive_entry24m 4m*a24m); + int64_t + archive_entry_size(struct archive_entry *a); - 4mint0m - 1marchive_entry_size_is_set22m(4mstruct24m 4marchive_entry24m 4m*a24m); + int + archive_entry_size_is_set(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_size22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint64_t24m 4msize24m); + void + archive_entry_set_size(struct archive_entry *a, int64_t size); - 4mvoid0m - 1marchive_entry_unset_size22m(4mstruct24m 4marchive_entry24m 4m*a24m); + void + archive_entry_unset_size(struct archive_entry *a); - 4mdev_t0m - 1marchive_entry_dev22m(4mstruct24m 4marchive_entry24m 4m*a24m); + dev_t + archive_entry_dev(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_dev22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mdev_t24m 4mdev24m); + void + archive_entry_set_dev(struct archive_entry *a, dev_t dev); - 4mint0m - 1marchive_entry_dev_is_set22m(4mstruct24m 4marchive_entry24m 4m*a24m); + int + archive_entry_dev_is_set(struct archive_entry *a); - 4mdev_t0m - 1marchive_entry_devmajor22m(4mstruct24m 4marchive_entry24m 4m*a24m); + dev_t + archive_entry_devmajor(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_devmajor22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mdev_t24m 4mmajor24m); + void + archive_entry_set_devmajor(struct archive_entry *a, dev_t major); - 4mdev_t0m - 1marchive_entry_devminor22m(4mstruct24m 4marchive_entry24m 4m*a24m); + dev_t + archive_entry_devminor(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_devminor22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mdev_t24m 4mminor24m); + void + archive_entry_set_devminor(struct archive_entry *a, dev_t minor); - 4mino_t0m - 1marchive_entry_ino22m(4mstruct24m 4marchive_entry24m 4m*a24m); + ino_t + archive_entry_ino(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_ino22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4munsigned24m 4mlong24m 4mino24m); + void + archive_entry_set_ino(struct archive_entry *a, unsigned long ino); - 4mint0m - 1marchive_entry_ino_is_set22m(4mstruct24m 4marchive_entry24m 4m*a24m); + int + archive_entry_ino_is_set(struct archive_entry *a); - 4mint64_t0m - 1marchive_entry_ino6422m(4mstruct24m 4marchive_entry24m 4m*a24m); + int64_t + archive_entry_ino64(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_ino6422m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mint64_t24m 4mino24m); + void + archive_entry_set_ino64(struct archive_entry *a, int64_t ino); - 4munsigned24m 4mint0m - 1marchive_entry_nlink22m(4mstruct24m 4marchive_entry24m 4m*a24m); + unsigned int + archive_entry_nlink(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_nlink22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4munsigned24m 4mint24m 4mcount24m); + void + archive_entry_set_nlink(struct archive_entry *a, unsigned int count); - 4mdev_t0m - 1marchive_entry_rdev22m(4mstruct24m 4marchive_entry24m 4m*a24m); + dev_t + archive_entry_rdev(struct archive_entry *a); - 4mdev_t0m - 1marchive_entry_rdevmajor22m(4mstruct24m 4marchive_entry24m 4m*a24m); + dev_t + archive_entry_rdevmajor(struct archive_entry *a); - 4mdev_t0m - 1marchive_entry_rdevminor22m(4mstruct24m 4marchive_entry24m 4m*a24m); + dev_t + archive_entry_rdevminor(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_rdev22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mdev_t24m 4mdev24m); + void + archive_entry_set_rdev(struct archive_entry *a, dev_t dev); - 4mvoid0m - 1marchive_entry_set_rdevmajor22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mdev_t24m 4mmajor24m); + void + archive_entry_set_rdevmajor(struct archive_entry *a, dev_t major); - 4mvoid0m - 1marchive_entry_set_rdevminor22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mdev_t24m 4mminor24m); + void + archive_entry_set_rdevminor(struct archive_entry *a, dev_t minor); -1mDESCRIPTION0m - 1mCopying to and from 4m22mstruct24m 4mstat0m - The function 1marchive_entry_stat22m() converts the various fields stored in +DESCRIPTION + Copying to and from struct stat + The function archive_entry_stat() converts the various fields stored in the archive entry to the format used by stat(2). The return value - remains valid until either 1marchive_entry_clear22m() or 1marchive_entry_free22m() + remains valid until either archive_entry_clear() or archive_entry_free() is called. It is not affected by calls to the set accessor functions. - It currently sets the following values in 4mstruct24m 4mstat24m: 4mst_atime24m, - 4mst_ctime24m, 4mst_dev24m, 4mst_gid24m, 4mst_ino24m, 4mst_mode24m, 4mst_mtime24m, 4mst_nlink24m, 4mst_rdev24m, - 4mst_size24m, 4mst_uid24m. In addition, 4mst_birthtime24m and high-precision informa‐ + It currently sets the following values in struct stat: st_atime, + st_ctime, st_dev, st_gid, st_ino, st_mode, st_mtime, st_nlink, st_rdev, + st_size, st_uid. In addition, st_birthtime and high-precision informa‐ tion for time-related fields will be included on platforms that support it. - The function 1marchive_entry_copy_stat22m() copies fields from the platform's - 4mstruct24m 4mstat24m. Fields not provided by 4mstruct24m 4mstat24m are unchanged. + The function archive_entry_copy_stat() copies fields from the platform's + struct stat. Fields not provided by struct stat are unchanged. - 1mGeneral accessor functions0m - The functions 1marchive_entry_filetype22m() and 1marchive_entry_set_filetype22m() + General accessor functions + The functions archive_entry_filetype() and archive_entry_set_filetype() get respectively set the filetype. The file type is one of the following constants: AE_IFREG Regular file @@ -140,50 +140,50 @@ ARCHIVE_ENTRY_STAT(3) BSD Library Functions Manual ARCHIVE_ENTRY_STAT(3) stat(2) may have different numeric values from the corresponding con‐ stants above. - The functions 1marchive_entry_mode22m() and 1marchive_entry_set_mode22m() get/set a + The functions archive_entry_mode() and archive_entry_set_mode() get/set a combination of file type and permissions and provide the equivalent of - 4mst_mode24m. Use of 1marchive_entry_filetype22m() and 1marchive_entry_perm22m() for - getting and 1marchive_entry_set_filetype22m() and 1marchive_entry_set_perm22m() for + st_mode. Use of archive_entry_filetype() and archive_entry_perm() for + getting and archive_entry_set_filetype() and archive_entry_set_perm() for setting is recommended. - The function 1marchive_entry_size22m() returns the file size, if it has been - set, and 0 otherwise. 1marchive_entry_size22m() can be used to query that - status. 1marchive_entry_set_size22m() and 1marchive_entry_unset_size22m() set and + The function archive_entry_size() returns the file size, if it has been + set, and 0 otherwise. archive_entry_size() can be used to query that + status. archive_entry_set_size() and archive_entry_unset_size() set and unset the size, respectively. The number of references (hardlinks) can be obtained by calling - 1marchive_entry_nlinks22m() and set with 1marchive_entry_set_nlinks22m(). + archive_entry_nlinks() and set with archive_entry_set_nlinks(). - 1mIdentifying unique files0m - The functions 1marchive_entry_dev22m() and 1marchive_entry_ino6422m() are used by + Identifying unique files + The functions archive_entry_dev() and archive_entry_ino64() are used by archive_entry_linkify(3) to find hardlinks. The pair of device and inode is supposed to identify hardlinked files. The device major and minor number can be obtained independently using - 1marchive_entry_devmajor22m() and 1marchive_entry_devminor22m(). The device can be - set either via 1marchive_entry_set_dev22m() or by the combination of major and - minor number using 1marchive_entry_set_devmajor22m() and - 1marchive_entry_set_devminor22m(). - - The inode number can be obtained using 1marchive_entry_ino22m(). This is a - legacy interface that uses the platform 4mino_t24m, which may be very small. - To set the inode number, 1marchive_entry_set_ino6422m() is the preferred + archive_entry_devmajor() and archive_entry_devminor(). The device can be + set either via archive_entry_set_dev() or by the combination of major and + minor number using archive_entry_set_devmajor() and + archive_entry_set_devminor(). + + The inode number can be obtained using archive_entry_ino(). This is a + legacy interface that uses the platform ino_t, which may be very small. + To set the inode number, archive_entry_set_ino64() is the preferred interface. - 1mAccessor functions for block and character devices0m + Accessor functions for block and character devices Block and character devices are characterised either using a device num‐ ber or a pair of major and minor number. The combined device number can - be obtained with 1marchive_device_rdev22m() and set with - 1marchive_device_set_rdev22m(). The major and minor numbers are accessed by - 1marchive_device_rdevmajor22m(), 1marchive_device_rdevminor22m() - 1marchive_device_set_rdevmajor22m() and 1marchive_device_set_rdevminor22m(). + be obtained with archive_device_rdev() and set with + archive_device_set_rdev(). The major and minor numbers are accessed by + archive_device_rdevmajor(), archive_device_rdevminor() + archive_device_set_rdevmajor() and archive_device_set_rdevminor(). The process of splitting the combined device number into major and minor number and the reverse process of combing them differs between platforms. Some archive formats use the combined form, while other formats use the split form. -1mSEE ALSO0m +SEE ALSO archive_entry_acl(3), archive_entry_perms(3), archive_entry_time(3), libarchive(3), stat(2) diff --git a/archivers/libarchive/files/doc/text/archive_entry_time.3.txt b/archivers/libarchive/files/doc/text/archive_entry_time.3.txt index 2a63a371b37..227a7aa7792 100644 --- a/archivers/libarchive/files/doc/text/archive_entry_time.3.txt +++ b/archivers/libarchive/files/doc/text/archive_entry_time.3.txt @@ -1,91 +1,91 @@ ARCHIVE_ENTRY_TIME(3) BSD Library Functions Manual ARCHIVE_ENTRY_TIME(3) -1mNAME0m - 1marchive_entry_atime22m, 1marchive_entry_atime_nsec22m, - 1marchive_entry_atime_is_set22m, 1marchive_entry_set_atime22m, - 1marchive_entry_unset_atime22m, 1marchive_entry_birthtime22m, - 1marchive_entry_birthtime_nsec22m, 1marchive_entry_birthtime_is_set22m, - 1marchive_entry_set_birthtime22m, 1marchive_entry_unset_birthtime22m, - 1marchive_entry_ctime22m, 1marchive_entry_ctime_nsec22m, - 1marchive_entry_ctime_is_set22m, 1marchive_entry_set_ctime22m, - 1marchive_entry_unset_ctime22m, 1marchive_entry_mtime22m, 1marchive_entry_mtime_nsec22m, - 1marchive_entry_mtime_is_set22m, 1marchive_entry_set_mtime22m, - 1marchive_entry_unset_mtime22m, — functions for manipulating times in archive +NAME + archive_entry_atime, archive_entry_atime_nsec, + archive_entry_atime_is_set, archive_entry_set_atime, + archive_entry_unset_atime, archive_entry_birthtime, + archive_entry_birthtime_nsec, archive_entry_birthtime_is_set, + archive_entry_set_birthtime, archive_entry_unset_birthtime, + archive_entry_ctime, archive_entry_ctime_nsec, + archive_entry_ctime_is_set, archive_entry_set_ctime, + archive_entry_unset_ctime, archive_entry_mtime, archive_entry_mtime_nsec, + archive_entry_mtime_is_set, archive_entry_set_mtime, + archive_entry_unset_mtime, — functions for manipulating times in archive entry descriptions -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mtime_t0m - 1marchive_entry_atime22m(4mstruct24m 4marchive_entry24m 4m*a24m); + time_t + archive_entry_atime(struct archive_entry *a); - 4mlong0m - 1marchive_entry_atime_nsec22m(4mstruct24m 4marchive_entry24m 4m*a24m); + long + archive_entry_atime_nsec(struct archive_entry *a); - 4mint0m - 1marchive_entry_atime_is_set22m(4mstruct24m 4marchive_entry24m 4m*a24m); + int + archive_entry_atime_is_set(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_atime22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mtime_t24m 4msec24m, - 4mlong24m 4mnanosec24m); + void + archive_entry_set_atime(struct archive_entry *a, time_t sec, + long nanosec); - 4mvoid0m - 1marchive_entry_unset_atime22m(4mstruct24m 4marchive_entry24m 4m*a24m); + void + archive_entry_unset_atime(struct archive_entry *a); - 4mtime_t0m - 1marchive_entry_birthtime22m(4mstruct24m 4marchive_entry24m 4m*a24m); + time_t + archive_entry_birthtime(struct archive_entry *a); - 4mlong0m - 1marchive_entry_birthtime_nsec22m(4mstruct24m 4marchive_entry24m 4m*a24m); + long + archive_entry_birthtime_nsec(struct archive_entry *a); - 4mint0m - 1marchive_entry_birthtime_is_set22m(4mstruct24m 4marchive_entry24m 4m*a24m); + int + archive_entry_birthtime_is_set(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_birthtime22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mtime_t24m 4msec24m, - 4mlong24m 4mnanosec24m); + void + archive_entry_set_birthtime(struct archive_entry *a, time_t sec, + long nanosec); - 4mvoid0m - 1marchive_entry_unset_birthtime22m(4mstruct24m 4marchive_entry24m 4m*a24m); + void + archive_entry_unset_birthtime(struct archive_entry *a); - 4mtime_t0m - 1marchive_entry_ctime22m(4mstruct24m 4marchive_entry24m 4m*a24m); + time_t + archive_entry_ctime(struct archive_entry *a); - 4mlong0m - 1marchive_entry_ctime_nsec22m(4mstruct24m 4marchive_entry24m 4m*a24m); + long + archive_entry_ctime_nsec(struct archive_entry *a); - 4mint0m - 1marchive_entry_ctime_is_set22m(4mstruct24m 4marchive_entry24m 4m*a24m); + int + archive_entry_ctime_is_set(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_ctime22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mtime_t24m 4msec24m, - 4mlong24m 4mnanosec24m); + void + archive_entry_set_ctime(struct archive_entry *a, time_t sec, + long nanosec); - 4mvoid0m - 1marchive_entry_unset_ctime22m(4mstruct24m 4marchive_entry24m 4m*a24m); + void + archive_entry_unset_ctime(struct archive_entry *a); - 4mtime_t0m - 1marchive_entry_mtime22m(4mstruct24m 4marchive_entry24m 4m*a24m); + time_t + archive_entry_mtime(struct archive_entry *a); - 4mlong0m - 1marchive_entry_mtime_nsec22m(4mstruct24m 4marchive_entry24m 4m*a24m); + long + archive_entry_mtime_nsec(struct archive_entry *a); - 4mint0m - 1marchive_entry_mtime_is_set22m(4mstruct24m 4marchive_entry24m 4m*a24m); + int + archive_entry_mtime_is_set(struct archive_entry *a); - 4mvoid0m - 1marchive_entry_set_mtime22m(4mstruct24m 4marchive_entry24m 4m*a24m, 4mtime_t24m 4msec24m, - 4mlong24m 4mnanosec24m); + void + archive_entry_set_mtime(struct archive_entry *a, time_t sec, + long nanosec); - 4mvoid0m - 1marchive_entry_unset_mtime22m(4mstruct24m 4marchive_entry24m 4m*a24m); + void + archive_entry_unset_mtime(struct archive_entry *a); -1mDESCRIPTION0m +DESCRIPTION These functions create and manipulate the time fields in an - 4marchive_entry24m. Supported time fields are atime (access time), birthtime + archive_entry. Supported time fields are atime (access time), birthtime (creation time), ctime (last time an inode property was changed) and mtime (modification time). @@ -93,18 +93,18 @@ ARCHIVE_ENTRY_TIME(3) BSD Library Functions Manual ARCHIVE_ENTRY_TIME(3) truncated automatically depending on the archive format (for archiving) or the filesystem capabilities (for restoring). - All timestamp fields are optional. The 1mXXX_unset22m() functions can be used + All timestamp fields are optional. The XXX_unset() functions can be used to mark the corresponding field as missing. The current state can be - queried using 1mXXX_is_set22m(). Unset time fields have a second and nanosec‐ + queried using XXX_is_set(). Unset time fields have a second and nanosec‐ ond field of 0. -1mSEE ALSO0m +SEE ALSO archive_entry(3) libarchive(3), -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. +HISTORY + The libarchive library first appeared in FreeBSD 5.3. -1mAUTHORS0m - The 1mlibarchive 22mlibrary was written by Tim Kientzle . +AUTHORS + The libarchive library was written by Tim Kientzle . BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read.3.txt b/archivers/libarchive/files/doc/text/archive_read.3.txt index 8de8ffff33f..3421d88041e 100644 --- a/archivers/libarchive/files/doc/text/archive_read.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read.3.txt @@ -1,86 +1,86 @@ ARCHIVE_READ(3) BSD Library Functions Manual ARCHIVE_READ(3) -1mNAME0m - 1marchive_read 22m— functions for reading streaming archives +NAME + archive_read — functions for reading streaming archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include -1mDESCRIPTION0m +DESCRIPTION These functions provide a complete API for reading streaming archives. The general process is to first create the struct archive object, set options, initialize the reader, iterate over the archive headers and associated data, then close the archive and release all resources. - 1mCreate archive object0m + Create archive object See archive_read_new(3). To read an archive, you must first obtain an initialized struct archive - object from 1marchive_read_new22m(). + object from archive_read_new(). - 1mEnable filters and formats0m + Enable filters and formats See archive_read_filter(3) and archive_read_format(3). You can then modify this object for the desired operations with the vari‐ - ous 1marchive_read_set_XXX22m() and 1marchive_read_support_XXX22m() functions. In + ous archive_read_set_XXX() and archive_read_support_XXX() functions. In particular, you will need to invoke appropriate - 1marchive_read_support_XXX22m() functions to enable the corresponding compres‐ + archive_read_support_XXX() functions to enable the corresponding compres‐ sion and format support. Note that these latter functions perform two distinct operations: they cause the corresponding support code to be linked into your program, and they enable the corresponding auto-detect code. Unless you have specific constraints, you will generally want to - invoke 1marchive_read_support_filter_all22m() and - 1marchive_read_support_format_all22m() to enable auto-detect for all formats + invoke archive_read_support_filter_all() and + archive_read_support_format_all() to enable auto-detect for all formats and compression types currently supported by the library. - 1mSet options0m + Set options See archive_read_set_options(3). - 1mOpen archive0m + Open archive See archive_read_open(3). Once you have prepared the struct archive object, you call - 1marchive_read_open22m() to actually open the archive and prepare it for read‐ + archive_read_open() to actually open the archive and prepare it for read‐ ing. There are several variants of this function; the most basic expects you to provide pointers to several functions that can provide blocks of bytes from the archive. There are convenience forms that allow you to - specify a filename, file descriptor, 4mFILE24m 4m*24m object, or a block of memory + specify a filename, file descriptor, FILE * object, or a block of memory from which to read the archive data. Note that the core library makes no assumptions about the size of the blocks read; callback functions are free to read whatever block size is most appropriate for the medium. - 1mConsume archive0m + Consume archive See archive_read_header(3), archive_read_data(3) and archive_read_extract(3). Each archive entry consists of a header followed by a certain amount of - data. You can obtain the next header with 1marchive_read_next_header22m(), + data. You can obtain the next header with archive_read_next_header(), which returns a pointer to an struct archive_entry structure with infor‐ mation about the current archive element. If the entry is a regular file, then the header will be followed by the file data. You can use - 1marchive_read_data22m() (which works much like the read(2) system call) to - read this data from the archive, or 1marchive_read_data_block22m() which pro‐ + archive_read_data() (which works much like the read(2) system call) to + read this data from the archive, or archive_read_data_block() which pro‐ vides a slightly more efficient interface. You may prefer to use the - higher-level 1marchive_read_data_skip22m(), which reads and discards the data - for this entry, 1marchive_read_data_into_fd22m(), which copies the data to the - provided file descriptor, or 1marchive_read_extract22m(), which recreates the + higher-level archive_read_data_skip(), which reads and discards the data + for this entry, archive_read_data_into_fd(), which copies the data to the + provided file descriptor, or archive_read_extract(), which recreates the specified entry on disk and copies data from the archive. In particular, - note that 1marchive_read_extract22m() uses the struct archive_entry structure + note that archive_read_extract() uses the struct archive_entry structure that you provide it, which may differ from the entry just read from the archive. In particular, many applications will want to override the pathname, file permissions, or ownership. - 1mRelease resources0m + Release resources See archive_read_free(3). Once you have finished reading data from the archive, you should call - 1marchive_read_close22m() to close the archive, then call 1marchive_read_free22m() + archive_read_close() to close the archive, then call archive_read_free() to release all resources, including all memory allocated by the library. -1mEXAMPLE0m +EXAMPLE The following illustrates basic usage of the library. In this example, the callback functions are simply wrappers around the standard open(2), read(2), and close(2) system calls. @@ -134,19 +134,19 @@ ARCHIVE_READ(3) BSD Library Functions Manual ARCHIVE_READ(3) return (ARCHIVE_OK); } -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_read_new(3), archive_read_data(3), archive_read_extract(3), archive_read_filter(3), archive_read_format(3), archive_read_header(3), archive_read_open(3), archive_read_set_options(3), archive_util(3), tar(5) -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. +HISTORY + The libarchive library first appeared in FreeBSD 5.3. -1mAUTHORS0m - The 1mlibarchive 22mlibrary was written by Tim Kientzle . +AUTHORS + The libarchive library was written by Tim Kientzle . -1mBUGS0m +BUGS Many traditional archiver programs treat empty files as valid empty ar‐ chives. For example, many implementations of tar(1) allow you to append entries to an empty file. Of course, it is impossible to determine the diff --git a/archivers/libarchive/files/doc/text/archive_read_data.3.txt b/archivers/libarchive/files/doc/text/archive_read_data.3.txt index 05d30dfa4b2..499b0c5fc10 100644 --- a/archivers/libarchive/files/doc/text/archive_read_data.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_data.3.txt @@ -1,71 +1,71 @@ ARCHIVE_READ_DATA(3) BSD Library Functions Manual ARCHIVE_READ_DATA(3) -1mNAME0m - 1marchive_read_data archive_read_data_block22m, 1marchive_read_data_skip22m, - 1marchive_read_data_into_fd 22m— functions for reading streaming archives +NAME + archive_read_data archive_read_data_block, archive_read_data_skip, + archive_read_data_into_fd — functions for reading streaming archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mla_ssize_t0m - 1marchive_read_data22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*buff24m, 4msize_t24m 4mlen24m); + la_ssize_t + archive_read_data(struct archive *, void *buff, size_t len); - 4mint0m - 1marchive_read_data_block22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mvoid24m 4m**buff24m, 4msize_t24m 4m*len24m, - 4moff_t24m 4m*offset24m); + int + archive_read_data_block(struct archive *, const void **buff, size_t *len, + off_t *offset); - 4mint0m - 1marchive_read_data_skip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_data_skip(struct archive *); - 4mint0m - 1marchive_read_data_into_fd22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m 4mfd24m); + int + archive_read_data_into_fd(struct archive *, int fd); -1mDESCRIPTION0m - 1marchive_read_data22m() +DESCRIPTION + archive_read_data() Read data associated with the header just read. Internally, this - is a convenience function that calls 1marchive_read_data_block22m() + is a convenience function that calls archive_read_data_block() and fills any gaps with nulls so that callers see a single con‐ tinuous stream of data. - 1marchive_read_data_block22m() + archive_read_data_block() Return the next available block of data for this entry. Unlike - 1marchive_read_data22m(), the 1marchive_read_data_block22m() function + archive_read_data(), the archive_read_data_block() function avoids copying data and allows you to correctly handle sparse files, as supported by some archive formats. The library guaran‐ tees that offsets will increase and that blocks will not overlap. Note that the blocks returned from this function can be much larger than the block size read from disk, due to compression and internal buffer optimizations. - 1marchive_read_data_skip22m() + archive_read_data_skip() A convenience function that repeatedly calls - 1marchive_read_data_block22m() to skip all of the data for this ar‐ + archive_read_data_block() to skip all of the data for this ar‐ chive entry. Note that this function is invoked automatically by - 1marchive_read_next_header222m() if the previous entry was not com‐ + archive_read_next_header2() if the previous entry was not com‐ pletely consumed. - 1marchive_read_data_into_fd22m() + archive_read_data_into_fd() A convenience function that repeatedly calls - 1marchive_read_data_block22m() to copy the entire entry to the pro‐ + archive_read_data_block() to copy the entire entry to the pro‐ vided file descriptor. -1mRETURN VALUES0m +RETURN VALUES Most functions return zero on success, non-zero on error. The possible - return codes include: 1mARCHIVE_OK 22m(the operation succeeded), 1mARCHIVE_WARN0m + return codes include: ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered), - 1mARCHIVE_EOF 22m(end-of-archive was encountered), 1mARCHIVE_RETRY 22m(the opera‐ - tion failed but can be retried), and 1mARCHIVE_FATAL 22m(there was a fatal + ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera‐ + tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal error; the archive should be closed immediately). - 1marchive_read_data22m() returns a count of bytes actually read or zero at the - end of the entry. On error, a value of 1mARCHIVE_FATAL22m, 1mARCHIVE_WARN22m, or - 1mARCHIVE_RETRY 22mis returned. + archive_read_data() returns a count of bytes actually read or zero at the + end of the entry. On error, a value of ARCHIVE_FATAL, ARCHIVE_WARN, or + ARCHIVE_RETRY is returned. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_read(3), archive_read_extract(3), archive_read_filter(3), archive_read_format(3), archive_read_header(3), archive_read_open(3), archive_read_set_options(3), archive_util(3), diff --git a/archivers/libarchive/files/doc/text/archive_read_disk.3.txt b/archivers/libarchive/files/doc/text/archive_read_disk.3.txt index f4f63425f54..420371e073d 100644 --- a/archivers/libarchive/files/doc/text/archive_read_disk.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_disk.3.txt @@ -1,93 +1,120 @@ ARCHIVE_READ_DISK(3) BSD Library Functions Manual ARCHIVE_READ_DISK(3) -1mNAME0m - 1marchive_read_disk_new22m, 1marchive_read_disk_set_symlink_logical22m, - 1marchive_read_disk_set_symlink_physical22m, - 1marchive_read_disk_set_symlink_hybrid22m, 1marchive_read_disk_entry_from_file22m, - 1marchive_read_disk_gname22m, 1marchive_read_disk_uname22m, - 1marchive_read_disk_set_uname_lookup22m, 1marchive_read_disk_set_gname_lookup22m, - 1marchive_read_disk_set_standard_lookup22m, 1marchive_read_close22m, - 1marchive_read_finish22m, 1marchive_read_free 22m— functions for reading objects +NAME + archive_read_disk_new, archive_read_disk_set_behavior, + archive_read_disk_set_symlink_logical, + archive_read_disk_set_symlink_physical, + archive_read_disk_set_symlink_hybrid, archive_read_disk_entry_from_file, + archive_read_disk_gname, archive_read_disk_uname, + archive_read_disk_set_uname_lookup, archive_read_disk_set_gname_lookup, + archive_read_disk_set_standard_lookup — functions for reading objects from disk -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mstruct24m 4marchive24m 4m*0m - 1marchive_read_disk_new22m(4mvoid24m); + struct archive * + archive_read_disk_new(void); - 4mint0m - 1marchive_read_disk_set_symlink_logical22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_disk_set_behavior(struct archive *, int); - 4mint0m - 1marchive_read_disk_set_symlink_physical22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_disk_set_symlink_logical(struct archive *); - 4mint0m - 1marchive_read_disk_set_symlink_hybrid22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_disk_set_symlink_physical(struct archive *); - 4mconst24m 4mchar24m 4m*0m - 1marchive_read_disk_gname22m(4mstruct24m 4marchive24m 4m*24m, 4mgid_t24m); + int + archive_read_disk_set_symlink_hybrid(struct archive *); - 4mconst24m 4mchar24m 4m*0m - 1marchive_read_disk_uname22m(4mstruct24m 4marchive24m 4m*24m, 4muid_t24m); + const char * + archive_read_disk_gname(struct archive *, gid_t); - 4mint0m - 1marchive_read_disk_set_gname_lookup22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*24m, - 4mconst24m 4mchar24m 4m*(*lookup)(void24m 4m*,24m 4mgid_t)24m, 4mvoid24m 4m(*cleanup)(void24m 4m*)24m); + const char * + archive_read_disk_uname(struct archive *, uid_t); - 4mint0m - 1marchive_read_disk_set_uname_lookup22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*24m, - 4mconst24m 4mchar24m 4m*(*lookup)(void24m 4m*,24m 4muid_t)24m, 4mvoid24m 4m(*cleanup)(void24m 4m*)24m); + int + archive_read_disk_set_gname_lookup(struct archive *, void *, + const char *(*lookup)(void *, gid_t), void (*cleanup)(void *)); - 4mint0m - 1marchive_read_disk_set_standard_lookup22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_disk_set_uname_lookup(struct archive *, void *, + const char *(*lookup)(void *, uid_t), void (*cleanup)(void *)); - 4mint0m - 1marchive_read_disk_entry_from_file22m(4mstruct24m 4marchive24m 4m*24m, - 4mstruct24m 4marchive_entry24m 4m*24m, 4mint24m 4mfd24m, 4mconst24m 4mstruct24m 4mstat24m 4m*24m); + int + archive_read_disk_set_standard_lookup(struct archive *); - 4mint0m - 1marchive_read_close22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_disk_entry_from_file(struct archive *, + struct archive_entry *, int fd, const struct stat *); - 4mint0m - 1marchive_read_finish22m(4mstruct24m 4marchive24m 4m*24m); - - 4mint0m - 1marchive_read_free22m(4mstruct24m 4marchive24m 4m*24m); - -1mDESCRIPTION0m +DESCRIPTION These functions provide an API for reading information about objects on disk. In particular, they provide an interface for populating struct archive_entry objects. - 1marchive_read_disk_new22m() + archive_read_disk_new() Allocates and initializes a struct archive object suitable for reading object information from disk. - 1marchive_read_disk_set_symlink_logical22m(), - 1marchive_read_disk_set_symlink_physical22m(), - 1marchive_read_disk_set_symlink_hybrid22m() + archive_read_disk_set_behavior() + Configures various behavior options when reading entries from + disk. The flags field consists of a bitwise OR of one or more of + the following values: + ARCHIVE_READDISK_HONOR_NODUMP + Skip files and directories with the nodump file attribute + (file flag) set. By default, the nodump file atrribute + is ignored. + ARCHIVE_READDISK_MAC_COPYFILE + Mac OS X specific. Read metadata (ACLs and extended + attributes) with copyfile(3). By default, metadata is + read using copyfile(3). + ARCHIVE_READDISK_NO_ACL + Do not read Access Control Lists. By default, ACLs are + read from disk. + ARCHIVE_READDISK_NO_FFLAGS + Do not read file attributes (file flags). By default, + file attributes are read from disk. See chattr(1) + (Linux) or chflags(1) (FreeBSD, Mac OS X) for more infor‐ + mation on file attributes. + ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS + Do not traverse mount points. By defaut, moint points + are traversed. + ARCHIVE_READDISK_NO_XATTR + Do not read extended file attributes (xattrs). By + default, extended file attributes are read from disk. + See xattr(7) (Linux), xattr(2) (Mac OS X), or + getextattr(8) (FreeBSD) for more information on extended + file attributes. + ARCHIVE_READDISK_RESTORE_ATIME + Restore access time of traversed files. By default, + access time of traversed files is not restored. + + archive_read_disk_set_symlink_logical(), + archive_read_disk_set_symlink_physical(), + archive_read_disk_set_symlink_hybrid() This sets the mode used for handling symbolic links. The “logical” mode follows all symbolic links. The “physical” mode does not follow any symbolic links. The “hybrid” mode currently behaves identically to the “logical” mode. - 1marchive_read_disk_gname22m(), 1marchive_read_disk_uname22m() + archive_read_disk_gname(), archive_read_disk_uname() Returns a user or group name given a gid or uid value. By default, these always return a NULL string. - 1marchive_read_disk_set_gname_lookup22m(), - 1marchive_read_disk_set_uname_lookup22m() + archive_read_disk_set_gname_lookup(), + archive_read_disk_set_uname_lookup() These allow you to override the functions used for user and group name lookups. You may also provide a void * pointer to a private data structure and a cleanup function for that data. The cleanup function will be invoked when the struct archive object is destroyed or when new lookup functions are registered. - 1marchive_read_disk_set_standard_lookup22m() + archive_read_disk_set_standard_lookup() This convenience function installs a standard set of user and group name lookup functions. These functions use getpwuid(3) and getgrgid(3) to convert ids to names, defaulting to NULL if the @@ -95,7 +122,7 @@ ARCHIVE_READ_DISK(3) BSD Library Functions Manual ARCHIVE_READ_DISK(3) ple memory cache to reduce the number of calls to getpwuid(3) and getgrgid(3). - 1marchive_read_disk_entry_from_file22m() + archive_read_disk_entry_from_file() Populates a struct archive_entry object with information about a particular file. The archive_entry object must have already been created with archive_entry_new(3) and at least one of the source @@ -118,20 +145,10 @@ ARCHIVE_READ_DISK(3) BSD Library Functions Manual ARCHIVE_READ_DISK(3) group names using the currently registered lookup functions above. This affects the file ownership fields and ACL values in the struct archive_entry object. - - 1marchive_read_close22m() - Does nothing for archive_read_disk handles. - - 1marchive_read_finish22m() - This is a deprecated synonym for 1marchive_read_free22m(). - - 1marchive_read_free22m() - Invokes 1marchive_read_close22m() if it was not invoked manually, then - releases all resources. - More information about the 4mstruct24m 4marchive24m object and the overall design + More information about the struct archive object and the overall design of the library can be found in the libarchive(3) overview. -1mEXAMPLE0m +EXAMPLE The following illustrates basic usage of the library by showing how to use it to copy an item on disk into an archive. @@ -160,50 +177,50 @@ ARCHIVE_READ_DISK(3) BSD Library Functions Manual ARCHIVE_READ_DISK(3) archive_entry_free(entry); } -1mRETURN VALUES0m - Most functions return 1mARCHIVE_OK 22m(zero) on success, or one of several +RETURN VALUES + Most functions return ARCHIVE_OK (zero) on success, or one of several negative error codes for errors. Specific error codes include: - 1mARCHIVE_RETRY 22mfor operations that might succeed if retried, 1mARCHIVE_WARN0m + ARCHIVE_RETRY for operations that might succeed if retried, ARCHIVE_WARN for unusual conditions that do not prevent further operations, and - 1mARCHIVE_FATAL 22mfor serious errors that make remaining operations impossi‐ + ARCHIVE_FATAL for serious errors that make remaining operations impossi‐ ble. - 1marchive_read_disk_new22m() returns a pointer to a newly-allocated struct + archive_read_disk_new() returns a pointer to a newly-allocated struct archive object or NULL if the allocation failed for any reason. - 1marchive_read_disk_gname22m() and 1marchive_read_disk_uname22m() return const char + archive_read_disk_gname() and archive_read_disk_uname() return const char * pointers to the textual name or NULL if the lookup failed for any rea‐ son. The returned pointer points to internal storage that may be reused on the next call to either of these functions; callers should copy the string if they need to continue accessing it. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO archive_read(3), archive_util(3), archive_write(3), archive_write_disk(3), tar(1), libarchive(3) -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. The - 1marchive_read_disk 22minterface was added to 1mlibarchive 2.6 22mand first +HISTORY + The libarchive library first appeared in FreeBSD 5.3. The + archive_read_disk interface was added to libarchive 2.6 and first appeared in FreeBSD 8.0. -1mAUTHORS0m - The 1mlibarchive 22mlibrary was written by Tim Kientzle +AUTHORS + The libarchive library was written by Tim Kientzle . -1mBUGS0m +BUGS The “standard” user name and group name lookup functions are not the defaults because getgrgid(3) and getpwuid(3) are sometimes too large for particular applications. The current design allows the application author to use a more compact implementation when appropriate. The full list of metadata read from disk by - 1marchive_read_disk_entry_from_file22m() is necessarily system-dependent. + archive_read_disk_entry_from_file() is necessarily system-dependent. - The 1marchive_read_disk_entry_from_file22m() function reads as much informa‐ + The archive_read_disk_entry_from_file() function reads as much informa‐ tion as it can from disk. Some method should be provided to limit this so that clients who do not need ACLs, for instance, can avoid the extra work needed to look up such information. @@ -213,4 +230,4 @@ ARCHIVE_READ_DISK(3) BSD Library Functions Manual ARCHIVE_READ_DISK(3) such methods are implemented, the “hybrid” symbolic link mode will make sense. -BSD December 30, 2016 BSD +BSD April 3, 2017 BSD diff --git a/archivers/libarchive/files/doc/text/archive_read_extract.3.txt b/archivers/libarchive/files/doc/text/archive_read_extract.3.txt index a78cb35c413..ca1fec5ad49 100644 --- a/archivers/libarchive/files/doc/text/archive_read_extract.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_extract.3.txt @@ -1,50 +1,50 @@ ARCHIVE_READ_EXTRACT(3) BSD Library Functions Manual ARCHIVE_READ_EXTRACT(3) -1mNAME0m - 1marchive_read_extract22m, 1marchive_read_extract222m, - 1marchive_read_extract_set_progress_callback 22m— functions for reading +NAME + archive_read_extract, archive_read_extract2, + archive_read_extract_set_progress_callback — functions for reading streaming archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_read_extract22m(4mstruct24m 4marchive24m 4m*24m, 4mstruct24m 4marchive_entry24m 4m*24m, - 4mint24m 4mflags24m); + int + archive_read_extract(struct archive *, struct archive_entry *, + int flags); - 4mint0m - 1marchive_read_extract222m(4mstruct24m 4marchive24m 4m*src24m, 4mstruct24m 4marchive_entry24m 4m*24m, - 4mstruct24m 4marchive24m 4m*dest24m); + int + archive_read_extract2(struct archive *src, struct archive_entry *, + struct archive *dest); - 4mvoid0m - 1marchive_read_extract_set_progress_callback22m(4mstruct24m 4marchive24m 4m*24m, - 4mvoid24m 4m(*func)(void24m 4m*)24m, 4mvoid24m 4m*user_data24m); + void + archive_read_extract_set_progress_callback(struct archive *, + void (*func)(void *), void *user_data); -1mDESCRIPTION0m - 1marchive_read_extract22m(), 1marchive_read_extract_set_skip_file22m() +DESCRIPTION + archive_read_extract(), archive_read_extract_set_skip_file() A convenience function that wraps the corresponding archive_write_disk(3) interfaces. The first call to - 1marchive_read_extract22m() creates a restore object using + archive_read_extract() creates a restore object using archive_write_disk_new(3) and archive_write_disk_set_standard_lookup(3), then transparently invokes archive_write_disk_set_options(3), archive_write_header(3), archive_write_data(3), and archive_write_finish_entry(3) to create the entry on disk and - copy data into it. The 4mflags24m argument is passed unmodified to + copy data into it. The flags argument is passed unmodified to archive_write_disk_set_options(3). - 1marchive_read_extract222m() - This is another version of 1marchive_read_extract22m() that allows you + archive_read_extract2() + This is another version of archive_read_extract() that allows you to provide your own restore object. In particular, this allows you to override the standard lookup functions using archive_write_disk_set_group_lookup(3), and archive_write_disk_set_user_lookup(3). Note that - 1marchive_read_extract222m() does not accept a 4mflags24m argument; you - should use 1marchive_write_disk_set_options22m() to set the restore + archive_read_extract2() does not accept a flags argument; you + should use archive_write_disk_set_options() to set the restore options yourself. - 1marchive_read_extract_set_progress_callback22m() + archive_read_extract_set_progress_callback() Sets a pointer to a user-defined callback that can be used for updating progress displays during extraction. The progress func‐ tion will be invoked during the extraction of large regular @@ -54,19 +54,19 @@ ARCHIVE_READ_EXTRACT(3) BSD Library Functions Manual ARCHIVE_READ_EXTRACT(3) object so that various statistics can be retrieved for the progress display. -1mRETURN VALUES0m +RETURN VALUES Most functions return zero on success, non-zero on error. The possible - return codes include: 1mARCHIVE_OK 22m(the operation succeeded), 1mARCHIVE_WARN0m + return codes include: ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered), - 1mARCHIVE_EOF 22m(end-of-archive was encountered), 1mARCHIVE_RETRY 22m(the opera‐ - tion failed but can be retried), and 1mARCHIVE_FATAL 22m(there was a fatal + ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera‐ + tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal error; the archive should be closed immediately). -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_read(3), archive_read_data(3), archive_read_filter(3), archive_read_format(3), archive_read_open(3), archive_read_set_options(3), archive_util(3), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_read_filter.3.txt b/archivers/libarchive/files/doc/text/archive_read_filter.3.txt index 6ae9915791f..3af7cdf6cc3 100644 --- a/archivers/libarchive/files/doc/text/archive_read_filter.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_filter.3.txt @@ -1,110 +1,110 @@ ARCHIVE_READ_FILTER(3) BSD Library Functions Manual ARCHIVE_READ_FILTER(3) -1mNAME0m - 1marchive_read_support_filter_all22m, 1marchive_read_support_filter_bzip222m, - 1marchive_read_support_filter_compress22m, 1marchive_read_support_filter_gzip22m, - 1marchive_read_support_filter_lz422m, 1marchive_read_support_filter_lzma22m, - 1marchive_read_support_filter_none22m, 1marchive_read_support_filter_rpm22m, - 1marchive_read_support_filter_uu22m, 1marchive_read_support_filter_xz22m, - 1marchive_read_support_filter_program22m, - 1marchive_read_support_filter_program_signature 22m— functions for reading +NAME + archive_read_support_filter_all, archive_read_support_filter_bzip2, + archive_read_support_filter_compress, archive_read_support_filter_gzip, + archive_read_support_filter_lz4, archive_read_support_filter_lzma, + archive_read_support_filter_none, archive_read_support_filter_rpm, + archive_read_support_filter_uu, archive_read_support_filter_xz, + archive_read_support_filter_program, + archive_read_support_filter_program_signature — functions for reading streaming archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_read_support_filter_all22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_all(struct archive *); - 4mint0m - 1marchive_read_support_filter_bzip222m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_bzip2(struct archive *); - 4mint0m - 1marchive_read_support_filter_compress22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_compress(struct archive *); - 4mint0m - 1marchive_read_support_filter_grzip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_grzip(struct archive *); - 4mint0m - 1marchive_read_support_filter_gzip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_gzip(struct archive *); - 4mint0m - 1marchive_read_support_filter_lrzip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_lrzip(struct archive *); - 4mint0m - 1marchive_read_support_filter_lz422m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_lz4(struct archive *); - 4mint0m - 1marchive_read_support_filter_lzma22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_lzma(struct archive *); - 4mint0m - 1marchive_read_support_filter_lzop22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_lzop(struct archive *); - 4mint0m - 1marchive_read_support_filter_none22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_none(struct archive *); - 4mint0m - 1marchive_read_support_filter_rpm22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_rpm(struct archive *); - 4mint0m - 1marchive_read_support_filter_uu22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_uu(struct archive *); - 4mint0m - 1marchive_read_support_filter_xz22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_filter_xz(struct archive *); - 4mint0m - 1marchive_read_support_filter_program22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*cmd24m); + int + archive_read_support_filter_program(struct archive *, const char *cmd); - 4mint0m - 1marchive_read_support_filter_program_signature22m(4mstruct24m 4marchive24m 4m*24m, - 4mconst24m 4mchar24m 4m*cmd24m, 4mconst24m 4mvoid24m 4m*signature24m, 4msize_t24m 4msignature_length24m); + int + archive_read_support_filter_program_signature(struct archive *, + const char *cmd, const void *signature, size_t signature_length); -1mDESCRIPTION0m - 1marchive_read_support_filter_bzip222m(), - 1marchive_read_support_filter_compress22m(), - 1marchive_read_support_filter_grzip22m(), - 1marchive_read_support_filter_gzip22m(), - 1marchive_read_support_filter_lrzip22m(), - 1marchive_read_support_filter_lz422m(), - 1marchive_read_support_filter_lzma22m(), - 1marchive_read_support_filter_lzop22m(), - 1marchive_read_support_filter_none22m(), - 1marchive_read_support_filter_rpm22m(), - 1marchive_read_support_filter_uu22m(), - 1marchive_read_support_filter_xz22m() +DESCRIPTION + archive_read_support_filter_bzip2(), + archive_read_support_filter_compress(), + archive_read_support_filter_grzip(), + archive_read_support_filter_gzip(), + archive_read_support_filter_lrzip(), + archive_read_support_filter_lz4(), + archive_read_support_filter_lzma(), + archive_read_support_filter_lzop(), + archive_read_support_filter_none(), + archive_read_support_filter_rpm(), + archive_read_support_filter_uu(), + archive_read_support_filter_xz() Enables auto-detection code and decompression support for the specified compression. These functions may fall back on external programs if an appropriate library was not available at build time. Decompression using an external program is usually slower than decompression through built-in libraries. Note that “none” is always enabled by default. - 1marchive_read_support_filter_all22m() + archive_read_support_filter_all() Enables all available decompression filters. - 1marchive_read_support_filter_program22m() + archive_read_support_filter_program() Data is fed through the specified external program before being dearchived. Note that this disables automatic detection of the compression format, so it makes no sense to specify this in con‐ junction with any other decompression option. - 1marchive_read_support_filter_program_signature22m() + archive_read_support_filter_program_signature() This feeds data through the specified external program but only if the initial bytes of the data match the specified signature value. -1mRETURN VALUES0m - These functions return 1mARCHIVE_OK 22mif the compression is fully supported, - 1mARCHIVE_WARN 22mif the compression is supported only through an external +RETURN VALUES + These functions return ARCHIVE_OK if the compression is fully supported, + ARCHIVE_WARN if the compression is supported only through an external program. - 1marchive_read_support_filter_none22m() always succeeds. + archive_read_support_filter_none() always succeeds. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO libarchive(3), archive_read(3), archive_read_data(3), archive_read_format(3), archive_read_format(3) diff --git a/archivers/libarchive/files/doc/text/archive_read_format.3.txt b/archivers/libarchive/files/doc/text/archive_read_format.3.txt index 78209862a72..38f1d8adfa2 100644 --- a/archivers/libarchive/files/doc/text/archive_read_format.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_format.3.txt @@ -1,122 +1,122 @@ ARCHIVE_READ_FORMAT(3) BSD Library Functions Manual ARCHIVE_READ_FORMAT(3) -1mNAME0m - 1marchive_read_support_format_7zip22m, 1marchive_read_support_format_all22m, - 1marchive_read_support_format_ar22m, 1marchive_read_support_format_by_code22m, - 1marchive_read_support_format_cab22m, 1marchive_read_support_format_cpio22m, - 1marchive_read_support_format_empty22m, 1marchive_read_support_format_iso966022m, - 1marchive_read_support_format_lha22m, 1marchive_read_support_format_mtree,0m - 1marchive_read_support_format_rar, archive_read_support_format_raw,0m - 1marchive_read_support_format_tar22m, 1marchive_read_support_format_xar22m, - 1marchive_read_support_format_zip 22m— functions for reading streaming ar‐ +NAME + archive_read_support_format_7zip, archive_read_support_format_all, + archive_read_support_format_ar, archive_read_support_format_by_code, + archive_read_support_format_cab, archive_read_support_format_cpio, + archive_read_support_format_empty, archive_read_support_format_iso9660, + archive_read_support_format_lha, archive_read_support_format_mtree, + archive_read_support_format_rar, archive_read_support_format_raw, + archive_read_support_format_tar, archive_read_support_format_xar, + archive_read_support_format_zip — functions for reading streaming ar‐ chives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_read_support_format_7zip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_7zip(struct archive *); - 4mint0m - 1marchive_read_support_format_all22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_all(struct archive *); - 4mint0m - 1marchive_read_support_format_ar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_ar(struct archive *); - 4mint0m - 1marchive_read_support_format_by_code22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m); + int + archive_read_support_format_by_code(struct archive *, int); - 4mint0m - 1marchive_read_support_format_cab22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_cab(struct archive *); - 4mint0m - 1marchive_read_support_format_cpio22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_cpio(struct archive *); - 4mint0m - 1marchive_read_support_format_empty22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_empty(struct archive *); - 4mint0m - 1marchive_read_support_format_iso966022m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_iso9660(struct archive *); - 4mint0m - 1marchive_read_support_format_lha22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_lha(struct archive *); - 4mint0m - 1marchive_read_support_format_mtree22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_mtree(struct archive *); - 4mint0m - 1marchive_read_support_format_rar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_rar(struct archive *); - 4mint0m - 1marchive_read_support_format_raw22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_raw(struct archive *); - 4mint0m - 1marchive_read_support_format_tar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_tar(struct archive *); - 4mint0m - 1marchive_read_support_format_xar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_xar(struct archive *); - 4mint0m - 1marchive_read_support_format_zip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_support_format_zip(struct archive *); -1mDESCRIPTION0m - 1marchive_read_support_format_7zip22m(), 1marchive_read_support_format_ar22m(), - 1marchive_read_support_format_cab22m(), - 1marchive_read_support_format_cpio22m(), - 1marchive_read_support_format_iso966022m(), - 1marchive_read_support_format_lha22m(), - 1marchive_read_support_format_mtree22m(), - 1marchive_read_support_format_rar22m(), - 1marchive_read_support_format_raw22m(), - 1marchive_read_support_format_tar22m(), - 1marchive_read_support_format_xar22m(), - 1marchive_read_support_format_zip22m() +DESCRIPTION + archive_read_support_format_7zip(), archive_read_support_format_ar(), + archive_read_support_format_cab(), + archive_read_support_format_cpio(), + archive_read_support_format_iso9660(), + archive_read_support_format_lha(), + archive_read_support_format_mtree(), + archive_read_support_format_rar(), + archive_read_support_format_raw(), + archive_read_support_format_tar(), + archive_read_support_format_xar(), + archive_read_support_format_zip() Enables support---including auto-detection code---for the speci‐ fied archive format. For example, - 1marchive_read_support_format_tar22m() enables support for a variety + archive_read_support_format_tar() enables support for a variety of standard tar formats, old-style tar, ustar, pax interchange format, and many common variants. - 1marchive_read_support_format_all22m() + archive_read_support_format_all() Enables support for all available formats except the “raw” format (see below). - 1marchive_read_support_format_by_code22m() + archive_read_support_format_by_code() Enables a single format specified by the format code. This can be useful when reading a single archive twice; use - 1marchive_format22m() after reading the first time and pass the + archive_format() after reading the first time and pass the resulting code to this function to selectively enable only the necessary format support. Note: In statically-linked executa‐ bles, this will cause your program to include support for every format. If executable size is a concern, you may wish to avoid using this function. - 1marchive_read_support_format_empty22m() + archive_read_support_format_empty() Enables support for treating empty files as empty archives. Because empty files are valid for several different formats, it is not possible to accurately determine a format for an empty file based purely on contents. So empty files are treated by libarchive as a distinct format. - 1marchive_read_support_format_raw22m() + archive_read_support_format_raw() The “raw” format handler allows libarchive to be used to read arbitrary data. It treats any data stream as an archive with a single entry. The pathname of this entry is “data”; all other entry fields are unset. This is not enabled by - 1marchive_read_support_format_all22m() in order to avoid erroneous + archive_read_support_format_all() in order to avoid erroneous handling of damaged archives. -1mRETURN VALUES0m - These functions return 1mARCHIVE_OK 22mon success, or 1mARCHIVE_FATAL22m. +RETURN VALUES + These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_read_data(3), archive_read_filter(3), archive_read_set_options(3), archive_util(3), tar(5) -1mBUGS0m +BUGS Many traditional archiver programs treat empty files as valid empty ar‐ chives. For example, many implementations of tar(1) allow you to append entries to an empty file. Of course, it is impossible to determine the diff --git a/archivers/libarchive/files/doc/text/archive_read_free.3.txt b/archivers/libarchive/files/doc/text/archive_read_free.3.txt index 98ccb10bb47..2e8c2efe9bc 100644 --- a/archivers/libarchive/files/doc/text/archive_read_free.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_free.3.txt @@ -1,50 +1,50 @@ ARCHIVE_READ_FREE(3) BSD Library Functions Manual ARCHIVE_READ_FREE(3) -1mNAME0m - 1marchive_read_close22m, 1marchive_read_finish22m, 1marchive_read_free 22m— functions +NAME + archive_read_close, archive_read_finish, archive_read_free — functions for reading streaming archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_read_close22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_close(struct archive *); - 4mint0m - 1marchive_read_finish22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_finish(struct archive *); - 4mint0m - 1marchive_read_free22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_read_free(struct archive *); -1mDESCRIPTION0m - 1marchive_read_close22m() +DESCRIPTION + archive_read_close() Complete the archive and invoke the close callback. - 1marchive_read_finish22m() - This is a deprecated synonym for 1marchive_read_free22m(). The new + archive_read_finish() + This is a deprecated synonym for archive_read_free(). The new name was introduced with libarchive 3.0. Applications that need to compile with either libarchive 2 or libarchive 3 should con‐ - tinue to use the 1marchive_read_finish22m() name. Both names will be + tinue to use the archive_read_finish() name. Both names will be supported until libarchive 4.0 is released, which is not expected to occur earlier than 2013. - 1marchive_read_free22m() - Invokes 1marchive_read_close22m() if it was not invoked manually, then + archive_read_free() + Invokes archive_read_close() if it was not invoked manually, then release all resources. Note: In libarchive 1.x, this function - was declared to return 4mvoid24m, which made it impossible to detect - certain errors when 1marchive_read_close22m() was invoked implicitly + was declared to return void, which made it impossible to detect + certain errors when archive_read_close() was invoked implicitly from this function. The declaration is corrected beginning with libarchive 2.0. -1mRETURN VALUES0m - These functions return 1mARCHIVE_OK 22mon success, or 1mARCHIVE_FATAL22m. +RETURN VALUES + These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO libarchive(3), archive_read_new(3), archive_read_data(3), archive_read_filter(3), archive_read_format(3), archive_read_open(3), archive_read_set_options(3), archive_util(3) diff --git a/archivers/libarchive/files/doc/text/archive_read_header.3.txt b/archivers/libarchive/files/doc/text/archive_read_header.3.txt index 3338ba2c4a8..29f29a4b749 100644 --- a/archivers/libarchive/files/doc/text/archive_read_header.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_header.3.txt @@ -1,43 +1,43 @@ ARCHIVE_READ_HEADER(3) BSD Library Functions Manual ARCHIVE_READ_HEADER(3) -1mNAME0m - 1marchive_read_next_header22m, 1marchive_read_next_header2 22m— functions for read‐ +NAME + archive_read_next_header, archive_read_next_header2 — functions for read‐ ing streaming archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_read_next_header22m(4mstruct24m 4marchive24m 4m*24m, 4mstruct24m 4marchive_entry24m 4m**24m); + int + archive_read_next_header(struct archive *, struct archive_entry **); - 4mint0m - 1marchive_read_next_header222m(4mstruct24m 4marchive24m 4m*24m, 4mstruct24m 4marchive_entry24m 4m*24m); + int + archive_read_next_header2(struct archive *, struct archive_entry *); -1mDESCRIPTION0m - 1marchive_read_next_header22m() +DESCRIPTION + archive_read_next_header() Read the header for the next entry and return a pointer to a struct archive_entry. This is a convenience wrapper around - 1marchive_read_next_header222m() that reuses an internal struct + archive_read_next_header2() that reuses an internal struct archive_entry object for each request. - 1marchive_read_next_header222m() + archive_read_next_header2() Read the header for the next entry and populate the provided struct archive_entry. -1mRETURN VALUES0m - These functions return 1mARCHIVE_OK 22m(the operation succeeded), 1mARCHIVE_WARN0m +RETURN VALUES + These functions return ARCHIVE_OK (the operation succeeded), ARCHIVE_WARN (the operation succeeded but a non-critical error was encountered), - 1mARCHIVE_EOF 22m(end-of-archive was encountered), 1mARCHIVE_RETRY 22m(the opera‐ - tion failed but can be retried), and 1mARCHIVE_FATAL 22m(there was a fatal + ARCHIVE_EOF (end-of-archive was encountered), ARCHIVE_RETRY (the opera‐ + tion failed but can be retried), and ARCHIVE_FATAL (there was a fatal error; the archive should be closed immediately). -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_read(3), archive_read_data(3), archive_read_extract(3), archive_read_filter(3), archive_read_format(3), archive_read_open(3), archive_read_set_options(3), archive_util(3), diff --git a/archivers/libarchive/files/doc/text/archive_read_new.3.txt b/archivers/libarchive/files/doc/text/archive_read_new.3.txt index 6e574f1bb49..5e518f9ee23 100644 --- a/archivers/libarchive/files/doc/text/archive_read_new.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_new.3.txt @@ -1,25 +1,25 @@ ARCHIVE_READ_NEW(3) BSD Library Functions Manual ARCHIVE_READ_NEW(3) -1mNAME0m - 1marchive_read_new 22m— functions for reading streaming archives +NAME + archive_read_new — functions for reading streaming archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mstruct24m 4marchive24m 4m*0m - 1marchive_read_new22m(4mvoid24m); + struct archive * + archive_read_new(void); -1mDESCRIPTION0m +DESCRIPTION Allocates and initializes a struct archive object suitable for reading from an archive. NULL is returned on error. A complete description of the struct archive object can be found in the overview manual page for libarchive(3). -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_read_data(3), archive_read_filter(3), archive_read_format(3), archive_read_set_options(3), archive_util(3), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_read_open.3.txt b/archivers/libarchive/files/doc/text/archive_read_open.3.txt index df653c70290..10fcd7040c1 100644 --- a/archivers/libarchive/files/doc/text/archive_read_open.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_open.3.txt @@ -1,94 +1,95 @@ ARCHIVE_READ_OPEN(3) BSD Library Functions Manual ARCHIVE_READ_OPEN(3) -1mNAME0m - 1marchive_read_open22m, 1marchive_read_open222m, 1marchive_read_open_fd22m, - 1marchive_read_open_FILE22m, 1marchive_read_open_filename22m, - 1marchive_read_open_memory22m, — functions for reading streaming archives +NAME + archive_read_open, archive_read_open2, archive_read_open_fd, + archive_read_open_FILE, archive_read_open_filename, + archive_read_open_memory — functions for reading streaming archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_read_open22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*client_data24m, - 4marchive_open_callback24m 4m*24m, 4marchive_read_callback24m 4m*24m, - 4marchive_close_callback24m 4m*24m); + int + archive_read_open(struct archive *, void *client_data, + archive_open_callback *, archive_read_callback *, + archive_close_callback *); - 4mint0m - 1marchive_read_open222m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*client_data24m, - 4marchive_open_callback24m 4m*24m, 4marchive_read_callback24m 4m*24m, - 4marchive_skip_callback24m 4m*24m, 4marchive_close_callback24m 4m*24m); + int + archive_read_open2(struct archive *, void *client_data, + archive_open_callback *, archive_read_callback *, + archive_skip_callback *, archive_close_callback *); - 4mint0m - 1marchive_read_open_FILE22m(4mstruct24m 4marchive24m 4m*24m, 4mFILE24m 4m*file24m); + int + archive_read_open_FILE(struct archive *, FILE *file); - 4mint0m - 1marchive_read_open_fd22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m 4mfd24m, 4msize_t24m 4mblock_size24m); + int + archive_read_open_fd(struct archive *, int fd, size_t block_size); - 4mint0m - 1marchive_read_open_filename22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*filename24m, - 4msize_t24m 4mblock_size24m); + int + archive_read_open_filename(struct archive *, const char *filename, + size_t block_size); - 4mint0m - 1marchive_read_open_memory22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*buff24m, 4msize_t24m 4msize24m); + int + archive_read_open_memory(struct archive *, const void *buff, + size_t size); -1mDESCRIPTION0m - 1marchive_read_open22m() - The same as 1marchive_read_open222m(), except that the skip callback +DESCRIPTION + archive_read_open() + The same as archive_read_open2(), except that the skip callback is assumed to be NULL. - 1marchive_read_open222m() + archive_read_open2() Freeze the settings, open the archive, and prepare for reading entries. This is the most generic version of this call, which accepts four callback functions. Most clients will want to use - 1marchive_read_open_filename22m(), 1marchive_read_open_FILE22m(), - 1marchive_read_open_fd22m(), or 1marchive_read_open_memory22m() instead. + archive_read_open_filename(), archive_read_open_FILE(), + archive_read_open_fd(), or archive_read_open_memory() instead. The library invokes the client-provided functions to obtain raw bytes from the archive. - 1marchive_read_open_FILE22m() - Like 1marchive_read_open22m(), except that it accepts a 4mFILE24m 4m*0m + archive_read_open_FILE() + Like archive_read_open(), except that it accepts a FILE * pointer. This function should not be used with tape drives or other devices that require strict I/O blocking. - 1marchive_read_open_fd22m() - Like 1marchive_read_open22m(), except that it accepts a file descrip‐ + archive_read_open_fd() + Like archive_read_open(), except that it accepts a file descrip‐ tor and block size rather than a set of function pointers. Note that the file descriptor will not be automatically closed at end- of-archive. This function is safe for use with tape drives or other blocked devices. - 1marchive_read_open_file22m() - This is a deprecated synonym for 1marchive_read_open_filename22m(). - 1marchive_read_open_filename22m() - Like 1marchive_read_open22m(), except that it accepts a simple file‐ + archive_read_open_file() + This is a deprecated synonym for archive_read_open_filename(). + archive_read_open_filename() + Like archive_read_open(), except that it accepts a simple file‐ name and a block size. A NULL filename represents standard input. This function is safe for use with tape drives or other blocked devices. - 1marchive_read_open_memory22m() - Like 1marchive_read_open22m(), except that it accepts a pointer and + archive_read_open_memory() + Like archive_read_open(), except that it accepts a pointer and size of a block of memory containing the archive data. A complete description of the struct archive and struct archive_entry objects can be found in the overview manual page for libarchive(3). -1mCLIENT CALLBACKS0m +CLIENT CALLBACKS The callback functions must match the following prototypes: - 4mtypedef24m 4mla_ssize_t24m 1marchive_read_callback22m(4mstruct24m 4marchive24m 4m*24m, - 4mvoid24m 4m*client_data24m, 4mconst24m 4mvoid24m 4m**buffer24m) + typedef la_ssize_t archive_read_callback(struct archive *, + void *client_data, const void **buffer) - 4mtypedef24m 4mla_int64_t24m 1marchive_skip_callback22m(4mstruct24m 4marchive24m 4m*24m, - 4mvoid24m 4m*client_data24m, 4moff_t24m 4mrequest24m) + typedef la_int64_t archive_skip_callback(struct archive *, + void *client_data, off_t request) - 4mtypedef24m 4mint24m 1marchive_open_callback22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid0m - 4m*client_data24m) + typedef int archive_open_callback(struct archive *, void + *client_data) - 4mtypedef24m 4mint24m 1marchive_close_callback22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid0m - 4m*client_data24m) + typedef int archive_close_callback(struct archive *, void + *client_data) - The open callback is invoked by 1marchive_open22m(). It should return - 1mARCHIVE_OK 22mif the underlying file or data source is successfully opened. - If the open fails, it should call 1marchive_set_error22m() to register an - error code and message and return 1mARCHIVE_FATAL22m. + The open callback is invoked by archive_open(). It should return + ARCHIVE_OK if the underlying file or data source is successfully opened. + If the open fails, it should call archive_set_error() to register an + error code and message and return ARCHIVE_FATAL. The read callback is invoked whenever the library requires raw bytes from the archive. The read callback should read data into a buffer, set the @@ -97,7 +98,7 @@ ARCHIVE_READ_OPEN(3) BSD Library Functions Manual ARCHIVE_READ_OPEN(3) callback again only after it has consumed this data. The library imposes no constraints on the size of the data blocks returned. On end-of-file, the read callback should return zero. On error, the read callback should - invoke 1marchive_set_error22m() to register an error code and message and + invoke archive_set_error() to register an error code and message and return -1. The skip callback is invoked when the library wants to ignore a block of @@ -110,18 +111,18 @@ ARCHIVE_READ_OPEN(3) BSD Library Functions Manual ARCHIVE_READ_OPEN(3) media that can skip quickly. The close callback is invoked by archive_close when the archive process‐ - ing is complete. The callback should return 1mARCHIVE_OK 22mon success. On - failure, the callback should invoke 1marchive_set_error22m() to register an - error code and message and return 1mARCHIVE_FATAL.0m + ing is complete. The callback should return ARCHIVE_OK on success. On + failure, the callback should invoke archive_set_error() to register an + error code and message and return ARCHIVE_FATAL. -1mRETURN VALUES0m - These functions return 1mARCHIVE_OK 22mon success, or 1mARCHIVE_FATAL22m. +RETURN VALUES + These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_read(3), archive_read_data(3), archive_read_filter(3), archive_read_format(3), archive_read_set_options(3), archive_util(3), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_read_set_options.3.txt b/archivers/libarchive/files/doc/text/archive_read_set_options.3.txt index aaf73076008..8aa919f2873 100644 --- a/archivers/libarchive/files/doc/text/archive_read_set_options.3.txt +++ b/archivers/libarchive/files/doc/text/archive_read_set_options.3.txt @@ -1,113 +1,113 @@ ARCHIVE_READ_OPTIONS(3) BSD Library Functions Manual ARCHIVE_READ_OPTIONS(3) -1mNAME0m - 1marchive_read_set_filter_option22m, 1marchive_read_set_format_option22m, - 1marchive_read_set_option22m, 1marchive_read_set_options 22m— functions controlling +NAME + archive_read_set_filter_option, archive_read_set_format_option, + archive_read_set_option, archive_read_set_options — functions controlling options for reading archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 4mint0m - 1marchive_read_set_filter_option22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*module24m, - 4mconst24m 4mchar24m 4m*option24m, 4mconst24m 4mchar24m 4m*value24m); +SYNOPSIS + int + archive_read_set_filter_option(struct archive *, const char *module, + const char *option, const char *value); - 4mint0m - 1marchive_read_set_format_option22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*module24m, - 4mconst24m 4mchar24m 4m*option24m, 4mconst24m 4mchar24m 4m*value24m); + int + archive_read_set_format_option(struct archive *, const char *module, + const char *option, const char *value); - 4mint0m - 1marchive_read_set_option22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*module24m, - 4mconst24m 4mchar24m 4m*option24m, 4mconst24m 4mchar24m 4m*value24m); + int + archive_read_set_option(struct archive *, const char *module, + const char *option, const char *value); - 4mint0m - 1marchive_read_set_options22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*options24m); + int + archive_read_set_options(struct archive *, const char *options); -1mDESCRIPTION0m +DESCRIPTION These functions provide a way for libarchive clients to configure spe‐ cific read modules. - 1marchive_read_set_filter_option22m(), 1marchive_read_set_format_option22m() + archive_read_set_filter_option(), archive_read_set_format_option() Specifies an option that will be passed to currently-registered filters (including decompression filters) or format readers. - If 4moption24m and 4mvalue24m are both NULL, these functions will do noth‐ - ing and 1mARCHIVE_OK 22mwill be returned. If 4moption24m is NULL but 4mvalue0m - is not, these functions will do nothing and 1mARCHIVE_FAILED 22mwill + If option and value are both NULL, these functions will do noth‐ + ing and ARCHIVE_OK will be returned. If option is NULL but value + is not, these functions will do nothing and ARCHIVE_FAILED will be returned. - If 4mmodule24m is not NULL, 4moption24m and 4mvalue24m will be provided to the - filter or reader named 4mmodule24m. The return value will be that of - the module. If there is no such module, 1mARCHIVE_FAILED 22mwill be + If module is not NULL, option and value will be provided to the + filter or reader named module. The return value will be that of + the module. If there is no such module, ARCHIVE_FAILED will be returned. - If 4mmodule24m is NULL, 4moption24m and 4mvalue24m will be provided to every - registered module. If any module returns 1mARCHIVE_FATAL22m, this - value will be returned immediately. Otherwise, 1mARCHIVE_OK 22mwill - be returned if any module accepts the option, and 1mARCHIVE_FAILED0m + If module is NULL, option and value will be provided to every + registered module. If any module returns ARCHIVE_FATAL, this + value will be returned immediately. Otherwise, ARCHIVE_OK will + be returned if any module accepts the option, and ARCHIVE_FAILED in all other cases. - 1marchive_read_set_option22m() - Calls 1marchive_read_set_format_option22m(), then - 1marchive_read_set_filter_option22m(). If either function returns - 1mARCHIVE_FATAL22m, 1mARCHIVE_FATAL 22mwill be returned immediately. Oth‐ + archive_read_set_option() + Calls archive_read_set_format_option(), then + archive_read_set_filter_option(). If either function returns + ARCHIVE_FATAL, ARCHIVE_FATAL will be returned immediately. Oth‐ erwise, greater of the two values will be returned. - 1marchive_read_set_options22m() - 4moptions24m is a comma-separated list of options. If 4moptions24m is NULL - or empty, 1mARCHIVE_OK 22mwill be returned immediately. + archive_read_set_options() + options is a comma-separated list of options. If options is NULL + or empty, ARCHIVE_OK will be returned immediately. - Calls 1marchive_read_set_option22m() with each option in turn. If any - 1marchive_read_set_option22m() call returns 1mARCHIVE_FATAL22m, - 1mARCHIVE_FATAL 22mwill be returned immediately. + Calls archive_read_set_option() with each option in turn. If any + archive_read_set_option() call returns ARCHIVE_FATAL, + ARCHIVE_FATAL will be returned immediately. Individual options have one of the following forms: - 4moption=value0m + option=value The option/value pair will be provided to every module. Modules that do not accept an option with this name will ignore it. - 4moption24m The option will be provided to every module with a value + option The option will be provided to every module with a value of “1”. - 4m!option0m + !option The option will be provided to every module with a NULL value. - 4mmodule:option=value24m, 4mmodule:option24m, 4mmodule:!option0m + module:option=value, module:option, module:!option As above, but the corresponding option and value will be - provided only to modules whose name matches 4mmodule24m. + provided only to modules whose name matches module. -1mOPTIONS0m +OPTIONS Format iso9660 - 1mjoliet 22mSupport Joliet extensions. Defaults to enabled, use - 1m!joliet 22mto disable. - 1mrockridge0m + joliet Support Joliet extensions. Defaults to enabled, use + !joliet to disable. + rockridge Support RockRidge extensions. Defaults to enabled, use - 1m!rockridge 22mto disable. + !rockridge to disable. Format tar - 1mcompat-2x0m + compat-2x Libarchive 2.x incorrectly encoded Unicode filenames on some platforms. This option mimics the libarchive 2.x filename handling so that such archives can be read cor‐ rectly. - 1mhdrcharset0m + hdrcharset The value is used as a character set name that will be used when translating filenames. - 1mmac-ext0m + mac-ext Support Mac OS metadata extension that records data in special files beginning with a period and underscore. Defaults to enabled on Mac OS, disabled on other plat‐ - forms. Use 1m!mac-ext 22mto disable. - 1mread_concatenated_archives0m + forms. Use !mac-ext to disable. + read_concatenated_archives Ignore zeroed blocks in the archive, which occurs when multiple tar archives have been concatenated together. Without this option, only the contents of the first con‐ catenated archive would be read. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write_set_options(3), archive_read(3) BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_util.3.txt b/archivers/libarchive/files/doc/text/archive_util.3.txt index 07221c1bc22..94d7c6c3a8c 100644 --- a/archivers/libarchive/files/doc/text/archive_util.3.txt +++ b/archivers/libarchive/files/doc/text/archive_util.3.txt @@ -1,96 +1,96 @@ ARCHIVE_UTIL(3) BSD Library Functions Manual ARCHIVE_UTIL(3) -1mNAME0m - 1marchive_clear_error22m, 1marchive_compression22m, 1marchive_compression_name22m, - 1marchive_copy_error22m, 1marchive_errno22m, 1marchive_error_string22m, - 1marchive_file_count22m, 1marchive_filter_code22m, 1marchive_filter_count22m, - 1marchive_filter_name22m, 1marchive_format22m, 1marchive_format_name22m, - 1marchive_position22m, 1marchive_set_error 22m— libarchive utility functions - -1mLIBRARY0m +NAME + archive_clear_error, archive_compression, archive_compression_name, + archive_copy_error, archive_errno, archive_error_string, + archive_file_count, archive_filter_code, archive_filter_count, + archive_filter_name, archive_format, archive_format_name, + archive_position, archive_set_error — libarchive utility functions + +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mvoid0m - 1marchive_clear_error22m(4mstruct24m 4marchive24m 4m*24m); + void + archive_clear_error(struct archive *); - 4mint0m - 1marchive_compression22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_compression(struct archive *); - 4mconst24m 4mchar24m 4m*0m - 1marchive_compression_name22m(4mstruct24m 4marchive24m 4m*24m); + const char * + archive_compression_name(struct archive *); - 4mvoid0m - 1marchive_copy_error22m(4mstruct24m 4marchive24m 4m*24m, 4mstruct24m 4marchive24m 4m*24m); + void + archive_copy_error(struct archive *, struct archive *); - 4mint0m - 1marchive_errno22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_errno(struct archive *); - 4mconst24m 4mchar24m 4m*0m - 1marchive_error_string22m(4mstruct24m 4marchive24m 4m*24m); + const char * + archive_error_string(struct archive *); - 4mint0m - 1marchive_file_count22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_file_count(struct archive *); - 4mint0m - 1marchive_filter_code22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m); + int + archive_filter_code(struct archive *, int); - 4mint0m - 1marchive_filter_count22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m); + int + archive_filter_count(struct archive *, int); - 4mconst24m 4mchar24m 4m*0m - 1marchive_filter_name22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m); + const char * + archive_filter_name(struct archive *, int); - 4mint0m - 1marchive_format22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_format(struct archive *); - 4mconst24m 4mchar24m 4m*0m - 1marchive_format_name22m(4mstruct24m 4marchive24m 4m*24m); + const char * + archive_format_name(struct archive *); - 4mint64_t0m - 1marchive_position22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m); + int64_t + archive_position(struct archive *, int); - 4mvoid0m - 1marchive_set_error22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m 4merror_code24m, 4mconst24m 4mchar24m 4m*fmt24m, - 4m...24m); + void + archive_set_error(struct archive *, int error_code, const char *fmt, + ...); -1mDESCRIPTION0m +DESCRIPTION These functions provide access to various information about the struct archive object used in the libarchive(3) library. - 1marchive_clear_error22m() + archive_clear_error() Clears any error information left over from a previous call. Not generally used in client code. - 1marchive_compression22m() - Synonym for 1marchive_filter_code(a,22m(4m0)24m). - 1marchive_compression_name22m() - Synonym for 1marchive_filter_name(a,22m(4m0)24m). - 1marchive_copy_error22m() + archive_compression() + Synonym for archive_filter_code(a,(0)). + archive_compression_name() + Synonym for archive_filter_name(a,(0)). + archive_copy_error() Copies error information from one archive to another. - 1marchive_errno22m() + archive_errno() Returns a numeric error code (see errno(2)) indicating the reason for the most recent error return. Note that this can not be reliably used to detect whether an error has occurred. It should be used only after another libarchive function has returned an error status. - 1marchive_error_string22m() + archive_error_string() Returns a textual error message suitable for display. The error message here is usually more specific than that obtained from - passing the result of 1marchive_errno22m() to strerror(3). - 1marchive_file_count22m() + passing the result of archive_errno() to strerror(3). + archive_file_count() Returns a count of the number of files processed by this archive object. The count is incremented by calls to archive_write_header(3) or archive_read_next_header(3). - 1marchive_filter_code22m() + archive_filter_code() Returns a numeric code identifying the indicated filter. See - 1marchive_filter_count22m() for details of the numbering. - 1marchive_filter_count22m() + archive_filter_count() for details of the numbering. + archive_filter_count() Returns the number of filters in the current pipeline. For read archive handles, these filters are added automatically by the automatic format detection. For write archive handles, these filters are added by calls to the various - 1marchive_write_add_filter_XXX22m() functions. Filters in the result‐ + archive_write_add_filter_XXX() functions. Filters in the result‐ ing pipeline are numbered so that filter 0 is the filter closest to the format handler. As a convenience, functions that expect a filter number will accept -1 as a synonym for the highest-num‐ @@ -100,35 +100,35 @@ ARCHIVE_UTIL(3) BSD Library Functions Manual ARCHIVE_UTIL(3) are three filters: filter 0 is the gunzip filter, filter 1 is the uudecode filter, and filter 2 is the pseudo-filter that wraps the archive read functions. In this case, requesting - 1marchive_position(a,22m(4m-1)24m) would be a synonym for - 1marchive_position(a,22m(4m2)24m) which would return the number of bytes - currently read from the archive, while 1marchive_position(a,22m(4m1)24m) + archive_position(a,(-1)) would be a synonym for + archive_position(a,(2)) which would return the number of bytes + currently read from the archive, while archive_position(a,(1)) would return the number of bytes after uudecoding, and - 1marchive_position(a,22m(4m0)24m) would return the number of bytes after + archive_position(a,(0)) would return the number of bytes after decompression. - 1marchive_filter_name22m() + archive_filter_name() Returns a textual name identifying the indicated filter. See - 1marchive_filter_count22m() for details of the numbering. - 1marchive_format22m() + archive_filter_count() for details of the numbering. + archive_format() Returns a numeric code indicating the format of the current ar‐ chive entry. This value is set by a successful call to - 1marchive_read_next_header22m(). Note that it is common for this + archive_read_next_header(). Note that it is common for this value to change from entry to entry. For example, a tar archive might have several entries that utilize GNU tar extensions and several entries that do not. These entries will have different format codes. - 1marchive_format_name22m() + archive_format_name() A textual description of the format of the current entry. - 1marchive_position22m() + archive_position() Returns the number of bytes read from or written to the indicated - filter. In particular, 1marchive_position(a,22m(4m0)24m) returns the num‐ + filter. In particular, archive_position(a,(0)) returns the num‐ ber of bytes read or written by the format handler, while - 1marchive_position(a,22m(4m-1)24m) returns the number of bytes read or - written to the archive. See 1marchive_filter_count22m() for details + archive_position(a,(-1)) returns the number of bytes read or + written to the archive. See archive_filter_count() for details of the numbering here. - 1marchive_set_error22m() + archive_set_error() Sets the numeric error code and error description that will be - returned by 1marchive_errno22m() and 1marchive_error_string22m(). This + returned by archive_errno() and archive_error_string(). This function should be used within I/O callbacks to set system-spe‐ cific error codes and error descriptions. This function accepts a printf-like format string and arguments. However, you should @@ -138,13 +138,13 @@ ARCHIVE_UTIL(3) BSD Library Functions Manual ARCHIVE_UTIL(3) other printf features are not uniformly supported and should not be used. -1mSEE ALSO0m +SEE ALSO archive_read(3), archive_write(3), libarchive(3), printf(3) -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. +HISTORY + The libarchive library first appeared in FreeBSD 5.3. -1mAUTHORS0m - The 1mlibarchive 22mlibrary was written by Tim Kientzle . +AUTHORS + The libarchive library was written by Tim Kientzle . BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write.3.txt b/archivers/libarchive/files/doc/text/archive_write.3.txt index ee525efe858..7f779c81d11 100644 --- a/archivers/libarchive/files/doc/text/archive_write.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write.3.txt @@ -1,66 +1,66 @@ ARCHIVE_WRITE(3) BSD Library Functions Manual ARCHIVE_WRITE(3) -1mNAME0m - 1marchive_write 22m— functions for creating archives +NAME + archive_write — functions for creating archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include -1mDESCRIPTION0m +DESCRIPTION These functions provide a complete API for creating streaming archive files. The general process is to first create the struct archive object, set any desired options, initialize the archive, append entries, then close the archive and release all resources. - 1mCreate archive object0m + Create archive object See archive_write_new(3). To write an archive, you must first obtain an initialized struct archive - object from 1marchive_write_new22m(). + object from archive_write_new(). - 1mEnable filters and formats, configure block size and padding0m + Enable filters and formats, configure block size and padding See archive_write_filter(3), archive_write_format(3) and archive_write_blocksize(3). You can then modify this object for the desired operations with the vari‐ - ous 1marchive_write_set_XXX22m() functions. In particular, you will need to - invoke appropriate 1marchive_write_add_XXX22m() and 1marchive_write_set_XXX22m() + ous archive_write_set_XXX() functions. In particular, you will need to + invoke appropriate archive_write_add_XXX() and archive_write_set_XXX() functions to enable the corresponding compression and format support. - 1mSet options0m + Set options See archive_read_set_options(3). - 1mOpen archive0m + Open archive See archive_write_open(3). Once you have prepared the struct archive object, you call - 1marchive_write_open22m() to actually open the archive and prepare it for + archive_write_open() to actually open the archive and prepare it for writing. There are several variants of this function; the most basic expects you to provide pointers to several functions that can provide blocks of bytes from the archive. There are convenience forms that allow - you to specify a filename, file descriptor, 4mFILE24m 4m*24m object, or a block of + you to specify a filename, file descriptor, FILE * object, or a block of memory from which to write the archive data. - 1mProduce archive0m + Produce archive See archive_write_header(3) and archive_write_data(3). Individual archive entries are written in a three-step process: You first initialize a struct archive_entry structure with information about the new entry. At a minimum, you should set the pathname of the entry and - provide a 4mstruct24m 4mstat24m with a valid 4mst_mode24m field, which specifies the - type of object and 4mst_size24m field, which specifies the size of the data + provide a struct stat with a valid st_mode field, which specifies the + type of object and st_size field, which specifies the size of the data portion of the object. - 1mRelease resources0m + Release resources See archive_write_free(3). - After all entries have been written, use the 1marchive_write_free22m() func‐ + After all entries have been written, use the archive_write_free() func‐ tion to release all resources. -1mEXAMPLE0m +EXAMPLE The following sketch illustrates basic usage of the library. In this example, the callback functions are simply wrappers around the standard open(2), write(2), and close(2) system calls. @@ -160,17 +160,17 @@ ARCHIVE_WRITE(3) BSD Library Functions Manual ARCHIVE_WRITE(3) return 0; } -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. +HISTORY + The libarchive library first appeared in FreeBSD 5.3. -1mAUTHORS0m - The 1mlibarchive 22mlibrary was written by Tim Kientzle . +AUTHORS + The libarchive library was written by Tim Kientzle . -1mBUGS0m +BUGS There are many peculiar bugs in historic tar implementations that may cause certain programs to reject archives written by this library. For example, several historic implementations calculated header checksums @@ -184,7 +184,7 @@ ARCHIVE_WRITE(3) BSD Library Functions Manual ARCHIVE_WRITE(3) a standard attribute for large device numbers. This library uses “SCHILY.devminor” and “SCHILY.devmajor” for device numbers that exceed the range supported by the backwards-compatible ustar header. These keys - are compatible with Joerg Schilling's 1mstar 22marchiver. Other implementa‐ + are compatible with Joerg Schilling's star archiver. Other implementa‐ tions may not recognize these keys and will thus be unable to correctly restore device nodes with large device numbers from archives created by this library. diff --git a/archivers/libarchive/files/doc/text/archive_write_blocksize.3.txt b/archivers/libarchive/files/doc/text/archive_write_blocksize.3.txt index 04937031417..d8cf943c55f 100644 --- a/archivers/libarchive/files/doc/text/archive_write_blocksize.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_blocksize.3.txt @@ -1,30 +1,30 @@ ARCHIVE_WRITE_BLOCKSI... BSD Library Functions Manual ARCHIVE_WRITE_BLOCKSI... -1mNAME0m - 1marchive_write_get_bytes_per_block22m, 1marchive_write_set_bytes_per_block22m, - 1marchive_write_get_bytes_in_last_block22m, - 1marchive_write_set_bytes_in_last_block 22m— functions for creating archives +NAME + archive_write_get_bytes_per_block, archive_write_set_bytes_per_block, + archive_write_get_bytes_in_last_block, + archive_write_set_bytes_in_last_block — functions for creating archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_write_get_bytes_per_block22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_get_bytes_per_block(struct archive *); - 4mint0m - 1marchive_write_set_bytes_per_block22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m 4mbytes_per_block24m); + int + archive_write_set_bytes_per_block(struct archive *, int bytes_per_block); - 4mint0m - 1marchive_write_get_bytes_in_last_block22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_get_bytes_in_last_block(struct archive *); - 4mint0m - 1marchive_write_set_bytes_in_last_block22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m); + int + archive_write_set_bytes_in_last_block(struct archive *, int); -1mDESCRIPTION0m - 1marchive_write_set_bytes_per_block22m() +DESCRIPTION + archive_write_set_bytes_per_block() Sets the block size used for writing the archive data. Every call to the write callback function, except possibly the last one, will use this value for the length. The default is to use a @@ -32,12 +32,12 @@ ARCHIVE_WRITE_BLOCKSI... BSD Library Functions Manual ARCHIVE_WRITE_BLOCKSI... suppress internal blocking and cause writes to be sent directly to the write callback as they occur. - 1marchive_write_get_bytes_per_block22m() + archive_write_get_bytes_per_block() Retrieve the block size to be used for writing. A value of -1 here indicates that the library should use default values. A value of zero indicates that internal blocking is suppressed. - 1marchive_write_set_bytes_in_last_block22m() + archive_write_set_bytes_in_last_block() Sets the block size used for writing the last block. If this value is zero, the last block will be padded to the same size as the other blocks. Otherwise, the final block will be padded to a @@ -46,28 +46,28 @@ ARCHIVE_WRITE_BLOCKSI... BSD Library Functions Manual ARCHIVE_WRITE_BLOCKSI... padding generated by this option is applied only after the com‐ pression. The uncompressed data is always unpadded. The default is to pad the last block to the full block size (note that - 1marchive_write_open_filename22m() will set this based on the file + archive_write_open_filename() will set this based on the file type). Unlike the other “set” functions, this function can be called after the archive is opened. - 1marchive_write_get_bytes_in_last_block22m() + archive_write_get_bytes_in_last_block() Retrieve the currently-set value for last block size. A value of -1 here indicates that the library should use default values. -1mRETURN VALUES0m - 1marchive_write_set_bytes_per_block22m() and - 1marchive_write_set_bytes_in_last_block22m() return 1mARCHIVE_OK 22mon success, or - 1mARCHIVE_FATAL22m. +RETURN VALUES + archive_write_set_bytes_per_block() and + archive_write_set_bytes_in_last_block() return ARCHIVE_OK on success, or + ARCHIVE_FATAL. - 1marchive_write_get_bytes_per_block22m() and - 1marchive_write_get_bytes_in_last_block22m() return currently configured block - size (-1 indicates the default block size), or 1mARCHIVE_FATAL22m. + archive_write_get_bytes_per_block() and + archive_write_get_bytes_in_last_block() return currently configured block + size (-1 indicates the default block size), or ARCHIVE_FATAL. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_write_data.3.txt b/archivers/libarchive/files/doc/text/archive_write_data.3.txt index 97a93313b5a..c42e91a0c78 100644 --- a/archivers/libarchive/files/doc/text/archive_write_data.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_data.3.txt @@ -1,37 +1,52 @@ ARCHIVE_WRITE_DATA(3) BSD Library Functions Manual ARCHIVE_WRITE_DATA(3) -1mNAME0m - 1marchive_write_data 22m— functions for creating archives +NAME + archive_write_data, archive_write_data_block — functions for creating ar‐ + chives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mla_ssize_t0m - 1marchive_write_data22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mvoid24m 4m*24m, 4msize_t24m); + la_ssize_t + archive_write_data(struct archive *, const void *, size_t); -1mDESCRIPTION0m - Write data corresponding to the header just written. + la_ssize_t + archive_write_data_block(struct archive *, const void *, size_t size, + int64_t offset); -1mRETURN VALUES0m +DESCRIPTION + archive_write_data() + Write data corresponding to the header just written. + + archive_write_data_block() + Write data corresponding to the header just written. This is + like archive_write_data() except that it performs a seek on the + file being written to the specified offset before writing the + data. This is useful when restoring sparse files from archive + formats that support sparse files. Returns number of bytes writ‐ + ten or -1 on error. (Note: This is currently not supported for + archive_write handles, only for archive_write_disk handles. + +RETURN VALUES This function returns the number of bytes actually written, or a negative error code on error. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mBUGS0m +BUGS In libarchive 3.x, this function sometimes returns zero on success instead of returning the number of bytes written. Specifically, this - occurs when writing to an 4marchive_write_disk24m handle. Clients should + occurs when writing to an archive_write_disk handle. Clients should treat any value less than zero as an error and consider any non-negative value as success. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write_finish_entry(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) -BSD February 2, 2012 BSD +BSD February 28, 2017 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_disk.3.txt b/archivers/libarchive/files/doc/text/archive_write_disk.3.txt index 9980c1c88b7..ab9aca41f10 100644 --- a/archivers/libarchive/files/doc/text/archive_write_disk.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_disk.3.txt @@ -1,158 +1,142 @@ ARCHIVE_WRITE_DISK(3) BSD Library Functions Manual ARCHIVE_WRITE_DISK(3) -1mNAME0m - 1marchive_write_disk_new22m, 1marchive_write_disk_set_options22m, - 1marchive_write_disk_set_skip_file22m, 1marchive_write_disk_set_group_lookup22m, - 1marchive_write_disk_set_standard_lookup22m, - 1marchive_write_disk_set_user_lookup22m, 1marchive_write_header22m, - 1marchive_write_data22m, 1marchive_write_data_block22m, 1marchive_write_finish_entry22m, - 1marchive_write_close22m, 1marchive_write_finish archive_write_free 22m— functions - for creating objects on disk - -1mLIBRARY0m +NAME + archive_write_disk_new, archive_write_disk_set_options, + archive_write_disk_set_skip_file, archive_write_disk_set_group_lookup, + archive_write_disk_set_standard_lookup, + archive_write_disk_set_user_lookup — functions for creating objects on + disk + +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m - - 4mstruct24m 4marchive24m 4m*0m - 1marchive_write_disk_new22m(4mvoid24m); - - 4mint0m - 1marchive_write_disk_set_options22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m 4mflags24m); - - 4mint0m - 1marchive_write_disk_set_skip_file22m(4mstruct24m 4marchive24m 4m*24m, 4mdev_t24m, 4mino_t24m); - - 4mint0m - 1marchive_write_disk_set_group_lookup22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*24m, - 4mgid_t24m 4m(*)(void24m 4m*,24m 4mconst24m 4mchar24m 4m*gname,24m 4mgid_t24m 4mgid)24m, - 4mvoid24m 4m(*cleanup)(void24m 4m*)24m); - - 4mint0m - 1marchive_write_disk_set_standard_lookup22m(4mstruct24m 4marchive24m 4m*24m); - - 4mint0m - 1marchive_write_disk_set_user_lookup22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*24m, - 4muid_t24m 4m(*)(void24m 4m*,24m 4mconst24m 4mchar24m 4m*uname,24m 4muid_t24m 4muid)24m, - 4mvoid24m 4m(*cleanup)(void24m 4m*)24m); +SYNOPSIS + #include - 4mint0m - 1marchive_write_header22m(4mstruct24m 4marchive24m 4m*24m, 4mstruct24m 4marchive_entry24m 4m*24m); + struct archive * + archive_write_disk_new(void); - 4mla_ssize_t0m - 1marchive_write_data22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mvoid24m 4m*24m, 4msize_t24m); + int + archive_write_disk_set_options(struct archive *, int flags); - 4mla_ssize_t0m - 1marchive_write_data_block22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mvoid24m 4m*24m, 4msize_t24m 4msize24m, - 4mint64_t24m 4moffset24m); + int + archive_write_disk_set_skip_file(struct archive *, dev_t, ino_t); - 4mint0m - 1marchive_write_finish_entry22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_disk_set_group_lookup(struct archive *, void *, + gid_t (*)(void *, const char *gname, gid_t gid), + void (*cleanup)(void *)); - 4mint0m - 1marchive_write_close22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_disk_set_standard_lookup(struct archive *); - 4mint0m - 1marchive_write_finish22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_disk_set_user_lookup(struct archive *, void *, + uid_t (*)(void *, const char *uname, uid_t uid), + void (*cleanup)(void *)); - 4mint0m - 1marchive_write_free22m(4mstruct24m 4marchive24m 4m*24m); - -1mDESCRIPTION0m +DESCRIPTION These functions provide a complete API for creating objects on disk from struct archive_entry descriptions. They are most naturally used when - extracting objects from an archive using the 1marchive_read22m() interface. + extracting objects from an archive using the archive_read() interface. The general process is to read struct archive_entry objects from an ar‐ chive, then write those objects to a struct archive object created using - the 1marchive_write_disk22m() family functions. This interface is deliber‐ - ately very similar to the 1marchive_write22m() interface used to write objects + the archive_write_disk() family functions. This interface is deliber‐ + ately very similar to the archive_write() interface used to write objects to a streaming archive. - 1marchive_write_disk_new22m() + archive_write_disk_new() Allocates and initializes a struct archive object suitable for writing objects to disk. - 1marchive_write_disk_set_skip_file22m() + archive_write_disk_set_skip_file() Records the device and inode numbers of a file that should not be overwritten. This is typically used to ensure that an extraction process does not overwrite the archive from which objects are being read. This capability is technically unnecessary but can be a significant performance optimization in practice. - 1marchive_write_disk_set_options22m() + archive_write_disk_set_options() The options field consists of a bitwise OR of one or more of the following values: - 1mARCHIVE_EXTRACT_OWNER0m + ARCHIVE_EXTRACT_ACL + Attempt to restore Access Control Lists. By default, + extended ACLs are ignored. + ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS + Before removing a file system object prior to replacing + it, clear platform-specific file flags which might pre‐ + vent its removal. + ARCHIVE_EXTRACT_FFLAGS + Attempt to restore file attributes (file flags). By + default, file attributes are ignored. See chattr(1) + (Linux) or chflags(1) (FreeBSD, Mac OS X) for more infor‐ + mation on file attributes. + ARCHIVE_EXTRACT_MAC_METADATA + Mac OS X specific. Restore metadata using copyfile(3). + By default, copyfile(3) metadata is ignored. + ARCHIVE_EXTRACT_NO_OVERWRITE + Existing files on disk will not be overwritten. By + default, existing regular files are truncated and over‐ + written; existing directories will have their permissions + updated; other pre-existing objects are unlinked and + recreated from scratch. + ARCHIVE_EXTRACT_OWNER The user and group IDs should be set on the restored file. By default, the user and group IDs are not restored. - 1mARCHIVE_EXTRACT_PERM0m + ARCHIVE_EXTRACT_PERM Full permissions (including SGID, SUID, and sticky bits) should be restored exactly as specified, without obeying the current umask. Note that SUID and SGID bits can only be restored if the user and group ID of the object on - disk are correct. If 1mARCHIVE_EXTRACT_OWNER 22mis not speci‐ + disk are correct. If ARCHIVE_EXTRACT_OWNER is not speci‐ fied, then SUID and SGID bits will only be restored if the default user and group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed. - 1mARCHIVE_EXTRACT_TIME0m + ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS + Refuse to extract an absolute path. The default is to + not refuse such paths. + ARCHIVE_EXTRACT_SECURE_NODOTDOT + Refuse to extract a path that contains a .. element any‐ + where within it. The default is to not refuse such + paths. Note that paths ending in .. always cause an + error, regardless of this flag. + ARCHIVE_EXTRACT_SECURE_SYMLINKS + Refuse to extract any object whose final location would + be altered by a symlink on disk. This is intended to + help guard against a variety of mischief caused by ar‐ + chives that (deliberately or otherwise) extract files + outside of the current directory. The default is not to + perform this check. If + ARCHIVE_EXTRACT_SPARSE + Scan data for blocks of NUL bytes and try to recreate + them with holes. This results in sparse files, indepen‐ + dent of whether the archive format supports or uses them. + ARCHIVE_EXTRACT_UNLINK is specified together with this + option, the library will remove any intermediate symlinks + it finds and return an error only if such symlink could + not be removed. + ARCHIVE_EXTRACT_TIME The timestamps (mtime, ctime, and atime) should be restored. By default, they are ignored. Note that restoring of atime is not currently supported. - 1mARCHIVE_EXTRACT_NO_OVERWRITE0m - Existing files on disk will not be overwritten. By - default, existing regular files are truncated and over‐ - written; existing directories will have their permissions - updated; other pre-existing objects are unlinked and - recreated from scratch. - 1mARCHIVE_EXTRACT_UNLINK0m + ARCHIVE_EXTRACT_UNLINK Existing files on disk will be unlinked before any attempt to create them. In some cases, this can prove to be a significant performance improvement. By default, existing files are truncated and rewritten, but the file is not recreated. In particular, the default behavior does not break existing hard links. - 1mARCHIVE_EXTRACT_ACL0m - Attempt to restore ACLs. By default, extended ACLs are - ignored. - 1mARCHIVE_EXTRACT_FFLAGS0m - Attempt to restore extended file flags. By default, file - flags are ignored. - 1mARCHIVE_EXTRACT_XATTR0m - Attempt to restore POSIX.1e extended attributes. By - default, they are ignored. - 1mARCHIVE_EXTRACT_SECURE_SYMLINKS0m - Refuse to extract any object whose final location would - be altered by a symlink on disk. This is intended to - help guard against a variety of mischief caused by ar‐ - chives that (deliberately or otherwise) extract files - outside of the current directory. The default is not to - perform this check. If 1mARCHIVE_EXTRACT_UNLINK 22mis speci‐ - fied together with this option, the library will remove - any intermediate symlinks it finds and return an error - only if such symlink could not be removed. - 1mARCHIVE_EXTRACT_SECURE_NODOTDOT0m - Refuse to extract a path that contains a 4m..24m element any‐ - where within it. The default is to not refuse such - paths. Note that paths ending in 4m..24m always cause an - error, regardless of this flag. - 1mARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS0m - Refuse to extract an absolute path. The default is to - not refuse such paths. - 1mARCHIVE_EXTRACT_SPARSE0m - Scan data for blocks of NUL bytes and try to recreate - them with holes. This results in sparse files, indepen‐ - dent of whether the archive format supports or uses them. - 1mARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS0m - Before removing a file system object prior to replacing - it, clear platform-specific file flags which might pre‐ - vent its removal. - - 1marchive_write_disk_set_group_lookup22m(), - 1marchive_write_disk_set_user_lookup22m() + ARCHIVE_EXTRACT_XATTR + Attempt to restore extended file attributes. By default, + they are ignored. See xattr(7) (Linux), xattr(2) (Mac OS + X), or getextattr(8) (FreeBSD) for more information on + extended file attributes. + + archive_write_disk_set_group_lookup(), + archive_write_disk_set_user_lookup() The struct archive_entry objects contain both names and ids that can be used to identify users and groups. These names and ids describe the ownership of the file itself and also appear in ACL @@ -164,119 +148,77 @@ ARCHIVE_WRITE_DISK(3) BSD Library Functions Manual ARCHIVE_WRITE_DISK(3) and a cleanup function for that data. The cleanup function will be invoked when the struct archive object is destroyed. - 1marchive_write_disk_set_standard_lookup22m() + archive_write_disk_set_standard_lookup() This convenience function installs a standard set of user and group lookup functions. These functions use getpwnam(3) and getgrnam(3) to convert names to ids, defaulting to the ids if the names cannot be looked up. These functions also implement a sim‐ ple memory cache to reduce the number of calls to getpwnam(3) and getgrnam(3). - - 1marchive_write_header22m() - Build and write a header using the data in the provided struct - archive_entry structure. See archive_entry(3) for information on - creating and populating struct archive_entry objects. - - 1marchive_write_data22m() - Write data corresponding to the header just written. Returns - number of bytes written or -1 on error. - - 1marchive_write_data_block22m() - Write data corresponding to the header just written. This is - like 1marchive_write_data22m() except that it performs a seek on the - file being written to the specified offset before writing the - data. This is useful when restoring sparse files from archive - formats that support sparse files. Returns number of bytes writ‐ - ten or -1 on error. (Note: This is currently not supported for - archive_write handles, only for archive_write_disk handles.) - - 1marchive_write_finish_entry22m() - Close out the entry just written. Ordinarily, clients never need - to call this, as it is called automatically by - 1marchive_write_next_header22m() and 1marchive_write_close22m() as needed. - However, some file attributes are written to disk only after the - file is closed, so this can be necessary if you need to work with - the file on disk right away. - - 1marchive_write_close22m() - Set any attributes that could not be set during the initial - restore. For example, directory timestamps are not restored ini‐ - tially because restoring a subsequent file would alter that time‐ - stamp. Similarly, non-writable directories are initially created - with write permissions (so that their contents can be restored). - The 1marchive_write_disk_new 22mlibrary maintains a list of all such - deferred attributes and sets them when this function is invoked. - - 1marchive_write_finish22m() - This is a deprecated synonym for 1marchive_write_free22m(). - - 1marchive_write_free22m() - Invokes 1marchive_write_close22m() if it was not invoked manually, - then releases all resources. - More information about the 4mstruct24m 4marchive24m object and the overall design + More information about the struct archive object and the overall design of the library can be found in the libarchive(3) overview. Many of these functions are also documented under archive_write(3). -1mRETURN VALUES0m - Most functions return 1mARCHIVE_OK 22m(zero) on success, or one of several +RETURN VALUES + Most functions return ARCHIVE_OK (zero) on success, or one of several non-zero error codes for errors. Specific error codes include: - 1mARCHIVE_RETRY 22mfor operations that might succeed if retried, 1mARCHIVE_WARN0m + ARCHIVE_RETRY for operations that might succeed if retried, ARCHIVE_WARN for unusual conditions that do not prevent further operations, and - 1mARCHIVE_FATAL 22mfor serious errors that make remaining operations impossi‐ + ARCHIVE_FATAL for serious errors that make remaining operations impossi‐ ble. - 1marchive_write_disk_new22m() returns a pointer to a newly-allocated struct + archive_write_disk_new() returns a pointer to a newly-allocated struct archive object. - 1marchive_write_data22m() returns a count of the number of bytes actually + archive_write_data() returns a count of the number of bytes actually written, or -1 on error. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO archive_read(3), archive_write(3), tar(1), libarchive(3) -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. The - 1marchive_write_disk 22minterface was added to 1mlibarchive 2.0 22mand first +HISTORY + The libarchive library first appeared in FreeBSD 5.3. The + archive_write_disk interface was added to libarchive 2.0 and first appeared in FreeBSD 6.3. -1mAUTHORS0m - The 1mlibarchive 22mlibrary was written by Tim Kientzle . +AUTHORS + The libarchive library was written by Tim Kientzle . -1mBUGS0m +BUGS Directories are actually extracted in two distinct phases. Directories - are created during 1marchive_write_header22m(), but final permissions are not - set until 1marchive_write_close22m(). This separation is necessary to cor‐ + are created during archive_write_header(), but final permissions are not + set until archive_write_close(). This separation is necessary to cor‐ rectly handle borderline cases such as a non-writable directory contain‐ ing files, but can cause unexpected results. In particular, directory permissions are not fully restored until the archive is closed. If you use chdir(2) to change the current directory between calls to - 1marchive_read_extract22m() or before calling 1marchive_read_close22m(), you may + archive_read_extract() or before calling archive_read_close(), you may confuse the permission-setting logic with the result that directory per‐ missions are restored incorrectly. The library attempts to create objects with filenames longer than - 1mPATH_MAX 22mby creating prefixes of the full path and changing the current + PATH_MAX by creating prefixes of the full path and changing the current directory. Currently, this logic is limited in scope; the fixup pass does not work correctly for such objects and the symlink security check option disables the support for very long pathnames. - Restoring the path 4maa/../bb24m does create each intermediate directory. In - particular, the directory 4maa24m is created as well as the final object 4mbb24m. + Restoring the path aa/../bb does create each intermediate directory. In + particular, the directory aa is created as well as the final object bb. In theory, this can be exploited to create an entire directory hierarchy with a single request. Of course, this does not work if the - 1mARCHIVE_EXTRACT_NODOTDOT 22moption is specified. + ARCHIVE_EXTRACT_NODOTDOT option is specified. Implicit directories are always created obeying the current umask. Explicit objects are created obeying the current umask unless - 1mARCHIVE_EXTRACT_PERM 22mis specified, in which case they current umask is + ARCHIVE_EXTRACT_PERM is specified, in which case they current umask is ignored. SGID and SUID bits are restored only if the correct user and group could - be set. If 1mARCHIVE_EXTRACT_OWNER 22mis not specified, then no attempt is + be set. If ARCHIVE_EXTRACT_OWNER is not specified, then no attempt is made to set the ownership. In this case, SGID and SUID bits are restored only if the user and group of the final object happen to match those specified in the entry. @@ -286,7 +228,7 @@ ARCHIVE_WRITE_DISK(3) BSD Library Functions Manual ARCHIVE_WRITE_DISK(3) lar applications. The current design allows the application author to use a more compact implementation when appropriate. - There should be a corresponding 1marchive_read_disk 22minterface that walks a + There should be a corresponding archive_read_disk interface that walks a directory hierarchy and returns archive entry objects. -BSD February 2, 2012 BSD +BSD April 3, 2017 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_filter.3.txt b/archivers/libarchive/files/doc/text/archive_write_filter.3.txt index ce4ece9e938..f6e8be6adb0 100644 --- a/archivers/libarchive/files/doc/text/archive_write_filter.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_filter.3.txt @@ -1,95 +1,95 @@ ARCHIVE_WRITE_FILTER(3) BSD Library Functions Manual ARCHIVE_WRITE_FILTER(3) -1mNAME0m - 1marchive_write_add_filter_b64encode22m, 1marchive_write_add_filter_by_name22m, - 1marchive_write_add_filter_bzip222m, 1marchive_write_add_filter_compress22m, - 1marchive_write_add_filter_grzip22m, 1marchive_write_add_filter_gzip22m, - 1marchive_write_add_filter_lrzip22m, 1marchive_write_add_filter_lz422m, - 1marchive_write_add_filter_lzip22m, 1marchive_write_add_filter_lzma22m, - 1marchive_write_add_filter_lzop22m, 1marchive_write_add_filter_none22m, - 1marchive_write_add_filter_program22m, 1marchive_write_add_filter_uuencode22m, - 1marchive_write_add_filter_xz 22m— functions enabling output filters - -1mLIBRARY0m +NAME + archive_write_add_filter_b64encode, archive_write_add_filter_by_name, + archive_write_add_filter_bzip2, archive_write_add_filter_compress, + archive_write_add_filter_grzip, archive_write_add_filter_gzip, + archive_write_add_filter_lrzip, archive_write_add_filter_lz4, + archive_write_add_filter_lzip, archive_write_add_filter_lzma, + archive_write_add_filter_lzop, archive_write_add_filter_none, + archive_write_add_filter_program, archive_write_add_filter_uuencode, + archive_write_add_filter_xz — functions enabling output filters + +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_write_add_filter_b64encode22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_b64encode(struct archive *); - 4mint0m - 1marchive_write_add_filter_bzip222m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_bzip2(struct archive *); - 4mint0m - 1marchive_write_add_filter_compress22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_compress(struct archive *); - 4mint0m - 1marchive_write_add_filter_grzip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_grzip(struct archive *); - 4mint0m - 1marchive_write_add_filter_gzip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_gzip(struct archive *); - 4mint0m - 1marchive_write_add_filter_lrzip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_lrzip(struct archive *); - 4mint0m - 1marchive_write_add_filter_lz422m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_lz4(struct archive *); - 4mint0m - 1marchive_write_add_filter_lzip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_lzip(struct archive *); - 4mint0m - 1marchive_write_add_filter_lzma22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_lzma(struct archive *); - 4mint0m - 1marchive_write_add_filter_lzop22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_lzop(struct archive *); - 4mint0m - 1marchive_write_add_filter_none22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_none(struct archive *); - 4mint0m - 1marchive_write_add_filter_program22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*24m 4mcmd24m); + int + archive_write_add_filter_program(struct archive *, const char * cmd); - 4mint0m - 1marchive_write_add_filter_uuencode22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_uuencode(struct archive *); - 4mint0m - 1marchive_write_add_filter_xz22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_add_filter_xz(struct archive *); -1mDESCRIPTION0m - 1marchive_write_add_filter_bzip222m(), 1marchive_write_add_filter_compress22m(), - 1marchive_write_add_filter_grzip22m(), - 1marchive_write_add_filter_gzip22m(), - 1marchive_write_add_filter_lrzip22m(), 1marchive_write_add_filter_lz422m(), - 1marchive_write_add_filter_lzip22m(), 1marchive_write_add_filter_lzma22m(), - 1marchive_write_add_filter_lzop22m(), 1marchive_write_add_filter_xz22m(), +DESCRIPTION + archive_write_add_filter_bzip2(), archive_write_add_filter_compress(), + archive_write_add_filter_grzip(), + archive_write_add_filter_gzip(), + archive_write_add_filter_lrzip(), archive_write_add_filter_lz4(), + archive_write_add_filter_lzip(), archive_write_add_filter_lzma(), + archive_write_add_filter_lzop(), archive_write_add_filter_xz(), The resulting archive will be compressed as specified. Note that the compressed output is always properly blocked. - 1marchive_write_add_filter_b64encode22m(), - 1marchive_write_add_filter_uuencode22m(), + archive_write_add_filter_b64encode(), + archive_write_add_filter_uuencode(), The output will be encoded as specified. The encoded output is always properly blocked. - 1marchive_write_add_filter_none22m() + archive_write_add_filter_none() This is never necessary. It is provided only for backwards com‐ patibility. - 1marchive_write_add_filter_program22m() + archive_write_add_filter_program() The archive will be fed into the specified compression program. The output of that program is blocked and written to the client write callbacks. -1mRETURN VALUES0m - These functions return 1mARCHIVE_OK 22mon success, or 1mARCHIVE_FATAL22m. +RETURN VALUES + These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write(3), archive_write_format(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_write_finish_entry.3.txt b/archivers/libarchive/files/doc/text/archive_write_finish_entry.3.txt index 68ee1d189c2..236486cfe80 100644 --- a/archivers/libarchive/files/doc/text/archive_write_finish_entry.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_finish_entry.3.txt @@ -1,36 +1,37 @@ ARCHIVE_WRITE_FINISH_... BSD Library Functions Manual ARCHIVE_WRITE_FINISH_... -1mNAME0m - 1marchive_write_finish_entry 22m— functions for creating archives +NAME + archive_write_finish_entry — functions for creating archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_write_finish_entry22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_finish_entry(struct archive *); -1mDESCRIPTION0m +DESCRIPTION Close out the entry just written. In particular, this writes out the final padding required by some formats. Ordinarily, clients never need - to call this, as it is called automatically by 1marchive_write_header22m() and - 1marchive_write_close22m() as needed. - -1mRETURN VALUES0m - This function returns 1mARCHIVE_OK 22mon success, or one of several non-zero - error codes for errors. Specific error codes include: 1mARCHIVE_RETRY 22mfor - operations that might succeed if retried, 1mARCHIVE_WARN 22mfor unusual condi‐ - tions that do not prevent further operations, and 1mARCHIVE_FATAL 22mfor seri‐ + to call this, as it is called automatically by archive_write_header() and + archive_write_close() as needed. For archive_write_disk handles, this + flushes pending file attribute changes like modification time. + +RETURN VALUES + This function returns ARCHIVE_OK on success, or one of several non-zero + error codes for errors. Specific error codes include: ARCHIVE_RETRY for + operations that might succeed if retried, ARCHIVE_WARN for unusual condi‐ + tions that do not prevent further operations, and ARCHIVE_FATAL for seri‐ ous errors that make remaining operations impossible. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write_data(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) -BSD February 2, 2012 BSD +BSD February 28, 2017 BSD diff --git a/archivers/libarchive/files/doc/text/archive_write_format.3.txt b/archivers/libarchive/files/doc/text/archive_write_format.3.txt index 7dd6c4f1a27..1fa0ad1dc82 100644 --- a/archivers/libarchive/files/doc/text/archive_write_format.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_format.3.txt @@ -1,146 +1,145 @@ ARCHIVE_WRITE_FORMAT(3) BSD Library Functions Manual ARCHIVE_WRITE_FORMAT(3) -1mNAME0m - 1marchive_write_set_format22m, 1marchive_write_set_format_7zip22m, - 1marchive_write_set_format_ar22m, 1marchive_write_set_format_ar_bsd22m, - 1marchive_write_set_format_ar_svr422m, 1marchive_write_set_format_by_name22m, - 1marchive_write_set_format_cpio22m, 1marchive_write_set_format_cpio_newc22m, - 1marchive_write_set_format_filter_by_ext22m, - 1marchive_write_set_format_filter_by_ext_def22m, - 1marchive_write_set_format_gnutar22m, 1marchive_write_set_format_iso966022m, - 1marchive_write_set_format_mtree22m, 1marchive_write_set_format_mtree_classic22m, - 1marchive_write_set_format_mtree_default22m, 1marchive_write_set_format_pax22m, - 1marchive_write_set_format_pax_restricted22m, 1marchive_write_set_format_raw22m, - 1marchive_write_set_format_shar22m, 1marchive_write_set_format_shar_dump22m, - 1marchive_write_set_format_ustar22m, 1marchive_write_set_format_v7tar22m, - 1marchive_write_set_format_warc22m, 1marchive_write_set_format_xar22m, - 1marchive_write_set_format_zip22m, — functions for creating archives - -1mLIBRARY0m +NAME + archive_write_set_format, archive_write_set_format_7zip, + archive_write_set_format_ar, archive_write_set_format_ar_bsd, + archive_write_set_format_ar_svr4, archive_write_set_format_by_name, + archive_write_set_format_cpio, archive_write_set_format_cpio_newc, + archive_write_set_format_filter_by_ext, + archive_write_set_format_filter_by_ext_def, + archive_write_set_format_gnutar, archive_write_set_format_iso9660, + archive_write_set_format_mtree, archive_write_set_format_mtree_classic, + archive_write_set_format_mtree_default, archive_write_set_format_pax, + archive_write_set_format_pax_restricted, archive_write_set_format_raw, + archive_write_set_format_shar, archive_write_set_format_shar_dump, + archive_write_set_format_ustar, archive_write_set_format_v7tar, + archive_write_set_format_warc, archive_write_set_format_xar, + archive_write_set_format_zip, — functions for creating archives + +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_write_set_format22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m 4mcode24m); + int + archive_write_set_format(struct archive *, int code); - 4mint0m - 1marchive_write_set_format_7zip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_7zip(struct archive *); - 4mint0m - 1marchive_write_set_format_ar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_ar(struct archive *); - 4mint0m - 1marchive_write_set_format_ar_bsd22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_ar_bsd(struct archive *); - 4mint0m - 1marchive_write_set_format_ar_svr422m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_ar_svr4(struct archive *); - 4mint0m - 1marchive_write_set_format_by_name22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*name24m); + int + archive_write_set_format_by_name(struct archive *, const char *name); - 4mint0m - 1marchive_write_set_format_cpio22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_cpio(struct archive *); - 4mint0m - 1marchive_write_set_format_cpio_newc22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_cpio_newc(struct archive *); - 4mint0m - 1marchive_write_set_format_filter_by_ext22m(4mstruct24m 4marchive24m 4m*24m, - 4mconst24m 4mchar24m 4m*filename24m); + int + archive_write_set_format_filter_by_ext(struct archive *, + const char *filename); - 4mint0m - 1marchive_write_set_format_filter_by_ext_def22m(4mstruct24m 4marchive24m 4m*24m, - 4mconst24m 4mchar24m 4m*filename24m, 4mconst24m 4mchar24m 4m*def_ext24m); + int + archive_write_set_format_filter_by_ext_def(struct archive *, + const char *filename, const char *def_ext); - 4mint0m - 1marchive_write_set_format_gnutar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_gnutar(struct archive *); - 4mint0m - 1marchive_write_set_format_iso966022m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_iso9660(struct archive *); - 4mint0m - 1marchive_write_set_format_mtree22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_mtree(struct archive *); - 4mint0m - 1marchive_write_set_format_pax22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_pax(struct archive *); - 4mint0m - 1marchive_write_set_format_pax_restricted22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_pax_restricted(struct archive *); - 4mint0m - 1marchive_write_set_format_raw22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_raw(struct archive *); - 4mint0m - 1marchive_write_set_format_shar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_shar(struct archive *); - 4mint0m - 1marchive_write_set_format_shar_dump22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_shar_dump(struct archive *); - 4mint0m - 1marchive_write_set_format_ustar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_ustar(struct archive *); - 4mint0m - 1marchive_write_set_format_v7tar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_v7tar(struct archive *); - 4mint0m - 1marchive_write_set_format_warc22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_warc(struct archive *); - 4mint0m - 1marchive_write_set_format_xar22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_xar(struct archive *); - 4mint0m - 1marchive_write_set_format_zip22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_set_format_zip(struct archive *); -1mDESCRIPTION0m +DESCRIPTION These functions set the format that will be used for the archive. The library can write a variety of common archive formats. - - 1marchive_write_set_format22m() - Sets the format based on the format code (see 4marchive.h24m for the + archive_write_set_format() + Sets the format based on the format code (see archive.h for the full list of format codes). In particular, this can be used in - conjunction with 1marchive_format22m() to create a new archive with + conjunction with archive_format() to create a new archive with the same format as an existing archive. - 1marchive_write_set_format_by_name22m() + archive_write_set_format_by_name() Sets the corresponding format based on the common name. - 1marchive_write_set_format_filter_by_ext22m(), - 1marchive_write_set_format_filter_by_ext_def22m() + archive_write_set_format_filter_by_ext(), + archive_write_set_format_filter_by_ext_def() Sets both filters and format based on the output filename. Sup‐ ported extensions: .7z, .zip, .jar, .cpio, .iso, .a, .ar, .tar, .tgz, .tar.gz, .tar.bz2, .tar.xz - 1marchive_write_set_format_7zip22m() 1marchive_write_set_format_ar_bsd22m(), - 1marchive_write_set_format_ar_svr422m(), - 1marchive_write_set_format_cpio22m() - 1marchive_write_set_format_cpio_newc22m() - 1marchive_write_set_format_gnutar22m() - 1marchive_write_set_format_iso966022m() - 1marchive_write_set_format_mtree22m() - 1marchive_write_set_format_mtree_classic22m() - 1marchive_write_set_format_pax22m() - 1marchive_write_set_format_pax_restricted22m() - 1marchive_write_set_format_raw22m() 1marchive_write_set_format_shar22m() - 1marchive_write_set_format_shar_dump22m() - 1marchive_write_set_format_ustar22m() 1marchive_write_set_format_v7tar22m() - 1marchive_write_set_format_warc22m() 1marchive_write_set_format_xar22m() - 1marchive_write_set_format_zip22m() + archive_write_set_format_7zip() archive_write_set_format_ar_bsd(), + archive_write_set_format_ar_svr4(), + archive_write_set_format_cpio() + archive_write_set_format_cpio_newc() + archive_write_set_format_gnutar() + archive_write_set_format_iso9660() + archive_write_set_format_mtree() + archive_write_set_format_mtree_classic() + archive_write_set_format_pax() + archive_write_set_format_pax_restricted() + archive_write_set_format_raw() archive_write_set_format_shar() + archive_write_set_format_shar_dump() + archive_write_set_format_ustar() archive_write_set_format_v7tar() + archive_write_set_format_warc() archive_write_set_format_xar() + archive_write_set_format_zip() Set the format as specified. More details on the formats sup‐ ported by libarchive can be found in the libarchive-formats(5) manual page. -1mRETURN VALUES0m - These functions return 1mARCHIVE_OK 22mon success, or 1mARCHIVE_FATAL22m. +RETURN VALUES + These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write(3), archive_write_set_options(3), cpio(5), libarchive-formats(5), mtree(5), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_write_free.3.txt b/archivers/libarchive/files/doc/text/archive_write_free.3.txt index 5bb02e04a41..d599ca3bdca 100644 --- a/archivers/libarchive/files/doc/text/archive_write_free.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_free.3.txt @@ -1,57 +1,57 @@ ARCHIVE_WRITE_FREE(3) BSD Library Functions Manual ARCHIVE_WRITE_FREE(3) -1mNAME0m - 1marchive_write_fail22m, 1marchive_write_close22m, 1marchive_write_finish22m, - 1marchive_write_free 22m— functions for creating archives +NAME + archive_write_fail, archive_write_close, archive_write_finish, + archive_write_free — functions for creating archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_write_fail22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_fail(struct archive *); - 4mint0m - 1marchive_write_close22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_close(struct archive *); - 4mint0m - 1marchive_write_finish22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_finish(struct archive *); - 4mint0m - 1marchive_write_free22m(4mstruct24m 4marchive24m 4m*24m); + int + archive_write_free(struct archive *); -1mDESCRIPTION0m - 1marchive_write_fail22m() - Always returns 1mARCHIVE_FATAL22m. This marks the archive object as +DESCRIPTION + archive_write_fail() + Always returns ARCHIVE_FATAL. This marks the archive object as being unusable; after calling this function, the only call that - can succeed is 1marchive_write_free22m() to release the resources. + can succeed is archive_write_free() to release the resources. This can be used to speed recovery when the archive creation must be aborted. Note that the created archive is likely to be mal‐ formed in this case; - 1marchive_write_close22m() + archive_write_close() Complete the archive and invoke the close callback. - 1marchive_write_finish22m() - This is a deprecated synonym for 1marchive_write_free22m(). + archive_write_finish() + This is a deprecated synonym for archive_write_free(). - 1marchive_write_free22m() - Invokes 1marchive_write_close22m() if necessary, then releases all + archive_write_free() + Invokes archive_write_close() if necessary, then releases all resources. If you need detailed information about - 1marchive_write_close22m() failures, you should be careful to call it + archive_write_close() failures, you should be careful to call it separately, as you cannot obtain error information after - 1marchive_write_free22m() returns. + archive_write_free() returns. -1mRETURN VALUES0m - These functions return 1mARCHIVE_OK 22mon success, or 1mARCHIVE_FATAL22m. +RETURN VALUES + These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_write_header.3.txt b/archivers/libarchive/files/doc/text/archive_write_header.3.txt index bbcf8d3639f..4b464330378 100644 --- a/archivers/libarchive/files/doc/text/archive_write_header.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_header.3.txt @@ -1,34 +1,34 @@ ARCHIVE_WRITE_HEADER(3) BSD Library Functions Manual ARCHIVE_WRITE_HEADER(3) -1mNAME0m - 1marchive_write_header 22m— functions for creating archives +NAME + archive_write_header — functions for creating archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_write_header22m(4mstruct24m 4marchive24m 4m*24m, 4mstruct24m 4marchive_entry24m 4m*24m); + int + archive_write_header(struct archive *, struct archive_entry *); -1mDESCRIPTION0m +DESCRIPTION Build and write a header using the data in the provided struct archive_entry structure. See archive_entry(3) for information on creat‐ ing and populating struct archive_entry objects. -1mRETURN VALUES0m - This function returns 1mARCHIVE_OK 22mon success, or one of the following on - error: 1mARCHIVE_RETRY 22mfor operations that might succeed if retried, - 1mARCHIVE_WARN 22mfor unusual conditions that do not prevent further opera‐ - tions, and 1mARCHIVE_FATAL 22mfor serious errors that make remaining opera‐ +RETURN VALUES + This function returns ARCHIVE_OK on success, or one of the following on + error: ARCHIVE_RETRY for operations that might succeed if retried, + ARCHIVE_WARN for unusual conditions that do not prevent further opera‐ + tions, and ARCHIVE_FATAL for serious errors that make remaining opera‐ tions impossible. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_write_new.3.txt b/archivers/libarchive/files/doc/text/archive_write_new.3.txt index 5eef9fa9330..04cfd976173 100644 --- a/archivers/libarchive/files/doc/text/archive_write_new.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_new.3.txt @@ -1,25 +1,25 @@ ARCHIVE_WRITE_NEW(3) BSD Library Functions Manual ARCHIVE_WRITE_NEW(3) -1mNAME0m - 1marchive_write_new 22m— functions for creating archives +NAME + archive_write_new — functions for creating archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mstruct24m 4marchive24m 4m*0m - 1marchive_write_new22m(4mvoid24m); + struct archive * + archive_write_new(void); -1mDESCRIPTION0m +DESCRIPTION Allocates and initializes a struct archive object suitable for writing a tar archive. NULL is returned on error. A complete description of the struct archive object can be found in the overview manual page for libarchive(3). -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_write_open.3.txt b/archivers/libarchive/files/doc/text/archive_write_open.3.txt index ebe78f8d7b9..734135993a2 100644 --- a/archivers/libarchive/files/doc/text/archive_write_open.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_open.3.txt @@ -1,133 +1,133 @@ ARCHIVE_WRITE_OPEN(3) BSD Library Functions Manual ARCHIVE_WRITE_OPEN(3) -1mNAME0m - 1marchive_write_open22m, 1marchive_write_open_fd22m, 1marchive_write_open_FILE22m, - 1marchive_write_open_filename22m, 1marchive_write_open_memory 22m— functions for +NAME + archive_write_open, archive_write_open_fd, archive_write_open_FILE, + archive_write_open_filename, archive_write_open_memory — functions for creating archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 1m#include 0m +SYNOPSIS + #include - 4mint0m - 1marchive_write_open22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*client_data24m, - 4marchive_open_callback24m 4m*24m, 4marchive_write_callback24m 4m*24m, - 4marchive_close_callback24m 4m*24m); + int + archive_write_open(struct archive *, void *client_data, + archive_open_callback *, archive_write_callback *, + archive_close_callback *); - 4mint0m - 1marchive_write_open_fd22m(4mstruct24m 4marchive24m 4m*24m, 4mint24m 4mfd24m); + int + archive_write_open_fd(struct archive *, int fd); - 4mint0m - 1marchive_write_open_FILE22m(4mstruct24m 4marchive24m 4m*24m, 4mFILE24m 4m*file24m); + int + archive_write_open_FILE(struct archive *, FILE *file); - 4mint0m - 1marchive_write_open_filename22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*filename24m); + int + archive_write_open_filename(struct archive *, const char *filename); - 4mint0m - 1marchive_write_open_memory22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid24m 4m*buffer24m, - 4msize_t24m 4mbufferSize24m, 4msize_t24m 4m*outUsed24m); + int + archive_write_open_memory(struct archive *, void *buffer, + size_t bufferSize, size_t *outUsed); -1mDESCRIPTION0m - 1marchive_write_open22m() +DESCRIPTION + archive_write_open() Freeze the settings, open the archive, and prepare for writing entries. This is the most generic form of this function, which accepts pointers to three callback functions which will be invoked by the compression layer to write the constructed ar‐ chive. This does not alter the default archive padding. - 1marchive_write_open_fd22m() - A convenience form of 1marchive_write_open22m() that accepts a file - descriptor. The 1marchive_write_open_fd22m() function is safe for use + archive_write_open_fd() + A convenience form of archive_write_open() that accepts a file + descriptor. The archive_write_open_fd() function is safe for use with tape drives or other block-oriented devices. - 1marchive_write_open_FILE22m() - A convenience form of 1marchive_write_open22m() that accepts a 4mFILE24m 4m*0m - pointer. Note that 1marchive_write_open_FILE22m() is not safe for + archive_write_open_FILE() + A convenience form of archive_write_open() that accepts a FILE * + pointer. Note that archive_write_open_FILE() is not safe for writing to tape drives or other devices that require correct blocking. - 1marchive_write_open_file22m() - A deprecated synonym for 1marchive_write_open_filename22m(). + archive_write_open_file() + A deprecated synonym for archive_write_open_filename(). - 1marchive_write_open_filename22m() - A convenience form of 1marchive_write_open22m() that accepts a file‐ + archive_write_open_filename() + A convenience form of archive_write_open() that accepts a file‐ name. A NULL argument indicates that the output should be writ‐ ten to standard output; an argument of “-” will open a file with that name. If you have not invoked - 1marchive_write_set_bytes_in_last_block22m(), then - 1marchive_write_open_filename22m() will adjust the last-block padding + archive_write_set_bytes_in_last_block(), then + archive_write_open_filename() will adjust the last-block padding depending on the file: it will enable padding when writing to standard output or to a character or block device node, it will disable padding otherwise. You can override this by manually - invoking 1marchive_write_set_bytes_in_last_block22m() before calling - 1marchive_write_open22m(). The 1marchive_write_open_filename22m() function + invoking archive_write_set_bytes_in_last_block() before calling + archive_write_open(). The archive_write_open_filename() function is safe for use with tape drives or other block-oriented devices. - 1marchive_write_open_memory22m() - A convenience form of 1marchive_write_open22m() that accepts a pointer + archive_write_open_memory() + A convenience form of archive_write_open() that accepts a pointer to a block of memory that will receive the archive. The final - 4msize_t24m 4m*24m argument points to a variable that will be updated after + size_t * argument points to a variable that will be updated after each write to reflect how much of the buffer is currently in use. You should be careful to ensure that this variable remains allo‐ cated until after the archive is closed. This function will dis‐ able padding unless you have specifically set the block size. - More information about the 4mstruct24m 4marchive24m object and the overall design + More information about the struct archive object and the overall design of the library can be found in the libarchive(3) overview. 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. -1mCLIENT CALLBACKS0m +CLIENT CALLBACKS To use this library, you will need to define and register callback func‐ tions that will be invoked to write data to the resulting archive. These - functions are registered by calling 1marchive_write_open22m(): + functions are registered by calling archive_write_open(): - 4mtypedef24m 4mint24m 1marchive_open_callback22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid0m - 4m*client_data24m) + typedef int archive_open_callback(struct archive *, void + *client_data) - The open callback is invoked by 1marchive_write_open22m(). It should return - 1mARCHIVE_OK 22mif the underlying file or data source is successfully opened. - If the open fails, it should call 1marchive_set_error22m() to register an - error code and message and return 1mARCHIVE_FATAL22m. + The open callback is invoked by archive_write_open(). It should return + ARCHIVE_OK if the underlying file or data source is successfully opened. + If the open fails, it should call archive_set_error() to register an + error code and message and return ARCHIVE_FATAL. - 4mtypedef24m 4mla_ssize_t24m 1marchive_write_callback22m(4mstruct24m 4marchive24m 4m*24m, - 4mvoid24m 4m*client_data24m, 4mconst24m 4mvoid24m 4m*buffer24m, 4msize_t24m 4mlength24m) + typedef la_ssize_t archive_write_callback(struct archive *, + void *client_data, const void *buffer, size_t length) The write callback is invoked whenever the library needs to write raw bytes to the archive. For correct blocking, each call to the write call‐ back function should translate into a single write(2) system call. This is especially critical when writing archives to tape drives. On success, the write callback should return the number of bytes actually written. - On error, the callback should invoke 1marchive_set_error22m() to register an + On error, the callback should invoke archive_set_error() to register an error code and message and return -1. - 4mtypedef24m 4mint24m 1marchive_close_callback22m(4mstruct24m 4marchive24m 4m*24m, 4mvoid0m - 4m*client_data24m) + typedef int archive_close_callback(struct archive *, void + *client_data) The close callback is invoked by archive_close when the archive process‐ - ing is complete. The callback should return 1mARCHIVE_OK 22mon success. On - failure, the callback should invoke 1marchive_set_error22m() to register an - error code and message and return 1mARCHIVE_FATAL.0m + ing is complete. The callback should return ARCHIVE_OK on success. On + failure, the callback should invoke archive_set_error() to register an + error code and message and return ARCHIVE_FATAL. Note that if the client-provided write callback function returns a non- zero value, that error will be propagated back to the caller through whatever API function resulted in that call, which may include - 1marchive_write_header22m(), 1marchive_write_data22m(), 1marchive_write_close22m(), - 1marchive_write_finish22m(), or 1marchive_write_free22m(). The client callback can - call 1marchive_set_error22m() to provide values that can then be retrieved by - 1marchive_errno22m() and 1marchive_error_string22m(). + archive_write_header(), archive_write_data(), archive_write_close(), + archive_write_finish(), or archive_write_free(). The client callback can + call archive_set_error() to provide values that can then be retrieved by + archive_errno() and archive_error_string(). -1mRETURN VALUES0m - These functions return 1mARCHIVE_OK 22mon success, or 1mARCHIVE_FATAL22m. +RETURN VALUES + These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL. -1mERRORS0m +ERRORS Detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_write(3), archive_write_blocksize(3), archive_write_filter(3), archive_write_format(3), archive_write_new(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) diff --git a/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt b/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt index 60922c50de1..2a10224fb08 100644 --- a/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt @@ -1,144 +1,144 @@ ARCHIVE_WRITE_OPTIONS(3) BSD Library Functions Manual ARCHIVE_WRITE_OPTIONS(3) -1mNAME0m - 1marchive_write_set_filter_option22m, 1marchive_write_set_format_option22m, - 1marchive_write_set_option22m, 1marchive_write_set_options 22m— functions control‐ +NAME + archive_write_set_filter_option, archive_write_set_format_option, + archive_write_set_option, archive_write_set_options — functions control‐ ling options for writing archives -1mLIBRARY0m +LIBRARY Streaming Archive Library (libarchive, -larchive) -1mSYNOPSIS0m - 4mint0m - 1marchive_write_set_filter_option22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*module24m, - 4mconst24m 4mchar24m 4m*option24m, 4mconst24m 4mchar24m 4m*value24m); +SYNOPSIS + int + archive_write_set_filter_option(struct archive *, const char *module, + const char *option, const char *value); - 4mint0m - 1marchive_write_set_format_option22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*module24m, - 4mconst24m 4mchar24m 4m*option24m, 4mconst24m 4mchar24m 4m*value24m); + int + archive_write_set_format_option(struct archive *, const char *module, + const char *option, const char *value); - 4mint0m - 1marchive_write_set_option22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*module24m, - 4mconst24m 4mchar24m 4m*option24m, 4mconst24m 4mchar24m 4m*value24m); + int + archive_write_set_option(struct archive *, const char *module, + const char *option, const char *value); - 4mint0m - 1marchive_write_set_options22m(4mstruct24m 4marchive24m 4m*24m, 4mconst24m 4mchar24m 4m*options24m); + int + archive_write_set_options(struct archive *, const char *options); -1mDESCRIPTION0m +DESCRIPTION These functions provide a way for libarchive clients to configure spe‐ cific write modules. - 1marchive_write_set_filter_option22m(), 1marchive_write_set_format_option22m() + archive_write_set_filter_option(), archive_write_set_format_option() Specifies an option that will be passed to currently-registered filters (including decompression filters) or format readers. - If 4moption24m and 4mvalue24m are both NULL, these functions will do noth‐ - ing and 1mARCHIVE_OK 22mwill be returned. If 4moption24m is NULL but 4mvalue0m - is not, these functions will do nothing and 1mARCHIVE_FAILED 22mwill + If option and value are both NULL, these functions will do noth‐ + ing and ARCHIVE_OK will be returned. If option is NULL but value + is not, these functions will do nothing and ARCHIVE_FAILED will be returned. - If 4mmodule24m is not NULL, 4moption24m and 4mvalue24m will be provided to the - filter or reader named 4mmodule24m. The return value will be either - 1mARCHIVE_OK 22mif the option was successfully handled or 1mARCHIVE_WARN0m + If module is not NULL, option and value will be provided to the + filter or reader named module. The return value will be either + ARCHIVE_OK if the option was successfully handled or ARCHIVE_WARN if the option was unrecognized by the module or could otherwise - not be handled. If there is no such module, 1mARCHIVE_FAILED 22mwill + not be handled. If there is no such module, ARCHIVE_FAILED will be returned. - If 4mmodule24m is NULL, 4moption24m and 4mvalue24m will be provided to every - registered module. If any module returns 1mARCHIVE_FATAL22m, this - value will be returned immediately. Otherwise, 1mARCHIVE_OK 22mwill - be returned if any module accepts the option, and 1mARCHIVE_FAILED0m + If module is NULL, option and value will be provided to every + registered module. If any module returns ARCHIVE_FATAL, this + value will be returned immediately. Otherwise, ARCHIVE_OK will + be returned if any module accepts the option, and ARCHIVE_FAILED in all other cases. - 1marchive_write_set_option22m() - Calls 1marchive_write_set_format_option22m(), then - 1marchive_write_set_filter_option22m(). If either function returns - 1mARCHIVE_FATAL22m, 1mARCHIVE_FATAL 22mwill be returned immediately. Oth‐ + archive_write_set_option() + Calls archive_write_set_format_option(), then + archive_write_set_filter_option(). If either function returns + ARCHIVE_FATAL, ARCHIVE_FATAL will be returned immediately. Oth‐ erwise, greater of the two values will be returned. - 1marchive_write_set_options22m() - 4moptions24m is a comma-separated list of options. If 4moptions24m is NULL - or empty, 1mARCHIVE_OK 22mwill be returned immediately. + archive_write_set_options() + options is a comma-separated list of options. If options is NULL + or empty, ARCHIVE_OK will be returned immediately. Individual options have one of the following forms: - 4moption=value0m + option=value The option/value pair will be provided to every module. Modules that do not accept an option with this name will ignore it. - 4moption24m The option will be provided to every module with a value + option The option will be provided to every module with a value of “1”. - 4m!option0m + !option The option will be provided to every module with a NULL value. - 4mmodule:option=value24m, 4mmodule:option24m, 4mmodule:!option0m + module:option=value, module:option, module:!option As above, but the corresponding option and value will be - provided only to modules whose name matches 4mmodule24m. + provided only to modules whose name matches module. -1mOPTIONS0m +OPTIONS Filter gzip - 1mcompression-level0m + compression-level The value is interpreted as a decimal integer specifying the gzip compression level. Filter xz - 1mcompression-level0m + compression-level The value is interpreted as a decimal integer specifying the compression level. Format mtree - 1mcksum22m, 1mdevice22m, 1mflags22m, 1mgid22m, 1mgname22m, 1mindent22m, 1mlink22m, 1mmd522m, 1mmode22m, 1mnlink22m, - 1mrmd16022m, 1msha122m, 1msha25622m, 1msha38422m, 1msha51222m, 1msize22m, 1mtime22m, 1muid22m, - 1muname0m + cksum, device, flags, gid, gname, indent, link, md5, mode, nlink, + rmd160, sha1, sha256, sha384, sha512, size, time, uid, + uname Enable a particular keyword in the mtree output. Prefix with an exclamation mark to disable the corresponding keyword. The default is equivalent to “device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname”. - 1mall 22mEnables all of the above keywords. - 1muse-set0m - Enables generation of 1m/set 22mlines that specify default + all Enables all of the above keywords. + use-set + Enables generation of /set lines that specify default values for the following files and/or directories. - 1mindent 22mXXX needs explanation XXX + indent XXX needs explanation XXX Format iso9660 - volume metadata These options are used to set standard ISO9660 metadata. - 1mabstract-file22m=4mfilename0m + abstract-file=filename The file with the specified name will be identified in the ISO9660 metadata as holding the abstract for this volume. Default: none. - 1mapplication-id22m=4mfilename0m + application-id=filename The file with the specified name will be identified in the ISO9660 metadata as holding the application identi‐ fier for this volume. Default: none. - 1mbiblio-file22m=4mfilename0m + biblio-file=filename The file with the specified name will be identified in the ISO9660 metadata as holding the bibliography for this volume. Default: none. - 1mcopyright-file22m=4mfilename0m + copyright-file=filename The file with the specified name will be identified in the ISO9660 metadata as holding the copyright for this volume. Default: none. - 1mpublisher22m=4mfilename0m + publisher=filename The file with the specified name will be identified in the ISO9660 metadata as holding the publisher information for this volume. Default: none. - 1mvolume-id22m=4mstring0m + volume-id=string The specified string will be used as the Volume Identi‐ fier in the ISO9660 metadata. It is limited to 32 bytes. Default: none. Format iso9660 - boot support These options are used to make an ISO9660 image that can be directly booted on various systems. - 1mboot22m=4mfilename0m + boot=filename The file matching this name will be used as the El Torito boot image file. - 1mboot-catalog22m=4mname0m + boot-catalog=name The name that will be used for the El Torito boot cata‐ - log. Default: 4mboot.catalog0m - 1mboot-info-table0m - The boot image file provided by the 1mboot22m=4mfilename24m option + log. Default: boot.catalog + boot-info-table + The boot image file provided by the boot=filename option will be edited with appropriate boot information in bytes 8 through 64. Default: disabled - 1mboot-load-seg22m=4mhexadecimal-number0m + boot-load-seg=hexadecimal-number The load segment for a no-emulation boot image. - 1mboot-load-size22m=4mdecimal-number0m + boot-load-size=decimal-number The number of "virtual" 512-byte sectors to be loaded from a no-emulation boot image. Some very old BIOSes can only load very small images, setting this value to 4 will @@ -147,105 +147,105 @@ ARCHIVE_WRITE_OPTIONS(3) BSD Library Functions Manual ARCHIVE_WRITE_OPTIONS(3) to load the rest of itself). This should not be needed unless you are trying to support systems with very old BIOSes. This defaults to the full size of the image. - 1mboot-type22m=4mvalue0m + boot-type=value Specifies the boot semantics used by the El Torito boot - image: If the 4mvalue24m is 1mfd22m, then the boot image is assumed - to be a bootable floppy image. If the 4mvalue24m is 1mhd22m, then + image: If the value is fd, then the boot image is assumed + to be a bootable floppy image. If the value is hd, then the boot image is assumed to be a bootable hard disk - image. If the 4mvalue24m is 1mno-emulation22m, the boot image is + image. If the value is no-emulation, the boot image is used without floppy or hard disk emulation. If the boot image is exactly 1.2MB, 1.44MB, or 2.88MB, then the - default is 1mfd22m, otherwise the default is 1mno-emulation.0m + default is fd, otherwise the default is no-emulation. Format iso9660 - filename and size extensions Various extensions to the base ISO9660 format. - 1mallow-ldots0m + allow-ldots If enabled, allows filenames to begin with a leading period. If disabled, filenames that begin with a leading period will have that period replaced by an underscore character in the standard ISO9660 namespace. This does not impact names stored in the Rockridge or Joliet exten‐ sion area. Default: disabled. - 1mallow-lowercase0m + allow-lowercase If enabled, allows filenames to contain lowercase charac‐ ters. If disabled, filenames will be forced to upper‐ case. This does not impact names stored in the Rockridge or Joliet extension area. Default: disabled. - 1mallow-multidot0m + allow-multidot If enabled, allows filenames to contain multiple period characters, in violation of the ISO9660 specification. If disabled, additional periods will be converted to underscore characters. This does not impact names stored in the Rockridge or Joliet extension area. Default: dis‐ abled. - 1mallow-period0m + allow-period If enabled, allows filenames to contain trailing period characters, in violation of the ISO9660 specification. If disabled,trailing periods will be converted to under‐ score characters. This does not impact names stored in the Rockridge or Joliet extension area. Default: dis‐ abled. - 1mallow-pvd-lowercase0m + allow-pvd-lowercase If enabled, the Primary Volume Descriptor may contain lowercase ASCII characters, in violation of the ISO9660 specification. If disabled, characters will be converted to uppercase ASCII. Default: disabled. - 1mallow-sharp-tilde0m + allow-sharp-tilde If enabled, sharp and tilde characters will be permitted in filenames, in violation if the ISO9660 specification. If disabled, such characters will be converted to under‐ score characters. Default: disabled. - 1mallow-vernum0m + allow-vernum If enabled, version numbers will be included with files. If disabled, version numbers will be suppressed, in vio‐ lation of the ISO9660 standard. This does not impact names stored in the Rockridge or Joliet extension area. Default: enabled. - 1miso-level0m + iso-level This enables support for file size and file name exten‐ sions in the core ISO9660 area. The name extensions specified here do not affect the names stored in the Rockridge or Joliet extension areas. - 1miso-level=10m + iso-level=1 The most compliant form of ISO9660 image. File‐ names are limited to 8.3 uppercase format, direc‐ tory names are limited to 8 uppercase characters, files are limited to 4 GiB, the complete ISO9660 image cannot exceed 4 GiB. - 1miso-level=20m + iso-level=2 Filenames are limited to 30 uppercase characters with a 30-character extension, directory names are limited to 30 characters, files are limited to 4 GiB. - 1miso-level=30m - As with 1miso-level=222m, except that files may exceed + iso-level=3 + As with iso-level=2, except that files may exceed 4 GiB. - 1miso-level=40m - As with 1miso-level=322m, except that filenames may be + iso-level=4 + As with iso-level=3, except that filenames may be up to 193 characters and may include arbitrary 8-bit characters. - 1mjoliet 22mMicrosoft's Joliet extensions store a completely separate + joliet Microsoft's Joliet extensions store a completely separate set of directory information about each file. In partic‐ ular, this information includes Unicode filenames of up to 255 characters. Default: enabled. - 1mlimit-depth0m + limit-depth If enabled, libarchive will use directory relocation records to ensure that no pathname exceeds the ISO9660 limit of 8 directory levels. If disabled, no relocation will occur. Default: enabled. - 1mlimit-dirs0m + limit-dirs If enabled, libarchive will cause an error if there are more than 65536 directories. If disabled, there is no limit on the number of directories. Default: enabled - 1mpad 22mIf enabled, 300 kiB of zero bytes will be appended to the + pad If enabled, 300 kiB of zero bytes will be appended to the end of the archive. Default: enabled - 1mrelaxed-filenames0m + relaxed-filenames If enabled, all 7-bit ASCII characters are permitted in filenames (except lowercase characters unless - 1mallow-lowercase 22mis also specified). This violates + allow-lowercase is also specified). This violates ISO9660 standards. This does not impact names stored in the Rockridge or Joliet extension area. Default: dis‐ abled. - 1mrockridge0m + rockridge The Rockridge extensions store an additional set of POSIX-style file information with each file, including mtime, atime, ctime, permissions, and long filenames with @@ -258,46 +258,46 @@ ARCHIVE_WRITE_OPTIONS(3) BSD Library Functions Manual ARCHIVE_WRITE_OPTIONS(3) significant size savings, but requires the reading system to have support for these extensions. These extensions are disabled by default. - 1mcompression-level22m=number + compression-level=number The compression level used by the deflate compressor. Ranges from 0 (least effort) to 9 (most effort). Default: 6 - 1mzisofs 22mSynonym for 1mzisofs=direct22m. - 1mzisofs=direct0m + zisofs Synonym for zisofs=direct. + zisofs=direct Compress each file in the archive. Unlike - 1mzisofs=indirect22m, this is handled entirely within + zisofs=indirect, this is handled entirely within libarchive and does not require a separate utility. For best results, libarchive tests each file and will store the file uncompressed if the compression does not actu‐ ally save any space. In particular, files under 2k will never be compressed. Note that boot image files are never compressed. - 1mzisofs=indirect0m + zisofs=indirect Recognizes files that have already been compressed with - the 1mmkzftree 22mutility and sets up the necessary file meta‐ + the mkzftree utility and sets up the necessary file meta‐ data so that readers will correctly identify these as zisofs-compressed files. - 1mzisofs-exclude22m=4mfilename0m + zisofs-exclude=filename Specifies a filename that should not be compressed when - using 1mzisofs=direct22m. This option can be provided multi‐ + using zisofs=direct. This option can be provided multi‐ ple times to suppress compression on many files. Format zip - 1mcompression0m + compression The value is either “store” or “deflate” to indicate how the following entries should be compressed. Note that this setting is ignored for directories, symbolic links, and other special entries. - 1mexperimental0m + experimental This boolean option enables or disables experimental Zip features that may not be compatible with other Zip imple‐ mentations. - 1mfakecrc320m + fakecrc32 This boolean option disables CRC calculations. All CRC fields are set to zero. It should not be used except for testing purposes. - 1mhdrcharset0m + hdrcharset This sets the character set used for filenames. - 1mzip64 22mZip64 extensions provide additional file size information + zip64 Zip64 extensions provide additional file size information for entries larger than 4 GiB. They also provide extended file offset and archive size information when archives exceed 4 GiB. By default, the Zip writer selec‐ @@ -311,7 +311,7 @@ ARCHIVE_WRITE_OPTIONS(3) BSD Library Functions Manual ARCHIVE_WRITE_OPTIONS(3) erwise require them. This is primarily useful for test‐ ing. - Disabling this option with 1m!zip64 22mwill force the Zip + Disabling this option with !zip64 will force the Zip writer to avoid Zip64 extensions: It will reject files with size greater than 4 GiB, it will reject any new entries once the total archive size reaches 4 GiB, and it @@ -320,10 +320,10 @@ ARCHIVE_WRITE_OPTIONS(3) BSD Library Functions Manual ARCHIVE_WRITE_OPTIONS(3) generating archives where the entry sizes are not known in advance. -1mEXAMPLES0m +EXAMPLES The following example creates an archive write handle to create a gzip- compressed ISO9660 format image. The two options here specify that the - ISO9660 archive will use 4mkernel.img24m as the boot image for El Torito boot‐ + ISO9660 archive will use kernel.img as the boot image for El Torito boot‐ ing, and that the gzip compressor should use the maximum compression level. @@ -333,19 +333,19 @@ ARCHIVE_WRITE_OPTIONS(3) BSD Library Functions Manual ARCHIVE_WRITE_OPTIONS(3) archive_write_set_options(a, "boot=kernel.img,compression=9"); archive_write_open_filename(a, filename, blocksize); -1mERRORS0m +ERRORS More detailed error codes and textual descriptions are available from the - 1marchive_errno22m() and 1marchive_error_string22m() functions. + archive_errno() and archive_error_string() functions. -1mSEE ALSO0m +SEE ALSO tar(1), libarchive(3), archive_read_set_options(3), archive_write(3) -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. +HISTORY + The libarchive library first appeared in FreeBSD 5.3. -1mAUTHORS0m +AUTHORS The options support for libarchive was originally implemented by Michihiro NAKAJIMA. -1mBUGS0m +BUGS BSD February 2, 2012 BSD diff --git a/archivers/libarchive/files/doc/text/bsdcpio.1.txt b/archivers/libarchive/files/doc/text/bsdcpio.1.txt index 03c9ff94338..15920c0547d 100644 --- a/archivers/libarchive/files/doc/text/bsdcpio.1.txt +++ b/archivers/libarchive/files/doc/text/bsdcpio.1.txt @@ -1,256 +1,256 @@ CPIO(1) BSD General Commands Manual CPIO(1) -1mNAME0m - 1mcpio 22m— copy files to and from archives +NAME + cpio — copy files to and from archives -1mSYNOPSIS0m - 1mcpio -i 22m[4moptions24m] [4mpattern24m 4m...24m] [4m<24m 4marchive24m] - 1mcpio -o 22m[4moptions24m] 4m<24m 4mname-list24m [4m>24m 4marchive24m] - 1mcpio -p 22m[4moptions24m] 4mdest-dir24m 4m<24m 4mname-list0m +SYNOPSIS + cpio -i [options] [pattern ...] [< archive] + cpio -o [options] < name-list [> archive] + cpio -p [options] dest-dir < name-list -1mDESCRIPTION0m - 1mcpio 22mcopies files between archives and directories. This implementation +DESCRIPTION + cpio copies files between archives and directories. This implementation can extract from tar, pax, cpio, zip, jar, ar, and ISO 9660 cdrom images and can create tar, pax, cpio, ar, and shar archives. - The first option to 1mcpio 22mis a mode indicator from the following list: - 1m-i 22mInput. Read an archive from standard input (unless overridden) - and extract the contents to disk or (if the 1m-t 22moption is speci‐ + The first option to cpio is a mode indicator from the following list: + -i Input. Read an archive from standard input (unless overridden) + and extract the contents to disk or (if the -t option is speci‐ fied) list the contents to standard output. If one or more file patterns are specified, only files matching one of the patterns will be extracted. - 1m-o 22mOutput. Read a list of filenames from standard input and produce + -o Output. Read a list of filenames from standard input and produce a new archive on standard output (unless overridden) containing the specified items. - 1m-p 22mPass-through. Read a list of filenames from standard input and + -p Pass-through. Read a list of filenames from standard input and copy the files to the specified directory. -1mOPTIONS0m +OPTIONS Unless specifically stated otherwise, options are applicable in all oper‐ ating modes. - 1m-022m, 1m--null0m + -0, --null Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might con‐ tain newlines. - 1m-A 22m(o mode only) Append to the specified archive. (Not yet imple‐ + -A (o mode only) Append to the specified archive. (Not yet imple‐ mented.) - 1m-a 22m(o and p modes) Reset access times on files after they are read. + -a (o and p modes) Reset access times on files after they are read. - 1m-B 22m(o mode only) Block output to records of 5120 bytes. + -B (o mode only) Block output to records of 5120 bytes. - 1m-C 4m22msize0m - (o mode only) Block output to records of 4msize24m bytes. + -C size + (o mode only) Block output to records of size bytes. - 1m-c 22m(o mode only) Use the old POSIX portable character format. - Equivalent to 1m--format 4m22modc24m. + -c (o mode only) Use the old POSIX portable character format. + Equivalent to --format odc. - 1m-d22m, 1m--make-directories0m + -d, --make-directories (i and p modes) Create directories as necessary. - 1m-E 4m22mfile0m - (i mode only) Read list of file name patterns from 4mfile24m to list + -E file + (i mode only) Read list of file name patterns from file to list and extract. - 1m-F 4m22mfile24m, 1m--file 4m22mfile0m - Read archive from or write archive to 4mfile24m. + -F file, --file file + Read archive from or write archive to file. - 1m-f 4m22mpattern0m - (i mode only) Ignore files that match 4mpattern24m. + -f pattern + (i mode only) Ignore files that match pattern. - 1m-H 4m22mformat24m, 1m--format 4m22mformat0m + -H format, --format format (o mode only) Produce the output archive in the specified format. Supported formats include: - 4mcpio24m Synonym for 4modc24m. - 4mnewc24m The SVR4 portable cpio format. - 4modc24m The old POSIX.1 portable octet-oriented cpio format. - 4mpax24m The POSIX.1 pax format, an extension of the ustar for‐ + cpio Synonym for odc. + newc The SVR4 portable cpio format. + odc The old POSIX.1 portable octet-oriented cpio format. + pax The POSIX.1 pax format, an extension of the ustar for‐ mat. - 4mustar24m The POSIX.1 tar format. + ustar The POSIX.1 tar format. - The default format is 4modc24m. See libarchive-formats(5) for more + The default format is odc. See libarchive-formats(5) for more complete information about the formats currently supported by the underlying libarchive(3) library. - 1m-h22m, 1m--help0m + -h, --help Print usage information. - 1m-I 4m22mfile0m - Read archive from 4mfile24m. + -I file + Read archive from file. - 1m-i22m, 1m--extract0m + -i, --extract Input mode. See above for description. - 1m--insecure0m + --insecure (i and p mode only) Disable security checks during extraction or copying. This allows extraction via symbolic links, absolute paths, and path names containing ‘..’ in the name. - 1m-J22m, 1m--xz0m + -J, --xz (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz compression is recognized automatically on input. - 1m-j 22mSynonym for 1m-y22m. + -j Synonym for -y. - 1m-L 22m(o and p modes) All symbolic links will be followed. Normally, + -L (o and p modes) All symbolic links will be followed. Normally, symbolic links are archived and copied as symbolic links. With this option, the target of the link will be archived or copied instead. - 1m-l22m, 1m--link0m + -l, --link (p mode only) Create links from the target directory to the orig‐ inal files, instead of copying. - 1m--lrzip0m + --lrzip (o mode only) Compress the resulting archive with lrzip(1). In input mode, this option is ignored. - 1m--lz4 22m(o mode only) Compress the archive with lz4-compatible compres‐ + --lz4 (o mode only) Compress the archive with lz4-compatible compres‐ sion before writing it. In input mode, this option is ignored; lz4 compression is recognized automatically on input. - 1m--lzma 22m(o mode only) Compress the file with lzma-compatible compression + --lzma (o mode only) Compress the file with lzma-compatible compression before writing it. In input mode, this option is ignored; lzma compression is recognized automatically on input. - 1m--lzop 22m(o mode only) Compress the resulting archive with lzop(1). In + --lzop (o mode only) Compress the resulting archive with lzop(1). In input mode, this option is ignored. - 1m--passphrase 4m22mpassphrase0m - The 4mpassphrase24m is used to extract or create an encrypted archive. - Currently, zip is only a format that 1mcpio 22mcan handle encrypted + --passphrase passphrase + The passphrase is used to extract or create an encrypted archive. + Currently, zip is only a format that cpio can handle encrypted archives. You shouldn't use this option unless you realize how insecure use of this option is. - 1m-m22m, 1m--preserve-modification-time0m + -m, --preserve-modification-time (i and p modes) Set file modification time on created files to match those in the source. - 1m-n22m, 1m--numeric-uid-gid0m - (i mode, only with 1m-t22m) Display numeric uid and gid. By default, - 1mcpio 22mdisplays the user and group names when they are provided in + -n, --numeric-uid-gid + (i mode, only with -t) Display numeric uid and gid. By default, + cpio displays the user and group names when they are provided in the archive, or looks up the user and group names in the system password database. - 1m--no-preserve-owner0m + --no-preserve-owner (i mode only) Do not attempt to restore file ownership. This is the default when run by non-root users. - 1m-O 4m22mfile0m - Write archive to 4mfile24m. + -O file + Write archive to file. - 1m-o22m, 1m--create0m + -o, --create Output mode. See above for description. - 1m-p22m, 1m--pass-through0m + -p, --pass-through Pass-through mode. See above for description. - 1m--preserve-owner0m + --preserve-owner (i mode only) Restore file ownership. This is the default when run by the root user. - 1m--quiet0m + --quiet Suppress unnecessary messages. - 1m-R 22m[user][:][group], 1m--owner 22m[user][:][group] + -R [user][:][group], --owner [user][:][group] Set the owner and/or group on files in the output. If group is - specified with no user (for example, 1m-R 4m22m:wheel24m) then the group + specified with no user (for example, -R :wheel) then the group will be set but not the user. If the user is specified with a - trailing colon and no group (for example, 1m-R 4m22mroot:24m) then the + trailing colon and no group (for example, -R root:) then the group will be set to the user's default group. If the user is specified with no trailing colon, then the user will be set but - not the group. In 1m-i 22mand 1m-p 22mmodes, this option can only be used + not the group. In -i and -p modes, this option can only be used by the super-user. (For compatibility, a period can be used in place of the colon.) - 1m-r 22m(All modes.) Rename files interactively. For each file, a - prompt is written to 4m/dev/tty24m containing the name of the file and - a line is read from 4m/dev/tty24m. If the line read is blank, the + -r (All modes.) Rename files interactively. For each file, a + prompt is written to /dev/tty containing the name of the file and + a line is read from /dev/tty. If the line read is blank, the file is skipped. If the line contains a single period, the file is processed normally. Otherwise, the line is taken to be the new name of the file. - 1m-t22m, 1m--list0m + -t, --list (i mode only) List the contents of the archive to stdout; do not restore the contents to disk. - 1m-u22m, 1m--unconditional0m + -u, --unconditional (i and p modes) Unconditionally overwrite existing files. Ordi‐ narily, an older file will not overwrite a newer file on disk. - 1m-V22m, 1m--dot0m + -V, --dot Print a dot to stderr for each file as it is processed. Super‐ - seded by 1m-v22m. + seded by -v. - 1m-v22m, 1m--verbose0m + -v, --verbose Print the name of each file to stderr as it is processed. With - 1m-t22m, provide a detailed listing of each file. + -t, provide a detailed listing of each file. - 1m--version0m + --version Print the program version information and exit. - 1m-y 22m(o mode only) Compress the archive with bzip2-compatible compres‐ + -y (o mode only) Compress the archive with bzip2-compatible compres‐ sion before writing it. In input mode, this option is ignored; bzip2 compression is recognized automatically on input. - 1m-Z 22m(o mode only) Compress the archive with compress-compatible com‐ + -Z (o mode only) Compress the archive with compress-compatible com‐ pression before writing it. In input mode, this option is ignored; compression is recognized automatically on input. - 1m-z 22m(o mode only) Compress the archive with gzip-compatible compres‐ + -z (o mode only) Compress the archive with gzip-compatible compres‐ sion before writing it. In input mode, this option is ignored; gzip compression is recognized automatically on input. -1mEXIT STATUS0m - The 1mcpio 22mutility exits 0 on success, and >0 if an error occurs. +EXIT STATUS + The cpio utility exits 0 on success, and >0 if an error occurs. -1mENVIRONMENT0m - The following environment variables affect the execution of 1mcpio22m: +ENVIRONMENT + The following environment variables affect the execution of cpio: LANG The locale to use. See environ(7) for more information. TZ The timezone to use when displaying dates. See environ(7) for more information. -1mEXAMPLES0m - The 1mcpio 22mcommand is traditionally used to copy file hierarchies in con‐ +EXAMPLES + The cpio command is traditionally used to copy file hierarchies in con‐ junction with the find(1) command. The first example here simply copies - all files from 4msrc24m to 4mdest24m: - 1mfind 4m22msrc24m | 1mcpio -pmud 4m22mdest0m + all files from src to dest: + find src | cpio -pmud dest By carefully selecting options to the find(1) command and combining it with other standard utilities, it is possible to exercise very fine con‐ trol over which files are copied. This next example copies files from - 4msrc24m to 4mdest24m that are more than 2 days old and whose names match a partic‐ + src to dest that are more than 2 days old and whose names match a partic‐ ular pattern: - 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mgrep foo[bar] 22m| 1mcpio -pdmu 4m22mdest0m + find src -mtime +2 | grep foo[bar] | cpio -pdmu dest - This example copies files from 4msrc24m to 4mdest24m that are more than 2 days old + This example copies files from src to dest that are more than 2 days old and which contain the word “foobar”: - 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mxargs grep -l foobar 22m| 1mcpio -pdmu 4m22mdest0m + find src -mtime +2 | xargs grep -l foobar | cpio -pdmu dest -1mCOMPATIBILITY0m +COMPATIBILITY The mode options i, o, and p and the options a, B, c, d, f, l, m, r, t, u, and v comply with SUSv2. - The old POSIX.1 standard specified that only 1m-i22m, 1m-o22m, and 1m-p 22mwere inter‐ + The old POSIX.1 standard specified that only -i, -o, and -p were inter‐ preted as command-line options. Each took a single argument of a list of - modifier characters. For example, the standard syntax allows 1m-imu 22mbut - does not support 1m-miu 22mor 1m-i -m -u22m, since 4mm24m and 4mu24m are only modifiers to - 1m-i22m, they are not command-line options in their own right. The syntax + modifier characters. For example, the standard syntax allows -imu but + does not support -miu or -i -m -u, since m and u are only modifiers to + -i, they are not command-line options in their own right. The syntax supported by this implementation is backwards-compatible with the stan‐ dard. For best compatibility, scripts should limit themselves to the standard syntax. -1mSEE ALSO0m +SEE ALSO bzip2(1), tar(1), gzip(1), mt(1), pax(1), libarchive(3), cpio(5), libarchive-formats(5), tar(5) -1mSTANDARDS0m +STANDARDS There is no current POSIX standard for the cpio command; it appeared in ISO/IEC 9945-1:1996 (“POSIX.1”) but was dropped from IEEE Std 1003.1-2001 (“POSIX.1”). @@ -258,17 +258,17 @@ CPIO(1) BSD General Commands Manual CPIO(1) The cpio, ustar, and pax interchange file formats are defined by IEEE Std 1003.1-2001 (“POSIX.1”) for the pax command. -1mHISTORY0m - The original 1mcpio 22mand 1mfind 22mutilities were written by Dick Haight while +HISTORY + The original cpio and find utilities were written by Dick Haight while working in AT&T's Unix Support Group. They first appeared in 1977 in PWB/UNIX 1.0, the “Programmer's Work Bench” system developed for use within AT&T. They were first released outside of AT&T as part of System - III Unix in 1981. As a result, 1mcpio 22mactually predates 1mtar22m, even though + III Unix in 1981. As a result, cpio actually predates tar, even though it was not well-known outside of AT&T until some time later. This is a complete re-implementation based on the libarchive(3) library. -1mBUGS0m +BUGS The cpio archive format has several basic limitations: It does not store user and group names, only numbers. As a result, it cannot be reliably used to transfer files between systems with dissimilar user and group diff --git a/archivers/libarchive/files/doc/text/bsdtar.1.txt b/archivers/libarchive/files/doc/text/bsdtar.1.txt index 971cedd7fc4..f2ff1f2c1ea 100644 --- a/archivers/libarchive/files/doc/text/bsdtar.1.txt +++ b/archivers/libarchive/files/doc/text/bsdtar.1.txt @@ -1,16 +1,16 @@ TAR(1) BSD General Commands Manual TAR(1) -1mNAME0m - 1mtar 22m— manipulate tape archives +NAME + tar — manipulate tape archives -1mSYNOPSIS0m - 1mtar 22m[4mbundled-flags24m ⟨args⟩] [⟨4mfile24m⟩ | ⟨4mpattern24m⟩ ...] - 1mtar 22m{1m-c22m} [4moptions24m] [4mfiles24m | 4mdirectories24m] - 1mtar 22m{1m-r 22m| 1m-u22m} 1m-f 4m22marchive-file24m [4moptions24m] [4mfiles24m | 4mdirectories24m] - 1mtar 22m{1m-t 22m| 1m-x22m} [4moptions24m] [4mpatterns24m] +SYNOPSIS + tar [bundled-flags ⟨args⟩] [⟨file⟩ | ⟨pattern⟩ ...] + tar {-c} [options] [files | directories] + tar {-r | -u} -f archive-file [options] [files | directories] + tar {-t | -x} [options] [patterns] -1mDESCRIPTION0m - 1mtar 22mcreates and manipulates streaming archive files. This implementation +DESCRIPTION + tar creates and manipulates streaming archive files. This implementation can extract from tar, pax, cpio, zip, jar, ar, xar, rpm, 7-zip, and ISO 9660 cdrom images and can create tar, pax, cpio, ar, zip, 7-zip, and shar archives. @@ -20,24 +20,24 @@ TAR(1) BSD General Commands Manual TAR(1) BILITY below for details. The other synopsis forms show the preferred usage. The first option to - 1mtar 22mis a mode indicator from the following list: - 1m-c 22mCreate a new archive containing the specified items. The long - option form is 1m--create22m. - 1m-r 22mLike 1m-c22m, but new entries are appended to the archive. Note that + tar is a mode indicator from the following list: + -c Create a new archive containing the specified items. The long + option form is --create. + -r Like -c, but new entries are appended to the archive. Note that this only works on uncompressed archives stored in regular files. - The 1m-f 22moption is required. The long option form is 1m--append22m. - 1m-t 22mList archive contents to stdout. The long option form is 1m--list22m. - 1m-u 22mLike 1m-r22m, but new entries are added only if they have a modifica‐ + The -f option is required. The long option form is --append. + -t List archive contents to stdout. The long option form is --list. + -u Like -r, but new entries are added only if they have a modifica‐ tion date newer than the corresponding entry in the archive. Note that this only works on uncompressed archives stored in reg‐ - ular files. The 1m-f 22moption is required. The long form is - 1m--update22m. - 1m-x 22mExtract to disk from the archive. If a file with the same name + ular files. The -f option is required. The long form is + --update. + -x Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier - copies. The long option form is 1m--extract22m. + copies. The long option form is --extract. - In 1m-c22m, 1m-r22m, or 1m-u 22mmode, each specified file or directory is added to the + In -c, -r, or -u mode, each specified file or directory is added to the archive in the order specified on the command line. By default, the con‐ tents of each directory are also archived. @@ -46,84 +46,84 @@ TAR(1) BSD General Commands Manual TAR(1) line indicate which items in the archive should be processed. Patterns are shell-style globbing patterns as documented in tcsh(1). -1mOPTIONS0m +OPTIONS Unless specifically stated otherwise, options are applicable in all oper‐ ating modes. - 1m@4m22marchive0m + @archive (c and r modes only) The specified archive is opened and the entries in it will be appended to the current archive. As a sim‐ ple example, - 1mtar -c -f 4m22m-24m 4mnewfile24m 1m@4m22moriginal.tar0m - writes a new archive to standard output containing a file 4mnewfile0m - and all of the entries from 4moriginal.tar24m. In contrast, - 1mtar -c -f 4m22m-24m 4mnewfile24m 4moriginal.tar0m + tar -c -f - newfile @original.tar + writes a new archive to standard output containing a file newfile + and all of the entries from original.tar. In contrast, + tar -c -f - newfile original.tar creates a new archive with only two entries. Similarly, - 1mtar -czf 4m22m-24m 1m--format pax @4m22m-0m + tar -czf - --format pax @- reads an archive from standard input (whose format will be deter‐ mined automatically) and converts it into a gzip-compressed pax- - format archive on stdout. In this way, 1mtar 22mcan be used to con‐ + format archive on stdout. In this way, tar can be used to con‐ vert archives from one format to another. - 1m-a22m, 1m--auto-compress0m + -a, --auto-compress (c mode only) Use the archive suffix to decide a set of the for‐ mat and the compressions. As a simple example, - 1mtar -a -cf 4m22marchive.tgz24m 4msource.c24m 4msource.h0m + tar -a -cf archive.tgz source.c source.h creates a new archive with restricted pax format and gzip com‐ pression, - 1mtar -a -cf 4m22marchive.tar.bz2.uu24m 4msource.c24m 4msource.h0m + tar -a -cf archive.tar.bz2.uu source.c source.h creates a new archive with restricted pax format and bzip2 com‐ pression and uuencode compression, - 1mtar -a -cf 4m22marchive.zip24m 4msource.c24m 4msource.h0m + tar -a -cf archive.zip source.c source.h creates a new archive with zip format, - 1mtar -a -jcf 4m22marchive.tgz24m 4msource.c24m 4msource.h0m + tar -a -jcf archive.tgz source.c source.h ignores the “-j” option, and creates a new archive with restricted pax format and gzip compression, - 1mtar -a -jcf 4m22marchive.xxx24m 4msource.c24m 4msource.h0m + tar -a -jcf archive.xxx source.c source.h if it is unknown suffix or no suffix, creates a new archive with restricted pax format and bzip2 compression. - 1m--acls 22m(c, r, u, x modes only) Archive or extract POSIX.1e or NFSv4 - ACLs. This is the reverse of 1m--no-acls 22mand the default behavior - in c, r, and u modes (except Mac OS X) or if 1mtar 22mis run in x mode - as root. On Mac OS X this option translates extended ACLs to - NFSv4 ACLs. To store extended ACLs the 1m--mac-metadata 22moption is + --acls (c, r, u, x modes only) Archive or extract POSIX.1e or NFSv4 + ACLs. This is the reverse of --no-acls and the default behavior + in c, r, and u modes (except on Mac OS X) or if tar is run in x + mode as root. On Mac OS X this option translates extended ACLs to + NFSv4 ACLs. To store extended ACLs the --mac-metadata option is preferred. - 1m-B22m, 1m--read-full-blocks0m + -B, --read-full-blocks Ignored for compatibility with other tar(1) implementations. - 1m-b 4m22mblocksize24m, 1m--block-size 4m22mblocksize0m + -b blocksize, --block-size blocksize Specify the block size, in 512-byte records, for tape drive I/O. As a rule, this argument is only needed when reading from or writing to tape drives, and usually not even then as the default block size of 20 records (10240 bytes) is very common. - 1m-C 4m22mdirectory24m, 1m--cd 4m22mdirectory24m, 1m--directory 4m22mdirectory0m + -C directory, --cd directory, --directory directory In c and r mode, this changes the directory before adding the following files. In x mode, change directories after opening the archive but before extracting entries from the archive. - 1m--chroot0m - (x mode only) 1mchroot22m() to the current directory after processing - any 1m-C 22moptions and before extracting any files. + --chroot + (x mode only) chroot() to the current directory after processing + any -C options and before extracting any files. - 1m--clear-nochange-fflags0m + --clear-nochange-fflags (x mode only) Before removing file system objects to replace them, clear platform-specific file flags that might prevent removal. - 1m--exclude 4m22mpattern0m + --exclude pattern Do not process files or directories that match the specified pat‐ tern. Note that exclusions take precedence over patterns or filenames specified on the command line. - 1m--fflags0m + --fflags (c, r, u, x modes only) Archive or extract file flags. This is - the reverse of 1m--no-fflags 22mand the default behavior in c, r, and - u modes or if 1mtar 22mis run in x mode as root. + the reverse of --no-fflags and the default behavior in c, r, and + u modes or if tar is run in x mode as root. - 1m--format 4m22mformat0m + --format format (c, r, u mode only) Use the specified format for the created ar‐ chive. Supported formats include “cpio”, “pax”, “shar”, and “ustar”. Other formats may also be supported; see @@ -132,343 +132,342 @@ TAR(1) BSD General Commands Manual TAR(1) chive, the format specified here must be compatible with the for‐ mat of the existing archive on disk. - 1m-f 4m22mfile24m, 1m--file 4m22mfile0m + -f file, --file file Read the archive from or write the archive to the specified file. - The filename can be 4m-24m for standard input or standard output. The - default varies by system; on FreeBSD, the default is 4m/dev/sa024m; on - Linux, the default is 4m/dev/st024m. + The filename can be - for standard input or standard output. The + default varies by system; on FreeBSD, the default is /dev/sa0; on + Linux, the default is /dev/st0. - 1m--gid 4m22mid0m + --gid id Use the provided group id number. On extract, this overrides the group id in the archive; the group name in the archive will be ignored. On create, this overrides the group id read from disk; - if 1m--gname 22mis not also specified, the group name will be set to + if --gname is not also specified, the group name will be set to match the group id. - 1m--gname 4m22mname0m + --gname name Use the provided group name. On extract, this overrides the group name in the archive; if the provided group name does not exist on the system, the group id (from the archive or from the - 1m--gid 22moption) will be used instead. On create, this sets the + --gid option) will be used instead. On create, this sets the group name that will be stored in the archive; the name will not be verified against the system group database. - 1m-H 22m(c and r modes only) Symbolic links named on the command line + -H (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. - 1m-h 22m(c and r modes only) Synonym for 1m-L22m. + -h (c and r modes only) Synonym for -L. - 1m-I 22mSynonym for 1m-T22m. + -I Synonym for -T. - 1m--help 22mShow usage. + --help Show usage. - 1m--hfsCompression0m + --hfsCompression (x mode only) Mac OS X specific (v10.6 or later). Compress extracted regular files with HFS+ compression. - 1m--ignore-zeros0m - An alias of 1m--options read_concatenated_archives 22mfor compatibil‐ + --ignore-zeros + An alias of --options read_concatenated_archives for compatibil‐ ity with GNU tar. - 1m--include 4m22mpattern0m + --include pattern Process only files or directories that match the specified pat‐ - tern. Note that exclusions specified with 1m--exclude 22mtake prece‐ + tern. Note that exclusions specified with --exclude take prece‐ dence over inclusions. If no inclusions are explicitly speci‐ - fied, all entries are processed by default. The 1m--include 22moption + fied, all entries are processed by default. The --include option is especially useful when filtering archives. For example, the command - 1mtar -c -f 4m22mnew.tar24m 1m--include='*foo*' @4m22mold.tgz0m - creates a new archive 4mnew.tar24m containing only the entries from - 4mold.tgz24m containing the string ‘foo’. + tar -c -f new.tar --include='*foo*' @old.tgz + creates a new archive new.tar containing only the entries from + old.tgz containing the string ‘foo’. - 1m-J22m, 1m--xz0m + -J, --xz (c mode only) Compress the resulting archive with xz(1). In extract or list modes, this option is ignored. Note that, unlike - other 1mtar 22mimplementations, this implementation recognizes XZ com‐ + other tar implementations, this implementation recognizes XZ com‐ pression automatically when reading archives. - 1m-j22m, 1m--bzip22m, 1m--bzip222m, 1m--bunzip20m + -j, --bzip, --bzip2, --bunzip2 (c mode only) Compress the resulting archive with bzip2(1). In extract or list modes, this option is ignored. Note that, unlike - other 1mtar 22mimplementations, this implementation recognizes bzip2 + other tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. - 1m-k22m, 1m--keep-old-files0m + -k, --keep-old-files (x mode only) Do not overwrite existing files. In particular, if a file appears more than once in an archive, later copies will not overwrite earlier copies. - 1m--keep-newer-files0m + --keep-newer-files (x mode only) Do not overwrite existing files that are newer than the versions appearing in the archive being extracted. - 1m-L22m, 1m--dereference0m + -L, --dereference (c and r modes only) All symbolic links will be followed. Nor‐ mally, symbolic links are archived as such. With this option, the target of the link will be archived instead. - 1m-l22m, 1m--check-links0m + -l, --check-links (c and r modes only) Issue a warning message unless all links to each file are archived. - 1m--lrzip0m + --lrzip (c mode only) Compress the resulting archive with lrzip(1). In extract or list modes, this option is ignored. - 1m--lz4 22m(c mode only) Compress the archive with lz4-compatible compres‐ + --lz4 (c mode only) Compress the archive with lz4-compatible compres‐ sion before writing it. In input mode, this option is ignored; lz4 compression is recognized automatically on input. - 1m--lzma 22m(c mode only) Compress the resulting archive with the original + --lzma (c mode only) Compress the resulting archive with the original LZMA algorithm. Use of this option is discouraged and new ar‐ - chives should be created with 1m--xz 22minstead. Note that, unlike - other 1mtar 22mimplementations, this implementation recognizes LZMA + chives should be created with --xz instead. Note that, unlike + other tar implementations, this implementation recognizes LZMA compression automatically when reading archives. - 1m--lzop 22m(c mode only) Compress the resulting archive with lzop(1). In + --lzop (c mode only) Compress the resulting archive with lzop(1). In extract or list modes, this option is ignored. - 1m-m22m, 1m--modification-time0m + -m, --modification-time (x mode only) Do not extract modification time. By default, the modification time is set to the time stored in the archive. - 1m--mac-metadata0m + --mac-metadata (c, r, u and x mode only) Mac OS X specific. Archive or extract extended ACLs and extended attributes using copyfile(3) in Apple‐ - Double format. This is the reverse of 1m--no-mac-metadata22m. and the - default behavior in c, r, and u modes or if 1mtar 22mis run in x mode + Double format. This is the reverse of --no-mac-metadata. and the + default behavior in c, r, and u modes or if tar is run in x mode as root. - 1m-n22m, 1m--norecurse22m, 1m--no-recursion0m + -n, --norecurse, --no-recursion (c, r, u modes only) Do not recursively archive the contents of directories. - 1m--newer 4m22mdate0m + --newer date (c, r, u modes only) Only include files and directories newer than the specified date. This compares ctime entries. - 1m--newer-mtime 4m22mdate0m - (c, r, u modes only) Like 1m--newer22m, except it compares mtime + --newer-mtime date + (c, r, u modes only) Like --newer, except it compares mtime entries instead of ctime entries. - 1m--newer-than 4m22mfile0m + --newer-than file (c, r, u modes only) Only include files and directories newer than the specified file. This compares ctime entries. - 1m--newer-mtime-than 4m22mfile0m - (c, r, u modes only) Like 1m--newer-than22m, except it compares mtime + --newer-mtime-than file + (c, r, u modes only) Like --newer-than, except it compares mtime entries instead of ctime entries. - 1m--nodump0m + --nodump (c and r modes only) Honor the nodump file flag by skipping this file. - 1m--nopreserveHFSCompression0m - (x mode only) Mac OS X specific(v10.6 or later). Do not compress + --nopreserveHFSCompression + (x mode only) Mac OS X specific (v10.6 or later). Do not compress extracted regular files which were compressed with HFS+ compres‐ sion before archived. By default, compress the regular files again with HFS+ compression. - 1m--null 22m(use with 1m-I 22mor 1m-T22m) Filenames or patterns are separated by null + --null (use with -I or -T) Filenames or patterns are separated by null characters, not by newlines. This is often used to read file‐ - names output by the 1m-print0 22moption to find(1). + names output by the -print0 option to find(1). - 1m--no-acls0m + --no-acls (c, r, u, x modes only) Do not archive or extract POSIX.1e or - NFSv4 ACLs. This is the reverse of 1m--acls 22mand the default behav‐ - ior if 1mtar 22mis run as non-root in x mode (on Mac OS X also in c, r - and u modes). + NFSv4 ACLs. This is the reverse of --acls and the default behav‐ + ior if tar is run as non-root in x mode (on Mac OS X as any user + in c, r, u and x modes). - 1m--no-fflags0m + --no-fflags (c, r, u, x modes only) Do not archive or extract file flags. - This is the reverse of 1m--fflags 22mand the default behavior if 1mtar0m + This is the reverse of --fflags and the default behavior if tar is run as non-root in x mode. - 1m--no-mac-metadata0m + --no-mac-metadata (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 1m--mac-metadata22m. and the default behavior - if 1mtar 22mis run as non-root in x mode. + This is the reverse of --mac-metadata. and the default behavior + if tar is run as non-root in x mode. - 1m-n22m, 1m--norecurse22m, 1m--no-recursion0m + -n, --norecurse, --no-recursion - 1m--no-same-owner0m + --no-same-owner (x mode only) Do not extract owner and group IDs. This is the - reverse of 1m--same-owner 22mand the default behavior if 1mtar 22mis run as + reverse of --same-owner and the default behavior if tar is run as non-root. - 1m--no-same-permissions0m + --no-same-permissions (x mode only) Do not extract full permissions (SGID, SUID, sticky bit, ACLs, extended attributes or extended file flags). This is - the reverse of 1m-p 22mand the default behavior if 1mtar 22mis run as non- - root and can be overridden by also specifying 1m--acls22m, 1m--fflags22m, - 1m--mac-metadata, --same-owner22m, 1m--same-permissions 22mand 1m--xattrs22m. + the reverse of -p and the default behavior if tar is run as non- + root. - 1m--no-xattrs0m + --no-xattrs (c, r, u, x modes only) Do not archive or extract extended - attributes. This is the reverse of 1m--xattrs 22mand the default - behavior if 1mtar 22mis run as non-root in x mode. + attributes. This is the reverse of --xattrs and the default + behavior if tar is run as non-root in x mode. - 1m--numeric-owner0m - This is equivalent to 1m--uname 22m"" 1m--gname 22m"". On extract, it + --numeric-owner + This is equivalent to --uname "" --gname "". On extract, it causes user and group names in the archive to be ignored in favor of the numeric user and group ids. On create, it causes user and group names to not be stored in the archive. - 1m-O22m, 1m--to-stdout0m + -O, --to-stdout (x, t modes only) In extract (-x) mode, files will be written to standard out rather than being extracted to disk. In list (-t) mode, the file listing will be written to stderr rather than the usual stdout. - 1m-o 22m(x mode) Use the user and group of the user running the program + -o (x mode) Use the user and group of the user running the program rather than those specified in the archive. Note that this has - no significance unless 1m-p 22mis specified, and the program is being + no significance unless -p is specified, and the program is being run by the root user. In this case, the file modes and flags from the archive will be restored, but ACLs or owner information in the archive will be discarded. - 1m-o 22m(c, r, u mode) A synonym for 1m--format 4m22mustar0m + -o (c, r, u mode) A synonym for --format ustar - 1m--older 4m22mdate0m + --older date (c, r, u modes only) Only include files and directories older than the specified date. This compares ctime entries. - 1m--older-mtime 4m22mdate0m - (c, r, u modes only) Like 1m--older22m, except it compares mtime + --older-mtime date + (c, r, u modes only) Like --older, except it compares mtime entries instead of ctime entries. - 1m--older-than 4m22mfile0m + --older-than file (c, r, u modes only) Only include files and directories older than the specified file. This compares ctime entries. - 1m--older-mtime-than 4m22mfile0m - (c, r, u modes only) Like 1m--older-than22m, except it compares mtime + --older-mtime-than file + (c, r, u modes only) Like --older-than, except it compares mtime entries instead of ctime entries. - 1m--one-file-system0m + --one-file-system (c, r, and u modes) Do not cross mount points. - 1m--options 4m22moptions0m + --options options Select optional behaviors for particular modules. The argument is a text string containing comma-separated keywords and values. These are passed to the modules that handle particular formats to control how those formats will behave. Each option has one of the following forms: - 4mkey=value0m + key=value The key will be set to the specified value in every mod‐ ule that supports it. Modules that do not support this key will ignore it. - 4mkey24m The key will be enabled in every module that supports it. - This is equivalent to 4mkey24m1m=122m. - 4m!key24m The key will be disabled in every module that supports + key The key will be enabled in every module that supports it. + This is equivalent to key=1. + !key The key will be disabled in every module that supports it. - 4mmodule:key=value24m, 4mmodule:key24m, 4mmodule:!key0m + module:key=value, module:key, module:!key As above, but the corresponding key and value will be - provided only to modules whose name matches 4mmodule24m. + provided only to modules whose name matches module. The currently supported modules and keys are: - 1miso9660:joliet0m + iso9660:joliet Support Joliet extensions. This is enabled by default, - use 1m!joliet 22mor 1miso9660:!joliet 22mto disable. - 1miso9660:rockridge0m + use !joliet or iso9660:!joliet to disable. + iso9660:rockridge Support Rock Ridge extensions. This is enabled by - default, use 1m!rockridge 22mor 1miso9660:!rockridge 22mto disable. - 1mgzip:compression-level0m + default, use !rockridge or iso9660:!rockridge to disable. + gzip:compression-level A decimal integer from 1 to 9 specifying the gzip com‐ pression level. - 1mgzip:timestamp0m + gzip:timestamp Store timestamp. This is enabled by default, use - 1m!timestamp 22mor 1mgzip:!timestamp 22mto disable. - 1mlrzip:compression22m=4mtype0m - Use 4mtype24m as compression method. Supported values are + !timestamp or gzip:!timestamp to disable. + lrzip:compression=type + Use type as compression method. Supported values are bzip2, gzip, lzo (ultra fast), and zpaq (best, extremely slow). - 1mlrzip:compression-level0m + lrzip:compression-level A decimal integer from 1 to 9 specifying the lrzip com‐ pression level. - 1mlz4:compression-level0m + lz4:compression-level A decimal integer from 1 to 9 specifying the lzop com‐ pression level. - 1mlz4:stream-checksum0m + lz4:stream-checksum Enable stream checksum. This is by default, use - 1mlz4:!stream-checksum 22mto disable. - 1mlz4:block-checksum0m + lz4:!stream-checksum to disable. + lz4:block-checksum Enable block checksum (Disabled by default). - 1mlz4:block-size0m + lz4:block-size A decimal integer from 4 to 7 specifying the lz4 compres‐ sion block size (7 is set by default). - 1mlz4:block-dependence0m + lz4:block-dependence Use the previous block of the block being compressed for a compression dictionary to improve compression ratio. - 1mlzop:compression-level0m + lzop:compression-level A decimal integer from 1 to 9 specifying the lzop com‐ pression level. - 1mxz:compression-level0m + xz:compression-level A decimal integer from 0 to 9 specifying the xz compres‐ sion level. - 1mmtree:4m22mkeyword0m + mtree:keyword The mtree writer module allows you to specify which mtree keywords will be included in the output. Supported key‐ - words include: 1mcksum22m, 1mdevice22m, 1mflags22m, 1mgid22m, 1mgname22m, 1mindent22m, - 1mlink22m, 1mmd522m, 1mmode22m, 1mnlink22m, 1mrmd16022m, 1msha122m, 1msha25622m, 1msha38422m, - 1msha51222m, 1msize22m, 1mtime22m, 1muid22m, 1muname22m. The default is equiva‐ + words include: cksum, device, flags, gid, gname, indent, + link, md5, mode, nlink, rmd160, sha1, sha256, sha384, + sha512, size, time, uid, uname. The default is equiva‐ lent to: “device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname”. - 1mmtree:all0m + mtree:all Enables all of the above keywords. You can also use - 1mmtree:!all 22mto disable all keywords. - 1mmtree:use-set0m - Enable generation of 1m/set 22mlines in the output. - 1mmtree:indent0m + mtree:!all to disable all keywords. + mtree:use-set + Enable generation of /set lines in the output. + mtree:indent Produce human-readable output by indenting options and splitting lines to fit into 80 columns. - 1mzip:compression22m=4mtype0m - Use 4mtype24m as compression method. Supported values are + zip:compression=type + Use type as compression method. Supported values are store (uncompressed) and deflate (gzip algorithm). - 1mzip:encryption0m + zip:encryption Enable encryption using traditional zip encryption. - 1mzip:encryption22m=4mtype0m - Use 4mtype24m as encryption type. Supported values are + zip:encryption=type + Use type as encryption type. Supported values are zipcrypt (traditional zip encryption), aes128 (WinZip AES-128 encryption) and aes256 (WinZip AES-256 encryp‐ tion). - 1mread_concatenated_archives0m + read_concatenated_archives Ignore zeroed blocks in the archive, which occurs when multiple tar archives have been concatenated together. Without this option, only the contents of the first con‐ catenated archive would be read. This option is compara‐ - ble to the 1m-i22m, 1m--ignore-zeros 22moption of GNU tar. + ble to the -i, --ignore-zeros option of GNU tar. If a provided option is not supported by any module, that is a fatal error. - 1m-P22m, 1m--absolute-paths0m + -P, --absolute-paths Preserve pathnames. By default, absolute pathnames (those that begin with a / character) have the leading slash removed both - when creating archives and extracting from them. Also, 1mtar 22mwill - refuse to extract archive entries whose pathnames contain 4m..24m or + when creating archives and extracting from them. Also, tar will + refuse to extract archive entries whose pathnames contain .. or whose target directory would be altered by a symlink. This option suppresses these behaviors. - 1m-p22m, 1m--insecure22m, 1m--preserve-permissions0m + -p, --insecure, --preserve-permissions (x mode only) Preserve file permissions. 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 1mtar 22mis being - run by root and can be overridden by also specifying 1m--no-acls22m, - 1m--no-fflags22m, 1m--no-mac-metadata, --no-same-owner22m, - 1m--no-same-permissions 22mand 1m--no-xattrs22m. - - 1m--passphrase 4m22mpassphrase0m - The 4mpassphrase24m is used to extract or create an encrypted archive. + attributes and extended file flags, if available, for each item + extracted from the archive. This is te reverse of + --no-same-permissions and the default if tar is being run by root + and can be partially overridden by also specifying --no-acls, + --no-fflags, --no-mac-metadata or --no-xattrs. + + --passphrase passphrase + The passphrase is used to extract or create an encrypted archive. Currently, zip is the only supported format that supports encryp‐ tion. You shouldn't use this option unless you realize how inse‐ cure use of this option is. - 1m--posix0m - (c, r, u mode only) Synonym for 1m--format 4m22mpax0m + --posix + (c, r, u mode only) Synonym for --format pax - 1m-q22m, 1m--fast-read0m + -q, --fast-read (x and t mode only) Extract or list only the first archive entry that matches each pattern or filename operand. Exit as soon as each specified pattern or filename has been matched. By default, @@ -477,17 +476,17 @@ TAR(1) BSD General Commands Manual TAR(1) entries overwrite earlier entries. This option is provided as a performance optimization. - 1m-S 22m(x mode only) Extract files as sparse files. For every block on + -S (x mode only) Extract files as sparse files. For every block on disk, check first if it contains only NULL bytes and seek over it otherwise. This works similar to the conv=sparse option of dd. - 1m-s 4m22mpattern0m - Modify file or archive member names according to 4mpattern24m. The - pattern has the format 4m/old/new/24m[ghHprRsS] where 4mold24m is a basic - regular expression, 4mnew24m is the replacement string of the matched + -s pattern + Modify file or archive member names according to pattern. The + pattern has the format /old/new/[ghHprRsS] where old is a basic + regular expression, new is the replacement string of the matched part, and the optional trailing letters modify how the replace‐ - ment is handled. If 4mold24m is not matched, the pattern is skipped. - Within 4mnew24m, ~ is substituted with the match, \1 to \9 with the + ment is handled. If old is not matched, the pattern is skipped. + Within new, ~ is substituted with the match, \1 to \9 with the content of the corresponding captured group. The optional trail‐ ing g specifies that matching should continue after the matched part and stop on the first unmatched pattern. The optional @@ -499,148 +498,148 @@ TAR(1) BSD General Commands Manual TAR(1) regular filenames, or symlink targets, respectively. Optional trailing h, r, or s characters enable substitutions for hardlink targets, regular filenames, or symlink targets, respectively. - The default is 4mhrs24m which applies substitutions to all names. In + The default is hrs which applies substitutions to all names. In particular, it is never necessary to specify h, r, or s. - 1m--same-owner0m + --same-owner (x mode only) Extract owner and group IDs. This is the reverse - of 1m--no-same-owner 22mand the default behavior if 1mtar 22mis run as + of --no-same-owner and the default behavior if tar is run as root. - 1m--strip-components 4m22mcount0m + --strip-components count Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. Note that the pathname is edited after checking inclusion/exclusion patterns but before security checks. - 1m-T 4m22mfilename24m, 1m--files-from 4m22mfilename0m - In x or t mode, 1mtar 22mwill read the list of names to be extracted - from 4mfilename24m. In c mode, 1mtar 22mwill read names to be archived - from 4mfilename24m. The special name “-C” on a line by itself will + -T filename, --files-from filename + In x or t mode, tar will read the list of names to be extracted + from filename. In c mode, tar will read names to be archived + from filename. The special name “-C” on a line by itself will cause the current directory to be changed to the directory speci‐ fied on the following line. Names are terminated by newlines - unless 1m--null 22mis specified. Note that 1m--null 22malso disables the + unless --null is specified. Note that --null also disables the special handling of lines containing “-C”. Note: If you are generating lists of files using find(1), you probably want to use - 1m-n 22mas well. + -n as well. - 1m--totals0m + --totals (c, r, u modes only) After archiving all files, print a summary to stderr. - 1m-U22m, 1m--unlink22m, 1m--unlink-first0m + -U, --unlink, --unlink-first (x mode only) Unlink files before creating them. This can be a minor performance optimization if most files already exist, but can make things slower if most files do not already exist. This - flag also causes 1mtar 22mto remove intervening directory symlinks + flag also causes tar to remove intervening directory symlinks instead of reporting an error. See the SECURITY section below for more details. - 1m--uid 4m22mid0m + --uid id Use the provided user id number and ignore the user name from the - archive. On create, if 1m--uname 22mis not also specified, the user + archive. On create, if --uname is not also specified, the user name will be set to match the user id. - 1m--uname 4m22mname0m + --uname name Use the provided user name. On extract, this overrides the user name in the archive; if the provided user name does not exist on the system, it will be ignored and the user id (from the archive - or from the 1m--uid 22moption) will be used instead. On create, this + or from the --uid option) will be used instead. On create, this sets the user name that will be stored in the archive; the name is not verified against the system user database. - 1m--use-compress-program 4m22mprogram0m + --use-compress-program program Pipe the input (in x or t mode) or the output (in c mode) through - 4mprogram24m instead of using the builtin compression support. + program instead of using the builtin compression support. - 1m-v22m, 1m--verbose0m - Produce verbose output. In create and extract modes, 1mtar 22mwill + -v, --verbose + Produce verbose output. In create and extract modes, tar will list each file name as it is read from or written to the archive. - In list mode, 1mtar 22mwill produce output similar to that of ls(1). - An additional 1m-v 22moption will also provide ls-like details in cre‐ + In list mode, tar will produce output similar to that of ls(1). + An additional -v option will also provide ls-like details in cre‐ ate and extract mode. - 1m--version0m - Print version of 1mtar 22mand 1mlibarchive22m, and exit. + --version + Print version of tar and libarchive, and exit. - 1m-w22m, 1m--confirmation22m, 1m--interactive0m + -w, --confirmation, --interactive Ask for confirmation for every action. - 1m-X 4m22mfilename24m, 1m--exclude-from 4m22mfilename0m + -X filename, --exclude-from filename Read a list of exclusion patterns from the specified file. See - 1m--exclude 22mfor more information about the handling of exclusions. + --exclude for more information about the handling of exclusions. - 1m--xattrs0m + --xattrs (c, r, u, x modes only) Archive or extract extended attributes. - This is the reverse of 1m--no-xattrs 22mand the default behavior in c, - r, and u modes or if 1mtar 22mis run in x mode as root. + This is the reverse of --no-xattrs and the default behavior in c, + r, and u modes or if tar is run in x mode as root. - 1m-y 22m(c mode only) Compress the resulting archive with bzip2(1). In + -y (c mode only) Compress the resulting archive with bzip2(1). In extract or list modes, this option is ignored. Note that, unlike - other 1mtar 22mimplementations, this implementation recognizes bzip2 + other tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. - 1m-Z22m, 1m--compress22m, 1m--uncompress0m + -Z, --compress, --uncompress (c mode only) Compress the resulting archive with compress(1). In extract or list modes, this option is ignored. Note that, - unlike other 1mtar 22mimplementations, this implementation recognizes + unlike other tar implementations, this implementation recognizes compress compression automatically when reading archives. - 1m-z22m, 1m--gunzip22m, 1m--gzip0m + -z, --gunzip, --gzip (c mode only) Compress the resulting archive with gzip(1). In extract or list modes, this option is ignored. Note that, unlike - other 1mtar 22mimplementations, this implementation recognizes gzip + other tar implementations, this implementation recognizes gzip compression automatically when reading archives. -1mENVIRONMENT0m - The following environment variables affect the execution of 1mtar22m: +ENVIRONMENT + The following environment variables affect the execution of tar: TAR_READER_OPTIONS The default options for format readers and compression read‐ - ers. The 1m--options 22moption overrides this. + ers. The --options option overrides this. TAR_WRITER_OPTIONS The default options for format writers and compression writ‐ - ers. The 1m--options 22moption overrides this. + ers. The --options option overrides this. LANG The locale to use. See environ(7) for more information. - TAPE The default device. The 1m-f 22moption overrides this. Please see - the description of the 1m-f 22moption above for more details. + TAPE The default device. The -f option overrides this. Please see + the description of the -f option above for more details. TZ The timezone to use when displaying dates. See environ(7) for more information. -1mEXIT STATUS0m - The 1mtar 22mutility exits 0 on success, and >0 if an error occurs. +EXIT STATUS + The tar utility exits 0 on success, and >0 if an error occurs. -1mEXAMPLES0m - The following creates a new archive called 4mfile.tar.gz24m that contains two - files 4msource.c24m and 4msource.h24m: - 1mtar -czf 4m22mfile.tar.gz24m 4msource.c24m 4msource.h0m +EXAMPLES + The following creates a new archive called file.tar.gz that contains two + files source.c and source.h: + tar -czf file.tar.gz source.c source.h To view a detailed table of contents for this archive: - 1mtar -tvf 4m22mfile.tar.gz0m + tar -tvf file.tar.gz To extract all entries from the archive on the default tape drive: - 1mtar -x0m + tar -x To examine the contents of an ISO 9660 cdrom image: - 1mtar -tf 4m22mimage.iso0m + tar -tf image.iso - To move file hierarchies, invoke 1mtar 22mas - 1mtar -cf 4m22m-24m 1m-C 4m22msrcdir24m 4m.24m | 1mtar -xpf 4m22m-24m 1m-C 4m22mdestdir0m + To move file hierarchies, invoke tar as + tar -cf - -C srcdir . | tar -xpf - -C destdir or more traditionally - cd srcdir ; 1mtar -cf 4m22m-24m 4m.24m | (4mcd24m 4mdestdir24m 4m;24m 1mtar -xpf 4m22m-24m) + cd srcdir ; tar -cf - . | (cd destdir ; tar -xpf -) In create mode, the list of files and directories to be archived can also - include directory change instructions of the form 1m-C4m22mfoo/baz24m and archive - inclusions of the form 1m@4m22marchive-file24m. For example, the command line - 1mtar -c -f 4m22mnew.tar24m 4mfoo124m 1m@4m22mold.tgz24m 1m-C4m22m/tmp24m 4mfoo20m - will create a new archive 4mnew.tar24m. 1mtar 22mwill read the file 4mfoo124m from the + include directory change instructions of the form -Cfoo/baz and archive + inclusions of the form @archive-file. For example, the command line + tar -c -f new.tar foo1 @old.tgz -C/tmp foo2 + will create a new archive new.tar. tar will read the file foo1 from the current directory and add it to the output archive. It will then read - each entry from 4mold.tgz24m and add those entries to the output archive. - Finally, it will switch to the 4m/tmp24m directory and add 4mfoo224m to the output + each entry from old.tgz and add those entries to the output archive. + Finally, it will switch to the /tmp directory and add foo2 to the output archive. An input file in mtree(5) format can be used to create an output archive @@ -653,85 +652,85 @@ TAR(1) BSD General Commands Manual TAR(1) usr/bin/ls uid=0 gid=0 mode=0755 type=file content=myls $ tar -cvf output.tar @input.mtree - The 1m--newer 22mand 1m--newer-mtime 22mswitches accept a variety of common date + The --newer and --newer-mtime switches accept a variety of common date and time specifications, including “12 Mar 2005 7:14:29pm”, “2005-03-12 19:14”, “5 minutes ago”, and “19:14 PST May 1”. - The 1m--options 22margument can be used to control various details of archive + The --options argument can be used to control various details of archive generation or reading. For example, you can generate mtree output which - only contains 1mtype22m, 1mtime22m, and 1muid 22mkeywords: - 1mtar -cf 4m22mfile.tar24m 1m--format=mtree --options='!all,type,time,uid' 4m22mdir0m + only contains type, time, and uid keywords: + tar -cf file.tar --format=mtree --options='!all,type,time,uid' dir or you can set the compression level used by gzip or xz compression: - 1mtar -czf 4m22mfile.tar24m 1m--options='compression-level=9'22m. - For more details, see the explanation of the 1marchive_read_set_options22m() - and 1marchive_write_set_options22m() API calls that are described in + tar -czf file.tar --options='compression-level=9'. + For more details, see the explanation of the archive_read_set_options() + and archive_write_set_options() API calls that are described in archive_read(3) and archive_write(3). -1mCOMPATIBILITY0m +COMPATIBILITY The bundled-arguments format is supported for compatibility with historic implementations. It consists of an initial word (with no leading - char‐ acter) in which each character indicates an option. Arguments follow as separate words. The order of the arguments must match the order of the corresponding characters in the bundled command word. For example, - 1mtar tbf 32 4m22mfile.tar0m - specifies three flags 1mt22m, 1mb22m, and 1mf22m. The 1mb 22mand 1mf 22mflags both require argu‐ - ments, so there must be two additional items on the command line. The 4m320m - is the argument to the 1mb 22mflag, and 4mfile.tar24m is the argument to the 1mf0m + tar tbf 32 file.tar + specifies three flags t, b, and f. The b and f flags both require argu‐ + ments, so there must be two additional items on the command line. The 32 + is the argument to the b flag, and file.tar is the argument to the f flag. The mode options c, r, t, u, and x and the options b, f, l, m, o, v, and w comply with SUSv2. - For maximum portability, scripts that invoke 1mtar 22mshould use the bundled- - argument format above, should limit themselves to the 1mc22m, 1mt22m, and 1mx 22mmodes, - and the 1mb22m, 1mf22m, 1mm22m, 1mv22m, and 1mw 22moptions. + For maximum portability, scripts that invoke tar should use the bundled- + argument format above, should limit themselves to the c, t, and x modes, + and the b, f, m, v, and w options. Additional long options are provided to improve compatibility with other tar implementations. -1mSECURITY0m +SECURITY Certain security issues are common to many archiving programs, including - 1mtar22m. In particular, carefully-crafted archives can request that 1mtar0m + tar. In particular, carefully-crafted archives can request that tar extract files to locations outside of the target directory. This can potentially be used to cause unwitting users to overwrite files they did not intend to overwrite. If the archive is being extracted by the supe‐ ruser, any file on the system can potentially be overwritten. There are - three ways this can happen. Although 1mtar 22mhas mechanisms to protect + three ways this can happen. Although tar has mechanisms to protect against each one, savvy users should be aware of the implications: - 1m· 22mArchive entries can have absolute pathnames. By default, 1mtar0m - removes the leading 4m/24m character from filenames before restoring + · Archive entries can have absolute pathnames. By default, tar + removes the leading / character from filenames before restoring them to guard against this problem. - 1m· 22mArchive entries can have pathnames that include 4m..24m components. - By default, 1mtar 22mwill not extract files containing 4m..24m components + · Archive entries can have pathnames that include .. components. + By default, tar will not extract files containing .. components in their pathname. - 1m· 22mArchive entries can exploit symbolic links to restore files to + · Archive entries can exploit symbolic links to restore files to other directories. An archive can restore a symbolic link to another directory, then use that link to restore a file into that - directory. To guard against this, 1mtar 22mchecks each extracted path + directory. To guard against this, tar checks each extracted path for symlinks. If the final path element is a symlink, it will be - removed and replaced with the archive entry. If 1m-U 22mis specified, + removed and replaced with the archive entry. If -U is specified, any intermediate symlink will also be unconditionally removed. - If neither 1m-U 22mnor 1m-P 22mis specified, 1mtar 22mwill refuse to extract the + If neither -U nor -P is specified, tar will refuse to extract the entry. To protect yourself, you should be wary of any archives that come from untrusted sources. You should examine the contents of an archive with - 1mtar -tf 4m22mfilename0m - before extraction. You should use the 1m-k 22moption to ensure that 1mtar 22mwill - not overwrite any existing files or the 1m-U 22moption to remove any pre- + tar -tf filename + before extraction. You should use the -k option to ensure that tar will + not overwrite any existing files or the -U option to remove any pre- existing files. You should generally not extract archives while running - with super-user privileges. Note that the 1m-P 22moption to 1mtar 22mdisables the + with super-user privileges. Note that the -P option to tar disables the security checks above and allows you to extract an archive while preserv‐ - ing any absolute pathnames, 4m..24m components, or symlinks to other directo‐ + ing any absolute pathnames, .. components, or symlinks to other directo‐ ries. -1mSEE ALSO0m +SEE ALSO bzip2(1), compress(1), cpio(1), gzip(1), mt(1), pax(1), shar(1), xz(1), libarchive(3), libarchive-formats(5), tar(5) -1mSTANDARDS0m +STANDARDS There is no current POSIX standard for the tar command; it appeared in ISO/IEC 9945-1:1996 (“POSIX.1”) but was dropped from IEEE Std 1003.1-2001 (“POSIX.1”). The options supported by this implementation were developed @@ -741,10 +740,10 @@ TAR(1) BSD General Commands Manual TAR(1) The ustar and pax interchange file formats are defined by IEEE Std 1003.1-2001 (“POSIX.1”) for the pax command. -1mHISTORY0m - A 1mtar 22mcommand appeared in Seventh Edition Unix, which was released in +HISTORY + A tar command appeared in Seventh Edition Unix, which was released in January, 1979. There have been numerous other implementations, many of - which extended the file format. John Gilmore's 1mpdtar 22mpublic-domain + which extended the file format. John Gilmore's pdtar public-domain implementation (circa November, 1987) was quite influential, and formed the basis of GNU tar. GNU tar was included as the standard system tar in FreeBSD beginning with FreeBSD 1.0. @@ -752,12 +751,12 @@ TAR(1) BSD General Commands Manual TAR(1) This is a complete re-implementation based on the libarchive(3) library. It was first released with FreeBSD 5.4 in May, 2005. -1mBUGS0m +BUGS This program follows ISO/IEC 9945-1:1996 (“POSIX.1”) for the definition - of the 1m-l 22moption. Note that GNU tar prior to version 1.15 treated 1m-l 22mas - a synonym for the 1m--one-file-system 22moption. + of the -l option. Note that GNU tar prior to version 1.15 treated -l as + a synonym for the --one-file-system option. - The 1m-C 4m22mdir24m option may differ from historic implementations. + The -C dir option may differ from historic implementations. All archive output is written in correctly-sized blocks, even if the out‐ put is being compressed. Whether or not the last output block is padded @@ -767,27 +766,27 @@ TAR(1) BSD General Commands Manual TAR(1) a character or block device such as a tape drive. If the output is being written to a regular file, the last block will not be padded. Many com‐ pressors, including gzip(1) and bzip2(1), complain about the null padding - when decompressing an archive created by 1mtar22m, although they still extract + when decompressing an archive created by tar, although they still extract it correctly. The compression and decompression is implemented internally, so there may be insignificant differences between the compressed output generated by - 1mtar -czf 4m22m-24m 4mfile0m + tar -czf - file and that generated by - 1mtar -cf 4m22m-24m 4mfile24m | 1mgzip0m + tar -cf - file | gzip The default should be to read and write archives to the standard I/O paths, but tradition (and POSIX) dictates otherwise. - The 1mr 22mand 1mu 22mmodes require that the archive be uncompressed and located in - a regular file on disk. Other archives can be modified using 1mc 22mmode with - the 4m@archive-file24m extension. + The r and u modes require that the archive be uncompressed and located in + a regular file on disk. Other archives can be modified using c mode with + the @archive-file extension. - To archive a file called 4m@foo24m or 4m-foo24m you must specify it as 4m./@foo24m or - 4m./-foo24m, respectively. + To archive a file called @foo or -foo you must specify it as ./@foo or + ./-foo, respectively. - In create mode, a leading 4m./24m is always removed. A leading 4m/24m is stripped - unless the 1m-P 22moption is specified. + In create mode, a leading ./ is always removed. A leading / is stripped + unless the -P option is specified. There needs to be better support for file selection on both create and extract. @@ -795,8 +794,8 @@ TAR(1) BSD General Commands Manual TAR(1) There is not yet any support for multi-volume archives. Converting between dissimilar archive formats (such as tar and cpio) - using the 1m@4m22m-24m convention can cause hard link information to be lost. + using the @- convention can cause hard link information to be lost. (This is a consequence of the incompatible ways that different archive formats store hardlink information.) -BSD February 24, 2017 BSD +BSD February 25, 2017 BSD diff --git a/archivers/libarchive/files/doc/text/cpio.5.txt b/archivers/libarchive/files/doc/text/cpio.5.txt index 2b6174e83dd..395a560aa76 100644 --- a/archivers/libarchive/files/doc/text/cpio.5.txt +++ b/archivers/libarchive/files/doc/text/cpio.5.txt @@ -1,29 +1,29 @@ CPIO(5) BSD File Formats Manual CPIO(5) -1mNAME0m - 1mcpio 22m— format of cpio archive files +NAME + cpio — format of cpio archive files -1mDESCRIPTION0m - The 1mcpio 22marchive format collects any number of files, directories, and +DESCRIPTION + The cpio archive format collects any number of files, directories, and other file system objects (symbolic links, device nodes, etc.) into a single stream of bytes. - 1mGeneral Format0m - Each file system object in a 1mcpio 22marchive comprises a header record with + General Format + Each file system object in a cpio archive comprises a header record with basic numeric metadata followed by the full pathname of the entry and the file data. The header record stores a series of integer values that gen‐ - erally follow the fields in 4mstruct24m 4mstat24m. (See stat(2) for details.) The + erally follow the fields in struct stat. (See stat(2) for details.) The variants differ primarily in how they store those integers (binary, octal, or hexadecimal). The header is followed by the pathname of the entry (the length of the pathname is stored in the header) and any file data. The end of the archive is indicated by a special record with the pathname “TRAILER!!!”. - 1mPWB format0m + PWB format XXX Any documentation of the original PWB/UNIX 1.0 format? XXX - 1mOld Binary Format0m - The old binary 1mcpio 22mformat stores numbers as 2-byte and 4-byte binary + Old Binary Format + The old binary cpio format stores numbers as 2-byte and 4-byte binary values. Each entry begins with a header in the following format: struct header_old_cpio { @@ -40,20 +40,20 @@ CPIO(5) BSD File Formats Manual CPIO(5) unsigned short c_filesize[2]; }; - The 4munsigned24m 4mshort24m fields here are 16-bit integer values; the 4munsigned0m - 4mint24m fields are 32-bit integer values. The fields are as follows + The unsigned short fields here are 16-bit integer values; the unsigned + int fields are 32-bit integer values. The fields are as follows - 4mmagic24m The integer value octal 070707. This value can be used to deter‐ + magic The integer value octal 070707. This value can be used to deter‐ mine whether this archive is written with little-endian or big- endian integers. - 4mdev24m, 4mino0m + dev, ino The device and inode numbers from the disk. These are used by - programs that read 1mcpio 22marchives to determine when two entries - refer to the same file. Programs that synthesize 1mcpio 22marchives + programs that read cpio archives to determine when two entries + refer to the same file. Programs that synthesize cpio archives should be careful to set these to distinct values for each entry. - 4mmode24m The mode specifies both the regular permissions and the file + mode The mode specifies both the regular permissions and the file type. It consists of several bit fields as follows: 0170000 This masks the file type bits. 0140000 File type value for sockets. @@ -72,40 +72,40 @@ CPIO(5) BSD File Formats Manual CPIO(5) for world, group, and user following standard POSIX con‐ ventions. - 4muid24m, 4mgid0m + uid, gid The numeric user id and group id of the owner. - 4mnlink24m The number of links to this file. Directories always have a + nlink The number of links to this file. Directories always have a value of at least two here. Note that hardlinked files include file data with every copy in the archive. - 4mrdev24m For block special and character special entries, this field con‐ + rdev For block special and character special entries, this field con‐ tains the associated device number. For all other entry types, it should be set to zero by writers and ignored by readers. - 4mmtime24m Modification time of the file, indicated as the number of seconds + mtime Modification time of the file, indicated as the number of seconds since the start of the epoch, 00:00:00 UTC January 1, 1970. The four-byte integer is stored with the most-significant 16 bits first followed by the least-significant 16 bits. Each of the two 16 bit values are stored in machine-native byte order. - 4mnamesize0m + namesize The number of bytes in the pathname that follows the header. This count includes the trailing NUL byte. - 4mfilesize0m + filesize The size of the file. Note that this archive format is limited - to four gigabyte file sizes. See 4mmtime24m above for a description + to four gigabyte file sizes. See mtime above for a description of the storage of four-byte integers. - The pathname immediately follows the fixed header. If the 1mnamesize 22mis + The pathname immediately follows the fixed header. If the namesize is odd, an additional NUL byte is added after the pathname. The file data is then appended, padded with NUL bytes to an even length. Hardlinked files are not given special treatment; the full file contents are included with each copy of the file. - 1mPortable ASCII Format0m + Portable ASCII Format Version 2 of the Single UNIX Specification (“SUSv2”) standardized an ASCII variant that is portable across all platforms. It is commonly known as the “old character” format or as the “odc” format. It stores @@ -133,7 +133,7 @@ CPIO(5) BSD File Formats Manual CPIO(5) archive will be entirely ASCII, except for the NUL byte that terminates the name field. - 1mNew ASCII Format0m + New ASCII Format The "new" ASCII format uses 8-byte hexadecimal fields for all numbers and separates device numbers into separate fields for major and minor num‐ bers. @@ -158,9 +158,9 @@ CPIO(5) BSD File Formats Manual CPIO(5) Except as specified below, the fields here match those specified for the old binary format above. - 4mmagic24m The string “070701”. + magic The string “070701”. - 4mcheck24m This field is always set to zero by writers and ignored by read‐ + check This field is always set to zero by writers and ignored by read‐ ers. See the next section for more details. The pathname is followed by NUL bytes so that the total size of the fixed @@ -172,35 +172,35 @@ CPIO(5) BSD File Formats Manual CPIO(5) In this format, hardlinked files are handled by setting the filesize to zero for each entry except the last one that appears in the archive. - 1mNew CRC Format0m + New CRC Format The CRC format is identical to the new ASCII format described in the pre‐ vious section except that the magic field is set to “070702” and the - 4mcheck24m field is set to the sum of all bytes in the file data. This sum is + check field is set to the sum of all bytes in the file data. This sum is computed treating all bytes as unsigned values and using unsigned arith‐ metic. Only the least-significant 32 bits of the sum are stored. - 1mHP variants0m - The 1mcpio 22mimplementation distributed with HPUX used XXXX but stored device + HP variants + The cpio implementation distributed with HPUX used XXXX but stored device numbers differently XXX. - 1mOther Extensions and Variants0m + Other Extensions and Variants Sun Solaris uses additional file types to store extended file data, including ACLs and extended attributes, as special entries in cpio ar‐ chives. XXX Others? XXX -1mSEE ALSO0m +SEE ALSO cpio(1), tar(5) -1mSTANDARDS0m - The 1mcpio 22mutility is no longer a part of POSIX or the Single Unix Stan‐ +STANDARDS + The cpio utility is no longer a part of POSIX or the Single Unix Stan‐ dard. It last appeared in Version 2 of the Single UNIX Specification (“SUSv2”). It has been supplanted in subsequent standards by pax(1). The portable ASCII format is currently part of the specification for the pax(1) utility. -1mHISTORY0m +HISTORY The original cpio utility was written by Dick Haight while working in AT&T's Unix Support Group. It appeared in 1977 as part of PWB/UNIX 1.0, the “Programmer's Work Bench” derived from Version 6 AT&T UNIX that was @@ -211,7 +211,7 @@ CPIO(5) BSD File Formats Manual CPIO(5) Who invented it? When did HP come out with their variant? When did Sun introduce ACLs and extended attributes? XXX -1mBUGS0m +BUGS The “CRC” format is mis-named, as it uses a simple checksum and not a cyclic redundancy check. diff --git a/archivers/libarchive/files/doc/text/libarchive-formats.5.txt b/archivers/libarchive/files/doc/text/libarchive-formats.5.txt index 429dd74ae0c..fe095e36b45 100644 --- a/archivers/libarchive/files/doc/text/libarchive-formats.5.txt +++ b/archivers/libarchive/files/doc/text/libarchive-formats.5.txt @@ -1,9 +1,9 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) -1mNAME0m - 1mlibarchive-formats 22m— archive formats supported by the libarchive library +NAME + libarchive-formats — archive formats supported by the libarchive library -1mDESCRIPTION0m +DESCRIPTION The libarchive(3) library reads and writes a variety of streaming archive formats. Generally speaking, all of these archive formats consist of a series of “entries”. Each entry stores a single file system object, such @@ -17,7 +17,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) specify which formats they wish to support, though many programs do use libarchive convenience functions to enable all supported formats. - 1mTar Formats0m + Tar Formats The libarchive(3) library can read most tar archives. It can write POSIX-standard “ustar” and “pax interchange” formats as well as v7 tar format and a subset of the legacy GNU tar format. @@ -30,7 +30,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) storing special entries that modify the interpretation of subsequent entries. - 1mgnutar 22mThe libarchive(3) library can read most GNU-format tar archives. + gnutar The libarchive(3) library can read most GNU-format tar archives. It currently supports the most popular GNU extensions, including modern long filename and linkname support, as well as atime and ctime data. The libarchive library does not support multi-volume @@ -41,7 +41,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) long filename and linkname support, as well as atime and ctime data. - 1mpax 22mThe libarchive(3) library can read and write POSIX-compliant pax + pax The libarchive(3) library can read and write POSIX-compliant pax interchange format archives. Pax interchange format archives are an extension of the older ustar format that adds a separate entry with additional attributes stored as key/value pairs immediately @@ -64,7 +64,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) dle non-ASCII filenames on systems that did not satisfy this assumption. - 1mrestricted pax0m + restricted pax The libarchive library can also write pax archives in which it attempts to suppress the extended attributes entry whenever pos‐ sible. The result will be identical to a ustar archive unless @@ -76,38 +76,38 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) pliant pax interchange format archives. Programs that correctly read ustar format (see below) will also be able to read this for‐ mat; any extended attributes will be extracted as separate files - stored in 4mPaxHeader24m directories. + stored in PaxHeader directories. - 1mustar 22mThe libarchive library can both read and write this format. This + ustar The libarchive library can both read and write this format. This format has the following limitations: - 1m· 22mDevice major and minor numbers are limited to 21 bits. Nodes + · Device major and minor numbers are limited to 21 bits. Nodes with larger numbers will not be added to the archive. - 1m· 22mPath names in the archive are limited to 255 bytes. (Shorter + · Path names in the archive are limited to 255 bytes. (Shorter if there is no / character in exactly the right place.) - 1m· 22mSymbolic links and hard links are stored in the archive with + · Symbolic links and hard links are stored in the archive with the name of the referenced file. This name is limited to 100 bytes. - 1m· 22mExtended attributes, file flags, and other extended security + · Extended attributes, file flags, and other extended security information cannot be stored. - 1m· 22mArchive entries are limited to 8 gigabytes in size. + · Archive entries are limited to 8 gigabytes in size. Note that the pax interchange format has none of these restric‐ tions. The ustar format is old and widely supported. It is rec‐ ommended when compatibility is the primary concern. - 1mv7 22mThe libarchive library can read and write the legacy v7 tar for‐ + v7 The libarchive library can read and write the legacy v7 tar for‐ mat. This format has the following limitations: - 1m· 22mOnly regular files, directories, and symbolic links can be + · Only regular files, directories, and symbolic links can be archived. Block and character device nodes, FIFOs, and sock‐ ets cannot be archived. - 1m· 22mPath names in the archive are limited to 100 bytes. - 1m· 22mSymbolic links and hard links are stored in the archive with + · Path names in the archive are limited to 100 bytes. + · Symbolic links and hard links are stored in the archive with the name of the referenced file. This name is limited to 100 bytes. - 1m· 22mUser and group information are stored as numeric IDs; there + · User and group information are stored as numeric IDs; there is no provision for storing user or group names. - 1m· 22mExtended attributes, file flags, and other extended security + · Extended attributes, file flags, and other extended security information cannot be stored. - 1m· 22mArchive entries are limited to 8 gigabytes in size. + · Archive entries are limited to 8 gigabytes in size. Generally, users should prefer the ustar format for portability as the v7 tar format is both less useful and less portable. @@ -134,7 +134,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) Standard Tar) format defined by POSIX in 1988. POSIX.1-2001 extended the ustar format to create the “pax interchange” format. - 1mCpio Formats0m + Cpio Formats The libarchive library can read a number of common cpio variants and can write “odc” and “newc” format archives. A cpio archive stores each entry as a fixed-size header followed by a variable-length filename and vari‐ @@ -144,12 +144,12 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) the values as octal or hexadecimal numbers in ASCII, others as binary values of varying byte order and length. - 1mbinary 22mThe libarchive library transparently reads both big-endian and + binary The libarchive library transparently reads both big-endian and little-endian variants of the original binary cpio format. This format used 32-bit binary values for file size and mtime, and 16-bit binary values for the other fields. - 1modc 22mThe libarchive library can both read and write this POSIX-stan‐ + odc The libarchive library can both read and write this POSIX-stan‐ dard format, which is officially known as the “cpio interchange format” or the “octet-oriented cpio archive format” and sometimes unofficially referred to as the “old character format”. This @@ -158,7 +158,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) File sizes and mtime are limited to 33 bits (8GB file size), other fields are limited to 18 bits. - 1mSVR4/newc0m + SVR4/newc The libarchive library can read both CRC and non-CRC variants of this format. The SVR4 format uses eight-digit hexadecimal values for all header fields. This limits file size to 4GB, and also @@ -171,7 +171,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) of AT&T in 1981. This makes cpio older than tar, although cpio was not included in Version 7 AT&T Unix. As a result, the tar command became much better known in universities and research groups that used Version - 7. The combination of the 1mfind 22mand 1mcpio 22mutilities provided very precise + 7. The combination of the find and cpio utilities provided very precise control over file selection. Unfortunately, the format has many limita‐ tions that make it unsuitable for widespread use. Only the POSIX format permits files over 4GB, and its 18-bit limit for most other fields makes @@ -180,19 +180,19 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) very difficult to correctly transfer archives across systems with dissim‐ ilar user numbering. - 1mShar Formats0m + Shar Formats A “shell archive” is a shell script that, when executed on a POSIX-com‐ pliant system, will recreate a collection of file system objects. The libarchive library can write two different kinds of shar archives: - 1mshar 22mThe traditional shar format uses a limited set of POSIX commands, + shar The traditional shar format uses a limited set of POSIX commands, including echo(1), mkdir(1), and sed(1). It is suitable for portably archiving small collections of plain text files. How‐ ever, it is not generally well-suited for large archives (many implementations of sh(1) have limits on the size of a script) nor should it be used with non-text files. - 1mshardump0m + shardump This format is similar to shar but encodes files using uuencode(1) so that the result will be a plain text file regard‐ less of the file contents. It also includes additional shell @@ -201,7 +201,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) mands used to restore file attributes make shardump archives less portable than plain shar archives. - 1mISO9660 format0m + ISO9660 format Libarchive can read and extract from files containing ISO9660-compliant CDROM images. In many cases, this can remove the need to burn a physical CDROM just in order to read the files contained in an ISO9660 image. It @@ -230,7 +230,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) tion used for the temporary file can be changed by the usual environment variables. - 1mZip format0m + Zip format Libarchive can read and write zip format archives that have uncompressed entries and entries compressed with the “deflate” algorithm. Other zip compression algorithms are not supported. It can extract jar archives, @@ -260,7 +260,7 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) modified in-place can have deleted entries or other garbage data that can only be accurately detected by first reading the Central Directory. - 1mArchive (library) file format0m + Archive (library) file format The Unix archive format (commonly created by the ar(1) archiver) is a general-purpose format which is used almost exclusively for object files to be read by the link editor ld(1). The ar format has never been stan‐ @@ -271,13 +271,13 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) the BSD format stores each long filename in an extension area adjacent to the entry. Libarchive can read both extensions, including archives that may include both types of long filenames. Programs using libarchive can - write GNU/SVR4 format if they provide an entry called 4m//24m containing a + write GNU/SVR4 format if they provide an entry called // containing a filename table to be written into the archive before any of the entries. Any entries whose names are not in the filename table will be written using BSD-style long filenames. This can cause problems for programs such as GNU ld that do not support the BSD-style long filenames. - 1mmtree0m + mtree Libarchive can read and write files in mtree(5) format. This format is not a true archive format, but rather a textual description of a file hierarchy in which each line specifies the name of a file and provides @@ -288,44 +288,44 @@ LIBARCHIVE-FORMATS(5) BSD File Formats Manual LIBARCHIVE-FORMATS(5) archive_write_set_options(3) interface to specify which keywords should be included in the output. If libarchive was compiled with access to suitable cryptographic libraries (such as the OpenSSL libraries), it can - compute hash entries such as 1msha512 22mor 1mmd5 22mfrom file data being written + compute hash entries such as sha512 or md5 from file data being written to the mtree writer. When reading an mtree file, libarchive will locate the corresponding - files on disk using the 1mcontents 22mkeyword if present or the regular file‐ + files on disk using the contents keyword if present or the regular file‐ name. If it can locate and open the file on disk, it will use that to fill in any metadata that is missing from the mtree file and will read the file contents and return those to the program using libarchive. If it cannot locate and open the file on disk, libarchive will return an error for any attempt to read the entry body. - 1m7-Zip0m + 7-Zip Libarchive can read and write 7-Zip format archives. TODO: Need more information - 1mCAB0m + CAB Libarchive can read Microsoft Cabinet ( “CAB”) format archives. TODO: Need more information. - 1mLHA0m + LHA TODO: Information about libarchive's LHA support - 1mRAR0m + RAR Libarchive has limited support for reading RAR format archives. Cur‐ rently, libarchive can read RARv3 format archives which have been either created uncompressed, or compressed using any of the compression methods supported by the RARv3 format. Libarchive can also read self-extracting RAR archives. - 1mWarc0m + Warc Libarchive can read and write “web archives”. TODO: Need more informa‐ tion - 1mXAR0m + XAR Libarchive can read and write the XAR format used by many Apple tools. TODO: Need more information -1mSEE ALSO0m +SEE ALSO ar(1), cpio(1), mkisofs(1), shar(1), tar(1), zip(1), zlib(3), cpio(5), mtree(5), tar(5) diff --git a/archivers/libarchive/files/doc/text/libarchive.3.txt b/archivers/libarchive/files/doc/text/libarchive.3.txt index 0c24e19a111..484642460dc 100644 --- a/archivers/libarchive/files/doc/text/libarchive.3.txt +++ b/archivers/libarchive/files/doc/text/libarchive.3.txt @@ -1,11 +1,11 @@ LIBARCHIVE(3) BSD Library Functions Manual LIBARCHIVE(3) -1mNAME0m - 1mlibarchive 22m— functions for reading and writing streaming archives +NAME + libarchive — functions for reading and writing streaming archives -1mOVERVIEW0m - The 1mlibarchive 22mlibrary provides a flexible interface for reading and - writing archives in various formats such as tar and cpio. 1mlibarchive0m +OVERVIEW + The libarchive library provides a flexible interface for reading and + writing archives in various formats such as tar and cpio. libarchive also supports reading and writing archives compressed using various com‐ pression filters such as gzip and bzip2. The library is inherently stream-oriented; readers serially iterate through the archive, writers @@ -15,19 +15,19 @@ LIBARCHIVE(3) BSD Library Functions Manual LIBARCHIVE(3) When reading an archive, the library automatically detects the format and the compression. The library currently has read support for: - 1m· 22mold-style tar archives, - 1m· 22mmost variants of the POSIX “ustar” format, - 1m· 22mthe POSIX “pax interchange” format, - 1m· 22mGNU-format tar archives, - 1m· 22mmost common cpio archive formats, - 1m· 22mISO9660 CD images (including RockRidge and Joliet extensions), - 1m· 22mZip archives, - 1m· 22mar archives (including GNU/SysV and BSD extensions), - 1m· 22mMicrosoft CAB archives, - 1m· 22mLHA archives, - 1m· 22mmtree file tree descriptions, - 1m· 22mRAR archives, - 1m· 22mXAR archives. + · old-style tar archives, + · most variants of the POSIX “ustar” format, + · the POSIX “pax interchange” format, + · GNU-format tar archives, + · most common cpio archive formats, + · ISO9660 CD images (including RockRidge and Joliet extensions), + · Zip archives, + · ar archives (including GNU/SysV and BSD extensions), + · Microsoft CAB archives, + · LHA archives, + · mtree file tree descriptions, + · RAR archives, + · XAR archives. The library automatically detects archives compressed with gzip(1), bzip2(1), xz(1), lzip(1), or compress(1) and decompresses them transpar‐ ently. It can similarly detect and decode archives processed with @@ -35,16 +35,16 @@ LIBARCHIVE(3) BSD Library Functions Manual LIBARCHIVE(3) When writing an archive, you can specify the compression to be used and the format to use. The library can write - 1m· 22mPOSIX-standard “ustar” archives, - 1m· 22mPOSIX “pax interchange format” archives, - 1m· 22mPOSIX octet-oriented cpio archives, - 1m· 22mZip archive, - 1m· 22mtwo different variants of shar archives, - 1m· 22mISO9660 CD images, - 1m· 22m7-Zip archives, - 1m· 22mar archives, - 1m· 22mmtree file tree descriptions, - 1m· 22mXAR archives. + · POSIX-standard “ustar” archives, + · POSIX “pax interchange format” archives, + · POSIX octet-oriented cpio archives, + · Zip archive, + · two different variants of shar archives, + · ISO9660 CD images, + · 7-Zip archives, + · ar archives, + · mtree file tree descriptions, + · XAR archives. Pax interchange format is an extension of the tar archive format that eliminates essentially all of the limitations of historic tar formats in a standard fashion that is supported by POSIX-compliant pax(1) implemen‐ @@ -53,29 +53,29 @@ LIBARCHIVE(3) BSD Library Functions Manual LIBARCHIVE(3) extended attributes for most entries; explicitly requesting pax format will enable those attributes for all entries. - The read and write APIs are accessed through the 1marchive_read_XXX22m() func‐ - tions and the 1marchive_write_XXX22m() functions, respectively, and either can + The read and write APIs are accessed through the archive_read_XXX() func‐ + tions and the archive_write_XXX() functions, respectively, and either can be used independently of the other. The rest of this manual page provides an overview of the library opera‐ tion. More detailed information can be found in the individual manual pages for each API or utility function. -1mREADING AN ARCHIVE0m +READING AN ARCHIVE See archive_read(3). -1mWRITING AN ARCHIVE0m +WRITING AN ARCHIVE See archive_write(3). -1mWRITING ENTRIES TO DISK0m +WRITING ENTRIES TO DISK The archive_write_disk(3) API allows you to write archive_entry(3) objects to disk using the same API used by archive_write(3). The - archive_write_disk(3) API is used internally by 1marchive_read_extract22m(); + archive_write_disk(3) API is used internally by archive_read_extract(); using it directly can provide greater control over how entries get writ‐ ten to disk. This API also makes it possible to share code between ar‐ chive-to-archive copy and archive-to-disk extraction operations. -1mREADING ENTRIES FROM DISK0m +READING ENTRIES FROM DISK The archive_read_disk(3) supports for populating archive_entry(3) objects from information in the filesystem. This includes the information acces‐ sible from the stat(2) system call as well as ACLs, extended attributes, @@ -83,7 +83,7 @@ LIBARCHIVE(3) BSD Library Functions Manual LIBARCHIVE(3) over directory trees, which allows directories of files to be read using an API compatible with the archive_read(3) API. -1mDESCRIPTION0m +DESCRIPTION Detailed descriptions of each function are provided by the corresponding manual pages. @@ -99,43 +99,43 @@ LIBARCHIVE(3) BSD Library Functions Manual LIBARCHIVE(3) Clients should not assume that filenames, link names, user names, or group names are limited in length. In particular, pax interchange format can easily accommodate pathnames in arbitrary character sets that exceed - 4mPATH_MAX24m. + PATH_MAX. -1mRETURN VALUES0m - Most functions return 1mARCHIVE_OK 22m(zero) on success, non-zero on error. +RETURN VALUES + Most functions return ARCHIVE_OK (zero) on success, non-zero on error. The return value indicates the general severity of the error, ranging - from 1mARCHIVE_WARN22m, which indicates a minor problem that should probably - be reported to the user, to 1mARCHIVE_FATAL22m, which indicates a serious + from ARCHIVE_WARN, which indicates a minor problem that should probably + be reported to the user, to ARCHIVE_FATAL, which indicates a serious problem that will prevent any further operations on this archive. On - error, the 1marchive_errno22m() function can be used to retrieve a numeric - error code (see errno(2)). The 1marchive_error_string22m() returns a textual + error, the archive_errno() function can be used to retrieve a numeric + error code (see errno(2)). The archive_error_string() returns a textual error message suitable for display. - 1marchive_read_new22m() and 1marchive_write_new22m() return pointers to an allo‐ + archive_read_new() and archive_write_new() return pointers to an allo‐ cated and initialized struct archive object. - 1marchive_read_data22m() and 1marchive_write_data22m() return a count of the number + archive_read_data() and archive_write_data() return a count of the number of bytes actually read or written. A value of zero indicates the end of the data for this entry. A negative value indicates an error, in which - case the 1marchive_errno22m() and 1marchive_error_string22m() functions can be used + case the archive_errno() and archive_error_string() functions can be used to obtain more information. -1mENVIRONMENT0m +ENVIRONMENT There are character set conversions within the archive_entry(3) functions that are impacted by the currently-selected locale. -1mSEE ALSO0m +SEE ALSO tar(1), archive_entry(3), archive_read(3), archive_util(3), archive_write(3), tar(5) -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. +HISTORY + The libarchive library first appeared in FreeBSD 5.3. -1mAUTHORS0m - The 1mlibarchive 22mlibrary was originally written by Tim Kientzle +AUTHORS + The libarchive library was originally written by Tim Kientzle . -1mBUGS0m +BUGS Some archive formats support information that is not supported by struct archive_entry. Such information cannot be fully archived or restored using this library. This includes, for example, comments, character diff --git a/archivers/libarchive/files/doc/text/libarchive_changes.3.txt b/archivers/libarchive/files/doc/text/libarchive_changes.3.txt index e7133aa6685..5203c9919fb 100644 --- a/archivers/libarchive/files/doc/text/libarchive_changes.3.txt +++ b/archivers/libarchive/files/doc/text/libarchive_changes.3.txt @@ -1,21 +1,21 @@ LIBARCHIVE_CHANGES(3) BSD Library Functions Manual LIBARCHIVE_CHANGES(3) -1mNAME0m - — changes in libarchive interface +NAME + libarchive_changes — changes in libarchive interface -1mCHANGES IN LIBARCHIVE 30m +CHANGES IN LIBARCHIVE 3 This page describes user-visible changes in libarchive3, and lists public functions and other symbols changed, deprecated or removed in libarchive3, along with their replacements if any. - 1mMultiple Filters0m + Multiple Filters Libarchive2 permitted a single (input or output) filter active on an ar‐ chive. Libarchive3 extends this into a variable-length stack. Where - 1marchive_write_set_compression_XXX22m() would replace any existing filter, - 1marchive_write_add_filter_XXX22m() extends the write pipeline with another + archive_write_set_compression_XXX() would replace any existing filter, + archive_write_add_filter_XXX() extends the write pipeline with another filter. - 1mCharacter Set Handling0m + Character Set Handling Libarchive2 assumed that the local platform uses Unicode as the native wchar_t encoding, which is true on Windows, modern Linux, and a few other systems, but is certainly not universal. As a result, pax format ar‐ @@ -35,7 +35,7 @@ LIBARCHIVE_CHANGES(3) BSD Library Functions Manual LIBARCHIVE_CHANGES(3) default character set for that archive. The platform default character encoding (as returned by - 1mnl_langinfo22m(4mCHARSET24m)) will be used if nothing else is specified. + nl_langinfo(CHARSET)) will be used if nothing else is specified. Libarchive3 also introduces charset options to many of the archive read‐ ers and writers to control the character set that will be used for file‐ @@ -46,7 +46,7 @@ LIBARCHIVE_CHANGES(3) BSD Library Functions Manual LIBARCHIVE_CHANGES(3) have the filenames and other information transparently converted to the character encoding suitable for your application. - 1mPrototype Changes0m + Prototype Changes These changes break binary compatibility; libarchive3 has a new shared library version to reflect these changes. The library now uses portable wide types such as int64_t instead of less-portable types such as off_t, @@ -54,12 +54,12 @@ LIBARCHIVE_CHANGES(3) BSD Library Functions Manual LIBARCHIVE_CHANGES(3) There are a few cases where these changes will affect your source code: - 1m· 22mIn some cases, libarchive's wider types will introduce the possibil‐ + · In some cases, libarchive's wider types will introduce the possibil‐ ity of truncation: for example, on a system with a 16-bit uid_t, you risk having uid 65536 be truncated to uid 0, which can cause serious security problems. - 1m· 22mTypedef function pointer types will be incompatible. For example, + · Typedef function pointer types will be incompatible. For example, if you define custom skip callbacks, you may have to use code simi‐ lar to the following if you want to support building against libarchive2 and libarchive3: @@ -78,130 +78,130 @@ LIBARCHIVE_CHANGES(3) BSD Library Functions Manual LIBARCHIVE_CHANGES(3) Affected functions: - 1m· archive_entry_gid22m(), 1marchive_entry_set_gid22m() - 1m· archive_entry_uid22m(), 1marchive_entry_set_uid22m() - 1m· archive_entry_ino22m(), 1marchive_entry_set_ino22m() - 1m· archive_read_data_block22m(), 1marchive_write_data_block22m() - 1m· archive_read_disk_gname22m(), 1marchive_read_disk_uname22m() - 1m· archive_read_disk_set_gname_lookup22m(), - 1marchive_read_disk_set_group_lookup22m(), - 1marchive_read_disk_set_uname_lookup22m(), - 1marchive_read_disk_set_user_lookup22m() - 1m· archive_skip_callback22m() - 1m· archive_read_extract_set_skip_file22m(), - 1marchive_write_disk_set_skip_file22m(), 1marchive_write_set_skip_file22m() - 1m· archive_write_disk_set_group_lookup22m(), - 1marchive_write_disk_set_user_lookup22m() + · archive_entry_gid(), archive_entry_set_gid() + · archive_entry_uid(), archive_entry_set_uid() + · archive_entry_ino(), archive_entry_set_ino() + · archive_read_data_block(), archive_write_data_block() + · archive_read_disk_gname(), archive_read_disk_uname() + · archive_read_disk_set_gname_lookup(), + archive_read_disk_set_group_lookup(), + archive_read_disk_set_uname_lookup(), + archive_read_disk_set_user_lookup() + · archive_skip_callback() + · archive_read_extract_set_skip_file(), + archive_write_disk_set_skip_file(), archive_write_set_skip_file() + · archive_write_disk_set_group_lookup(), + archive_write_disk_set_user_lookup() Where these functions or their arguments took or returned gid_t, ino_t, off_t, or uid_t they now take or return int64_t or equivalent. - 1mDeprecated Symbols0m + Deprecated Symbols Symbols deprecated in libarchive3 will be removed in libarchive4. These symbols, along with their replacements if any, are listed below: - 1marchive_position_compressed22m(), 1marchive_position_uncompressed22m() - 1marchive_filter_bytes22m() + archive_position_compressed(), archive_position_uncompressed() + archive_filter_bytes() - 1marchive_compression22m() - 1marchive_filter_code22m() + archive_compression() + archive_filter_code() - 1marchive_compression_name22m() - 1marchive_filter_name22m() + archive_compression_name() + archive_filter_name() - 1marchive_read_finish22m(), 1marchive_write_finish22m() - 1marchive_read_free22m(), 1marchive_write_free22m() + archive_read_finish(), archive_write_finish() + archive_read_free(), archive_write_free() - 1marchive_read_open_file22m(), 1marchive_write_open_file22m() - 1marchive_read_open_filename22m(), 1marchive_write_open_filename22m() + archive_read_open_file(), archive_write_open_file() + archive_read_open_filename(), archive_write_open_filename() - 1marchive_read_support_compression_all22m() - 1marchive_read_support_filter_all22m() + archive_read_support_compression_all() + archive_read_support_filter_all() - 1marchive_read_support_compression_bzip222m() - 1marchive_read_support_filter_bzip222m() + archive_read_support_compression_bzip2() + archive_read_support_filter_bzip2() - 1marchive_read_support_compression_compress22m() - 1marchive_read_support_filter_compress22m() + archive_read_support_compression_compress() + archive_read_support_filter_compress() - 1marchive_read_support_compression_gzip22m() - 1marchive_read_support_filter_gzip22m() + archive_read_support_compression_gzip() + archive_read_support_filter_gzip() - 1marchive_read_support_compression_lzip22m() - 1marchive_read_support_filter_lzip22m() + archive_read_support_compression_lzip() + archive_read_support_filter_lzip() - 1marchive_read_support_compression_lzma22m() - 1marchive_read_support_filter_lzma22m() + archive_read_support_compression_lzma() + archive_read_support_filter_lzma() - 1marchive_read_support_compression_none22m() - 1marchive_read_support_filter_none22m() + archive_read_support_compression_none() + archive_read_support_filter_none() - 1marchive_read_support_compression_program22m() - 1marchive_read_support_filter_program22m() + archive_read_support_compression_program() + archive_read_support_filter_program() - 1marchive_read_support_compression_program_signature22m() - 1marchive_read_support_filter_program_signature22m() + archive_read_support_compression_program_signature() + archive_read_support_filter_program_signature() - 1marchive_read_support_compression_rpm22m() - 1marchive_read_support_filter_rpm22m() + archive_read_support_compression_rpm() + archive_read_support_filter_rpm() - 1marchive_read_support_compression_uu22m() - 1marchive_read_support_filter_uu22m() + archive_read_support_compression_uu() + archive_read_support_filter_uu() - 1marchive_read_support_compression_xz22m() - 1marchive_read_support_filter_xz22m() + archive_read_support_compression_xz() + archive_read_support_filter_xz() - 1marchive_write_set_compression_bzip222m() - 1marchive_write_add_filter_bzip222m() + archive_write_set_compression_bzip2() + archive_write_add_filter_bzip2() - 1marchive_write_set_compression_compress22m() - 1marchive_write_add_filter_compress22m() + archive_write_set_compression_compress() + archive_write_add_filter_compress() - 1marchive_write_set_compression_gzip22m() - 1marchive_write_add_filter_gzip22m() + archive_write_set_compression_gzip() + archive_write_add_filter_gzip() - 1marchive_write_set_compression_lzip22m() - 1marchive_write_add_filter_lzip22m() + archive_write_set_compression_lzip() + archive_write_add_filter_lzip() - 1marchive_write_set_compression_lzma22m() - 1marchive_write_add_filter_lzma22m() + archive_write_set_compression_lzma() + archive_write_add_filter_lzma() - 1marchive_write_set_compression_none22m() - 1marchive_write_add_filter_none22m() + archive_write_set_compression_none() + archive_write_add_filter_none() - 1marchive_write_set_compression_program22m() - 1marchive_write_add_filter_program22m() + archive_write_set_compression_program() + archive_write_add_filter_program() - 1marchive_write_set_compression_filter22m() - 1marchive_write_add_filter_filter22m() + archive_write_set_compression_filter() + archive_write_add_filter_filter() - 1mRemoved Symbols0m + Removed Symbols These symbols, listed below along with their replacements if any, were deprecated in libarchive2, and are not part of libarchive3. - 1marchive_api_feature22m() - 1marchive_version_number22m() + archive_api_feature() + archive_version_number() - 1marchive_api_version22m() - 1marchive_version_number22m() + archive_api_version() + archive_version_number() - 1marchive_version22m() - 1marchive_version_string22m() + archive_version() + archive_version_string() - 1marchive_version_stamp22m() - 1marchive_version_number22m() + archive_version_stamp() + archive_version_number() - 1marchive_read_set_filter_options22m() - 1marchive_read_set_options22m() or 1marchive_read_set_filter_option22m() + archive_read_set_filter_options() + archive_read_set_options() or archive_read_set_filter_option() - 1marchive_read_set_format_options22m() - 1marchive_read_set_options22m() or 1marchive_read_set_format_option22m() + archive_read_set_format_options() + archive_read_set_options() or archive_read_set_format_option() - 1marchive_write_set_filter_options22m() - 1marchive_write_set_options22m() or 1marchive_write_set_filter_option22m() + archive_write_set_filter_options() + archive_write_set_options() or archive_write_set_filter_option() - 1marchive_write_set_format_options22m() - 1marchive_write_set_options22m() or 1marchive_write_set_format_option22m() + archive_write_set_format_options() + archive_write_set_options() or archive_write_set_format_option() ARCHIVE_API_FEATURE ARCHIVE_VERSION_NUMBER @@ -251,7 +251,7 @@ LIBARCHIVE_CHANGES(3) BSD Library Functions Manual LIBARCHIVE_CHANGES(3) ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240 -1mSEE ALSO0m +SEE ALSO libarchive(3), archive_read(3), archive_read_filter(3), archive_read_format(3), archive_read_set_options(3), archive_write(3), archive_write_filter(3), archive_write_format(3), diff --git a/archivers/libarchive/files/doc/text/libarchive_internals.3.txt b/archivers/libarchive/files/doc/text/libarchive_internals.3.txt index 46529387ae0..7b7fb35dd92 100644 --- a/archivers/libarchive/files/doc/text/libarchive_internals.3.txt +++ b/archivers/libarchive/files/doc/text/libarchive_internals.3.txt @@ -1,15 +1,15 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) -1mNAME0m - 1mlibarchive_internals 22m— description of libarchive internal interfaces +NAME + libarchive_internals — description of libarchive internal interfaces -1mOVERVIEW0m - The 1mlibarchive 22mlibrary provides a flexible interface for reading and +OVERVIEW + The libarchive library provides a flexible interface for reading and writing streaming archive files such as tar and cpio. Internally, it follows a modular layered design that should make it easy to add new ar‐ chive and compression formats. -1mGENERAL ARCHITECTURE0m +GENERAL ARCHITECTURE Externally, libarchive exposes most operations through an opaque, object- style interface. The archive_entry(3) objects store information about a single filesystem object. The rest of the library provides facilities to @@ -27,17 +27,17 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) clients to open an archive or disk writer, and then use a single set of code to select and write entries, regardless of the target. -1mREAD ARCHITECTURE0m +READ ARCHITECTURE From the outside, clients use the archive_read(3) API to manipulate an - 1marchive 22mobject to read entries and bodies from an archive stream. Inter‐ - nally, the 1marchive 22mobject is cast to an 1marchive_read 22mobject, which holds + archive object to read entries and bodies from an archive stream. Inter‐ + nally, the archive object is cast to an archive_read object, which holds all read-specific data. The API has four layers: The lowest layer is the I/O layer. This layer can be overridden by clients, but most clients use the packaged I/O callbacks provided, for example, by archive_read_open_memory(3), and archive_read_open_fd(3). The compres‐ sion layer calls the I/O layer to read bytes and decompresses them for the format layer. The format layer unpacks a stream of uncompressed - bytes and creates 1marchive_entry 22mobjects from the incoming data. The API + bytes and creates archive_entry objects from the incoming data. The API layer tracks overall state (for example, it prevents clients from reading data before reading a header) and invokes the format and compression layer operations through registered function pointers. In particular, @@ -49,7 +49,7 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) ders were invoked for each entry, but this design hindered error recov‐ ery.) - 1mI/O Layer and Client Callbacks0m + I/O Layer and Client Callbacks The read API goes to some lengths to be nice to clients. As a result, there are few restrictions on the behavior of the client callbacks. @@ -71,7 +71,7 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) single block; other clients may begin asynchronous I/O operations for the next block on each request. - 1mDecompresssion Layer0m + Decompresssion Layer The decompression layer not only handles decompression, it also buffers data so that the format handlers see a much nicer I/O model. The decom‐ pression API is a two stage peek/consume model. A read_ahead request @@ -81,10 +81,10 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) asking for a minimum of one byte and then copying as much data as is available. - A subsequent call to the 1mconsume22m() function advances the read pointer. - Note that data returned from a 1mread_ahead22m() call is guaranteed to remain - in place until the next call to 1mread_ahead22m(). Intervening calls to - 1mconsume22m() should not cause the data to move. + A subsequent call to the consume() function advances the read pointer. + Note that data returned from a read_ahead() call is guaranteed to remain + in place until the next call to read_ahead(). Intervening calls to + consume() should not cause the data to move. Skip requests must always be handled exactly. Decompression handlers that cannot seek forward should not register a skip handler; the API @@ -94,14 +94,14 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) Registration/Configuration When the client invokes the public support function, the decom‐ pression handler invokes the internal - 1m__archive_read_register_compression22m() function to provide bid and - initialization functions. This function returns 1mNULL 22mon error or - else a pointer to a 1mstruct decompressor_t22m. This structure con‐ - tains a 4mvoid24m 4m*24m 4mconfig24m slot that can be used for storing any cus‐ + __archive_read_register_compression() function to provide bid and + initialization functions. This function returns NULL on error or + else a pointer to a struct decompressor_t. This structure con‐ + tains a void * config slot that can be used for storing any cus‐ tomization information. Bid The bid function is invoked with a pointer and size of a block of data. The decompressor can access its config data through the - 4mdecompressor24m element of the 1marchive_read 22mobject. The bid func‐ + decompressor element of the archive_read object. The bid func‐ tion is otherwise stateless. In particular, it must not perform any I/O operations. @@ -116,28 +116,28 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) require two bytes for correct bidding.) Initialize The winning bidder will have its init function called. This - function should initialize the remaining slots of the 4mstruct0m - 4mdecompressor_t24m object pointed to by the 4mdecompressor24m element of - the 4marchive_read24m object. In particular, it should allocate any - working data it needs in the 4mdata24m slot of that structure. The + function should initialize the remaining slots of the struct + decompressor_t object pointed to by the decompressor element of + the archive_read object. In particular, it should allocate any + working data it needs in the data slot of that structure. The init function is called with the block of data that was used for tasting. At this point, the decompressor is responsible for all I/O requests to the client callbacks. The decompressor is free to read more data as and when necessary. Satisfy I/O requests - The format handler will invoke the 4mread_ahead24m, 4mconsume24m, and 4mskip0m + The format handler will invoke the read_ahead, consume, and skip functions as needed. Finish The finish method is called only once when the archive is closed. - It should release anything stored in the 4mdata24m and 4mconfig24m slots of - the 4mdecompressor24m object. It should not invoke the client close + It should release anything stored in the data and config slots of + the decompressor object. It should not invoke the client close callback. - 1mFormat Layer0m + Format Layer The read formats have a similar lifecycle to the decompression handlers: Registration Allocate your private data and initialize your pointers. - Bid Formats bid by invoking the 1mread_ahead22m() decompression method but - not calling the 1mconsume22m() method. This allows each bidder to + Bid Formats bid by invoking the read_ahead() decompression method but + not calling the consume() method. This allows each bidder to look ahead in the input stream. Bidders should not look further ahead than necessary, as long look aheads put pressure on the decompression layer to buffer lots of data. Most formats only @@ -168,47 +168,47 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) The skip data call should skip over all file data and trailing padding. This is called automatically by the API layer just before each header read. It is also called in response to the - client calling the public 1mdata_skip22m() function. + client calling the public data_skip() function. Cleanup On cleanup, the format should release all of its allocated mem‐ ory. - 1mAPI Layer0m + API Layer XXX to do XXX -1mWRITE ARCHITECTURE0m +WRITE ARCHITECTURE The write API has a similar set of four layers: an API layer, a format layer, a compression layer, and an I/O layer. The registration here is much simpler because only one format and one compression can be regis‐ tered at a time. - 1mI/O Layer and Client Callbacks0m + I/O Layer and Client Callbacks XXX To be written XXX - 1mCompression Layer0m + Compression Layer XXX To be written XXX - 1mFormat Layer0m + Format Layer XXX To be written XXX - 1mAPI Layer0m + API Layer XXX To be written XXX -1mWRITE_DISK ARCHITECTURE0m +WRITE_DISK ARCHITECTURE The write_disk API is intended to look just like the write API to clients. Since it does not handle multiple formats or compression, it is not layered internally. -1mGENERAL SERVICES0m - The 1marchive_read22m, 1marchive_write22m, and 1marchive_write_disk 22mobjects all con‐ - tain an initial 1marchive 22mobject which provides common support for a set of +GENERAL SERVICES + The archive_read, archive_write, and archive_write_disk objects all con‐ + tain an initial archive object which provides common support for a set of standard services. (Recall that ANSI/ISO C90 guarantees that you can cast freely between a pointer to a structure and a pointer to the first - element of that structure.) The 1marchive 22mobject has a magic value that + element of that structure.) The archive object has a magic value that indicates which API this object is associated with, slots for storing error information, and function pointers for virtualized API functions. -1mMISCELLANEOUS NOTES0m +MISCELLANEOUS NOTES Connecting existing archiving libraries into libarchive is generally quite difficult. In particular, many existing libraries strongly assume that you are reading from a file; they seek forwards and backwards as @@ -234,14 +234,14 @@ LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual LIBARCHIVE_INTERNALS(3) though it cannot always extract as much information as a dedicated ZIP program. -1mSEE ALSO0m +SEE ALSO archive_entry(3), archive_read(3), archive_write(3), archive_write_disk(3) libarchive(3), -1mHISTORY0m - The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. +HISTORY + The libarchive library first appeared in FreeBSD 5.3. -1mAUTHORS0m - The 1mlibarchive 22mlibrary was written by Tim Kientzle . +AUTHORS + The libarchive library was written by Tim Kientzle . BSD January 26, 2011 BSD diff --git a/archivers/libarchive/files/doc/text/mtree.5.txt b/archivers/libarchive/files/doc/text/mtree.5.txt index bc20cbcdc33..92d9ff581b1 100644 --- a/archivers/libarchive/files/doc/text/mtree.5.txt +++ b/archivers/libarchive/files/doc/text/mtree.5.txt @@ -1,19 +1,19 @@ MTREE(5) BSD File Formats Manual MTREE(5) -1mNAME0m - 1mmtree 22m— format of mtree dir hierarchy files +NAME + mtree — format of mtree dir hierarchy files -1mDESCRIPTION0m - The 1mmtree 22mformat is a textual format that describes a collection of +DESCRIPTION + The mtree format is a textual format that describes a collection of filesystem objects. Such files are typically used to create or verify directory hierarchies. - 1mGeneral Format0m - An 1mmtree 22mfile consists of a series of lines, each providing information + General Format + An mtree file consists of a series of lines, each providing information about a single filesystem object. Leading whitespace is always ignored. When encoding file or pathnames, any backslash character or character - outside of the 95 printable ASCII characters must be encoded as a a back‐ + outside of the 95 printable ASCII characters must be encoded as a back‐ slash followed by three octal digits. When reading mtree files, any appearance of a backslash followed by three octal digits should be con‐ verted into the corresponding character. @@ -22,44 +22,44 @@ MTREE(5) BSD File Formats Manual MTREE(5) Blank Blank lines are ignored. - Comment Lines beginning with 1m# 22mare ignored. + Comment Lines beginning with # are ignored. - Special Lines beginning with 1m/ 22mare special commands that influence + Special Lines beginning with / are special commands that influence the interpretation of later lines. - Relative If the first whitespace-delimited word has no 1m/ 22mcharacters, + Relative If the first whitespace-delimited word has no / characters, it is the name of a file in the current directory. Any rela‐ tive entry that describes a directory changes the current directory. - dot-dot As a special case, a relative entry with the filename 4m..0m + dot-dot As a special case, a relative entry with the filename .. changes the current directory to the parent directory. Options on dot-dot entries are always ignored. - Full If the first whitespace-delimited word has a 1m/ 22mcharacter + Full If the first whitespace-delimited word has a / character after the first character, it is the pathname of a file rela‐ tive to the starting directory. There can be multiple full entries describing the same file. - Some tools that process 1mmtree 22mfiles may require that multiple lines + Some tools that process mtree files may require that multiple lines describing the same file occur consecutively. It is not permitted for the same file to be mentioned using both a relative and a full file spec‐ ification. - 1mSpecial commands0m + Special commands Two special commands are currently defined: - 1m/set 22mThis command defines default values for one or more keywords. + /set This command defines default values for one or more keywords. It is followed on the same line by one or more whitespace- separated keyword definitions. These definitions apply to all following files that do not specify a value for that key‐ word. - 1m/unset 22mThis command removes any default value set by a previous 1m/set0m + /unset This command removes any default value set by a previous /set command. It is followed on the same line by one or more key‐ words separated by whitespace. - 1mKeywords0m + Keywords After the filename, a full or relative entry consists of zero or more whitespace-separated keyword definitions. Each such definition consists of a key from the following list immediately followed by an '=' sign and @@ -68,113 +68,113 @@ MTREE(5) BSD File Formats Manual MTREE(5) Currently supported keywords are as follows: - 1mcksum 22mThe checksum of the file using the default algorithm speci‐ + cksum The checksum of the file using the default algorithm speci‐ fied by the cksum(1) utility. - 1mdevice 22mThe device number for 1mblock 22mor 1mchar 22mfile types. The value + device The device number for block or char file types. The value must be one of the following forms: - 4mformat24m,4mmajor24m,4mminor24m[,4msubunit24m] - A device with 4mmajor24m, 4mminor24m and optional 4msubunit24m fields. + format,major,minor[,subunit] + A device with major, minor and optional subunit fields. Their meaning is specified by the operating's system - 4mformat24m. See below for valid formats. + format. See below for valid formats. - 4mnumber0m + number Opaque number (as stored on the file system). - The following values for 4mformat24m are recognized: 1mnative22m, - 1m386bsd22m, 1m4bsd22m, 1mbsdos22m, 1mfreebsd22m, 1mhpux22m, 1misc22m, 1mlinux22m, 1mnetbsd22m, 1mosf122m, - 1msco22m, 1msolaris22m, 1msunos22m, 1msvr322m, 1msvr422m, and 1multrix22m. + The following values for format are recognized: native, + 386bsd, 4bsd, bsdos, freebsd, hpux, isc, linux, netbsd, osf1, + sco, solaris, sunos, svr3, svr4, and ultrix. See mknod(8) for more details. - 1mcontents 22mThe full pathname of a file that holds the contents of this + contents The full pathname of a file that holds the contents of this file. - 1mflags 22mThe file flags as a symbolic name. See chflags(1) for infor‐ + flags The file flags as a symbolic name. See chflags(1) for infor‐ mation on these names. If no flags are to be set the string “none” may be used to override the current default. - 1mgid 22mThe file group as a numeric value. + gid The file group as a numeric value. - 1mgname 22mThe file group as a symbolic name. + gname The file group as a symbolic name. - 1mignore 22mIgnore any file hierarchy below this file. + ignore Ignore any file hierarchy below this file. - 1minode 22mThe inode number. + inode The inode number. - 1mlink 22mThe target of the symbolic link when type=link. + link The target of the symbolic link when type=link. - 1mmd5 22mThe MD5 message digest of the file. + md5 The MD5 message digest of the file. - 1mmd5digest 22mA synonym for 1mmd522m. + md5digest A synonym for md5. - 1mmode 22mThe current file's permissions as a numeric (octal) or sym‐ + mode The current file's permissions as a numeric (octal) or sym‐ bolic value. - 1mnlink 22mThe number of hard links the file is expected to have. + nlink The number of hard links the file is expected to have. - 1mnochange 22mMake sure this file or directory exists but otherwise ignore + nochange Make sure this file or directory exists but otherwise ignore all attributes. - 1moptional 22mThe file is optional; do not complain about the file if it is + optional The file is optional; do not complain about the file if it is not in the file hierarchy. - 1mresdevice 22mThe “resident” device number of the file, e.g. the ID of the + resdevice The “resident” device number of the file, e.g. the ID of the device that contains the file. Its format is the same as the - one for 1mdevice22m. + one for device. - 1mripemd160digest0m + ripemd160digest The RIPEMD160 message digest of the file. - 1mrmd160 22mA synonym for 1mripemd160digest22m. + rmd160 A synonym for ripemd160digest. - 1mrmd160digest0m - A synonym for 1mripemd160digest22m. + rmd160digest + A synonym for ripemd160digest. - 1msha1 22mThe FIPS 160-1 (“SHA-1”) message digest of the file. + sha1 The FIPS 160-1 (“SHA-1”) message digest of the file. - 1msha1digest 22mA synonym for 1msha122m. + sha1digest A synonym for sha1. - 1msha256 22mThe FIPS 180-2 (“SHA-256”) message digest of the file. + sha256 The FIPS 180-2 (“SHA-256”) message digest of the file. - 1msha256digest0m - A synonym for 1msha25622m. + sha256digest + A synonym for sha256. - 1msha384 22mThe FIPS 180-2 (“SHA-384”) message digest of the file. + sha384 The FIPS 180-2 (“SHA-384”) message digest of the file. - 1msha384digest0m - A synonym for 1msha38422m. + sha384digest + A synonym for sha384. - 1msha512 22mThe FIPS 180-2 (“SHA-512”) message digest of the file. + sha512 The FIPS 180-2 (“SHA-512”) message digest of the file. - 1msha512digest0m - A synonym for 1msha51222m. + sha512digest + A synonym for sha512. - 1msize 22mThe size, in bytes, of the file. + size The size, in bytes, of the file. - 1mtime 22mThe last modification time of the file. + time The last modification time of the file. - 1mtype 22mThe type of the file; may be set to any one of the following: + type The type of the file; may be set to any one of the following: - 1mblock 22mblock special device - 1mchar 22mcharacter special device - 1mdir 22mdirectory - 1mfifo 22mfifo - 1mfile 22mregular file - 1mlink 22msymbolic link - 1msocket 22msocket + block block special device + char character special device + dir directory + fifo fifo + file regular file + link symbolic link + socket socket - 1muid 22mThe file owner as a numeric value. + uid The file owner as a numeric value. - 1muname 22mThe file owner as a symbolic name. + uname The file owner as a symbolic name. -1mSEE ALSO0m +SEE ALSO cksum(1), find(1), mtree(8) -1mBUGS0m -1mHISTORY0m - The 1mmtree 22mutility appeared in 4.3BSD-Reno. The MD5 digest capability was +BUGS +HISTORY + The mtree utility appeared in 4.3BSD-Reno. The MD5 digest capability was added in FreeBSD 2.1, in response to the widespread use of programs which can spoof cksum(1). The SHA-1 and RIPEMD160 digests were added in FreeBSD 4.0, as new attacks have demonstrated weaknesses in MD5. The diff --git a/archivers/libarchive/files/doc/text/tar.5.txt b/archivers/libarchive/files/doc/text/tar.5.txt index b7d389f59f0..e7c460979b3 100644 --- a/archivers/libarchive/files/doc/text/tar.5.txt +++ b/archivers/libarchive/files/doc/text/tar.5.txt @@ -1,17 +1,17 @@ TAR(5) BSD File Formats Manual TAR(5) -1mNAME0m - 1mtar 22m— format of tape archive files +NAME + tar — format of tape archive files -1mDESCRIPTION0m - The 1mtar 22marchive format collects any number of files, directories, and +DESCRIPTION + The tar archive format collects any number of files, directories, and other file system objects (symbolic links, device nodes, etc.) into a single stream of bytes. The format was originally designed to be used with tape drives that operate with fixed-size blocks, but is widely used as a general packaging mechanism. - 1mGeneral Format0m - A 1mtar 22marchive consists of a series of 512-byte records. Each file system + General Format + A tar archive consists of a series of 512-byte records. Each file system object requires a header record which stores basic metadata (pathname, owner, permissions, etc.) and zero or more records containing any file data. The end of the archive is indicated by two records consisting @@ -25,16 +25,16 @@ TAR(5) BSD File Formats Manual TAR(5) implementations although block sizes of 1MiB (2048 records) or larger are commonly used with modern high-speed tape drives. (Note: the terms “block” and “record” here are not entirely standard; this document fol‐ - lows the convention established by John Gilmore in documenting 1mpdtar22m.) + lows the convention established by John Gilmore in documenting pdtar.) - 1mOld-Style Archive Format0m + Old-Style Archive Format The original tar archive format has been extended many times to include additional information that various implementors found necessary. This section describes the variant implemented by the tar command included in Version 7 AT&T UNIX, which seems to be the earliest widely-used version of the tar program. - The header record for an old-style 1mtar 22marchive consists of the following: + The header record for an old-style tar archive consists of the following: struct header_old_tar { char name[100]; @@ -50,29 +50,29 @@ TAR(5) BSD File Formats Manual TAR(5) }; All unused bytes in the header record are filled with nulls. - 4mname24m Pathname, stored as a null-terminated string. Early tar imple‐ + name Pathname, stored as a null-terminated string. Early tar imple‐ mentations only stored regular files (including hardlinks to those files). One common early convention used a trailing "/" character to indicate a directory name, allowing directory per‐ missions and owner information to be archived and restored. - 4mmode24m File mode, stored as an octal number in ASCII. + mode File mode, stored as an octal number in ASCII. - 4muid24m, 4mgid0m + uid, gid User id and group id of owner, as octal numbers in ASCII. - 4msize24m Size of file, as octal number in ASCII. For regular files only, + size Size of file, as octal number in ASCII. For regular files only, this indicates the amount of data that follows the header. In particular, this field was ignored by early tar implementations when extracting hardlinks. Modern writers should always store a zero length for hardlink entries. - 4mmtime24m Modification time of file, as an octal number in ASCII. This + mtime Modification time of file, as an octal number in ASCII. This indicates the number of seconds since the start of the epoch, 00:00:00 UTC January 1, 1970. Note that negative values should be avoided here, as they are handled inconsistently. - 4mchecksum0m + checksum Header checksum, stored as an octal number in ASCII. To compute the checksum, set the checksum field to all spaces, then sum all bytes in the header using unsigned arithmetic. This field should @@ -83,13 +83,13 @@ TAR(5) BSD File Formats Manual TAR(5) Modern robust readers compute the checksum both ways and accept the header if either computation matches. - 4mlinkflag24m, 4mlinkname0m + linkflag, linkname In order to preserve hardlinks and conserve tape, a file with multiple links is only written to the archive the first time it - is encountered. The next time it is encountered, the 4mlinkflag24m is - set to an ASCII ‘1’ and the 4mlinkname24m field holds the first name + is encountered. The next time it is encountered, the linkflag is + set to an ASCII ‘1’ and the linkname field holds the first name under which this file appears. (Note that regular files have a - null value in the 4mlinkflag24m field.) + null value in the linkflag field.) Early tar implementations varied in how they terminated these fields. The tar command in Version 7 AT&T UNIX used the following conventions @@ -102,20 +102,20 @@ TAR(5) BSD File Formats Manual TAR(5) For best portability, modern implementations should fill the numeric fields with leading zeros. - 1mPre-POSIX Archives0m + Pre-POSIX Archives An early draft of IEEE Std 1003.1-1988 (“POSIX.1”) served as the basis - for John Gilmore's 1mpdtar 22mprogram and many system implementations from the + for John Gilmore's pdtar program and many system implementations from the late 1980s and early 1990s. These archives generally follow the POSIX ustar format described below with the following variations: - 1m· 22mThe magic value consists of the five characters “ustar” followed + · The magic value consists of the five characters “ustar” followed by a space. The version field contains a space character fol‐ lowed by a null. - 1m· 22mThe numeric fields are generally filled with leading spaces (not + · The numeric fields are generally filled with leading spaces (not leading zeros as recommended in the final standard). - 1m· 22mThe prefix field is often not used, limiting pathnames to the 100 + · The prefix field is often not used, limiting pathnames to the 100 characters of old-style archives. - 1mPOSIX ustar Archives0m + POSIX ustar Archives IEEE Std 1003.1-1988 (“POSIX.1”) defined a standard tar file format to be read and written by compliant implementations of tar(1). This format is often called the “ustar” format, after the magic value used in the @@ -142,8 +142,8 @@ TAR(5) BSD File Formats Manual TAR(5) char pad[12]; }; - 4mtypeflag0m - Type of entry. POSIX extended the earlier 4mlinkflag24m field with + typeflag + Type of entry. POSIX extended the earlier linkflag field with several new type values: “0” Regular file. NUL should be treated as a synonym, for compatibility purposes. @@ -161,7 +161,7 @@ TAR(5) BSD File Formats Manual TAR(5) support the corresponding extension. Uppercase letters "A" through "Z" are reserved for custom extensions. Note that sockets and whiteout entries are not archivable. - It is worth noting that the 4msize24m field, in particular, has dif‐ + It is worth noting that the size field, in particular, has dif‐ ferent meanings depending on the type. For regular files, of course, it indicates the amount of data following the header. For directories, it may be used to indicate the total size of all @@ -169,40 +169,40 @@ TAR(5) BSD File Formats Manual TAR(5) allocate directory space. For all other types, it should be set to zero by writers and ignored by readers. - 4mmagic24m Contains the magic value “ustar” followed by a NUL byte to indi‐ + magic Contains the magic value “ustar” followed by a NUL byte to indi‐ cate that this is a POSIX standard archive. Full compliance requires the uname and gname fields be properly set. - 4mversion0m + version Version. This should be “00” (two copies of the ASCII digit zero) for POSIX standard archives. - 4muname24m, 4mgname0m + uname, gname User and group names, as null-terminated ASCII strings. These should be used in preference to the uid/gid values when they are set and the corresponding names exist on the system. - 4mdevmajor24m, 4mdevminor0m + devmajor, devminor Major and minor numbers for character device or block device entry. - 4mname24m, 4mprefix0m + name, prefix If the pathname is too long to fit in the 100 bytes provided by - the standard format, it can be split at any 4m/24m character with the + the standard format, it can be split at any / character with the first portion going into the prefix field. If the prefix field - is not empty, the reader will prepend the prefix value and a 4m/0m + is not empty, the reader will prepend the prefix value and a / character to the regular name field to obtain the full pathname. - The standard does not require a trailing 4m/24m character on directory + The standard does not require a trailing / character on directory names, though most implementations still include this for compat‐ ibility reasons. Note that all unused bytes must be set to NUL. Field termination is specified slightly differently by POSIX than by pre‐ - vious implementations. The 4mmagic24m, 4muname24m, and 4mgname24m fields must have a - trailing NUL. The 4mpathname24m, 4mlinkname24m, and 4mprefix24m fields must have a + vious implementations. The magic, uname, and gname fields must have a + trailing NUL. The pathname, linkname, and prefix fields must have a trailing NUL unless they fill the entire field. (In particular, it is - possible to store a 256-character pathname if it happens to have a 4m/24m as + possible to store a 256-character pathname if it happens to have a / as the 156th character.) POSIX requires numeric fields to be zero-padded in the front, and requires them to be terminated with either space or NUL characters. @@ -211,7 +211,7 @@ TAR(5) BSD File Formats Manual TAR(5) sionally extending it by adding new fields to the blank area at the end of the header record. - 1mNumeric Extensions0m + Numeric Extensions There have been several attempts to extend the range of sizes or times supported by modifying how numbers are stored in the header. @@ -221,7 +221,7 @@ TAR(5) BSD File Formats Manual TAR(5) the twelfth byte for a trailing NUL character. Allowing 12 octal digits allows file sizes up to 64 GB. - Another extension, utilized by GNU tar, star, and other newer 1mtar 22mimple‐ + Another extension, utilized by GNU tar, star, and other newer tar imple‐ mentations, permits binary numbers in the standard numeric fields. This is flagged by setting the high bit of the first byte. The remainder of the field is treated as a signed twos-complement value. This permits @@ -237,7 +237,7 @@ TAR(5) BSD File Formats Manual TAR(5) This extension was short-lived and is no longer supported by any imple‐ mentation. - 1mPax Interchange Format0m + Pax Interchange Format There are many attributes that cannot be portably stored in a POSIX ustar archive. IEEE Std 1003.1-2001 (“POSIX.1”) defined a “pax interchange format” that uses two new types of entries to hold text-formatted meta‐ @@ -265,12 +265,12 @@ TAR(5) BSD File Formats Manual TAR(5) that, unlike the historic header, numeric values are stored using deci‐ mal, not octal. A description of some common keys follows: - 1matime22m, 1mctime22m, 1mmtime0m + atime, ctime, mtime File access, inode change, and modification times. These fields can be negative or include a decimal point and a fractional value. - 1mhdrcharset0m + hdrcharset The character set used by the pax extension values. By default, all textual values in the pax extended attributes are assumed to be in UTF-8, including pathnames, user names, and group names. @@ -285,32 +285,32 @@ TAR(5) BSD File Formats Manual TAR(5) this flag should not be used as a general mechanism to allow filenames to be stored in arbitrary encodings. - 1muname22m, 1muid22m, 1mgname22m, 1mgid0m + uname, uid, gname, gid User name, group name, and numeric UID and GID values. The user name and group name stored here are encoded in UTF8 and can thus include non-ASCII characters. The UID and GID fields can be of arbitrary length. - 1mlinkpath0m + linkpath The full path of the linked-to file. Note that this is encoded in UTF8 and can thus include non-ASCII characters. - 1mpath 22mThe full pathname of the entry. Note that this is encoded in + path The full pathname of the entry. Note that this is encoded in UTF8 and can thus include non-ASCII characters. - 1mrealtime.*22m, 1msecurity.*0m + realtime.*, security.* These keys are reserved and may be used for future standardiza‐ tion. - 1msize 22mThe size of the file. Note that there is no length limit on this + size The size of the file. Note that there is no length limit on this field, allowing conforming archives to store files much larger than the historic 8GB limit. - 1mSCHILY.*0m - Vendor-specific attributes used by Joerg Schilling's 1mstar 22mimple‐ + SCHILY.* + Vendor-specific attributes used by Joerg Schilling's star imple‐ mentation. - 1mSCHILY.acl.access22m, 1mSCHILY.acl.default, SCHILY.acl.ace0m + SCHILY.acl.access, SCHILY.acl.default, SCHILY.acl.ace Stores the access, default and NFSv4 ACLs as textual strings in a format that is an extension of the format specified by POSIX.1e draft 17. In particular, each user or group access specification @@ -319,39 +319,39 @@ TAR(5) BSD File Formats Manual TAR(5) not have complete user or group information available (such as when NIS/YP or LDAP services are temporarily unavailable). - 1mSCHILY.devminor22m, 1mSCHILY.devmajor0m + SCHILY.devminor, SCHILY.devmajor The full minor and major numbers for device nodes. - 1mSCHILY.fflags0m + SCHILY.fflags The file flags. - 1mSCHILY.realsize0m + SCHILY.realsize The full size of the file on disk. XXX explain? XXX - 1mSCHILY.dev, SCHILY.ino22m, 1mSCHILY.nlinks0m + SCHILY.dev, SCHILY.ino, SCHILY.nlinks The device number, inode number, and link count for the entry. In particular, note that a pax interchange format archive using - Joerg Schilling's 1mSCHILY.* 22mextensions can store all of the data - from 4mstruct24m 4mstat24m. + Joerg Schilling's SCHILY.* extensions can store all of the data + from struct stat. - 1mLIBARCHIVE.*0m - Vendor-specific attributes used by the 1mlibarchive 22mlibrary and + LIBARCHIVE.* + Vendor-specific attributes used by the libarchive library and programs that use it. - 1mLIBARCHIVE.creationtime0m + LIBARCHIVE.creationtime The time when the file was created. (This should not be confused with the POSIX “ctime” attribute, which refers to the time when the file metadata was last changed.) - 1mLIBARCHIVE.xattr.4m22mnamespace24m.4mkey0m + LIBARCHIVE.xattr.namespace.key Libarchive stores POSIX.1e-style extended attributes using keys - of this form. The 4mkey24m value is URL-encoded: All non-ASCII char‐ + of this form. The key value is URL-encoded: All non-ASCII char‐ acters and the two special characters “=” and “%” are encoded as “%” followed by two uppercase hexadecimal digits. The value of this key is the extended attribute value encoded in base 64. XXX Detail the base-64 format here XXX - 1mVENDOR.*0m + VENDOR.* XXX document other vendor-specific extensions XXX Any values stored in an extended attribute override the corresponding @@ -365,12 +365,12 @@ TAR(5) BSD File Formats Manual TAR(5) header and use extended attributes whenever a text value contains non- ASCII characters. - In addition to the 1mx 22mentry described above, the pax interchange format - also supports a 1mg 22mentry. The 1mg 22mentry is identical in format, but speci‐ + In addition to the x entry described above, the pax interchange format + also supports a g entry. The g entry is identical in format, but speci‐ fies attributes that serve as defaults for all subsequent archive - entries. The 1mg 22mentry is not widely used. + entries. The g entry is not widely used. - Besides the new 1mx 22mand 1mg 22mentries, the pax interchange format has a few + Besides the new x and g entries, the pax interchange format has a few other minor variations from the earlier ustar format. The most troubling one is that hardlinks are permitted to have data following them. This allows readers to restore any hardlink to a file without having to rewind @@ -378,15 +378,15 @@ TAR(5) BSD File Formats Manual TAR(5) for robust readers, as it is no longer clear whether or not they should ignore the size field for hardlink entries. - 1mGNU Tar Archives0m + GNU Tar Archives The GNU tar program started with a pre-POSIX format similar to that described earlier and has extended it using several different mechanisms: It added new fields to the empty space in the header (some of which was later used by POSIX for conflicting purposes); it allowed the header to be continued over multiple records; and it defined new entries that mod‐ - ify following entries (similar in principle to the 1mx 22mentry described + ify following entries (similar in principle to the x entry described above, but each GNU special entry is single-purpose, unlike the general- - purpose 1mx 22mentry). As a result, GNU tar archives are not POSIX compati‐ + purpose x entry). As a result, GNU tar archives are not POSIX compati‐ ble, although more lenient POSIX-compliant readers can successfully extract most GNU tar archives. @@ -420,7 +420,7 @@ TAR(5) BSD File Formats Manual TAR(5) char pad[17]; }; - 4mtypeflag0m + typeflag GNU tar uses the following special entry types, in addition to those defined by POSIX: @@ -461,11 +461,11 @@ TAR(5) BSD File Formats Manual TAR(5) ume. The "M" typeflag indicates that this entry contin‐ ues an existing file. Such entries can only occur as the first or second entry in an archive (the latter only if - the first entry is a volume label). The 4msize24m field spec‐ - ifies the size of this entry. The 4moffset24m field at bytes + the first entry is a volume label). The size field spec‐ + ifies the size of this entry. The offset field at bytes 369-380 specifies the offset where this file fragment - begins. The 4mrealsize24m field specifies the total size of - the file (which must equal 4msize24m plus 4moffset24m). When + begins. The realsize field specifies the total size of + the file (which must equal size plus offset). When extracting, GNU tar checks that the header file name is the one it is expecting, that the header offset is in the correct sequence, and that the sum of offset and size is @@ -488,26 +488,26 @@ TAR(5) BSD File Formats Manual TAR(5) with “extra” header extensions (an older format that is no longer used), or “sparse” extensions. - V The 4mname24m field should be interpreted as a tape/volume + V The name field should be interpreted as a tape/volume header name. This entry should generally be ignored on extraction. - 4mmagic24m The magic field holds the five characters “ustar” followed by a + magic The magic field holds the five characters “ustar” followed by a space. Note that POSIX ustar archives have a trailing null. - 4mversion0m + version The version field holds a space character followed by a null. Note that POSIX ustar archives use two copies of the ASCII digit “0”. - 4matime24m, 4mctime0m + atime, ctime The time the file was last accessed and the time of last change - of file information, stored in octal as with 4mmtime24m. + of file information, stored in octal as with mtime. - 4mlongnames0m + longnames This field is apparently no longer used. - Sparse 4moffset24m 4m/24m 4mnumbytes0m + Sparse offset / numbytes Each such structure specifies a single fragment of a sparse file. The two fields store values as octal numbers. The fragments are each padded to a multiple of 512 bytes in the archive. On @@ -515,7 +515,7 @@ TAR(5) BSD File Formats Manual TAR(5) (including any extension headers), and the data is then read and written to the file at appropriate offsets. - 4misextended0m + isextended If this is set to non-zero, the header will be followed by addi‐ tional “sparse header” records. Each such record contains infor‐ mation about as many as 21 additional sparse blocks as shown @@ -530,28 +530,28 @@ TAR(5) BSD File Formats Manual TAR(5) char padding[7]; }; - 4mrealsize0m + realsize A binary representation of the file's complete size, with a much - larger range than the POSIX file size. In particular, with 1mM0m + larger range than the POSIX file size. In particular, with M type files, the current entry is only a portion of the file. In that case, the POSIX size field will indicate the size of this - entry; the 4mrealsize24m field will indicate the total size of the + entry; the realsize field will indicate the total size of the file. - 1mGNU tar pax archives0m + GNU tar pax archives GNU tar 1.14 (XXX check this XXX) and later will write pax interchange - format archives when you specify the 1m--posix 22mflag. This format follows - the pax interchange format closely, using some 1mSCHILY 22mtags and introduc‐ + format archives when you specify the --posix flag. This format follows + the pax interchange format closely, using some SCHILY tags and introduc‐ ing new keywords to store sparse file information. There have been three iterations of the sparse file support, referred to as “0.0”, “0.1”, and “1.0”. - 1mGNU.sparse.numblocks22m, 1mGNU.sparse.offset22m, 1mGNU.sparse.numbytes22m, - 1mGNU.sparse.size0m - The “0.0” format used an initial 1mGNU.sparse.numblocks 22mattribute + GNU.sparse.numblocks, GNU.sparse.offset, GNU.sparse.numbytes, + GNU.sparse.size + The “0.0” format used an initial GNU.sparse.numblocks attribute to indicate the number of blocks in the file, a pair of - 1mGNU.sparse.offset 22mand 1mGNU.sparse.numbytes 22mto indicate the offset - and size of each block, and a single 1mGNU.sparse.size 22mto indicate + GNU.sparse.offset and GNU.sparse.numbytes to indicate the offset + and size of each block, and a single GNU.sparse.size to indicate the full size of the file. This is not the same as the size in the tar header because the latter value does not include the size of any holes. This format required that the order of attributes @@ -559,7 +559,7 @@ TAR(5) BSD File Formats Manual TAR(5) of the same attribute names, which is not officially permitted by the standards. - 1mGNU.sparse.map0m + GNU.sparse.map The “0.1” format used a single attribute that stored a comma-sep‐ arated list of decimal numbers. Each pair of numbers indicated the offset and size, respectively, of a block of data. This does @@ -567,50 +567,50 @@ TAR(5) BSD File Formats Manual TAR(5) does not recognize this extension, since many pax implementations simply discard unrecognized attributes. - 1mGNU.sparse.major22m, 1mGNU.sparse.minor22m, 1mGNU.sparse.name22m, 1mGNU.sparse.realsize0m + GNU.sparse.major, GNU.sparse.minor, GNU.sparse.name, GNU.sparse.realsize The “1.0” format stores the sparse block map in one or more 512-byte blocks prepended to the file data in the entry body. The pax attributes indicate the existence of this map (via the - 1mGNU.sparse.major 22mand 1mGNU.sparse.minor 22mfields) and the full size - of the file. The 1mGNU.sparse.name 22mholds the true name of the + GNU.sparse.major and GNU.sparse.minor fields) and the full size + of the file. The GNU.sparse.name holds the true name of the file. To avoid confusion, the name stored in the regular tar header is a modified name so that extraction errors will be apparent to users. - 1mSolaris Tar0m + Solaris Tar XXX More Details Needed XXX Solaris tar (beginning with SunOS XXX 5.7 ?? XXX) supports an “extended” format that is fundamentally similar to pax interchange format, with the following differences: - 1m· 22mExtended attributes are stored in an entry whose type is 1mX22m, not - 1mx22m, as used by pax interchange format. The detailed format of - this entry appears to be the same as detailed above for the 1mx0m + · Extended attributes are stored in an entry whose type is X, not + x, as used by pax interchange format. The detailed format of + this entry appears to be the same as detailed above for the x entry. - 1m· 22mAn additional 1mA 22mheader is used to store an ACL for the following + · An additional A header is used to store an ACL for the following regular entry. The body of this entry contains a seven-digit octal number followed by a zero byte, followed by the textual ACL description. The octal value is the number of ACL entries plus a constant that indicates the ACL type: 01000000 for POSIX.1e ACLs and 03000000 for NFSv4 ACLs. - 1mAIX Tar0m + AIX Tar XXX More details needed XXX - AIX Tar uses a ustar-formatted header with the type 1mA 22mfor storing coded + AIX Tar uses a ustar-formatted header with the type A for storing coded ACL information. Unlike the Solaris format, AIX tar writes this header after the regular file body to which it applies. The pathname in this - header is either 1mNFS4 22mor 1mAIXC 22mto indicate the type of ACL stored. The + header is either NFS4 or AIXC to indicate the type of ACL stored. The actual ACL is stored in platform-specific binary format. - 1mMac OS X Tar0m + Mac OS X Tar The tar distributed with Apple's Mac OS X stores most regular files as two separate files in the tar archive. The two files have the same name except that the first one has “._” prepended to the last path element. This special file stores an AppleDouble-encoded binary blob with addi‐ tional metadata about the second file, including ACL, extended attributes, and resources. To recreate the original file on disk, each - separate file can be extracted and the Mac OS X 1mcopyfile22m() function can + separate file can be extracted and the Mac OS X copyfile() function can be used to unpack the separate metadata file and apply it to th regular file. Conversely, the same function provides a “pack” option to encode the extended metadata from a file into a separate file whose contents can @@ -621,54 +621,54 @@ TAR(5) BSD File Formats Manual TAR(5) extensions needs to be included in the archive for each one, doubling the overhead required for files with long names. - 1mSummary of tar type codes0m + Summary of tar type codes The following list is a condensed summary of the type codes used in tar header records generated by different tar implementations. More details about specific implementations can be found above: NUL Early tar programs stored a zero byte for regular files. - 1m0 22mPOSIX standard type code for a regular file. - 1m1 22mPOSIX standard type code for a hard link description. - 1m2 22mPOSIX standard type code for a symbolic link description. - 1m3 22mPOSIX standard type code for a character device node. - 1m4 22mPOSIX standard type code for a block device node. - 1m5 22mPOSIX standard type code for a directory. - 1m6 22mPOSIX standard type code for a FIFO. - 1m7 22mPOSIX reserved. - 1m7 22mGNU tar used for pre-allocated files on some systems. - 1mA 22mSolaris tar ACL description stored prior to a regular file header. - 1mA 22mAIX tar ACL description stored after the file body. - 1mD 22mGNU tar directory dump. - 1mK 22mGNU tar long linkname for the following header. - 1mL 22mGNU tar long pathname for the following header. - 1mM 22mGNU tar multivolume marker, indicating the file is a continuation of + 0 POSIX standard type code for a regular file. + 1 POSIX standard type code for a hard link description. + 2 POSIX standard type code for a symbolic link description. + 3 POSIX standard type code for a character device node. + 4 POSIX standard type code for a block device node. + 5 POSIX standard type code for a directory. + 6 POSIX standard type code for a FIFO. + 7 POSIX reserved. + 7 GNU tar used for pre-allocated files on some systems. + A Solaris tar ACL description stored prior to a regular file header. + A AIX tar ACL description stored after the file body. + D GNU tar directory dump. + K GNU tar long linkname for the following header. + L GNU tar long pathname for the following header. + M GNU tar multivolume marker, indicating the file is a continuation of a file from the previous volume. - 1mN 22mGNU tar long filename support. Deprecated. - 1mS 22mGNU tar sparse regular file. - 1mV 22mGNU tar tape/volume header name. - 1mX 22mSolaris tar general-purpose extension header. - 1mg 22mPOSIX pax interchange format global extensions. - 1mx 22mPOSIX pax interchange format per-file extensions. - -1mSEE ALSO0m + N GNU tar long filename support. Deprecated. + S GNU tar sparse regular file. + V GNU tar tape/volume header name. + X Solaris tar general-purpose extension header. + g POSIX pax interchange format global extensions. + x POSIX pax interchange format per-file extensions. + +SEE ALSO ar(1), pax(1), tar(1) -1mSTANDARDS0m - The 1mtar 22mutility is no longer a part of POSIX or the Single Unix Standard. +STANDARDS + The tar utility is no longer a part of POSIX or the Single Unix Standard. It last appeared in Version 2 of the Single UNIX Specification (“SUSv2”). It has been supplanted in subsequent standards by pax(1). The ustar for‐ mat is currently part of the specification for the pax(1) utility. The pax interchange file format is new with IEEE Std 1003.1-2001 (“POSIX.1”). -1mHISTORY0m - A 1mtar 22mcommand appeared in Seventh Edition Unix, which was released in - January, 1979. It replaced the 1mtp 22mprogram from Fourth Edition Unix which - in turn replaced the 1mtap 22mprogram from First Edition Unix. John Gilmore's - 1mpdtar 22mpublic-domain implementation (circa 1987) was highly influential - and formed the basis of 1mGNU tar 22m(circa 1988). Joerg Shilling's 1mstar0m +HISTORY + A tar command appeared in Seventh Edition Unix, which was released in + January, 1979. It replaced the tp program from Fourth Edition Unix which + in turn replaced the tap program from First Edition Unix. John Gilmore's + pdtar public-domain implementation (circa 1987) was highly influential + and formed the basis of GNU tar (circa 1988). Joerg Shilling's star archiver is another open-source (CDDL) archiver (originally developed circa 1985) which features complete support for pax interchange format. - This documentation was written as part of the 1mlibarchive 22mand 1mbsdtar0m + This documentation was written as part of the libarchive and bsdtar project by Tim Kientzle . BSD December 27, 2016 BSD diff --git a/archivers/libarchive/files/doc/wiki/Makefile b/archivers/libarchive/files/doc/wiki/Makefile index c8d52219d11..a8e2799e0a5 100644 --- a/archivers/libarchive/files/doc/wiki/Makefile +++ b/archivers/libarchive/files/doc/wiki/Makefile @@ -104,15 +104,15 @@ ManPageArchiveWriteSetPassphrase3.wiki: ../mdoc2wiki.awk ../../libarchive/archiv ManPageCpio5.wiki: ../mdoc2wiki.awk ../../libarchive/cpio.5 awk -f ../mdoc2wiki.awk < ../../libarchive/cpio.5 > ManPageCpio5.wiki -ManPageLibarchiveFormats5.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive-formats.5 - awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive-formats.5 > ManPageLibarchiveFormats5.wiki - ManPageLibarchive3.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive.3 awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive.3 > ManPageLibarchive3.wiki ManPageLibarchiveChanges3.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive_changes.3 awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive_changes.3 > ManPageLibarchiveChanges3.wiki +ManPageLibarchiveFormats5.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive-formats.5 + awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive-formats.5 > ManPageLibarchiveFormats5.wiki + ManPageLibarchiveInternals3.wiki: ../mdoc2wiki.awk ../../libarchive/libarchive_internals.3 awk -f ../mdoc2wiki.awk < ../../libarchive/libarchive_internals.3 > ManPageLibarchiveInternals3.wiki @@ -127,4 +127,4 @@ ManPageBsdtar1.wiki: ../mdoc2wiki.awk ../../tar/bsdtar.1 ManPageBsdcpio1.wiki: ../mdoc2wiki.awk ../../cpio/bsdcpio.1 awk -f ../mdoc2wiki.awk < ../../cpio/bsdcpio.1 > ManPageBsdcpio1.wiki -all: ManPageArchiveEntry3.wiki ManPageArchiveEntryAcl3.wiki ManPageArchiveEntryLinkify3.wiki ManPageArchiveEntryPaths3.wiki ManPageArchiveEntryPerms3.wiki ManPageArchiveEntryStat3.wiki ManPageArchiveEntryTime3.wiki ManPageArchiveRead3.wiki ManPageArchiveReadAddPassphrase3.wiki ManPageArchiveReadData3.wiki ManPageArchiveReadDisk3.wiki ManPageArchiveReadExtract3.wiki ManPageArchiveReadFilter3.wiki ManPageArchiveReadFormat3.wiki ManPageArchiveReadFree3.wiki ManPageArchiveReadHeader3.wiki ManPageArchiveReadNew3.wiki ManPageArchiveReadOpen3.wiki ManPageArchiveReadSetOptions3.wiki ManPageArchiveUtil3.wiki ManPageArchiveWrite3.wiki ManPageArchiveWriteBlocksize3.wiki ManPageArchiveWriteData3.wiki ManPageArchiveWriteDisk3.wiki ManPageArchiveWriteFilter3.wiki ManPageArchiveWriteFinishEntry3.wiki ManPageArchiveWriteFormat3.wiki ManPageArchiveWriteFree3.wiki ManPageArchiveWriteHeader3.wiki ManPageArchiveWriteNew3.wiki ManPageArchiveWriteOpen3.wiki ManPageArchiveWriteSetOptions3.wiki ManPageArchiveWriteSetPassphrase3.wiki ManPageCpio5.wiki ManPageLibarchiveFormats5.wiki ManPageLibarchive3.wiki ManPageLibarchiveChanges3.wiki ManPageLibarchiveInternals3.wiki ManPageMtree5.wiki ManPageTar5.wiki ManPageBsdtar1.wiki ManPageBsdcpio1.wiki +all: ManPageArchiveEntry3.wiki ManPageArchiveEntryAcl3.wiki ManPageArchiveEntryLinkify3.wiki ManPageArchiveEntryPaths3.wiki ManPageArchiveEntryPerms3.wiki ManPageArchiveEntryStat3.wiki ManPageArchiveEntryTime3.wiki ManPageArchiveRead3.wiki ManPageArchiveReadAddPassphrase3.wiki ManPageArchiveReadData3.wiki ManPageArchiveReadDisk3.wiki ManPageArchiveReadExtract3.wiki ManPageArchiveReadFilter3.wiki ManPageArchiveReadFormat3.wiki ManPageArchiveReadFree3.wiki ManPageArchiveReadHeader3.wiki ManPageArchiveReadNew3.wiki ManPageArchiveReadOpen3.wiki ManPageArchiveReadSetOptions3.wiki ManPageArchiveUtil3.wiki ManPageArchiveWrite3.wiki ManPageArchiveWriteBlocksize3.wiki ManPageArchiveWriteData3.wiki ManPageArchiveWriteDisk3.wiki ManPageArchiveWriteFilter3.wiki ManPageArchiveWriteFinishEntry3.wiki ManPageArchiveWriteFormat3.wiki ManPageArchiveWriteFree3.wiki ManPageArchiveWriteHeader3.wiki ManPageArchiveWriteNew3.wiki ManPageArchiveWriteOpen3.wiki ManPageArchiveWriteSetOptions3.wiki ManPageArchiveWriteSetPassphrase3.wiki ManPageCpio5.wiki ManPageLibarchive3.wiki ManPageLibarchiveChanges3.wiki ManPageLibarchiveFormats5.wiki ManPageLibarchiveInternals3.wiki ManPageMtree5.wiki ManPageTar5.wiki ManPageBsdtar1.wiki ManPageBsdcpio1.wiki diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki index 83d692f01f0..195f6ce3ad7 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntry3.wiki @@ -36,7 +36,7 @@ it includes everything from '''struct stat''' plus associated pathname, textual group and user names, etc. These objects are used by -[[ManPageLibarchive3]] +[[ManPageibarchive3]] to represent the metadata associated with a particular entry in an archive. === Create and Destroy=== @@ -64,16 +64,16 @@ object. Due to high number of functions, the accessor functions can be found in man pages grouped by the purpose.
-
[[ManPageArchiveEntryAcl3]]
+
[[ManPagerchiventrycl3]]
Access Control List manipulation -
[[ManPageArchiveEntryPaths3]]
+
[[ManPagerchiventryaths3]]
Path name manipulation -
[[ManPageArchiveEntryPerms3]]
+
[[ManPagerchiventryerms3]]
User, group and mode manipulation -
[[ManPageArchiveEntryStat3]]
+
[[ManPagerchiventrytat3]]
Functions not in the other groups and copying to/from ''struct'' stat. -
[[ManPageArchiveEntryTime3]]
+
[[ManPagerchiventryime3]]
Time field manipulation
@@ -107,11 +107,11 @@ narrow string for the same data, the previously-set wide string will be discarded in favor of the new data. == SEE ALSO == -[[ManPageArchiveEntryAcl3]], -[[ManPageArchiveEntryPaths3]], -[[ManPageArchiveEntryPerms3]], -[[ManPageArchiveEntryTime3]] -[[ManPageLibarchive3]], +[[ManPagerchiventrycl3]], +[[ManPagerchiventryaths3]], +[[ManPagerchiventryerms3]], +[[ManPagerchiventryime3]] +[[ManPageibarchive3]], == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryAcl3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryAcl3.wiki index 41563d1381f..db42a741433 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryAcl3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryAcl3.wiki @@ -5,7 +5,7 @@ ARCHIVE_ENTRY_ACL(3) manual page '''archive_entry_acl_clear''', '''archive_entry_acl_count''', '''archive_entry_acl_from_text''', -'''archive_entry_acl_from_text_w,''' +'''archive_entry_acl_from_text_w''', '''archive_entry_acl_next''', '''archive_entry_acl_next_w''', '''archive_entry_acl_reset''', @@ -248,7 +248,7 @@ ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (.B n ) Do not propagate inherit flags. Only first-level entries inherit ACLs.
ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (.B S ) -Trigger alarm or audit on succesful access. +Trigger alarm or audit on successful access.
ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (.B F ) Trigger alarm or audit on failed access. @@ -262,7 +262,7 @@ and '''archive_entry_acl_add_entry_w'''() add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions -are updated. An archive enry cannot contain both POSIX.1e and NFSv4 ACL +are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. '''archive_entry_acl_clear'''() @@ -291,7 +291,7 @@ ARCHIVE_ENTRY_ACL_TYPE_ALARM 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. +the three non-extended ACLs are added. '''archive_entry_acl_from_text'''() and @@ -345,7 +345,7 @@ or '''archive_entry_acl_next_w'''(). The function returns either 0, if no non-extended ACLs are found. In this case, the access permissions should be obtained by -[[ManPageArchiveEntryMode3]] +[[ManPagerchiventryode3]] or set using [[chmod(2)|http://www.freebsd.org/cgi/man.cgi?query=chmod&sektion=2]]. Otherwise, the function returns the same value as @@ -356,7 +356,7 @@ and '''archive_entry_acl_to_text_w'''() convert the ACL entries for the given type into a (wide) -string of ACL entries separated by newline. If the the pointer +string of ACL entries separated by newline. If the pointer is not NULL, then the function shall return the length of the string (not including the NULL terminator) in the location pointed to by @@ -456,5 +456,5 @@ and flags on success or NULL on error. '''archive_entry_acl_types'''() returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries. == SEE ALSO == -[[ManPageArchiveEntry3]], -[[ManPageLibarchive3]] +[[ManPagerchiventry3]], +[[ManPageibarchive3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryLinkify3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryLinkify3.wiki index a94b398c97e..1e35c5984c0 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryLinkify3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryLinkify3.wiki @@ -64,7 +64,7 @@ The '''archive_entry_linkresolver_set_strategy'''() function selects the optimal hardlink strategy for the given format. The format code can be obtained from -[[ManPageArchiveFormat3]]. +[[ManPagerchiveormat3]]. The function can be called more than once, but it is recommended to flush all deferred entries first. @@ -194,4 +194,4 @@ on [[malloc(3)|http://www.freebsd.org/cgi/man.cgi?query=malloc&sektion=3]] failures. == SEE ALSO == -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPaths3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPaths3.wiki index 8e4cd945525..3ab6833be05 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPaths3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPaths3.wiki @@ -5,25 +5,25 @@ ARCHIVE_ENTRY_PATHS(3) manual page '''archive_entry_set_hardlink''', '''archive_entry_copy_hardlink''', '''archive_entry_copy_hardlink_w''', -'''archve_entry_update_hardlink_utf8''', +'''archive_entry_update_hardlink_utf8''', '''archive_entry_set_link''', '''archive_entry_copy_link''', '''archive_entry_copy_link_w''', -'''archve_entry_update_link_utf8''', +'''archive_entry_update_link_utf8''', '''archive_entry_pathname''', '''archive_entry_pathname_w''', '''archive_entry_set_pathname''', '''archive_entry_copy_pathname''', '''archive_entry_copy_pathname_w''', -'''archve_entry_update_pathname_utf8''', +'''archive_entry_update_pathname_utf8''', '''archive_entry_sourcepath''', '''archive_entry_copy_sourcepath''', -'''archive_entry_symlink,''' -'''archive_entry_symlink_w,''' +'''archive_entry_symlink''', +'''archive_entry_symlink_w''', '''archive_entry_set_symlink''', '''archive_entry_copy_symlink''', '''archive_entry_copy_symlink_w''', -'''archve_entry_update_symlink_utf8''' +'''archive_entry_update_symlink_utf8''' - functions for manipulating path names in archive entry descriptions == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -127,7 +127,7 @@ Streaming Archive Library (libarchive, -larchive) '''archive_entry_update_symlink_utf8'''(''struct archive_entry *a'', ''const char *path''); == DESCRIPTION == Path names supported by -[[ManPageArchiveEntry3]]: +[[ManPagerchiventry3]]:
hardlink
Destination of the hardlink. @@ -140,7 +140,7 @@ the destination for that. Path in the archive
sourcepath
Path on the disk for use by -[[ManPageArchiveReadDisk3]]. +[[ManPagerchiveeadisk3]].
symlink
Destination of the symbolic link.
@@ -171,5 +171,5 @@ It doesn't have a corresponding get accessor function. is an alias for '''archive_entry_copy_XXX'''(). == SEE ALSO == -[[ManPageArchiveEntry3]] -[[ManPageLibarchive3]], +[[ManPagerchiventry3]] +[[ManPageibarchive3]], diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPerms3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPerms3.wiki index 079034c681f..c9e28b75f01 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPerms3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryPerms3.wiki @@ -7,8 +7,8 @@ ARCHIVE_ENTRY_PERMS(3) manual page '''archive_entry_perm''', '''archive_entry_set_perm''', '''archive_entry_strmode''', -'''archive_entry_uname''' -'''archive_entry_uname_w''' +'''archive_entry_uname''', +'''archive_entry_uname_w''', '''archive_entry_set_uname''', '''archive_entry_copy_uname''', '''archive_entry_copy_uname_w''', @@ -207,11 +207,11 @@ every name that is recognized. [[strtofflags(3)|http://www.freebsd.org/cgi/man.cgi?query=strtofflags&sektion=3]], which stops parsing at the first unrecognized name.) == SEE ALSO == -[[ManPageArchiveEntry3]], -[[ManPageArchiveEntryAcl3]], -[[ManPageArchiveReadDisk3]], -[[ManPageArchiveWriteDisk3]] -[[ManPageLibarchive3]], +[[ManPagerchiventry3]], +[[ManPagerchiventrycl3]], +[[ManPagerchiveeadisk3]], +[[ManPagerchiveriteisk3]] +[[ManPageibarchive3]], == BUGS == The platform types ''uid_t'' diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryStat3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryStat3.wiki index e96169f1c32..55bfdef6fc4 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryStat3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryStat3.wiki @@ -258,7 +258,7 @@ The functions and '''archive_entry_ino64'''() are used by -[[ManPageArchiveEntryLinkify3]] +[[ManPagerchiventryinkify3]] to find hardlinks. The pair of device and inode is supposed to identify hardlinked files. @@ -301,8 +301,8 @@ platforms. Some archive formats use the combined form, while other formats use the split form. == SEE ALSO == -[[ManPageArchiveEntryAcl3]], -[[ManPageArchiveEntryPerms3]], -[[ManPageArchiveEntryTime3]], -[[ManPageLibarchive3]], +[[ManPagerchiventrycl3]], +[[ManPagerchiventryerms3]], +[[ManPagerchiventryime3]], +[[ManPageibarchive3]], [[stat(2)|http://www.freebsd.org/cgi/man.cgi?query=stat&sektion=2]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryTime3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryTime3.wiki index bff82575627..2425c1c3332 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryTime3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveEntryTime3.wiki @@ -111,7 +111,7 @@ These functions create and manipulate the time fields in an Supported time fields are atime (access time), birthtime (creation time), ctime (last time an inode property was changed) and mtime (modification time). -[[ManPageLibarchive3]] +[[ManPageibarchive3]] provides a high-resolution interface. The timestamps are truncated automatically depending on the archive format (for archiving) or the filesystem capabilities (for restoring). @@ -124,8 +124,8 @@ The current state can be queried using '''XXX_is_set'''(). Unset time fields have a second and nanosecond field of 0. == SEE ALSO == -[[ManPageArchiveEntry3]] -[[ManPageLibarchive3]], +[[ManPagerchiventry3]] +[[ManPageibarchive3]], == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki index 0b6e08d283d..69b6c479aa8 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveRead3.wiki @@ -15,7 +15,7 @@ headers and associated data, then close the archive and release all resources. === Create archive object=== See -[[ManPageArchiveReadNew3]]. +[[ManPagerchiveeadew3]]. To read an archive, you must first obtain an initialized '''struct archive''' @@ -23,9 +23,9 @@ object from '''archive_read_new'''(). === Enable filters and formats=== See -[[ManPageArchiveReadFilter3]] +[[ManPagerchiveeadilter3]] and -[[ManPageArchiveReadFormat3]]. +[[ManPagerchiveeadormat3]]. You can then modify this object for the desired operations with the various @@ -49,10 +49,10 @@ to enable auto-detect for all formats and compression types currently supported by the library. === Set options=== See -[[ManPageArchiveReadSetOptions3]]. +[[ManPagerchiveeadetptions3]]. === Open archive=== See -[[ManPageArchiveReadOpen3]]. +[[ManPagerchiveeadpen3]]. Once you have prepared the '''struct archive''' @@ -72,10 +72,10 @@ callback functions are free to read whatever block size is most appropriate for the medium. === Consume archive=== See -[[ManPageArchiveReadHeader3]], -[[ManPageArchiveReadData3]] +[[ManPagerchiveeadeader3]], +[[ManPagerchiveeadata3]] and -[[ManPageArchiveReadExtract3]]. +[[ManPagerchiveeadxtract3]]. Each archive entry consists of a header followed by a certain amount of data. @@ -112,7 +112,7 @@ In particular, many applications will want to override the pathname, file permissions, or ownership. === Release resources=== See -[[ManPageArchiveReadFree3]]. +[[ManPagerchiveeadree3]]. Once you have finished reading data from the archive, you should call @@ -174,16 +174,16 @@ myclose(struct archive *a, void *client_data) ``` == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveReadNew3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadExtract3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadHeader3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPageibarchive3]], +[[ManPagerchiveeadew3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadxtract3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadeader3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], [[ManPageTar5]] == HISTORY == The diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadData3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadData3.wiki index da4647cf141..e6c7afc295b 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadData3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadData3.wiki @@ -89,13 +89,13 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadExtract3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadHeader3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPageibarchive3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadxtract3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadeader3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki index bb7d01a3eb8..752181e182d 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadDisk3.wiki @@ -1,6 +1,7 @@ ARCHIVE_READ_DISK(3) manual page == NAME == '''archive_read_disk_new''', +'''archive_read_disk_set_behavior''', '''archive_read_disk_set_symlink_logical''', '''archive_read_disk_set_symlink_physical''', '''archive_read_disk_set_symlink_hybrid''', @@ -9,10 +10,7 @@ ARCHIVE_READ_DISK(3) manual page '''archive_read_disk_uname''', '''archive_read_disk_set_uname_lookup''', '''archive_read_disk_set_gname_lookup''', -'''archive_read_disk_set_standard_lookup''', -'''archive_read_close''', -'''archive_read_finish''', -'''archive_read_free''' +'''archive_read_disk_set_standard_lookup''' - functions for reading objects from disk == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -25,6 +23,10 @@ Streaming Archive Library (libarchive, -larchive)
''int''
+'''archive_read_disk_set_behavior'''(''struct archive *'', ''int''); +
+''int'' +
'''archive_read_disk_set_symlink_logical'''(''struct archive *'');
''int'' @@ -58,18 +60,6 @@ Streaming Archive Library (libarchive, -larchive) ''int''
'''archive_read_disk_entry_from_file'''(''struct archive *'', ''struct archive_entry *'', ''int fd'', ''const struct stat *''); -
-''int'' -
-'''archive_read_close'''(''struct archive *''); -
-''int'' -
-'''archive_read_finish'''(''struct archive *''); -
-''int'' -
-'''archive_read_free'''(''struct archive *''); == DESCRIPTION == These functions provide an API for reading information about objects on disk. @@ -81,6 +71,51 @@ objects. Allocates and initializes a '''struct archive''' object suitable for reading object information from disk. +
'''archive_read_disk_set_behavior'''()
+Configures various behavior options when reading entries from disk. +The flags field consists of a bitwise OR of one or more of the +following values: +
+
'''ARCHIVE_READDISK_HONOR_NODUMP'''
+Skip files and directories with the nodump file attribute (file flag) set. +By default, the nodump file atrribute is ignored. +
'''ARCHIVE_READDISK_MAC_COPYFILE'''
+Mac OS X specific. Read metadata (ACLs and extended attributes) with +[[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]]. +By default, metadata is read using +[[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]]. +
'''ARCHIVE_READDISK_NO_ACL'''
+Do not read Access Control Lists. +By default, ACLs are read from disk. +
'''ARCHIVE_READDISK_NO_FFLAGS'''
+Do not read file attributes (file flags). +By default, file attributes are read from disk. +See +[[chattr(1)|http://www.freebsd.org/cgi/man.cgi?query=chattr&sektion=1]] +(Linux) +or +[[chflags(1)|http://www.freebsd.org/cgi/man.cgi?query=chflags&sektion=1]] +(FreeBSD, Mac OS X) +for more information on file attributes. +
'''ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS'''
+Do not traverse mount points. +By defaut, moint points are traversed. +
'''ARCHIVE_READDISK_NO_XATTR'''
+Do not read extended file attributes (xattrs). +By default, extended file attributes are read from disk. +See +[[xattr(7)|http://www.freebsd.org/cgi/man.cgi?query=xattr&sektion=7]] +(Linux,) +[[xattr(2)|http://www.freebsd.org/cgi/man.cgi?query=xattr&sektion=2]] +(Mac OS X,) +or +[[getextattr(8)|http://www.freebsd.org/cgi/man.cgi?query=getextattr&sektion=8]] +(FreeBSD) +for more information on extended file attributes. +
'''ARCHIVE_READDISK_RESTORE_ATIME'''
+Restore access time of traversed files. +By default, access time of traversed files is not restored. +
'''archive_read_disk_set_symlink_logical'''(), '''archive_read_disk_set_symlink_physical'''(), @@ -138,7 +173,7 @@ object with information about a particular file. The '''archive_entry''' object must have already been created with -[[ManPageArchiveEntryNew3]] +[[ManPagerchiventryew3]] and at least one of the source path or path fields must already be set. (If both are set, the source path will be used.) @@ -164,22 +199,11 @@ using the currently registered lookup functions above. This affects the file ownership fields and ACL values in the '''struct archive_entry''' object. -
'''archive_read_close'''()
-Does nothing for -'''archive_read_disk''' -handles. -
'''archive_read_finish'''()
-This is a deprecated synonym for -'''archive_read_free'''(). -
'''archive_read_free'''()
-Invokes -'''archive_read_close'''() -if it was not invoked manually, then releases all resources.
More information about the ''struct'' archive object and the overall design of the library can be found in the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] overview. == EXAMPLE == The following illustrates basic usage of the library by @@ -243,12 +267,12 @@ and '''archive_error_string'''() functions. == SEE ALSO == -[[ManPageArchiveRead3]], -[[ManPageArchiveUtil3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteDisk3]], +[[ManPagerchiveead3]], +[[ManPagerchivetil3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteisk3]], [[ManPageBsdtar1]], -[[ManPageLibarchive3]] +[[ManPageibarchive3]] == HISTORY == The '''libarchive''' @@ -289,7 +313,7 @@ to look up such information. This API should provide a set of methods for walking a directory tree. That would make it a direct parallel of the -[[ManPageArchiveRead3]] +[[ManPagerchiveead3]] API. When such methods are implemented, the "hybrid" diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadExtract3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadExtract3.wiki index e3ec018be18..b33adeba7a0 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadExtract3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadExtract3.wiki @@ -24,34 +24,34 @@ Streaming Archive Library (libarchive, -larchive)
'''archive_read_extract'''(), '''archive_read_extract_set_skip_file'''()
A convenience function that wraps the corresponding -[[ManPageArchiveWriteDisk3]] +[[ManPagerchiveriteisk3]] interfaces. The first call to '''archive_read_extract'''() creates a restore object using -[[ManPageArchiveWriteDiskNew3]] +[[ManPagerchiveriteiskew3]] and -[[ManPageArchiveWriteDiskSetStandardLookup3]], +[[ManPagerchiveriteiskettandardookup3]], then transparently invokes -[[ManPageArchiveWriteDiskSetOptions3]], -[[ManPageArchiveWriteHeader3]], -[[ManPageArchiveWriteData3]], +[[ManPagerchiveriteisketptions3]], +[[ManPagerchiveriteeader3]], +[[ManPagerchiveriteata3]], and -[[ManPageArchiveWriteFinishEntry3]] +[[ManPagerchiveriteinishntry3]] to create the entry on disk and copy data into it. The ''flags'' argument is passed unmodified to -[[ManPageArchiveWriteDiskSetOptions3]]. +[[ManPagerchiveriteisketptions3]].
'''archive_read_extract2'''()
This is another version of '''archive_read_extract'''() that allows you to provide your own restore object. In particular, this allows you to override the standard lookup functions using -[[ManPageArchiveWriteDiskSetGroupLookup3]], +[[ManPagerchiveriteisketroupookup3]], and -[[ManPageArchiveWriteDiskSetUserLookup3]]. +[[ManPagerchiveriteisketserookup3]]. Note that '''archive_read_extract2'''() does not accept a @@ -91,12 +91,12 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPageibarchive3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki index ead30b911eb..f0e87b6bbe9 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFilter3.wiki @@ -130,8 +130,8 @@ and '''archive_error_string'''() functions. == SEE ALSO == -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadFormat3]] +[[ManPageibarchive3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadormat3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki index 9ffe5b42188..645300bf751 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki @@ -9,9 +9,9 @@ ARCHIVE_READ_FORMAT(3) manual page '''archive_read_support_format_empty''', '''archive_read_support_format_iso9660''', '''archive_read_support_format_lha''', -'''archive_read_support_format_mtree,''' -'''archive_read_support_format_rar,''' -'''archive_read_support_format_raw,''' +'''archive_read_support_format_mtree''', +'''archive_read_support_format_rar''', +'''archive_read_support_format_raw''', '''archive_read_support_format_tar''', '''archive_read_support_format_xar''', '''archive_read_support_format_zip''' @@ -150,11 +150,11 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPageibarchive3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], [[ManPageTar5]] == BUGS == Many traditional archiver programs treat diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFree3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFree3.wiki index 90b094922ac..10f372d8640 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFree3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFree3.wiki @@ -58,11 +58,11 @@ and '''archive_error_string'''() functions. == SEE ALSO == -[[ManPageLibarchive3]], -[[ManPageArchiveReadNew3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]] +[[ManPageibarchive3]], +[[ManPagerchiveeadew3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadHeader3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadHeader3.wiki index 7eb59499f56..30611b28403 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadHeader3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadHeader3.wiki @@ -51,13 +51,13 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadExtract3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadOpen3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPageibarchive3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadxtract3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadpen3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadNew3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadNew3.wiki index 70c3cfd3fd7..41b3c2bec53 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadNew3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadNew3.wiki @@ -20,13 +20,13 @@ is returned on error. A complete description of the '''struct archive''' object can be found in the overview manual page for -[[ManPageLibarchive3]]. +[[ManPageibarchive3]]. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPageibarchive3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadOpen3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadOpen3.wiki index d5028c5bff4..baa3c5ce5a9 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadOpen3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadOpen3.wiki @@ -5,7 +5,7 @@ ARCHIVE_READ_OPEN(3) manual page '''archive_read_open_fd''', '''archive_read_open_FILE''', '''archive_read_open_filename''', -'''archive_read_open_memory''', +'''archive_read_open_memory''' - functions for reading streaming archives == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -34,7 +34,7 @@ Streaming Archive Library (libarchive, -larchive)
''int''
-'''archive_read_open_memory'''(''struct archive *'', ''void *buff'', ''size_t size''); +'''archive_read_open_memory'''(''struct archive *'', ''const void *buff'', ''size_t size''); == DESCRIPTION ==
'''archive_read_open'''()
@@ -92,7 +92,7 @@ A complete description of the and '''struct archive_entry''' objects can be found in the overview manual page for -[[ManPageLibarchive3]]. +[[ManPageibarchive3]]. == CLIENT CALLBACKS == The callback functions must match the following prototypes:
    @@ -180,11 +180,11 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadData3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveUtil3]], +[[ManPageibarchive3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadata3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchivetil3]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadSetOptions3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadSetOptions3.wiki index b2bca417c4b..aef201eb521 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveReadSetOptions3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveReadSetOptions3.wiki @@ -182,6 +182,6 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], -[[ManPageArchiveRead3]] +[[ManPageibarchive3]], +[[ManPagerchiveriteetptions3]], +[[ManPagerchiveead3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki index 2f07b658add..48341524eac 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveUtil3.wiki @@ -79,7 +79,7 @@ Streaming Archive Library (libarchive, -larchive) These functions provide access to various information about the '''struct archive''' object used in the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library.
    '''archive_clear_error'''()
    @@ -111,9 +111,9 @@ to
    '''archive_file_count'''()
    Returns a count of the number of files processed by this archive object. The count is incremented by calls to -[[ManPageArchiveWriteHeader3]] +[[ManPagerchiveriteeader3]] or -[[ManPageArchiveReadNextHeader3]]. +[[ManPagerchiveeadexteader3]].
    '''archive_filter_code'''()
    Returns a numeric code identifying the indicated filter. See @@ -202,9 +202,9 @@ Field-width specifiers and other printf features are not uniformly supported and should not be used.
    == SEE ALSO == -[[ManPageArchiveRead3]], -[[ManPageArchiveWrite3]], -[[ManPageLibarchive3]], +[[ManPagerchiveead3]], +[[ManPagerchiverite3]], +[[ManPageibarchive3]], [[printf(3)|http://www.freebsd.org/cgi/man.cgi?query=printf&sektion=3]] == HISTORY == The diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki index 301f75c7d44..9f7218111b4 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWrite3.wiki @@ -15,7 +15,7 @@ object, set any desired options, initialize the archive, append entries, then close the archive and release all resources. === Create archive object=== See -[[ManPageArchiveWriteNew3]]. +[[ManPagerchiveriteew3]]. To write an archive, you must first obtain an initialized '''struct archive''' @@ -23,10 +23,10 @@ object from '''archive_write_new'''(). === Enable filters and formats, configure block size and padding=== See -[[ManPageArchiveWriteFilter3]], -[[ManPageArchiveWriteFormat3]] +[[ManPagerchiveriteilter3]], +[[ManPagerchiveriteormat3]] and -[[ManPageArchiveWriteBlocksize3]]. +[[ManPagerchiveritelocksize3]]. You can then modify this object for the desired operations with the various @@ -40,10 +40,10 @@ functions to enable the corresponding compression and format support. === Set options=== See -[[ManPageArchiveReadSetOptions3]]. +[[ManPagerchiveeadetptions3]]. === Open archive=== See -[[ManPageArchiveWriteOpen3]]. +[[ManPagerchiveritepen3]]. Once you have prepared the '''struct archive''' @@ -59,9 +59,9 @@ specify a filename, file descriptor, object, or a block of memory from which to write the archive data. === Produce archive=== See -[[ManPageArchiveWriteHeader3]] +[[ManPagerchiveriteeader3]] and -[[ManPageArchiveWriteData3]]. +[[ManPagerchiveriteata3]]. Individual archive entries are written in a three-step process: @@ -78,7 +78,7 @@ field, which specifies the type of object and field, which specifies the size of the data portion of the object. === Release resources=== See -[[ManPageArchiveWriteFree3]]. +[[ManPagerchiveriteree3]]. After all entries have been written, use the '''archive_write_free'''() @@ -180,8 +180,8 @@ int main(int argc, const char **argv) ``` == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteBlocksize3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteBlocksize3.wiki index 7975a5a3e16..8bdfd7db57e 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteBlocksize3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteBlocksize3.wiki @@ -86,8 +86,8 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteData3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteData3.wiki index b21eb42199e..5d4ec6ecc26 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteData3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteData3.wiki @@ -1,6 +1,7 @@ ARCHIVE_WRITE_DATA(3) manual page == NAME == -'''archive_write_data''' +'''archive_write_data''', +'''archive_write_data_block''' - functions for creating archives == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -10,8 +11,29 @@ Streaming Archive Library (libarchive, -larchive) ''la_ssize_t''
    '''archive_write_data'''(''struct archive *'', ''const void *'', ''size_t''); +
    +''la_ssize_t'' +
    +'''archive_write_data_block'''(''struct archive *'', ''const void *'', ''size_t size'', ''int64_t offset''); == DESCRIPTION == +
    +
    '''archive_write_data'''()
    +Write data corresponding to the header just written. +
    '''archive_write_data_block'''()
    Write data corresponding to the header just written. +This is like +'''archive_write_data'''() +except that it performs a seek on the file being +written to the specified offset before writing the data. +This is useful when restoring sparse files from archive +formats that support sparse files. +Returns number of bytes written or -1 on error. +(Note: This is currently not supported for +'''archive_write''' +handles, only for +'''archive_write_disk''' +handles. +
    == RETURN VALUES == This function returns the number of bytes actually written, or a negative error code on error. @@ -31,9 +53,9 @@ Clients should treat any value less than zero as an error and consider any non-negative value as success. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteFinishEntry3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiveriteinishntry3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki index 11248c14e16..d0cd70b0983 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteDisk3.wiki @@ -5,14 +5,7 @@ ARCHIVE_WRITE_DISK(3) manual page '''archive_write_disk_set_skip_file''', '''archive_write_disk_set_group_lookup''', '''archive_write_disk_set_standard_lookup''', -'''archive_write_disk_set_user_lookup''', -'''archive_write_header''', -'''archive_write_data''', -'''archive_write_data_block''', -'''archive_write_finish_entry''', -'''archive_write_close''', -'''archive_write_finish''' -'''archive_write_free''' +'''archive_write_disk_set_user_lookup''' - functions for creating objects on disk == LIBRARY == Streaming Archive Library (libarchive, -larchive) @@ -42,34 +35,6 @@ Streaming Archive Library (libarchive, -larchive) ''int''
    '''archive_write_disk_set_user_lookup'''(''struct archive *'', ''void *'', ''uid_t (*)(void *, const char *uname, uid_t uid)'', ''void (*cleanup)(void *)''); -
    -''int'' -
    -'''archive_write_header'''(''struct archive *'', ''struct archive_entry *''); -
    -''la_ssize_t'' -
    -'''archive_write_data'''(''struct archive *'', ''const void *'', ''size_t''); -
    -''la_ssize_t'' -
    -'''archive_write_data_block'''(''struct archive *'', ''const void *'', ''size_t size'', ''int64_t offset''); -
    -''int'' -
    -'''archive_write_finish_entry'''(''struct archive *''); -
    -''int'' -
    -'''archive_write_close'''(''struct archive *''); -
    -''int'' -
    -'''archive_write_finish'''(''struct archive *''); -
    -''int'' -
    -'''archive_write_free'''(''struct archive *''); == DESCRIPTION == These functions provide a complete API for creating objects on disk from @@ -105,7 +70,34 @@ performance optimization in practice. The options field consists of a bitwise OR of one or more of the following values:
    -
    '''ARCHIVE_EXTRACT_OWNER'''
    +
    '''ARCHIVE_EXTRACT_ACL'''
    +Attempt to restore Access Control Lists. +By default, extended ACLs are ignored. +
    '''ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS'''
    +Before removing a file system object prior to replacing it, clear +platform-specific file flags which might prevent its removal. +
    '''ARCHIVE_EXTRACT_FFLAGS'''
    +Attempt to restore file attributes (file flags). +By default, file attributes are ignored. +See +[[chattr(1)|http://www.freebsd.org/cgi/man.cgi?query=chattr&sektion=1]] +(Linux) +or +[[chflags(1)|http://www.freebsd.org/cgi/man.cgi?query=chflags&sektion=1]] +(FreeBSD, Mac OS X) +for more information on file attributes. +
    '''ARCHIVE_EXTRACT_MAC_METADATA'''
    +Mac OS X specific. Restore metadata using +[[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]]. +By default, +[[copyfile(3)|http://www.freebsd.org/cgi/man.cgi?query=copyfile&sektion=3]] +metadata is ignored. +
    '''ARCHIVE_EXTRACT_NO_OVERWRITE'''
    +Existing files on disk will not be overwritten. +By default, existing regular files are truncated and overwritten; +existing directories will have their permissions updated; +other pre-existing objects are unlinked and recreated from scratch. +
    '''ARCHIVE_EXTRACT_OWNER'''
    The user and group IDs should be set on the restored file. By default, the user and group IDs are not restored.
    '''ARCHIVE_EXTRACT_PERM'''
    @@ -120,15 +112,37 @@ is not specified, then SUID and SGID bits will only be restored if the default user and group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed. +
    '''ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS'''
    +Refuse to extract an absolute path. +The default is to not refuse such paths. +
    '''ARCHIVE_EXTRACT_SECURE_NODOTDOT'''
    +Refuse to extract a path that contains a +''..'' +element anywhere within it. +The default is to not refuse such paths. +Note that paths ending in +''..'' +always cause an error, regardless of this flag. +
    '''ARCHIVE_EXTRACT_SECURE_SYMLINKS'''
    +Refuse to extract any object whose final location would be altered +by a symlink on disk. +This is intended to help guard against a variety of mischief +caused by archives that (deliberately or otherwise) extract +files outside of the current directory. +The default is not to perform this check. +If +
    '''ARCHIVE_EXTRACT_SPARSE'''
    +Scan data for blocks of NUL bytes and try to recreate them with holes. +This results in sparse files, independent of whether the archive format +supports or uses them. +'''ARCHIVE_EXTRACT_UNLINK''' +is specified together with this option, the library will +remove any intermediate symlinks it finds and return an +error only if such symlink could not be removed.
    '''ARCHIVE_EXTRACT_TIME'''
    The timestamps (mtime, ctime, and atime) should be restored. By default, they are ignored. Note that restoring of atime is not currently supported. -
    '''ARCHIVE_EXTRACT_NO_OVERWRITE'''
    -Existing files on disk will not be overwritten. -By default, existing regular files are truncated and overwritten; -existing directories will have their permissions updated; -other pre-existing objects are unlinked and recreated from scratch.
    '''ARCHIVE_EXTRACT_UNLINK'''
    Existing files on disk will be unlinked before any attempt to create them. @@ -136,45 +150,18 @@ In some cases, this can prove to be a significant performance improvement. By default, existing files are truncated and rewritten, but the file is not recreated. In particular, the default behavior does not break existing hard links. -
    '''ARCHIVE_EXTRACT_ACL'''
    -Attempt to restore ACLs. -By default, extended ACLs are ignored. -
    '''ARCHIVE_EXTRACT_FFLAGS'''
    -Attempt to restore extended file flags. -By default, file flags are ignored.
    '''ARCHIVE_EXTRACT_XATTR'''
    -Attempt to restore POSIX.1e extended attributes. +Attempt to restore extended file attributes. By default, they are ignored. -
    '''ARCHIVE_EXTRACT_SECURE_SYMLINKS'''
    -Refuse to extract any object whose final location would be altered -by a symlink on disk. -This is intended to help guard against a variety of mischief -caused by archives that (deliberately or otherwise) extract -files outside of the current directory. -The default is not to perform this check. -If -'''ARCHIVE_EXTRACT_UNLINK''' -is specified together with this option, the library will -remove any intermediate symlinks it finds and return an -error only if such symlink could not be removed. -
    '''ARCHIVE_EXTRACT_SECURE_NODOTDOT'''
    -Refuse to extract a path that contains a -''..'' -element anywhere within it. -The default is to not refuse such paths. -Note that paths ending in -''..'' -always cause an error, regardless of this flag. -
    '''ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS'''
    -Refuse to extract an absolute path. -The default is to not refuse such paths. -
    '''ARCHIVE_EXTRACT_SPARSE'''
    -Scan data for blocks of NUL bytes and try to recreate them with holes. -This results in sparse files, independent of whether the archive format -supports or uses them. -
    '''ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS'''
    -Before removing a file system object prior to replacing it, clear -platform-specific file flags which might prevent its removal. +See +[[xattr(7)|http://www.freebsd.org/cgi/man.cgi?query=xattr&sektion=7]] +(Linux,) +[[xattr(2)|http://www.freebsd.org/cgi/man.cgi?query=xattr&sektion=2]] +(Mac OS X,) +or +[[getextattr(8)|http://www.freebsd.org/cgi/man.cgi?query=getextattr&sektion=8]] +(FreeBSD) +for more information on extended file attributes.
'''archive_write_disk_set_group_lookup'''(), @@ -211,68 +198,14 @@ the number of calls to [[getpwnam(3)|http://www.freebsd.org/cgi/man.cgi?query=getpwnam&sektion=3]] and [[getgrnam(3)|http://www.freebsd.org/cgi/man.cgi?query=getgrnam&sektion=3]]. -
'''archive_write_header'''()
-Build and write a header using the data in the provided -'''struct archive_entry''' -structure. -See -[[ManPageArchiveEntry3]] -for information on creating and populating -'''struct archive_entry''' -objects. -
'''archive_write_data'''()
-Write data corresponding to the header just written. -Returns number of bytes written or -1 on error. -
'''archive_write_data_block'''()
-Write data corresponding to the header just written. -This is like -'''archive_write_data'''() -except that it performs a seek on the file being -written to the specified offset before writing the data. -This is useful when restoring sparse files from archive -formats that support sparse files. -Returns number of bytes written or -1 on error. -(Note: This is currently not supported for -'''archive_write''' -handles, only for -'''archive_write_disk''' -handles.) -
'''archive_write_finish_entry'''()
-Close out the entry just written. -Ordinarily, clients never need to call this, as it -is called automatically by -'''archive_write_next_header'''() -and -'''archive_write_close'''() -as needed. -However, some file attributes are written to disk only -after the file is closed, so this can be necessary -if you need to work with the file on disk right away. -
'''archive_write_close'''()
-Set any attributes that could not be set during the initial restore. -For example, directory timestamps are not restored initially because -restoring a subsequent file would alter that timestamp. -Similarly, non-writable directories are initially created with -write permissions (so that their contents can be restored). -The -'''archive_write_disk_new''' -library maintains a list of all such deferred attributes and -sets them when this function is invoked. -
'''archive_write_finish'''()
-This is a deprecated synonym for -'''archive_write_free'''(). -
'''archive_write_free'''()
-Invokes -'''archive_write_close'''() -if it was not invoked manually, then releases all resources.
More information about the ''struct'' archive object and the overall design of the library can be found in the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] overview. Many of these functions are also documented under -[[ManPageArchiveWrite3]]. +[[ManPagerchiverite3]]. == RETURN VALUES == Most functions return '''ARCHIVE_OK''' @@ -305,10 +238,10 @@ and '''archive_error_string'''() functions. == SEE ALSO == -[[ManPageArchiveRead3]], -[[ManPageArchiveWrite3]], +[[ManPagerchiveead3]], +[[ManPagerchiverite3]], [[ManPageBsdtar1]], -[[ManPageLibarchive3]] +[[ManPageibarchive3]] == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki index b9148e9ba6b..3ec3e46e017 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFilter3.wiki @@ -119,10 +119,10 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteFormat3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteormat3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFinishEntry3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFinishEntry3.wiki index 3d6ff146852..7896d36be1f 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFinishEntry3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFinishEntry3.wiki @@ -19,6 +19,9 @@ is called automatically by and '''archive_write_close'''() as needed. +For +'''archive_write_disk''' +handles, this flushes pending file attribute changes like modification time. == RETURN VALUES == This function returns '''ARCHIVE_OK''' @@ -39,9 +42,9 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteData3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiveriteata3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFormat3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFormat3.wiki index 60fa69c54b6..697fb115a4a 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFormat3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFormat3.wiki @@ -165,7 +165,7 @@ Supported extensions: .7z, .zip, .jar, .cpio, .iso, .a, .ar, .tar, .tgz, .tar.gz
Set the format as specified. More details on the formats supported by libarchive can be found in the -[[ManPageLibarchiveFormats5]] +[[ManPageibarchiveormats5]] manual page.
== RETURN VALUES == @@ -181,10 +181,10 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], -[[ManPageLibarchiveFormats5]], +[[ManPageibarchiveormats5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFree3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFree3.wiki index 1d94a56b16f..4ca2cf9c798 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFree3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteFree3.wiki @@ -66,8 +66,8 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteHeader3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteHeader3.wiki index 412db20eddd..22547ea2468 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteHeader3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteHeader3.wiki @@ -15,7 +15,7 @@ Build and write a header using the data in the provided '''struct archive_entry''' structure. See -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] for information on creating and populating '''struct archive_entry''' objects. @@ -37,8 +37,8 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteNew3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteNew3.wiki index b8c311f7012..3feb06718e5 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteNew3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteNew3.wiki @@ -20,12 +20,12 @@ is returned on error. A complete description of the '''struct archive''' object can be found in the overview manual page for -[[ManPageLibarchive3]]. +[[ManPageibarchive3]]. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteOpen3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteOpen3.wiki index 369d7554a6d..aebd23975e0 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteOpen3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteOpen3.wiki @@ -101,13 +101,13 @@ have specifically set the block size. More information about the ''struct'' archive object and the overall design of the library can be found in the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] overview. Note that the convenience forms above vary in how they block the output. See -[[ManPageArchiveWriteBlocksize3]] +[[ManPagerchiveritelocksize3]] if you need to control the block size used for writes or the end-of-file padding behavior. == CLIENT CALLBACKS == @@ -196,13 +196,13 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteBlocksize3]], -[[ManPageArchiveWriteFilter3]], -[[ManPageArchiveWriteFormat3]], -[[ManPageArchiveWriteNew3]], -[[ManPageArchiveWriteSetOptions3]], +[[ManPageibarchive3]], +[[ManPagerchiverite3]], +[[ManPagerchiveritelocksize3]], +[[ManPagerchiveriteilter3]], +[[ManPagerchiveriteormat3]], +[[ManPagerchiveriteew3]], +[[ManPagerchiveriteetptions3]], [[ManPageCpio5]], [[ManPageMtree5]], [[ManPageTar5]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki index f2c60fc073e..7c78d80dc30 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki @@ -422,9 +422,9 @@ and functions. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageLibarchive3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveWrite3]] +[[ManPageibarchive3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchiverite3]] == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki b/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki index d5a3a2de106..d186bc55fe3 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageBsdcpio1.wiki @@ -115,10 +115,10 @@ The POSIX.1 tar format. The default format is ''odc''. See -[[ManPageLibarchiveFormats5]] +[[ManPageibarchiveormats5]] for more complete information about the formats currently supported by the underlying -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library.
-h, --help
Print usage information. @@ -365,9 +365,9 @@ standard syntax. [[gzip(1)|http://www.freebsd.org/cgi/man.cgi?query=gzip&sektion=1]], [[mt(1)|http://www.freebsd.org/cgi/man.cgi?query=mt&sektion=1]], [[pax(1)|http://www.freebsd.org/cgi/man.cgi?query=pax&sektion=1]], -[[ManPageLibarchive3]], +[[ManPageibarchive3]], [[ManPageCpio5]], -[[ManPageLibarchiveFormats5]], +[[ManPageibarchiveormats5]], [[ManPageTar5]] == STANDARDS == There is no current POSIX standard for the cpio command; it appeared @@ -397,7 +397,7 @@ actually predates even though it was not well-known outside of AT&T until some time later. This is a complete re-implementation based on the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library. == BUGS == The cpio archive format has several basic limitations: diff --git a/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki b/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki index e6c5260f22c..7dda43daa10 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki @@ -160,7 +160,7 @@ restricted pax format and bzip2 compression. (c, r, u, x modes only) Archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of --no-acls -and the default behavior in c, r, and u modes (except Mac OS X) or if +and the default behavior in c, r, and u modes (except on Mac OS X) or if '''tar''' is run in x mode as root. On Mac OS X this option translates extended ACLs to NFSv4 ACLs. To store extended ACLs the @@ -212,7 +212,7 @@ Supported formats include and "ustar". Other formats may also be supported; see -[[ManPageLibarchiveFormats5]] +[[ManPageibarchiveormats5]] for more information about currently-supported formats. In r and u modes, when extending an existing archive, the format specified here must be compatible with the format of the existing archive on disk. @@ -389,7 +389,7 @@ except it compares mtime entries instead of ctime entries. Honor the nodump file flag by skipping this file.
--nopreserveHFSCompression
(x mode only) -Mac OS X specific(v10.6 or later). Do not compress extracted regular files +Mac OS X specific (v10.6 or later). Do not compress extracted regular files which were compressed with HFS+ compression before archived. By default, compress the regular files again with HFS+ compression.
--null
@@ -409,7 +409,7 @@ Do not archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of --acls and the default behavior if '''tar''' -is run as non-root in x mode (on Mac OS X also in c, r and u modes). +is run as non-root in x mode (on Mac OS X as any user in c, r, u and x modes).
--no-fflags
(c, r, u, x modes only) Do not archive or extract file flags. This is the reverse of @@ -443,14 +443,7 @@ This is the reverse of -p and the default behavior if '''tar''' -is run as non-root and can be overridden by also specifying ---acls, ---fflags, ---mac-metadata, ---same-owner, ---same-permissions -and ---xattrs. +is run as non-root.
--no-xattrs
(c, r, u, x modes only) Do not archive or extract extended attributes. This is the reverse of @@ -640,16 +633,16 @@ This option suppresses these behaviors. (x mode only) Preserve file permissions. 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 +extended attributes and extended file flags, if available, for each item +extracted from the archive. This is te reverse of +--no-same-permissions +and the default if '''tar''' -is being run by root and can be overridden by also specifying +is being run by root and can be partially overridden by also specifying --no-acls, --no-fflags, ---no-mac-metadata, ---no-same-owner, ---no-same-permissions -and +--no-mac-metadata +or --no-xattrs.
--passphrase ''passphrase''
The @@ -993,9 +986,9 @@ For more details, see the explanation of the and '''archive_write_set_options'''() API calls that are described in -[[ManPageArchiveRead3]] +[[ManPagerchiveead3]] and -[[ManPageArchiveWrite3]]. +[[ManPagerchiverite3]]. == COMPATIBILITY == The bundled-arguments format is supported for compatibility with historic implementations. @@ -1138,8 +1131,8 @@ components, or symlinks to other directories. [[pax(1)|http://www.freebsd.org/cgi/man.cgi?query=pax&sektion=1]], [[shar(1)|http://www.freebsd.org/cgi/man.cgi?query=shar&sektion=1]], [[xz(1)|http://www.freebsd.org/cgi/man.cgi?query=xz&sektion=1]], -[[ManPageLibarchive3]], -[[ManPageLibarchiveFormats5]], +[[ManPageibarchive3]], +[[ManPageibarchiveormats5]], [[ManPageTar5]] == STANDARDS == There is no current POSIX standard for the tar command; it appeared @@ -1171,7 +1164,7 @@ beginning with FreeBSD 1.0. This is a complete re-implementation based on the -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library. It was first released with FreeBSD 5.4 diff --git a/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki b/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki index 3cb828b9443..2d7ae34b925 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageLibarchive3.wiki @@ -117,19 +117,19 @@ More detailed information can be found in the individual manual pages for each API or utility function. == READING AN ARCHIVE == See -[[ManPageArchiveRead3]]. +[[ManPagerchiveead3]]. == WRITING AN ARCHIVE == See -[[ManPageArchiveWrite3]]. +[[ManPagerchiverite3]]. == WRITING ENTRIES TO DISK == The -[[ManPageArchiveWriteDisk3]] +[[ManPagerchiveriteisk3]] API allows you to write -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects to disk using the same API used by -[[ManPageArchiveWrite3]]. +[[ManPagerchiverite3]]. The -[[ManPageArchiveWriteDisk3]] +[[ManPagerchiveriteisk3]] API is used internally by '''archive_read_extract'''('';'') using it directly can provide greater control over how entries @@ -139,21 +139,21 @@ archive-to-archive copy and archive-to-disk extraction operations. == READING ENTRIES FROM DISK == The -[[ManPageArchiveReadDisk3]] +[[ManPagerchiveeadisk3]] supports for populating -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects from information in the filesystem. This includes the information accessible from the [[stat(2)|http://www.freebsd.org/cgi/man.cgi?query=stat&sektion=2]] system call as well as ACLs, extended attributes, and other metadata. The -[[ManPageArchiveReadDisk3]] +[[ManPagerchiveeadisk3]] API also supports iterating over directory trees, which allows directories of files to be read using an API compatible with the -[[ManPageArchiveRead3]] +[[ManPagerchiveead3]] API. == DESCRIPTION == Detailed descriptions of each function are provided by the @@ -168,7 +168,7 @@ The structure contains a complete description of a single archive entry. It uses an opaque interface that is fully documented in -[[ManPageArchiveEntry3]]. +[[ManPagerchiventry3]]. Users familiar with historic formats should be aware that the newer variants have eliminated most restrictions on the length of textual fields. @@ -216,14 +216,14 @@ and functions can be used to obtain more information. == ENVIRONMENT == There are character set conversions within the -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] functions that are impacted by the currently-selected locale. == SEE ALSO == [[ManPageBsdtar1]], -[[ManPageArchiveEntry3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveUtil3]], -[[ManPageArchiveWrite3]], +[[ManPagerchiventry3]], +[[ManPagerchiveead3]], +[[ManPagerchivetil3]], +[[ManPagerchiverite3]], [[ManPageTar5]] == HISTORY == The diff --git a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveChanges3.wiki b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveChanges3.wiki index 8893b8ba8db..ce9814e13f3 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveChanges3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveChanges3.wiki @@ -1,5 +1,6 @@ LIBARCHIVE_CHANGES(3) manual page == NAME == +'''libarchive_changes''' - changes in libarchive interface == CHANGES IN LIBARCHIVE 3 == This page describes user-visible changes in libarchive3, and lists @@ -291,13 +292,13 @@ ARCHIVE_DEFAULT_BYTES_PER_BLOCK ```
== SEE ALSO == -[[ManPageLibarchive3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveReadFilter3]], -[[ManPageArchiveReadFormat3]], -[[ManPageArchiveReadSetOptions3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteFilter3]], -[[ManPageArchiveWriteFormat3]], -[[ManPageArchiveWriteSetOptions3]], -[[ManPageArchiveUtil3]] +[[ManPageibarchive3]], +[[ManPagerchiveead3]], +[[ManPagerchiveeadilter3]], +[[ManPagerchiveeadormat3]], +[[ManPagerchiveeadetptions3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteilter3]], +[[ManPagerchiveriteormat3]], +[[ManPagerchiveriteetptions3]], +[[ManPagerchivetil3]] diff --git a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki index 54663b2094d..7623d919822 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki @@ -4,7 +4,7 @@ LIBARCHIVE-FORMATS(5) manual page - archive formats supported by the libarchive library == DESCRIPTION == The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library reads and writes a variety of streaming archive formats. Generally speaking, all of these archive formats consist of a series of "entries". @@ -21,7 +21,7 @@ to support, though many programs do use libarchive convenience functions to enable all supported formats. === Tar Formats=== The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library can read most tar archives. It can write POSIX-standard "ustar" @@ -40,7 +40,7 @@ subsequent entries.
'''gnutar'''
The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library can read most GNU-format tar archives. It currently supports the most popular GNU extensions, including modern long filename and linkname support, as well as atime and ctime data. @@ -50,12 +50,12 @@ It can read GNU sparse file entries, including the new POSIX-based formats. The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library can write GNU tar format, including long filename and linkname support, as well as atime and ctime data.
'''pax'''
The -[[ManPageLibarchive3]] +[[ManPageibarchive3]] library can read and write POSIX-compliant pax interchange format archives. Pax interchange format archives are an extension of the older ustar @@ -379,7 +379,7 @@ although many of the keywords cannot currently be stored in an '''archive_entry''' object. When writing, libarchive supports use of the -[[ManPageArchiveWriteSetOptions3]] +[[ManPagerchiveriteetptions3]] interface to specify which keywords should be included in the output. If libarchive was compiled with access to suitable diff --git a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki index c7841683462..a980ba4ce33 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageLibarchiveInternals3.wiki @@ -13,15 +13,15 @@ make it easy to add new archive and compression formats. Externally, libarchive exposes most operations through an opaque, object-style interface. The -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects store information about a single filesystem object. The rest of the library provides facilities to write -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects to archive files, read them from archive files, and write them to disk. (There are plans to add a facility to read -[[ManPageArchiveEntry3]] +[[ManPagerchiventry3]] objects from disk as well.) The read and write APIs each have four layers: a public API @@ -37,7 +37,7 @@ an archive or disk writer, and then use a single set of code to select and write entries, regardless of the target. == READ ARCHITECTURE == From the outside, clients use the -[[ManPageArchiveRead3]] +[[ManPagerchiveead3]] API to manipulate an '''archive''' object to read entries and bodies from an archive stream. @@ -50,9 +50,9 @@ The API has four layers: The lowest layer is the I/O layer. This layer can be overridden by clients, but most clients use the packaged I/O callbacks provided, for example, by -[[ManPageArchiveReadOpenMemory3]], +[[ManPagerchiveeadpenemory3]], and -[[ManPageArchiveReadOpenFd3]]. +[[ManPagerchiveeadpend3]]. The compression layer calls the I/O layer to read bytes and decompresses them for the format layer. The format layer unpacks a stream of uncompressed bytes and @@ -319,11 +319,11 @@ Fortunately, such archives are very rare, and libarchive can read most ZIP archives, though it cannot always extract as much information as a dedicated ZIP program. == SEE ALSO == -[[ManPageArchiveEntry3]], -[[ManPageArchiveRead3]], -[[ManPageArchiveWrite3]], -[[ManPageArchiveWriteDisk3]] -[[ManPageLibarchive3]], +[[ManPagerchiventry3]], +[[ManPagerchiveead3]], +[[ManPagerchiverite3]], +[[ManPagerchiveriteisk3]] +[[ManPageibarchive3]], == HISTORY == The '''libarchive''' diff --git a/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki b/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki index c6078035e75..c8c486a1f62 100644 --- a/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki +++ b/archivers/libarchive/files/doc/wiki/ManPageMtree5.wiki @@ -16,7 +16,7 @@ Leading whitespace is always ignored. When encoding file or pathnames, any backslash character or character outside of the 95 printable ASCII characters must be -encoded as a a backslash followed by three +encoded as a backslash followed by three octal digits. When reading mtree files, any appearance of a backslash followed by three octal digits should be converted into the diff --git a/archivers/libarchive/files/libarchive/CMakeLists.txt b/archivers/libarchive/files/libarchive/CMakeLists.txt index 1f85c014586..5e958da1c53 100644 --- a/archivers/libarchive/files/libarchive/CMakeLists.txt +++ b/archivers/libarchive/files/libarchive/CMakeLists.txt @@ -14,6 +14,7 @@ SET(include_HEADERS # Sources and private headers SET(libarchive_SOURCES archive_acl.c + archive_acl_private.h archive_check_magic.c archive_cmdline.c archive_cmdline_private.h @@ -47,6 +48,8 @@ SET(libarchive_SOURCES archive_pathmatch.c archive_pathmatch.h archive_platform.h + archive_platform_acl.h + archive_platform_xattr.h archive_ppmd_private.h archive_ppmd7.c archive_ppmd7_private.h @@ -106,9 +109,9 @@ SET(libarchive_SOURCES archive_string_composition.h archive_string_sprintf.c archive_util.c + archive_version_details.c archive_virtual.c archive_write.c - archive_write_disk_acl.c archive_write_disk_posix.c archive_write_disk_private.h archive_write_disk_set_standard_lookup.c @@ -210,6 +213,16 @@ IF(WIN32 AND NOT CYGWIN) LIST(APPEND libarchive_SOURCES filter_fork_windows.c) ENDIF(WIN32 AND NOT CYGWIN) +IF(ARCHIVE_ACL_DARWIN) + LIST(APPEND libarchive_SOURCES archive_disk_acl_darwin.c) +ELSEIF(ARCHIVE_ACL_FREEBSD) + LIST(APPEND libarchive_SOURCES archive_disk_acl_freebsd.c) +ELSEIF(ARCHIVE_ACL_LIBACL) + LIST(APPEND libarchive_SOURCES archive_disk_acl_linux.c) +ELSEIF(ARCHIVE_ACL_SUNOS) + LIST(APPEND libarchive_SOURCES archive_disk_acl_sunos.c) +ENDIF() + # Libarchive is a shared library ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) diff --git a/archivers/libarchive/files/libarchive/archive.h b/archivers/libarchive/files/libarchive/archive.h index d400735a272..316a68a6336 100644 --- a/archivers/libarchive/files/libarchive/archive.h +++ b/archivers/libarchive/files/libarchive/archive.h @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3003001 +#define ARCHIVE_VERSION_NUMBER 3003002 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.3.1" +#define ARCHIVE_VERSION_ONLY_STRING "3.3.2" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); diff --git a/archivers/libarchive/files/libarchive/archive_check_magic.c b/archivers/libarchive/files/libarchive/archive_check_magic.c index c695e582a24..288ce233855 100644 --- a/archivers/libarchive/files/libarchive/archive_check_magic.c +++ b/archivers/libarchive/files/libarchive/archive_check_magic.c @@ -62,7 +62,7 @@ errmsg(const char *m) } } -static void +static __LA_DEAD void diediedie(void) { #if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG) diff --git a/archivers/libarchive/files/libarchive/archive_entry.3 b/archivers/libarchive/files/libarchive/archive_entry.3 index f5e22af8512..f75916c9e41 100644 --- a/archivers/libarchive/files/libarchive/archive_entry.3 +++ b/archivers/libarchive/files/libarchive/archive_entry.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Feburary 2, 2012 +.Dd February 2, 2012 .Dt ARCHIVE_ENTRY 3 .Os .Sh NAME diff --git a/archivers/libarchive/files/libarchive/archive_entry.c b/archivers/libarchive/files/libarchive/archive_entry.c index e268194143d..30fb4566eb9 100644 --- a/archivers/libarchive/files/libarchive/archive_entry.c +++ b/archivers/libarchive/files/libarchive/archive_entry.c @@ -1638,7 +1638,7 @@ _archive_entry_acl_text_l(struct archive_entry *entry, int flags, * SUCH DAMAGE. */ -static struct flag { +static const struct flag { const char *name; const wchar_t *wname; unsigned long set; @@ -1708,6 +1708,9 @@ static struct flag { #ifdef UF_COMPRESSED { "nocompressed",L"nocompressed", UF_COMPRESSED, 0 }, #endif +#ifdef UF_HIDDEN + { "nohidden", L"nohidden", UF_HIDDEN, 0 }, +#endif #if defined(FS_UNRM_FL) { "nouunlink", L"nouunlink", FS_UNRM_FL, 0}, #elif defined(EXT2_UNRM_FL) @@ -1840,7 +1843,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bitclear) char *string, *dp; const char *sp; unsigned long bits; - struct flag *flag; + const struct flag *flag; size_t length; bits = bitset | bitclear; @@ -1892,7 +1895,7 @@ static const char * ae_strtofflags(const char *s, unsigned long *setp, unsigned long *clrp) { const char *start, *end; - struct flag *flag; + const struct flag *flag; unsigned long set, clear; const char *failed; @@ -1960,7 +1963,7 @@ static const wchar_t * ae_wcstofflags(const wchar_t *s, unsigned long *setp, unsigned long *clrp) { const wchar_t *start, *end; - struct flag *flag; + const struct flag *flag; unsigned long set, clear; const wchar_t *failed; diff --git a/archivers/libarchive/files/libarchive/archive_entry.h b/archivers/libarchive/files/libarchive/archive_entry.h index 7645f0cf601..bcc2962b983 100644 --- a/archivers/libarchive/files/libarchive/archive_entry.h +++ b/archivers/libarchive/files/libarchive/archive_entry.h @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3003001 +#define ARCHIVE_VERSION_NUMBER 3003002 /* * Note: archive_entry.h is for use outside of libarchive; the diff --git a/archivers/libarchive/files/libarchive/archive_entry_acl.3 b/archivers/libarchive/files/libarchive/archive_entry_acl.3 index c5115f7274d..534dbfac6ef 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_acl.3 +++ b/archivers/libarchive/files/libarchive/archive_entry_acl.3 @@ -32,7 +32,7 @@ .Nm archive_entry_acl_clear , .Nm archive_entry_acl_count , .Nm archive_entry_acl_from_text , -.Nm archive_entry_acl_from_text_w, +.Nm archive_entry_acl_from_text_w , .Nm archive_entry_acl_next , .Nm archive_entry_acl_next_w , .Nm archive_entry_acl_reset , @@ -267,7 +267,7 @@ Only inherit, do not apply the permission on the directory itself. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT ( Sy n ) Do not propagate inherit flags. Only first-level entries inherit ACLs. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS ( Sy S ) -Trigger alarm or audit on succesful access. +Trigger alarm or audit on successful access. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS ( Sy F ) Trigger alarm or audit on failed access. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_INHERITED ( Sy I ) @@ -279,7 +279,7 @@ and .Fn archive_entry_acl_add_entry_w add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions -are updated. An archive enry cannot contain both POSIX.1e and NFSv4 ACL +are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. .Pp .Fn archive_entry_acl_clear @@ -303,7 +303,7 @@ for POSIX.1e ACLs and for NFSv4 ACLs. For POSIX.1e ACLs if .Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, -the three non-extened ACLs are added. +the three non-extended ACLs are added. .Pp .Fn archive_entry_acl_from_text and @@ -367,7 +367,7 @@ and .Fn archive_entry_acl_to_text_w convert the ACL entries for the given type into a .Pq wide -string of ACL entries separated by newline. If the the pointer +string of ACL entries separated by newline. If the pointer .Fa len_p is not NULL, then the function shall return the length of the string .Pq not including the NULL terminator diff --git a/archivers/libarchive/files/libarchive/archive_entry_paths.3 b/archivers/libarchive/files/libarchive/archive_entry_paths.3 index fd22cf7e20c..f647212a98b 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_paths.3 +++ b/archivers/libarchive/files/libarchive/archive_entry_paths.3 @@ -31,25 +31,25 @@ .Nm archive_entry_set_hardlink , .Nm archive_entry_copy_hardlink , .Nm archive_entry_copy_hardlink_w , -.Nm archve_entry_update_hardlink_utf8 , +.Nm archive_entry_update_hardlink_utf8 , .Nm archive_entry_set_link , .Nm archive_entry_copy_link , .Nm archive_entry_copy_link_w , -.Nm archve_entry_update_link_utf8 , +.Nm archive_entry_update_link_utf8 , .Nm archive_entry_pathname , .Nm archive_entry_pathname_w , .Nm archive_entry_set_pathname , .Nm archive_entry_copy_pathname , .Nm archive_entry_copy_pathname_w , -.Nm archve_entry_update_pathname_utf8 , +.Nm archive_entry_update_pathname_utf8 , .Nm archive_entry_sourcepath , .Nm archive_entry_copy_sourcepath , -.Nm archive_entry_symlink, -.Nm archive_entry_symlink_w, +.Nm archive_entry_symlink , +.Nm archive_entry_symlink_w , .Nm archive_entry_set_symlink , .Nm archive_entry_copy_symlink , .Nm archive_entry_copy_symlink_w , -.Nm archve_entry_update_symlink_utf8 +.Nm archive_entry_update_symlink_utf8 .Nd functions for manipulating path names in archive entry descriptions .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) diff --git a/archivers/libarchive/files/libarchive/archive_entry_perms.3 b/archivers/libarchive/files/libarchive/archive_entry_perms.3 index 340c5ea7248..aae3648bb21 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_perms.3 +++ b/archivers/libarchive/files/libarchive/archive_entry_perms.3 @@ -34,8 +34,8 @@ .Nm archive_entry_perm , .Nm archive_entry_set_perm , .Nm archive_entry_strmode , -.Nm archive_entry_uname -.Nm archive_entry_uname_w +.Nm archive_entry_uname , +.Nm archive_entry_uname_w , .Nm archive_entry_set_uname , .Nm archive_entry_copy_uname , .Nm archive_entry_copy_uname_w , diff --git a/archivers/libarchive/files/libarchive/archive_entry_sparse.c b/archivers/libarchive/files/libarchive/archive_entry_sparse.c index fed74f5121d..74917b37b80 100644 --- a/archivers/libarchive/files/libarchive/archive_entry_sparse.c +++ b/archivers/libarchive/files/libarchive/archive_entry_sparse.c @@ -51,7 +51,7 @@ archive_entry_sparse_clear(struct archive_entry *entry) void archive_entry_sparse_add_entry(struct archive_entry *entry, - int64_t offset, int64_t length) + la_int64_t offset, la_int64_t length) { struct ae_sparse *sp; @@ -135,7 +135,7 @@ archive_entry_sparse_reset(struct archive_entry * entry) int archive_entry_sparse_next(struct archive_entry * entry, - int64_t *offset, int64_t *length) + la_int64_t *offset, la_int64_t *length) { if (entry->sparse_p) { *offset = entry->sparse_p->offset; diff --git a/archivers/libarchive/files/libarchive/archive_getdate.c b/archivers/libarchive/files/libarchive/archive_getdate.c index beb0cba2ed3..030c083ce71 100644 --- a/archivers/libarchive/files/libarchive/archive_getdate.c +++ b/archivers/libarchive/files/libarchive/archive_getdate.c @@ -691,7 +691,7 @@ Convert(time_t Month, time_t Day, time_t Year, time_t Hours, time_t Minutes, time_t Seconds, time_t Timezone, enum DSTMODE DSTmode) { - static int DaysInMonth[12] = { + signed char DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t Julian; diff --git a/archivers/libarchive/files/libarchive/archive_pack_dev.c b/archivers/libarchive/files/libarchive/archive_pack_dev.c index ccd88129a15..c968a5a45b1 100644 --- a/archivers/libarchive/files/libarchive/archive_pack_dev.c +++ b/archivers/libarchive/files/libarchive/archive_pack_dev.c @@ -1,4 +1,4 @@ -/* $NetBSD: archive_pack_dev.c,v 1.3 2017/02/25 21:11:20 joerg Exp $ */ +/* $NetBSD: archive_pack_dev.c,v 1.4 2017/08/01 22:26:23 joerg Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include #endif #if !defined(lint) -__RCSID("$NetBSD: archive_pack_dev.c,v 1.3 2017/02/25 21:11:20 joerg Exp $"); +__RCSID("$NetBSD: archive_pack_dev.c,v 1.4 2017/08/01 22:26:23 joerg Exp $"); #endif /* not lint */ #ifdef HAVE_LIMITS_H @@ -280,7 +280,7 @@ pack_bsdos(int n, unsigned long numbers[], const char **error) /* list of formats and pack functions */ /* this list must be sorted lexically */ -static struct format { +static const struct format { const char *name; pack_t *pack; } formats[] = { diff --git a/archivers/libarchive/files/libarchive/archive_pack_dev.h b/archivers/libarchive/files/libarchive/archive_pack_dev.h index 15e59f4a151..0a8d252e787 100644 --- a/archivers/libarchive/files/libarchive/archive_pack_dev.h +++ b/archivers/libarchive/files/libarchive/archive_pack_dev.h @@ -1,4 +1,4 @@ -/* $NetBSD: archive_pack_dev.h,v 1.3 2017/02/25 21:11:20 joerg Exp $ */ +/* $NetBSD: archive_pack_dev.h,v 1.4 2017/08/01 22:26:23 joerg Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. diff --git a/archivers/libarchive/files/libarchive/archive_platform.h b/archivers/libarchive/files/libarchive/archive_platform.h index 128f0e08878..34be8edaa57 100644 --- a/archivers/libarchive/files/libarchive/archive_platform.h +++ b/archivers/libarchive/files/libarchive/archive_platform.h @@ -142,40 +142,6 @@ #define INTMAX_MIN ((intmax_t)(~INTMAX_MAX)) #endif -/* - * If this platform has , acl_create(), acl_init(), - * acl_set_file(), and ACL_USER, we assume it has the rest of the - * POSIX.1e draft functions used in archive_read_extract.c. - */ -#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE -#if HAVE_DECL_ACL_USER -#define HAVE_POSIX_ACL 1 -#elif HAVE_DECL_ACL_TYPE_EXTENDED -#define HAVE_DARWIN_ACL 1 -#endif -#if HAVE_DECL_ACL_TYPE_NFS4 -#define HAVE_FREEBSD_NFS4_ACL 1 -#endif -#endif - -/* - * If this platform has , acl(), facl() and ACLENT_T - * facl_set() and types aclent_t and ace_t it uses Solaris-style ACL functions - */ -#if HAVE_SYS_ACL_H && HAVE_ACL && HAVE_FACL && HAVE_ACLENT_T && \ - HAVE_DECL_GETACL && HAVE_DECL_GETACLCNT && HAVE_DECL_SETACL -#define HAVE_SUN_ACL 1 -#if HAVE_ACE_T && HAVE_DECL_ACE_GETACL && HAVE_DECL_ACE_GETACLCNT && \ - HAVE_DECL_ACE_SETACL -#define HAVE_SUN_NFS4_ACL 1 -#endif -#endif - -/* Define if platform supports NFSv4 ACLs */ -#if HAVE_FREEBSD_NFS4_ACL || HAVE_SUN_NFS4_ACL || HAVE_DARWIN_ACL -#define HAVE_NFS4_ACL 1 -#endif - /* * If we can't restore metadata using a file descriptor, then * for compatibility's sake, close files before trying to restore metadata. diff --git a/archivers/libarchive/files/libarchive/archive_read.c b/archivers/libarchive/files/libarchive/archive_read.c index d1fecebfd09..a642a336def 100644 --- a/archivers/libarchive/files/libarchive/archive_read.c +++ b/archivers/libarchive/files/libarchive/archive_read.c @@ -881,7 +881,8 @@ archive_read_data(struct archive *_a, void *buff, size_t s) len = a->read_data_remaining; if (len > s) len = s; - memcpy(dest, a->read_data_block, len); + if (len) + memcpy(dest, a->read_data_block, len); s -= len; a->read_data_block += len; a->read_data_remaining -= len; diff --git a/archivers/libarchive/files/libarchive/archive_read_disk.3 b/archivers/libarchive/files/libarchive/archive_read_disk.3 index 2a5c1305ebd..027f63cb630 100644 --- a/archivers/libarchive/files/libarchive/archive_read_disk.3 +++ b/archivers/libarchive/files/libarchive/archive_read_disk.3 @@ -24,11 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 2016 +.Dd April 3, 2017 .Dt ARCHIVE_READ_DISK 3 .Os .Sh NAME .Nm archive_read_disk_new , +.Nm archive_read_disk_set_behavior , .Nm archive_read_disk_set_symlink_logical , .Nm archive_read_disk_set_symlink_physical , .Nm archive_read_disk_set_symlink_hybrid , @@ -37,10 +38,7 @@ .Nm archive_read_disk_uname , .Nm archive_read_disk_set_uname_lookup , .Nm archive_read_disk_set_gname_lookup , -.Nm archive_read_disk_set_standard_lookup , -.Nm archive_read_close , -.Nm archive_read_finish , -.Nm archive_read_free +.Nm archive_read_disk_set_standard_lookup .Nd functions for reading objects from disk .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -49,6 +47,8 @@ Streaming Archive Library (libarchive, -larchive) .Ft struct archive * .Fn archive_read_disk_new "void" .Ft int +.Fn archive_read_disk_set_behavior "struct archive *" "int" +.Ft int .Fn archive_read_disk_set_symlink_logical "struct archive *" .Ft int .Fn archive_read_disk_set_symlink_physical "struct archive *" @@ -81,12 +81,6 @@ Streaming Archive Library (libarchive, -larchive) .Fa "int fd" .Fa "const struct stat *" .Fc -.Ft int -.Fn archive_read_close "struct archive *" -.Ft int -.Fn archive_read_finish "struct archive *" -.Ft int -.Fn archive_read_free "struct archive *" .Sh DESCRIPTION These functions provide an API for reading information about objects on disk. @@ -98,6 +92,51 @@ objects. Allocates and initializes a .Tn struct archive object suitable for reading object information from disk. +.It Fn archive_read_disk_set_behavior +Configures various behavior options when reading entries from disk. +The flags field consists of a bitwise OR of one or more of the +following values: +.Bl -tag -compact -width "indent" +.It Cm ARCHIVE_READDISK_HONOR_NODUMP +Skip files and directories with the nodump file attribute (file flag) set. +By default, the nodump file atrribute is ignored. +.It Cm ARCHIVE_READDISK_MAC_COPYFILE +Mac OS X specific. Read metadata (ACLs and extended attributes) with +.Xr copyfile 3 . +By default, metadata is read using +.Xr copyfile 3 . +.It Cm ARCHIVE_READDISK_NO_ACL +Do not read Access Control Lists. +By default, ACLs are read from disk. +.It Cm ARCHIVE_READDISK_NO_FFLAGS +Do not read file attributes (file flags). +By default, file attributes are read from disk. +See +.Xr chattr 1 +.Pq Linux +or +.Xr chflags 1 +.Pq FreeBSD, Mac OS X +for more information on file attributes. +.It Cm ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS +Do not traverse mount points. +By defaut, moint points are traversed. +.It Cm ARCHIVE_READDISK_NO_XATTR +Do not read extended file attributes (xattrs). +By default, extended file attributes are read from disk. +See +.Xr xattr 7 +.Pq Linux , +.Xr xattr 2 +.Pq Mac OS X , +or +.Xr getextattr 8 +.Pq FreeBSD +for more information on extended file attributes. +.It Cm ARCHIVE_READDISK_RESTORE_ATIME +Restore access time of traversed files. +By default, access time of traversed files is not restored. +.El .It Xo .Fn archive_read_disk_set_symlink_logical , .Fn archive_read_disk_set_symlink_physical , @@ -181,17 +220,6 @@ using the currently registered lookup functions above. This affects the file ownership fields and ACL values in the .Tn struct archive_entry object. -.It Fn archive_read_close -Does nothing for -.Tn archive_read_disk -handles. -.It Fn archive_read_finish -This is a deprecated synonym for -.Fn archive_read_free . -.It Fn archive_read_free -Invokes -.Fn archive_read_close -if it was not invoked manually, then releases all resources. .El More information about the .Va struct archive diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c b/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c index 4fcbb6e9705..548ba89ef3d 100644 --- a/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c +++ b/archivers/libarchive/files/libarchive/archive_read_disk_entry_from_file.c @@ -26,21 +26,14 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk_entry_from_file.c 201084 2009-12-28 02:14:09Z kientzle $"); +__FBSDID("$FreeBSD"); /* This is the tree-walking code for POSIX systems. */ #if !defined(_WIN32) || defined(__CYGWIN__) #ifdef HAVE_SYS_TYPES_H -/* Mac OSX requires sys/types.h before sys/acl.h. */ #include #endif -#ifdef HAVE_SYS_ACL_H -#include -#endif -#ifdef HAVE_DARWIN_ACL -#include -#endif #ifdef HAVE_SYS_EXTATTR_H #include #endif @@ -61,9 +54,6 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk_entry_from_file.c 2010 #ifdef HAVE_SYS_EA_H #include #endif -#ifdef HAVE_ACL_LIBACL_H -#include -#endif #ifdef HAVE_COPYFILE_H #include #endif @@ -111,25 +101,6 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk_entry_from_file.c 2010 #define O_CLOEXEC 0 #endif -/* - * Linux and FreeBSD plug this obvious hole in POSIX.1e in - * different ways. - */ -#if HAVE_ACL_GET_PERM -#define ACL_GET_PERM acl_get_perm -#elif HAVE_ACL_GET_PERM_NP -#define ACL_GET_PERM acl_get_perm_np -#endif - -/* NFSv4 platform ACL type */ -#if HAVE_DARWIN_ACL -#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_EXTENDED -#elif HAVE_FREEBSD_NFS4_ACL -#define ARCHIVE_PLATFORM_ACL_TYPE_NFS4 ACL_TYPE_NFS4 -#endif - -static int setup_acls(struct archive_read_disk *, - struct archive_entry *, int *fd); static int setup_mac_metadata(struct archive_read_disk *, struct archive_entry *, int *fd); static int setup_xattrs(struct archive_read_disk *, @@ -141,6 +112,45 @@ static int setup_sparse_fiemap(struct archive_read_disk *, struct archive_entry *, int *fd); #endif +#if !ARCHIVE_ACL_SUPPORT +int +archive_read_disk_entry_setup_acls(struct archive_read_disk *a, + struct archive_entry *entry, int *fd) +{ + (void)a; /* UNUSED */ + (void)entry; /* UNUSED */ + (void)fd; /* UNUSED */ + return (ARCHIVE_OK); +} +#endif + +/* + * Enter working directory and return working pathname of archive_entry. + * If a pointer to an integer is provided and its value is below zero + * open a file descriptor on this pahtname. + */ +const char * +archive_read_disk_entry_setup_path(struct archive_read_disk *a, + struct archive_entry *entry, int *fd) +{ + const char *path; + + path = archive_entry_sourcepath(entry); + + if (path == NULL || (a->tree != NULL && + a->tree_enter_working_dir(a->tree) != 0)) + path = archive_entry_pathname(entry); + if (path == NULL) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Couldn't determine path"); + } else if (fd != NULL && *fd < 0 && a->tree != NULL && + (a->follow_symlinks || archive_entry_filetype(entry) != AE_IFLNK)) { + *fd = a->open_on_current_dir(a->tree, path, + O_RDONLY | O_NONBLOCK); + } + return (path); +} + int archive_read_disk_entry_from_file(struct archive *_a, struct archive_entry *entry, @@ -275,7 +285,7 @@ archive_read_disk_entry_from_file(struct archive *_a, r = 0; if ((a->flags & ARCHIVE_READDISK_NO_ACL) == 0) - r = setup_acls(a, entry, &fd); + r = archive_read_disk_entry_setup_acls(a, entry, &fd); if ((a->flags & ARCHIVE_READDISK_NO_XATTR) == 0) { r1 = setup_xattrs(a, entry, &fd); if (r1 < r) @@ -324,19 +334,10 @@ setup_mac_metadata(struct archive_read_disk *a, struct archive_string tempfile; (void)fd; /* UNUSED */ - name = archive_entry_sourcepath(entry); + + name = archive_read_disk_entry_setup_path(a, entry, NULL); if (name == NULL) - name = archive_entry_pathname(entry); - else if (a->tree != NULL && a->tree_enter_working_dir(a->tree) != 0) { - archive_set_error(&a->archive, errno, - "Can't change dir to read extended attributes"); - return (ARCHIVE_FAILED); - } - if (name == NULL) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Can't open file to read extended attributes: No name"); return (ARCHIVE_WARN); - } /* Short-circuit if there's nothing to do. */ have_attrs = copyfile(name, NULL, 0, copyfile_flags | COPYFILE_CHECK); @@ -422,1110 +423,10 @@ setup_mac_metadata(struct archive_read_disk *a, } #endif -#if HAVE_DARWIN_ACL -static int translate_guid(struct archive *, acl_entry_t, - int *, int *, const char **); - -static void add_trivial_nfs4_acl(struct archive_entry *); -#endif - -#if HAVE_SUN_ACL -static int -sun_acl_is_trivial(void *, int, mode_t, int, int, int *); - -static void * -sunacl_get(int cmd, int *aclcnt, int fd, const char *path) -{ - int cnt, cntcmd; - size_t size; - void *aclp; - - if (cmd == GETACL) { - cntcmd = GETACLCNT; - size = sizeof(aclent_t); - } -#if HAVE_SUN_NFS4_ACL - else if (cmd == ACE_GETACL) { - cntcmd = ACE_GETACLCNT; - size = sizeof(ace_t); - } -#endif - else { - errno = EINVAL; - *aclcnt = -1; - return (NULL); - } - - aclp = NULL; - cnt = -2; - - while (cnt == -2 || (cnt == -1 && errno == ENOSPC)) { - if (path != NULL) - cnt = acl(path, cntcmd, 0, NULL); - else - cnt = facl(fd, cntcmd, 0, NULL); - - if (cnt > 0) { - if (aclp == NULL) - aclp = malloc(cnt * size); - else - aclp = realloc(NULL, cnt * size); - if (aclp != NULL) { - if (path != NULL) - cnt = acl(path, cmd, cnt, aclp); - else - cnt = facl(fd, cmd, cnt, aclp); - } - } else { - if (aclp != NULL) { - free(aclp); - aclp = NULL; - } - break; - } - } - - *aclcnt = cnt; - return (aclp); -} -#endif /* HAVE_SUN_ACL */ - -#if HAVE_POSIX_ACL || HAVE_NFS4_ACL -static int translate_acl(struct archive_read_disk *a, - struct archive_entry *entry, -#if HAVE_SUN_ACL - void *aclp, - int aclcnt, -#else - acl_t acl, -#endif - int archive_entry_acl_type); - -static int -setup_acls(struct archive_read_disk *a, - struct archive_entry *entry, int *fd) -{ - const char *accpath; -#if HAVE_SUN_ACL - void *aclp; - int aclcnt; -#else - acl_t acl; -#endif - int r; - - accpath = NULL; - -#if HAVE_SUN_ACL || HAVE_DARWIN_ACL || HAVE_ACL_GET_FD_NP - if (*fd < 0) -#else - /* For default ACLs on Linux we need reachable accpath */ - if (*fd < 0 || S_ISDIR(archive_entry_mode(entry))) -#endif - { - accpath = archive_entry_sourcepath(entry); - if (accpath == NULL || (a->tree != NULL && - a->tree_enter_working_dir(a->tree) != 0)) - accpath = archive_entry_pathname(entry); - if (accpath == NULL) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Couldn't determine file path to read ACLs"); - return (ARCHIVE_WARN); - } - if (a->tree != NULL && -#if !HAVE_SUN_ACL && !HAVE_DARWIN_ACL && !HAVE_ACL_GET_FD_NP - *fd < 0 && -#endif - (a->follow_symlinks || - archive_entry_filetype(entry) != AE_IFLNK)) { - *fd = a->open_on_current_dir(a->tree, - accpath, O_RDONLY | O_NONBLOCK); - } - } - - archive_entry_acl_clear(entry); - -#if HAVE_SUN_ACL - aclp = NULL; -#else - acl = NULL; -#endif - -#if HAVE_NFS4_ACL - /* Try NFSv4 ACL first. */ - if (*fd >= 0) -#if HAVE_SUN_ACL - aclp = sunacl_get(ACE_GETACL, &aclcnt, *fd, NULL); -#elif HAVE_ACL_GET_FD_NP - acl = acl_get_fd_np(*fd, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); -#else - acl = acl_get_fd(*fd); -#endif -#if HAVE_ACL_GET_LINK_NP - else if (!a->follow_symlinks) - acl = acl_get_link_np(accpath, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); -#else - else if ((!a->follow_symlinks) - && (archive_entry_filetype(entry) == AE_IFLNK)) - /* We can't get the ACL of a symlink, so we assume it can't - have one. */ -#if HAVE_SUN_ACL - aclp = NULL; -#else - acl = NULL; -#endif -#endif /* !HAVE_ACL_GET_LINK_NP */ - else -#if HAVE_SUN_ACL - /* Solaris reads both POSIX.1e and NFSv4 ACLs here */ - aclp = sunacl_get(ACE_GETACL, &aclcnt, 0, accpath); -#else - acl = acl_get_file(accpath, ARCHIVE_PLATFORM_ACL_TYPE_NFS4); -#endif - - - /* Ignore "trivial" ACLs that just mirror the file mode. */ -#if HAVE_SUN_ACL - if (aclp != NULL && sun_acl_is_trivial(aclp, aclcnt, - archive_entry_mode(entry), 1, S_ISDIR(archive_entry_mode(entry)), - &r) == 0 && r == 1) { - free(aclp); - aclp = NULL; - return (ARCHIVE_OK); - } -#elif HAVE_ACL_IS_TRIVIAL_NP - if (acl != NULL && acl_is_trivial_np(acl, &r) == 0 && r == 1) { - acl_free(acl); - acl = NULL; - return (ARCHIVE_OK); - } -#endif - -#if HAVE_SUN_ACL - if (aclp != NULL) -#else - if (acl != NULL) -#endif - { - r = translate_acl(a, entry, -#if HAVE_SUN_ACL - aclp, aclcnt, -#else - acl, -#endif - ARCHIVE_ENTRY_ACL_TYPE_NFS4); -#if HAVE_SUN_ACL - free(aclp); - aclp = NULL; -#else - acl_free(acl); - acl = NULL; -#endif - - if (r != ARCHIVE_OK) { - archive_set_error(&a->archive, errno, - "Couldn't translate NFSv4 ACLs"); - } -#if HAVE_DARWIN_ACL - /* - * Because Mac OS doesn't support owner@, group@ and everyone@ - * ACLs we need to add NFSv4 ACLs mirroring the file mode to - * the archive entry. Otherwise extraction on non-Mac platforms - * would lead to an invalid file mode. - */ - if ((archive_entry_acl_types(entry) & - ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) - add_trivial_nfs4_acl(entry); -#endif - return (r); - } -#endif /* HAVE_NFS4_ACL */ - -#if HAVE_POSIX_ACL || HAVE_SUN_ACL - /* This code path is skipped on MacOS */ - - /* Retrieve access ACL from file. */ - if (*fd >= 0) -#if HAVE_SUN_ACL - aclp = sunacl_get(GETACL, &aclcnt, *fd, NULL); -#else - acl = acl_get_fd(*fd); -#endif -#if HAVE_ACL_GET_LINK_NP - else if (!a->follow_symlinks) - acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS); -#else - else if ((!a->follow_symlinks) - && (archive_entry_filetype(entry) == AE_IFLNK)) - /* We can't get the ACL of a symlink, so we assume it can't - have one. */ -#if HAVE_SUN_ACL - aclp = NULL; -#else - acl = NULL; -#endif -#endif /* !HAVE_ACL_GET_LINK_NP */ - else -#if HAVE_SUN_ACL - aclp = sunacl_get(GETACL, &aclcnt, 0, accpath); -#else - acl = acl_get_file(accpath, ACL_TYPE_ACCESS); -#endif - - - /* Ignore "trivial" ACLs that just mirror the file mode. */ -#if HAVE_SUN_ACL - if (aclp != NULL && sun_acl_is_trivial(aclp, aclcnt, - archive_entry_mode(entry), 0, S_ISDIR(archive_entry_mode(entry)), - &r) == 0 && r == 1) { - free(aclp); - aclp = NULL; - } -#elif HAVE_ACL_IS_TRIVIAL_NP - if (acl != NULL && acl_is_trivial_np(acl, &r) == 0 && r == 1) { - acl_free(acl); - acl = NULL; - } -#endif - -#if HAVE_SUN_ACL - if (aclp != NULL) -#else - if (acl != NULL) -#endif - { - r = translate_acl(a, entry, -#if HAVE_SUN_ACL - aclp, aclcnt, -#else - acl, -#endif - ARCHIVE_ENTRY_ACL_TYPE_ACCESS); -#if HAVE_SUN_ACL - free(aclp); - aclp = NULL; -#else - acl_free(acl); - acl = NULL; -#endif - - if (r != ARCHIVE_OK) { - archive_set_error(&a->archive, errno, - "Couldn't translate access ACLs"); - return (r); - } - } - -#if !HAVE_SUN_ACL - /* Only directories can have default ACLs. */ - if (S_ISDIR(archive_entry_mode(entry))) { -#if HAVE_ACL_GET_FD_NP - if (*fd >= 0) - acl = acl_get_fd_np(*fd, ACL_TYPE_DEFAULT); - else -#endif - acl = acl_get_file(accpath, ACL_TYPE_DEFAULT); - if (acl != NULL) { - r = translate_acl(a, entry, acl, - ARCHIVE_ENTRY_ACL_TYPE_DEFAULT); - acl_free(acl); - if (r != ARCHIVE_OK) { - archive_set_error(&a->archive, errno, - "Couldn't translate default ACLs"); - return (r); - } - } - } -#endif /* !HAVE_SUN_ACL */ -#endif /* HAVE_POSIX_ACL || HAVE_SUN_ACL */ - return (ARCHIVE_OK); -} - -/* - * Translate system ACL permissions into libarchive internal structure - */ -static const struct { - const int archive_perm; - const int platform_perm; -} acl_perm_map[] = { -#if HAVE_SUN_ACL /* Solaris NFSv4 ACL permissions */ - {ARCHIVE_ENTRY_ACL_EXECUTE, ACE_EXECUTE}, - {ARCHIVE_ENTRY_ACL_READ_DATA, ACE_READ_DATA}, - {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACE_LIST_DIRECTORY}, - {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACE_WRITE_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_FILE, ACE_ADD_FILE}, - {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACE_APPEND_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACE_ADD_SUBDIRECTORY}, - {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACE_READ_NAMED_ATTRS}, - {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACE_WRITE_NAMED_ATTRS}, - {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACE_DELETE_CHILD}, - {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACE_READ_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACE_WRITE_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_DELETE, ACE_DELETE}, - {ARCHIVE_ENTRY_ACL_READ_ACL, ACE_READ_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACE_WRITE_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACE_WRITE_OWNER}, - {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACE_SYNCHRONIZE} -#elif HAVE_DARWIN_ACL /* MacOS ACL permissions */ - {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, - {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, - {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, - {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, - {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, - {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, - {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, - {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_EXTATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_EXTATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_SECURITY}, - {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_SECURITY}, - {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_CHANGE_OWNER}, -#if HAVE_DECL_ACL_SYNCHRONIZE - {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} -#endif -#else /* POSIX.1e ACL permissions */ - {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, - {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, - {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, -#if HAVE_FREEBSD_NFS4_ACL /* FreeBSD NFSv4 ACL permissions */ - {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, - {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, - {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, - {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, - {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, - {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_NAMED_ATTRS}, - {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_NAMED_ATTRS}, - {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, - {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, - {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, - {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, - {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, - {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} -#endif -#endif /* !HAVE_SUN_ACL && !HAVE_DARWIN_ACL */ -}; - -#if HAVE_NFS4_ACL -/* - * Translate system NFSv4 inheritance flags into libarchive internal structure - */ -static const struct { - const int archive_inherit; - const int platform_inherit; -} acl_inherit_map[] = { -#if HAVE_SUN_NFS4_ACL /* Solaris ACL inheritance flags */ - {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACE_FILE_INHERIT_ACE}, - {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACE_DIRECTORY_INHERIT_ACE}, - {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACE_NO_PROPAGATE_INHERIT_ACE}, - {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACE_INHERIT_ONLY_ACE}, - {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACE_SUCCESSFUL_ACCESS_ACE_FLAG}, - {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACE_FAILED_ACCESS_ACE_FLAG}, -#ifdef ACE_INHERITED_ACE - {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACE_INHERITED_ACE} -#endif -#elif HAVE_DARWIN_ACL /* MacOS NFSv4 inheritance flags */ - {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}, - {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_LIMIT_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_ONLY_INHERIT} -#else /* FreeBSD NFSv4 ACL inheritance flags */ - {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}, - {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, - {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, -#ifdef ACE_INHERITED_ACE - {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED} -#endif -#endif /* !HAVE_SUN_NFS4_ACL && !HAVE_DARWIN_ACL */ -}; -#endif /* HAVE_NFS4_ACL */ - -#if HAVE_DARWIN_ACL -static int translate_guid(struct archive *a, acl_entry_t acl_entry, - int *ae_id, int *ae_tag, const char **ae_name) -{ - void *q; - uid_t ugid; - int r, idtype; - - q = acl_get_qualifier(acl_entry); - if (q == NULL) - return (1); - r = mbr_uuid_to_id((const unsigned char *)q, &ugid, &idtype); - if (r != 0) { - acl_free(q); - return (1); - } - if (idtype == ID_TYPE_UID) { - *ae_tag = ARCHIVE_ENTRY_ACL_USER; - *ae_id = ugid; - *ae_name = archive_read_disk_uname(a, *ae_id); - } else if (idtype == ID_TYPE_GID) { - *ae_tag = ARCHIVE_ENTRY_ACL_GROUP; - *ae_id = ugid; - *ae_name = archive_read_disk_gname(a, *ae_id); - } else - r = 1; - - acl_free(q); - return (r); -} - -/* - * Add trivial NFSv4 ACL entries from mode - */ -static void -add_trivial_nfs4_acl(struct archive_entry *entry) -{ - mode_t mode; - int i; - const int rperm = ARCHIVE_ENTRY_ACL_READ_DATA; - const int wperm = ARCHIVE_ENTRY_ACL_WRITE_DATA | - ARCHIVE_ENTRY_ACL_APPEND_DATA; - const int eperm = ARCHIVE_ENTRY_ACL_EXECUTE; - const int pubset = ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES | - ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS | - ARCHIVE_ENTRY_ACL_READ_ACL | - ARCHIVE_ENTRY_ACL_SYNCHRONIZE; - const int ownset = pubset | ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES | - ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS | - ARCHIVE_ENTRY_ACL_WRITE_ACL | - ARCHIVE_ENTRY_ACL_WRITE_OWNER; - - struct { - const int type; - const int tag; - int permset; - } tacl_entry[] = { - {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_USER_OBJ, 0}, - {ARCHIVE_ENTRY_ACL_TYPE_DENY, ARCHIVE_ENTRY_ACL_USER_OBJ, 0}, - {ARCHIVE_ENTRY_ACL_TYPE_DENY, ARCHIVE_ENTRY_ACL_GROUP_OBJ, 0}, - {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_USER_OBJ, ownset}, - {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_GROUP_OBJ, pubset}, - {ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_EVERYONE, pubset} - }; - - mode = archive_entry_mode(entry); - - /* Permissions for everyone@ */ - if (mode & 0004) - tacl_entry[5].permset |= rperm; - if (mode & 0002) - tacl_entry[5].permset |= wperm; - if (mode & 0001) - tacl_entry[5].permset |= eperm; - - /* Permissions for group@ */ - if (mode & 0040) - tacl_entry[4].permset |= rperm; - else if (mode & 0004) - tacl_entry[2].permset |= rperm; - if (mode & 0020) - tacl_entry[4].permset |= wperm; - else if (mode & 0002) - tacl_entry[2].permset |= wperm; - if (mode & 0010) - tacl_entry[4].permset |= eperm; - else if (mode & 0001) - tacl_entry[2].permset |= eperm; - - /* Permissions for owner@ */ - if (mode & 0400) { - tacl_entry[3].permset |= rperm; - if (!(mode & 0040) && (mode & 0004)) - tacl_entry[0].permset |= rperm; - } else if ((mode & 0040) || (mode & 0004)) - tacl_entry[1].permset |= rperm; - if (mode & 0200) { - tacl_entry[3].permset |= wperm; - if (!(mode & 0020) && (mode & 0002)) - tacl_entry[0].permset |= wperm; - } else if ((mode & 0020) || (mode & 0002)) - tacl_entry[1].permset |= wperm; - if (mode & 0100) { - tacl_entry[3].permset |= eperm; - if (!(mode & 0010) && (mode & 0001)) - tacl_entry[0].permset |= eperm; - } else if ((mode & 0010) || (mode & 0001)) - tacl_entry[1].permset |= eperm; - - for (i = 0; i < 6; i++) { - if (tacl_entry[i].permset != 0) { - archive_entry_acl_add_entry(entry, - tacl_entry[i].type, tacl_entry[i].permset, - tacl_entry[i].tag, -1, NULL); - } - } - - return; -} -#elif HAVE_SUN_ACL -/* - * Check if acl is trivial - * This is a FreeBSD acl_is_trivial_np() implementation for Solaris - */ -static int -sun_acl_is_trivial(void *aclp, int aclcnt, mode_t mode, int is_nfs4, - int is_dir, int *trivialp) -{ - int i, p; -#if HAVE_SUN_NFS4_ACL - const uint32_t rperm = ACE_READ_DATA; - const uint32_t wperm = ACE_WRITE_DATA | ACE_APPEND_DATA; - const uint32_t eperm = ACE_EXECUTE; - const uint32_t pubset = ACE_READ_ATTRIBUTES | ACE_READ_NAMED_ATTRS | - ACE_READ_ACL | ACE_SYNCHRONIZE; - const uint32_t ownset = pubset | ACE_WRITE_ATTRIBUTES | - ACE_WRITE_NAMED_ATTRS | ACE_WRITE_ACL | ACE_WRITE_OWNER; - - ace_t *ace; - ace_t tace[6]; -#endif - - if (aclp == NULL || trivialp == NULL) - return (-1); - - *trivialp = 0; - - /* - * POSIX.1e ACLs marked with ACL_IS_TRIVIAL are compatible with - * FreeBSD acl_is_trivial_np(). On Solaris they have 4 entries, - * including mask. - */ - if (!is_nfs4) { - if (aclcnt == 4) - *trivialp = 1; - return (0); - } - -#if HAVE_SUN_NFS4_ACL - /* - * Continue with checking NFSv4 ACLs - * - * Create list of trivial ace's to be compared - */ - - /* owner@ allow pre */ - tace[0].a_flags = ACE_OWNER; - tace[0].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; - tace[0].a_access_mask = 0; - - /* owner@ deny */ - tace[1].a_flags = ACE_OWNER; - tace[1].a_type = ACE_ACCESS_DENIED_ACE_TYPE; - tace[1].a_access_mask = 0; - - /* group@ deny */ - tace[2].a_flags = ACE_GROUP | ACE_IDENTIFIER_GROUP; - tace[2].a_type = ACE_ACCESS_DENIED_ACE_TYPE; - tace[2].a_access_mask = 0; - - /* owner@ allow */ - tace[3].a_flags = ACE_OWNER; - tace[3].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; - tace[3].a_access_mask = ownset; - - /* group@ allow */ - tace[4].a_flags = ACE_GROUP | ACE_IDENTIFIER_GROUP; - tace[4].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; - tace[4].a_access_mask = pubset; - - /* everyone@ allow */ - tace[5].a_flags = ACE_EVERYONE; - tace[5].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE; - tace[5].a_access_mask = pubset; - - /* Permissions for everyone@ */ - if (mode & 0004) - tace[5].a_access_mask |= rperm; - if (mode & 0002) - tace[5].a_access_mask |= wperm; - if (mode & 0001) - tace[5].a_access_mask |= eperm; - - /* Permissions for group@ */ - if (mode & 0040) - tace[4].a_access_mask |= rperm; - else if (mode & 0004) - tace[2].a_access_mask |= rperm; - if (mode & 0020) - tace[4].a_access_mask |= wperm; - else if (mode & 0002) - tace[2].a_access_mask |= wperm; - if (mode & 0010) - tace[4].a_access_mask |= eperm; - else if (mode & 0001) - tace[2].a_access_mask |= eperm; - - /* Permissions for owner@ */ - if (mode & 0400) { - tace[3].a_access_mask |= rperm; - if (!(mode & 0040) && (mode & 0004)) - tace[0].a_access_mask |= rperm; - } else if ((mode & 0040) || (mode & 0004)) - tace[1].a_access_mask |= rperm; - if (mode & 0200) { - tace[3].a_access_mask |= wperm; - if (!(mode & 0020) && (mode & 0002)) - tace[0].a_access_mask |= wperm; - } else if ((mode & 0020) || (mode & 0002)) - tace[1].a_access_mask |= wperm; - if (mode & 0100) { - tace[3].a_access_mask |= eperm; - if (!(mode & 0010) && (mode & 0001)) - tace[0].a_access_mask |= eperm; - } else if ((mode & 0010) || (mode & 0001)) - tace[1].a_access_mask |= eperm; - - /* Check if the acl count matches */ - p = 3; - for (i = 0; i < 3; i++) { - if (tace[i].a_access_mask != 0) - p++; - } - if (aclcnt != p) - return (0); - - p = 0; - for (i = 0; i < 6; i++) { - if (tace[i].a_access_mask != 0) { - ace = &((ace_t *)aclp)[p]; - /* - * Illumos added ACE_DELETE_CHILD to write perms for - * directories. We have to check against that, too. - */ - if (ace->a_flags != tace[i].a_flags || - ace->a_type != tace[i].a_type || - (ace->a_access_mask != tace[i].a_access_mask && - (!is_dir || (tace[i].a_access_mask & wperm) == 0 || - ace->a_access_mask != - (tace[i].a_access_mask | ACE_DELETE_CHILD)))) - return (0); - p++; - } - } - - *trivialp = 1; -#else /* !HAVE_SUN_NFS4_ACL */ - (void)aclp; /* UNUSED */ -#endif /* !HAVE_SUN_NFS4_ACL */ - return (0); -} -#endif /* HAVE_SUN_ACL */ - -#if HAVE_SUN_ACL -/* - * Translate Solaris POSIX.1e and NFSv4 ACLs into libarchive internal ACL - */ -static int -translate_acl(struct archive_read_disk *a, - struct archive_entry *entry, void *aclp, int aclcnt, - int default_entry_acl_type) -{ - int e, i; - int ae_id, ae_tag, ae_perm; - int entry_acl_type; - const char *ae_name; - aclent_t *aclent; -#if HAVE_SUN_NFS4_ACL - ace_t *ace; -#endif - - if (aclcnt <= 0) - return (ARCHIVE_OK); - - for (e = 0; e < aclcnt; e++) { - ae_name = NULL; - ae_tag = 0; - ae_perm = 0; - -#if HAVE_SUN_NFS4_ACL - if (default_entry_acl_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { - ace = &((ace_t *)aclp)[e]; - ae_id = ace->a_who; - - switch(ace->a_type) { - case ACE_ACCESS_ALLOWED_ACE_TYPE: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALLOW; - break; - case ACE_ACCESS_DENIED_ACE_TYPE: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_DENY; - break; - case ACE_SYSTEM_AUDIT_ACE_TYPE: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ACCESS; - break; - case ACE_SYSTEM_ALARM_ACE_TYPE: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALARM; - break; - default: - /* Unknown entry type, skip */ - continue; - } - - if ((ace->a_flags & ACE_OWNER) != 0) - ae_tag = ARCHIVE_ENTRY_ACL_USER_OBJ; - else if ((ace->a_flags & ACE_GROUP) != 0) - ae_tag = ARCHIVE_ENTRY_ACL_GROUP_OBJ; - else if ((ace->a_flags & ACE_EVERYONE) != 0) - ae_tag = ARCHIVE_ENTRY_ACL_EVERYONE; - else if ((ace->a_flags & ACE_IDENTIFIER_GROUP) != 0) { - ae_tag = ARCHIVE_ENTRY_ACL_GROUP; - ae_name = archive_read_disk_gname(&a->archive, - ae_id); - } else { - ae_tag = ARCHIVE_ENTRY_ACL_USER; - ae_name = archive_read_disk_uname(&a->archive, - ae_id); - } - - for (i = 0; i < (int)(sizeof(acl_inherit_map) / - sizeof(acl_inherit_map[0])); ++i) { - if ((ace->a_flags & - acl_inherit_map[i].platform_inherit) != 0) - ae_perm |= - acl_inherit_map[i].archive_inherit; - } - - for (i = 0; i < (int)(sizeof(acl_perm_map) / - sizeof(acl_perm_map[0])); ++i) { - if ((ace->a_access_mask & - acl_perm_map[i].platform_perm) != 0) - ae_perm |= - acl_perm_map[i].archive_perm; - } - } else -#endif /* HAVE_SUN_NFS4_ACL */ - if (default_entry_acl_type == ARCHIVE_ENTRY_ACL_TYPE_ACCESS) { - aclent = &((aclent_t *)aclp)[e]; - if ((aclent->a_type & ACL_DEFAULT) != 0) - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_DEFAULT; - else - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ACCESS; - ae_id = aclent->a_id; - - switch(aclent->a_type) { - case DEF_USER: - case USER: - ae_name = archive_read_disk_uname(&a->archive, - ae_id); - ae_tag = ARCHIVE_ENTRY_ACL_USER; - break; - case DEF_GROUP: - case GROUP: - ae_name = archive_read_disk_gname(&a->archive, - ae_id); - ae_tag = ARCHIVE_ENTRY_ACL_GROUP; - break; - case DEF_CLASS_OBJ: - case CLASS_OBJ: - ae_tag = ARCHIVE_ENTRY_ACL_MASK; - break; - case DEF_USER_OBJ: - case USER_OBJ: - ae_tag = ARCHIVE_ENTRY_ACL_USER_OBJ; - break; - case DEF_GROUP_OBJ: - case GROUP_OBJ: - ae_tag = ARCHIVE_ENTRY_ACL_GROUP_OBJ; - break; - case DEF_OTHER_OBJ: - case OTHER_OBJ: - ae_tag = ARCHIVE_ENTRY_ACL_OTHER; - break; - default: - /* Unknown tag type, skip */ - continue; - } - - if ((aclent->a_perm & 1) != 0) - ae_perm |= ARCHIVE_ENTRY_ACL_EXECUTE; - if ((aclent->a_perm & 2) != 0) - ae_perm |= ARCHIVE_ENTRY_ACL_WRITE; - if ((aclent->a_perm & 4) != 0) - ae_perm |= ARCHIVE_ENTRY_ACL_READ; - } else - return (ARCHIVE_WARN); - - archive_entry_acl_add_entry(entry, entry_acl_type, - ae_perm, ae_tag, ae_id, ae_name); - } - return (ARCHIVE_OK); -} -#else /* !HAVE_SUN_ACL */ -/* - * Translate POSIX.1e (Linux), FreeBSD (both POSIX.1e and NFSv4) and - * MacOS (NFSv4 only) ACLs into libarchive internal structure - */ -static int -translate_acl(struct archive_read_disk *a, - struct archive_entry *entry, acl_t acl, int default_entry_acl_type) -{ - acl_tag_t acl_tag; -#if HAVE_FREEBSD_NFS4_ACL - acl_entry_type_t acl_type; - int brand; -#endif -#if HAVE_FREEBSD_NFS4_ACL || HAVE_DARWIN_ACL - acl_flagset_t acl_flagset; -#endif - acl_entry_t acl_entry; - acl_permset_t acl_permset; - int i, entry_acl_type; - int r, s, ae_id, ae_tag, ae_perm; -#if !HAVE_DARWIN_ACL - void *q; -#endif - const char *ae_name; - -#if HAVE_FREEBSD_NFS4_ACL - // FreeBSD "brands" ACLs as POSIX.1e or NFSv4 - // Make sure the "brand" on this ACL is consistent - // with the default_entry_acl_type bits provided. - if (acl_get_brand_np(acl, &brand) != 0) { - archive_set_error(&a->archive, errno, - "Failed to read ACL brand"); - return (ARCHIVE_WARN); - } - switch (brand) { - case ACL_BRAND_POSIX: - switch (default_entry_acl_type) { - case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: - case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: - break; - default: - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Invalid ACL entry type for POSIX.1e ACL"); - return (ARCHIVE_WARN); - } - break; - case ACL_BRAND_NFS4: - if (default_entry_acl_type & ~ARCHIVE_ENTRY_ACL_TYPE_NFS4) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Invalid ACL entry type for NFSv4 ACL"); - return (ARCHIVE_WARN); - } - break; - default: - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Unknown ACL brand"); - return (ARCHIVE_WARN); - } -#endif - - s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); - if (s == -1) { - archive_set_error(&a->archive, errno, - "Failed to get first ACL entry"); - return (ARCHIVE_WARN); - } - -#if HAVE_DARWIN_ACL - while (s == 0) -#else /* FreeBSD, Linux */ - while (s == 1) -#endif - { - ae_id = -1; - ae_name = NULL; - ae_perm = 0; - - if (acl_get_tag_type(acl_entry, &acl_tag) != 0) { - archive_set_error(&a->archive, errno, - "Failed to get ACL tag type"); - return (ARCHIVE_WARN); - } - switch (acl_tag) { -#if !HAVE_DARWIN_ACL /* FreeBSD, Linux */ - case ACL_USER: - q = acl_get_qualifier(acl_entry); - if (q != NULL) { - ae_id = (int)*(uid_t *)q; - acl_free(q); - ae_name = archive_read_disk_uname(&a->archive, - ae_id); - } - ae_tag = ARCHIVE_ENTRY_ACL_USER; - break; - case ACL_GROUP: - q = acl_get_qualifier(acl_entry); - if (q != NULL) { - ae_id = (int)*(gid_t *)q; - acl_free(q); - ae_name = archive_read_disk_gname(&a->archive, - ae_id); - } - ae_tag = ARCHIVE_ENTRY_ACL_GROUP; - break; - case ACL_MASK: - ae_tag = ARCHIVE_ENTRY_ACL_MASK; - break; - case ACL_USER_OBJ: - ae_tag = ARCHIVE_ENTRY_ACL_USER_OBJ; - break; - case ACL_GROUP_OBJ: - ae_tag = ARCHIVE_ENTRY_ACL_GROUP_OBJ; - break; - case ACL_OTHER: - ae_tag = ARCHIVE_ENTRY_ACL_OTHER; - break; -#if HAVE_FREEBSD_NFS4_ACL - case ACL_EVERYONE: - ae_tag = ARCHIVE_ENTRY_ACL_EVERYONE; - break; -#endif -#else /* HAVE_DARWIN_ACL */ - case ACL_EXTENDED_ALLOW: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALLOW; - r = translate_guid(&a->archive, acl_entry, &ae_id, - &ae_tag, &ae_name); - break; - case ACL_EXTENDED_DENY: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_DENY; - r = translate_guid(&a->archive, acl_entry, &ae_id, - &ae_tag, &ae_name); - break; -#endif /* HAVE_DARWIN_ACL */ - default: - /* Skip types that libarchive can't support. */ - s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); - continue; - } - -#if HAVE_DARWIN_ACL - /* Skip if translate_guid() above failed */ - if (r != 0) { - s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); - continue; - } -#endif - -#if !HAVE_DARWIN_ACL - // XXX acl_type maps to allow/deny/audit/YYYY bits - entry_acl_type = default_entry_acl_type; -#endif -#if HAVE_FREEBSD_NFS4_ACL || HAVE_DARWIN_ACL - if (default_entry_acl_type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) { -#if HAVE_FREEBSD_NFS4_ACL - /* - * acl_get_entry_type_np() fails with non-NFSv4 ACLs - */ - if (acl_get_entry_type_np(acl_entry, &acl_type) != 0) { - archive_set_error(&a->archive, errno, "Failed " - "to get ACL type from a NFSv4 ACL entry"); - return (ARCHIVE_WARN); - } - switch (acl_type) { - case ACL_ENTRY_TYPE_ALLOW: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALLOW; - break; - case ACL_ENTRY_TYPE_DENY: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_DENY; - break; - case ACL_ENTRY_TYPE_AUDIT: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_AUDIT; - break; - case ACL_ENTRY_TYPE_ALARM: - entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALARM; - break; - default: - archive_set_error(&a->archive, errno, - "Invalid NFSv4 ACL entry type"); - return (ARCHIVE_WARN); - } -#endif /* HAVE_FREEBSD_NFS4_ACL */ - - /* - * Libarchive stores "flag" (NFSv4 inheritance bits) - * in the ae_perm bitmap. - * - * acl_get_flagset_np() fails with non-NFSv4 ACLs - */ - if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { - archive_set_error(&a->archive, errno, - "Failed to get flagset from a NFSv4 ACL entry"); - return (ARCHIVE_WARN); - } - for (i = 0; i < (int)(sizeof(acl_inherit_map) / sizeof(acl_inherit_map[0])); ++i) { - r = acl_get_flag_np(acl_flagset, - acl_inherit_map[i].platform_inherit); - if (r == -1) { - archive_set_error(&a->archive, errno, - "Failed to check flag in a NFSv4 " - "ACL flagset"); - return (ARCHIVE_WARN); - } else if (r) - ae_perm |= acl_inherit_map[i].archive_inherit; - } - } -#endif /* HAVE_FREEBSD_NFS4_ACL || HAVE_DARWIN_ACL */ - - if (acl_get_permset(acl_entry, &acl_permset) != 0) { - archive_set_error(&a->archive, errno, - "Failed to get ACL permission set"); - return (ARCHIVE_WARN); - } - for (i = 0; i < (int)(sizeof(acl_perm_map) / sizeof(acl_perm_map[0])); ++i) { - /* - * acl_get_perm() is spelled differently on different - * platforms; see above. - */ - r = ACL_GET_PERM(acl_permset, acl_perm_map[i].platform_perm); - if (r == -1) { - archive_set_error(&a->archive, errno, - "Failed to check permission in an ACL permission set"); - return (ARCHIVE_WARN); - } else if (r) - ae_perm |= acl_perm_map[i].archive_perm; - } - -#if HAVE_DARWIN_ACL && !HAVE_DECL_ACL_SYNCHRONIZE - /* On Mac OS X without ACL_SYNCHRONIZE assume it is set */ - ae_perm |= ARCHIVE_ENTRY_ACL_SYNCHRONIZE; -#endif - - archive_entry_acl_add_entry(entry, entry_acl_type, - ae_perm, ae_tag, - ae_id, ae_name); - - s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); -#if !HAVE_DARWIN_ACL - if (s == -1) { - archive_set_error(&a->archive, errno, - "Failed to get next ACL entry"); - return (ARCHIVE_WARN); - } -#endif - } - return (ARCHIVE_OK); -} -#endif /* !HAVE_SUN_ACL */ -#else /* !HAVE_POSIX_ACL && !HAVE_NFS4_ACL */ -static int -setup_acls(struct archive_read_disk *a, - struct archive_entry *entry, int *fd) -{ - (void)a; /* UNUSED */ - (void)entry; /* UNUSED */ - (void)fd; /* UNUSED */ - return (ARCHIVE_OK); -} -#endif /* !HAVE_POSIX_ACL && !HAVE_NFS4_ACL */ - -#if (HAVE_FGETXATTR && HAVE_FLISTXATTR && HAVE_LISTXATTR && \ - HAVE_LLISTXATTR && HAVE_GETXATTR && HAVE_LGETXATTR) || \ - (HAVE_FGETEA && HAVE_FLISTEA && HAVE_LISTEA) +#if ARCHIVE_XATTR_LINUX || ARCHIVE_XATTR_DARWIN || ARCHIVE_XATTR_AIX /* - * Linux and AIX extended attribute support. + * Linux, Darwin and AIX extended attribute support. * * TODO: By using a stack-allocated buffer for the first * call to getxattr(), we might be able to avoid the second @@ -1543,21 +444,32 @@ setup_xattr(struct archive_read_disk *a, ssize_t size; void *value = NULL; -#if HAVE_FGETXATTR - if (fd >= 0) + + if (fd >= 0) { +#if ARCHIVE_XATTR_LINUX size = fgetxattr(fd, name, NULL, 0); - else if (!a->follow_symlinks) - size = lgetxattr(accpath, name, NULL, 0); - else - size = getxattr(accpath, name, NULL, 0); -#elif HAVE_FGETEA - if (fd >= 0) +#elif ARCHIVE_XATTR_DARWIN + size = fgetxattr(fd, name, NULL, 0, 0, 0); +#elif ARCHIVE_XATTR_AIX size = fgetea(fd, name, NULL, 0); - else if (!a->follow_symlinks) +#endif + } else if (!a->follow_symlinks) { +#if ARCHIVE_XATTR_LINUX + size = lgetxattr(accpath, name, NULL, 0); +#elif ARCHIVE_XATTR_DARWIN + size = getxattr(accpath, name, NULL, 0, 0, XATTR_NOFOLLOW); +#elif ARCHIVE_XATTR_AIX size = lgetea(accpath, name, NULL, 0); - else +#endif + } else { +#if ARCHIVE_XATTR_LINUX + size = getxattr(accpath, name, NULL, 0); +#elif ARCHIVE_XATTR_DARWIN + size = getxattr(accpath, name, NULL, 0, 0, 0); +#elif ARCHIVE_XATTR_AIX size = getea(accpath, name, NULL, 0); #endif + } if (size == -1) { archive_set_error(&a->archive, errno, @@ -1570,21 +482,32 @@ setup_xattr(struct archive_read_disk *a, return (ARCHIVE_FATAL); } -#if HAVE_FGETXATTR - if (fd >= 0) + + if (fd >= 0) { +#if ARCHIVE_XATTR_LINUX size = fgetxattr(fd, name, value, size); - else if (!a->follow_symlinks) - size = lgetxattr(accpath, name, value, size); - else - size = getxattr(accpath, name, value, size); -#elif HAVE_FGETEA - if (fd >= 0) +#elif ARCHIVE_XATTR_DARWIN + size = fgetxattr(fd, name, value, size, 0, 0); +#elif ARCHIVE_XATTR_AIX size = fgetea(fd, name, value, size); - else if (!a->follow_symlinks) +#endif + } else if (!a->follow_symlinks) { +#if ARCHIVE_XATTR_LINUX + size = lgetxattr(accpath, name, value, size); +#elif ARCHIVE_XATTR_DARWIN + size = getxattr(accpath, name, value, size, 0, XATTR_NOFOLLOW); +#elif ARCHIVE_XATTR_AIX size = lgetea(accpath, name, value, size); - else +#endif + } else { +#if ARCHIVE_XATTR_LINUX + size = getxattr(accpath, name, value, size); +#elif ARCHIVE_XATTR_DARWIN + size = getxattr(accpath, name, value, size, 0, 0); +#elif ARCHIVE_XATTR_AIX size = getea(accpath, name, value, size); #endif + } if (size == -1) { archive_set_error(&a->archive, errno, @@ -1609,38 +532,36 @@ setup_xattrs(struct archive_read_disk *a, path = NULL; if (*fd < 0) { - path = archive_entry_sourcepath(entry); - if (path == NULL || (a->tree != NULL && - a->tree_enter_working_dir(a->tree) != 0)) - path = archive_entry_pathname(entry); - if (path == NULL) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Couldn't determine file path to read " - "extended attributes"); + path = archive_read_disk_entry_setup_path(a, entry, fd); + if (path == NULL) return (ARCHIVE_WARN); - } - if (a->tree != NULL && (a->follow_symlinks || - archive_entry_filetype(entry) != AE_IFLNK)) { - *fd = a->open_on_current_dir(a->tree, - path, O_RDONLY | O_NONBLOCK); - } } -#if HAVE_FLISTXATTR - if (*fd >= 0) + if (*fd >= 0) { +#if ARCHIVE_XATTR_LINUX list_size = flistxattr(*fd, NULL, 0); - else if (!a->follow_symlinks) - list_size = llistxattr(path, NULL, 0); - else - list_size = listxattr(path, NULL, 0); -#elif HAVE_FLISTEA - if (*fd >= 0) +#elif ARCHIVE_XATTR_DARWIN + list_size = flistxattr(*fd, NULL, 0, 0); +#elif ARCHIVE_XATTR_AIX list_size = flistea(*fd, NULL, 0); - else if (!a->follow_symlinks) +#endif + } else if (!a->follow_symlinks) { +#if ARCHIVE_XATTR_LINUX + list_size = llistxattr(path, NULL, 0); +#elif ARCHIVE_XATTR_DARWIN + list_size = listxattr(path, NULL, 0, XATTR_NOFOLLOW); +#elif ARCHIVE_XATTR_AIX list_size = llistea(path, NULL, 0); - else +#endif + } else { +#if ARCHIVE_XATTR_LINUX + list_size = listxattr(path, NULL, 0); +#elif ARCHIVE_XATTR_DARWIN + list_size = listxattr(path, NULL, 0, 0); +#elif ARCHIVE_XATTR_AIX list_size = listea(path, NULL, 0); #endif + } if (list_size == -1) { if (errno == ENOTSUP || errno == ENOSYS) @@ -1658,21 +579,31 @@ setup_xattrs(struct archive_read_disk *a, return (ARCHIVE_FATAL); } -#if HAVE_FLISTXATTR - if (*fd >= 0) + if (*fd >= 0) { +#if ARCHIVE_XATTR_LINUX list_size = flistxattr(*fd, list, list_size); - else if (!a->follow_symlinks) - list_size = llistxattr(path, list, list_size); - else - list_size = listxattr(path, list, list_size); -#elif HAVE_FLISTEA - if (*fd >= 0) +#elif ARCHIVE_XATTR_DARWIN + list_size = flistxattr(*fd, list, list_size, 0); +#elif ARCHIVE_XATTR_AIX list_size = flistea(*fd, list, list_size); - else if (!a->follow_symlinks) +#endif + } else if (!a->follow_symlinks) { +#if ARCHIVE_XATTR_LINUX + list_size = llistxattr(path, list, list_size); +#elif ARCHIVE_XATTR_DARWIN + list_size = listxattr(path, list, list_size, XATTR_NOFOLLOW); +#elif ARCHIVE_XATTR_AIX list_size = llistea(path, list, list_size); - else +#endif + } else { +#if ARCHIVE_XATTR_LINUX + list_size = listxattr(path, list, list_size); +#elif ARCHIVE_XATTR_DARWIN + list_size = listxattr(path, list, list_size, 0); +#elif ARCHIVE_XATTR_AIX list_size = listea(path, list, list_size); #endif + } if (list_size == -1) { archive_set_error(&a->archive, errno, @@ -1682,9 +613,21 @@ setup_xattrs(struct archive_read_disk *a, } for (p = list; (p - list) < list_size; p += strlen(p) + 1) { - if (strncmp(p, "system.", 7) == 0 || - strncmp(p, "xfsroot.", 8) == 0) +#if ARCHIVE_XATTR_LINUX + /* Linux: skip POSIX.1e ACL extended attributes */ + if (strncmp(p, "system.", 7) == 0 && + (strcmp(p + 7, "posix_acl_access") == 0 || + strcmp(p + 7, "posix_acl_default") == 0)) continue; + if (strncmp(p, "trusted.SGI_", 12) == 0 && + (strcmp(p + 12, "ACL_DEFAULT") == 0 || + strcmp(p + 12, "ACL_FILE") == 0)) + continue; + + /* Linux: xfsroot namespace is obsolete and unsupported */ + if (strncmp(p, "xfsroot.", 8) == 0) + continue; +#endif setup_xattr(a, entry, p, *fd, path); } @@ -1692,8 +635,7 @@ setup_xattrs(struct archive_read_disk *a, return (ARCHIVE_OK); } -#elif HAVE_EXTATTR_GET_FILE && HAVE_EXTATTR_LIST_FILE && \ - HAVE_DECL_EXTATTR_NAMESPACE_USER +#elif ARCHIVE_XATTR_FREEBSD /* * FreeBSD extattr interface. @@ -1768,21 +710,9 @@ setup_xattrs(struct archive_read_disk *a, path = NULL; if (*fd < 0) { - path = archive_entry_sourcepath(entry); - if (path == NULL || (a->tree != NULL && - a->tree_enter_working_dir(a->tree) != 0)) - path = archive_entry_pathname(entry); - if (path == NULL) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Couldn't determine file path to read " - "extended attributes"); + path = archive_read_disk_entry_setup_path(a, entry, fd); + if (path == NULL) return (ARCHIVE_WARN); - } - if (a->tree != NULL && (a->follow_symlinks || - archive_entry_filetype(entry) != AE_IFLNK)) { - *fd = a->open_on_current_dir(a->tree, - path, O_RDONLY | O_NONBLOCK); - } } if (*fd >= 0) @@ -1883,6 +813,7 @@ setup_sparse_fiemap(struct archive_read_disk *a, int64_t size; int count, do_fiemap, iters; int exit_sts = ARCHIVE_OK; + const char *path; if (archive_entry_filetype(entry) != AE_IFREG || archive_entry_size(entry) <= 0 @@ -1890,11 +821,10 @@ setup_sparse_fiemap(struct archive_read_disk *a, return (ARCHIVE_OK); if (*fd < 0) { - const char *path; - - path = archive_entry_sourcepath(entry); + path = archive_read_disk_entry_setup_path(a, entry, NULL); if (path == NULL) - path = archive_entry_pathname(entry); + return (ARCHIVE_FAILED); + if (a->tree != NULL) *fd = a->open_on_current_dir(a->tree, path, O_RDONLY | O_NONBLOCK | O_CLOEXEC); @@ -1990,6 +920,7 @@ setup_sparse(struct archive_read_disk *a, off_t off_s, off_e; int exit_sts = ARCHIVE_OK; int check_fully_sparse = 0; + const char *path; if (archive_entry_filetype(entry) != AE_IFREG || archive_entry_size(entry) <= 0 @@ -1997,20 +928,10 @@ setup_sparse(struct archive_read_disk *a, return (ARCHIVE_OK); /* Does filesystem support the reporting of hole ? */ - if (*fd < 0 && a->tree != NULL) { - const char *path; - - path = archive_entry_sourcepath(entry); - if (path == NULL) - path = archive_entry_pathname(entry); - *fd = a->open_on_current_dir(a->tree, path, - O_RDONLY | O_NONBLOCK); - if (*fd < 0) { - archive_set_error(&a->archive, errno, - "Can't open `%s'", path); - return (ARCHIVE_FAILED); - } - } + if (*fd < 0) + path = archive_read_disk_entry_setup_path(a, entry, fd); + else + path = NULL; if (*fd >= 0) { #ifdef _PC_MIN_HOLE_SIZE @@ -2021,12 +942,8 @@ setup_sparse(struct archive_read_disk *a, if (initial_off != 0) lseek(*fd, 0, SEEK_SET); } else { - const char *path; - - path = archive_entry_sourcepath(entry); if (path == NULL) - path = archive_entry_pathname(entry); - + return (ARCHIVE_FAILED); #ifdef _PC_MIN_HOLE_SIZE if (pathconf(path, _PC_MIN_HOLE_SIZE) <= 0) return (ARCHIVE_OK); diff --git a/archivers/libarchive/files/libarchive/archive_read_disk_private.h b/archivers/libarchive/files/libarchive/archive_read_disk_private.h index b5a8328b7bf..f03a0a9cc30 100644 --- a/archivers/libarchive/files/libarchive/archive_read_disk_private.h +++ b/archivers/libarchive/files/libarchive/archive_read_disk_private.h @@ -33,6 +33,8 @@ #ifndef ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED #define ARCHIVE_READ_DISK_PRIVATE_H_INCLUDED +#include "archive_platform_acl.h" + struct tree; struct archive_entry; @@ -86,4 +88,11 @@ struct archive_read_disk { void *excluded_cb_data; }; +const char * +archive_read_disk_entry_setup_path(struct archive_read_disk *, + struct archive_entry *, int *); + +int +archive_read_disk_entry_setup_acls(struct archive_read_disk *, + struct archive_entry *, int *); #endif diff --git a/archivers/libarchive/files/libarchive/archive_read_open.3 b/archivers/libarchive/files/libarchive/archive_read_open.3 index 4d8272cac87..2278ebc330c 100644 --- a/archivers/libarchive/files/libarchive/archive_read_open.3 +++ b/archivers/libarchive/files/libarchive/archive_read_open.3 @@ -33,7 +33,7 @@ .Nm archive_read_open_fd , .Nm archive_read_open_FILE , .Nm archive_read_open_filename , -.Nm archive_read_open_memory , +.Nm archive_read_open_memory .Nd functions for reading streaming archives .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -67,7 +67,7 @@ Streaming Archive Library (libarchive, -larchive) .Fa "size_t block_size" .Fc .Ft int -.Fn archive_read_open_memory "struct archive *" "void *buff" "size_t size" +.Fn archive_read_open_memory "struct archive *" "const void *buff" "size_t size" .Sh DESCRIPTION .Bl -tag -compact -width indent .It Fn archive_read_open diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_cab.c b/archivers/libarchive/files/libarchive/archive_read_support_format_cab.c index e2f8c6b70ae..e5ff5a12cd9 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_cab.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_cab.c @@ -116,19 +116,11 @@ struct lzx_dec { * coding tree, which is a binary tree. But a use of a large * index table causes L1 cache read miss many times. */ -#define HTBL_BITS 10 int max_bits; - int shift_bits; int tbl_bits; int tree_used; - int tree_avail; /* Direct access table. */ uint16_t *tbl; - /* Binary tree table for extra bits over the direct access. */ - struct htree_t { - uint16_t left; - uint16_t right; - } *tree; } at, lt, mt, pt; int loop; @@ -187,7 +179,7 @@ struct lzx_stream { #define CFDATA_cbData 4 #define CFDATA_cbUncomp 6 -static const char *compression_name[] = { +static const char * const compression_name[] = { "NONE", "MSZIP", "Quantum", @@ -352,7 +344,6 @@ static int lzx_huffman_init(struct huffman *, size_t, int); static void lzx_huffman_free(struct huffman *); static int lzx_make_huffman_table(struct huffman *); static inline int lzx_decode_huffman(struct huffman *, unsigned); -static int lzx_decode_huffman_tree(struct huffman *, unsigned, int); int @@ -3127,7 +3118,6 @@ getdata: static int lzx_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) { - int bits; if (hf->bitlen == NULL || hf->len_size != (int)len_size) { free(hf->bitlen); @@ -3138,21 +3128,11 @@ lzx_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) } else memset(hf->bitlen, 0, len_size * sizeof(hf->bitlen[0])); if (hf->tbl == NULL) { - if (tbl_bits < HTBL_BITS) - bits = tbl_bits; - else - bits = HTBL_BITS; - hf->tbl = malloc(((size_t)1 << bits) * sizeof(hf->tbl[0])); + hf->tbl = malloc(((size_t)1 << tbl_bits) * sizeof(hf->tbl[0])); if (hf->tbl == NULL) return (ARCHIVE_FATAL); hf->tbl_bits = tbl_bits; } - if (hf->tree == NULL && tbl_bits > HTBL_BITS) { - hf->tree_avail = 1 << (tbl_bits - HTBL_BITS + 4); - hf->tree = malloc(hf->tree_avail * sizeof(hf->tree[0])); - if (hf->tree == NULL) - return (ARCHIVE_FATAL); - } return (ARCHIVE_OK); } @@ -3161,7 +3141,6 @@ lzx_huffman_free(struct huffman *hf) { free(hf->bitlen); free(hf->tbl); - free(hf->tree); } /* @@ -3174,7 +3153,7 @@ lzx_make_huffman_table(struct huffman *hf) const unsigned char *bitlen; int bitptn[17], weight[17]; int i, maxbits = 0, ptn, tbl_size, w; - int diffbits, len_avail; + int len_avail; /* * Initialize bit patterns. @@ -3205,28 +3184,11 @@ lzx_make_huffman_table(struct huffman *hf) weight[i] >>= ebits; } } - if (maxbits > HTBL_BITS) { - int htbl_max; - uint16_t *p; - - diffbits = maxbits - HTBL_BITS; - for (i = 1; i <= HTBL_BITS; i++) { - bitptn[i] >>= diffbits; - weight[i] >>= diffbits; - } - htbl_max = bitptn[HTBL_BITS] + - weight[HTBL_BITS] * hf->freq[HTBL_BITS]; - p = &(hf->tbl[htbl_max]); - while (p < &hf->tbl[1U<shift_bits = diffbits; /* * Make the table. */ - tbl_size = 1 << HTBL_BITS; + tbl_size = 1 << hf->tbl_bits; tbl = hf->tbl; bitlen = hf->bitlen; len_avail = hf->len_size; @@ -3234,120 +3196,32 @@ lzx_make_huffman_table(struct huffman *hf) for (i = 0; i < len_avail; i++) { uint16_t *p; int len, cnt; - uint16_t bit; - int extlen; - struct htree_t *ht; if (bitlen[i] == 0) continue; /* Get a bit pattern */ len = bitlen[i]; + if (len > tbl_size) + return (0); ptn = bitptn[len]; cnt = weight[len]; - if (len <= HTBL_BITS) { - /* Calculate next bit pattern */ - if ((bitptn[len] = ptn + cnt) > tbl_size) - return (0);/* Invalid */ - /* Update the table */ - p = &(tbl[ptn]); - while (--cnt >= 0) - p[cnt] = (uint16_t)i; - continue; - } - - /* - * A bit length is too big to be housed to a direct table, - * so we use a tree model for its extra bits. - */ - bitptn[len] = ptn + cnt; - bit = 1U << (diffbits -1); - extlen = len - HTBL_BITS; - - p = &(tbl[ptn >> diffbits]); - if (*p == 0) { - *p = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - if (*p < len_avail || - *p >= (len_avail + hf->tree_used)) - return (0);/* Invalid */ - ht = &(hf->tree[*p - len_avail]); - } - while (--extlen > 0) { - if (ptn & bit) { - if (ht->left < len_avail) { - ht->left = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->left - len_avail]); - } - } else { - if (ht->right < len_avail) { - ht->right = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->right - len_avail]); - } - } - bit >>= 1; - } - if (ptn & bit) { - if (ht->left != 0) - return (0);/* Invalid */ - ht->left = (uint16_t)i; - } else { - if (ht->right != 0) - return (0);/* Invalid */ - ht->right = (uint16_t)i; - } + /* Calculate next bit pattern */ + if ((bitptn[len] = ptn + cnt) > tbl_size) + return (0);/* Invalid */ + /* Update the table */ + p = &(tbl[ptn]); + while (--cnt >= 0) + p[cnt] = (uint16_t)i; } return (1); } -static int -lzx_decode_huffman_tree(struct huffman *hf, unsigned rbits, int c) -{ - struct htree_t *ht; - int extlen; - - ht = hf->tree; - extlen = hf->shift_bits; - while (c >= hf->len_size) { - c -= hf->len_size; - if (extlen-- <= 0 || c >= hf->tree_used) - return (0); - if (rbits & (1U << extlen)) - c = ht[c].left; - else - c = ht[c].right; - } - return (c); -} - static inline int lzx_decode_huffman(struct huffman *hf, unsigned rbits) { int c; - /* - * At first search an index table for a bit pattern. - * If it fails, search a huffman tree for. - */ - c = hf->tbl[rbits >> hf->shift_bits]; + c = hf->tbl[rbits]; if (c < hf->len_size) return (c); - /* This bit pattern needs to be found out at a huffman tree. */ - return (lzx_decode_huffman_tree(hf, rbits, c)); + return (0); } - diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c b/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c index ffd4a8580ab..ad9f782de48 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c @@ -165,7 +165,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_cpio.c 20116 struct links_entry { struct links_entry *next; struct links_entry *previous; - int links; + unsigned int links; dev_t dev; int64_t ino; char *name; diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c b/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c index 76da4069ef1..f01d37bf682 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c @@ -3021,8 +3021,9 @@ heap_add_entry(struct archive_read *a, struct heap_queue *heap, ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); + if (heap->allocated) + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); if (heap->files != NULL) free(heap->files); heap->files = new_pending_files; diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c b/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c index d77a7c2e476..b8ef4ae10ec 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c @@ -2477,7 +2477,7 @@ lzh_huffman_free(struct huffman *hf) free(hf->tree); } -static char bitlen_tbl[0x400] = { +static const char bitlen_tbl[0x400] = { 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c b/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c index 4231ff5002b..44b6083cb2f 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_mtree.c @@ -130,9 +130,7 @@ static ssize_t readline(struct archive_read *, struct mtree *, char **, ssize_t) static int skip(struct archive_read *a); static int read_header(struct archive_read *, struct archive_entry *); -static int64_t mtree_atol10(char **); -static int64_t mtree_atol8(char **); -static int64_t mtree_atol(char **); +static int64_t mtree_atol(char **, int base); /* * There's no standard for TIME_T_MAX/TIME_T_MIN. So we compute them @@ -399,41 +397,41 @@ bid_keycmp(const char *p, const char *key, ssize_t len) static int bid_keyword(const char *p, ssize_t len) { - static const char *keys_c[] = { + static const char * const keys_c[] = { "content", "contents", "cksum", NULL }; - static const char *keys_df[] = { + static const char * const keys_df[] = { "device", "flags", NULL }; - static const char *keys_g[] = { + static const char * const keys_g[] = { "gid", "gname", NULL }; - static const char *keys_il[] = { + static const char * const keys_il[] = { "ignore", "inode", "link", NULL }; - static const char *keys_m[] = { + static const char * const keys_m[] = { "md5", "md5digest", "mode", NULL }; - static const char *keys_no[] = { + static const char * const keys_no[] = { "nlink", "nochange", "optional", NULL }; - static const char *keys_r[] = { + static const char * const keys_r[] = { "resdevice", "rmd160", "rmd160digest", NULL }; - static const char *keys_s[] = { + static const char * const keys_s[] = { "sha1", "sha1digest", "sha256", "sha256digest", "sha384", "sha384digest", "sha512", "sha512digest", "size", NULL }; - static const char *keys_t[] = { + static const char * const keys_t[] = { "tags", "time", "type", NULL }; - static const char *keys_u[] = { + static const char * const keys_u[] = { "uid", "uname", NULL }; - const char **keys; + const char * const *keys; int i; switch (*p) { @@ -1418,7 +1416,7 @@ parse_device(dev_t *pdev, struct archive *a, char *val) "Too many arguments"); return ARCHIVE_WARN; } - numbers[argc++] = (unsigned long)mtree_atol(&p); + numbers[argc++] = (unsigned long)mtree_atol(&p, 0); } if (argc < 2) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, @@ -1433,7 +1431,7 @@ parse_device(dev_t *pdev, struct archive *a, char *val) } } else { /* file system raw value. */ - result = (dev_t)mtree_atol(&val); + result = (dev_t)mtree_atol(&val, 0); } *pdev = result; return ARCHIVE_OK; @@ -1513,7 +1511,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, case 'g': if (strcmp(key, "gid") == 0) { *parsed_kws |= MTREE_HAS_GID; - archive_entry_set_gid(entry, mtree_atol10(&val)); + archive_entry_set_gid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "gname") == 0) { @@ -1523,7 +1521,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, } case 'i': if (strcmp(key, "inode") == 0) { - archive_entry_set_ino(entry, mtree_atol10(&val)); + archive_entry_set_ino(entry, mtree_atol(&val, 10)); break; } case 'l': @@ -1535,14 +1533,14 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, if (strcmp(key, "md5") == 0 || strcmp(key, "md5digest") == 0) break; if (strcmp(key, "mode") == 0) { - if (val[0] >= '0' && val[0] <= '9') { + if (val[0] >= '0' && val[0] <= '7') { *parsed_kws |= MTREE_HAS_PERM; archive_entry_set_perm(entry, - (mode_t)mtree_atol8(&val)); + (mode_t)mtree_atol(&val, 8)); } else { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Symbolic mode \"%s\" unsupported", val); + "Symbolic or non-octal mode \"%s\" unsupported", val); return ARCHIVE_WARN; } break; @@ -1551,7 +1549,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, if (strcmp(key, "nlink") == 0) { *parsed_kws |= MTREE_HAS_NLINK; archive_entry_set_nlink(entry, - (unsigned int)mtree_atol10(&val)); + (unsigned int)mtree_atol(&val, 10)); break; } case 'r': @@ -1582,7 +1580,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, strcmp(key, "sha512digest") == 0) break; if (strcmp(key, "size") == 0) { - archive_entry_set_size(entry, mtree_atol10(&val)); + archive_entry_set_size(entry, mtree_atol(&val, 10)); break; } case 't': @@ -1601,13 +1599,13 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, long ns = 0; *parsed_kws |= MTREE_HAS_MTIME; - m = mtree_atol10(&val); + m = mtree_atol(&val, 10); /* Replicate an old mtree bug: * 123456789.1 represents 123456789 * seconds and 1 nanosecond. */ if (*val == '.') { ++val; - ns = (long)mtree_atol10(&val); + ns = (long)mtree_atol(&val, 10); if (ns < 0) ns = 0; else if (ns > 999999999) @@ -1670,7 +1668,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, case 'u': if (strcmp(key, "uid") == 0) { *parsed_kws |= MTREE_HAS_UID; - archive_entry_set_uid(entry, mtree_atol10(&val)); + archive_entry_set_uid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "uname") == 0) { @@ -1825,72 +1823,9 @@ parse_escapes(char *src, struct mtree_entry *mentry) *dest = '\0'; } -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - */ -static int64_t -mtree_atol8(char **p) -{ - int64_t l, limit, last_digit_limit; - int digit, base; - - base = 8; - limit = INT64_MAX / base; - last_digit_limit = INT64_MAX % base; - - l = 0; - digit = **p - '0'; - while (digit >= 0 && digit < base) { - if (l>limit || (l == limit && digit > last_digit_limit)) { - l = INT64_MAX; /* Truncate on overflow. */ - break; - } - l = (l * base) + digit; - digit = *++(*p) - '0'; - } - return (l); -} - -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - */ -static int64_t -mtree_atol10(char **p) -{ - int64_t l, limit, last_digit_limit; - int base, digit, sign; - - base = 10; - - if (**p == '-') { - sign = -1; - limit = ((uint64_t)(INT64_MAX) + 1) / base; - last_digit_limit = ((uint64_t)(INT64_MAX) + 1) % base; - ++(*p); - } else { - sign = 1; - limit = INT64_MAX / base; - last_digit_limit = INT64_MAX % base; - } - - l = 0; - digit = **p - '0'; - while (digit >= 0 && digit < base) { - if (l > limit || (l == limit && digit > last_digit_limit)) - return (sign < 0) ? INT64_MIN : INT64_MAX; - l = (l * base) + digit; - digit = *++(*p) - '0'; - } - return (sign < 0) ? -l : l; -} - /* Parse a hex digit. */ static int -parsehex(char c) +parsedigit(char c) { if (c >= '0' && c <= '9') return c - '0'; @@ -1908,45 +1843,50 @@ parsehex(char c) * it does obey locale. */ static int64_t -mtree_atol16(char **p) +mtree_atol(char **p, int base) { - int64_t l, limit, last_digit_limit; - int base, digit, sign; - - base = 16; + int64_t l, limit; + int digit, last_digit_limit; + + if (base == 0) { + if (**p != '0') + base = 10; + else if ((*p)[1] == 'x' || (*p)[1] == 'X') { + *p += 2; + base = 16; + } else { + base = 8; + } + } if (**p == '-') { - sign = -1; - limit = ((uint64_t)(INT64_MAX) + 1) / base; - last_digit_limit = ((uint64_t)(INT64_MAX) + 1) % base; + limit = INT64_MIN / base; + last_digit_limit = INT64_MIN % base; ++(*p); + + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l < limit || (l == limit && digit > last_digit_limit)) + return INT64_MIN; + l = (l * base) - digit; + digit = parsedigit(*++(*p)); + } + return l; } else { - sign = 1; limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; - } - l = 0; - digit = parsehex(**p); - while (digit >= 0 && digit < base) { - if (l > limit || (l == limit && digit > last_digit_limit)) - return (sign < 0) ? INT64_MIN : INT64_MAX; - l = (l * base) + digit; - digit = parsehex(*++(*p)); - } - return (sign < 0) ? -l : l; -} - -static int64_t -mtree_atol(char **p) -{ - if (**p != '0') - return mtree_atol10(p); - if ((*p)[1] == 'x' || (*p)[1] == 'X') { - *p += 2; - return mtree_atol16(p); + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l > limit || (l == limit && digit > last_digit_limit)) + return INT64_MAX; + l = (l * base) + digit; + digit = parsedigit(*++(*p)); + } + return l; } - return mtree_atol8(p); } /* diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c b/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c index 1e9849fdd62..cbb14c32dc3 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c @@ -1750,7 +1750,7 @@ read_exttime(const char *p, struct rar *rar, const char *endp) return (-1); for (j = 0; j < count; j++) { - rem = ((*p) << 16) | (rem >> 8); + rem = (((unsigned)(unsigned char)*p) << 16) | (rem >> 8); p++; } tm = localtime(&t); diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c b/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c index bd7f13d52ee..30d5bc83c32 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c @@ -155,6 +155,7 @@ struct tar { int compat_2x; int process_mac_extensions; int read_concatenated_archives; + int realsize_override; }; static int archive_block_is_null(const char *p); @@ -527,6 +528,7 @@ archive_read_format_tar_read_header(struct archive_read *a, tar->entry_offset = 0; gnu_clear_sparse_list(tar); tar->realsize = -1; /* Mark this as "unset" */ + tar->realsize_override = 0; /* Setup default string conversion. */ tar->sconv = tar->opt_sconv; @@ -1894,6 +1896,7 @@ pax_attribute(struct archive_read *a, struct tar *tar, if (strcmp(key, "GNU.sparse.size") == 0) { tar->realsize = tar_atol10(value, strlen(value)); archive_entry_set_size(entry, tar->realsize); + tar->realsize_override = 1; } /* GNU "0.1" sparse pax format. */ @@ -1925,6 +1928,7 @@ pax_attribute(struct archive_read *a, struct tar *tar, if (strcmp(key, "GNU.sparse.realsize") == 0) { tar->realsize = tar_atol10(value, strlen(value)); archive_entry_set_size(entry, tar->realsize); + tar->realsize_override = 1; } break; case 'L': @@ -1977,6 +1981,7 @@ pax_attribute(struct archive_read *a, struct tar *tar, tar_atol10(value, strlen(value))); } else if (strcmp(key, "SCHILY.realsize") == 0) { tar->realsize = tar_atol10(value, strlen(value)); + tar->realsize_override = 1; archive_entry_set_size(entry, tar->realsize); } else if (strncmp(key, "SCHILY.xattr.", 13) == 0) { pax_attribute_schily_xattr(entry, key, value, @@ -2055,14 +2060,12 @@ pax_attribute(struct archive_read *a, struct tar *tar, tar->entry_bytes_remaining = tar_atol10(value, strlen(value)); /* - * But, "size" is not necessarily the size of - * the file on disk; if this is a sparse file, - * the disk size may have already been set from - * GNU.sparse.realsize or GNU.sparse.size or - * an old GNU header field or SCHILY.realsize - * or .... + * The "size" pax header keyword always overrides the + * "size" field in the tar header. + * GNU.sparse.realsize, GNU.sparse.size and + * SCHILY.realsize override this value. */ - if (tar->realsize < 0) { + if (!tar->realsize_override) { archive_entry_set_size(entry, tar->entry_bytes_remaining); tar->realsize @@ -2206,6 +2209,7 @@ header_gnutar(struct archive_read *a, struct tar *tar, tar->realsize = tar_atol(header->realsize, sizeof(header->realsize)); archive_entry_set_size(entry, tar->realsize); + tar->realsize_override = 1; } if (header->sparse[0].offset[0] != 0) { diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c b/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c index b1624651426..e8753853f3c 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c @@ -600,9 +600,10 @@ _warc_rdver(const char *buf, size_t bsz) /* looks good so far, read the version number for a laugh */ buf += sizeof(magic) - 1U; - if (isdigit(buf[0U]) && (buf[1U] == '.') && isdigit(buf[2U])) { + if (isdigit((unsigned char)buf[0U]) && (buf[1U] == '.') && + isdigit((unsigned char)buf[2U])) { /* we support a maximum of 2 digits in the minor version */ - if (isdigit(buf[3U])) + if (isdigit((unsigned char)buf[3U])) end = 1U; /* set up major version */ ver = (buf[0U] - '0') * 10000U; @@ -686,7 +687,7 @@ _warc_rduri(const char *buf, size_t bsz) /* spaces inside uri are not allowed, CRLF should follow */ for (p = val; p < eol; p++) { - if (isspace(*p)) + if (isspace((unsigned char)*p)) return res; } @@ -736,7 +737,7 @@ _warc_rdlen(const char *buf, size_t bsz) while (val < eol && (*val == ' ' || *val == '\t')) val++; /* there must be at least one digit */ - if (!isdigit(*val)) + if (!isdigit((unsigned char)*val)) return -1; len = strtol(val, &on, 10); if (on != eol) { diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c b/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c index 08bcf1f537c..4c4f6fad479 100644 --- a/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c +++ b/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c @@ -347,7 +347,7 @@ fake_crc32(unsigned long crc, const void *buff, size_t len) return 0; } -static struct { +static const struct { int id; const char * name; } compression_methods[] = { @@ -2407,7 +2407,7 @@ read_eocd(struct zip *zip, const char *p, int64_t current_offset) * Examine Zip64 EOCD locator: If it's valid, store the information * from it. */ -static void +static int read_zip64_eocd(struct archive_read *a, struct zip *zip, const char *p) { int64_t eocd64_offset; @@ -2417,35 +2417,37 @@ read_zip64_eocd(struct archive_read *a, struct zip *zip, const char *p) /* Central dir must be on first volume. */ if (archive_le32dec(p + 4) != 0) - return; + return 0; /* Must be only a single volume. */ if (archive_le32dec(p + 16) != 1) - return; + return 0; /* Find the Zip64 EOCD record. */ eocd64_offset = archive_le64dec(p + 8); if (__archive_read_seek(a, eocd64_offset, SEEK_SET) < 0) - return; + return 0; if ((p = __archive_read_ahead(a, 56, NULL)) == NULL) - return; + return 0; /* Make sure we can read all of it. */ eocd64_size = archive_le64dec(p + 4) + 12; if (eocd64_size < 56 || eocd64_size > 16384) - return; + return 0; if ((p = __archive_read_ahead(a, (size_t)eocd64_size, NULL)) == NULL) - return; + return 0; /* Sanity-check the EOCD64 */ if (archive_le32dec(p + 16) != 0) /* Must be disk #0 */ - return; + return 0; if (archive_le32dec(p + 20) != 0) /* CD must be on disk #0 */ - return; + return 0; /* CD can't be split. */ if (archive_le64dec(p + 24) != archive_le64dec(p + 32)) - return; + return 0; /* Save the central directory offset for later use. */ zip->central_directory_offset = archive_le64dec(p + 48); + + return 32; } static int @@ -2483,15 +2485,14 @@ archive_read_format_zip_seekable_bid(struct archive_read *a, int best_bid) if (memcmp(p + i, "PK\005\006", 4) == 0) { int ret = read_eocd(zip, p + i, current_offset + i); - if (ret > 0) { - /* Zip64 EOCD locator precedes - * regular EOCD if present. */ - if (i >= 20 - && memcmp(p + i - 20, "PK\006\007", 4) == 0) { - read_zip64_eocd(a, zip, p + i - 20); - } - return (ret); + /* Zip64 EOCD locator precedes + * regular EOCD if present. */ + if (i >= 20 && memcmp(p + i - 20, "PK\006\007", 4) == 0) { + int ret_zip64 = read_zip64_eocd(a, zip, p + i - 20); + if (ret_zip64 > ret) + ret = ret_zip64; } + return (ret); } i -= 4; break; diff --git a/archivers/libarchive/files/libarchive/archive_string.c b/archivers/libarchive/files/libarchive/archive_string.c index 592ead2bdd5..554533ecb91 100644 --- a/archivers/libarchive/files/libarchive/archive_string.c +++ b/archivers/libarchive/files/libarchive/archive_string.c @@ -202,7 +202,8 @@ archive_string_append(struct archive_string *as, const char *p, size_t s) { if (archive_string_ensure(as, as->length + s + 1) == NULL) return (NULL); - memmove(as->s + as->length, p, s); + if (s) + memmove(as->s + as->length, p, s); as->length += s; as->s[as->length] = 0; return (as); @@ -213,7 +214,8 @@ archive_wstring_append(struct archive_wstring *as, const wchar_t *p, size_t s) { if (archive_wstring_ensure(as, as->length + s + 1) == NULL) return (NULL); - wmemmove(as->s + as->length, p, s); + if (s) + wmemmove(as->s + as->length, p, s); as->length += s; as->s[as->length] = 0; return (as); diff --git a/archivers/libarchive/files/libarchive/archive_string_sprintf.c b/archivers/libarchive/files/libarchive/archive_string_sprintf.c index 964ea2bea1f..969a5603a49 100644 --- a/archivers/libarchive/files/libarchive/archive_string_sprintf.c +++ b/archivers/libarchive/files/libarchive/archive_string_sprintf.c @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_string_sprintf.c 189435 2009-03- static void append_uint(struct archive_string *as, uintmax_t d, unsigned base) { - static const char *digits = "0123456789abcdef"; + static const char digits[] = "0123456789abcdef"; if (d >= base) append_uint(as, d/base, base); archive_strappend_char(as, digits[d % base]); diff --git a/archivers/libarchive/files/libarchive/archive_util.c b/archivers/libarchive/files/libarchive/archive_util.c index 6b3bd61163d..bac9ba1cab1 100644 --- a/archivers/libarchive/files/libarchive/archive_util.c +++ b/archivers/libarchive/files/libarchive/archive_util.c @@ -89,88 +89,6 @@ archive_version_string(void) return (ARCHIVE_VERSION_STRING); } -const char * -archive_version_details(void) -{ - static struct archive_string str; - static int init = 0; - const char *zlib = archive_zlib_version(); - const char *liblzma = archive_liblzma_version(); - const char *bzlib = archive_bzlib_version(); - const char *liblz4 = archive_liblz4_version(); - - if (!init) { - archive_string_init(&str); - - archive_strcat(&str, ARCHIVE_VERSION_STRING); - if (zlib != NULL) { - archive_strcat(&str, " zlib/"); - archive_strcat(&str, zlib); - } - if (liblzma) { - archive_strcat(&str, " liblzma/"); - archive_strcat(&str, liblzma); - } - if (bzlib) { - const char *p = bzlib; - const char *sep = strchr(p, ','); - if (sep == NULL) - sep = p + strlen(p); - archive_strcat(&str, " bz2lib/"); - archive_strncat(&str, p, sep - p); - } - if (liblz4) { - archive_strcat(&str, " liblz4/"); - archive_strcat(&str, liblz4); - } - } - return str.s; -} - -const char * -archive_zlib_version(void) -{ -#ifdef HAVE_ZLIB_H - return ZLIB_VERSION; -#else - return NULL; -#endif -} - -const char * -archive_liblzma_version(void) -{ -#ifdef HAVE_LZMA_H - return LZMA_VERSION_STRING; -#else - return NULL; -#endif -} - -const char * -archive_bzlib_version(void) -{ -#ifdef HAVE_BZLIB_H - return BZ2_bzlibVersion(); -#else - return NULL; -#endif -} - -const char * -archive_liblz4_version(void) -{ -#if defined(HAVE_LZ4_H) && defined(HAVE_LIBLZ4) -#define str(s) #s -#define NUMBER(x) str(x) - return NUMBER(LZ4_VERSION_MAJOR) "." NUMBER(LZ4_VERSION_MINOR) "." NUMBER(LZ4_VERSION_RELEASE); -#undef NUMBER -#undef str -#else - return NULL; -#endif -} - int archive_errno(struct archive *a) { @@ -275,7 +193,7 @@ archive_copy_error(struct archive *dest, struct archive *src) void __archive_errx(int retvalue, const char *msg) { - static const char *msg1 = "Fatal Internal Error in libarchive: "; + static const char msg1[] = "Fatal Internal Error in libarchive: "; size_t s; s = write(2, msg1, strlen(msg1)); @@ -303,8 +221,8 @@ __archive_errx(int retvalue, const char *msg) int __archive_mktemp(const char *tmpdir) { - static const wchar_t *prefix = L"libarchive_"; - static const wchar_t *suffix = L"XXXXXXXXXX"; + static const wchar_t prefix[] = L"libarchive_"; + static const wchar_t suffix[] = L"XXXXXXXXXX"; static const wchar_t num[] = { L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7', L'8', L'9', L'A', L'B', L'C', L'D', L'E', L'F', diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter.c b/archivers/libarchive/files/libarchive/archive_write_add_filter.c index ad5dc832fda..08f518adec4 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include "archive_private.h" /* A table that maps filter codes to functions. */ -static +static const struct { int code; int (*setter)(struct archive *); } codes[] = { { ARCHIVE_FILTER_NONE, archive_write_add_filter_none }, diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_by_name.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_by_name.c index eac4011cb2e..85a8d475341 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_by_name.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_by_name.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include "archive_private.h" /* A table that maps names to functions. */ -static +static const struct { const char *name; int (*setter)(struct archive *); } names[] = { { "b64encode", archive_write_add_filter_b64encode }, diff --git a/archivers/libarchive/files/libarchive/archive_write_add_filter_program.c b/archivers/libarchive/files/libarchive/archive_write_add_filter_program.c index 55b5e8ecdf8..660f693f29d 100644 --- a/archivers/libarchive/files/libarchive/archive_write_add_filter_program.c +++ b/archivers/libarchive/files/libarchive/archive_write_add_filter_program.c @@ -92,7 +92,7 @@ archive_write_add_filter_program(struct archive *_a, const char *cmd) { struct archive_write_filter *f = __archive_write_allocate_filter(_a); struct private_data *data; - static const char *prefix = "Program: "; + static const char prefix[] = "Program: "; archive_check_magic(_a, ARCHIVE_WRITE_MAGIC, ARCHIVE_STATE_NEW, "archive_write_add_filter_program"); diff --git a/archivers/libarchive/files/libarchive/archive_write_data.3 b/archivers/libarchive/files/libarchive/archive_write_data.3 index 0cdd25f1f92..9c16cd9b4f7 100644 --- a/archivers/libarchive/files/libarchive/archive_write_data.3 +++ b/archivers/libarchive/files/libarchive/archive_write_data.3 @@ -24,11 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd February 2, 2012 +.Dd February 28, 2017 .Dt ARCHIVE_WRITE_DATA 3 .Os .Sh NAME -.Nm archive_write_data +.Nm archive_write_data , +.Nm archive_write_data_block .Nd functions for creating archives .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -36,8 +37,27 @@ Streaming Archive Library (libarchive, -larchive) .In archive.h .Ft la_ssize_t .Fn archive_write_data "struct archive *" "const void *" "size_t" +.Ft la_ssize_t +.Fn archive_write_data_block "struct archive *" "const void *" "size_t size" "int64_t offset" .Sh DESCRIPTION +.Bl -tag -width indent +.It Fn archive_write_data +Write data corresponding to the header just written. +.It Fn archive_write_data_block Write data corresponding to the header just written. +This is like +.Fn archive_write_data +except that it performs a seek on the file being +written to the specified offset before writing the data. +This is useful when restoring sparse files from archive +formats that support sparse files. +Returns number of bytes written or -1 on error. +(Note: This is currently not supported for +.Tn archive_write +handles, only for +.Tn archive_write_disk +handles. +.El .\" .Sh EXAMPLE .\" .Sh RETURN VALUES diff --git a/archivers/libarchive/files/libarchive/archive_write_disk.3 b/archivers/libarchive/files/libarchive/archive_write_disk.3 index ba6c9706e8a..949c9ef106f 100644 --- a/archivers/libarchive/files/libarchive/archive_write_disk.3 +++ b/archivers/libarchive/files/libarchive/archive_write_disk.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 2, 2012 +.Dd April 3, 2017 .Dt ARCHIVE_WRITE_DISK 3 .Os .Sh NAME @@ -33,14 +33,7 @@ .Nm archive_write_disk_set_skip_file , .Nm archive_write_disk_set_group_lookup , .Nm archive_write_disk_set_standard_lookup , -.Nm archive_write_disk_set_user_lookup , -.Nm archive_write_header , -.Nm archive_write_data , -.Nm archive_write_data_block , -.Nm archive_write_finish_entry , -.Nm archive_write_close , -.Nm archive_write_finish -.Nm archive_write_free +.Nm archive_write_disk_set_user_lookup .Nd functions for creating objects on disk .Sh LIBRARY Streaming Archive Library (libarchive, -larchive) @@ -68,20 +61,6 @@ Streaming Archive Library (libarchive, -larchive) .Fa "uid_t (*)(void *, const char *uname, uid_t uid)" .Fa "void (*cleanup)(void *)" .Fc -.Ft int -.Fn archive_write_header "struct archive *" "struct archive_entry *" -.Ft la_ssize_t -.Fn archive_write_data "struct archive *" "const void *" "size_t" -.Ft la_ssize_t -.Fn archive_write_data_block "struct archive *" "const void *" "size_t size" "int64_t offset" -.Ft int -.Fn archive_write_finish_entry "struct archive *" -.Ft int -.Fn archive_write_close "struct archive *" -.Ft int -.Fn archive_write_finish "struct archive *" -.Ft int -.Fn archive_write_free "struct archive *" .Sh DESCRIPTION These functions provide a complete API for creating objects on disk from @@ -117,6 +96,33 @@ performance optimization in practice. The options field consists of a bitwise OR of one or more of the following values: .Bl -tag -compact -width "indent" +.It Cm ARCHIVE_EXTRACT_ACL +Attempt to restore Access Control Lists. +By default, extended ACLs are ignored. +.It Cm ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS +Before removing a file system object prior to replacing it, clear +platform-specific file flags which might prevent its removal. +.It Cm ARCHIVE_EXTRACT_FFLAGS +Attempt to restore file attributes (file flags). +By default, file attributes are ignored. +See +.Xr chattr 1 +.Pq Linux +or +.Xr chflags 1 +.Pq FreeBSD, Mac OS X +for more information on file attributes. +.It Cm ARCHIVE_EXTRACT_MAC_METADATA +Mac OS X specific. Restore metadata using +.Xr copyfile 3 . +By default, +.Xr copyfile 3 +metadata is ignored. +.It Cm ARCHIVE_EXTRACT_NO_OVERWRITE +Existing files on disk will not be overwritten. +By default, existing regular files are truncated and overwritten; +existing directories will have their permissions updated; +other pre-existing objects are unlinked and recreated from scratch. .It Cm ARCHIVE_EXTRACT_OWNER The user and group IDs should be set on the restored file. By default, the user and group IDs are not restored. @@ -132,15 +138,37 @@ is not specified, then SUID and SGID bits will only be restored if the default user and group IDs of newly-created objects on disk happen to match those specified in the archive entry. By default, only basic permissions are restored, and umask is obeyed. +.It Cm ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS +Refuse to extract an absolute path. +The default is to not refuse such paths. +.It Cm ARCHIVE_EXTRACT_SECURE_NODOTDOT +Refuse to extract a path that contains a +.Pa .. +element anywhere within it. +The default is to not refuse such paths. +Note that paths ending in +.Pa .. +always cause an error, regardless of this flag. +.It Cm ARCHIVE_EXTRACT_SECURE_SYMLINKS +Refuse to extract any object whose final location would be altered +by a symlink on disk. +This is intended to help guard against a variety of mischief +caused by archives that (deliberately or otherwise) extract +files outside of the current directory. +The default is not to perform this check. +If +.It Cm ARCHIVE_EXTRACT_SPARSE +Scan data for blocks of NUL bytes and try to recreate them with holes. +This results in sparse files, independent of whether the archive format +supports or uses them. +.Cm ARCHIVE_EXTRACT_UNLINK +is specified together with this option, the library will +remove any intermediate symlinks it finds and return an +error only if such symlink could not be removed. .It Cm ARCHIVE_EXTRACT_TIME The timestamps (mtime, ctime, and atime) should be restored. By default, they are ignored. Note that restoring of atime is not currently supported. -.It Cm ARCHIVE_EXTRACT_NO_OVERWRITE -Existing files on disk will not be overwritten. -By default, existing regular files are truncated and overwritten; -existing directories will have their permissions updated; -other pre-existing objects are unlinked and recreated from scratch. .It Cm ARCHIVE_EXTRACT_UNLINK Existing files on disk will be unlinked before any attempt to create them. @@ -148,45 +176,18 @@ In some cases, this can prove to be a significant performance improvement. By default, existing files are truncated and rewritten, but the file is not recreated. In particular, the default behavior does not break existing hard links. -.It Cm ARCHIVE_EXTRACT_ACL -Attempt to restore ACLs. -By default, extended ACLs are ignored. -.It Cm ARCHIVE_EXTRACT_FFLAGS -Attempt to restore extended file flags. -By default, file flags are ignored. .It Cm ARCHIVE_EXTRACT_XATTR -Attempt to restore POSIX.1e extended attributes. +Attempt to restore extended file attributes. By default, they are ignored. -.It Cm ARCHIVE_EXTRACT_SECURE_SYMLINKS -Refuse to extract any object whose final location would be altered -by a symlink on disk. -This is intended to help guard against a variety of mischief -caused by archives that (deliberately or otherwise) extract -files outside of the current directory. -The default is not to perform this check. -If -.Cm ARCHIVE_EXTRACT_UNLINK -is specified together with this option, the library will -remove any intermediate symlinks it finds and return an -error only if such symlink could not be removed. -.It Cm ARCHIVE_EXTRACT_SECURE_NODOTDOT -Refuse to extract a path that contains a -.Pa .. -element anywhere within it. -The default is to not refuse such paths. -Note that paths ending in -.Pa .. -always cause an error, regardless of this flag. -.It Cm ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS -Refuse to extract an absolute path. -The default is to not refuse such paths. -.It Cm ARCHIVE_EXTRACT_SPARSE -Scan data for blocks of NUL bytes and try to recreate them with holes. -This results in sparse files, independent of whether the archive format -supports or uses them. -.It Cm ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS -Before removing a file system object prior to replacing it, clear -platform-specific file flags which might prevent its removal. +See +.Xr xattr 7 +.Pq Linux , +.Xr xattr 2 +.Pq Mac OS X , +or +.Xr getextattr 8 +.Pq FreeBSD +for more information on extended file attributes. .El .It Xo .Fn archive_write_disk_set_group_lookup , @@ -223,60 +224,6 @@ the number of calls to .Xr getpwnam 3 and .Xr getgrnam 3 . -.It Fn archive_write_header -Build and write a header using the data in the provided -.Tn struct archive_entry -structure. -See -.Xr archive_entry 3 -for information on creating and populating -.Tn struct archive_entry -objects. -.It Fn archive_write_data -Write data corresponding to the header just written. -Returns number of bytes written or -1 on error. -.It Fn archive_write_data_block -Write data corresponding to the header just written. -This is like -.Fn archive_write_data -except that it performs a seek on the file being -written to the specified offset before writing the data. -This is useful when restoring sparse files from archive -formats that support sparse files. -Returns number of bytes written or -1 on error. -(Note: This is currently not supported for -.Tn archive_write -handles, only for -.Tn archive_write_disk -handles.) -.It Fn archive_write_finish_entry -Close out the entry just written. -Ordinarily, clients never need to call this, as it -is called automatically by -.Fn archive_write_next_header -and -.Fn archive_write_close -as needed. -However, some file attributes are written to disk only -after the file is closed, so this can be necessary -if you need to work with the file on disk right away. -.It Fn archive_write_close -Set any attributes that could not be set during the initial restore. -For example, directory timestamps are not restored initially because -restoring a subsequent file would alter that timestamp. -Similarly, non-writable directories are initially created with -write permissions (so that their contents can be restored). -The -.Nm -library maintains a list of all such deferred attributes and -sets them when this function is invoked. -.It Fn archive_write_finish -This is a deprecated synonym for -.Fn archive_write_free . -.It Fn archive_write_free -Invokes -.Fn archive_write_close -if it was not invoked manually, then releases all resources. .El More information about the .Va struct archive diff --git a/archivers/libarchive/files/libarchive/archive_write_disk_posix.c b/archivers/libarchive/files/libarchive/archive_write_disk_posix.c index 5a01e8450ce..6ad53992fd8 100644 --- a/archivers/libarchive/files/libarchive/archive_write_disk_posix.c +++ b/archivers/libarchive/files/libarchive/archive_write_disk_posix.c @@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_EXTATTR_H #include #endif -#if defined(HAVE_SYS_XATTR_H) +#if HAVE_SYS_XATTR_H #include -#elif defined(HAVE_ATTR_XATTR_H) +#elif HAVE_ATTR_XATTR_H #include #endif #ifdef HAVE_SYS_EA_H @@ -575,10 +575,55 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) if (a->flags & ARCHIVE_EXTRACT_TIME) a->todo |= TODO_TIMES; if (a->flags & ARCHIVE_EXTRACT_ACL) { +#if ARCHIVE_ACL_DARWIN + /* + * On MacOS, platform ACLs get stored in mac_metadata, too. + * If we intend to extract mac_metadata and it is present + * we skip extracting libarchive NFSv4 ACLs. + */ + size_t metadata_size; + + if ((a->flags & ARCHIVE_EXTRACT_MAC_METADATA) == 0 || + archive_entry_mac_metadata(a->entry, + &metadata_size) == NULL || metadata_size == 0) +#endif +#if ARCHIVE_ACL_LIBRICHACL + /* + * RichACLs are stored in an extended attribute. + * If we intend to extract extended attributes and have this + * attribute we skip extracting libarchive NFSv4 ACLs. + */ + short extract_acls = 1; + if (a->flags & ARCHIVE_EXTRACT_XATTR && ( + archive_entry_acl_types(a->entry) & + ARCHIVE_ENTRY_ACL_TYPE_NFS4)) { + const char *attr_name; + const void *attr_value; + size_t attr_size; + int i = archive_entry_xattr_reset(a->entry); + while (i--) { + archive_entry_xattr_next(a->entry, &attr_name, + &attr_value, &attr_size); + if (attr_name != NULL && attr_value != NULL && + attr_size > 0 && strcmp(attr_name, + "trusted.richacl") == 0) { + extract_acls = 0; + break; + } + } + } + if (extract_acls) +#endif +#if ARCHIVE_ACL_DARWIN || ARCHIVE_ACL_LIBRICHACL + { +#endif if (archive_entry_filetype(a->entry) == AE_IFDIR) a->deferred |= TODO_ACLS; else a->todo |= TODO_ACLS; +#if ARCHIVE_ACL_DARWIN || ARCHIVE_ACL_LIBRICHACL + } +#endif } if (a->flags & ARCHIVE_EXTRACT_MAC_METADATA) { if (archive_entry_filetype(a->entry) == AE_IFDIR) @@ -619,8 +664,21 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry) } #endif - if (a->flags & ARCHIVE_EXTRACT_XATTR) + if (a->flags & ARCHIVE_EXTRACT_XATTR) { +#if ARCHIVE_XATTR_DARWIN + /* + * On MacOS, extended attributes get stored in mac_metadata, + * too. If we intend to extract mac_metadata and it is present + * we skip extracting extended attributes. + */ + size_t metadata_size; + + if ((a->flags & ARCHIVE_EXTRACT_MAC_METADATA) == 0 || + archive_entry_mac_metadata(a->entry, + &metadata_size) == NULL || metadata_size == 0) +#endif a->todo |= TODO_XATTR; + } if (a->flags & ARCHIVE_EXTRACT_FFLAGS) a->todo |= TODO_FFLAGS; if (a->flags & ARCHIVE_EXTRACT_SECURE_SYMLINKS) { @@ -1703,25 +1761,11 @@ _archive_write_disk_finish_entry(struct archive *_a) */ if (a->todo & TODO_ACLS) { int r2; -#ifdef HAVE_DARWIN_ACL - /* - * On Mac OS, platform ACLs are stored also in mac_metadata by - * the operating system. If mac_metadata is present it takes - * precedence and we skip extracting libarchive NFSv4 ACLs - */ - const void *metadata; - size_t metadata_size; - metadata = archive_entry_mac_metadata(a->entry, &metadata_size); - if ((a->todo & TODO_MAC_METADATA) == 0 || - metadata == NULL || metadata_size == 0) { -#endif r2 = archive_write_disk_set_acls(&a->archive, a->fd, archive_entry_pathname(a->entry), - archive_entry_acl(a->entry)); + archive_entry_acl(a->entry), + archive_entry_mode(a->entry)); if (r2 < ret) ret = r2; -#ifdef HAVE_DARWIN_ACL - } -#endif } finish_metadata: @@ -2293,13 +2337,8 @@ _archive_write_disk_close(struct archive *_a) if (p->fixup & TODO_MODE_BASE) chmod(p->name, p->mode); if (p->fixup & TODO_ACLS) -#ifdef HAVE_DARWIN_ACL - if ((p->fixup & TODO_MAC_METADATA) == 0 || - p->mac_metadata == NULL || - p->mac_metadata_size == 0) -#endif - archive_write_disk_set_acls(&a->archive, - -1, p->name, &p->acl); + archive_write_disk_set_acls(&a->archive, -1, p->name, + &p->acl, p->mode); if (p->fixup & TODO_FFLAGS) set_fflags_platform(a, -1, p->name, p->mode, p->fflags_set, 0); @@ -2467,7 +2506,7 @@ fsobj_error(int *a_eno, struct archive_string *a_estr, if (a_eno) *a_eno = err; if (a_estr) - archive_string_sprintf(a_estr, errstr, path); + archive_string_sprintf(a_estr, "%s%s", errstr, path); } /* @@ -2573,7 +2612,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, * with the deep-directory editing. */ fsobj_error(a_eno, a_estr, errno, - "Could not stat %s", path); + "Could not stat ", path); res = ARCHIVE_FAILED; break; } @@ -2582,7 +2621,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, if (chdir(head) != 0) { tail[0] = c; fsobj_error(a_eno, a_estr, errno, - "Could not chdir %s", path); + "Could not chdir ", path); res = (ARCHIVE_FATAL); break; } @@ -2599,7 +2638,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, if (unlink(head)) { tail[0] = c; fsobj_error(a_eno, a_estr, errno, - "Could not remove symlink %s", + "Could not remove symlink ", path); res = ARCHIVE_FAILED; break; @@ -2618,7 +2657,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, /* if (!S_ISLNK(path)) { fsobj_error(a_eno, a_estr, 0, - "Removing symlink %s", path); + "Removing symlink ", path); } */ /* Symlink gone. No more problem! */ @@ -2630,7 +2669,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, tail[0] = c; fsobj_error(a_eno, a_estr, 0, "Cannot remove intervening " - "symlink %s", path); + "symlink ", path); res = ARCHIVE_FAILED; break; } @@ -2652,7 +2691,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, } else { fsobj_error(a_eno, a_estr, errno, - "Could not stat %s", path); + "Could not stat ", path); res = (ARCHIVE_FAILED); break; } @@ -2661,7 +2700,7 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, tail[0] = c; fsobj_error(a_eno, a_estr, errno, - "Could not chdir %s", path); + "Could not chdir ", path); res = (ARCHIVE_FATAL); break; } @@ -2674,14 +2713,14 @@ check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, tail[0] = c; fsobj_error(a_eno, a_estr, 0, "Cannot extract through " - "symlink %s", path); + "symlink ", path); res = ARCHIVE_FAILED; break; } } else { tail[0] = c; fsobj_error(a_eno, a_estr, 0, - "Cannot extract through symlink %s", path); + "Cannot extract through symlink ", path); res = ARCHIVE_FAILED; break; } @@ -4044,71 +4083,98 @@ skip_appledouble: } #endif -#if HAVE_LSETXATTR || HAVE_LSETEA +#if ARCHIVE_XATTR_LINUX || ARCHIVE_XATTR_DARWIN || ARCHIVE_XATTR_AIX /* - * Restore extended attributes - Linux and AIX implementations: + * Restore extended attributes - Linux, Darwin and AIX implementations: * AIX' ea interface is syntaxwise identical to the Linux xattr interface. */ static int set_xattrs(struct archive_write_disk *a) { struct archive_entry *entry = a->entry; - static int warning_done = 0; + struct archive_string errlist; int ret = ARCHIVE_OK; int i = archive_entry_xattr_reset(entry); + short fail = 0; + + archive_string_init(&errlist); while (i--) { const char *name; const void *value; size_t size; + int e; + archive_entry_xattr_next(entry, &name, &value, &size); - if (name != NULL && - strncmp(name, "xfsroot.", 8) != 0 && - strncmp(name, "system.", 7) != 0) { - int e; -#if HAVE_FSETXATTR - if (a->fd >= 0) - e = fsetxattr(a->fd, name, value, size, 0); - else -#elif HAVE_FSETEA - if (a->fd >= 0) - e = fsetea(a->fd, name, value, size, 0); - else + + if (name == NULL) + continue; +#if ARCHIVE_XATTR_LINUX + /* Linux: quietly skip POSIX.1e ACL extended attributes */ + if (strncmp(name, "system.", 7) == 0 && + (strcmp(name + 7, "posix_acl_access") == 0 || + strcmp(name + 7, "posix_acl_default") == 0)) + continue; + if (strncmp(name, "trusted.SGI_", 12) == 0 && + (strcmp(name + 12, "ACL_DEFAULT") == 0 || + strcmp(name + 12, "ACL_FILE") == 0)) + continue; + + /* Linux: xfsroot namespace is obsolete and unsupported */ + if (strncmp(name, "xfsroot.", 8) == 0) { + fail = 1; + archive_strcat(&errlist, name); + archive_strappend_char(&errlist, ' '); + continue; + } #endif - { -#if HAVE_LSETXATTR - e = lsetxattr(archive_entry_pathname(entry), - name, value, size, 0); -#elif HAVE_LSETEA - e = lsetea(archive_entry_pathname(entry), - name, value, size, 0); + + if (a->fd >= 0) { +#if ARCHIVE_XATTR_LINUX + e = fsetxattr(a->fd, name, value, size, 0); +#elif ARCHIVE_XATTR_DARWIN + e = fsetxattr(a->fd, name, value, size, 0, 0); +#elif ARCHIVE_XATTR_AIX + e = fsetea(a->fd, name, value, size, 0); #endif - } - if (e == -1) { - if (errno == ENOTSUP || errno == ENOSYS) { - if (!warning_done) { - warning_done = 1; - archive_set_error(&a->archive, - errno, - "Cannot restore extended " - "attributes on this file " - "system"); - } - } else - archive_set_error(&a->archive, errno, - "Failed to set extended attribute"); - ret = ARCHIVE_WARN; - } } else { - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "Invalid extended attribute encountered"); +#if ARCHIVE_XATTR_LINUX + e = lsetxattr(archive_entry_pathname(entry), + name, value, size, 0); +#elif ARCHIVE_XATTR_DARWIN + e = setxattr(archive_entry_pathname(entry), + name, value, size, 0, XATTR_NOFOLLOW); +#elif ARCHIVE_XATTR_AIX + e = lsetea(archive_entry_pathname(entry), + name, value, size, 0); +#endif + } + if (e == -1) { ret = ARCHIVE_WARN; + archive_strcat(&errlist, name); + archive_strappend_char(&errlist, ' '); + if (errno != ENOTSUP && errno != ENOSYS) + fail = 1; } } + + if (ret == ARCHIVE_WARN) { + if (fail && errlist.length > 0) { + errlist.length--; + errlist.s[errlist.length] = '\0'; + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Cannot restore extended attributes: %s", + errlist.s); + } else + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Cannot restore extended " + "attributes on this file system."); + } + + archive_string_free(&errlist); return (ret); } -#elif HAVE_EXTATTR_SET_FILE && HAVE_DECL_EXTATTR_NAMESPACE_USER +#elif ARCHIVE_XATTR_FREEBSD /* * Restore extended attributes - FreeBSD implementation */ @@ -4116,9 +4182,12 @@ static int set_xattrs(struct archive_write_disk *a) { struct archive_entry *entry = a->entry; - static int warning_done = 0; + struct archive_string errlist; int ret = ARCHIVE_OK; int i = archive_entry_xattr_reset(entry); + short fail = 0; + + archive_string_init(&errlist); while (i--) { const char *name; @@ -4134,46 +4203,47 @@ set_xattrs(struct archive_write_disk *a) name += 5; namespace = EXTATTR_NAMESPACE_USER; } else { - /* Warn about other extended attributes. */ - archive_set_error(&a->archive, - ARCHIVE_ERRNO_FILE_FORMAT, - "Can't restore extended attribute ``%s''", - name); + /* Other namespaces are unsupported */ + archive_strcat(&errlist, name); + archive_strappend_char(&errlist, ' '); + fail = 1; ret = ARCHIVE_WARN; continue; } - errno = 0; -#if HAVE_EXTATTR_SET_FD - if (a->fd >= 0) + + if (a->fd >= 0) { e = extattr_set_fd(a->fd, namespace, name, value, size); - else -#endif - /* TODO: should we use extattr_set_link() instead? */ - { - e = extattr_set_file( + } else { + e = extattr_set_link( archive_entry_pathname(entry), namespace, name, value, size); } if (e != (int)size) { - if (errno == ENOTSUP || errno == ENOSYS) { - if (!warning_done) { - warning_done = 1; - archive_set_error(&a->archive, - errno, - "Cannot restore extended " - "attributes on this file " - "system"); - } - } else { - archive_set_error(&a->archive, errno, - "Failed to set extended attribute"); - } - + archive_strcat(&errlist, name); + archive_strappend_char(&errlist, ' '); ret = ARCHIVE_WARN; + if (errno != ENOTSUP && errno != ENOSYS) + fail = 1; } } } + + if (ret == ARCHIVE_WARN) { + if (fail && errlist.length > 0) { + errlist.length--; + errlist.s[errlist.length] = '\0'; + + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Cannot restore extended attributes: %s", + errlist.s); + } else + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Cannot restore extended " + "attributes on this file system."); + } + + archive_string_free(&errlist); return (ret); } #else @@ -4239,5 +4309,19 @@ older(struct stat *st, struct archive_entry *entry) return (0); } +#ifndef ARCHIVE_ACL_SUPPORT +int +archive_write_disk_set_acls(struct archive *a, int fd, const char *name, + struct archive_acl *abstract_acl, __LA_MODE_T mode) +{ + (void)a; /* UNUSED */ + (void)fd; /* UNUSED */ + (void)name; /* UNUSED */ + (void)abstract_acl; /* UNUSED */ + (void)mode; /* UNUSED */ + return (ARCHIVE_OK); +} +#endif + #endif /* !_WIN32 || __CYGWIN__ */ diff --git a/archivers/libarchive/files/libarchive/archive_write_disk_private.h b/archivers/libarchive/files/libarchive/archive_write_disk_private.h index d84e7e1cd64..b655dea2b65 100644 --- a/archivers/libarchive/files/libarchive/archive_write_disk_private.h +++ b/archivers/libarchive/files/libarchive/archive_write_disk_private.h @@ -33,11 +33,13 @@ #ifndef ARCHIVE_WRITE_DISK_PRIVATE_H_INCLUDED #define ARCHIVE_WRITE_DISK_PRIVATE_H_INCLUDED +#include "archive_platform_acl.h" #include "archive_acl_private.h" +#include "archive_entry.h" struct archive_write_disk; -int -archive_write_disk_set_acls(struct archive *, int /* fd */, const char * /* pathname */, struct archive_acl *); +int archive_write_disk_set_acls(struct archive *, int, const char *, + struct archive_acl *, __LA_MODE_T); #endif diff --git a/archivers/libarchive/files/libarchive/archive_write_finish_entry.3 b/archivers/libarchive/files/libarchive/archive_write_finish_entry.3 index c5ef69ebc94..dc1b94b82a5 100644 --- a/archivers/libarchive/files/libarchive/archive_write_finish_entry.3 +++ b/archivers/libarchive/files/libarchive/archive_write_finish_entry.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 2, 2012 +.Dd February 28, 2017 .Dt ARCHIVE_WRITE_FINISH_ENTRY 3 .Os .Sh NAME @@ -45,6 +45,9 @@ is called automatically by and .Fn archive_write_close as needed. +For +.Tn archive_write_disk +handles, this flushes pending file attribute changes like modification time. .\" .Sh EXAMPLE .Sh RETURN VALUES This function returns diff --git a/archivers/libarchive/files/libarchive/archive_write_format.3 b/archivers/libarchive/files/libarchive/archive_write_format.3 index d4ba6abff5a..aaafb0a8617 100644 --- a/archivers/libarchive/files/libarchive/archive_write_format.3 +++ b/archivers/libarchive/files/libarchive/archive_write_format.3 @@ -108,7 +108,6 @@ Streaming Archive Library (libarchive, -larchive) These functions set the format that will be used for the archive. .Pp The library can write a variety of common archive formats. - .Bl -tag -width indent .It Fn archive_write_set_format Sets the format based on the format code (see diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format.c b/archivers/libarchive/files/libarchive/archive_write_set_format.c index 744302d0677..0f706231add 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format.c 201168 2009-1 #include "archive_private.h" /* A table that maps format codes to functions. */ -static +static const struct { int code; int (*setter)(struct archive *); } codes[] = { { ARCHIVE_FORMAT_7ZIP, archive_write_set_format_7zip }, diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c b/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c index c9771d81a12..441119d5d71 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_ar.c @@ -374,13 +374,14 @@ archive_write_ar_data(struct archive_write *a, const void *buff, size_t s) return (ARCHIVE_WARN); } - ar->strtab = (char *)malloc(s); + ar->strtab = (char *)malloc(s + 1); if (ar->strtab == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate strtab buffer"); return (ARCHIVE_FATAL); } - strncpy(ar->strtab, buff, s); + memcpy(ar->strtab, buff, s); + ar->strtab[s] = '\0'; ar->has_strtab = 1; } diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_by_name.c b/archivers/libarchive/files/libarchive/archive_write_set_format_by_name.c index a2ce7c6cde4..86e8621ef7b 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_by_name.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_by_name.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_by_name.c 20116 #include "archive_private.h" /* A table that maps names to functions. */ -static +static const struct { const char *name; int (*setter)(struct archive *); } names[] = { { "7zip", archive_write_set_format_7zip }, diff --git a/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c b/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c index 6a301ac2d19..0eaf733cd9a 100644 --- a/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c +++ b/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c @@ -1196,8 +1196,12 @@ archive_write_pax_header(struct archive_write *a, "GNU.sparse.major", 1); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.minor", 0); + /* + * Make sure to store the original path, since + * truncation to ustar limit happened already. + */ add_pax_attr(&(pax->pax_header), - "GNU.sparse.name", entry_name.s); + "GNU.sparse.name", path); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.realsize", archive_entry_size(entry_main)); @@ -1650,13 +1654,14 @@ build_pax_attribute_name(char *dest, const char *src) * GNU PAX Format 1.0 requires the special name, which pattern is: * /GNUSparseFile./ * + * Since reproducable archives are more important, use 0 as pid. + * * This function is used for only Sparse file, a file type of which * is regular file. */ static char * build_gnu_sparse_name(char *dest, const char *src) { - char buff[64]; const char *p; /* Handle the null filename case. */ @@ -1682,15 +1687,9 @@ build_gnu_sparse_name(char *dest, const char *src) break; } -#if HAVE_GETPID && 0 /* Disable this as pax attribute name. */ - sprintf(buff, "GNUSparseFile.%d", getpid()); -#else - /* If the platform can't fetch the pid, don't include it. */ - strcpy(buff, "GNUSparseFile"); -#endif /* General case: build a ustar-compatible name adding * "/GNUSparseFile/". */ - build_ustar_entry_name(dest, src, p - src, buff); + build_ustar_entry_name(dest, src, p - src, "GNUSparseFile.0"); return (dest); } diff --git a/archivers/libarchive/files/libarchive/config_freebsd.h b/archivers/libarchive/files/libarchive/config_freebsd.h index 215e886befa..be25258f946 100644 --- a/archivers/libarchive/files/libarchive/config_freebsd.h +++ b/archivers/libarchive/files/libarchive/config_freebsd.h @@ -22,141 +22,238 @@ * (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: head/lib/libarchive/config_freebsd.h 201079 2009-12-28 02:01:42Z kientzle $ + * $FreeBSD$ */ -/* FreeBSD 5.0 and later have ACL and extattr support. */ +#include + +/* FreeBSD 5.0 and later has ACL and extattr support. */ #if __FreeBSD__ > 4 -#define HAVE_ACL_CREATE_ENTRY 1 -#define HAVE_ACL_GET_FD_NP 1 -#define HAVE_ACL_GET_LINK_NP 1 -#define HAVE_ACL_GET_PERM_NP 1 -#define HAVE_ACL_INIT 1 -#define HAVE_ACL_SET_FD 1 -#define HAVE_ACL_SET_FD_NP 1 -#define HAVE_ACL_SET_FILE 1 -#define HAVE_ACL_USER 1 -#define HAVE_EXTATTR_GET_FILE 1 -#define HAVE_EXTATTR_LIST_FILE 1 -#define HAVE_EXTATTR_SET_FD 1 -#define HAVE_EXTATTR_SET_FILE 1 -#define HAVE_STRUCT_XVFSCONF 1 -#define HAVE_SYS_ACL_H 1 -#define HAVE_SYS_EXTATTR_H 1 -#endif +#define ARCHIVE_ACL_FREEBSD 1 +#define HAVE_ACL_GET_PERM_NP 1 +#define HAVE_ARC4RANDOM_BUF 1 +#define HAVE_EXTATTR_GET_FILE 1 +#define HAVE_EXTATTR_LIST_FILE 1 +#define HAVE_EXTATTR_SET_FD 1 +#define HAVE_EXTATTR_SET_FILE 1 +#define HAVE_STRUCT_XVFSCONF 1 +#define HAVE_SYS_ACL_H 1 +#define HAVE_SYS_EXTATTR_H 1 +#if __FreeBSD__ > 7 +/* FreeBSD 8.0 and later has NFSv4 ACL support */ +#define ARCHIVE_ACL_FREEBSD_NFS4 1 +#define HAVE_ACL_GET_LINK_NP 1 +#define HAVE_ACL_IS_TRIVIAL_NP 1 +#define HAVE_ACL_SET_LINK_NP 1 +#endif /* __FreeBSD__ > 7 */ +#endif /* __FreeBSD__ > 4 */ #ifdef WITH_OPENSSL -#define HAVE_OPENSSL_MD5_H 1 -#define HAVE_OPENSSL_RIPEMD_H 1 -#define HAVE_OPENSSL_SHA_H 1 -#define HAVE_SHA384 1 -#define HAVE_SHA512 1 +#define HAVE_LIBCRYPTO 1 +#define HAVE_OPENSSL_EVP_H 1 +#define HAVE_OPENSSL_MD5_H 1 +#define HAVE_OPENSSL_RIPEMD_H 1 +#define HAVE_OPENSSL_SHA_H 1 +#define HAVE_OPENSSL_SHA256_INIT 1 +#define HAVE_OPENSSL_SHA384_INIT 1 +#define HAVE_OPENSSL_SHA512_INIT 1 +#define HAVE_PKCS5_PBKDF2_HMAC_SHA1 1 +#define HAVE_SHA256 1 +#define HAVE_SHA384 1 +#define HAVE_SHA512 1 +#else +#define HAVE_LIBMD 1 +#define HAVE_MD5_H 1 +#define HAVE_MD5INIT 1 +#define HAVE_RIPEMD_H 1 +#define HAVE_SHA_H 1 +#define HAVE_SHA1 1 +#define HAVE_SHA1_INIT 1 +#define HAVE_SHA256 1 +#define HAVE_SHA256_H 1 +#define HAVE_SHA256_INIT 1 +#define HAVE_SHA512 1 +#define HAVE_SHA512_H 1 +#define HAVE_SHA512_INIT 1 #endif -#define HAVE_BSDXML_H 1 -#define HAVE_BZLIB_H 1 -#define HAVE_CHFLAGS 1 -#define HAVE_CHOWN 1 -#define HAVE_DECL_INT64_MAX 1 -#define HAVE_DECL_INT64_MIN 1 -#define HAVE_DECL_SIZE_MAX 1 -#define HAVE_DECL_SSIZE_MAX 1 -#define HAVE_DECL_STRERROR_R 1 -#define HAVE_DECL_UINT32_MAX 1 -#define HAVE_DECL_UINT64_MAX 1 -#define HAVE_DIRENT_H 1 -#define HAVE_EFTYPE 1 -#define HAVE_EILSEQ 1 -#define HAVE_ERRNO_H 1 -#define HAVE_FCHDIR 1 -#define HAVE_FCHFLAGS 1 -#define HAVE_FCHMOD 1 -#define HAVE_FCHOWN 1 -#define HAVE_FCNTL 1 -#define HAVE_FCNTL_H 1 -#define HAVE_FSEEKO 1 -#define HAVE_FSTAT 1 -#define HAVE_FTRUNCATE 1 -#define HAVE_FUTIMES 1 -#define HAVE_GETEUID 1 -#define HAVE_GETGRGID_R 1 -#define HAVE_GETPID 1 -#define HAVE_GETPWUID_R 1 -#define HAVE_GRP_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_LCHFLAGS 1 -#define HAVE_LCHMOD 1 -#define HAVE_LCHOWN 1 -#define HAVE_LIMITS_H 1 -#define HAVE_LINK 1 -#define HAVE_LSTAT 1 -#define HAVE_LUTIMES 1 -#define HAVE_MALLOC 1 -#define HAVE_MD5 1 -#define HAVE_MD5_H 1 -#define HAVE_MEMMOVE 1 -#define HAVE_MKDIR 1 -#define HAVE_MKFIFO 1 -#define HAVE_MKNOD 1 -#define HAVE_PIPE 1 -#define HAVE_POLL 1 -#define HAVE_POLL_H 1 -#define HAVE_PWD_H 1 -#define HAVE_READLINK 1 -#define HAVE_RMD160 1 -#define HAVE_SELECT 1 -#define HAVE_SETENV 1 -#define HAVE_SHA_H 1 -#define HAVE_SHA1 1 -#define HAVE_SHA256 1 -#define HAVE_SHA256_H 1 -#define HAVE_SIGNAL_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRCHR 1 -#define HAVE_STRDUP 1 -#define HAVE_STRERROR 1 -#define HAVE_STRERROR_R 1 -#define HAVE_STRINGS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_STRRCHR 1 -#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 -#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 -#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 -#define HAVE_STRUCT_STAT_ST_FLAGS 1 -#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 -#define HAVE_STRUCT_TM_TM_GMTOFF 1 -#define HAVE_SYMLINK 1 -#define HAVE_SYS_CDEFS_H 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_MOUNT_H 1 -#define HAVE_SYS_PARAM_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TYPES_H 1 -#undef HAVE_SYS_UTIME_H -#define HAVE_SYS_UTSNAME_H 1 -#define HAVE_SYS_WAIT_H 1 -#define HAVE_TIMEGM 1 -#define HAVE_TZSET 1 -#define HAVE_UNISTD_H 1 -#define HAVE_UNSETENV 1 -#define HAVE_UTIME 1 -#define HAVE_UTIMES 1 -#define HAVE_UTIME_H 1 -#define HAVE_VFORK 1 -#define HAVE_WCHAR_H 1 -#define HAVE_WCSCPY 1 -#define HAVE_WCSLEN 1 -#define HAVE_WCTOMB 1 -#define HAVE_WMEMCMP 1 -#define HAVE_WMEMCPY 1 -#define HAVE_ZLIB_H 1 -#define TIME_WITH_SYS_TIME 1 +#define HAVE_BSDXML_H 1 +#define HAVE_BZLIB_H 1 +#define HAVE_CHFLAGS 1 +#define HAVE_CHOWN 1 +#define HAVE_CHROOT 1 +#define HAVE_CTIME_R 1 +#define HAVE_CTYPE_H 1 +#define HAVE_DECL_EXTATTR_NAMESPACE_USER 1 +#define HAVE_DECL_INT32_MAX 1 +#define HAVE_DECL_INT32_MIN 1 +#define HAVE_DECL_INT64_MAX 1 +#define HAVE_DECL_INT64_MIN 1 +#define HAVE_DECL_INTMAX_MAX 1 +#define HAVE_DECL_INTMAX_MIN 1 +#define HAVE_DECL_SIZE_MAX 1 +#define HAVE_DECL_SSIZE_MAX 1 +#define HAVE_DECL_STRERROR_R 1 +#define HAVE_DECL_UINT32_MAX 1 +#define HAVE_DECL_UINT64_MAX 1 +#define HAVE_DECL_UINTMAX_MAX 1 +#define HAVE_DIRENT_H 1 +#define HAVE_DLFCN_H 1 +#define HAVE_D_MD_ORDER 1 +#define HAVE_EFTYPE 1 +#define HAVE_EILSEQ 1 +#define HAVE_ERRNO_H 1 +#define HAVE_FCHDIR 1 +#define HAVE_FCHFLAGS 1 +#define HAVE_FCHMOD 1 +#define HAVE_FCHOWN 1 +#define HAVE_FCNTL 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FDOPENDIR 1 +#define HAVE_FORK 1 +#define HAVE_FSEEKO 1 +#define HAVE_FSTAT 1 +#define HAVE_FSTATAT 1 +#define HAVE_FSTATFS 1 +#define HAVE_FSTATVFS 1 +#define HAVE_FTRUNCATE 1 +#define HAVE_FUTIMES 1 +#define HAVE_FUTIMESAT 1 +#define HAVE_GETEUID 1 +#define HAVE_GETGRGID_R 1 +#define HAVE_GETGRNAM_R 1 +#define HAVE_GETPID 1 +#define HAVE_GETPWNAM_R 1 +#define HAVE_GETPWUID_R 1 +#define HAVE_GETVFSBYNAME 1 +#define HAVE_GMTIME_R 1 +#define HAVE_GRP_H 1 +#define HAVE_INTMAX_T 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_LCHFLAGS 1 +#define HAVE_LCHMOD 1 +#define HAVE_LCHOWN 1 +#define HAVE_LIBZ 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LINK 1 +#define HAVE_LOCALE_H 1 +#define HAVE_LOCALTIME_R 1 +#define HAVE_LONG_LONG_INT 1 +#define HAVE_LSTAT 1 +#define HAVE_LUTIMES 1 +#define HAVE_MBRTOWC 1 +#define HAVE_MEMMOVE 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MEMSET 1 +#define HAVE_MKDIR 1 +#define HAVE_MKFIFO 1 +#define HAVE_MKNOD 1 +#define HAVE_MKSTEMP 1 +#define HAVE_NL_LANGINFO 1 +#define HAVE_OPENAT 1 +#define HAVE_PATHS_H 1 +#define HAVE_PIPE 1 +#define HAVE_POLL 1 +#define HAVE_POLL_H 1 +#define HAVE_POSIX_SPAWNP 1 +#define HAVE_PTHREAD_H 1 +#define HAVE_PWD_H 1 +#define HAVE_READDIR_R 1 +#define HAVE_READLINK 1 +#define HAVE_READLINKAT 1 +#define HAVE_READPASSPHRASE 1 +#define HAVE_READPASSPHRASE_H 1 +#define HAVE_REGEX_H 1 +#define HAVE_SELECT 1 +#define HAVE_SETENV 1 +#define HAVE_SETLOCALE 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SPAWN_H 1 +#define HAVE_STATFS 1 +#define HAVE_STATVFS 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRCHR 1 +#define HAVE_STRDUP 1 +#define HAVE_STRERROR 1 +#define HAVE_STRERROR_R 1 +#define HAVE_STRFTIME 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRRCHR 1 +#define HAVE_STRUCT_STATFS_F_NAMEMAX 1 +#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 +#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +#define HAVE_STRUCT_STAT_ST_FLAGS 1 +#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 +#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 +#define HAVE_STRUCT_TM_TM_GMTOFF 1 +#define HAVE_SYMLINK 1 +#define HAVE_SYS_CDEFS_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_MOUNT_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_POLL_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_STATVFS_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UTSNAME_H 1 +#define HAVE_SYS_WAIT_H 1 +#define HAVE_TIMEGM 1 +#define HAVE_TIME_H 1 +#define HAVE_TZSET 1 +#define HAVE_UINTMAX_T 1 +#define HAVE_UNISTD_H 1 +#define HAVE_UNSETENV 1 +#define HAVE_UNSIGNED_LONG_LONG 1 +#define HAVE_UNSIGNED_LONG_LONG_INT 1 +#define HAVE_UTIME 1 +#define HAVE_UTIMES 1 +#define HAVE_UTIME_H 1 +#define HAVE_VFORK 1 +#define HAVE_VPRINTF 1 +#define HAVE_WCHAR_H 1 +#define HAVE_WCHAR_T 1 +#define HAVE_WCRTOMB 1 +#define HAVE_WCSCMP 1 +#define HAVE_WCSCPY 1 +#define HAVE_WCSLEN 1 +#define HAVE_WCTOMB 1 +#define HAVE_WCTYPE_H 1 +#define HAVE_WMEMCMP 1 +#define HAVE_WMEMCPY 1 +#define HAVE_WMEMMOVE 1 +#define HAVE_ZLIB_H 1 +#define TIME_WITH_SYS_TIME 1 + +#if __FreeBSD_version >= 1100056 +#define HAVE_FUTIMENS 1 +#define HAVE_UTIMENSAT 1 +#endif /* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ #if __FreeBSD__ < 5 -#define intmax_t int64_t -#define uintmax_t uint64_t +#define intmax_t int64_t +#define uintmax_t uint64_t +#endif + +/* FreeBSD defines for archive_hash.h */ +#ifdef WITH_OPENSSL +#define ARCHIVE_CRYPTO_MD5_OPENSSL 1 +#define ARCHIVE_CRYPTO_RMD160_OPENSSL 1 +#define ARCHIVE_CRYPTO_SHA1_OPENSSL +#define ARCHIVE_CRYPTO_SHA256_OPENSSL 1 +#define ARCHIVE_CRYPTO_SHA384_OPENSSL 1 +#define ARCHIVE_CRYPTO_SHA512_OPENSSL 1 +#else +#define ARCHIVE_CRYPTO_MD5_LIBMD 1 +#define ARCHIVE_CRYPTO_SHA1_LIBMD 1 +#define ARCHIVE_CRYPTO_SHA256_LIBMD 1 +#define ARCHIVE_CRYPTO_SHA512_LIBMD 1 #endif diff --git a/archivers/libarchive/files/libarchive/libarchive_changes.3 b/archivers/libarchive/files/libarchive/libarchive_changes.3 index 881a67cdd41..adc87febd71 100644 --- a/archivers/libarchive/files/libarchive/libarchive_changes.3 +++ b/archivers/libarchive/files/libarchive/libarchive_changes.3 @@ -28,6 +28,7 @@ .Dt LIBARCHIVE_CHANGES 3 .Os .Sh NAME +.Nm libarchive_changes .Nd changes in libarchive interface .\" .Sh CHANGES IN LIBARCHIVE 3 diff --git a/archivers/libarchive/files/libarchive/mtree.5 b/archivers/libarchive/files/libarchive/mtree.5 index 16c8abec4cd..e607e4a8197 100644 --- a/archivers/libarchive/files/libarchive/mtree.5 +++ b/archivers/libarchive/files/libarchive/mtree.5 @@ -48,7 +48,7 @@ Leading whitespace is always ignored. .Pp When encoding file or pathnames, any backslash character or character outside of the 95 printable ASCII characters must be -encoded as a a backslash followed by three +encoded as a backslash followed by three octal digits. When reading mtree files, any appearance of a backslash followed by three octal digits should be converted into the diff --git a/archivers/libarchive/files/libarchive/test/CMakeLists.txt b/archivers/libarchive/files/libarchive/test/CMakeLists.txt index 5016eed369e..ee8686bae98 100644 --- a/archivers/libarchive/files/libarchive/test/CMakeLists.txt +++ b/archivers/libarchive/files/libarchive/test/CMakeLists.txt @@ -182,6 +182,7 @@ IF(ENABLE_TEST) test_read_format_zip_winzip_aes.c test_read_format_zip_winzip_aes_large.c test_read_format_zip_zip64.c + test_read_format_zip_with_invalid_traditional_eocd.c test_read_large.c test_read_pax_schily_xattr.c test_read_pax_truncated.c @@ -270,6 +271,7 @@ IF(ENABLE_TEST) test_write_format_zip_zip64.c test_write_open_memory.c test_write_read_format_zip.c + test_xattr_platform.c test_zip_filename_encoding.c ) diff --git a/archivers/libarchive/files/libarchive/test/list.h b/archivers/libarchive/files/libarchive/test/list.h index 5a9f91058c4..72e88f5df90 100644 --- a/archivers/libarchive/files/libarchive/test/list.h +++ b/archivers/libarchive/files/libarchive/test/list.h @@ -347,6 +347,7 @@ DEFINE_TEST(test_read_format_zip_winzip_aes128) DEFINE_TEST(test_read_format_zip_winzip_aes256) DEFINE_TEST(test_read_format_zip_winzip_aes256_stored) DEFINE_TEST(test_read_format_zip_winzip_aes256_large) +DEFINE_TEST(test_read_format_zip_with_invalid_traditional_eocd) DEFINE_TEST(test_read_format_zip_zip64a) DEFINE_TEST(test_read_format_zip_zip64b) DEFINE_TEST(test_read_large) @@ -485,6 +486,7 @@ DEFINE_TEST(test_write_read_format_zip) DEFINE_TEST(test_write_read_format_zip_improved_streaming) DEFINE_TEST(test_write_read_format_zip64) DEFINE_TEST(test_write_read_format_zip64_improved_streaming) +DEFINE_TEST(test_xattr_platform) DEFINE_TEST(test_zip_filename_encoding_UTF8) DEFINE_TEST(test_zip_filename_encoding_KOI8R) DEFINE_TEST(test_zip_filename_encoding_ru_RU_CP1251) diff --git a/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c b/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c index 5783e5234d2..a3868a627ee 100644 --- a/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c +++ b/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c @@ -26,15 +26,18 @@ #include "test.h" __FBSDID("$FreeBSD$"); -#if HAVE_POSIX_ACL || HAVE_NFS4_ACL +#if ARCHIVE_ACL_NFS4 +#if HAVE_SYS_ACL_H #define _ACL_PRIVATE #include -#if HAVE_DARWIN_ACL -#include #endif +#if HAVE_SYS_RICHACL_H +#include +#endif +#if HAVE_MEMBERSHIP_H +#include #endif -#if HAVE_NFS4_ACL struct myacl_t { int type; int permset; @@ -44,7 +47,7 @@ struct myacl_t { }; static struct myacl_t acls_reg[] = { -#if !HAVE_DARWIN_ACL +#if !ARCHIVE_ACL_DARWIN /* For this test, we need the file owner to be able to read and write the ACL. */ { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_READ_ACL | ARCHIVE_ENTRY_ACL_WRITE_ACL | ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS | ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, @@ -91,7 +94,7 @@ static struct myacl_t acls_reg[] = { // ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" }, { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_EXECUTE, ARCHIVE_ENTRY_ACL_GROUP, 136, "group136" }, -#if !HAVE_DARWIN_ACL +#if !ARCHIVE_ACL_DARWIN { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_EXECUTE, ARCHIVE_ENTRY_ACL_GROUP_OBJ, -1, "" }, { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_EXECUTE, @@ -134,7 +137,7 @@ static const int acls_reg_cnt = (int)(sizeof(acls_reg)/sizeof(acls_reg[0])); static struct myacl_t acls_dir[] = { /* For this test, we need to be able to read and write the ACL. */ -#if !HAVE_DARWIN_ACL +#if !ARCHIVE_ACL_DARWIN { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_READ_ACL, ARCHIVE_ENTRY_ACL_USER_OBJ, -1, ""}, #endif @@ -180,13 +183,17 @@ static struct myacl_t acls_dir[] = { { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ARCHIVE_ENTRY_ACL_USER, 302, "user302" }, -#if 0 { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, - ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, + ARCHIVE_ENTRY_ACL_READ_DATA | + ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT | + ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ARCHIVE_ENTRY_ACL_USER, 303, "user303" }, { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, - ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, + ARCHIVE_ENTRY_ACL_READ_DATA | + ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT | + ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ARCHIVE_ENTRY_ACL_USER, 304, "user304" }, +#if !defined(ARCHIVE_ACL_SUNOS_NFS4) || defined(ACE_INHERITED_ACE) { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_READ_DATA | ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ARCHIVE_ENTRY_ACL_USER, 305, "user305" }, @@ -207,7 +214,7 @@ static struct myacl_t acls_dir[] = { ARCHIVE_ENTRY_ACL_USER, 501, "user501" }, { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ARCHIVE_ENTRY_ACL_GROUP, 502, "group502" }, -#if !HAVE_DARWIN_ACL +#if !ARCHIVE_ACL_DARWIN { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ARCHIVE_ENTRY_ACL_GROUP_OBJ, -1, "" }, { ARCHIVE_ENTRY_ACL_TYPE_ALLOW, ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, @@ -248,70 +255,13 @@ static struct myacl_t acls_dir[] = { static const int acls_dir_cnt = (int)(sizeof(acls_dir)/sizeof(acls_dir[0])); -#if HAVE_SUN_ACL -static void * -sunacl_get(int cmd, int *aclcnt, int fd, const char *path) -{ - int cnt, cntcmd; - size_t size; - void *aclp; - - if (cmd == GETACL) { - cntcmd = GETACLCNT; - size = sizeof(aclent_t); - } -#if HAVE_SUN_NFS4_ACL - else if (cmd == ACE_GETACL) { - cntcmd = ACE_GETACLCNT; - size = sizeof(ace_t); - } -#endif - else { - errno = EINVAL; - *aclcnt = -1; - return (NULL); - } - - aclp = NULL; - cnt = -2; - while (cnt == -2 || (cnt == -1 && errno == ENOSPC)) { - if (path != NULL) - cnt = acl(path, cntcmd, 0, NULL); - else - cnt = facl(fd, cntcmd, 0, NULL); - - if (cnt > 0) { - if (aclp == NULL) - aclp = malloc(cnt * size); - else - aclp = realloc(NULL, cnt * size); - if (aclp != NULL) { - if (path != NULL) - cnt = acl(path, cmd, cnt, aclp); - else - cnt = facl(fd, cmd, cnt, aclp); - } - } else { - if (aclp != NULL) { - free(aclp); - aclp = NULL; - } - break; - } - } - - *aclcnt = cnt; - return (aclp); -} -#endif /* HAVE_SUN_ACL */ - static void set_acls(struct archive_entry *ae, struct myacl_t *acls, int start, int end) { int i; archive_entry_acl_clear(ae); -#if !HAVE_DARWIN_ACL +#if !ARCHIVE_ACL_DARWIN if (start > 0) { assertEqualInt(ARCHIVE_OK, archive_entry_acl_add_entry(ae, @@ -328,78 +278,96 @@ set_acls(struct archive_entry *ae, struct myacl_t *acls, int start, int end) } static int -#ifdef HAVE_SUN_NFS4_ACL -acl_permset_to_bitmap(uint32_t a_access_mask) +#if ARCHIVE_ACL_SUNOS_NFS4 +acl_permset_to_bitmap(uint32_t mask) +#elif ARCHIVE_ACL_LIBRICHACL +acl_permset_to_bitmap(unsigned int mask) #else acl_permset_to_bitmap(acl_permset_t opaque_ps) #endif { - static struct { int machine; int portable; } perms[] = { -#ifdef HAVE_SUN_NFS4_ACL /* Solaris NFSv4 ACL permissions */ - {ACE_EXECUTE, ARCHIVE_ENTRY_ACL_EXECUTE}, - {ACE_READ_DATA, ARCHIVE_ENTRY_ACL_READ_DATA}, - {ACE_LIST_DIRECTORY, ARCHIVE_ENTRY_ACL_LIST_DIRECTORY}, - {ACE_WRITE_DATA, ARCHIVE_ENTRY_ACL_WRITE_DATA}, - {ACE_ADD_FILE, ARCHIVE_ENTRY_ACL_ADD_FILE}, - {ACE_APPEND_DATA, ARCHIVE_ENTRY_ACL_APPEND_DATA}, - {ACE_ADD_SUBDIRECTORY, ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY}, - {ACE_READ_NAMED_ATTRS, ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS}, - {ACE_WRITE_NAMED_ATTRS, ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS}, - {ACE_DELETE_CHILD, ARCHIVE_ENTRY_ACL_DELETE_CHILD}, - {ACE_READ_ATTRIBUTES, ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES}, - {ACE_WRITE_ATTRIBUTES, ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES}, - {ACE_DELETE, ARCHIVE_ENTRY_ACL_DELETE}, - {ACE_READ_ACL, ARCHIVE_ENTRY_ACL_READ_ACL}, - {ACE_WRITE_ACL, ARCHIVE_ENTRY_ACL_WRITE_ACL}, - {ACE_WRITE_OWNER, ARCHIVE_ENTRY_ACL_WRITE_OWNER}, - {ACE_SYNCHRONIZE, ARCHIVE_ENTRY_ACL_SYNCHRONIZE} -#elif HAVE_DARWIN_ACL /* MacOS NFSv4 ACL permissions */ - {ACL_READ_DATA, ARCHIVE_ENTRY_ACL_READ_DATA}, - {ACL_LIST_DIRECTORY, ARCHIVE_ENTRY_ACL_LIST_DIRECTORY}, - {ACL_WRITE_DATA, ARCHIVE_ENTRY_ACL_WRITE_DATA}, - {ACL_ADD_FILE, ARCHIVE_ENTRY_ACL_ADD_FILE}, - {ACL_EXECUTE, ARCHIVE_ENTRY_ACL_EXECUTE}, - {ACL_DELETE, ARCHIVE_ENTRY_ACL_DELETE}, - {ACL_APPEND_DATA, ARCHIVE_ENTRY_ACL_APPEND_DATA}, - {ACL_ADD_SUBDIRECTORY, ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY}, - {ACL_DELETE_CHILD, ARCHIVE_ENTRY_ACL_DELETE_CHILD}, - {ACL_READ_ATTRIBUTES, ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES}, - {ACL_WRITE_ATTRIBUTES, ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES}, - {ACL_READ_EXTATTRIBUTES, ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS}, - {ACL_WRITE_EXTATTRIBUTES, ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS}, - {ACL_READ_SECURITY, ARCHIVE_ENTRY_ACL_READ_ACL}, - {ACL_WRITE_SECURITY, ARCHIVE_ENTRY_ACL_WRITE_ACL}, - {ACL_CHANGE_OWNER, ARCHIVE_ENTRY_ACL_WRITE_OWNER}, + static struct { int portable; int machine; } perms[] = { +#ifdef ARCHIVE_ACL_SUNOS_NFS4 /* Solaris NFSv4 ACL permissions */ + {ARCHIVE_ENTRY_ACL_EXECUTE, ACE_EXECUTE}, + {ARCHIVE_ENTRY_ACL_READ_DATA, ACE_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACE_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACE_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACE_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACE_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACE_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACE_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACE_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACE_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACE_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACE_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, ACE_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACE_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACE_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACE_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACE_SYNCHRONIZE} +#elif ARCHIVE_ACL_DARWIN /* MacOS NFSv4 ACL permissions */ + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_EXTATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_EXTATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_SECURITY}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_SECURITY}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_CHANGE_OWNER}, #if HAVE_DECL_ACL_SYNCHRONIZE - {ACL_SYNCHRONIZE, ARCHIVE_ENTRY_ACL_SYNCHRONIZE}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} #endif +#elif ARCHIVE_ACL_LIBRICHACL + {ARCHIVE_ENTRY_ACL_EXECUTE, RICHACE_EXECUTE}, + {ARCHIVE_ENTRY_ACL_READ_DATA, RICHACE_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, RICHACE_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, RICHACE_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, RICHACE_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, RICHACE_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, RICHACE_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, RICHACE_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, RICHACE_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, RICHACE_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, RICHACE_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, RICHACE_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, RICHACE_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, RICHACE_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, RICHACE_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, RICHACE_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, RICHACE_SYNCHRONIZE} #else /* FreeBSD NFSv4 ACL permissions */ - {ACL_EXECUTE, ARCHIVE_ENTRY_ACL_EXECUTE}, - {ACL_WRITE, ARCHIVE_ENTRY_ACL_WRITE}, - {ACL_READ, ARCHIVE_ENTRY_ACL_READ}, - {ACL_READ_DATA, ARCHIVE_ENTRY_ACL_READ_DATA}, - {ACL_LIST_DIRECTORY, ARCHIVE_ENTRY_ACL_LIST_DIRECTORY}, - {ACL_WRITE_DATA, ARCHIVE_ENTRY_ACL_WRITE_DATA}, - {ACL_ADD_FILE, ARCHIVE_ENTRY_ACL_ADD_FILE}, - {ACL_APPEND_DATA, ARCHIVE_ENTRY_ACL_APPEND_DATA}, - {ACL_ADD_SUBDIRECTORY, ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY}, - {ACL_READ_NAMED_ATTRS, ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS}, - {ACL_WRITE_NAMED_ATTRS, ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS}, - {ACL_DELETE_CHILD, ARCHIVE_ENTRY_ACL_DELETE_CHILD}, - {ACL_READ_ATTRIBUTES, ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES}, - {ACL_WRITE_ATTRIBUTES, ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES}, - {ACL_DELETE, ARCHIVE_ENTRY_ACL_DELETE}, - {ACL_READ_ACL, ARCHIVE_ENTRY_ACL_READ_ACL}, - {ACL_WRITE_ACL, ARCHIVE_ENTRY_ACL_WRITE_ACL}, - {ACL_WRITE_OWNER, ARCHIVE_ENTRY_ACL_WRITE_OWNER}, - {ACL_SYNCHRONIZE, ARCHIVE_ENTRY_ACL_SYNCHRONIZE} + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} #endif }; int i, permset = 0; for (i = 0; i < (int)(sizeof(perms)/sizeof(perms[0])); ++i) -#if HAVE_SUN_NFS4_ACL - if (a_access_mask & perms[i].machine) +#if ARCHIVE_ACL_SUNOS_NFS4 || ARCHIVE_ACL_LIBRICHACL + if (mask & perms[i].machine) #else if (acl_get_perm_np(opaque_ps, perms[i].machine)) #endif @@ -408,90 +376,70 @@ acl_permset_to_bitmap(acl_permset_t opaque_ps) } static int -#if HAVE_SUN_NFS4_ACL -acl_flagset_to_bitmap(uint16_t a_flags) +#if ARCHIVE_ACL_SUNOS_NFS4 +acl_flagset_to_bitmap(uint16_t flags) +#elif ARCHIVE_ACL_LIBRICHACL +acl_flagset_to_bitmap(int flags) #else acl_flagset_to_bitmap(acl_flagset_t opaque_fs) #endif { - static struct { int machine; int portable; } flags[] = { -#if HAVE_SUN_NFS4_ACL /* Solaris NFSv4 ACL inheritance flags */ - {ACE_FILE_INHERIT_ACE, ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT}, - {ACE_DIRECTORY_INHERIT_ACE, ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT}, - {ACE_NO_PROPAGATE_INHERIT_ACE, ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ACE_INHERIT_ONLY_ACE, ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY}, - {ACE_SUCCESSFUL_ACCESS_ACE_FLAG, ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS}, - {ACE_FAILED_ACCESS_ACE_FLAG, ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS}, + static struct { int portable; int machine; } perms[] = { +#if ARCHIVE_ACL_SUNOS_NFS4 /* Solaris NFSv4 ACL inheritance flags */ + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACE_FILE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACE_DIRECTORY_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACE_NO_PROPAGATE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACE_INHERIT_ONLY_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACE_SUCCESSFUL_ACCESS_ACE_FLAG}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACE_FAILED_ACCESS_ACE_FLAG}, #ifdef ACE_INHERITED_ACE - {ACE_INHERITED_ACE, ARCHIVE_ENTRY_ACL_ENTRY_INHERITED} + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACE_INHERITED_ACE} #endif -#elif HAVE_DARWIN_ACL /* MacOS NFSv4 ACL inheritance flags */ - {ACL_ENTRY_INHERITED, ARCHIVE_ENTRY_ACL_ENTRY_INHERITED}, - {ACL_ENTRY_FILE_INHERIT, ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT}, - {ACL_ENTRY_DIRECTORY_INHERIT, ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT}, - {ACL_ENTRY_LIMIT_INHERIT, ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ACL_ENTRY_ONLY_INHERIT, ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY} +#elif ARCHIVE_ACL_DARWIN /* MacOS NFSv4 ACL inheritance flags */ + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}, + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_LIMIT_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_ONLY_INHERIT} +#elif ARCHIVE_ACL_LIBRICHACL + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, RICHACE_FILE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, RICHACE_DIRECTORY_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, RICHACE_NO_PROPAGATE_INHERIT_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, RICHACE_INHERIT_ONLY_ACE}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, RICHACE_INHERITED_ACE} #else /* FreeBSD NFSv4 ACL inheritance flags */ - {ACL_ENTRY_FILE_INHERIT, ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT}, - {ACL_ENTRY_DIRECTORY_INHERIT, ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT}, - {ACL_ENTRY_NO_PROPAGATE_INHERIT, ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT}, - {ACL_ENTRY_SUCCESSFUL_ACCESS, ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS}, - {ACL_ENTRY_NO_PROPAGATE_INHERIT, ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS}, - {ACL_ENTRY_INHERIT_ONLY, ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED}, + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY} #endif }; int i, flagset = 0; - for (i = 0; i < (int)(sizeof(flags)/sizeof(flags[0])); ++i) -#if HAVE_SUN_NFS4_ACL - if (a_flags & flags[i].machine) + for (i = 0; i < (int)(sizeof(perms)/sizeof(perms[0])); ++i) +#if ARCHIVE_ACL_SUNOS_NFS4 || ARCHIVE_ACL_LIBRICHACL + if (flags & perms[i].machine) #else - if (acl_get_flag_np(opaque_fs, flags[i].machine)) + if (acl_get_flag_np(opaque_fs, perms[i].machine)) #endif - flagset |= flags[i].portable; + flagset |= perms[i].portable; return flagset; } +#if ARCHIVE_ACL_SUNOS_NFS4 static int -#if HAVE_SUN_NFS4_ACL acl_match(ace_t *ace, struct myacl_t *myacl) -#else -acl_match(acl_entry_t aclent, struct myacl_t *myacl) -#endif { -#if !HAVE_SUN_NFS4_ACL -#if HAVE_DARWIN_ACL - void *q; - uid_t ugid; - int r, idtype; -#else - gid_t g, *gp; - uid_t u, *up; - acl_entry_type_t entry_type; -#endif /* !HAVE_DARWIN_ACL */ - acl_tag_t tag_type; - acl_permset_t opaque_ps; - acl_flagset_t opaque_fs; -#endif /* !HAVE_SUN_NFS4_ACL */ int perms; -#if HAVE_SUN_NFS4_ACL perms = acl_permset_to_bitmap(ace->a_access_mask) | acl_flagset_to_bitmap(ace->a_flags); -#else - acl_get_tag_type(aclent, &tag_type); -#if !HAVE_DARWIN_ACL - acl_get_entry_type_np(aclent, &entry_type); -#endif - /* translate the silly opaque permset to a bitmap */ - acl_get_permset(aclent, &opaque_ps); - acl_get_flagset_np(aclent, &opaque_fs); - perms = acl_permset_to_bitmap(opaque_ps) | acl_flagset_to_bitmap(opaque_fs); -#endif if (perms != myacl->permset) return (0); -#if HAVE_SUN_NFS4_ACL switch (ace->a_type) { case ACE_ACCESS_ALLOWED_ACE_TYPE: if (myacl->type != ARCHIVE_ENTRY_ACL_TYPE_ALLOW) @@ -533,7 +481,85 @@ acl_match(acl_entry_t aclent, struct myacl_t *myacl) if ((uid_t)myacl->qual != ace->a_who) return (0); } -#elif HAVE_DARWIN_ACL + return (1); +} +#elif ARCHIVE_ACL_LIBRICHACL +static int +acl_match(struct richace *richace, struct myacl_t *myacl) +{ + int perms; + + perms = acl_permset_to_bitmap(richace->e_mask) | + acl_flagset_to_bitmap(richace->e_flags); + + if (perms != myacl->permset) + return (0); + + switch (richace->e_type) { + case RICHACE_ACCESS_ALLOWED_ACE_TYPE: + if (myacl->type != ARCHIVE_ENTRY_ACL_TYPE_ALLOW) + return (0); + break; + case RICHACE_ACCESS_DENIED_ACE_TYPE: + if (myacl->type != ARCHIVE_ENTRY_ACL_TYPE_DENY) + return (0); + break; + default: + return (0); + } + + if (richace->e_flags & RICHACE_SPECIAL_WHO) { + switch (richace->e_id) { + case RICHACE_OWNER_SPECIAL_ID: + if (myacl->tag != ARCHIVE_ENTRY_ACL_USER_OBJ) + return (0); + break; + case RICHACE_GROUP_SPECIAL_ID: + if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP_OBJ) + return (0); + break; + case RICHACE_EVERYONE_SPECIAL_ID: + if (myacl->tag != ARCHIVE_ENTRY_ACL_EVERYONE) + return (0); + break; + default: + /* Invalid e_id */ + return (0); + } + } else if (richace->e_flags & RICHACE_IDENTIFIER_GROUP) { + if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP) + return (0); + if ((gid_t)myacl->qual != richace->e_id) + return (0); + } else { + if (myacl->tag != ARCHIVE_ENTRY_ACL_USER) + return (0); + if ((uid_t)myacl->qual != richace->e_id) + return (0); + } + return (1); +} +#elif ARCHIVE_ACL_DARWIN +static int +acl_match(acl_entry_t aclent, struct myacl_t *myacl) +{ + void *q; + uid_t ugid; + int r, idtype; + acl_tag_t tag_type; + acl_permset_t opaque_ps; + acl_flagset_t opaque_fs; + int perms; + + acl_get_tag_type(aclent, &tag_type); + + /* translate the silly opaque permset to a bitmap */ + acl_get_permset(aclent, &opaque_ps); + acl_get_flagset_np(aclent, &opaque_fs); + perms = acl_permset_to_bitmap(opaque_ps) | acl_flagset_to_bitmap(opaque_fs); + if (perms != myacl->permset) + return (0); + r = 0; switch (tag_type) { case ACL_EXTENDED_ALLOW: @@ -570,7 +596,30 @@ acl_match(acl_entry_t aclent, struct myacl_t *myacl) default: return (0); } -#else /* !HAVE_SUN_NFS4_ACL && !HAVE_DARWIN_ACL */ + return (1); +} +#else /* ARCHIVE_ACL_FREEBSD_NFS4 */ +static int +acl_match(acl_entry_t aclent, struct myacl_t *myacl) +{ + gid_t g, *gp; + uid_t u, *up; + acl_entry_type_t entry_type; + acl_tag_t tag_type; + acl_permset_t opaque_ps; + acl_flagset_t opaque_fs; + int perms; + + acl_get_tag_type(aclent, &tag_type); + acl_get_entry_type_np(aclent, &entry_type); + + /* translate the silly opaque permset to a bitmap */ + acl_get_permset(aclent, &opaque_ps); + acl_get_flagset_np(aclent, &opaque_fs); + perms = acl_permset_to_bitmap(opaque_ps) | acl_flagset_to_bitmap(opaque_fs); + if (perms != myacl->permset) + return (0); + switch (entry_type) { case ACL_ENTRY_TYPE_ALLOW: if (myacl->type != ARCHIVE_ENTRY_ACL_TYPE_ALLOW) @@ -622,15 +671,17 @@ acl_match(acl_entry_t aclent, struct myacl_t *myacl) if (myacl->tag != ARCHIVE_ENTRY_ACL_EVERYONE) return (0); break; } -#endif /* !HAVE_SUN_NFS4_ACL && !HAVE_DARWIN_ACL */ return (1); } +#endif /* various ARCHIVE_ACL_NFS4 implementations */ static void compare_acls( -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 void *aclp, int aclcnt, +#elif ARCHIVE_ACL_LIBRICHACL + struct richacl *richacl, #else acl_t acl, #endif @@ -639,19 +690,40 @@ compare_acls( int *marker; int matched; int i, n; -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 int e; ace_t *acl_entry; +#elif ARCHIVE_ACL_LIBRICHACL + int e; + struct richace *acl_entry; + int aclcnt; #else int entry_id = ACL_FIRST_ENTRY; acl_entry_t acl_entry; +#if ARCHIVE_ACL_DARWIN + const int acl_get_entry_ret = 0; +#else + const int acl_get_entry_ret = 1; +#endif +#endif + +#if ARCHIVE_ACL_SUNOS_NFS4 + if (aclp == NULL) + return; +#elif ARCHIVE_ACL_LIBRICHACL + if (richacl == NULL) + return; + aclcnt = richacl->a_count; +#else + if (acl == NULL) + return; #endif n = end - start; marker = malloc(sizeof(marker[0]) * (n + 1)); for (i = 0; i < n; i++) marker[i] = i + start; -#if !HAVE_DARWIN_ACL +#if !ARCHIVE_ACL_DARWIN /* Always include the first ACE. */ if (start > 0) { marker[n] = 0; @@ -663,16 +735,16 @@ compare_acls( * Iterate over acls in system acl object, try to match each * one with an item in the myacls array. */ -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 || ARCHIVE_ACL_LIBRICHACL for (e = 0; e < aclcnt; e++) -#elif HAVE_DARWIN_ACL - while (0 == acl_get_entry(acl, entry_id, &acl_entry)) #else - while (1 == acl_get_entry(acl, entry_id, &acl_entry)) + while (acl_get_entry_ret == acl_get_entry(acl, entry_id, &acl_entry)) #endif { -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 acl_entry = &((ace_t *)aclp)[e]; +#elif ARCHIVE_ACL_LIBRICHACL + acl_entry = &(richacl->a_entries[e]); #else /* After the first time... */ entry_id = ACL_NEXT_ENTRY; @@ -765,7 +837,7 @@ compare_entry_acls(struct archive_entry *ae, struct myacl_t *myacls, const char } free(marker); } -#endif /* HAVE_NFS4_ACL */ +#endif /* ARCHIVE_ACL_NFS4 */ /* * Verify ACL restore-to-disk. This test is Platform-specific. @@ -773,112 +845,36 @@ compare_entry_acls(struct archive_entry *ae, struct myacl_t *myacls, const char DEFINE_TEST(test_acl_platform_nfs4) { -#if !HAVE_NFS4_ACL +#if !ARCHIVE_ACL_NFS4 skipping("NFS4 ACLs are not supported on this platform"); -#else +#else /* ARCHIVE_ACL_NFS4 */ char buff[64]; + int i; struct stat st; struct archive *a; struct archive_entry *ae; - int i; - char *func; -#if HAVE_DARWIN_ACL /* On MacOS we skip trivial ACLs in some tests */ +#if ARCHIVE_ACL_DARWIN /* On MacOS we skip trivial ACLs in some tests */ const int regcnt = acls_reg_cnt - 4; const int dircnt = acls_dir_cnt - 4; #else const int regcnt = acls_reg_cnt; const int dircnt = acls_dir_cnt; #endif -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 void *aclp; int aclcnt; -#else /* !HAVE_SUN_NFS4_ACL */ -#if HAVE_DARWIN_ACL - acl_entry_t aclent; - acl_permset_t permset; - const uid_t uid = 1000; - uuid_t uuid; -#endif /* HAVE_DARWIN_ACL */ - int n; +#elif ARCHIVE_ACL_LIBRICHACL + struct richacl *richacl; +#else /* !ARCHIVE_ACL_SUNOS_NFS4 */ acl_t acl; -#endif /* !HAVE_SUN_NFS4_ACL */ - - /* - * First, do a quick manual set/read of ACL data to - * verify that the local filesystem does support ACLs. - * If it doesn't, we'll simply skip the remaining tests. - */ -#if HAVE_FREEBSD_NFS4_ACL - acl = acl_from_text("owner@:rwxp::allow,group@:rwp:f:allow"); - failure("acl_from_text(): errno = %d (%s)", errno, strerror(errno)); - assert((void *)acl != NULL); -#elif HAVE_DARWIN_ACL - acl = acl_init(1); - assert((void *)acl != NULL); - assertEqualInt(0, acl_create_entry(&acl, &aclent)); - assertEqualInt(0, acl_set_tag_type(aclent, ACL_EXTENDED_ALLOW)); - assertEqualInt(0, acl_get_permset(aclent, &permset)); - assertEqualInt(0, acl_add_perm(permset, ACL_READ_DATA)); - assertEqualInt(0, acl_add_perm(permset, ACL_WRITE_DATA)); - assertEqualInt(0, acl_add_perm(permset, ACL_APPEND_DATA)); - assertEqualInt(0, acl_add_perm(permset, ACL_EXECUTE)); - assertEqualInt(0, acl_set_permset(aclent, permset)); - assertEqualInt(0, mbr_identifier_to_uuid(ID_TYPE_UID, &uid, - sizeof(uid_t), uuid)); - assertEqualInt(0, acl_set_qualifier(aclent, uuid)); #endif - /* Create a test dir and try to set an ACL on it. */ - if (!assertMakeDir("pretest", 0755)) { -#if !HAVE_SUN_NFS4_ACL - acl_free(acl); -#endif - return; - } + assertMakeFile("pretest", 0644, "a"); -#if HAVE_SUN_NFS4_ACL - func = "acl()"; - aclp = sunacl_get(GETACL, &aclcnt, 0, "pretest"); - if (aclp != NULL) { - skipping("NFS4 ACL is not supported on this filesystem"); - free(aclp); + if (setTestAcl("pretest") != ARCHIVE_TEST_ACL_TYPE_NFS4) { + skipping("NFS4 ACLs are not writable on this filesystem"); return; } - free(aclp); - aclp = sunacl_get(ACE_GETACL, &aclcnt, 0, "pretest"); -#else - func = "acl_set_file()"; -#if HAVE_DARWIN_ACL - n = acl_set_file("pretest", ACL_TYPE_EXTENDED, acl); -#else - n = acl_set_file("pretest", ACL_TYPE_NFS4, acl); -#endif - acl_free(acl); -#endif -#if HAVE_SUN_NFS4_ACL - if (aclp == NULL) -#else - if (n != 0) -#endif - { -#if HAVE_SUN_NFS4_ACL - if (errno == ENOSYS || errno == ENOTSUP) -#else - if (errno == EOPNOTSUPP || errno == EINVAL) -#endif - { - skipping("NFS4 ACL is not supported on this filesystem"); - return; - } - } - failure("%s: errno = %d (%s)", func, errno, strerror(errno)); -#if HAVE_SUN_NFS4_ACL - assert(aclp != NULL); - free(aclp); - aclp = NULL; -#else - assertEqualInt(0, n); -#endif /* Create a write-to-disk object. */ assert(NULL != (a = archive_write_disk_new())); @@ -925,23 +921,33 @@ DEFINE_TEST(test_acl_platform_nfs4) /* Verify the data on disk. */ assertEqualInt(0, stat("testall", &st)); assertEqualInt(st.st_mtime, 123456); -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 aclp = sunacl_get(ACE_GETACL, &aclcnt, 0, "testall"); - failure("acl(): errno = %d (%s)", errno, strerror(errno)); + failure("acl(\"%s\"): errno = %d (%s)", "testall", errno, + strerror(errno)); assert(aclp != NULL); +#elif ARCHIVE_ACL_LIBRICHACL + richacl = richacl_get_file("testall"); + failure("richacl_get_file(\"%s\"): errno = %d (%s)", "testall", errno, + strerror(errno)); + assert(richacl != NULL); #else -#if HAVE_DARWIN_ACL +#if ARCHIVE_ACL_DARWIN acl = acl_get_file("testall", ACL_TYPE_EXTENDED); #else acl = acl_get_file("testall", ACL_TYPE_NFS4); #endif - failure("acl_get_file(): errno = %d (%s)", errno, strerror(errno)); + failure("acl_get_file(\"%s\"): errno = %d (%s)", "testall", errno, + strerror(errno)); assert(acl != (acl_t)NULL); #endif -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 compare_acls(aclp, aclcnt, acls_reg, "testall", 0, regcnt); free(aclp); aclp = NULL; +#elif ARCHIVE_ACL_LIBRICHACL + compare_acls(richacl, acls_reg, "testall", 0, regcnt); + richacl_free(richacl); #else compare_acls(acl, acls_reg, "testall", 0, regcnt); acl_free(acl); @@ -953,24 +959,37 @@ DEFINE_TEST(test_acl_platform_nfs4) sprintf(buff, "dir%d", i); assertEqualInt(0, stat(buff, &st)); assertEqualInt(st.st_mtime, 123456 + i); -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 aclp = sunacl_get(ACE_GETACL, &aclcnt, 0, buff); - failure("acl(): errno = %d (%s)", errno, strerror(errno)); + failure("acl(\"%s\"): errno = %d (%s)", buff, errno, + strerror(errno)); assert(aclp != NULL); +#elif ARCHIVE_ACL_LIBRICHACL + richacl = richacl_get_file(buff); + /* First and last two dir do not return a richacl */ + if ((i == 0 || i >= dircnt - 2) && richacl == NULL && + errno == ENODATA) + continue; + failure("richacl_get_file(\"%s\"): errno = %d (%s)", buff, + errno, strerror(errno)); + assert(richacl != NULL); #else -#if HAVE_DARWIN_ACL +#if ARCHIVE_ACL_DARWIN acl = acl_get_file(buff, ACL_TYPE_EXTENDED); #else acl = acl_get_file(buff, ACL_TYPE_NFS4); #endif - failure("acl_get_file(): errno = %d (%s)", errno, + failure("acl_get_file(\"%s\"): errno = %d (%s)", buff, errno, strerror(errno)); assert(acl != (acl_t)NULL); #endif -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 compare_acls(aclp, aclcnt, acls_dir, buff, i, i + 1); free(aclp); aclp = NULL; +#elif ARCHIVE_ACL_LIBRICHACL + compare_acls(richacl, acls_dir, buff, i, i + 1); + richacl_free(richacl); #else compare_acls(acl, acls_dir, buff, i, i + 1); acl_free(acl); @@ -980,23 +999,33 @@ DEFINE_TEST(test_acl_platform_nfs4) /* Verify "dirall" on disk. */ assertEqualInt(0, stat("dirall", &st)); assertEqualInt(st.st_mtime, 123456); -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 aclp = sunacl_get(ACE_GETACL, &aclcnt, 0, "dirall"); - failure("acl(): errno = %d (%s)", errno, strerror(errno)); + failure("acl(\"%s\"): errno = %d (%s)", "dirall", errno, + strerror(errno)); assert(aclp != NULL); +#elif ARCHIVE_ACL_LIBRICHACL + richacl = richacl_get_file("dirall"); + failure("richacl_get_file(\"%s\"): errno = %d (%s)", "dirall", + errno, strerror(errno)); + assert(richacl != NULL); #else -#if HAVE_DARWIN_ACL +#if ARCHIVE_ACL_DARWIN acl = acl_get_file("dirall", ACL_TYPE_EXTENDED); #else acl = acl_get_file("dirall", ACL_TYPE_NFS4); #endif - failure("acl_get_file(): errno = %d (%s)", errno, strerror(errno)); + failure("acl_get_file(\"%s\"): errno = %d (%s)", "dirall", errno, + strerror(errno)); assert(acl != (acl_t)NULL); #endif -#if HAVE_SUN_NFS4_ACL +#if ARCHIVE_ACL_SUNOS_NFS4 compare_acls(aclp, aclcnt, acls_dir, "dirall", 0, dircnt); free(aclp); aclp = NULL; +#elif ARCHIVE_ACL_LIBRICHACL + compare_acls(richacl, acls_dir, "dirall", 0, dircnt); + richacl_free(richacl); #else compare_acls(acl, acls_dir, "dirall", 0, dircnt); acl_free(acl); @@ -1025,5 +1054,5 @@ DEFINE_TEST(test_acl_platform_nfs4) compare_entry_acls(ae, acls_dir, "dirall", 0, acls_dir_cnt); archive_entry_free(ae); assertEqualInt(ARCHIVE_OK, archive_read_free(a)); -#endif /* HAVE_NFS4_ACL */ +#endif /* ARCHIVE_ACL_NFS4 */ } diff --git a/archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c b/archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c index a0da2273e2a..801a7acfc85 100644 --- a/archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c +++ b/archivers/libarchive/files/libarchive/test/test_acl_platform_posix1e.c @@ -26,7 +26,7 @@ #include "test.h" __FBSDID("$FreeBSD: head/lib/libarchive/test/test_acl_freebsd.c 189427 2009-03-06 04:21:23Z kientzle $"); -#if HAVE_POSIX_ACL || HAVE_SUN_ACL +#if ARCHIVE_ACL_POSIX1E #include #if HAVE_ACL_GET_PERM #include @@ -35,63 +35,6 @@ __FBSDID("$FreeBSD: head/lib/libarchive/test/test_acl_freebsd.c 189427 2009-03-0 #define ACL_GET_PERM acl_get_perm_np #endif -#if HAVE_SUN_ACL -static void * -sunacl_get(int cmd, int *aclcnt, int fd, const char *path) -{ - int cnt, cntcmd; - size_t size; - void *aclp; - - if (cmd == GETACL) { - cntcmd = GETACLCNT; - size = sizeof(aclent_t); - } -#if HAVE_SUN_NFS4_ACL - else if (cmd == ACE_GETACL) { - cntcmd = ACE_GETACLCNT; - size = sizeof(ace_t); - } -#endif - else { - errno = EINVAL; - *aclcnt = -1; - return (NULL); - } - - aclp = NULL; - cnt = -2; - while (cnt == -2 || (cnt == -1 && errno == ENOSPC)) { - if (path != NULL) - cnt = acl(path, cntcmd, 0, NULL); - else - cnt = facl(fd, cntcmd, 0, NULL); - - if (cnt > 0) { - if (aclp == NULL) - aclp = malloc(cnt * size); - else - aclp = realloc(NULL, cnt * size); - if (aclp != NULL) { - if (path != NULL) - cnt = acl(path, cmd, cnt, aclp); - else - cnt = facl(fd, cmd, cnt, aclp); - } - } else { - if (aclp != NULL) { - free(aclp); - aclp = NULL; - } - break; - } - } - - *aclcnt = cnt; - return (aclp); -} -#endif /* HAVE_SUN_ACL */ - static struct archive_test_acl_t acls2[] = { { ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE | ARCHIVE_ENTRY_ACL_READ, ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" }, @@ -112,18 +55,18 @@ static struct archive_test_acl_t acls2[] = { }; static int -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS acl_entry_get_perm(aclent_t *aclent) #else acl_entry_get_perm(acl_entry_t aclent) #endif { int permset = 0; -#if HAVE_POSIX_ACL +#if ARCHIVE_ACL_FREEBSD || ARCHIVE_ACL_LIBACL acl_permset_t opaque_ps; #endif -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS if (aclent->a_perm & 1) permset |= ARCHIVE_ENTRY_ACL_EXECUTE; if (aclent->a_perm & 2) @@ -184,114 +127,108 @@ acl_get_specific_entry(acl_t acl, acl_tag_t requested_tag_type, int requested_ta } #endif +#if ARCHIVE_ACL_SUNOS static int -#if HAVE_SUN_ACL acl_match(aclent_t *aclent, struct archive_test_acl_t *myacl) -#else +{ + + if (myacl->permset != acl_entry_get_perm(aclent)) + return (0); + + switch (aclent->a_type) { + case DEF_USER_OBJ: + case USER_OBJ: + if (myacl->tag != ARCHIVE_ENTRY_ACL_USER_OBJ) return (0); + break; + if (myacl->tag != ARCHIVE_ENTRY_ACL_USER) + return (0); + if ((uid_t)myacl->qual != aclent->a_id) + return (0); + break; + case DEF_GROUP_OBJ: + case GROUP_OBJ: + if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP_OBJ) return (0); + break; + case DEF_GROUP: + case GROUP: + if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP) + return (0); + if ((gid_t)myacl->qual != aclent->a_id) + return (0); + break; + case DEF_CLASS_OBJ: + case CLASS_OBJ: + if (myacl->tag != ARCHIVE_ENTRY_ACL_MASK) return (0); + break; + case DEF_OTHER_OBJ: + case OTHER_OBJ: + if (myacl->tag != ARCHIVE_ENTRY_ACL_OTHER) return (0); + break; + } + return (1); +} + +#else /* ARCHIVE_ACL_FREEBSD || ARCHIVE_ACL_LIBACL */ +static int acl_match(acl_entry_t aclent, struct archive_test_acl_t *myacl) -#endif { -#if HAVE_POSIX_ACL gid_t g, *gp; uid_t u, *up; acl_tag_t tag_type; -#endif if (myacl->permset != acl_entry_get_perm(aclent)) return (0); -#if HAVE_SUN_ACL - switch (aclent->a_type) -#else acl_get_tag_type(aclent, &tag_type); - switch (tag_type) -#endif - { -#if HAVE_SUN_ACL - case DEF_USER_OBJ: - case USER_OBJ: -#else + switch (tag_type) { case ACL_USER_OBJ: -#endif if (myacl->tag != ARCHIVE_ENTRY_ACL_USER_OBJ) return (0); break; -#if HAVE_SUN_ACL - case DEF_USER: - case USER: -#else case ACL_USER: -#endif if (myacl->tag != ARCHIVE_ENTRY_ACL_USER) return (0); -#if HAVE_SUN_ACL - if ((uid_t)myacl->qual != aclent->a_id) - return (0); -#else up = acl_get_qualifier(aclent); u = *up; acl_free(up); if ((uid_t)myacl->qual != u) return (0); -#endif break; -#if HAVE_SUN_ACL - case DEF_GROUP_OBJ: - case GROUP_OBJ: -#else case ACL_GROUP_OBJ: -#endif if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP_OBJ) return (0); break; -#if HAVE_SUN_ACL - case DEF_GROUP: - case GROUP: -#else case ACL_GROUP: -#endif if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP) return (0); -#if HAVE_SUN_ACL - if ((gid_t)myacl->qual != aclent->a_id) - return (0); -#else gp = acl_get_qualifier(aclent); g = *gp; acl_free(gp); if ((gid_t)myacl->qual != g) return (0); -#endif break; -#if HAVE_SUN_ACL - case DEF_CLASS_OBJ: - case CLASS_OBJ: -#else case ACL_MASK: -#endif if (myacl->tag != ARCHIVE_ENTRY_ACL_MASK) return (0); break; -#if HAVE_SUN_ACL - case DEF_OTHER_OBJ: - case OTHER_OBJ: -#else case ACL_OTHER: -#endif if (myacl->tag != ARCHIVE_ENTRY_ACL_OTHER) return (0); break; } return (1); } +#endif static void -#if HAVE_SUN_ACL -compare_acls(void *aclp, int aclcnt, struct archive_test_acl_t *myacls, int n) +compare_acls( +#if ARCHIVE_ACL_SUNOS + void *aclp, int aclcnt, #else -compare_acls(acl_t acl, struct archive_test_acl_t *myacls, int n) + acl_t acl, #endif + struct archive_test_acl_t *myacls, int n) { int *marker; int matched; int i; -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS int e; aclent_t *acl_entry; #else @@ -310,7 +247,7 @@ compare_acls(acl_t acl, struct archive_test_acl_t *myacls, int n) * Iterate over acls in system acl object, try to match each * one with an item in the myacls array. */ -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS for(e = 0; e < aclcnt; e++) { acl_entry = &((aclent_t *)aclp)[e]; #else @@ -345,102 +282,33 @@ compare_acls(acl_t acl, struct archive_test_acl_t *myacls, int n) } free(marker); } - #endif - /* * Verify ACL restore-to-disk. This test is Platform-specific. */ DEFINE_TEST(test_acl_platform_posix1e_restore) { -#if !HAVE_SUN_ACL && !HAVE_POSIX_ACL +#if !ARCHIVE_ACL_POSIX1E skipping("POSIX.1e ACLs are not supported on this platform"); -#else /* HAVE_SUN_ACL || HAVE_POSIX_ACL */ +#else /* ARCHIVE_ACL_POSIX1E */ struct stat st; struct archive *a; struct archive_entry *ae; - int n, fd; - char *func; -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS void *aclp; int aclcnt; #else acl_t acl; #endif - /* - * First, do a quick manual set/read of ACL data to - * verify that the local filesystem does support ACLs. - * If it doesn't, we'll simply skip the remaining tests. - */ -#if HAVE_SUN_ACL - aclent_t aclp1[] = { - { USER_OBJ, -1, 4 | 2 | 1 }, - { USER, 1, 4 | 2 }, - { GROUP_OBJ, -1, 4 | 2 | 1 }, - { GROUP, 15, 4 | 1 }, - { CLASS_OBJ, -1, 4 | 2 | 1 }, - { OTHER_OBJ, -1, 4 | 2 | 1 } - }; -#else - acl = acl_from_text("u::rwx,u:1:rw,g::rwx,g:15:rx,o::rwx,m::rwx"); - failure("acl_from_text(): errno = %d (%s)", errno, strerror(errno)); - assert((void *)acl != NULL); -#endif - - /* Create a test file and try ACL on it. */ - fd = open("pretest", O_WRONLY | O_CREAT | O_EXCL, 0777); - failure("Could not create test file?!"); - if (!assert(fd >= 0)) { -#if !HAVE_SUN_ACL - acl_free(acl); -#endif - return; - } + assertMakeFile("pretest", 0644, "a"); -#if HAVE_SUN_ACL - aclp = sunacl_get(GETACL, &aclcnt, fd, NULL); - if (aclp == NULL) - close(fd); - if (errno == ENOSYS || errno == ENOTSUP) { - skipping("POSIX.1e ACLs are not supported on this filesystem"); - return; - } - failure("facl(): errno = %d (%s)", errno, strerror(errno)); - if (assert(aclp != NULL) == 0) { - free(aclp); + if (setTestAcl("pretest") != ARCHIVE_TEST_ACL_TYPE_POSIX1E) { + skipping("POSIX.1e ACLs are not writable on this filesystem"); return; } - free(aclp); - aclp = NULL; - - func = "facl()"; - n = facl(fd, SETACL, (int)(sizeof(aclp1)/sizeof(aclp1[0])), &aclp1); -#else - func = "acl_set_fd()"; - n = acl_set_fd(fd, acl); -#endif -#if !HAVE_SUN_ACL - acl_free(acl); -#endif - if (n != 0) { -#if HAVE_SUN_ACL - if (errno == ENOSYS || errno == ENOTSUP) -#else - if (errno == EOPNOTSUPP || errno == EINVAL) -#endif - { - close(fd); - skipping("POSIX.1e ACLs are not supported on this filesystem"); - return; - } - } - failure("%s: errno = %d (%s)", func, errno, strerror(errno)); - assertEqualInt(0, n); - - close(fd); /* Create a write-to-disk object. */ assert(NULL != (a = archive_write_disk_new())); @@ -464,7 +332,7 @@ DEFINE_TEST(test_acl_platform_posix1e_restore) /* Verify the data on disk. */ assertEqualInt(0, stat("test0", &st)); assertEqualInt(st.st_mtime, 123456); -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS aclp = sunacl_get(GETACL, &aclcnt, 0, "test0"); failure("acl(): errno = %d (%s)", errno, strerror(errno)); assert(aclp != NULL); @@ -473,7 +341,7 @@ DEFINE_TEST(test_acl_platform_posix1e_restore) failure("acl_get_file(): errno = %d (%s)", errno, strerror(errno)); assert(acl != (acl_t)NULL); #endif -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS compare_acls(aclp, aclcnt, acls2, sizeof(acls2)/sizeof(acls2[0])); free(aclp); aclp = NULL; @@ -482,7 +350,7 @@ DEFINE_TEST(test_acl_platform_posix1e_restore) acl_free(acl); #endif -#endif /* HAVE_SUN_ACL || HAVE_POSIX_ACL */ +#endif /* ARCHIVE_ACL_POSIX1E */ } /* @@ -490,15 +358,15 @@ DEFINE_TEST(test_acl_platform_posix1e_restore) */ DEFINE_TEST(test_acl_platform_posix1e_read) { -#if !HAVE_SUN_ACL && !HAVE_POSIX_ACL +#if !ARCHIVE_ACL_POSIX1E skipping("POSIX.1e ACLs are not supported on this platform"); -#else +#else /* ARCHIVE_ACL_POSIX1E */ struct archive *a; struct archive_entry *ae; int n, fd, flags, dflags; char *func, *acl_text; const char *acl1_text, *acl2_text, *acl3_text; -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS void *aclp; int aclcnt; #else @@ -512,7 +380,7 @@ DEFINE_TEST(test_acl_platform_posix1e_read) */ /* Create a test file f1 with acl1 */ -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS acl1_text = "user::rwx," "group::rwx," "other:rwx," @@ -541,12 +409,12 @@ DEFINE_TEST(test_acl_platform_posix1e_read) fd = open("f1", O_WRONLY | O_CREAT | O_EXCL, 0777); failure("Could not create test file?!"); if (!assert(fd >= 0)) { -#if !HAVE_SUN_ACL +#if !ARCHIVE_ACL_SUNOS acl_free(acl1); #endif return; } -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS /* Check if Solaris filesystem supports POSIX.1e ACLs */ aclp = sunacl_get(GETACL, &aclcnt, fd, NULL); if (aclp == 0) @@ -564,12 +432,12 @@ DEFINE_TEST(test_acl_platform_posix1e_read) func = "acl_set_fd()"; n = acl_set_fd(fd, acl1); #endif -#if !HAVE_SUN_ACL +#if !ARCHIVE_ACL_SUNOS acl_free(acl1); #endif if (n != 0) { -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS if (errno == ENOSYS || errno == ENOTSUP) #else if (errno == EOPNOTSUPP || errno == EINVAL) @@ -598,7 +466,7 @@ DEFINE_TEST(test_acl_platform_posix1e_read) * to read ACLs, resulting in reading the ACL from a like-named * file in the wrong directory. */ -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS acl2_text = "user::rwx," "group::rwx," "other:---," @@ -627,12 +495,12 @@ DEFINE_TEST(test_acl_platform_posix1e_read) fd = open("d/f1", O_WRONLY | O_CREAT | O_EXCL, 0777); failure("Could not create test file?!"); if (!assert(fd >= 0)) { -#if !HAVE_SUN_ACL +#if !ARCHIVE_ACL_SUNOS acl_free(acl2); #endif return; } -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS func = "facl()"; n = facl(fd, SETACL, (int)(sizeof(aclp2) / sizeof(aclp2[0])), aclp2); #else @@ -649,7 +517,7 @@ DEFINE_TEST(test_acl_platform_posix1e_read) /* Create nested directory d2 with default ACLs */ assertMakeDir("d/d2", 0755); -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS acl3_text = "user::rwx," "group::r-x," "other:r-x," @@ -688,7 +556,7 @@ DEFINE_TEST(test_acl_platform_posix1e_read) assert((void *)acl3 != NULL); #endif -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS func = "acl()"; n = acl("d/d2", SETACL, (int)(sizeof(aclp3) / sizeof(aclp3[0])), aclp3); #else @@ -704,7 +572,7 @@ DEFINE_TEST(test_acl_platform_posix1e_read) assertEqualIntA(a, ARCHIVE_OK, archive_read_disk_open(a, ".")); assert(NULL != (ae = archive_entry_new())); -#if HAVE_SUN_ACL +#if ARCHIVE_ACL_SUNOS flags = ARCHIVE_ENTRY_ACL_TYPE_POSIX1E | ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA | ARCHIVE_ENTRY_ACL_STYLE_SOLARIS; @@ -734,5 +602,5 @@ DEFINE_TEST(test_acl_platform_posix1e_read) archive_entry_free(ae); assertEqualInt(ARCHIVE_OK, archive_free(a)); -#endif +#endif /* ARCHIVE_ACL_POSIX1E */ } diff --git a/archivers/libarchive/files/libarchive/test/test_read_disk_directory_traversals.c b/archivers/libarchive/files/libarchive/test/test_read_disk_directory_traversals.c index fdbfbec91e9..705b3d989cd 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_disk_directory_traversals.c +++ b/archivers/libarchive/files/libarchive/test/test_read_disk_directory_traversals.c @@ -1231,8 +1231,8 @@ test_restore_atime(void) * Test4: Traversals with ARCHIVE_READDISK_RESTORE_ATIME and * ARCHIVE_READDISK_HONOR_NODUMP */ - assertNodump("at/f1"); - assertNodump("at/f2"); + assertSetNodump("at/f1"); + assertSetNodump("at/f2"); assertUtimes("at/f1", 886600, 0, 886600, 0); assertUtimes("at/f2", 886611, 0, 886611, 0); assertUtimes("at/fe", 886611, 0, 886611, 0); @@ -1450,7 +1450,7 @@ test_nodump(void) assertMakeFile("nd/f1", 0644, "0123456789"); assertMakeFile("nd/f2", 0644, "hello world"); assertMakeFile("nd/fe", 0644, NULL); - assertNodump("nd/f2"); + assertSetNodump("nd/f2"); assertUtimes("nd/f1", 886600, 0, 886600, 0); assertUtimes("nd/f2", 886611, 0, 886611, 0); assertUtimes("nd/fe", 886611, 0, 886611, 0); diff --git a/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c b/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c index a8342f55790..8576d579f9c 100644 --- a/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c +++ b/archivers/libarchive/files/libarchive/test/test_read_format_mtree.c @@ -183,7 +183,7 @@ test_read_format_mtree1(void) min_time = archive_entry_mtime(ae); assert(min_time <= 0); /* Simply asserting min_time - 1 > 0 breaks with some compiler optimizations. */ - t = min_time - 1; + t = (time_t)((uintmax_t)min_time - 1); assert(t > 0); assertEqualInt(archive_entry_is_encrypted(ae), 0); assertEqualIntA(a, archive_read_has_encrypted_entries(a), ARCHIVE_READ_FORMAT_ENCRYPTION_UNSUPPORTED); diff --git a/archivers/libarchive/files/libarchive/test/test_write_format_pax.c b/archivers/libarchive/files/libarchive/test/test_write_format_pax.c index 1bae0050f08..41a423a96a0 100644 --- a/archivers/libarchive/files/libarchive/test/test_write_format_pax.c +++ b/archivers/libarchive/files/libarchive/test/test_write_format_pax.c @@ -80,13 +80,19 @@ DEFINE_TEST(test_write_format_pax) /* * "file3" is sparse file and has hole size of which is * 1024000 bytes, and has 8 bytes data after the hole. + * + * Pad the filename to make it larger than the ustar limit. + * It should still read back correctly. */ assert((ae = archive_entry_new()) != NULL); archive_entry_set_atime(ae, 2, 20); archive_entry_set_birthtime(ae, 3, 30); archive_entry_set_ctime(ae, 4, 40); archive_entry_set_mtime(ae, 5, 50); - archive_entry_copy_pathname(ae, "file3"); + archive_entry_copy_pathname(ae, "file3" + "_123456789_123456789_123456789_123456789_123456789" + "_123456789_123456789_123456789_123456789_123456789" + "_123456789_123456789_123456789_123456789_123456789"); archive_entry_set_mode(ae, S_IFREG | 0755); archive_entry_set_size(ae, 1024008); archive_entry_sparse_add_entry(ae, 1024000, 8); @@ -171,7 +177,11 @@ DEFINE_TEST(test_write_format_pax) assertEqualInt(40, archive_entry_ctime_nsec(ae)); assertEqualInt(5, archive_entry_mtime(ae)); assertEqualInt(50, archive_entry_mtime_nsec(ae)); - assertEqualString("file3", archive_entry_pathname(ae)); + assertEqualString("file3" + "_123456789_123456789_123456789_123456789_123456789" + "_123456789_123456789_123456789_123456789_123456789" + "_123456789_123456789_123456789_123456789_123456789", + archive_entry_pathname(ae)); assert((S_IFREG | 0755) == archive_entry_mode(ae)); assertEqualInt(1024008, archive_entry_size(ae)); assertEqualInt(1, archive_entry_sparse_reset(ae)); diff --git a/archivers/libarchive/files/tar/bsdtar.1 b/archivers/libarchive/files/tar/bsdtar.1 index b60f09c5fb2..cdc317b6cf4 100644 --- a/archivers/libarchive/files/tar/bsdtar.1 +++ b/archivers/libarchive/files/tar/bsdtar.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2017 +.Dd February 25, 2017 .Dt TAR 1 .Os .Sh NAME @@ -169,7 +169,7 @@ restricted pax format and bzip2 compression. (c, r, u, x modes only) Archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of .Fl Fl no-acls -and the default behavior in c, r, and u modes (except Mac OS X) or if +and the default behavior in c, r, and u modes (except on Mac OS X) or if .Nm is run in x mode as root. On Mac OS X this option translates extended ACLs to NFSv4 ACLs. To store extended ACLs the @@ -396,7 +396,7 @@ except it compares mtime entries instead of ctime entries. Honor the nodump file flag by skipping this file. .It Fl Fl nopreserveHFSCompression (x mode only) -Mac OS X specific(v10.6 or later). Do not compress extracted regular files +Mac OS X specific (v10.6 or later). Do not compress extracted regular files which were compressed with HFS+ compression before archived. By default, compress the regular files again with HFS+ compression. .It Fl Fl null @@ -416,7 +416,7 @@ Do not archive or extract POSIX.1e or NFSv4 ACLs. This is the reverse of .Fl Fl acls and the default behavior if .Nm -is run as non-root in x mode (on Mac OS X also in c, r and u modes). +is run as non-root in x mode (on Mac OS X as any user in c, r, u and x modes). .It Fl Fl no-fflags (c, r, u, x modes only) Do not archive or extract file flags. This is the reverse of @@ -450,14 +450,7 @@ This is the reverse of .Fl p and the default behavior if .Nm -is run as non-root and can be overridden by also specifying -.Fl Fl acls , -.Fl Fl fflags , -.Fl Fl mac-metadata, -.Fl Fl same-owner , -.Fl Fl same-permissions -and -.Fl Fl xattrs . +is run as non-root. .It Fl Fl no-xattrs (c, r, u, x modes only) Do not archive or extract extended attributes. This is the reverse of @@ -647,16 +640,16 @@ This option suppresses these behaviors. (x mode only) Preserve file permissions. 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 +extended attributes and extended file flags, if available, for each item +extracted from the archive. This is te reverse of +.Fl Fl no-same-permissions +and the default if .Nm -is being run by root and can be overridden by also specifying +is being run by root and can be partially overridden by also specifying .Fl Fl no-acls , .Fl Fl no-fflags , -.Fl Fl no-mac-metadata, -.Fl Fl no-same-owner , -.Fl Fl no-same-permissions -and +.Fl Fl no-mac-metadata +or .Fl Fl no-xattrs . .It Fl Fl passphrase Ar passphrase The diff --git a/archivers/libarchive/files/tar/bsdtar.c b/archivers/libarchive/files/tar/bsdtar.c index a9252a5c7c2..9fc68332e5d 100644 --- a/archivers/libarchive/files/tar/bsdtar.c +++ b/archivers/libarchive/files/tar/bsdtar.c @@ -118,11 +118,11 @@ need_report(void) } #endif -static void long_help(void); +static void long_help(void) __LA_DEAD; static void only_mode(struct bsdtar *, const char *opt, const char *valid); static void set_mode(struct bsdtar *, char opt); -static void version(void); +static void version(void) __LA_DEAD; /* A basic set of security flags to request from libarchive. */ #define SECURITY \ diff --git a/archivers/libarchive/files/tar/bsdtar.h b/archivers/libarchive/files/tar/bsdtar.h index ee9c6485fcc..10a2cf2f9bd 100644 --- a/archivers/libarchive/files/tar/bsdtar.h +++ b/archivers/libarchive/files/tar/bsdtar.h @@ -189,7 +189,7 @@ void do_chdir(struct bsdtar *); int edit_pathname(struct bsdtar *, struct archive_entry *); int need_report(void); int pathcmp(const char *a, const char *b); -void safe_fprintf(FILE *, const char *fmt, ...); +void safe_fprintf(FILE *, const char *fmt, ...) __LA_PRINTF(2, 3); void set_chdir(struct bsdtar *, const char *newdir); const char *tar_i64toa(int64_t); void tar_mode_c(struct bsdtar *bsdtar); @@ -197,8 +197,8 @@ void tar_mode_r(struct bsdtar *bsdtar); void tar_mode_t(struct bsdtar *bsdtar); void tar_mode_u(struct bsdtar *bsdtar); void tar_mode_x(struct bsdtar *bsdtar); -void usage(void); -int yes(const char *fmt, ...); +void usage(void) __LA_DEAD; +int yes(const char *fmt, ...) __LA_PRINTF(1, 2); #if defined(HAVE_REGEX_H) || defined(HAVE_PCREPOSIX_H) void add_substitution(struct bsdtar *, const char *); diff --git a/archivers/libarchive/files/tar/test/CMakeLists.txt b/archivers/libarchive/files/tar/test/CMakeLists.txt index 3dd36019eed..abd43b0f4b2 100644 --- a/archivers/libarchive/files/tar/test/CMakeLists.txt +++ b/archivers/libarchive/files/tar/test/CMakeLists.txt @@ -34,9 +34,11 @@ IF(ENABLE_TAR AND ENABLE_TEST) test_option_U_upper.c test_option_X_upper.c test_option_a.c + test_option_acls.c test_option_b.c test_option_b64encode.c test_option_exclude.c + test_option_fflags.c test_option_gid_gname.c test_option_grzip.c test_option_j.c @@ -56,6 +58,7 @@ IF(ENABLE_TAR AND ENABLE_TEST) test_option_s.c test_option_uid_uname.c test_option_uuencode.c + test_option_xattrs.c test_option_xz.c test_option_z.c test_patterns.c @@ -71,6 +74,16 @@ IF(ENABLE_TAR AND ENABLE_TEST) # Register target # ADD_EXECUTABLE(bsdtar_test ${bsdtar_test_SOURCES}) + IF(ENABLE_ACL) + SET(TEST_ACL_LIBS "") + IF(HAVE_LIBACL) + LIST(APPEND TEST_ACL_LIBS ${ACL_LIBRARY}) + ENDIF(HAVE_LIBACL) + IF(HAVE_LIBRICHACL) + LIST(APPEND TEST_ACL_LIBS ${RICHACL_LIBRARY}) + ENDIF(HAVE_LIBRICHACL) + TARGET_LINK_LIBRARIES(bsdtar_test ${TEST_ACL_LIBS}) + ENDIF(ENABLE_ACL) SET_PROPERTY(TARGET bsdtar_test PROPERTY COMPILE_DEFINITIONS LIST_H) # diff --git a/archivers/libarchive/files/tar/test/list.h b/archivers/libarchive/files/tar/test/list.h index 70214084537..2b28490e779 100644 --- a/archivers/libarchive/files/tar/test/list.h +++ b/archivers/libarchive/files/tar/test/list.h @@ -17,10 +17,12 @@ DEFINE_TEST(test_help) DEFINE_TEST(test_leading_slash) DEFINE_TEST(test_missing_file) DEFINE_TEST(test_option_a) +DEFINE_TEST(test_option_acls) DEFINE_TEST(test_option_b64encode) DEFINE_TEST(test_option_b) DEFINE_TEST(test_option_C_upper) DEFINE_TEST(test_option_exclude) +DEFINE_TEST(test_option_fflags) DEFINE_TEST(test_option_gid_gname) DEFINE_TEST(test_option_grzip) DEFINE_TEST(test_option_H_upper) @@ -45,6 +47,7 @@ DEFINE_TEST(test_option_T_upper) DEFINE_TEST(test_option_uid_uname) DEFINE_TEST(test_option_uuencode) DEFINE_TEST(test_option_U_upper) +DEFINE_TEST(test_option_xattrs) DEFINE_TEST(test_option_X_upper) DEFINE_TEST(test_option_xz) DEFINE_TEST(test_option_z) diff --git a/archivers/libarchive/files/test_utils/test_common.h b/archivers/libarchive/files/test_utils/test_common.h index 9807c218dbd..1425dd84b7d 100644 --- a/archivers/libarchive/files/test_utils/test_common.h +++ b/archivers/libarchive/files/test_utils/test_common.h @@ -73,6 +73,15 @@ #include #endif #include +#ifdef HAVE_ACL_LIBACL_H +#include +#endif +#ifdef HAVE_SYS_ACL_H +#include +#endif +#ifdef HAVE_SYS_RICHACL_H +#include +#endif #ifdef HAVE_WINDOWS_H #include #endif @@ -121,39 +130,11 @@ #define O_BINARY 0 #endif -/* - * If this platform has , acl_create(), acl_init(), - * acl_set_file(), and ACL_USER, we assume it has the rest of the - * POSIX.1e draft functions used in archive_read_extract.c. - */ -#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE -#if HAVE_DECL_ACL_USER -#define HAVE_POSIX_ACL 1 -#elif HAVE_DECL_ACL_TYPE_EXTENDED && HAVE_MEMBERSHIP_H -#define HAVE_DARWIN_ACL 1 -#endif -#if HAVE_DECL_ACL_TYPE_NFS4 -#define HAVE_FREEBSD_NFS4_ACL 1 -#endif -#endif +#include "archive_platform_acl.h" +#define ARCHIVE_TEST_ACL_TYPE_POSIX1E 1 +#define ARCHIVE_TEST_ACL_TYPE_NFS4 2 -/* - * If this platform has , acl_get(), facl_get(), acl_set(), - * facl_set() and types aclent_t and ace_t it uses Solaris-style ACL functions - */ -#if HAVE_SYS_ACL_H && HAVE_ACL && HAVE_FACL && HAVE_ACLENT_T && \ - HAVE_DECL_GETACL && HAVE_DECL_GETACLCNT && HAVE_DECL_SETACL -#define HAVE_SUN_ACL 1 -#if HAVE_ACE_T && HAVE_DECL_ACE_GETACL && HAVE_DECL_ACE_GETACLCNT && \ - HAVE_DECL_ACE_SETACL -#define HAVE_SUN_NFS4_ACL 1 -#endif -#endif - -/* Define if platform supports NFSv4 ACLs */ -#if HAVE_FREEBSD_NFS4_ACL || HAVE_SUN_NFS4_ACL || HAVE_DARWIN_ACL -#define HAVE_NFS4_ACL 1 -#endif +#include "archive_platform_xattr.h" /* * Redefine DEFINE_TEST for use in defining the test functions. @@ -166,6 +147,9 @@ /* chdir() and error if it fails */ #define assertChdir(path) \ assertion_chdir(__FILE__, __LINE__, path) +/* Assert two files have the same file flags */ +#define assertEqualFflags(patha, pathb) \ + assertion_compare_fflags(__FILE__, __LINE__, patha, pathb, 0) /* 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) @@ -247,10 +231,13 @@ 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 assertSetNodump(path) \ + assertion_set_nodump(__FILE__, __LINE__, path) #define assertUmask(mask) \ assertion_umask(__FILE__, __LINE__, mask) +/* Assert that two files have unequal file flags */ +#define assertUnequalFflags(patha, pathb) \ + assertion_compare_fflags(__FILE__, __LINE__, patha, pathb, 1) #define assertUtimes(pathname, atime, atime_nsec, mtime, mtime_nsec) \ assertion_utimes(__FILE__, __LINE__, pathname, atime, atime_nsec, mtime, mtime_nsec) #ifndef PROGRAM @@ -273,6 +260,8 @@ 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_compare_fflags(const char *, int, const char *, const char *, + int); 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 *); @@ -303,8 +292,8 @@ 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_set_nodump(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 ); @@ -355,9 +344,23 @@ int canXz(void); /* Return true if this filesystem can handle nodump flags. */ int canNodump(void); +/* Set test ACLs */ +int setTestAcl(const char *path); + +/* Get extended attribute */ +void *getXattr(const char *, const char *, size_t *); + +/* Set extended attribute */ +int setXattr(const char *, const char *, const void *, size_t); + /* Return true if the file has large i-node number(>0xffffffff). */ int is_LargeInode(const char *); +#if ARCHIVE_ACL_SUNOS +/* Fetch ACLs on Solaris using acl() or facl() */ +void *sunacl_get(int cmd, int *aclcnt, int fd, const char *path); +#endif + /* 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, ...); -- cgit v1.2.3